*/var Oi=Symbol.for("react.element"),Cg=Symbol.for("react.portal"),_g=Symbol.for("react.fragment"),Rg=Symbol.for("react.strict_mode"),Ng=Symbol.for("react.profiler"),bg=Symbol.for("react.provider"),Ig=Symbol.for("react.context"),Tg=Symbol.for("react.forward_ref"),Lg=Symbol.for("react.suspense"),Dg=Symbol.for("react.memo"),Fg=Symbol.for("react.lazy"),Wu=Symbol.iterator;function Mg(e){return e===null||typeof e!="object"?null:(e=Wu&&e[Wu]||e["@@iterator"],typeof e=="function"?e:null)}var gd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},md=Object.assign,vd={};function Er(e,t,n){this.props=e,this.context=t,this.refs=vd,this.updater=n||gd}Er.prototype.isReactComponent={};Er.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")};Er.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yd(){}yd.prototype=Er.prototype;function Pl(e,t,n){this.props=e,this.context=t,this.refs=vd,this.updater=n||gd}var Ol=Pl.prototype=new yd;Ol.constructor=Pl;md(Ol,Er.prototype);Ol.isPureReactComponent=!0;var Gu=Array.isArray,Sd=Object.prototype.hasOwnProperty,kl={current:null},wd={key:!0,ref:!0,__self:!0,__source:!0};function xd(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)Sd.call(t,r)&&!wd.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:Oi,type:e,key:o,ref:s,props:i,_owner:kl.current}}function jg(e,t){return{$$typeof:Oi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function El(e){return typeof e=="object"&&e!==null&&e.$$typeof===Oi}function Ag(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){returnt[n]})}varYu=/\/+/g;functionCs(e,t){returntypeofe=="object"&&e!==null&&e.key!=null?Ag(""+e.key):t.toString(36)}functioneo(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){caseOi:caseCg:s=!0}}if(s)returns=e,i=i(s),e=r===""?"."+Cs(s,0):r,Gu(i)?(n="",e!=null&&(n=e.replace(Yu,"$&/")+"/"),eo(i,t,n,"",function(u){returnu})):i!=null&&(El(i)&&(i=jg(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Yu,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",Gu(e))for(vara=0;a<e.length;a++){o=e[a];varl=r+Cs(o,a);s+=eo(o,t,n,l,i)}elseif(l=Mg(e),typeofl=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+Cs(o,a++),s+=eo(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}functionTi(e,t,n){if(e==null)returne;varr=[],i=0;returneo(e,r,"","",function(o){returnt.call(n,o,i++)}),r}function$g(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}varNe={current:null},to={transition:null},Ug={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:to,ReactCurrentOwner:kl};A.Children={map:Ti,forEach:function(e,t,n){Ti(e,function(){t.apply(this,arguments)},n)},count:function(e){vart=0;returnTi(e,function(){t++}),t},toArray:function(e){returnTi(e,function(t){returnt})||[]},only:function(e){if(!El(e))throwError("React.Children.only expected to receive a single React element child.");returne}};A.Component=Er;A.Fragment=_g;A.Profiler=Ng;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 _.exports.cloneElement(u,Object.assign({},lg(u.props,$f(sa(a,["ref"]))),c,l,r1(u.ref,l.ref)))}return _.exports.createElement(i,Object.assign({},sa(a,["ref"]),i!==_.exports.Fragment&&l,i!==_.exports.Fragment&&c),u)}function r1(...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 lg(...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 St(e){var t;return Object.assign(_.exports.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function $f(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function sa(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function ug(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&&i1(n)?!1:r}function i1(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let o1="div";var wi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(wi||{});let xi=St(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 yt({ourProps:i,theirProps:r,slot:{},defaultTag:o1,name:"Hidden"})}),Tu=_.exports.createContext(null);Tu.displayName="OpenClosedContext";var Pi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Pi||{});function cg(){return _.exports.useContext(Tu)}function s1({value:e,children:t}){return ge.createElement(Tu.Provider,{value:e},t)}var ue=(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))(ue||{});function a1(e,t,n){let r=Tn(t);_.exports.useEffect(()=>{function i(o){r.current(o)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}var Nn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Nn||{});function fg(){let e=_.exports.useRef(0);return a1("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Lu(...e){return _.exports.useMemo(()=>bu(...e),[...e])}function l1(e,t,n,r){let i=Tn(n);_.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 u1=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(u1||{}),c1=(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))(c1||{});let f1={[0]:e=>({...e,popoverState:gt(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}}},Du=_.exports.createContext(null);Du.displayName="PopoverContext";function Ss(e){let t=_.exports.useContext(Du);if(t===null){let n=new Error(`<${e}/>ismissingaparent<Popover/>component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ss),n}return t}let F
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}function iS(e,t){return yg(e)||rS(e,t)||Sg(e,t)||wg()}function qf(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 aa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qf(Object(n),!0).forEach(function(r){Lt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var oS=function(t,n){var r=_.exports.useRef();return _.exports.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function Kt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=_.exports.useContext(K1)||{},i=r.i18n,o=r.defaultNS,s=n||i||X1();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Y1),!s){wl("You will need to pass in an i18next instance by using initReactI18next");var a=function(P){return Array.isArray(P)?P[P.length-1]:P},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&wl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=aa(aa(aa({},G1()),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 h=(s.isInitialized||s.initializedStoreOnce)&&d.every(function(R){return nS(R,s,u)});function g(){return s.getFixedT(null,u.nsMode==="fallback"?d:d[0],f)}var y=_.exports.useState(g),x=iS(y,2),v=x[0],p=x[1],m=d.join(),S=oS(m),k=_.exports.useRef(!0);_.exports.useEffect(function(){var R=u.bindI18n,P=u.bindI18nStore;k.current=!0,!h&&!c&&Hf(s,d,function(){k.current&&p(g)}),h&&S&&S!==m&&k.current&&p(g);function E(){k.current&&p(g)}return R&&s&&s.on(R,E),P&&s&&s.store.on(P,E),function(){k.current=!1,R&&s&&R.split(" ").forEach(function(T){return s.off(T,E)}),P&&s&&P.split(" ").forEach(function(T){return s.store.off(T,E)})}},[s,m]);var O=_.exports.useRef(!0);_.exports.useEffect(function(){k.current&&!O.current&&p(g),O.current=!1},[s,f]);var C=[v,s,h];if(C.t=v,C.i18n=s,C.ready=h,h||!h&&!c)return C;throw new Promise(function(R){Hf(s,d,function(){R()})})}function sS(){const{t:e}=Kt(),[t,n]=_.exports.useState(!1),[r,i]=_.exports.useState("beta"),{status:o,data:s}=wr([ml],Zh),a=Fh(),{status:l,data:u}=wr([x0],async()=>await P0(r),{enabled:t});return _.exports.useEffect(()=>{if(o==="success"){const{update_branch:c}=s;i(c==="main"?"beta":"main")}},[o,s]),_.exports.useEffect(()=>{l==="success"&&(u[0]==="OK"&&a.invalidateQueries([ml]),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 aS="cg4q680";function lS(){const{t:e}=Kt(),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(fr,{className:hg,children:[N(fr.Button,{className:pg,children:[w("i",{className:[qn,"fa-solid","fa-gear"].join(" ")}),"Settings"]}),w(fr.Panel,{className:gg,children:N("div",{className:aS,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
`,Rx={title:yx,description:Sx,navbar:wx,"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:xx,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:Px,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:kx,history:Ex,"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:Cx,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:_x},Nx="Stable Diffusion UI",bx="",Ix={home:"Home",history:"History",community:"Community",settings:"Settings"},Tx={"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"},Lx={"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"},Dx={txt:"Image Modifiers (art styles, tags etc)"},Fx={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},Mx={fave:"Favorites Only",search:"Search"},jx={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"},Ax=`Ifyoufoundthisprojectusefulandwanttohelpkeepitalive,pleasetohelpcoverthecostofdevelopmentandmaintenance!Thankyouforyoursupport!
`,$x={title:Nx,description:bx,navbar:Ix,"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:Tx,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:Lx,tags:Dx,"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:Fx,history:Mx,"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:jx,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:Ax},Ux={en:{translation:Rx},es:{translation:$x}};Ie.use(Z1).init({lng:"en",interpolation:{escapeValue:!1},resources:Ux}).then(()=>{console.log("i18n initialized")}).catch(e=>{console.error("i18n initialization failed",e)}).finally(()=>{console.log("i18n initialization finished")});const zx=new Yy;function Bx(){const e=$w;return w(Jy,{location:zx,routes:[{path:"/",element:w(jw,{className:e})},{path:"/settings",element:w(Aw,{className:e})}]})}const Qx=new yy({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:1/0,cacheTime:1/0}}});Fy();ca.createRoot(document.getElementById("root")).render(w(ge.StrictMode,{children:N(xy,{client:Qx,children:[w(Bx,{}),w(Ry,{initialIsOpen:!0})]})}));