*/var vi=Symbol.for("react.element"),hg=Symbol.for("react.portal"),gg=Symbol.for("react.fragment"),mg=Symbol.for("react.strict_mode"),vg=Symbol.for("react.profiler"),yg=Symbol.for("react.provider"),Sg=Symbol.for("react.context"),wg=Symbol.for("react.forward_ref"),xg=Symbol.for("react.suspense"),kg=Symbol.for("react.memo"),Pg=Symbol.for("react.lazy"),Uu=Symbol.iterator;function Og(e){return e===null||typeof e!="object"?null:(e=Uu&&e[Uu]||e["@@iterator"],typeof e=="function"?e:null)}var od={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sd=Object.assign,ad={};function yr(e,t,n){this.props=e,this.context=t,this.refs=ad,this.updater=n||od}yr.prototype.isReactComponent={};yr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};yr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ld(){}ld.prototype=yr.prototype;function Sl(e,t,n){this.props=e,this.context=t,this.refs=ad,this.updater=n||od}var wl=Sl.prototype=new ld;wl.constructor=Sl;sd(wl,yr.prototype);wl.isPureReactComponent=!0;var zu=Array.isArray,ud=Object.prototype.hasOwnProperty,xl={current:null},cd={key:!0,ref:!0,__self:!0,__source:!0};function fd(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)ud.call(t,r)&&!cd.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:vi,type:e,key:o,ref:s,props:i,_owner:xl.current}}function Eg(e,t){return{$$typeof:vi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function kl(e){return typeof e=="object"&&e!==null&&e.$$typeof===vi}function _g(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){returnt[n]})}varBu=/\/+/g;functionks(e,t){returntypeofe=="object"&&e!==null&&e.key!=null?_g(""+e.key):t.toString(36)}functionKi(e,t,n,r,i){varo=typeofe;(o==="undefined"||o==="boolean")&&(e=null);vars=!1;if(e===null)s=!0;elseswitch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){casevi:casehg:s=!0}}if(s)returns=e,i=i(s),e=r===""?"."+ks(s,0):r,zu(i)?(n="",e!=null&&(n=e.replace(Bu,"$&/")+"/"),Ki(i,t,n,"",function(u){returnu})):i!=null&&(kl(i)&&(i=Eg(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Bu,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",zu(e))for(vara=0;a<e.length;a++){o=e[a];varl=r+ks(o,a);s+=Ki(o,t,n,l,i)}elseif(l=Og(e),typeofl=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+ks(o,a++),s+=Ki(o,t,n,l,i);elseif(o==="object")throwt=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");returns}functionEi(e,t,n){if(e==null)returne;varr=[],i=0;returnKi(e,r,"","",function(o){returnt.call(n,o,i++)}),r}functionCg(e){if(e._status===-1){vart=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)returne._result.default;throwe._result}varEe={current:null},Wi={transition:null},Rg={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:Wi,ReactCurrentOwner:xl};A.Children={map:Ei,forEach:function(e,t,n){Ei(e,function(){t.apply(this,arguments)},n)},count:function(e){vart=0;returnEi(e,function(){t++}),t},toArray:function(e){returnEi(e,function(t){returnt})||[]},only:function(e){if(!kl(e))throwError("React.Children.only expected to receive a single React element child.");returne}};A.Component=yr;A.Fragment=gg;A.Profiler=vg;A.Pure
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>`-${f}`).join(`
`));return R.exports.cloneElement(u,Object.assign({},Jh(u.props,If(na(a,["ref"]))),c,l,V0(u.ref,l.ref)))}return R.exports.createElement(i,Object.assign({},na(a,["ref"]),i!==R.exports.Fragment&&l,i!==R.exports.Fragment&&c),u)}function V0(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function Jh(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let s=n[r];for(let a of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...o)}}});return t}function Pr(e){var t;return Object.assign(R.exports.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function If(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function na(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Xh(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&K0(n)?!1:r}function K0(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let W0="div";var Ho=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ho||{});let hl=Pr(function(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return kr({ourProps:i,theirProps:r,slot:{},defaultTag:W0,name:"Hidden"})}),Nu=R.exports.createContext(null);Nu.displayName="OpenClosedContext";var mi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(mi||{});function Zh(){return R.exports.useContext(Nu)}function G0({value:e,children:t}){return st.createElement(Nu.Provider,{value:e},t)}var Kt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Kt||{});function Y0(e,t,n){let r=hs(t);R.exports.useEffect(()=>{function i(o){r.current(o)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}var kn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(kn||{});function eg(){let e=R.exports.useRef(0);return Y0("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function bu(...e){return R.exports.useMemo(()=>Cu(...e),[...e])}function J0(e,t,n,r){let i=hs(n);R.exports.useEffect(()=>{e=e!=null?e:window;function o(s){i.current(s)}return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r)},[e,t,r])}var X0=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(X0||{}),Z0=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(Z0||{});let e1={[0]:e=>({...e,popoverState:At(e.popoverState,{[0]:1,[1]:0})}),[1](e){return e.popoverState===1?e:{...e,popoverState:1}},[2](e,t){return e.button===t.button?e:{...e,button:t.button}},[3](e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},[4](e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},[5](e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},Iu=R.exports.createContext(null);Iu.displayName="PopoverContext";function gs(e){let t=R.exports.useContext(Iu);if(t===null){let n=new Error(`<${e}/>ismissingaparent<Popover/>component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gs),n}return t}let L
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}function L1(e,t){return ag(e)||I1(e,t)||lg(e,t)||ug()}function Af(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ra(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Af(Object(n),!0).forEach(function(r){Et(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Af(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var T1=function(t,n){var r=R.exports.useRef();return R.exports.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function Ut(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=R.exports.useContext(x1)||{},i=r.i18n,o=r.defaultNS,s=n||i||_1();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new O1),!s){vl("You will need to pass in an i18next instance by using initReactI18next");var a=function(_){return Array.isArray(_)?_[_.length-1]:_},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&vl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=ra(ra(ra({},P1()),s.options.react),t),c=u.useSuspense,f=u.keyPrefix,d=e||o||s.options&&s.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(d);var g=(s.isInitialized||s.initializedStoreOnce)&&d.every(function(C){return b1(C,s,u)});function h(){return s.getFixedT(null,u.nsMode==="fallback"?d:d[0],f)}var y=R.exports.useState(h),x=L1(y,2),v=x[0],p=x[1],m=d.join(),S=T1(m),k=R.exports.useRef(!0);R.exports.useEffect(function(){var C=u.bindI18n,_=u.bindI18nStore;k.current=!0,!g&&!c&&Mf(s,d,function(){k.current&&p(h)}),g&&S&&S!==m&&k.current&&p(h);function O(){k.current&&p(h)}return C&&s&&s.on(C,O),_&&s&&s.store.on(_,O),function(){k.current=!1,C&&s&&C.split(" ").forEach(function(L){return s.off(L,O)}),_&&s&&_.split(" ").forEach(function(L){return s.store.off(L,O)})}},[s,m]);var E=R.exports.useRef(!0);R.exports.useEffect(function(){k.current&&!E.current&&p(h),E.current=!1},[s,f]);var P=[v,s,g];if(P.t=v,P.i18n=s,P.ready=g,g||!g&&!c)return P;throw new Promise(function(C){Mf(s,d,function(){C()})})}function D1(){const{t:e}=Ut(),[t,n]=R.exports.useState(!1),[r,i]=R.exports.useState("beta"),{status:o,data:s}=fr([dl],Qh),a=Eh(),{status:l,data:u}=fr([u0],async()=>await c0(r),{enabled:t});return R.exports.useEffect(()=>{if(o==="success"){const{update_branch:c}=s;i(c==="main"?"beta":"main")}},[o,s]),R.exports.useEffect(()=>{l==="success"&&(u[0]==="OK"&&a.invalidateQueries([dl]),n(!1))},[l,u,n]),N("label",{children:[w("input",{type:"checkbox",checked:r==="main",onChange:c=>{n(!0)}}),"\u{1F525}",e("advanced-settings.beta")," ",e("advanced-settings.beta-disc")]})}var F1="cg4q680";function M1(){const{t:e}=Ut(),t=F(c=>c.isUseAutoSave()),n=F(c=>c.getValueForRequestKey("save_to_disk_path")),r=F(c=>c.getValueForRequestKey("turbo")),i=F(c=>c.getValueForRequestKey("use_cpu")),o=F(c=>c.getValueForRequestKey("use_full_precision")),s=F(c=>c.isSoundEnabled()),a=F(c=>c.setRequestOptions),l=F(c=>c.toggleUseAutoSave),u=F(c=>c.toggleSoundEnabled);return N(nr,{className:rg,children:[N(nr.Button,{className:ng,children:[w("i",{className:[Mn,"fa-solid","fa-gear"].join(" ")}),"Settings"]}),w(nr.Panel,{className:ig,children:N("div",{className:F1,children:[w("h4",{children:"System Settings"}),N("ul",{children:[N("li",{className:te,children:[N("label",{children:[w("input",{checked:t,onChange:c=>l(),type:"checkbox"}),e("storage.ast")," "]}),N("label",{children:[w("input",{value:n,onChange:c=>a("save_to_disk_path",c.target.value),size:40,disabled:!t}),w("span",{className:"visually-hidden",children:"Path on disk where images will be saved"})]})]}),w("li",{className:te,children:N("label",{children:[w("input",{che
`,cx={title:ex,description:tx,navbar:nx,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:rx,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:ix,tags:ox,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`Youcansetan"Initial Image"ifyouwanttoguidetheAI.
`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:sx,history:ax,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Getthelatestfeaturesimmediately(butcouldbelessstable).
Pleaserestarttheprogramafterchangingthis.`,save:"SAVE"},storage:lx,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:ux},fx="Stable Diffusion UI",dx="",px={home:"Home",history:"History",community:"Community",settings:"Settings"},hx={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},gx={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:",width:"Width:",height:"Height:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},mx={txt:"Image Modifiers (art styles, tags etc)"},vx={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},yx={fave:"Favorites Only",search:"Search"},Sx={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},wx=`Ifyoufoundthisprojectusefulandwanttohelpkeepitalive,pleasetohelpcoverthecostofdevelopmentandmaintenance!Thankyouforyoursupport!
`,xx={title:fx,description:dx,navbar:px,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:hx,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:gx,tags:mx,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`Youcansetan"Initial Image"ifyouwanttoguidetheAI.
`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:vx,history:yx,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Getthelatestfeaturesimmediately(butcouldbelessstable).
Pleaserestarttheprogramafterchangingthis.`,save:"SAVE"},storage:Sx,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:wx},kx={en:{translation:cx},es:{translation:xx}};Ce.use(C1).init({lng:"en",interpolation:{escapeValue:!1},resources:kx}).then(()=>{console.log("i18n initialized")}).catch(e=>{console.error("i18n initialization failed",e)}).finally(()=>{console.log("i18n initialization finished")});const Px=new Ay;function Ox(){const e=xw;return w($y,{location:Px,routes:[{path:"/",element:w(Sw,{className:e})},{path:"/settings",element:w(ww,{className:e})}]})}const Ex=new sy({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:1/0,cacheTime:1/0}}});Py();sa.createRoot(document.getElementById("root")).render(w(st.StrictMode,{children:N(uy,{client:Ex,children:[w(Ox,{}),w(my,{initialIsOpen:!0})]})}));