@gendive/slide 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("@mantine/core"),C=require("react/jsx-runtime"),se=require("react"),ax=require("react-dom");function iS(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Ea=iS(se),sS=["#eef0ff","#dce0fc","#b5bdf5","#8b98ef","#6879ea","#5B6EF7","#4254e8","#3341d1","#2935bc","#1f29a7"],oS=["#f8fafc","#f1f5f9","#e2e8f0","#cbd5e1","#94a3b8","#64748b","#475569","#334155","#1e293b","#0f172a"],ix={primaryColor:"devdive",colors:{devdive:sS,slate:oS},fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, monospace",defaultRadius:"md",components:{Button:{defaultProps:{radius:"lg"}},ActionIcon:{defaultProps:{radius:"lg"}},TextInput:{defaultProps:{radius:"lg"}},NumberInput:{defaultProps:{radius:"lg"}},Modal:{defaultProps:{radius:"xl"}}}},lS=z.createTheme(ix),cS=z.createTheme({...ix,white:"#ffffff",black:"#1e293b"}),uS={primary:"#5B6EF7",bgMain:"#f4f4f5",uiWhite:"#ffffff",borderLight:"#e4e4e7",textPrimary:"#1e293b",textSecondary:"#64748b",textMuted:"#94a3b8"},Vy=t=>{let e;const n=new Set,i=(u,A)=>{const y=typeof u=="function"?u(e):u;if(!Object.is(y,e)){const x=e;e=A??(typeof y!="object"||y===null)?y:Object.assign({},e,y),n.forEach(S=>S(e,x))}},s=()=>e,h={setState:i,getState:s,getInitialState:()=>p,subscribe:u=>(n.add(u),()=>n.delete(u))},p=e=t(i,s,h);return h},dS=(t=>t?Vy(t):Vy),fS=t=>t;function hS(t,e=fS){const n=se.useSyncExternalStore(t.subscribe,se.useCallback(()=>e(t.getState()),[t,e]),se.useCallback(()=>e(t.getInitialState()),[t,e]));return se.useDebugValue(n),n}const qy=t=>{const e=dS(t),n=i=>hS(e,i);return Object.assign(n,e),n},sx=(t=>t?qy(t):qy);function pS(t,e){let n;try{n=t()}catch{return}return{getItem:s=>{var c;const d=p=>p===null?null:JSON.parse(p,void 0),h=(c=n.getItem(s))!=null?c:null;return h instanceof Promise?h.then(d):d(h)},setItem:(s,c)=>n.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>n.removeItem(s)}}const gg=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(i){return gg(i)(n)},catch(i){return this}}}catch(n){return{then(i){return this},catch(i){return gg(i)(n)}}}},AS=(t,e)=>(n,i,s)=>{let c={storage:pS(()=>localStorage),partialize:R=>R,version:0,merge:(R,D)=>({...D,...R}),...e},d=!1,h=0;const p=new Set,u=new Set;let A=c.storage;if(!A)return t((...R)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),n(...R)},i,s);const y=()=>{const R=c.partialize({...i()});return A.setItem(c.name,{state:R,version:c.version})},x=s.setState;s.setState=(R,D)=>(x(R,D),y());const S=t((...R)=>(n(...R),y()),i,s);s.getInitialState=()=>S;let w;const T=()=>{var R,D;if(!A)return;const N=++h;d=!1,p.forEach(O=>{var I;return O((I=i())!=null?I:S)});const M=((D=c.onRehydrateStorage)==null?void 0:D.call(c,(R=i())!=null?R:S))||void 0;return gg(A.getItem.bind(A))(c.name).then(O=>{if(O)if(typeof O.version=="number"&&O.version!==c.version){if(c.migrate){const I=c.migrate(O.state,O.version);return I instanceof Promise?I.then(Y=>[!0,Y]):[!0,I]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,O.state];return[!1,void 0]}).then(O=>{var I;if(N!==h)return;const[Y,J]=O;if(w=c.merge(J,(I=i())!=null?I:S),n(w,!0),Y)return y()}).then(()=>{N===h&&(M==null||M(w,void 0),w=i(),d=!0,u.forEach(O=>O(w)))}).catch(O=>{N===h&&(M==null||M(void 0,O))})};return s.persist={setOptions:R=>{c={...c,...R},R.storage&&(A=R.storage)},clearStorage:()=>{A==null||A.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>T(),hasHydrated:()=>d,onHydrate:R=>(p.add(R),()=>{p.delete(R)}),onFinishHydration:R=>(u.add(R),()=>{u.delete(R)})},c.skipHydration||T(),w||S},ox=AS,Pr=()=>`${Date.now()}-${Math.random().toString(36).substring(2,9)}`,Xg=[{id:"title",name:"타이틀",icon:"title",createElements:t=>[{type:"text",x:40,y:220,width:880,height:100,rotation:0,content:"프레젠테이션 제목",fontSize:56,fontFamily:"Malgun Gothic",fill:t.text,align:"center",textStyle:"title",fontWeight:"800",lineHeight:1.1}]},{id:"title-subtitle",name:"타이틀 + 부제목",icon:"subtitles",createElements:t=>[{type:"text",x:40,y:190,width:880,height:100,rotation:0,content:"프레젠테이션 제목",fontSize:56,fontFamily:"Malgun Gothic",fill:t.text,align:"center",textStyle:"title",fontWeight:"800",lineHeight:1.1},{type:"text",x:40,y:300,width:880,height:50,rotation:0,content:"부제목 또는 발표자 이름",fontSize:24,fontFamily:"Malgun Gothic",fill:t.primary,align:"center",textStyle:"subtitle",fontWeight:"500",lineHeight:1.3}]},{id:"content",name:"콘텐츠",icon:"article",createElements:t=>[{type:"text",x:40,y:30,width:880,height:60,rotation:0,content:"섹션 제목",fontSize:36,fontFamily:"Malgun Gothic",fill:t.text,align:"left",textStyle:"subtitle",fontWeight:"700",lineHeight:1.2},{type:"text",x:40,y:100,width:880,height:400,rotation:0,content:`본문 내용을 입력하세요.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("@mantine/core"),C=require("react/jsx-runtime"),oe=require("react"),ax=require("react-dom");function iS(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Ea=iS(oe),sS=["#eef0ff","#dce0fc","#b5bdf5","#8b98ef","#6879ea","#5B6EF7","#4254e8","#3341d1","#2935bc","#1f29a7"],oS=["#f8fafc","#f1f5f9","#e2e8f0","#cbd5e1","#94a3b8","#64748b","#475569","#334155","#1e293b","#0f172a"],ix={primaryColor:"devdive",colors:{devdive:sS,slate:oS},fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, monospace",defaultRadius:"md",components:{Button:{defaultProps:{radius:"lg"}},ActionIcon:{defaultProps:{radius:"lg"}},TextInput:{defaultProps:{radius:"lg"}},NumberInput:{defaultProps:{radius:"lg"}},Modal:{defaultProps:{radius:"xl"}}}},lS=z.createTheme(ix),cS=z.createTheme({...ix,white:"#ffffff",black:"#1e293b"}),uS={primary:"#5B6EF7",bgMain:"#f4f4f5",uiWhite:"#ffffff",borderLight:"#e4e4e7",textPrimary:"#1e293b",textSecondary:"#64748b",textMuted:"#94a3b8"},Vy=t=>{let e;const n=new Set,i=(u,A)=>{const y=typeof u=="function"?u(e):u;if(!Object.is(y,e)){const x=e;e=A??(typeof y!="object"||y===null)?y:Object.assign({},e,y),n.forEach(S=>S(e,x))}},s=()=>e,h={setState:i,getState:s,getInitialState:()=>p,subscribe:u=>(n.add(u),()=>n.delete(u))},p=e=t(i,s,h);return h},dS=(t=>t?Vy(t):Vy),fS=t=>t;function hS(t,e=fS){const n=oe.useSyncExternalStore(t.subscribe,oe.useCallback(()=>e(t.getState()),[t,e]),oe.useCallback(()=>e(t.getInitialState()),[t,e]));return oe.useDebugValue(n),n}const qy=t=>{const e=dS(t),n=i=>hS(e,i);return Object.assign(n,e),n},sx=(t=>t?qy(t):qy);function pS(t,e){let n;try{n=t()}catch{return}return{getItem:s=>{var c;const d=p=>p===null?null:JSON.parse(p,void 0),h=(c=n.getItem(s))!=null?c:null;return h instanceof Promise?h.then(d):d(h)},setItem:(s,c)=>n.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>n.removeItem(s)}}const gg=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(i){return gg(i)(n)},catch(i){return this}}}catch(n){return{then(i){return this},catch(i){return gg(i)(n)}}}},AS=(t,e)=>(n,i,s)=>{let c={storage:pS(()=>localStorage),partialize:R=>R,version:0,merge:(R,D)=>({...D,...R}),...e},d=!1,h=0;const p=new Set,u=new Set;let A=c.storage;if(!A)return t((...R)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),n(...R)},i,s);const y=()=>{const R=c.partialize({...i()});return A.setItem(c.name,{state:R,version:c.version})},x=s.setState;s.setState=(R,D)=>(x(R,D),y());const S=t((...R)=>(n(...R),y()),i,s);s.getInitialState=()=>S;let w;const T=()=>{var R,D;if(!A)return;const N=++h;d=!1,p.forEach(O=>{var I;return O((I=i())!=null?I:S)});const M=((D=c.onRehydrateStorage)==null?void 0:D.call(c,(R=i())!=null?R:S))||void 0;return gg(A.getItem.bind(A))(c.name).then(O=>{if(O)if(typeof O.version=="number"&&O.version!==c.version){if(c.migrate){const I=c.migrate(O.state,O.version);return I instanceof Promise?I.then(Y=>[!0,Y]):[!0,I]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,O.state];return[!1,void 0]}).then(O=>{var I;if(N!==h)return;const[Y,J]=O;if(w=c.merge(J,(I=i())!=null?I:S),n(w,!0),Y)return y()}).then(()=>{N===h&&(M==null||M(w,void 0),w=i(),d=!0,u.forEach(O=>O(w)))}).catch(O=>{N===h&&(M==null||M(void 0,O))})};return s.persist={setOptions:R=>{c={...c,...R},R.storage&&(A=R.storage)},clearStorage:()=>{A==null||A.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>T(),hasHydrated:()=>d,onHydrate:R=>(p.add(R),()=>{p.delete(R)}),onFinishHydration:R=>(u.add(R),()=>{u.delete(R)})},c.skipHydration||T(),w||S},ox=AS,Pr=()=>`${Date.now()}-${Math.random().toString(36).substring(2,9)}`,Xg=[{id:"title",name:"타이틀",icon:"title",createElements:t=>[{type:"text",x:40,y:220,width:880,height:100,rotation:0,content:"프레젠테이션 제목",fontSize:56,fontFamily:"Malgun Gothic",fill:t.text,align:"center",textStyle:"title",fontWeight:"800",lineHeight:1.1}]},{id:"title-subtitle",name:"타이틀 + 부제목",icon:"subtitles",createElements:t=>[{type:"text",x:40,y:190,width:880,height:100,rotation:0,content:"프레젠테이션 제목",fontSize:56,fontFamily:"Malgun Gothic",fill:t.text,align:"center",textStyle:"title",fontWeight:"800",lineHeight:1.1},{type:"text",x:40,y:300,width:880,height:50,rotation:0,content:"부제목 또는 발표자 이름",fontSize:24,fontFamily:"Malgun Gothic",fill:t.primary,align:"center",textStyle:"subtitle",fontWeight:"500",lineHeight:1.3}]},{id:"content",name:"콘텐츠",icon:"article",createElements:t=>[{type:"text",x:40,y:30,width:880,height:60,rotation:0,content:"섹션 제목",fontSize:36,fontFamily:"Malgun Gothic",fill:t.text,align:"left",textStyle:"subtitle",fontWeight:"700",lineHeight:1.2},{type:"text",x:40,y:100,width:880,height:400,rotation:0,content:`본문 내용을 입력하세요.
2
2
 
3
3
  여러 줄의 텍스트를 작성할 수 있습니다.`,fontSize:20,fontFamily:"Malgun Gothic",fill:t.text,align:"left",textStyle:"body",fontWeight:"400",lineHeight:1.6}]},{id:"two-column",name:"2단 레이아웃",icon:"view_column",createElements:t=>[{type:"text",x:40,y:30,width:880,height:50,rotation:0,content:"섹션 제목",fontSize:32,fontFamily:"Malgun Gothic",fill:t.text,align:"left",textStyle:"subtitle",fontWeight:"700",lineHeight:1.2},{type:"text",x:40,y:100,width:420,height:400,rotation:0,content:`왼쪽 열 내용
4
4
 
@@ -36,8 +36,8 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js
36
36
 
37
37
  JSZip uses the library pako released under the MIT license :
38
38
  https://github.com/nodeca/pako/blob/main/LICENSE
39
- */var Zy;function vS(){return Zy||(Zy=1,(function(t,e){(function(n){t.exports=n()})(function(){return(function n(i,s,c){function d(u,A){if(!s[u]){if(!i[u]){var y=typeof Bp=="function"&&Bp;if(!A&&y)return y(u,!0);if(h)return h(u,!0);var x=new Error("Cannot find module '"+u+"'");throw x.code="MODULE_NOT_FOUND",x}var S=s[u]={exports:{}};i[u][0].call(S.exports,function(w){var T=i[u][1][w];return d(T||w)},S,S.exports,n,i,s,c)}return s[u].exports}for(var h=typeof Bp=="function"&&Bp,p=0;p<c.length;p++)d(c[p]);return d})({1:[function(n,i,s){var c=n("./utils"),d=n("./support"),h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(p){for(var u,A,y,x,S,w,T,R=[],D=0,N=p.length,M=N,O=c.getTypeOf(p)!=="string";D<p.length;)M=N-D,y=O?(u=p[D++],A=D<N?p[D++]:0,D<N?p[D++]:0):(u=p.charCodeAt(D++),A=D<N?p.charCodeAt(D++):0,D<N?p.charCodeAt(D++):0),x=u>>2,S=(3&u)<<4|A>>4,w=1<M?(15&A)<<2|y>>6:64,T=2<M?63&y:64,R.push(h.charAt(x)+h.charAt(S)+h.charAt(w)+h.charAt(T));return R.join("")},s.decode=function(p){var u,A,y,x,S,w,T=0,R=0,D="data:";if(p.substr(0,D.length)===D)throw new Error("Invalid base64 input, it looks like a data url.");var N,M=3*(p=p.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(p.charAt(p.length-1)===h.charAt(64)&&M--,p.charAt(p.length-2)===h.charAt(64)&&M--,M%1!=0)throw new Error("Invalid base64 input, bad content length.");for(N=d.uint8array?new Uint8Array(0|M):new Array(0|M);T<p.length;)u=h.indexOf(p.charAt(T++))<<2|(x=h.indexOf(p.charAt(T++)))>>4,A=(15&x)<<4|(S=h.indexOf(p.charAt(T++)))>>2,y=(3&S)<<6|(w=h.indexOf(p.charAt(T++))),N[R++]=u,S!==64&&(N[R++]=A),w!==64&&(N[R++]=y);return N}},{"./support":30,"./utils":32}],2:[function(n,i,s){var c=n("./external"),d=n("./stream/DataWorker"),h=n("./stream/Crc32Probe"),p=n("./stream/DataLengthProbe");function u(A,y,x,S,w){this.compressedSize=A,this.uncompressedSize=y,this.crc32=x,this.compression=S,this.compressedContent=w}u.prototype={getContentWorker:function(){var A=new d(c.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new p("data_length")),y=this;return A.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),A},getCompressedWorker:function(){return new d(c.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(A,y,x){return A.pipe(new h).pipe(new p("uncompressedSize")).pipe(y.compressWorker(x)).pipe(new p("compressedSize")).withStreamInfo("compression",y)},i.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,i,s){var c=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new c("STORE compression")},uncompressWorker:function(){return new c("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,i,s){var c=n("./utils"),d=(function(){for(var h,p=[],u=0;u<256;u++){h=u;for(var A=0;A<8;A++)h=1&h?3988292384^h>>>1:h>>>1;p[u]=h}return p})();i.exports=function(h,p){return h!==void 0&&h.length?c.getTypeOf(h)!=="string"?(function(u,A,y,x){var S=d,w=x+y;u^=-1;for(var T=x;T<w;T++)u=u>>>8^S[255&(u^A[T])];return-1^u})(0|p,h,h.length,0):(function(u,A,y,x){var S=d,w=x+y;u^=-1;for(var T=x;T<w;T++)u=u>>>8^S[255&(u^A.charCodeAt(T))];return-1^u})(0|p,h,h.length,0):0}},{"./utils":32}],5:[function(n,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,i,s){var c=null;c=typeof Promise<"u"?Promise:n("lie"),i.exports={Promise:c}},{lie:37}],7:[function(n,i,s){var c=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",d=n("pako"),h=n("./utils"),p=n("./stream/GenericWorker"),u=c?"uint8array":"array";function A(y,x){p.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=x,this.meta={}}s.magic="\b\0",h.inherits(A,p),A.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(h.transformTo(u,y.data),!1)},A.prototype.flush=function(){p.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},A.prototype.cleanUp=function(){p.prototype.cleanUp.call(this),this._pako=null},A.prototype._createPako=function(){this._pako=new d[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(x){y.push({data:x,meta:y.meta})}},s.compressWorker=function(y){return new A("Deflate",y)},s.uncompressWorker=function(){return new A("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,i,s){function c(S,w){var T,R="";for(T=0;T<w;T++)R+=String.fromCharCode(255&S),S>>>=8;return R}function d(S,w,T,R,D,N){var M,O,I=S.file,Y=S.compression,J=N!==u.utf8encode,q=h.transformTo("string",N(I.name)),W=h.transformTo("string",u.utf8encode(I.name)),V=I.comment,ge=h.transformTo("string",N(V)),X=h.transformTo("string",u.utf8encode(V)),ae=W.length!==I.name.length,L=X.length!==V.length,te="",le="",Ae="",ne=I.dir,oe=I.date,ie={crc32:0,compressedSize:0,uncompressedSize:0};w&&!T||(ie.crc32=S.crc32,ie.compressedSize=S.compressedSize,ie.uncompressedSize=S.uncompressedSize);var j=0;w&&(j|=8),J||!ae&&!L||(j|=2048);var K=0,ve=0;ne&&(K|=16),D==="UNIX"?(ve=798,K|=(function(Re,Fe){var pt=Re;return Re||(pt=Fe?16893:33204),(65535&pt)<<16})(I.unixPermissions,ne)):(ve=20,K|=(function(Re){return 63&(Re||0)})(I.dosPermissions)),M=oe.getUTCHours(),M<<=6,M|=oe.getUTCMinutes(),M<<=5,M|=oe.getUTCSeconds()/2,O=oe.getUTCFullYear()-1980,O<<=4,O|=oe.getUTCMonth()+1,O<<=5,O|=oe.getUTCDate(),ae&&(le=c(1,1)+c(A(q),4)+W,te+="up"+c(le.length,2)+le),L&&(Ae=c(1,1)+c(A(ge),4)+X,te+="uc"+c(Ae.length,2)+Ae);var xe="";return xe+=`
40
- \0`,xe+=c(j,2),xe+=Y.magic,xe+=c(M,2),xe+=c(O,2),xe+=c(ie.crc32,4),xe+=c(ie.compressedSize,4),xe+=c(ie.uncompressedSize,4),xe+=c(q.length,2),xe+=c(te.length,2),{fileRecord:y.LOCAL_FILE_HEADER+xe+q+te,dirRecord:y.CENTRAL_FILE_HEADER+c(ve,2)+xe+c(ge.length,2)+"\0\0\0\0"+c(K,4)+c(R,4)+q+te+ge}}var h=n("../utils"),p=n("../stream/GenericWorker"),u=n("../utf8"),A=n("../crc32"),y=n("../signature");function x(S,w,T,R){p.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=T,this.encodeFileName=R,this.streamFiles=S,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}h.inherits(x,p),x.prototype.push=function(S){var w=S.meta.percent||0,T=this.entriesCount,R=this._sources.length;this.accumulate?this.contentBuffer.push(S):(this.bytesWritten+=S.data.length,p.prototype.push.call(this,{data:S.data,meta:{currentFile:this.currentFile,percent:T?(w+100*(T-R-1))/T:100}}))},x.prototype.openedSource=function(S){this.currentSourceOffset=this.bytesWritten,this.currentFile=S.file.name;var w=this.streamFiles&&!S.file.dir;if(w){var T=d(S,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:T.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(S){this.accumulate=!1;var w=this.streamFiles&&!S.file.dir,T=d(S,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(T.dirRecord),w)this.push({data:(function(R){return y.DATA_DESCRIPTOR+c(R.crc32,4)+c(R.compressedSize,4)+c(R.uncompressedSize,4)})(S),meta:{percent:100}});else for(this.push({data:T.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var S=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var T=this.bytesWritten-S,R=(function(D,N,M,O,I){var Y=h.transformTo("string",I(O));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+c(D,2)+c(D,2)+c(N,4)+c(M,4)+c(Y.length,2)+Y})(this.dirRecords.length,T,S,this.zipComment,this.encodeFileName);this.push({data:R,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(S){this._sources.push(S);var w=this;return S.on("data",function(T){w.processChunk(T)}),S.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),S.on("error",function(T){w.error(T)}),this},x.prototype.resume=function(){return!!p.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(S){var w=this._sources;if(!p.prototype.error.call(this,S))return!1;for(var T=0;T<w.length;T++)try{w[T].error(S)}catch{}return!0},x.prototype.lock=function(){p.prototype.lock.call(this);for(var S=this._sources,w=0;w<S.length;w++)S[w].lock()},i.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,i,s){var c=n("../compressions"),d=n("./ZipFileWorker");s.generateWorker=function(h,p,u){var A=new d(p.streamFiles,u,p.platform,p.encodeFileName),y=0;try{h.forEach(function(x,S){y++;var w=(function(N,M){var O=N||M,I=c[O];if(!I)throw new Error(O+" is not a valid compression method !");return I})(S.options.compression,p.compression),T=S.options.compressionOptions||p.compressionOptions||{},R=S.dir,D=S.date;S._compressWorker(w,T).withStreamInfo("file",{name:x,dir:R,date:D,comment:S.comment||"",unixPermissions:S.unixPermissions,dosPermissions:S.dosPermissions}).pipe(A)}),A.entriesCount=y}catch(x){A.error(x)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,i,s){function c(){if(!(this instanceof c))return new c;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var d=new c;for(var h in this)typeof this[h]!="function"&&(d[h]=this[h]);return d}}(c.prototype=n("./object")).loadAsync=n("./load"),c.support=n("./support"),c.defaults=n("./defaults"),c.version="3.10.1",c.loadAsync=function(d,h){return new c().loadAsync(d,h)},c.external=n("./external"),i.exports=c},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,i,s){var c=n("./utils"),d=n("./external"),h=n("./utf8"),p=n("./zipEntries"),u=n("./stream/Crc32Probe"),A=n("./nodejsUtils");function y(x){return new d.Promise(function(S,w){var T=x.decompressed.getContentWorker().pipe(new u);T.on("error",function(R){w(R)}).on("end",function(){T.streamInfo.crc32!==x.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):S()}).resume()})}i.exports=function(x,S){var w=this;return S=c.extend(S||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:h.utf8decode}),A.isNode&&A.isStream(x)?d.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):c.prepareContent("the loaded zip file",x,!0,S.optimizedBinaryString,S.base64).then(function(T){var R=new p(S);return R.load(T),R}).then(function(T){var R=[d.Promise.resolve(T)],D=T.files;if(S.checkCRC32)for(var N=0;N<D.length;N++)R.push(y(D[N]));return d.Promise.all(R)}).then(function(T){for(var R=T.shift(),D=R.files,N=0;N<D.length;N++){var M=D[N],O=M.fileNameStr,I=c.resolve(M.fileNameStr);w.file(I,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:S.createFolders}),M.dir||(w.file(I).unsafeOriginalName=O)}return R.zipComment.length&&(w.comment=R.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,i,s){var c=n("../utils"),d=n("../stream/GenericWorker");function h(p,u){d.call(this,"Nodejs stream input adapter for "+p),this._upstreamEnded=!1,this._bindStream(u)}c.inherits(h,d),h.prototype._bindStream=function(p){var u=this;(this._stream=p).pause(),p.on("data",function(A){u.push({data:A,meta:{percent:0}})}).on("error",function(A){u.isPaused?this.generatedError=A:u.error(A)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},h.prototype.pause=function(){return!!d.prototype.pause.call(this)&&(this._stream.pause(),!0)},h.prototype.resume=function(){return!!d.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},i.exports=h},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,i,s){var c=n("readable-stream").Readable;function d(h,p,u){c.call(this,p),this._helper=h;var A=this;h.on("data",function(y,x){A.push(y)||A._helper.pause(),u&&u(x)}).on("error",function(y){A.emit("error",y)}).on("end",function(){A.push(null)})}n("../utils").inherits(d,c),d.prototype._read=function(){this._helper.resume()},i.exports=d},{"../utils":32,"readable-stream":16}],14:[function(n,i,s){i.exports={isNode:typeof Buffer<"u",newBufferFrom:function(c,d){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(c,d);if(typeof c=="number")throw new Error('The "data" argument must not be a number');return new Buffer(c,d)},allocBuffer:function(c){if(Buffer.alloc)return Buffer.alloc(c);var d=new Buffer(c);return d.fill(0),d},isBuffer:function(c){return Buffer.isBuffer(c)},isStream:function(c){return c&&typeof c.on=="function"&&typeof c.pause=="function"&&typeof c.resume=="function"}}},{}],15:[function(n,i,s){function c(I,Y,J){var q,W=h.getTypeOf(Y),V=h.extend(J||{},A);V.date=V.date||new Date,V.compression!==null&&(V.compression=V.compression.toUpperCase()),typeof V.unixPermissions=="string"&&(V.unixPermissions=parseInt(V.unixPermissions,8)),V.unixPermissions&&16384&V.unixPermissions&&(V.dir=!0),V.dosPermissions&&16&V.dosPermissions&&(V.dir=!0),V.dir&&(I=D(I)),V.createFolders&&(q=R(I))&&N.call(this,q,!0);var ge=W==="string"&&V.binary===!1&&V.base64===!1;J&&J.binary!==void 0||(V.binary=!ge),(Y instanceof y&&Y.uncompressedSize===0||V.dir||!Y||Y.length===0)&&(V.base64=!1,V.binary=!0,Y="",V.compression="STORE",W="string");var X=null;X=Y instanceof y||Y instanceof p?Y:w.isNode&&w.isStream(Y)?new T(I,Y):h.prepareContent(I,Y,V.binary,V.optimizedBinaryString,V.base64);var ae=new x(I,X,V);this.files[I]=ae}var d=n("./utf8"),h=n("./utils"),p=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),A=n("./defaults"),y=n("./compressedObject"),x=n("./zipObject"),S=n("./generate"),w=n("./nodejsUtils"),T=n("./nodejs/NodejsStreamInputAdapter"),R=function(I){I.slice(-1)==="/"&&(I=I.substring(0,I.length-1));var Y=I.lastIndexOf("/");return 0<Y?I.substring(0,Y):""},D=function(I){return I.slice(-1)!=="/"&&(I+="/"),I},N=function(I,Y){return Y=Y!==void 0?Y:A.createFolders,I=D(I),this.files[I]||c.call(this,I,null,{dir:!0,createFolders:Y}),this.files[I]};function M(I){return Object.prototype.toString.call(I)==="[object RegExp]"}var O={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(I){var Y,J,q;for(Y in this.files)q=this.files[Y],(J=Y.slice(this.root.length,Y.length))&&Y.slice(0,this.root.length)===this.root&&I(J,q)},filter:function(I){var Y=[];return this.forEach(function(J,q){I(J,q)&&Y.push(q)}),Y},file:function(I,Y,J){if(arguments.length!==1)return I=this.root+I,c.call(this,I,Y,J),this;if(M(I)){var q=I;return this.filter(function(V,ge){return!ge.dir&&q.test(V)})}var W=this.files[this.root+I];return W&&!W.dir?W:null},folder:function(I){if(!I)return this;if(M(I))return this.filter(function(W,V){return V.dir&&I.test(W)});var Y=this.root+I,J=N.call(this,Y),q=this.clone();return q.root=J.name,q},remove:function(I){I=this.root+I;var Y=this.files[I];if(Y||(I.slice(-1)!=="/"&&(I+="/"),Y=this.files[I]),Y&&!Y.dir)delete this.files[I];else for(var J=this.filter(function(W,V){return V.name.slice(0,I.length)===I}),q=0;q<J.length;q++)delete this.files[J[q].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(I){var Y,J={};try{if((J=h.extend(I||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:d.utf8encode})).type=J.type.toLowerCase(),J.compression=J.compression.toUpperCase(),J.type==="binarystring"&&(J.type="string"),!J.type)throw new Error("No output type specified.");h.checkSupport(J.type),J.platform!=="darwin"&&J.platform!=="freebsd"&&J.platform!=="linux"&&J.platform!=="sunos"||(J.platform="UNIX"),J.platform==="win32"&&(J.platform="DOS");var q=J.comment||this.comment||"";Y=S.generateWorker(this,J,q)}catch(W){(Y=new p("error")).error(W)}return new u(Y,J.type||"string",J.mimeType)},generateAsync:function(I,Y){return this.generateInternalStream(I).accumulate(Y)},generateNodeStream:function(I,Y){return(I=I||{}).type||(I.type="nodebuffer"),this.generateInternalStream(I).toNodejsStream(Y)}};i.exports=O},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,i,s){i.exports=n("stream")},{stream:void 0}],17:[function(n,i,s){var c=n("./DataReader");function d(h){c.call(this,h);for(var p=0;p<this.data.length;p++)h[p]=255&h[p]}n("../utils").inherits(d,c),d.prototype.byteAt=function(h){return this.data[this.zero+h]},d.prototype.lastIndexOfSignature=function(h){for(var p=h.charCodeAt(0),u=h.charCodeAt(1),A=h.charCodeAt(2),y=h.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===p&&this.data[x+1]===u&&this.data[x+2]===A&&this.data[x+3]===y)return x-this.zero;return-1},d.prototype.readAndCheckSignature=function(h){var p=h.charCodeAt(0),u=h.charCodeAt(1),A=h.charCodeAt(2),y=h.charCodeAt(3),x=this.readData(4);return p===x[0]&&u===x[1]&&A===x[2]&&y===x[3]},d.prototype.readData=function(h){if(this.checkOffset(h),h===0)return[];var p=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,p},i.exports=d},{"../utils":32,"./DataReader":18}],18:[function(n,i,s){var c=n("../utils");function d(h){this.data=h,this.length=h.length,this.index=0,this.zero=0}d.prototype={checkOffset:function(h){this.checkIndex(this.index+h)},checkIndex:function(h){if(this.length<this.zero+h||h<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+h+"). Corrupted zip ?")},setIndex:function(h){this.checkIndex(h),this.index=h},skip:function(h){this.setIndex(this.index+h)},byteAt:function(){},readInt:function(h){var p,u=0;for(this.checkOffset(h),p=this.index+h-1;p>=this.index;p--)u=(u<<8)+this.byteAt(p);return this.index+=h,u},readString:function(h){return c.transformTo("string",this.readData(h))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var h=this.readInt(4);return new Date(Date.UTC(1980+(h>>25&127),(h>>21&15)-1,h>>16&31,h>>11&31,h>>5&63,(31&h)<<1))}},i.exports=d},{"../utils":32}],19:[function(n,i,s){var c=n("./Uint8ArrayReader");function d(h){c.call(this,h)}n("../utils").inherits(d,c),d.prototype.readData=function(h){this.checkOffset(h);var p=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,p},i.exports=d},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,i,s){var c=n("./DataReader");function d(h){c.call(this,h)}n("../utils").inherits(d,c),d.prototype.byteAt=function(h){return this.data.charCodeAt(this.zero+h)},d.prototype.lastIndexOfSignature=function(h){return this.data.lastIndexOf(h)-this.zero},d.prototype.readAndCheckSignature=function(h){return h===this.readData(4)},d.prototype.readData=function(h){this.checkOffset(h);var p=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,p},i.exports=d},{"../utils":32,"./DataReader":18}],21:[function(n,i,s){var c=n("./ArrayReader");function d(h){c.call(this,h)}n("../utils").inherits(d,c),d.prototype.readData=function(h){if(this.checkOffset(h),h===0)return new Uint8Array(0);var p=this.data.subarray(this.zero+this.index,this.zero+this.index+h);return this.index+=h,p},i.exports=d},{"../utils":32,"./ArrayReader":17}],22:[function(n,i,s){var c=n("../utils"),d=n("../support"),h=n("./ArrayReader"),p=n("./StringReader"),u=n("./NodeBufferReader"),A=n("./Uint8ArrayReader");i.exports=function(y){var x=c.getTypeOf(y);return c.checkSupport(x),x!=="string"||d.uint8array?x==="nodebuffer"?new u(y):d.uint8array?new A(c.transformTo("uint8array",y)):new h(c.transformTo("array",y)):new p(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,i,s){var c=n("./GenericWorker"),d=n("../utils");function h(p){c.call(this,"ConvertWorker to "+p),this.destType=p}d.inherits(h,c),h.prototype.processChunk=function(p){this.push({data:d.transformTo(this.destType,p.data),meta:p.meta})},i.exports=h},{"../utils":32,"./GenericWorker":28}],25:[function(n,i,s){var c=n("./GenericWorker"),d=n("../crc32");function h(){c.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(h,c),h.prototype.processChunk=function(p){this.streamInfo.crc32=d(p.data,this.streamInfo.crc32||0),this.push(p)},i.exports=h},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,i,s){var c=n("../utils"),d=n("./GenericWorker");function h(p){d.call(this,"DataLengthProbe for "+p),this.propName=p,this.withStreamInfo(p,0)}c.inherits(h,d),h.prototype.processChunk=function(p){if(p){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+p.data.length}d.prototype.processChunk.call(this,p)},i.exports=h},{"../utils":32,"./GenericWorker":28}],27:[function(n,i,s){var c=n("../utils"),d=n("./GenericWorker");function h(p){d.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,p.then(function(A){u.dataIsReady=!0,u.data=A,u.max=A&&A.length||0,u.type=c.getTypeOf(A),u.isPaused||u._tickAndRepeat()},function(A){u.error(A)})}c.inherits(h,d),h.prototype.cleanUp=function(){d.prototype.cleanUp.call(this),this.data=null},h.prototype.resume=function(){return!!d.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,c.delay(this._tickAndRepeat,[],this)),!0)},h.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(c.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},h.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var p=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":p=this.data.substring(this.index,u);break;case"uint8array":p=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":p=this.data.slice(this.index,u)}return this.index=u,this.push({data:p,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=h},{"../utils":32,"./GenericWorker":28}],28:[function(n,i,s){function c(d){this.name=d||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}c.prototype={push:function(d){this.emit("data",d)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(d){this.emit("error",d)}return!0},error:function(d){return!this.isFinished&&(this.isPaused?this.generatedError=d:(this.isFinished=!0,this.emit("error",d),this.previous&&this.previous.error(d),this.cleanUp()),!0)},on:function(d,h){return this._listeners[d].push(h),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(d,h){if(this._listeners[d])for(var p=0;p<this._listeners[d].length;p++)this._listeners[d][p].call(this,h)},pipe:function(d){return d.registerPrevious(this)},registerPrevious:function(d){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=d.streamInfo,this.mergeStreamInfo(),this.previous=d;var h=this;return d.on("data",function(p){h.processChunk(p)}),d.on("end",function(){h.end()}),d.on("error",function(p){h.error(p)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var d=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),d=!0),this.previous&&this.previous.resume(),!d},flush:function(){},processChunk:function(d){this.push(d)},withStreamInfo:function(d,h){return this.extraStreamInfo[d]=h,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var d in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,d)&&(this.streamInfo[d]=this.extraStreamInfo[d])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var d="Worker "+this.name;return this.previous?this.previous+" -> "+d:d}},i.exports=c},{}],29:[function(n,i,s){var c=n("../utils"),d=n("./ConvertWorker"),h=n("./GenericWorker"),p=n("../base64"),u=n("../support"),A=n("../external"),y=null;if(u.nodestream)try{y=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(w,T){return new A.Promise(function(R,D){var N=[],M=w._internalType,O=w._outputType,I=w._mimeType;w.on("data",function(Y,J){N.push(Y),T&&T(J)}).on("error",function(Y){N=[],D(Y)}).on("end",function(){try{var Y=(function(J,q,W){switch(J){case"blob":return c.newBlob(c.transformTo("arraybuffer",q),W);case"base64":return p.encode(q);default:return c.transformTo(J,q)}})(O,(function(J,q){var W,V=0,ge=null,X=0;for(W=0;W<q.length;W++)X+=q[W].length;switch(J){case"string":return q.join("");case"array":return Array.prototype.concat.apply([],q);case"uint8array":for(ge=new Uint8Array(X),W=0;W<q.length;W++)ge.set(q[W],V),V+=q[W].length;return ge;case"nodebuffer":return Buffer.concat(q);default:throw new Error("concat : unsupported type '"+J+"'")}})(M,N),I);R(Y)}catch(J){D(J)}N=[]}).resume()})}function S(w,T,R){var D=T;switch(T){case"blob":case"arraybuffer":D="uint8array";break;case"base64":D="string"}try{this._internalType=D,this._outputType=T,this._mimeType=R,c.checkSupport(D),this._worker=w.pipe(new d(D)),w.lock()}catch(N){this._worker=new h("error"),this._worker.error(N)}}S.prototype={accumulate:function(w){return x(this,w)},on:function(w,T){var R=this;return w==="data"?this._worker.on(w,function(D){T.call(R,D.data,D.meta)}):this._worker.on(w,function(){c.delay(T,arguments,R)}),this},resume:function(){return c.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(c.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},w)}},i.exports=S},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,i,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var c=new ArrayBuffer(0);try{s.blob=new Blob([c],{type:"application/zip"}).size===0}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);d.append(c),s.blob=d.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,i,s){for(var c=n("./utils"),d=n("./support"),h=n("./nodejsUtils"),p=n("./stream/GenericWorker"),u=new Array(256),A=0;A<256;A++)u[A]=252<=A?6:248<=A?5:240<=A?4:224<=A?3:192<=A?2:1;u[254]=u[254]=1;function y(){p.call(this,"utf-8 decode"),this.leftOver=null}function x(){p.call(this,"utf-8 encode")}s.utf8encode=function(S){return d.nodebuffer?h.newBufferFrom(S,"utf-8"):(function(w){var T,R,D,N,M,O=w.length,I=0;for(N=0;N<O;N++)(64512&(R=w.charCodeAt(N)))==55296&&N+1<O&&(64512&(D=w.charCodeAt(N+1)))==56320&&(R=65536+(R-55296<<10)+(D-56320),N++),I+=R<128?1:R<2048?2:R<65536?3:4;for(T=d.uint8array?new Uint8Array(I):new Array(I),N=M=0;M<I;N++)(64512&(R=w.charCodeAt(N)))==55296&&N+1<O&&(64512&(D=w.charCodeAt(N+1)))==56320&&(R=65536+(R-55296<<10)+(D-56320),N++),R<128?T[M++]=R:(R<2048?T[M++]=192|R>>>6:(R<65536?T[M++]=224|R>>>12:(T[M++]=240|R>>>18,T[M++]=128|R>>>12&63),T[M++]=128|R>>>6&63),T[M++]=128|63&R);return T})(S)},s.utf8decode=function(S){return d.nodebuffer?c.transformTo("nodebuffer",S).toString("utf-8"):(function(w){var T,R,D,N,M=w.length,O=new Array(2*M);for(T=R=0;T<M;)if((D=w[T++])<128)O[R++]=D;else if(4<(N=u[D]))O[R++]=65533,T+=N-1;else{for(D&=N===2?31:N===3?15:7;1<N&&T<M;)D=D<<6|63&w[T++],N--;1<N?O[R++]=65533:D<65536?O[R++]=D:(D-=65536,O[R++]=55296|D>>10&1023,O[R++]=56320|1023&D)}return O.length!==R&&(O.subarray?O=O.subarray(0,R):O.length=R),c.applyFromCharCode(O)})(S=c.transformTo(d.uint8array?"uint8array":"array",S))},c.inherits(y,p),y.prototype.processChunk=function(S){var w=c.transformTo(d.uint8array?"uint8array":"array",S.data);if(this.leftOver&&this.leftOver.length){if(d.uint8array){var T=w;(w=new Uint8Array(T.length+this.leftOver.length)).set(this.leftOver,0),w.set(T,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var R=(function(N,M){var O;for((M=M||N.length)>N.length&&(M=N.length),O=M-1;0<=O&&(192&N[O])==128;)O--;return O<0||O===0?M:O+u[N[O]]>M?O:M})(w),D=w;R!==w.length&&(d.uint8array?(D=w.subarray(0,R),this.leftOver=w.subarray(R,w.length)):(D=w.slice(0,R),this.leftOver=w.slice(R,w.length))),this.push({data:s.utf8decode(D),meta:S.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=y,c.inherits(x,p),x.prototype.processChunk=function(S){this.push({data:s.utf8encode(S.data),meta:S.meta})},s.Utf8EncodeWorker=x},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,i,s){var c=n("./support"),d=n("./base64"),h=n("./nodejsUtils"),p=n("./external");function u(T){return T}function A(T,R){for(var D=0;D<T.length;++D)R[D]=255&T.charCodeAt(D);return R}n("setimmediate"),s.newBlob=function(T,R){s.checkSupport("blob");try{return new Blob([T],{type:R})}catch{try{var D=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return D.append(T),D.getBlob(R)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(T,R,D){var N=[],M=0,O=T.length;if(O<=D)return String.fromCharCode.apply(null,T);for(;M<O;)R==="array"||R==="nodebuffer"?N.push(String.fromCharCode.apply(null,T.slice(M,Math.min(M+D,O)))):N.push(String.fromCharCode.apply(null,T.subarray(M,Math.min(M+D,O)))),M+=D;return N.join("")},stringifyByChar:function(T){for(var R="",D=0;D<T.length;D++)R+=String.fromCharCode(T[D]);return R},applyCanBeUsed:{uint8array:(function(){try{return c.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return c.nodebuffer&&String.fromCharCode.apply(null,h.allocBuffer(1)).length===1}catch{return!1}})()}};function x(T){var R=65536,D=s.getTypeOf(T),N=!0;if(D==="uint8array"?N=y.applyCanBeUsed.uint8array:D==="nodebuffer"&&(N=y.applyCanBeUsed.nodebuffer),N)for(;1<R;)try{return y.stringifyByChunk(T,D,R)}catch{R=Math.floor(R/2)}return y.stringifyByChar(T)}function S(T,R){for(var D=0;D<T.length;D++)R[D]=T[D];return R}s.applyFromCharCode=x;var w={};w.string={string:u,array:function(T){return A(T,new Array(T.length))},arraybuffer:function(T){return w.string.uint8array(T).buffer},uint8array:function(T){return A(T,new Uint8Array(T.length))},nodebuffer:function(T){return A(T,h.allocBuffer(T.length))}},w.array={string:x,array:u,arraybuffer:function(T){return new Uint8Array(T).buffer},uint8array:function(T){return new Uint8Array(T)},nodebuffer:function(T){return h.newBufferFrom(T)}},w.arraybuffer={string:function(T){return x(new Uint8Array(T))},array:function(T){return S(new Uint8Array(T),new Array(T.byteLength))},arraybuffer:u,uint8array:function(T){return new Uint8Array(T)},nodebuffer:function(T){return h.newBufferFrom(new Uint8Array(T))}},w.uint8array={string:x,array:function(T){return S(T,new Array(T.length))},arraybuffer:function(T){return T.buffer},uint8array:u,nodebuffer:function(T){return h.newBufferFrom(T)}},w.nodebuffer={string:x,array:function(T){return S(T,new Array(T.length))},arraybuffer:function(T){return w.nodebuffer.uint8array(T).buffer},uint8array:function(T){return S(T,new Uint8Array(T.length))},nodebuffer:u},s.transformTo=function(T,R){if(R=R||"",!T)return R;s.checkSupport(T);var D=s.getTypeOf(R);return w[D][T](R)},s.resolve=function(T){for(var R=T.split("/"),D=[],N=0;N<R.length;N++){var M=R[N];M==="."||M===""&&N!==0&&N!==R.length-1||(M===".."?D.pop():D.push(M))}return D.join("/")},s.getTypeOf=function(T){return typeof T=="string"?"string":Object.prototype.toString.call(T)==="[object Array]"?"array":c.nodebuffer&&h.isBuffer(T)?"nodebuffer":c.uint8array&&T instanceof Uint8Array?"uint8array":c.arraybuffer&&T instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(T){if(!c[T.toLowerCase()])throw new Error(T+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(T){var R,D,N="";for(D=0;D<(T||"").length;D++)N+="\\x"+((R=T.charCodeAt(D))<16?"0":"")+R.toString(16).toUpperCase();return N},s.delay=function(T,R,D){setImmediate(function(){T.apply(D||null,R||[])})},s.inherits=function(T,R){function D(){}D.prototype=R.prototype,T.prototype=new D},s.extend=function(){var T,R,D={};for(T=0;T<arguments.length;T++)for(R in arguments[T])Object.prototype.hasOwnProperty.call(arguments[T],R)&&D[R]===void 0&&(D[R]=arguments[T][R]);return D},s.prepareContent=function(T,R,D,N,M){return p.Promise.resolve(R).then(function(O){return c.blob&&(O instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(O))!==-1)&&typeof FileReader<"u"?new p.Promise(function(I,Y){var J=new FileReader;J.onload=function(q){I(q.target.result)},J.onerror=function(q){Y(q.target.error)},J.readAsArrayBuffer(O)}):O}).then(function(O){var I=s.getTypeOf(O);return I?(I==="arraybuffer"?O=s.transformTo("uint8array",O):I==="string"&&(M?O=d.decode(O):D&&N!==!0&&(O=(function(Y){return A(Y,c.uint8array?new Uint8Array(Y.length):new Array(Y.length))})(O))),O):p.Promise.reject(new Error("Can't read the data of '"+T+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,i,s){var c=n("./reader/readerFor"),d=n("./utils"),h=n("./signature"),p=n("./zipEntry"),u=n("./support");function A(y){this.files=[],this.loadOptions=y}A.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var x=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+d.pretty(x)+", expected "+d.pretty(y)+")")}},isSignature:function(y,x){var S=this.reader.index;this.reader.setIndex(y);var w=this.reader.readString(4)===x;return this.reader.setIndex(S),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),x=u.uint8array?"uint8array":"array",S=d.transformTo(x,y);this.zipComment=this.loadOptions.decodeFileName(S)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,x,S,w=this.zip64EndOfCentralSize-44;0<w;)y=this.reader.readInt(2),x=this.reader.readInt(4),S=this.reader.readData(x),this.zip64ExtensibleData[y]={id:y,length:x,value:S}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,x;for(y=0;y<this.files.length;y++)x=this.files[y],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(h.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(h.CENTRAL_FILE_HEADER);)(y=new p({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(h.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,h.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var x=y;if(this.checkSignature(h.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===d.MAX_VALUE_16BITS||this.diskWithCentralDirStart===d.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===d.MAX_VALUE_16BITS||this.centralDirRecords===d.MAX_VALUE_16BITS||this.centralDirSize===d.MAX_VALUE_32BITS||this.centralDirOffset===d.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,h.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var S=this.centralDirOffset+this.centralDirSize;this.zip64&&(S+=20,S+=12+this.zip64EndOfCentralSize);var w=x-S;if(0<w)this.isSignature(x,h.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(y){this.reader=c(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},i.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,i,s){var c=n("./reader/readerFor"),d=n("./utils"),h=n("./compressedObject"),p=n("./crc32"),u=n("./utf8"),A=n("./compressions"),y=n("./support");function x(S,w){this.options=S,this.loadOptions=w}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(S){var w,T;if(S.skip(22),this.fileNameLength=S.readInt(2),T=S.readInt(2),this.fileName=S.readData(this.fileNameLength),S.skip(T),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(R){for(var D in A)if(Object.prototype.hasOwnProperty.call(A,D)&&A[D].magic===R)return A[D];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+d.pretty(this.compressionMethod)+" unknown (inner file : "+d.transformTo("string",this.fileName)+")");this.decompressed=new h(this.compressedSize,this.uncompressedSize,this.crc32,w,S.readData(this.compressedSize))},readCentralPart:function(S){this.versionMadeBy=S.readInt(2),S.skip(2),this.bitFlag=S.readInt(2),this.compressionMethod=S.readString(2),this.date=S.readDate(),this.crc32=S.readInt(4),this.compressedSize=S.readInt(4),this.uncompressedSize=S.readInt(4);var w=S.readInt(2);if(this.extraFieldsLength=S.readInt(2),this.fileCommentLength=S.readInt(2),this.diskNumberStart=S.readInt(2),this.internalFileAttributes=S.readInt(2),this.externalFileAttributes=S.readInt(4),this.localHeaderOffset=S.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");S.skip(w),this.readExtraFields(S),this.parseZIP64ExtraField(S),this.fileComment=S.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var S=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),S==0&&(this.dosPermissions=63&this.externalFileAttributes),S==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var S=c(this.extraFields[1].value);this.uncompressedSize===d.MAX_VALUE_32BITS&&(this.uncompressedSize=S.readInt(8)),this.compressedSize===d.MAX_VALUE_32BITS&&(this.compressedSize=S.readInt(8)),this.localHeaderOffset===d.MAX_VALUE_32BITS&&(this.localHeaderOffset=S.readInt(8)),this.diskNumberStart===d.MAX_VALUE_32BITS&&(this.diskNumberStart=S.readInt(4))}},readExtraFields:function(S){var w,T,R,D=S.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});S.index+4<D;)w=S.readInt(2),T=S.readInt(2),R=S.readData(T),this.extraFields[w]={id:w,length:T,value:R};S.setIndex(D)},handleUTF8:function(){var S=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var T=d.transformTo(S,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(T)}var R=this.findExtraFieldUnicodeComment();if(R!==null)this.fileCommentStr=R;else{var D=d.transformTo(S,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(D)}}},findExtraFieldUnicodePath:function(){var S=this.extraFields[28789];if(S){var w=c(S.value);return w.readInt(1)!==1||p(this.fileName)!==w.readInt(4)?null:u.utf8decode(w.readData(S.length-5))}return null},findExtraFieldUnicodeComment:function(){var S=this.extraFields[25461];if(S){var w=c(S.value);return w.readInt(1)!==1||p(this.fileComment)!==w.readInt(4)?null:u.utf8decode(w.readData(S.length-5))}return null}},i.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,i,s){function c(w,T,R){this.name=w,this.dir=R.dir,this.date=R.date,this.comment=R.comment,this.unixPermissions=R.unixPermissions,this.dosPermissions=R.dosPermissions,this._data=T,this._dataBinary=R.binary,this.options={compression:R.compression,compressionOptions:R.compressionOptions}}var d=n("./stream/StreamHelper"),h=n("./stream/DataWorker"),p=n("./utf8"),u=n("./compressedObject"),A=n("./stream/GenericWorker");c.prototype={internalStream:function(w){var T=null,R="string";try{if(!w)throw new Error("No output type specified.");var D=(R=w.toLowerCase())==="string"||R==="text";R!=="binarystring"&&R!=="text"||(R="string"),T=this._decompressWorker();var N=!this._dataBinary;N&&!D&&(T=T.pipe(new p.Utf8EncodeWorker)),!N&&D&&(T=T.pipe(new p.Utf8DecodeWorker))}catch(M){(T=new A("error")).error(M)}return new d(T,R,"")},async:function(w,T){return this.internalStream(w).accumulate(T)},nodeStream:function(w,T){return this.internalStream(w||"nodebuffer").toNodejsStream(T)},_compressWorker:function(w,T){if(this._data instanceof u&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var R=this._decompressWorker();return this._dataBinary||(R=R.pipe(new p.Utf8EncodeWorker)),u.createWorkerFrom(R,w,T)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof A?this._data:new h(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],x=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},S=0;S<y.length;S++)c.prototype[y[S]]=x;i.exports=c},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,i,s){(function(c){var d,h,p=c.MutationObserver||c.WebKitMutationObserver;if(p){var u=0,A=new p(w),y=c.document.createTextNode("");A.observe(y,{characterData:!0}),d=function(){y.data=u=++u%2}}else if(c.setImmediate||c.MessageChannel===void 0)d="document"in c&&"onreadystatechange"in c.document.createElement("script")?function(){var T=c.document.createElement("script");T.onreadystatechange=function(){w(),T.onreadystatechange=null,T.parentNode.removeChild(T),T=null},c.document.documentElement.appendChild(T)}:function(){setTimeout(w,0)};else{var x=new c.MessageChannel;x.port1.onmessage=w,d=function(){x.port2.postMessage(0)}}var S=[];function w(){var T,R;h=!0;for(var D=S.length;D;){for(R=S,S=[],T=-1;++T<D;)R[T]();D=S.length}h=!1}i.exports=function(T){S.push(T)!==1||h||d()}}).call(this,typeof Pp<"u"?Pp:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,i,s){var c=n("immediate");function d(){}var h={},p=["REJECTED"],u=["FULFILLED"],A=["PENDING"];function y(D){if(typeof D!="function")throw new TypeError("resolver must be a function");this.state=A,this.queue=[],this.outcome=void 0,D!==d&&T(this,D)}function x(D,N,M){this.promise=D,typeof N=="function"&&(this.onFulfilled=N,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function S(D,N,M){c(function(){var O;try{O=N(M)}catch(I){return h.reject(D,I)}O===D?h.reject(D,new TypeError("Cannot resolve promise with itself")):h.resolve(D,O)})}function w(D){var N=D&&D.then;if(D&&(typeof D=="object"||typeof D=="function")&&typeof N=="function")return function(){N.apply(D,arguments)}}function T(D,N){var M=!1;function O(J){M||(M=!0,h.reject(D,J))}function I(J){M||(M=!0,h.resolve(D,J))}var Y=R(function(){N(I,O)});Y.status==="error"&&O(Y.value)}function R(D,N){var M={};try{M.value=D(N),M.status="success"}catch(O){M.status="error",M.value=O}return M}(i.exports=y).prototype.finally=function(D){if(typeof D!="function")return this;var N=this.constructor;return this.then(function(M){return N.resolve(D()).then(function(){return M})},function(M){return N.resolve(D()).then(function(){throw M})})},y.prototype.catch=function(D){return this.then(null,D)},y.prototype.then=function(D,N){if(typeof D!="function"&&this.state===u||typeof N!="function"&&this.state===p)return this;var M=new this.constructor(d);return this.state!==A?S(M,this.state===u?D:N,this.outcome):this.queue.push(new x(M,D,N)),M},x.prototype.callFulfilled=function(D){h.resolve(this.promise,D)},x.prototype.otherCallFulfilled=function(D){S(this.promise,this.onFulfilled,D)},x.prototype.callRejected=function(D){h.reject(this.promise,D)},x.prototype.otherCallRejected=function(D){S(this.promise,this.onRejected,D)},h.resolve=function(D,N){var M=R(w,N);if(M.status==="error")return h.reject(D,M.value);var O=M.value;if(O)T(D,O);else{D.state=u,D.outcome=N;for(var I=-1,Y=D.queue.length;++I<Y;)D.queue[I].callFulfilled(N)}return D},h.reject=function(D,N){D.state=p,D.outcome=N;for(var M=-1,O=D.queue.length;++M<O;)D.queue[M].callRejected(N);return D},y.resolve=function(D){return D instanceof this?D:h.resolve(new this(d),D)},y.reject=function(D){var N=new this(d);return h.reject(N,D)},y.all=function(D){var N=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=D.length,O=!1;if(!M)return this.resolve([]);for(var I=new Array(M),Y=0,J=-1,q=new this(d);++J<M;)W(D[J],J);return q;function W(V,ge){N.resolve(V).then(function(X){I[ge]=X,++Y!==M||O||(O=!0,h.resolve(q,I))},function(X){O||(O=!0,h.reject(q,X))})}},y.race=function(D){var N=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=D.length,O=!1;if(!M)return this.resolve([]);for(var I=-1,Y=new this(d);++I<M;)J=D[I],N.resolve(J).then(function(q){O||(O=!0,h.resolve(Y,q))},function(q){O||(O=!0,h.reject(Y,q))});var J;return Y}},{immediate:36}],38:[function(n,i,s){var c={};(0,n("./lib/utils/common").assign)(c,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),i.exports=c},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,i,s){var c=n("./zlib/deflate"),d=n("./utils/common"),h=n("./utils/strings"),p=n("./zlib/messages"),u=n("./zlib/zstream"),A=Object.prototype.toString,y=0,x=-1,S=0,w=8;function T(D){if(!(this instanceof T))return new T(D);this.options=d.assign({level:x,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:S,to:""},D||{});var N=this.options;N.raw&&0<N.windowBits?N.windowBits=-N.windowBits:N.gzip&&0<N.windowBits&&N.windowBits<16&&(N.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var M=c.deflateInit2(this.strm,N.level,N.method,N.windowBits,N.memLevel,N.strategy);if(M!==y)throw new Error(p[M]);if(N.header&&c.deflateSetHeader(this.strm,N.header),N.dictionary){var O;if(O=typeof N.dictionary=="string"?h.string2buf(N.dictionary):A.call(N.dictionary)==="[object ArrayBuffer]"?new Uint8Array(N.dictionary):N.dictionary,(M=c.deflateSetDictionary(this.strm,O))!==y)throw new Error(p[M]);this._dict_set=!0}}function R(D,N){var M=new T(N);if(M.push(D,!0),M.err)throw M.msg||p[M.err];return M.result}T.prototype.push=function(D,N){var M,O,I=this.strm,Y=this.options.chunkSize;if(this.ended)return!1;O=N===~~N?N:N===!0?4:0,typeof D=="string"?I.input=h.string2buf(D):A.call(D)==="[object ArrayBuffer]"?I.input=new Uint8Array(D):I.input=D,I.next_in=0,I.avail_in=I.input.length;do{if(I.avail_out===0&&(I.output=new d.Buf8(Y),I.next_out=0,I.avail_out=Y),(M=c.deflate(I,O))!==1&&M!==y)return this.onEnd(M),!(this.ended=!0);I.avail_out!==0&&(I.avail_in!==0||O!==4&&O!==2)||(this.options.to==="string"?this.onData(h.buf2binstring(d.shrinkBuf(I.output,I.next_out))):this.onData(d.shrinkBuf(I.output,I.next_out)))}while((0<I.avail_in||I.avail_out===0)&&M!==1);return O===4?(M=c.deflateEnd(this.strm),this.onEnd(M),this.ended=!0,M===y):O!==2||(this.onEnd(y),!(I.avail_out=0))},T.prototype.onData=function(D){this.chunks.push(D)},T.prototype.onEnd=function(D){D===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg},s.Deflate=T,s.deflate=R,s.deflateRaw=function(D,N){return(N=N||{}).raw=!0,R(D,N)},s.gzip=function(D,N){return(N=N||{}).gzip=!0,R(D,N)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,i,s){var c=n("./zlib/inflate"),d=n("./utils/common"),h=n("./utils/strings"),p=n("./zlib/constants"),u=n("./zlib/messages"),A=n("./zlib/zstream"),y=n("./zlib/gzheader"),x=Object.prototype.toString;function S(T){if(!(this instanceof S))return new S(T);this.options=d.assign({chunkSize:16384,windowBits:0,to:""},T||{});var R=this.options;R.raw&&0<=R.windowBits&&R.windowBits<16&&(R.windowBits=-R.windowBits,R.windowBits===0&&(R.windowBits=-15)),!(0<=R.windowBits&&R.windowBits<16)||T&&T.windowBits||(R.windowBits+=32),15<R.windowBits&&R.windowBits<48&&(15&R.windowBits)==0&&(R.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var D=c.inflateInit2(this.strm,R.windowBits);if(D!==p.Z_OK)throw new Error(u[D]);this.header=new y,c.inflateGetHeader(this.strm,this.header)}function w(T,R){var D=new S(R);if(D.push(T,!0),D.err)throw D.msg||u[D.err];return D.result}S.prototype.push=function(T,R){var D,N,M,O,I,Y,J=this.strm,q=this.options.chunkSize,W=this.options.dictionary,V=!1;if(this.ended)return!1;N=R===~~R?R:R===!0?p.Z_FINISH:p.Z_NO_FLUSH,typeof T=="string"?J.input=h.binstring2buf(T):x.call(T)==="[object ArrayBuffer]"?J.input=new Uint8Array(T):J.input=T,J.next_in=0,J.avail_in=J.input.length;do{if(J.avail_out===0&&(J.output=new d.Buf8(q),J.next_out=0,J.avail_out=q),(D=c.inflate(J,p.Z_NO_FLUSH))===p.Z_NEED_DICT&&W&&(Y=typeof W=="string"?h.string2buf(W):x.call(W)==="[object ArrayBuffer]"?new Uint8Array(W):W,D=c.inflateSetDictionary(this.strm,Y)),D===p.Z_BUF_ERROR&&V===!0&&(D=p.Z_OK,V=!1),D!==p.Z_STREAM_END&&D!==p.Z_OK)return this.onEnd(D),!(this.ended=!0);J.next_out&&(J.avail_out!==0&&D!==p.Z_STREAM_END&&(J.avail_in!==0||N!==p.Z_FINISH&&N!==p.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=h.utf8border(J.output,J.next_out),O=J.next_out-M,I=h.buf2string(J.output,M),J.next_out=O,J.avail_out=q-O,O&&d.arraySet(J.output,J.output,M,O,0),this.onData(I)):this.onData(d.shrinkBuf(J.output,J.next_out)))),J.avail_in===0&&J.avail_out===0&&(V=!0)}while((0<J.avail_in||J.avail_out===0)&&D!==p.Z_STREAM_END);return D===p.Z_STREAM_END&&(N=p.Z_FINISH),N===p.Z_FINISH?(D=c.inflateEnd(this.strm),this.onEnd(D),this.ended=!0,D===p.Z_OK):N!==p.Z_SYNC_FLUSH||(this.onEnd(p.Z_OK),!(J.avail_out=0))},S.prototype.onData=function(T){this.chunks.push(T)},S.prototype.onEnd=function(T){T===p.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},s.Inflate=S,s.inflate=w,s.inflateRaw=function(T,R){return(R=R||{}).raw=!0,w(T,R)},s.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,i,s){var c=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(p){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var A=u.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(var y in A)A.hasOwnProperty(y)&&(p[y]=A[y])}}return p},s.shrinkBuf=function(p,u){return p.length===u?p:p.subarray?p.subarray(0,u):(p.length=u,p)};var d={arraySet:function(p,u,A,y,x){if(u.subarray&&p.subarray)p.set(u.subarray(A,A+y),x);else for(var S=0;S<y;S++)p[x+S]=u[A+S]},flattenChunks:function(p){var u,A,y,x,S,w;for(u=y=0,A=p.length;u<A;u++)y+=p[u].length;for(w=new Uint8Array(y),u=x=0,A=p.length;u<A;u++)S=p[u],w.set(S,x),x+=S.length;return w}},h={arraySet:function(p,u,A,y,x){for(var S=0;S<y;S++)p[x+S]=u[A+S]},flattenChunks:function(p){return[].concat.apply([],p)}};s.setTyped=function(p){p?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,d)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,h))},s.setTyped(c)},{}],42:[function(n,i,s){var c=n("./common"),d=!0,h=!0;try{String.fromCharCode.apply(null,[0])}catch{d=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{h=!1}for(var p=new c.Buf8(256),u=0;u<256;u++)p[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function A(y,x){if(x<65537&&(y.subarray&&h||!y.subarray&&d))return String.fromCharCode.apply(null,c.shrinkBuf(y,x));for(var S="",w=0;w<x;w++)S+=String.fromCharCode(y[w]);return S}p[254]=p[254]=1,s.string2buf=function(y){var x,S,w,T,R,D=y.length,N=0;for(T=0;T<D;T++)(64512&(S=y.charCodeAt(T)))==55296&&T+1<D&&(64512&(w=y.charCodeAt(T+1)))==56320&&(S=65536+(S-55296<<10)+(w-56320),T++),N+=S<128?1:S<2048?2:S<65536?3:4;for(x=new c.Buf8(N),T=R=0;R<N;T++)(64512&(S=y.charCodeAt(T)))==55296&&T+1<D&&(64512&(w=y.charCodeAt(T+1)))==56320&&(S=65536+(S-55296<<10)+(w-56320),T++),S<128?x[R++]=S:(S<2048?x[R++]=192|S>>>6:(S<65536?x[R++]=224|S>>>12:(x[R++]=240|S>>>18,x[R++]=128|S>>>12&63),x[R++]=128|S>>>6&63),x[R++]=128|63&S);return x},s.buf2binstring=function(y){return A(y,y.length)},s.binstring2buf=function(y){for(var x=new c.Buf8(y.length),S=0,w=x.length;S<w;S++)x[S]=y.charCodeAt(S);return x},s.buf2string=function(y,x){var S,w,T,R,D=x||y.length,N=new Array(2*D);for(S=w=0;S<D;)if((T=y[S++])<128)N[w++]=T;else if(4<(R=p[T]))N[w++]=65533,S+=R-1;else{for(T&=R===2?31:R===3?15:7;1<R&&S<D;)T=T<<6|63&y[S++],R--;1<R?N[w++]=65533:T<65536?N[w++]=T:(T-=65536,N[w++]=55296|T>>10&1023,N[w++]=56320|1023&T)}return A(N,w)},s.utf8border=function(y,x){var S;for((x=x||y.length)>y.length&&(x=y.length),S=x-1;0<=S&&(192&y[S])==128;)S--;return S<0||S===0?x:S+p[y[S]]>x?S:x}},{"./common":41}],43:[function(n,i,s){i.exports=function(c,d,h,p){for(var u=65535&c|0,A=c>>>16&65535|0,y=0;h!==0;){for(h-=y=2e3<h?2e3:h;A=A+(u=u+d[p++]|0)|0,--y;);u%=65521,A%=65521}return u|A<<16|0}},{}],44:[function(n,i,s){i.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,i,s){var c=(function(){for(var d,h=[],p=0;p<256;p++){d=p;for(var u=0;u<8;u++)d=1&d?3988292384^d>>>1:d>>>1;h[p]=d}return h})();i.exports=function(d,h,p,u){var A=c,y=u+p;d^=-1;for(var x=u;x<y;x++)d=d>>>8^A[255&(d^h[x])];return-1^d}},{}],46:[function(n,i,s){var c,d=n("../utils/common"),h=n("./trees"),p=n("./adler32"),u=n("./crc32"),A=n("./messages"),y=0,x=4,S=0,w=-2,T=-1,R=4,D=2,N=8,M=9,O=286,I=30,Y=19,J=2*O+1,q=15,W=3,V=258,ge=V+W+1,X=42,ae=113,L=1,te=2,le=3,Ae=4;function ne(k,ce){return k.msg=A[ce],ce}function oe(k){return(k<<1)-(4<k?9:0)}function ie(k){for(var ce=k.length;0<=--ce;)k[ce]=0}function j(k){var ce=k.state,ue=ce.pending;ue>k.avail_out&&(ue=k.avail_out),ue!==0&&(d.arraySet(k.output,ce.pending_buf,ce.pending_out,ue,k.next_out),k.next_out+=ue,ce.pending_out+=ue,k.total_out+=ue,k.avail_out-=ue,ce.pending-=ue,ce.pending===0&&(ce.pending_out=0))}function K(k,ce){h._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,ce),k.block_start=k.strstart,j(k.strm)}function ve(k,ce){k.pending_buf[k.pending++]=ce}function xe(k,ce){k.pending_buf[k.pending++]=ce>>>8&255,k.pending_buf[k.pending++]=255&ce}function Re(k,ce){var ue,U,G=k.max_chain_length,Z=k.strstart,be=k.prev_length,_e=k.nice_match,me=k.strstart>k.w_size-ge?k.strstart-(k.w_size-ge):0,ze=k.window,Qe=k.w_mask,Oe=k.prev,dt=k.strstart+V,Jt=ze[Z+be-1],zt=ze[Z+be];k.prev_length>=k.good_match&&(G>>=2),_e>k.lookahead&&(_e=k.lookahead);do if(ze[(ue=ce)+be]===zt&&ze[ue+be-1]===Jt&&ze[ue]===ze[Z]&&ze[++ue]===ze[Z+1]){Z+=2,ue++;do;while(ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&Z<dt);if(U=V-(dt-Z),Z=dt-V,be<U){if(k.match_start=ce,_e<=(be=U))break;Jt=ze[Z+be-1],zt=ze[Z+be]}}while((ce=Oe[ce&Qe])>me&&--G!=0);return be<=k.lookahead?be:k.lookahead}function Fe(k){var ce,ue,U,G,Z,be,_e,me,ze,Qe,Oe=k.w_size;do{if(G=k.window_size-k.lookahead-k.strstart,k.strstart>=Oe+(Oe-ge)){for(d.arraySet(k.window,k.window,Oe,Oe,0),k.match_start-=Oe,k.strstart-=Oe,k.block_start-=Oe,ce=ue=k.hash_size;U=k.head[--ce],k.head[ce]=Oe<=U?U-Oe:0,--ue;);for(ce=ue=Oe;U=k.prev[--ce],k.prev[ce]=Oe<=U?U-Oe:0,--ue;);G+=Oe}if(k.strm.avail_in===0)break;if(be=k.strm,_e=k.window,me=k.strstart+k.lookahead,ze=G,Qe=void 0,Qe=be.avail_in,ze<Qe&&(Qe=ze),ue=Qe===0?0:(be.avail_in-=Qe,d.arraySet(_e,be.input,be.next_in,Qe,me),be.state.wrap===1?be.adler=p(be.adler,_e,Qe,me):be.state.wrap===2&&(be.adler=u(be.adler,_e,Qe,me)),be.next_in+=Qe,be.total_in+=Qe,Qe),k.lookahead+=ue,k.lookahead+k.insert>=W)for(Z=k.strstart-k.insert,k.ins_h=k.window[Z],k.ins_h=(k.ins_h<<k.hash_shift^k.window[Z+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[Z+W-1])&k.hash_mask,k.prev[Z&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=Z,Z++,k.insert--,!(k.lookahead+k.insert<W)););}while(k.lookahead<ge&&k.strm.avail_in!==0)}function pt(k,ce){for(var ue,U;;){if(k.lookahead<ge){if(Fe(k),k.lookahead<ge&&ce===y)return L;if(k.lookahead===0)break}if(ue=0,k.lookahead>=W&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+W-1])&k.hash_mask,ue=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),ue!==0&&k.strstart-ue<=k.w_size-ge&&(k.match_length=Re(k,ue)),k.match_length>=W)if(U=h._tr_tally(k,k.strstart-k.match_start,k.match_length-W),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=W){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+W-1])&k.hash_mask,ue=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else U=h._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(U&&(K(k,!1),k.strm.avail_out===0))return L}return k.insert=k.strstart<W-1?k.strstart:W-1,ce===x?(K(k,!0),k.strm.avail_out===0?le:Ae):k.last_lit&&(K(k,!1),k.strm.avail_out===0)?L:te}function lt(k,ce){for(var ue,U,G;;){if(k.lookahead<ge){if(Fe(k),k.lookahead<ge&&ce===y)return L;if(k.lookahead===0)break}if(ue=0,k.lookahead>=W&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+W-1])&k.hash_mask,ue=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=W-1,ue!==0&&k.prev_length<k.max_lazy_match&&k.strstart-ue<=k.w_size-ge&&(k.match_length=Re(k,ue),k.match_length<=5&&(k.strategy===1||k.match_length===W&&4096<k.strstart-k.match_start)&&(k.match_length=W-1)),k.prev_length>=W&&k.match_length<=k.prev_length){for(G=k.strstart+k.lookahead-W,U=h._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-W),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=G&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+W-1])&k.hash_mask,ue=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),--k.prev_length!=0;);if(k.match_available=0,k.match_length=W-1,k.strstart++,U&&(K(k,!1),k.strm.avail_out===0))return L}else if(k.match_available){if((U=h._tr_tally(k,0,k.window[k.strstart-1]))&&K(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return L}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(U=h._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<W-1?k.strstart:W-1,ce===x?(K(k,!0),k.strm.avail_out===0?le:Ae):k.last_lit&&(K(k,!1),k.strm.avail_out===0)?L:te}function ut(k,ce,ue,U,G){this.good_length=k,this.max_lazy=ce,this.nice_length=ue,this.max_chain=U,this.func=G}function Rt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=N,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new d.Buf16(2*J),this.dyn_dtree=new d.Buf16(2*(2*I+1)),this.bl_tree=new d.Buf16(2*(2*Y+1)),ie(this.dyn_ltree),ie(this.dyn_dtree),ie(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new d.Buf16(q+1),this.heap=new d.Buf16(2*O+1),ie(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new d.Buf16(2*O+1),ie(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function je(k){var ce;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=D,(ce=k.state).pending=0,ce.pending_out=0,ce.wrap<0&&(ce.wrap=-ce.wrap),ce.status=ce.wrap?X:ae,k.adler=ce.wrap===2?0:1,ce.last_flush=y,h._tr_init(ce),S):ne(k,w)}function St(k){var ce=je(k);return ce===S&&(function(ue){ue.window_size=2*ue.w_size,ie(ue.head),ue.max_lazy_match=c[ue.level].max_lazy,ue.good_match=c[ue.level].good_length,ue.nice_match=c[ue.level].nice_length,ue.max_chain_length=c[ue.level].max_chain,ue.strstart=0,ue.block_start=0,ue.lookahead=0,ue.insert=0,ue.match_length=ue.prev_length=W-1,ue.match_available=0,ue.ins_h=0})(k.state),ce}function he(k,ce,ue,U,G,Z){if(!k)return w;var be=1;if(ce===T&&(ce=6),U<0?(be=0,U=-U):15<U&&(be=2,U-=16),G<1||M<G||ue!==N||U<8||15<U||ce<0||9<ce||Z<0||R<Z)return ne(k,w);U===8&&(U=9);var _e=new Rt;return(k.state=_e).strm=k,_e.wrap=be,_e.gzhead=null,_e.w_bits=U,_e.w_size=1<<_e.w_bits,_e.w_mask=_e.w_size-1,_e.hash_bits=G+7,_e.hash_size=1<<_e.hash_bits,_e.hash_mask=_e.hash_size-1,_e.hash_shift=~~((_e.hash_bits+W-1)/W),_e.window=new d.Buf8(2*_e.w_size),_e.head=new d.Buf16(_e.hash_size),_e.prev=new d.Buf16(_e.w_size),_e.lit_bufsize=1<<G+6,_e.pending_buf_size=4*_e.lit_bufsize,_e.pending_buf=new d.Buf8(_e.pending_buf_size),_e.d_buf=1*_e.lit_bufsize,_e.l_buf=3*_e.lit_bufsize,_e.level=ce,_e.strategy=Z,_e.method=ue,St(k)}c=[new ut(0,0,0,0,function(k,ce){var ue=65535;for(ue>k.pending_buf_size-5&&(ue=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Fe(k),k.lookahead===0&&ce===y)return L;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var U=k.block_start+ue;if((k.strstart===0||k.strstart>=U)&&(k.lookahead=k.strstart-U,k.strstart=U,K(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-ge&&(K(k,!1),k.strm.avail_out===0))return L}return k.insert=0,ce===x?(K(k,!0),k.strm.avail_out===0?le:Ae):(k.strstart>k.block_start&&(K(k,!1),k.strm.avail_out),L)}),new ut(4,4,8,4,pt),new ut(4,5,16,8,pt),new ut(4,6,32,32,pt),new ut(4,4,16,16,lt),new ut(8,16,32,32,lt),new ut(8,16,128,128,lt),new ut(8,32,128,256,lt),new ut(32,128,258,1024,lt),new ut(32,258,258,4096,lt)],s.deflateInit=function(k,ce){return he(k,ce,N,15,8,0)},s.deflateInit2=he,s.deflateReset=St,s.deflateResetKeep=je,s.deflateSetHeader=function(k,ce){return k&&k.state?k.state.wrap!==2?w:(k.state.gzhead=ce,S):w},s.deflate=function(k,ce){var ue,U,G,Z;if(!k||!k.state||5<ce||ce<0)return k?ne(k,w):w;if(U=k.state,!k.output||!k.input&&k.avail_in!==0||U.status===666&&ce!==x)return ne(k,k.avail_out===0?-5:w);if(U.strm=k,ue=U.last_flush,U.last_flush=ce,U.status===X)if(U.wrap===2)k.adler=0,ve(U,31),ve(U,139),ve(U,8),U.gzhead?(ve(U,(U.gzhead.text?1:0)+(U.gzhead.hcrc?2:0)+(U.gzhead.extra?4:0)+(U.gzhead.name?8:0)+(U.gzhead.comment?16:0)),ve(U,255&U.gzhead.time),ve(U,U.gzhead.time>>8&255),ve(U,U.gzhead.time>>16&255),ve(U,U.gzhead.time>>24&255),ve(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),ve(U,255&U.gzhead.os),U.gzhead.extra&&U.gzhead.extra.length&&(ve(U,255&U.gzhead.extra.length),ve(U,U.gzhead.extra.length>>8&255)),U.gzhead.hcrc&&(k.adler=u(k.adler,U.pending_buf,U.pending,0)),U.gzindex=0,U.status=69):(ve(U,0),ve(U,0),ve(U,0),ve(U,0),ve(U,0),ve(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),ve(U,3),U.status=ae);else{var be=N+(U.w_bits-8<<4)<<8;be|=(2<=U.strategy||U.level<2?0:U.level<6?1:U.level===6?2:3)<<6,U.strstart!==0&&(be|=32),be+=31-be%31,U.status=ae,xe(U,be),U.strstart!==0&&(xe(U,k.adler>>>16),xe(U,65535&k.adler)),k.adler=1}if(U.status===69)if(U.gzhead.extra){for(G=U.pending;U.gzindex<(65535&U.gzhead.extra.length)&&(U.pending!==U.pending_buf_size||(U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),j(k),G=U.pending,U.pending!==U.pending_buf_size));)ve(U,255&U.gzhead.extra[U.gzindex]),U.gzindex++;U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),U.gzindex===U.gzhead.extra.length&&(U.gzindex=0,U.status=73)}else U.status=73;if(U.status===73)if(U.gzhead.name){G=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),j(k),G=U.pending,U.pending===U.pending_buf_size)){Z=1;break}Z=U.gzindex<U.gzhead.name.length?255&U.gzhead.name.charCodeAt(U.gzindex++):0,ve(U,Z)}while(Z!==0);U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),Z===0&&(U.gzindex=0,U.status=91)}else U.status=91;if(U.status===91)if(U.gzhead.comment){G=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),j(k),G=U.pending,U.pending===U.pending_buf_size)){Z=1;break}Z=U.gzindex<U.gzhead.comment.length?255&U.gzhead.comment.charCodeAt(U.gzindex++):0,ve(U,Z)}while(Z!==0);U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),Z===0&&(U.status=103)}else U.status=103;if(U.status===103&&(U.gzhead.hcrc?(U.pending+2>U.pending_buf_size&&j(k),U.pending+2<=U.pending_buf_size&&(ve(U,255&k.adler),ve(U,k.adler>>8&255),k.adler=0,U.status=ae)):U.status=ae),U.pending!==0){if(j(k),k.avail_out===0)return U.last_flush=-1,S}else if(k.avail_in===0&&oe(ce)<=oe(ue)&&ce!==x)return ne(k,-5);if(U.status===666&&k.avail_in!==0)return ne(k,-5);if(k.avail_in!==0||U.lookahead!==0||ce!==y&&U.status!==666){var _e=U.strategy===2?(function(me,ze){for(var Qe;;){if(me.lookahead===0&&(Fe(me),me.lookahead===0)){if(ze===y)return L;break}if(me.match_length=0,Qe=h._tr_tally(me,0,me.window[me.strstart]),me.lookahead--,me.strstart++,Qe&&(K(me,!1),me.strm.avail_out===0))return L}return me.insert=0,ze===x?(K(me,!0),me.strm.avail_out===0?le:Ae):me.last_lit&&(K(me,!1),me.strm.avail_out===0)?L:te})(U,ce):U.strategy===3?(function(me,ze){for(var Qe,Oe,dt,Jt,zt=me.window;;){if(me.lookahead<=V){if(Fe(me),me.lookahead<=V&&ze===y)return L;if(me.lookahead===0)break}if(me.match_length=0,me.lookahead>=W&&0<me.strstart&&(Oe=zt[dt=me.strstart-1])===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]){Jt=me.strstart+V;do;while(Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&dt<Jt);me.match_length=V-(Jt-dt),me.match_length>me.lookahead&&(me.match_length=me.lookahead)}if(me.match_length>=W?(Qe=h._tr_tally(me,1,me.match_length-W),me.lookahead-=me.match_length,me.strstart+=me.match_length,me.match_length=0):(Qe=h._tr_tally(me,0,me.window[me.strstart]),me.lookahead--,me.strstart++),Qe&&(K(me,!1),me.strm.avail_out===0))return L}return me.insert=0,ze===x?(K(me,!0),me.strm.avail_out===0?le:Ae):me.last_lit&&(K(me,!1),me.strm.avail_out===0)?L:te})(U,ce):c[U.level].func(U,ce);if(_e!==le&&_e!==Ae||(U.status=666),_e===L||_e===le)return k.avail_out===0&&(U.last_flush=-1),S;if(_e===te&&(ce===1?h._tr_align(U):ce!==5&&(h._tr_stored_block(U,0,0,!1),ce===3&&(ie(U.head),U.lookahead===0&&(U.strstart=0,U.block_start=0,U.insert=0))),j(k),k.avail_out===0))return U.last_flush=-1,S}return ce!==x?S:U.wrap<=0?1:(U.wrap===2?(ve(U,255&k.adler),ve(U,k.adler>>8&255),ve(U,k.adler>>16&255),ve(U,k.adler>>24&255),ve(U,255&k.total_in),ve(U,k.total_in>>8&255),ve(U,k.total_in>>16&255),ve(U,k.total_in>>24&255)):(xe(U,k.adler>>>16),xe(U,65535&k.adler)),j(k),0<U.wrap&&(U.wrap=-U.wrap),U.pending!==0?S:1)},s.deflateEnd=function(k){var ce;return k&&k.state?(ce=k.state.status)!==X&&ce!==69&&ce!==73&&ce!==91&&ce!==103&&ce!==ae&&ce!==666?ne(k,w):(k.state=null,ce===ae?ne(k,-3):S):w},s.deflateSetDictionary=function(k,ce){var ue,U,G,Z,be,_e,me,ze,Qe=ce.length;if(!k||!k.state||(Z=(ue=k.state).wrap)===2||Z===1&&ue.status!==X||ue.lookahead)return w;for(Z===1&&(k.adler=p(k.adler,ce,Qe,0)),ue.wrap=0,Qe>=ue.w_size&&(Z===0&&(ie(ue.head),ue.strstart=0,ue.block_start=0,ue.insert=0),ze=new d.Buf8(ue.w_size),d.arraySet(ze,ce,Qe-ue.w_size,ue.w_size,0),ce=ze,Qe=ue.w_size),be=k.avail_in,_e=k.next_in,me=k.input,k.avail_in=Qe,k.next_in=0,k.input=ce,Fe(ue);ue.lookahead>=W;){for(U=ue.strstart,G=ue.lookahead-(W-1);ue.ins_h=(ue.ins_h<<ue.hash_shift^ue.window[U+W-1])&ue.hash_mask,ue.prev[U&ue.w_mask]=ue.head[ue.ins_h],ue.head[ue.ins_h]=U,U++,--G;);ue.strstart=U,ue.lookahead=W-1,Fe(ue)}return ue.strstart+=ue.lookahead,ue.block_start=ue.strstart,ue.insert=ue.lookahead,ue.lookahead=0,ue.match_length=ue.prev_length=W-1,ue.match_available=0,k.next_in=_e,k.input=me,k.avail_in=be,ue.wrap=Z,S},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,i,s){i.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,i,s){i.exports=function(c,d){var h,p,u,A,y,x,S,w,T,R,D,N,M,O,I,Y,J,q,W,V,ge,X,ae,L,te;h=c.state,p=c.next_in,L=c.input,u=p+(c.avail_in-5),A=c.next_out,te=c.output,y=A-(d-c.avail_out),x=A+(c.avail_out-257),S=h.dmax,w=h.wsize,T=h.whave,R=h.wnext,D=h.window,N=h.hold,M=h.bits,O=h.lencode,I=h.distcode,Y=(1<<h.lenbits)-1,J=(1<<h.distbits)-1;e:do{M<15&&(N+=L[p++]<<M,M+=8,N+=L[p++]<<M,M+=8),q=O[N&Y];t:for(;;){if(N>>>=W=q>>>24,M-=W,(W=q>>>16&255)===0)te[A++]=65535&q;else{if(!(16&W)){if((64&W)==0){q=O[(65535&q)+(N&(1<<W)-1)];continue t}if(32&W){h.mode=12;break e}c.msg="invalid literal/length code",h.mode=30;break e}V=65535&q,(W&=15)&&(M<W&&(N+=L[p++]<<M,M+=8),V+=N&(1<<W)-1,N>>>=W,M-=W),M<15&&(N+=L[p++]<<M,M+=8,N+=L[p++]<<M,M+=8),q=I[N&J];n:for(;;){if(N>>>=W=q>>>24,M-=W,!(16&(W=q>>>16&255))){if((64&W)==0){q=I[(65535&q)+(N&(1<<W)-1)];continue n}c.msg="invalid distance code",h.mode=30;break e}if(ge=65535&q,M<(W&=15)&&(N+=L[p++]<<M,(M+=8)<W&&(N+=L[p++]<<M,M+=8)),S<(ge+=N&(1<<W)-1)){c.msg="invalid distance too far back",h.mode=30;break e}if(N>>>=W,M-=W,(W=A-y)<ge){if(T<(W=ge-W)&&h.sane){c.msg="invalid distance too far back",h.mode=30;break e}if(ae=D,(X=0)===R){if(X+=w-W,W<V){for(V-=W;te[A++]=D[X++],--W;);X=A-ge,ae=te}}else if(R<W){if(X+=w+R-W,(W-=R)<V){for(V-=W;te[A++]=D[X++],--W;);if(X=0,R<V){for(V-=W=R;te[A++]=D[X++],--W;);X=A-ge,ae=te}}}else if(X+=R-W,W<V){for(V-=W;te[A++]=D[X++],--W;);X=A-ge,ae=te}for(;2<V;)te[A++]=ae[X++],te[A++]=ae[X++],te[A++]=ae[X++],V-=3;V&&(te[A++]=ae[X++],1<V&&(te[A++]=ae[X++]))}else{for(X=A-ge;te[A++]=te[X++],te[A++]=te[X++],te[A++]=te[X++],2<(V-=3););V&&(te[A++]=te[X++],1<V&&(te[A++]=te[X++]))}break}}break}}while(p<u&&A<x);p-=V=M>>3,N&=(1<<(M-=V<<3))-1,c.next_in=p,c.next_out=A,c.avail_in=p<u?u-p+5:5-(p-u),c.avail_out=A<x?x-A+257:257-(A-x),h.hold=N,h.bits=M}},{}],49:[function(n,i,s){var c=n("../utils/common"),d=n("./adler32"),h=n("./crc32"),p=n("./inffast"),u=n("./inftrees"),A=1,y=2,x=0,S=-2,w=1,T=852,R=592;function D(X){return(X>>>24&255)+(X>>>8&65280)+((65280&X)<<8)+((255&X)<<24)}function N(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function M(X){var ae;return X&&X.state?(ae=X.state,X.total_in=X.total_out=ae.total=0,X.msg="",ae.wrap&&(X.adler=1&ae.wrap),ae.mode=w,ae.last=0,ae.havedict=0,ae.dmax=32768,ae.head=null,ae.hold=0,ae.bits=0,ae.lencode=ae.lendyn=new c.Buf32(T),ae.distcode=ae.distdyn=new c.Buf32(R),ae.sane=1,ae.back=-1,x):S}function O(X){var ae;return X&&X.state?((ae=X.state).wsize=0,ae.whave=0,ae.wnext=0,M(X)):S}function I(X,ae){var L,te;return X&&X.state?(te=X.state,ae<0?(L=0,ae=-ae):(L=1+(ae>>4),ae<48&&(ae&=15)),ae&&(ae<8||15<ae)?S:(te.window!==null&&te.wbits!==ae&&(te.window=null),te.wrap=L,te.wbits=ae,O(X))):S}function Y(X,ae){var L,te;return X?(te=new N,(X.state=te).window=null,(L=I(X,ae))!==x&&(X.state=null),L):S}var J,q,W=!0;function V(X){if(W){var ae;for(J=new c.Buf32(512),q=new c.Buf32(32),ae=0;ae<144;)X.lens[ae++]=8;for(;ae<256;)X.lens[ae++]=9;for(;ae<280;)X.lens[ae++]=7;for(;ae<288;)X.lens[ae++]=8;for(u(A,X.lens,0,288,J,0,X.work,{bits:9}),ae=0;ae<32;)X.lens[ae++]=5;u(y,X.lens,0,32,q,0,X.work,{bits:5}),W=!1}X.lencode=J,X.lenbits=9,X.distcode=q,X.distbits=5}function ge(X,ae,L,te){var le,Ae=X.state;return Ae.window===null&&(Ae.wsize=1<<Ae.wbits,Ae.wnext=0,Ae.whave=0,Ae.window=new c.Buf8(Ae.wsize)),te>=Ae.wsize?(c.arraySet(Ae.window,ae,L-Ae.wsize,Ae.wsize,0),Ae.wnext=0,Ae.whave=Ae.wsize):(te<(le=Ae.wsize-Ae.wnext)&&(le=te),c.arraySet(Ae.window,ae,L-te,le,Ae.wnext),(te-=le)?(c.arraySet(Ae.window,ae,L-te,te,0),Ae.wnext=te,Ae.whave=Ae.wsize):(Ae.wnext+=le,Ae.wnext===Ae.wsize&&(Ae.wnext=0),Ae.whave<Ae.wsize&&(Ae.whave+=le))),0}s.inflateReset=O,s.inflateReset2=I,s.inflateResetKeep=M,s.inflateInit=function(X){return Y(X,15)},s.inflateInit2=Y,s.inflate=function(X,ae){var L,te,le,Ae,ne,oe,ie,j,K,ve,xe,Re,Fe,pt,lt,ut,Rt,je,St,he,k,ce,ue,U,G=0,Z=new c.Buf8(4),be=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!X||!X.state||!X.output||!X.input&&X.avail_in!==0)return S;(L=X.state).mode===12&&(L.mode=13),ne=X.next_out,le=X.output,ie=X.avail_out,Ae=X.next_in,te=X.input,oe=X.avail_in,j=L.hold,K=L.bits,ve=oe,xe=ie,ce=x;e:for(;;)switch(L.mode){case w:if(L.wrap===0){L.mode=13;break}for(;K<16;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if(2&L.wrap&&j===35615){Z[L.check=0]=255&j,Z[1]=j>>>8&255,L.check=h(L.check,Z,2,0),K=j=0,L.mode=2;break}if(L.flags=0,L.head&&(L.head.done=!1),!(1&L.wrap)||(((255&j)<<8)+(j>>8))%31){X.msg="incorrect header check",L.mode=30;break}if((15&j)!=8){X.msg="unknown compression method",L.mode=30;break}if(K-=4,k=8+(15&(j>>>=4)),L.wbits===0)L.wbits=k;else if(k>L.wbits){X.msg="invalid window size",L.mode=30;break}L.dmax=1<<k,X.adler=L.check=1,L.mode=512&j?10:12,K=j=0;break;case 2:for(;K<16;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if(L.flags=j,(255&L.flags)!=8){X.msg="unknown compression method",L.mode=30;break}if(57344&L.flags){X.msg="unknown header flags set",L.mode=30;break}L.head&&(L.head.text=j>>8&1),512&L.flags&&(Z[0]=255&j,Z[1]=j>>>8&255,L.check=h(L.check,Z,2,0)),K=j=0,L.mode=3;case 3:for(;K<32;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}L.head&&(L.head.time=j),512&L.flags&&(Z[0]=255&j,Z[1]=j>>>8&255,Z[2]=j>>>16&255,Z[3]=j>>>24&255,L.check=h(L.check,Z,4,0)),K=j=0,L.mode=4;case 4:for(;K<16;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}L.head&&(L.head.xflags=255&j,L.head.os=j>>8),512&L.flags&&(Z[0]=255&j,Z[1]=j>>>8&255,L.check=h(L.check,Z,2,0)),K=j=0,L.mode=5;case 5:if(1024&L.flags){for(;K<16;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}L.length=j,L.head&&(L.head.extra_len=j),512&L.flags&&(Z[0]=255&j,Z[1]=j>>>8&255,L.check=h(L.check,Z,2,0)),K=j=0}else L.head&&(L.head.extra=null);L.mode=6;case 6:if(1024&L.flags&&(oe<(Re=L.length)&&(Re=oe),Re&&(L.head&&(k=L.head.extra_len-L.length,L.head.extra||(L.head.extra=new Array(L.head.extra_len)),c.arraySet(L.head.extra,te,Ae,Re,k)),512&L.flags&&(L.check=h(L.check,te,Re,Ae)),oe-=Re,Ae+=Re,L.length-=Re),L.length))break e;L.length=0,L.mode=7;case 7:if(2048&L.flags){if(oe===0)break e;for(Re=0;k=te[Ae+Re++],L.head&&k&&L.length<65536&&(L.head.name+=String.fromCharCode(k)),k&&Re<oe;);if(512&L.flags&&(L.check=h(L.check,te,Re,Ae)),oe-=Re,Ae+=Re,k)break e}else L.head&&(L.head.name=null);L.length=0,L.mode=8;case 8:if(4096&L.flags){if(oe===0)break e;for(Re=0;k=te[Ae+Re++],L.head&&k&&L.length<65536&&(L.head.comment+=String.fromCharCode(k)),k&&Re<oe;);if(512&L.flags&&(L.check=h(L.check,te,Re,Ae)),oe-=Re,Ae+=Re,k)break e}else L.head&&(L.head.comment=null);L.mode=9;case 9:if(512&L.flags){for(;K<16;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if(j!==(65535&L.check)){X.msg="header crc mismatch",L.mode=30;break}K=j=0}L.head&&(L.head.hcrc=L.flags>>9&1,L.head.done=!0),X.adler=L.check=0,L.mode=12;break;case 10:for(;K<32;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}X.adler=L.check=D(j),K=j=0,L.mode=11;case 11:if(L.havedict===0)return X.next_out=ne,X.avail_out=ie,X.next_in=Ae,X.avail_in=oe,L.hold=j,L.bits=K,2;X.adler=L.check=1,L.mode=12;case 12:if(ae===5||ae===6)break e;case 13:if(L.last){j>>>=7&K,K-=7&K,L.mode=27;break}for(;K<3;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}switch(L.last=1&j,K-=1,3&(j>>>=1)){case 0:L.mode=14;break;case 1:if(V(L),L.mode=20,ae!==6)break;j>>>=2,K-=2;break e;case 2:L.mode=17;break;case 3:X.msg="invalid block type",L.mode=30}j>>>=2,K-=2;break;case 14:for(j>>>=7&K,K-=7&K;K<32;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if((65535&j)!=(j>>>16^65535)){X.msg="invalid stored block lengths",L.mode=30;break}if(L.length=65535&j,K=j=0,L.mode=15,ae===6)break e;case 15:L.mode=16;case 16:if(Re=L.length){if(oe<Re&&(Re=oe),ie<Re&&(Re=ie),Re===0)break e;c.arraySet(le,te,Ae,Re,ne),oe-=Re,Ae+=Re,ie-=Re,ne+=Re,L.length-=Re;break}L.mode=12;break;case 17:for(;K<14;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if(L.nlen=257+(31&j),j>>>=5,K-=5,L.ndist=1+(31&j),j>>>=5,K-=5,L.ncode=4+(15&j),j>>>=4,K-=4,286<L.nlen||30<L.ndist){X.msg="too many length or distance symbols",L.mode=30;break}L.have=0,L.mode=18;case 18:for(;L.have<L.ncode;){for(;K<3;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}L.lens[be[L.have++]]=7&j,j>>>=3,K-=3}for(;L.have<19;)L.lens[be[L.have++]]=0;if(L.lencode=L.lendyn,L.lenbits=7,ue={bits:L.lenbits},ce=u(0,L.lens,0,19,L.lencode,0,L.work,ue),L.lenbits=ue.bits,ce){X.msg="invalid code lengths set",L.mode=30;break}L.have=0,L.mode=19;case 19:for(;L.have<L.nlen+L.ndist;){for(;ut=(G=L.lencode[j&(1<<L.lenbits)-1])>>>16&255,Rt=65535&G,!((lt=G>>>24)<=K);){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if(Rt<16)j>>>=lt,K-=lt,L.lens[L.have++]=Rt;else{if(Rt===16){for(U=lt+2;K<U;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if(j>>>=lt,K-=lt,L.have===0){X.msg="invalid bit length repeat",L.mode=30;break}k=L.lens[L.have-1],Re=3+(3&j),j>>>=2,K-=2}else if(Rt===17){for(U=lt+3;K<U;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}K-=lt,k=0,Re=3+(7&(j>>>=lt)),j>>>=3,K-=3}else{for(U=lt+7;K<U;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}K-=lt,k=0,Re=11+(127&(j>>>=lt)),j>>>=7,K-=7}if(L.have+Re>L.nlen+L.ndist){X.msg="invalid bit length repeat",L.mode=30;break}for(;Re--;)L.lens[L.have++]=k}}if(L.mode===30)break;if(L.lens[256]===0){X.msg="invalid code -- missing end-of-block",L.mode=30;break}if(L.lenbits=9,ue={bits:L.lenbits},ce=u(A,L.lens,0,L.nlen,L.lencode,0,L.work,ue),L.lenbits=ue.bits,ce){X.msg="invalid literal/lengths set",L.mode=30;break}if(L.distbits=6,L.distcode=L.distdyn,ue={bits:L.distbits},ce=u(y,L.lens,L.nlen,L.ndist,L.distcode,0,L.work,ue),L.distbits=ue.bits,ce){X.msg="invalid distances set",L.mode=30;break}if(L.mode=20,ae===6)break e;case 20:L.mode=21;case 21:if(6<=oe&&258<=ie){X.next_out=ne,X.avail_out=ie,X.next_in=Ae,X.avail_in=oe,L.hold=j,L.bits=K,p(X,xe),ne=X.next_out,le=X.output,ie=X.avail_out,Ae=X.next_in,te=X.input,oe=X.avail_in,j=L.hold,K=L.bits,L.mode===12&&(L.back=-1);break}for(L.back=0;ut=(G=L.lencode[j&(1<<L.lenbits)-1])>>>16&255,Rt=65535&G,!((lt=G>>>24)<=K);){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if(ut&&(240&ut)==0){for(je=lt,St=ut,he=Rt;ut=(G=L.lencode[he+((j&(1<<je+St)-1)>>je)])>>>16&255,Rt=65535&G,!(je+(lt=G>>>24)<=K);){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}j>>>=je,K-=je,L.back+=je}if(j>>>=lt,K-=lt,L.back+=lt,L.length=Rt,ut===0){L.mode=26;break}if(32&ut){L.back=-1,L.mode=12;break}if(64&ut){X.msg="invalid literal/length code",L.mode=30;break}L.extra=15&ut,L.mode=22;case 22:if(L.extra){for(U=L.extra;K<U;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}L.length+=j&(1<<L.extra)-1,j>>>=L.extra,K-=L.extra,L.back+=L.extra}L.was=L.length,L.mode=23;case 23:for(;ut=(G=L.distcode[j&(1<<L.distbits)-1])>>>16&255,Rt=65535&G,!((lt=G>>>24)<=K);){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if((240&ut)==0){for(je=lt,St=ut,he=Rt;ut=(G=L.distcode[he+((j&(1<<je+St)-1)>>je)])>>>16&255,Rt=65535&G,!(je+(lt=G>>>24)<=K);){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}j>>>=je,K-=je,L.back+=je}if(j>>>=lt,K-=lt,L.back+=lt,64&ut){X.msg="invalid distance code",L.mode=30;break}L.offset=Rt,L.extra=15&ut,L.mode=24;case 24:if(L.extra){for(U=L.extra;K<U;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}L.offset+=j&(1<<L.extra)-1,j>>>=L.extra,K-=L.extra,L.back+=L.extra}if(L.offset>L.dmax){X.msg="invalid distance too far back",L.mode=30;break}L.mode=25;case 25:if(ie===0)break e;if(Re=xe-ie,L.offset>Re){if((Re=L.offset-Re)>L.whave&&L.sane){X.msg="invalid distance too far back",L.mode=30;break}Fe=Re>L.wnext?(Re-=L.wnext,L.wsize-Re):L.wnext-Re,Re>L.length&&(Re=L.length),pt=L.window}else pt=le,Fe=ne-L.offset,Re=L.length;for(ie<Re&&(Re=ie),ie-=Re,L.length-=Re;le[ne++]=pt[Fe++],--Re;);L.length===0&&(L.mode=21);break;case 26:if(ie===0)break e;le[ne++]=L.length,ie--,L.mode=21;break;case 27:if(L.wrap){for(;K<32;){if(oe===0)break e;oe--,j|=te[Ae++]<<K,K+=8}if(xe-=ie,X.total_out+=xe,L.total+=xe,xe&&(X.adler=L.check=L.flags?h(L.check,le,xe,ne-xe):d(L.check,le,xe,ne-xe)),xe=ie,(L.flags?j:D(j))!==L.check){X.msg="incorrect data check",L.mode=30;break}K=j=0}L.mode=28;case 28:if(L.wrap&&L.flags){for(;K<32;){if(oe===0)break e;oe--,j+=te[Ae++]<<K,K+=8}if(j!==(4294967295&L.total)){X.msg="incorrect length check",L.mode=30;break}K=j=0}L.mode=29;case 29:ce=1;break e;case 30:ce=-3;break e;case 31:return-4;case 32:default:return S}return X.next_out=ne,X.avail_out=ie,X.next_in=Ae,X.avail_in=oe,L.hold=j,L.bits=K,(L.wsize||xe!==X.avail_out&&L.mode<30&&(L.mode<27||ae!==4))&&ge(X,X.output,X.next_out,xe-X.avail_out)?(L.mode=31,-4):(ve-=X.avail_in,xe-=X.avail_out,X.total_in+=ve,X.total_out+=xe,L.total+=xe,L.wrap&&xe&&(X.adler=L.check=L.flags?h(L.check,le,xe,X.next_out-xe):d(L.check,le,xe,X.next_out-xe)),X.data_type=L.bits+(L.last?64:0)+(L.mode===12?128:0)+(L.mode===20||L.mode===15?256:0),(ve==0&&xe===0||ae===4)&&ce===x&&(ce=-5),ce)},s.inflateEnd=function(X){if(!X||!X.state)return S;var ae=X.state;return ae.window&&(ae.window=null),X.state=null,x},s.inflateGetHeader=function(X,ae){var L;return X&&X.state?(2&(L=X.state).wrap)==0?S:((L.head=ae).done=!1,x):S},s.inflateSetDictionary=function(X,ae){var L,te=ae.length;return X&&X.state?(L=X.state).wrap!==0&&L.mode!==11?S:L.mode===11&&d(1,ae,te,0)!==L.check?-3:ge(X,ae,te,te)?(L.mode=31,-4):(L.havedict=1,x):S},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,i,s){var c=n("../utils/common"),d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],p=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];i.exports=function(A,y,x,S,w,T,R,D){var N,M,O,I,Y,J,q,W,V,ge=D.bits,X=0,ae=0,L=0,te=0,le=0,Ae=0,ne=0,oe=0,ie=0,j=0,K=null,ve=0,xe=new c.Buf16(16),Re=new c.Buf16(16),Fe=null,pt=0;for(X=0;X<=15;X++)xe[X]=0;for(ae=0;ae<S;ae++)xe[y[x+ae]]++;for(le=ge,te=15;1<=te&&xe[te]===0;te--);if(te<le&&(le=te),te===0)return w[T++]=20971520,w[T++]=20971520,D.bits=1,0;for(L=1;L<te&&xe[L]===0;L++);for(le<L&&(le=L),X=oe=1;X<=15;X++)if(oe<<=1,(oe-=xe[X])<0)return-1;if(0<oe&&(A===0||te!==1))return-1;for(Re[1]=0,X=1;X<15;X++)Re[X+1]=Re[X]+xe[X];for(ae=0;ae<S;ae++)y[x+ae]!==0&&(R[Re[y[x+ae]]++]=ae);if(J=A===0?(K=Fe=R,19):A===1?(K=d,ve-=257,Fe=h,pt-=257,256):(K=p,Fe=u,-1),X=L,Y=T,ne=ae=j=0,O=-1,I=(ie=1<<(Ae=le))-1,A===1&&852<ie||A===2&&592<ie)return 1;for(;;){for(q=X-ne,V=R[ae]<J?(W=0,R[ae]):R[ae]>J?(W=Fe[pt+R[ae]],K[ve+R[ae]]):(W=96,0),N=1<<X-ne,L=M=1<<Ae;w[Y+(j>>ne)+(M-=N)]=q<<24|W<<16|V|0,M!==0;);for(N=1<<X-1;j&N;)N>>=1;if(N!==0?(j&=N-1,j+=N):j=0,ae++,--xe[X]==0){if(X===te)break;X=y[x+R[ae]]}if(le<X&&(j&I)!==O){for(ne===0&&(ne=le),Y+=L,oe=1<<(Ae=X-ne);Ae+ne<te&&!((oe-=xe[Ae+ne])<=0);)Ae++,oe<<=1;if(ie+=1<<Ae,A===1&&852<ie||A===2&&592<ie)return 1;w[O=j&I]=le<<24|Ae<<16|Y-T|0}}return j!==0&&(w[Y+j]=X-ne<<24|64<<16|0),D.bits=le,0}},{"../utils/common":41}],51:[function(n,i,s){i.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,i,s){var c=n("../utils/common"),d=0,h=1;function p(G){for(var Z=G.length;0<=--Z;)G[Z]=0}var u=0,A=29,y=256,x=y+1+A,S=30,w=19,T=2*x+1,R=15,D=16,N=7,M=256,O=16,I=17,Y=18,J=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ge=new Array(2*(x+2));p(ge);var X=new Array(2*S);p(X);var ae=new Array(512);p(ae);var L=new Array(256);p(L);var te=new Array(A);p(te);var le,Ae,ne,oe=new Array(S);function ie(G,Z,be,_e,me){this.static_tree=G,this.extra_bits=Z,this.extra_base=be,this.elems=_e,this.max_length=me,this.has_stree=G&&G.length}function j(G,Z){this.dyn_tree=G,this.max_code=0,this.stat_desc=Z}function K(G){return G<256?ae[G]:ae[256+(G>>>7)]}function ve(G,Z){G.pending_buf[G.pending++]=255&Z,G.pending_buf[G.pending++]=Z>>>8&255}function xe(G,Z,be){G.bi_valid>D-be?(G.bi_buf|=Z<<G.bi_valid&65535,ve(G,G.bi_buf),G.bi_buf=Z>>D-G.bi_valid,G.bi_valid+=be-D):(G.bi_buf|=Z<<G.bi_valid&65535,G.bi_valid+=be)}function Re(G,Z,be){xe(G,be[2*Z],be[2*Z+1])}function Fe(G,Z){for(var be=0;be|=1&G,G>>>=1,be<<=1,0<--Z;);return be>>>1}function pt(G,Z,be){var _e,me,ze=new Array(R+1),Qe=0;for(_e=1;_e<=R;_e++)ze[_e]=Qe=Qe+be[_e-1]<<1;for(me=0;me<=Z;me++){var Oe=G[2*me+1];Oe!==0&&(G[2*me]=Fe(ze[Oe]++,Oe))}}function lt(G){var Z;for(Z=0;Z<x;Z++)G.dyn_ltree[2*Z]=0;for(Z=0;Z<S;Z++)G.dyn_dtree[2*Z]=0;for(Z=0;Z<w;Z++)G.bl_tree[2*Z]=0;G.dyn_ltree[2*M]=1,G.opt_len=G.static_len=0,G.last_lit=G.matches=0}function ut(G){8<G.bi_valid?ve(G,G.bi_buf):0<G.bi_valid&&(G.pending_buf[G.pending++]=G.bi_buf),G.bi_buf=0,G.bi_valid=0}function Rt(G,Z,be,_e){var me=2*Z,ze=2*be;return G[me]<G[ze]||G[me]===G[ze]&&_e[Z]<=_e[be]}function je(G,Z,be){for(var _e=G.heap[be],me=be<<1;me<=G.heap_len&&(me<G.heap_len&&Rt(Z,G.heap[me+1],G.heap[me],G.depth)&&me++,!Rt(Z,_e,G.heap[me],G.depth));)G.heap[be]=G.heap[me],be=me,me<<=1;G.heap[be]=_e}function St(G,Z,be){var _e,me,ze,Qe,Oe=0;if(G.last_lit!==0)for(;_e=G.pending_buf[G.d_buf+2*Oe]<<8|G.pending_buf[G.d_buf+2*Oe+1],me=G.pending_buf[G.l_buf+Oe],Oe++,_e===0?Re(G,me,Z):(Re(G,(ze=L[me])+y+1,Z),(Qe=J[ze])!==0&&xe(G,me-=te[ze],Qe),Re(G,ze=K(--_e),be),(Qe=q[ze])!==0&&xe(G,_e-=oe[ze],Qe)),Oe<G.last_lit;);Re(G,M,Z)}function he(G,Z){var be,_e,me,ze=Z.dyn_tree,Qe=Z.stat_desc.static_tree,Oe=Z.stat_desc.has_stree,dt=Z.stat_desc.elems,Jt=-1;for(G.heap_len=0,G.heap_max=T,be=0;be<dt;be++)ze[2*be]!==0?(G.heap[++G.heap_len]=Jt=be,G.depth[be]=0):ze[2*be+1]=0;for(;G.heap_len<2;)ze[2*(me=G.heap[++G.heap_len]=Jt<2?++Jt:0)]=1,G.depth[me]=0,G.opt_len--,Oe&&(G.static_len-=Qe[2*me+1]);for(Z.max_code=Jt,be=G.heap_len>>1;1<=be;be--)je(G,ze,be);for(me=dt;be=G.heap[1],G.heap[1]=G.heap[G.heap_len--],je(G,ze,1),_e=G.heap[1],G.heap[--G.heap_max]=be,G.heap[--G.heap_max]=_e,ze[2*me]=ze[2*be]+ze[2*_e],G.depth[me]=(G.depth[be]>=G.depth[_e]?G.depth[be]:G.depth[_e])+1,ze[2*be+1]=ze[2*_e+1]=me,G.heap[1]=me++,je(G,ze,1),2<=G.heap_len;);G.heap[--G.heap_max]=G.heap[1],(function(zt,pr){var qe,ht,Nt,et,pn,Wn,it=pr.dyn_tree,st=pr.max_code,En=pr.stat_desc.static_tree,un=pr.stat_desc.has_stree,Ut=pr.stat_desc.extra_bits,Ra=pr.stat_desc.extra_base,Da=pr.stat_desc.max_length,As=0;for(et=0;et<=R;et++)zt.bl_count[et]=0;for(it[2*zt.heap[zt.heap_max]+1]=0,qe=zt.heap_max+1;qe<T;qe++)Da<(et=it[2*it[2*(ht=zt.heap[qe])+1]+1]+1)&&(et=Da,As++),it[2*ht+1]=et,st<ht||(zt.bl_count[et]++,pn=0,Ra<=ht&&(pn=Ut[ht-Ra]),Wn=it[2*ht],zt.opt_len+=Wn*(et+pn),un&&(zt.static_len+=Wn*(En[2*ht+1]+pn)));if(As!==0){do{for(et=Da-1;zt.bl_count[et]===0;)et--;zt.bl_count[et]--,zt.bl_count[et+1]+=2,zt.bl_count[Da]--,As-=2}while(0<As);for(et=Da;et!==0;et--)for(ht=zt.bl_count[et];ht!==0;)st<(Nt=zt.heap[--qe])||(it[2*Nt+1]!==et&&(zt.opt_len+=(et-it[2*Nt+1])*it[2*Nt],it[2*Nt+1]=et),ht--)}})(G,Z),pt(ze,Jt,G.bl_count)}function k(G,Z,be){var _e,me,ze=-1,Qe=Z[1],Oe=0,dt=7,Jt=4;for(Qe===0&&(dt=138,Jt=3),Z[2*(be+1)+1]=65535,_e=0;_e<=be;_e++)me=Qe,Qe=Z[2*(_e+1)+1],++Oe<dt&&me===Qe||(Oe<Jt?G.bl_tree[2*me]+=Oe:me!==0?(me!==ze&&G.bl_tree[2*me]++,G.bl_tree[2*O]++):Oe<=10?G.bl_tree[2*I]++:G.bl_tree[2*Y]++,ze=me,Jt=(Oe=0)===Qe?(dt=138,3):me===Qe?(dt=6,3):(dt=7,4))}function ce(G,Z,be){var _e,me,ze=-1,Qe=Z[1],Oe=0,dt=7,Jt=4;for(Qe===0&&(dt=138,Jt=3),_e=0;_e<=be;_e++)if(me=Qe,Qe=Z[2*(_e+1)+1],!(++Oe<dt&&me===Qe)){if(Oe<Jt)for(;Re(G,me,G.bl_tree),--Oe!=0;);else me!==0?(me!==ze&&(Re(G,me,G.bl_tree),Oe--),Re(G,O,G.bl_tree),xe(G,Oe-3,2)):Oe<=10?(Re(G,I,G.bl_tree),xe(G,Oe-3,3)):(Re(G,Y,G.bl_tree),xe(G,Oe-11,7));ze=me,Jt=(Oe=0)===Qe?(dt=138,3):me===Qe?(dt=6,3):(dt=7,4)}}p(oe);var ue=!1;function U(G,Z,be,_e){xe(G,(u<<1)+(_e?1:0),3),(function(me,ze,Qe,Oe){ut(me),ve(me,Qe),ve(me,~Qe),c.arraySet(me.pending_buf,me.window,ze,Qe,me.pending),me.pending+=Qe})(G,Z,be)}s._tr_init=function(G){ue||((function(){var Z,be,_e,me,ze,Qe=new Array(R+1);for(me=_e=0;me<A-1;me++)for(te[me]=_e,Z=0;Z<1<<J[me];Z++)L[_e++]=me;for(L[_e-1]=me,me=ze=0;me<16;me++)for(oe[me]=ze,Z=0;Z<1<<q[me];Z++)ae[ze++]=me;for(ze>>=7;me<S;me++)for(oe[me]=ze<<7,Z=0;Z<1<<q[me]-7;Z++)ae[256+ze++]=me;for(be=0;be<=R;be++)Qe[be]=0;for(Z=0;Z<=143;)ge[2*Z+1]=8,Z++,Qe[8]++;for(;Z<=255;)ge[2*Z+1]=9,Z++,Qe[9]++;for(;Z<=279;)ge[2*Z+1]=7,Z++,Qe[7]++;for(;Z<=287;)ge[2*Z+1]=8,Z++,Qe[8]++;for(pt(ge,x+1,Qe),Z=0;Z<S;Z++)X[2*Z+1]=5,X[2*Z]=Fe(Z,5);le=new ie(ge,J,y+1,x,R),Ae=new ie(X,q,0,S,R),ne=new ie(new Array(0),W,0,w,N)})(),ue=!0),G.l_desc=new j(G.dyn_ltree,le),G.d_desc=new j(G.dyn_dtree,Ae),G.bl_desc=new j(G.bl_tree,ne),G.bi_buf=0,G.bi_valid=0,lt(G)},s._tr_stored_block=U,s._tr_flush_block=function(G,Z,be,_e){var me,ze,Qe=0;0<G.level?(G.strm.data_type===2&&(G.strm.data_type=(function(Oe){var dt,Jt=4093624447;for(dt=0;dt<=31;dt++,Jt>>>=1)if(1&Jt&&Oe.dyn_ltree[2*dt]!==0)return d;if(Oe.dyn_ltree[18]!==0||Oe.dyn_ltree[20]!==0||Oe.dyn_ltree[26]!==0)return h;for(dt=32;dt<y;dt++)if(Oe.dyn_ltree[2*dt]!==0)return h;return d})(G)),he(G,G.l_desc),he(G,G.d_desc),Qe=(function(Oe){var dt;for(k(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),k(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),he(Oe,Oe.bl_desc),dt=w-1;3<=dt&&Oe.bl_tree[2*V[dt]+1]===0;dt--);return Oe.opt_len+=3*(dt+1)+5+5+4,dt})(G),me=G.opt_len+3+7>>>3,(ze=G.static_len+3+7>>>3)<=me&&(me=ze)):me=ze=be+5,be+4<=me&&Z!==-1?U(G,Z,be,_e):G.strategy===4||ze===me?(xe(G,2+(_e?1:0),3),St(G,ge,X)):(xe(G,4+(_e?1:0),3),(function(Oe,dt,Jt,zt){var pr;for(xe(Oe,dt-257,5),xe(Oe,Jt-1,5),xe(Oe,zt-4,4),pr=0;pr<zt;pr++)xe(Oe,Oe.bl_tree[2*V[pr]+1],3);ce(Oe,Oe.dyn_ltree,dt-1),ce(Oe,Oe.dyn_dtree,Jt-1)})(G,G.l_desc.max_code+1,G.d_desc.max_code+1,Qe+1),St(G,G.dyn_ltree,G.dyn_dtree)),lt(G),_e&&ut(G)},s._tr_tally=function(G,Z,be){return G.pending_buf[G.d_buf+2*G.last_lit]=Z>>>8&255,G.pending_buf[G.d_buf+2*G.last_lit+1]=255&Z,G.pending_buf[G.l_buf+G.last_lit]=255&be,G.last_lit++,Z===0?G.dyn_ltree[2*be]++:(G.matches++,Z--,G.dyn_ltree[2*(L[be]+y+1)]++,G.dyn_dtree[2*K(Z)]++),G.last_lit===G.lit_bufsize-1},s._tr_align=function(G){xe(G,2,3),Re(G,M,ge),(function(Z){Z.bi_valid===16?(ve(Z,Z.bi_buf),Z.bi_buf=0,Z.bi_valid=0):8<=Z.bi_valid&&(Z.pending_buf[Z.pending++]=255&Z.bi_buf,Z.bi_buf>>=8,Z.bi_valid-=8)})(G)}},{"../utils/common":41}],53:[function(n,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,i,s){(function(c){(function(d,h){if(!d.setImmediate){var p,u,A,y,x=1,S={},w=!1,T=d.document,R=Object.getPrototypeOf&&Object.getPrototypeOf(d);R=R&&R.setTimeout?R:d,p={}.toString.call(d.process)==="[object process]"?function(O){process.nextTick(function(){N(O)})}:(function(){if(d.postMessage&&!d.importScripts){var O=!0,I=d.onmessage;return d.onmessage=function(){O=!1},d.postMessage("","*"),d.onmessage=I,O}})()?(y="setImmediate$"+Math.random()+"$",d.addEventListener?d.addEventListener("message",M,!1):d.attachEvent("onmessage",M),function(O){d.postMessage(y+O,"*")}):d.MessageChannel?((A=new MessageChannel).port1.onmessage=function(O){N(O.data)},function(O){A.port2.postMessage(O)}):T&&"onreadystatechange"in T.createElement("script")?(u=T.documentElement,function(O){var I=T.createElement("script");I.onreadystatechange=function(){N(O),I.onreadystatechange=null,u.removeChild(I),I=null},u.appendChild(I)}):function(O){setTimeout(N,0,O)},R.setImmediate=function(O){typeof O!="function"&&(O=new Function(""+O));for(var I=new Array(arguments.length-1),Y=0;Y<I.length;Y++)I[Y]=arguments[Y+1];var J={callback:O,args:I};return S[x]=J,p(x),x++},R.clearImmediate=D}function D(O){delete S[O]}function N(O){if(w)setTimeout(N,0,O);else{var I=S[O];if(I){w=!0;try{(function(Y){var J=Y.callback,q=Y.args;switch(q.length){case 0:J();break;case 1:J(q[0]);break;case 2:J(q[0],q[1]);break;case 3:J(q[0],q[1],q[2]);break;default:J.apply(h,q)}})(I)}finally{D(O),w=!1}}}}function M(O){O.source===d&&typeof O.data=="string"&&O.data.indexOf(y)===0&&N(+O.data.slice(y.length))}})(typeof self>"u"?c===void 0?this:c:self)}).call(this,typeof Pp<"u"?Pp:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Km)),Km.exports}var yS=vS();const Wg=fA(yS);function Wa(t,e,n,i){function s(c){return c instanceof n?c:new n(function(d){d(c)})}return new(n||(n=Promise))(function(c,d){function h(A){try{u(i.next(A))}catch(y){d(y)}}function p(A){try{u(i.throw(A))}catch(y){d(y)}}function u(A){A.done?c(A.value):s(A.value).then(h,p)}u((i=i.apply(t,[])).next())})}const Lt=914400,Nf=12700,wr=`\r
39
+ */var Zy;function vS(){return Zy||(Zy=1,(function(t,e){(function(n){t.exports=n()})(function(){return(function n(i,s,c){function d(u,A){if(!s[u]){if(!i[u]){var y=typeof Bp=="function"&&Bp;if(!A&&y)return y(u,!0);if(h)return h(u,!0);var x=new Error("Cannot find module '"+u+"'");throw x.code="MODULE_NOT_FOUND",x}var S=s[u]={exports:{}};i[u][0].call(S.exports,function(w){var T=i[u][1][w];return d(T||w)},S,S.exports,n,i,s,c)}return s[u].exports}for(var h=typeof Bp=="function"&&Bp,p=0;p<c.length;p++)d(c[p]);return d})({1:[function(n,i,s){var c=n("./utils"),d=n("./support"),h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(p){for(var u,A,y,x,S,w,T,R=[],D=0,N=p.length,M=N,O=c.getTypeOf(p)!=="string";D<p.length;)M=N-D,y=O?(u=p[D++],A=D<N?p[D++]:0,D<N?p[D++]:0):(u=p.charCodeAt(D++),A=D<N?p.charCodeAt(D++):0,D<N?p.charCodeAt(D++):0),x=u>>2,S=(3&u)<<4|A>>4,w=1<M?(15&A)<<2|y>>6:64,T=2<M?63&y:64,R.push(h.charAt(x)+h.charAt(S)+h.charAt(w)+h.charAt(T));return R.join("")},s.decode=function(p){var u,A,y,x,S,w,T=0,R=0,D="data:";if(p.substr(0,D.length)===D)throw new Error("Invalid base64 input, it looks like a data url.");var N,M=3*(p=p.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(p.charAt(p.length-1)===h.charAt(64)&&M--,p.charAt(p.length-2)===h.charAt(64)&&M--,M%1!=0)throw new Error("Invalid base64 input, bad content length.");for(N=d.uint8array?new Uint8Array(0|M):new Array(0|M);T<p.length;)u=h.indexOf(p.charAt(T++))<<2|(x=h.indexOf(p.charAt(T++)))>>4,A=(15&x)<<4|(S=h.indexOf(p.charAt(T++)))>>2,y=(3&S)<<6|(w=h.indexOf(p.charAt(T++))),N[R++]=u,S!==64&&(N[R++]=A),w!==64&&(N[R++]=y);return N}},{"./support":30,"./utils":32}],2:[function(n,i,s){var c=n("./external"),d=n("./stream/DataWorker"),h=n("./stream/Crc32Probe"),p=n("./stream/DataLengthProbe");function u(A,y,x,S,w){this.compressedSize=A,this.uncompressedSize=y,this.crc32=x,this.compression=S,this.compressedContent=w}u.prototype={getContentWorker:function(){var A=new d(c.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new p("data_length")),y=this;return A.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),A},getCompressedWorker:function(){return new d(c.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(A,y,x){return A.pipe(new h).pipe(new p("uncompressedSize")).pipe(y.compressWorker(x)).pipe(new p("compressedSize")).withStreamInfo("compression",y)},i.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,i,s){var c=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new c("STORE compression")},uncompressWorker:function(){return new c("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,i,s){var c=n("./utils"),d=(function(){for(var h,p=[],u=0;u<256;u++){h=u;for(var A=0;A<8;A++)h=1&h?3988292384^h>>>1:h>>>1;p[u]=h}return p})();i.exports=function(h,p){return h!==void 0&&h.length?c.getTypeOf(h)!=="string"?(function(u,A,y,x){var S=d,w=x+y;u^=-1;for(var T=x;T<w;T++)u=u>>>8^S[255&(u^A[T])];return-1^u})(0|p,h,h.length,0):(function(u,A,y,x){var S=d,w=x+y;u^=-1;for(var T=x;T<w;T++)u=u>>>8^S[255&(u^A.charCodeAt(T))];return-1^u})(0|p,h,h.length,0):0}},{"./utils":32}],5:[function(n,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,i,s){var c=null;c=typeof Promise<"u"?Promise:n("lie"),i.exports={Promise:c}},{lie:37}],7:[function(n,i,s){var c=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",d=n("pako"),h=n("./utils"),p=n("./stream/GenericWorker"),u=c?"uint8array":"array";function A(y,x){p.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=x,this.meta={}}s.magic="\b\0",h.inherits(A,p),A.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(h.transformTo(u,y.data),!1)},A.prototype.flush=function(){p.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},A.prototype.cleanUp=function(){p.prototype.cleanUp.call(this),this._pako=null},A.prototype._createPako=function(){this._pako=new d[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(x){y.push({data:x,meta:y.meta})}},s.compressWorker=function(y){return new A("Deflate",y)},s.uncompressWorker=function(){return new A("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,i,s){function c(S,w){var T,R="";for(T=0;T<w;T++)R+=String.fromCharCode(255&S),S>>>=8;return R}function d(S,w,T,R,D,N){var M,O,I=S.file,Y=S.compression,J=N!==u.utf8encode,q=h.transformTo("string",N(I.name)),W=h.transformTo("string",u.utf8encode(I.name)),V=I.comment,ge=h.transformTo("string",N(V)),X=h.transformTo("string",u.utf8encode(V)),ae=W.length!==I.name.length,L=X.length!==V.length,te="",le="",Ae="",ne=I.dir,se=I.date,ie={crc32:0,compressedSize:0,uncompressedSize:0};w&&!T||(ie.crc32=S.crc32,ie.compressedSize=S.compressedSize,ie.uncompressedSize=S.uncompressedSize);var j=0;w&&(j|=8),J||!ae&&!L||(j|=2048);var K=0,ve=0;ne&&(K|=16),D==="UNIX"?(ve=798,K|=(function(Re,Fe){var pt=Re;return Re||(pt=Fe?16893:33204),(65535&pt)<<16})(I.unixPermissions,ne)):(ve=20,K|=(function(Re){return 63&(Re||0)})(I.dosPermissions)),M=se.getUTCHours(),M<<=6,M|=se.getUTCMinutes(),M<<=5,M|=se.getUTCSeconds()/2,O=se.getUTCFullYear()-1980,O<<=4,O|=se.getUTCMonth()+1,O<<=5,O|=se.getUTCDate(),ae&&(le=c(1,1)+c(A(q),4)+W,te+="up"+c(le.length,2)+le),L&&(Ae=c(1,1)+c(A(ge),4)+X,te+="uc"+c(Ae.length,2)+Ae);var xe="";return xe+=`
40
+ \0`,xe+=c(j,2),xe+=Y.magic,xe+=c(M,2),xe+=c(O,2),xe+=c(ie.crc32,4),xe+=c(ie.compressedSize,4),xe+=c(ie.uncompressedSize,4),xe+=c(q.length,2),xe+=c(te.length,2),{fileRecord:y.LOCAL_FILE_HEADER+xe+q+te,dirRecord:y.CENTRAL_FILE_HEADER+c(ve,2)+xe+c(ge.length,2)+"\0\0\0\0"+c(K,4)+c(R,4)+q+te+ge}}var h=n("../utils"),p=n("../stream/GenericWorker"),u=n("../utf8"),A=n("../crc32"),y=n("../signature");function x(S,w,T,R){p.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=T,this.encodeFileName=R,this.streamFiles=S,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}h.inherits(x,p),x.prototype.push=function(S){var w=S.meta.percent||0,T=this.entriesCount,R=this._sources.length;this.accumulate?this.contentBuffer.push(S):(this.bytesWritten+=S.data.length,p.prototype.push.call(this,{data:S.data,meta:{currentFile:this.currentFile,percent:T?(w+100*(T-R-1))/T:100}}))},x.prototype.openedSource=function(S){this.currentSourceOffset=this.bytesWritten,this.currentFile=S.file.name;var w=this.streamFiles&&!S.file.dir;if(w){var T=d(S,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:T.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(S){this.accumulate=!1;var w=this.streamFiles&&!S.file.dir,T=d(S,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(T.dirRecord),w)this.push({data:(function(R){return y.DATA_DESCRIPTOR+c(R.crc32,4)+c(R.compressedSize,4)+c(R.uncompressedSize,4)})(S),meta:{percent:100}});else for(this.push({data:T.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var S=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var T=this.bytesWritten-S,R=(function(D,N,M,O,I){var Y=h.transformTo("string",I(O));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+c(D,2)+c(D,2)+c(N,4)+c(M,4)+c(Y.length,2)+Y})(this.dirRecords.length,T,S,this.zipComment,this.encodeFileName);this.push({data:R,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(S){this._sources.push(S);var w=this;return S.on("data",function(T){w.processChunk(T)}),S.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),S.on("error",function(T){w.error(T)}),this},x.prototype.resume=function(){return!!p.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(S){var w=this._sources;if(!p.prototype.error.call(this,S))return!1;for(var T=0;T<w.length;T++)try{w[T].error(S)}catch{}return!0},x.prototype.lock=function(){p.prototype.lock.call(this);for(var S=this._sources,w=0;w<S.length;w++)S[w].lock()},i.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,i,s){var c=n("../compressions"),d=n("./ZipFileWorker");s.generateWorker=function(h,p,u){var A=new d(p.streamFiles,u,p.platform,p.encodeFileName),y=0;try{h.forEach(function(x,S){y++;var w=(function(N,M){var O=N||M,I=c[O];if(!I)throw new Error(O+" is not a valid compression method !");return I})(S.options.compression,p.compression),T=S.options.compressionOptions||p.compressionOptions||{},R=S.dir,D=S.date;S._compressWorker(w,T).withStreamInfo("file",{name:x,dir:R,date:D,comment:S.comment||"",unixPermissions:S.unixPermissions,dosPermissions:S.dosPermissions}).pipe(A)}),A.entriesCount=y}catch(x){A.error(x)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,i,s){function c(){if(!(this instanceof c))return new c;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var d=new c;for(var h in this)typeof this[h]!="function"&&(d[h]=this[h]);return d}}(c.prototype=n("./object")).loadAsync=n("./load"),c.support=n("./support"),c.defaults=n("./defaults"),c.version="3.10.1",c.loadAsync=function(d,h){return new c().loadAsync(d,h)},c.external=n("./external"),i.exports=c},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,i,s){var c=n("./utils"),d=n("./external"),h=n("./utf8"),p=n("./zipEntries"),u=n("./stream/Crc32Probe"),A=n("./nodejsUtils");function y(x){return new d.Promise(function(S,w){var T=x.decompressed.getContentWorker().pipe(new u);T.on("error",function(R){w(R)}).on("end",function(){T.streamInfo.crc32!==x.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):S()}).resume()})}i.exports=function(x,S){var w=this;return S=c.extend(S||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:h.utf8decode}),A.isNode&&A.isStream(x)?d.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):c.prepareContent("the loaded zip file",x,!0,S.optimizedBinaryString,S.base64).then(function(T){var R=new p(S);return R.load(T),R}).then(function(T){var R=[d.Promise.resolve(T)],D=T.files;if(S.checkCRC32)for(var N=0;N<D.length;N++)R.push(y(D[N]));return d.Promise.all(R)}).then(function(T){for(var R=T.shift(),D=R.files,N=0;N<D.length;N++){var M=D[N],O=M.fileNameStr,I=c.resolve(M.fileNameStr);w.file(I,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:S.createFolders}),M.dir||(w.file(I).unsafeOriginalName=O)}return R.zipComment.length&&(w.comment=R.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,i,s){var c=n("../utils"),d=n("../stream/GenericWorker");function h(p,u){d.call(this,"Nodejs stream input adapter for "+p),this._upstreamEnded=!1,this._bindStream(u)}c.inherits(h,d),h.prototype._bindStream=function(p){var u=this;(this._stream=p).pause(),p.on("data",function(A){u.push({data:A,meta:{percent:0}})}).on("error",function(A){u.isPaused?this.generatedError=A:u.error(A)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},h.prototype.pause=function(){return!!d.prototype.pause.call(this)&&(this._stream.pause(),!0)},h.prototype.resume=function(){return!!d.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},i.exports=h},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,i,s){var c=n("readable-stream").Readable;function d(h,p,u){c.call(this,p),this._helper=h;var A=this;h.on("data",function(y,x){A.push(y)||A._helper.pause(),u&&u(x)}).on("error",function(y){A.emit("error",y)}).on("end",function(){A.push(null)})}n("../utils").inherits(d,c),d.prototype._read=function(){this._helper.resume()},i.exports=d},{"../utils":32,"readable-stream":16}],14:[function(n,i,s){i.exports={isNode:typeof Buffer<"u",newBufferFrom:function(c,d){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(c,d);if(typeof c=="number")throw new Error('The "data" argument must not be a number');return new Buffer(c,d)},allocBuffer:function(c){if(Buffer.alloc)return Buffer.alloc(c);var d=new Buffer(c);return d.fill(0),d},isBuffer:function(c){return Buffer.isBuffer(c)},isStream:function(c){return c&&typeof c.on=="function"&&typeof c.pause=="function"&&typeof c.resume=="function"}}},{}],15:[function(n,i,s){function c(I,Y,J){var q,W=h.getTypeOf(Y),V=h.extend(J||{},A);V.date=V.date||new Date,V.compression!==null&&(V.compression=V.compression.toUpperCase()),typeof V.unixPermissions=="string"&&(V.unixPermissions=parseInt(V.unixPermissions,8)),V.unixPermissions&&16384&V.unixPermissions&&(V.dir=!0),V.dosPermissions&&16&V.dosPermissions&&(V.dir=!0),V.dir&&(I=D(I)),V.createFolders&&(q=R(I))&&N.call(this,q,!0);var ge=W==="string"&&V.binary===!1&&V.base64===!1;J&&J.binary!==void 0||(V.binary=!ge),(Y instanceof y&&Y.uncompressedSize===0||V.dir||!Y||Y.length===0)&&(V.base64=!1,V.binary=!0,Y="",V.compression="STORE",W="string");var X=null;X=Y instanceof y||Y instanceof p?Y:w.isNode&&w.isStream(Y)?new T(I,Y):h.prepareContent(I,Y,V.binary,V.optimizedBinaryString,V.base64);var ae=new x(I,X,V);this.files[I]=ae}var d=n("./utf8"),h=n("./utils"),p=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),A=n("./defaults"),y=n("./compressedObject"),x=n("./zipObject"),S=n("./generate"),w=n("./nodejsUtils"),T=n("./nodejs/NodejsStreamInputAdapter"),R=function(I){I.slice(-1)==="/"&&(I=I.substring(0,I.length-1));var Y=I.lastIndexOf("/");return 0<Y?I.substring(0,Y):""},D=function(I){return I.slice(-1)!=="/"&&(I+="/"),I},N=function(I,Y){return Y=Y!==void 0?Y:A.createFolders,I=D(I),this.files[I]||c.call(this,I,null,{dir:!0,createFolders:Y}),this.files[I]};function M(I){return Object.prototype.toString.call(I)==="[object RegExp]"}var O={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(I){var Y,J,q;for(Y in this.files)q=this.files[Y],(J=Y.slice(this.root.length,Y.length))&&Y.slice(0,this.root.length)===this.root&&I(J,q)},filter:function(I){var Y=[];return this.forEach(function(J,q){I(J,q)&&Y.push(q)}),Y},file:function(I,Y,J){if(arguments.length!==1)return I=this.root+I,c.call(this,I,Y,J),this;if(M(I)){var q=I;return this.filter(function(V,ge){return!ge.dir&&q.test(V)})}var W=this.files[this.root+I];return W&&!W.dir?W:null},folder:function(I){if(!I)return this;if(M(I))return this.filter(function(W,V){return V.dir&&I.test(W)});var Y=this.root+I,J=N.call(this,Y),q=this.clone();return q.root=J.name,q},remove:function(I){I=this.root+I;var Y=this.files[I];if(Y||(I.slice(-1)!=="/"&&(I+="/"),Y=this.files[I]),Y&&!Y.dir)delete this.files[I];else for(var J=this.filter(function(W,V){return V.name.slice(0,I.length)===I}),q=0;q<J.length;q++)delete this.files[J[q].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(I){var Y,J={};try{if((J=h.extend(I||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:d.utf8encode})).type=J.type.toLowerCase(),J.compression=J.compression.toUpperCase(),J.type==="binarystring"&&(J.type="string"),!J.type)throw new Error("No output type specified.");h.checkSupport(J.type),J.platform!=="darwin"&&J.platform!=="freebsd"&&J.platform!=="linux"&&J.platform!=="sunos"||(J.platform="UNIX"),J.platform==="win32"&&(J.platform="DOS");var q=J.comment||this.comment||"";Y=S.generateWorker(this,J,q)}catch(W){(Y=new p("error")).error(W)}return new u(Y,J.type||"string",J.mimeType)},generateAsync:function(I,Y){return this.generateInternalStream(I).accumulate(Y)},generateNodeStream:function(I,Y){return(I=I||{}).type||(I.type="nodebuffer"),this.generateInternalStream(I).toNodejsStream(Y)}};i.exports=O},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,i,s){i.exports=n("stream")},{stream:void 0}],17:[function(n,i,s){var c=n("./DataReader");function d(h){c.call(this,h);for(var p=0;p<this.data.length;p++)h[p]=255&h[p]}n("../utils").inherits(d,c),d.prototype.byteAt=function(h){return this.data[this.zero+h]},d.prototype.lastIndexOfSignature=function(h){for(var p=h.charCodeAt(0),u=h.charCodeAt(1),A=h.charCodeAt(2),y=h.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===p&&this.data[x+1]===u&&this.data[x+2]===A&&this.data[x+3]===y)return x-this.zero;return-1},d.prototype.readAndCheckSignature=function(h){var p=h.charCodeAt(0),u=h.charCodeAt(1),A=h.charCodeAt(2),y=h.charCodeAt(3),x=this.readData(4);return p===x[0]&&u===x[1]&&A===x[2]&&y===x[3]},d.prototype.readData=function(h){if(this.checkOffset(h),h===0)return[];var p=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,p},i.exports=d},{"../utils":32,"./DataReader":18}],18:[function(n,i,s){var c=n("../utils");function d(h){this.data=h,this.length=h.length,this.index=0,this.zero=0}d.prototype={checkOffset:function(h){this.checkIndex(this.index+h)},checkIndex:function(h){if(this.length<this.zero+h||h<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+h+"). Corrupted zip ?")},setIndex:function(h){this.checkIndex(h),this.index=h},skip:function(h){this.setIndex(this.index+h)},byteAt:function(){},readInt:function(h){var p,u=0;for(this.checkOffset(h),p=this.index+h-1;p>=this.index;p--)u=(u<<8)+this.byteAt(p);return this.index+=h,u},readString:function(h){return c.transformTo("string",this.readData(h))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var h=this.readInt(4);return new Date(Date.UTC(1980+(h>>25&127),(h>>21&15)-1,h>>16&31,h>>11&31,h>>5&63,(31&h)<<1))}},i.exports=d},{"../utils":32}],19:[function(n,i,s){var c=n("./Uint8ArrayReader");function d(h){c.call(this,h)}n("../utils").inherits(d,c),d.prototype.readData=function(h){this.checkOffset(h);var p=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,p},i.exports=d},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,i,s){var c=n("./DataReader");function d(h){c.call(this,h)}n("../utils").inherits(d,c),d.prototype.byteAt=function(h){return this.data.charCodeAt(this.zero+h)},d.prototype.lastIndexOfSignature=function(h){return this.data.lastIndexOf(h)-this.zero},d.prototype.readAndCheckSignature=function(h){return h===this.readData(4)},d.prototype.readData=function(h){this.checkOffset(h);var p=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,p},i.exports=d},{"../utils":32,"./DataReader":18}],21:[function(n,i,s){var c=n("./ArrayReader");function d(h){c.call(this,h)}n("../utils").inherits(d,c),d.prototype.readData=function(h){if(this.checkOffset(h),h===0)return new Uint8Array(0);var p=this.data.subarray(this.zero+this.index,this.zero+this.index+h);return this.index+=h,p},i.exports=d},{"../utils":32,"./ArrayReader":17}],22:[function(n,i,s){var c=n("../utils"),d=n("../support"),h=n("./ArrayReader"),p=n("./StringReader"),u=n("./NodeBufferReader"),A=n("./Uint8ArrayReader");i.exports=function(y){var x=c.getTypeOf(y);return c.checkSupport(x),x!=="string"||d.uint8array?x==="nodebuffer"?new u(y):d.uint8array?new A(c.transformTo("uint8array",y)):new h(c.transformTo("array",y)):new p(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,i,s){var c=n("./GenericWorker"),d=n("../utils");function h(p){c.call(this,"ConvertWorker to "+p),this.destType=p}d.inherits(h,c),h.prototype.processChunk=function(p){this.push({data:d.transformTo(this.destType,p.data),meta:p.meta})},i.exports=h},{"../utils":32,"./GenericWorker":28}],25:[function(n,i,s){var c=n("./GenericWorker"),d=n("../crc32");function h(){c.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(h,c),h.prototype.processChunk=function(p){this.streamInfo.crc32=d(p.data,this.streamInfo.crc32||0),this.push(p)},i.exports=h},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,i,s){var c=n("../utils"),d=n("./GenericWorker");function h(p){d.call(this,"DataLengthProbe for "+p),this.propName=p,this.withStreamInfo(p,0)}c.inherits(h,d),h.prototype.processChunk=function(p){if(p){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+p.data.length}d.prototype.processChunk.call(this,p)},i.exports=h},{"../utils":32,"./GenericWorker":28}],27:[function(n,i,s){var c=n("../utils"),d=n("./GenericWorker");function h(p){d.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,p.then(function(A){u.dataIsReady=!0,u.data=A,u.max=A&&A.length||0,u.type=c.getTypeOf(A),u.isPaused||u._tickAndRepeat()},function(A){u.error(A)})}c.inherits(h,d),h.prototype.cleanUp=function(){d.prototype.cleanUp.call(this),this.data=null},h.prototype.resume=function(){return!!d.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,c.delay(this._tickAndRepeat,[],this)),!0)},h.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(c.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},h.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var p=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":p=this.data.substring(this.index,u);break;case"uint8array":p=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":p=this.data.slice(this.index,u)}return this.index=u,this.push({data:p,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=h},{"../utils":32,"./GenericWorker":28}],28:[function(n,i,s){function c(d){this.name=d||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}c.prototype={push:function(d){this.emit("data",d)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(d){this.emit("error",d)}return!0},error:function(d){return!this.isFinished&&(this.isPaused?this.generatedError=d:(this.isFinished=!0,this.emit("error",d),this.previous&&this.previous.error(d),this.cleanUp()),!0)},on:function(d,h){return this._listeners[d].push(h),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(d,h){if(this._listeners[d])for(var p=0;p<this._listeners[d].length;p++)this._listeners[d][p].call(this,h)},pipe:function(d){return d.registerPrevious(this)},registerPrevious:function(d){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=d.streamInfo,this.mergeStreamInfo(),this.previous=d;var h=this;return d.on("data",function(p){h.processChunk(p)}),d.on("end",function(){h.end()}),d.on("error",function(p){h.error(p)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var d=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),d=!0),this.previous&&this.previous.resume(),!d},flush:function(){},processChunk:function(d){this.push(d)},withStreamInfo:function(d,h){return this.extraStreamInfo[d]=h,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var d in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,d)&&(this.streamInfo[d]=this.extraStreamInfo[d])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var d="Worker "+this.name;return this.previous?this.previous+" -> "+d:d}},i.exports=c},{}],29:[function(n,i,s){var c=n("../utils"),d=n("./ConvertWorker"),h=n("./GenericWorker"),p=n("../base64"),u=n("../support"),A=n("../external"),y=null;if(u.nodestream)try{y=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(w,T){return new A.Promise(function(R,D){var N=[],M=w._internalType,O=w._outputType,I=w._mimeType;w.on("data",function(Y,J){N.push(Y),T&&T(J)}).on("error",function(Y){N=[],D(Y)}).on("end",function(){try{var Y=(function(J,q,W){switch(J){case"blob":return c.newBlob(c.transformTo("arraybuffer",q),W);case"base64":return p.encode(q);default:return c.transformTo(J,q)}})(O,(function(J,q){var W,V=0,ge=null,X=0;for(W=0;W<q.length;W++)X+=q[W].length;switch(J){case"string":return q.join("");case"array":return Array.prototype.concat.apply([],q);case"uint8array":for(ge=new Uint8Array(X),W=0;W<q.length;W++)ge.set(q[W],V),V+=q[W].length;return ge;case"nodebuffer":return Buffer.concat(q);default:throw new Error("concat : unsupported type '"+J+"'")}})(M,N),I);R(Y)}catch(J){D(J)}N=[]}).resume()})}function S(w,T,R){var D=T;switch(T){case"blob":case"arraybuffer":D="uint8array";break;case"base64":D="string"}try{this._internalType=D,this._outputType=T,this._mimeType=R,c.checkSupport(D),this._worker=w.pipe(new d(D)),w.lock()}catch(N){this._worker=new h("error"),this._worker.error(N)}}S.prototype={accumulate:function(w){return x(this,w)},on:function(w,T){var R=this;return w==="data"?this._worker.on(w,function(D){T.call(R,D.data,D.meta)}):this._worker.on(w,function(){c.delay(T,arguments,R)}),this},resume:function(){return c.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(c.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},w)}},i.exports=S},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,i,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var c=new ArrayBuffer(0);try{s.blob=new Blob([c],{type:"application/zip"}).size===0}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);d.append(c),s.blob=d.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,i,s){for(var c=n("./utils"),d=n("./support"),h=n("./nodejsUtils"),p=n("./stream/GenericWorker"),u=new Array(256),A=0;A<256;A++)u[A]=252<=A?6:248<=A?5:240<=A?4:224<=A?3:192<=A?2:1;u[254]=u[254]=1;function y(){p.call(this,"utf-8 decode"),this.leftOver=null}function x(){p.call(this,"utf-8 encode")}s.utf8encode=function(S){return d.nodebuffer?h.newBufferFrom(S,"utf-8"):(function(w){var T,R,D,N,M,O=w.length,I=0;for(N=0;N<O;N++)(64512&(R=w.charCodeAt(N)))==55296&&N+1<O&&(64512&(D=w.charCodeAt(N+1)))==56320&&(R=65536+(R-55296<<10)+(D-56320),N++),I+=R<128?1:R<2048?2:R<65536?3:4;for(T=d.uint8array?new Uint8Array(I):new Array(I),N=M=0;M<I;N++)(64512&(R=w.charCodeAt(N)))==55296&&N+1<O&&(64512&(D=w.charCodeAt(N+1)))==56320&&(R=65536+(R-55296<<10)+(D-56320),N++),R<128?T[M++]=R:(R<2048?T[M++]=192|R>>>6:(R<65536?T[M++]=224|R>>>12:(T[M++]=240|R>>>18,T[M++]=128|R>>>12&63),T[M++]=128|R>>>6&63),T[M++]=128|63&R);return T})(S)},s.utf8decode=function(S){return d.nodebuffer?c.transformTo("nodebuffer",S).toString("utf-8"):(function(w){var T,R,D,N,M=w.length,O=new Array(2*M);for(T=R=0;T<M;)if((D=w[T++])<128)O[R++]=D;else if(4<(N=u[D]))O[R++]=65533,T+=N-1;else{for(D&=N===2?31:N===3?15:7;1<N&&T<M;)D=D<<6|63&w[T++],N--;1<N?O[R++]=65533:D<65536?O[R++]=D:(D-=65536,O[R++]=55296|D>>10&1023,O[R++]=56320|1023&D)}return O.length!==R&&(O.subarray?O=O.subarray(0,R):O.length=R),c.applyFromCharCode(O)})(S=c.transformTo(d.uint8array?"uint8array":"array",S))},c.inherits(y,p),y.prototype.processChunk=function(S){var w=c.transformTo(d.uint8array?"uint8array":"array",S.data);if(this.leftOver&&this.leftOver.length){if(d.uint8array){var T=w;(w=new Uint8Array(T.length+this.leftOver.length)).set(this.leftOver,0),w.set(T,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var R=(function(N,M){var O;for((M=M||N.length)>N.length&&(M=N.length),O=M-1;0<=O&&(192&N[O])==128;)O--;return O<0||O===0?M:O+u[N[O]]>M?O:M})(w),D=w;R!==w.length&&(d.uint8array?(D=w.subarray(0,R),this.leftOver=w.subarray(R,w.length)):(D=w.slice(0,R),this.leftOver=w.slice(R,w.length))),this.push({data:s.utf8decode(D),meta:S.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=y,c.inherits(x,p),x.prototype.processChunk=function(S){this.push({data:s.utf8encode(S.data),meta:S.meta})},s.Utf8EncodeWorker=x},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,i,s){var c=n("./support"),d=n("./base64"),h=n("./nodejsUtils"),p=n("./external");function u(T){return T}function A(T,R){for(var D=0;D<T.length;++D)R[D]=255&T.charCodeAt(D);return R}n("setimmediate"),s.newBlob=function(T,R){s.checkSupport("blob");try{return new Blob([T],{type:R})}catch{try{var D=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return D.append(T),D.getBlob(R)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(T,R,D){var N=[],M=0,O=T.length;if(O<=D)return String.fromCharCode.apply(null,T);for(;M<O;)R==="array"||R==="nodebuffer"?N.push(String.fromCharCode.apply(null,T.slice(M,Math.min(M+D,O)))):N.push(String.fromCharCode.apply(null,T.subarray(M,Math.min(M+D,O)))),M+=D;return N.join("")},stringifyByChar:function(T){for(var R="",D=0;D<T.length;D++)R+=String.fromCharCode(T[D]);return R},applyCanBeUsed:{uint8array:(function(){try{return c.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return c.nodebuffer&&String.fromCharCode.apply(null,h.allocBuffer(1)).length===1}catch{return!1}})()}};function x(T){var R=65536,D=s.getTypeOf(T),N=!0;if(D==="uint8array"?N=y.applyCanBeUsed.uint8array:D==="nodebuffer"&&(N=y.applyCanBeUsed.nodebuffer),N)for(;1<R;)try{return y.stringifyByChunk(T,D,R)}catch{R=Math.floor(R/2)}return y.stringifyByChar(T)}function S(T,R){for(var D=0;D<T.length;D++)R[D]=T[D];return R}s.applyFromCharCode=x;var w={};w.string={string:u,array:function(T){return A(T,new Array(T.length))},arraybuffer:function(T){return w.string.uint8array(T).buffer},uint8array:function(T){return A(T,new Uint8Array(T.length))},nodebuffer:function(T){return A(T,h.allocBuffer(T.length))}},w.array={string:x,array:u,arraybuffer:function(T){return new Uint8Array(T).buffer},uint8array:function(T){return new Uint8Array(T)},nodebuffer:function(T){return h.newBufferFrom(T)}},w.arraybuffer={string:function(T){return x(new Uint8Array(T))},array:function(T){return S(new Uint8Array(T),new Array(T.byteLength))},arraybuffer:u,uint8array:function(T){return new Uint8Array(T)},nodebuffer:function(T){return h.newBufferFrom(new Uint8Array(T))}},w.uint8array={string:x,array:function(T){return S(T,new Array(T.length))},arraybuffer:function(T){return T.buffer},uint8array:u,nodebuffer:function(T){return h.newBufferFrom(T)}},w.nodebuffer={string:x,array:function(T){return S(T,new Array(T.length))},arraybuffer:function(T){return w.nodebuffer.uint8array(T).buffer},uint8array:function(T){return S(T,new Uint8Array(T.length))},nodebuffer:u},s.transformTo=function(T,R){if(R=R||"",!T)return R;s.checkSupport(T);var D=s.getTypeOf(R);return w[D][T](R)},s.resolve=function(T){for(var R=T.split("/"),D=[],N=0;N<R.length;N++){var M=R[N];M==="."||M===""&&N!==0&&N!==R.length-1||(M===".."?D.pop():D.push(M))}return D.join("/")},s.getTypeOf=function(T){return typeof T=="string"?"string":Object.prototype.toString.call(T)==="[object Array]"?"array":c.nodebuffer&&h.isBuffer(T)?"nodebuffer":c.uint8array&&T instanceof Uint8Array?"uint8array":c.arraybuffer&&T instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(T){if(!c[T.toLowerCase()])throw new Error(T+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(T){var R,D,N="";for(D=0;D<(T||"").length;D++)N+="\\x"+((R=T.charCodeAt(D))<16?"0":"")+R.toString(16).toUpperCase();return N},s.delay=function(T,R,D){setImmediate(function(){T.apply(D||null,R||[])})},s.inherits=function(T,R){function D(){}D.prototype=R.prototype,T.prototype=new D},s.extend=function(){var T,R,D={};for(T=0;T<arguments.length;T++)for(R in arguments[T])Object.prototype.hasOwnProperty.call(arguments[T],R)&&D[R]===void 0&&(D[R]=arguments[T][R]);return D},s.prepareContent=function(T,R,D,N,M){return p.Promise.resolve(R).then(function(O){return c.blob&&(O instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(O))!==-1)&&typeof FileReader<"u"?new p.Promise(function(I,Y){var J=new FileReader;J.onload=function(q){I(q.target.result)},J.onerror=function(q){Y(q.target.error)},J.readAsArrayBuffer(O)}):O}).then(function(O){var I=s.getTypeOf(O);return I?(I==="arraybuffer"?O=s.transformTo("uint8array",O):I==="string"&&(M?O=d.decode(O):D&&N!==!0&&(O=(function(Y){return A(Y,c.uint8array?new Uint8Array(Y.length):new Array(Y.length))})(O))),O):p.Promise.reject(new Error("Can't read the data of '"+T+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,i,s){var c=n("./reader/readerFor"),d=n("./utils"),h=n("./signature"),p=n("./zipEntry"),u=n("./support");function A(y){this.files=[],this.loadOptions=y}A.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var x=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+d.pretty(x)+", expected "+d.pretty(y)+")")}},isSignature:function(y,x){var S=this.reader.index;this.reader.setIndex(y);var w=this.reader.readString(4)===x;return this.reader.setIndex(S),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),x=u.uint8array?"uint8array":"array",S=d.transformTo(x,y);this.zipComment=this.loadOptions.decodeFileName(S)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,x,S,w=this.zip64EndOfCentralSize-44;0<w;)y=this.reader.readInt(2),x=this.reader.readInt(4),S=this.reader.readData(x),this.zip64ExtensibleData[y]={id:y,length:x,value:S}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,x;for(y=0;y<this.files.length;y++)x=this.files[y],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(h.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(h.CENTRAL_FILE_HEADER);)(y=new p({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(h.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,h.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var x=y;if(this.checkSignature(h.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===d.MAX_VALUE_16BITS||this.diskWithCentralDirStart===d.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===d.MAX_VALUE_16BITS||this.centralDirRecords===d.MAX_VALUE_16BITS||this.centralDirSize===d.MAX_VALUE_32BITS||this.centralDirOffset===d.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,h.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var S=this.centralDirOffset+this.centralDirSize;this.zip64&&(S+=20,S+=12+this.zip64EndOfCentralSize);var w=x-S;if(0<w)this.isSignature(x,h.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(y){this.reader=c(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},i.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,i,s){var c=n("./reader/readerFor"),d=n("./utils"),h=n("./compressedObject"),p=n("./crc32"),u=n("./utf8"),A=n("./compressions"),y=n("./support");function x(S,w){this.options=S,this.loadOptions=w}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(S){var w,T;if(S.skip(22),this.fileNameLength=S.readInt(2),T=S.readInt(2),this.fileName=S.readData(this.fileNameLength),S.skip(T),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(R){for(var D in A)if(Object.prototype.hasOwnProperty.call(A,D)&&A[D].magic===R)return A[D];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+d.pretty(this.compressionMethod)+" unknown (inner file : "+d.transformTo("string",this.fileName)+")");this.decompressed=new h(this.compressedSize,this.uncompressedSize,this.crc32,w,S.readData(this.compressedSize))},readCentralPart:function(S){this.versionMadeBy=S.readInt(2),S.skip(2),this.bitFlag=S.readInt(2),this.compressionMethod=S.readString(2),this.date=S.readDate(),this.crc32=S.readInt(4),this.compressedSize=S.readInt(4),this.uncompressedSize=S.readInt(4);var w=S.readInt(2);if(this.extraFieldsLength=S.readInt(2),this.fileCommentLength=S.readInt(2),this.diskNumberStart=S.readInt(2),this.internalFileAttributes=S.readInt(2),this.externalFileAttributes=S.readInt(4),this.localHeaderOffset=S.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");S.skip(w),this.readExtraFields(S),this.parseZIP64ExtraField(S),this.fileComment=S.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var S=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),S==0&&(this.dosPermissions=63&this.externalFileAttributes),S==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var S=c(this.extraFields[1].value);this.uncompressedSize===d.MAX_VALUE_32BITS&&(this.uncompressedSize=S.readInt(8)),this.compressedSize===d.MAX_VALUE_32BITS&&(this.compressedSize=S.readInt(8)),this.localHeaderOffset===d.MAX_VALUE_32BITS&&(this.localHeaderOffset=S.readInt(8)),this.diskNumberStart===d.MAX_VALUE_32BITS&&(this.diskNumberStart=S.readInt(4))}},readExtraFields:function(S){var w,T,R,D=S.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});S.index+4<D;)w=S.readInt(2),T=S.readInt(2),R=S.readData(T),this.extraFields[w]={id:w,length:T,value:R};S.setIndex(D)},handleUTF8:function(){var S=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var T=d.transformTo(S,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(T)}var R=this.findExtraFieldUnicodeComment();if(R!==null)this.fileCommentStr=R;else{var D=d.transformTo(S,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(D)}}},findExtraFieldUnicodePath:function(){var S=this.extraFields[28789];if(S){var w=c(S.value);return w.readInt(1)!==1||p(this.fileName)!==w.readInt(4)?null:u.utf8decode(w.readData(S.length-5))}return null},findExtraFieldUnicodeComment:function(){var S=this.extraFields[25461];if(S){var w=c(S.value);return w.readInt(1)!==1||p(this.fileComment)!==w.readInt(4)?null:u.utf8decode(w.readData(S.length-5))}return null}},i.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,i,s){function c(w,T,R){this.name=w,this.dir=R.dir,this.date=R.date,this.comment=R.comment,this.unixPermissions=R.unixPermissions,this.dosPermissions=R.dosPermissions,this._data=T,this._dataBinary=R.binary,this.options={compression:R.compression,compressionOptions:R.compressionOptions}}var d=n("./stream/StreamHelper"),h=n("./stream/DataWorker"),p=n("./utf8"),u=n("./compressedObject"),A=n("./stream/GenericWorker");c.prototype={internalStream:function(w){var T=null,R="string";try{if(!w)throw new Error("No output type specified.");var D=(R=w.toLowerCase())==="string"||R==="text";R!=="binarystring"&&R!=="text"||(R="string"),T=this._decompressWorker();var N=!this._dataBinary;N&&!D&&(T=T.pipe(new p.Utf8EncodeWorker)),!N&&D&&(T=T.pipe(new p.Utf8DecodeWorker))}catch(M){(T=new A("error")).error(M)}return new d(T,R,"")},async:function(w,T){return this.internalStream(w).accumulate(T)},nodeStream:function(w,T){return this.internalStream(w||"nodebuffer").toNodejsStream(T)},_compressWorker:function(w,T){if(this._data instanceof u&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var R=this._decompressWorker();return this._dataBinary||(R=R.pipe(new p.Utf8EncodeWorker)),u.createWorkerFrom(R,w,T)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof A?this._data:new h(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],x=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},S=0;S<y.length;S++)c.prototype[y[S]]=x;i.exports=c},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,i,s){(function(c){var d,h,p=c.MutationObserver||c.WebKitMutationObserver;if(p){var u=0,A=new p(w),y=c.document.createTextNode("");A.observe(y,{characterData:!0}),d=function(){y.data=u=++u%2}}else if(c.setImmediate||c.MessageChannel===void 0)d="document"in c&&"onreadystatechange"in c.document.createElement("script")?function(){var T=c.document.createElement("script");T.onreadystatechange=function(){w(),T.onreadystatechange=null,T.parentNode.removeChild(T),T=null},c.document.documentElement.appendChild(T)}:function(){setTimeout(w,0)};else{var x=new c.MessageChannel;x.port1.onmessage=w,d=function(){x.port2.postMessage(0)}}var S=[];function w(){var T,R;h=!0;for(var D=S.length;D;){for(R=S,S=[],T=-1;++T<D;)R[T]();D=S.length}h=!1}i.exports=function(T){S.push(T)!==1||h||d()}}).call(this,typeof Pp<"u"?Pp:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,i,s){var c=n("immediate");function d(){}var h={},p=["REJECTED"],u=["FULFILLED"],A=["PENDING"];function y(D){if(typeof D!="function")throw new TypeError("resolver must be a function");this.state=A,this.queue=[],this.outcome=void 0,D!==d&&T(this,D)}function x(D,N,M){this.promise=D,typeof N=="function"&&(this.onFulfilled=N,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function S(D,N,M){c(function(){var O;try{O=N(M)}catch(I){return h.reject(D,I)}O===D?h.reject(D,new TypeError("Cannot resolve promise with itself")):h.resolve(D,O)})}function w(D){var N=D&&D.then;if(D&&(typeof D=="object"||typeof D=="function")&&typeof N=="function")return function(){N.apply(D,arguments)}}function T(D,N){var M=!1;function O(J){M||(M=!0,h.reject(D,J))}function I(J){M||(M=!0,h.resolve(D,J))}var Y=R(function(){N(I,O)});Y.status==="error"&&O(Y.value)}function R(D,N){var M={};try{M.value=D(N),M.status="success"}catch(O){M.status="error",M.value=O}return M}(i.exports=y).prototype.finally=function(D){if(typeof D!="function")return this;var N=this.constructor;return this.then(function(M){return N.resolve(D()).then(function(){return M})},function(M){return N.resolve(D()).then(function(){throw M})})},y.prototype.catch=function(D){return this.then(null,D)},y.prototype.then=function(D,N){if(typeof D!="function"&&this.state===u||typeof N!="function"&&this.state===p)return this;var M=new this.constructor(d);return this.state!==A?S(M,this.state===u?D:N,this.outcome):this.queue.push(new x(M,D,N)),M},x.prototype.callFulfilled=function(D){h.resolve(this.promise,D)},x.prototype.otherCallFulfilled=function(D){S(this.promise,this.onFulfilled,D)},x.prototype.callRejected=function(D){h.reject(this.promise,D)},x.prototype.otherCallRejected=function(D){S(this.promise,this.onRejected,D)},h.resolve=function(D,N){var M=R(w,N);if(M.status==="error")return h.reject(D,M.value);var O=M.value;if(O)T(D,O);else{D.state=u,D.outcome=N;for(var I=-1,Y=D.queue.length;++I<Y;)D.queue[I].callFulfilled(N)}return D},h.reject=function(D,N){D.state=p,D.outcome=N;for(var M=-1,O=D.queue.length;++M<O;)D.queue[M].callRejected(N);return D},y.resolve=function(D){return D instanceof this?D:h.resolve(new this(d),D)},y.reject=function(D){var N=new this(d);return h.reject(N,D)},y.all=function(D){var N=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=D.length,O=!1;if(!M)return this.resolve([]);for(var I=new Array(M),Y=0,J=-1,q=new this(d);++J<M;)W(D[J],J);return q;function W(V,ge){N.resolve(V).then(function(X){I[ge]=X,++Y!==M||O||(O=!0,h.resolve(q,I))},function(X){O||(O=!0,h.reject(q,X))})}},y.race=function(D){var N=this;if(Object.prototype.toString.call(D)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=D.length,O=!1;if(!M)return this.resolve([]);for(var I=-1,Y=new this(d);++I<M;)J=D[I],N.resolve(J).then(function(q){O||(O=!0,h.resolve(Y,q))},function(q){O||(O=!0,h.reject(Y,q))});var J;return Y}},{immediate:36}],38:[function(n,i,s){var c={};(0,n("./lib/utils/common").assign)(c,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),i.exports=c},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,i,s){var c=n("./zlib/deflate"),d=n("./utils/common"),h=n("./utils/strings"),p=n("./zlib/messages"),u=n("./zlib/zstream"),A=Object.prototype.toString,y=0,x=-1,S=0,w=8;function T(D){if(!(this instanceof T))return new T(D);this.options=d.assign({level:x,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:S,to:""},D||{});var N=this.options;N.raw&&0<N.windowBits?N.windowBits=-N.windowBits:N.gzip&&0<N.windowBits&&N.windowBits<16&&(N.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var M=c.deflateInit2(this.strm,N.level,N.method,N.windowBits,N.memLevel,N.strategy);if(M!==y)throw new Error(p[M]);if(N.header&&c.deflateSetHeader(this.strm,N.header),N.dictionary){var O;if(O=typeof N.dictionary=="string"?h.string2buf(N.dictionary):A.call(N.dictionary)==="[object ArrayBuffer]"?new Uint8Array(N.dictionary):N.dictionary,(M=c.deflateSetDictionary(this.strm,O))!==y)throw new Error(p[M]);this._dict_set=!0}}function R(D,N){var M=new T(N);if(M.push(D,!0),M.err)throw M.msg||p[M.err];return M.result}T.prototype.push=function(D,N){var M,O,I=this.strm,Y=this.options.chunkSize;if(this.ended)return!1;O=N===~~N?N:N===!0?4:0,typeof D=="string"?I.input=h.string2buf(D):A.call(D)==="[object ArrayBuffer]"?I.input=new Uint8Array(D):I.input=D,I.next_in=0,I.avail_in=I.input.length;do{if(I.avail_out===0&&(I.output=new d.Buf8(Y),I.next_out=0,I.avail_out=Y),(M=c.deflate(I,O))!==1&&M!==y)return this.onEnd(M),!(this.ended=!0);I.avail_out!==0&&(I.avail_in!==0||O!==4&&O!==2)||(this.options.to==="string"?this.onData(h.buf2binstring(d.shrinkBuf(I.output,I.next_out))):this.onData(d.shrinkBuf(I.output,I.next_out)))}while((0<I.avail_in||I.avail_out===0)&&M!==1);return O===4?(M=c.deflateEnd(this.strm),this.onEnd(M),this.ended=!0,M===y):O!==2||(this.onEnd(y),!(I.avail_out=0))},T.prototype.onData=function(D){this.chunks.push(D)},T.prototype.onEnd=function(D){D===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg},s.Deflate=T,s.deflate=R,s.deflateRaw=function(D,N){return(N=N||{}).raw=!0,R(D,N)},s.gzip=function(D,N){return(N=N||{}).gzip=!0,R(D,N)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,i,s){var c=n("./zlib/inflate"),d=n("./utils/common"),h=n("./utils/strings"),p=n("./zlib/constants"),u=n("./zlib/messages"),A=n("./zlib/zstream"),y=n("./zlib/gzheader"),x=Object.prototype.toString;function S(T){if(!(this instanceof S))return new S(T);this.options=d.assign({chunkSize:16384,windowBits:0,to:""},T||{});var R=this.options;R.raw&&0<=R.windowBits&&R.windowBits<16&&(R.windowBits=-R.windowBits,R.windowBits===0&&(R.windowBits=-15)),!(0<=R.windowBits&&R.windowBits<16)||T&&T.windowBits||(R.windowBits+=32),15<R.windowBits&&R.windowBits<48&&(15&R.windowBits)==0&&(R.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var D=c.inflateInit2(this.strm,R.windowBits);if(D!==p.Z_OK)throw new Error(u[D]);this.header=new y,c.inflateGetHeader(this.strm,this.header)}function w(T,R){var D=new S(R);if(D.push(T,!0),D.err)throw D.msg||u[D.err];return D.result}S.prototype.push=function(T,R){var D,N,M,O,I,Y,J=this.strm,q=this.options.chunkSize,W=this.options.dictionary,V=!1;if(this.ended)return!1;N=R===~~R?R:R===!0?p.Z_FINISH:p.Z_NO_FLUSH,typeof T=="string"?J.input=h.binstring2buf(T):x.call(T)==="[object ArrayBuffer]"?J.input=new Uint8Array(T):J.input=T,J.next_in=0,J.avail_in=J.input.length;do{if(J.avail_out===0&&(J.output=new d.Buf8(q),J.next_out=0,J.avail_out=q),(D=c.inflate(J,p.Z_NO_FLUSH))===p.Z_NEED_DICT&&W&&(Y=typeof W=="string"?h.string2buf(W):x.call(W)==="[object ArrayBuffer]"?new Uint8Array(W):W,D=c.inflateSetDictionary(this.strm,Y)),D===p.Z_BUF_ERROR&&V===!0&&(D=p.Z_OK,V=!1),D!==p.Z_STREAM_END&&D!==p.Z_OK)return this.onEnd(D),!(this.ended=!0);J.next_out&&(J.avail_out!==0&&D!==p.Z_STREAM_END&&(J.avail_in!==0||N!==p.Z_FINISH&&N!==p.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=h.utf8border(J.output,J.next_out),O=J.next_out-M,I=h.buf2string(J.output,M),J.next_out=O,J.avail_out=q-O,O&&d.arraySet(J.output,J.output,M,O,0),this.onData(I)):this.onData(d.shrinkBuf(J.output,J.next_out)))),J.avail_in===0&&J.avail_out===0&&(V=!0)}while((0<J.avail_in||J.avail_out===0)&&D!==p.Z_STREAM_END);return D===p.Z_STREAM_END&&(N=p.Z_FINISH),N===p.Z_FINISH?(D=c.inflateEnd(this.strm),this.onEnd(D),this.ended=!0,D===p.Z_OK):N!==p.Z_SYNC_FLUSH||(this.onEnd(p.Z_OK),!(J.avail_out=0))},S.prototype.onData=function(T){this.chunks.push(T)},S.prototype.onEnd=function(T){T===p.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},s.Inflate=S,s.inflate=w,s.inflateRaw=function(T,R){return(R=R||{}).raw=!0,w(T,R)},s.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,i,s){var c=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(p){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var A=u.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(var y in A)A.hasOwnProperty(y)&&(p[y]=A[y])}}return p},s.shrinkBuf=function(p,u){return p.length===u?p:p.subarray?p.subarray(0,u):(p.length=u,p)};var d={arraySet:function(p,u,A,y,x){if(u.subarray&&p.subarray)p.set(u.subarray(A,A+y),x);else for(var S=0;S<y;S++)p[x+S]=u[A+S]},flattenChunks:function(p){var u,A,y,x,S,w;for(u=y=0,A=p.length;u<A;u++)y+=p[u].length;for(w=new Uint8Array(y),u=x=0,A=p.length;u<A;u++)S=p[u],w.set(S,x),x+=S.length;return w}},h={arraySet:function(p,u,A,y,x){for(var S=0;S<y;S++)p[x+S]=u[A+S]},flattenChunks:function(p){return[].concat.apply([],p)}};s.setTyped=function(p){p?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,d)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,h))},s.setTyped(c)},{}],42:[function(n,i,s){var c=n("./common"),d=!0,h=!0;try{String.fromCharCode.apply(null,[0])}catch{d=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{h=!1}for(var p=new c.Buf8(256),u=0;u<256;u++)p[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function A(y,x){if(x<65537&&(y.subarray&&h||!y.subarray&&d))return String.fromCharCode.apply(null,c.shrinkBuf(y,x));for(var S="",w=0;w<x;w++)S+=String.fromCharCode(y[w]);return S}p[254]=p[254]=1,s.string2buf=function(y){var x,S,w,T,R,D=y.length,N=0;for(T=0;T<D;T++)(64512&(S=y.charCodeAt(T)))==55296&&T+1<D&&(64512&(w=y.charCodeAt(T+1)))==56320&&(S=65536+(S-55296<<10)+(w-56320),T++),N+=S<128?1:S<2048?2:S<65536?3:4;for(x=new c.Buf8(N),T=R=0;R<N;T++)(64512&(S=y.charCodeAt(T)))==55296&&T+1<D&&(64512&(w=y.charCodeAt(T+1)))==56320&&(S=65536+(S-55296<<10)+(w-56320),T++),S<128?x[R++]=S:(S<2048?x[R++]=192|S>>>6:(S<65536?x[R++]=224|S>>>12:(x[R++]=240|S>>>18,x[R++]=128|S>>>12&63),x[R++]=128|S>>>6&63),x[R++]=128|63&S);return x},s.buf2binstring=function(y){return A(y,y.length)},s.binstring2buf=function(y){for(var x=new c.Buf8(y.length),S=0,w=x.length;S<w;S++)x[S]=y.charCodeAt(S);return x},s.buf2string=function(y,x){var S,w,T,R,D=x||y.length,N=new Array(2*D);for(S=w=0;S<D;)if((T=y[S++])<128)N[w++]=T;else if(4<(R=p[T]))N[w++]=65533,S+=R-1;else{for(T&=R===2?31:R===3?15:7;1<R&&S<D;)T=T<<6|63&y[S++],R--;1<R?N[w++]=65533:T<65536?N[w++]=T:(T-=65536,N[w++]=55296|T>>10&1023,N[w++]=56320|1023&T)}return A(N,w)},s.utf8border=function(y,x){var S;for((x=x||y.length)>y.length&&(x=y.length),S=x-1;0<=S&&(192&y[S])==128;)S--;return S<0||S===0?x:S+p[y[S]]>x?S:x}},{"./common":41}],43:[function(n,i,s){i.exports=function(c,d,h,p){for(var u=65535&c|0,A=c>>>16&65535|0,y=0;h!==0;){for(h-=y=2e3<h?2e3:h;A=A+(u=u+d[p++]|0)|0,--y;);u%=65521,A%=65521}return u|A<<16|0}},{}],44:[function(n,i,s){i.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,i,s){var c=(function(){for(var d,h=[],p=0;p<256;p++){d=p;for(var u=0;u<8;u++)d=1&d?3988292384^d>>>1:d>>>1;h[p]=d}return h})();i.exports=function(d,h,p,u){var A=c,y=u+p;d^=-1;for(var x=u;x<y;x++)d=d>>>8^A[255&(d^h[x])];return-1^d}},{}],46:[function(n,i,s){var c,d=n("../utils/common"),h=n("./trees"),p=n("./adler32"),u=n("./crc32"),A=n("./messages"),y=0,x=4,S=0,w=-2,T=-1,R=4,D=2,N=8,M=9,O=286,I=30,Y=19,J=2*O+1,q=15,W=3,V=258,ge=V+W+1,X=42,ae=113,L=1,te=2,le=3,Ae=4;function ne(k,ce){return k.msg=A[ce],ce}function se(k){return(k<<1)-(4<k?9:0)}function ie(k){for(var ce=k.length;0<=--ce;)k[ce]=0}function j(k){var ce=k.state,ue=ce.pending;ue>k.avail_out&&(ue=k.avail_out),ue!==0&&(d.arraySet(k.output,ce.pending_buf,ce.pending_out,ue,k.next_out),k.next_out+=ue,ce.pending_out+=ue,k.total_out+=ue,k.avail_out-=ue,ce.pending-=ue,ce.pending===0&&(ce.pending_out=0))}function K(k,ce){h._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,ce),k.block_start=k.strstart,j(k.strm)}function ve(k,ce){k.pending_buf[k.pending++]=ce}function xe(k,ce){k.pending_buf[k.pending++]=ce>>>8&255,k.pending_buf[k.pending++]=255&ce}function Re(k,ce){var ue,U,G=k.max_chain_length,Z=k.strstart,be=k.prev_length,_e=k.nice_match,me=k.strstart>k.w_size-ge?k.strstart-(k.w_size-ge):0,ze=k.window,Qe=k.w_mask,Oe=k.prev,dt=k.strstart+V,Jt=ze[Z+be-1],zt=ze[Z+be];k.prev_length>=k.good_match&&(G>>=2),_e>k.lookahead&&(_e=k.lookahead);do if(ze[(ue=ce)+be]===zt&&ze[ue+be-1]===Jt&&ze[ue]===ze[Z]&&ze[++ue]===ze[Z+1]){Z+=2,ue++;do;while(ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&ze[++Z]===ze[++ue]&&Z<dt);if(U=V-(dt-Z),Z=dt-V,be<U){if(k.match_start=ce,_e<=(be=U))break;Jt=ze[Z+be-1],zt=ze[Z+be]}}while((ce=Oe[ce&Qe])>me&&--G!=0);return be<=k.lookahead?be:k.lookahead}function Fe(k){var ce,ue,U,G,Z,be,_e,me,ze,Qe,Oe=k.w_size;do{if(G=k.window_size-k.lookahead-k.strstart,k.strstart>=Oe+(Oe-ge)){for(d.arraySet(k.window,k.window,Oe,Oe,0),k.match_start-=Oe,k.strstart-=Oe,k.block_start-=Oe,ce=ue=k.hash_size;U=k.head[--ce],k.head[ce]=Oe<=U?U-Oe:0,--ue;);for(ce=ue=Oe;U=k.prev[--ce],k.prev[ce]=Oe<=U?U-Oe:0,--ue;);G+=Oe}if(k.strm.avail_in===0)break;if(be=k.strm,_e=k.window,me=k.strstart+k.lookahead,ze=G,Qe=void 0,Qe=be.avail_in,ze<Qe&&(Qe=ze),ue=Qe===0?0:(be.avail_in-=Qe,d.arraySet(_e,be.input,be.next_in,Qe,me),be.state.wrap===1?be.adler=p(be.adler,_e,Qe,me):be.state.wrap===2&&(be.adler=u(be.adler,_e,Qe,me)),be.next_in+=Qe,be.total_in+=Qe,Qe),k.lookahead+=ue,k.lookahead+k.insert>=W)for(Z=k.strstart-k.insert,k.ins_h=k.window[Z],k.ins_h=(k.ins_h<<k.hash_shift^k.window[Z+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[Z+W-1])&k.hash_mask,k.prev[Z&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=Z,Z++,k.insert--,!(k.lookahead+k.insert<W)););}while(k.lookahead<ge&&k.strm.avail_in!==0)}function pt(k,ce){for(var ue,U;;){if(k.lookahead<ge){if(Fe(k),k.lookahead<ge&&ce===y)return L;if(k.lookahead===0)break}if(ue=0,k.lookahead>=W&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+W-1])&k.hash_mask,ue=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),ue!==0&&k.strstart-ue<=k.w_size-ge&&(k.match_length=Re(k,ue)),k.match_length>=W)if(U=h._tr_tally(k,k.strstart-k.match_start,k.match_length-W),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=W){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+W-1])&k.hash_mask,ue=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else U=h._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(U&&(K(k,!1),k.strm.avail_out===0))return L}return k.insert=k.strstart<W-1?k.strstart:W-1,ce===x?(K(k,!0),k.strm.avail_out===0?le:Ae):k.last_lit&&(K(k,!1),k.strm.avail_out===0)?L:te}function lt(k,ce){for(var ue,U,G;;){if(k.lookahead<ge){if(Fe(k),k.lookahead<ge&&ce===y)return L;if(k.lookahead===0)break}if(ue=0,k.lookahead>=W&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+W-1])&k.hash_mask,ue=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=W-1,ue!==0&&k.prev_length<k.max_lazy_match&&k.strstart-ue<=k.w_size-ge&&(k.match_length=Re(k,ue),k.match_length<=5&&(k.strategy===1||k.match_length===W&&4096<k.strstart-k.match_start)&&(k.match_length=W-1)),k.prev_length>=W&&k.match_length<=k.prev_length){for(G=k.strstart+k.lookahead-W,U=h._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-W),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=G&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+W-1])&k.hash_mask,ue=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),--k.prev_length!=0;);if(k.match_available=0,k.match_length=W-1,k.strstart++,U&&(K(k,!1),k.strm.avail_out===0))return L}else if(k.match_available){if((U=h._tr_tally(k,0,k.window[k.strstart-1]))&&K(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return L}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(U=h._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<W-1?k.strstart:W-1,ce===x?(K(k,!0),k.strm.avail_out===0?le:Ae):k.last_lit&&(K(k,!1),k.strm.avail_out===0)?L:te}function ut(k,ce,ue,U,G){this.good_length=k,this.max_lazy=ce,this.nice_length=ue,this.max_chain=U,this.func=G}function Rt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=N,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new d.Buf16(2*J),this.dyn_dtree=new d.Buf16(2*(2*I+1)),this.bl_tree=new d.Buf16(2*(2*Y+1)),ie(this.dyn_ltree),ie(this.dyn_dtree),ie(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new d.Buf16(q+1),this.heap=new d.Buf16(2*O+1),ie(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new d.Buf16(2*O+1),ie(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function je(k){var ce;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=D,(ce=k.state).pending=0,ce.pending_out=0,ce.wrap<0&&(ce.wrap=-ce.wrap),ce.status=ce.wrap?X:ae,k.adler=ce.wrap===2?0:1,ce.last_flush=y,h._tr_init(ce),S):ne(k,w)}function St(k){var ce=je(k);return ce===S&&(function(ue){ue.window_size=2*ue.w_size,ie(ue.head),ue.max_lazy_match=c[ue.level].max_lazy,ue.good_match=c[ue.level].good_length,ue.nice_match=c[ue.level].nice_length,ue.max_chain_length=c[ue.level].max_chain,ue.strstart=0,ue.block_start=0,ue.lookahead=0,ue.insert=0,ue.match_length=ue.prev_length=W-1,ue.match_available=0,ue.ins_h=0})(k.state),ce}function he(k,ce,ue,U,G,Z){if(!k)return w;var be=1;if(ce===T&&(ce=6),U<0?(be=0,U=-U):15<U&&(be=2,U-=16),G<1||M<G||ue!==N||U<8||15<U||ce<0||9<ce||Z<0||R<Z)return ne(k,w);U===8&&(U=9);var _e=new Rt;return(k.state=_e).strm=k,_e.wrap=be,_e.gzhead=null,_e.w_bits=U,_e.w_size=1<<_e.w_bits,_e.w_mask=_e.w_size-1,_e.hash_bits=G+7,_e.hash_size=1<<_e.hash_bits,_e.hash_mask=_e.hash_size-1,_e.hash_shift=~~((_e.hash_bits+W-1)/W),_e.window=new d.Buf8(2*_e.w_size),_e.head=new d.Buf16(_e.hash_size),_e.prev=new d.Buf16(_e.w_size),_e.lit_bufsize=1<<G+6,_e.pending_buf_size=4*_e.lit_bufsize,_e.pending_buf=new d.Buf8(_e.pending_buf_size),_e.d_buf=1*_e.lit_bufsize,_e.l_buf=3*_e.lit_bufsize,_e.level=ce,_e.strategy=Z,_e.method=ue,St(k)}c=[new ut(0,0,0,0,function(k,ce){var ue=65535;for(ue>k.pending_buf_size-5&&(ue=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Fe(k),k.lookahead===0&&ce===y)return L;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var U=k.block_start+ue;if((k.strstart===0||k.strstart>=U)&&(k.lookahead=k.strstart-U,k.strstart=U,K(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-ge&&(K(k,!1),k.strm.avail_out===0))return L}return k.insert=0,ce===x?(K(k,!0),k.strm.avail_out===0?le:Ae):(k.strstart>k.block_start&&(K(k,!1),k.strm.avail_out),L)}),new ut(4,4,8,4,pt),new ut(4,5,16,8,pt),new ut(4,6,32,32,pt),new ut(4,4,16,16,lt),new ut(8,16,32,32,lt),new ut(8,16,128,128,lt),new ut(8,32,128,256,lt),new ut(32,128,258,1024,lt),new ut(32,258,258,4096,lt)],s.deflateInit=function(k,ce){return he(k,ce,N,15,8,0)},s.deflateInit2=he,s.deflateReset=St,s.deflateResetKeep=je,s.deflateSetHeader=function(k,ce){return k&&k.state?k.state.wrap!==2?w:(k.state.gzhead=ce,S):w},s.deflate=function(k,ce){var ue,U,G,Z;if(!k||!k.state||5<ce||ce<0)return k?ne(k,w):w;if(U=k.state,!k.output||!k.input&&k.avail_in!==0||U.status===666&&ce!==x)return ne(k,k.avail_out===0?-5:w);if(U.strm=k,ue=U.last_flush,U.last_flush=ce,U.status===X)if(U.wrap===2)k.adler=0,ve(U,31),ve(U,139),ve(U,8),U.gzhead?(ve(U,(U.gzhead.text?1:0)+(U.gzhead.hcrc?2:0)+(U.gzhead.extra?4:0)+(U.gzhead.name?8:0)+(U.gzhead.comment?16:0)),ve(U,255&U.gzhead.time),ve(U,U.gzhead.time>>8&255),ve(U,U.gzhead.time>>16&255),ve(U,U.gzhead.time>>24&255),ve(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),ve(U,255&U.gzhead.os),U.gzhead.extra&&U.gzhead.extra.length&&(ve(U,255&U.gzhead.extra.length),ve(U,U.gzhead.extra.length>>8&255)),U.gzhead.hcrc&&(k.adler=u(k.adler,U.pending_buf,U.pending,0)),U.gzindex=0,U.status=69):(ve(U,0),ve(U,0),ve(U,0),ve(U,0),ve(U,0),ve(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),ve(U,3),U.status=ae);else{var be=N+(U.w_bits-8<<4)<<8;be|=(2<=U.strategy||U.level<2?0:U.level<6?1:U.level===6?2:3)<<6,U.strstart!==0&&(be|=32),be+=31-be%31,U.status=ae,xe(U,be),U.strstart!==0&&(xe(U,k.adler>>>16),xe(U,65535&k.adler)),k.adler=1}if(U.status===69)if(U.gzhead.extra){for(G=U.pending;U.gzindex<(65535&U.gzhead.extra.length)&&(U.pending!==U.pending_buf_size||(U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),j(k),G=U.pending,U.pending!==U.pending_buf_size));)ve(U,255&U.gzhead.extra[U.gzindex]),U.gzindex++;U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),U.gzindex===U.gzhead.extra.length&&(U.gzindex=0,U.status=73)}else U.status=73;if(U.status===73)if(U.gzhead.name){G=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),j(k),G=U.pending,U.pending===U.pending_buf_size)){Z=1;break}Z=U.gzindex<U.gzhead.name.length?255&U.gzhead.name.charCodeAt(U.gzindex++):0,ve(U,Z)}while(Z!==0);U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),Z===0&&(U.gzindex=0,U.status=91)}else U.status=91;if(U.status===91)if(U.gzhead.comment){G=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),j(k),G=U.pending,U.pending===U.pending_buf_size)){Z=1;break}Z=U.gzindex<U.gzhead.comment.length?255&U.gzhead.comment.charCodeAt(U.gzindex++):0,ve(U,Z)}while(Z!==0);U.gzhead.hcrc&&U.pending>G&&(k.adler=u(k.adler,U.pending_buf,U.pending-G,G)),Z===0&&(U.status=103)}else U.status=103;if(U.status===103&&(U.gzhead.hcrc?(U.pending+2>U.pending_buf_size&&j(k),U.pending+2<=U.pending_buf_size&&(ve(U,255&k.adler),ve(U,k.adler>>8&255),k.adler=0,U.status=ae)):U.status=ae),U.pending!==0){if(j(k),k.avail_out===0)return U.last_flush=-1,S}else if(k.avail_in===0&&se(ce)<=se(ue)&&ce!==x)return ne(k,-5);if(U.status===666&&k.avail_in!==0)return ne(k,-5);if(k.avail_in!==0||U.lookahead!==0||ce!==y&&U.status!==666){var _e=U.strategy===2?(function(me,ze){for(var Qe;;){if(me.lookahead===0&&(Fe(me),me.lookahead===0)){if(ze===y)return L;break}if(me.match_length=0,Qe=h._tr_tally(me,0,me.window[me.strstart]),me.lookahead--,me.strstart++,Qe&&(K(me,!1),me.strm.avail_out===0))return L}return me.insert=0,ze===x?(K(me,!0),me.strm.avail_out===0?le:Ae):me.last_lit&&(K(me,!1),me.strm.avail_out===0)?L:te})(U,ce):U.strategy===3?(function(me,ze){for(var Qe,Oe,dt,Jt,zt=me.window;;){if(me.lookahead<=V){if(Fe(me),me.lookahead<=V&&ze===y)return L;if(me.lookahead===0)break}if(me.match_length=0,me.lookahead>=W&&0<me.strstart&&(Oe=zt[dt=me.strstart-1])===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]){Jt=me.strstart+V;do;while(Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&Oe===zt[++dt]&&dt<Jt);me.match_length=V-(Jt-dt),me.match_length>me.lookahead&&(me.match_length=me.lookahead)}if(me.match_length>=W?(Qe=h._tr_tally(me,1,me.match_length-W),me.lookahead-=me.match_length,me.strstart+=me.match_length,me.match_length=0):(Qe=h._tr_tally(me,0,me.window[me.strstart]),me.lookahead--,me.strstart++),Qe&&(K(me,!1),me.strm.avail_out===0))return L}return me.insert=0,ze===x?(K(me,!0),me.strm.avail_out===0?le:Ae):me.last_lit&&(K(me,!1),me.strm.avail_out===0)?L:te})(U,ce):c[U.level].func(U,ce);if(_e!==le&&_e!==Ae||(U.status=666),_e===L||_e===le)return k.avail_out===0&&(U.last_flush=-1),S;if(_e===te&&(ce===1?h._tr_align(U):ce!==5&&(h._tr_stored_block(U,0,0,!1),ce===3&&(ie(U.head),U.lookahead===0&&(U.strstart=0,U.block_start=0,U.insert=0))),j(k),k.avail_out===0))return U.last_flush=-1,S}return ce!==x?S:U.wrap<=0?1:(U.wrap===2?(ve(U,255&k.adler),ve(U,k.adler>>8&255),ve(U,k.adler>>16&255),ve(U,k.adler>>24&255),ve(U,255&k.total_in),ve(U,k.total_in>>8&255),ve(U,k.total_in>>16&255),ve(U,k.total_in>>24&255)):(xe(U,k.adler>>>16),xe(U,65535&k.adler)),j(k),0<U.wrap&&(U.wrap=-U.wrap),U.pending!==0?S:1)},s.deflateEnd=function(k){var ce;return k&&k.state?(ce=k.state.status)!==X&&ce!==69&&ce!==73&&ce!==91&&ce!==103&&ce!==ae&&ce!==666?ne(k,w):(k.state=null,ce===ae?ne(k,-3):S):w},s.deflateSetDictionary=function(k,ce){var ue,U,G,Z,be,_e,me,ze,Qe=ce.length;if(!k||!k.state||(Z=(ue=k.state).wrap)===2||Z===1&&ue.status!==X||ue.lookahead)return w;for(Z===1&&(k.adler=p(k.adler,ce,Qe,0)),ue.wrap=0,Qe>=ue.w_size&&(Z===0&&(ie(ue.head),ue.strstart=0,ue.block_start=0,ue.insert=0),ze=new d.Buf8(ue.w_size),d.arraySet(ze,ce,Qe-ue.w_size,ue.w_size,0),ce=ze,Qe=ue.w_size),be=k.avail_in,_e=k.next_in,me=k.input,k.avail_in=Qe,k.next_in=0,k.input=ce,Fe(ue);ue.lookahead>=W;){for(U=ue.strstart,G=ue.lookahead-(W-1);ue.ins_h=(ue.ins_h<<ue.hash_shift^ue.window[U+W-1])&ue.hash_mask,ue.prev[U&ue.w_mask]=ue.head[ue.ins_h],ue.head[ue.ins_h]=U,U++,--G;);ue.strstart=U,ue.lookahead=W-1,Fe(ue)}return ue.strstart+=ue.lookahead,ue.block_start=ue.strstart,ue.insert=ue.lookahead,ue.lookahead=0,ue.match_length=ue.prev_length=W-1,ue.match_available=0,k.next_in=_e,k.input=me,k.avail_in=be,ue.wrap=Z,S},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,i,s){i.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,i,s){i.exports=function(c,d){var h,p,u,A,y,x,S,w,T,R,D,N,M,O,I,Y,J,q,W,V,ge,X,ae,L,te;h=c.state,p=c.next_in,L=c.input,u=p+(c.avail_in-5),A=c.next_out,te=c.output,y=A-(d-c.avail_out),x=A+(c.avail_out-257),S=h.dmax,w=h.wsize,T=h.whave,R=h.wnext,D=h.window,N=h.hold,M=h.bits,O=h.lencode,I=h.distcode,Y=(1<<h.lenbits)-1,J=(1<<h.distbits)-1;e:do{M<15&&(N+=L[p++]<<M,M+=8,N+=L[p++]<<M,M+=8),q=O[N&Y];t:for(;;){if(N>>>=W=q>>>24,M-=W,(W=q>>>16&255)===0)te[A++]=65535&q;else{if(!(16&W)){if((64&W)==0){q=O[(65535&q)+(N&(1<<W)-1)];continue t}if(32&W){h.mode=12;break e}c.msg="invalid literal/length code",h.mode=30;break e}V=65535&q,(W&=15)&&(M<W&&(N+=L[p++]<<M,M+=8),V+=N&(1<<W)-1,N>>>=W,M-=W),M<15&&(N+=L[p++]<<M,M+=8,N+=L[p++]<<M,M+=8),q=I[N&J];n:for(;;){if(N>>>=W=q>>>24,M-=W,!(16&(W=q>>>16&255))){if((64&W)==0){q=I[(65535&q)+(N&(1<<W)-1)];continue n}c.msg="invalid distance code",h.mode=30;break e}if(ge=65535&q,M<(W&=15)&&(N+=L[p++]<<M,(M+=8)<W&&(N+=L[p++]<<M,M+=8)),S<(ge+=N&(1<<W)-1)){c.msg="invalid distance too far back",h.mode=30;break e}if(N>>>=W,M-=W,(W=A-y)<ge){if(T<(W=ge-W)&&h.sane){c.msg="invalid distance too far back",h.mode=30;break e}if(ae=D,(X=0)===R){if(X+=w-W,W<V){for(V-=W;te[A++]=D[X++],--W;);X=A-ge,ae=te}}else if(R<W){if(X+=w+R-W,(W-=R)<V){for(V-=W;te[A++]=D[X++],--W;);if(X=0,R<V){for(V-=W=R;te[A++]=D[X++],--W;);X=A-ge,ae=te}}}else if(X+=R-W,W<V){for(V-=W;te[A++]=D[X++],--W;);X=A-ge,ae=te}for(;2<V;)te[A++]=ae[X++],te[A++]=ae[X++],te[A++]=ae[X++],V-=3;V&&(te[A++]=ae[X++],1<V&&(te[A++]=ae[X++]))}else{for(X=A-ge;te[A++]=te[X++],te[A++]=te[X++],te[A++]=te[X++],2<(V-=3););V&&(te[A++]=te[X++],1<V&&(te[A++]=te[X++]))}break}}break}}while(p<u&&A<x);p-=V=M>>3,N&=(1<<(M-=V<<3))-1,c.next_in=p,c.next_out=A,c.avail_in=p<u?u-p+5:5-(p-u),c.avail_out=A<x?x-A+257:257-(A-x),h.hold=N,h.bits=M}},{}],49:[function(n,i,s){var c=n("../utils/common"),d=n("./adler32"),h=n("./crc32"),p=n("./inffast"),u=n("./inftrees"),A=1,y=2,x=0,S=-2,w=1,T=852,R=592;function D(X){return(X>>>24&255)+(X>>>8&65280)+((65280&X)<<8)+((255&X)<<24)}function N(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function M(X){var ae;return X&&X.state?(ae=X.state,X.total_in=X.total_out=ae.total=0,X.msg="",ae.wrap&&(X.adler=1&ae.wrap),ae.mode=w,ae.last=0,ae.havedict=0,ae.dmax=32768,ae.head=null,ae.hold=0,ae.bits=0,ae.lencode=ae.lendyn=new c.Buf32(T),ae.distcode=ae.distdyn=new c.Buf32(R),ae.sane=1,ae.back=-1,x):S}function O(X){var ae;return X&&X.state?((ae=X.state).wsize=0,ae.whave=0,ae.wnext=0,M(X)):S}function I(X,ae){var L,te;return X&&X.state?(te=X.state,ae<0?(L=0,ae=-ae):(L=1+(ae>>4),ae<48&&(ae&=15)),ae&&(ae<8||15<ae)?S:(te.window!==null&&te.wbits!==ae&&(te.window=null),te.wrap=L,te.wbits=ae,O(X))):S}function Y(X,ae){var L,te;return X?(te=new N,(X.state=te).window=null,(L=I(X,ae))!==x&&(X.state=null),L):S}var J,q,W=!0;function V(X){if(W){var ae;for(J=new c.Buf32(512),q=new c.Buf32(32),ae=0;ae<144;)X.lens[ae++]=8;for(;ae<256;)X.lens[ae++]=9;for(;ae<280;)X.lens[ae++]=7;for(;ae<288;)X.lens[ae++]=8;for(u(A,X.lens,0,288,J,0,X.work,{bits:9}),ae=0;ae<32;)X.lens[ae++]=5;u(y,X.lens,0,32,q,0,X.work,{bits:5}),W=!1}X.lencode=J,X.lenbits=9,X.distcode=q,X.distbits=5}function ge(X,ae,L,te){var le,Ae=X.state;return Ae.window===null&&(Ae.wsize=1<<Ae.wbits,Ae.wnext=0,Ae.whave=0,Ae.window=new c.Buf8(Ae.wsize)),te>=Ae.wsize?(c.arraySet(Ae.window,ae,L-Ae.wsize,Ae.wsize,0),Ae.wnext=0,Ae.whave=Ae.wsize):(te<(le=Ae.wsize-Ae.wnext)&&(le=te),c.arraySet(Ae.window,ae,L-te,le,Ae.wnext),(te-=le)?(c.arraySet(Ae.window,ae,L-te,te,0),Ae.wnext=te,Ae.whave=Ae.wsize):(Ae.wnext+=le,Ae.wnext===Ae.wsize&&(Ae.wnext=0),Ae.whave<Ae.wsize&&(Ae.whave+=le))),0}s.inflateReset=O,s.inflateReset2=I,s.inflateResetKeep=M,s.inflateInit=function(X){return Y(X,15)},s.inflateInit2=Y,s.inflate=function(X,ae){var L,te,le,Ae,ne,se,ie,j,K,ve,xe,Re,Fe,pt,lt,ut,Rt,je,St,he,k,ce,ue,U,G=0,Z=new c.Buf8(4),be=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!X||!X.state||!X.output||!X.input&&X.avail_in!==0)return S;(L=X.state).mode===12&&(L.mode=13),ne=X.next_out,le=X.output,ie=X.avail_out,Ae=X.next_in,te=X.input,se=X.avail_in,j=L.hold,K=L.bits,ve=se,xe=ie,ce=x;e:for(;;)switch(L.mode){case w:if(L.wrap===0){L.mode=13;break}for(;K<16;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if(2&L.wrap&&j===35615){Z[L.check=0]=255&j,Z[1]=j>>>8&255,L.check=h(L.check,Z,2,0),K=j=0,L.mode=2;break}if(L.flags=0,L.head&&(L.head.done=!1),!(1&L.wrap)||(((255&j)<<8)+(j>>8))%31){X.msg="incorrect header check",L.mode=30;break}if((15&j)!=8){X.msg="unknown compression method",L.mode=30;break}if(K-=4,k=8+(15&(j>>>=4)),L.wbits===0)L.wbits=k;else if(k>L.wbits){X.msg="invalid window size",L.mode=30;break}L.dmax=1<<k,X.adler=L.check=1,L.mode=512&j?10:12,K=j=0;break;case 2:for(;K<16;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if(L.flags=j,(255&L.flags)!=8){X.msg="unknown compression method",L.mode=30;break}if(57344&L.flags){X.msg="unknown header flags set",L.mode=30;break}L.head&&(L.head.text=j>>8&1),512&L.flags&&(Z[0]=255&j,Z[1]=j>>>8&255,L.check=h(L.check,Z,2,0)),K=j=0,L.mode=3;case 3:for(;K<32;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}L.head&&(L.head.time=j),512&L.flags&&(Z[0]=255&j,Z[1]=j>>>8&255,Z[2]=j>>>16&255,Z[3]=j>>>24&255,L.check=h(L.check,Z,4,0)),K=j=0,L.mode=4;case 4:for(;K<16;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}L.head&&(L.head.xflags=255&j,L.head.os=j>>8),512&L.flags&&(Z[0]=255&j,Z[1]=j>>>8&255,L.check=h(L.check,Z,2,0)),K=j=0,L.mode=5;case 5:if(1024&L.flags){for(;K<16;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}L.length=j,L.head&&(L.head.extra_len=j),512&L.flags&&(Z[0]=255&j,Z[1]=j>>>8&255,L.check=h(L.check,Z,2,0)),K=j=0}else L.head&&(L.head.extra=null);L.mode=6;case 6:if(1024&L.flags&&(se<(Re=L.length)&&(Re=se),Re&&(L.head&&(k=L.head.extra_len-L.length,L.head.extra||(L.head.extra=new Array(L.head.extra_len)),c.arraySet(L.head.extra,te,Ae,Re,k)),512&L.flags&&(L.check=h(L.check,te,Re,Ae)),se-=Re,Ae+=Re,L.length-=Re),L.length))break e;L.length=0,L.mode=7;case 7:if(2048&L.flags){if(se===0)break e;for(Re=0;k=te[Ae+Re++],L.head&&k&&L.length<65536&&(L.head.name+=String.fromCharCode(k)),k&&Re<se;);if(512&L.flags&&(L.check=h(L.check,te,Re,Ae)),se-=Re,Ae+=Re,k)break e}else L.head&&(L.head.name=null);L.length=0,L.mode=8;case 8:if(4096&L.flags){if(se===0)break e;for(Re=0;k=te[Ae+Re++],L.head&&k&&L.length<65536&&(L.head.comment+=String.fromCharCode(k)),k&&Re<se;);if(512&L.flags&&(L.check=h(L.check,te,Re,Ae)),se-=Re,Ae+=Re,k)break e}else L.head&&(L.head.comment=null);L.mode=9;case 9:if(512&L.flags){for(;K<16;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if(j!==(65535&L.check)){X.msg="header crc mismatch",L.mode=30;break}K=j=0}L.head&&(L.head.hcrc=L.flags>>9&1,L.head.done=!0),X.adler=L.check=0,L.mode=12;break;case 10:for(;K<32;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}X.adler=L.check=D(j),K=j=0,L.mode=11;case 11:if(L.havedict===0)return X.next_out=ne,X.avail_out=ie,X.next_in=Ae,X.avail_in=se,L.hold=j,L.bits=K,2;X.adler=L.check=1,L.mode=12;case 12:if(ae===5||ae===6)break e;case 13:if(L.last){j>>>=7&K,K-=7&K,L.mode=27;break}for(;K<3;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}switch(L.last=1&j,K-=1,3&(j>>>=1)){case 0:L.mode=14;break;case 1:if(V(L),L.mode=20,ae!==6)break;j>>>=2,K-=2;break e;case 2:L.mode=17;break;case 3:X.msg="invalid block type",L.mode=30}j>>>=2,K-=2;break;case 14:for(j>>>=7&K,K-=7&K;K<32;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if((65535&j)!=(j>>>16^65535)){X.msg="invalid stored block lengths",L.mode=30;break}if(L.length=65535&j,K=j=0,L.mode=15,ae===6)break e;case 15:L.mode=16;case 16:if(Re=L.length){if(se<Re&&(Re=se),ie<Re&&(Re=ie),Re===0)break e;c.arraySet(le,te,Ae,Re,ne),se-=Re,Ae+=Re,ie-=Re,ne+=Re,L.length-=Re;break}L.mode=12;break;case 17:for(;K<14;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if(L.nlen=257+(31&j),j>>>=5,K-=5,L.ndist=1+(31&j),j>>>=5,K-=5,L.ncode=4+(15&j),j>>>=4,K-=4,286<L.nlen||30<L.ndist){X.msg="too many length or distance symbols",L.mode=30;break}L.have=0,L.mode=18;case 18:for(;L.have<L.ncode;){for(;K<3;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}L.lens[be[L.have++]]=7&j,j>>>=3,K-=3}for(;L.have<19;)L.lens[be[L.have++]]=0;if(L.lencode=L.lendyn,L.lenbits=7,ue={bits:L.lenbits},ce=u(0,L.lens,0,19,L.lencode,0,L.work,ue),L.lenbits=ue.bits,ce){X.msg="invalid code lengths set",L.mode=30;break}L.have=0,L.mode=19;case 19:for(;L.have<L.nlen+L.ndist;){for(;ut=(G=L.lencode[j&(1<<L.lenbits)-1])>>>16&255,Rt=65535&G,!((lt=G>>>24)<=K);){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if(Rt<16)j>>>=lt,K-=lt,L.lens[L.have++]=Rt;else{if(Rt===16){for(U=lt+2;K<U;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if(j>>>=lt,K-=lt,L.have===0){X.msg="invalid bit length repeat",L.mode=30;break}k=L.lens[L.have-1],Re=3+(3&j),j>>>=2,K-=2}else if(Rt===17){for(U=lt+3;K<U;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}K-=lt,k=0,Re=3+(7&(j>>>=lt)),j>>>=3,K-=3}else{for(U=lt+7;K<U;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}K-=lt,k=0,Re=11+(127&(j>>>=lt)),j>>>=7,K-=7}if(L.have+Re>L.nlen+L.ndist){X.msg="invalid bit length repeat",L.mode=30;break}for(;Re--;)L.lens[L.have++]=k}}if(L.mode===30)break;if(L.lens[256]===0){X.msg="invalid code -- missing end-of-block",L.mode=30;break}if(L.lenbits=9,ue={bits:L.lenbits},ce=u(A,L.lens,0,L.nlen,L.lencode,0,L.work,ue),L.lenbits=ue.bits,ce){X.msg="invalid literal/lengths set",L.mode=30;break}if(L.distbits=6,L.distcode=L.distdyn,ue={bits:L.distbits},ce=u(y,L.lens,L.nlen,L.ndist,L.distcode,0,L.work,ue),L.distbits=ue.bits,ce){X.msg="invalid distances set",L.mode=30;break}if(L.mode=20,ae===6)break e;case 20:L.mode=21;case 21:if(6<=se&&258<=ie){X.next_out=ne,X.avail_out=ie,X.next_in=Ae,X.avail_in=se,L.hold=j,L.bits=K,p(X,xe),ne=X.next_out,le=X.output,ie=X.avail_out,Ae=X.next_in,te=X.input,se=X.avail_in,j=L.hold,K=L.bits,L.mode===12&&(L.back=-1);break}for(L.back=0;ut=(G=L.lencode[j&(1<<L.lenbits)-1])>>>16&255,Rt=65535&G,!((lt=G>>>24)<=K);){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if(ut&&(240&ut)==0){for(je=lt,St=ut,he=Rt;ut=(G=L.lencode[he+((j&(1<<je+St)-1)>>je)])>>>16&255,Rt=65535&G,!(je+(lt=G>>>24)<=K);){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}j>>>=je,K-=je,L.back+=je}if(j>>>=lt,K-=lt,L.back+=lt,L.length=Rt,ut===0){L.mode=26;break}if(32&ut){L.back=-1,L.mode=12;break}if(64&ut){X.msg="invalid literal/length code",L.mode=30;break}L.extra=15&ut,L.mode=22;case 22:if(L.extra){for(U=L.extra;K<U;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}L.length+=j&(1<<L.extra)-1,j>>>=L.extra,K-=L.extra,L.back+=L.extra}L.was=L.length,L.mode=23;case 23:for(;ut=(G=L.distcode[j&(1<<L.distbits)-1])>>>16&255,Rt=65535&G,!((lt=G>>>24)<=K);){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if((240&ut)==0){for(je=lt,St=ut,he=Rt;ut=(G=L.distcode[he+((j&(1<<je+St)-1)>>je)])>>>16&255,Rt=65535&G,!(je+(lt=G>>>24)<=K);){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}j>>>=je,K-=je,L.back+=je}if(j>>>=lt,K-=lt,L.back+=lt,64&ut){X.msg="invalid distance code",L.mode=30;break}L.offset=Rt,L.extra=15&ut,L.mode=24;case 24:if(L.extra){for(U=L.extra;K<U;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}L.offset+=j&(1<<L.extra)-1,j>>>=L.extra,K-=L.extra,L.back+=L.extra}if(L.offset>L.dmax){X.msg="invalid distance too far back",L.mode=30;break}L.mode=25;case 25:if(ie===0)break e;if(Re=xe-ie,L.offset>Re){if((Re=L.offset-Re)>L.whave&&L.sane){X.msg="invalid distance too far back",L.mode=30;break}Fe=Re>L.wnext?(Re-=L.wnext,L.wsize-Re):L.wnext-Re,Re>L.length&&(Re=L.length),pt=L.window}else pt=le,Fe=ne-L.offset,Re=L.length;for(ie<Re&&(Re=ie),ie-=Re,L.length-=Re;le[ne++]=pt[Fe++],--Re;);L.length===0&&(L.mode=21);break;case 26:if(ie===0)break e;le[ne++]=L.length,ie--,L.mode=21;break;case 27:if(L.wrap){for(;K<32;){if(se===0)break e;se--,j|=te[Ae++]<<K,K+=8}if(xe-=ie,X.total_out+=xe,L.total+=xe,xe&&(X.adler=L.check=L.flags?h(L.check,le,xe,ne-xe):d(L.check,le,xe,ne-xe)),xe=ie,(L.flags?j:D(j))!==L.check){X.msg="incorrect data check",L.mode=30;break}K=j=0}L.mode=28;case 28:if(L.wrap&&L.flags){for(;K<32;){if(se===0)break e;se--,j+=te[Ae++]<<K,K+=8}if(j!==(4294967295&L.total)){X.msg="incorrect length check",L.mode=30;break}K=j=0}L.mode=29;case 29:ce=1;break e;case 30:ce=-3;break e;case 31:return-4;case 32:default:return S}return X.next_out=ne,X.avail_out=ie,X.next_in=Ae,X.avail_in=se,L.hold=j,L.bits=K,(L.wsize||xe!==X.avail_out&&L.mode<30&&(L.mode<27||ae!==4))&&ge(X,X.output,X.next_out,xe-X.avail_out)?(L.mode=31,-4):(ve-=X.avail_in,xe-=X.avail_out,X.total_in+=ve,X.total_out+=xe,L.total+=xe,L.wrap&&xe&&(X.adler=L.check=L.flags?h(L.check,le,xe,X.next_out-xe):d(L.check,le,xe,X.next_out-xe)),X.data_type=L.bits+(L.last?64:0)+(L.mode===12?128:0)+(L.mode===20||L.mode===15?256:0),(ve==0&&xe===0||ae===4)&&ce===x&&(ce=-5),ce)},s.inflateEnd=function(X){if(!X||!X.state)return S;var ae=X.state;return ae.window&&(ae.window=null),X.state=null,x},s.inflateGetHeader=function(X,ae){var L;return X&&X.state?(2&(L=X.state).wrap)==0?S:((L.head=ae).done=!1,x):S},s.inflateSetDictionary=function(X,ae){var L,te=ae.length;return X&&X.state?(L=X.state).wrap!==0&&L.mode!==11?S:L.mode===11&&d(1,ae,te,0)!==L.check?-3:ge(X,ae,te,te)?(L.mode=31,-4):(L.havedict=1,x):S},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,i,s){var c=n("../utils/common"),d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],p=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];i.exports=function(A,y,x,S,w,T,R,D){var N,M,O,I,Y,J,q,W,V,ge=D.bits,X=0,ae=0,L=0,te=0,le=0,Ae=0,ne=0,se=0,ie=0,j=0,K=null,ve=0,xe=new c.Buf16(16),Re=new c.Buf16(16),Fe=null,pt=0;for(X=0;X<=15;X++)xe[X]=0;for(ae=0;ae<S;ae++)xe[y[x+ae]]++;for(le=ge,te=15;1<=te&&xe[te]===0;te--);if(te<le&&(le=te),te===0)return w[T++]=20971520,w[T++]=20971520,D.bits=1,0;for(L=1;L<te&&xe[L]===0;L++);for(le<L&&(le=L),X=se=1;X<=15;X++)if(se<<=1,(se-=xe[X])<0)return-1;if(0<se&&(A===0||te!==1))return-1;for(Re[1]=0,X=1;X<15;X++)Re[X+1]=Re[X]+xe[X];for(ae=0;ae<S;ae++)y[x+ae]!==0&&(R[Re[y[x+ae]]++]=ae);if(J=A===0?(K=Fe=R,19):A===1?(K=d,ve-=257,Fe=h,pt-=257,256):(K=p,Fe=u,-1),X=L,Y=T,ne=ae=j=0,O=-1,I=(ie=1<<(Ae=le))-1,A===1&&852<ie||A===2&&592<ie)return 1;for(;;){for(q=X-ne,V=R[ae]<J?(W=0,R[ae]):R[ae]>J?(W=Fe[pt+R[ae]],K[ve+R[ae]]):(W=96,0),N=1<<X-ne,L=M=1<<Ae;w[Y+(j>>ne)+(M-=N)]=q<<24|W<<16|V|0,M!==0;);for(N=1<<X-1;j&N;)N>>=1;if(N!==0?(j&=N-1,j+=N):j=0,ae++,--xe[X]==0){if(X===te)break;X=y[x+R[ae]]}if(le<X&&(j&I)!==O){for(ne===0&&(ne=le),Y+=L,se=1<<(Ae=X-ne);Ae+ne<te&&!((se-=xe[Ae+ne])<=0);)Ae++,se<<=1;if(ie+=1<<Ae,A===1&&852<ie||A===2&&592<ie)return 1;w[O=j&I]=le<<24|Ae<<16|Y-T|0}}return j!==0&&(w[Y+j]=X-ne<<24|64<<16|0),D.bits=le,0}},{"../utils/common":41}],51:[function(n,i,s){i.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,i,s){var c=n("../utils/common"),d=0,h=1;function p(G){for(var Z=G.length;0<=--Z;)G[Z]=0}var u=0,A=29,y=256,x=y+1+A,S=30,w=19,T=2*x+1,R=15,D=16,N=7,M=256,O=16,I=17,Y=18,J=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ge=new Array(2*(x+2));p(ge);var X=new Array(2*S);p(X);var ae=new Array(512);p(ae);var L=new Array(256);p(L);var te=new Array(A);p(te);var le,Ae,ne,se=new Array(S);function ie(G,Z,be,_e,me){this.static_tree=G,this.extra_bits=Z,this.extra_base=be,this.elems=_e,this.max_length=me,this.has_stree=G&&G.length}function j(G,Z){this.dyn_tree=G,this.max_code=0,this.stat_desc=Z}function K(G){return G<256?ae[G]:ae[256+(G>>>7)]}function ve(G,Z){G.pending_buf[G.pending++]=255&Z,G.pending_buf[G.pending++]=Z>>>8&255}function xe(G,Z,be){G.bi_valid>D-be?(G.bi_buf|=Z<<G.bi_valid&65535,ve(G,G.bi_buf),G.bi_buf=Z>>D-G.bi_valid,G.bi_valid+=be-D):(G.bi_buf|=Z<<G.bi_valid&65535,G.bi_valid+=be)}function Re(G,Z,be){xe(G,be[2*Z],be[2*Z+1])}function Fe(G,Z){for(var be=0;be|=1&G,G>>>=1,be<<=1,0<--Z;);return be>>>1}function pt(G,Z,be){var _e,me,ze=new Array(R+1),Qe=0;for(_e=1;_e<=R;_e++)ze[_e]=Qe=Qe+be[_e-1]<<1;for(me=0;me<=Z;me++){var Oe=G[2*me+1];Oe!==0&&(G[2*me]=Fe(ze[Oe]++,Oe))}}function lt(G){var Z;for(Z=0;Z<x;Z++)G.dyn_ltree[2*Z]=0;for(Z=0;Z<S;Z++)G.dyn_dtree[2*Z]=0;for(Z=0;Z<w;Z++)G.bl_tree[2*Z]=0;G.dyn_ltree[2*M]=1,G.opt_len=G.static_len=0,G.last_lit=G.matches=0}function ut(G){8<G.bi_valid?ve(G,G.bi_buf):0<G.bi_valid&&(G.pending_buf[G.pending++]=G.bi_buf),G.bi_buf=0,G.bi_valid=0}function Rt(G,Z,be,_e){var me=2*Z,ze=2*be;return G[me]<G[ze]||G[me]===G[ze]&&_e[Z]<=_e[be]}function je(G,Z,be){for(var _e=G.heap[be],me=be<<1;me<=G.heap_len&&(me<G.heap_len&&Rt(Z,G.heap[me+1],G.heap[me],G.depth)&&me++,!Rt(Z,_e,G.heap[me],G.depth));)G.heap[be]=G.heap[me],be=me,me<<=1;G.heap[be]=_e}function St(G,Z,be){var _e,me,ze,Qe,Oe=0;if(G.last_lit!==0)for(;_e=G.pending_buf[G.d_buf+2*Oe]<<8|G.pending_buf[G.d_buf+2*Oe+1],me=G.pending_buf[G.l_buf+Oe],Oe++,_e===0?Re(G,me,Z):(Re(G,(ze=L[me])+y+1,Z),(Qe=J[ze])!==0&&xe(G,me-=te[ze],Qe),Re(G,ze=K(--_e),be),(Qe=q[ze])!==0&&xe(G,_e-=se[ze],Qe)),Oe<G.last_lit;);Re(G,M,Z)}function he(G,Z){var be,_e,me,ze=Z.dyn_tree,Qe=Z.stat_desc.static_tree,Oe=Z.stat_desc.has_stree,dt=Z.stat_desc.elems,Jt=-1;for(G.heap_len=0,G.heap_max=T,be=0;be<dt;be++)ze[2*be]!==0?(G.heap[++G.heap_len]=Jt=be,G.depth[be]=0):ze[2*be+1]=0;for(;G.heap_len<2;)ze[2*(me=G.heap[++G.heap_len]=Jt<2?++Jt:0)]=1,G.depth[me]=0,G.opt_len--,Oe&&(G.static_len-=Qe[2*me+1]);for(Z.max_code=Jt,be=G.heap_len>>1;1<=be;be--)je(G,ze,be);for(me=dt;be=G.heap[1],G.heap[1]=G.heap[G.heap_len--],je(G,ze,1),_e=G.heap[1],G.heap[--G.heap_max]=be,G.heap[--G.heap_max]=_e,ze[2*me]=ze[2*be]+ze[2*_e],G.depth[me]=(G.depth[be]>=G.depth[_e]?G.depth[be]:G.depth[_e])+1,ze[2*be+1]=ze[2*_e+1]=me,G.heap[1]=me++,je(G,ze,1),2<=G.heap_len;);G.heap[--G.heap_max]=G.heap[1],(function(zt,pr){var qe,ht,Nt,et,pn,Wn,it=pr.dyn_tree,st=pr.max_code,En=pr.stat_desc.static_tree,un=pr.stat_desc.has_stree,Ut=pr.stat_desc.extra_bits,Ra=pr.stat_desc.extra_base,Da=pr.stat_desc.max_length,As=0;for(et=0;et<=R;et++)zt.bl_count[et]=0;for(it[2*zt.heap[zt.heap_max]+1]=0,qe=zt.heap_max+1;qe<T;qe++)Da<(et=it[2*it[2*(ht=zt.heap[qe])+1]+1]+1)&&(et=Da,As++),it[2*ht+1]=et,st<ht||(zt.bl_count[et]++,pn=0,Ra<=ht&&(pn=Ut[ht-Ra]),Wn=it[2*ht],zt.opt_len+=Wn*(et+pn),un&&(zt.static_len+=Wn*(En[2*ht+1]+pn)));if(As!==0){do{for(et=Da-1;zt.bl_count[et]===0;)et--;zt.bl_count[et]--,zt.bl_count[et+1]+=2,zt.bl_count[Da]--,As-=2}while(0<As);for(et=Da;et!==0;et--)for(ht=zt.bl_count[et];ht!==0;)st<(Nt=zt.heap[--qe])||(it[2*Nt+1]!==et&&(zt.opt_len+=(et-it[2*Nt+1])*it[2*Nt],it[2*Nt+1]=et),ht--)}})(G,Z),pt(ze,Jt,G.bl_count)}function k(G,Z,be){var _e,me,ze=-1,Qe=Z[1],Oe=0,dt=7,Jt=4;for(Qe===0&&(dt=138,Jt=3),Z[2*(be+1)+1]=65535,_e=0;_e<=be;_e++)me=Qe,Qe=Z[2*(_e+1)+1],++Oe<dt&&me===Qe||(Oe<Jt?G.bl_tree[2*me]+=Oe:me!==0?(me!==ze&&G.bl_tree[2*me]++,G.bl_tree[2*O]++):Oe<=10?G.bl_tree[2*I]++:G.bl_tree[2*Y]++,ze=me,Jt=(Oe=0)===Qe?(dt=138,3):me===Qe?(dt=6,3):(dt=7,4))}function ce(G,Z,be){var _e,me,ze=-1,Qe=Z[1],Oe=0,dt=7,Jt=4;for(Qe===0&&(dt=138,Jt=3),_e=0;_e<=be;_e++)if(me=Qe,Qe=Z[2*(_e+1)+1],!(++Oe<dt&&me===Qe)){if(Oe<Jt)for(;Re(G,me,G.bl_tree),--Oe!=0;);else me!==0?(me!==ze&&(Re(G,me,G.bl_tree),Oe--),Re(G,O,G.bl_tree),xe(G,Oe-3,2)):Oe<=10?(Re(G,I,G.bl_tree),xe(G,Oe-3,3)):(Re(G,Y,G.bl_tree),xe(G,Oe-11,7));ze=me,Jt=(Oe=0)===Qe?(dt=138,3):me===Qe?(dt=6,3):(dt=7,4)}}p(se);var ue=!1;function U(G,Z,be,_e){xe(G,(u<<1)+(_e?1:0),3),(function(me,ze,Qe,Oe){ut(me),ve(me,Qe),ve(me,~Qe),c.arraySet(me.pending_buf,me.window,ze,Qe,me.pending),me.pending+=Qe})(G,Z,be)}s._tr_init=function(G){ue||((function(){var Z,be,_e,me,ze,Qe=new Array(R+1);for(me=_e=0;me<A-1;me++)for(te[me]=_e,Z=0;Z<1<<J[me];Z++)L[_e++]=me;for(L[_e-1]=me,me=ze=0;me<16;me++)for(se[me]=ze,Z=0;Z<1<<q[me];Z++)ae[ze++]=me;for(ze>>=7;me<S;me++)for(se[me]=ze<<7,Z=0;Z<1<<q[me]-7;Z++)ae[256+ze++]=me;for(be=0;be<=R;be++)Qe[be]=0;for(Z=0;Z<=143;)ge[2*Z+1]=8,Z++,Qe[8]++;for(;Z<=255;)ge[2*Z+1]=9,Z++,Qe[9]++;for(;Z<=279;)ge[2*Z+1]=7,Z++,Qe[7]++;for(;Z<=287;)ge[2*Z+1]=8,Z++,Qe[8]++;for(pt(ge,x+1,Qe),Z=0;Z<S;Z++)X[2*Z+1]=5,X[2*Z]=Fe(Z,5);le=new ie(ge,J,y+1,x,R),Ae=new ie(X,q,0,S,R),ne=new ie(new Array(0),W,0,w,N)})(),ue=!0),G.l_desc=new j(G.dyn_ltree,le),G.d_desc=new j(G.dyn_dtree,Ae),G.bl_desc=new j(G.bl_tree,ne),G.bi_buf=0,G.bi_valid=0,lt(G)},s._tr_stored_block=U,s._tr_flush_block=function(G,Z,be,_e){var me,ze,Qe=0;0<G.level?(G.strm.data_type===2&&(G.strm.data_type=(function(Oe){var dt,Jt=4093624447;for(dt=0;dt<=31;dt++,Jt>>>=1)if(1&Jt&&Oe.dyn_ltree[2*dt]!==0)return d;if(Oe.dyn_ltree[18]!==0||Oe.dyn_ltree[20]!==0||Oe.dyn_ltree[26]!==0)return h;for(dt=32;dt<y;dt++)if(Oe.dyn_ltree[2*dt]!==0)return h;return d})(G)),he(G,G.l_desc),he(G,G.d_desc),Qe=(function(Oe){var dt;for(k(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),k(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),he(Oe,Oe.bl_desc),dt=w-1;3<=dt&&Oe.bl_tree[2*V[dt]+1]===0;dt--);return Oe.opt_len+=3*(dt+1)+5+5+4,dt})(G),me=G.opt_len+3+7>>>3,(ze=G.static_len+3+7>>>3)<=me&&(me=ze)):me=ze=be+5,be+4<=me&&Z!==-1?U(G,Z,be,_e):G.strategy===4||ze===me?(xe(G,2+(_e?1:0),3),St(G,ge,X)):(xe(G,4+(_e?1:0),3),(function(Oe,dt,Jt,zt){var pr;for(xe(Oe,dt-257,5),xe(Oe,Jt-1,5),xe(Oe,zt-4,4),pr=0;pr<zt;pr++)xe(Oe,Oe.bl_tree[2*V[pr]+1],3);ce(Oe,Oe.dyn_ltree,dt-1),ce(Oe,Oe.dyn_dtree,Jt-1)})(G,G.l_desc.max_code+1,G.d_desc.max_code+1,Qe+1),St(G,G.dyn_ltree,G.dyn_dtree)),lt(G),_e&&ut(G)},s._tr_tally=function(G,Z,be){return G.pending_buf[G.d_buf+2*G.last_lit]=Z>>>8&255,G.pending_buf[G.d_buf+2*G.last_lit+1]=255&Z,G.pending_buf[G.l_buf+G.last_lit]=255&be,G.last_lit++,Z===0?G.dyn_ltree[2*be]++:(G.matches++,Z--,G.dyn_ltree[2*(L[be]+y+1)]++,G.dyn_dtree[2*K(Z)]++),G.last_lit===G.lit_bufsize-1},s._tr_align=function(G){xe(G,2,3),Re(G,M,ge),(function(Z){Z.bi_valid===16?(ve(Z,Z.bi_buf),Z.bi_buf=0,Z.bi_valid=0):8<=Z.bi_valid&&(Z.pending_buf[Z.pending++]=255&Z.bi_buf,Z.bi_buf>>=8,Z.bi_valid-=8)})(G)}},{"../utils/common":41}],53:[function(n,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,i,s){(function(c){(function(d,h){if(!d.setImmediate){var p,u,A,y,x=1,S={},w=!1,T=d.document,R=Object.getPrototypeOf&&Object.getPrototypeOf(d);R=R&&R.setTimeout?R:d,p={}.toString.call(d.process)==="[object process]"?function(O){process.nextTick(function(){N(O)})}:(function(){if(d.postMessage&&!d.importScripts){var O=!0,I=d.onmessage;return d.onmessage=function(){O=!1},d.postMessage("","*"),d.onmessage=I,O}})()?(y="setImmediate$"+Math.random()+"$",d.addEventListener?d.addEventListener("message",M,!1):d.attachEvent("onmessage",M),function(O){d.postMessage(y+O,"*")}):d.MessageChannel?((A=new MessageChannel).port1.onmessage=function(O){N(O.data)},function(O){A.port2.postMessage(O)}):T&&"onreadystatechange"in T.createElement("script")?(u=T.documentElement,function(O){var I=T.createElement("script");I.onreadystatechange=function(){N(O),I.onreadystatechange=null,u.removeChild(I),I=null},u.appendChild(I)}):function(O){setTimeout(N,0,O)},R.setImmediate=function(O){typeof O!="function"&&(O=new Function(""+O));for(var I=new Array(arguments.length-1),Y=0;Y<I.length;Y++)I[Y]=arguments[Y+1];var J={callback:O,args:I};return S[x]=J,p(x),x++},R.clearImmediate=D}function D(O){delete S[O]}function N(O){if(w)setTimeout(N,0,O);else{var I=S[O];if(I){w=!0;try{(function(Y){var J=Y.callback,q=Y.args;switch(q.length){case 0:J();break;case 1:J(q[0]);break;case 2:J(q[0],q[1]);break;case 3:J(q[0],q[1],q[2]);break;default:J.apply(h,q)}})(I)}finally{D(O),w=!1}}}}function M(O){O.source===d&&typeof O.data=="string"&&O.data.indexOf(y)===0&&N(+O.data.slice(y.length))}})(typeof self>"u"?c===void 0?this:c:self)}).call(this,typeof Pp<"u"?Pp:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Km)),Km.exports}var yS=vS();const Wg=fA(yS);function Wa(t,e,n,i){function s(c){return c instanceof n?c:new n(function(d){d(c)})}return new(n||(n=Promise))(function(c,d){function h(A){try{u(i.next(A))}catch(y){d(y)}}function p(A){try{u(i.throw(A))}catch(y){d(y)}}function u(A){A.done?c(A.value):s(A.value).then(h,p)}u((i=i.apply(t,[])).next())})}const Lt=914400,Nf=12700,wr=`\r
41
41
  `,xS=2147483649,Jm=/^[0-9a-fA-F]{6}$/,bS=1.67,SS=27,mu={type:"solid",color:"666666",pt:1},lx=[.05,.1,.05,.1],gu={color:"363636",pt:1},Bl={color:"888888",style:"solid",size:1,cap:"flat"},_a="000000",pi=12,wS=18,vu="LAYOUT_16x9",yg="DEFAULT",cx="333333",kl={type:"outer",blur:3,offset:23e3/12700,angle:90,color:"000000",opacity:.35,rotateWithShape:!0},Df=[.5,.5,.5,.5],$y={color:"000000"},CS={size:8,color:"FFFFFF",opacity:.75},Ks="2094734552",eA="2094734553",pf="2094734554",xg="2094734555",ux="2094734556",of="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),Af=["C0504D","4F81BD","9BBB59","8064A2","4BACC6","F79646","628FC6","C86360","C0504D","4F81BD","9BBB59","8064A2","4BACC6","F79646","628FC6","C86360"],_S=["5DA5DA","FAA43A","60BD68","F17CB0","B2912F","B276B2","DECF3F","F15854","A7A7A7","5DA5DA","FAA43A","60BD68","F17CB0","B2912F","B276B2","DECF3F","F15854","A7A7A7"];var Cu;(function(t){t.left="left",t.center="center",t.right="right",t.justify="justify"})(Cu||(Cu={}));var _u;(function(t){t.b="b",t.ctr="ctr",t.t="t"})(_u||(_u={}));const dx="{F7021451-1387-4CA6-816F-3879F97B5CBC}";var bg;(function(t){t.arraybuffer="arraybuffer",t.base64="base64",t.binarystring="binarystring",t.blob="blob",t.nodebuffer="nodebuffer",t.uint8array="uint8array"})(bg||(bg={}));var Sg;(function(t){t.area="area",t.bar="bar",t.bar3d="bar3D",t.bubble="bubble",t.bubble3d="bubble3D",t.doughnut="doughnut",t.line="line",t.pie="pie",t.radar="radar",t.scatter="scatter"})(Sg||(Sg={}));var wg;(function(t){t.accentBorderCallout1="accentBorderCallout1",t.accentBorderCallout2="accentBorderCallout2",t.accentBorderCallout3="accentBorderCallout3",t.accentCallout1="accentCallout1",t.accentCallout2="accentCallout2",t.accentCallout3="accentCallout3",t.actionButtonBackPrevious="actionButtonBackPrevious",t.actionButtonBeginning="actionButtonBeginning",t.actionButtonBlank="actionButtonBlank",t.actionButtonDocument="actionButtonDocument",t.actionButtonEnd="actionButtonEnd",t.actionButtonForwardNext="actionButtonForwardNext",t.actionButtonHelp="actionButtonHelp",t.actionButtonHome="actionButtonHome",t.actionButtonInformation="actionButtonInformation",t.actionButtonMovie="actionButtonMovie",t.actionButtonReturn="actionButtonReturn",t.actionButtonSound="actionButtonSound",t.arc="arc",t.bentArrow="bentArrow",t.bentUpArrow="bentUpArrow",t.bevel="bevel",t.blockArc="blockArc",t.borderCallout1="borderCallout1",t.borderCallout2="borderCallout2",t.borderCallout3="borderCallout3",t.bracePair="bracePair",t.bracketPair="bracketPair",t.callout1="callout1",t.callout2="callout2",t.callout3="callout3",t.can="can",t.chartPlus="chartPlus",t.chartStar="chartStar",t.chartX="chartX",t.chevron="chevron",t.chord="chord",t.circularArrow="circularArrow",t.cloud="cloud",t.cloudCallout="cloudCallout",t.corner="corner",t.cornerTabs="cornerTabs",t.cube="cube",t.curvedDownArrow="curvedDownArrow",t.curvedLeftArrow="curvedLeftArrow",t.curvedRightArrow="curvedRightArrow",t.curvedUpArrow="curvedUpArrow",t.custGeom="custGeom",t.decagon="decagon",t.diagStripe="diagStripe",t.diamond="diamond",t.dodecagon="dodecagon",t.donut="donut",t.doubleWave="doubleWave",t.downArrow="downArrow",t.downArrowCallout="downArrowCallout",t.ellipse="ellipse",t.ellipseRibbon="ellipseRibbon",t.ellipseRibbon2="ellipseRibbon2",t.flowChartAlternateProcess="flowChartAlternateProcess",t.flowChartCollate="flowChartCollate",t.flowChartConnector="flowChartConnector",t.flowChartDecision="flowChartDecision",t.flowChartDelay="flowChartDelay",t.flowChartDisplay="flowChartDisplay",t.flowChartDocument="flowChartDocument",t.flowChartExtract="flowChartExtract",t.flowChartInputOutput="flowChartInputOutput",t.flowChartInternalStorage="flowChartInternalStorage",t.flowChartMagneticDisk="flowChartMagneticDisk",t.flowChartMagneticDrum="flowChartMagneticDrum",t.flowChartMagneticTape="flowChartMagneticTape",t.flowChartManualInput="flowChartManualInput",t.flowChartManualOperation="flowChartManualOperation",t.flowChartMerge="flowChartMerge",t.flowChartMultidocument="flowChartMultidocument",t.flowChartOfflineStorage="flowChartOfflineStorage",t.flowChartOffpageConnector="flowChartOffpageConnector",t.flowChartOnlineStorage="flowChartOnlineStorage",t.flowChartOr="flowChartOr",t.flowChartPredefinedProcess="flowChartPredefinedProcess",t.flowChartPreparation="flowChartPreparation",t.flowChartProcess="flowChartProcess",t.flowChartPunchedCard="flowChartPunchedCard",t.flowChartPunchedTape="flowChartPunchedTape",t.flowChartSort="flowChartSort",t.flowChartSummingJunction="flowChartSummingJunction",t.flowChartTerminator="flowChartTerminator",t.folderCorner="folderCorner",t.frame="frame",t.funnel="funnel",t.gear6="gear6",t.gear9="gear9",t.halfFrame="halfFrame",t.heart="heart",t.heptagon="heptagon",t.hexagon="hexagon",t.homePlate="homePlate",t.horizontalScroll="horizontalScroll",t.irregularSeal1="irregularSeal1",t.irregularSeal2="irregularSeal2",t.leftArrow="leftArrow",t.leftArrowCallout="leftArrowCallout",t.leftBrace="leftBrace",t.leftBracket="leftBracket",t.leftCircularArrow="leftCircularArrow",t.leftRightArrow="leftRightArrow",t.leftRightArrowCallout="leftRightArrowCallout",t.leftRightCircularArrow="leftRightCircularArrow",t.leftRightRibbon="leftRightRibbon",t.leftRightUpArrow="leftRightUpArrow",t.leftUpArrow="leftUpArrow",t.lightningBolt="lightningBolt",t.line="line",t.lineInv="lineInv",t.mathDivide="mathDivide",t.mathEqual="mathEqual",t.mathMinus="mathMinus",t.mathMultiply="mathMultiply",t.mathNotEqual="mathNotEqual",t.mathPlus="mathPlus",t.moon="moon",t.noSmoking="noSmoking",t.nonIsoscelesTrapezoid="nonIsoscelesTrapezoid",t.notchedRightArrow="notchedRightArrow",t.octagon="octagon",t.parallelogram="parallelogram",t.pentagon="pentagon",t.pie="pie",t.pieWedge="pieWedge",t.plaque="plaque",t.plaqueTabs="plaqueTabs",t.plus="plus",t.quadArrow="quadArrow",t.quadArrowCallout="quadArrowCallout",t.rect="rect",t.ribbon="ribbon",t.ribbon2="ribbon2",t.rightArrow="rightArrow",t.rightArrowCallout="rightArrowCallout",t.rightBrace="rightBrace",t.rightBracket="rightBracket",t.round1Rect="round1Rect",t.round2DiagRect="round2DiagRect",t.round2SameRect="round2SameRect",t.roundRect="roundRect",t.rtTriangle="rtTriangle",t.smileyFace="smileyFace",t.snip1Rect="snip1Rect",t.snip2DiagRect="snip2DiagRect",t.snip2SameRect="snip2SameRect",t.snipRoundRect="snipRoundRect",t.squareTabs="squareTabs",t.star10="star10",t.star12="star12",t.star16="star16",t.star24="star24",t.star32="star32",t.star4="star4",t.star5="star5",t.star6="star6",t.star7="star7",t.star8="star8",t.stripedRightArrow="stripedRightArrow",t.sun="sun",t.swooshArrow="swooshArrow",t.teardrop="teardrop",t.trapezoid="trapezoid",t.triangle="triangle",t.upArrow="upArrow",t.upArrowCallout="upArrowCallout",t.upDownArrow="upDownArrow",t.upDownArrowCallout="upDownArrowCallout",t.uturnArrow="uturnArrow",t.verticalScroll="verticalScroll",t.wave="wave",t.wedgeEllipseCallout="wedgeEllipseCallout",t.wedgeRectCallout="wedgeRectCallout",t.wedgeRoundRectCallout="wedgeRoundRectCallout"})(wg||(wg={}));var Xa;(function(t){t.text1="tx1",t.text2="tx2",t.background1="bg1",t.background2="bg2",t.accent1="accent1",t.accent2="accent2",t.accent3="accent3",t.accent4="accent4",t.accent5="accent5",t.accent6="accent6"})(Xa||(Xa={}));var Cg;(function(t){t.left="left",t.center="center",t.right="right",t.justify="justify"})(Cg||(Cg={}));var _g;(function(t){t.top="top",t.middle="middle",t.bottom="bottom"})(_g||(_g={}));var Ho;(function(t){t.ACTION_BUTTON_BACK_OR_PREVIOUS="actionButtonBackPrevious",t.ACTION_BUTTON_BEGINNING="actionButtonBeginning",t.ACTION_BUTTON_CUSTOM="actionButtonBlank",t.ACTION_BUTTON_DOCUMENT="actionButtonDocument",t.ACTION_BUTTON_END="actionButtonEnd",t.ACTION_BUTTON_FORWARD_OR_NEXT="actionButtonForwardNext",t.ACTION_BUTTON_HELP="actionButtonHelp",t.ACTION_BUTTON_HOME="actionButtonHome",t.ACTION_BUTTON_INFORMATION="actionButtonInformation",t.ACTION_BUTTON_MOVIE="actionButtonMovie",t.ACTION_BUTTON_RETURN="actionButtonReturn",t.ACTION_BUTTON_SOUND="actionButtonSound",t.ARC="arc",t.BALLOON="wedgeRoundRectCallout",t.BENT_ARROW="bentArrow",t.BENT_UP_ARROW="bentUpArrow",t.BEVEL="bevel",t.BLOCK_ARC="blockArc",t.CAN="can",t.CHART_PLUS="chartPlus",t.CHART_STAR="chartStar",t.CHART_X="chartX",t.CHEVRON="chevron",t.CHORD="chord",t.CIRCULAR_ARROW="circularArrow",t.CLOUD="cloud",t.CLOUD_CALLOUT="cloudCallout",t.CORNER="corner",t.CORNER_TABS="cornerTabs",t.CROSS="plus",t.CUBE="cube",t.CURVED_DOWN_ARROW="curvedDownArrow",t.CURVED_DOWN_RIBBON="ellipseRibbon",t.CURVED_LEFT_ARROW="curvedLeftArrow",t.CURVED_RIGHT_ARROW="curvedRightArrow",t.CURVED_UP_ARROW="curvedUpArrow",t.CURVED_UP_RIBBON="ellipseRibbon2",t.CUSTOM_GEOMETRY="custGeom",t.DECAGON="decagon",t.DIAGONAL_STRIPE="diagStripe",t.DIAMOND="diamond",t.DODECAGON="dodecagon",t.DONUT="donut",t.DOUBLE_BRACE="bracePair",t.DOUBLE_BRACKET="bracketPair",t.DOUBLE_WAVE="doubleWave",t.DOWN_ARROW="downArrow",t.DOWN_ARROW_CALLOUT="downArrowCallout",t.DOWN_RIBBON="ribbon",t.EXPLOSION1="irregularSeal1",t.EXPLOSION2="irregularSeal2",t.FLOWCHART_ALTERNATE_PROCESS="flowChartAlternateProcess",t.FLOWCHART_CARD="flowChartPunchedCard",t.FLOWCHART_COLLATE="flowChartCollate",t.FLOWCHART_CONNECTOR="flowChartConnector",t.FLOWCHART_DATA="flowChartInputOutput",t.FLOWCHART_DECISION="flowChartDecision",t.FLOWCHART_DELAY="flowChartDelay",t.FLOWCHART_DIRECT_ACCESS_STORAGE="flowChartMagneticDrum",t.FLOWCHART_DISPLAY="flowChartDisplay",t.FLOWCHART_DOCUMENT="flowChartDocument",t.FLOWCHART_EXTRACT="flowChartExtract",t.FLOWCHART_INTERNAL_STORAGE="flowChartInternalStorage",t.FLOWCHART_MAGNETIC_DISK="flowChartMagneticDisk",t.FLOWCHART_MANUAL_INPUT="flowChartManualInput",t.FLOWCHART_MANUAL_OPERATION="flowChartManualOperation",t.FLOWCHART_MERGE="flowChartMerge",t.FLOWCHART_MULTIDOCUMENT="flowChartMultidocument",t.FLOWCHART_OFFLINE_STORAGE="flowChartOfflineStorage",t.FLOWCHART_OFFPAGE_CONNECTOR="flowChartOffpageConnector",t.FLOWCHART_OR="flowChartOr",t.FLOWCHART_PREDEFINED_PROCESS="flowChartPredefinedProcess",t.FLOWCHART_PREPARATION="flowChartPreparation",t.FLOWCHART_PROCESS="flowChartProcess",t.FLOWCHART_PUNCHED_TAPE="flowChartPunchedTape",t.FLOWCHART_SEQUENTIAL_ACCESS_STORAGE="flowChartMagneticTape",t.FLOWCHART_SORT="flowChartSort",t.FLOWCHART_STORED_DATA="flowChartOnlineStorage",t.FLOWCHART_SUMMING_JUNCTION="flowChartSummingJunction",t.FLOWCHART_TERMINATOR="flowChartTerminator",t.FOLDED_CORNER="folderCorner",t.FRAME="frame",t.FUNNEL="funnel",t.GEAR_6="gear6",t.GEAR_9="gear9",t.HALF_FRAME="halfFrame",t.HEART="heart",t.HEPTAGON="heptagon",t.HEXAGON="hexagon",t.HORIZONTAL_SCROLL="horizontalScroll",t.ISOSCELES_TRIANGLE="triangle",t.LEFT_ARROW="leftArrow",t.LEFT_ARROW_CALLOUT="leftArrowCallout",t.LEFT_BRACE="leftBrace",t.LEFT_BRACKET="leftBracket",t.LEFT_CIRCULAR_ARROW="leftCircularArrow",t.LEFT_RIGHT_ARROW="leftRightArrow",t.LEFT_RIGHT_ARROW_CALLOUT="leftRightArrowCallout",t.LEFT_RIGHT_CIRCULAR_ARROW="leftRightCircularArrow",t.LEFT_RIGHT_RIBBON="leftRightRibbon",t.LEFT_RIGHT_UP_ARROW="leftRightUpArrow",t.LEFT_UP_ARROW="leftUpArrow",t.LIGHTNING_BOLT="lightningBolt",t.LINE_CALLOUT_1="borderCallout1",t.LINE_CALLOUT_1_ACCENT_BAR="accentCallout1",t.LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR="accentBorderCallout1",t.LINE_CALLOUT_1_NO_BORDER="callout1",t.LINE_CALLOUT_2="borderCallout2",t.LINE_CALLOUT_2_ACCENT_BAR="accentCallout2",t.LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR="accentBorderCallout2",t.LINE_CALLOUT_2_NO_BORDER="callout2",t.LINE_CALLOUT_3="borderCallout3",t.LINE_CALLOUT_3_ACCENT_BAR="accentCallout3",t.LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR="accentBorderCallout3",t.LINE_CALLOUT_3_NO_BORDER="callout3",t.LINE_CALLOUT_4="borderCallout4",t.LINE_CALLOUT_4_ACCENT_BAR="accentCallout3=4",t.LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR="accentBorderCallout4",t.LINE_CALLOUT_4_NO_BORDER="callout4",t.LINE="line",t.LINE_INVERSE="lineInv",t.MATH_DIVIDE="mathDivide",t.MATH_EQUAL="mathEqual",t.MATH_MINUS="mathMinus",t.MATH_MULTIPLY="mathMultiply",t.MATH_NOT_EQUAL="mathNotEqual",t.MATH_PLUS="mathPlus",t.MOON="moon",t.NON_ISOSCELES_TRAPEZOID="nonIsoscelesTrapezoid",t.NOTCHED_RIGHT_ARROW="notchedRightArrow",t.NO_SYMBOL="noSmoking",t.OCTAGON="octagon",t.OVAL="ellipse",t.OVAL_CALLOUT="wedgeEllipseCallout",t.PARALLELOGRAM="parallelogram",t.PENTAGON="homePlate",t.PIE="pie",t.PIE_WEDGE="pieWedge",t.PLAQUE="plaque",t.PLAQUE_TABS="plaqueTabs",t.QUAD_ARROW="quadArrow",t.QUAD_ARROW_CALLOUT="quadArrowCallout",t.RECTANGLE="rect",t.RECTANGULAR_CALLOUT="wedgeRectCallout",t.REGULAR_PENTAGON="pentagon",t.RIGHT_ARROW="rightArrow",t.RIGHT_ARROW_CALLOUT="rightArrowCallout",t.RIGHT_BRACE="rightBrace",t.RIGHT_BRACKET="rightBracket",t.RIGHT_TRIANGLE="rtTriangle",t.ROUNDED_RECTANGLE="roundRect",t.ROUNDED_RECTANGULAR_CALLOUT="wedgeRoundRectCallout",t.ROUND_1_RECTANGLE="round1Rect",t.ROUND_2_DIAG_RECTANGLE="round2DiagRect",t.ROUND_2_SAME_RECTANGLE="round2SameRect",t.SMILEY_FACE="smileyFace",t.SNIP_1_RECTANGLE="snip1Rect",t.SNIP_2_DIAG_RECTANGLE="snip2DiagRect",t.SNIP_2_SAME_RECTANGLE="snip2SameRect",t.SNIP_ROUND_RECTANGLE="snipRoundRect",t.SQUARE_TABS="squareTabs",t.STAR_10_POINT="star10",t.STAR_12_POINT="star12",t.STAR_16_POINT="star16",t.STAR_24_POINT="star24",t.STAR_32_POINT="star32",t.STAR_4_POINT="star4",t.STAR_5_POINT="star5",t.STAR_6_POINT="star6",t.STAR_7_POINT="star7",t.STAR_8_POINT="star8",t.STRIPED_RIGHT_ARROW="stripedRightArrow",t.SUN="sun",t.SWOOSH_ARROW="swooshArrow",t.TEAR="teardrop",t.TRAPEZOID="trapezoid",t.UP_ARROW="upArrow",t.UP_ARROW_CALLOUT="upArrowCallout",t.UP_DOWN_ARROW="upDownArrow",t.UP_DOWN_ARROW_CALLOUT="upDownArrowCallout",t.UP_RIBBON="ribbon2",t.U_TURN_ARROW="uturnArrow",t.VERTICAL_SCROLL="verticalScroll",t.WAVE="wave"})(Ho||(Ho={}));var Ue;(function(t){t.AREA="area",t.BAR="bar",t.BAR3D="bar3D",t.BUBBLE="bubble",t.BUBBLE3D="bubble3D",t.DOUGHNUT="doughnut",t.LINE="line",t.PIE="pie",t.RADAR="radar",t.SCATTER="scatter"})(Ue||(Ue={}));var oA;(function(t){t.TEXT1="tx1",t.TEXT2="tx2",t.BACKGROUND1="bg1",t.BACKGROUND2="bg2",t.ACCENT1="accent1",t.ACCENT2="accent2",t.ACCENT3="accent3",t.ACCENT4="accent4",t.ACCENT5="accent5",t.ACCENT6="accent6"})(oA||(oA={}));var Oo;(function(t){t.chart="chart",t.image="image",t.line="line",t.rect="rect",t.text="text",t.placeholder="placeholder"})(Oo||(Oo={}));var Tt;(function(t){t.chart="chart",t.hyperlink="hyperlink",t.image="image",t.media="media",t.online="online",t.placeholder="placeholder",t.table="table",t.tablecell="tablecell",t.text="text",t.notes="notes"})(Tt||(Tt={}));var Sf;(function(t){t.title="title",t.body="body",t.image="pic",t.chart="chart",t.table="tbl",t.media="media"})(Sf||(Sf={}));var Eu;(function(t){t.DEFAULT="&#x2022;",t.CHECK="&#x2713;",t.STAR="&#x2605;",t.TRIANGLE="&#x25B6;"})(Eu||(Eu={}));const Tu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAB3CAYAAAD1oOVhAAAGAUlEQVR4Xu2dT0xcRRzHf7tAYSsc0EBSIq2xEg8mtTGebVzEqOVIolz0siRE4gGTStqKwdpWsXoyGhMuyAVJOHBgqyvLNgonDkabeCBYW/8kTUr0wsJC+Wfm0bfuvn37Znbem9mR9303mJnf/Pb7ed95M7PDI5JIJPYJV5EC7e3t1N/fT62trdqViQCIu+bVgpIHEo/Hqbe3V/sdYVKHyWSSZmZm8ilVA0oeyNjYmEnaVC2Xvr6+qg5fAOJAz4DU1dURGzFSqZRVqtMpAFIGyMjICC0vL9PExIRWKADiAYTNshYWFrRCARAOEFZcCKWtrY0GBgaUTYkBRACIE4rKZwqACALR5RQAqQCIDqcASIVAVDsFQCSAqHQKgEgCUeUUAPEBRIVTAMQnEBvK5OQkbW9vk991CoAEAMQJxc86BUACAhKUUwAkQCBBOAVAAgbi1ykAogCIH6cAiCIgsk4BEIVAZJwCIIqBVLqiBxANQFgXS0tLND4+zl08AogmIG5OSSQS1gGKwgtANAIRcQqAaAbCe6YASBWA2E6xDyeyDUl7+AKQMkDYYevm5mZHabA/Li4uUiaTsYLau8QA4gLE/hU7wajyYtv1hReDAiAOxQcHBymbzark4BkbQKom/X8dp9Npmpqasn4BIAYAYSnYp+4BBEAMUcCwNOCQsAKZnp62NtQOw8WmwT09PUo+ijaHsOMx7GppaaH6+nolH0Z10K2tLVpdXbW6UfV3mNqBdHd3U1NTk2rtlMRfW1uj2dlZAFGirkRQAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJEQTWUTAGHqrm8caPzQ0WC1logbeiC7X3xJm0PvUmRzh45cuki1588FAmVn9BO6P3yF9utrqGH0MtW82S8UN9RA9v/4k7InjhcJFTs/TLVXLwmJV67S7vD7tHF5pKi46fYdosdOcOOGG8j1OcqefbFEJD9Q3GCwDhqT31HklS4A8VRgfYM2Op6k3bt/BQJl58J7lPvwg5JYNccepaMry0LPqFA7hCm39+NNyp2J0172b19QysGINj5CsRtpij57musOViH0QPJQXn6J9u7dlYJSFkbrMYolrwvDAJAC+WWdEpQz7FTgECeUCpzi6YxvvqXoM6eEhqnCSgDikEzUKUE7Aw7xuHctKB5OYU3dZlNR9syQdAaAcAYTC0pXF+39c09o2Ik+3EqxVKqiB7hbYAxZkk4pbBaEM+AQofv+wTrFwylBOQNABIGwavdfe4O2pg5elO+86l99nY58/VUF0byrYsjiSFluNlXYrOHcBar7+EogUADEQ0YRGHbzoKAASBkg2+9cpM1rV0tK2QOcXW7bLEFAARAXIF4w2DrDWoeUWaf4hQIgDiA8GPZ2iNfi0Q8UACkAIgrDbrJ385eDxaPLLrEsFAB5oG6lMPJQPLZZZKAACBGVhcG2Q+bmuLu2nk55e4jqPv1IeEoceiBeX7s2zCa5MAqdstl91vfXwaEGsv/rb5TtOFk6tWXOuJGh6KmnhO9sayrMninPx103JBtXblHkice58cINZP4Hyr5wpkgkdiChEmc4FWazLzenNKa/p0jncwDiqcD6BuWePk07t1asatZGoYQzSqA4nFJ7soNiP/+EUyfc25GI2GG53dHPrKo1g/1Cw4pIXLrzO+1c+/wg7tBbFDle/EbQcjFCPWQJCau5EoBoFpzXHYDwFNJcDiCaBed1ByA8hTSXA4hmwXndAQhPIc3lAKJZcF53AMJTSHM5gGgWnNcdgPAU0lwOIJoF53UHIDyFNJcfSiCdnZ0Ui8U0SxlMd7lcjubn561gh+Y1scFIU/0o/3sgeLO12E2k7UXKYumgFoAYdg8ACIAYpoBh6cAhAGKYAoalA4cAiGEKGJYOHAIghilgWDpwCIAYpoBh6cAhAGKYAoalA4cAiGEKGJYOHAIghilgWDpwCIAYpoBh6ZQ4JB6PKzviYthnNy4d9h+1M5mMlVckkUjsG5dhiBMCEMPg/wuOfrZZ/RSywQAAAABJRU5ErkJggg==",ES="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAVnCAYAAACzfHDVAAAAYHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjaVcjJDYAwDEXBu6ughBfH+YnLQSwSHVA+Yrkwx7HtPHabHuEWrQ+lBBAZ6TMweBWoCwUH8quZH6VWFXVT696zxp12ARkVFEqn8wB8AAAACXBIWXMAAC4jAAAuIwF4pT92AADZLklEQVR42uzdd5hV9Z0/8M+dmcsUZmDovYOhKCiKYhR7JJuoSTCWGFI0WUxijBoTTXazVlyza4maYm9rTRSJigVsqCDNQhHBAogKCEgRMjMMU+7vj93sL8kqClLmnPt6PY+PeXZM9vP9vO8jZ+Y955xMfJLjorBrRMuSgmiViyjN1Ee2oSCyucbIBAAAAAAAAADbXaYgcoWNUZcrirpMbdRsysa69wbF+rggGrf439vSF7seF12aFUTnxvoosGIAAAAAAACAXacgoqEgF++/VRgr4r5o+Kh/pvD//F8uiII+LaPrum/EXzqui2b1ddHGKgEAAAAAAAB2rVxEQWMmWrQtjHZlA6N2w2tR84//zP8pgHu3ib6NBdG+zdqorK6KVUXZaB85j3sGAAAAAAAAaAoaG6OwIBdtyneP2PBabPzbr/1dAdx3VHRtyESHiIhcYzQrLo7WmVzkcjmPgAYAAAAAAABoSgpy0eIfS+D/LYD7fy3abC6Inn/7X2hsjELlLwAAAAAAAEDT9D8lcM1fHwddFBFxyAVR9M686PVp/gfqayKiJiLqLBMAAAAAAABgh8hGRGlEUekn/6PFEb3ikNgQk6O+KCJi6dzoksv83/cB/1X9xoiaJdmoWxlRV1dk2QAAAAAAAAA7QTZbH9muERX96v7n9t7/q6Exinq3i86LI94pjOOisHUu+uYykfmof7h+Y8Sa6aVRt74gGhs9DRoAAAAAAABgZ2lsLIi69QWxeUUmSjs0/vedwR8hk4uydSfE+wVd6qOyMfMx7/mtj9jwUtbjngEAAAAAAAB2obrqolg7IxtR/9Ffb4wo7P5GtCwobRaVH/c/UvNmNuqqPfIZAAAAAAAAYFerqy6KmjezH/v1ktpoVZBr/PgCeMN7yl8AAAAAAACApmJLHW5jUVQWNDSP+Q3ZeLco4i9/+8X6teHRzwAAAAAAAABNSd3/dLn/oLAoqqIuVhXFxhhSGB/xqGjlLwAAAAAAAECTU1eTjaK/KXSLIv7SWB+bc5ko9YxnAAAAAAAAgATJFv393bz1EeV//c8F1gMAAAAAAACQDgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKREkRUAAACwrUpLSwuGDRvWfMCAAS26du3avKysrLiioqKkZcuWzZs1a1bcvHnz0tLS0rJsNtusuLi4ebNmzUoLCgo+8/eijY2N9Zs3b66pra2tqqur21xTU1NdVVVVs2nTptqNGzdWbdiwoeYvf/nL5hUrVlQtWLBgw6xZs6pqamoaJQYAAEDaKYABAACIiIghQ4aUHnTQQW379u3bql27dq3at2/fpkWLFq2bN29eWVpa2qpZs2bNCwsLm2ez2fLCwsLyoqKi8sLCwtKknK+hoaG6vr6+qqGh4S91dXV/aWhoqNq8eXNVTU3NuqqqqvUbNmxYu2rVqjWrV69e99Zbb6177rnnPpgzZ06NTwYAAABJogAGAADIA8OGDWt+xBFHdBwwYECnLl26dGjdunXHFi1adCgtLe1YUlLSvlmzZq0KCgqK07yDwsLCssLCwrKIaPdp/zuNjY21mzdvXrdp06ZVNTU172/YsGHl2rVr31+2bNnKBQsWrHjyySffnzVrVpVPGAAAAE1Fpuexsd9HfaF+ZcSal0ptCAAAIAE6deqUPf744zvtueeeXbp3796lbdu2XSorKzuXlpZ2KS0t7VBYWFhhSztGQ0PDxpqampU1NTXL169fv+yDDz5Y9s477yybPXv2sj/96U8rVqxYUWdLAAAAbE9t9q6Jog4f/TUFMAAAQEJks9nMt7/97Y4jRozo1bdv397t2rXrXl5e3rWsrKxzcXFx+4gosKUmp7G2tnZVTU3Nso0bNy5btWrV0tdff/2tJ598cvG999672noAAADYFgpgAACAhPne977X6a9Fb/v27Xu1bNmyV1lZWa8kvXOXLauvr9/wl7/8ZdG6desWL1u2bNHChQsX/fGPf1w8derUjbYDAADAliiAAQAAmqhsNps59dRTuxx66KH9+/Tp87n27dv3Ly8v719UVOSRzXlq06ZNKzZu3Pj6+++//8abb775xqOPPvrG3XffvcpmAAAA+CsFMAAAQBNx6qmndvniF784qHfv3v3btWv3uYqKis8VFhaW2wxbUl9fv37Dhg1vfPDBB68vXrz4jccee2z+jTfeuNxmAAAA8pMCGAAAYBc45phjWn/rW9/aq3///kPatGnTv6Kiop9HOLO9NDQ0VG/cuPGtNWvWLFy4cOGcO+6445WHHnporc0AAACknwIYAABgJzjjjDO6f+lLX9qrV69eg1u3bj2orKysR0RkbIadJFddXb103bp18xcvXjz30UcffeXqq69+x1oAAADSRwEMAACwnZWWlhb86le/2u3QQw8d1r17931btmw5qLCwsMxmaEoaGhqqP/zww/nvvPPOzGeeeWbW2LFj36ipqWm0GQAAgGRTAAMAAGwHP/7xj7t+9atf3bdXr15D27Ztu1c2m21jKyRJXV3dmg8++OCVRYsWvfznP/95xh/+8IdltgIAAJA8CmAAAIBtcOKJJ7Y75ZRTDujXr9+w1q1bD81ms61shTSpq6tbt3bt2pfffPPNWbfccsvUe++9d7WtAAAANH0KYAAAgE+hoqKi4IILLhg0YsSI/bp27bpfy5YtB2YymUKbIR/kcrmGDz/8cP6777474/nnn59x4YUXvrZx40aPiwYAAGiCFMAAAAAf4/jjj2/7/e9//8D+/fsf2Lp1630KCgpKbAUiGhsbN61fv37eW2+9NeWGG2545u67715lKwAAAE2DAhgAAOB/ZLPZzAUXXPC5I4888sDu3bsfWFFRsVtEFNgMbFl1dfWSd999d8qsWbNmnnvuuS+vW7euwVYAAAB2DQUwAACQ10pLSwsuvfTSQYcccsjBXbt2HVFWVtbDVmDb1dbWrnr//fdfmDp16uRf/vKXL65evbreVgAAAHYeBTAAAJB3Bg0aVHrBBRd8fs899zywQ4cOBxQVFbWwFdj+Ghsba9euXTtrzpw5T59//vmTX3755WpbAQAA2LEUwAAAQF4YNmxY8/POO+/gIUOGHOZ9vrDz/W0ZfNFFFz07a9asKlsBAADY/hTAAABAarVq1arwyiuv3HfEiBEjO3TocFBhYWGZrcCu19DQUP3+++8/O2XKlIk/+clPZm7cuLHRVgAAALYPBTAAAJAqrVq1Kvztb3+7/3777Xd4x44dRxQWFpbbCjRdDQ0NG99///0pM2bMeOqHP/zhC8pgAACAz0YBDAAApMJZZ53V45vf/OaRvXr1GllaWtrVRiB5ampq3l28ePHEO++8c9LVV1/9jo0AAABsPQUwAACQWMOHDy+/6KKLvjB48OCjW7RoMdBGID0+/PDDV+fNmzfhvPPOe3L69Ol/sREAAIBPRwEMAAAkSqtWrQpvuOGGQ/bbb79/atOmzX6ZTCZrK5BeuVyubs2aNTNmzJjx2JgxYyavW7euwVYAAAA+ngIYAABIhB//+Mddv/e9732lZ8+e/1RcXNzWRiD/1NbWfvD2228/dssttzz029/+9l0bAQAA+L8UwAAAQJNVUVFRcO21137+4IMPPrZ169b7ZTKZAlsBIqJxzZo1M59//vnxp5122hR3BQMAAPx/CmAAAKDJOeWUUzqefvrpx/bu3ftL2Wy2jY0AH6e+vn7j0qVLH/vd7373x+uvv36ZjQAAAPlOAQwAADQJ2Ww2c+uttx5wyCGHnNC6deu9I8LdvsDWaFy7du1L06ZN+/OPfvSjZ1evXl1vJQAAQD5SAAMAALtU//79S6655pp/2nPPPY8tLy/vayPAZ1VTU7NswYIF488999wHp06dutFGAACAfKIABgAAdomf//znPU855ZQTu3btemRhYWGZjQDbW2NjY92KFSuevOWWW+689NJLF9kIAACQDxTAAADATuMxz8Cusn79+rlPP/30f5188slT6+rqcjYCAACklQIYAADY4fr27Vv8hz/84a+Pee5nI8CuUlNT8+68efPu/8EPfvDgwoULN9kIAACQNgpgAABghxkyZEjpNddc89XBgwefWFxc3MFGgKaitrZ21dy5c+/5yU9+8uc5c+bU2AgAAJAWWyqAPYoNAADYJqNHj+4wb968n06ZMuXRYcOGnaH8BZqa4uLi9sOGDTtjypQpj86bN++nJ510UntbAQAA0s4dwAAAwFY599xze33/+9//dufOnY/IZDJZGwGSIpfL1S1fvvzJG2644fbLLrvsbRsBAACSyiOgAQCAz+y8887r+53vfOfbHTt2PDyTyRTaCJBUuVyuYcWKFU/cdNNN//XrX/96sY0AAABJowAGAAC22WWXXTboG9/4xg9at249zDaAtFm7du2su++++9pzzjnnNdsAAACSQgEMAABsNcUvkE8UwQAAQJIogAEAgE9N8Qvks7Vr18665557rvv5z38+3zYAAICmaksFcGHlwOj6UV9orIqoWZG1PQAAyBO/+MUvet9xxx3nHHrooT8pLS3tYiNAPiotLe2y7777HvP973+/X1lZ2ZIpU6assxUAAKCpKetcHwXlH/01BTAAAOS5M844o/u99957zpe//OWflZeX94qIjK0AeS5TXl7e8+CDDx71/e9/v3dEvDVjxowPrQUAAGgqFMAAAMD/ceKJJ7a77777fjJq1Kh/KS8v7xOKX4B/lCkvL+99+OGHj/rWt77VfvXq1Qvnz59fbS0AAMCutqUC2DuAAQAgzwwdOrTs+uuvP6l///4nFRYWltkI20NjY2Ns2rQpqquro6amJurr62PTpk2xefPmqK+vj+rq6qivr4/NmzfHpk2boqGhYZv/fxUWFkZJSUk0a9YsioqKoqysLIqKiqJZs2ZRUlISRUVFUVpa+r9/FRQUCIjtoqGhoeq11167a8yYMffMmTOnxkYAAIBdZUvvAFYAAwBAnujUqVP2nnvuGbXXXnudnM1mK22Ej9PQ0BAbN26MDRs2/J+/Nm7cGBs3boyamprYtGlTbNq0KWpqaqK2trbJnqe4uDhKSkqitLT0f/9eUVERFRUV0aJFi//zV0VFRRQWFvog8LHq6urWvvjii7eceOKJf169enW9jQAAADubAhgAAPLcXXfdddAXv/jF00tLS7vZRn7L5XKxYcOGWLt2baxbty7Wrl37d3+tW7cuNmzYkPd7atGiRbRu3TpatWoVrVu3jjZt2vzvf27dunW0aNHCh4morq5e+sgjj1zzne98Z6ptAAAAO5MCGAAA8tTVV189+MQTTzyzoqJioG3kj8bGxli5cmUsX748Pvjgg1i9evX//n3t2rXR2NhoSZ9RYWFhtGrVKtq1axdt27b937937tw5OnTo4LHTeWbDhg3z77333qvOPPPMebYBAADsDApgAADIM1/72tfaXHrppad27979qIjQRKVUQ0NDrFq1KlasWBHvv//+//595cqVTfqRzGlXXFwcHTp0iI4dO0bnzp2jY8eO0alTp2jXrp1HS6dYLpdrfOeddx76+c9/fv2ECRPW2QgAALAjKYABACBP9OrVq9ldd931jT322OM7hYWFZTaSHh9++GG88847sXTp0njvvfdixYoVsXr16mhoaLCchCgsLIz27dtHp06dolu3btG9e/fo3r27x0mnTENDQ9W8efNu++Y3v/nHJUuWbLYRAABgR1AAAwBAHrjrrrtG/NM//dOZJSUlXWwj2davXx9Lly6Nd955539L3w8//NBiUqqysvJ/y+C//tWqVSuLSbiamppljz322G9Gjx49xTYAAIDtTQEMAAAp9qtf/arPD3/4w5+1atVqL9tIno0bN8aSJUvirbfeikWLFsV7770XmzZtspg8V1JSEl27do0+ffpE3759o3fv3lFeXm4xCbRu3bqXr7322ivGjh27yDYAAIDtRQEMAAApNGjQoNI77rjju7vttttJBQUFWRtJhtWrV8ebb74ZixcvjiVLlsTy5cujsbHRYtiigoKC6Ny5c/Tu3Tt69+4d/fr1i7Zt21pMQjQ2Nta98cYbd33rW9+6ff78+TU2AgAAfFYKYAAASJHS0tKCBx988Jj99tvvn7PZbBsbaboaGhri7bffjrfeeisWLFgQS5YscXcv201FRUX06tUr+vbtG3379o2ePXtGYWGhxTRhdXV1a2bMmHHjV77ylYdqamr85gcAALDNFMAAAJASp59+erdf/vKX51ZWVu5jG03T6tWr47XXXouFCxfGm2++GRs3brQUdooWLVpE3759Y8CAATFw4EB3CDdh69evf/E//uM//vPqq69+xzYAAIBtoQAGAICEGzRoUOm99977w969ex+byWTc4teErF+/PubNmxcLFiyIN954Q+FLk9GiRYvo169fDBgwIPbYY4+orKy0lCYkl8s1LF68eNyJJ554rcdCAwAAW0sBDAAACXbNNdcMOemkk35RVlbWyzZ2vVwuF++++27MnTs3XnvttViyZIl3+NLkFRQURK9evWLQoEExePDg6Natm6U0EdXV1UvuvvvuX//kJz+ZYxsAAMCnpQAGAIAEOuqoo1r99re//VmHDh0Ot41da9OmTTF79uyYO3duLFy4MKqqqiyFRGvevHn0798/Bg8eHHvuuWeUlJRYyi62cuXKp04//fTLJ0yYsM42AACAT6IABgCAhBk3btwRRxxxxFnZbLaNbewaVVVVMXfu3Jg7d27Mnz8/amtrLYVUKi4ujoEDB8bgwYNj8ODBUV5ebim7SF1d3ZqnnnrqqlGjRj1hGwAAwJYogAEAICFOOeWUjhdddNEvW7duvZ9t7HwrV66MWbNmxdy5c+Odd96JXC5nKeSdzp07x9577x3Dhg2LDh06WMgusHbt2hnnnXfepbfccsv7tgEAAHwUBTAAADRxpaWlBU899dQ3Bw8e/L2CggLPYt2JVqxYES+99FK89NJLsXz5cguBv/HXMnjvvfeOTp06WchO1NjYuGnu3Lk3H3744XfV1NR40TgAAPB3FMAAANCEjR49usOll176yzZt2gy3jZ1j/fr18eKLL8bMmTNj6dKlFgKfQs+ePWPfffeNYcOGRYsWLSxkJ1mzZs0L55577q/vvvvuVbYBAAD8lQIYAACaoIqKioKJEyd+c/Dgwd8vKCgotpEda8OGDfHiiy/G9OnTlb7wGfXo0SOGDx8ew4YNi4qKCgvZwdwNDAAA/CMFMAAANDGnnHJKx7Fjx/5rZWXlMNvYcerr6+PVV1+NGTNmxLx586Kurs5SYDvKZrMxZMiQ2HfffWP33XePwsJCS9mB1q5dO+MXv/jFv995550rbQMAAPKbAhgAAJqIbDabeeKJJ47fZ599fuSu3x0jl8vFwoULY/r06TF79uzYtGmTpcBOUFpaGkOGDInhw4fHgAEDLGQHaWhoqJ42bdo1Rx555J9tAwAA8pcCGAAAmoDjjz++7ZVXXvmr1q1be9fvDrBmzZqYNm1azJw5M1audHMc7EodO3aMz3/+87H//vt7X/CO+3fetDPPPPOScePGfWAbAACQfxTAAACwi9100037HXvssf9WXFzc1ja2n1wuF6+99lo8//zzMW/evKivr7cUaEKKiopizz33jBEjRsTnPve5yGQylrId1dbWrvrjH/948Q9+8INZtgEAAPlFAQwAALvIkCFDSu+///5zunTp8k+2sf2sXbs2Jk+eHNOnT48PP/zQQiABKisrY8SIEXHIIYdEeXm5hWxHy5Yte+zrX//6f86ZM6fGNgAAID9sqQAurBwYXT/qC41VETUrsrYHAADb6IILLtjt97///VVt2rQZZhvbx+LFi2P8+PFx9913xxtvvBG1tbWWAgmxadOmeOONN+LZZ5+NtWvXRps2bTweejtp0aJFv5NOOumg0tLSuc8+++xaGwEAgPQr61wfBR/zu7XuAAYAgO0sm81mJk2a9PVhw4b9pKCgwG9VfkZ1dXUxY8aMeOaZZ+K9996zEEiRfv36xSGHHBJDhw6NgoICC/mMGhsbN8+YMeOaL37xi+Pq6upyNgIAAOnlEdAAALCTHH/88W2vuuqqCyorK/exjc9mzZo18dRTT8XUqVNj06ZNFgIpVlFREZ///OfjsMMOi8rKSgv5jNavXz/r9NNPv3DcuHEf2AYAAKSTAhgAAHaC22677fNf+9rXzstms5W2se0WLVoUjz/+eMybNy9yOTewQT4pKiqKIUOGxBFHHBG9e/e2kM+grq5u3QMPPHDRySefPM02AAAgfRTAAACwA1VUVBQ8/fTTpwwcOPCUTCbjGabbIJfLxauvvhpPPvlkLFy40EIgz2UymRgwYEAcccQRMWjQIAvZ9n+3Ns6fP/+Www8//JaNGzc22ggAAKTHlgrgwsqB0fWjvtBYFVGzwuvKAABgS0488cR2EyZMuLx79+5fzmQyGRvZOo2NjTFr1qy49dZb48knn4wPPvC0UuC/rV69OmbMmBFz5syJ0tLS6NSpU/jX7NbJZDKZ9u3bD/3+978/dPny5TNfffXValsBAIB0KOtcHwXlH/O9gDuAAQBg29x66637H3vssRcWFRW1sI2tU1NTE0899VQ8++yzsWHDBgsBPlGLFi3i4IMPjsMPPzxKS/28YmvV19d/OG7cuPNPPvnk6bYBAADJ5xHQAACwHWWz2cyzzz77rSFDhvzAI5+3zqZNm2Ly5Mnx1FNPKX6BbdKiRYs47LDD4pBDDlEEb6VcLtfwyiuvXHfooYfeWVdX5yXrAACQYApgAADYTo455pjW11133cWVlZV728ant2HDhnj88cdjypQpUVtbayHAZ1ZcXBwHHnhgfPGLX4wWLTyIYWusWbNm2re//e3zn3nmGb+JAwAACeUdwAAAsB1cfvnlu1900UW/LS8v72cbn05VVVVMmDAhbrnllnjzzTejoaHBUoDtoqGhIZYsWRLPPfdc1NTURI8ePSKb9XOMT6OsrKzb17/+9SPbtm0774knnlhtIwAAkMDreu8ABgCAz+bhhx/+8qGHHnpOQUFBsW18sk2bNsUzzzwTTzzxRFRVVVkIsMOVl5fHkUceGYccckgUF/tX9afR2Ni46emnn/71Mccc87htAABAsngENAAAbKN27doVTZ48+YxevXodZxufrK6uLp5++umYOHGi4hfYJSoqKuKLX/xiHHzwwe4I/pQWLVr0x4MOOuiadevWeUwDAAAkhEdAAwDANjj22GPbPvzww7/p2LHjobaxZXV1dfHkk0/GddddF3Pnzo26ujpLAXaJzZs3x2uvvRbPPfdcRET06NEjCgsLLWYLWrduvfv3vve9fd9+++1pCxYsqLYRAABo+rb0CGgFMAAAfITLL7989wsuuOB3zZs372UbH6+xsTGmTJkS119/fbzyyiuKX6DJ2Lx5cyxYsCCmT58excXF0a1bt8hkMhbzMUpKSjp8+ctfPrJt27ZzvBcYAACaPu8ABgCArTB+/Pgjv/CFL/xLQUFBiW18vAULFsT48eNj6dKllgE0eT169IivfOUrMWjQIMvYgsbGxpqJEydecuyxxz5pGwAA0HR5BzAAAHwK7dq1K3ruued+1qNHj6/axsdbtGhR3H///bF48WLLABKnV69ecdxxx0WfPn0sYwuWLl3654MOOujy1atX19sGAAA0Pd4BDAAAn2DYsGHNn3766V936tTpC7bx0TZs2BD33Xdf/PGPf4y1a9daCJBI69evj2nTpsW6deuiZ8+eUVLiYQ8fpbKysv+3v/3t/lOmTJmyfPlyz/cHAIAmxjuAAQBgC372s5/1uP76669t0aKF54J+hJqamhg/fnzcfPPN8fbbb0cul7MUINFyuVy888478cwzz0RVVVX07t07slk/A/lHZWVl3U488cTD6+rqZkyfPv1DGwEAgCZ0va4ABgCAj3bFFVfscdZZZ11dXFzcwTb+Xi6XixkzZsR1110XCxYsiMbGRksBUqWxsTGWLFkSM2bMiPLy8ujSpUtkMhmL+RvZbLbFQQcddHibNm1mP/HEE6ttBAAAmoYtFcDeAQwAQN6aNGnSqAMOOODsTCZTaBt/b9GiRXHPPffEu+++axlA3ujWrVucdNJJ0bt3b8v4B7lcrm7y5Mm//vKXv/yIbQAAwK63pXcAK4ABAMg7paWlBTNnzjyzT58+x9vG39uwYUOMGzcuZsyY4VHPQF7KZDKx3377xde//vWoqKiwkH+waNGiP+27775X1dTUeCwEAADsQgpgAAD4H926dctOnjz5V506dRppG/9fLpeLqVOnxp///OfYuHGjhQB5r6KiIkaNGhX777+/x0L/g+XLlz9+6KGHXvLuu+/W2QYAAOwaWyqAvQMYAIC8MXz48PInnnjiynbt2o2wjf/vnXfeiWuvvTaee+652Lx5s4UARMTmzZtjzpw58dprr0XPnj2jRYsWlvI/Kioq+n7rW98aMnXq1Ofee+89f3AAAMAusKV3ACuAAQDIC9/+9rc73n777X9o0aLFANv4b1VVVXHXXXfFvffeG+vXr7cQgI+wbt26eP7552P9+vWx2267RVFRkaVERElJSefjjjvuoA8++GDKK6+88hcbAQCAnUsBDABAXjv//PP7XXzxxX8oKSnpbBv/bfr06XHttdfGokWLLAPgU3jnnXdi2rRp0bp16+jc2R8nERHZbLbyC1/4whElJSUvTp48eY2NAADAzqMABgAgb/3ud7/b60c/+tFVRUVFrWwjYs2aNXHzzTfHpEmTora21kIAtkJtbW289NJL8c4770Tfvn2jtLQ073dSWFhYNnz48C/26dNn4UMPPbTMpwQAAHYOBTAAAHnp1ltv3f+b3/zmfxYWFjbP913kcrl4/vnn4/rrr4/ly5f7cAB8BitXroxp06ZFRUVFdOvWLTKZTF7vo6CgIDto0KBDBw0atOiBBx54xycEAAB2vC0VwJmex8Z+H/WF+pURa17ym6wAACTTww8//KXDDjvsXzKZTN6/rPGDDz6I22+/Pd544w0fDIDtbMCAAfGtb30r2rRpk/e7yOVyjVOmTPn1yJEjH/LJAACAHavN3jVR1OGjv6YABgAgdV555ZXTPve5z30r3/fQ0NAQjz32WDz++ONRV1fngwGwg2Sz2Tj66KPjC1/4QhQUFOT9Pl5//fU79tprr9/7ZAAAwI6jAAYAIC9ks9nMyy+/fFafPn2Oz/ddvPvuu3HbbbfFe++954MBsJN069YtvvOd70S3bt3yfhdLliy5f5999rmypqam0ScDAAC2PwUwAACpV1paWjBr1qyzevfufVw+7yGXy8WTTz4ZDz74oLt+AXaBbDYbxxxzTBxxxBF5fzfw0qVLHxg6dOjlSmAAANj+FMAAAKRar169mk2ePHlsu3btDsrnPaxcuTJuueWWePvtt30oAHaxnj17ximnnBIdOnTI6z2sXr16yiGHHPIvS5Ys2exTAQAA28+WCuDCyoHR9aO+0FgVUbMia3sAADRpQ4cOLXvqqacub9Omzf75uoNcLhfPPPNMXH/99bF27VofCoAmYP369TFlypQoKSmJnj17RiaTycs9NG/evPtJJ500ZPLkyc+sWLHCoykAAGA7KetcHwXlH/01BTAAAIk1ZMiQ0kceeeSKVq1a7Z2vO6iuro7bb789nnjiiWhs9IRNgKaksbEx5s+fH++//34MGDAgstn8/DlLaWlpp6997WuDn3rqqadXrlxZ75MBAACfnQIYAIDUOfTQQ1s8+OCDv2/ZsuUe+bqDOXPmxNVXX+2RzwBN3PLly+OFF16Ijh075u0joUtLSzudcMIJ+7/00ktPv/3227U+FQAA8NkogAEASJVhw4Y1v++++37TsmXLQfl4/vr6+hg/fnz88Y9/jNpaP0MHSILNmzfHiy++GJs3b47ddtstCgoK8m4HxcXFbY866qg9n3vuuaeXL1/ucdAAAPAZKIABAEiNI488snLcuHG/b9GixcB8PP97770XV111VcyZM8eHASCBFi1aFC+//HL069cvWrRokXfnLykp6XDcccftP2fOnGcWLVq0yScCAAC2jQIYAIBUOPLIIyvvvPPO35aXl++Wj+d/+umn48Ybb4wPP/zQhwEgwf7yl7/ECy+8ECUlJdGrV6+8O3+zZs3aHHXUUfspgQEAYNspgAEASLxjjz227W233faH5s2b98m3s1dVVcXNN98cTz31VDQ2NvowAKRAY2NjzJ8/P5YtWxYDBgyIZs2a5dX5mzVr1uaYY4458M0333xm4cKFNT4RAACwdRTAAAAk2qGHHtritttuuzofy9+33347rrnmmli8eLEPAkAKvf/++/HKK69Enz59orKyMq/Ons1mK4888sh9Zs6c+dTSpUs3+zQAAMCnpwAGACCxjjjiiJb33nvvteXl5f3y6dy5XC4mTZoUN998c1RVVfkgAKRYVVVVTJ06NbLZbPTp0ycymUzenL24uLjtV7/61c+/8sorTy1evLjWpwEAAD4dBTAAAIl06KGHtrj33nt/l2/lb3V1ddx0000xefLkyOVyPggAeSCXy8WCBQvi3Xffjd133z2y2fz5mUyzZs1aH3300fvNmDHjSXcCAwDAp6MABgAgcYYOHVo2fvz4qysqKgbk07mXLVsWV111lUc+A+SplStXxiuvvBKf+9znoqKiIm/O3axZszZHH3300GeeeebJFStW1PkkAADAlimAAQBIlCFDhpQ++uij17Rs2XL3fDr31KlT49prr42NGzf6EADksaqqqpg+fXq0bds2unTpkjfnLikpaT9q1KihTz755JMrV66s90kAAICPt6UCuMB6AABoSjp16pSdMGHCv1dWVu6RL2dubGyMcePGxR133BF1dW56AiCitrY2br755hg/fnw0NjbmzbkrKyv3mDBhwr9369bNXQkAALCNFMAAADQZrVq1Kpw+ffolbdq02T9fzlxdXR2/+93vYtKkSd73C8DfyeVy8fjjj8fvf//7qK6uzptzt2nTZv8pU6Zc0qpVq0KfAgAA2HoKYAAAmoSKioqC2bNnX9KuXbuD8uXMS5cujYsuuijmz5/vAwDAx3r11VfjoosuiqVLl+bNmdu1a3fQ7Nmz/72iosLPrgAAYCu5iAYAoEmYOXPmz9q1a3dIvpz35ZdfjiuuuCLWrVsnfAA+0bp16+KKK66Il19+OW/O3K5du4Nnzpz5M+kDAMDWUQADALDLvfjii2N69OgxKh/Omsvl4oEHHogbbrghamtrhQ/Ap1ZbWxs33HBDPPDAA3nz2oAePXqMevHFF8dIHwAAPj0FMAAAu9SkSZO+NnDgwFPy4ax1dXVx8803x8SJE73vF4BtksvlYuLEiXHLLbdEXV1dXpx54MCBJ0+aNOlr0gcAgE9HAQwAwC7z6KOPHnXggQeekw9nXbduXfz617+OWbNmCR6Az2zmzJnx61//Ol9eJZA58MADz3n00UePkjwAAHyywsqB0fWjvtBYFVGzImtDAADsEDfeeOO+Rx999EWZTKYw7Wddvnx5XHXVVbFy5UrBA7DdbNiwIWbPnh0DBw6MioqKtB8307179/179uz56sMPP7xc+gAA5LuyzvVRUP7RX1MAAwCw011xxRV7fPe7372qoKCgWdrPOmfOnPjtb38bGzduFDwA2111dXVMmzYtOnfuHB07dkz1WTOZTOHuu+9+eJs2bV6aNGnSKukDAJDPFMAAADQZZ5xxRvef/exnvy0sLCxP+1knTJgQd999d9TX1wsegB2moaEhXnrppchms9G3b99UnzWTyRTttddeB/3lL395dubMmRukDwBAvlIAAwDQJBx00EEVf/jDH64pLi7ulOZz5nK5eOCBB+Kxxx4TOgA77c+eBQsWRF1dXfTv3z8ymUxqz1pQUFBywAEHDJs+ffqkpUuXbpY+AAD5aEsFcIH1AACwMwwaNKj0vvvuu7qsrKxXms9ZV1cX1113XUyaNEnoAOx0EydOjOuvvz7q6upSfc6ysrJef/rTn67u379/idQBAODvKYABANjhKioqCh577LGLKyoqBqb5nNXV1XHNNdfE7NmzhQ7ALvPKK6/ElVdeGVVVVak+Z4sWLQZOnDhxbEVFhZ9vAQDA33CBDADADjdz5syftW3b9sA0n3HdunVx2WWXxRtvvCFwAHa5xYsXx2WXXRZr165N9TnbtWt34MyZM38mcQAA+P8UwAAA7FBPPvnkqB49eoxK8xlXrVoVV1xxRSxfvlzgADQZK1asiCuuuCJWrlyZ6nP26NFj1KRJk0ZJHAAA/lth5cDo+lFfaKyKqFmRtSEAALbZjTfeuO+XvvSlCzOZTGp/8fDdd9+NK6+8MtatWydwAJqc6urqmDVrVvTv3z8qKytTe85u3boN79mz57yHH37Yb2MBAJAXyjrXR0H5R39NAQwAwA5x3nnn9T311FOvLigoKE7rGV977bW45pprorq6WuAANFmbN2+OGTNmRI8ePaJ9+/apPGMmkykYNGjQIYWFhVOee+45v5UFAEDqKYABANipjjrqqFb/8R//8YdmzZq1SusZX3755bj++uujrq5O4AA0eQ0NDfHSSy9Fp06dolOnTqk8Y0FBQXbYsGGfnz9//qQ33nhjk9QBAEizLRXA3gEMAMB21a1bt+wNN9zwnyUlJR3TesYpU6bEjTfeGPX19QIHIDHq6+vjxhtvjKlTp6b2jCUlJZ1uuOGG/+jWrZu7GgAAyFsKYAAAtqunn376XyorK/dI6/kmTZoUd955ZzQ2NgobgMRpbGyMO+64I5588snUnrGysnLw008//UtpAwCQrxTAAABsN88///w3unTp8k9pPd/EiRNj3LhxkcvlhA1AYuVyubj//vtTXQJ36dLlS88+++yJ0gYAIB95BzAAANvFTTfdNPzII488L5PJZNJ4vsceeyzGjx8vaABS47XXXotmzZpF3759U3m+zp0779urV695Dz/88DJpAwCQNlt6B7ACGACAz+wXv/hF7x/+8IdXFxQUNEvj+R544IF45JFHBA1A6ixYsCDq6upiwIABqTtbJpPJDBo06ODGxsbnpk6dul7aAACkiQIYAIAd5oADDqj43e9+99tmzZq1TeP5xo0bF5MmTRI0AKm1aNGi2Lx5cwwcODB1ZysoKMjut99+w5577rnH33vvvc3SBgAgLbZUAHsHMAAA2yybzWbuvPPOfyktLe2exvNNmDBB+QtAXpg0aVI89NBDqTxbaWlpj3vuuedfstlsRtIAAOQDBTAAANvs+eef/06HDh0OTePZHn744Xj44YeFDEDeeOSRR+LPf/5zKs/WoUOHw5599tlvSxkAgHygAAYAYJvcd999hw8ePPjUNJ7t/vvvjwkTJggZgLzz2GOPxX333ZfKs+25554/+NOf/nSYlAEASDvvAAYAYKudccYZ3ceMGXN5QUFBcdrONnHixHjkkUeEDEDeWrx4cWSz2ejbt2/ajpbp06fPvn/5y18mz5w5c4OkAQBIsi29A1gBDADAVhk2bFjzG2+88Q/NmjVrl7azPfroo6l99CUAbI2FCxdGUVFR9OvXL1XnKigoKD7wwAP3e/LJJx9dsWJFnaQBAEiqLRXAHgENAMBWuffee39ZWlraPW3nevzxx+PBBx8UMAD8jz//+c8xceLE1J2rtLS0x3333fdLCQMAkFYKYAAAPrVJkyaN6tSp0xEpPFeMHz9ewADwD8aPHx+TJ09O3bk6der0hUmTJn1VwgAApJFHQAMA8Kmcd955fU888cR/z2QyRWk618yZM+Puu+8WMAB8jNdeey06duwYnTt3TtW5unbtuk9BQcHzzz333DopAwCQNN4BDADAZ3LEEUe0vOKKK67NZrOVaTrXyy+/HDfffHPkcjkhA8DHyOVyMXv27OjSpUt06tQpNefKZDJF++yzz/CpU6c+9u67726WNAAASeIdwAAAbLNsNpu55ZZb/q2kpKRjms61YMGCuPnmm6OxsVHIAPAJGhsb4+abb44333wzVecqLS3tcvfdd5+fzWYzUgYAIC0UwAAAbNGkSZO+3rZt2wPTdKZly5bFDTfcEPX19QIGgE+prq4urr322li+fHmqztWuXbsDH3/88VESBgAgLTwCGgCAj3XZZZcN+upXvzo2k8mk5hcH33///bjyyiujqqpKwACwlerq6uLll1+OIUOGRHl5eWrO1aVLl31LS0unPvPMM2ukDABAEngENAAAW61///4lJ5988q8ymUxRWs60YcOG+P3vfx8bN24UMABso40bN8bvfve7VP15WlBQkP3hD394ft++fYslDABA4q9vrQAAgI/y4IMPnl1WVtYrLeeprq6O3/zmN7Fq1SrhAsBntGrVqrjyyiujuro6NWcqKyvr8/DDD58lXQAAkk4BDADA/zF+/Pgju3XrdnRazlNfX5/KdxYCwK60fPnyuO6666K+vj41Z+rRo8dXx40bd4R0AQBIMgUwAAB/53vf+16nI4444py0nCeXy8Vtt90Wb7zxhnABYDt7/fXX47bbbotcLpeaMx155JHnfvvb3+4oXQAAkkoBDADA/6qoqCi4+OKLLywsLCxPy5nGjx8fs2bNEi4A7CCzZs2Khx56KDXnKSwsrPj1r399QUVFhZ+bAQCQSC5kAQD4XxMnThxdWVk5OC3nef7552PixImCBYAd7LHHHosXXnghNeeprKzc89FHHz1RsgAAJFFh5cDo+lFfaKyKqFmRtSEAgDxxwQUX7DZq1KgLM5lMYRrO8+qrr8Ytt9ySqkdSAkBT/7O3d+/e0a5du1Scp2PHjkNzudxzU6ZMWSddAACamrLO9VHwMc/wcwcwAADRt2/f4h//+McXZzKZVPwG4HvvvRc33HBDNDY2ChcAdpKGhoa47rrrYtmyZak4T0FBQfbss88e27dv32LpAgCQqGtZKwAAYPz48T8qKyvrkYazbNiwIX7/+99HbW2tYAFgJ9u0aVP8/ve/j40bN6biPGVlZb3GjRs3RrIAACSJAhgAIM/ddNNNw/v06XN8Gs5SX18f1157baxdu1awALCLrFmzJq699tqor69PxXn69ev3jd///vdDJQsAQFIogAEA8thBBx1Uceyxx/5rRGTScJ477rgjFi9eLFgA2MUWLVoUd955Z1qOU/CNb3zj34YNG9ZcsgAAJOIC1goAAPLXzTfffFZxcXG7NJxl4sSJMX36dKECQBMxbdq0mDRpUirOUlJS0unOO+88Q6oAACSBAhgAIE/913/914FdunT5UhrO8tprr8Wf//xnoQJAEzN+/PhYsGBBKs7SrVu3o2+66abhUgUAoKlTAAMA5KEvfelLlV/5yld+lYazrFixIq6//vpobGwULAA0MY2NjXHdddfFihUr0nCczHHHHfergw46qEKyAAA0ZQpgAIA8dPXVV5+ezWYrk36OmpqauPbaa2PTpk1CBYAmatOmTXHttddGTU1N4s+SzWbb3njjjT+RKgAATZkCGAAgz9x6663Du3Tp8uWknyOXy8Utt9wSK1euFCoANHErV66MW2+9NXK5XOLP4lHQAAA0dQpgAIA8MnTo0LKvfvWrv0jDWSZMmBBz584VKgAkxJw5c+Kxxx5LxVlGjRr1i6FDh5ZJFQCApkgBDACQR+64444fFRcXd0z6OV5++eV45JFHBAoACfPQQw+l4he4SkpKOt5xxx0/lCgAAE2RAhgAIE9cfvnlu/fs2XNU0s/xwQcfxB133JGKR0gCQL7J5XJx2223xZo1axJ/lp49ex57+eWX7y5VAACaGgUwAEAe6NatW/a73/3uv2YymURf/9XX18cNN9wQ1dXVQgWAhKqqqoobb7wx6uvrE32OTCZT8N3vfvdX3bp1y0oVAICmRAEMAJAHxo8ff0pZWVmvpJ/jnnvuiaVLlwoUABJuyZIlcd999yX+HGVlZT3Hjx9/ikQBAGhKFMAAACn385//vOeAAQNGJ/0c06dPjylTpggUAFJi8uTJMWPGjMSfY8CAAaN//vOf95QoAABNhQIYACDFstls5qyzzjo3k8kk+tGEK1asiLvvvlugAJAyd911V6xYsSLRZ8hkMtmzzjrr3Gw2m5EoAABNgQIYACDFxo0b98XKysq9knyG2trauOGGG6K2tlagAJAyf/1zfvPmzYk+R2Vl5V7jxo0bKVEAAJoCBTAAQEoNHz68/OCDDz4t6ee4//77Y/ny5QIFgJRavnx5jBs3LvHnGDFixI+HDRvWXKIAAOxqCmAAgJS69dZbT8tms22TfIYZM2bEc889J0wASLnJkyfHzJkzE32G4uLitrfffvtp0gQAYFdTAAMApNBVV121R48ePb6S5DOsXLky7rrrLmECQJ64++6744MPPkj0GXr27PnVK664Yg9pAgCwKymAAQBSprS0tOAb3/jGT5N8rdfY2Bi333679/4CQB6pqamJ2267LRobG5N8jIJvfvObZ5aWlvqZGwAAu+6i1AoAANJlwoQJX6uoqBiQ5DOMHz8+Fi1aJEwAyDNvvvlmPPjgg4k+Q4sWLQY9+OCDx0gTAIBdRQEMAJAiRx55ZOWwYcN+kOQzzJ07N5544glhAkCemjhxYixYsCDRZxg+fPiPjjjiiJbSBABgV1AAAwCkyBVXXHFyUVFRRVLnr6qqijvvvDNyuZwwASBP5XK5uP3226O6ujqxZygqKmrxm9/85mRpAgCwKyiAAQBS4vzzz+/Xu3fv45J8httvvz0+/PBDYQJAnlu3bl3cfvvtiT5D7969jz///PP7SRMAgJ1NAQwAkALZbDZz6qmn/jyTyST2+m769OkxZ84cYQIAERExe/bsmDFjRmLnz2QyBaeeeurPs9lsRpoAAOxMCmAAgBT44x//eERlZeXgpM6/du3auPfeewUJAPyde+65J9atW5fY+SsrKwf/6U9/+oIkAQDYmRTAAAAJ17dv3+JDDjnkR0k+w9133x01NTXCBAD+Tk1NTdx9992JPsPBBx/8o759+xZLEwCAnUUBDACQcHfdddc3S0pKOiV1/smTJ8e8efMECQB8pLlz58azzz6b2PlLSko63nPPPd+SJAAAO4sCGAAgwb70pS9VDhw48KSkzr9mzZoYP368IAGALXrggQdizZo1iZ2/f//+Jx111FGtJAkAwM6gAAYASLArrrji1MLCwvIkzp7L5eK2226LTZs2CRIA2KJNmzbFbbfdFrlcLpHzFxYWll1++eU/kCQAADuDAhgAIKF+8Ytf9O7evftXkjr/s88+G2+88YYgAYBP5Y033ojnn38+sfN369bt6F/96ld9JAkAwI6mAAYASKgf/vCHP8pkMom8nvvggw/igQceECIAsFXGjRsX69atS+TsmUym4NRTT/2xFAEA2NEUwAAACXTdddcNa9eu3YFJnD2Xy8Udd9wRtbW1ggQAtsqmTZvizjvvTOz8bdq02f+mm27aT5IAAOxICmAAgIQpLS0t+NrXvnZ6Uud/4YUXYuHChYIEALbJq6++GjNmzEjs/Mccc8zpFRUVfiYHAMAO42ITACBhbr/99oMrKip2S+LsGzZsiHHjxgkRAPhM7r///qiqqkrk7OXl5X3/67/+6wgpAgCwoyiAAQASpKKiouCwww47Nanz33vvvYn9YS0A0HRs2LAh7r///sTOf9BBB/1zq1atCiUJAMCOoAAGAEiQ+++//+iysrKeSZx9zpw58dJLLwkRANguXnjhhViwYEEiZy8tLe32xz/+8StSBABgR1AAAwAkRN++fYv33Xfff07i7LW1tXHvvfcKEQDYru6+++6oq6tL5Oz77bffKf379y+RIgAA25sCGAAgIW6++eZRxcXFbZM4+yOPPBJr164VIgCwXa1atSoee+yxRM6ezWbb3njjjV+TIgAA25sCGAAgAYYOHVq21157fSeJs7/33nvxxBNPCBEA2CEmTpwYK1asSOTsQ4YM+c7QoUPLpAgAwPakAAYASIBrr732xKKiosqkzZ3L5eKee+6JxsZGIQIAO0R9fX3cddddkcvlEjd7UVFR5bXXXnuCFAEA2J4UwAAATdwBBxxQMWDAgG8kcfYZM2bEW2+9JUQAYId6880348UXX0zk7AMGDPjG8OHDy6UIAMD2ogAGAGjirrrqqhOKiooqkjb3pk2b4oEHHhAgALBT3H///VFbW5u4uYuKilpcffXV7gIGAGC7UQADADRhBx10UEX//v0Teffvww8/HB9++KEQAYCdYv369TFhwoREzj5w4MBvHHDAARVSBABge1AAAwA0Yf/5n/95bGFhYfOkzb1q1aqYPHmyAAGAnerpp5+O1atXJ27uwsLC8ssuu2yUBAEA2B4UwAAATdQBBxxQMWjQoNFJnP3uu++O+vp6IQIAO1V9fX3cddddiZx99913/+bQoUPLpAgAwGelAAYAaKIuv/zyYwsLC8uTNvfcuXNjwYIFAgQAdokFCxbE3LlzEzd3UVFRi9/97ndflyAAAJ+VAhgAoAkaOnRo2aBBgxL37t+6urr405/+JEAAYJf605/+FHV1dYmbe/fdd//mkCFDSiUIAMBnoQAGAGiCfvOb33ylqKioZdLmfu655xL53j0AIF1Wr14dzz33XOLmLioqann11VcfLUEAAD4LBTAAQBPTq1evZoMHD/5m0uaurq6ORx55RIAAQJPwyCOPRHV1deLmHjJkyLe6deuWlSAAANtKAQwA0MTcdNNNxxQXF7dN2twTJkyIqqoqAQIATUJVVVUifzmtuLi43a233uouYAAAtpkCGACgCWnVqlXhXnvtdVLS5l61alU8++yzAgQAmpTJkyfHqlWrEjf30KFDR7dq1apQggAAbAsFMABAE3LLLbccXlJS0jlpcz/44INRX18vQACgSamvr48HH3wwcXOXlJR0vummmw6VIAAA20IBDADQRGSz2cwBBxzw7aTNvWjRonjppZcECAA0SS+99FIsXrw4cXOPGDHiO9lsNiNBAAC2lgIYAKCJuOaaa/YuLy/vm7S5H3roocjlcgIEAJqkXC6XyLuAy8vL+1111VV7SRAAgK2lAAYAaCK+8pWvfDdpM8+bNy8WLlwoPACgSVu4cGG8+uqrrg8BAMgLCmAAgCbgsssuG1RZWblPkmbO5XIxfvx44QEAifDAAw8k7qklrVu33veSSy7pLz0AALaGAhgAoAkYNWrUCUmbefbs2bFs2TLhAQCJsGzZsnjllVcSN/cJJ5xwovQAANgaCmAAgF3sn//5nzt37NjxiCTN3NjYGA888IDwAIBEGT9+fDQ0NCRq5k6dOn1h9OjRHaQHAMCnpQAGANjFfvSjH30tk8kk6rps2rRpsWrVKuEBAImyatWqeOGFFxI1cyaTKfzpT386SnoAAHxaCmAAgF1o0KBBpX369Plqkmaur6+PCRMmCA8ASKQJEyZEXV1dombu27fvV/r27VssPQAAPg0FMADALnTZZZcdXlRUVJGkmadOnRpr164VHgCQSOvXr48pU6YkauaioqLK3/zmN0dIDwCAT0MBDACwi2Sz2cy+++57UpJmrqurc/cvAJB4jz76aOLuAt5///1PymazGekBAPBJFMAAALvI1VdfPbSsrKx3kmaeMmVKbNiwQXgAQKJt2LAhnn/++UTNXFZW1ueqq67aS3oAAHwSBTAAwC7y5S9/+bgkzVtfXx8TJ04UHACQCo8//nji7gL+0pe+dLzkAAD4JApgAIBdYPTo0R3atm07IkkzT5s2LdatWyc8ACAVPvzww5g+fXqiZm7fvv2I0aNHd5AeAABbogAGANgFfvrTn47KZDKFSZm3vr4+HnnkEcEBAKnyyCOPRH19fWLmzWQyhT/96U+/JjkAALZEAQwAsJN16tQp26dPn6OTNLO7fwGANFq3bl1MmzYtUTP36dPnmE6dOmWlBwDAx1EAAwDsZFddddUB2Wy2dVLmbWxsjEmTJgmOVOvYsWN06OCJmgD5aNKkSdHY2JiYebPZbOurrrrqAMkBAPBxFMAAADvZiBEjvp6keV988cVYtWqV4Ei1Ll26xIUXXhinnXZadO3a1UIA8siqVavipZdecj0JAEBqKIABAHaiM844o3tlZeXeSZk3l8vFxIkTBUdeyGQyMXjw4PjVr34VY8aMcUcwQB55/PHHI5fLJWbeysrKvc8444zukgMA4KMogAEAdqJTTjnlqxGRScq8CxYsiPfee09w5JVMJhN77713XHjhhTFmzJho3769pQCk3HvvvRcLFy5M1B9X/3NdCQAA/4cCGABgJ+nVq1ezXr16fTlJM3v3L/nsr0XwBRdcECeffHK0bdvWUgBSLGnXPb169fpyr169mkkOAIB/pAAGANhJrrjiioOLiopaJmXeBN4JAztEYWFhDB8+PC688MIYPXp0VFZWWgpACi1YsCCWLVuWmHmLiopaXnnllYdIDgCAf6QABgDYSYYPH/6VJM2btHfhwY5WVFQUI0aMiEsuuSRGjx4dLVu2tBSAFMnlcvH4448naub99tvvK5IDAOAfKYABAHaC0aNHd6isrByalHnXrl0bL7/8suDgI/y1CL744ovjhBNOiBYtWlgKQEq89NJLsW7dusTMW1lZudfo0aM7SA4AgL+lAAYA2AlOP/30o5J07fXMM89EQ0OD4GALiouL47DDDouxY8fGqFGjoqyszFIAEq6hoSGeeeaZJI1c8D/XmQAA8P8vEq0AAGDHymazmX79+n05KfPW1tbGlClTBAefUnFxcYwcOTIuvfTSGDVqVJSWlloKQII9//zzUVtbm5h5+/Xr9+VsNpuRHAAAf6UABgDYwX7zm9/sWVJS0jkp886YMSOqq6sFB1uppKQkRo4cGZdcckkcffTRUVJSYikACVRdXR0zZ85M0p8/na+44orBkgMA4K8UwAAAO9gXvvCFLyVl1lwuF08//bTQ4DNo3rx5HHXUUXHJJZfEyJEjI5vNWgpAwjz11FORy+USM++RRx75ZakBAPBXCmAAgB1oyJAhpZ07dz4iKfO+/vrrsWLFCsHBdlBeXh6jRo2KSy+9VBEMkDArVqyI119/PTHzdunS5fD+/ft79AQAABGhAAYA2KHGjh17aGFhYWJeCOruX9j+KioqYtSoUXHxxRfH4YcfHkVFRZYC4LpouyosLGz+H//xHwdLDQCACAUwAMAOteeeex6ZlFnXrl0b8+bNExrsIK1atYrjjz8+LrroohgxYkQUFPh2DKApmzdvXqxZsyYx8+61115HSg0AgAgFMADADnPMMce0bt269b5Jmfe5556LxsZGwcEO1qZNmxg9enRcfPHFimCAJqyxsTGee+65JP35MvyYY45pLTkAAPykAQBgBznzzDMPz2Qyibjeqq+vj6lTpwoNdqK2bdvG6NGj47zzzovhw4crggGaoBdeeCHq6+sTMWsmkyk844wzDpUaAAB+wgAAsIP079//C0mZdc6cObFhwwahwS7QqVOnOPnkk+Pf/u3fYu+9945MJmMpAE3Ehg0bYvbs2YmZd8CAAR4DDQCAAhgAYEf43ve+16mysnKPpMybpMcbQlp17tw5xowZE7/61a8UwQBNyPPPP5+YWSsrKwd/73vf6yQ1AID8pgAGANgBTj755CMiIhHtzcqVK+P1118XGjQRXbt2jTFjxsQ555wTgwcPthCAXez111+PlStXJmXczMknn3y41AAA8psCGABgB+jXr19iHv88ZcqUyOVyQoMmpnfv3nHaaafFOeecE/3797cQgF0kl8vFlClTknQd6jHQAAB5TgEMALCdnX766d0qKip2S8Ks9fX1MW3aNKFBE9anT58466yz4pxzzonddtvNQgB2gWnTpkV9fX0iZq2oqNjt9NNP7yY1AID8pQAGANjORo8efURSZp03b15s3LhRaJAAffr0ibPPPjvOPPPM6Nmzp4UA7EQbN26MefPmuR4FACARFMAAANtZr169EvPetSQ9zhD4bwMGDIhf/vKXceaZZ0b37t0tBGAnmTp1apKuRw+TGABA/lIAAwBsR2eccUb38vLyvkmYdf369fHaa68JDRJqwIAB8S//8i9x2mmnRbdunvQJsKPNnz8/Pvzww0TMWl5e3u9HP/pRF6kBAOQnBTAAwHZ03HHHHZSUWWfMmBGNjY1CgwTLZDIxePDg+Nd//dcYM2ZMdOjQwVIAdpDGxsaYMWNGYub9xje+cYjUAADykwIYAGA76tOnz8FJmDOXyyXqMYbAlmUymdh7773jwgsvjDFjxkT79u0tBWAHeOGFF5J0XXqIxAAA8pMCGABgOznppJPat2zZcvckzLpkyZJYuXKl0CBl/loEX3DBBXHyySdH27ZtLQVgO1qxYkW8/fbbiZi1srJy0PHHH+8PAgCAPKQABgDYTr773e8eGBGZJMyapMcXAluvsLAwhg8fHhdeeGGMHj06KisrLQVgO5k+fXpSRi34/ve/f6DEAADyjwIYAGA72X333Q9Nwpz19fUxc+ZMgUEeKCoqihEjRsQll1wSo0ePjpYtW1oKwGc0c+bMqK+vT8SsAwcOPFRiAAD5RwEMALAdHHTQQRUtW7bcKwmzLly4MKqrq4UGeeSvRfDFF18cJ5xwQrRo0cJSALZRVVVVvP7664mYtVWrVkOHDx9eLjUAgPyiAAYA2A7OPvvsz2cymaIkzOrxz5C/iouL47DDDouxY8fGqFGjoqyszFIAtkFSnqaSyWSy55577uclBgCQXxTAAADbwe67735AEuasra2NOXPmCAzyXHFxcYwcOTIuvfRSRTDANpg9e3bU1dUlYtY99tjjAIkBAOQXBTAAwGfUqlWrwnbt2u2fhFnnzZsXtbW1QgMiIqKkpCRGjhwZY8eOjaOPPjpKSkosBeBT2LRpU8ybNy8Rs7Zv337/iooKPwMEAMgjLv4AAD6jCy+8cPeioqKKJMz64osvCgz4P5o3bx5HHXVUXHLJJTFy5MjIZrOWAvAJZs2alYg5i4qKWlx88cWDJAYAkD8UwAAAn9GBBx6YiMfqVVdXJ+ZOFWDXKC8vj1GjRsWll16qCAb4BPPmzYuamppEzHrQQQd5DDQAQB5RAAMAfEZdu3YdnoQ5582bF/X19QIDPlFFRUWMGjUqLr744jj88MOjqKjIUgD+QV1dXbz66quJmLVLly77SwwAIH8ogAEAPoNTTjmlY3l5+W5JmPXll18WGLBVWrVqFccff3xcdNFFMWLEiCgo8C0kwN966aWXEjFnRUXFbieddFJ7iQEA5AffvQMAfAYnnnji55MwZ21tbcyfP19gwDZp06ZNjB49OsaOHasIBvgb8+fPj9ra2iSMmvnud7/7eYkBAOQH37UDAHwGn/vc5/ZLwpwLFy6Muro6gQGfyV+L4PPOOy+GDx+uCAby3ubNm2PhwoWJmLVfv37DJQYAkB98tw4AsI1atWpV2Lp1672TMKvHPwPbU6dOneLkk0+Oc889NwYNGmQhQF6bPXt2IuZs06bN3hUVFX4WCACQB1z0AQBso/PPP39gYWFheVOfs76+PubMmSMwYLvr2bNn/OQnP4nzzjsv9t5778hkMpYC5J3Zs2dHfX19k5+zqKio4vzzzx8oMQCA9FMAAwBso/3333/fJMz5+uuvR01NjcCAHaZLly4xZsyYOOecc2Lw4MEWAuSV6urqeOONNxIx64EHHriPxAAA0k8BDACwjbp27ZqIxz/PnTtXWMBO0bt37zjttNPinHPOif79+1sIkDeScr3VvXv3vaUFAJB+CmAAgG0wZMiQ0srKyj2a+py5XM7jn4Gdrk+fPnHWWWfFOeecE7vttpuFAKk3e/bsyOVyTX7Oli1b7jlo0KBSiQEApJsCGABgG5x55pl7ZjKZbFOfc9myZbFu3TqBAbtEnz594uyzz44zzzwzevbsaSFAaq1bty6WL1/e5OfMZDLZs846a4jEAADSrcgKAAC23tChQ4clYc558+YJC9jlBgwYEAMGDIgFCxbE+PHjY+nSpZYCpM68efOiS5cuTX7OffbZZ5+ImC4xAID0cgcwAMA26Nix4z5JmHP+/PnCApqMAQMGxC9/+cs47bTTolu3bhYCpEpSrrs6deq0j7QAANJNAQwAsJWOOOKIlhUVFf2a+pxVVVWxaNEigQFNSiaTicGDB8e//uu/xpgxY6JDhw6WAqTCW2+9FVVVVU1+zoqKis8deuihLSQGAJBeCmAAgK108sknD46ITFOfc/78+dHY2CgwoEnKZDKx9957x4UXXhhjxoyJ9u3bWwqQaI2NjbFgwYJE/Cv4u9/97h4SAwBILwUwAMBW2n333fdMwpze/wskwV+L4AsuuCBOPvnkaNu2raUAiZWU66/BgwfvKS0AgPQqsgIAgK3Trl27wU19xlwul5Q7UAAiIqKwsDCGDx8e++yzT0ybNi0mTJgQ69evtxggURYsWBC5XC4ymab9sJgOHToMlhYAQHq5AxgAYCsMGjSotGXLlgOa+pzvvfdebNy4UWBA4hQVFcWIESPikksuidGjR0fLli0tBUiMDz/8MJYtW9bk52zZsuXA/v37l0gMACCdFMAAAFvhxz/+8aBMJtPkn6Li7l8g6f5aBI8dOzZOOOGEaNGihaUAibBw4cImP2Mmk8n+5Cc/GSAtAIB0UgADAGyFvffee88kzJmEHzwCfBrNmjWLww47LMaOHRujRo2KsrIySwGatKT8Il5SrmsBANh63gEMALAVunbtOqSpz1hfXx9vvvmmsIBUKS4ujpEjR8bBBx8czz77bDz++ONRXV1tMUCT8+abb0Z9fX0UFTXtH7t16dJlT2kBAKSTO4ABAD6lioqKgoqKikFNfc4lS5bE5s2bBQakUklJSYwcOTLGjh0bRx99dJSUeIUl0LTU1tbG0qVLm/ycLVu2HFRaWupngwAAKeQiDwDgUzr77LP7FhYWNvlnj7722mvCAlKvefPmcdRRR8Ull1wSI0eOjGbNmlkK4HpsKxQWFpafffbZvaQFAJA+CmAAgE9p//3375+EOV9//XVhAXmjvLw8Ro0aFf/+7/8eI0eOjGw2aymA67FP6fOf//xAaQEApI8CGADgU+rRo8fuTX3G2traePvtt4UF5J2KiooYNWpUXHzxxXH44Yc3+XdvAum2ePHiRLySo1evXoOkBQCQPgpgAIBPqXXr1k3+DoklS5ZEQ0ODsIC81apVqzj++OPj4osvjhEjRkRBgW97gZ2voaEhlixZ0uTnbNOmjQIYACCFfCcMAPApDBkypLR58+a9m/qcb775prAAIqJ169YxevToGDt2rCIYcF32MZo3b95n0KBBpdICAEgX3wEDAHwKp556av9MJtPkr53eeustYQH8jTZt2sTo0aPjvPPOi+HDhyuCAddlfyOTyRT84Ac/+Jy0AADSxXe+AACfwuDBg5v84/Hq6+tj0aJFwgL4CJ06dYqTTz45/u3f/i323nvvyGQylgLsUIsXL07Eqzn23HPPgdICAEgXBTAAwKfQpUuXAU19xnfeeSfq6uqEBbAFnTt3jjFjxiiCgR2utrY23n333SRc53oPMABAyiiAAQA+hZYtW/Zv6jN6/DPAp9elS5cYM2ZMnHvuuTF48GALAfL2+iwJ17kAAGwdBTAAwCcYPnx4eUlJSeemPqfHPwNsvV69esVpp50W55xzTvTvrwMB8u/6rLS0tPPw4cPLpQUAkB4KYACAT/Ctb31rt4ho8s8IXbx4sbAAtlGfPn3irLPOinPOOSd22203CwG2i4T8gl7m29/+dj9pAQCkhwIYAOAT7L777k2+CVi7dm1s2LBBWACfUZ8+feLss8+OM888M3r27GkhwGfy4Ycfxrp165r8nAMHDlQAAwCkSJEVAABsWadOnZr8D8TefvttQQFsRwMGDIgBAwbEggULYvz48bF06VJLAbb5Oq1Vq1audwEA2GkUwAAAn6CyslIBDJCnBgwYEP3794958+bFQw89FO+++66lAFtlyZIlsddeezX1613PvgcASBEFMADAFnTq1CnbvHnzXk19ziVLlggLYAfJZDIxePDg2GOPPeLll1+OBx98MFauXGkxQGqu05o3b967Xbt2RatXr66XGABA8nkHMADAFowZM6ZnJpPJNuUZGxsbPZoUYCfIZDKx9957x4UXXhhjxoyJ9u3bWwrwiZYuXRqNjY1NesaCgoLsqaee2kNaAADp4A5gAIAt2Hvvvfs29RlXrlwZtbW1wgLYSf5aBO+5554xa9asmDBhQqxevdpigI9UW1sb77//fnTu3LlJzzls2LC+EbFIYgAAyecOYACALejRo0eTL4DfeecdQQHsAoWFhTF8+PC48MILY/To0VFZWWkpQGKv15Jw3QsAwKejAAYA2ILWrVs3+ff/vvvuu4IC2IUKCwtjxIgRcckll8To0aOjZcuWlgIk7notCde9AAB8Oh4BDQCwBc2bN+/Z1GdUAAM0kW+wi4pixIgRsd9++8WUKVPiscceiw0bNlgMEO+9914SrnsVwAAAKeEOYACAj9G/f/+SkpKSjk19TgUwQNPSrFmzOOyww2Ls2LExatSoKCsrsxTIc0m4XistLe3Ut2/fYmkBACSfAhgA4GOccMIJ3Zr69dK6deuiqqpKWABNUHFxcYwcOTJ+/etfK4Ihz1VVVcX69eub+pgF3/zmN7tLCwAg+RTAAAAfY8iQIT2b+oxJeJwgQL77axE8duzYOProo6OkpMRSIA8l4botCde/AAB8MgUwAMDH6N69e8+mPqPHPwMkR/PmzeOoo46KSy65JEaOHBnNmjWzFMgjSbhuS8L1LwAAn0wBDADwMVq1atWjqc+4bNkyQQEkTHl5eYwaNSr+/d//PUaOHBnZbNZSIA8k4botCde/AAB8MgUwAMDHqKio6NXUZ1y+fLmgAJL750yMGjUqLr744jj88MOjqKjIUiDFknDd1rJly16SAgBIPgUwAMBHyGazmbKysq5NecbGxsZYtWqVsAASrlWrVnH88cfHxRdfHCNGjIiCAt+qQxqtWrUqGhsbm/SMJSUlXbPZbEZaAADJ5rtKAICPcNxxx7UrKCgobsozrl69Ourr64UFkBKtW7eO0aNHx9ixYxXBkEJ1dXXxwQcfNOkZCwoKio877rh20gIASDbfTQIAfITPf/7zXZr6jO+//76gAFKoTZs2MXr06Dj//PNj+PDhimBIkRUrVrgOBgBgh/NdJP+PvTuPr7I888d/nSwEkhD2HUQEUVRAoIiouCtq64Jabd1arVorbqO2tlXbaavTOu38Rqffdmpbu9rWpYogsqgFRXCttAIKArJDgAAJBLKQ5JzfH8WO4+DOcp6T9/v18jWvTv657ut6hNvnk/t+AICd2G+//bL+xVcSXiAC8PF17do1Lr300rj99ttj2LBhkUq5lRWSLgn7tyTsgwEAeH8FWgAA8H917txZAAxAVujevXtceeWVsXr16njiiSdi9uzZkclkNAYSKAn7tyTsgwEAeH8CYACAnWjXrp0roAHIKj169Igrr7wyli5dGpMmTYo5c+ZoCiRMEvZvSdgHAwDw/gTAAAA7UVxc3D3baxQAAzRPffr0ibFjx8aSJUti/PjxsWDBAk2BhEjC/i0J+2AAAN6fbwADAOxESUlJz2yur7q6Ourq6gwKoBnbb7/94l/+5V/ia1/7WhxwwAEaAglQV1cX1dXV9sEAAOxWAmAAgHc5/PDDSwsKCtpmc40VFRUGBUBERPTt2zduvPHGuOGGG2LffffVEMhy2b6PKygoaDt8+PASkwIASC4BMADAu5x44oldsr3GDRs2GBQA/8uAAQPiG9/4Rtxwww3Ru3dvDQH7uE+yH+5qUgAAyeUbwAAA79KvX7+sD4DXr19vUADs1IABA+LAAw+MuXPnxoQJE2LlypWaAlkkCTe5HHDAAV0i4i3TAgBIJgEwAMC7dO/evXO21+gEMADvJ5VKxaBBg2LgwIExe/bsGD9+fKxbt05jwD4uZ/bDAAC8NwEwAMC7tG/fvlO21ygABuDDSKVSMWzYsBg6dGjMnj07HnvsMbdIwF6WhBPASdgPAwDw3gTAAADv0rp166w/8ZCEF4cAZI+3g+BDDz00XnnllZg4caK/S8A+LtH7YQAA3psAGADgXUpKSrL6xENjY2Ns3rzZoAD4yPLz8+Pwww+P4cOHx/PPPx8TJ06MqqoqjYE9aPPmzdHY2BgFBdn7Wi7b98MAALw/ATAAwLu0bNmySzbXV1lZGZlMxqAA+Njy8/Nj1KhRMXLkyHjhhRcEwbAHZTKZqKqqio4dO9oPAwCwWwiAAQDepaioKKuvvKusrDQkAHaJgoKCGDVqVIwYMSJmzpwZkydPji1btmgM7IH9XDYHwNm+HwYA4P3laQEAwP8YPnx4SX5+fkk21ygABmBXa9GiRRx//PFxxx13xNlnnx0lJSWaAs14P5efn18yfPhwfxAAACSUABgA4B2OOOKIDtleo+//ArC7FBUVxejRo+P73/9+nH322VFcXKwpsBsk4cr1JOyLAQDYOQEwAMA79O3bt1221+gEMAC729tB8B133BGnn356tGrVSlOgme3n9ttvv7YmBQCQTAJgAIB36NSpkwAYAHYoKSmJz3zmM3HnnXfG6NGjo0WLFpoCzWQ/l4R9MQAAOycABgB4hw4dOrTN9hqTcGUgALmlpKQkzj777PjOd74To0aNivz8fE2BHN/PJWFfDADAzgmAAQDeoaysrG221ygABmBvad++fVx00UVx5513xgknnBCFhYWaAjm6nysrK3MCGAAgoQTAAADvUFJS0j6b68tkMlFdXW1QAOxV7dq1i/POOy+++93vxqhRoyIvz+sF+CiSsJ8rLS0VAAMAJJT/QgMAeIfi4uK22VxfXV1dNDY2GhQAWeHtE8F33HGHIBg+gsbGxqirq7MvBgBgt/BfZgAA79CqVausPung9C8A2ahDhw5x0UUXxbe//e04/PDDBcGQA/u6oqIiJ4ABABLKf5EBALxDQUGBABgAPqauXbvGpZdeGt/61rdi2LBhkUqlNAUSuq9r0aJFW1MCAEimAi0AAPgfhYWFZdlc39atWw0JgKzXrVu3uPLKK2P16tXxxBNPxOzZsyOTyWgMJGhfl+37YgAA3psAGADgnZujgoLW2VyfE8AAJEmPHj3iyiuvjKVLl8akSZNizpw5mgIJ2ddl+74YAID35gpoAIAdWrdunZefn98ym2sUAAOQRH369ImxY8fGLbfcEgMGDNAQSMC+Lj8/v1WrVq28OwQASCCbOACAHQYNGlQSEVn9scJt27YZFACJtd9++8UNN9wQX/va1+KAAw7QEJq1BOzr8gYPHlxsUgAAySMABgDY4YADDijJ9hpramoMCoDE69u3b9x4441xww03xL777qshNEu1tbVZX2P//v1LTQoAIHl8AxgAYIeePXtm/QuuJLwoBIAPa8CAATFgwICYP39+jBs3LpYvX64pNBtJ2Nf16NGjxKQAAJJHAAwAsEOnTp0EwACwFwwYMCAOPPDAmDt3bkyYMCFWrlypKeS8JOzrunbtKgAGAEggATAAwA5lZWVZ/4Krrq7OoADISalUKgYNGhQDBw6M2bNnx4QJE2Lt2rUaQ85KQgDcpk0bV0ADACSQABgAYIeysjIngAFgL0ulUjFs2LAYOnRozJ49O8aPHx/r1q3TGHKOABgAgN1FAAwAsENJSUlxttfoBDAAzcXbQfCQIUPi5ZdfjokTJ0ZFRYXGkDOSEAAnYX8MAMD/JQAGANihqKioKNtrrKmpMSgAmpW8vLw4/PDDY/jw4fH888/HE088EZWVlRpD4iUhAG7RokWRSQEAJI8AGABgh8LCwhbZXF86nY7t27cbFADNUn5+fowaNSpGjhwZL7zwQkycODGqqqo0hsTavn17ZDKZSKVSWVtjixYtWpgUAEDyCIABAHbI9gC4oaHBkABo9goKCmLUqFExYsSImDlzZkyePDm2bNmiMSROJpOJhoaGyOaMtbCw0AlgAIAk/neTFgAA7NgYFRRk9QuuxsZGQwKAHVq0aBHHH398HHnkkfHMM8/E1KlTY9u2bRpDomR7AJzt+2MAAN5jH6cFAAA7NkZZ/oLL9c8A8H8VFRXF6NGj49hjj41nnnkmpkyZEjU1NRpDImT7DS8FBQWugAYASCABMADA2xujLH/B5QpoAHhvbwfBRx11VEyfPj2efvrpqK2t1RiymgAYAIDdIU8LAAD+QQAMAMlXUlISn/nMZ+LOO++M0aNHZ/X1uiAABgBgdxAAAwDskO1XQAuAAeDDKykpibPPPjv+7d/+LUaPHh2FhYWagv3dR5Sfn9/SlAAAkkcADADw9sYoL88JYADIMa1bt46zzz47vve978UJJ5wgCMb+7iPIz8/3LwwAQAIJgAEAdkilUlm9N2psbDQkAPiY2rVrF+edd15897vfjRNOOCEKCgo0Bfu7D94f55sSAEDyCIABAHbI9gA4nU4bEgB8Qu3bt/9nEDxq1KjIy/NqBPu799kfp0wJACB5/FcOAMAOXnABQPPRoUOHuOiii+J73/ueIJi9JpPJZHuJ/sUAAEggmzgAgP+R1QFwAl4QAkDidOzYMS666KL41re+FYcffnj4fTDs796xOc7yG3IAANg5mzgAgITsjQTAALD7dOvWLS699NL41re+FcOGDRMEs0dk+xXQeXl5/kUAAEigAi0AAPiHbH/BJQAGgN2ve/fuceWVV8ayZcviiSeeiDlz5mgKzXl/5/AIAEACCYABAHbIZDJOAAMAERGx7777xtixY2PJkiUxYcKEmD9/vqZgfwwAQCIIgAEA/ocr7gCA/2W//faLG264Id56660YP358vPnmm5rCLpPtV0Cn3IUOAJBIAmAAgB2y/QVXtr8gBIBc1rdv37jxxhvjrbfeinHjxsWiRYs0hU/MFdAAANjEAQDsXln9Bs4BDADY+/r27Rs333xz3HDDDdG7d28NIdf3d75BAgCQQE4AAwDskO0nMATAAJA9BgwYEAMGDIj58+fHI488EitXrtQUcnF/5woaAIAEcgIYAGCHVCqVzvL6DAkAssyAAQPi1ltvjbFjx0bPnj01hJza32UScEc1AAD/lxPAAAD/QwAMAHysv6MHDRoUBx98cDz//PMxadKk2LRpk8aQ+P1dtv+CJAAAO+cEMADADul0dr/fEgADQHarr6+PioqK2LZtm2aQE/u7dDrtBDAAQAI5AQwA8D+cAAYAPrK6urp4+umnY9q0acJfcm1/5wQwAEACCYABAP6HEw4AwIfW0NAQ06ZNiyeffDK2bt2qIXxkCfgGsAAYACCBBMAAADtkMpmsDoDz8ny9AwCywdvB71NPPRXV1dUaQs7u7wTAAADJJAAGANgh219wCYABYO9qbGyMGTNmxJNPPhmVlZUawieWn5+f9VtkUwIASB4BMADADplMpiGb6yssLDQkANgL0ul0zJo1KyZPnhwbN27UEHaZgoLsfjXX1NTUaEoAAAncZ2oBAMA/NDY2bs/m+gTAALBnpdPpePnll2Py5Mmxdu1aDWGXa9GiRbb/O1BvSgAAySMABgDYoampSQAMAEQmk4nZs2fH448/HuXl5RpCs93fNTY2CoABABJIAAwAsENDQ0NWv+ASAAPA7vV28PvEE0/E6tWrNYTdLtuvgM72G3IAAHiPfaYWAAD8gyugAaD5mjNnTkyaNCmWLl2qGewx2X4FtAAYACCZBMAAADs0NTU5AQwAzcyCBQtiwoQJ8dZbb2kG9nfv0tDQIAAGAEggATAAwA7Z/oJLAAwAu87ChQtj/PjxsXjxYs1gr8n2K6Cz/RckAQB4j32mFgAA/EO2B8AFBQWRl5cX6XTasADgY1q+fHmMGzcu5s+frxnsVXl5eVkfAG/fvt0JYACABBIAAwDs0NDQkPUnHFq1ahXbtm0zLAD4iFauXBmPPPKI4Jes2tclYH8sAAYASCABMADADrW1tXXZXqMAGAA+mnXr1sX48eNj9uzZkclkNISs2tdlu7q6ulqTAgBIHgEwAMAOW7du3ZrtNSbhRSEAZIP169fHY489JvjFvu4TqK6u3mpSAADJIwAGANihqqpKAAwACbdhw4Z4/PHH45VXXommpiYNwb7uE6isrHT1DABAAgmAAQB22LRpU9a/4GrZsqVBAcBOVFVVxcSJE+OFF16IxsZGDSHrJSEA3rRpkxPAAAAJJAAGANhh3bp1WR8AOwEMAP/bli1bYsKECYJfEicJ+7ry8nIBMABAAgmAAQB2WLZsmSugASAhqqurY/LkyTFz5syor6/XEBInCfu6pUuXCoABABJIAAwAsMP8+fOz/gRwcXGxQQHQrNXU1MSUKVPimWeeEfySaEnY173++uu+AQwAkEACYACAHRYsWFCXyWQaUqlUYbbW2Lp1a4MCoFmqq6uLp59+OqZNmxbbtsmkSL5s39el0+mGpUuXbjcpAIDkEQADALxDU1PTtoKCgrbZWp8AGIDmZvv27TF9+vR48sknY+tWt9GSO7J9X9fU1ORfOACAhBIAAwC8Q0NDw9ZsDoBLS0sNCYDm8ndyTJs2LZ566qmorq7WEHJOtu/rGhsb/YsHAJBQAmAAgHeor6+vbNWqVc9src8JYAByXWNjY8yYMSOefPLJqKys1BByVrbv6+rr66tMCQAgmQTAAADv0NDQkNVvmgXAAOSqdDods2bNismTJ8fGjRs1hJyX7fu6bN8XAwDw3gTAAADvUFdXV5XN9ZWWlkYqlYpMJmNYAOSETCYTr732Wjz++OOxatUqDaFZSKVSUVJSktU11tbWVpkUAEAyCYABAN5h27Ztm7K5vvz8/GjVqlXU1NQYFgCJlslkYvbs2fH4449HeXm5htCstGrVKvLz87O6xq1btzoBDACQUAJgAIB3qK6u3pztNZaVlQmAAUist4PfiRMnxpo1azSEZqmsrCzra9y2bVuVSQEAJJMAGADgHaqqqjZle43t2rWLtWvXGhYAiTNnzpyYNGlSLF26VDNo1tq1a5f1NW7atMkJYACALNbQWBgFjQ0REZFKRSavMJre/pkAGADgHSoqKqqyvcYkvDAEgHdasGBBTJgwId566y3NgITs5zZs2CAABgDIYoUFDf9MejMRqab0/+S+AmAAgHdYtWpV1r/oatu2rUEBkAgLFy6M8ePHx+LFizUD3iEJAfDq1aurTAoAIJkEwAAA77BgwYKsD4CdAAYg2y1fvjzGjRsX8+fP1wzYiST8Ql8S9sUAAOycABgA4B2eeOKJjZlMpimVSuVna41OAAOQrVauXBmPPPKI4Bc+QLb/Ql8mk2l64oknNpoUAEAyCYABAN6huro6vX379g1FRUVdsrVGJ4AByDZr166NCRMmxOzZsyOTyWgIJHw/t3379g3V1dVpkwIASCYBMADAu9TV1a0XAAPAB1u/fn089thjgl/Isf1cXV3delMCAEguATAAwLvU1dVVtGnTJmvrKykpiRYtWsT27dsNC4C9oqKiIiZOnBivvPJKNDU1aQh8BEVFRVFcXJz1+2GTAgBILgEwAMC7bN26dV2XLll7ADhSqVR07Ngx1qxZY1gA7FFVVVUxceLEeP755wW/8DF17NgxUqlU1u+HTQoAILkEwAAA71JVVZX1Jx46deokAAZgj9m8eXM8/vjj8cILL0RjY6OGwCfcx9kPAwCwOwmAAQDeZf369Vn/zbMkvDgEIPm2bNkSU6ZMiZkzZ0Z9fb2GwC7QsWNH+2EAAHYrATAAwLusXr066088JOHFIQDJVVNTE1OmTIlnnnlG8Au7WBJ+kW/VqlUCYACABBMAAwC8y9///ves/+aZABiA3aG2tjYmT54czz77bNTV1WkINNN93KuvvioABgBIMAEwAMC7PPzww+t//OMfN6RSqcJsrbFz584GBcAus3379pg+fXpMnTo1tm3bpiGwG2X7CeB0Ot3w8MMPC4ABABJMAAwA8C7V1dXpurq68latWu2TrTV26NAh8vLyIp1OGxgAH1tDQ0NMmzYtnnrqqaiurtYQ2M3y8vKiQ4cOWV1jfX39mtraWptMAIAEEwADAOxEbW3tmmwOgAsKCqJdu3axceNGwwLgI2tsbIwZM2bEk08+GZWVlRoCe0j79u2joCC7X8fV1NSUmxQAQLIJgAEAdmLz5s2r2rdvn9U1duvWTQAMwEeSTqdj1qxZMXnyZH+HwF7av2W7LVu2rDQpAIBkEwADAOzEpk2bVvfp0yera+zWrVvMmzfPsAD4QG8Hv1OmTIkNGzZoCOzF/Vu227BhwxqTAgBINgEwAMBOrFixYvWwYcOyusYkvEAEYO/KZDLx0ksvxZQpU6K83K2usLd17do162tctWrVKpMCAEg2ATAAwE7Mnz9/9ZgxY7K6xiS8QARg78hkMjF79uyYOHFirFnjMB9kiyT8At+8efP8oQEAkHACYACAnRg3btyab37zm5mISGVrjU4AA7Azc+bMiSeeeCKWLVumGZBlEvALfJlx48atNikAgGQTAAMA7MTrr79e29DQsKmwsLBDttZYXFwcZWVlsWXLFgMDIBYsWBDjx4+PJUuWaAZkobKysiguLs7qGhsaGjYuWLCgzrQAAJJNAAwA8B62bt26vF27dh2yucauXbsKgAGauYULF8b48eNj8eLFmgFZLAm3t2zbtm25SQEAJJ8AGADgPVRVVS1t167d0GyusWfPnrFw4ULDAmiGli1bFo899ljMnz9fMyABevbsmfU1VlZWLjUpAIDkEwADALyHdevWLevTp09W15iEF4kA7ForVqyIRx99VPALCZOEfdvatWuXmRQAQPIJgAEA3sPChQuXHX744VldY69evQwKoJlYtWpVjB8/PubOnRuZTEZDIGGSsG9buHDhMpMCAEg+ATAAwHuYNm3a0ksuuSSra+zevXvk5+dHU1OTgQHkqHXr1sX48eNj9uzZgl9IqIKCgkR8A/jpp59eZloAADmw/9QCAICde+ihhzbcd999W/Pz80uzdjNXUBBdunSJNWvWGBhAjqmoqIiJEyfGyy+/HOl0WkMgwbp27RoFBdn9Gq6xsbH6kUce2WBaAADJJwAGAHgf27ZtW15WVnZwNtfYq1cvATBADqmqqoqJEyfG888/74YHyBFJ+P7vtm3blpsUAEBuEAADALyPLVu2LMv2ALhnz57x0ksvGRZAwm3evDkef/zxeOGFF6KxsVFDIIck4fu/W7ZsWWpSAAC5QQAMAPA+1q9fvyzbT2z06NHDoAASbMuWLTFlypSYOXNm1NfXawjkoCTs19avX7/MpAAAcoMAGADgfSxYsGDh0KFDs7rGfffdN1KpVGQyGQMDSJCampqYMmVKPPPMM4JfyGGpVCr23XffrK9z/vz5C00LACA3CIABAN7Ho48++uYFF1yQ1TWWlJRE586dY926dQYGkAC1tbUxefLkePbZZ6Ourk5DIMd17do1WrVqlfV1/vnPf15kWgAAuUEADADwPiZNmlRVX1+/oaioqGM217nvvvsKgAGy3Pbt22P69OkxderU2LZtm4ZAM9GnT5+sr7G+vr7iySefrDItAIDcIAAGAPgAW7duXZTtAXCfPn3ipZdeMiyALNTQ0BDTpk2Lp556KqqrqzUEmpkkXP+8detWp38BAHKIABgA4ANUVFQs7NChw8hsrjEJLxYBmpvGxsaYMWNGPPnkk1FZWakh0EwlYZ9WUVHh+78AADlEAAwA8AGWLl266MADD8zqGnv16hUFBQXR2NhoYAB7WTqdjlmzZsWkSZNi06ZNGgLNWGFhYfTs2TMR+13TAgDIHQJgAIAPMHPmzEWnnnpqdm/qCgqiZ8+esWzZMgMD2EveDn4nT54cGzdu1BAg9tlnn8jPz0/CfnexaQEA5I48LQAAeH+//OUvV6bT6bpsr7NPnz6GBbAXZDKZePHFF+O73/1u3H///cJf4J+ScP1zOp2u++Uvf7nStAAAcocTwAAAH6C6ujpdXV29uE2bNodkc539+vWL6dOnGxjAHpLJZGL27NkxceLEWLNmjYYAO92fJWCvu7i6ujptWgAAuUMADADwIWzYsGFetgfA/fv3NyiAPeTVV1+NSZMmxapVqzQD2KlUKpWI/dmGDRvmmhYAQG4RAAMAfAiLFy9+o2/fvlldY1lZWXTu3DnWr19vYAC7yYIFC2L8+PGxZMkSzQDeV5cuXaK0tDQJ+9z5pgUAkFsEwAAAH8JTTz31+ujRo7O+zv33318ADLAbLFy4MMaPHx+LFy/WDOBD78uSYMqUKa+bFgBAbsnTAgCAD/aLX/xiTWNjY1W215mUF40ASbFs2bK4++674z/+4z+Ev8BHkoTv/zY0NFTee++9q00LACC3OAEMAPAhNDQ0ZDZv3jy/Q4cOI7O5TgEwwK6xYsWKePTRR2P+fDejArm7L9uyZYs/5AAAcpAAGADgQ1q3bl3WB8AdO3aMNm3axObNmw0M4GNYtWpVjB8/PubOnRuZTEZDgI+lbdu20aFDh0Tsb00LACD3CIABAD6kefPmzTvooIOyvs4DDzwwXnrpJQMD+AjWrVsX48ePj9mzZwt+gV2yH0uCuXPnzjMtAIDcIwAGAPiQ/vznP88/77zzsr7OAw44QAAM8CFVVFTEuHHjBL/ALt+PJcHDDz/sBDAAQA4SAAMAfEgTJ06srK2tXdGqVat9srnOgw8+2LAAPkBVVVVMnDgxnn/++WhqatIQYJdKwq0xNTU1yydNmlRlWgAAuUcADADwEWzYsOHvvXr1yuoAuG3bttG1a9dYu3atgQG8y+bNm+Pxxx+PF154IRobGzUE2OW6desWbdu2TcS+1rQAAHKTABgA4CNYuHDha7169Toj2+scMGCAABjgHbZs2RJTpkyJ5557LrZv364hwG6TlO//Lly48O+mBQCQmwTAAAAfwcSJE/9+wgknZH2dBx54YEyfPt3AgGavpqYmpkyZEs8880zU19drCLDbDRgwIBF1jh8//u+mBQCQmwTAAAAfwb333rv6Bz/4wfqioqLO2VznAQccEHl5eZFOpw0NaJZqa2tj8uTJ8eyzz0ZdXZ2GAHtEXl5e9O/fP+vrrK+vX3ffffeVmxgAQG4SAAMAfESVlZVzu3btmtXHgFu1ahX77LNPLFu2zMCAZqWuri6efvrpmDZtWmzbtk1DgD1qn332iVatWmV9nZs2bZpjWgAAuUsADADwES1dunR2tgfAERGDBg0SAAPNRkNDQ0ybNi2eeuqpqK6u1hBgr+2/kuCtt976m2kBAOQuATAAwEc0ffr0v48cOTLr6xw4cGBMmDDBwICc1tDQEM8991w8+eSTUVlZqSHAXt9/JcG0adP+bloAALlLAAwA8BH9x3/8x9JbbrmlOj8/v3U219mrV68oKyuLLVu2GBqQc9LpdMyaNSsmTZoUmzZt0hBgrysrK4tevXplfZ2NjY1b7rnnnmUmBgCQuwTAAAAfUW1tbXrDhg1/7dKly3HZXGcqlYqBAwfGrFmzDA3IGW8Hv5MnT46NGzdqCJA1Bg4cGKlUKuvr3Lhx4yu1tbVpEwMAyF0CYACAj+Gtt956JdsD4IgQAAM5I51Ox8svvxxTpkyJ8vJyDQGyct+VBIsWLXrFtAAAcpsAGADgYxg/fvwrRxxxRNbXedBBB0VBQUE0NjYaGpBImUwmZs+eHRMnTow1a9ZoCJCVCgoK4qCDDkpErY888ogAGAAgx+VpAQDAR/fjH/94ZX19/fpsr7OoqCj69etnYEAivfrqq3HHHXfEz3/+c+EvkNX69esXRUVFWV9nXV1d+b333rvaxAAAcpsTwAAAH9OGDRte6dGjx6ezvc5BgwbFggULDAxIjCVLlsSECRNi/vz5mgEkwuDBgxNR5/r1653+BQBoBgTAAAAf07x5815OQgA8bNiwePjhhyOTyRgakNXefPPNmDBhQixevFgzgMRIpVIxdOjQRNQ6d+7cl0wMACD3CYABAD6m++677+XRo0dnIiKVzXW2bds2evfuHcuWLTM0ICstW7YsHnvsMSd+gUTq06dPtG3bNgmlpu+9996/mhgAQO4TAAMAfEwTJ06s3Lp165LS0tK+2V7rkCFDBMBA1lmxYkU8+uijgl8g0YYMGZKIOqurqxc+/fTTm00MACD3CYABAD6B8vLyl/fff/+sD4AHDx4c48aNMzAgK6xcuTImTJgQc+fOdT09kHhJ+f7vmjVrfP8XAKCZEAADAHwCM2fOfG7//ff/fLbX2a1bt+jWrVuUl5cbGrDXrFu3LsaPHx+zZ88W/AI5oWfPntGlS5dE1DpjxoznTAwAoHkQAAMAfAK33Xbba5dcckl1fn5+62yvdciQIQJgYK9Yv359PPbYY4JfIOck5frnxsbGzbfddts8EwMAaB4EwAAAn0BlZWXThg0b/tqlS5fjsr3WQw89NCZNmmRowJ78MzKeeOKJeP7556OpqUlDgJxz6KGHJqLOioqKV6qrq9MmBgDQPAiAAQA+oXnz5s1MQgDcu3dv10ADe0RVVVVMnDgxXnjhhWhsbNQQICd17949evbsmZT9quufAQCakTwtAAD4ZP77v/97VkQk4kTFpz71KQMDdpstW7bEQw89FLfffns899xzwl8gpw0fPjwRdWYymfTdd9/9gokBADQfTgADAHxCkyZNqtqyZcuCsrKyg7K91uHDh8fjjz9uaMAuVVNTE1OmTIlnnnkm6uvrNQTIealUKg477LBE1Lply5bXp0+fvsXUAACaDwEwAMAusHz58lkDBw7M+gC4S5cu0atXr1i5cqWhAZ9YbW1tTJ48OZ599tmoq6vTEKDZ6N27d3Ts2DEx+1QTAwBoXgTAAAC7wLPPPvvCwIEDr0hCrcOGDRMAA59IXV1dPP300zFt2rTYtm2bhgDNzrBhwxJT61/+8pcXTQwAoHnxDWAAgF3g1ltvnV9fX782CbUefvjhkUqlDA34yBoaGmLq1Klx6623xuOPPy78BZqlJF3/XFdXt/rWW29dYGoAAM2LE8AAALtAQ0NDZs2aNc/16dPns9lea7t27aJPnz6xZMkSgwM+7J9xMW3atHjqqaeiurpaQ4Bmbb/99ou2bdsmotbVq1fPNDEAgOZHAAwAsIs8++yz05IQAEdEHHHEEQJg4AOl0+mYNWtWTJo0KTZt2qQhABFx5JFHJqbW6dOnTzMxAIDmxxXQAAC7yC233PJaQ0NDZRJqHT58eLRo0cLQgJ1Kp9Px3HPPxW233Rb333+/8Bdgh6KiovjUpz6ViFobGho23HLLLXNNDQCg+XECGABgF6murk6Xl5c/t88++5yR7bW2bNkyDj300Hj55ZcNDvindDodL7/8ckyZMiXKy8s1BOBdhgwZEkVFRYmodc2aNc/V1tamTQ0AoPkRAAMA7EIvvvjiM0kIgCMiRo4cKQAGIiIik8nE7NmzY+LEibFmzRoNAXif/VNSzJo161kTAwBongTAAAC70O233/7KOeecszU/P78022sdMGBAtG/f3tWu0My9+uqrMWnSpFi1apVmALyPjh07xgEHHJCIWhsbG6u/8Y1v/NXUAACaJwEwAMAutHLlyob169fP6tat2+hsrzWVSsXhhx8ekyZNMjhohubMmROTJ0+OJUuWaAbAh3D44YdHKpVKRK3r16+fVVFR0WhqAADNU54WAADsWq+++mpirts77LDDDAyamTfffDP+/d//PX7yk58IfwE+pFQqFSNGjEhMva+88sozpgYA0Hw5AQwAsIvddNNNz5166qnV+fn5rbO91m7dukX//v1j4cKFBgc5btmyZfHYY4/F/PnzNQPgIzrggAOic+fOiai1sbFxy4033jjL1AAAmi8BMADALrZy5cqG8vLyGT179vx0Euo9+uijBcCQw5YvXx7jxo0T/AJ8wv1SUpSXlz9TXl7eYGoAAM2XABgAYDeYMWPGUxdccEEiAuAhQ4ZE69ato7q62uAgh6xcuTImTJgQc+fOjUwmoyEAH1ObNm3i0EMPTUy9zz777FOmBgDQvPkGMADAbvDVr371lYaGhk1JqLWgoCCOOOIIQ4McsW7duvj5z38ed955Z8yZM0f4C/AJjRw5MvLz8xNRa0NDw8abbrrpVVMDAGjenAAGANgNKisrm1atWjW9T58+5ySh3qOPPjqefPJJQREk2Pr16+Oxxx6L2bNn+3cZYBdJpVIxatSoxNS7cuXKadXV1WmTAwBo3pwABgDYTaZNm5aY6/c6duwYAwYMMDRIoA0bNsSvf/3r+Nd//dd49dVXhb8Au9CAAQOiY8eOian36aefftLUAAAQAAMA7CZf+9rX5tTX11ckpd6jjjrK0CBBqqqq4v77749vf/vb8eKLL0ZTU5OmAOxiRx55ZGJqra+vX/eNb3zjdVMDAMAV0AAAu0ltbW16xYoVT++///6fT0K9hx56aLRt2zaqqqoMD7LYli1bYsqUKfHcc8/F9u3bNQRgN2nbtm0MGTIkMfUuX778qdraWtc/AwDgBDAAwO70xz/+cUJSas3Pz4/jjjvO0CBL1dTUxKOPPhq33XZb/OUvfxH+Auxmxx57bOTn5yel3Myvf/3rCaYGAECEABgAYLe66667llZXV89PSr1HH310tGjRwuAgi7wd/H7jG9+IqVOnRn19vaYA7GYtWrSIo48+OjH1btmy5Y177rlnhckBABDhCmgAgN3u9ddfn3T44YcPSEKtxcXFcdhhh8XMmTMNDvayurq6ePrpp2PatGmxbds2DQHYgw477LAoKSlJTL3z5s17wtQAAHibE8AAALvZ9773vanpdLohKfWecMIJkUqlDA72koaGhpg6dWrceuut8fjjjwt/AfawVCoVJ5xwQmLqTafT27/73e8+ZXIAALzNCWAAgN1s+vTpWyoqKmZ26dIlER/Y7d69e/Tv3z/efPNNw4M9qKGhIaZNmxZPPfVUVFdXawjAXnLAAQdE9+7dE1NvRUXFczNmzPAXBwAA/+QEMADAHjBr1qxEXcuXpFMvkHTpdDqee+65uP322+PRRx8V/gLsZccff3yi6p0xY8YkUwMA4J2cAAYA2AO++tWvvnT66adXFRYWtk1CvQMHDoyOHTvGhg0bDA92k3Q6HbNmzYrJkyfHxo0bNQQgC3Ts2DEGDhyYmHobGhoqb7755pdMDgCAd3ICGABgDygvL29YsWLF1MRsEvPy4sQTTzQ42A3S6XS8+OKL8Z3vfCfuv/9+4S9AFjnppJMiLy85r8tWrFgxpaKiotHkAAB4JwEwAMAe8qtf/erRiMgkpd6jjjoqysrKDA52kUwmE6+++mp873vfi1//+texdu1aTQHIImVlZXHUUUcl6q+W//7v//6zyQEA8G4CYACAPeQ///M/l1dWVv4tKfUWFhbGMcccY3CwC7wd/P785z+PNWvWaAhAFjruuOOioCA5X0urqqqa/dOf/nS1yQEA8G4CYACAPeill14al6R6jzvuuCgqKjI4+JjmzJkTd911V/z85z+P1au9owfIVkVFRYn7xbcXXnhhnMkBALAzBVoAALDnjB079pkFCxZUFhYWtktCvSUlJXHEEUfE9OnTDQ8+gjfffDPGjx8fb731lmYAJMCRRx4ZJSUliam3oaFh0zXXXPOsyQEAsDMCYACAPai8vLxh6dKlE/v3739xUmo+8cQT49lnn410Om2A8AEWLVoUjz32WCxevFgzABIiLy8vTjzxxETVvGTJkifKy8sbTA8AgJ3ucbUAAGDP+u1vfzsxIjJJqbdjx44xdOhQg4P3sXz58rj77rvjRz/6kfAXIGGGDRsWHTp0SFLJmd/85jePmxwAAO9FAAwAsIf953/+5/JNmza9kqSaTz/99EilUoYH77Jy5cr4yU9+Et///vdj/vz5GgKQMHl5eXHGGWckquZNmza9fM8996wwPQAA3osroAEA9oKXXnpp/KmnnnpYUurt2rVrDBkyJGbPnm14EBHr1q2L8ePHx+zZsyOTyWgIQEINHTo0OnfunKiaX3jhhQkmBwDA+xEAAwDsBZdffvkzS5YsWVdUVNQlKTWfccYZ8be//U3YRbO2fv36eOyxxwS/ADkglUrF6aefnqia6+rq1lx22WXTTQ8AgPcjAAYA2AsqKyub5s+f/8ihhx56dVJq7tatm1PANFsbNmyIxx9/PF555ZVoamrSEIAc8KlPfSq6du2aqJrfeOONcdXV1WnTAwDg/fgGMADAXvL1r399XDqdrktSzb4FTHNTVVUV999/f3z729+OF198UfgLkCNSqVR8+tOfTlTN6XS69pvf/OZjpgcAwAdxAhgAYC+ZMWNG9Zo1a/7Ss2fPxLx97N69ewwcODDmzJljgOS0LVu2xIQJE+KFF16IxsZGDQHIMYceemh069YtUTWvXr36qRkzZlSbHgAAH8QJYACAvejXv/71HyMiUR8SPeuss5wCJmdt27YtHn300bjtttviueeeE/4C5KC8vLwYM2ZM0srO/OpXv/qT6QEA8KH2vFoAALD3fP/733+rqqoqUR/V7dGjR3zqU58yPHJKfX19TJ06Nb71rW/F1KlTo76+XlMActSIESOiS5cuiap506ZNf73rrruWmh4AAB+GABgAYC975plnHkpazWeccUbk5dlKkjvmzZsXjz76aGzdulUzAHJYQUFBnH766Ymre9q0aQ+aHgAAH5a3dgAAe9nYsWNn1tfXr01SzZ07d47DDjvM8ACARBk5cmR06NAhUTXX1dWtHjt27POmBwDAhyUABgDYyyorK5tee+21Pyat7jPPPDMKCgoMEABIhBYtWiTy9O/s2bP/UF1dnTZBAAA+LAEwAEAWuOqqqyY0NjZWJanm9u3bx9FHH214AEAiHHfccdGmTZtE1dzQ0LDxiiuumGh6AAB8FAJgAIAssGDBgrqFCxc+lrS6R48eHYWFhQYIAGS1li1bxsknn5y4uhcuXDhu6dKl200QAICPQgAMAJAlvv71r/8pnU7XJqnmtm3bximnnGJ4AEBWO+2006K0tDRRNTc1NdV+7Wtfe8j0AAD4qATAAABZ4umnn968fPnyxF3xN3r06GjXrp0BAgBZqUOHDnH88ccnru5ly5ZNmD59+hYTBADgoxIAAwBkkbvvvvtPmUymKUk1FxYWxumnn254AEBWOvPMMxP3yYpMJtN41113/dH0AAD4OATAAABZ5Be/+MWatWvXTkta3UcccUT06tXLAAGArNK7d+847LDDEld3eXn5X+6///51JggAwMchAAYAyDIPP/zwn5JWcyqVijPPPNPwAICsMmbMmEilUomr+8EHH/yT6QEA8HEJgAEAsszXv/71NzZs2DAraXUPHDgwDj74YAMEALLCoEGDYsCAAYmru6KiYuatt966wAQBAPi4BMAAAFlo3Lhxv01i3WPGjIm8PFtMAGDvysvLizFjxiSy9j//+c+/NUEAAD7RflgLAACyz/XXXz+nqqrqr0mru1evXnHUUUcZIACwVx1zzDHRvXv3xNW9adOmV2666aa5JggAwCchAAYAyFJ/+tOf7k1i3WPGjInS0lIDBAD2ijZt2sRZZ52VyNofeOCBe00QAIBPSgAMAJClbrrpprlJPAVcXFwcZ555pgECAHvFWWedFS1btkxc3Zs2bXrl5ptvnmeCAAB8UgJgAIAsNm7cuF8lse5Ro0ZF7969DRAA2KP69OkTI0eOTGTtjz322K9MEACAXUEADACQxcaOHTu7qqrqb0mrO5VKxfnnnx+pVMoQAYA9tv/4/Oc/n8j9R2Vl5d+uueaav5kiAAC7ggAYACDLTZ069bdJrLtv374xZMgQAwQA9ojDDjsssTeQTJ48+TcmCADAriIABgDIcpdeeumLVVVVryax9s9//vNRXFxsiADAblVaWhrnn39+Imuvqqr66+WXX/6SKQIAsKsIgAEAEuChhx76WRLrLisri9NPP90AAYDd6qyzzoqSkpIklp753e9+91MTBABgVxIAAwAkwA033DB3w4YNs5JY+3HHHRd9+vQxRABgt+jbt28cddRRiay9oqJi1te//vU3TBEAgF1JAAwAkBA///nPfxoR6aTVnUql4vOf/3zk5dl6AgC7Vn5+flx00UWRSqWSWH76F7/4xX+bIgAAu5q3cAAACXHHHXe8tW7duulJrL13795xzDHHGCIAsEudcMIJ0b1790TWXl5e/pc77rjjLVMEAGBXEwADACTI3XfffW8mk2lKYu1nnXVWtG3b1hABgF2iQ4cOcfrppyey9kwm03T33Xf/3BQBANgdBMAAAAlyzz33rCgvL386ibW3bNkyzj33XEMEAHaJc889N1q0aJHI2tesWTP1xz/+8UpTBABgdxAAAwAkzA9/+MOfZzKZhiTWPnz48Bg0aJAhAgCfyKGHHhpDhw5NZO3pdLrhBz/4wS9MEQCA3UUADACQMPfee+/qRYsWPZDU+i+++OIoKSkxSADgY2ndunVcfPHFia1/4cKFf7jvvvvKTRIAgN1FAAwAkECXXXbZrxsaGjYlsfaysjJXQQMAH9u5554bpaWliay9oaFh4+WXX/47UwQAYHcSAAMAJNDs2bNrXn311V8ntf4jjjgiDj74YIMEAD6SwYMHx+GHH57Y+l955ZX7Zs+eXWOSAADsTgJgAICEOueccx6tqalZmtT6L7roomjZsqVBAgAfSsuWLeNzn/tcYuuvqalZMmbMmMdMEgCA3U0ADACQUJWVlU3Tpk37RVLrb9++fZx++ukGCQB8KGeccUa0b98+sfU/+eST91ZXV6dNEgCA3U0ADACQYOedd960qqqqV5Ja/wknnOAqaADgAx188MFx/PHHJ7b+TZs2vXzBBRc8a5IAAOwJAmAAgIT74x//eG9EZJJYeyqVigsuuMBV0ADAe2rZsmVccMEFkUqlkrqEzP333/8zkwQAYE8RAAMAJNzNN988b9WqVU8ktf6OHTsm+nt+AMDudcEFF0THjh0TW/+KFSse//rXv/6GSQIAsKcIgAEAcsCNN974k6ampq1JrX/kyJExdOhQgwQA/pdPfepTMWLEiMTW39TUVH3zzTf/t0kCALAnCYABAHLAxIkTK//+97//KslruPDCC6OsrMwwAYCIiGjTpk18/vOfT/QaZs+efd/EiRMrTRMAgD1JAAwAkCPOPvvsh2pqapYntf7S0tK46KKLDBIAiFQqFV/84hejtLQ0sWuoqal566yzznrYNAEA2NMEwAAAOaKioqJx0qRJP07yGgYPHhwjR440TABo5o444og46KCDEr2GJ5544qeVlZVNpgkAwJ4mAAYAyCGXXHLJzIqKihlJXsMFF1wQ3bp1M0wAaKZ69uyZ+KufKyoqZnzhC1+YZZoAAOwNAmAAgBzzb//2b/ek0+ntSa2/RYsWceWVV0ZhYaFhAkAzU1hYGF/60pcSvQ9Ip9Pb/+3f/u0e0wQAYG8RAAMA5Jh777139aJFix5M8hq6d+8eZ555pmECQDNzxhlnRPfu3RO9hsWLFz947733rjZNAAD2FgEwAEAO+uxnP/vL2traRL94PPHEE2Pw4MGGCQDNxKBBg+Kkk05K9Bpqa2tXn3vuub80TQAA9iYBMABADlq8eHH9uHHj/j3Ja0ilUnHJJZdE27ZtDRQAclybNm3ikksuiVQqleh1jBs37t8XL15cb6IAAOxNAmAAgBx1+eWXv1RRUTEjyWsoLS2NL3zhC4l/GQwAvLe3f+mrdevWiV5HRUXFM5dffvlLJgoAwN4mAAYAyGE33HDDXU1NTVuTvIaDDjrI94ABIId95jOfiUMOOSTRa2hqaqq+4YYbfmiaAABkAwEwAEAOGzdu3MbZs2cn/jt0p5xyiu8BA0AOOuSQQ+LTn/504tfx17/+9efjxo3baKIAAGQDATAAQI77zGc+81B1dfXCJK8hlUrFF7/4xejQoYOBAkCO6NixY3zpS19K/KceNm/ePO+00057xEQBAMgWAmAAgBxXXV2dfuCBB34UEekkr6O4uDguvfTSyMuzhQWApMvPz4/LLrssiouLk76U9P333/+ftbW1aVMFACBbeHsGANAMXH/99XMWLVr0YNLXsf/++8e5555roACQcOedd1707ds38etYuHDhH7/61a++bqIAAGQTATAAQDNxySWX/Lyurq486es4/vjjfQ8YABJs2LBhccwxxyR+HXV1dWsuvPDC+0wUAIBsIwAGAGgmXnvttdoHHnjguxGRSfI6UqlUfOlLX4oePXoYKgAkTO/evePSSy9N/Hd/IyLzwAMPfO/111+vNVUAALKNABgAoBm5+uqr/7Z06dJHk76OoqKiGDt2bJSWlhoqACRE69at46qrrorCwsLEr2X58uXjrr766r+ZKgAA2UgADADQzJx33nn/r66ubnXS19GhQ4e4/PLLIy/PlhYAsl1eXl5cfvnl0b59+8Svpb6+ft0ll1zyE1MFACBr999aAADQvLz++uu1Dz744Pcj4VdBR0QMGDAgzjrrLEMFgCw3ZsyYOPDAA3NiLY899tgPXnnllW2mCgBAthIAAwA0Q1/5ylf+umbNmqm5sJaTTz45Dj30UEMFgCw1ZMiQOOmkk3JiLWvXrv3LpZde+oKpAgCQzQTAAADN1GWXXfYf9fX1FUlfRyqViksvvTS6d+9uqACQZXr06BFf/OIXI5VKJX4tDQ0Nm6655pofmioAANlOAAwA0EzNmDGj+oEHHvhO5MBV0C1btozrr78+2rZta7AAkCXatWsX1113XbRs2TIXlpN56KGH/nXSpElVJgsAQLYTAAMANGNf+cpX/rpkyZI/58Ja2rZtG1dffXW0aNHCYAFgL2vRokVcffXVOfPLWUuXLn30iiuueNlkAQBIAgEwAEAzd+655/6ktrZ2eS6spXfv3jlzzSQAJNXbn2fYZ599cmI9tbW1y88555wfmywAAEkhAAYAaOYWLFhQ97Of/ezbmUymMRfWM2zYsDjllFMMFgD2kk9/+tMxdOjQnFhLJpNp/NnPfvbtBQsW1JksAABJIQAGACBuvfXWBfPnz78/V9Zz5plnxuDBgw0WAPaw4cOHx2c+85mcWc/8+fN/d+utty4wWQAAkkQADABARESMGTPmvpqamrdyYS2pVCouu+yy6Nmzp8ECwB7Su3fvuPjii3PmUwxbt25ddPrpp//aZAEASBoBMAAAERGxcuXKhh/+8Ie3pdPpnLjisGXLlvEv//Iv0aVLF8MFgN2sS5cucf3110dRUVFOrKepqanmu9/97jfKy8sbTBcAgKQRAAMA8E933XXX0ueff/6eXFlPaWlpXHvttVFWVma4ALCblJWVxXXXXRclJSU5s6aZM2fe/f/+3/9bZboAACSRABgAgP/l5JNPHldeXv50rqynU6dOMXbs2Jw5kQQA2aSoqCiuueaa6NixY86sqby8/MlTTz11gukCAJBUAmAAAP6PSy655K66urq1ubKefffdN6644orIy7P9BYBdJS8vL6688sro3bt3zqyprq6u/JJLLvmh6QIAkOi9uhYAAPBus2bNqn7ooYfujIh0rqxp4MCBcd555xkuAOwi559/fhxyyCG5tKT0gw8+eOesWbOqTRcAgCTLb3tQ9NzpjndbRG15oQ4BADRTEydOXDNmzJi8Tp06Dc2VNfXp0yfy8/PjzTffNGAA+ATOOuusOOmkk3JqTa+//vp9Z5555kTTBQAgCYq7N0Ze6c5/5gQwAADv6dRTT/31li1bXs+lNZ122mlx9NFHGy4AfEzHHntsnHrqqTm1pi1btrxx2mmn/cZ0AQDIBQJgAADeU0VFReONN974jcbGxqpcWtcFF1wQRx55pAEDwEd05JFHxuc+97mcWlNjY2PVzTff/I2KiopGEwYAIBcIgAEAeF9//OMf1z/yyCPfiRz6HnAqlYqLLroohgwZYsAA8CENHTo0LrrookilUrm0rPQjjzzynfvvv3+dCQMAkCsEwAAAfKBLL730hQULFvwupzbCeXnxpS99Kfbff38DBoAPcNBBB8WXvvSlyMvLrVdJCxYs+N2ll176ggkDAJBLBMAAAHwoo0eP/mVVVdXcXFpTYWFhfOUrX4kePXoYMAC8h169esUVV1wRBQUFObWuqqqqOaNHj/6lCQMAkGsEwAAAfCgVFRWNV1111S0NDQ0bcmldJSUlcfPNN8c+++xjyADwLr17946bbropiouLc2pdDQ0NG6666qqv++4vAAC5SAAMAMCHNmHChE3333//tzKZTDqX1lVcXBzXXXdddO/e3ZABYIfu3bvHtddeG61atcqpdWUymfT999//rQkTJmwyZQAAcpEAGACAj2Ts2LGz58+f/9tcW1fr1q3juuuuiw4dOhgyAM1ehw4d4rrrrovWrVvn3Nrmz5//m7Fjx842ZQAAcpUAGACAj+y44477xaZNm17MtXW1a9cubrzxxmjXrp0hA9BstW3bNmf/Pty4ceOLxx13nO/+AgCQ0wTAAAB8ZNXV1emLL774W3V1datzbW0dO3aMG2+8Mdq0aWPQADQ7ZWVlceONN0bHjh1zbm21tbWrL7zwwturq6vTJg0AQC7Lb3tQ9NzZD9LbImrLC3UIAICdWrZsWf327dtfOvbYY0/Ny8trkUtrKykpiaFDh8Zrr70WNTU1hg1As9ChQ4f42te+Fp06dcq5tTU1NW39zne+M/bBBx9cb9IAAOSC4u6NkVe6858JgAEA+NhefPHFzYcccsiyAQMGnBgRqZzaRBcXx5AhQ4TAADQLHTt2jJtuuik6dOiQi8tLjx8//ravfvWrc0waAIBc8X4BsCugAQD4RC688MIZb7zxxm9ycW3t27ePm266KSdPQgHA2zp16pTL4W+88cYbv77wwgufM2kAAJoLATAAAJ/YqFGjfrFhw4aZubi2t0Pgzp07GzQAOadz585x0003Rfv27XNyfRs2bJg5atSo+0waAIDmRAAMAMAnVltbm77sssu+V1dXtzoX19euXbu44YYbomPHjoYNQM7o0KFDXH/99dGuXbtc3Z+s/sIXvvDd2tratGkDANCc+AYwAAC7xJIlS+oj4pVRo0admpeX1yLX1ldcXBxDhw6NuXPnxrZt2wwcgETr0qVL3HjjjTl77XNTU1P1nXfeec0f/vCHdaYNAEAuer9vAAuAAQDYZWbNmlXVo0ePuYceeujoVCqVn2vra9WqVYwYMSIWLVoUlZWVBg5AIu23335x0003RVlZWU6uL51ON/z617++4fbbb3/TtAEAyFUCYAAA9phJkyatPeqoozbsu+++R+fi+goLC2P48OGxbNmy2LBhg4EDkCgDBgyIa6+9Nlq1apWza5w2bdq/XXLJJc+ZNgAAuez9AmDfAAYAYJc77bTTHn/rrbcezNX1FRUVxTXXXBNDhgwxbAASY8iQIXHNNddEUVFRzq5xwYIFvzv99NOfMG0AAJozATAAALvFEUcccc+GDRtm5ur6CgoK4sorr4wjjjjCsAFIwt/LceWVV0ZBQUHOrrG8vPypESNG/LdpAwDQ3AmAAQDYLaqrq9MXXXTRd2pra1fk7GY6Ly8uvvjiOPLIIw0cgKw1atSouPjiiyMvL3dfA23dunXxZz/72e83NDRkTBwAgObON4ABANhtli9fvr2mpuaFY4899uT8/PyWubjGVCoVgwYNikwmE4sWLTJ0ALLK6aefHueee26kUqmcXWN9fX3FDTfccM3UqVOrTBwAgObi/b4BLAAGAGC3evnll7cUFBS8cMQRR4zOy8trkYtrTKVSccABB0SnTp1i7ty5kck4fATA3lVYWBhXXHFFHHPMMTm9zsbGxuo777zzKz/72c9WmzoAAM2JABgAgL1qxowZlb169Xp98ODBJ6dSqfxcXWfPnj2jb9++8fe//z0aGxsNHoC9olWrVnH11VfHwIEDc3qd6XS64be//e2Nt9122wJTBwCguREAAwCw1z3xxBPlw4cPX9OvX79jIyJn76Hs2LFjDBw4MObMmRN1dXUGD8Ae1a5du7jxxhujT58+ub7U9JQpU779xS9+8XlTBwCgOXq/ADhPewAA2FPGjBkz9Y033vh1rq+zZ8+eceONN0bHjh0NHYA9pkuXLnHTTTdF9+7dc36tc+fO/eU555zzF1MHAID/SwAMAMAe9alPfernS5cufTjX19mlS5e49dZb48ADDzR0AHa7gQMHxje/+c3o1KlTzq/1rbfeemjEiBG/MnUAANg5ATAAAHvcsccee8/GjRtfyPV1FhcXx7XXXhsjRowwdAB2m8MPPzyuuuqqaNmyZc6vdePGjc8fffTR95g6AAC8NwEwAAB7XEVFReNxxx339crKyr/l+loLCgrisssui/PPPz9SqZThA7DLpFKpOP/88+PSSy+NgoKCnF/vpk2bXj7ssMNuqaysbDJ9AAB4bwJgAAD2isWLF9efddZZN1dXV7/ZHNZ7/PHHx5e//OUoKioyfAA+sRYtWsSXv/zlOP7445vFequrq98cM2bMN8rLyxtMHwAA3l9+24Oi585+kN4WUVteqEMAAOw2a9asaVi1atWs0aNHH1dQUNA619fbrVu3OOCAA2LevHlRX1/vAQDgYykrK4trrrkmDjrooGax3rq6uvKxY8de89RTT202fQAA+Ifi7o2RV7rznwmAAQDYq+bNm1ezevXqZ04++eTjCwoKSnN9ve3atYuRI0fG8uXLY+PGjR4AAD6S/v37x0033RRdu3ZtFuutr69fd9111335T3/6U4XpAwDA/xAAAwCQ1ebMmbMtlUq9fOSRR56Ul5eX83ckt2jRIkaMGBG1tbWxdOlSDwAAH8rxxx8fX/rSl5rN5wQaGxu33HXXXdf99Kc/XWn6AADwvwmAAQDIejNnzqzs2bPn64MHDz4plUrl5/p6U6lUHHLIIdGqVatYsGBBZDIZDwEAO5WXlxef/exn4/TTT49UKtUs1pxOp7f//ve//+o3vvGN1z0BAADwfwmAAQBIhEmTJpXvs88+8wYOHHhCKpUqaA5r3m+//WLAgAExd+5c3wUG4P8oKyuL6667LoYNG9Zs1pxOp7f/8Y9/vOmqq676qycAAAB2TgAMAEBiTJw4cc3BBx+85MADDzwulUrlNYc1t2/fPoYOHRqLFi2KLVu2eAgAiIiIffbZJ66//vro2bNns1lzJpNpnDBhwm1f/OIXn/cEAADAexMAAwCQKI8++ujy/fff/42DDjrohOZwHXRERHFxcRx11FHR2NgYb731locAoJkbPXp0XHHFFVFSUtJs1pxOpxsefvjhr15yySWzPAEAAPD+BMAAACTO+PHjVw0cOHDpAQcccGxzOQmcSqViwIAB0aVLl3jjjTeiqanJgwDQzBQVFcWll14aJ554YrP53m/EP07+Pv7447dffPHFMz0FAADwwQTAAAAk0iOPPLLs0EMPXbb//vs3mxA4IqJHjx4xZMiQePPNN2Pr1q0eBIBmonv37vEv//IvccABBzSrdWcymaYnnnji9s997nPPeAoAAODDEQADAJBYDz/88NJjjjlmY+/evY+KiGZzFKq0tDSGDx8eq1evjvXr13sQAHLcwIED45prrol27do1t6VnZsyY8YOzzjprqqcAAAA+PAEwAACJdv/99795zDHHVO6zzz5HRDMKgVu0aBGHHXZYtGzZMhYuXBjpdNrDAJBjCgoK4pxzzonzzz8/WrRo0dyWn37uuefuOuWUUyZ4EgAA4KMRAAMAkHi///3v5w8bNmxF3759j2lO10GnUqno27dvDB06NBYvXhxbtmzxMADkiJ49e8YNN9wQgwcPblbf+434x7XPU6ZM+fbpp58+2ZMAAAAfnQAYAICc8OCDDy4ZNmzYin79+jWrEDgionXr1nHEEUdEfX19LF261MMAkGCpVCpOOOGEuOKKK6JNmzbNbv07wt9vnXPOOX/xNAAAwMcjAAYAIGc89NBDS4YNG7a8X79+xza3EDg/Pz8OPvjg6NWrV8yfPz8aGho8EAAJU1JSEpdffnmccMIJkZ+f3+zWn8lkGp944olvffazn53maQAAgI9PAAwAQE556KGHlo4cOXJdnz59RqWa252ZEdG1a9cYNmxYLFu2LCorKz0QAAnRt2/fuO6662K//fZrluvPZDLpp59++rvnnHPO054GAAD4ZATAAADknD/96U+LDj300KX7779/s7sOOiKiuLg4jjzyyCgpKYk333wz0um0hwIgSxUUFMRnP/vZuPDCC6OkpKRZ9iCdTjc88sgjt5x//vnTPREAAPDJCYABAMhJDz/88NId3wQelUqlmt09mqlUKvr06RMHH3xwLFy4MLZt2+ahAMgynTt3jrFjx8bQoUOjGV5aERH/CH+feOKJ2y+88MLnPBEAALBrCIABAMhZDz300JIePXq8NmjQoGPz8vJaNMcetG3bNkaNGhVNTU2xZMkSDwVAFkilUjF69Oi48soro0OHDs22D01NTdt++9vf/stll132oqcCAAB2HQEwAAA5bdKkSeXdu3efM3jw4GYbAufn58eAAQOiV69esWDBgti+fbsHA2Avad26dVx66aVx/PHHR35+frPtQ2NjY/WvfvWrf7nuuute81QAAMCuJQAGACDnTZ48eW1jY+OMI4444uiCgoKS5tqHrl27xqhRo2Lbtm2xcuVKDwbAHpRKpWLUqFExduzY6NWrV7PuRX19/fo77rjjK9/61rcWejIAAGDXEwADANAsPP/881UbNmx45rjjjjuqsLCwrLn2obCwMAYNGhT77bdfLF68OGpraz0cALtZ+/bt44orrogTTzwxCgub9/uU2tralTfffPPVP/nJT1Z7MgAAYPcQAAMA0Gz87W9/27p27doZJ5xwwsjCwsK2zbkXnTp1ipEjR0Z1dbXTwAC70ciRI+Pqq6+OHj16NPte1NTULL/hhhuu/e1vf7vOkwEAALuPABgAgGbltdde2zpv3rynTznllKFFRUWdmnMvCgsL49BDD4399tsvFi1a5DQwwC709qnfk08+udmf+o2I2Lx587yLL774unHjxm30dAAAwO71fgFwat9zYsTOftC4LmLjq610DwCAxOrVq1fhs88++69du3Y9QTciGhoaYurUqTF58uRobGzUEICPqaCgIE499dQYPXq04HeH8vLyp4499tjvrly5skE3AABg9+swrDYKuuz8ZwJgAAByWuvWrfNeeumlm/fdd9+zdeMfVq9eHffff38sWbJEMwA+ov322y8uuugi1z2/w8KFC38/fPjwnzY0NGR0AwAA9gwBMAAAzd7zzz9/8aGHHnp1RKR0IyKTycTMmTPjz3/+c9TV1WkIwAcoKSmJ8847L0aMGBGplL9Kdki//PLL9xx77LEPagUAAOxZ7xcA+wYwAADNwn333Tfn+OOP39yrV6/DQwgcqVQqevfuHcOHD49169ZFRUWFhwTgPRxyyCExduzY6N+/v/B3h0wm0/jMM8/828knnzxONwAAYM97v28AC4ABAGg2fve7370xePDgJf369Ts6lUrl60hEcXFxjBgxInr06BFLly6N2tpaTQHYoUOHDvGFL3whzjzzzCguLtaQHZqammoeeOCBWz73uc9N1w0AANg7BMAAALDDww8/vKygoOC54cOHH1FQUFCqI//QrVu3OO6446K0tDQWL14cTU1NmgI0Wy1btoxzzjknLr300ujevbuGvENtbe2K22677arbbrvtDd0AAIC9RwAMAADv8Oyzz25avHjx0yeddNKQoqKiTjryD3l5edGnT58YOXJkbN26NVatWqUpQLNz+OGHx1e+8pUYMGBA5OXlacg7VFVV/e3CCy+8/oEHHvDdAAAA2MsEwAAA8C7z58+vefbZZ58+44wz+hcXF/fSkf/RsmXLGDJkSOyzzz6xdOnSqKmp0RQg53Xs2DG++MUvximnnBItW7bUkHdZt27dMyeffPI3Xn755W26AQAAe9/7BcCpfc+JETv7QeO6iI2vttI9AAByWmFhYer555//0sEHH3y5bvxfTU1N8fzzz8f48eOjurpaQ4Cc07p16zjzzDPjyCOPdOJ35zJ///vff3rMMcfc39DQkNEOAADIDh2G1UZBl53/TAAMAAARMWnSpM8cc8wxt6RSKdfg7ERNTU1MmTIlpk2bFg0NDRoCJF5hYWGccsopcdJJJ0VRUZGG7EQ6na6fOnXqd88555y/6AYAAGSX9wuAXQENAAAR8Yc//GHhfvvt98aAAQOOysvLkwS8S2FhYQwYMCCGDh0amzZtinXr1mkKkFiDBw+Oq666KoYOHRoFBQUashONjY1Vv//972/5whe+MEs3AAAg+/gGMAAAfAgTJkxYXV1dPf3II4/8VGFhYTsd+b9KS0vjsMMOi/79+8eaNWti8+bNmgIkRu/evePyyy+PU045JUpLSzXkPWzdunXxLbfccs33vve9hboBAADZyTeAAQDgI+jTp0+LJ5988us9evQ4TTfe3/z58+ORRx6JlStXagaQtXr16hXnnHNODBgwQDM+wKpVq5444YQTfrBy5Ur3/QMAQBbzDWAAAPgYnnnmmfOHDx9+fSqVytON95bJZGL27Nkxbty4qKio0BAga3Tu3DnOOuusGDp0aKRSKQ15/z/Lm2bNmvXDk08++THdAACA7OcbwAAA8DH85je/eX3//fd//cADDzzSd4HfWyqViu7du8cxxxwT7dq1i2XLlkV9fb3GAHtN27Zt49xzz42LL744evToIfz9AI2NjdUPPvjgLZ/97Gf/ohsAAJAMvgEMAAAf0/jx41dFxPOHHXbYiMLCwjIdeW95eXnRu3fvOOqoo6KgoCBWrlwZjY2NGgPsMcXFxXHKKafEl770pejbt2/k5bnA4YPU1tau+MEPfnD9LbfcMk83AAAgQf/94xvAAADwyQwePLjVo48++s1u3bqdpBsfTn19fTzzzDMxderU2LZtm4YAu01ZWVmceuqpceSRR0ZRkQsbPqyVK1c+/ulPf/pHixcvdm0DAAAkjG8AAwDALvLkk0+edeSRR96USqVcl/MhCYKB3eXtE7/HHnus4PcjyGQyDbNmzfoP3/sFAIDk8g1gAADYRX7/+98v6NGjx2uHHHLIyPz8fL8x+SEUFBREv3794qijjoq8vLxYtWqVq6GBT6Rly5ZxwgknxBVXXBEHHXRQFBQUaMqH1NDQsOG3v/3t1z7/+c8/oxsAAJBcroAGAIBd7Lzzzut4991339m2bdvBuvHR1NTUxLPPPhvTpk2LLVu2aAjwoZWVlcXxxx8fxxxzTBQXF2vIR1RVVfW3a6+99vZHHnlkg24AAECyuQIaAAB2g06dOhVMmzZtbN++fT8XESkd+WgaGhri+eefjyeffDI2bJBFAO/7522cdNJJccQRR0RhodvKPobMokWL/nTsscf+pLKyskk7AAAg+QTAAACwG/3hD38Ydfrpp99WUFDQRjc+unQ6Ha+++mpMnTo1Vq5cqSHAP/Xq1StOOeWUGDp0aOTl5WnIx9DY2Fg1YcKEOy666KKZugEAALlDAAwAALvZaaed1vbee+/9docOHUbqxse3fPnymDZtWrz88suRTqc1BJqhvLy8OOyww+L444+P3r17a8gnsHHjxue//OUvf3fSpElVugEAALlFAAwAAHtAYWFh6qmnnjpv+PDh16RSKXeUfgIbNmyIGTNmxHPPPRc1NTUaAs1AcXFxjBo1Ko4++ujo2LGjhnwCmUym4ZVXXvl/J5100kMNDQ0ZHQEAgNzzfgFwftuDoufOfpDeFlFb7p0VAAB8WOl0On7zm9+8Xlpa+uLgwYM/VVhYWKYrH09xcXEMGDAgjj322GjTpk2sXbs2amtrNQZyUIcOHeKMM86ISy+9NAYOHBjFxcWa8gnU1tau+slPfnLjxRdf/IybFAAAIHcVd2+MvNKd/8wJYAAA2A1OPPHENvfdd9+tnTp1Olo3PrnGxsb429/+Fs8++2wsWrRIQyAH9OvXL44++ugYNmxYFBQUaMguUFFR8cwXv/jFf5s+ffoW3QAAgNzmCmgAANhLHn744RNGjx799YKCgta6sWusX78+Zs6cGc8//3xUV1drCCRIaWlpHHnkkXHUUUdF586dNWQXaWxs3DJ16tS7PvvZz/5FNwAAoHkQAAMAwF50ySWXdP3+97//rXbt2g3VjV2nsbExXnvttXjuuedi/vz5GgJZbMCAATFq1KgYPHiw0767WFVV1atf//rXv/e73/1urW4AAEDzIQAGAIC9rF27dvlTp0699OCDD740lUrl68iutXz58nj++efj5ZdfjpqaGg2BLFBSUhLDhw+PI444Inr37q0hu1gmk2mcN2/efSeeeOJvq6urfewXAACaGQEwAABkia9//ev73Xjjjf9aWlraXzd2vXQ6HW+++WY899xz8dprr0VjY6OmwB5UUFAQgwcPjlGjRsUBBxwQeXl5mrIbVFdXL/zP//zPf/3BD36wRDcAAKB5EgADAEAWOfjgg1v9+c9/vrZ3795jIiKlI7tHZWVlvPjii/HCCy/EunXrNAR2o65du8bIkSPj8MMPj7Zt22rI7pNZunTpn88888z/t3jx4nrtAACA5ksADAAAWejuu+8eePHFF9/WqlUrd6PuZuXl5fHqq6/GSy+9FOvXr9cQ2AU6d+4cI0aMiGHDhkW3bt00ZDerqalZ9tvf/vbOm266aa5uAAAAAmAAAMhS/fr1K3r44Ycv79+//4WpVMpdqXvA8uXL46WXXoqXX345qqurNQQ+grKyshg+fHiMGDHCd333kEwmk164cOEfzj777F8sXbp0u44AAAARAmAAAMh6P/3pT4d97nOf+2bLli176Mae0dDQEHPnzo2//vWvMXfu3Ni+Xa4CO9OyZcsYNGhQDBs2LA455JAoKCjQlD2ktrZ21R//+Mc7rr322r/rBgAA8E4CYAAASIA+ffq0ePTRR69wGnjPS6fTsXTp0nj11VedDIaIaNu2bQwbNiyGDRsWffr0ibw8fyTtSZlMpuG11177+ZlnnvmnioqKRh0BAADeTQAMAAAJ8uMf//jQCy644JutWrXaRzf2vLdPBs+ePTvmzp0bdXV1mkKzUFZWFoMHD45hw4ZF//79Iz8/X1P2gpqammX333//nTfccINv/QIAAO9JAAwAAAnTrl27/HHjxp37qU996qq8vDwb870kk8nEihUrYu7cuTFnzpxYsWJFZDIZjSEnpFKp6Nu3bwwbNiwGDRoUHTt21JS9qKmpqfbVV1/92ZgxY/5cWVnZpCMAAMD7EQADAEBCffnLX+5x++23f7V9+/aH68bet2XLlnjjjTdizpw5MW/evKivr9cUEqVly5Zx8MEHx6BBg+KQQw6J0tJSTckCGzdufPG73/3uv//iF79YoxsAAMCHIQAGAIAEKywsTE2cOPGMkSNHXlNQUNBaR7JDXV1dvPnmm/HGG2/EG2+8EevXr9cUslKXLl3ioIMOioMOOigOOOCAKCoq0pQs0djYuGXmzJk/PvPMMyc2NDS4XgAAAPjQBMAAAJADjjzyyNY/+9nPrujbt++5EZGnI9mluro6Fi5cGPPnz4958+ZFZWWlprBXtGvXLg455JAYMGBA9O/fP1q39nsjWSj91ltv/fmqq676xaxZs6q1AwAA+KgEwAAAkEN++ctfjhgzZsyNrVq16q0b2SmdTsfKlStj0aJFsXDhwli8eHFs27ZNY9gtSkpKol+/ftG/f//Yf//9o1evXpGX53dEslVNTc3yRx999EdXXnnlK7oBAAB8XAJgAADIMd26dSt8+OGHPzd48ODL8vPzbdyzXCaTiTVr1sTChQtj0aJFsWjRotiyZYvG8LGUlZVF//79/xn6du/ePVKplMZkuaampprXXnvtV2PGjHmgoqKiUUcAAIBPQgAMAAA56rjjjiv7r//6r8tdC508mzdvjuXLl8eKFSti+fLlsXjx4qipqdEY/pfi4uLo169f9O7dO/bZZ5/Yd999o6ysTGMSJJPJpJcsWfLn66677pfTp0/3mx8AAMAuIQAGAIAc99Of/nTIueeee3NpaWlf3UimxsbGWLlyZSxdujSWLVsWy5cvj3Xr1kUmk9GcZiKVSkWXLl1in332iT59+kSfPn2iV69eUVBQoDkJtXXr1sUPPvjgj6699tq/6wYAALArCYABAKAZaNeuXf64cePOGTp06BUFBQWtdST56uvrY+XKlf88KbxixYpYu3ZtpNNpzUm4vLy86Nq1a+yzzz7//KdXr17RsmVLzckBjY2NW/7617/+4pxzznm0srKySUcAAIBdTQAMAADNyIknntjmnnvuuXzfffcdk0qlHB3MMdu3b481a9bEmjVrYu3atbF27dooLy+PDRs2CIazUF5eXnTs2DG6desWXbt2jW7dukW3bt2iR48eUVhYqEE5JpPJNC5ZsuRR1z0DAAC7mwAYAACaoa9+9av7Xnfdddd16NDhCN3IfY2Njf8MhNetWxfr1q2LioqKWLduXWzbtk2DdrPS0tLo3LnzP//p0qVLdO3aNbp27eoK52Ziw4YNM//rv/7rxz/60Y+W6wYAALC7CYABAKAZ++UvfznirLPOuq64uNj3gZupmpqaWL9+/T//qaioiMrKyqisrIxNmzZFY2OjJn2AgoKCaN++fbRr1y7at28fHTt2jC5dukSnTp2ic+fOUVxcrEnN1NatW98aP378PVdcccXLugEAAOwpAmAAAGjm2rVrl//ggw+eOWLEiCsLCwvb6gjvtHnz5n+GwZs2bYrKysqorq6OLVu2xJYtW6K6ujqqq6sjk8nk3NpTqVS0bt06WrduHWVlZdGmTZsoLS39X2Fvu3btok2bNh4U/peGhobKl1566efnnHPO+OrqavevAwAAe5QAGAAAiIiIoUOHFt97770XHHjggRfk5+c7ssiHlk6n/xkEV1dXR01Nzfv+k8lkora2NtLpdNTX10dTU1PU1dXt0u8U5+XlRcuWLSM/Pz+KiooiLy8vWrVqFalUKoqLi3f6T0lJSbRq1eqfgW9paWnk5eUZMB9aU1NTzYIFC/745S9/+Y+zZ8+u0REAAGBvEAADAAD/y2mnndb2rrvuurRPnz5n5+XlFeoIe9LbgfDbtm/f/r7XUBcUFESLFi3++b/fDnxhT8pkMg1LliwZd8stt/xq0qRJVToCAADsTQJgAABgp0477bS2d95554X777//5wTBAP9XJpNpWLhw4QO33nrrHwS/AABAtni/ADi/7UHRc2c/SG+LqC33/gcAAHLZokWL6u69995X0un0swcddFCnkpKS3roC8A8VFRUz/7//7/+77aKLLpq6aNGiOh0BAACyRXH3xsgr3fnPBMAAAEDMnDmz8u67736qqalpWr9+/Ypbt27dN5VKpXQGaG4ymUx6zZo1U+65555/Peeccx6cOXNmpa4AAADZRgAMAAB8KDNnzqz88Y9//Gw6nZ4uCAaak7eD37vvvvtfzz///McEvwAAQDYTAAMAAB+JIBhoLgS/AABAEgmAAQCAj+XtILisrOyFvn37diwuLu4VEYJgIBdkKioqnrv33nu/PWbMmEcEvwAAQJK8XwCc2vecGLGzHzSui9j4aivdAwAA/unqq6/u8ZWvfOX8Pn36nJWXl9dCR4CkSafT9UuXLh3/X//1Xw/84he/WKMjAABAEnUYVhsFXXb+MwEwAADwkZ1xxhntb7/99rMPPPDA8/Pz81vrCJDtmpqaqhcsWPDgd77znUcmTpzotC8AAJBoAmAAAGC3GD58eMkPf/jDzwwePPjioqKijjoCZJv6+voNr7322u9vvPHGx2fPnl2jIwAAQC4QAAMAALvV0KFDi++5556zDjnkkPOKioq66giwt9XV1a19/fXXH7z++uvHC34BAIBcIwAGAAD2iFatWuXdc889w0455ZTzO3bseJSOAHtYZsOGDbOmTJny4PXXX/9qbW1tWksAAIBcJAAGAAD2uH/913/tf/7555/dq1ev0/Ly8lroCLC7pNPp+pUrV05+4IEHHvnOd76zSEcAAIBcJwAGAAD2mjPOOKP97bfffvYBBxzw2YKCgjY6AuwqjY2NVW+++eafv/e97z06YcKETToCAAA0FwJgAABgrxs+fHjJ97///dGDBg0aU1paur+OAB9XdXX1wtdee+3Rr371q1Nfe+21Wh0BAACaGwEwAACQVb761a/ue8EFF3y6b9++ZxUUFLTWEeCDNDY2bnnrrbfG/+EPf5j4ox/9aLmOAAAAzZkAGAAAyEpDhw4t/sEPfnDy4MGDz27dunV/HQHerbq6+s2XX375weuuu+7ppUuXbtcRAAAAATAAAJDlCgsLU3ffffeQ0aNHn9G1a9fj8vLyinQFmq90Ol1XXl4+bcqUKROuvfbav+sIAADA/yYABgAAEqNPnz4t/v3f/33UyJEjz2rfvv2nIiKlK9AsZDZt2vTXF1544bGvfe1rzzntCwAA8N4EwAAAQCJddNFFXa6++uqTDzzwwLNbtmzZTUcg99TV1a1ZsGDBuJ/+9KdP3n///et0BAAA4IMJgAEAgETr1q1b4d13333k4YcffmqHDh2OyMvLK9QVSK50Ot2wcePGWbNmzZp8/fXXz6qoqGjUFQAAgA9PAAwAAOSMo48+uvWtt956/CGHHHJKu3btBkdEnq5AIqQrKytfmzdv3uQ777xz+owZM6q1BAAA4OMRAAMAADnpuOOOK/vGN75x/CGHHHJa27ZtB4bvBUO2yVRVVc2dN2/epO9///vTpk+fvkVLAAAAPjkBMAAAkPNuu+22vmedddZJffr0Oa5Vq1a9dQT2ntra2uXLly+f/uijjz51xx13vKUjAAAAu5YAGAAAaFa+9KUvdbv44ouP7t+//wlOBsMekamqqpq7cOHCv/z+97+fcd9995VrCQAAwO4jAAYAAJqtSy65pOtll112jDAYdrl0VVXVvIULF/7lV7/61bO/+93v1moJAADAniEABgAAiIirr766x/nnnz9q//33P7JNmzZDUqlUga7Ah5fJZBoqKyv/vnjx4uf+9Kc/zbr33ntX6woAAMCeJwAGAAB4l379+hV97WtfGzRy5MhRPXv2PLaoqKizrsD/VV9fv37VqlXPvPDCC8/9+7//+5zFixfX6woAAMDeJQAGAAB4H61bt8678847Bx599NFHde/efURpaen+4apomq/M1q1bF69Zs+bF5557btY3v/nNOdXV1WltAQAAyB4CYAAAgI9g8ODBrcaOHXvI8OHDD+vevfvw1q1bHxACYXJXprq6+s01a9a88sorr7z8k5/8ZN5rr71Wqy0AAADZSwAMAADwCVx//fX7nHHGGYf169dvePv27Yfm5+e31hWSrLGxsXrjxo2vvvXWWy+PHz/+lR//+McrdQUAACA5BMAAAAC70Je//OUe55xzzvA+ffoM7tix45CioqKuukI2q6+vX7t27doXFy9ePGfixImv3Xvvvat1BQAAILkEwAAAALvRl7/85R6f+cxnBvfr129Qly5dDm/ZsqVAmL2qrq5u7bp16wS+AAAAOUoADAAAsIe0atUq75prrtnn2GOPPXi//fY7uH379oeUlpb2TaVS+brDbpKuqalZtnHjxnlvvfXW3GeffXbef/3Xfy2vra1Naw0AAEBuEgADAADsRQceeGDLq6+++oAhQ4Yc3LNnz4Pbtm17sGuj+biampqqq6qqXi8vL583Z86ceb/85S/nvfjii1t1BgAAoPkQAAMAAGSZoUOHFn/xi1/cf9CgQQf26NHjwHbt2h3YqlWr3qlUKk932CFdU1OzvLKycsHq1asXzJkzZ8Gf//znJTNmzKjWGgAAgOZNAAwAAJAAxx13XNkFF1xw4MEHH3xA165dDywtLd23pKRkn1QqVag7uS2TyTRs27ZtRXV19dJ169YtfOONNxZOmDBh4YQJEzbpDgAAAO8mAAYAAEiw8847r+OJJ57Yp3///vt16dKlT5s2bfZr3bp1v/z8/GLdSZampqaa6urqxZs3b16ybt26pQsXLlzy9NNPL33ooYc26A4AAAAflgAYAAAgx7Rr1y7/kksu6TFkyJCe++67b89OnTr1Kisr61VcXNyzZcuW3VKpVL4u7R2ZTKaprq6uvKamZtWWLVtWVlRUrFy6dOnK2bNnr7r//vvXVFZWNukSAAAAn4QAGAAAoBnp1KlTwec+97luQ4cO7bnPPvv0aNeuXafWrVt3Li4u7tqyZcvORUVFnfLy8lro1MeTTqe319fXr6+rq6uoqalZW11dvb6ysnL9ihUrVr/66qurHnzwwbUVFRWNOgUAAMDuIgAGAADgfznjjDPaH3bYYZ369OnTuUuXLp3Kysral5SUtC0uLu5YVFTUrqioqG2LFi065OfnlzaXnjQ1NW3dvn37xvr6+qr6+vrKmpqaDdu2bavasmXLpnXr1lUsXbp0/Ysvvrh+4sSJlZ4gAAAA9iYBMAAAAB9Lr169CkeNGtXuoIMOatexY8ey9u3bl7Zp06Z1SUlJWXFxcetWrVq1btGiRVlRUVHrwsLC1hGRX1hYWBoR+QUFBSV5eXkFeXl5u/0/LtPpdG06nW5sbGzcFhFNDQ0NW3f83+r6+vrq7du3b6mtra2uqamp3rZtW/XmzZurN23aVL1hw4YtCxYsqJo1a1bl0qVLt5s4AAAASSAABgAAYK/q169fUffu3Vvss88+xSUlJQVv//8LCwtT3bp1+8BTxuXl5VsbGhoyb//vbdu2Na5YsaJmzZo12xcvXlyvwwAAADQn7xcAF2gPAAAAu9vixYvrdwS11boBAAAAu0+eFgAAAAAAAADkBgEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4o0AIAAAAAAACA5GhoLIyCxoaIiEilIpNXGE1v/0wADAAAAAAAAJAghQUN/0x6MxGppvT/5L6ugAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAIb/v5272ZHiusM4/FZ1NUkz9sQwOF4EyZJtpJCwysa5jSy4n1xPEqRIuQFvvfGSgIwBOzGRQAQERnx0d1UW0cgWGvKxsMGvnmfVdc7/1OJsf+oCAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoMY3JP//9K8My551lzpAk293a7QAAAAAAAAD8iIw3r+SL7TpPxuSt4/ibJJuz20QDBgAAAAAAAHhzrJPp6NvHYcyyjLl7dJTPbl/Jp6sPLufSsM+5ec7q5YOrF0OeP/SVaAAAAAAAAIA3weH7u6zfm79dWDIMSw6225w785vsx3XyzasOby5ssz69c4sAAAAAAAAAr9n69C6bC9sT93a7rKdnORin5Otxynzi1JQcfiwCAwAAAAAAALxO69O7HH68TaaT98cp85R8vbp3Nfszv8q0LHn7xMF1sjk/ZzUPmZ/MmWefhAYAAAAAAAD4oayPdjn7223Gn7x6ZrXPnetX8mBKkpv3cufDd/Pufn5FL56SzcVtNheT3dNt8tQlAwAAAAAAAHyv1sm0ySv/9XtsNWZ3I/lHkgzHi7/4XY7WYz5yiwAAAAAAAAA/Ivtcv/3nPEyS1fHa42t5+vNLyX7JoRsCAAAAAAAAePPt1/nbV3/KvePn1Xc371/NYxEYAAAAAAAA4M0yTHk2rvNo2WdzvHZqzN9v/SF3vju3evng/at5fPDLPDu1yuGyZHSVAAAAAAAAAK/XOGe4ueSvZ4e8M8xZbVe5ceuPufvy3Oqkw4+v5emDX+fuuTlLhhwsEYIBAAAAAAAAXpclGR8OuXP0TR4cPM/9z/+SRyfNDf/1TZezOp/87KdjzizJZkhO7edMy/w/nAUAAAAAAADg/zaMWcZkP8/ZLsmLacr2/MV8+cnvs/tP5/4FmLjAq1ifcioAAAAASUVORK5CYII=";function Mt(t,e,n){return typeof t=="string"&&!isNaN(Number(t))&&(t=Number(t)),typeof t=="number"&&t<100?Wt(t):typeof t=="number"&&t>=100?t:typeof t=="string"&&t.includes("%")?Math.round(e&&e==="X"?parseFloat(t)/100*n.width:e&&e==="Y"?parseFloat(t)/100*n.height:parseFloat(t)/100*n.width):0}function tA(t){return t.replace(/[xy]/g,function(e){const n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)})}function Et(t){return typeof t>"u"||t==null?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function Wt(t){return typeof t=="number"&&t>100?t:(typeof t=="string"&&(t=Number(t.replace(/in*/gi,""))),Math.round(Lt*t))}function xt(t){const e=Number(t)||0;return isNaN(e)?0:Math.round(e*Nf)}function Ml(t){return t=t||0,Math.round((t>360?t-360:t)*6e4)}function Zm(t){const e=t.toString(16);return e.length===1?"0"+e:e}function $m(t,e,n){return(Zm(t)+Zm(e)+Zm(n)).toUpperCase()}function Zt(t,e){let n=(t||"").replace("#","");!Jm.test(n)&&n!==Xa.background1&&n!==Xa.background2&&n!==Xa.text1&&n!==Xa.text2&&n!==Xa.accent1&&n!==Xa.accent2&&n!==Xa.accent3&&n!==Xa.accent4&&n!==Xa.accent5&&n!==Xa.accent6&&(console.warn(`"${n}" is not a valid scheme color or hex RGB! "${_a}" used instead. Only provide 6-digit RGB or 'pptx.SchemeColor' values!`),n=_a);const i=Jm.test(n)?"srgbClr":"schemeClr",s='val="'+(Jm.test(n)?n.toUpperCase():n)+'"';return e?`<a:${i} ${s}>${e}</a:${i}>`:`<a:${i} ${s}/>`}function TS(t,e){let n="";const i=Object.assign(Object.assign({},e),t),s=Math.round(i.size*Nf),c=i.color,d=Math.round(i.opacity*1e5);return n+=`<a:glow rad="${s}">`,n+=Zt(c,`<a:alpha val="${d}"/>`),n+="</a:glow>",n}function Qa(t){let e="solid",n="",i="",s="";if(t)switch(typeof t=="string"?n=t:(t.type&&(e=t.type),t.color&&(n=t.color),t.alpha&&(i+=`<a:alpha val="${Math.round((100-t.alpha)*1e3)}"/>`),t.transparency&&(i+=`<a:alpha val="${Math.round((100-t.transparency)*1e3)}"/>`)),e){case"solid":s+=`<a:solidFill>${Zt(n,i)}</a:solidFill>`;break;default:s+="";break}return s}function Zs(t){return t._rels.length+t._relsChart.length+t._relsMedia.length+1}function Qg(t){if(!(!t||typeof t!="object"))return t.type!=="outer"&&t.type!=="inner"&&t.type!=="none"&&(console.warn("Warning: shadow.type options are `outer`, `inner` or `none`."),t.type="outer"),t.angle&&((isNaN(Number(t.angle))||t.angle<0||t.angle>359)&&(console.warn("Warning: shadow.angle can only be 0-359"),t.angle=270),t.angle=Math.round(Number(t.angle))),t.opacity&&((isNaN(Number(t.opacity))||t.opacity<0||t.opacity>1)&&(console.warn("Warning: shadow.opacity can only be 0-1"),t.opacity=.75),t.opacity=Number(t.opacity)),t.color&&t.color.startsWith("#")&&(console.warn('Warning: shadow.color should not include hash (#) character, , e.g. "FF0000"'),t.color=t.color.replace("#","")),t}function RS(t,e,n){var i,s;const c=2.3+(!((i=t.options)===null||i===void 0)&&i.autoPageCharWeight?t.options.autoPageCharWeight:0),d=Math.floor(e/Nf*Lt)/((!((s=t.options)===null||s===void 0)&&s.fontSize?t.options.fontSize:pi)/c),h=[];let p=[];const u=[],A=[];t.text&&t.text.toString().trim().length===0?p.push({_type:Tt.tablecell,text:" "}):typeof t.text=="number"||typeof t.text=="string"?p.push({_type:Tt.tablecell,text:(t.text||"").toString().trim()}):Array.isArray(t.text)&&(p=t.text);let y=[];return p.forEach(x=>{var S;typeof x.text=="string"&&(x.text.split(`
42
42
  `).length>1?x.text.split(`
43
43
  `).forEach(w=>{y.push({_type:Tt.tablecell,text:w,options:Object.assign(Object.assign({},x.options),{breakLine:!0})})}):y.push({_type:Tt.tablecell,text:x.text.trim(),options:x.options}),!((S=x.options)===null||S===void 0)&&S.breakLine&&(u.push(y),y=[])),y.length>0&&(u.push(y),y=[])}),u.forEach(x=>{x.forEach(S=>{const w=[],R=String(S.text).split(" ");R.forEach((D,N)=>{const M=Object.assign({},S.options);M!=null&&M.breakLine&&(M.breakLine=N+1===R.length),w.push({_type:Tt.tablecell,text:D+(N+1<R.length?" ":""),options:M})}),A.push(w)})}),A.forEach(x=>{let S=[],w="";x.forEach(T=>{w.length+T.text.length>d&&(h.push(S),S=[],w=""),S.push(T),w+=T.text.toString()}),S.length>0&&h.push(S)}),h}function fx(t=[],e={},n,i){let s=Df,c=Lt*1,d=Lt*1,h=0,p=0;const u=[],A=Mt(e.x,"X",n),y=Mt(e.y,"Y",n),x=Mt(e.w,"X",n),S=Mt(e.h,"Y",n);let w=x;function T(){let D=0;u.length===0&&(D=y||Wt(s[0])),u.length>0&&(D=Wt(e.autoPageSlideStartY||e.newSlideStartY||s[0])),d=(S||n.height)-D-Wt(s[2]),u.length>1&&(typeof e.autoPageSlideStartY=="number"?d=(S||n.height)-Wt(e.autoPageSlideStartY+s[2]):typeof e.newSlideStartY=="number"?d=(S||n.height)-Wt(e.newSlideStartY+s[2]):y&&(d=(S||n.height)-Wt((y/Lt<s[0]?y/Lt:s[0])+s[2]),d<S&&(d=S)))}if(e.verbose&&(console.log("[[VERBOSE MODE]]"),console.log("|-- TABLE PROPS --------------------------------------------------------|"),console.log(`| presLayout.width ................................ = ${(n.width/Lt).toFixed(1)}`),console.log(`| presLayout.height ............................... = ${(n.height/Lt).toFixed(1)}`),console.log(`| tableProps.x .................................... = ${typeof e.x=="number"?(e.x/Lt).toFixed(1):e.x}`),console.log(`| tableProps.y .................................... = ${typeof e.y=="number"?(e.y/Lt).toFixed(1):e.y}`),console.log(`| tableProps.w .................................... = ${typeof e.w=="number"?(e.w/Lt).toFixed(1):e.w}`),console.log(`| tableProps.h .................................... = ${typeof e.h=="number"?(e.h/Lt).toFixed(1):e.h}`),console.log(`| tableProps.slideMargin .......................... = ${e.slideMargin?String(e.slideMargin):""}`),console.log(`| tableProps.margin ............................... = ${String(e.margin)}`),console.log(`| tableProps.colW ................................. = ${String(e.colW)}`),console.log(`| tableProps.autoPageSlideStartY .................. = ${e.autoPageSlideStartY}`),console.log(`| tableProps.autoPageCharWeight ................... = ${e.autoPageCharWeight}`),console.log("|-- CALCULATIONS -------------------------------------------------------|"),console.log(`| tablePropX ...................................... = ${A/Lt}`),console.log(`| tablePropY ...................................... = ${y/Lt}`),console.log(`| tablePropW ...................................... = ${x/Lt}`),console.log(`| tablePropH ...................................... = ${S/Lt}`),console.log(`| tableCalcW ...................................... = ${w/Lt}`)),!e.slideMargin&&e.slideMargin!==0&&(e.slideMargin=Df[0]),i&&typeof i._margin<"u"?Array.isArray(i._margin)?s=i._margin:isNaN(Number(i._margin))||(s=[Number(i._margin),Number(i._margin),Number(i._margin),Number(i._margin)]):(e.slideMargin||e.slideMargin===0)&&(Array.isArray(e.slideMargin)?s=e.slideMargin:isNaN(e.slideMargin)||(s=[e.slideMargin,e.slideMargin,e.slideMargin,e.slideMargin])),e.verbose&&console.log(`| arrInchMargins .................................. = [${s.join(", ")}]`),(t[0]||[]).forEach(N=>{N||(N={_type:Tt.tablecell});const M=N.options||null;p+=Number(M!=null&&M.colspan?M.colspan:1)}),e.verbose&&console.log(`| numCols ......................................... = ${p}`),!x&&e.colW&&(w=Array.isArray(e.colW)?e.colW.reduce((D,N)=>D+N)*Lt:e.colW*p||0,e.verbose&&console.log(`| tableCalcW ...................................... = ${w/Lt}`)),c=w||Wt((A?A/Lt:s[1])+s[3]),e.verbose&&console.log(`| emuSlideTabW .................................... = ${(c/Lt).toFixed(1)}`),!e.colW||!Array.isArray(e.colW))if(e.colW&&!isNaN(Number(e.colW))){const D=[];(t[0]||[]).forEach(()=>D.push(e.colW)),e.colW=[],D.forEach(M=>{Array.isArray(e.colW)&&e.colW.push(M)})}else{e.colW=[];for(let D=0;D<p;D++)e.colW.push(c/Lt/p)}let R={rows:[]};return t.forEach((D,N)=>{const M=[];let O=0,I=0,Y=[];D.forEach(V=>{var ge,X,ae,L;Y.push({_type:Tt.tablecell,text:[],options:V.options}),V.options.margin&&V.options.margin[0]>=1?(!((ge=V.options)===null||ge===void 0)&&ge.margin&&V.options.margin[0]&&xt(V.options.margin[0])>O?O=xt(V.options.margin[0]):e!=null&&e.margin&&e.margin[0]&&xt(e.margin[0])>O&&(O=xt(e.margin[0])),!((X=V.options)===null||X===void 0)&&X.margin&&V.options.margin[2]&&xt(V.options.margin[2])>I?I=xt(V.options.margin[2]):e!=null&&e.margin&&e.margin[2]&&xt(e.margin[2])>I&&(I=xt(e.margin[2]))):(!((ae=V.options)===null||ae===void 0)&&ae.margin&&V.options.margin[0]&&Wt(V.options.margin[0])>O?O=Wt(V.options.margin[0]):e!=null&&e.margin&&e.margin[0]&&Wt(e.margin[0])>O&&(O=Wt(e.margin[0])),!((L=V.options)===null||L===void 0)&&L.margin&&V.options.margin[2]&&Wt(V.options.margin[2])>I?I=Wt(V.options.margin[2]):e!=null&&e.margin&&e.margin[2]&&Wt(e.margin[2])>I&&(I=Wt(e.margin[2])))}),T(),h+=O+I,e.verbose&&N===0&&console.log(`| SLIDE [${u.length}]: emuSlideTabH ...... = ${(d/Lt).toFixed(1)} `),D.forEach((V,ge)=>{var X;const ae={_type:Tt.tablecell,_lines:null,_lineHeight:Wt((!((X=V.options)===null||X===void 0)&&X.fontSize?V.options.fontSize:e.fontSize?e.fontSize:pi)*(bS+(e.autoPageLineWeight?e.autoPageLineWeight:0))/100),text:[],options:V.options};ae.options.rowspan&&(ae._lineHeight=0),ae.options.autoPageCharWeight=e.autoPageCharWeight?e.autoPageCharWeight:null;let L=e.colW[ge];V.options.colspan&&Array.isArray(e.colW)&&(L=e.colW.filter((te,le)=>le>=ge&&le<le+V.options.colspan).reduce((te,le)=>te+le)),ae._lines=RS(V,L),M.push(ae)}),e.verbose&&console.log(`
@@ -80,7 +80,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
80
80
  ${h}
81
81
  <c:overlay val="0"/>
82
82
  </c:title>`}function sn(t){let e="";const n=t-1;return n<=25?e=of[n]:e=`${of[Math.floor(n/of.length-1)]}${of[n%of.length]}`,e}function Nl(t,e){if(t){if(typeof t!="object")return console.warn("`shadow` options must be an object. Ex: `{shadow: {type:'none'}}`"),"<a:effectLst/>"}else return"<a:effectLst/>";let n="<a:effectLst>";const i=Object.assign(Object.assign({},e),t),s=i.type||"outer",c=xt(i.blur),d=xt(i.offset),h=Math.round(i.angle*6e4),p=i.color,u=Math.round(i.opacity*1e5),A=i.rotateWithShape?1:0;return n+=`<a:${s}Shdw sx="100000" sy="100000" kx="0" ky="0" algn="bl" blurRad="${c}" rotWithShape="${A}" dist="${d}" dir="${h}">`,n+=`<a:srgbClr val="${p}">`,n+=`<a:alpha val="${u}"/></a:srgbClr>`,n+=`</a:${s}Shdw>`,n+="</a:effectLst>",n}function Yg(t){let e="<c:majorGridlines>";return e+=" <c:spPr>",e+=` <a:ln w="${xt(t.size||Bl.size)}" cap="${nA(t.cap||Bl.cap)}">`,e+=' <a:solidFill><a:srgbClr val="'+(t.color||Bl.color)+'"/></a:solidFill>',e+=' <a:prstDash val="'+(t.style||Bl.style)+'"/><a:round/>',e+=" </a:ln>",e+=" </c:spPr>",e+="</c:majorGridlines>",e}function nA(t){if(!t||t==="flat")return"flat";if(t==="square")return"sq";if(t==="round")return"rnd";{const e=t;throw new Error(`Invalid chart line cap: ${e}`)}}function ng(t){var e,n;const i=typeof process<"u"&&!!(!((e=process.versions)===null||e===void 0)&&e.node)&&((n=process.release)===null||n===void 0?void 0:n.name)==="node";let s,c;const d=i?()=>Wa(this,void 0,void 0,function*(){({default:s}=yield Promise.resolve().then(()=>require("./__vite-browser-external-BcPniuRQ.cjs"))),{default:c}=yield Promise.resolve().then(()=>require("./__vite-browser-external-BcPniuRQ.cjs"))}):()=>Wa(this,void 0,void 0,function*(){});i&&d();const h=[],p=t._relsMedia.filter(A=>A.type!=="online"&&!A.data&&(!A.path||A.path&&!A.path.includes("preencoded"))),u=[];return p.forEach(A=>{u.includes(A.path)?A.isDuplicate=!0:(A.isDuplicate=!1,u.push(A.path))}),p.filter(A=>!A.isDuplicate).forEach(A=>{h.push(Wa(this,void 0,void 0,function*(){if(c||(yield d()),i&&s&&A.path.indexOf("http")!==0)try{const y=s.readFileSync(A.path);return A.data=Buffer.from(y).toString("base64"),p.filter(x=>x.isDuplicate&&x.path===A.path).forEach(x=>x.data=A.data),"done"}catch(y){throw A.data=Tu,p.filter(x=>x.isDuplicate&&x.path===A.path).forEach(x=>x.data=A.data),new Error(`ERROR: Unable to read media: "${A.path}"
83
- ${String(y)}`)}return i&&c&&A.path.startsWith("http")?yield new Promise((y,x)=>{c.get(A.path,S=>{let w="";S.setEncoding("binary"),S.on("data",T=>w+=T),S.on("end",()=>{A.data=Buffer.from(w,"binary").toString("base64"),p.filter(T=>T.isDuplicate&&T.path===A.path).forEach(T=>T.data=A.data),y("done")}),S.on("error",()=>{A.data=Tu,p.filter(T=>T.isDuplicate&&T.path===A.path).forEach(T=>T.data=A.data),x(new Error(`ERROR! Unable to load image (https.get): ${A.path}`))})})}):yield new Promise((y,x)=>{const S=new XMLHttpRequest;S.onload=()=>{const w=new FileReader;w.onloadend=()=>{A.data=w.result,p.filter(T=>T.isDuplicate&&T.path===A.path).forEach(T=>T.data=A.data),A.isSvgPng?t2(A).then(()=>y("done")).catch(x):y("done")},w.readAsDataURL(S.response)},S.onerror=()=>{A.data=Tu,p.filter(w=>w.isDuplicate&&w.path===A.path).forEach(w=>w.data=A.data),x(new Error(`ERROR! Unable to load image (xhr.onerror): ${A.path}`))},S.open("GET",A.path),S.responseType="blob",S.send()})}))}),t._relsMedia.filter(A=>A.isSvgPng&&A.data).forEach(A=>{Wa(this,void 0,void 0,function*(){i&&!s&&(yield d()),i&&s?(A.data=Tu,h.push(Promise.resolve("done"))):h.push(t2(A))})}),h}function t2(t){return Wa(this,void 0,void 0,function*(){return yield new Promise((e,n)=>{const i=new Image;i.onload=()=>{i.width+i.height===0&&i.onerror("h/w=0");let s=document.createElement("CANVAS");const c=s.getContext("2d");s.width=i.width,s.height=i.height,c.drawImage(i,0,0);try{t.data=s.toDataURL(t.type),e("done")}catch(d){i.onerror(d.toString())}s=null},i.onerror=()=>{t.data=Tu,n(new Error(`ERROR! Unable to load image (image.onerror): ${t.path}`))},i.src=typeof t.data=="string"?t.data:Tu})})}const US={cover:function(t,e){const n=t.h/t.w,s=e.h/e.w>n,c=s?e.h/n:e.w,d=s?e.h:e.w*n,h=Math.round(1e5*.5*(1-e.w/c)),p=Math.round(1e5*.5*(1-e.h/d));return`<a:srcRect l="${h}" r="${h}" t="${p}" b="${p}"/><a:stretch/>`},contain:function(t,e){const n=t.h/t.w,s=e.h/e.w>n,c=s?e.w:e.h/n,d=s?e.w*n:e.h,h=Math.round(1e5*.5*(1-e.w/c)),p=Math.round(1e5*.5*(1-e.h/d));return`<a:srcRect l="${h}" r="${h}" t="${p}" b="${p}"/><a:stretch/>`},crop:function(t,e){const n=e.x,i=t.w-(e.x+e.w),s=e.y,c=t.h-(e.y+e.h),d=Math.round(1e5*(n/t.w)),h=Math.round(1e5*(i/t.w)),p=Math.round(1e5*(s/t.h)),u=Math.round(1e5*(c/t.h));return`<a:srcRect l="${d}" r="${h}" t="${p}" b="${u}"/><a:stretch/>`}};function Vg(t){var e;let n=t._name?'<p:cSld name="'+t._name+'">':"<p:cSld>",i=1;return t._bkgdImgRid?n+=`<p:bg><p:bgPr><a:blipFill dpi="0" rotWithShape="1"><a:blip r:embed="rId${t._bkgdImgRid}"><a:lum/></a:blip><a:srcRect/><a:stretch><a:fillRect/></a:stretch></a:blipFill><a:effectLst/></p:bgPr></p:bg>`:!((e=t.background)===null||e===void 0)&&e.color?n+=`<p:bg><p:bgPr>${Qa(t.background)}</p:bgPr></p:bg>`:!t.bkgd&&t._name&&t._name===yg&&(n+='<p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg>'),n+="<p:spTree>",n+='<p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr>',n+='<p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/>',n+='<a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr>',t._slideObjects.forEach((s,c)=>{var d,h,p,u,A,y,x,S;let w=0,T=0,R=Mt("75%","X",t._presLayout),D=0,N,M="",O=null,I=null,Y=0,J=0,q=null,W=null;const V=(d=s.options)===null||d===void 0?void 0:d.sizing,ge=(h=s.options)===null||h===void 0?void 0:h.rounding;t._slideLayout!==void 0&&t._slideLayout._slideObjects!==void 0&&s.options&&s.options.placeholder&&(N=t._slideLayout._slideObjects.filter(L=>L.options.placeholder===s.options.placeholder)[0]),s.options=s.options||{},typeof s.options.x<"u"&&(w=Mt(s.options.x,"X",t._presLayout)),typeof s.options.y<"u"&&(T=Mt(s.options.y,"Y",t._presLayout)),typeof s.options.w<"u"&&(R=Mt(s.options.w,"X",t._presLayout)),typeof s.options.h<"u"&&(D=Mt(s.options.h,"Y",t._presLayout));let X=R,ae=D;switch(N&&((N.options.x||N.options.x===0)&&(w=Mt(N.options.x,"X",t._presLayout)),(N.options.y||N.options.y===0)&&(T=Mt(N.options.y,"Y",t._presLayout)),(N.options.w||N.options.w===0)&&(R=Mt(N.options.w,"X",t._presLayout)),(N.options.h||N.options.h===0)&&(D=Mt(N.options.h,"Y",t._presLayout))),s.options.flipH&&(M+=' flipH="1"'),s.options.flipV&&(M+=' flipV="1"'),s.options.rotate&&(M+=` rot="${Ml(s.options.rotate)}"`),s._type){case Tt.table:if(O=s.arrTabRows,I=s.options,Y=0,J=0,O[0].forEach(L=>{q=L.options||null,Y+=q!=null&&q.colspan?Number(q.colspan):1}),W=`<p:graphicFrame><p:nvGraphicFramePr><p:cNvPr id="${i*t._slideNum+1}" name="${s.options.objectName}"/>`,W+='<p:cNvGraphicFramePr><a:graphicFrameLocks noGrp="1"/></p:cNvGraphicFramePr> <p:nvPr><p:extLst><p:ext uri="{D42A27DB-BD31-4B8C-83A1-F6EECF244321}"><p14:modId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="1579011935"/></p:ext></p:extLst></p:nvPr></p:nvGraphicFramePr>',W+=`<p:xfrm><a:off x="${w||(w===0?0:Lt)}" y="${T||(T===0?0:Lt)}"/><a:ext cx="${R||(R===0?0:Lt)}" cy="${D||Lt}"/></p:xfrm>`,W+='<a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table"><a:tbl><a:tblPr/>',Array.isArray(I.colW)){W+="<a:tblGrid>";for(let L=0;L<Y;L++){let te=Wt(I.colW[L]);(te==null||isNaN(te))&&(te=(typeof s.options.w=="number"?s.options.w:1)/Y),W+=`<a:gridCol w="${Math.round(te)}"/>`}W+="</a:tblGrid>"}else{J=I.colW?I.colW:Lt,s.options.w&&!I.colW&&(J=Math.round((typeof s.options.w=="number"?s.options.w:1)/Y)),W+="<a:tblGrid>";for(let L=0;L<Y;L++)W+=`<a:gridCol w="${J}"/>`;W+="</a:tblGrid>"}O.forEach(L=>{var te,le;for(let Ae=0;Ae<L.length;){const ne=L[Ae],oe=(te=ne.options)===null||te===void 0?void 0:te.colspan,ie=(le=ne.options)===null||le===void 0?void 0:le.rowspan;if(oe&&oe>1){const j=new Array(oe-1).fill(void 0).map(()=>({_type:Tt.tablecell,options:{rowspan:ie},_hmerge:!0}));L.splice(Ae+1,0,...j),Ae+=oe}else Ae+=1}}),O.forEach((L,te)=>{const le=O[te+1];le&&L.forEach((Ae,ne)=>{var oe,ie;const j=Ae._rowContinue||((oe=Ae.options)===null||oe===void 0?void 0:oe.rowspan),K=(ie=Ae.options)===null||ie===void 0?void 0:ie.colspan,ve=Ae._hmerge;if(j&&j>1){const xe={_type:Tt.tablecell,options:{colspan:K},_rowContinue:j-1,_vmerge:!0,_hmerge:ve};le.splice(ne,0,xe)}})}),O.forEach((L,te)=>{let le=0;Array.isArray(I.rowH)&&I.rowH[te]?le=Wt(Number(I.rowH[te])):I.rowH&&!isNaN(Number(I.rowH))?le=Wt(Number(I.rowH)):(s.options.cy||s.options.h)&&(le=Math.round((s.options.h?Wt(s.options.h):typeof s.options.cy=="number"?s.options.cy:1)/O.length)),W+=`<a:tr h="${le}">`,L.forEach(Ae=>{var ne,oe,ie,j,K;const ve=Ae,xe={rowSpan:((ne=ve.options)===null||ne===void 0?void 0:ne.rowspan)>1?ve.options.rowspan:void 0,gridSpan:((oe=ve.options)===null||oe===void 0?void 0:oe.colspan)>1?ve.options.colspan:void 0,vMerge:ve._vmerge?1:void 0,hMerge:ve._hmerge?1:void 0};let Re=Object.keys(xe).map(he=>[he,xe[he]]).filter(([,he])=>!!he).map(([he,k])=>`${String(he)}="${String(k)}"`).join(" ");if(Re&&(Re=" "+Re),ve._hmerge||ve._vmerge){W+=`<a:tc${Re}><a:tcPr/></a:tc>`;return}const Fe=ve.options||{};ve.options=Fe,["align","bold","border","color","fill","fontFace","fontSize","margin","textDirection","underline","valign"].forEach(he=>{I[he]&&!Fe[he]&&Fe[he]!==0&&(Fe[he]=I[he])});const pt=Fe.valign?` anchor="${Fe.valign.replace(/^c$/i,"ctr").replace(/^m$/i,"ctr").replace("center","ctr").replace("middle","ctr").replace("top","t").replace("btm","b").replace("bottom","b")}"`:"",lt=Fe.textDirection&&Fe.textDirection!=="horz"?` vert="${Fe.textDirection}"`:"";let ut=!((j=(ie=ve._optImp)===null||ie===void 0?void 0:ie.fill)===null||j===void 0)&&j.color?ve._optImp.fill.color:!((K=ve._optImp)===null||K===void 0)&&K.fill&&typeof ve._optImp.fill=="string"?ve._optImp.fill:"";ut=ut||Fe.fill?Fe.fill:"";const Rt=ut?Qa(ut):"";let je=Fe.margin===0||Fe.margin?Fe.margin:lx;!Array.isArray(je)&&typeof je=="number"&&(je=[je,je,je,je]);let St="";je[0]>=1?St=` marL="${xt(je[3])}" marR="${xt(je[1])}" marT="${xt(je[0])}" marB="${xt(je[2])}"`:St=` marL="${Wt(je[3])}" marR="${Wt(je[1])}" marT="${Wt(je[0])}" marB="${Wt(je[2])}"`,W+=`<a:tc${Re}>${r2(ve)}<a:tcPr${St}${pt}${lt}>`,Fe.border&&Array.isArray(Fe.border)&&[{idx:3,name:"lnL"},{idx:1,name:"lnR"},{idx:0,name:"lnT"},{idx:2,name:"lnB"}].forEach(he=>{Fe.border[he.idx].type!=="none"?(W+=`<a:${he.name} w="${xt(Fe.border[he.idx].pt)}" cap="flat" cmpd="sng" algn="ctr">`,W+=`<a:solidFill>${Zt(Fe.border[he.idx].color)}</a:solidFill>`,W+=`<a:prstDash val="${Fe.border[he.idx].type==="dash"?"sysDash":"solid"}"/><a:round/><a:headEnd type="none" w="med" len="med"/><a:tailEnd type="none" w="med" len="med"/>`,W+=`</a:${he.name}>`):W+=`<a:${he.name} w="0" cap="flat" cmpd="sng" algn="ctr"><a:noFill/></a:${he.name}>`}),W+=Rt,W+=" </a:tcPr>",W+=" </a:tc>"}),W+="</a:tr>"}),W+=" </a:tbl>",W+=" </a:graphicData>",W+=" </a:graphic>",W+="</p:graphicFrame>",n+=W,i++;break;case Tt.text:case Tt.placeholder:if(!s.options.line&&D===0&&(D=Lt*.3),s.options._bodyProp||(s.options._bodyProp={}),s.options.margin&&Array.isArray(s.options.margin)?(s.options._bodyProp.lIns=xt(s.options.margin[0]||0),s.options._bodyProp.rIns=xt(s.options.margin[1]||0),s.options._bodyProp.bIns=xt(s.options.margin[2]||0),s.options._bodyProp.tIns=xt(s.options.margin[3]||0)):typeof s.options.margin=="number"&&(s.options._bodyProp.lIns=xt(s.options.margin),s.options._bodyProp.rIns=xt(s.options.margin),s.options._bodyProp.bIns=xt(s.options.margin),s.options._bodyProp.tIns=xt(s.options.margin)),n+="<p:sp>",n+=`<p:nvSpPr><p:cNvPr id="${c+2}" name="${s.options.objectName}">`,!((p=s.options.hyperlink)===null||p===void 0)&&p.url&&(n+=`<a:hlinkClick r:id="rId${s.options.hyperlink._rId}" tooltip="${s.options.hyperlink.tooltip?Et(s.options.hyperlink.tooltip):""}"/>`),!((u=s.options.hyperlink)===null||u===void 0)&&u.slide&&(n+=`<a:hlinkClick r:id="rId${s.options.hyperlink._rId}" tooltip="${s.options.hyperlink.tooltip?Et(s.options.hyperlink.tooltip):""}" action="ppaction://hlinksldjump"/>`),n+="</p:cNvPr>",n+="<p:cNvSpPr"+(!((A=s.options)===null||A===void 0)&&A.isTextBox?' txBox="1"/>':"/>"),n+=`<p:nvPr>${s._type==="placeholder"?Mp(s):Mp(N)}</p:nvPr>`,n+="</p:nvSpPr><p:spPr>",n+=`<a:xfrm${M}>`,n+=`<a:off x="${w}" y="${T}"/>`,n+=`<a:ext cx="${R}" cy="${D}"/></a:xfrm>`,s.shape==="custGeom")n+="<a:custGeom><a:avLst />",n+="<a:gdLst>",n+="</a:gdLst>",n+="<a:ahLst />",n+="<a:cxnLst>",n+="</a:cxnLst>",n+='<a:rect l="l" t="t" r="r" b="b" />',n+="<a:pathLst>",n+=`<a:path w="${R}" h="${D}">`,(y=s.options.points)===null||y===void 0||y.forEach((L,te)=>{if("curve"in L)switch(L.curve.type){case"arc":n+=`<a:arcTo hR="${Mt(L.curve.hR,"Y",t._presLayout)}" wR="${Mt(L.curve.wR,"X",t._presLayout)}" stAng="${Ml(L.curve.stAng)}" swAng="${Ml(L.curve.swAng)}" />`;break;case"cubic":n+=`<a:cubicBezTo>
83
+ ${String(y)}`)}return i&&c&&A.path.startsWith("http")?yield new Promise((y,x)=>{c.get(A.path,S=>{let w="";S.setEncoding("binary"),S.on("data",T=>w+=T),S.on("end",()=>{A.data=Buffer.from(w,"binary").toString("base64"),p.filter(T=>T.isDuplicate&&T.path===A.path).forEach(T=>T.data=A.data),y("done")}),S.on("error",()=>{A.data=Tu,p.filter(T=>T.isDuplicate&&T.path===A.path).forEach(T=>T.data=A.data),x(new Error(`ERROR! Unable to load image (https.get): ${A.path}`))})})}):yield new Promise((y,x)=>{const S=new XMLHttpRequest;S.onload=()=>{const w=new FileReader;w.onloadend=()=>{A.data=w.result,p.filter(T=>T.isDuplicate&&T.path===A.path).forEach(T=>T.data=A.data),A.isSvgPng?t2(A).then(()=>y("done")).catch(x):y("done")},w.readAsDataURL(S.response)},S.onerror=()=>{A.data=Tu,p.filter(w=>w.isDuplicate&&w.path===A.path).forEach(w=>w.data=A.data),x(new Error(`ERROR! Unable to load image (xhr.onerror): ${A.path}`))},S.open("GET",A.path),S.responseType="blob",S.send()})}))}),t._relsMedia.filter(A=>A.isSvgPng&&A.data).forEach(A=>{Wa(this,void 0,void 0,function*(){i&&!s&&(yield d()),i&&s?(A.data=Tu,h.push(Promise.resolve("done"))):h.push(t2(A))})}),h}function t2(t){return Wa(this,void 0,void 0,function*(){return yield new Promise((e,n)=>{const i=new Image;i.onload=()=>{i.width+i.height===0&&i.onerror("h/w=0");let s=document.createElement("CANVAS");const c=s.getContext("2d");s.width=i.width,s.height=i.height,c.drawImage(i,0,0);try{t.data=s.toDataURL(t.type),e("done")}catch(d){i.onerror(d.toString())}s=null},i.onerror=()=>{t.data=Tu,n(new Error(`ERROR! Unable to load image (image.onerror): ${t.path}`))},i.src=typeof t.data=="string"?t.data:Tu})})}const US={cover:function(t,e){const n=t.h/t.w,s=e.h/e.w>n,c=s?e.h/n:e.w,d=s?e.h:e.w*n,h=Math.round(1e5*.5*(1-e.w/c)),p=Math.round(1e5*.5*(1-e.h/d));return`<a:srcRect l="${h}" r="${h}" t="${p}" b="${p}"/><a:stretch/>`},contain:function(t,e){const n=t.h/t.w,s=e.h/e.w>n,c=s?e.w:e.h/n,d=s?e.w*n:e.h,h=Math.round(1e5*.5*(1-e.w/c)),p=Math.round(1e5*.5*(1-e.h/d));return`<a:srcRect l="${h}" r="${h}" t="${p}" b="${p}"/><a:stretch/>`},crop:function(t,e){const n=e.x,i=t.w-(e.x+e.w),s=e.y,c=t.h-(e.y+e.h),d=Math.round(1e5*(n/t.w)),h=Math.round(1e5*(i/t.w)),p=Math.round(1e5*(s/t.h)),u=Math.round(1e5*(c/t.h));return`<a:srcRect l="${d}" r="${h}" t="${p}" b="${u}"/><a:stretch/>`}};function Vg(t){var e;let n=t._name?'<p:cSld name="'+t._name+'">':"<p:cSld>",i=1;return t._bkgdImgRid?n+=`<p:bg><p:bgPr><a:blipFill dpi="0" rotWithShape="1"><a:blip r:embed="rId${t._bkgdImgRid}"><a:lum/></a:blip><a:srcRect/><a:stretch><a:fillRect/></a:stretch></a:blipFill><a:effectLst/></p:bgPr></p:bg>`:!((e=t.background)===null||e===void 0)&&e.color?n+=`<p:bg><p:bgPr>${Qa(t.background)}</p:bgPr></p:bg>`:!t.bkgd&&t._name&&t._name===yg&&(n+='<p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg>'),n+="<p:spTree>",n+='<p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr>',n+='<p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/>',n+='<a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr>',t._slideObjects.forEach((s,c)=>{var d,h,p,u,A,y,x,S;let w=0,T=0,R=Mt("75%","X",t._presLayout),D=0,N,M="",O=null,I=null,Y=0,J=0,q=null,W=null;const V=(d=s.options)===null||d===void 0?void 0:d.sizing,ge=(h=s.options)===null||h===void 0?void 0:h.rounding;t._slideLayout!==void 0&&t._slideLayout._slideObjects!==void 0&&s.options&&s.options.placeholder&&(N=t._slideLayout._slideObjects.filter(L=>L.options.placeholder===s.options.placeholder)[0]),s.options=s.options||{},typeof s.options.x<"u"&&(w=Mt(s.options.x,"X",t._presLayout)),typeof s.options.y<"u"&&(T=Mt(s.options.y,"Y",t._presLayout)),typeof s.options.w<"u"&&(R=Mt(s.options.w,"X",t._presLayout)),typeof s.options.h<"u"&&(D=Mt(s.options.h,"Y",t._presLayout));let X=R,ae=D;switch(N&&((N.options.x||N.options.x===0)&&(w=Mt(N.options.x,"X",t._presLayout)),(N.options.y||N.options.y===0)&&(T=Mt(N.options.y,"Y",t._presLayout)),(N.options.w||N.options.w===0)&&(R=Mt(N.options.w,"X",t._presLayout)),(N.options.h||N.options.h===0)&&(D=Mt(N.options.h,"Y",t._presLayout))),s.options.flipH&&(M+=' flipH="1"'),s.options.flipV&&(M+=' flipV="1"'),s.options.rotate&&(M+=` rot="${Ml(s.options.rotate)}"`),s._type){case Tt.table:if(O=s.arrTabRows,I=s.options,Y=0,J=0,O[0].forEach(L=>{q=L.options||null,Y+=q!=null&&q.colspan?Number(q.colspan):1}),W=`<p:graphicFrame><p:nvGraphicFramePr><p:cNvPr id="${i*t._slideNum+1}" name="${s.options.objectName}"/>`,W+='<p:cNvGraphicFramePr><a:graphicFrameLocks noGrp="1"/></p:cNvGraphicFramePr> <p:nvPr><p:extLst><p:ext uri="{D42A27DB-BD31-4B8C-83A1-F6EECF244321}"><p14:modId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="1579011935"/></p:ext></p:extLst></p:nvPr></p:nvGraphicFramePr>',W+=`<p:xfrm><a:off x="${w||(w===0?0:Lt)}" y="${T||(T===0?0:Lt)}"/><a:ext cx="${R||(R===0?0:Lt)}" cy="${D||Lt}"/></p:xfrm>`,W+='<a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table"><a:tbl><a:tblPr/>',Array.isArray(I.colW)){W+="<a:tblGrid>";for(let L=0;L<Y;L++){let te=Wt(I.colW[L]);(te==null||isNaN(te))&&(te=(typeof s.options.w=="number"?s.options.w:1)/Y),W+=`<a:gridCol w="${Math.round(te)}"/>`}W+="</a:tblGrid>"}else{J=I.colW?I.colW:Lt,s.options.w&&!I.colW&&(J=Math.round((typeof s.options.w=="number"?s.options.w:1)/Y)),W+="<a:tblGrid>";for(let L=0;L<Y;L++)W+=`<a:gridCol w="${J}"/>`;W+="</a:tblGrid>"}O.forEach(L=>{var te,le;for(let Ae=0;Ae<L.length;){const ne=L[Ae],se=(te=ne.options)===null||te===void 0?void 0:te.colspan,ie=(le=ne.options)===null||le===void 0?void 0:le.rowspan;if(se&&se>1){const j=new Array(se-1).fill(void 0).map(()=>({_type:Tt.tablecell,options:{rowspan:ie},_hmerge:!0}));L.splice(Ae+1,0,...j),Ae+=se}else Ae+=1}}),O.forEach((L,te)=>{const le=O[te+1];le&&L.forEach((Ae,ne)=>{var se,ie;const j=Ae._rowContinue||((se=Ae.options)===null||se===void 0?void 0:se.rowspan),K=(ie=Ae.options)===null||ie===void 0?void 0:ie.colspan,ve=Ae._hmerge;if(j&&j>1){const xe={_type:Tt.tablecell,options:{colspan:K},_rowContinue:j-1,_vmerge:!0,_hmerge:ve};le.splice(ne,0,xe)}})}),O.forEach((L,te)=>{let le=0;Array.isArray(I.rowH)&&I.rowH[te]?le=Wt(Number(I.rowH[te])):I.rowH&&!isNaN(Number(I.rowH))?le=Wt(Number(I.rowH)):(s.options.cy||s.options.h)&&(le=Math.round((s.options.h?Wt(s.options.h):typeof s.options.cy=="number"?s.options.cy:1)/O.length)),W+=`<a:tr h="${le}">`,L.forEach(Ae=>{var ne,se,ie,j,K;const ve=Ae,xe={rowSpan:((ne=ve.options)===null||ne===void 0?void 0:ne.rowspan)>1?ve.options.rowspan:void 0,gridSpan:((se=ve.options)===null||se===void 0?void 0:se.colspan)>1?ve.options.colspan:void 0,vMerge:ve._vmerge?1:void 0,hMerge:ve._hmerge?1:void 0};let Re=Object.keys(xe).map(he=>[he,xe[he]]).filter(([,he])=>!!he).map(([he,k])=>`${String(he)}="${String(k)}"`).join(" ");if(Re&&(Re=" "+Re),ve._hmerge||ve._vmerge){W+=`<a:tc${Re}><a:tcPr/></a:tc>`;return}const Fe=ve.options||{};ve.options=Fe,["align","bold","border","color","fill","fontFace","fontSize","margin","textDirection","underline","valign"].forEach(he=>{I[he]&&!Fe[he]&&Fe[he]!==0&&(Fe[he]=I[he])});const pt=Fe.valign?` anchor="${Fe.valign.replace(/^c$/i,"ctr").replace(/^m$/i,"ctr").replace("center","ctr").replace("middle","ctr").replace("top","t").replace("btm","b").replace("bottom","b")}"`:"",lt=Fe.textDirection&&Fe.textDirection!=="horz"?` vert="${Fe.textDirection}"`:"";let ut=!((j=(ie=ve._optImp)===null||ie===void 0?void 0:ie.fill)===null||j===void 0)&&j.color?ve._optImp.fill.color:!((K=ve._optImp)===null||K===void 0)&&K.fill&&typeof ve._optImp.fill=="string"?ve._optImp.fill:"";ut=ut||Fe.fill?Fe.fill:"";const Rt=ut?Qa(ut):"";let je=Fe.margin===0||Fe.margin?Fe.margin:lx;!Array.isArray(je)&&typeof je=="number"&&(je=[je,je,je,je]);let St="";je[0]>=1?St=` marL="${xt(je[3])}" marR="${xt(je[1])}" marT="${xt(je[0])}" marB="${xt(je[2])}"`:St=` marL="${Wt(je[3])}" marR="${Wt(je[1])}" marT="${Wt(je[0])}" marB="${Wt(je[2])}"`,W+=`<a:tc${Re}>${r2(ve)}<a:tcPr${St}${pt}${lt}>`,Fe.border&&Array.isArray(Fe.border)&&[{idx:3,name:"lnL"},{idx:1,name:"lnR"},{idx:0,name:"lnT"},{idx:2,name:"lnB"}].forEach(he=>{Fe.border[he.idx].type!=="none"?(W+=`<a:${he.name} w="${xt(Fe.border[he.idx].pt)}" cap="flat" cmpd="sng" algn="ctr">`,W+=`<a:solidFill>${Zt(Fe.border[he.idx].color)}</a:solidFill>`,W+=`<a:prstDash val="${Fe.border[he.idx].type==="dash"?"sysDash":"solid"}"/><a:round/><a:headEnd type="none" w="med" len="med"/><a:tailEnd type="none" w="med" len="med"/>`,W+=`</a:${he.name}>`):W+=`<a:${he.name} w="0" cap="flat" cmpd="sng" algn="ctr"><a:noFill/></a:${he.name}>`}),W+=Rt,W+=" </a:tcPr>",W+=" </a:tc>"}),W+="</a:tr>"}),W+=" </a:tbl>",W+=" </a:graphicData>",W+=" </a:graphic>",W+="</p:graphicFrame>",n+=W,i++;break;case Tt.text:case Tt.placeholder:if(!s.options.line&&D===0&&(D=Lt*.3),s.options._bodyProp||(s.options._bodyProp={}),s.options.margin&&Array.isArray(s.options.margin)?(s.options._bodyProp.lIns=xt(s.options.margin[0]||0),s.options._bodyProp.rIns=xt(s.options.margin[1]||0),s.options._bodyProp.bIns=xt(s.options.margin[2]||0),s.options._bodyProp.tIns=xt(s.options.margin[3]||0)):typeof s.options.margin=="number"&&(s.options._bodyProp.lIns=xt(s.options.margin),s.options._bodyProp.rIns=xt(s.options.margin),s.options._bodyProp.bIns=xt(s.options.margin),s.options._bodyProp.tIns=xt(s.options.margin)),n+="<p:sp>",n+=`<p:nvSpPr><p:cNvPr id="${c+2}" name="${s.options.objectName}">`,!((p=s.options.hyperlink)===null||p===void 0)&&p.url&&(n+=`<a:hlinkClick r:id="rId${s.options.hyperlink._rId}" tooltip="${s.options.hyperlink.tooltip?Et(s.options.hyperlink.tooltip):""}"/>`),!((u=s.options.hyperlink)===null||u===void 0)&&u.slide&&(n+=`<a:hlinkClick r:id="rId${s.options.hyperlink._rId}" tooltip="${s.options.hyperlink.tooltip?Et(s.options.hyperlink.tooltip):""}" action="ppaction://hlinksldjump"/>`),n+="</p:cNvPr>",n+="<p:cNvSpPr"+(!((A=s.options)===null||A===void 0)&&A.isTextBox?' txBox="1"/>':"/>"),n+=`<p:nvPr>${s._type==="placeholder"?Mp(s):Mp(N)}</p:nvPr>`,n+="</p:nvSpPr><p:spPr>",n+=`<a:xfrm${M}>`,n+=`<a:off x="${w}" y="${T}"/>`,n+=`<a:ext cx="${R}" cy="${D}"/></a:xfrm>`,s.shape==="custGeom")n+="<a:custGeom><a:avLst />",n+="<a:gdLst>",n+="</a:gdLst>",n+="<a:ahLst />",n+="<a:cxnLst>",n+="</a:cxnLst>",n+='<a:rect l="l" t="t" r="r" b="b" />',n+="<a:pathLst>",n+=`<a:path w="${R}" h="${D}">`,(y=s.options.points)===null||y===void 0||y.forEach((L,te)=>{if("curve"in L)switch(L.curve.type){case"arc":n+=`<a:arcTo hR="${Mt(L.curve.hR,"Y",t._presLayout)}" wR="${Mt(L.curve.wR,"X",t._presLayout)}" stAng="${Ml(L.curve.stAng)}" swAng="${Ml(L.curve.swAng)}" />`;break;case"cubic":n+=`<a:cubicBezTo>
84
84
  <a:pt x="${Mt(L.curve.x1,"X",t._presLayout)}" y="${Mt(L.curve.y1,"Y",t._presLayout)}" />
85
85
  <a:pt x="${Mt(L.curve.x2,"X",t._presLayout)}" y="${Mt(L.curve.y2,"Y",t._presLayout)}" />
86
86
  <a:pt x="${Mt(L.x,"X",t._presLayout)}" y="${Mt(L.y,"Y",t._presLayout)}" />
@@ -148,7 +148,7 @@ ${String(y)}`)}return i&&c&&A.path.startsWith("http")?yield new Promise((y,x)=>{
148
148
  </Relationships>`}function r6(t,e){const n=e.map((i,s)=>({target:`../slideLayouts/slideLayout${s+1}.xml`,type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"}));return n.push({target:"../theme/theme1.xml",type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"}),qg(t,n)}function a6(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${wr}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
149
149
  <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="../theme/theme1.xml"/>
150
150
  </Relationships>`}function i6(t,e,n){for(let i=0;i<e.length;i++)if(e[i]._name===t[n-1]._slideLayout._name)return i+1;return 1}function s6(t){var e,n,i,s;const c=!((e=t.theme)===null||e===void 0)&&e.headFontFace?`<a:latin typeface="${(n=t.theme)===null||n===void 0?void 0:n.headFontFace}"/>`:'<a:latin typeface="Calibri Light" panose="020F0302020204030204"/>',d=!((i=t.theme)===null||i===void 0)&&i.bodyFontFace?`<a:latin typeface="${(s=t.theme)===null||s===void 0?void 0:s.bodyFontFace}"/>`:'<a:latin typeface="Calibri" panose="020F0502020204030204"/>';return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont>${c}<a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Angsana New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont>${d}<a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Cordia New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>`}function o6(t){let e=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${wr}<p:presentation xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" ${t.rtlMode?'rtl="1"':""} saveSubsetFonts="1" autoCompressPictures="0">`;e+='<p:sldMasterIdLst><p:sldMasterId id="2147483648" r:id="rId1"/></p:sldMasterIdLst>',e+="<p:sldIdLst>",t.slides.forEach(n=>e+=`<p:sldId id="${n._slideId}" r:id="rId${n._rId}"/>`),e+="</p:sldIdLst>",e+=`<p:notesMasterIdLst><p:notesMasterId r:id="rId${t.slides.length+2}"/></p:notesMasterIdLst>`,e+=`<p:sldSz cx="${t.presLayout.width}" cy="${t.presLayout.height}"/>`,e+=`<p:notesSz cx="${t.presLayout.height}" cy="${t.presLayout.width}"/>`,e+="<p:defaultTextStyle>";for(let n=1;n<10;n++)e+=`<a:lvl${n}pPr marL="${(n-1)*457200}" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl${n}pPr>`;return e+="</p:defaultTextStyle>",t.sections&&t.sections.length>0&&(e+='<p:extLst><p:ext uri="{521415D9-36F7-43E2-AB2F-B90AF26B5E84}">',e+='<p14:sectionLst xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main">',t.sections.forEach(n=>{e+=`<p14:section name="${Et(n.title)}" id="{${tA("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}}"><p14:sldIdLst>`,n._slides.forEach(i=>e+=`<p14:sldId id="${i._slideId}"/>`),e+="</p14:sldIdLst></p14:section>"}),e+="</p14:sectionLst></p:ext>",e+='<p:ext uri="{EFAFB233-063F-42B5-8137-9DF3F51BA10A}"><p15:sldGuideLst xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main"/></p:ext>',e+="</p:extLst>"),e+="</p:presentation>",e}function l6(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${wr}<p:presentationPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"/>`}function c6(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${wr}<a:tblStyleLst xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" def="{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"/>`}function u6(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${wr}<p:viewPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"><p:normalViewPr horzBarState="maximized"><p:restoredLeft sz="15611"/><p:restoredTop sz="94610"/></p:normalViewPr><p:slideViewPr><p:cSldViewPr snapToGrid="0" snapToObjects="1"><p:cViewPr varScale="1"><p:scale><a:sx n="136" d="100"/><a:sy n="136" d="100"/></p:scale><p:origin x="216" y="312"/></p:cViewPr><p:guideLst/></p:cSldViewPr></p:slideViewPr><p:notesTextViewPr><p:cViewPr><p:scale><a:sx n="1" d="1"/><a:sy n="1" d="1"/></p:scale><p:origin x="0" y="0"/></p:cViewPr></p:notesTextViewPr><p:gridSpacing cx="76200" cy="76200"/></p:viewPr>`}const d6="4.0.1";class f6{set layout(e){const n=this.LAYOUTS[e];if(n)this._layout=e,this._presLayout=n;else throw new Error("UNKNOWN-LAYOUT")}get layout(){return this._layout}get version(){return this._version}set author(e){this._author=e}get author(){return this._author}set company(e){this._company=e}get company(){return this._company}set revision(e){this._revision=e}get revision(){return this._revision}set subject(e){this._subject=e}get subject(){return this._subject}set theme(e){this._theme=e}get theme(){return this._theme}set title(e){this._title=e}get title(){return this._title}set rtlMode(e){this._rtlMode=e}get rtlMode(){return this._rtlMode}get masterSlide(){return this._masterSlide}get slides(){return this._slides}get sections(){return this._sections}get slideLayouts(){return this._slideLayouts}get AlignH(){return this._alignH}get AlignV(){return this._alignV}get ChartType(){return this._chartType}get OutputType(){return this._outputType}get presLayout(){return this._presLayout}get SchemeColor(){return this._schemeColor}get ShapeType(){return this._shapeType}get charts(){return this._charts}get colors(){return this._colors}get shapes(){return this._shapes}constructor(){this._version=d6,this._alignH=Cg,this._alignV=_g,this._chartType=Sg,this._outputType=bg,this._schemeColor=Xa,this._shapeType=wg,this._charts=Ue,this._colors=oA,this._shapes=Ho,this.addNewSlide=c=>{const d=this.sections.length>0&&this.sections[this.sections.length-1]._slides.filter(h=>h._slideNum===this.slides[this.slides.length-1]._slideNum).length>0;return c.sectionTitle=d?this.sections[this.sections.length-1].title:null,this.addSlide(c)},this.getSlide=c=>this.slides.filter(d=>d._slideNum===c)[0],this.setSlideNumber=c=>{this.masterSlide._slideNumberProps=c,this.slideLayouts.filter(d=>d._name===yg)[0]._slideNumberProps=c},this.createChartMediaRels=(c,d,h)=>{c._relsChart.forEach(p=>h.push(FS(p,d))),c._relsMedia.forEach(p=>{if(p.type!=="online"&&p.type!=="hyperlink"){let u=p.data&&typeof p.data=="string"?p.data:"";!u.includes(",")&&!u.includes(";")?u="image/png;base64,"+u:u.includes(",")?u.includes(";")||(u="image/png;"+u):u="image/png;base64,"+u,d.file(p.Target.replace("..","ppt"),u.split(",").pop(),{base64:!0})}})},this.writeFileToBrowser=(c,d)=>Wa(this,void 0,void 0,function*(){const h=document.createElement("a");if(h.setAttribute("style","display:none;"),h.dataset.interception="off",document.body.appendChild(h),window.URL.createObjectURL){const p=window.URL.createObjectURL(new Blob([d],{type:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}));return h.href=p,h.download=c,h.click(),setTimeout(()=>{window.URL.revokeObjectURL(p),document.body.removeChild(h)},100),yield Promise.resolve(c)}}),this.exportPresentation=c=>Wa(this,void 0,void 0,function*(){const d=[];let h=[];const p=new Wg;return this.slides.forEach(u=>{h=h.concat(ng(u))}),this.slideLayouts.forEach(u=>{h=h.concat(ng(u))}),h=h.concat(ng(this.masterSlide)),yield Promise.all(h).then(()=>Wa(this,void 0,void 0,function*(){return this.slides.forEach(u=>{u._slideLayout&&MS(u)}),p.folder("_rels"),p.folder("docProps"),p.folder("ppt").folder("_rels"),p.folder("ppt/charts").folder("_rels"),p.folder("ppt/embeddings"),p.folder("ppt/media"),p.folder("ppt/slideLayouts").folder("_rels"),p.folder("ppt/slideMasters").folder("_rels"),p.folder("ppt/slides").folder("_rels"),p.folder("ppt/theme"),p.folder("ppt/notesMasters").folder("_rels"),p.folder("ppt/notesSlides").folder("_rels"),p.file("[Content_Types].xml",HS(this.slides,this.slideLayouts,this.masterSlide)),p.file("_rels/.rels",XS()),p.file("docProps/app.xml",WS(this.slides,this.company)),p.file("docProps/core.xml",QS(this.title,this.subject,this.author,this.revision)),p.file("ppt/_rels/presentation.xml.rels",YS(this.slides)),p.file("ppt/theme/theme1.xml",s6(this)),p.file("ppt/presentation.xml",o6(this)),p.file("ppt/presProps.xml",l6()),p.file("ppt/tableStyles.xml",c6()),p.file("ppt/viewProps.xml",u6()),this.slideLayouts.forEach((u,A)=>{p.file(`ppt/slideLayouts/slideLayout${A+1}.xml`,ZS(u)),p.file(`ppt/slideLayouts/_rels/slideLayout${A+1}.xml.rels`,e6(A+1,this.slideLayouts))}),this.slides.forEach((u,A)=>{p.file(`ppt/slides/slide${A+1}.xml`,VS(u)),p.file(`ppt/slides/_rels/slide${A+1}.xml.rels`,t6(this.slides,this.slideLayouts,A+1)),p.file(`ppt/notesSlides/notesSlide${A+1}.xml`,JS(u)),p.file(`ppt/notesSlides/_rels/notesSlide${A+1}.xml.rels`,n6(A+1))}),p.file("ppt/slideMasters/slideMaster1.xml",$S(this.masterSlide,this.slideLayouts)),p.file("ppt/slideMasters/_rels/slideMaster1.xml.rels",r6(this.masterSlide,this.slideLayouts)),p.file("ppt/notesMasters/notesMaster1.xml",KS()),p.file("ppt/notesMasters/_rels/notesMaster1.xml.rels",a6()),this.slideLayouts.forEach(u=>{this.createChartMediaRels(u,p,d)}),this.slides.forEach(u=>{this.createChartMediaRels(u,p,d)}),this.createChartMediaRels(this.masterSlide,p,d),yield Promise.all(d).then(()=>Wa(this,void 0,void 0,function*(){return c.outputType==="STREAM"?yield p.generateAsync({type:"nodebuffer",compression:c.compression?"DEFLATE":"STORE"}):c.outputType?yield p.generateAsync({type:c.outputType}):yield p.generateAsync({type:"blob",compression:c.compression?"DEFLATE":"STORE"})}))}))});const e={name:"screen4x3",width:9144e3,height:6858e3},n={name:"screen16x9",width:9144e3,height:5143500},i={name:"screen16x10",width:9144e3,height:5715e3},s={name:"custom",width:12192e3,height:6858e3};this.LAYOUTS={LAYOUT_4x3:e,LAYOUT_16x9:n,LAYOUT_16x10:i,LAYOUT_WIDE:s},this._author="PptxGenJS",this._company="PptxGenJS",this._revision="1",this._subject="PptxGenJS Presentation",this._title="PptxGenJS Presentation",this._presLayout={name:this.LAYOUTS[vu].name,_sizeW:this.LAYOUTS[vu].width,_sizeH:this.LAYOUTS[vu].height,width:this.LAYOUTS[vu].width,height:this.LAYOUTS[vu].height},this._rtlMode=!1,this._slideLayouts=[{_margin:Df,_name:yg,_presLayout:this._presLayout,_rels:[],_relsChart:[],_relsMedia:[],_slide:null,_slideNum:1e3,_slideNumberProps:null,_slideObjects:[]}],this._slides=[],this._sections=[],this._masterSlide={addChart:null,addImage:null,addMedia:null,addNotes:null,addShape:null,addTable:null,addText:null,_name:null,_presLayout:this._presLayout,_rId:null,_rels:[],_relsChart:[],_relsMedia:[],_slideId:null,_slideLayout:null,_slideNum:null,_slideNumberProps:null,_slideObjects:[]}}stream(e){return Wa(this,void 0,void 0,function*(){return yield this.exportPresentation({compression:e==null?void 0:e.compression,outputType:"STREAM"})})}write(e){return Wa(this,void 0,void 0,function*(){const n=typeof e=="object"&&(e!=null&&e.outputType)?e.outputType:e||null,i=typeof e=="object"&&(e!=null&&e.compression)?e.compression:!1;return yield this.exportPresentation({compression:i,outputType:n})})}writeFile(e){return Wa(this,void 0,void 0,function*(){var n,i;const s=typeof process<"u"&&!!(!((n=process.versions)===null||n===void 0)&&n.node)&&((i=process.release)===null||i===void 0?void 0:i.name)==="node";typeof e=="string"&&(console.warn("[WARNING] writeFile(string) is deprecated - pass { fileName } instead."),e={fileName:e});const{fileName:c="Presentation.pptx",compression:d=!1}=e,h=c.toLowerCase().endsWith(".pptx")?c:`${c}.pptx`,p=s?"nodebuffer":null,u=yield this.exportPresentation({compression:d,outputType:p});if(s){const{promises:A}=yield Promise.resolve().then(()=>require("./__vite-browser-external-BcPniuRQ.cjs")),{writeFile:y}=A;return yield y(h,u),h}return yield this.writeFileToBrowser(h,u),h})}addSection(e){e?e.title||console.warn("addSection requires a title"):console.warn("addSection requires an argument");const n={_type:"user",_slides:[],title:e.title};e.order?this.sections.splice(e.order,0,n):this._sections.push(n)}addSlide(e){const n=typeof e=="string"?e:e!=null&&e.masterName?e.masterName:"";let i={_name:this.LAYOUTS[vu].name,_presLayout:this.presLayout,_rels:[],_relsChart:[],_relsMedia:[],_slideNum:this.slides.length+1};if(n){const c=this.slideLayouts.filter(d=>d._name===n)[0];c&&(i=c)}const s=new zS({addSlide:this.addNewSlide,getSlide:this.getSlide,presLayout:this.presLayout,setSlideNum:this.setSlideNumber,slideId:this.slides.length+256,slideRId:this.slides.length+2,slideNumber:this.slides.length+1,slideLayout:i});if(this._slides.push(s),e!=null&&e.sectionTitle){const c=this.sections.filter(d=>d.title===e.sectionTitle)[0];c?c._slides.push(s):console.warn(`addSlide: unable to find section with title: "${e.sectionTitle}"`)}else if(this.sections&&this.sections.length>0&&!(e!=null&&e.sectionTitle)){const c=this._sections[this.sections.length-1];c._type==="default"?c._slides.push(s):this._sections.push({title:`Default-${this.sections.filter(d=>d._type==="default").length+1}`,_type:"default",_slides:[s]})}return s}defineLayout(e){e?e.name?e.width?e.height?typeof e.height!="number"?console.warn("defineLayout `height` should be a number (inches)"):typeof e.width!="number"&&console.warn("defineLayout `width` should be a number (inches)"):console.warn("defineLayout requires `height`"):console.warn("defineLayout requires `width`"):console.warn("defineLayout requires `name`"):console.warn("defineLayout requires `{name, width, height}`"),this.LAYOUTS[e.name]={name:e.name,_sizeW:Math.round(Number(e.width)*Lt),_sizeH:Math.round(Number(e.height)*Lt),width:Math.round(Number(e.width)*Lt),height:Math.round(Number(e.height)*Lt)}}defineSlideMaster(e){const n=JSON.parse(JSON.stringify(e));if(!n.title)throw new Error("defineSlideMaster() object argument requires a `title` value. (https://gitbrent.github.io/PptxGenJS/docs/masters.html)");const i={_margin:n.margin||Df,_name:n.title,_presLayout:this.presLayout,_rels:[],_relsChart:[],_relsMedia:[],_slide:null,_slideNum:1e3+this.slideLayouts.length+1,_slideNumberProps:n.slideNumber||null,_slideObjects:[],background:n.background||null,bkgd:n.bkgd||null};kS(n,i),this.slideLayouts.push(i),(n.background||n.bkgd)&&Ax(n.background,i),i._slideNumberProps&&!this.masterSlide._slideNumberProps&&(this.masterSlide._slideNumberProps=i._slideNumberProps)}tableToSlides(e,n={}){DS(this,e,n,n!=null&&n.masterSlideName?this.slideLayouts.filter(i=>i._name===n.masterSlideName)[0]:null)}}const h6=t=>t.replace(/\*\*(.+?)\*\*/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/^#{1,6}\s*/gm,"").replace(/~~(.+?)~~/g,"$1").replace(/`(.+?)`/g,"$1"),p6=(t,e)=>{const n=[],i=/(\*\*(.+?)\*\*|\*(.+?)\*)/g;let s=0,c;for(;(c=i.exec(t))!==null;)c.index>s&&n.push({text:t.slice(s,c.index)}),c[2]?n.push({text:c[2],options:{bold:!0}}):c[3]&&n.push({text:c[3],options:{italic:!0}}),s=i.lastIndex;return s<t.length&&n.push({text:t.slice(s)}),n.length>0?n:[{text:t}]},A6=async(t,e)=>new Promise((n,i)=>{const s=new Image;s.onload=()=>{const c=document.createElement("canvas");c.width=Math.round(e.width),c.height=Math.round(e.height);const d=c.getContext("2d");if(!d){i(new Error("Canvas context not available"));return}d.drawImage(s,Math.round(e.x),Math.round(e.y),Math.round(e.width),Math.round(e.height),0,0,Math.round(e.width),Math.round(e.height)),n(c.toDataURL("image/jpeg",.92))},s.onerror=()=>i(new Error("Failed to load image for cropping")),s.src=t}),gx=10,vx=5.625,m6=960,g6=540,rA=t=>{const e=t.replace("#","");if(e.length===8){const n=e.substring(0,6),i=parseInt(e.substring(6,8),16),s=Math.round((1-i/255)*100);return{color:n,transparency:s}}return e.length===6?{color:e}:e.length===3?{color:e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}:e==="transparent"||e===""?{color:"FFFFFF",transparency:100}:{color:e}},Ya=(t,e)=>{const n=e?gx/m6:vx/g6;return t*n},v6=(t,e)=>{const n=p6(e.content,e.fontSize),i=e.fontSize*.75,{color:s}=rA(e.fill),c=n.map(d=>{var h,p;return{text:d.text,options:{fontSize:i,fontFace:e.fontFamily,color:s,bold:((h=d.options)==null?void 0:h.bold)||e.fontWeight==="700"||e.fontWeight==="800",italic:(p=d.options)==null?void 0:p.italic}}});t.addText(c,{x:Ya(e.x,!0),y:Ya(e.y,!1),w:Ya(e.width,!0),h:Ya(e.height,!1),align:e.align,rotate:e.rotation,valign:"top",lineSpacing:e.lineHeight?e.lineHeight*i:i*1.2})},y6=(t,e)=>{const n=Ya(e.x,!0),i=Ya(e.y,!1),s=Ya(e.width,!0),c=Ya(e.height,!1),d=rA(e.fill),h=rA(e.stroke),p=rA(e.textColor||"#1e293b"),u={color:d.color};d.transparency!==void 0&&(u.transparency=d.transparency);const A={color:h.color,width:e.strokeWidth};h.transparency!==void 0&&(A.transparency=h.transparency);const y=e.text?{text:e.text,fontSize:(e.textSize||16)*.75,fontFace:"Malgun Gothic",color:p.color,align:"center",valign:"middle"}:{};switch(e.shapeType){case"rect":t.addShape(e.cornerRadius?"roundRect":"rect",{x:n,y:i,w:s,h:c,fill:u,line:A,rotate:e.rotation,...e.cornerRadius?{rectRadius:Ya(e.cornerRadius,!0)}:{},...y});break;case"ellipse":t.addShape("ellipse",{x:n,y:i,w:s,h:c,fill:u,line:A,rotate:e.rotation,...y});break;case"triangle":t.addShape("triangle",{x:n,y:i,w:s,h:c,fill:u,line:A,rotate:e.rotation,...y});break;case"line":t.addShape("line",{x:n,y:i,w:s,h:c,line:A,rotate:e.rotation});break;case"arrow":t.addShape("line",{x:n,y:i,w:s,h:c,line:{...A,endArrowType:"triangle"},rotate:e.rotation});break}},x6=async(t,e)=>{if(!e.src){console.warn("No image source provided:",e.id);return}let n=e.src;if(!n.startsWith("data:")){console.warn("Image is not base64, skipping:",e.id);return}if(e.crop)try{n=await A6(e.src,e.crop)}catch(s){console.error("Failed to crop image:",e.id,s);return}const i={data:n,x:Ya(e.x,!0),y:Ya(e.y,!1),w:Ya(e.width,!0),h:Ya(e.height,!1)};e.rotation&&e.rotation!==0&&(i.rotate=e.rotation);try{t.addImage(i),console.log("Image added to PPTX:",e.id)}catch(s){console.error("Failed to add image to PPTX:",e.id,s)}},yx=async(t,e="presentation")=>{const n=new f6;n.defineLayout({name:"CUSTOM_16_9",width:gx,height:vx}),n.layout="CUSTOM_16_9";for(const i of t){const s=n.addSlide();s.background={color:i.background.replace("#","")};for(const c of i.elements)c.type==="text"?v6(s,c):c.type==="shape"?y6(s,c):c.type==="image"&&await x6(s,c)}await n.writeFile({fileName:`${e}.pptx`})},b6=960,S6=540,w6=914400,C6=12192e3,_6=6858e3,zp=(t,e)=>{const n=e?b6/C6:S6/_6;return Math.round(t*n)},Ta=(t,e)=>{const n=t.getElementsByTagName("*");for(let i=0;i<n.length;i++)if(n[i].localName===e)return n[i];return null},Uo=(t,e)=>{const n=[],i=t.getElementsByTagName("*");for(let s=0;s<i.length;s++)i[s].localName===e&&n.push(i[s]);return n},a2=t=>{const e=Ta(t,"xfrm");if(!e)return null;const n=Ta(e,"off"),i=Ta(e,"ext");if(!n||!i)return null;const s=parseInt(n.getAttribute("x")||"0",10),c=parseInt(n.getAttribute("y")||"0",10),d=parseInt(i.getAttribute("cx")||"0",10),h=parseInt(i.getAttribute("cy")||"0",10);return{x:zp(s,!0),y:zp(c,!1),width:zp(d,!0),height:zp(h,!1)}},pA=t=>{const e=Ta(t,"srgbClr");if(e)return`#${e.getAttribute("val")||"000000"}`;const n=Ta(t,"schemeClr");return n&&{dk1:"#1e293b",dk2:"#334155",lt1:"#ffffff",lt2:"#f1f5f9",tx1:"#1e293b",tx2:"#64748b",accent1:"#5B6EF7",accent2:"#06b6d4"}[n.getAttribute("val")||""]||"#1e293b"},E6=t=>{if(!t)return 18;const e=t.getAttribute("sz");return e?Math.round(parseInt(e,10)/100*1.333):18},T6=t=>t>=36?"title":t>=24?"subtitle":t>=16?"body":"caption",R6=t=>{const e=Uo(t,"p"),n=[];for(const i of e){const s=Uo(i,"r");let c="";for(const h of s){const p=Uo(h,"t");for(const u of p)c+=u.textContent||""}const d=Uo(i,"fld");for(const h of d){const p=Uo(h,"t");for(const u of p)c+=u.textContent||""}c.trim()&&n.push(c)}return n.join(`
151
- `)},D6=t=>{const e=Ta(t,"pPr");if(!e)return"left";const n=e.getAttribute("algn");return n==="ctr"?"center":n==="r"?"right":"left"},L6=t=>{const e=Ta(t,"rPr");if(!e)return"#1e293b";const n=Ta(e,"solidFill");return n?pA(n):"#1e293b"},k6=t=>{const e=Ta(t,"spPr");if(!e)return"#e2e8f0";for(let n=0;n<e.children.length;n++)if(e.children[n].localName==="solidFill")return pA(e.children[n]);return"#e2e8f0"},N6=t=>{const e=Ta(t,"ln");if(!e)return{stroke:"transparent",strokeWidth:0};const n=e.getAttribute("w"),i=n?Math.round(parseInt(n,10)/w6*96):1,s=Ta(e,"solidFill");return{stroke:s?pA(s):"#94a3b8",strokeWidth:Math.max(i,1)}},P6=t=>{const i=new DOMParser().parseFromString(t,"application/xml").getElementsByTagName("Relationship"),s={};for(let c=0;c<i.length;c++){const d=i[c].getAttribute("Id")||"",h=i[c].getAttribute("Target")||"";h.includes("media/")&&(s[d]=h.replace("../","ppt/"))}return s},B6=t=>{const e=t.getElementsByTagName("*");for(let n=0;n<e.length;n++)if(e[n].localName==="bg"){const i=Ta(e[n],"solidFill");if(i)return pA(i)}return"#ffffff"},M6=async(t,e,n)=>{var u;const s=new DOMParser().parseFromString(t,"application/xml"),c=[],d=B6(s),h=Uo(s.documentElement,"sp");for(const A of h){const y=a2(A);if(!y)continue;const x=R6(A);if(x.trim()){const S=Ta(A,"rPr"),w=E6(S),T=(S==null?void 0:S.getAttribute("b"))==="1"?"700":"400",R={id:Pr(),type:"text",...y,rotation:0,content:x,fontSize:w,fontFamily:"Malgun Gothic",fill:L6(A),align:D6(A),textStyle:T6(w),fontWeight:T,lineHeight:1.3};c.push(R)}else{const{stroke:S,strokeWidth:w}=N6(A),T={id:Pr(),type:"shape",shapeType:"rect",...y,fill:k6(A),stroke:S,strokeWidth:w,rotation:0,cornerRadius:0};T.width>5&&T.height>5&&c.push(T)}}const p=Uo(s.documentElement,"pic");for(const A of p){const y=a2(A);if(!y)continue;const x=Ta(A,"blip");if(!x)continue;const S=x.getAttribute("r:embed")||x.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","embed");if(!S)continue;const w=e[S];if(!w)continue;const T=n.file(w);if(T)try{const R=await T.async("base64"),D=((u=w.split(".").pop())==null?void 0:u.toLowerCase())||"png",M={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp"}[D]||"image/png",O={id:Pr(),type:"image",...y,src:`data:${M};base64,${R}`,rotation:0};c.push(O)}catch{const R={id:Pr(),type:"shape",shapeType:"rect",...y,fill:"#f1f5f9",stroke:"#94a3b8",strokeWidth:2,rotation:0,cornerRadius:8,text:"이미지 로드 실패",textColor:"#64748b",textSize:14};c.push(R)}}return{elements:c,background:d}},xx=async t=>{var S,w,T,R;const e=await t.arrayBuffer(),n=await Wg.loadAsync(e),i=await((S=n.file("ppt/presentation.xml"))==null?void 0:S.async("string"));if(!i)throw new Error("유효하지 않은 PPTX 파일입니다.");const s=new DOMParser,c=s.parseFromString(i,"application/xml"),d=await((w=n.file("ppt/_rels/presentation.xml.rels"))==null?void 0:w.async("string"));if(!d)throw new Error("PPTX 관계 파일을 찾을 수 없습니다.");const p=s.parseFromString(d,"application/xml").getElementsByTagName("Relationship"),u={};for(let D=0;D<p.length;D++){const N=p[D].getAttribute("Id")||"",M=p[D].getAttribute("Target")||"";M.startsWith("slides/")&&(u[N]=`ppt/${M}`)}const A=Uo(c.documentElement,"sldId"),y=[];for(const D of A){const N=D.getAttribute("r:id")||D.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","id");N&&u[N]&&y.push(u[N])}if(y.length===0){const D=Object.keys(n.files).filter(N=>N.match(/^ppt\/slides\/slide\d+\.xml$/)).sort((N,M)=>{var Y,J;const O=parseInt(((Y=N.match(/slide(\d+)/))==null?void 0:Y[1])||"0",10),I=parseInt(((J=M.match(/slide(\d+)/))==null?void 0:J[1])||"0",10);return O-I});y.push(...D)}const x=[];for(const D of y){const N=await((T=n.file(D))==null?void 0:T.async("string"));if(!N)continue;const O=`ppt/slides/_rels/${D.split("/").pop()}.rels`,I=await((R=n.file(O))==null?void 0:R.async("string")),Y=I?P6(I):{},{elements:J,background:q}=await M6(N,Y,n);x.push({id:Pr(),elements:J,background:q})}if(x.length===0)throw new Error("슬라이드를 찾을 수 없습니다.");return x},Du={title:{fontSize:48,fontWeight:"800",lineHeight:1.1},subtitle:{fontSize:32,fontWeight:"600",lineHeight:1.2},body:{fontSize:18,fontWeight:"400",lineHeight:1.5},caption:{fontSize:14,fontWeight:"400",lineHeight:1.4}},z6=[{name:"맑은 고딕",value:"Malgun Gothic"},{name:"Noto Sans KR",value:"Noto Sans KR"},{name:"Inter",value:"Inter"}],hs={devdive:{background:"#ffffff",primary:"#5B6EF7",text:"#1e293b",accent:"#3b82f6"},minimal:{background:"#f8fafc",primary:"#64748b",text:"#334155",accent:"#94a3b8"},dark:{background:"#0f172a",primary:"#60a5fa",text:"#f1f5f9",accent:"#38bdf8"},business:{background:"#1e3a5f",primary:"#d4af37",text:"#ffffff",accent:"#f59e0b"}},bx=({isOpen:t,onClose:e,mode:n})=>{const i=Ve(x=>x.applyTemplate),s=Ve(x=>x.addSlideWithTemplate),[c,d]=se.useState("devdive"),[h,p]=se.useState(null),u=hs[c],A=()=>{h&&(n==="apply"?i(h,u):s(h,u),e())},y={devdive:"DevDive",minimal:"미니멀",dark:"다크",business:"비즈니스"};return C.jsxs(z.Modal,{opened:t,onClose:e,title:n==="apply"?"현재 슬라이드에 템플릿 적용":"새 슬라이드 추가",size:800,radius:"lg",centered:!0,styles:{title:{fontWeight:700,fontSize:18},body:{padding:0},content:{maxHeight:"90vh",display:"flex",flexDirection:"column"},inner:{padding:16}},children:[C.jsxs(z.Group,{align:"stretch",gap:0,style:{flex:1,minHeight:0,maxHeight:"calc(90vh - 140px)"},children:[C.jsxs(z.ScrollArea,{w:192,p:"md",style:{borderRight:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Text,{size:"xs",fw:700,c:"dimmed",mb:"sm",children:"컨셉 테마"}),C.jsx(z.Stack,{gap:"xs",children:Object.keys(hs).map(x=>C.jsx(z.UnstyledButton,{onClick:()=>d(x),p:"sm",style:{borderRadius:"var(--mantine-radius-lg)",backgroundColor:c===x?"rgba(91, 110, 247, 0.1)":void 0,color:c===x?"var(--devdive-primary)":void 0,transition:"all 150ms ease"},children:C.jsxs(z.Group,{gap:"sm",children:[C.jsx(z.Box,{w:32,h:32,style:{borderRadius:"var(--mantine-radius-md)",border:"1px solid var(--devdive-border-light)",backgroundColor:hs[x].background,display:"flex",alignItems:"center",justifyContent:"center"},children:C.jsx(z.Box,{w:16,h:16,style:{borderRadius:"var(--mantine-radius-sm)",backgroundColor:hs[x].primary}})}),C.jsx(z.Text,{size:"sm",fw:500,children:y[x]})]})},x))})]}),C.jsxs(z.Box,{flex:1,p:"md",style:{display:"flex",flexDirection:"column",minHeight:0},children:[C.jsx(z.Text,{size:"xs",fw:700,c:"dimmed",mb:"sm",children:"페이지 레이아웃"}),C.jsx(z.ScrollArea,{style:{flex:1},children:C.jsx(z.SimpleGrid,{cols:3,spacing:"sm",children:Xg.map(x=>C.jsxs(z.UnstyledButton,{onClick:()=>p(x.id),pos:"relative",style:{aspectRatio:"16/9",borderRadius:"var(--mantine-radius-lg)",border:h===x.id?"2px solid var(--devdive-primary)":"2px solid var(--devdive-border-light)",overflow:"hidden",backgroundColor:u.background,boxShadow:h===x.id?"0 4px 12px rgba(0, 0, 0, 0.15)":void 0,transition:"all 150ms ease"},children:[C.jsx(F6,{layout:x.id,theme:u}),h===x.id&&C.jsx(z.Box,{pos:"absolute",top:8,right:8,w:24,h:24,bg:"var(--devdive-primary)",style:{borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:C.jsx("span",{className:"material-symbols-outlined",style:{color:"white",fontSize:14},children:"check"})}),C.jsx(z.Box,{pos:"absolute",bottom:0,left:0,right:0,p:8,style:{background:"linear-gradient(to top, rgba(0,0,0,0.6), transparent)"},children:C.jsx(z.Text,{size:"xs",c:"white",fw:500,children:x.name})})]},x.id))})})]})]}),C.jsxs(z.Group,{justify:"flex-end",p:"md",bg:"gray.0",style:{borderTop:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:e,children:"취소"}),C.jsx(z.Button,{color:"devdive",onClick:A,disabled:!h,children:n==="apply"?"적용":"추가"})]})]})},F6=({layout:t,theme:e})=>{const n={backgroundColor:e.text,height:8,borderRadius:2},i={backgroundColor:e.primary,height:6,borderRadius:2},s={backgroundColor:e.text+"40",height:4,borderRadius:1},c={backgroundColor:e.primary+"30",border:`1px solid ${e.primary}`,borderRadius:4},d=A=>({position:"absolute",inset:A,display:"flex",flexDirection:"column"}),h={position:"absolute",inset:16,display:"flex",alignItems:"center",justifyContent:"center"},p={display:"flex",gap:8},u={display:"flex",flexDirection:"column",gap:4};switch(t){case"title":return C.jsx("div",{style:h,children:C.jsx("div",{style:{width:"75%"},children:C.jsx("div",{style:{...n,marginBottom:8}})})});case"title-subtitle":return C.jsxs("div",{style:{...h,flexDirection:"column",gap:8},children:[C.jsx("div",{style:{width:"75%",...n}}),C.jsx("div",{style:{width:"50%",...i}})]});case"content":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"66%",marginBottom:8,...n}}),C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"83%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]})]});case"two-column":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"50%",marginBottom:8,...n}}),C.jsxs("div",{style:{...p,flex:1},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]}),C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]})]})]});case"image-left":return C.jsxs("div",{style:{...d(12),flexDirection:"row",gap:8},children:[C.jsx("div",{style:{width:"40%",...c}}),C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"75%",...n}}),C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"83%",...s}})]})]});case"image-right":return C.jsxs("div",{style:{...d(12),flexDirection:"row",gap:8},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"75%",...n}}),C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"83%",...s}})]}),C.jsx("div",{style:{width:"40%",...c}})]});case"bullets":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"50%",marginBottom:8,...n}}),C.jsx("div",{style:{...u,flex:1,gap:6},children:[1,2,3,4].map(A=>C.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[C.jsx("div",{style:{width:6,height:6,borderRadius:"50%",backgroundColor:e.primary}}),C.jsx("div",{style:{flex:1,...s}})]},A))})]});case"section-header":return C.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column"},children:[C.jsx("div",{style:{flex:1}}),C.jsx("div",{style:{height:"33%",display:"flex",alignItems:"center",padding:"0 12px",backgroundColor:e.primary+"15"},children:C.jsx("div",{style:{width:"75%",...n}})}),C.jsx("div",{style:{flex:1}})]});case"comparison":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"50%",marginBottom:4,...n}}),C.jsxs("div",{style:{display:"flex",gap:8,marginBottom:4},children:[C.jsx("div",{style:{flex:1,height:6,borderRadius:4,backgroundColor:e.primary}}),C.jsx("div",{style:{flex:1,height:6,borderRadius:4,backgroundColor:e.primary+"60"}})]}),C.jsxs("div",{style:{...p,flex:1},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]}),C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]})]})]});case"title-only":return C.jsx("div",{style:d(12),children:C.jsx("div",{style:{width:"66%",...n}})});case"content-caption":return C.jsxs("div",{style:{...d(12),flexDirection:"row",gap:8},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"75%",...n}}),C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"83%",...s}})]}),C.jsx("div",{style:{width:"25%",borderRadius:4,backgroundColor:e.primary+"20"}})]});case"picture-caption":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"50%",marginBottom:4,...n}}),C.jsxs("div",{style:{display:"flex",gap:8,flex:1},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{flex:1,...c}}),C.jsx("div",{style:{width:"100%",height:3,borderRadius:1,backgroundColor:e.text+"40"}})]}),C.jsxs("div",{style:{...u,width:"25%"},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]})]})]});case"blank":return C.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:24,color:e.text+"30"},children:"crop_free"})});default:return null}},AA=sx()(ox((t,e)=>({status:"idle",currentFeature:null,error:null,lastTextResponse:null,lastSlideResponse:null,lastImageResponse:null,lastDesignSuggestions:null,providerConfig:null,setStatus:n=>t({status:n}),setFeature:n=>t({currentFeature:n}),setError:n=>t({error:n,status:n?"error":"idle"}),setTextResponse:n=>t({lastTextResponse:n,status:n?"success":"idle"}),setSlideResponse:n=>t({lastSlideResponse:n,status:n?"success":"idle"}),setImageResponse:n=>t({lastImageResponse:n,status:n?"success":"idle"}),setDesignSuggestions:n=>t({lastDesignSuggestions:n,status:n?"success":"idle"}),setProviderConfig:n=>t({providerConfig:n}),getProviderConfig:()=>e().providerConfig,reset:()=>t({status:"idle",currentFeature:null,error:null,lastTextResponse:null,lastSlideResponse:null,lastImageResponse:null,lastDesignSuggestions:null})}),{name:"devdive-ai-settings",partialize:t=>({providerConfig:t.providerConfig}),version:3,migrate:(t,e)=>e<3?{providerConfig:null}:t})),I6="https://api.z.ai/api/paas/v4";class cA extends Error{constructor(e,n,i){super(e),this.code=n,this.status=i,this.name="GlmApiError"}}const Sx=async(t,e,n)=>{var s,c;const i=await fetch(`${I6}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},body:JSON.stringify(n)});if(!i.ok){const d=await i.json().catch(()=>({}));throw new cA(((s=d.error)==null?void 0:s.message)||`GLM API 오류: ${i.status}`,(c=d.error)==null?void 0:c.code,i.status)}return i.json()},O6=async(t,e)=>{var c,d;const i=`당신은 프레젠테이션 콘텐츠 작성 전문가입니다. ${{title:"제목으로 사용할 짧고 임팩트 있는",subtitle:"소제목으로 적합한",body:"본문 내용으로 적합한",caption:"캡션으로 사용할 간결한"}[t.style]||""} 텍스트를 생성해주세요. ${t.language==="ko"?"한국어로 작성하세요.":"Write in English."}`;return{content:((d=(c=(await Sx("/chat/completions",e,{model:e.model||"glm-4.7",messages:[{role:"system",content:i},{role:"user",content:t.prompt}],max_tokens:t.maxLength||500,temperature:.7})).choices[0])==null?void 0:c.message)==null?void 0:d.content)||""}},U6=`당신은 프레젠테이션 구조 설계 전문가입니다.
151
+ `)},D6=t=>{const e=Ta(t,"pPr");if(!e)return"left";const n=e.getAttribute("algn");return n==="ctr"?"center":n==="r"?"right":"left"},L6=t=>{const e=Ta(t,"rPr");if(!e)return"#1e293b";const n=Ta(e,"solidFill");return n?pA(n):"#1e293b"},k6=t=>{const e=Ta(t,"spPr");if(!e)return"#e2e8f0";for(let n=0;n<e.children.length;n++)if(e.children[n].localName==="solidFill")return pA(e.children[n]);return"#e2e8f0"},N6=t=>{const e=Ta(t,"ln");if(!e)return{stroke:"transparent",strokeWidth:0};const n=e.getAttribute("w"),i=n?Math.round(parseInt(n,10)/w6*96):1,s=Ta(e,"solidFill");return{stroke:s?pA(s):"#94a3b8",strokeWidth:Math.max(i,1)}},P6=t=>{const i=new DOMParser().parseFromString(t,"application/xml").getElementsByTagName("Relationship"),s={};for(let c=0;c<i.length;c++){const d=i[c].getAttribute("Id")||"",h=i[c].getAttribute("Target")||"";h.includes("media/")&&(s[d]=h.replace("../","ppt/"))}return s},B6=t=>{const e=t.getElementsByTagName("*");for(let n=0;n<e.length;n++)if(e[n].localName==="bg"){const i=Ta(e[n],"solidFill");if(i)return pA(i)}return"#ffffff"},M6=async(t,e,n)=>{var u;const s=new DOMParser().parseFromString(t,"application/xml"),c=[],d=B6(s),h=Uo(s.documentElement,"sp");for(const A of h){const y=a2(A);if(!y)continue;const x=R6(A);if(x.trim()){const S=Ta(A,"rPr"),w=E6(S),T=(S==null?void 0:S.getAttribute("b"))==="1"?"700":"400",R={id:Pr(),type:"text",...y,rotation:0,content:x,fontSize:w,fontFamily:"Malgun Gothic",fill:L6(A),align:D6(A),textStyle:T6(w),fontWeight:T,lineHeight:1.3};c.push(R)}else{const{stroke:S,strokeWidth:w}=N6(A),T={id:Pr(),type:"shape",shapeType:"rect",...y,fill:k6(A),stroke:S,strokeWidth:w,rotation:0,cornerRadius:0};T.width>5&&T.height>5&&c.push(T)}}const p=Uo(s.documentElement,"pic");for(const A of p){const y=a2(A);if(!y)continue;const x=Ta(A,"blip");if(!x)continue;const S=x.getAttribute("r:embed")||x.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","embed");if(!S)continue;const w=e[S];if(!w)continue;const T=n.file(w);if(T)try{const R=await T.async("base64"),D=((u=w.split(".").pop())==null?void 0:u.toLowerCase())||"png",M={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp"}[D]||"image/png",O={id:Pr(),type:"image",...y,src:`data:${M};base64,${R}`,rotation:0};c.push(O)}catch{const R={id:Pr(),type:"shape",shapeType:"rect",...y,fill:"#f1f5f9",stroke:"#94a3b8",strokeWidth:2,rotation:0,cornerRadius:8,text:"이미지 로드 실패",textColor:"#64748b",textSize:14};c.push(R)}}return{elements:c,background:d}},xx=async t=>{var S,w,T,R;const e=await t.arrayBuffer(),n=await Wg.loadAsync(e),i=await((S=n.file("ppt/presentation.xml"))==null?void 0:S.async("string"));if(!i)throw new Error("유효하지 않은 PPTX 파일입니다.");const s=new DOMParser,c=s.parseFromString(i,"application/xml"),d=await((w=n.file("ppt/_rels/presentation.xml.rels"))==null?void 0:w.async("string"));if(!d)throw new Error("PPTX 관계 파일을 찾을 수 없습니다.");const p=s.parseFromString(d,"application/xml").getElementsByTagName("Relationship"),u={};for(let D=0;D<p.length;D++){const N=p[D].getAttribute("Id")||"",M=p[D].getAttribute("Target")||"";M.startsWith("slides/")&&(u[N]=`ppt/${M}`)}const A=Uo(c.documentElement,"sldId"),y=[];for(const D of A){const N=D.getAttribute("r:id")||D.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","id");N&&u[N]&&y.push(u[N])}if(y.length===0){const D=Object.keys(n.files).filter(N=>N.match(/^ppt\/slides\/slide\d+\.xml$/)).sort((N,M)=>{var Y,J;const O=parseInt(((Y=N.match(/slide(\d+)/))==null?void 0:Y[1])||"0",10),I=parseInt(((J=M.match(/slide(\d+)/))==null?void 0:J[1])||"0",10);return O-I});y.push(...D)}const x=[];for(const D of y){const N=await((T=n.file(D))==null?void 0:T.async("string"));if(!N)continue;const O=`ppt/slides/_rels/${D.split("/").pop()}.rels`,I=await((R=n.file(O))==null?void 0:R.async("string")),Y=I?P6(I):{},{elements:J,background:q}=await M6(N,Y,n);x.push({id:Pr(),elements:J,background:q})}if(x.length===0)throw new Error("슬라이드를 찾을 수 없습니다.");return x},Du={title:{fontSize:48,fontWeight:"800",lineHeight:1.1},subtitle:{fontSize:32,fontWeight:"600",lineHeight:1.2},body:{fontSize:18,fontWeight:"400",lineHeight:1.5},caption:{fontSize:14,fontWeight:"400",lineHeight:1.4}},z6=[{name:"맑은 고딕",value:"Malgun Gothic"},{name:"Noto Sans KR",value:"Noto Sans KR"},{name:"Inter",value:"Inter"}],hs={devdive:{background:"#ffffff",primary:"#5B6EF7",text:"#1e293b",accent:"#3b82f6"},minimal:{background:"#f8fafc",primary:"#64748b",text:"#334155",accent:"#94a3b8"},dark:{background:"#0f172a",primary:"#60a5fa",text:"#f1f5f9",accent:"#38bdf8"},business:{background:"#1e3a5f",primary:"#d4af37",text:"#ffffff",accent:"#f59e0b"}},bx=({isOpen:t,onClose:e,mode:n})=>{const i=Ve(x=>x.applyTemplate),s=Ve(x=>x.addSlideWithTemplate),[c,d]=oe.useState("devdive"),[h,p]=oe.useState(null),u=hs[c],A=()=>{h&&(n==="apply"?i(h,u):s(h,u),e())},y={devdive:"DevDive",minimal:"미니멀",dark:"다크",business:"비즈니스"};return C.jsxs(z.Modal,{opened:t,onClose:e,title:n==="apply"?"현재 슬라이드에 템플릿 적용":"새 슬라이드 추가",size:800,radius:"lg",centered:!0,styles:{title:{fontWeight:700,fontSize:18},body:{padding:0},content:{maxHeight:"90vh",display:"flex",flexDirection:"column"},inner:{padding:16}},children:[C.jsxs(z.Group,{align:"stretch",gap:0,style:{flex:1,minHeight:0,maxHeight:"calc(90vh - 140px)"},children:[C.jsxs(z.ScrollArea,{w:192,p:"md",style:{borderRight:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Text,{size:"xs",fw:700,c:"dimmed",mb:"sm",children:"컨셉 테마"}),C.jsx(z.Stack,{gap:"xs",children:Object.keys(hs).map(x=>C.jsx(z.UnstyledButton,{onClick:()=>d(x),p:"sm",style:{borderRadius:"var(--mantine-radius-lg)",backgroundColor:c===x?"rgba(91, 110, 247, 0.1)":void 0,color:c===x?"var(--devdive-primary)":void 0,transition:"all 150ms ease"},children:C.jsxs(z.Group,{gap:"sm",children:[C.jsx(z.Box,{w:32,h:32,style:{borderRadius:"var(--mantine-radius-md)",border:"1px solid var(--devdive-border-light)",backgroundColor:hs[x].background,display:"flex",alignItems:"center",justifyContent:"center"},children:C.jsx(z.Box,{w:16,h:16,style:{borderRadius:"var(--mantine-radius-sm)",backgroundColor:hs[x].primary}})}),C.jsx(z.Text,{size:"sm",fw:500,children:y[x]})]})},x))})]}),C.jsxs(z.Box,{flex:1,p:"md",style:{display:"flex",flexDirection:"column",minHeight:0},children:[C.jsx(z.Text,{size:"xs",fw:700,c:"dimmed",mb:"sm",children:"페이지 레이아웃"}),C.jsx(z.ScrollArea,{style:{flex:1},children:C.jsx(z.SimpleGrid,{cols:3,spacing:"sm",children:Xg.map(x=>C.jsxs(z.UnstyledButton,{onClick:()=>p(x.id),pos:"relative",style:{aspectRatio:"16/9",borderRadius:"var(--mantine-radius-lg)",border:h===x.id?"2px solid var(--devdive-primary)":"2px solid var(--devdive-border-light)",overflow:"hidden",backgroundColor:u.background,boxShadow:h===x.id?"0 4px 12px rgba(0, 0, 0, 0.15)":void 0,transition:"all 150ms ease"},children:[C.jsx(F6,{layout:x.id,theme:u}),h===x.id&&C.jsx(z.Box,{pos:"absolute",top:8,right:8,w:24,h:24,bg:"var(--devdive-primary)",style:{borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:C.jsx("span",{className:"material-symbols-outlined",style:{color:"white",fontSize:14},children:"check"})}),C.jsx(z.Box,{pos:"absolute",bottom:0,left:0,right:0,p:8,style:{background:"linear-gradient(to top, rgba(0,0,0,0.6), transparent)"},children:C.jsx(z.Text,{size:"xs",c:"white",fw:500,children:x.name})})]},x.id))})})]})]}),C.jsxs(z.Group,{justify:"flex-end",p:"md",bg:"gray.0",style:{borderTop:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:e,children:"취소"}),C.jsx(z.Button,{color:"devdive",onClick:A,disabled:!h,children:n==="apply"?"적용":"추가"})]})]})},F6=({layout:t,theme:e})=>{const n={backgroundColor:e.text,height:8,borderRadius:2},i={backgroundColor:e.primary,height:6,borderRadius:2},s={backgroundColor:e.text+"40",height:4,borderRadius:1},c={backgroundColor:e.primary+"30",border:`1px solid ${e.primary}`,borderRadius:4},d=A=>({position:"absolute",inset:A,display:"flex",flexDirection:"column"}),h={position:"absolute",inset:16,display:"flex",alignItems:"center",justifyContent:"center"},p={display:"flex",gap:8},u={display:"flex",flexDirection:"column",gap:4};switch(t){case"title":return C.jsx("div",{style:h,children:C.jsx("div",{style:{width:"75%"},children:C.jsx("div",{style:{...n,marginBottom:8}})})});case"title-subtitle":return C.jsxs("div",{style:{...h,flexDirection:"column",gap:8},children:[C.jsx("div",{style:{width:"75%",...n}}),C.jsx("div",{style:{width:"50%",...i}})]});case"content":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"66%",marginBottom:8,...n}}),C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"83%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]})]});case"two-column":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"50%",marginBottom:8,...n}}),C.jsxs("div",{style:{...p,flex:1},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]}),C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]})]})]});case"image-left":return C.jsxs("div",{style:{...d(12),flexDirection:"row",gap:8},children:[C.jsx("div",{style:{width:"40%",...c}}),C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"75%",...n}}),C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"83%",...s}})]})]});case"image-right":return C.jsxs("div",{style:{...d(12),flexDirection:"row",gap:8},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"75%",...n}}),C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"83%",...s}})]}),C.jsx("div",{style:{width:"40%",...c}})]});case"bullets":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"50%",marginBottom:8,...n}}),C.jsx("div",{style:{...u,flex:1,gap:6},children:[1,2,3,4].map(A=>C.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[C.jsx("div",{style:{width:6,height:6,borderRadius:"50%",backgroundColor:e.primary}}),C.jsx("div",{style:{flex:1,...s}})]},A))})]});case"section-header":return C.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column"},children:[C.jsx("div",{style:{flex:1}}),C.jsx("div",{style:{height:"33%",display:"flex",alignItems:"center",padding:"0 12px",backgroundColor:e.primary+"15"},children:C.jsx("div",{style:{width:"75%",...n}})}),C.jsx("div",{style:{flex:1}})]});case"comparison":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"50%",marginBottom:4,...n}}),C.jsxs("div",{style:{display:"flex",gap:8,marginBottom:4},children:[C.jsx("div",{style:{flex:1,height:6,borderRadius:4,backgroundColor:e.primary}}),C.jsx("div",{style:{flex:1,height:6,borderRadius:4,backgroundColor:e.primary+"60"}})]}),C.jsxs("div",{style:{...p,flex:1},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]}),C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]})]})]});case"title-only":return C.jsx("div",{style:d(12),children:C.jsx("div",{style:{width:"66%",...n}})});case"content-caption":return C.jsxs("div",{style:{...d(12),flexDirection:"row",gap:8},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{width:"75%",...n}}),C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"83%",...s}})]}),C.jsx("div",{style:{width:"25%",borderRadius:4,backgroundColor:e.primary+"20"}})]});case"picture-caption":return C.jsxs("div",{style:d(12),children:[C.jsx("div",{style:{width:"50%",marginBottom:4,...n}}),C.jsxs("div",{style:{display:"flex",gap:8,flex:1},children:[C.jsxs("div",{style:{...u,flex:1},children:[C.jsx("div",{style:{flex:1,...c}}),C.jsx("div",{style:{width:"100%",height:3,borderRadius:1,backgroundColor:e.text+"40"}})]}),C.jsxs("div",{style:{...u,width:"25%"},children:[C.jsx("div",{style:{width:"100%",...s}}),C.jsx("div",{style:{width:"80%",...s}})]})]})]});case"blank":return C.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:24,color:e.text+"30"},children:"crop_free"})});default:return null}},AA=sx()(ox((t,e)=>({status:"idle",currentFeature:null,error:null,lastTextResponse:null,lastSlideResponse:null,lastImageResponse:null,lastDesignSuggestions:null,providerConfig:null,setStatus:n=>t({status:n}),setFeature:n=>t({currentFeature:n}),setError:n=>t({error:n,status:n?"error":"idle"}),setTextResponse:n=>t({lastTextResponse:n,status:n?"success":"idle"}),setSlideResponse:n=>t({lastSlideResponse:n,status:n?"success":"idle"}),setImageResponse:n=>t({lastImageResponse:n,status:n?"success":"idle"}),setDesignSuggestions:n=>t({lastDesignSuggestions:n,status:n?"success":"idle"}),setProviderConfig:n=>t({providerConfig:n}),getProviderConfig:()=>e().providerConfig,reset:()=>t({status:"idle",currentFeature:null,error:null,lastTextResponse:null,lastSlideResponse:null,lastImageResponse:null,lastDesignSuggestions:null})}),{name:"devdive-ai-settings",partialize:t=>({providerConfig:t.providerConfig}),version:3,migrate:(t,e)=>e<3?{providerConfig:null}:t})),I6="https://api.z.ai/api/paas/v4";class cA extends Error{constructor(e,n,i){super(e),this.code=n,this.status=i,this.name="GlmApiError"}}const Sx=async(t,e,n)=>{var s,c;const i=await fetch(`${I6}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`},body:JSON.stringify(n)});if(!i.ok){const d=await i.json().catch(()=>({}));throw new cA(((s=d.error)==null?void 0:s.message)||`GLM API 오류: ${i.status}`,(c=d.error)==null?void 0:c.code,i.status)}return i.json()},O6=async(t,e)=>{var c,d;const i=`당신은 프레젠테이션 콘텐츠 작성 전문가입니다. ${{title:"제목으로 사용할 짧고 임팩트 있는",subtitle:"소제목으로 적합한",body:"본문 내용으로 적합한",caption:"캡션으로 사용할 간결한"}[t.style]||""} 텍스트를 생성해주세요. ${t.language==="ko"?"한국어로 작성하세요.":"Write in English."}`;return{content:((d=(c=(await Sx("/chat/completions",e,{model:e.model||"glm-4.7",messages:[{role:"system",content:i},{role:"user",content:t.prompt}],max_tokens:t.maxLength||500,temperature:.7})).choices[0])==null?void 0:c.message)==null?void 0:d.content)||""}},U6=`당신은 프레젠테이션 구조 설계 전문가입니다.
152
152
  주어진 주제로 슬라이드 구조를 JSON 형식으로 생성해주세요.
153
153
 
154
154
  응답 형식 (반드시 JSON 배열로):
@@ -298,12 +298,12 @@ ${t.language==="ko"?"한국어로 작성하세요.":"Write in English."}`,h=Q6}e
298
298
  - 목적: ${t.purpose}
299
299
 
300
300
  위 조건에 맞는 슬라이드 콘텐츠를 JSON으로 생성해주세요.
301
- ${t.language==="ko"?"한국어로 작성하세요.":"Write in English."}`,h=W6}const p=e.model||"gpt-4o",A=(await Kg(p,e,d,h,1e3,.7)).content.text||"{}";try{const y=A.match(/\{[\s\S]*\}/);if(!y)throw new Error("JSON을 찾을 수 없습니다.");const x=JSON.parse(y[0]);return s&&t.currentContent?{layout:t.layout,title:x.title!==null?x.title:t.currentContent.title||"",subtitle:x.subtitle!==null?x.subtitle:t.currentContent.subtitle||"",content:x.content||"",bulletPoints:x.bulletPoints!==null?x.bulletPoints:t.currentContent.bodyTexts||[],imagePrompt:x.imagePrompt||"",actions:x.actions||[]}:{layout:t.layout,title:x.title||"",subtitle:x.subtitle||"",content:x.content||"",bulletPoints:x.bulletPoints||[],imagePrompt:x.imagePrompt||"",actions:x.actions||[]}}catch{throw new Fl("슬라이드 콘텐츠 파싱 실패")}},V6=async(t,e)=>{const s=`${(e.baseUrl||wx).replace(/\/text-generation\/v\d+$/,"")}/image-generation/v2/gemini-3-pro-image-txt-to-img`,c={"Content-Type":"application/json"};!e.skipAuth&&e.apiKey&&(c["X-API-KEY"]=e.apiKey),e.customHeaders&&Object.assign(c,e.customHeaders);const d=await fetch(s,{method:"POST",headers:c,body:JSON.stringify({prompt:t.prompt})});if(!d.ok){const p=await d.json().catch(()=>({}));throw new Fl(p.detail||`이미지 생성 API 오류: ${d.status}`,p.code,d.status)}return{imageUrl:"",base64:(await d.json()).base64_image_data}},Fp={generateText:G6,generateSlides:X6,generateSlideContent:Y6,generateImage:V6},mA=()=>{const{status:t,currentFeature:e,error:n,lastTextResponse:i,lastSlideResponse:s,lastImageResponse:c,lastDesignSuggestions:d,providerConfig:h,setStatus:p,setFeature:u,setError:A,setTextResponse:y,setSlideResponse:x,setProviderConfig:S,reset:w}=AA(),T=se.useCallback(async O=>{if(!h)throw A("AI 제공자가 설정되지 않았습니다."),new Error("AI 제공자가 설정되지 않았습니다.");try{u("text"),p("loading"),A(null);let I;switch(h.provider){case"devdive":I=await Fp.generateText(O,h);break;case"glm":I=await i2.generateText(O,h);break;default:throw new Error(`지원하지 않는 AI 제공자: ${h.provider}`)}return y(I),I}catch(I){const Y=I instanceof cA||I instanceof Fl?I.message:"AI 텍스트 생성 중 오류 발생";throw A(Y),I}},[h,u,p,A,y]),R=se.useCallback(async O=>{if(!h)throw A("AI 제공자가 설정되지 않았습니다."),new Error("AI 제공자가 설정되지 않았습니다.");try{u("slide"),p("loading"),A(null);let I;switch(h.provider){case"devdive":I=await Fp.generateSlides(O,h);break;case"glm":I=await i2.generateSlides(O,h);break;default:throw new Error(`지원하지 않는 AI 제공자: ${h.provider}`)}return x(I),I}catch(I){const Y=I instanceof cA||I instanceof Fl?I.message:"AI 슬라이드 생성 중 오류 발생";throw A(Y),I}},[h,u,p,A,x]),D=se.useCallback(async O=>{if(!h)throw A("AI 제공자가 설정되지 않았습니다."),new Error("AI 제공자가 설정되지 않았습니다.");try{if(u("image"),p("loading"),A(null),h.provider!=="devdive")throw new Error("이미지 생성은 DevDive만 지원합니다.");const I=await Fp.generateImage(O,h);return p("success"),I}catch(I){const Y=I instanceof Fl?I.message:"AI 이미지 생성 중 오류 발생";throw A(Y),I}},[h,u,p,A]),N=se.useCallback(async O=>{throw A("디자인 제안은 아직 지원되지 않습니다."),new Error("디자인 제안은 아직 지원되지 않습니다.")},[A]),M=se.useCallback(async O=>{if(!h)throw new Error("AI 제공자가 설정되지 않았습니다.");if(h.provider!=="devdive")throw new Error("슬라이드 콘텐츠 생성은 DevDive만 지원합니다.");return Fp.generateSlideContent(O,h)},[h]);return{status:t,currentFeature:e,error:n,isLoading:t==="loading",isSuccess:t==="success",isError:t==="error",providerConfig:h,setProviderConfig:S,lastTextResponse:i,lastSlideResponse:s,lastImageResponse:c,lastDesignSuggestions:d,generateText:T,generateSlides:R,generateSlideContent:M,generateImage:D,suggestDesign:N,reset:w}},q6=t=>{const e=[],n=t.split(/\[슬라이드 번호\]/g).filter(Boolean);for(const i of n){const s=K6(i);s&&e.push(s)}return e},K6=t=>{const e=t.trim().split(`
302
- `);if(e.length===0)return null;const n=e[0].trim(),i=c=>{const d=new RegExp(`\\[${c}\\]\\s*(.*)`,"i");for(const h of e){const p=h.match(d);if(p)return p[1].trim()}return""},s=()=>{var h;const c=[];let d=!1;for(const p of e){if(p.includes("[핵심 포인트]")){d=!0;const u=(h=p.split("[핵심 포인트]")[1])==null?void 0:h.trim();u&&c.push(u);continue}if(d){if(p.includes("[")&&p.includes("]"))break;const u=p.trim();u&&c.push(u)}}return c};return{slideNumber:n,sectionType:i("섹션 타입"),recommendedLayout:i("추천 레이아웃"),visualElements:i("추천 시각 요소"),layoutReason:i("레이아웃 선택 이유"),sectionTitle:i("섹션 제목"),summary:i("요약"),keyPoints:s(),keywords:i("키워드").split(",").map(c=>c.trim()).filter(Boolean)}},Sr=()=>`el-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,J6=(t,e)=>{let n=0;for(const i of t){const s=/[가-힣ㄱ-ㅎㅏ-ㅣ]/.test(i);n+=s?e*1:e*.6}return Math.ceil(n)},Z6=t=>{const e=t.recommendedLayout.toLowerCase(),n=t.visualElements.toLowerCase(),i=["image","graph","chart","infographic","diagram","icon","그래프","차트","이미지","아이콘","다이어그램"],s=e.includes("image")||e.includes("graph")||e.includes("chart"),c=i.some(d=>n.includes(d));return s||c},$6=t=>{const e=t.recommendedLayout.toLowerCase();return e.includes("image_left")||e.includes("left")?"left":e.includes("image_right")||e.includes("right")?"right":e.includes("bottom")||e.includes("graph")?"bottom":"right"},s2=(t,e,n,i,s,c="이미지")=>[{id:Sr(),type:"shape",shapeType:"rect",x:t,y:e,width:n,height:i,rotation:0,fill:s.primary+"08",stroke:s.primary+"30",strokeWidth:2,cornerRadius:12},{id:Sr(),type:"shape",shapeType:"rect",x:t+n/2-30,y:e+i/2-40,width:60,height:60,rotation:0,fill:s.primary+"15",stroke:"transparent",strokeWidth:0,cornerRadius:30},{id:Sr(),type:"text",content:c,x:t,y:e+i/2+30,width:n,height:24,rotation:0,fontSize:12,fontFamily:"Malgun Gothic",fill:s.primary+"80",align:"center",textStyle:"caption",fontWeight:"500",lineHeight:1}],o2=(t,e=hs.devdive)=>{const n=[],i=t.sectionType==="cover"||t.sectionType==="closing",s=Z6(t),c=s?$6(t):"none";if(i)n.push({id:Sr(),type:"shape",shapeType:"rect",x:0,y:0,width:12,height:540,rotation:0,fill:e.primary,stroke:"transparent",strokeWidth:0,cornerRadius:0}),s&&n.push(...s2(620,80,280,180,e,t.visualElements||"이미지")),n.push({id:Sr(),type:"shape",shapeType:"rect",x:60,y:400,width:200,height:4,rotation:0,fill:e.accent,stroke:"transparent",strokeWidth:0,cornerRadius:2}),n.push({id:Sr(),type:"text",content:t.sectionTitle,x:60,y:180,width:s?500:840,height:100,rotation:0,fontSize:48,fontFamily:"Malgun Gothic",fill:e.text,align:"left",textStyle:"title",fontWeight:"800",lineHeight:1.1}),t.summary&&n.push({id:Sr(),type:"text",content:t.summary,x:60,y:300,width:s?500:700,height:80,rotation:0,fontSize:20,fontFamily:"Malgun Gothic",fill:"#64748b",align:"left",textStyle:"subtitle",fontWeight:"400",lineHeight:1.5}),n.push({id:Sr(),type:"text",content:t.slideNumber.padStart(2,"0"),x:860,y:480,width:80,height:40,rotation:0,fontSize:14,fontFamily:"Malgun Gothic",fill:"#94a3b8",align:"right",textStyle:"caption",fontWeight:"500",lineHeight:1});else{const d=c==="left"?420:60,h=s&&c!=="bottom"?480:840,p=c==="left"?40:620,u=c==="bottom"?340:140,A=c==="bottom"?400:280,y=c==="bottom"?160:240;n.push({id:Sr(),type:"shape",shapeType:"rect",x:0,y:0,width:960,height:100,rotation:0,fill:e.primary+"10",stroke:"transparent",strokeWidth:0,cornerRadius:0}),n.push({id:Sr(),type:"text",content:t.sectionTitle,x:60,y:30,width:760,height:50,rotation:0,fontSize:32,fontFamily:"Malgun Gothic",fill:e.text,align:"left",textStyle:"title",fontWeight:"700",lineHeight:1.2}),n.push({id:Sr(),type:"shape",shapeType:"rect",x:860,y:30,width:50,height:50,rotation:0,fill:e.primary,stroke:"transparent",strokeWidth:0,cornerRadius:8}),n.push({id:Sr(),type:"text",content:t.slideNumber.padStart(2,"0"),x:860,y:42,width:50,height:30,rotation:0,fontSize:18,fontFamily:"Malgun Gothic",fill:"#ffffff",align:"center",textStyle:"caption",fontWeight:"700",lineHeight:1});let x=120;if(s&&n.push(...s2(p,u,A,y,e,t.visualElements||"차트/그래프")),t.summary&&(n.push({id:Sr(),type:"text",content:t.summary,x:d,y:x,width:h,height:40,rotation:0,fontSize:16,fontFamily:"Malgun Gothic",fill:"#64748b",align:"left",textStyle:"body",fontWeight:"400",lineHeight:1.5}),x+=50),t.keyPoints.length>0&&(n.push({id:Sr(),type:"shape",shapeType:"rect",x:d,y:x,width:h,height:1,rotation:0,fill:"#e2e8f0",stroke:"transparent",strokeWidth:0,cornerRadius:0}),x+=20,t.keyPoints.forEach(S=>{n.push({id:Sr(),type:"shape",shapeType:"ellipse",x:d,y:x+8,width:8,height:8,rotation:0,fill:e.primary,stroke:"transparent",strokeWidth:0,cornerRadius:0});const w=S.replace(/^[•\-\*]\s*/,"");n.push({id:Sr(),type:"text",content:w,x:d+20,y:x,width:h-20,height:35,rotation:0,fontSize:18,fontFamily:"Malgun Gothic",fill:e.text,align:"left",textStyle:"body",fontWeight:"400",lineHeight:1.6}),x+=45})),t.keywords.length>0){x=480;let S=d;t.keywords.forEach(w=>{const T=`#${w}`,R=J6(T,12)+24;n.push({id:Sr(),type:"shape",shapeType:"rect",x:S,y:x,width:R,height:28,rotation:0,fill:e.primary+"15",stroke:e.primary+"30",strokeWidth:1,cornerRadius:14}),n.push({id:Sr(),type:"text",content:`#${w}`,x:S,y:x+5,width:R,height:20,rotation:0,fontSize:12,fontFamily:"Malgun Gothic",fill:e.primary,align:"center",textStyle:"caption",fontWeight:"500",lineHeight:1}),S+=R+8})}}return n},ew={title:"제목",subtitle:"소제목",body:"본문",caption:"캡션"},tw=({isOpen:t,onClose:e,onBack:n})=>{const[i,s]=se.useState(""),[c,d]=se.useState("body"),[h,p]=se.useState(null),{generateText:u,isLoading:A,error:y,reset:x}=mA(),{addElement:S}=Ve(),w=()=>`text-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,T=async()=>{if(i.trim())try{const M=await u({prompt:i.trim(),style:c,language:"ko"});p(M.content)}catch{}},R=()=>{if(!h)return;const M=Du[c],O={id:w(),type:"text",content:h,x:280,y:220,width:400,height:100,rotation:0,fontSize:M.fontSize,fontFamily:"Malgun Gothic",fill:"#1e293b",align:"center",textStyle:c,fontWeight:M.fontWeight,lineHeight:M.lineHeight};S(O),D()},D=()=>{s(""),p(null),x(),e()},N=()=>{p(null),T()};return C.jsx(z.Modal,{opened:t,onClose:D,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:n,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20},children:"arrow_back"})}),C.jsx(z.Text,{fw:700,children:"텍스트 생성"})]}),centered:!0,size:"md",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Textarea,{label:"프롬프트",description:"어떤 텍스트를 생성할지 설명해주세요",placeholder:"예: 인공지능의 미래에 대한 소개 문구",value:i,onChange:M=>s(M.currentTarget.value),minRows:3,autosize:!0}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"텍스트 스타일"}),C.jsx(z.SegmentedControl,{value:c,onChange:M=>d(M),data:Object.entries(ew).map(([M,O])=>({value:M,label:O})),fullWidth:!0,color:"devdive"})]}),y&&C.jsx(z.Alert,{color:"red",variant:"light",children:y}),h&&C.jsxs(z.Paper,{p:"md",radius:"md",withBorder:!0,bg:"gray.0",children:[C.jsxs(z.Group,{justify:"space-between",mb:"xs",children:[C.jsx(z.Text,{size:"sm",fw:500,c:"dimmed",children:"생성된 텍스트"}),C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.CopyButton,{value:h,children:({copied:M,copy:O})=>C.jsx(z.Tooltip,{label:M?"복사됨!":"복사",children:C.jsx(z.ActionIcon,{variant:"subtle",color:M?"teal":"gray",onClick:O,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:M?"check":"content_copy"})})})}),C.jsx(z.Tooltip,{label:"다시 생성",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:N,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"refresh"})})})]})]}),C.jsx(z.Text,{size:c==="title"?"xl":c==="subtitle"?"lg":"sm",fw:c==="title"?700:c==="subtitle"?600:400,children:h})]}),C.jsxs(z.Group,{justify:"flex-end",gap:"sm",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:D,children:"취소"}),h?C.jsx(z.Button,{color:"devdive",onClick:R,children:"슬라이드에 적용"}):C.jsx(z.Button,{color:"devdive",onClick:T,loading:A,disabled:!i.trim(),leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"auto_awesome"}),children:"생성"})]})]})})},nw=[{value:"cover",label:"커버"},{value:"content",label:"콘텐츠"},{value:"data",label:"데이터/차트"},{value:"closing",label:"클로징"}],rw=({isOpen:t,onClose:e,slide:n,slideIndex:i,onSave:s,onDelete:c})=>{const[d,h]=se.useState(n),p=(S,w)=>{h(T=>({...T,[S]:w}))},u=S=>{const w=S.split(`
301
+ ${t.language==="ko"?"한국어로 작성하세요.":"Write in English."}`,h=W6}const p=e.model||"gpt-4o",A=(await Kg(p,e,d,h,1e3,.7)).content.text||"{}";try{const y=A.match(/\{[\s\S]*\}/);if(!y)throw new Error("JSON을 찾을 수 없습니다.");const x=JSON.parse(y[0]);return s&&t.currentContent?{layout:t.layout,title:x.title!==null?x.title:t.currentContent.title||"",subtitle:x.subtitle!==null?x.subtitle:t.currentContent.subtitle||"",content:x.content||"",bulletPoints:x.bulletPoints!==null?x.bulletPoints:t.currentContent.bodyTexts||[],imagePrompt:x.imagePrompt||"",actions:x.actions||[]}:{layout:t.layout,title:x.title||"",subtitle:x.subtitle||"",content:x.content||"",bulletPoints:x.bulletPoints||[],imagePrompt:x.imagePrompt||"",actions:x.actions||[]}}catch{throw new Fl("슬라이드 콘텐츠 파싱 실패")}},V6=async(t,e)=>{const s=`${(e.baseUrl||wx).replace(/\/text-generation\/v\d+$/,"")}/image-generation/v2/gemini-3-pro-image-txt-to-img`,c={"Content-Type":"application/json"};!e.skipAuth&&e.apiKey&&(c["X-API-KEY"]=e.apiKey),e.customHeaders&&Object.assign(c,e.customHeaders);const d=await fetch(s,{method:"POST",headers:c,body:JSON.stringify({prompt:t.prompt})});if(!d.ok){const p=await d.json().catch(()=>({}));throw new Fl(p.detail||`이미지 생성 API 오류: ${d.status}`,p.code,d.status)}return{imageUrl:"",base64:(await d.json()).base64_image_data}},Fp={generateText:G6,generateSlides:X6,generateSlideContent:Y6,generateImage:V6},mA=()=>{const{status:t,currentFeature:e,error:n,lastTextResponse:i,lastSlideResponse:s,lastImageResponse:c,lastDesignSuggestions:d,providerConfig:h,setStatus:p,setFeature:u,setError:A,setTextResponse:y,setSlideResponse:x,setProviderConfig:S,reset:w}=AA(),T=oe.useCallback(async O=>{if(!h)throw A("AI 제공자가 설정되지 않았습니다."),new Error("AI 제공자가 설정되지 않았습니다.");try{u("text"),p("loading"),A(null);let I;switch(h.provider){case"devdive":I=await Fp.generateText(O,h);break;case"glm":I=await i2.generateText(O,h);break;default:throw new Error(`지원하지 않는 AI 제공자: ${h.provider}`)}return y(I),I}catch(I){const Y=I instanceof cA||I instanceof Fl?I.message:"AI 텍스트 생성 중 오류 발생";throw A(Y),I}},[h,u,p,A,y]),R=oe.useCallback(async O=>{if(!h)throw A("AI 제공자가 설정되지 않았습니다."),new Error("AI 제공자가 설정되지 않았습니다.");try{u("slide"),p("loading"),A(null);let I;switch(h.provider){case"devdive":I=await Fp.generateSlides(O,h);break;case"glm":I=await i2.generateSlides(O,h);break;default:throw new Error(`지원하지 않는 AI 제공자: ${h.provider}`)}return x(I),I}catch(I){const Y=I instanceof cA||I instanceof Fl?I.message:"AI 슬라이드 생성 중 오류 발생";throw A(Y),I}},[h,u,p,A,x]),D=oe.useCallback(async O=>{if(!h)throw A("AI 제공자가 설정되지 않았습니다."),new Error("AI 제공자가 설정되지 않았습니다.");try{if(u("image"),p("loading"),A(null),h.provider!=="devdive")throw new Error("이미지 생성은 DevDive만 지원합니다.");const I=await Fp.generateImage(O,h);return p("success"),I}catch(I){const Y=I instanceof Fl?I.message:"AI 이미지 생성 중 오류 발생";throw A(Y),I}},[h,u,p,A]),N=oe.useCallback(async O=>{throw A("디자인 제안은 아직 지원되지 않습니다."),new Error("디자인 제안은 아직 지원되지 않습니다.")},[A]),M=oe.useCallback(async O=>{if(!h)throw new Error("AI 제공자가 설정되지 않았습니다.");if(h.provider!=="devdive")throw new Error("슬라이드 콘텐츠 생성은 DevDive만 지원합니다.");return Fp.generateSlideContent(O,h)},[h]);return{status:t,currentFeature:e,error:n,isLoading:t==="loading",isSuccess:t==="success",isError:t==="error",providerConfig:h,setProviderConfig:S,lastTextResponse:i,lastSlideResponse:s,lastImageResponse:c,lastDesignSuggestions:d,generateText:T,generateSlides:R,generateSlideContent:M,generateImage:D,suggestDesign:N,reset:w}},q6=t=>{const e=[],n=t.split(/\[슬라이드 번호\]/g).filter(Boolean);for(const i of n){const s=K6(i);s&&e.push(s)}return e},K6=t=>{const e=t.trim().split(`
302
+ `);if(e.length===0)return null;const n=e[0].trim(),i=c=>{const d=new RegExp(`\\[${c}\\]\\s*(.*)`,"i");for(const h of e){const p=h.match(d);if(p)return p[1].trim()}return""},s=()=>{var h;const c=[];let d=!1;for(const p of e){if(p.includes("[핵심 포인트]")){d=!0;const u=(h=p.split("[핵심 포인트]")[1])==null?void 0:h.trim();u&&c.push(u);continue}if(d){if(p.includes("[")&&p.includes("]"))break;const u=p.trim();u&&c.push(u)}}return c};return{slideNumber:n,sectionType:i("섹션 타입"),recommendedLayout:i("추천 레이아웃"),visualElements:i("추천 시각 요소"),layoutReason:i("레이아웃 선택 이유"),sectionTitle:i("섹션 제목"),summary:i("요약"),keyPoints:s(),keywords:i("키워드").split(",").map(c=>c.trim()).filter(Boolean)}},Sr=()=>`el-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,J6=(t,e)=>{let n=0;for(const i of t){const s=/[가-힣ㄱ-ㅎㅏ-ㅣ]/.test(i);n+=s?e*1:e*.6}return Math.ceil(n)},Z6=t=>{const e=t.recommendedLayout.toLowerCase(),n=t.visualElements.toLowerCase(),i=["image","graph","chart","infographic","diagram","icon","그래프","차트","이미지","아이콘","다이어그램"],s=e.includes("image")||e.includes("graph")||e.includes("chart"),c=i.some(d=>n.includes(d));return s||c},$6=t=>{const e=t.recommendedLayout.toLowerCase();return e.includes("image_left")||e.includes("left")?"left":e.includes("image_right")||e.includes("right")?"right":e.includes("bottom")||e.includes("graph")?"bottom":"right"},s2=(t,e,n,i,s,c="이미지")=>[{id:Sr(),type:"shape",shapeType:"rect",x:t,y:e,width:n,height:i,rotation:0,fill:s.primary+"08",stroke:s.primary+"30",strokeWidth:2,cornerRadius:12},{id:Sr(),type:"shape",shapeType:"rect",x:t+n/2-30,y:e+i/2-40,width:60,height:60,rotation:0,fill:s.primary+"15",stroke:"transparent",strokeWidth:0,cornerRadius:30},{id:Sr(),type:"text",content:c,x:t,y:e+i/2+30,width:n,height:24,rotation:0,fontSize:12,fontFamily:"Malgun Gothic",fill:s.primary+"80",align:"center",textStyle:"caption",fontWeight:"500",lineHeight:1}],o2=(t,e=hs.devdive)=>{const n=[],i=t.sectionType==="cover"||t.sectionType==="closing",s=Z6(t),c=s?$6(t):"none";if(i)n.push({id:Sr(),type:"shape",shapeType:"rect",x:0,y:0,width:12,height:540,rotation:0,fill:e.primary,stroke:"transparent",strokeWidth:0,cornerRadius:0}),s&&n.push(...s2(620,80,280,180,e,t.visualElements||"이미지")),n.push({id:Sr(),type:"shape",shapeType:"rect",x:60,y:400,width:200,height:4,rotation:0,fill:e.accent,stroke:"transparent",strokeWidth:0,cornerRadius:2}),n.push({id:Sr(),type:"text",content:t.sectionTitle,x:60,y:180,width:s?500:840,height:100,rotation:0,fontSize:48,fontFamily:"Malgun Gothic",fill:e.text,align:"left",textStyle:"title",fontWeight:"800",lineHeight:1.1}),t.summary&&n.push({id:Sr(),type:"text",content:t.summary,x:60,y:300,width:s?500:700,height:80,rotation:0,fontSize:20,fontFamily:"Malgun Gothic",fill:"#64748b",align:"left",textStyle:"subtitle",fontWeight:"400",lineHeight:1.5}),n.push({id:Sr(),type:"text",content:t.slideNumber.padStart(2,"0"),x:860,y:480,width:80,height:40,rotation:0,fontSize:14,fontFamily:"Malgun Gothic",fill:"#94a3b8",align:"right",textStyle:"caption",fontWeight:"500",lineHeight:1});else{const d=c==="left"?420:60,h=s&&c!=="bottom"?480:840,p=c==="left"?40:620,u=c==="bottom"?340:140,A=c==="bottom"?400:280,y=c==="bottom"?160:240;n.push({id:Sr(),type:"shape",shapeType:"rect",x:0,y:0,width:960,height:100,rotation:0,fill:e.primary+"10",stroke:"transparent",strokeWidth:0,cornerRadius:0}),n.push({id:Sr(),type:"text",content:t.sectionTitle,x:60,y:30,width:760,height:50,rotation:0,fontSize:32,fontFamily:"Malgun Gothic",fill:e.text,align:"left",textStyle:"title",fontWeight:"700",lineHeight:1.2}),n.push({id:Sr(),type:"shape",shapeType:"rect",x:860,y:30,width:50,height:50,rotation:0,fill:e.primary,stroke:"transparent",strokeWidth:0,cornerRadius:8}),n.push({id:Sr(),type:"text",content:t.slideNumber.padStart(2,"0"),x:860,y:42,width:50,height:30,rotation:0,fontSize:18,fontFamily:"Malgun Gothic",fill:"#ffffff",align:"center",textStyle:"caption",fontWeight:"700",lineHeight:1});let x=120;if(s&&n.push(...s2(p,u,A,y,e,t.visualElements||"차트/그래프")),t.summary&&(n.push({id:Sr(),type:"text",content:t.summary,x:d,y:x,width:h,height:40,rotation:0,fontSize:16,fontFamily:"Malgun Gothic",fill:"#64748b",align:"left",textStyle:"body",fontWeight:"400",lineHeight:1.5}),x+=50),t.keyPoints.length>0&&(n.push({id:Sr(),type:"shape",shapeType:"rect",x:d,y:x,width:h,height:1,rotation:0,fill:"#e2e8f0",stroke:"transparent",strokeWidth:0,cornerRadius:0}),x+=20,t.keyPoints.forEach(S=>{n.push({id:Sr(),type:"shape",shapeType:"ellipse",x:d,y:x+8,width:8,height:8,rotation:0,fill:e.primary,stroke:"transparent",strokeWidth:0,cornerRadius:0});const w=S.replace(/^[•\-\*]\s*/,"");n.push({id:Sr(),type:"text",content:w,x:d+20,y:x,width:h-20,height:35,rotation:0,fontSize:18,fontFamily:"Malgun Gothic",fill:e.text,align:"left",textStyle:"body",fontWeight:"400",lineHeight:1.6}),x+=45})),t.keywords.length>0){x=480;let S=d;t.keywords.forEach(w=>{const T=`#${w}`,R=J6(T,12)+24;n.push({id:Sr(),type:"shape",shapeType:"rect",x:S,y:x,width:R,height:28,rotation:0,fill:e.primary+"15",stroke:e.primary+"30",strokeWidth:1,cornerRadius:14}),n.push({id:Sr(),type:"text",content:`#${w}`,x:S,y:x+5,width:R,height:20,rotation:0,fontSize:12,fontFamily:"Malgun Gothic",fill:e.primary,align:"center",textStyle:"caption",fontWeight:"500",lineHeight:1}),S+=R+8})}}return n},ew={title:"제목",subtitle:"소제목",body:"본문",caption:"캡션"},tw=({isOpen:t,onClose:e,onBack:n})=>{const[i,s]=oe.useState(""),[c,d]=oe.useState("body"),[h,p]=oe.useState(null),{generateText:u,isLoading:A,error:y,reset:x}=mA(),{addElement:S}=Ve(),w=()=>`text-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,T=async()=>{if(i.trim())try{const M=await u({prompt:i.trim(),style:c,language:"ko"});p(M.content)}catch{}},R=()=>{if(!h)return;const M=Du[c],O={id:w(),type:"text",content:h,x:280,y:220,width:400,height:100,rotation:0,fontSize:M.fontSize,fontFamily:"Malgun Gothic",fill:"#1e293b",align:"center",textStyle:c,fontWeight:M.fontWeight,lineHeight:M.lineHeight};S(O),D()},D=()=>{s(""),p(null),x(),e()},N=()=>{p(null),T()};return C.jsx(z.Modal,{opened:t,onClose:D,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:n,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20},children:"arrow_back"})}),C.jsx(z.Text,{fw:700,children:"텍스트 생성"})]}),centered:!0,size:"md",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Textarea,{label:"프롬프트",description:"어떤 텍스트를 생성할지 설명해주세요",placeholder:"예: 인공지능의 미래에 대한 소개 문구",value:i,onChange:M=>s(M.currentTarget.value),minRows:3,autosize:!0}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"텍스트 스타일"}),C.jsx(z.SegmentedControl,{value:c,onChange:M=>d(M),data:Object.entries(ew).map(([M,O])=>({value:M,label:O})),fullWidth:!0,color:"devdive"})]}),y&&C.jsx(z.Alert,{color:"red",variant:"light",children:y}),h&&C.jsxs(z.Paper,{p:"md",radius:"md",withBorder:!0,bg:"gray.0",children:[C.jsxs(z.Group,{justify:"space-between",mb:"xs",children:[C.jsx(z.Text,{size:"sm",fw:500,c:"dimmed",children:"생성된 텍스트"}),C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.CopyButton,{value:h,children:({copied:M,copy:O})=>C.jsx(z.Tooltip,{label:M?"복사됨!":"복사",children:C.jsx(z.ActionIcon,{variant:"subtle",color:M?"teal":"gray",onClick:O,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:M?"check":"content_copy"})})})}),C.jsx(z.Tooltip,{label:"다시 생성",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:N,loading:A,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"refresh"})})})]})]}),C.jsx(z.Text,{size:c==="title"?"xl":c==="subtitle"?"lg":"sm",fw:c==="title"?700:c==="subtitle"?600:400,children:h})]}),C.jsxs(z.Group,{justify:"flex-end",gap:"sm",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:D,children:"취소"}),h?C.jsx(z.Button,{color:"devdive",onClick:R,children:"슬라이드에 적용"}):C.jsx(z.Button,{color:"devdive",onClick:T,loading:A,disabled:!i.trim(),leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"auto_awesome"}),children:"생성"})]})]})})},nw=[{value:"cover",label:"커버"},{value:"content",label:"콘텐츠"},{value:"data",label:"데이터/차트"},{value:"closing",label:"클로징"}],rw=({isOpen:t,onClose:e,slide:n,slideIndex:i,onSave:s,onDelete:c})=>{const[d,h]=oe.useState(n),p=(S,w)=>{h(T=>({...T,[S]:w}))},u=S=>{const w=S.split(`
303
303
  `).filter(T=>T.trim());p("keyPoints",w)},A=S=>{const w=S.split(",").map(T=>T.trim()).filter(Boolean);p("keywords",w)},y=()=>{s(i,d),e()},x=()=>{c(i),e()};return C.jsx(z.Modal,{opened:t,onClose:e,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.Badge,{color:"devdive",size:"sm",children:i+1}),C.jsx(z.Text,{fw:700,children:"슬라이드 편집"})]}),centered:!0,size:"md",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Select,{label:"섹션 타입",data:nw,value:d.sectionType,onChange:S=>p("sectionType",S||"content")}),C.jsx(z.TextInput,{label:"제목",value:d.sectionTitle,onChange:S=>p("sectionTitle",S.currentTarget.value),placeholder:"슬라이드 제목"}),C.jsx(z.Textarea,{label:"요약",value:d.summary,onChange:S=>p("summary",S.currentTarget.value),placeholder:"슬라이드 요약 또는 부제목",minRows:2}),C.jsx(z.Textarea,{label:"핵심 포인트",description:"한 줄에 하나씩 입력하세요",value:d.keyPoints.join(`
304
304
  `),onChange:S=>u(S.currentTarget.value),placeholder:`첫 번째 포인트
305
305
  두 번째 포인트
306
- 세 번째 포인트`,minRows:4,autosize:!0}),C.jsx(z.TextInput,{label:"키워드",description:"쉼표로 구분",value:d.keywords.join(", "),onChange:S=>A(S.currentTarget.value),placeholder:"키워드1, 키워드2, 키워드3"}),C.jsxs(z.Group,{justify:"space-between",mt:"md",children:[C.jsx(z.Button,{variant:"subtle",color:"red",onClick:x,children:"삭제"}),C.jsxs(z.Group,{gap:"sm",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:e,children:"취소"}),C.jsx(z.Button,{color:"devdive",onClick:y,children:"저장"})]})]})]})})},aw=[{value:"business",label:"비즈니스"},{value:"creative",label:"크리에이티브"},{value:"minimal",label:"미니멀"},{value:"educational",label:"교육"}],iw=[{value:"title",label:"표지",icon:"title"},{value:"content",label:"본문",icon:"article"},{value:"bullets",label:"불릿",icon:"format_list_bulleted"},{value:"two-column",label:"2단",icon:"view_column"},{value:"image-left",label:"이미지 좌",icon:"image"},{value:"image-right",label:"이미지 우",icon:"image"},{value:"graph",label:"차트",icon:"insert_chart"}],sw=({isOpen:t,onClose:e,onBack:n})=>{const[i,s]=se.useState("ai"),[c,d]=se.useState("input"),[h,p]=se.useState(0),[u,A]=se.useState(!1),[y,x]=se.useState(""),[S,w]=se.useState(5),[T,R]=se.useState("business"),[D,N]=se.useState(!0),[M,O]=se.useState([]),[I,Y]=se.useState(null),[J,q]=se.useState(""),[W,V]=se.useState(null),[ge,X]=se.useState(null),[ae,L]=se.useState(null),[te,le]=se.useState("devdive"),{generateSlides:Ae,generateSlideContent:ne,isLoading:oe,error:ie,reset:j}=mA(),K=async()=>{if(!(!y.trim()||u)){A(!0);try{const G=(await Ae({topic:y.trim(),slideCount:S,style:T,includeImages:D,language:"ko"})).slides.map(Z=>({layout:Z.layout,purpose:Z.title||"",content:void 0}));O(G),d("structure")}catch{}finally{A(!1)}}},ve=async()=>{if(M.length===0)return;d("content"),p(0);const U={business:"비즈니스/전문적인 톤",creative:"창의적이고 흥미로운 톤",minimal:"간결하고 핵심만 담은 톤",educational:"교육적이고 설명적인 톤"},G=[];for(let Z=0;Z<M.length;Z++){const be=M[Z];try{const _e=await ne({topic:y.trim(),slideIndex:Z,totalSlides:M.length,layout:be.layout,purpose:be.purpose,style:U[T],language:"ko"});G.push(_e),p((Z+1)/M.length*100)}catch(_e){console.error(`슬라이드 ${Z+1} 콘텐츠 생성 실패:`,_e),G.push({layout:be.layout,title:be.purpose,subtitle:"",content:"",bulletPoints:[],imagePrompt:""})}}Y(G),d("preview")},xe=(U,G)=>{const Z=[...M];Z[U]={...Z[U],layout:G},O(Z)},Re=(U,G)=>{const Z=[...M];Z[U]={...Z[U],purpose:G},O(Z)},Fe=U=>{M.length<=1||O(M.filter((G,Z)=>Z!==U))},pt=()=>{O([...M,{layout:"content",purpose:"새 슬라이드"}])},lt=()=>{if(J.trim())try{X(null);const U=q6(J);if(U.length===0){X("슬라이드 데이터를 찾을 수 없습니다. 형식을 확인해주세요.");return}V(U)}catch(U){X("데이터 파싱 중 오류가 발생했습니다."),console.error(U)}},ut=(U,G)=>{if(!W)return;const Z=[...W];Z[U]=G,V(Z)},Rt=U=>{if(!W)return;const G=W.filter((Z,be)=>be!==U);V(G.length>0?G:null)},je=()=>{if(!W)return;const U=hs[te],G=Ve.getState(),Z=G.slides;let _e=Z.length===1&&Z[0].elements.length===0;W.forEach(me=>{const ze=o2(me,U);if(_e)G.selectSlide(0),_e=!1;else{G.addSlide();const Oe=Ve.getState().slides.length-1;G.selectSlide(Oe)}ze.forEach(Qe=>{Ve.getState().addElement(Qe)}),Ve.getState().updateSlideBackground(U.background)}),ce()},St=(U,G)=>{const Z=G===0,be=G===I.length-1;return{slideNumber:String(G+1),sectionType:Z?"cover":be?"closing":"content",recommendedLayout:U.layout,visualElements:U.imagePrompt||"",layoutReason:"",sectionTitle:U.title||"",summary:U.subtitle||U.content||"",keyPoints:U.bulletPoints||[],keywords:[]}},he=()=>{if(!I)return;const U=hs[te],G=Ve.getState(),Z=G.slides;let _e=Z.length===1&&Z[0].elements.length===0;I.forEach((me,ze)=>{const Qe=St(me,ze),Oe=o2(Qe,U);if(_e)G.selectSlide(0),_e=!1;else{G.addSlide();const Jt=Ve.getState().slides.length-1;G.selectSlide(Jt)}Oe.forEach(dt=>{Ve.getState().addElement(dt)}),Ve.getState().updateSlideBackground(U.background)}),ce()},k=()=>{c==="structure"?d("input"):c==="preview"&&(d("structure"),Y(null))},ce=()=>{x(""),O([]),Y(null),d("input"),p(0),A(!1),q(""),V(null),X(null),j(),e()},ue=()=>{switch(c){case"input":return 0;case"structure":return 1;case"content":return 2;case"preview":return 3;default:return 0}};return C.jsxs(z.Modal,{opened:t,onClose:ce,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:c==="input"?n:k,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20},children:"arrow_back"})}),C.jsx(z.Text,{fw:700,children:"슬라이드 자동 생성"})]}),centered:!0,size:"lg",children:[C.jsxs(z.Box,{pos:"relative",children:[C.jsx(z.LoadingOverlay,{visible:oe||u||c==="content",zIndex:1e3,overlayProps:{radius:"sm",blur:2},loaderProps:{color:"devdive",type:"dots",size:"lg"}}),C.jsxs(z.Stack,{gap:"md",children:[i==="ai"&&C.jsxs(z.Stepper,{active:ue(),size:"xs",color:"devdive",children:[C.jsx(z.Stepper.Step,{label:"주제 입력"}),C.jsx(z.Stepper.Step,{label:"구조 편집"}),C.jsx(z.Stepper.Step,{label:"콘텐츠 생성"}),C.jsx(z.Stepper.Step,{label:"미리보기"})]}),c==="content"&&C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"sm",mb:"xs",children:["콘텐츠 생성 중... (",Math.round(h),"%)"]}),C.jsx(z.Progress,{value:h,color:"devdive",animated:!0})]}),C.jsxs(z.Tabs,{value:i,onChange:s,children:[C.jsxs(z.Tabs.List,{grow:!0,children:[C.jsx(z.Tabs.Tab,{value:"ai",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"auto_awesome"}),children:"AI 생성"}),C.jsx(z.Tabs.Tab,{value:"paste",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"content_paste"}),children:"데이터 붙여넣기"})]}),C.jsx(z.Tabs.Panel,{value:"ai",pt:"md",children:C.jsxs(z.Stack,{gap:"md",children:[c==="input"&&C.jsxs(C.Fragment,{children:[C.jsx(z.TextInput,{label:"프레젠테이션 주제",description:"어떤 주제로 슬라이드를 만들까요?",placeholder:"예: 2024년 마케팅 전략 발표",value:y,onChange:U=>x(U.currentTarget.value)}),C.jsxs(z.Group,{grow:!0,children:[C.jsx(z.NumberInput,{label:"슬라이드 개수",value:S,onChange:U=>w(typeof U=="number"?U:5),min:1,max:10,clampBehavior:"strict"}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"이미지 포함"}),C.jsx(z.Switch,{checked:D,onChange:U=>N(U.currentTarget.checked),label:D?"포함":"미포함",color:"devdive"})]})]}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"프레젠테이션 스타일"}),C.jsx(z.SegmentedControl,{value:T,onChange:U=>R(U),data:aw,fullWidth:!0,color:"devdive"})]})]}),c==="structure"&&C.jsxs(z.Box,{children:[C.jsxs(z.Group,{justify:"space-between",mb:"xs",children:[C.jsxs(z.Text,{size:"sm",fw:500,children:["슬라이드 구조 (",M.length,"개)"]}),C.jsx(z.ActionIcon,{variant:"light",color:"devdive",size:"sm",onClick:pt,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"add"})})]}),C.jsx(z.ScrollArea,{h:250,children:C.jsx(z.Stack,{gap:"xs",children:M.map((U,G)=>C.jsx(z.Paper,{p:"sm",radius:"md",withBorder:!0,children:C.jsxs(z.Group,{gap:"xs",align:"flex-start",children:[C.jsx(z.Badge,{size:"sm",color:"devdive",variant:"light",w:28,children:G+1}),C.jsx(z.Box,{style:{flex:1},children:C.jsxs(z.Group,{gap:"xs",mb:"xs",children:[C.jsx(z.Select,{size:"xs",value:U.layout,onChange:Z=>xe(G,Z||"content"),data:iw.map(Z=>({value:Z.value,label:Z.label})),w:100}),C.jsx(z.TextInput,{size:"xs",placeholder:"슬라이드 목적",value:U.purpose,onChange:Z=>Re(G,Z.currentTarget.value),style:{flex:1}})]})}),M.length>1&&C.jsx(z.ActionIcon,{variant:"subtle",color:"red",size:"xs",onClick:()=>Fe(G),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"delete"})})]})},G))})})]}),c==="preview"&&I&&C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"sm",fw:500,mb:"xs",children:["생성된 슬라이드 (",I.length,"개)"]}),C.jsx(z.ScrollArea,{h:200,children:C.jsx(z.Stack,{gap:"xs",children:I.map((U,G)=>C.jsxs(z.Paper,{p:"sm",radius:"md",withBorder:!0,children:[C.jsxs(z.Group,{justify:"space-between",mb:4,children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.Badge,{size:"xs",color:"devdive",children:G+1}),C.jsx(z.Text,{size:"sm",fw:500,children:U.title||`슬라이드 ${G+1}`})]}),C.jsx(z.Badge,{size:"xs",variant:"light",color:"gray",children:U.layout})]}),U.subtitle&&C.jsx(z.Text,{size:"xs",c:"dimmed",lineClamp:1,children:U.subtitle}),U.bulletPoints&&U.bulletPoints.length>0&&C.jsxs(z.Text,{size:"xs",c:"dimmed",mt:4,children:["• ",U.bulletPoints[0],U.bulletPoints.length>1&&` 외 ${U.bulletPoints.length-1}개`]})]},G))})})]}),ie&&C.jsx(z.Alert,{color:"red",variant:"light",children:ie})]})}),C.jsx(z.Tabs.Panel,{value:"paste",pt:"md",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Textarea,{label:"슬라이드 데이터",description:"구조화된 슬라이드 데이터를 붙여넣으세요",placeholder:`[슬라이드 번호] 01
306
+ 세 번째 포인트`,minRows:4,autosize:!0}),C.jsx(z.TextInput,{label:"키워드",description:"쉼표로 구분",value:d.keywords.join(", "),onChange:S=>A(S.currentTarget.value),placeholder:"키워드1, 키워드2, 키워드3"}),C.jsxs(z.Group,{justify:"space-between",mt:"md",children:[C.jsx(z.Button,{variant:"subtle",color:"red",onClick:x,children:"삭제"}),C.jsxs(z.Group,{gap:"sm",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:e,children:"취소"}),C.jsx(z.Button,{color:"devdive",onClick:y,children:"저장"})]})]})]})})},aw=[{value:"business",label:"비즈니스"},{value:"creative",label:"크리에이티브"},{value:"minimal",label:"미니멀"},{value:"educational",label:"교육"}],iw=[{value:"title",label:"표지",icon:"title"},{value:"content",label:"본문",icon:"article"},{value:"bullets",label:"불릿",icon:"format_list_bulleted"},{value:"two-column",label:"2단",icon:"view_column"},{value:"image-left",label:"이미지 좌",icon:"image"},{value:"image-right",label:"이미지 우",icon:"image"},{value:"graph",label:"차트",icon:"insert_chart"}],sw=({isOpen:t,onClose:e,onBack:n})=>{const[i,s]=oe.useState("ai"),[c,d]=oe.useState("input"),[h,p]=oe.useState(0),[u,A]=oe.useState(!1),[y,x]=oe.useState(""),[S,w]=oe.useState(5),[T,R]=oe.useState("business"),[D,N]=oe.useState(!0),[M,O]=oe.useState([]),[I,Y]=oe.useState(null),[J,q]=oe.useState(""),[W,V]=oe.useState(null),[ge,X]=oe.useState(null),[ae,L]=oe.useState(null),[te,le]=oe.useState("devdive"),{generateSlides:Ae,generateSlideContent:ne,isLoading:se,error:ie,reset:j}=mA(),K=async()=>{if(!(!y.trim()||u)){A(!0);try{const G=(await Ae({topic:y.trim(),slideCount:S,style:T,includeImages:D,language:"ko"})).slides.map(Z=>({layout:Z.layout,purpose:Z.title||"",content:void 0}));O(G),d("structure")}catch{}finally{A(!1)}}},ve=async()=>{if(M.length===0)return;d("content"),p(0);const U={business:"비즈니스/전문적인 톤",creative:"창의적이고 흥미로운 톤",minimal:"간결하고 핵심만 담은 톤",educational:"교육적이고 설명적인 톤"},G=[];for(let Z=0;Z<M.length;Z++){const be=M[Z];try{const _e=await ne({topic:y.trim(),slideIndex:Z,totalSlides:M.length,layout:be.layout,purpose:be.purpose,style:U[T],language:"ko"});G.push(_e),p((Z+1)/M.length*100)}catch(_e){console.error(`슬라이드 ${Z+1} 콘텐츠 생성 실패:`,_e),G.push({layout:be.layout,title:be.purpose,subtitle:"",content:"",bulletPoints:[],imagePrompt:""})}}Y(G),d("preview")},xe=(U,G)=>{const Z=[...M];Z[U]={...Z[U],layout:G},O(Z)},Re=(U,G)=>{const Z=[...M];Z[U]={...Z[U],purpose:G},O(Z)},Fe=U=>{M.length<=1||O(M.filter((G,Z)=>Z!==U))},pt=()=>{O([...M,{layout:"content",purpose:"새 슬라이드"}])},lt=()=>{if(J.trim())try{X(null);const U=q6(J);if(U.length===0){X("슬라이드 데이터를 찾을 수 없습니다. 형식을 확인해주세요.");return}V(U)}catch(U){X("데이터 파싱 중 오류가 발생했습니다."),console.error(U)}},ut=(U,G)=>{if(!W)return;const Z=[...W];Z[U]=G,V(Z)},Rt=U=>{if(!W)return;const G=W.filter((Z,be)=>be!==U);V(G.length>0?G:null)},je=()=>{if(!W)return;const U=hs[te],G=Ve.getState(),Z=G.slides;let _e=Z.length===1&&Z[0].elements.length===0;W.forEach(me=>{const ze=o2(me,U);if(_e)G.selectSlide(0),_e=!1;else{G.addSlide();const Oe=Ve.getState().slides.length-1;G.selectSlide(Oe)}ze.forEach(Qe=>{Ve.getState().addElement(Qe)}),Ve.getState().updateSlideBackground(U.background)}),ce()},St=(U,G)=>{const Z=G===0,be=G===I.length-1;return{slideNumber:String(G+1),sectionType:Z?"cover":be?"closing":"content",recommendedLayout:U.layout,visualElements:U.imagePrompt||"",layoutReason:"",sectionTitle:U.title||"",summary:U.subtitle||U.content||"",keyPoints:U.bulletPoints||[],keywords:[]}},he=()=>{if(!I)return;const U=hs[te],G=Ve.getState(),Z=G.slides;let _e=Z.length===1&&Z[0].elements.length===0;I.forEach((me,ze)=>{const Qe=St(me,ze),Oe=o2(Qe,U);if(_e)G.selectSlide(0),_e=!1;else{G.addSlide();const Jt=Ve.getState().slides.length-1;G.selectSlide(Jt)}Oe.forEach(dt=>{Ve.getState().addElement(dt)}),Ve.getState().updateSlideBackground(U.background)}),ce()},k=()=>{c==="structure"?d("input"):c==="preview"&&(d("structure"),Y(null))},ce=()=>{x(""),O([]),Y(null),d("input"),p(0),A(!1),q(""),V(null),X(null),j(),e()},ue=()=>{switch(c){case"input":return 0;case"structure":return 1;case"content":return 2;case"preview":return 3;default:return 0}};return C.jsxs(z.Modal,{opened:t,onClose:ce,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:c==="input"?n:k,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20},children:"arrow_back"})}),C.jsx(z.Text,{fw:700,children:"슬라이드 자동 생성"})]}),centered:!0,size:"lg",children:[C.jsxs(z.Box,{pos:"relative",children:[C.jsx(z.LoadingOverlay,{visible:se||u||c==="content",zIndex:1e3,overlayProps:{radius:"sm",blur:2},loaderProps:{color:"devdive",type:"dots",size:"lg"}}),C.jsxs(z.Stack,{gap:"md",children:[i==="ai"&&C.jsxs(z.Stepper,{active:ue(),size:"xs",color:"devdive",children:[C.jsx(z.Stepper.Step,{label:"주제 입력"}),C.jsx(z.Stepper.Step,{label:"구조 편집"}),C.jsx(z.Stepper.Step,{label:"콘텐츠 생성"}),C.jsx(z.Stepper.Step,{label:"미리보기"})]}),c==="content"&&C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"sm",mb:"xs",children:["콘텐츠 생성 중... (",Math.round(h),"%)"]}),C.jsx(z.Progress,{value:h,color:"devdive",animated:!0})]}),C.jsxs(z.Tabs,{value:i,onChange:s,children:[C.jsxs(z.Tabs.List,{grow:!0,children:[C.jsx(z.Tabs.Tab,{value:"ai",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"auto_awesome"}),children:"AI 생성"}),C.jsx(z.Tabs.Tab,{value:"paste",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"content_paste"}),children:"데이터 붙여넣기"})]}),C.jsx(z.Tabs.Panel,{value:"ai",pt:"md",children:C.jsxs(z.Stack,{gap:"md",children:[c==="input"&&C.jsxs(C.Fragment,{children:[C.jsx(z.TextInput,{label:"프레젠테이션 주제",description:"어떤 주제로 슬라이드를 만들까요?",placeholder:"예: 2024년 마케팅 전략 발표",value:y,onChange:U=>x(U.currentTarget.value)}),C.jsxs(z.Group,{grow:!0,children:[C.jsx(z.NumberInput,{label:"슬라이드 개수",value:S,onChange:U=>w(typeof U=="number"?U:5),min:1,max:10,clampBehavior:"strict"}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"이미지 포함"}),C.jsx(z.Switch,{checked:D,onChange:U=>N(U.currentTarget.checked),label:D?"포함":"미포함",color:"devdive"})]})]}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"프레젠테이션 스타일"}),C.jsx(z.SegmentedControl,{value:T,onChange:U=>R(U),data:aw,fullWidth:!0,color:"devdive"})]})]}),c==="structure"&&C.jsxs(z.Box,{children:[C.jsxs(z.Group,{justify:"space-between",mb:"xs",children:[C.jsxs(z.Text,{size:"sm",fw:500,children:["슬라이드 구조 (",M.length,"개)"]}),C.jsx(z.ActionIcon,{variant:"light",color:"devdive",size:"sm",onClick:pt,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"add"})})]}),C.jsx(z.ScrollArea,{h:250,children:C.jsx(z.Stack,{gap:"xs",children:M.map((U,G)=>C.jsx(z.Paper,{p:"sm",radius:"md",withBorder:!0,children:C.jsxs(z.Group,{gap:"xs",align:"flex-start",children:[C.jsx(z.Badge,{size:"sm",color:"devdive",variant:"light",w:28,children:G+1}),C.jsx(z.Box,{style:{flex:1},children:C.jsxs(z.Group,{gap:"xs",mb:"xs",children:[C.jsx(z.Select,{size:"xs",value:U.layout,onChange:Z=>xe(G,Z||"content"),data:iw.map(Z=>({value:Z.value,label:Z.label})),w:100}),C.jsx(z.TextInput,{size:"xs",placeholder:"슬라이드 목적",value:U.purpose,onChange:Z=>Re(G,Z.currentTarget.value),style:{flex:1}})]})}),M.length>1&&C.jsx(z.ActionIcon,{variant:"subtle",color:"red",size:"xs",onClick:()=>Fe(G),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"delete"})})]})},G))})})]}),c==="preview"&&I&&C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"sm",fw:500,mb:"xs",children:["생성된 슬라이드 (",I.length,"개)"]}),C.jsx(z.ScrollArea,{h:200,children:C.jsx(z.Stack,{gap:"xs",children:I.map((U,G)=>C.jsxs(z.Paper,{p:"sm",radius:"md",withBorder:!0,children:[C.jsxs(z.Group,{justify:"space-between",mb:4,children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.Badge,{size:"xs",color:"devdive",children:G+1}),C.jsx(z.Text,{size:"sm",fw:500,children:U.title||`슬라이드 ${G+1}`})]}),C.jsx(z.Badge,{size:"xs",variant:"light",color:"gray",children:U.layout})]}),U.subtitle&&C.jsx(z.Text,{size:"xs",c:"dimmed",lineClamp:1,children:U.subtitle}),U.bulletPoints&&U.bulletPoints.length>0&&C.jsxs(z.Text,{size:"xs",c:"dimmed",mt:4,children:["• ",U.bulletPoints[0],U.bulletPoints.length>1&&` 외 ${U.bulletPoints.length-1}개`]})]},G))})})]}),ie&&C.jsx(z.Alert,{color:"red",variant:"light",children:ie})]})}),C.jsx(z.Tabs.Panel,{value:"paste",pt:"md",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Textarea,{label:"슬라이드 데이터",description:"구조화된 슬라이드 데이터를 붙여넣으세요",placeholder:`[슬라이드 번호] 01
307
307
  [섹션 타입] cover
308
308
  [추천 레이아웃] full_title_center
309
309
  [섹션 제목] 프레젠테이션 제목
@@ -311,7 +311,7 @@ ${t.language==="ko"?"한국어로 작성하세요.":"Write in English."}`,h=W6}c
311
311
  [핵심 포인트]
312
312
  • 첫 번째 포인트
313
313
  • 두 번째 포인트
314
- [키워드] 키워드1, 키워드2`,value:J,onChange:U=>q(U.currentTarget.value),minRows:8,maxRows:12,autosize:!0,styles:{input:{fontFamily:"monospace",fontSize:12}}}),ge&&C.jsx(z.Alert,{color:"red",variant:"light",children:ge}),W&&C.jsxs(z.Box,{children:[C.jsxs(z.Group,{gap:"xs",mb:"xs",children:[C.jsx(z.Text,{size:"sm",fw:500,children:"파싱된 슬라이드"}),C.jsxs(z.Badge,{color:"devdive",size:"sm",children:[W.length,"개"]})]}),C.jsx(z.ScrollArea,{h:150,children:C.jsx(z.Stack,{gap:"xs",children:W.map((U,G)=>C.jsxs(z.Paper,{p:"sm",radius:"md",withBorder:!0,style:{cursor:"pointer"},onClick:()=>L(G),children:[C.jsxs(z.Group,{justify:"space-between",children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.Text,{size:"xs",c:"dimmed",children:U.slideNumber}),C.jsx(z.Text,{size:"sm",fw:500,children:U.sectionTitle})]}),C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.Badge,{size:"xs",variant:"light",color:"gray",children:U.sectionType}),C.jsx(z.ActionIcon,{variant:"subtle",size:"xs",color:"gray",onClick:Z=>{Z.stopPropagation(),L(G)},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"edit"})})]})]}),U.keyPoints.length>0&&C.jsxs(z.Text,{size:"xs",c:"dimmed",mt:4,lineClamp:1,children:[U.keyPoints[0],"..."]})]},G))})})]})]})})]}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"컬러 테마"}),C.jsx(z.SimpleGrid,{cols:4,spacing:"xs",children:Object.keys(hs).map(U=>C.jsx(z.Paper,{p:"xs",radius:"md",withBorder:!0,style:{cursor:"pointer",borderColor:te===U?"var(--devdive-primary)":void 0,borderWidth:te===U?2:1},onClick:()=>le(U),children:C.jsxs(z.Group,{gap:4,children:[C.jsx(z.Box,{w:16,h:16,style:{borderRadius:"50%",backgroundColor:hs[U].primary}}),C.jsx(z.Text,{size:"xs",tt:"capitalize",children:U})]})},U))})]}),C.jsxs(z.Group,{justify:"flex-end",gap:"sm",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:ce,children:"취소"}),i==="ai"?C.jsxs(C.Fragment,{children:[c==="input"&&C.jsx(z.Button,{color:"devdive",onClick:K,loading:u||oe,disabled:!y.trim()||u||oe,leftSection:!u&&!oe?C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"account_tree"}):void 0,children:u||oe?"생성 중...":"구조 생성"}),c==="structure"&&C.jsx(z.Button,{color:"devdive",onClick:ve,leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"auto_awesome"}),children:"콘텐츠 생성"}),c==="preview"&&I&&C.jsxs(z.Button,{color:"devdive",onClick:he,children:[I.length,"개 슬라이드 추가"]})]}):W?C.jsxs(z.Button,{color:"devdive",onClick:je,children:[W.length,"개 슬라이드 추가"]}):C.jsx(z.Button,{color:"devdive",onClick:lt,disabled:!J.trim(),leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"data_object"}),children:"데이터 파싱"})]})]})]}),W&&ae!==null&&C.jsx(rw,{isOpen:ae!==null,onClose:()=>L(null),slide:W[ae],slideIndex:ae,onSave:ut,onDelete:Rt})]})},ow=[{value:"realistic",label:"사실적"},{value:"illustration",label:"일러스트"},{value:"abstract",label:"추상"},{value:"3d",label:"3D"},{value:"minimalist",label:"미니멀"}],lw=[{value:"512x512",label:"512×512"},{value:"1024x1024",label:"1024×1024"}],cw=({isOpen:t,onClose:e,onBack:n})=>{const[i,s]=se.useState(""),[c,d]=se.useState("illustration"),[h,p]=se.useState("512x512"),[u,A]=se.useState(null),{generateImage:y,isLoading:x,error:S,reset:w}=mA(),{addElement:T}=Ve(),R=()=>`image-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,D=async()=>{if(i.trim())try{const I=await y({prompt:i.trim(),style:c,size:h});A(I.base64||I.imageUrl)}catch{}},N=()=>{if(!u)return;const[I,Y]=h.split("x").map(Number),J=Math.min(I,300),q=J/I*Y,W={id:R(),type:"image",src:u.startsWith("data:")?u:`data:image/png;base64,${u}`,x:480-J/2,y:270-q/2,width:J,height:q,rotation:0};T(W),M()},M=()=>{s(""),A(null),w(),e()},O=()=>{A(null),D()};return C.jsx(z.Modal,{opened:t,onClose:M,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:n,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20},children:"arrow_back"})}),C.jsx(z.Text,{fw:700,children:"이미지 생성"})]}),centered:!0,size:"md",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Textarea,{label:"이미지 설명",description:"생성하고 싶은 이미지를 자세히 설명해주세요",placeholder:"예: 미래 도시의 스카이라인, 푸른 하늘과 유리 건물",value:i,onChange:I=>s(I.currentTarget.value),minRows:3,autosize:!0}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"이미지 스타일"}),C.jsx(z.SegmentedControl,{value:c,onChange:I=>d(I),data:ow,fullWidth:!0,color:"devdive"})]}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"이미지 크기"}),C.jsx(z.SegmentedControl,{value:h,onChange:I=>p(I),data:lw,color:"devdive"})]}),S&&C.jsx(z.Alert,{color:"red",variant:"light",children:S}),x&&C.jsx(z.Paper,{p:"xl",radius:"md",withBorder:!0,bg:"gray.0",children:C.jsx(z.Center,{children:C.jsxs(z.Stack,{align:"center",gap:"md",children:[C.jsx(z.Loader,{color:"devdive",size:"lg"}),C.jsx(z.Text,{size:"sm",c:"dimmed",children:"이미지를 생성하고 있습니다..."})]})})}),u&&!x&&C.jsxs(z.Paper,{p:"md",radius:"md",withBorder:!0,bg:"gray.0",children:[C.jsxs(z.Group,{justify:"space-between",mb:"xs",children:[C.jsx(z.Text,{size:"sm",fw:500,c:"dimmed",children:"생성된 이미지"}),C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:O,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"refresh"})})]}),C.jsx(z.Center,{children:C.jsx(z.Image,{src:u.startsWith("data:")?u:`data:image/png;base64,${u}`,alt:"Generated image",radius:"md",maw:300,fit:"contain"})})]}),C.jsxs(z.Group,{justify:"flex-end",gap:"sm",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:M,children:"취소"}),u?C.jsx(z.Button,{color:"devdive",onClick:N,children:"슬라이드에 추가"}):C.jsx(z.Button,{color:"devdive",onClick:D,loading:x,disabled:!i.trim(),leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"auto_awesome"}),children:"이미지 생성"})]})]})})},uw=[{type:"text",icon:"edit_note",title:"텍스트 생성",description:"AI로 슬라이드 텍스트를 자동 생성",color:"blue"},{type:"slide",icon:"auto_awesome_mosaic",title:"슬라이드 자동 생성",description:"주제를 입력하면 여러 슬라이드 구성",color:"violet"},{type:"image",icon:"image",title:"이미지 생성",description:"AI로 맞춤 이미지를 생성",color:"pink"},{type:"design",icon:"palette",title:"디자인 제안",description:"레이아웃과 색상을 자동 추천",color:"teal"}],dw=({isOpen:t,onClose:e})=>{const[n,i]=se.useState(null),s=h=>{i(h)},c=()=>{i(null)},d=()=>{i(null),e()};return C.jsxs(C.Fragment,{children:[C.jsx(z.Modal,{opened:t&&!n,onClose:d,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.ThemeIcon,{variant:"gradient",gradient:{from:"#5B6EF7",to:"#3b82f6"},size:"md",radius:"md",children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"auto_awesome"})}),C.jsx(z.Text,{fw:700,children:"AI 생성"}),C.jsx(z.Badge,{variant:"light",color:"devdive",size:"sm",children:"Beta"})]}),centered:!0,size:"lg",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Text,{size:"sm",c:"dimmed",children:"AI를 활용하여 프레젠테이션을 더 빠르고 쉽게 만들어보세요."}),C.jsx(z.SimpleGrid,{cols:2,spacing:"md",children:uw.map(h=>C.jsx(z.Card,{padding:"lg",radius:"md",withBorder:!0,style:{cursor:"pointer",transition:"all 0.2s ease"},onClick:()=>s(h.type),onMouseEnter:p=>{p.currentTarget.style.borderColor="var(--devdive-primary)",p.currentTarget.style.transform="translateY(-2px)",p.currentTarget.style.boxShadow="0 4px 12px rgba(91, 110, 247, 0.15)"},onMouseLeave:p=>{p.currentTarget.style.borderColor="",p.currentTarget.style.transform="",p.currentTarget.style.boxShadow=""},children:C.jsxs(z.Group,{gap:"md",children:[C.jsx(z.ThemeIcon,{variant:"light",color:h.color,size:"xl",radius:"md",children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:24},children:h.icon})}),C.jsxs("div",{children:[C.jsx(z.Text,{fw:600,size:"sm",children:h.title}),C.jsx(z.Text,{size:"xs",c:"dimmed",mt:4,children:h.description})]})]})},h.type))})]})}),C.jsx(tw,{isOpen:n==="text",onClose:c,onBack:c}),C.jsx(sw,{isOpen:n==="slide",onClose:c,onBack:c}),C.jsx(cw,{isOpen:n==="image",onClose:c,onBack:c})]})},Cx=()=>{const[t,e]=se.useState("Untitled Presentation"),[n,i]=se.useState(!1),[s,c]=se.useState(!1),[d,h]=se.useState(!1),[p,u]=se.useState("new"),[A,y]=se.useState(!1),[x,S]=se.useState(!1),w=Ve(W=>W.slides),T=Ve(W=>W.defaultBackground),R=Ve(W=>W.resetPresentation),D=Ve(W=>W.loadSlides),N=se.useRef(null),M=se.useRef(null),O=async()=>{if(!n){i(!0);try{await yx(w,t.replace(/\s+/g,"_"))}catch(W){console.error("PPTX 생성 실패:",W)}finally{i(!1)}}},I=()=>{const W={version:1,title:t,slides:w,defaultBackground:T,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},V=new Blob([JSON.stringify(W,null,2)],{type:"application/json"}),ge=URL.createObjectURL(V),X=document.createElement("a");X.href=ge,X.download=`${t.replace(/\s+/g,"_")}.ddslide`,document.body.appendChild(X),X.click(),document.body.removeChild(X),URL.revokeObjectURL(ge)},Y=W=>{var X;const V=(X=W.target.files)==null?void 0:X[0];if(!V)return;const ge=new FileReader;ge.onload=ae=>{var L;try{const te=(L=ae.target)==null?void 0:L.result,le=JSON.parse(te);if(!le.slides||!Array.isArray(le.slides))throw new Error("Invalid file format");D(le.slides,le.defaultBackground),le.title&&e(le.title)}catch(te){console.error("파일 불러오기 실패:",te),alert("파일을 불러올 수 없습니다. 올바른 .ddslide 파일인지 확인해주세요.")}},ge.readAsText(V),W.target.value=""},J=async W=>{var ge;const V=(ge=W.target.files)==null?void 0:ge[0];if(!(!V||s)){c(!0);try{const X=await xx(V);D(X);const ae=V.name.replace(/\.pptx$/i,"");e(ae)}catch(X){console.error("PPTX 불러오기 실패:",X),alert("PPTX 파일을 불러올 수 없습니다.")}finally{c(!1),W.target.value=""}}},q=()=>{R(),e("Untitled Presentation"),S(!1)};return C.jsxs(z.Box,{component:"header",h:56,px:"md",bg:"white",style:{borderBottom:"1px solid var(--devdive-border-light)",zIndex:20,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)"},children:[C.jsxs(z.Group,{h:"100%",justify:"space-between",children:[C.jsxs(z.Group,{gap:"md",children:[C.jsx(z.Box,{w:32,h:32,bg:"var(--devdive-primary)",style:{borderRadius:"var(--mantine-radius-md)",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 6px rgba(91, 110, 247, 0.2)"},children:C.jsx("span",{className:"material-symbols-outlined",style:{color:"white",fontSize:20},children:"auto_awesome"})}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"xs",fw:700,c:"dimmed",tt:"uppercase",lts:"-0.05em",children:"Presentation"}),C.jsx(z.TextInput,{value:t,onChange:W=>e(W.currentTarget.value),placeholder:"제목을 입력하세요",variant:"unstyled",size:"sm",w:192,styles:{input:{fontWeight:600,letterSpacing:"-0.01em",padding:0,height:"auto",minHeight:"auto"}}})]})]}),C.jsxs(z.Group,{gap:"sm",children:[C.jsxs(z.Menu,{shadow:"md",width:180,position:"bottom-start",children:[C.jsx(z.Menu.Target,{children:C.jsx(z.Button,{variant:"subtle",color:"gray",size:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"folder"}),children:"파일"})}),C.jsxs(z.Menu.Dropdown,{children:[C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"note_add"}),onClick:()=>S(!0),children:"새로 만들기"}),C.jsx(z.Menu.Divider,{}),C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"save"}),onClick:I,children:"저장 (.ddslide)"}),C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"folder_open"}),onClick:()=>{var W;return(W=N.current)==null?void 0:W.click()},children:"불러오기 (.ddslide)"}),C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"upload_file"}),onClick:()=>{var W;return(W=M.current)==null?void 0:W.click()},disabled:s,children:s?"PPTX 불러오는 중...":"PPTX 불러오기"}),C.jsx(z.Menu.Divider,{}),C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"download"}),onClick:O,disabled:n,children:"PPTX 내보내기"})]})]}),C.jsx("input",{ref:N,type:"file",accept:".ddslide,.json",style:{display:"none"},onChange:Y}),C.jsx("input",{ref:M,type:"file",accept:".pptx",style:{display:"none"},onChange:J}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Button,{variant:"subtle",color:"gray",size:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"dashboard"}),onClick:()=>{u("apply"),h(!0)},children:"템플릿"}),C.jsx(z.Button,{variant:"light",color:"devdive",size:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"add"}),onClick:()=>{u("new"),h(!0)},children:"새 슬라이드"}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Button,{variant:"gradient",gradient:{from:"#5B6EF7",to:"#3b82f6"},size:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"auto_awesome"}),onClick:()=>y(!0),children:"AI 생성"}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Button,{color:"devdive",size:"xs",fw:700,leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"download"}),onClick:O,loading:n,style:{boxShadow:"0 4px 6px rgba(91, 110, 247, 0.2)"},children:n?"Exporting...":"EXPORT"})]})]}),C.jsx(bx,{isOpen:d,onClose:()=>h(!1),mode:p}),C.jsx(dw,{isOpen:A,onClose:()=>y(!1)}),C.jsx(z.Modal,{opened:x,onClose:()=>S(!1),title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20,color:"#f59e0b"},children:"warning"}),C.jsx(z.Text,{fw:700,children:"새 프레젠테이션"})]}),centered:!0,size:"sm",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsxs(z.Text,{size:"sm",c:"dimmed",children:["현재 작업 중인 프레젠테이션이 삭제됩니다.",C.jsx("br",{}),"저장하지 않은 변경사항은 복구할 수 없습니다."]}),C.jsxs(z.Group,{justify:"flex-end",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:()=>S(!1),children:"취소"}),C.jsx(z.Button,{color:"red",onClick:q,children:"새로 만들기"})]})]})})]})};function gA(){return(gA=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _x(t,e){if(t==null)return{};var n,i,s={},c=Object.keys(t);for(i=0;i<c.length;i++)e.indexOf(n=c[i])>=0||(s[n]=t[n]);return s}function Tg(t){var e=se.useRef(t),n=se.useRef(function(i){e.current&&e.current(i)});return e.current=t,n.current}var Lf=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},wf=function(t){return"touches"in t},Rg=function(t){return t&&t.ownerDocument.defaultView||self},l2=function(t,e,n){var i=t.getBoundingClientRect(),s=wf(e)?(function(c,d){for(var h=0;h<c.length;h++)if(c[h].identifier===d)return c[h];return c[0]})(e.touches,n):e;return{left:Lf((s.pageX-(i.left+Rg(t).pageXOffset))/i.width),top:Lf((s.pageY-(i.top+Rg(t).pageYOffset))/i.height)}},c2=function(t){!wf(t)&&t.preventDefault()},Ex=se.memo(function(t){var e=t.onMove,n=t.onKey,i=_x(t,["onMove","onKey"]),s=se.useRef(null),c=Tg(e),d=Tg(n),h=se.useRef(null),p=se.useRef(!1),u=se.useMemo(function(){var S=function(R){c2(R),(wf(R)?R.touches.length>0:R.buttons>0)&&s.current?c(l2(s.current,R,h.current)):T(!1)},w=function(){return T(!1)};function T(R){var D=p.current,N=Rg(s.current),M=R?N.addEventListener:N.removeEventListener;M(D?"touchmove":"mousemove",S),M(D?"touchend":"mouseup",w)}return[function(R){var D=R.nativeEvent,N=s.current;if(N&&(c2(D),!(function(O,I){return I&&!wf(O)})(D,p.current)&&N)){if(wf(D)){p.current=!0;var M=D.changedTouches||[];M.length&&(h.current=M[0].identifier)}N.focus(),c(l2(N,D,h.current)),T(!0)}},function(R){var D=R.which||R.keyCode;D<37||D>40||(R.preventDefault(),d({left:D===39?.05:D===37?-.05:0,top:D===40?.05:D===38?-.05:0}))},T]},[d,c]),A=u[0],y=u[1],x=u[2];return se.useEffect(function(){return x},[x]),se.createElement("div",gA({},i,{onTouchStart:A,onMouseDown:A,className:"react-colorful__interactive",ref:s,onKeyDown:y,tabIndex:0,role:"slider"}))}),Jg=function(t){return t.filter(Boolean).join(" ")},Tx=function(t){var e=t.color,n=t.left,i=t.top,s=i===void 0?.5:i,c=Jg(["react-colorful__pointer",t.className]);return se.createElement("div",{className:c,style:{top:100*s+"%",left:100*n+"%"}},se.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},Br=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},fw=function(t){return gw(Dg(t))},Dg=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Br(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?Br(parseInt(t.substring(6,8),16)/255,2):1}},hw=function(t){return mw(Aw(t))},pw=function(t){var e=t.s,n=t.v,i=t.a,s=(200-e)*n/100;return{h:Br(t.h),s:Br(s>0&&s<200?e*n/100/(s<=100?s:200-s)*100:0),l:Br(s/2),a:Br(i,2)}},Lg=function(t){var e=pw(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Aw=function(t){var e=t.h,n=t.s,i=t.v,s=t.a;e=e/360*6,n/=100,i/=100;var c=Math.floor(e),d=i*(1-n),h=i*(1-(e-c)*n),p=i*(1-(1-e+c)*n),u=c%6;return{r:Br(255*[i,h,d,d,p,i][u]),g:Br(255*[p,i,i,h,d,d][u]),b:Br(255*[d,d,p,i,i,h][u]),a:Br(s,2)}},Ip=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},mw=function(t){var e=t.r,n=t.g,i=t.b,s=t.a,c=s<1?Ip(Br(255*s)):"";return"#"+Ip(e)+Ip(n)+Ip(i)+c},gw=function(t){var e=t.r,n=t.g,i=t.b,s=t.a,c=Math.max(e,n,i),d=c-Math.min(e,n,i),h=d?c===e?(n-i)/d:c===n?2+(i-e)/d:4+(e-n)/d:0;return{h:Br(60*(h<0?h+6:h)),s:Br(c?d/c*100:0),v:Br(c/255*100),a:s}},vw=se.memo(function(t){var e=t.hue,n=t.onChange,i=Jg(["react-colorful__hue",t.className]);return se.createElement("div",{className:i},se.createElement(Ex,{onMove:function(s){n({h:360*s.left})},onKey:function(s){n({h:Lf(e+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":Br(e),"aria-valuemax":"360","aria-valuemin":"0"},se.createElement(Tx,{className:"react-colorful__hue-pointer",left:e/360,color:Lg({h:e,s:100,v:100,a:1})})))}),yw=se.memo(function(t){var e=t.hsva,n=t.onChange,i={backgroundColor:Lg({h:e.h,s:100,v:100,a:1})};return se.createElement("div",{className:"react-colorful__saturation",style:i},se.createElement(Ex,{onMove:function(s){n({s:100*s.left,v:100-100*s.top})},onKey:function(s){n({s:Lf(e.s+100*s.left,0,100),v:Lf(e.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Br(e.s)+"%, Brightness "+Br(e.v)+"%"},se.createElement(Tx,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Lg(e)})))}),Rx=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},xw=function(t,e){return t.toLowerCase()===e.toLowerCase()||Rx(Dg(t),Dg(e))};function bw(t,e,n){var i=Tg(n),s=se.useState(function(){return t.toHsva(e)}),c=s[0],d=s[1],h=se.useRef({color:e,hsva:c});se.useEffect(function(){if(!t.equal(e,h.current.color)){var u=t.toHsva(e);h.current={hsva:u,color:e},d(u)}},[e,t]),se.useEffect(function(){var u;Rx(c,h.current.hsva)||t.equal(u=t.fromHsva(c),h.current.color)||(h.current={hsva:c,color:u},i(u))},[c,t,i]);var p=se.useCallback(function(u){d(function(A){return Object.assign({},A,u)})},[]);return[c,p]}var Sw=typeof window<"u"?se.useLayoutEffect:se.useEffect,ww=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},u2=new Map,Cw=function(t){Sw(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!u2.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,u2.set(e,n);var i=ww();i&&n.setAttribute("nonce",i),e.head.appendChild(n)}},[])},_w=function(t){var e=t.className,n=t.colorModel,i=t.color,s=i===void 0?n.defaultColor:i,c=t.onChange,d=_x(t,["className","colorModel","color","onChange"]),h=se.useRef(null);Cw(h);var p=bw(n,s,c),u=p[0],A=p[1],y=Jg(["react-colorful",e]);return se.createElement("div",gA({},d,{ref:h,className:y}),se.createElement(yw,{hsva:u,onChange:A}),se.createElement(vw,{hue:u.h,onChange:A,className:"react-colorful__last-control"}))},Ew={defaultColor:"000",toHsva:fw,fromHsva:function(t){return hw({h:t.h,s:t.s,v:t.v,a:1})},equal:xw},Dx=function(t){return se.createElement(_w,gA({},t,{colorModel:Ew}))};const Lx=()=>{var ie;const t=Ve(j=>j.mode),e=Ve(j=>j.currentShapeType),n=Ve(j=>j.currentTextStyle),i=Ve(j=>j.currentFontFamily),s=Ve(j=>j.selectedElementId),c=Ve(j=>j.slides),d=Ve(j=>j.currentSlideIndex),h=Ve(j=>j.setMode),p=Ve(j=>j.setShapeType),u=Ve(j=>j.setTextStyle),A=Ve(j=>j.setFontFamily),y=Ve(j=>j.deleteElement),x=Ve(j=>j.addElement),S=Ve(j=>j.updateSlideBackground),w=Ve(j=>j.updateAllSlidesBackground),T=Ve(j=>j.snapSettings),R=Ve(j=>j.toggleSnap),[D,N]=se.useState(!1),M=se.useRef(null),O=se.useRef(null),[I,Y]=se.useState({x:0,y:0}),[J,q]=se.useState({isDragging:!1,startX:0,startY:0,offsetX:0,offsetY:0}),W=((ie=c[d])==null?void 0:ie.background)||"#ffffff",V=se.useCallback(j=>{const K=j.target;K.closest("button")||K.closest('[role="button"]')||K.closest("input")||K.closest("[data-mantine-popover]")||(j.preventDefault(),q({isDragging:!0,startX:j.clientX,startY:j.clientY,offsetX:I.x,offsetY:I.y}))},[I]);se.useEffect(()=>{if(!J.isDragging)return;const j=ve=>{const xe=ve.clientX-J.startX,Re=ve.clientY-J.startY;let Fe=J.offsetX+xe,pt=J.offsetY+Re;if(O.current){const lt=O.current.getBoundingClientRect(),ut=window.innerWidth,Rt=window.innerHeight,je=lt.width,St=lt.height,he=ut/2,k=24,ce=8,ue=-he+je/2+ce,U=he-je/2-ce;Fe=Math.max(ue,Math.min(U,Fe));const G=-k+ce,Z=Rt-k-St-ce;pt=Math.max(G,Math.min(Z,pt))}Y({x:Fe,y:pt})},K=()=>{q(ve=>({...ve,isDragging:!1}))};return document.addEventListener("mousemove",j),document.addEventListener("mouseup",K),()=>{document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",K)}},[J.isDragging,J.startX,J.startY,J.offsetX,J.offsetY]);const ge=j=>{h(j)},X=j=>{p(j),h("shape")},ae=j=>{u(j),h("text")},L=()=>{s&&y(s)},te=j=>{var xe;const K=(xe=j.target.files)==null?void 0:xe[0];if(!K)return;const ve=new FileReader;ve.onload=Re=>{var lt;const Fe=(lt=Re.target)==null?void 0:lt.result,pt=new window.Image;pt.onload=()=>{let je=pt.width,St=pt.height;je>400&&(St=400/je*St,je=400),St>300&&(je=300/St*je,St=300);const he={id:Pr(),type:"image",x:100,y:100,width:je,height:St,rotation:0,src:Fe};x(he)},pt.src=Fe},ve.readAsDataURL(K),j.target.value=""},le=()=>{const j={id:Pr(),type:"shape",x:100,y:100,width:300,height:200,rotation:0,shapeType:"rect",fill:"#5B6EF720",stroke:"#5B6EF7",strokeWidth:2,text:"클릭하여 이미지 추가",textColor:"#5B6EF7",textSize:16,cornerRadius:12,isImagePlaceholder:!0};x(j),h("select")},Ae={title:"제목",subtitle:"소제목",body:"본문",caption:"캡션"},ne={rect:{label:"사각형",icon:"rectangle"},ellipse:{label:"원형",icon:"circle"},triangle:{label:"삼각형",icon:"change_history"},line:{label:"선",icon:"horizontal_rule"},arrow:{label:"화살표",icon:"arrow_forward"}},oe=["#ffffff","#f8fafc","#f1f5f9","#e2e8f0","#1e293b","#0f172a","#5B6EF7","#3b82f6","#ef4444","#22c55e","#f97316","#8b5cf6"];return C.jsx(z.Box,{ref:O,pos:"absolute",top:24,left:"50%",style:{transform:`translate(calc(-50% + ${I.x}px), ${I.y}px)`,zIndex:30,cursor:J.isDragging?"grabbing":"default"},children:C.jsxs(z.Group,{gap:4,px:"sm",py:10,bg:"white",wrap:"nowrap",onMouseDown:V,style:{border:"1px solid var(--devdive-border-light)",borderRadius:"var(--mantine-radius-xl)",boxShadow:"0 8px 30px rgb(0, 0, 0, 0.08)",userSelect:"none",whiteSpace:"nowrap"},children:[C.jsx(z.Tooltip,{label:"드래그하여 이동",children:C.jsx(z.Box,{style:{cursor:"grab",display:"flex",alignItems:"center",padding:"0 4px"},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16,color:"var(--mantine-color-gray-5)"},children:"drag_indicator"})})}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Tooltip,{label:"선택 도구",children:C.jsx(z.ActionIcon,{variant:t==="select"?"light":"subtle",color:t==="select"?"devdive":"gray",size:"lg",radius:"lg",onClick:()=>ge("select"),children:C.jsx("span",{className:"material-symbols-outlined",children:"arrow_selector_tool"})})}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsxs(z.Menu,{shadow:"md",radius:"lg",children:[C.jsx(z.Menu.Target,{children:C.jsx(z.Button,{variant:t==="text"?"light":"subtle",color:t==="text"?"devdive":"gray",size:"xs",radius:"lg",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"title"}),rightSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"expand_more"}),children:Ae[n]})}),C.jsx(z.Menu.Dropdown,{children:Object.keys(Du).map(j=>C.jsx(z.Menu.Item,{onClick:()=>ae(j),rightSection:n===j?C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"check"}):null,style:{backgroundColor:n===j?"rgba(91, 110, 247, 0.05)":void 0,color:n===j?"var(--devdive-primary)":void 0},children:C.jsx("span",{style:{fontSize:Math.max(14,Math.min(Du[j].fontSize/2,18)),fontWeight:Du[j].fontWeight},children:Ae[j]})},j))})]}),C.jsx(z.Select,{value:i,onChange:j=>j&&A(j),data:z6.map(j=>({value:j.value,label:j.name})),size:"xs",w:100,variant:"unstyled",styles:{input:{fontWeight:500,cursor:"pointer"}}}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx("input",{ref:M,type:"file",accept:"image/*",onChange:te,style:{display:"none"}}),C.jsxs(z.Menu,{shadow:"md",radius:"lg",children:[C.jsx(z.Menu.Target,{children:C.jsx(z.Button,{variant:t==="shape"?"light":"subtle",color:t==="shape"?"devdive":"gray",size:"xs",radius:"lg",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:ne[e].icon}),rightSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"expand_more"}),children:ne[e].label})}),C.jsxs(z.Menu.Dropdown,{children:[Object.keys(ne).map(j=>C.jsx(z.Menu.Item,{onClick:()=>X(j),leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:ne[j].icon}),rightSection:e===j?C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"check"}):null,style:{backgroundColor:e===j?"rgba(91, 110, 247, 0.05)":void 0,color:e===j?"var(--devdive-primary)":void 0},children:ne[j].label},j)),C.jsx(z.Menu.Divider,{}),C.jsx(z.Menu.Item,{onClick:le,leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"image"}),children:"이미지"})]})]}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsxs(z.Popover,{opened:D,onChange:N,position:"bottom-end",radius:"lg",shadow:"xl",children:[C.jsx(z.Popover.Target,{children:C.jsx(z.Tooltip,{label:"배경 색상",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"lg",radius:"lg",onClick:()=>N(!D),children:C.jsxs(z.Group,{gap:4,children:[C.jsx(z.Box,{w:20,h:20,style:{borderRadius:4,border:"1px solid var(--devdive-border-light)",backgroundColor:W}}),C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14,color:"var(--mantine-color-gray-5)"},children:"expand_more"})]})})})}),C.jsx(z.Popover.Dropdown,{p:"sm",miw:220,children:C.jsxs(z.Stack,{gap:"sm",children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",children:"배경 색상"}),C.jsx(Dx,{color:W,onChange:j=>S(j)}),C.jsx(z.Box,{pt:"sm",style:{borderTop:"1px solid var(--devdive-border-light)"},children:C.jsx(z.SimpleGrid,{cols:4,spacing:6,children:oe.map(j=>C.jsx(z.ActionIcon,{size:"sm",variant:"outline",color:"gray",onClick:()=>S(j),style:{backgroundColor:j,borderColor:"var(--devdive-border-light)"}},j))})}),C.jsx(z.Box,{pt:"sm",style:{borderTop:"1px solid var(--devdive-border-light)"},children:C.jsx(z.Button,{variant:"light",color:"gray",size:"xs",fullWidth:!0,leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"layers"}),onClick:()=>{w(W),N(!1)},children:"전체 슬라이드에 적용"})})]})})]}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Tooltip,{label:`스냅 ${T.enabled?"ON":"OFF"}`,children:C.jsx(z.ActionIcon,{variant:T.enabled?"light":"subtle",color:T.enabled?"devdive":"gray",size:"lg",radius:"lg",onClick:R,children:C.jsx("span",{className:"material-symbols-outlined",children:"grid_on"})})}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Tooltip,{label:"삭제",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"red",size:"lg",radius:"lg",onClick:L,disabled:!s,children:C.jsx("span",{className:"material-symbols-outlined",children:"delete"})})})]})})},Tw=Math.PI/180;function Rw(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const zl=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},Ye={_global:zl,version:"10.2.0",isBrowser:Rw(),isUnminified:/param/.test((function(t){}).toString()),dblClickWindow:400,getAngle(t){return Ye.angleDeg?t*Tw:t},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_renderBackend:"web",legacyTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return Ye.DD.isDragging},isTransforming(){var t,e;return(e=(t=Ye.Transformer)===null||t===void 0?void 0:t.isTransforming())!==null&&e!==void 0?e:!1},isDragReady(){return!!Ye.DD.node},releaseCanvasOnDestroy:!0,document:zl.document,_injectGlobal(t){typeof zl.Konva<"u"&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),zl.Konva=t}},Mn=t=>{Ye[t.prototype.getClassName()]=t};Ye._injectGlobal(Ye);const Dw=`Konva.js unsupported environment.
314
+ [키워드] 키워드1, 키워드2`,value:J,onChange:U=>q(U.currentTarget.value),minRows:8,maxRows:12,autosize:!0,styles:{input:{fontFamily:"monospace",fontSize:12}}}),ge&&C.jsx(z.Alert,{color:"red",variant:"light",children:ge}),W&&C.jsxs(z.Box,{children:[C.jsxs(z.Group,{gap:"xs",mb:"xs",children:[C.jsx(z.Text,{size:"sm",fw:500,children:"파싱된 슬라이드"}),C.jsxs(z.Badge,{color:"devdive",size:"sm",children:[W.length,"개"]})]}),C.jsx(z.ScrollArea,{h:150,children:C.jsx(z.Stack,{gap:"xs",children:W.map((U,G)=>C.jsxs(z.Paper,{p:"sm",radius:"md",withBorder:!0,style:{cursor:"pointer"},onClick:()=>L(G),children:[C.jsxs(z.Group,{justify:"space-between",children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.Text,{size:"xs",c:"dimmed",children:U.slideNumber}),C.jsx(z.Text,{size:"sm",fw:500,children:U.sectionTitle})]}),C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.Badge,{size:"xs",variant:"light",color:"gray",children:U.sectionType}),C.jsx(z.ActionIcon,{variant:"subtle",size:"xs",color:"gray",onClick:Z=>{Z.stopPropagation(),L(G)},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"edit"})})]})]}),U.keyPoints.length>0&&C.jsxs(z.Text,{size:"xs",c:"dimmed",mt:4,lineClamp:1,children:[U.keyPoints[0],"..."]})]},G))})})]})]})})]}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"컬러 테마"}),C.jsx(z.SimpleGrid,{cols:4,spacing:"xs",children:Object.keys(hs).map(U=>C.jsx(z.Paper,{p:"xs",radius:"md",withBorder:!0,style:{cursor:"pointer",borderColor:te===U?"var(--devdive-primary)":void 0,borderWidth:te===U?2:1},onClick:()=>le(U),children:C.jsxs(z.Group,{gap:4,children:[C.jsx(z.Box,{w:16,h:16,style:{borderRadius:"50%",backgroundColor:hs[U].primary}}),C.jsx(z.Text,{size:"xs",tt:"capitalize",children:U})]})},U))})]}),C.jsxs(z.Group,{justify:"flex-end",gap:"sm",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:ce,children:"취소"}),i==="ai"?C.jsxs(C.Fragment,{children:[c==="input"&&C.jsx(z.Button,{color:"devdive",onClick:K,loading:u||se,disabled:!y.trim()||u||se,leftSection:!u&&!se?C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"account_tree"}):void 0,children:u||se?"생성 중...":"구조 생성"}),c==="structure"&&C.jsx(z.Button,{color:"devdive",onClick:ve,loading:se,leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"auto_awesome"}),children:"콘텐츠 생성"}),c==="preview"&&I&&C.jsxs(z.Button,{color:"devdive",onClick:he,children:[I.length,"개 슬라이드 추가"]})]}):W?C.jsxs(z.Button,{color:"devdive",onClick:je,children:[W.length,"개 슬라이드 추가"]}):C.jsx(z.Button,{color:"devdive",onClick:lt,disabled:!J.trim(),leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"data_object"}),children:"데이터 파싱"})]})]})]}),W&&ae!==null&&C.jsx(rw,{isOpen:ae!==null,onClose:()=>L(null),slide:W[ae],slideIndex:ae,onSave:ut,onDelete:Rt})]})},ow=[{value:"realistic",label:"사실적"},{value:"illustration",label:"일러스트"},{value:"abstract",label:"추상"},{value:"3d",label:"3D"},{value:"minimalist",label:"미니멀"}],lw=[{value:"512x512",label:"512×512"},{value:"1024x1024",label:"1024×1024"}],cw=({isOpen:t,onClose:e,onBack:n})=>{const[i,s]=oe.useState(""),[c,d]=oe.useState("illustration"),[h,p]=oe.useState("512x512"),[u,A]=oe.useState(null),{generateImage:y,isLoading:x,error:S,reset:w}=mA(),{addElement:T}=Ve(),R=()=>`image-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,D=async()=>{if(i.trim())try{const I=await y({prompt:i.trim(),style:c,size:h});A(I.base64||I.imageUrl)}catch{}},N=()=>{if(!u)return;const[I,Y]=h.split("x").map(Number),J=Math.min(I,300),q=J/I*Y,W={id:R(),type:"image",src:u.startsWith("data:")?u:`data:image/png;base64,${u}`,x:480-J/2,y:270-q/2,width:J,height:q,rotation:0};T(W),M()},M=()=>{s(""),A(null),w(),e()},O=()=>{A(null),D()};return C.jsx(z.Modal,{opened:t,onClose:M,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:n,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20},children:"arrow_back"})}),C.jsx(z.Text,{fw:700,children:"이미지 생성"})]}),centered:!0,size:"md",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Textarea,{label:"이미지 설명",description:"생성하고 싶은 이미지를 자세히 설명해주세요",placeholder:"예: 미래 도시의 스카이라인, 푸른 하늘과 유리 건물",value:i,onChange:I=>s(I.currentTarget.value),minRows:3,autosize:!0}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"이미지 스타일"}),C.jsx(z.SegmentedControl,{value:c,onChange:I=>d(I),data:ow,fullWidth:!0,color:"devdive"})]}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"sm",fw:500,mb:"xs",children:"이미지 크기"}),C.jsx(z.SegmentedControl,{value:h,onChange:I=>p(I),data:lw,color:"devdive"})]}),S&&C.jsx(z.Alert,{color:"red",variant:"light",children:S}),x&&C.jsx(z.Paper,{p:"xl",radius:"md",withBorder:!0,bg:"gray.0",children:C.jsx(z.Center,{children:C.jsxs(z.Stack,{align:"center",gap:"md",children:[C.jsx(z.Loader,{color:"devdive",size:"lg"}),C.jsx(z.Text,{size:"sm",c:"dimmed",children:"이미지를 생성하고 있습니다..."})]})})}),u&&!x&&C.jsxs(z.Paper,{p:"md",radius:"md",withBorder:!0,bg:"gray.0",children:[C.jsxs(z.Group,{justify:"space-between",mb:"xs",children:[C.jsx(z.Text,{size:"sm",fw:500,c:"dimmed",children:"생성된 이미지"}),C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:O,loading:x,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"refresh"})})]}),C.jsx(z.Center,{children:C.jsx(z.Image,{src:u.startsWith("data:")?u:`data:image/png;base64,${u}`,alt:"Generated image",radius:"md",maw:300,fit:"contain"})})]}),C.jsxs(z.Group,{justify:"flex-end",gap:"sm",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:M,children:"취소"}),u?C.jsx(z.Button,{color:"devdive",onClick:N,children:"슬라이드에 추가"}):C.jsx(z.Button,{color:"devdive",onClick:D,loading:x,disabled:!i.trim(),leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"auto_awesome"}),children:"이미지 생성"})]})]})})},uw=[{type:"text",icon:"edit_note",title:"텍스트 생성",description:"AI로 슬라이드 텍스트를 자동 생성",color:"blue"},{type:"slide",icon:"auto_awesome_mosaic",title:"슬라이드 자동 생성",description:"주제를 입력하면 여러 슬라이드 구성",color:"violet"},{type:"image",icon:"image",title:"이미지 생성",description:"AI로 맞춤 이미지를 생성",color:"pink"},{type:"design",icon:"palette",title:"디자인 제안",description:"레이아웃과 색상을 자동 추천",color:"teal"}],dw=({isOpen:t,onClose:e})=>{const[n,i]=oe.useState(null),s=h=>{i(h)},c=()=>{i(null)},d=()=>{i(null),e()};return C.jsxs(C.Fragment,{children:[C.jsx(z.Modal,{opened:t&&!n,onClose:d,title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx(z.ThemeIcon,{variant:"gradient",gradient:{from:"#5B6EF7",to:"#3b82f6"},size:"md",radius:"md",children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"auto_awesome"})}),C.jsx(z.Text,{fw:700,children:"AI 생성"}),C.jsx(z.Badge,{variant:"light",color:"devdive",size:"sm",children:"Beta"})]}),centered:!0,size:"lg",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsx(z.Text,{size:"sm",c:"dimmed",children:"AI를 활용하여 프레젠테이션을 더 빠르고 쉽게 만들어보세요."}),C.jsx(z.SimpleGrid,{cols:2,spacing:"md",children:uw.map(h=>C.jsx(z.Card,{padding:"lg",radius:"md",withBorder:!0,style:{cursor:"pointer",transition:"all 0.2s ease"},onClick:()=>s(h.type),onMouseEnter:p=>{p.currentTarget.style.borderColor="var(--devdive-primary)",p.currentTarget.style.transform="translateY(-2px)",p.currentTarget.style.boxShadow="0 4px 12px rgba(91, 110, 247, 0.15)"},onMouseLeave:p=>{p.currentTarget.style.borderColor="",p.currentTarget.style.transform="",p.currentTarget.style.boxShadow=""},children:C.jsxs(z.Group,{gap:"md",children:[C.jsx(z.ThemeIcon,{variant:"light",color:h.color,size:"xl",radius:"md",children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:24},children:h.icon})}),C.jsxs("div",{children:[C.jsx(z.Text,{fw:600,size:"sm",children:h.title}),C.jsx(z.Text,{size:"xs",c:"dimmed",mt:4,children:h.description})]})]})},h.type))})]})}),C.jsx(tw,{isOpen:n==="text",onClose:c,onBack:c}),C.jsx(sw,{isOpen:n==="slide",onClose:c,onBack:c}),C.jsx(cw,{isOpen:n==="image",onClose:c,onBack:c})]})},Cx=()=>{const[t,e]=oe.useState("Untitled Presentation"),[n,i]=oe.useState(!1),[s,c]=oe.useState(!1),[d,h]=oe.useState(!1),[p,u]=oe.useState("new"),[A,y]=oe.useState(!1),[x,S]=oe.useState(!1),w=Ve(W=>W.slides),T=Ve(W=>W.defaultBackground),R=Ve(W=>W.resetPresentation),D=Ve(W=>W.loadSlides),N=oe.useRef(null),M=oe.useRef(null),O=async()=>{if(!n){i(!0);try{await yx(w,t.replace(/\s+/g,"_"))}catch(W){console.error("PPTX 생성 실패:",W)}finally{i(!1)}}},I=()=>{const W={version:1,title:t,slides:w,defaultBackground:T,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},V=new Blob([JSON.stringify(W,null,2)],{type:"application/json"}),ge=URL.createObjectURL(V),X=document.createElement("a");X.href=ge,X.download=`${t.replace(/\s+/g,"_")}.ddslide`,document.body.appendChild(X),X.click(),document.body.removeChild(X),URL.revokeObjectURL(ge)},Y=W=>{var X;const V=(X=W.target.files)==null?void 0:X[0];if(!V)return;const ge=new FileReader;ge.onload=ae=>{var L;try{const te=(L=ae.target)==null?void 0:L.result,le=JSON.parse(te);if(!le.slides||!Array.isArray(le.slides))throw new Error("Invalid file format");D(le.slides,le.defaultBackground),le.title&&e(le.title)}catch(te){console.error("파일 불러오기 실패:",te),alert("파일을 불러올 수 없습니다. 올바른 .ddslide 파일인지 확인해주세요.")}},ge.readAsText(V),W.target.value=""},J=async W=>{var ge;const V=(ge=W.target.files)==null?void 0:ge[0];if(!(!V||s)){c(!0);try{const X=await xx(V);D(X);const ae=V.name.replace(/\.pptx$/i,"");e(ae)}catch(X){console.error("PPTX 불러오기 실패:",X),alert("PPTX 파일을 불러올 수 없습니다.")}finally{c(!1),W.target.value=""}}},q=()=>{R(),e("Untitled Presentation"),S(!1)};return C.jsxs(z.Box,{component:"header",h:56,px:"md",bg:"white",style:{borderBottom:"1px solid var(--devdive-border-light)",zIndex:20,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)"},children:[C.jsxs(z.Group,{h:"100%",justify:"space-between",children:[C.jsxs(z.Group,{gap:"md",children:[C.jsx(z.Box,{w:32,h:32,bg:"var(--devdive-primary)",style:{borderRadius:"var(--mantine-radius-md)",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 6px rgba(91, 110, 247, 0.2)"},children:C.jsx("span",{className:"material-symbols-outlined",style:{color:"white",fontSize:20},children:"auto_awesome"})}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"xs",fw:700,c:"dimmed",tt:"uppercase",lts:"-0.05em",children:"Presentation"}),C.jsx(z.TextInput,{value:t,onChange:W=>e(W.currentTarget.value),placeholder:"제목을 입력하세요",variant:"unstyled",size:"sm",w:192,styles:{input:{fontWeight:600,letterSpacing:"-0.01em",padding:0,height:"auto",minHeight:"auto"}}})]})]}),C.jsxs(z.Group,{gap:"sm",children:[C.jsxs(z.Menu,{shadow:"md",width:180,position:"bottom-start",children:[C.jsx(z.Menu.Target,{children:C.jsx(z.Button,{variant:"subtle",color:"gray",size:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"folder"}),children:"파일"})}),C.jsxs(z.Menu.Dropdown,{children:[C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"note_add"}),onClick:()=>S(!0),children:"새로 만들기"}),C.jsx(z.Menu.Divider,{}),C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"save"}),onClick:I,children:"저장 (.ddslide)"}),C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"folder_open"}),onClick:()=>{var W;return(W=N.current)==null?void 0:W.click()},children:"불러오기 (.ddslide)"}),C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"upload_file"}),onClick:()=>{var W;return(W=M.current)==null?void 0:W.click()},disabled:s,children:s?"PPTX 불러오는 중...":"PPTX 불러오기"}),C.jsx(z.Menu.Divider,{}),C.jsx(z.Menu.Item,{leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"download"}),onClick:O,disabled:n,children:"PPTX 내보내기"})]})]}),C.jsx("input",{ref:N,type:"file",accept:".ddslide,.json",style:{display:"none"},onChange:Y}),C.jsx("input",{ref:M,type:"file",accept:".pptx",style:{display:"none"},onChange:J}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Button,{variant:"subtle",color:"gray",size:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"dashboard"}),onClick:()=>{u("apply"),h(!0)},children:"템플릿"}),C.jsx(z.Button,{variant:"light",color:"devdive",size:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"add"}),onClick:()=>{u("new"),h(!0)},children:"새 슬라이드"}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Button,{variant:"gradient",gradient:{from:"#5B6EF7",to:"#3b82f6"},size:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"auto_awesome"}),onClick:()=>y(!0),children:"AI 생성"}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Button,{color:"devdive",size:"xs",fw:700,leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"download"}),onClick:O,loading:n,style:{boxShadow:"0 4px 6px rgba(91, 110, 247, 0.2)"},children:n?"Exporting...":"EXPORT"})]})]}),C.jsx(bx,{isOpen:d,onClose:()=>h(!1),mode:p}),C.jsx(dw,{isOpen:A,onClose:()=>y(!1)}),C.jsx(z.Modal,{opened:x,onClose:()=>S(!1),title:C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20,color:"#f59e0b"},children:"warning"}),C.jsx(z.Text,{fw:700,children:"새 프레젠테이션"})]}),centered:!0,size:"sm",children:C.jsxs(z.Stack,{gap:"md",children:[C.jsxs(z.Text,{size:"sm",c:"dimmed",children:["현재 작업 중인 프레젠테이션이 삭제됩니다.",C.jsx("br",{}),"저장하지 않은 변경사항은 복구할 수 없습니다."]}),C.jsxs(z.Group,{justify:"flex-end",children:[C.jsx(z.Button,{variant:"subtle",color:"gray",onClick:()=>S(!1),children:"취소"}),C.jsx(z.Button,{color:"red",onClick:q,children:"새로 만들기"})]})]})})]})};function gA(){return(gA=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _x(t,e){if(t==null)return{};var n,i,s={},c=Object.keys(t);for(i=0;i<c.length;i++)e.indexOf(n=c[i])>=0||(s[n]=t[n]);return s}function Tg(t){var e=oe.useRef(t),n=oe.useRef(function(i){e.current&&e.current(i)});return e.current=t,n.current}var Lf=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},wf=function(t){return"touches"in t},Rg=function(t){return t&&t.ownerDocument.defaultView||self},l2=function(t,e,n){var i=t.getBoundingClientRect(),s=wf(e)?(function(c,d){for(var h=0;h<c.length;h++)if(c[h].identifier===d)return c[h];return c[0]})(e.touches,n):e;return{left:Lf((s.pageX-(i.left+Rg(t).pageXOffset))/i.width),top:Lf((s.pageY-(i.top+Rg(t).pageYOffset))/i.height)}},c2=function(t){!wf(t)&&t.preventDefault()},Ex=oe.memo(function(t){var e=t.onMove,n=t.onKey,i=_x(t,["onMove","onKey"]),s=oe.useRef(null),c=Tg(e),d=Tg(n),h=oe.useRef(null),p=oe.useRef(!1),u=oe.useMemo(function(){var S=function(R){c2(R),(wf(R)?R.touches.length>0:R.buttons>0)&&s.current?c(l2(s.current,R,h.current)):T(!1)},w=function(){return T(!1)};function T(R){var D=p.current,N=Rg(s.current),M=R?N.addEventListener:N.removeEventListener;M(D?"touchmove":"mousemove",S),M(D?"touchend":"mouseup",w)}return[function(R){var D=R.nativeEvent,N=s.current;if(N&&(c2(D),!(function(O,I){return I&&!wf(O)})(D,p.current)&&N)){if(wf(D)){p.current=!0;var M=D.changedTouches||[];M.length&&(h.current=M[0].identifier)}N.focus(),c(l2(N,D,h.current)),T(!0)}},function(R){var D=R.which||R.keyCode;D<37||D>40||(R.preventDefault(),d({left:D===39?.05:D===37?-.05:0,top:D===40?.05:D===38?-.05:0}))},T]},[d,c]),A=u[0],y=u[1],x=u[2];return oe.useEffect(function(){return x},[x]),oe.createElement("div",gA({},i,{onTouchStart:A,onMouseDown:A,className:"react-colorful__interactive",ref:s,onKeyDown:y,tabIndex:0,role:"slider"}))}),Jg=function(t){return t.filter(Boolean).join(" ")},Tx=function(t){var e=t.color,n=t.left,i=t.top,s=i===void 0?.5:i,c=Jg(["react-colorful__pointer",t.className]);return oe.createElement("div",{className:c,style:{top:100*s+"%",left:100*n+"%"}},oe.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},Br=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},fw=function(t){return gw(Dg(t))},Dg=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Br(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?Br(parseInt(t.substring(6,8),16)/255,2):1}},hw=function(t){return mw(Aw(t))},pw=function(t){var e=t.s,n=t.v,i=t.a,s=(200-e)*n/100;return{h:Br(t.h),s:Br(s>0&&s<200?e*n/100/(s<=100?s:200-s)*100:0),l:Br(s/2),a:Br(i,2)}},Lg=function(t){var e=pw(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Aw=function(t){var e=t.h,n=t.s,i=t.v,s=t.a;e=e/360*6,n/=100,i/=100;var c=Math.floor(e),d=i*(1-n),h=i*(1-(e-c)*n),p=i*(1-(1-e+c)*n),u=c%6;return{r:Br(255*[i,h,d,d,p,i][u]),g:Br(255*[p,i,i,h,d,d][u]),b:Br(255*[d,d,p,i,i,h][u]),a:Br(s,2)}},Ip=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},mw=function(t){var e=t.r,n=t.g,i=t.b,s=t.a,c=s<1?Ip(Br(255*s)):"";return"#"+Ip(e)+Ip(n)+Ip(i)+c},gw=function(t){var e=t.r,n=t.g,i=t.b,s=t.a,c=Math.max(e,n,i),d=c-Math.min(e,n,i),h=d?c===e?(n-i)/d:c===n?2+(i-e)/d:4+(e-n)/d:0;return{h:Br(60*(h<0?h+6:h)),s:Br(c?d/c*100:0),v:Br(c/255*100),a:s}},vw=oe.memo(function(t){var e=t.hue,n=t.onChange,i=Jg(["react-colorful__hue",t.className]);return oe.createElement("div",{className:i},oe.createElement(Ex,{onMove:function(s){n({h:360*s.left})},onKey:function(s){n({h:Lf(e+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":Br(e),"aria-valuemax":"360","aria-valuemin":"0"},oe.createElement(Tx,{className:"react-colorful__hue-pointer",left:e/360,color:Lg({h:e,s:100,v:100,a:1})})))}),yw=oe.memo(function(t){var e=t.hsva,n=t.onChange,i={backgroundColor:Lg({h:e.h,s:100,v:100,a:1})};return oe.createElement("div",{className:"react-colorful__saturation",style:i},oe.createElement(Ex,{onMove:function(s){n({s:100*s.left,v:100-100*s.top})},onKey:function(s){n({s:Lf(e.s+100*s.left,0,100),v:Lf(e.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Br(e.s)+"%, Brightness "+Br(e.v)+"%"},oe.createElement(Tx,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Lg(e)})))}),Rx=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},xw=function(t,e){return t.toLowerCase()===e.toLowerCase()||Rx(Dg(t),Dg(e))};function bw(t,e,n){var i=Tg(n),s=oe.useState(function(){return t.toHsva(e)}),c=s[0],d=s[1],h=oe.useRef({color:e,hsva:c});oe.useEffect(function(){if(!t.equal(e,h.current.color)){var u=t.toHsva(e);h.current={hsva:u,color:e},d(u)}},[e,t]),oe.useEffect(function(){var u;Rx(c,h.current.hsva)||t.equal(u=t.fromHsva(c),h.current.color)||(h.current={hsva:c,color:u},i(u))},[c,t,i]);var p=oe.useCallback(function(u){d(function(A){return Object.assign({},A,u)})},[]);return[c,p]}var Sw=typeof window<"u"?oe.useLayoutEffect:oe.useEffect,ww=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},u2=new Map,Cw=function(t){Sw(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!u2.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,u2.set(e,n);var i=ww();i&&n.setAttribute("nonce",i),e.head.appendChild(n)}},[])},_w=function(t){var e=t.className,n=t.colorModel,i=t.color,s=i===void 0?n.defaultColor:i,c=t.onChange,d=_x(t,["className","colorModel","color","onChange"]),h=oe.useRef(null);Cw(h);var p=bw(n,s,c),u=p[0],A=p[1],y=Jg(["react-colorful",e]);return oe.createElement("div",gA({},d,{ref:h,className:y}),oe.createElement(yw,{hsva:u,onChange:A}),oe.createElement(vw,{hue:u.h,onChange:A,className:"react-colorful__last-control"}))},Ew={defaultColor:"000",toHsva:fw,fromHsva:function(t){return hw({h:t.h,s:t.s,v:t.v,a:1})},equal:xw},Dx=function(t){return oe.createElement(_w,gA({},t,{colorModel:Ew}))};const Lx=()=>{var ie;const t=Ve(j=>j.mode),e=Ve(j=>j.currentShapeType),n=Ve(j=>j.currentTextStyle),i=Ve(j=>j.currentFontFamily),s=Ve(j=>j.selectedElementId),c=Ve(j=>j.slides),d=Ve(j=>j.currentSlideIndex),h=Ve(j=>j.setMode),p=Ve(j=>j.setShapeType),u=Ve(j=>j.setTextStyle),A=Ve(j=>j.setFontFamily),y=Ve(j=>j.deleteElement),x=Ve(j=>j.addElement),S=Ve(j=>j.updateSlideBackground),w=Ve(j=>j.updateAllSlidesBackground),T=Ve(j=>j.snapSettings),R=Ve(j=>j.toggleSnap),[D,N]=oe.useState(!1),M=oe.useRef(null),O=oe.useRef(null),[I,Y]=oe.useState({x:0,y:0}),[J,q]=oe.useState({isDragging:!1,startX:0,startY:0,offsetX:0,offsetY:0}),W=((ie=c[d])==null?void 0:ie.background)||"#ffffff",V=oe.useCallback(j=>{const K=j.target;K.closest("button")||K.closest('[role="button"]')||K.closest("input")||K.closest("[data-mantine-popover]")||(j.preventDefault(),q({isDragging:!0,startX:j.clientX,startY:j.clientY,offsetX:I.x,offsetY:I.y}))},[I]);oe.useEffect(()=>{if(!J.isDragging)return;const j=ve=>{const xe=ve.clientX-J.startX,Re=ve.clientY-J.startY;let Fe=J.offsetX+xe,pt=J.offsetY+Re;if(O.current){const lt=O.current.getBoundingClientRect(),ut=window.innerWidth,Rt=window.innerHeight,je=lt.width,St=lt.height,he=ut/2,k=24,ce=8,ue=-he+je/2+ce,U=he-je/2-ce;Fe=Math.max(ue,Math.min(U,Fe));const G=-k+ce,Z=Rt-k-St-ce;pt=Math.max(G,Math.min(Z,pt))}Y({x:Fe,y:pt})},K=()=>{q(ve=>({...ve,isDragging:!1}))};return document.addEventListener("mousemove",j),document.addEventListener("mouseup",K),()=>{document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",K)}},[J.isDragging,J.startX,J.startY,J.offsetX,J.offsetY]);const ge=j=>{h(j)},X=j=>{p(j),h("shape")},ae=j=>{u(j),h("text")},L=()=>{s&&y(s)},te=j=>{var xe;const K=(xe=j.target.files)==null?void 0:xe[0];if(!K)return;const ve=new FileReader;ve.onload=Re=>{var lt;const Fe=(lt=Re.target)==null?void 0:lt.result,pt=new window.Image;pt.onload=()=>{let je=pt.width,St=pt.height;je>400&&(St=400/je*St,je=400),St>300&&(je=300/St*je,St=300);const he={id:Pr(),type:"image",x:100,y:100,width:je,height:St,rotation:0,src:Fe};x(he)},pt.src=Fe},ve.readAsDataURL(K),j.target.value=""},le=()=>{const j={id:Pr(),type:"shape",x:100,y:100,width:300,height:200,rotation:0,shapeType:"rect",fill:"#5B6EF720",stroke:"#5B6EF7",strokeWidth:2,text:"클릭하여 이미지 추가",textColor:"#5B6EF7",textSize:16,cornerRadius:12,isImagePlaceholder:!0};x(j),h("select")},Ae={title:"제목",subtitle:"소제목",body:"본문",caption:"캡션"},ne={rect:{label:"사각형",icon:"rectangle"},ellipse:{label:"원형",icon:"circle"},triangle:{label:"삼각형",icon:"change_history"},line:{label:"선",icon:"horizontal_rule"},arrow:{label:"화살표",icon:"arrow_forward"}},se=["#ffffff","#f8fafc","#f1f5f9","#e2e8f0","#1e293b","#0f172a","#5B6EF7","#3b82f6","#ef4444","#22c55e","#f97316","#8b5cf6"];return C.jsx(z.Box,{ref:O,pos:"absolute",top:24,left:"50%",style:{transform:`translate(calc(-50% + ${I.x}px), ${I.y}px)`,zIndex:30,cursor:J.isDragging?"grabbing":"default"},children:C.jsxs(z.Group,{gap:4,px:"sm",py:10,bg:"white",wrap:"nowrap",onMouseDown:V,style:{border:"1px solid var(--devdive-border-light)",borderRadius:"var(--mantine-radius-xl)",boxShadow:"0 8px 30px rgb(0, 0, 0, 0.08)",userSelect:"none",whiteSpace:"nowrap"},children:[C.jsx(z.Tooltip,{label:"드래그하여 이동",children:C.jsx(z.Box,{style:{cursor:"grab",display:"flex",alignItems:"center",padding:"0 4px"},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16,color:"var(--mantine-color-gray-5)"},children:"drag_indicator"})})}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Tooltip,{label:"선택 도구",children:C.jsx(z.ActionIcon,{variant:t==="select"?"light":"subtle",color:t==="select"?"devdive":"gray",size:"lg",radius:"lg",onClick:()=>ge("select"),children:C.jsx("span",{className:"material-symbols-outlined",children:"arrow_selector_tool"})})}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsxs(z.Menu,{shadow:"md",radius:"lg",children:[C.jsx(z.Menu.Target,{children:C.jsx(z.Button,{variant:t==="text"?"light":"subtle",color:t==="text"?"devdive":"gray",size:"xs",radius:"lg",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"title"}),rightSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"expand_more"}),children:Ae[n]})}),C.jsx(z.Menu.Dropdown,{children:Object.keys(Du).map(j=>C.jsx(z.Menu.Item,{onClick:()=>ae(j),rightSection:n===j?C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"check"}):null,style:{backgroundColor:n===j?"rgba(91, 110, 247, 0.05)":void 0,color:n===j?"var(--devdive-primary)":void 0},children:C.jsx("span",{style:{fontSize:Math.max(14,Math.min(Du[j].fontSize/2,18)),fontWeight:Du[j].fontWeight},children:Ae[j]})},j))})]}),C.jsx(z.Select,{value:i,onChange:j=>j&&A(j),data:z6.map(j=>({value:j.value,label:j.name})),size:"xs",w:100,variant:"unstyled",styles:{input:{fontWeight:500,cursor:"pointer"}}}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx("input",{ref:M,type:"file",accept:"image/*",onChange:te,style:{display:"none"}}),C.jsxs(z.Menu,{shadow:"md",radius:"lg",children:[C.jsx(z.Menu.Target,{children:C.jsx(z.Button,{variant:t==="shape"?"light":"subtle",color:t==="shape"?"devdive":"gray",size:"xs",radius:"lg",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:ne[e].icon}),rightSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"expand_more"}),children:ne[e].label})}),C.jsxs(z.Menu.Dropdown,{children:[Object.keys(ne).map(j=>C.jsx(z.Menu.Item,{onClick:()=>X(j),leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:ne[j].icon}),rightSection:e===j?C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"check"}):null,style:{backgroundColor:e===j?"rgba(91, 110, 247, 0.05)":void 0,color:e===j?"var(--devdive-primary)":void 0},children:ne[j].label},j)),C.jsx(z.Menu.Divider,{}),C.jsx(z.Menu.Item,{onClick:le,leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"image"}),children:"이미지"})]})]}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsxs(z.Popover,{opened:D,onChange:N,position:"bottom-end",radius:"lg",shadow:"xl",children:[C.jsx(z.Popover.Target,{children:C.jsx(z.Tooltip,{label:"배경 색상",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"lg",radius:"lg",onClick:()=>N(!D),children:C.jsxs(z.Group,{gap:4,children:[C.jsx(z.Box,{w:20,h:20,style:{borderRadius:4,border:"1px solid var(--devdive-border-light)",backgroundColor:W}}),C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14,color:"var(--mantine-color-gray-5)"},children:"expand_more"})]})})})}),C.jsx(z.Popover.Dropdown,{p:"sm",miw:220,children:C.jsxs(z.Stack,{gap:"sm",children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",children:"배경 색상"}),C.jsx(Dx,{color:W,onChange:j=>S(j)}),C.jsx(z.Box,{pt:"sm",style:{borderTop:"1px solid var(--devdive-border-light)"},children:C.jsx(z.SimpleGrid,{cols:4,spacing:6,children:se.map(j=>C.jsx(z.ActionIcon,{size:"sm",variant:"outline",color:"gray",onClick:()=>S(j),style:{backgroundColor:j,borderColor:"var(--devdive-border-light)"}},j))})}),C.jsx(z.Box,{pt:"sm",style:{borderTop:"1px solid var(--devdive-border-light)"},children:C.jsx(z.Button,{variant:"light",color:"gray",size:"xs",fullWidth:!0,leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"layers"}),onClick:()=>{w(W),N(!1)},children:"전체 슬라이드에 적용"})})]})})]}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Tooltip,{label:`스냅 ${T.enabled?"ON":"OFF"}`,children:C.jsx(z.ActionIcon,{variant:T.enabled?"light":"subtle",color:T.enabled?"devdive":"gray",size:"lg",radius:"lg",onClick:R,children:C.jsx("span",{className:"material-symbols-outlined",children:"grid_on"})})}),C.jsx(z.Divider,{orientation:"vertical",h:24,my:"auto"}),C.jsx(z.Tooltip,{label:"삭제",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"red",size:"lg",radius:"lg",onClick:L,disabled:!s,children:C.jsx("span",{className:"material-symbols-outlined",children:"delete"})})})]})})},Tw=Math.PI/180;function Rw(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const zl=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},Ye={_global:zl,version:"10.2.0",isBrowser:Rw(),isUnminified:/param/.test((function(t){}).toString()),dblClickWindow:400,getAngle(t){return Ye.angleDeg?t*Tw:t},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_renderBackend:"web",legacyTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return Ye.DD.isDragging},isTransforming(){var t,e;return(e=(t=Ye.Transformer)===null||t===void 0?void 0:t.isTransforming())!==null&&e!==void 0?e:!1},isDragReady(){return!!Ye.DD.node},releaseCanvasOnDestroy:!0,document:zl.document,_injectGlobal(t){typeof zl.Konva<"u"&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),zl.Konva=t}},Mn=t=>{Ye[t.prototype.getClassName()]=t};Ye._injectGlobal(Ye);const Dw=`Konva.js unsupported environment.
315
315
 
316
316
  Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined.
317
317
 
@@ -324,8 +324,8 @@ or
324
324
 
325
325
  bash: npm install skia-canvas
326
326
  js: import "konva/skia-backend";
327
- `,d2=()=>{if(typeof document>"u")throw new Error(Dw)};class Va{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Va(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){const n=this.m;return{x:n[0]*e.x+n[2]*e.y+n[4],y:n[1]*e.x+n[3]*e.y+n[5]}}translate(e,n){return this.m[4]+=this.m[0]*e+this.m[2]*n,this.m[5]+=this.m[1]*e+this.m[3]*n,this}scale(e,n){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=n,this.m[3]*=n,this}rotate(e){const n=Math.cos(e),i=Math.sin(e),s=this.m[0]*n+this.m[2]*i,c=this.m[1]*n+this.m[3]*i,d=this.m[0]*-i+this.m[2]*n,h=this.m[1]*-i+this.m[3]*n;return this.m[0]=s,this.m[1]=c,this.m[2]=d,this.m[3]=h,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,n){const i=this.m[0]+this.m[2]*n,s=this.m[1]+this.m[3]*n,c=this.m[2]+this.m[0]*e,d=this.m[3]+this.m[1]*e;return this.m[0]=i,this.m[1]=s,this.m[2]=c,this.m[3]=d,this}multiply(e){const n=this.m[0]*e.m[0]+this.m[2]*e.m[1],i=this.m[1]*e.m[0]+this.m[3]*e.m[1],s=this.m[0]*e.m[2]+this.m[2]*e.m[3],c=this.m[1]*e.m[2]+this.m[3]*e.m[3],d=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],h=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=n,this.m[1]=i,this.m[2]=s,this.m[3]=c,this.m[4]=d,this.m[5]=h,this}invert(){const e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*e,i=-this.m[1]*e,s=-this.m[2]*e,c=this.m[0]*e,d=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),h=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=i,this.m[2]=s,this.m[3]=c,this.m[4]=d,this.m[5]=h,this}getMatrix(){return this.m}decompose(){const e=this.m[0],n=this.m[1],i=this.m[2],s=this.m[3],c=this.m[4],d=this.m[5],h=e*s-n*i,p={x:c,y:d,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||n!=0){const u=Math.sqrt(e*e+n*n);p.rotation=n>0?Math.acos(e/u):-Math.acos(e/u),p.scaleX=u,p.scaleY=h/u,p.skewX=(e*i+n*s)/h,p.skewY=0}else if(i!=0||s!=0){const u=Math.sqrt(i*i+s*s);p.rotation=Math.PI/2-(s>0?Math.acos(-i/u):-Math.acos(i/u)),p.scaleX=h/u,p.scaleY=u,p.skewX=0,p.skewY=(e*i+n*s)/h}return p.rotation=pe._getRotation(p.rotation),p}}const Lw="[object Array]",kw="[object Number]",Nw="[object String]",Pw="[object Boolean]",Bw=Math.PI/180,Mw=180/Math.PI,lf="#",zw="",Fw="0",Iw="Konva warning: ",f2="Konva error: ",Ow="rgb(",rg={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Uw=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let Op=[],cf=null;const jw=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(t){setTimeout(t,16)},pe={_isElement(t){return!!(t&&t.nodeType==1)},_isFunction(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isPlainObject(t){return!!t&&t.constructor===Object},_isArray(t){return Object.prototype.toString.call(t)===Lw},_isNumber(t){return Object.prototype.toString.call(t)===kw&&!isNaN(t)&&isFinite(t)},_isString(t){return Object.prototype.toString.call(t)===Nw},_isBoolean(t){return Object.prototype.toString.call(t)===Pw},isObject(t){return t instanceof Object},isValidSelector(t){if(typeof t!="string")return!1;const e=t[0];return e==="#"||e==="."||e===e.toUpperCase()},_sign(t){return t===0||t>0?1:-1},requestAnimFrame(t){Op.push(t),Op.length===1&&jw(function(){const e=Op;Op=[],e.forEach(function(n){n()})})},createCanvasElement(){d2();const t=document.createElement("canvas");try{t.style=t.style||{}}catch{}return t},createImageElement(){return d2(),document.createElement("img")},_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,e){const n=pe.createImageElement();n.onload=function(){e(n)},n.src=t},_rgbToHex(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb(t){t=t.replace(lf,zw);const e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:e&255}},getRandomColor(){let t=(Math.random()*16777215<<0).toString(16);for(;t.length<6;)t=Fw+t;return lf+t},isCanvasFarblingActive(){if(cf!==null)return cf;if(typeof document>"u")return cf=!1,!1;const t=this.createCanvasElement();t.width=10,t.height=10;const e=t.getContext("2d",{willReadFrequently:!0});e.clearRect(0,0,10,10),e.fillStyle="#282828",e.fillRect(0,0,10,10);const n=e.getImageData(0,0,10,10).data;let i=!1;for(let s=0;s<100;s++)if(n[s*4]!==40||n[s*4+1]!==40||n[s*4+2]!==40||n[s*4+3]!==255){i=!0;break}return cf=i,this.releaseCanvas(t),cf},getHitColor(){const t=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(t):t},getHitColorKey(t,e,n){return this.isCanvasFarblingActive()&&(t=Math.round(t/5)*5,e=Math.round(e/5)*5,n=Math.round(n/5)*5),lf+this._rgbToHex(t,e,n)},getSnappedHexColor(t){const e=this._hexToRgb(t);return lf+this._rgbToHex(Math.round(e.r/5)*5,Math.round(e.g/5)*5,Math.round(e.b/5)*5)},getRGB(t){let e;return t in rg?(e=rg[t],{r:e[0],g:e[1],b:e[2]}):t[0]===lf?this._hexToRgb(t.substring(1)):t.substr(0,4)===Ow?(e=Uw.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA(t){return t=t||"black",pe._namedColorToRBA(t)||pe._hex3ColorToRGBA(t)||pe._hex4ColorToRGBA(t)||pe._hex6ColorToRGBA(t)||pe._hex8ColorToRGBA(t)||pe._rgbColorToRGBA(t)||pe._rgbaColorToRGBA(t)||pe._hslColorToRGBA(t)},_namedColorToRBA(t){const e=rg[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(t.indexOf("rgb(")===0){t=t.match(/rgb\(([^)]+)\)/)[1];const e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(t.indexOf("rgba(")===0){t=t.match(/rgba\(([^)]+)\)/)[1];const e=t.split(/ *, */).map((n,i)=>n.slice(-1)==="%"?i===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex8ColorToRGBA(t){if(t[0]==="#"&&t.length===9)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:parseInt(t.slice(7,9),16)/255}},_hex6ColorToRGBA(t){if(t[0]==="#"&&t.length===7)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex4ColorToRGBA(t){if(t[0]==="#"&&t.length===5)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:parseInt(t[4]+t[4],16)/255}},_hex3ColorToRGBA(t){if(t[0]==="#"&&t.length===4)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){const[e,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),i=Number(n[0])/360,s=Number(n[1])/100,c=Number(n[2])/100;let d,h,p;if(s===0)return p=c*255,{r:Math.round(p),g:Math.round(p),b:Math.round(p),a:1};c<.5?d=c*(1+s):d=c+s-c*s;const u=2*c-d,A=[0,0,0];for(let y=0;y<3;y++)h=i+1/3*-(y-1),h<0&&h++,h>1&&h--,6*h<1?p=u+(d-u)*6*h:2*h<1?p=d:3*h<2?p=u+(d-u)*(2/3-h)*6:p=u,A[y]=p*255;return{r:Math.round(A[0]),g:Math.round(A[1]),b:Math.round(A[2]),a:1}}},haveIntersection(t,e){return!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y)},cloneObject(t){const e={};for(const n in t)this._isPlainObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray(t){return t.slice(0)},degToRad(t){return t*Bw},radToDeg(t){return t*Mw},_degToRad(t){return pe.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),pe.degToRad(t)},_radToDeg(t){return pe.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),pe.radToDeg(t)},_getRotation(t){return Ye.angleDeg?pe.radToDeg(t):t},_capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)},throw(t){throw new Error(f2+t)},error(t){console.error(f2+t)},warn(t){Ye.showWarnings&&console.warn(Iw+t)},each(t,e){for(const n in t)e(n,t[n])},_inRange(t,e,n){return e<=t&&t<n},_getProjectionToSegment(t,e,n,i,s,c){let d,h,p;const u=(t-n)*(t-n)+(e-i)*(e-i);if(u==0)d=t,h=e,p=(s-n)*(s-n)+(c-i)*(c-i);else{const A=((s-t)*(n-t)+(c-e)*(i-e))/u;A<0?(d=t,h=e,p=(t-s)*(t-s)+(e-c)*(e-c)):A>1?(d=n,h=i,p=(n-s)*(n-s)+(i-c)*(i-c)):(d=t+A*(n-t),h=e+A*(i-e),p=(d-s)*(d-s)+(h-c)*(h-c))}return[d,h,p]},_getProjectionToLine(t,e,n){const i=pe.cloneObject(t);let s=Number.MAX_VALUE;return e.forEach(function(c,d){if(!n&&d===e.length-1)return;const h=e[(d+1)%e.length],p=pe._getProjectionToSegment(c.x,c.y,h.x,h.y,t.x,t.y),u=p[0],A=p[1],y=p[2];y<s&&(i.x=u,i.y=A,s=y)}),i},_prepareArrayForTween(t,e,n){const i=[],s=[];if(t.length>e.length){const d=e;e=t,t=d}for(let d=0;d<t.length;d+=2)i.push({x:t[d],y:t[d+1]});for(let d=0;d<e.length;d+=2)s.push({x:e[d],y:e[d+1]});const c=[];return s.forEach(function(d){const h=pe._getProjectionToLine(d,i,n);c.push(h.x),c.push(h.y)}),c},_prepareToStringify(t){let e;t.visitedByCircularReferenceRemoval=!0;for(const n in t)if(t.hasOwnProperty(n)&&t[n]&&typeof t[n]=="object"){if(e=Object.getOwnPropertyDescriptor(t,n),t[n].visitedByCircularReferenceRemoval||pe._isElement(t[n]))if(e.configurable)delete t[n];else return null;else if(pe._prepareToStringify(t[n])===null)if(e.configurable)delete t[n];else return null}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(const n in e)t[n]=e[n];return t},_getFirstPointerId(t){return t.touches?t.changedTouches[0].identifier:t.pointerId||999},releaseCanvas(...t){Ye.releaseCanvasOnDestroy&&t.forEach(e=>{e.width=0,e.height=0})},drawRoundedRectPath(t,e,n,i){let s=e<0?e:0,c=n<0?n:0;e=Math.abs(e),n=Math.abs(n);let d=0,h=0,p=0,u=0;typeof i=="number"?d=h=p=u=Math.min(i,e/2,n/2):(d=Math.min(i[0]||0,e/2,n/2),h=Math.min(i[1]||0,e/2,n/2),u=Math.min(i[2]||0,e/2,n/2),p=Math.min(i[3]||0,e/2,n/2)),t.moveTo(s+d,c),t.lineTo(s+e-h,c),t.arc(s+e-h,c+h,h,Math.PI*3/2,0,!1),t.lineTo(s+e,c+n-u),t.arc(s+e-u,c+n-u,u,0,Math.PI/2,!1),t.lineTo(s+p,c+n),t.arc(s+p,c+n-p,p,Math.PI/2,Math.PI,!1),t.lineTo(s,c+d),t.arc(s+d,c+d,d,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(t,e,n,i,s){i=Math.abs(i);for(let c=0;c<n;c++){const d=e[(c-1+n)%n],h=e[c],p=e[(c+1)%n],u={x:h.x-d.x,y:h.y-d.y},A={x:p.x-h.x,y:p.y-h.y},y=Math.hypot(u.x,u.y),x=Math.hypot(A.x,A.y);let S;typeof s=="number"?S=s:S=c<s.length?s[c]:0,S=i*Math.cos(Math.PI/n)*Math.min(1,S/i*2);const T={x:u.x/y,y:u.y/y},R={x:A.x/x,y:A.y/x},D={x:h.x-T.x*S,y:h.y-T.y*S},N={x:h.x+R.x*S,y:h.y+R.y*S};c===0?t.moveTo(D.x,D.y):t.lineTo(D.x,D.y),t.arcTo(h.x,h.y,N.x,N.y,S)}}};function Gw(t){const e=[],n=t.length,i=pe;for(let s=0;s<n;s++){let c=t[s];i._isNumber(c)?c=Math.round(c*1e3)/1e3:i._isString(c)||(c=c+""),e.push(c)}return e}const h2=",",Hw="(",Xw=")",Ww="([",Qw="])",Yw=";",Vw="()",qw="=",p2=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Kw=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],Jw=100;let Up=null;function A2(){if(Up!==null)return Up;try{const e=pe.createCanvasElement().getContext("2d");return e?!!e&&"filter"in e:(Up=!1,!1)}catch{return Up=!1,!1}}class vA{constructor(e){this.canvas=e,Ye.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,n){let i=this.traceArr,s=i.length,c="",d,h,p,u;for(d=0;d<s;d++)h=i[d],p=h.method,p?(u=h.args,c+=p,e?c+=Vw:pe._isArray(u[0])?c+=Ww+u.join(h2)+Qw:(n&&(u=u.map(A=>typeof A=="number"?Math.floor(A):A)),c+=Hw+u.join(h2)+Xw)):(c+=h.property,e||(c+=qw+h.val)),c+=Yw;return c}clearTrace(){this.traceArr=[]}_trace(e){let n=this.traceArr,i;n.push(e),i=n.length,i>=Jw&&n.shift()}reset(){const e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){const n=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(e){const n=e.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(e){const n=e.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(e){const n=e.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}_applyMiterLimit(e){const n=e.attrs.miterLimit;n!=null&&this.setAttr("miterLimit",n)}setAttr(e,n){this._context[e]=n}arc(e,n,i,s,c,d){this._context.arc(e,n,i,s,c,d)}arcTo(e,n,i,s,c){this._context.arcTo(e,n,i,s,c)}beginPath(){this._context.beginPath()}bezierCurveTo(e,n,i,s,c,d){this._context.bezierCurveTo(e,n,i,s,c,d)}clearRect(e,n,i,s){this._context.clearRect(e,n,i,s)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,n){const i=arguments;if(i.length===2)return this._context.createImageData(e,n);if(i.length===1)return this._context.createImageData(e)}createLinearGradient(e,n,i,s){return this._context.createLinearGradient(e,n,i,s)}createPattern(e,n){return this._context.createPattern(e,n)}createRadialGradient(e,n,i,s,c,d){return this._context.createRadialGradient(e,n,i,s,c,d)}drawImage(e,n,i,s,c,d,h,p,u){const A=arguments,y=this._context;A.length===3?y.drawImage(e,n,i):A.length===5?y.drawImage(e,n,i,s,c):A.length===9&&y.drawImage(e,n,i,s,c,d,h,p,u)}ellipse(e,n,i,s,c,d,h,p){this._context.ellipse(e,n,i,s,c,d,h,p)}isPointInPath(e,n,i,s){return i?this._context.isPointInPath(i,e,n,s):this._context.isPointInPath(e,n,s)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,n,i,s){this._context.fillRect(e,n,i,s)}strokeRect(e,n,i,s){this._context.strokeRect(e,n,i,s)}fillText(e,n,i,s){s?this._context.fillText(e,n,i,s):this._context.fillText(e,n,i)}measureText(e){return this._context.measureText(e)}getImageData(e,n,i,s){return this._context.getImageData(e,n,i,s)}lineTo(e,n){this._context.lineTo(e,n)}moveTo(e,n){this._context.moveTo(e,n)}rect(e,n,i,s){this._context.rect(e,n,i,s)}roundRect(e,n,i,s,c){this._context.roundRect(e,n,i,s,c)}putImageData(e,n,i){this._context.putImageData(e,n,i)}quadraticCurveTo(e,n,i,s){this._context.quadraticCurveTo(e,n,i,s)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,n){this._context.scale(e,n)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,n,i,s,c,d){this._context.setTransform(e,n,i,s,c,d)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,n,i,s){this._context.strokeText(e,n,i,s)}transform(e,n,i,s,c,d){this._context.transform(e,n,i,s,c,d)}translate(e,n){this._context.translate(e,n)}_enableTrace(){let e=this,n=p2.length,i=this.setAttr,s,c;const d=function(h){let p=e[h],u;e[h]=function(){return c=Gw(Array.prototype.slice.call(arguments,0)),u=p.apply(e,arguments),e._trace({method:h,args:c}),u}};for(s=0;s<n;s++)d(p2[s]);e.setAttr=function(){i.apply(e,arguments);const h=arguments[0];let p=arguments[1];(h==="shadowOffsetX"||h==="shadowOffsetY"||h==="shadowBlur")&&(p=p/this.canvas.getPixelRatio()),e._trace({property:h,val:p})}}_applyGlobalCompositeOperation(e){const n=e.attrs.globalCompositeOperation;!n||n==="source-over"||this.setAttr("globalCompositeOperation",n)}}Kw.forEach(function(t){Object.defineProperty(vA.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class Zw extends vA{constructor(e,{willReadFrequently:n=!1}={}){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:n})}_fillColor(e){const n=e.fill();this.setAttr("fillStyle",n),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){const n=e._getLinearGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fillRadialGradient(e){const n=e._getRadialGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fill(e){const n=e.fill(),i=e.getFillPriority();if(n&&i==="color"){this._fillColor(e);return}const s=e.getFillPatternImage();if(s&&i==="pattern"){this._fillPattern(e);return}const c=e.getFillLinearGradientColorStops();if(c&&i==="linear-gradient"){this._fillLinearGradient(e);return}const d=e.getFillRadialGradientColorStops();if(d&&i==="radial-gradient"){this._fillRadialGradient(e);return}n?this._fillColor(e):s?this._fillPattern(e):c?this._fillLinearGradient(e):d&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const n=e.getStrokeLinearGradientStartPoint(),i=e.getStrokeLinearGradientEndPoint(),s=e.getStrokeLinearGradientColorStops(),c=this.createLinearGradient(n.x,n.y,i.x,i.y);if(s){for(let d=0;d<s.length;d+=2)c.addColorStop(s[d],s[d+1]);this.setAttr("strokeStyle",c)}}_stroke(e){const n=e.dash(),i=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!i){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(e),n&&e.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),i||this.restore()}}_applyShadow(e){var n,i,s;const c=(n=e.getShadowRGBA())!==null&&n!==void 0?n:"black",d=(i=e.getShadowBlur())!==null&&i!==void 0?i:5,h=(s=e.getShadowOffset())!==null&&s!==void 0?s:{x:0,y:0},p=e.getAbsoluteScale(),u=this.canvas.getPixelRatio(),A=p.x*u,y=p.y*u;this.setAttr("shadowColor",c),this.setAttr("shadowBlur",d*Math.min(Math.abs(A),Math.abs(y))),this.setAttr("shadowOffsetX",h.x*A),this.setAttr("shadowOffsetY",h.y*y)}}class $w extends vA{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){const n=e.getStrokeScaleEnabled();if(!n){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(e);const i=e.hitStrokeWidth(),s=i==="auto"?e.strokeWidth():i;this.setAttr("lineWidth",s),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),n||this.restore()}}}let jp;function eC(){if(jp)return jp;const t=pe.createCanvasElement(),e=t.getContext("2d");return jp=(function(){const n=Ye._global.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return n/i})(),pe.releaseCanvas(t),jp}class Zg{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const i=(e||{}).pixelRatio||Ye.pixelRatio||eC();this.pixelRatio=i,this._canvas=pe.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){const n=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";const n=this.pixelRatio;this.getContext()._context.scale(n,n)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";const n=this.pixelRatio;this.getContext()._context.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,n){this.setWidth(e||0),this.setHeight(n||0)}toDataURL(e,n){try{return this._canvas.toDataURL(e,n)}catch{try{return this._canvas.toDataURL()}catch(s){return pe.error("Unable to get data URL. "+s.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class jo extends Zg{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new Zw(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}}class $g extends Zg{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new $w(this),this.setSize(e.width,e.height)}}const on={get isDragging(){let t=!1;return on._dragElements.forEach(e=>{e.dragStatus==="dragging"&&(t=!0)}),t},justDragged:!1,get node(){let t;return on._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){const e=[];on._dragElements.forEach((n,i)=>{const{node:s}=n,c=s.getStage();c.setPointersPositions(t),n.pointerId===void 0&&(n.pointerId=pe._getFirstPointerId(t));const d=c._changedPointerPositions.find(h=>h.id===n.pointerId);if(d){if(n.dragStatus!=="dragging"){const h=s.dragDistance();if(Math.max(Math.abs(d.x-n.startPointerPos.x),Math.abs(d.y-n.startPointerPos.y))<h||(s.startDrag({evt:t}),!s.isDragging()))return}s._setDragPosition(t,n),e.push(s)}}),e.forEach(n=>{n.fire("dragmove",{type:"dragmove",target:n,evt:t},!0)})},_endDragBefore(t){const e=[];on._dragElements.forEach(n=>{const{node:i}=n,s=i.getStage();if(t&&s.setPointersPositions(t),!s._changedPointerPositions.find(h=>h.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(on.justDragged=!0,Ye._mouseListenClick=!1,Ye._touchListenClick=!1,Ye._pointerListenClick=!1,n.dragStatus="stopped");const d=n.node.getLayer()||n.node instanceof Ye.Stage&&n.node;d&&e.indexOf(d)===-1&&e.push(d)}),e.forEach(n=>{n.draw()})},_endDragAfter(t){on._dragElements.forEach((e,n)=>{e.dragStatus==="stopped"&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),e.dragStatus!=="dragging"&&on._dragElements.delete(n)})}};Ye.isBrowser&&(window.addEventListener("mouseup",on._endDragBefore,!0),window.addEventListener("touchend",on._endDragBefore,!0),window.addEventListener("touchcancel",on._endDragBefore,!0),window.addEventListener("mousemove",on._drag),window.addEventListener("touchmove",on._drag),window.addEventListener("mouseup",on._endDragAfter,!1),window.addEventListener("touchend",on._endDragAfter,!1),window.addEventListener("touchcancel",on._endDragAfter,!1));function Xo(t){return pe._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||pe._isBoolean(t)?t:Object.prototype.toString.call(t)}function kx(t){return t>255?255:t<0?0:Math.round(t)}function We(){if(Ye.isUnminified)return function(t,e){return pe._isNumber(t)||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function yA(t){if(Ye.isUnminified)return function(e,n){let i=pe._isNumber(e),s=pe._isArray(e)&&e.length==t;return!i&&!s&&pe.warn(Xo(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}}function ev(){if(Ye.isUnminified)return function(t,e){return pe._isNumber(t)||t==="auto"||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function Ol(){if(Ye.isUnminified)return function(t,e){return pe._isString(t)||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function Nx(){if(Ye.isUnminified)return function(t,e){const n=pe._isString(t),i=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return n||i||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function tC(){if(Ye.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(pe._isArray(t)?t.forEach(function(i){pe._isNumber(i)||pe.warn('"'+e+'" attribute has non numeric element '+i+". Make sure that all elements are numbers.")}):pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function Fi(){if(Ye.isUnminified)return function(t,e){return t===!0||t===!1||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function nC(t){if(Ye.isUnminified)return function(e,n){return e==null||pe.isObject(e)||pe.warn(Xo(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}const uf="get",df="set",ee={addGetterSetter(t,e,n,i,s){ee.addGetter(t,e,n),ee.addSetter(t,e,i,s),ee.addOverloadedGetterSetter(t,e)},addGetter(t,e,n){const i=uf+pe._capitalize(e);t.prototype[i]=t.prototype[i]||function(){const s=this.attrs[e];return s===void 0?n:s}},addSetter(t,e,n,i){const s=df+pe._capitalize(e);t.prototype[s]||ee.overWriteSetter(t,e,n,i)},overWriteSetter(t,e,n,i){const s=df+pe._capitalize(e);t.prototype[s]=function(c){return n&&c!==void 0&&c!==null&&(c=n.call(this,c,e)),this._setAttr(e,c),i&&i.call(this),this}},addComponentsGetterSetter(t,e,n,i,s){const c=n.length,d=pe._capitalize,h=uf+d(e),p=df+d(e);t.prototype[h]=function(){const A={};for(let y=0;y<c;y++){const x=n[y];A[x]=this.getAttr(e+d(x))}return A};const u=nC(n);t.prototype[p]=function(A){const y=this.attrs[e];i&&(A=i.call(this,A,e)),u&&u.call(this,A,e);for(const x in A)A.hasOwnProperty(x)&&this._setAttr(e+d(x),A[x]);return A||n.forEach(x=>{this._setAttr(e+d(x),void 0)}),this._fireChangeEvent(e,y,A),s&&s.call(this),this},ee.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){const n=pe._capitalize(e),i=df+n,s=uf+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[s]()}},addDeprecatedGetterSetter(t,e,n,i){pe.error("Adding deprecated "+e);const s=uf+pe._capitalize(e),c=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[s]=function(){pe.error(c);const d=this.attrs[e];return d===void 0?n:d},ee.addSetter(t,e,i,function(){pe.error(c)}),ee.addOverloadedGetterSetter(t,e)},backCompat(t,e){pe.each(e,function(n,i){const s=t.prototype[i],c=uf+pe._capitalize(n),d=df+pe._capitalize(n);function h(){s.apply(this,arguments),pe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+i+'" instead.')}t.prototype[n]=h,t.prototype[c]=h,t.prototype[d]=h})},afterSetFilter(){this._filterUpToDate=!1}};function rC(t){const e=/(\w+)\(([^)]+)\)/g;let n;for(;(n=e.exec(t))!==null;){const[,i,s]=n;switch(i){case"blur":{const c=parseFloat(s.replace("px",""));return function(d){this.blurRadius(c*.5);const h=Ye.Filters;h&&h.Blur&&h.Blur.call(this,d)}}case"brightness":{const c=s.includes("%")?parseFloat(s)/100:parseFloat(s);return function(d){this.brightness(c);const h=Ye.Filters;h&&h.Brightness&&h.Brightness.call(this,d)}}case"contrast":{const c=parseFloat(s);return function(d){const h=100*(Math.sqrt(c)-1);this.contrast(h);const p=Ye.Filters;p&&p.Contrast&&p.Contrast.call(this,d)}}case"grayscale":return function(c){const d=Ye.Filters;d&&d.Grayscale&&d.Grayscale.call(this,c)};case"sepia":return function(c){const d=Ye.Filters;d&&d.Sepia&&d.Sepia.call(this,c)};case"invert":return function(c){const d=Ye.Filters;d&&d.Invert&&d.Invert.call(this,c)};default:pe.warn(`CSS filter "${i}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const aA="absoluteOpacity",m2="allEventListeners",qs="absoluteTransform",g2="absoluteScale",Pl="canvas",aC="Change",iC="children",sC="konva",kg="listening",oC="mouseenter",lC="mouseleave",cC="pointerenter",uC="pointerleave",dC="touchenter",fC="touchleave",v2="set",y2="Shape",iA=" ",x2="stage",Fo="transform",hC="Stage",Ng="visible",pC=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(iA);let AC=1;class He{constructor(e){this._id=AC++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===Fo||e===qs)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,n){let i=this._cache.get(e);return(i===void 0||(e===Fo||e===qs)&&i.dirty===!0)&&(i=n.call(this),this._cache.set(e,i)),i}_calculate(e,n,i){if(!this._attachedDepsListeners.get(e)){const s=n.map(c=>c+"Change.konva").join(iA);this.on(s,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,i)}_getCanvasCache(){return this._cache.get(Pl)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===qs&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Pl)){const{scene:e,filter:n,hit:i}=this._cache.get(Pl);pe.releaseCanvas(e._canvas,n._canvas,i._canvas),this._cache.delete(Pl)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){const n=e||{};let i={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(i=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let s=Math.ceil(n.width||i.width),c=Math.ceil(n.height||i.height),d=n.pixelRatio,h=n.x===void 0?Math.floor(i.x):n.x,p=n.y===void 0?Math.floor(i.y):n.y,u=n.offset||0,A=n.drawBorder||!1,y=n.hitCanvasPixelRatio||1;if(!s||!c){pe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const x=Math.abs(Math.round(i.x)-h)>.5?1:0,S=Math.abs(Math.round(i.y)-p)>.5?1:0;s+=u*2+x,c+=u*2+S,h-=u,p-=u;const w=new jo({pixelRatio:d,width:s,height:c}),T=new jo({pixelRatio:d,width:0,height:0,willReadFrequently:!0}),R=new $g({pixelRatio:y,width:s,height:c}),D=w.getContext(),N=R.getContext(),M=new jo({width:w.width/w.pixelRatio+Math.abs(h),height:w.height/w.pixelRatio+Math.abs(p),pixelRatio:w.pixelRatio}),O=M.getContext();return R.isCache=!0,w.isCache=!0,this._cache.delete(Pl),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(w.getContext()._context.imageSmoothingEnabled=!1,T.getContext()._context.imageSmoothingEnabled=!1),D.save(),N.save(),O.save(),D.translate(-h,-p),N.translate(-h,-p),O.translate(-h,-p),M.x=h,M.y=p,this._isUnderCache=!0,this._clearSelfAndDescendantCache(aA),this._clearSelfAndDescendantCache(g2),this.drawScene(w,this,M),this.drawHit(R,this),this._isUnderCache=!1,D.restore(),N.restore(),A&&(D.save(),D.beginPath(),D.rect(0,0,s,c),D.closePath(),D.setAttr("strokeStyle","red"),D.setAttr("lineWidth",5),D.stroke(),D.restore()),pe.releaseCanvas(M._canvas),this._cache.set(Pl,{scene:w,filter:T,hit:R,x:h,y:p}),this._requestDraw(),this}isCached(){return this._cache.has(Pl)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,n){const i=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}];let s=1/0,c=1/0,d=-1/0,h=-1/0;const p=this.getAbsoluteTransform(n);return i.forEach(function(u){const A=p.point(u);s===void 0&&(s=d=A.x,c=h=A.y),s=Math.min(s,A.x),c=Math.min(c,A.y),d=Math.max(d,A.x),h=Math.max(h,A.y)}),{x:s,y:c,width:d-s,height:h-c}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();e.translate(n.x,n.y);const i=this._getCachedSceneCanvas(),s=i.pixelRatio;e.drawImage(i._canvas,0,0,i.width/s,i.height/s),e.restore()}_drawCachedHitCanvas(e){const n=this._getCanvasCache(),i=n.hit;e.save(),e.translate(n.x,n.y),e.drawImage(i._canvas,0,0,i.width/i.pixelRatio,i.height/i.pixelRatio),e.restore()}_getCachedSceneCanvas(){let e=this.filters(),n=this._getCanvasCache(),i=n.scene,s=n.filter,c=s.getContext(),d,h,p,u;if(!e||e.length===0)return i;if(this._filterUpToDate)return s;let A=!0;for(let x=0;x<e.length;x++)if(typeof e[x]=="string"&&A2(),typeof e[x]!="string"||!A2()){A=!1;break}const y=i.pixelRatio;if(s.setSize(i.width/i.pixelRatio,i.height/i.pixelRatio),A){const x=e.join(" ");return c.save(),c.setAttr("filter",x),c.drawImage(i._canvas,0,0,i.getWidth()/y,i.getHeight()/y),c.restore(),this._filterUpToDate=!0,s}try{for(d=e.length,c.clear(),c.drawImage(i._canvas,0,0,i.getWidth()/y,i.getHeight()/y),h=c.getImageData(0,0,s.getWidth(),s.getHeight()),p=0;p<d;p++)u=e[p],typeof u=="string"&&(u=rC(u)),u.call(this,h),c.putImageData(h,0,0)}catch(x){pe.error("Unable to apply filter. "+x.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,s}on(e,n){if(this._cache&&this._cache.delete(m2),arguments.length===3)return this._delegate.apply(this,arguments);const i=e.split(iA);for(let s=0;s<i.length;s++){const d=i[s].split("."),h=d[0],p=d[1]||"";this.eventListeners[h]||(this.eventListeners[h]=[]),this.eventListeners[h].push({name:p,handler:n})}return this}off(e,n){let i=(e||"").split(iA),s=i.length,c,d,h,p,u,A;if(this._cache&&this._cache.delete(m2),!e)for(d in this.eventListeners)this._off(d);for(c=0;c<s;c++)if(h=i[c],p=h.split("."),u=p[0],A=p[1],u)this.eventListeners[u]&&this._off(u,A,n);else for(d in this.eventListeners)this._off(d,A,n);return this}dispatchEvent(e){const n={target:this,type:e.type,evt:e};return this.fire(e.type,n),this}addEventListener(e,n){return this.on(e,function(i){n.call(this,i.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,n,i){const s=this;this.on(e,function(c){const d=c.target.findAncestors(n,!0,s);for(let h=0;h<d.length;h++)c=pe.cloneObject(c),c.currentTarget=d[h],i.call(d[h],c)})}remove(){return this.isDragging()&&this.stopDrag(),on._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(qs),this._clearSelfAndDescendantCache(aA),this._clearSelfAndDescendantCache(g2),this._clearSelfAndDescendantCache(x2),this._clearSelfAndDescendantCache(Ng),this._clearSelfAndDescendantCache(kg)}_remove(){this._clearCaches();const e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(e){const n="get"+pe._capitalize(e);return pe._isFunction(this[n])?this[n]():this.attrs[e]}getAncestors(){let e=this.getParent(),n=[];for(;e;)n.push(e),e=e.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{let n,i;if(!e)return this;for(n in e)n!==iC&&(i=v2+pe._capitalize(n),pe._isFunction(this[i])?this[i](e[n]):this._setAttr(n,e[n]))}),this}isListening(){return this._getCache(kg,this._isListening)}_isListening(e){if(!this.listening())return!1;const i=this.getParent();return i&&i!==e&&this!==e?i._isListening(e):!0}isVisible(){return this._getCache(Ng,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const i=this.getParent();return i&&i!==e&&this!==e?i._isVisible(e):!0}shouldDrawHit(e,n=!1){if(e)return this._isVisible(e)&&this._isListening(e);const i=this.getLayer();let s=!1;on._dragElements.forEach(d=>{d.dragStatus==="dragging"&&(d.node.nodeType==="Stage"||d.node.getLayer()===i)&&(s=!0)});const c=!n&&!Ye.hitOnDragEnabled&&(s||Ye.isTransforming());return this.isListening()&&this.isVisible()&&!c}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let e=this.getDepth(),n=this,i=0,s,c,d,h;function p(A){for(s=[],c=A.length,d=0;d<c;d++)h=A[d],i++,h.nodeType!==y2&&(s=s.concat(h.getChildren().slice())),h._id===n._id&&(d=c);s.length>0&&s[0].getDepth()<=e&&p(s)}const u=this.getStage();return n.nodeType!==hC&&u&&p(u.getChildren()),i}getDepth(){let e=0,n=this.parent;for(;n;)e++,n=n.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Fo),this._clearSelfAndDescendantCache(qs)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;const n=e.getPointerPosition();if(!n)return null;const i=this.getAbsoluteTransform().copy();return i.invert(),i.point(n)}getAbsolutePosition(e){let n=!1,i=this.parent;for(;i;){if(i.isCached()){n=!0;break}i=i.parent}n&&!e&&(e=!0);const s=this.getAbsoluteTransform(e).getMatrix(),c=new Va,d=this.offset();return c.m=s.slice(),c.translate(d.x,d.y),c.getTranslation()}setAbsolutePosition(e){const{x:n,y:i,...s}=this._clearTransform();this.attrs.x=n,this.attrs.y=i,this._clearCache(Fo);const c=this._getAbsoluteTransform().copy();return c.invert(),c.translate(e.x,e.y),e={x:this.attrs.x+c.getTranslation().x,y:this.attrs.y+c.getTranslation().y},this._setTransform(s),this.setPosition({x:e.x,y:e.y}),this._clearCache(Fo),this._clearSelfAndDescendantCache(qs),this}_setTransform(e){let n;for(n in e)this.attrs[n]=e[n]}_clearTransform(){const e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){let n=e.x,i=e.y,s=this.x(),c=this.y();return n!==void 0&&(s+=n),i!==void 0&&(c+=i),this.setPosition({x:s,y:c}),this}_eachAncestorReverse(e,n){let i=[],s=this.getParent(),c,d;if(!(n&&n._id===this._id)){for(i.unshift(this);s&&(!n||s._id!==n._id);)i.unshift(s),s=s.parent;for(c=i.length,d=0;d<c;d++)e(i[d])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return pe.warn("Node has no parent. moveToTop function is ignored."),!1;const e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return pe.warn("Node has no parent. moveUp function is ignored."),!1;const e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return pe.warn("Node has no parent. moveDown function is ignored."),!1;const e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return pe.warn("Node has no parent. moveToBottom function is ignored."),!1;const e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return pe.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&pe.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(aA,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let e=this.opacity();const n=this.getParent();return n&&!n._isUnderCache&&(e*=n.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){let e=this.getAttrs(),n,i,s,c,d;const h={attrs:{},className:this.getClassName()};for(n in e)i=e[n],d=pe.isObject(i)&&!pe._isPlainObject(i)&&!pe._isArray(i),!d&&(s=typeof this[n]=="function"&&this[n],delete e[n],c=s?s.call(this):null,e[n]=i,c!==i&&(h.attrs[n]=i));return pe._prepareToStringify(h)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,n,i){const s=[];n&&this._isMatch(e)&&s.push(this);let c=this.parent;for(;c;){if(c===i)return s;c._isMatch(e)&&s.push(c),c=c.parent}return s}isAncestorOf(e){return!1}findAncestor(e,n,i){return this.findAncestors(e,n,i)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);let n=e.replace(/ /g,"").split(","),i=n.length,s,c;for(s=0;s<i;s++)if(c=n[s],pe.isValidSelector(c)||(pe.warn('Selector "'+c+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),pe.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),pe.warn("Konva is awesome, right?")),c.charAt(0)==="#"){if(this.id()===c.slice(1))return!0}else if(c.charAt(0)==="."){if(this.hasName(c.slice(1)))return!0}else if(this.className===c||this.nodeType===c)return!0;return!1}getLayer(){const e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(x2,this._getStage)}_getStage(){const e=this.getParent();return e?e.getStage():null}fire(e,n={},i){return n.target=n.target||this,i?this._fireAndBubble(e,n):this._fire(e,n),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(qs,this._getAbsoluteTransform)}_getAbsoluteTransform(e){let n;if(e)return n=new Va,this._eachAncestorReverse(function(i){const s=i.transformsEnabled();s==="all"?n.multiply(i.getTransform()):s==="position"&&n.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},e),n;{n=this._cache.get(qs)||new Va,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();const i=this.transformsEnabled();if(i==="all")n.multiply(this.getTransform());else if(i==="position"){const s=this.attrs.x||0,c=this.attrs.y||0,d=this.attrs.offsetX||0,h=this.attrs.offsetY||0;n.translate(s-d,c-h)}return n.dirty=!1,n}}getAbsoluteScale(e){let n=this;for(;n;)n._isUnderCache&&(e=n),n=n.getParent();const s=this.getAbsoluteTransform(e).decompose();return{x:s.scaleX,y:s.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Fo,this._getTransform)}_getTransform(){var e,n;const i=this._cache.get(Fo)||new Va;i.reset();const s=this.x(),c=this.y(),d=Ye.getAngle(this.rotation()),h=(e=this.attrs.scaleX)!==null&&e!==void 0?e:1,p=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,A=this.attrs.skewY||0,y=this.attrs.offsetX||0,x=this.attrs.offsetY||0;return(s!==0||c!==0)&&i.translate(s,c),d!==0&&i.rotate(d),(u!==0||A!==0)&&i.skew(u,A),(h!==1||p!==1)&&i.scale(h,p),(y!==0||x!==0)&&i.translate(-1*y,-1*x),i.dirty=!1,i}clone(e){let n=pe.cloneObject(this.attrs),i,s,c,d,h;for(i in e)n[i]=e[i];const p=new this.constructor(n);for(i in this.eventListeners)for(s=this.eventListeners[i],c=s.length,d=0;d<c;d++)h=s[d],h.name.indexOf(sC)<0&&(p.eventListeners[i]||(p.eventListeners[i]=[]),p.eventListeners[i].push(h));return p}_toKonvaCanvas(e){e=e||{};const n=this.getClientRect(),i=this.getStage(),s=e.x!==void 0?e.x:Math.floor(n.x),c=e.y!==void 0?e.y:Math.floor(n.y),d=e.pixelRatio||1,h=new jo({width:e.width||Math.ceil(n.width)||(i?i.width():0),height:e.height||Math.ceil(n.height)||(i?i.height():0),pixelRatio:d}),p=h.getContext(),u=new jo({width:h.width/h.pixelRatio+Math.abs(s),height:h.height/h.pixelRatio+Math.abs(c),pixelRatio:h.pixelRatio});return e.imageSmoothingEnabled===!1&&(p._context.imageSmoothingEnabled=!1),p.save(),(s||c)&&p.translate(-1*s,-1*c),this.drawScene(h,void 0,u),p.restore(),h}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e=e||{};const n=e.mimeType||null,i=e.quality||null,s=this._toKonvaCanvas(e).toDataURL(n,i);return e.callback&&e.callback(s),s}toImage(e){return new Promise((n,i)=>{try{const s=e==null?void 0:e.callback;s&&delete e.callback,pe._urlToImage(this.toDataURL(e),function(c){n(c),s==null||s(c)})}catch(s){i(s)}})}toBlob(e){return new Promise((n,i)=>{try{const s=e==null?void 0:e.callback;s&&delete e.callback,this.toCanvas(e).toBlob(c=>{n(c),s==null||s(c)},e==null?void 0:e.mimeType,e==null?void 0:e.quality)}catch(s){i(s)}})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Ye.dragDistance}_off(e,n,i){let s=this.eventListeners[e],c,d,h;for(c=0;c<s.length;c++)if(d=s[c].name,h=s[c].handler,(d!=="konva"||n==="konva")&&(!n||d===n)&&(!i||i===h)){if(s.splice(c,1),s.length===0){delete this.eventListeners[e];break}c--}}_fireChangeEvent(e,n,i){this._fire(e+aC,{oldVal:n,newVal:i})}addName(e){if(!this.hasName(e)){const n=this.name(),i=n?n+" "+e:e;this.name(i)}return this}hasName(e){if(!e)return!1;const n=this.name();return n?(n||"").split(/\s/g).indexOf(e)!==-1:!1}removeName(e){const n=(this.name()||"").split(/\s/g),i=n.indexOf(e);return i!==-1&&(n.splice(i,1),this.name(n.join(" "))),this}setAttr(e,n){const i=this[v2+pe._capitalize(e)];return pe._isFunction(i)?i.call(this,n):this._setAttr(e,n),this}_requestDraw(){if(Ye.autoDrawEnabled){const e=this.getLayer()||this.getStage();e==null||e.batchDraw()}}_setAttr(e,n){const i=this.attrs[e];i===n&&!pe.isObject(n)||(n==null?delete this.attrs[e]:this.attrs[e]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(e,i,n),this._requestDraw())}_setComponentAttr(e,n,i){let s;i!==void 0&&(s=this.attrs[e],s||(this.attrs[e]=this.getAttr(e)),this.attrs[e][n]=i,this._fireChangeEvent(e,s,i))}_fireAndBubble(e,n,i){n&&this.nodeType===y2&&(n.target=this);const s=[oC,lC,cC,uC,dC,fC];if(!(s.indexOf(e)!==-1&&(i&&(this===i||this.isAncestorOf&&this.isAncestorOf(i))||this.nodeType==="Stage"&&!i))){this._fire(e,n);const d=s.indexOf(e)!==-1&&i&&i.isAncestorOf&&i.isAncestorOf(this)&&!i.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!d&&(i&&i.parent?this._fireAndBubble.call(this.parent,e,n,i):this._fireAndBubble.call(this.parent,e,n))}}_getProtoListeners(e){var n,i;const{nodeType:s}=this,c=He.protoListenerMap.get(s)||{};let d=c==null?void 0:c[e];if(d===void 0){d=[];let h=Object.getPrototypeOf(this);for(;h;){const p=(i=(n=h.eventListeners)===null||n===void 0?void 0:n[e])!==null&&i!==void 0?i:[];d.push(...p),h=Object.getPrototypeOf(h)}c[e]=d,He.protoListenerMap.set(s,c)}return d}_fire(e,n){n=n||{},n.currentTarget=this,n.type=e;const i=this._getProtoListeners(e);if(i)for(let c=0;c<i.length;c++)i[c].handler.call(this,n);const s=this.eventListeners[e];if(s)for(let c=0;c<s.length;c++)s[c].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){const n=e?e.pointerId:void 0,i=this.getStage(),s=this.getAbsolutePosition();if(!i)return;const c=i._getPointerById(n)||i._changedPointerPositions[0]||s;on._dragElements.set(this._id,{node:this,startPointerPos:c,offset:{x:c.x-s.x,y:c.y-s.y},dragStatus:"ready",pointerId:n})}startDrag(e,n=!0){on._dragElements.has(this._id)||this._createDragElement(e);const i=on._dragElements.get(this._id);i.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},n)}_setDragPosition(e,n){const i=this.getStage()._getPointerById(n.pointerId);if(!i)return;let s={x:i.x-n.offset.x,y:i.y-n.offset.y};const c=this.dragBoundFunc();if(c!==void 0){const d=c.call(this,s,e);d?s=d:pe.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==s.x||this._lastPos.y!==s.y)&&(this.setAbsolutePosition(s),this._requestDraw()),this._lastPos=s}stopDrag(e){const n=on._dragElements.get(this._id);n&&(n.dragStatus="stopped"),on._endDragBefore(e),on._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=on._dragElements.get(this._id);return e?e.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(e){if(!(!(e.evt.button!==void 0)||Ye.dragButtons.indexOf(e.evt.button)>=0)||this.isDragging())return;let s=!1;on._dragElements.forEach(c=>{this.isAncestorOf(c.node)&&(s=!0)}),s||this._createDragElement(e)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const n=on._dragElements.get(this._id),i=n&&n.dragStatus==="dragging",s=n&&n.dragStatus==="ready";i?this.stopDrag():s&&on._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const n=this.getStage();if(!n)return!1;const i={x:-e.x,y:-e.y,width:n.width()+2*e.x,height:n.height()+2*e.y};return pe.haveIntersection(i,this.getClientRect())}static create(e,n){return pe._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)}static _createNode(e,n){let i=He.prototype.getClassName.call(e),s=e.children,c,d,h;n&&(e.attrs.container=n),Ye[i]||(pe.warn('Can not find a node with class name "'+i+'". Fallback to "Shape".'),i="Shape");const p=Ye[i];if(c=new p(e.attrs),s)for(d=s.length,h=0;h<d;h++)c.add(He._createNode(s[h]));return c}}He.protoListenerMap=new Map;He.prototype.nodeType="Node";He.prototype._attrsAffectingSize=[];He.prototype.eventListeners={};He.prototype.on.call(He.prototype,pC,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Fo),this._clearSelfAndDescendantCache(qs)});He.prototype.on.call(He.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Ng)});He.prototype.on.call(He.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(kg)});He.prototype.on.call(He.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(aA)});const xn=ee.addGetterSetter;xn(He,"zIndex");xn(He,"absolutePosition");xn(He,"position");xn(He,"x",0,We());xn(He,"y",0,We());xn(He,"globalCompositeOperation","source-over",Ol());xn(He,"opacity",1,We());xn(He,"name","",Ol());xn(He,"id","",Ol());xn(He,"rotation",0,We());ee.addComponentsGetterSetter(He,"scale",["x","y"]);xn(He,"scaleX",1,We());xn(He,"scaleY",1,We());ee.addComponentsGetterSetter(He,"skew",["x","y"]);xn(He,"skewX",0,We());xn(He,"skewY",0,We());ee.addComponentsGetterSetter(He,"offset",["x","y"]);xn(He,"offsetX",0,We());xn(He,"offsetY",0,We());xn(He,"dragDistance",void 0,We());xn(He,"width",0,We());xn(He,"height",0,We());xn(He,"listening",!0,Fi());xn(He,"preventDefault",!0,Fi());xn(He,"filters",void 0,function(t){return this._filterUpToDate=!1,t});xn(He,"visible",!0,Fi());xn(He,"transformsEnabled","all",Ol());xn(He,"size");xn(He,"dragBoundFunc");xn(He,"draggable",!1,Fi());ee.backCompat(He,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class qa extends He{constructor(){super(...arguments),this.children=[]}getChildren(e){const n=this.children||[];return e?n.filter(e):n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(let i=0;i<e.length;i++)this.add(e[i]);return this}const n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){const n=this._generalFind(e,!0);return n.length>0?n[0]:void 0}_generalFind(e,n){const i=[];return this._descendants(s=>{const c=s._isMatch(e);return c&&i.push(s),!!(c&&n)}),i}_descendants(e){let n=!1;const i=this.getChildren();for(const s of i){if(n=e(s),n)return!0;if(s.hasChildren()&&(n=s._descendants(e),n))return!0}return!1}toObject(){const e=He.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(n=>{e.children.push(n.toObject())}),e}isAncestorOf(e){let n=e.getParent();for(;n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(e){const n=He.prototype.clone.call(this,e);return this.getChildren().forEach(function(i){n.add(i.clone())}),n}getAllIntersections(e){const n=[];return this.find("Shape").forEach(i=>{i.isVisible()&&i.intersects(e)&&n.push(i)}),n}_clearSelfAndDescendantCache(e){var n;super._clearSelfAndDescendantCache(e),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(i){i._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(n,i){n.index=i}),this._requestDraw()}drawScene(e,n,i){const s=this.getLayer(),c=e||s&&s.getCanvas(),d=c&&c.getContext(),h=this._getCanvasCache(),p=h&&h.scene,u=c&&c.isCache;if(!this.isVisible()&&!u)return this;if(p){d.save();const A=this.getAbsoluteTransform(n).getMatrix();d.transform(A[0],A[1],A[2],A[3],A[4],A[5]),this._drawCachedSceneCanvas(d),d.restore()}else this._drawChildren("drawScene",c,n,i);return this}drawHit(e,n){if(!this.shouldDrawHit(n))return this;const i=this.getLayer(),s=e||i&&i.hitCanvas,c=s&&s.getContext(),d=this._getCanvasCache();if(d&&d.hit){c.save();const p=this.getAbsoluteTransform(n).getMatrix();c.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedHitCanvas(c),c.restore()}else this._drawChildren("drawHit",s,n);return this}_drawChildren(e,n,i,s){var c;const d=n&&n.getContext(),h=this.clipWidth(),p=this.clipHeight(),u=this.clipFunc(),A=typeof h=="number"&&typeof p=="number"||u,y=i===this;if(A){d.save();const S=this.getAbsoluteTransform(i);let w=S.getMatrix();d.transform(w[0],w[1],w[2],w[3],w[4],w[5]),d.beginPath();let T;if(u)T=u.call(this,d,this);else{const R=this.clipX(),D=this.clipY();d.rect(R||0,D||0,h,p)}d.clip.apply(d,T),w=S.copy().invert().getMatrix(),d.transform(w[0],w[1],w[2],w[3],w[4],w[5])}const x=!y&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";x&&(d.save(),d._applyGlobalCompositeOperation(this)),(c=this.children)===null||c===void 0||c.forEach(function(S){S[e](n,i,s)}),x&&d.restore(),A&&d.restore()}getClientRect(e={}){var n;const i=e.skipTransform,s=e.relativeTo;let c,d,h,p,u={x:1/0,y:1/0,width:0,height:0};const A=this;(n=this.children)===null||n===void 0||n.forEach(function(S){if(!S.visible())return;const w=S.getClientRect({relativeTo:A,skipShadow:e.skipShadow,skipStroke:e.skipStroke});w.width===0&&w.height===0||(c===void 0?(c=w.x,d=w.y,h=w.x+w.width,p=w.y+w.height):(c=Math.min(c,w.x),d=Math.min(d,w.y),h=Math.max(h,w.x+w.width),p=Math.max(p,w.y+w.height)))});const y=this.find("Shape");let x=!1;for(let S=0;S<y.length;S++)if(y[S]._isVisible(this)){x=!0;break}return x&&c!==void 0?u={x:c,y:d,width:h-c,height:p-d}:u={x:0,y:0,width:0,height:0},i?u:this._transformedRect(u,s)}}ee.addComponentsGetterSetter(qa,"clip",["x","y","width","height"]);ee.addGetterSetter(qa,"clipX",void 0,We());ee.addGetterSetter(qa,"clipY",void 0,We());ee.addGetterSetter(qa,"clipWidth",void 0,We());ee.addGetterSetter(qa,"clipHeight",void 0,We());ee.addGetterSetter(qa,"clipFunc");const kf=new Map,Px=Ye._global.PointerEvent!==void 0;function ag(t){return kf.get(t)}function tv(t){return{evt:t,pointerId:t.pointerId}}function Bx(t,e){return kf.get(t)===e}function Mx(t,e){Cf(t),e.getStage()&&(kf.set(t,e),Px&&e._fire("gotpointercapture",tv(new PointerEvent("gotpointercapture"))))}function Cf(t,e){const n=kf.get(t);if(!n)return;const i=n.getStage();i&&i.content,kf.delete(t),Px&&n._fire("lostpointercapture",tv(new PointerEvent("lostpointercapture")))}const mC="Stage",gC="string",b2="px",vC="mouseout",zx="mouseleave",Fx="mouseover",Ix="mouseenter",Ox="mousemove",Ux="mousedown",jx="mouseup",mf="pointermove",gf="pointerdown",Ru="pointerup",vf="pointercancel",yC="lostpointercapture",Gp="pointerout",yf="pointerleave",Hp="pointerover",Xp="pointerenter",Pg="contextmenu",Gx="touchstart",Hx="touchend",Xx="touchmove",Wx="touchcancel",Bg="wheel",xC=5,bC=[[Ix,"_pointerenter"],[Ux,"_pointerdown"],[Ox,"_pointermove"],[jx,"_pointerup"],[zx,"_pointerleave"],[Gx,"_pointerdown"],[Xx,"_pointermove"],[Hx,"_pointerup"],[Wx,"_pointercancel"],[Fx,"_pointerover"],[Bg,"_wheel"],[Pg,"_contextmenu"],[gf,"_pointerdown"],[mf,"_pointermove"],[Ru,"_pointerup"],[vf,"_pointercancel"],[yf,"_pointerleave"],[yC,"_lostpointercapture"]],ig={mouse:{[Gp]:vC,[yf]:zx,[Hp]:Fx,[Xp]:Ix,[mf]:Ox,[gf]:Ux,[Ru]:jx,[vf]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Gp]:"touchout",[yf]:"touchleave",[Hp]:"touchover",[Xp]:"touchenter",[mf]:Xx,[gf]:Gx,[Ru]:Hx,[vf]:Wx,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Gp]:Gp,[yf]:yf,[Hp]:Hp,[Xp]:Xp,[mf]:mf,[gf]:gf,[Ru]:Ru,[vf]:vf,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},xf=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",yu=t=>{const e=xf(t);if(e==="pointer")return Ye.pointerEventsEnabled&&ig.pointer;if(e==="touch")return ig.touch;if(e==="mouse")return ig.mouse};function S2(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&pe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}const SC="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",_f=[];let xA=class extends qa{constructor(e){super(S2(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),_f.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{S2(this.attrs)}),this._checkVisibility()}_validateAdd(e){const n=e.getType()==="Layer",i=e.getType()==="FastLayer";n||i||pe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if(typeof e===gC){let n;if(e.charAt(0)==="."){const i=e.slice(1);e=document.getElementsByClassName(i)[0]}else e.charAt(0)!=="#"?n=e:n=e.slice(1),e=document.getElementById(n);if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const e=this.children,n=e.length;for(let i=0;i<n;i++)e[i].clear();return this}clone(e){return e||(e={}),e.container=typeof document<"u"&&document.createElement("div"),qa.prototype.clone.call(this,e)}destroy(){super.destroy();const e=this.content;e&&pe._isInDocument(e)&&this.container().removeChild(e);const n=_f.indexOf(this);return n>-1&&_f.splice(n,1),pe.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(pe.warn(SC),null)}_getPointerById(e){return this._pointerPositions.find(n=>n.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e={...e},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();const n=new jo({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),i=n.getContext()._context,s=this.children;return(e.x||e.y)&&i.translate(-1*e.x,-1*e.y),s.forEach(function(c){if(!c.isVisible())return;const d=c._toKonvaCanvas(e);i.drawImage(d._canvas,e.x,e.y,d.getWidth()/d.getPixelRatio(),d.getHeight()/d.getPixelRatio())}),n}getIntersection(e){if(!e)return null;const n=this.children,i=n.length,s=i-1;for(let c=s;c>=0;c--){const d=n[c].getIntersection(e);if(d)return d}return null}_resizeDOM(){const e=this.width(),n=this.height();this.content&&(this.content.style.width=e+b2,this.content.style.height=n+b2),this.bufferCanvas.setSize(e,n),this.bufferHitCanvas.setSize(e,n),this.children.forEach(i=>{i.setSize({width:e,height:n}),i.draw()})}add(e,...n){if(arguments.length>1){for(let s=0;s<arguments.length;s++)this.add(arguments[s]);return this}super.add(e);const i=this.children.length;return i>xC&&pe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),e.setSize({width:this.width(),height:this.height()}),e.draw(),Ye.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return Bx(e,this)}setPointerCapture(e){Mx(e,this)}releaseCapture(e){Cf(e)}getLayers(){return this.children}_bindContentEvents(){Ye.isBrowser&&bC.forEach(([e,n])=>{this.content.addEventListener(e,i=>{this[n](i)},{passive:!1})})}_pointerenter(e){this.setPointersPositions(e);const n=yu(e.type);n&&this._fire(n.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const n=yu(e.type);n&&this._fire(n.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let n=this[e+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(e){const n=yu(e.type),i=xf(e.type);if(!n)return;this.setPointersPositions(e);const s=this._getTargetShape(i),c=!(Ye.isDragging()||Ye.isTransforming())||Ye.hitOnDragEnabled;s&&c?(s._fireAndBubble(n.pointerout,{evt:e}),s._fireAndBubble(n.pointerleave,{evt:e}),this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this[i+"targetShape"]=null):c&&(this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(e){const n=yu(e.type),i=xf(e.type);if(!n)return;this.setPointersPositions(e);let s=!1;this._changedPointerPositions.forEach(c=>{const d=this.getIntersection(c);if(on.justDragged=!1,Ye["_"+i+"ListenClick"]=!0,!d||!d.isListening()){this[i+"ClickStartShape"]=void 0;return}Ye.capturePointerEventsEnabled&&d.setPointerCapture(c.id),this[i+"ClickStartShape"]=d,d._fireAndBubble(n.pointerdown,{evt:e,pointerId:c.id}),s=!0;const h=e.type.indexOf("touch")>=0;d.preventDefault()&&e.cancelable&&h&&e.preventDefault()}),s||this._fire(n.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(e){const n=yu(e.type),i=xf(e.type);if(!n)return;const s=e.type.indexOf("touch")>=0||e.pointerType==="touch";if(Ye.isDragging()&&on.node.preventDefault()&&e.cancelable&&s&&e.preventDefault(),this.setPointersPositions(e),!(!(Ye.isDragging()||Ye.isTransforming())||Ye.hitOnDragEnabled))return;const d={};let h=!1;const p=this._getTargetShape(i);this._changedPointerPositions.forEach(u=>{const A=ag(u.id)||this.getIntersection(u),y=u.id,x={evt:e,pointerId:y},S=p!==A;if(S&&p&&(p._fireAndBubble(n.pointerout,{...x},A),p._fireAndBubble(n.pointerleave,{...x},A)),A){if(d[A._id])return;d[A._id]=!0}A&&A.isListening()?(h=!0,S&&(A._fireAndBubble(n.pointerover,{...x},p),A._fireAndBubble(n.pointerenter,{...x},p),this[i+"targetShape"]=A),A._fireAndBubble(n.pointermove,{...x})):p&&(this._fire(n.pointerover,{evt:e,target:this,currentTarget:this,pointerId:y}),this[i+"targetShape"]=null)}),h||this._fire(n.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const n=yu(e.type),i=xf(e.type);if(!n)return;this.setPointersPositions(e);const s=this[i+"ClickStartShape"],c=this[i+"ClickEndShape"],d={};let h=!1;this._changedPointerPositions.forEach(p=>{const u=ag(p.id)||this.getIntersection(p);if(u){if(u.releaseCapture(p.id),d[u._id])return;d[u._id]=!0}const A=p.id,y={evt:e,pointerId:A};let x=!1;Ye["_"+i+"InDblClickWindow"]?(x=!0,clearTimeout(this[i+"DblTimeout"])):on.justDragged||(Ye["_"+i+"InDblClickWindow"]=!0,clearTimeout(this[i+"DblTimeout"])),this[i+"DblTimeout"]=setTimeout(function(){Ye["_"+i+"InDblClickWindow"]=!1},Ye.dblClickWindow),u&&u.isListening()?(h=!0,this[i+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,{...y}),Ye["_"+i+"ListenClick"]&&s&&s===u&&(u._fireAndBubble(n.pointerclick,{...y}),x&&c&&c===u&&u._fireAndBubble(n.pointerdblclick,{...y}))):(this[i+"ClickEndShape"]=null,h||(this._fire(n.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),h=!0),Ye["_"+i+"ListenClick"]&&this._fire(n.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:A}),x&&this._fire(n.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:A}))}),h||this._fire(n.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Ye["_"+i+"ListenClick"]=!1,e.cancelable&&i!=="touch"&&i!=="pointer"&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);const n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(Pg,{evt:e}):this._fire(Pg,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);const n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(Bg,{evt:e}):this._fire(Bg,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const n=ag(e.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Ru,tv(e)),Cf(e.pointerId)}_lostpointercapture(e){Cf(e.pointerId)}setPointersPositions(e){const n=this._getContentPosition();let i=null,s=null;e=e||window.event,e.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,c=>{this._pointerPositions.push({id:c.identifier,x:(c.clientX-n.left)/n.scaleX,y:(c.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,c=>{this._changedPointerPositions.push({id:c.identifier,x:(c.clientX-n.left)/n.scaleX,y:(c.clientY-n.top)/n.scaleY})})):(i=(e.clientX-n.left)/n.scaleX,s=(e.clientY-n.top)/n.scaleY,this.pointerPos={x:i,y:s},this._pointerPositions=[{x:i,y:s,id:pe._getFirstPointerId(e)}],this._changedPointerPositions=[{x:i,y:s,id:pe._getFirstPointerId(e)}])}_setPointerPosition(e){pe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new jo({width:this.width(),height:this.height()}),this.bufferHitCanvas=new $g({pixelRatio:1,width:this.width(),height:this.height()}),!Ye.isBrowser)return;const e=this.container();if(!e)throw"Stage has no container. A container is required.";e.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),e.appendChild(this.content),this._resizeDOM()}cache(){return pe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(e){e.batchDraw()}),this}};xA.prototype.nodeType=mC;Mn(xA);ee.addGetterSetter(xA,"container");Ye.isBrowser&&document.addEventListener("visibilitychange",()=>{_f.forEach(t=>{t.batchDraw()})});const Qx="hasShadow",Yx="shadowRGBA",Vx="patternImage",qx="linearGradient",Kx="radialGradient";let Wp;function sg(){return Wp||(Wp=pe.createCanvasElement().getContext("2d"),Wp)}const Ef={};function wC(t){const e=this.attrs.fillRule;e?t.fill(e):t.fill()}function CC(t){t.stroke()}function _C(t){const e=this.attrs.fillRule;e?t.fill(e):t.fill()}function EC(t){t.stroke()}function TC(){this._clearCache(Qx)}function RC(){this._clearCache(Yx)}function DC(){this._clearCache(Vx)}function LC(){this._clearCache(qx)}function kC(){this._clearCache(Kx)}class Ie extends He{constructor(e){super(e);let n,i=0;for(;n=pe.getHitColor(),!(n&&!(n in Ef));)if(i++,i>=1e4){pe.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),n=pe.getRandomColor();break}this.colorKey=n,Ef[n]=this}getContext(){return pe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return pe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(Qx,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Vx,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const n=sg().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const i=new Va;i.translate(this.fillPatternX(),this.fillPatternY()),i.rotate(Ye.getAngle(this.fillPatternRotation())),i.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),i.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const s=i.getMatrix(),c=typeof DOMMatrix>"u"?{a:s[0],b:s[1],c:s[2],d:s[3],e:s[4],f:s[5]}:new DOMMatrix(s);n.setTransform(c)}return n}}_getLinearGradient(){return this._getCache(qx,this.__getLinearGradient)}__getLinearGradient(){const e=this.fillLinearGradientColorStops();if(e){const n=sg(),i=this.fillLinearGradientStartPoint(),s=this.fillLinearGradientEndPoint(),c=n.createLinearGradient(i.x,i.y,s.x,s.y);for(let d=0;d<e.length;d+=2)c.addColorStop(e[d],e[d+1]);return c}}_getRadialGradient(){return this._getCache(Kx,this.__getRadialGradient)}__getRadialGradient(){const e=this.fillRadialGradientColorStops();if(e){const n=sg(),i=this.fillRadialGradientStartPoint(),s=this.fillRadialGradientEndPoint(),c=n.createRadialGradient(i.x,i.y,this.fillRadialGradientStartRadius(),s.x,s.y,this.fillRadialGradientEndRadius());for(let d=0;d<e.length;d+=2)c.addColorStop(e[d],e[d+1]);return c}}getShadowRGBA(){return this._getCache(Yx,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const e=pe.colorToRGBA(this.shadowColor());if(e)return"rgba("+e.r+","+e.g+","+e.b+","+e.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const e=this.hitStrokeWidth();return e==="auto"?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){const n=this.getStage();if(!n)return!1;const i=n.bufferHitCanvas;return i.getContext().clear(),this.drawHit(i,void 0,!0),i.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data[3]>0}destroy(){return He.prototype.destroy.call(this),delete Ef[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var n;if(!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const s=e||this.hasFill(),c=this.hasStroke(),d=this.getAbsoluteOpacity()!==1;if(s&&c&&d)return!0;const h=this.hasShadow(),p=this.shadowForStrokeEnabled();return!!(s&&c&&h&&p)}setStrokeHitEnabled(e){pe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){let n=!1,i=this.getParent();for(;i;){if(i.isCached()){n=!0;break}i=i.getParent()}const s=e.skipTransform,c=e.relativeTo||n&&this.getStage()||void 0,d=this.getSelfRect(),p=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,u=d.width+p,A=d.height+p,y=!e.skipShadow&&this.hasShadow(),x=y?this.shadowOffsetX():0,S=y?this.shadowOffsetY():0,w=u+Math.abs(x),T=A+Math.abs(S),R=y&&this.shadowBlur()||0,D=w+R*2,N=T+R*2,M={width:D,height:N,x:-(p/2+R)+Math.min(x,0)+d.x,y:-(p/2+R)+Math.min(S,0)+d.y};return s?M:this._transformedRect(M,c)}drawScene(e,n,i){const s=this.getLayer(),c=e||s.getCanvas(),d=c.getContext(),h=this._getCanvasCache(),p=this.getSceneFunc(),u=this.hasShadow();let A;const y=n===this;if(!this.isVisible()&&!y)return this;if(h){d.save();const x=this.getAbsoluteTransform(n).getMatrix();return d.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedSceneCanvas(d),d.restore(),this}if(!p)return this;if(d.save(),this._useBufferCanvas()){A=this.getStage();const x=i||A.bufferCanvas,S=x.getContext();i?(S.save(),S.setTransform(1,0,0,1,0,0),S.clearRect(0,0,x.width,x.height),S.restore()):S.clear(),S.save(),S._applyLineJoin(this),S._applyMiterLimit(this);const w=this.getAbsoluteTransform(n).getMatrix();S.transform(w[0],w[1],w[2],w[3],w[4],w[5]),p.call(this,S,this),S.restore();const T=x.pixelRatio;u&&d._applyShadow(this),y||(d._applyOpacity(this),d._applyGlobalCompositeOperation(this)),d.drawImage(x._canvas,x.x||0,x.y||0,x.width/T,x.height/T)}else{if(d._applyLineJoin(this),d._applyMiterLimit(this),!y){const x=this.getAbsoluteTransform(n).getMatrix();d.transform(x[0],x[1],x[2],x[3],x[4],x[5]),d._applyOpacity(this),d._applyGlobalCompositeOperation(this)}u&&d._applyShadow(this),p.call(this,d,this)}return d.restore(),this}drawHit(e,n,i=!1){if(!this.shouldDrawHit(n,i))return this;const s=this.getLayer(),c=e||s.hitCanvas,d=c&&c.getContext(),h=this.hitFunc()||this.sceneFunc(),p=this._getCanvasCache(),u=p&&p.hit;if(this.colorKey||pe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){d.save();const y=this.getAbsoluteTransform(n).getMatrix();return d.transform(y[0],y[1],y[2],y[3],y[4],y[5]),this._drawCachedHitCanvas(d),d.restore(),this}if(!h)return this;if(d.save(),d._applyLineJoin(this),d._applyMiterLimit(this),!(this===n)){const y=this.getAbsoluteTransform(n).getMatrix();d.transform(y[0],y[1],y[2],y[3],y[4],y[5])}return h.call(this,d,this),d.restore(),this}drawHitFromCache(e=0){const n=this._getCanvasCache(),i=this._getCachedSceneCanvas(),s=n.hit,c=s.getContext(),d=s.getWidth(),h=s.getHeight();c.clear(),c.drawImage(i._canvas,0,0,d,h);try{const p=c.getImageData(0,0,d,h),u=p.data,A=u.length,y=pe._hexToRgb(this.colorKey);for(let x=0;x<A;x+=4)u[x+3]>e?(u[x]=y.r,u[x+1]=y.g,u[x+2]=y.b,u[x+3]=255):u[x+3]=0;c.putImageData(p,0,0)}catch(p){pe.error("Unable to draw hit graph from cached scene canvas. "+p.message)}return this}hasPointerCapture(e){return Bx(e,this)}setPointerCapture(e){Mx(e,this)}releaseCapture(e){Cf(e)}}Ie.prototype._fillFunc=wC;Ie.prototype._strokeFunc=CC;Ie.prototype._fillFuncHit=_C;Ie.prototype._strokeFuncHit=EC;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";Mn(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",TC);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",RC);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",DC);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",LC);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",kC);ee.addGetterSetter(Ie,"stroke",void 0,Nx());ee.addGetterSetter(Ie,"strokeWidth",2,We());ee.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);ee.addGetterSetter(Ie,"hitStrokeWidth","auto",ev());ee.addGetterSetter(Ie,"strokeHitEnabled",!0,Fi());ee.addGetterSetter(Ie,"perfectDrawEnabled",!0,Fi());ee.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Fi());ee.addGetterSetter(Ie,"lineJoin");ee.addGetterSetter(Ie,"lineCap");ee.addGetterSetter(Ie,"miterLimit");ee.addGetterSetter(Ie,"sceneFunc");ee.addGetterSetter(Ie,"hitFunc");ee.addGetterSetter(Ie,"dash");ee.addGetterSetter(Ie,"dashOffset",0,We());ee.addGetterSetter(Ie,"shadowColor",void 0,Ol());ee.addGetterSetter(Ie,"shadowBlur",0,We());ee.addGetterSetter(Ie,"shadowOpacity",1,We());ee.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);ee.addGetterSetter(Ie,"shadowOffsetX",0,We());ee.addGetterSetter(Ie,"shadowOffsetY",0,We());ee.addGetterSetter(Ie,"fillPatternImage");ee.addGetterSetter(Ie,"fill",void 0,Nx());ee.addGetterSetter(Ie,"fillPatternX",0,We());ee.addGetterSetter(Ie,"fillPatternY",0,We());ee.addGetterSetter(Ie,"fillLinearGradientColorStops");ee.addGetterSetter(Ie,"strokeLinearGradientColorStops");ee.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);ee.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);ee.addGetterSetter(Ie,"fillRadialGradientColorStops");ee.addGetterSetter(Ie,"fillPatternRepeat","repeat");ee.addGetterSetter(Ie,"fillEnabled",!0);ee.addGetterSetter(Ie,"strokeEnabled",!0);ee.addGetterSetter(Ie,"shadowEnabled",!0);ee.addGetterSetter(Ie,"dashEnabled",!0);ee.addGetterSetter(Ie,"strokeScaleEnabled",!0);ee.addGetterSetter(Ie,"fillPriority","color");ee.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);ee.addGetterSetter(Ie,"fillPatternOffsetX",0,We());ee.addGetterSetter(Ie,"fillPatternOffsetY",0,We());ee.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);ee.addGetterSetter(Ie,"fillPatternScaleX",1,We());ee.addGetterSetter(Ie,"fillPatternScaleY",1,We());ee.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);ee.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);ee.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);ee.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);ee.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);ee.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);ee.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);ee.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);ee.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);ee.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);ee.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);ee.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);ee.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);ee.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);ee.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);ee.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);ee.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);ee.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);ee.addGetterSetter(Ie,"fillPatternRotation",0);ee.addGetterSetter(Ie,"fillRule",void 0,Ol());ee.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const NC="beforeDraw",PC="draw",Jx=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],BC=Jx.length;let Ul=class extends qa{constructor(e){super(e),this.canvas=new jo,this.hitCanvas=new $g({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);const n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),e<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[e+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){He.prototype.moveToTop.call(this);const e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!He.prototype.moveUp.call(this))return!1;const n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(He.prototype.moveDown.call(this)){const e=this.getStage();if(e){const n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(He.prototype.moveToBottom.call(this)){const e=this.getStage();if(e){const n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const e=this.getNativeCanvasElement();return He.prototype.remove.call(this),e&&e.parentNode&&pe._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:n}){return this.canvas.setSize(e,n),this.hitCanvas.setSize(e,n),this._setSmoothEnabled(),this}_validateAdd(e){const n=e.getType();n!=="Group"&&n!=="Shape"&&pe.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return e={...e},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x!==void 0?e.x:this.x(),e.y=e.y!==void 0?e.y:this.y(),He.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){pe.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){pe.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,pe.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;let n=1,i=!1;for(;;){for(let s=0;s<BC;s++){const c=Jx[s],d=this._getIntersection({x:e.x+c.x*n,y:e.y+c.y*n}),h=d.shape;if(h)return h;if(i=!!d.antialiased,!d.antialiased)break}if(i)n+=1;else return null}}_getIntersection(e){const n=this.hitCanvas.pixelRatio,i=this.hitCanvas.context.getImageData(Math.round(e.x*n),Math.round(e.y*n),1,1).data,s=i[3];if(s===255){const c=pe.getHitColorKey(i[0],i[1],i[2]),d=Ef[c];return d?{shape:d}:{antialiased:!0}}else if(s>0)return{antialiased:!0};return{}}drawScene(e,n,i){const s=this.getLayer(),c=e||s&&s.getCanvas();return this._fire(NC,{node:this}),this.clearBeforeDraw()&&c.getContext().clear(),qa.prototype.drawScene.call(this,c,n,i),this._fire(PC,{node:this}),this}drawHit(e,n){const i=this.getLayer(),s=e||i&&i.hitCanvas;return i&&i.clearBeforeDraw()&&i.getHitCanvas().getContext().clear(),qa.prototype.drawHit.call(this,s,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){pe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return pe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}destroy(){return pe.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};Ul.prototype.nodeType="Layer";Mn(Ul);ee.addGetterSetter(Ul,"imageSmoothingEnabled",!0);ee.addGetterSetter(Ul,"clearBeforeDraw",!0);ee.addGetterSetter(Ul,"hitGraphEnabled",!0,Fi());class nv extends Ul{constructor(e){super(e),this.listening(!1),pe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}nv.prototype.nodeType="FastLayer";Mn(nv);let ku=class extends qa{_validateAdd(e){const n=e.getType();n!=="Group"&&n!=="Shape"&&pe.throw("You may only add groups and shapes to groups.")}};ku.prototype.nodeType="Group";Mn(ku);const og=(function(){return zl.performance&&zl.performance.now?function(){return zl.performance.now()}:function(){return new Date().getTime()}})();class Ai{constructor(e,n){this.id=Ai.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:og(),frameRate:0},this.func=e,this.setLayers(n)}setLayers(e){let n=[];return e&&(n=Array.isArray(e)?e:[e]),this.layers=n,this}getLayers(){return this.layers}addLayer(e){const n=this.layers,i=n.length;for(let s=0;s<i;s++)if(n[s]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){const n=Ai.animations,i=n.length;for(let s=0;s<i;s++)if(n[s].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=og(),Ai._addAnimation(this),this}stop(){return Ai._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){const n=e.id,i=this.animations,s=i.length;for(let c=0;c<s;c++)if(i[c].id===n){this.animations.splice(c,1);break}}static _runFrames(){const e={},n=this.animations;for(let i=0;i<n.length;i++){const s=n[i],c=s.layers,d=s.func;s._updateFrameObject(og());const h=c.length;let p;if(d?p=d.call(s,s.frame)!==!1:p=!0,!!p)for(let u=0;u<h;u++){const A=c[u];A._id!==void 0&&(e[A._id]=A)}}for(const i in e)e.hasOwnProperty(i)&&e[i].batchDraw()}static _animationLoop(){const e=Ai;e.animations.length?(e._runFrames(),pe.requestAnimFrame(e._animationLoop)):e.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,pe.requestAnimFrame(this._animationLoop))}}Ai.animations=[];Ai.animIdCounter=0;Ai.animRunning=!1;const MC={node:1,duration:1,easing:1,onFinish:1,yoyo:1},zC=1,w2=2,C2=3,_2=["fill","stroke","shadowColor"];let FC=0;class IC{constructor(e,n,i,s,c,d,h){this.prop=e,this.propFunc=n,this.begin=s,this._pos=s,this.duration=d,this._change=0,this.prevPos=0,this.yoyo=h,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=i,this._change=c-this.begin,this.pause()}fire(e){const n=this[e];n&&n()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=w2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=C2,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const e=this.getTimer()-this._startTime;this.state===w2?this.setTime(e):this.state===C2&&this.setTime(this.duration-e)}pause(){this.state=zC,this.fire("onPause")}getTimer(){return new Date().getTime()}}class wn{constructor(e){const n=this,i=e.node,s=i._id,c=e.easing||Tf.Linear,d=!!e.yoyo;let h,p;typeof e.duration>"u"?h=.3:e.duration===0?h=.001:h=e.duration,this.node=i,this._id=FC++;const u=i.getLayer()||(i instanceof Ye.Stage?i.getLayers():null);u||pe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ai(function(){n.tween.onEnterFrame()},u),this.tween=new IC(p,function(A){n._tweenFunc(A)},c,0,1,h*1e3,d),this._addListeners(),wn.attrs[s]||(wn.attrs[s]={}),wn.attrs[s][this._id]||(wn.attrs[s][this._id]={}),wn.tweens[s]||(wn.tweens[s]={});for(p in e)MC[p]===void 0&&this._addAttr(p,e[p]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,n){const i=this.node,s=i._id;let c,d,h,p,u;const A=wn.tweens[s][e];A&&delete wn.attrs[s][A][e];let y=i.getAttr(e);if(pe._isArray(n))if(c=[],d=Math.max(n.length,y.length),e==="points"&&n.length!==y.length&&(n.length>y.length?(p=y,y=pe._prepareArrayForTween(y,n,i.closed())):(h=n,n=pe._prepareArrayForTween(n,y,i.closed()))),e.indexOf("fill")===0)for(let x=0;x<d;x++)if(x%2===0)c.push(n[x]-y[x]);else{const S=pe.colorToRGBA(y[x]);u=pe.colorToRGBA(n[x]),y[x]=S,c.push({r:u.r-S.r,g:u.g-S.g,b:u.b-S.b,a:u.a-S.a})}else for(let x=0;x<d;x++)c.push(n[x]-y[x]);else _2.indexOf(e)!==-1?(y=pe.colorToRGBA(y),u=pe.colorToRGBA(n),c={r:u.r-y.r,g:u.g-y.g,b:u.b-y.b,a:u.a-y.a}):c=n-y;wn.attrs[s][this._id][e]={start:y,diff:c,end:n,trueEnd:h,trueStart:p},wn.tweens[s][e]=this._id}_tweenFunc(e){const n=this.node,i=wn.attrs[n._id][this._id];let s,c,d,h,p,u,A,y;for(s in i){if(c=i[s],d=c.start,h=c.diff,y=c.end,pe._isArray(d))if(p=[],A=Math.max(d.length,y.length),s.indexOf("fill")===0)for(u=0;u<A;u++)u%2===0?p.push((d[u]||0)+h[u]*e):p.push("rgba("+Math.round(d[u].r+h[u].r*e)+","+Math.round(d[u].g+h[u].g*e)+","+Math.round(d[u].b+h[u].b*e)+","+(d[u].a+h[u].a*e)+")");else for(u=0;u<A;u++)p.push((d[u]||0)+h[u]*e);else _2.indexOf(s)!==-1?p="rgba("+Math.round(d.r+h.r*e)+","+Math.round(d.g+h.g*e)+","+Math.round(d.b+h.b*e)+","+(d.a+h.a*e)+")":p=d+h*e;n.setAttr(s,p)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const e=this.node,n=wn.attrs[e._id][this._id];n.points&&n.points.trueEnd&&e.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const e=this.node,n=wn.attrs[e._id][this._id];n.points&&n.points.trueStart&&e.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const e=this.node._id,n=this._id,i=wn.tweens[e];this.pause(),this.anim&&this.anim.stop();for(const s in i)delete wn.tweens[e][s];delete wn.attrs[e][n],wn.tweens[e]&&(Object.keys(wn.tweens[e]).length===0&&delete wn.tweens[e],Object.keys(wn.attrs[e]).length===0&&delete wn.attrs[e])}}wn.attrs={};wn.tweens={};He.prototype.to=function(t){const e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new wn(t).play()};const Tf={BackEaseIn(t,e,n,i){return n*(t/=i)*t*((1.70158+1)*t-1.70158)+e},BackEaseOut(t,e,n,i){return n*((t=t/i-1)*t*((1.70158+1)*t+1.70158)+1)+e},BackEaseInOut(t,e,n,i){let s=1.70158;return(t/=i/2)<1?n/2*(t*t*(((s*=1.525)+1)*t-s))+e:n/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+e},ElasticEaseIn(t,e,n,i,s,c){let d=0;return t===0?e:(t/=i)===1?e+n:(c||(c=i*.3),!s||s<Math.abs(n)?(s=n,d=c/4):d=c/(2*Math.PI)*Math.asin(n/s),-(s*Math.pow(2,10*(t-=1))*Math.sin((t*i-d)*(2*Math.PI)/c))+e)},ElasticEaseOut(t,e,n,i,s,c){let d=0;return t===0?e:(t/=i)===1?e+n:(c||(c=i*.3),!s||s<Math.abs(n)?(s=n,d=c/4):d=c/(2*Math.PI)*Math.asin(n/s),s*Math.pow(2,-10*t)*Math.sin((t*i-d)*(2*Math.PI)/c)+n+e)},ElasticEaseInOut(t,e,n,i,s,c){let d=0;return t===0?e:(t/=i/2)===2?e+n:(c||(c=i*(.3*1.5)),!s||s<Math.abs(n)?(s=n,d=c/4):d=c/(2*Math.PI)*Math.asin(n/s),t<1?-.5*(s*Math.pow(2,10*(t-=1))*Math.sin((t*i-d)*(2*Math.PI)/c))+e:s*Math.pow(2,-10*(t-=1))*Math.sin((t*i-d)*(2*Math.PI)/c)*.5+n+e)},BounceEaseOut(t,e,n,i){return(t/=i)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},BounceEaseIn(t,e,n,i){return n-Tf.BounceEaseOut(i-t,0,n,i)+e},BounceEaseInOut(t,e,n,i){return t<i/2?Tf.BounceEaseIn(t*2,0,n,i)*.5+e:Tf.BounceEaseOut(t*2-i,0,n,i)*.5+n*.5+e},EaseIn(t,e,n,i){return n*(t/=i)*t+e},EaseOut(t,e,n,i){return-n*(t/=i)*(t-2)+e},EaseInOut(t,e,n,i){return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},StrongEaseIn(t,e,n,i){return n*(t/=i)*t*t*t*t+e},StrongEaseOut(t,e,n,i){return n*((t=t/i-1)*t*t*t*t+1)+e},StrongEaseInOut(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},Linear(t,e,n,i){return n*t/i+e}},Il=pe._assign(Ye,{Util:pe,Transform:Va,Node:He,Container:qa,Stage:xA,stages:_f,Layer:Ul,FastLayer:nv,Group:ku,DD:on,Shape:Ie,shapes:Ef,Animation:Ai,Tween:wn,Easings:Tf,Context:vA,Canvas:Zg});class $s extends Ie{_sceneFunc(e){const n=Ye.getAngle(this.angle()),i=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,n,i),e.arc(0,0,this.innerRadius(),n,0,!i),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),n=this.outerRadius(),i=this.clockwise(),s=Ye.getAngle(i?360-this.angle():this.angle()),c=Math.cos(Math.min(s,Math.PI)),d=1,h=Math.sin(Math.min(Math.max(Math.PI,s),3*Math.PI/2)),p=Math.sin(Math.min(s,Math.PI/2)),u=c*(c>0?e:n),A=d*n,y=h*(h>0?e:n),x=p*(p>0?n:e);return{x:u,y:i?-1*x:y,width:A-u,height:x-y}}}$s.prototype._centroid=!0;$s.prototype.className="Arc";$s.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"];Mn($s);ee.addGetterSetter($s,"innerRadius",0,We());ee.addGetterSetter($s,"outerRadius",0,We());ee.addGetterSetter($s,"angle",0,We());ee.addGetterSetter($s,"clockwise",!1,Fi());function Mg(t,e,n,i,s,c,d){const h=Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2)),p=Math.sqrt(Math.pow(s-n,2)+Math.pow(c-i,2)),u=d*h/(h+p),A=d*p/(h+p),y=n-u*(s-t),x=i-u*(c-e),S=n+A*(s-t),w=i+A*(c-e);return[y,x,S,w]}function E2(t,e){const n=t.length,i=[];for(let s=2;s<n-2;s+=2){const c=Mg(t[s-2],t[s-1],t[s],t[s+1],t[s+2],t[s+3],e);isNaN(c[0])||(i.push(c[0]),i.push(c[1]),i.push(t[s]),i.push(t[s+1]),i.push(c[2]),i.push(c[3]))}return i}function OC(t){const e=[[t[0],t[2],t[4],t[6]],[t[1],t[3],t[5],t[7]]],n=[];for(const i of e){const s=-3*i[0]+9*i[1]-9*i[2]+3*i[3];if(s!==0){const c=6*i[0]-12*i[1]+6*i[2],d=-3*i[0]+3*i[1],h=c*c-4*s*d;if(h>=0){const p=Math.sqrt(h);n.push((-c+p)/(2*s)),n.push((-c-p)/(2*s))}}}return n.filter(i=>i>0&&i<1).flatMap(i=>e.map(s=>{const c=1-i;return c*c*c*s[0]+3*c*c*i*s[1]+3*c*i*i*s[2]+i*i*i*s[3]}))}let eo=class extends Ie{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){const n=this.points(),i=n.length,s=this.tension(),c=this.closed(),d=this.bezier();if(!i)return;let h=0;if(e.beginPath(),e.moveTo(n[0],n[1]),s!==0&&i>4){const p=this.getTensionPoints(),u=p.length;for(h=c?0:4,c||e.quadraticCurveTo(p[0],p[1],p[2],p[3]);h<u-2;)e.bezierCurveTo(p[h++],p[h++],p[h++],p[h++],p[h++],p[h++]);c||e.quadraticCurveTo(p[u-2],p[u-1],n[i-2],n[i-1])}else if(d)for(h=2;h<i;)e.bezierCurveTo(n[h++],n[h++],n[h++],n[h++],n[h++],n[h++]);else for(h=2;h<i;h+=2)e.lineTo(n[h],n[h+1]);c?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():E2(this.points(),this.tension())}_getTensionPointsClosed(){const e=this.points(),n=e.length,i=this.tension(),s=Mg(e[n-2],e[n-1],e[0],e[1],e[2],e[3],i),c=Mg(e[n-4],e[n-3],e[n-2],e[n-1],e[0],e[1],i),d=E2(e,i);return[s[2],s[3]].concat(d).concat([c[0],c[1],e[n-2],e[n-1],c[2],c[3],s[0],s[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:this.bezier()?e=[e[0],e[1],...OC(this.points()),e[e.length-2],e[e.length-1]]:e=this.points();let n=e[0],i=e[0],s=e[1],c=e[1],d,h;for(let p=0;p<e.length/2;p++)d=e[p*2],h=e[p*2+1],n=Math.min(n,d),i=Math.max(i,d),s=Math.min(s,h),c=Math.max(c,h);return{x:n,y:s,width:i-n,height:c-s}}};eo.prototype.className="Line";eo.prototype._attrsAffectingSize=["points","bezier","tension"];Mn(eo);ee.addGetterSetter(eo,"closed",!1);ee.addGetterSetter(eo,"bezier",!1);ee.addGetterSetter(eo,"tension",0,We());ee.addGetterSetter(eo,"points",[],tC());const UC=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],jC=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],GC=[[1],[1,1],[1,2,1],[1,3,3,1]],T2=(t,e,n)=>{let i,s;const d=n/2;i=0;for(let h=0;h<20;h++)s=d*UC[20][h]+d,i+=jC[20][h]*HC(t,e,s);return d*i},R2=(t,e,n)=>{n===void 0&&(n=1);const i=t[0]-2*t[1]+t[2],s=e[0]-2*e[1]+e[2],c=2*t[1]-2*t[0],d=2*e[1]-2*e[0],h=4*(i*i+s*s),p=4*(i*c+s*d),u=c*c+d*d;if(h===0)return n*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));const A=p/(2*h),y=u/h,x=n+A,S=y-A*A,w=x*x+S>0?Math.sqrt(x*x+S):0,T=A*A+S>0?Math.sqrt(A*A+S):0,R=A+Math.sqrt(A*A+S)!==0?S*Math.log(Math.abs((x+w)/(A+T))):0;return Math.sqrt(h)/2*(x*w-A*T+R)};function HC(t,e,n){const i=zg(1,n,t),s=zg(1,n,e),c=i*i+s*s;return Math.sqrt(c)}const zg=(t,e,n)=>{const i=n.length-1;let s,c;if(i===0)return 0;if(t===0){c=0;for(let d=0;d<=i;d++)c+=GC[i][d]*Math.pow(1-e,i-d)*Math.pow(e,d)*n[d];return c}else{s=new Array(i);for(let d=0;d<i;d++)s[d]=i*(n[d+1]-n[d]);return zg(t-1,e,s)}},D2=(t,e,n)=>{let i=1,s=t/e,c=(t-n(s))/e,d=0;for(;i>.001;){const h=n(s+c),p=Math.abs(t-h)/e;if(p<i)i=p,s+=c;else{const u=n(s-c),A=Math.abs(t-u)/e;A<i?(i=A,s-=c):c/=2}if(d++,d>500)break}return s};class Cn extends Ie{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Cn.parsePathData(this.data()),this.pathLength=Cn.getPathLength(this.dataArray)}_sceneFunc(e){const n=this.dataArray;e.beginPath();let i=!1;for(let s=0;s<n.length;s++){const c=n[s].command,d=n[s].points;switch(c){case"L":e.lineTo(d[0],d[1]);break;case"M":e.moveTo(d[0],d[1]);break;case"C":e.bezierCurveTo(d[0],d[1],d[2],d[3],d[4],d[5]);break;case"Q":e.quadraticCurveTo(d[0],d[1],d[2],d[3]);break;case"A":const h=d[0],p=d[1],u=d[2],A=d[3],y=d[4],x=d[5],S=d[6],w=d[7],T=u>A?u:A,R=u>A?1:u/A,D=u>A?A/u:1;e.translate(h,p),e.rotate(S),e.scale(R,D),e.arc(0,0,T,y,y+x,1-w),e.scale(1/R,1/D),e.rotate(-S),e.translate(-h,-p);break;case"z":i=!0,e.closePath();break}}!i&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){let e=[];this.dataArray.forEach(function(p){if(p.command==="A"){const u=p.points[4],A=p.points[5],y=p.points[4]+A;let x=Math.PI/180;if(Math.abs(u-y)<x&&(x=Math.abs(u-y)),A<0)for(let S=u-x;S>y;S-=x){const w=Cn.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],S,0);e.push(w.x,w.y)}else for(let S=u+x;S<y;S+=x){const w=Cn.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],S,0);e.push(w.x,w.y)}}else if(p.command==="C")for(let u=0;u<=1;u+=.01){const A=Cn.getPointOnCubicBezier(u,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3],p.points[4],p.points[5]);e.push(A.x,A.y)}else e=e.concat(p.points)});let n=e[0],i=e[0],s=e[1],c=e[1],d,h;for(let p=0;p<e.length/2;p++)d=e[p*2],h=e[p*2+1],isNaN(d)||(n=Math.min(n,d),i=Math.max(i,d)),isNaN(h)||(s=Math.min(s,h),c=Math.max(c,h));return{x:n,y:s,width:i-n,height:c-s}}getLength(){return this.pathLength}getPointAtLength(e){return Cn.getPointAtLengthOfDataArray(e,this.dataArray)}static getLineLength(e,n,i,s){return Math.sqrt((i-e)*(i-e)+(s-n)*(s-n))}static getPathLength(e){let n=0;for(let i=0;i<e.length;++i)n+=e[i].pathLength;return n}static getPointAtLengthOfDataArray(e,n){let i,s=0,c=n.length;if(!c)return null;for(;s<c&&e>n[s].pathLength;)e-=n[s].pathLength,++s;if(s===c)return i=n[s-1].points.slice(-2),{x:i[0],y:i[1]};if(e<.01)return n[s].command==="M"?(i=n[s].points.slice(0,2),{x:i[0],y:i[1]}):{x:n[s].start.x,y:n[s].start.y};const d=n[s],h=d.points;switch(d.command){case"L":return Cn.getPointOnLine(e,d.start.x,d.start.y,h[0],h[1]);case"C":return Cn.getPointOnCubicBezier(D2(e,Cn.getPathLength(n),T=>T2([d.start.x,h[0],h[2],h[4]],[d.start.y,h[1],h[3],h[5]],T)),d.start.x,d.start.y,h[0],h[1],h[2],h[3],h[4],h[5]);case"Q":return Cn.getPointOnQuadraticBezier(D2(e,Cn.getPathLength(n),T=>R2([d.start.x,h[0],h[2]],[d.start.y,h[1],h[3]],T)),d.start.x,d.start.y,h[0],h[1],h[2],h[3]);case"A":const p=h[0],u=h[1],A=h[2],y=h[3],x=h[5],S=h[6];let w=h[4];return w+=x*e/d.pathLength,Cn.getPointOnEllipticalArc(p,u,A,y,w,S)}return null}static getPointOnLine(e,n,i,s,c,d,h){d=d??n,h=h??i;const p=this.getLineLength(n,i,s,c);if(p<1e-10)return{x:n,y:i};if(s===n)return{x:d,y:h+(c>i?e:-e)};const u=(c-i)/(s-n),A=Math.sqrt(e*e/(1+u*u))*(s<n?-1:1),y=u*A;if(Math.abs(h-i-u*(d-n))<1e-10)return{x:d+A,y:h+y};const x=((d-n)*(s-n)+(h-i)*(c-i))/(p*p),S=n+x*(s-n),w=i+x*(c-i),T=this.getLineLength(d,h,S,w),R=Math.sqrt(e*e-T*T),D=Math.sqrt(R*R/(1+u*u))*(s<n?-1:1),N=u*D;return{x:S+D,y:w+N}}static getPointOnCubicBezier(e,n,i,s,c,d,h,p,u){function A(R){return R*R*R}function y(R){return 3*R*R*(1-R)}function x(R){return 3*R*(1-R)*(1-R)}function S(R){return(1-R)*(1-R)*(1-R)}const w=p*A(e)+d*y(e)+s*x(e)+n*S(e),T=u*A(e)+h*y(e)+c*x(e)+i*S(e);return{x:w,y:T}}static getPointOnQuadraticBezier(e,n,i,s,c,d,h){function p(S){return S*S}function u(S){return 2*S*(1-S)}function A(S){return(1-S)*(1-S)}const y=d*p(e)+s*u(e)+n*A(e),x=h*p(e)+c*u(e)+i*A(e);return{x:y,y:x}}static getPointOnEllipticalArc(e,n,i,s,c,d){const h=Math.cos(d),p=Math.sin(d),u={x:i*Math.cos(c),y:s*Math.sin(c)};return{x:e+(u.x*h-u.y*p),y:n+(u.x*p+u.y*h)}}static parsePathData(e){if(!e)return[];let n=e;const i=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(let y=0;y<i.length;y++)n=n.replace(new RegExp(i[y],"g"),"|"+i[y]);const s=n.split("|"),c=[],d=[];let h=0,p=0;const u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let A;for(let y=1;y<s.length;y++){let x=s[y],S=x.charAt(0);for(x=x.slice(1),d.length=0;A=u.exec(x);)d.push(A[0]);let w=[],T=S==="A"||S==="a"?0:-1;for(let R=0,D=d.length;R<D;R++){const N=d[R];if(N==="00"){w.push(0,0),T>=0&&(T+=2,T>=7&&(T-=7));continue}if(T>=0){if(T===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(N)){w.push(parseInt(N[0],10)),w.push(parseInt(N[1],10)),w.push(parseFloat(N.slice(2))),T+=3,T>=7&&(T-=7);continue}if(N==="11"||N==="10"||N==="01"){w.push(parseInt(N[0],10)),w.push(parseInt(N[1],10)),T+=2,T>=7&&(T-=7);continue}if(N==="0"||N==="1"){w.push(parseInt(N,10)),T+=1,T>=7&&(T-=7);continue}}else if(T===4){if(/^[01]\d+(?:\.\d+)?$/.test(N)){w.push(parseInt(N[0],10)),w.push(parseFloat(N.slice(1))),T+=2,T>=7&&(T-=7);continue}if(N==="0"||N==="1"){w.push(parseInt(N,10)),T+=1,T>=7&&(T-=7);continue}}const M=parseFloat(N);isNaN(M)?w.push(0):w.push(M),T+=1,T>=7&&(T-=7)}else{const M=parseFloat(N);isNaN(M)?w.push(0):w.push(M)}}for(;w.length>0&&!isNaN(w[0]);){let R="",D=[];const N=h,M=p;let O,I,Y,J,q,W,V,ge,X,ae;switch(S){case"l":h+=w.shift(),p+=w.shift(),R="L",D.push(h,p);break;case"L":h=w.shift(),p=w.shift(),D.push(h,p);break;case"m":const L=w.shift(),te=w.shift();if(h+=L,p+=te,R="M",c.length>2&&c[c.length-1].command==="z"){for(let le=c.length-2;le>=0;le--)if(c[le].command==="M"){h=c[le].points[0]+L,p=c[le].points[1]+te;break}}D.push(h,p),S="l";break;case"M":h=w.shift(),p=w.shift(),R="M",D.push(h,p),S="L";break;case"h":h+=w.shift(),R="L",D.push(h,p);break;case"H":h=w.shift(),R="L",D.push(h,p);break;case"v":p+=w.shift(),R="L",D.push(h,p);break;case"V":p=w.shift(),R="L",D.push(h,p);break;case"C":D.push(w.shift(),w.shift(),w.shift(),w.shift()),h=w.shift(),p=w.shift(),D.push(h,p);break;case"c":D.push(h+w.shift(),p+w.shift(),h+w.shift(),p+w.shift()),h+=w.shift(),p+=w.shift(),R="C",D.push(h,p);break;case"S":I=h,Y=p,O=c[c.length-1],O.command==="C"&&(I=h+(h-O.points[2]),Y=p+(p-O.points[3])),D.push(I,Y,w.shift(),w.shift()),h=w.shift(),p=w.shift(),R="C",D.push(h,p);break;case"s":I=h,Y=p,O=c[c.length-1],O.command==="C"&&(I=h+(h-O.points[2]),Y=p+(p-O.points[3])),D.push(I,Y,h+w.shift(),p+w.shift()),h+=w.shift(),p+=w.shift(),R="C",D.push(h,p);break;case"Q":D.push(w.shift(),w.shift()),h=w.shift(),p=w.shift(),D.push(h,p);break;case"q":D.push(h+w.shift(),p+w.shift()),h+=w.shift(),p+=w.shift(),R="Q",D.push(h,p);break;case"T":I=h,Y=p,O=c[c.length-1],O.command==="Q"&&(I=h+(h-O.points[0]),Y=p+(p-O.points[1])),h=w.shift(),p=w.shift(),R="Q",D.push(I,Y,h,p);break;case"t":I=h,Y=p,O=c[c.length-1],O.command==="Q"&&(I=h+(h-O.points[0]),Y=p+(p-O.points[1])),h+=w.shift(),p+=w.shift(),R="Q",D.push(I,Y,h,p);break;case"A":J=w.shift(),q=w.shift(),W=w.shift(),V=w.shift(),ge=w.shift(),X=h,ae=p,h=w.shift(),p=w.shift(),R="A",D=this.convertEndpointToCenterParameterization(X,ae,h,p,V,ge,J,q,W);break;case"a":J=w.shift(),q=w.shift(),W=w.shift(),V=w.shift(),ge=w.shift(),X=h,ae=p,h+=w.shift(),p+=w.shift(),R="A",D=this.convertEndpointToCenterParameterization(X,ae,h,p,V,ge,J,q,W);break}c.push({command:R||S,points:D,start:{x:N,y:M},pathLength:this.calcLength(N,M,R||S,D)})}(S==="z"||S==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(e,n,i,s){let c,d,h,p;const u=Cn;switch(i){case"L":return u.getLineLength(e,n,s[0],s[1]);case"C":return T2([e,s[0],s[2],s[4]],[n,s[1],s[3],s[5]],1);case"Q":return R2([e,s[0],s[2]],[n,s[1],s[3]],1);case"A":c=0;const A=s[4],y=s[5],x=s[4]+y;let S=Math.PI/180;if(Math.abs(A-x)<S&&(S=Math.abs(A-x)),d=u.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],A,0),y<0)for(p=A-S;p>x;p-=S)h=u.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],p,0),c+=u.getLineLength(d.x,d.y,h.x,h.y),d=h;else for(p=A+S;p<x;p+=S)h=u.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],p,0),c+=u.getLineLength(d.x,d.y,h.x,h.y),d=h;return h=u.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],x,0),c+=u.getLineLength(d.x,d.y,h.x,h.y),c}return 0}static convertEndpointToCenterParameterization(e,n,i,s,c,d,h,p,u){const A=u*(Math.PI/180),y=Math.cos(A)*(e-i)/2+Math.sin(A)*(n-s)/2,x=-1*Math.sin(A)*(e-i)/2+Math.cos(A)*(n-s)/2,S=y*y/(h*h)+x*x/(p*p);S>1&&(h*=Math.sqrt(S),p*=Math.sqrt(S));let w=Math.sqrt((h*h*(p*p)-h*h*(x*x)-p*p*(y*y))/(h*h*(x*x)+p*p*(y*y)));c===d&&(w*=-1),isNaN(w)&&(w=0);const T=w*h*x/p,R=w*-p*y/h,D=(e+i)/2+Math.cos(A)*T-Math.sin(A)*R,N=(n+s)/2+Math.sin(A)*T+Math.cos(A)*R,M=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},O=function(V,ge){return(V[0]*ge[0]+V[1]*ge[1])/(M(V)*M(ge))},I=function(V,ge){return(V[0]*ge[1]<V[1]*ge[0]?-1:1)*Math.acos(O(V,ge))},Y=I([1,0],[(y-T)/h,(x-R)/p]),J=[(y-T)/h,(x-R)/p],q=[(-1*y-T)/h,(-1*x-R)/p];let W=I(J,q);return O(J,q)<=-1&&(W=Math.PI),O(J,q)>=1&&(W=0),d===0&&W>0&&(W=W-2*Math.PI),d===1&&W<0&&(W=W+2*Math.PI),[D,N,h,p,Y,W,A,d]}}Cn.prototype.className="Path";Cn.prototype._attrsAffectingSize=["data"];Mn(Cn);ee.addGetterSetter(Cn,"data");let jl=class extends eo{_sceneFunc(e){super._sceneFunc(e);const n=Math.PI*2,i=this.points();let s=i;const c=this.tension()!==0&&i.length>4;c&&(s=this.getTensionPoints());const d=this.pointerLength(),h=i.length;let p,u;if(c){const x=[s[s.length-4],s[s.length-3],s[s.length-2],s[s.length-1],i[h-2],i[h-1]],S=Cn.calcLength(s[s.length-4],s[s.length-3],"C",x),w=Cn.getPointOnQuadraticBezier(Math.min(1,1-d/S),x[0],x[1],x[2],x[3],x[4],x[5]);p=i[h-2]-w.x,u=i[h-1]-w.y}else p=i[h-2]-i[h-4],u=i[h-1]-i[h-3];const A=(Math.atan2(u,p)+n)%n,y=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(i[h-2],i[h-1]),e.rotate(A),e.moveTo(0,0),e.lineTo(-d,y/2),e.lineTo(-d,-y/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(i[0],i[1]),c?(p=(s[0]+s[2])/2-i[0],u=(s[1]+s[3])/2-i[1]):(p=i[2]-i[0],u=i[3]-i[1]),e.rotate((Math.atan2(-u,-p)+n)%n),e.moveTo(0,0),e.lineTo(-d,y/2),e.lineTo(-d,-y/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){const n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),n=this.pointerWidth()/2;return{x:e.x,y:e.y-n,width:e.width,height:e.height+n*2}}};jl.prototype.className="Arrow";Mn(jl);ee.addGetterSetter(jl,"pointerLength",10,We());ee.addGetterSetter(jl,"pointerWidth",10,We());ee.addGetterSetter(jl,"pointerAtBeginning",!1);ee.addGetterSetter(jl,"pointerAtEnding",!0);class Nu extends Ie{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}Nu.prototype._centroid=!0;Nu.prototype.className="Circle";Nu.prototype._attrsAffectingSize=["radius"];Mn(Nu);ee.addGetterSetter(Nu,"radius",0,We());let Wo=class extends Ie{_sceneFunc(e){const n=this.radiusX(),i=this.radiusY();e.beginPath(),e.save(),n!==i&&e.scale(1,i/n),e.arc(0,0,n,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};Wo.prototype.className="Ellipse";Wo.prototype._centroid=!0;Wo.prototype._attrsAffectingSize=["radiusX","radiusY"];Mn(Wo);ee.addComponentsGetterSetter(Wo,"radius",["x","y"]);ee.addGetterSetter(Wo,"radiusX",0,We());ee.addGetterSetter(Wo,"radiusY",0,We());let Ii=class Zx extends Ie{constructor(e){super(e),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",n=>{this._removeImageLoad(n.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",this._loadListener)}_removeImageLoad(e){e&&e.removeEventListener&&e.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const e=!!this.cornerRadius(),n=this.hasShadow();return e&&n?!0:super._useBufferCanvas(!0)}_sceneFunc(e){const n=this.getWidth(),i=this.getHeight(),s=this.cornerRadius(),c=this.attrs.image;let d;if(c){const h=this.attrs.cropWidth,p=this.attrs.cropHeight;h&&p?d=[c,this.cropX(),this.cropY(),h,p,0,0,n,i]:d=[c,0,0,n,i]}(this.hasFill()||this.hasStroke()||s)&&(e.beginPath(),s?pe.drawRoundedRectPath(e,n,i,s):e.rect(0,0,n,i),e.closePath(),e.fillStrokeShape(this)),c&&(s&&e.clip(),e.drawImage.apply(e,d))}_hitFunc(e){const n=this.width(),i=this.height(),s=this.cornerRadius();e.beginPath(),s?pe.drawRoundedRectPath(e,n,i,s):e.rect(0,0,n,i),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,n,i;return(i=(e=this.attrs.width)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:0}getHeight(){var e,n,i;return(i=(e=this.attrs.height)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.height)!==null&&i!==void 0?i:0}static fromURL(e,n,i=null){const s=pe.createImageElement();s.onload=function(){const c=new Zx({image:s});n(c)},s.onerror=i,s.crossOrigin="Anonymous",s.src=e}};Ii.prototype.className="Image";Ii.prototype._attrsAffectingSize=["image"];Mn(Ii);ee.addGetterSetter(Ii,"cornerRadius",0,yA(4));ee.addGetterSetter(Ii,"image");ee.addComponentsGetterSetter(Ii,"crop",["x","y","width","height"]);ee.addGetterSetter(Ii,"cropX",0,We());ee.addGetterSetter(Ii,"cropY",0,We());ee.addGetterSetter(Ii,"cropWidth",0,We());ee.addGetterSetter(Ii,"cropHeight",0,We());const $x=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],XC="Change.konva",WC="none",Fg="up",Ig="right",Og="down",Ug="left",QC=$x.length;class rv extends ku{constructor(e){super(e),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){let n=this,i;const s=function(){n._sync()};for(i=0;i<QC;i++)e.on($x[i]+XC,s)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let e=this.getText(),n=this.getTag(),i,s,c,d,h,p,u;if(e&&n){switch(i=e.width(),s=e.height(),c=n.pointerDirection(),d=n.pointerWidth(),u=n.pointerHeight(),h=0,p=0,c){case Fg:h=i/2,p=-1*u;break;case Ig:h=i+d,p=s/2;break;case Og:h=i/2,p=s+u;break;case Ug:h=-1*d,p=s/2;break}n.setAttrs({x:-1*h,y:-1*p,width:i,height:s}),e.setAttrs({x:-1*h,y:-1*p})}}}rv.prototype.className="Label";Mn(rv);class Gl extends Ie{_sceneFunc(e){const n=this.width(),i=this.height(),s=this.pointerDirection(),c=this.pointerWidth(),d=this.pointerHeight(),h=this.cornerRadius();let p=0,u=0,A=0,y=0;typeof h=="number"?p=u=A=y=Math.min(h,n/2,i/2):(p=Math.min(h[0]||0,n/2,i/2),u=Math.min(h[1]||0,n/2,i/2),y=Math.min(h[2]||0,n/2,i/2),A=Math.min(h[3]||0,n/2,i/2)),e.beginPath(),e.moveTo(p,0),s===Fg&&(e.lineTo((n-c)/2,0),e.lineTo(n/2,-1*d),e.lineTo((n+c)/2,0)),e.lineTo(n-u,0),e.arc(n-u,u,u,Math.PI*3/2,0,!1),s===Ig&&(e.lineTo(n,(i-d)/2),e.lineTo(n+c,i/2),e.lineTo(n,(i+d)/2)),e.lineTo(n,i-y),e.arc(n-y,i-y,y,0,Math.PI/2,!1),s===Og&&(e.lineTo((n+c)/2,i),e.lineTo(n/2,i+d),e.lineTo((n-c)/2,i)),e.lineTo(A,i),e.arc(A,i-A,A,Math.PI/2,Math.PI,!1),s===Ug&&(e.lineTo(0,(i+d)/2),e.lineTo(-1*c,i/2),e.lineTo(0,(i-d)/2)),e.lineTo(0,p),e.arc(p,p,p,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){let e=0,n=0,i=this.pointerWidth(),s=this.pointerHeight(),c=this.pointerDirection(),d=this.width(),h=this.height();return c===Fg?(n-=s,h+=s):c===Og?h+=s:c===Ug?(e-=i*1.5,d+=i):c===Ig&&(d+=i*1.5),{x:e,y:n,width:d,height:h}}}Gl.prototype.className="Tag";Mn(Gl);ee.addGetterSetter(Gl,"pointerDirection",WC);ee.addGetterSetter(Gl,"pointerWidth",0,We());ee.addGetterSetter(Gl,"pointerHeight",0,We());ee.addGetterSetter(Gl,"cornerRadius",0,yA(4));let Pf=class extends Ie{_sceneFunc(e){const n=this.cornerRadius(),i=this.width(),s=this.height();e.beginPath(),n?pe.drawRoundedRectPath(e,i,s,n):e.rect(0,0,i,s),e.closePath(),e.fillStrokeShape(this)}};Pf.prototype.className="Rect";Mn(Pf);ee.addGetterSetter(Pf,"cornerRadius",0,yA(4));class Qo extends Ie{_sceneFunc(e){const n=this._getPoints(),i=this.radius(),s=this.sides(),c=this.cornerRadius();if(e.beginPath(),c)pe.drawRoundedPolygonPath(e,n,s,i,c);else{e.moveTo(n[0].x,n[0].y);for(let d=1;d<n.length;d++)e.lineTo(n[d].x,n[d].y)}e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,n=this.attrs.radius||0,i=[];for(let s=0;s<e;s++)i.push({x:n*Math.sin(s*2*Math.PI/e),y:-1*n*Math.cos(s*2*Math.PI/e)});return i}getSelfRect(){const e=this._getPoints();let n=e[0].x,i=e[0].x,s=e[0].y,c=e[0].y;return e.forEach(d=>{n=Math.min(n,d.x),i=Math.max(i,d.x),s=Math.min(s,d.y),c=Math.max(c,d.y)}),{x:n,y:s,width:i-n,height:c-s}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}Qo.prototype.className="RegularPolygon";Qo.prototype._centroid=!0;Qo.prototype._attrsAffectingSize=["radius"];Mn(Qo);ee.addGetterSetter(Qo,"radius",0,We());ee.addGetterSetter(Qo,"sides",0,We());ee.addGetterSetter(Qo,"cornerRadius",0,yA(4));const L2=Math.PI*2;class Hl extends Ie{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,L2,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),L2,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}Hl.prototype.className="Ring";Hl.prototype._centroid=!0;Hl.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Mn(Hl);ee.addGetterSetter(Hl,"innerRadius",0,We());ee.addGetterSetter(Hl,"outerRadius",0,We());class ps extends Ie{constructor(e){super(e),this._updated=!0,this.anim=new Ai(()=>{const n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(e){const n=this.animation(),i=this.frameIndex(),s=i*4,c=this.animations()[n],d=this.frameOffsets(),h=c[s+0],p=c[s+1],u=c[s+2],A=c[s+3],y=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,u,A),e.closePath(),e.fillStrokeShape(this)),y)if(d){const x=d[n],S=i*2;e.drawImage(y,h,p,u,A,x[S+0],x[S+1],u,A)}else e.drawImage(y,h,p,u,A,0,0,u,A)}_hitFunc(e){const n=this.animation(),i=this.frameIndex(),s=i*4,c=this.animations()[n],d=this.frameOffsets(),h=c[s+2],p=c[s+3];if(e.beginPath(),d){const u=d[n],A=i*2;e.rect(u[A+0],u[A+1],h,p)}else e.rect(0,0,h,p);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const e=this.frameIndex(),n=this.animation(),i=this.animations(),s=i[n],c=s.length/4;e<c-1?this.frameIndex(e+1):this.frameIndex(0)}}ps.prototype.className="Sprite";Mn(ps);ee.addGetterSetter(ps,"animation");ee.addGetterSetter(ps,"animations");ee.addGetterSetter(ps,"frameOffsets");ee.addGetterSetter(ps,"image");ee.addGetterSetter(ps,"frameIndex",0,We());ee.addGetterSetter(ps,"frameRate",17,We());ee.backCompat(ps,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Yo extends Ie{_sceneFunc(e){const n=this.innerRadius(),i=this.outerRadius(),s=this.numPoints();e.beginPath(),e.moveTo(0,0-i);for(let c=1;c<s*2;c++){const d=c%2===0?i:n,h=d*Math.sin(c*Math.PI/s),p=-1*d*Math.cos(c*Math.PI/s);e.lineTo(h,p)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}Yo.prototype.className="Star";Yo.prototype._centroid=!0;Yo.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Mn(Yo);ee.addGetterSetter(Yo,"numPoints",5,We());ee.addGetterSetter(Yo,"innerRadius",0,We());ee.addGetterSetter(Yo,"outerRadius",0,We());function Io(t){return[...t].reduce((e,n,i,s)=>{if(new RegExp("\\p{Emoji}","u").test(n)){const c=s[i+1];c&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(c)?(e.push(n+c),s[i+1]=""):e.push(n)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(n+(s[i+1]||""))?e.push(n+s[i+1]):i>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(n)?e[e.length-1]+=n:n&&e.push(n);return e},[])}const xu="auto",YC="center",eb="inherit",ff="justify",VC="Change.konva",qC="2d",k2="-",tb="left",KC="text",JC="Text",ZC="top",$C="bottom",N2="middle",nb="normal",e8="px ",Qp=" ",t8="right",P2="rtl",n8="word",r8="char",B2="none",lg="…",rb=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],a8=rb.length;function i8(t){return t.split(",").map(e=>{e=e.trim();const n=e.indexOf(" ")>=0,i=e.indexOf('"')>=0||e.indexOf("'")>=0;return n&&!i&&(e=`"${e}"`),e}).join(", ")}let Yp;function cg(){return Yp||(Yp=pe.createCanvasElement().getContext(qC),Yp)}function s8(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o8(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function l8(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}let _n=class extends Ie{constructor(e){super(l8(e)),this._partialTextX=0,this._partialTextY=0;for(let n=0;n<a8;n++)this.on(rb[n]+VC,this._setTextData);this._setTextData()}_sceneFunc(e){var n,i;const s=this.textArr,c=s.length;if(!this.text())return;let d=this.padding(),h=this.fontSize(),p=this.lineHeight()*h,u=this.verticalAlign(),A=this.direction(),y=0,x=this.align(),S=this.getWidth(),w=this.letterSpacing(),T=this.charRenderFunc(),R=this.fill(),D=this.textDecoration(),N=this.underlineOffset(),M=D.indexOf("underline")!==-1,O=D.indexOf("line-through")!==-1,I;A=A===eb?e.direction:A;let Y=p/2,J=N2;if(!Ye.legacyTextRendering){const q=this.measureSize("M");J="alphabetic";const W=(n=q.fontBoundingBoxAscent)!==null&&n!==void 0?n:q.actualBoundingBoxAscent,V=(i=q.fontBoundingBoxDescent)!==null&&i!==void 0?i:q.actualBoundingBoxDescent;Y=(W-V)/2+p/2}for(A===P2&&e.setAttr("direction",A),e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",J),e.setAttr("textAlign",tb),u===N2?y=(this.getHeight()-c*p-d*2)/2:u===$C&&(y=this.getHeight()-c*p-d*2),e.translate(d,y+d),I=0;I<c;I++){let q=0,W=0;const V=s[I],ge=V.text,X=V.width,ae=V.lastInParagraph;if(e.save(),x===t8?q+=S-X-d*2:x===YC&&(q+=(S-X-d*2)/2),M){e.save(),e.beginPath();const te=N??(Ye.legacyTextRendering?Math.round(h/2):Math.round(h/4)),le=q,Ae=Y+W+te;e.moveTo(le,Ae);const ne=x===ff&&!ae?S-d*2:X;e.lineTo(le+Math.round(ne),Ae),e.lineWidth=h/15;const oe=this._getLinearGradient();e.strokeStyle=oe||R,e.stroke(),e.restore()}const L=q;if(A!==P2&&(w!==0||x===ff||T)){const te=ge.split(" ").length-1,le=Io(ge);for(let Ae=0;Ae<le.length;Ae++){const ne=le[Ae];if(ne===" "&&!ae&&x===ff&&(q+=(S-d*2-X)/te),this._partialTextX=q,this._partialTextY=Y+W,this._partialText=ne,T){e.save();const ie=s.slice(0,I).reduce((K,ve)=>K+Io(ve.text).length,0),j=Ae+ie;T({char:ne,index:j,x:q,y:Y+W,lineIndex:I,column:Ae,isLastInLine:ae,width:this.measureSize(ne).width,context:e})}e.fillStrokeShape(this),T&&e.restore(),q+=this.measureSize(ne).width+w}}else w!==0&&e.setAttr("letterSpacing",`${w}px`),this._partialTextX=q,this._partialTextY=Y+W,this._partialText=ge,e.fillStrokeShape(this);if(O){e.save(),e.beginPath();const te=Ye.legacyTextRendering?0:-Math.round(h/4),le=L;e.moveTo(le,Y+W+te);const Ae=x===ff&&!ae?S-d*2:X;e.lineTo(le+Math.round(Ae),Y+W+te),e.lineWidth=h/15;const ne=this._getLinearGradient();e.strokeStyle=ne||R,e.stroke(),e.restore()}e.restore(),c>1&&(Y+=p)}}_hitFunc(e){const n=this.getWidth(),i=this.getHeight();e.beginPath(),e.rect(0,0,n,i),e.closePath(),e.fillStrokeShape(this)}setText(e){const n=pe._isString(e)?e:e==null?"":e+"";return this._setAttr(KC,n),this}getWidth(){return this.attrs.width===xu||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===xu||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return pe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var n,i,s,c,d,h,p,u,A,y,x;let S=cg(),w=this.fontSize(),T;S.save(),S.font=this._getContextFont(),T=S.measureText(e),S.restore();const R=w/100;return{actualBoundingBoxAscent:(n=T.actualBoundingBoxAscent)!==null&&n!==void 0?n:71.58203125*R,actualBoundingBoxDescent:(i=T.actualBoundingBoxDescent)!==null&&i!==void 0?i:0,actualBoundingBoxLeft:(s=T.actualBoundingBoxLeft)!==null&&s!==void 0?s:-7.421875*R,actualBoundingBoxRight:(c=T.actualBoundingBoxRight)!==null&&c!==void 0?c:75.732421875*R,alphabeticBaseline:(d=T.alphabeticBaseline)!==null&&d!==void 0?d:0,emHeightAscent:(h=T.emHeightAscent)!==null&&h!==void 0?h:100*R,emHeightDescent:(p=T.emHeightDescent)!==null&&p!==void 0?p:-20*R,fontBoundingBoxAscent:(u=T.fontBoundingBoxAscent)!==null&&u!==void 0?u:91*R,fontBoundingBoxDescent:(A=T.fontBoundingBoxDescent)!==null&&A!==void 0?A:21*R,hangingBaseline:(y=T.hangingBaseline)!==null&&y!==void 0?y:72.80000305175781*R,ideographicBaseline:(x=T.ideographicBaseline)!==null&&x!==void 0?x:-21*R,width:T.width,height:w}}_getContextFont(){return this.fontStyle()+Qp+this.fontVariant()+Qp+(this.fontSize()+e8)+i8(this.fontFamily())}_addTextLine(e){this.align()===ff&&(e=e.trim());const i=this._getTextWidth(e);return this.textArr.push({text:e,width:i,lastInParagraph:!1})}_getTextWidth(e){const n=this.letterSpacing(),i=e.length;return cg().measureText(e).width+n*i}_setTextData(){let e=this.text().split(`
328
- `),n=+this.fontSize(),i=0,s=this.lineHeight()*n,c=this.attrs.width,d=this.attrs.height,h=c!==xu&&c!==void 0,p=d!==xu&&d!==void 0,u=this.padding(),A=c-u*2,y=d-u*2,x=0,S=this.wrap(),w=S!==B2,T=S!==r8&&w,R=this.ellipsis();this.textArr=[],cg().font=this._getContextFont();const D=R?this._getTextWidth(lg):0;for(let N=0,M=e.length;N<M;++N){let O=e[N],I=this._getTextWidth(O);if(h&&I>A)for(;O.length>0;){let Y=0,J=Io(O).length,q="",W=0;for(;Y<J;){const V=Y+J>>>1,ge=Io(O),X=ge.slice(0,V+1).join(""),ae=this._getTextWidth(X);(R&&p&&x+s>y?ae+D:ae)<=A?(Y=V+1,q=X,W=ae):J=V}if(q){if(T){const X=Io(O),ae=Io(q),L=X[ae.length],te=L===Qp||L===k2;let le;if(te&&W<=A)le=ae.length;else{const Ae=ae.lastIndexOf(Qp),ne=ae.lastIndexOf(k2);le=Math.max(Ae,ne)+1}le>0&&(Y=le,q=X.slice(0,Y).join(""),W=this._getTextWidth(q))}if(q=q.trimRight(),this._addTextLine(q),i=Math.max(i,W),x+=s,this._shouldHandleEllipsis(x)){this._tryToAddEllipsisToLastLine();break}if(O=Io(O).slice(Y).join("").trimLeft(),O.length>0&&(I=this._getTextWidth(O),I<=A)){this._addTextLine(O),x+=s,i=Math.max(i,I);break}}else break}else this._addTextLine(O),x+=s,i=Math.max(i,I),this._shouldHandleEllipsis(x)&&N<M-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),p&&x+s>y)break}this.textHeight=n,this.textWidth=i}_shouldHandleEllipsis(e){const n=+this.fontSize(),i=this.lineHeight()*n,s=this.attrs.height,c=s!==xu&&s!==void 0,d=this.padding(),h=s-d*2;return!(this.wrap()!==B2)||c&&e+i>h}_tryToAddEllipsisToLastLine(){const e=this.attrs.width,n=e!==xu&&e!==void 0,i=this.padding(),s=e-i*2,c=this.ellipsis(),d=this.textArr[this.textArr.length-1];!d||!c||(n&&(this._getTextWidth(d.text+lg)<s||(d.text=d.text.slice(0,d.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(d.text+lg))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const e=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,n=this.hasShadow();return e&&n?!0:super._useBufferCanvas()}};_n.prototype._fillFunc=s8;_n.prototype._strokeFunc=o8;_n.prototype.className=JC;_n.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];Mn(_n);ee.overWriteSetter(_n,"width",ev());ee.overWriteSetter(_n,"height",ev());ee.addGetterSetter(_n,"direction",eb);ee.addGetterSetter(_n,"fontFamily","Arial");ee.addGetterSetter(_n,"fontSize",12,We());ee.addGetterSetter(_n,"fontStyle",nb);ee.addGetterSetter(_n,"fontVariant",nb);ee.addGetterSetter(_n,"padding",0,We());ee.addGetterSetter(_n,"align",tb);ee.addGetterSetter(_n,"verticalAlign",ZC);ee.addGetterSetter(_n,"lineHeight",1,We());ee.addGetterSetter(_n,"wrap",n8);ee.addGetterSetter(_n,"ellipsis",!1,Fi());ee.addGetterSetter(_n,"letterSpacing",0,We());ee.addGetterSetter(_n,"text","",Ol());ee.addGetterSetter(_n,"textDecoration","");ee.addGetterSetter(_n,"underlineOffset",void 0,We());ee.addGetterSetter(_n,"charRenderFunc",void 0);const c8="",ab="normal";function ib(t){t.fillText(this.partialText,0,0)}function sb(t){t.strokeText(this.partialText,0,0)}class hr extends Ie{constructor(e){super(e),this.dummyCanvas=pe.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return Cn.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;const n=this.pathLength;return e>n?null:Cn.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=Cn.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();const n=this.textDecoration(),i=this.fill(),s=this.fontSize(),c=this.glyphInfo,d=n.indexOf("underline")!==-1,h=n.indexOf("line-through")!==-1;d&&e.beginPath();for(let p=0;p<c.length;p++){e.save();const u=c[p].p0;e.translate(u.x,u.y),e.rotate(c[p].rotation),this.partialText=c[p].text,e.fillStrokeShape(this),d&&(p===0&&e.moveTo(0,s/2+1),e.lineTo(c[p].width,s/2+1)),e.restore()}if(d&&(e.strokeStyle=i,e.lineWidth=s/20,e.stroke()),h){e.beginPath();for(let p=0;p<c.length;p++){e.save();const u=c[p].p0;e.translate(u.x,u.y),e.rotate(c[p].rotation),p===0&&e.moveTo(0,0),e.lineTo(c[p].width,0),e.restore()}e.strokeStyle=i,e.lineWidth=s/20,e.stroke()}e.restore()}_hitFunc(e){e.beginPath();const n=this.glyphInfo;if(n.length>=1){const i=n[0].p0;e.moveTo(i.x,i.y)}for(let i=0;i<n.length;i++){const s=n[i].p1;e.lineTo(s.x,s.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return pe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return _n.prototype.setText.call(this,e)}_getContextFont(){return _n.prototype._getContextFont.call(this)}_getTextSize(e){const i=this.dummyCanvas.getContext("2d");i.save(),i.font=this._getContextFont();const s=i.measureText(e);return i.restore(),{width:s.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const e=Io(this.text()),n=[];let i=0;for(let y=0;y<e.length;y++)n.push({char:e[y],width:this._getTextSize(e[y]).width}),i+=n[y].width;const{height:s}=this._getTextSize(this.attrs.text);if(this.textWidth=i,this.textHeight=s,this.glyphInfo=[],!this.attrs.data)return null;const c=this.letterSpacing(),d=this.align(),h=this.kerningFunc(),p=Math.max(this.textWidth+((this.attrs.text||"").length-1)*c,0);let u=0;d==="center"&&(u=Math.max(0,this.pathLength/2-p/2)),d==="right"&&(u=Math.max(0,this.pathLength-p));let A=u;for(let y=0;y<n.length;y++){const x=this._getPointAtLength(A);if(!x)return;const S=n[y].char;let w=n[y].width+c;if(S===" "&&d==="justify"){const O=this.text().split(" ").length-1;w+=(this.pathLength-p)/O}const T=this._getPointAtLength(A+w);if(!T)return;const R=Cn.getLineLength(x.x,x.y,T.x,T.y);let D=0;if(h)try{D=h(n[y-1].char,S)*this.fontSize()}catch{D=0}x.x+=D,T.x+=D,this.textWidth+=D;const N=Cn.getPointOnLine(D+R/2,x.x,x.y,T.x,T.y),M=Math.atan2(T.y-x.y,T.x-x.x);this.glyphInfo.push({transposeX:N.x,transposeY:N.y,text:e[y],rotation:M,p0:x,p1:T,width:R}),A+=w}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const e=[];this.glyphInfo.forEach(function(u){e.push(u.p0.x),e.push(u.p0.y),e.push(u.p1.x),e.push(u.p1.y)});let n=e[0]||0,i=e[0]||0,s=e[1]||0,c=e[1]||0,d,h;for(let u=0;u<e.length/2;u++)d=e[u*2],h=e[u*2+1],n=Math.min(n,d),i=Math.max(i,d),s=Math.min(s,h),c=Math.max(c,h);const p=this.fontSize();return{x:n-p/2,y:s-p/2,width:i-n+p,height:c-s+p}}destroy(){return pe.releaseCanvas(this.dummyCanvas),super.destroy()}}hr.prototype._fillFunc=ib;hr.prototype._strokeFunc=sb;hr.prototype._fillFuncHit=ib;hr.prototype._strokeFuncHit=sb;hr.prototype.className="TextPath";hr.prototype._attrsAffectingSize=["text","fontSize","data"];Mn(hr);ee.addGetterSetter(hr,"data");ee.addGetterSetter(hr,"fontFamily","Arial");ee.addGetterSetter(hr,"fontSize",12,We());ee.addGetterSetter(hr,"fontStyle",ab);ee.addGetterSetter(hr,"align","left");ee.addGetterSetter(hr,"letterSpacing",0,We());ee.addGetterSetter(hr,"textBaseline","middle");ee.addGetterSetter(hr,"fontVariant",ab);ee.addGetterSetter(hr,"text",c8);ee.addGetterSetter(hr,"textDecoration","");ee.addGetterSetter(hr,"kerningFunc",void 0);const ob="tr-konva",u8=["resizeEnabledChange","rotateAnchorOffsetChange","rotateAnchorAngleChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${ob}`).join(" "),M2="nodesRect",d8=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],f8={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},h8="ontouchstart"in Ye._global;function p8(t,e,n){if(t==="rotater")return n;e+=pe.degToRad(f8[t]||0);const i=(pe.radToDeg(e)%360+360)%360;return pe._inRange(i,315+22.5,360)||pe._inRange(i,0,22.5)?"ns-resize":pe._inRange(i,45-22.5,45+22.5)?"nesw-resize":pe._inRange(i,90-22.5,90+22.5)?"ew-resize":pe._inRange(i,135-22.5,135+22.5)?"nwse-resize":pe._inRange(i,180-22.5,180+22.5)?"ns-resize":pe._inRange(i,225-22.5,225+22.5)?"nesw-resize":pe._inRange(i,270-22.5,270+22.5)?"ew-resize":pe._inRange(i,315-22.5,315+22.5)?"nwse-resize":(pe.error("Transformer has unknown angle for cursor detection: "+i),"pointer")}const uA=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function A8(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function lb(t,e,n){const i=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),s=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:i,y:s}}function m8(t,e){const n=A8(t);return lb(t,e,n)}function g8(t,e,n){let i=e;for(let s=0;s<t.length;s++){const c=Ye.getAngle(t[s]),d=Math.abs(c-e)%(Math.PI*2);Math.min(d,Math.PI*2-d)<n&&(i=c)}return i}let jg=0,Kt=class extends ku{constructor(e){super(e),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(u8,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return pe.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return ob+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const n=e.filter(s=>s.isAncestorOf(this)?(pe.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=e=n,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(s=>{const c=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(s._attrsAffectingSize.length){const d=s._attrsAffectingSize.map(h=>h+"Change."+this._getEventNamespace()).join(" ");s.on(d,c)}s.on(d8.map(d=>d+`.${this._getEventNamespace()}`).join(" "),c),s.on(`absoluteTransformChange.${this._getEventNamespace()}`,c),this._proxyDrag(s)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let n;e.on(`dragstart.${this._getEventNamespace()}`,i=>{n=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(i,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,i=>{if(!n)return;const s=e.getAbsolutePosition(),c=s.x-n.x,d=s.y-n.y;this.nodes().forEach(h=>{if(h===e||h.isDragging())return;const p=h.getAbsolutePosition();h.setAbsolutePosition({x:p.x+c,y:p.y+d}),h.startDrag(i)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(M2),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(M2,this.__getNodeRect)}__getNodeShape(e,n=this.rotation(),i){const s=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),c=e.getAbsoluteScale(i),d=e.getAbsolutePosition(i),h=s.x*c.x-e.offsetX()*c.x,p=s.y*c.y-e.offsetY()*c.y,u=(Ye.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),A={x:d.x+h*Math.cos(u)+p*Math.sin(-u),y:d.y+p*Math.cos(u)+h*Math.sin(u),width:s.width*c.x,height:s.height*c.y,rotation:u};return lb(A,-Ye.getAngle(n),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const A=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),y=[{x:A.x,y:A.y},{x:A.x+A.width,y:A.y},{x:A.x+A.width,y:A.y+A.height},{x:A.x,y:A.y+A.height}],x=u.getAbsoluteTransform();y.forEach(function(S){const w=x.point(S);n.push(w)})});const i=new Va;i.rotate(-Ye.getAngle(this.rotation()));let s=1/0,c=1/0,d=-1/0,h=-1/0;n.forEach(function(u){const A=i.point(u);s===void 0&&(s=d=A.x,c=h=A.y),s=Math.min(s,A.x),c=Math.min(c,A.y),d=Math.max(d,A.x),h=Math.max(h,A.y)}),i.invert();const p=i.point({x:s,y:c});return{x:p.x,y:p.y,width:d-s,height:h-c,rotation:Ye.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),uA.forEach(e=>{this._createAnchor(e)}),this._createAnchor("rotater")}_createAnchor(e){const n=new Pf({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:h8?10:"auto"}),i=this;n.on("mousedown touchstart",function(s){i._handleMouseDown(s)}),n.on("dragstart",s=>{n.stopDrag(),s.cancelBubble=!0}),n.on("dragend",s=>{s.cancelBubble=!0}),n.on("mouseenter",()=>{const s=Ye.getAngle(this.rotation()),c=this.rotateAnchorCursor(),d=p8(e,s,c);n.getStage().content&&(n.getStage().content.style.cursor=d),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){const e=new Ie({name:"back",width:0,height:0,sceneFunc(n,i){const s=i.getParent(),c=s.padding(),d=i.width(),h=i.height();if(n.beginPath(),n.rect(-c,-c,d+c*2,h+c*2),s.rotateEnabled()&&s.rotateLineVisible()){const p=s.rotateAnchorAngle(),u=s.rotateAnchorOffset(),A=pe.degToRad(p),y=Math.sin(A),x=-Math.cos(A),S=d/2,w=h/2;let T=1/0;x<0?T=Math.min(T,-w/x):x>0&&(T=Math.min(T,(h-w)/x)),y<0?T=Math.min(T,-S/y):y>0&&(T=Math.min(T,(d-S)/y));const R=S+y*T,D=w+x*T,N=pe._sign(h),M=R+y*u*N,O=D+x*u*N;n.moveTo(R,D),n.lineTo(M,O)}n.fillStrokeShape(i)},hitFunc:(n,i)=>{if(!this.shouldOverdrawWholeArea())return;const s=this.padding();n.beginPath(),n.rect(-s,-s,i.width()+s*2,i.height()+s*2),n.fillStrokeShape(i)}});this.add(e),this._proxyDrag(e),e.on("dragstart",n=>{n.cancelBubble=!0}),e.on("dragmove",n=>{n.cancelBubble=!0}),e.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(e){if(this._transforming)return;this._movingAnchorName=e.target.name().split(" ")[0];const n=this._getNodeRect(),i=n.width,s=n.height,c=Math.sqrt(Math.pow(i,2)+Math.pow(s,2));this.sin=Math.abs(s/c),this.cos=Math.abs(i/c),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const d=e.target.getAbsolutePosition(),h=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:h.x-d.x,y:h.y-d.y},jg++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(p=>{p._fire("transformstart",{evt:e.evt,target:p})})}_handleMouseMove(e){let n,i,s;const c=this.findOne("."+this._movingAnchorName),d=c.getStage();d.setPointersPositions(e);const h=d.getPointerPosition();let p={x:h.x-this._anchorDragOffset.x,y:h.y-this._anchorDragOffset.y};const u=c.getAbsolutePosition();this.anchorDragBoundFunc()&&(p=this.anchorDragBoundFunc()(u,p,e)),c.setAbsolutePosition(p);const A=c.getAbsolutePosition();if(u.x===A.x&&u.y===A.y)return;if(this._movingAnchorName==="rotater"){const N=this._getNodeRect();n=c.x()-N.width/2,i=-c.y()+N.height/2;const M=Ye.getAngle(this.rotateAnchorAngle());let O=Math.atan2(-i,n)+Math.PI/2-M;N.height<0&&(O-=Math.PI);const Y=Ye.getAngle(this.rotation())+O,J=Ye.getAngle(this.rotationSnapTolerance()),W=g8(this.rotationSnaps(),Y,J)-N.rotation,V=m8(N,W);this._fitNodesInto(V,e);return}const y=this.shiftBehavior();let x;y==="inverted"?x=this.keepRatio()&&!e.shiftKey:y==="none"?x=this.keepRatio():x=this.keepRatio()||e.shiftKey;let S=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(x){const N=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};s=Math.sqrt(Math.pow(N.x-c.x(),2)+Math.pow(N.y-c.y(),2));const M=this.findOne(".top-left").x()>N.x?-1:1,O=this.findOne(".top-left").y()>N.y?-1:1;n=s*this.cos*M,i=s*this.sin*O,this.findOne(".top-left").x(N.x-n),this.findOne(".top-left").y(N.y-i)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(c.y());else if(this._movingAnchorName==="top-right"){if(x){const N=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};s=Math.sqrt(Math.pow(c.x()-N.x,2)+Math.pow(N.y-c.y(),2));const M=this.findOne(".top-right").x()<N.x?-1:1,O=this.findOne(".top-right").y()>N.y?-1:1;n=s*this.cos*M,i=s*this.sin*O,this.findOne(".top-right").x(N.x+n),this.findOne(".top-right").y(N.y-i)}var w=c.position();this.findOne(".top-left").y(w.y),this.findOne(".bottom-right").x(w.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(c.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(c.x());else if(this._movingAnchorName==="bottom-left"){if(x){const N=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};s=Math.sqrt(Math.pow(N.x-c.x(),2)+Math.pow(c.y()-N.y,2));const M=N.x<c.x()?-1:1,O=c.y()<N.y?-1:1;n=s*this.cos*M,i=s*this.sin*O,c.x(N.x-n),c.y(N.y+i)}w=c.position(),this.findOne(".top-left").x(w.x),this.findOne(".bottom-right").y(w.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(c.y());else if(this._movingAnchorName==="bottom-right"){if(x){const N=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};s=Math.sqrt(Math.pow(c.x()-N.x,2)+Math.pow(c.y()-N.y,2));const M=this.findOne(".bottom-right").x()<N.x?-1:1,O=this.findOne(".bottom-right").y()<N.y?-1:1;n=s*this.cos*M,i=s*this.sin*O,this.findOne(".bottom-right").x(N.x+n),this.findOne(".bottom-right").y(N.y+i)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(S=this.centeredScaling()||e.altKey,S){const N=this.findOne(".top-left"),M=this.findOne(".bottom-right"),O=N.x(),I=N.y(),Y=this.getWidth()-M.x(),J=this.getHeight()-M.y();M.move({x:-O,y:-I}),N.move({x:Y,y:J})}const T=this.findOne(".top-left").getAbsolutePosition();n=T.x,i=T.y;const R=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),D=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:i,width:R,height:D,rotation:Ye.getAngle(this.rotation())},e)}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){var n;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const i=this.getNode();jg--,this._fire("transformend",{evt:e,target:i}),(n=this.getLayer())===null||n===void 0||n.batchDraw(),i&&this._nodes.forEach(s=>{var c;s._fire("transformend",{evt:e,target:s}),(c=s.getLayer())===null||c===void 0||c.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,n){const i=this._getNodeRect(),s=1;if(pe._inRange(e.width,-this.padding()*2-s,s)){this.update();return}if(pe._inRange(e.height,-this.padding()*2-s,s)){this.update();return}const c=new Va;if(c.rotate(Ye.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const x=c.point({x:-this.padding()*2,y:0});e.x+=x.x,e.y+=x.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const x=c.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,e.width+=this.padding()*2}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const x=c.point({x:0,y:-this.padding()*2});e.x+=x.x,e.y+=x.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,e.height+=this.padding()*2}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const x=c.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,e.height+=this.padding()*2}if(this.boundBoxFunc()){const x=this.boundBoxFunc()(i,e);x?e=x:pe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const d=1e7,h=new Va;h.translate(i.x,i.y),h.rotate(i.rotation),h.scale(i.width/d,i.height/d);const p=new Va,u=e.width/d,A=e.height/d;this.flipEnabled()===!1?(p.translate(e.x,e.y),p.rotate(e.rotation),p.translate(e.width<0?e.width:0,e.height<0?e.height:0),p.scale(Math.abs(u),Math.abs(A))):(p.translate(e.x,e.y),p.rotate(e.rotation),p.scale(u,A));const y=p.multiply(h.invert());this._nodes.forEach(x=>{var S;if(!x.getStage())return;const w=x.getParent().getAbsoluteTransform(),T=x.getTransform().copy();T.translate(x.offsetX(),x.offsetY());const R=new Va;R.multiply(w.copy().invert()).multiply(y).multiply(w).multiply(T);const D=R.decompose();x.setAttrs(D),(S=x.getLayer())===null||S===void 0||S.batchDraw()}),this.rotation(pe._getRotation(e.rotation)),this._nodes.forEach(x=>{this._fire("transform",{evt:n,target:x}),x._fire("transform",{evt:n,target:x})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,n){this.findOne(e).setAttrs(n)}update(){var e;const n=this._getNodeRect();this.rotation(pe._getRotation(n.rotation));const i=n.width,s=n.height,c=this.enabledAnchors(),d=this.resizeEnabled(),h=this.padding(),p=this.anchorSize(),u=this.find("._anchor");u.forEach(Y=>{Y.setAttrs({width:p,height:p,offsetX:p/2,offsetY:p/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:p/2+h,offsetY:p/2+h,visible:d&&c.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:i/2,y:0,offsetY:p/2+h,visible:d&&c.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:i,y:0,offsetX:p/2-h,offsetY:p/2+h,visible:d&&c.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:s/2,offsetX:p/2+h,visible:d&&c.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:i,y:s/2,offsetX:p/2-h,visible:d&&c.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:s,offsetX:p/2+h,offsetY:p/2-h,visible:d&&c.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:i/2,y:s,offsetY:p/2-h,visible:d&&c.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:i,y:s,offsetX:p/2-h,offsetY:p/2-h,visible:d&&c.indexOf("bottom-right")>=0});const A=this.rotateAnchorAngle(),y=this.rotateAnchorOffset(),x=pe.degToRad(A),S=Math.sin(x),w=-Math.cos(x),T=i/2,R=s/2;let D=1/0;w<0?D=Math.min(D,-R/w):w>0&&(D=Math.min(D,(s-R)/w)),S<0?D=Math.min(D,-T/S):S>0&&(D=Math.min(D,(i-T)/S));const N=T+S*D,M=R+w*D,O=pe._sign(s);this._batchChangeChild(".rotater",{x:N+S*y*O,y:M+w*y*O-h*w,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:i,height:s,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(Y=>Y.draggable()),x:0,y:0});const I=this.anchorStyleFunc();I&&u.forEach(Y=>{I(Y)}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),ku.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return He.prototype.toObject.call(this)}clone(e){return He.prototype.clone.call(this,e)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};Kt.isTransforming=()=>jg>0;function v8(t){return t instanceof Array||pe.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){uA.indexOf(e)===-1&&pe.warn("Unknown anchor name: "+e+". Available names are: "+uA.join(", "))}),t||[]}Kt.prototype.className="Transformer";Mn(Kt);ee.addGetterSetter(Kt,"enabledAnchors",uA,v8);ee.addGetterSetter(Kt,"flipEnabled",!0,Fi());ee.addGetterSetter(Kt,"resizeEnabled",!0);ee.addGetterSetter(Kt,"anchorSize",10,We());ee.addGetterSetter(Kt,"rotateEnabled",!0);ee.addGetterSetter(Kt,"rotateLineVisible",!0);ee.addGetterSetter(Kt,"rotationSnaps",[]);ee.addGetterSetter(Kt,"rotateAnchorOffset",50,We());ee.addGetterSetter(Kt,"rotateAnchorAngle",0,We());ee.addGetterSetter(Kt,"rotateAnchorCursor","crosshair");ee.addGetterSetter(Kt,"rotationSnapTolerance",5,We());ee.addGetterSetter(Kt,"borderEnabled",!0);ee.addGetterSetter(Kt,"anchorStroke","rgb(0, 161, 255)");ee.addGetterSetter(Kt,"anchorStrokeWidth",1,We());ee.addGetterSetter(Kt,"anchorFill","white");ee.addGetterSetter(Kt,"anchorCornerRadius",0,We());ee.addGetterSetter(Kt,"borderStroke","rgb(0, 161, 255)");ee.addGetterSetter(Kt,"borderStrokeWidth",1,We());ee.addGetterSetter(Kt,"borderDash");ee.addGetterSetter(Kt,"keepRatio",!0);ee.addGetterSetter(Kt,"shiftBehavior","default");ee.addGetterSetter(Kt,"centeredScaling",!1);ee.addGetterSetter(Kt,"ignoreStroke",!1);ee.addGetterSetter(Kt,"padding",0,We());ee.addGetterSetter(Kt,"nodes");ee.addGetterSetter(Kt,"node");ee.addGetterSetter(Kt,"boundBoxFunc");ee.addGetterSetter(Kt,"anchorDragBoundFunc");ee.addGetterSetter(Kt,"anchorStyleFunc");ee.addGetterSetter(Kt,"shouldOverdrawWholeArea",!1);ee.addGetterSetter(Kt,"useSingleNodeRotation",!0);ee.backCompat(Kt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class to extends Ie{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,Ye.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}to.prototype.className="Wedge";to.prototype._centroid=!0;to.prototype._attrsAffectingSize=["radius"];Mn(to);ee.addGetterSetter(to,"radius",0,We());ee.addGetterSetter(to,"angle",0,We());ee.addGetterSetter(to,"clockwise",!1);ee.backCompat(to,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function z2(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const y8=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],x8=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b8(t,e){const n=t.data,i=t.width,s=t.height;let c,d,h,p,u,A,y,x,S,w,T,R,D,N,M,O,I,Y,J,q;const W=e+e+1,V=i-1,ge=s-1,X=e+1,ae=X*(X+1)/2,L=new z2,te=y8[e],le=x8[e];let Ae=null,ne=L,oe=null,ie=null;for(let j=1;j<W;j++)ne=ne.next=new z2,j===X&&(Ae=ne);ne.next=L,h=d=0;for(let j=0;j<s;j++){R=D=N=M=p=u=A=y=0,x=X*(O=n[d]),S=X*(I=n[d+1]),w=X*(Y=n[d+2]),T=X*(J=n[d+3]),p+=ae*O,u+=ae*I,A+=ae*Y,y+=ae*J,ne=L;for(let K=0;K<X;K++)ne.r=O,ne.g=I,ne.b=Y,ne.a=J,ne=ne.next;for(let K=1;K<X;K++)c=d+((V<K?V:K)<<2),p+=(ne.r=O=n[c])*(q=X-K),u+=(ne.g=I=n[c+1])*q,A+=(ne.b=Y=n[c+2])*q,y+=(ne.a=J=n[c+3])*q,R+=O,D+=I,N+=Y,M+=J,ne=ne.next;oe=L,ie=Ae;for(let K=0;K<i;K++)n[d+3]=J=y*te>>le,J!==0?(J=255/J,n[d]=(p*te>>le)*J,n[d+1]=(u*te>>le)*J,n[d+2]=(A*te>>le)*J):n[d]=n[d+1]=n[d+2]=0,p-=x,u-=S,A-=w,y-=T,x-=oe.r,S-=oe.g,w-=oe.b,T-=oe.a,c=h+((c=K+e+1)<V?c:V)<<2,R+=oe.r=n[c],D+=oe.g=n[c+1],N+=oe.b=n[c+2],M+=oe.a=n[c+3],p+=R,u+=D,A+=N,y+=M,oe=oe.next,x+=O=ie.r,S+=I=ie.g,w+=Y=ie.b,T+=J=ie.a,R-=O,D-=I,N-=Y,M-=J,ie=ie.next,d+=4;h+=i}for(let j=0;j<i;j++){D=N=M=R=u=A=y=p=0,d=j<<2,x=X*(O=n[d]),S=X*(I=n[d+1]),w=X*(Y=n[d+2]),T=X*(J=n[d+3]),p+=ae*O,u+=ae*I,A+=ae*Y,y+=ae*J,ne=L;for(let ve=0;ve<X;ve++)ne.r=O,ne.g=I,ne.b=Y,ne.a=J,ne=ne.next;let K=i;for(let ve=1;ve<=e;ve++)d=K+j<<2,p+=(ne.r=O=n[d])*(q=X-ve),u+=(ne.g=I=n[d+1])*q,A+=(ne.b=Y=n[d+2])*q,y+=(ne.a=J=n[d+3])*q,R+=O,D+=I,N+=Y,M+=J,ne=ne.next,ve<ge&&(K+=i);d=j,oe=L,ie=Ae;for(let ve=0;ve<s;ve++)c=d<<2,n[c+3]=J=y*te>>le,J>0?(J=255/J,n[c]=(p*te>>le)*J,n[c+1]=(u*te>>le)*J,n[c+2]=(A*te>>le)*J):n[c]=n[c+1]=n[c+2]=0,p-=x,u-=S,A-=w,y-=T,x-=oe.r,S-=oe.g,w-=oe.b,T-=oe.a,c=j+((c=ve+X)<ge?c:ge)*i<<2,p+=R+=oe.r=n[c],u+=D+=oe.g=n[c+1],A+=N+=oe.b=n[c+2],y+=M+=oe.a=n[c+3],oe=oe.next,x+=O=ie.r,S+=I=ie.g,w+=Y=ie.b,T+=J=ie.a,R-=O,D-=I,N-=Y,M-=J,ie=ie.next,d+=i}}const S8=function(e){const n=Math.round(this.blurRadius());n>0&&b8(e,n)};ee.addGetterSetter(He,"blurRadius",0,We(),ee.afterSetFilter);const w8=function(t){const e=this.brightness()*255,n=t.data,i=n.length;for(let s=0;s<i;s+=4)n[s]+=e,n[s+1]+=e,n[s+2]+=e};ee.addGetterSetter(He,"brightness",0,We(),ee.afterSetFilter);const C8=function(t){const e=this.brightness(),n=t.data,i=n.length;for(let s=0;s<i;s+=4)n[s]=Math.min(255,n[s]*e),n[s+1]=Math.min(255,n[s+1]*e),n[s+2]=Math.min(255,n[s+2]*e)},_8=function(t){const e=Math.pow((this.contrast()+100)/100,2),n=t.data,i=n.length;let s=150,c=150,d=150;for(let h=0;h<i;h+=4)s=n[h],c=n[h+1],d=n[h+2],s/=255,s-=.5,s*=e,s+=.5,s*=255,c/=255,c-=.5,c*=e,c+=.5,c*=255,d/=255,d-=.5,d*=e,d+=.5,d*=255,s=s<0?0:s>255?255:s,c=c<0?0:c>255?255:c,d=d<0?0:d>255?255:d,n[h]=s,n[h+1]=c,n[h+2]=d};ee.addGetterSetter(He,"contrast",0,We(),ee.afterSetFilter);const E8=function(t){var e,n,i,s,c,d,h,p,u;const A=t.data,y=t.width,x=t.height,S=Math.min(1,Math.max(0,(n=(e=this.embossStrength)===null||e===void 0?void 0:e.call(this))!==null&&n!==void 0?n:.5)),w=Math.min(1,Math.max(0,(s=(i=this.embossWhiteLevel)===null||i===void 0?void 0:i.call(this))!==null&&s!==void 0?s:.5)),R=(h={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(d=(c=this.embossDirection)===null||c===void 0?void 0:c.call(this))!==null&&d!==void 0?d:"top-left"])!==null&&h!==void 0?h:315,D=!!((u=(p=this.embossBlend)===null||p===void 0?void 0:p.call(this))!==null&&u!==void 0&&u),N=S*10,M=w*255,O=R*Math.PI/180,I=Math.cos(O),Y=Math.sin(O),J=128/1020*N,q=new Uint8ClampedArray(A),W=new Float32Array(y*x);for(let L=0,te=0;te<A.length;te+=4,L++)W[L]=.2126*q[te]+.7152*q[te+1]+.0722*q[te+2];const V=[-1,0,1,-2,0,2,-1,0,1],ge=[-1,-2,-1,0,0,0,1,2,1],X=[-y-1,-y,-y+1,-1,0,1,y-1,y,y+1],ae=L=>L<0?0:L>255?255:L;for(let L=1;L<x-1;L++)for(let te=1;te<y-1;te++){const le=L*y+te;let Ae=0,ne=0;Ae+=W[le+X[0]]*V[0],ne+=W[le+X[0]]*ge[0],Ae+=W[le+X[1]]*V[1],ne+=W[le+X[1]]*ge[1],Ae+=W[le+X[2]]*V[2],ne+=W[le+X[2]]*ge[2],Ae+=W[le+X[3]]*V[3],ne+=W[le+X[3]]*ge[3],Ae+=W[le+X[5]]*V[5],ne+=W[le+X[5]]*ge[5],Ae+=W[le+X[6]]*V[6],ne+=W[le+X[6]]*ge[6],Ae+=W[le+X[7]]*V[7],ne+=W[le+X[7]]*ge[7],Ae+=W[le+X[8]]*V[8],ne+=W[le+X[8]]*ge[8];const oe=I*Ae+Y*ne,ie=ae(M+oe*J),j=le*4;if(D){const K=ie-M;A[j]=ae(q[j]+K),A[j+1]=ae(q[j+1]+K),A[j+2]=ae(q[j+2]+K),A[j+3]=q[j+3]}else A[j]=A[j+1]=A[j+2]=ie,A[j+3]=q[j+3]}for(let L=0;L<y;L++){let te=L*4,le=((x-1)*y+L)*4;A[te]=q[te],A[te+1]=q[te+1],A[te+2]=q[te+2],A[te+3]=q[te+3],A[le]=q[le],A[le+1]=q[le+1],A[le+2]=q[le+2],A[le+3]=q[le+3]}for(let L=1;L<x-1;L++){let te=L*y*4,le=(L*y+(y-1))*4;A[te]=q[te],A[te+1]=q[te+1],A[te+2]=q[te+2],A[te+3]=q[te+3],A[le]=q[le],A[le+1]=q[le+1],A[le+2]=q[le+2],A[le+3]=q[le+3]}return t};ee.addGetterSetter(He,"embossStrength",.5,We(),ee.afterSetFilter);ee.addGetterSetter(He,"embossWhiteLevel",.5,We(),ee.afterSetFilter);ee.addGetterSetter(He,"embossDirection","top-left",void 0,ee.afterSetFilter);ee.addGetterSetter(He,"embossBlend",!1,void 0,ee.afterSetFilter);function ug(t,e,n,i,s){const c=n-e,d=s-i;if(c===0)return i+d/2;if(d===0)return i;let h=(t-e)/c;return h=d*h+i,h}const T8=function(t){const e=t.data,n=e.length;let i=e[0],s=i,c,d=e[1],h=d,p,u=e[2],A=u,y;const x=this.enhance();if(x===0)return;for(let M=0;M<n;M+=4)c=e[M+0],c<i?i=c:c>s&&(s=c),p=e[M+1],p<d?d=p:p>h&&(h=p),y=e[M+2],y<u?u=y:y>A&&(A=y);s===i&&(s=255,i=0),h===d&&(h=255,d=0),A===u&&(A=255,u=0);let S,w,T,R,D,N;if(x>0)S=s+x*(255-s),w=i-x*(i-0),T=h+x*(255-h),R=d-x*(d-0),D=A+x*(255-A),N=u-x*(u-0);else{const M=(s+i)*.5;S=s+x*(s-M),w=i+x*(i-M);const O=(h+d)*.5;T=h+x*(h-O),R=d+x*(d-O);const I=(A+u)*.5;D=A+x*(A-I),N=u+x*(u-I)}for(let M=0;M<n;M+=4)e[M+0]=ug(e[M+0],i,s,w,S),e[M+1]=ug(e[M+1],d,h,R,T),e[M+2]=ug(e[M+2],u,A,N,D)};ee.addGetterSetter(He,"enhance",0,We(),ee.afterSetFilter);const R8=function(t){const e=t.data,n=e.length;for(let i=0;i<n;i+=4){const s=.34*e[i]+.5*e[i+1]+.16*e[i+2];e[i]=s,e[i+1]=s,e[i+2]=s}};ee.addGetterSetter(He,"hue",0,We(),ee.afterSetFilter);ee.addGetterSetter(He,"saturation",0,We(),ee.afterSetFilter);ee.addGetterSetter(He,"luminance",0,We(),ee.afterSetFilter);const D8=function(t){const e=t.data,n=e.length,i=1,s=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,d=this.luminance()*127,h=i*s*Math.cos(c*Math.PI/180),p=i*s*Math.sin(c*Math.PI/180),u=.299*i+.701*h+.167*p,A=.587*i-.587*h+.33*p,y=.114*i-.114*h-.497*p,x=.299*i-.299*h-.328*p,S=.587*i+.413*h+.035*p,w=.114*i-.114*h+.293*p,T=.299*i-.3*h+1.25*p,R=.587*i-.586*h-1.05*p,D=.114*i+.886*h-.2*p;let N,M,O,I;for(let Y=0;Y<n;Y+=4)N=e[Y+0],M=e[Y+1],O=e[Y+2],I=e[Y+3],e[Y+0]=u*N+A*M+y*O+d,e[Y+1]=x*N+S*M+w*O+d,e[Y+2]=T*N+R*M+D*O+d,e[Y+3]=I},L8=function(t){const e=t.data,n=e.length,i=Math.pow(2,this.value()),s=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,d=i*s*Math.cos(c*Math.PI/180),h=i*s*Math.sin(c*Math.PI/180),p=.299*i+.701*d+.167*h,u=.587*i-.587*d+.33*h,A=.114*i-.114*d-.497*h,y=.299*i-.299*d-.328*h,x=.587*i+.413*d+.035*h,S=.114*i-.114*d+.293*h,w=.299*i-.3*d+1.25*h,T=.587*i-.586*d-1.05*h,R=.114*i+.886*d-.2*h;for(let D=0;D<n;D+=4){const N=e[D+0],M=e[D+1],O=e[D+2],I=e[D+3];e[D+0]=p*N+u*M+A*O,e[D+1]=y*N+x*M+S*O,e[D+2]=w*N+T*M+R*O,e[D+3]=I}};ee.addGetterSetter(He,"hue",0,We(),ee.afterSetFilter);ee.addGetterSetter(He,"saturation",0,We(),ee.afterSetFilter);ee.addGetterSetter(He,"value",0,We(),ee.afterSetFilter);const k8=function(t){const e=t.data,n=e.length;for(let i=0;i<n;i+=4)e[i]=255-e[i],e[i+1]=255-e[i+1],e[i+2]=255-e[i+2]},N8=function(t,e,n){const i=t.data,s=e.data,c=t.width,d=t.height,h=n.polarCenterX||c/2,p=n.polarCenterY||d/2;let u=Math.sqrt(h*h+p*p),A=c-h,y=d-p;const x=Math.sqrt(A*A+y*y);u=x>u?x:u;const S=d,w=c,T=360/w*Math.PI/180;for(let R=0;R<w;R+=1){const D=Math.sin(R*T),N=Math.cos(R*T);for(let M=0;M<S;M+=1){A=Math.floor(h+u*M/S*N),y=Math.floor(p+u*M/S*D);let O=(y*c+A)*4;const I=i[O+0],Y=i[O+1],J=i[O+2],q=i[O+3];O=(R+M*c)*4,s[O+0]=I,s[O+1]=Y,s[O+2]=J,s[O+3]=q}}},P8=function(t,e,n){const i=t.data,s=e.data,c=t.width,d=t.height,h=n.polarCenterX||c/2,p=n.polarCenterY||d/2;let u=Math.sqrt(h*h+p*p),A=c-h,y=d-p;const x=Math.sqrt(A*A+y*y);u=x>u?x:u;const S=d,w=c,T=0;let R,D;for(A=0;A<c;A+=1)for(y=0;y<d;y+=1){const N=A-h,M=y-p,O=Math.sqrt(N*N+M*M)*S/u;let I=(Math.atan2(M,N)*180/Math.PI+360+T)%360;I=I*w/360,R=Math.floor(I),D=Math.floor(O);let Y=(D*c+R)*4;const J=i[Y+0],q=i[Y+1],W=i[Y+2],V=i[Y+3];Y=(y*c+A)*4,s[Y+0]=J,s[Y+1]=q,s[Y+2]=W,s[Y+3]=V}},B8=function(t){const e=t.width,n=t.height;let i,s,c,d,h,p,u,A,y,x,S=Math.round(this.kaleidoscopePower());const w=Math.round(this.kaleidoscopeAngle()),T=Math.floor(e*(w%360)/360);if(S<1)return;const R=pe.createCanvasElement();R.width=e,R.height=n;const D=R.getContext("2d").getImageData(0,0,e,n);pe.releaseCanvas(R),N8(t,D,{polarCenterX:e/2,polarCenterY:n/2});let N=e/Math.pow(2,S);for(;N<=8;)N=N*2,S-=1;N=Math.ceil(N);let M=N,O=0,I=M,Y=1;for(T+N>e&&(O=M,I=0,Y=-1),s=0;s<n;s+=1)for(i=O;i!==I;i+=Y)c=Math.round(i+T)%e,y=(e*s+c)*4,h=D.data[y+0],p=D.data[y+1],u=D.data[y+2],A=D.data[y+3],x=(e*s+i)*4,D.data[x+0]=h,D.data[x+1]=p,D.data[x+2]=u,D.data[x+3]=A;for(s=0;s<n;s+=1)for(M=Math.floor(N),d=0;d<S;d+=1){for(i=0;i<M+1;i+=1)y=(e*s+i)*4,h=D.data[y+0],p=D.data[y+1],u=D.data[y+2],A=D.data[y+3],x=(e*s+M*2-i-1)*4,D.data[x+0]=h,D.data[x+1]=p,D.data[x+2]=u,D.data[x+3]=A;M*=2}P8(D,t,{})};ee.addGetterSetter(He,"kaleidoscopePower",2,We(),ee.afterSetFilter);ee.addGetterSetter(He,"kaleidoscopeAngle",0,We(),ee.afterSetFilter);function Vp(t,e,n){let i=(n*t.width+e)*4;const s=[];return s.push(t.data[i++],t.data[i++],t.data[i++],t.data[i++]),s}function hf(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function M8(t){const e=[0,0,0];for(let n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function z8(t,e){const n=Vp(t,0,0),i=Vp(t,t.width-1,0),s=Vp(t,0,t.height-1),c=Vp(t,t.width-1,t.height-1),d=e||10;if(hf(n,i)<d&&hf(i,c)<d&&hf(c,s)<d&&hf(s,n)<d){const h=M8([i,n,c,s]),p=[];for(let u=0;u<t.width*t.height;u++){const A=hf(h,[t.data[u*4],t.data[u*4+1],t.data[u*4+2]]);p[u]=A<d?0:255}return p}}function F8(t,e){for(let n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}function I8(t,e,n){const i=[1,1,1,1,0,1,1,1,1],s=Math.round(Math.sqrt(i.length)),c=Math.floor(s/2),d=[];for(let h=0;h<n;h++)for(let p=0;p<e;p++){const u=h*e+p;let A=0;for(let y=0;y<s;y++)for(let x=0;x<s;x++){const S=h+y-c,w=p+x-c;if(S>=0&&S<n&&w>=0&&w<e){const T=S*e+w,R=i[y*s+x];A+=t[T]*R}}d[u]=A===2040?255:0}return d}function O8(t,e,n){const i=[1,1,1,1,1,1,1,1,1],s=Math.round(Math.sqrt(i.length)),c=Math.floor(s/2),d=[];for(let h=0;h<n;h++)for(let p=0;p<e;p++){const u=h*e+p;let A=0;for(let y=0;y<s;y++)for(let x=0;x<s;x++){const S=h+y-c,w=p+x-c;if(S>=0&&S<n&&w>=0&&w<e){const T=S*e+w,R=i[y*s+x];A+=t[T]*R}}d[u]=A>=1020?255:0}return d}function U8(t,e,n){const i=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],s=Math.round(Math.sqrt(i.length)),c=Math.floor(s/2),d=[];for(let h=0;h<n;h++)for(let p=0;p<e;p++){const u=h*e+p;let A=0;for(let y=0;y<s;y++)for(let x=0;x<s;x++){const S=h+y-c,w=p+x-c;if(S>=0&&S<n&&w>=0&&w<e){const T=S*e+w,R=i[y*s+x];A+=t[T]*R}}d[u]=A}return d}const j8=function(t){const e=this.threshold();let n=z8(t,e);return n&&(n=I8(n,t.width,t.height),n=O8(n,t.width,t.height),n=U8(n,t.width,t.height),F8(t,n)),t};ee.addGetterSetter(He,"threshold",0,We(),ee.afterSetFilter);const G8=function(t){const e=this.noise()*255,n=t.data,i=n.length,s=e/2;for(let c=0;c<i;c+=4)n[c+0]+=s-2*s*Math.random(),n[c+1]+=s-2*s*Math.random(),n[c+2]+=s-2*s*Math.random()};ee.addGetterSetter(He,"noise",.2,We(),ee.afterSetFilter);const H8=function(t){let e=Math.ceil(this.pixelSize()),n=t.width,i=t.height,s=Math.ceil(n/e),c=Math.ceil(i/e),d=t.data;if(e<=0){pe.error("pixelSize value can not be <= 0");return}for(let h=0;h<s;h+=1)for(let p=0;p<c;p+=1){let u=0,A=0,y=0,x=0;const S=h*e,w=S+e,T=p*e,R=T+e;let D=0;for(let N=S;N<w;N+=1)if(!(N>=n))for(let M=T;M<R;M+=1){if(M>=i)continue;const O=(n*M+N)*4;u+=d[O+0],A+=d[O+1],y+=d[O+2],x+=d[O+3],D+=1}u=u/D,A=A/D,y=y/D,x=x/D;for(let N=S;N<w;N+=1)if(!(N>=n))for(let M=T;M<R;M+=1){if(M>=i)continue;const O=(n*M+N)*4;d[O+0]=u,d[O+1]=A,d[O+2]=y,d[O+3]=x}}};ee.addGetterSetter(He,"pixelSize",8,We(),ee.afterSetFilter);const X8=function(t){const e=Math.round(this.levels()*254)+1,n=t.data,i=n.length,s=255/e;for(let c=0;c<i;c+=1)n[c]=Math.floor(n[c]/s)*s};ee.addGetterSetter(He,"levels",.5,We(),ee.afterSetFilter);const W8=function(t){const e=t.data,n=e.length,i=this.red(),s=this.green(),c=this.blue();for(let d=0;d<n;d+=4){const h=(.34*e[d]+.5*e[d+1]+.16*e[d+2])/255;e[d]=h*i,e[d+1]=h*s,e[d+2]=h*c,e[d+3]=e[d+3]}};ee.addGetterSetter(He,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ee.addGetterSetter(He,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ee.addGetterSetter(He,"blue",0,kx,ee.afterSetFilter);const Q8=function(t){const e=t.data,n=e.length,i=this.red(),s=this.green(),c=this.blue(),d=this.alpha();for(let h=0;h<n;h+=4){const p=1-d;e[h]=i*d+e[h]*p,e[h+1]=s*d+e[h+1]*p,e[h+2]=c*d+e[h+2]*p}};ee.addGetterSetter(He,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ee.addGetterSetter(He,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ee.addGetterSetter(He,"blue",0,kx,ee.afterSetFilter);ee.addGetterSetter(He,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});const Y8=function(t){const e=t.data,n=e.length;for(let i=0;i<n;i+=4){const s=e[i+0],c=e[i+1],d=e[i+2];e[i+0]=Math.min(255,s*.393+c*.769+d*.189),e[i+1]=Math.min(255,s*.349+c*.686+d*.168),e[i+2]=Math.min(255,s*.272+c*.534+d*.131)}},V8=function(t){const n=t.data;for(let i=0;i<n.length;i+=4){const s=n[i],c=n[i+1],d=n[i+2];.2126*s+.7152*c+.0722*d>=128&&(n[i]=255-s,n[i+1]=255-c,n[i+2]=255-d)}return t},q8=function(t){const e=this.threshold()*255,n=t.data,i=n.length;for(let s=0;s<i;s+=1)n[s]=n[s]<e?0:255};ee.addGetterSetter(He,"threshold",.5,We(),ee.afterSetFilter);Il.Util._assign(Il,{Arc:$s,Arrow:jl,Circle:Nu,Ellipse:Wo,Image:Ii,Label:rv,Tag:Gl,Line:eo,Path:Cn,Rect:Pf,RegularPolygon:Qo,Ring:Hl,Sprite:ps,Star:Yo,Text:_n,TextPath:hr,Transformer:Kt,Wedge:to,Filters:{Blur:S8,Brightness:C8,Brighten:w8,Contrast:_8,Emboss:E8,Enhance:T8,Grayscale:R8,HSL:D8,HSV:L8,Invert:k8,Kaleidoscope:B8,Mask:j8,Noise:G8,Pixelate:H8,Posterize:X8,RGB:W8,RGBA:Q8,Sepia:Y8,Solarize:V8,Threshold:q8}});var qp={exports:{}},Kp={exports:{}},dg={};/**
327
+ `,d2=()=>{if(typeof document>"u")throw new Error(Dw)};class Va{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Va(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){const n=this.m;return{x:n[0]*e.x+n[2]*e.y+n[4],y:n[1]*e.x+n[3]*e.y+n[5]}}translate(e,n){return this.m[4]+=this.m[0]*e+this.m[2]*n,this.m[5]+=this.m[1]*e+this.m[3]*n,this}scale(e,n){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=n,this.m[3]*=n,this}rotate(e){const n=Math.cos(e),i=Math.sin(e),s=this.m[0]*n+this.m[2]*i,c=this.m[1]*n+this.m[3]*i,d=this.m[0]*-i+this.m[2]*n,h=this.m[1]*-i+this.m[3]*n;return this.m[0]=s,this.m[1]=c,this.m[2]=d,this.m[3]=h,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,n){const i=this.m[0]+this.m[2]*n,s=this.m[1]+this.m[3]*n,c=this.m[2]+this.m[0]*e,d=this.m[3]+this.m[1]*e;return this.m[0]=i,this.m[1]=s,this.m[2]=c,this.m[3]=d,this}multiply(e){const n=this.m[0]*e.m[0]+this.m[2]*e.m[1],i=this.m[1]*e.m[0]+this.m[3]*e.m[1],s=this.m[0]*e.m[2]+this.m[2]*e.m[3],c=this.m[1]*e.m[2]+this.m[3]*e.m[3],d=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],h=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=n,this.m[1]=i,this.m[2]=s,this.m[3]=c,this.m[4]=d,this.m[5]=h,this}invert(){const e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*e,i=-this.m[1]*e,s=-this.m[2]*e,c=this.m[0]*e,d=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),h=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=i,this.m[2]=s,this.m[3]=c,this.m[4]=d,this.m[5]=h,this}getMatrix(){return this.m}decompose(){const e=this.m[0],n=this.m[1],i=this.m[2],s=this.m[3],c=this.m[4],d=this.m[5],h=e*s-n*i,p={x:c,y:d,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||n!=0){const u=Math.sqrt(e*e+n*n);p.rotation=n>0?Math.acos(e/u):-Math.acos(e/u),p.scaleX=u,p.scaleY=h/u,p.skewX=(e*i+n*s)/h,p.skewY=0}else if(i!=0||s!=0){const u=Math.sqrt(i*i+s*s);p.rotation=Math.PI/2-(s>0?Math.acos(-i/u):-Math.acos(i/u)),p.scaleX=h/u,p.scaleY=u,p.skewX=0,p.skewY=(e*i+n*s)/h}return p.rotation=pe._getRotation(p.rotation),p}}const Lw="[object Array]",kw="[object Number]",Nw="[object String]",Pw="[object Boolean]",Bw=Math.PI/180,Mw=180/Math.PI,lf="#",zw="",Fw="0",Iw="Konva warning: ",f2="Konva error: ",Ow="rgb(",rg={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},Uw=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let Op=[],cf=null;const jw=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(t){setTimeout(t,16)},pe={_isElement(t){return!!(t&&t.nodeType==1)},_isFunction(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isPlainObject(t){return!!t&&t.constructor===Object},_isArray(t){return Object.prototype.toString.call(t)===Lw},_isNumber(t){return Object.prototype.toString.call(t)===kw&&!isNaN(t)&&isFinite(t)},_isString(t){return Object.prototype.toString.call(t)===Nw},_isBoolean(t){return Object.prototype.toString.call(t)===Pw},isObject(t){return t instanceof Object},isValidSelector(t){if(typeof t!="string")return!1;const e=t[0];return e==="#"||e==="."||e===e.toUpperCase()},_sign(t){return t===0||t>0?1:-1},requestAnimFrame(t){Op.push(t),Op.length===1&&jw(function(){const e=Op;Op=[],e.forEach(function(n){n()})})},createCanvasElement(){d2();const t=document.createElement("canvas");try{t.style=t.style||{}}catch{}return t},createImageElement(){return d2(),document.createElement("img")},_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,e){const n=pe.createImageElement();n.onload=function(){e(n)},n.src=t},_rgbToHex(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb(t){t=t.replace(lf,zw);const e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:e&255}},getRandomColor(){let t=(Math.random()*16777215<<0).toString(16);for(;t.length<6;)t=Fw+t;return lf+t},isCanvasFarblingActive(){if(cf!==null)return cf;if(typeof document>"u")return cf=!1,!1;const t=this.createCanvasElement();t.width=10,t.height=10;const e=t.getContext("2d",{willReadFrequently:!0});e.clearRect(0,0,10,10),e.fillStyle="#282828",e.fillRect(0,0,10,10);const n=e.getImageData(0,0,10,10).data;let i=!1;for(let s=0;s<100;s++)if(n[s*4]!==40||n[s*4+1]!==40||n[s*4+2]!==40||n[s*4+3]!==255){i=!0;break}return cf=i,this.releaseCanvas(t),cf},getHitColor(){const t=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(t):t},getHitColorKey(t,e,n){return this.isCanvasFarblingActive()&&(t=Math.round(t/5)*5,e=Math.round(e/5)*5,n=Math.round(n/5)*5),lf+this._rgbToHex(t,e,n)},getSnappedHexColor(t){const e=this._hexToRgb(t);return lf+this._rgbToHex(Math.round(e.r/5)*5,Math.round(e.g/5)*5,Math.round(e.b/5)*5)},getRGB(t){let e;return t in rg?(e=rg[t],{r:e[0],g:e[1],b:e[2]}):t[0]===lf?this._hexToRgb(t.substring(1)):t.substr(0,4)===Ow?(e=Uw.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA(t){return t=t||"black",pe._namedColorToRBA(t)||pe._hex3ColorToRGBA(t)||pe._hex4ColorToRGBA(t)||pe._hex6ColorToRGBA(t)||pe._hex8ColorToRGBA(t)||pe._rgbColorToRGBA(t)||pe._rgbaColorToRGBA(t)||pe._hslColorToRGBA(t)},_namedColorToRBA(t){const e=rg[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(t.indexOf("rgb(")===0){t=t.match(/rgb\(([^)]+)\)/)[1];const e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(t.indexOf("rgba(")===0){t=t.match(/rgba\(([^)]+)\)/)[1];const e=t.split(/ *, */).map((n,i)=>n.slice(-1)==="%"?i===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex8ColorToRGBA(t){if(t[0]==="#"&&t.length===9)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:parseInt(t.slice(7,9),16)/255}},_hex6ColorToRGBA(t){if(t[0]==="#"&&t.length===7)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex4ColorToRGBA(t){if(t[0]==="#"&&t.length===5)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:parseInt(t[4]+t[4],16)/255}},_hex3ColorToRGBA(t){if(t[0]==="#"&&t.length===4)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){const[e,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),i=Number(n[0])/360,s=Number(n[1])/100,c=Number(n[2])/100;let d,h,p;if(s===0)return p=c*255,{r:Math.round(p),g:Math.round(p),b:Math.round(p),a:1};c<.5?d=c*(1+s):d=c+s-c*s;const u=2*c-d,A=[0,0,0];for(let y=0;y<3;y++)h=i+1/3*-(y-1),h<0&&h++,h>1&&h--,6*h<1?p=u+(d-u)*6*h:2*h<1?p=d:3*h<2?p=u+(d-u)*(2/3-h)*6:p=u,A[y]=p*255;return{r:Math.round(A[0]),g:Math.round(A[1]),b:Math.round(A[2]),a:1}}},haveIntersection(t,e){return!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y)},cloneObject(t){const e={};for(const n in t)this._isPlainObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray(t){return t.slice(0)},degToRad(t){return t*Bw},radToDeg(t){return t*Mw},_degToRad(t){return pe.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),pe.degToRad(t)},_radToDeg(t){return pe.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),pe.radToDeg(t)},_getRotation(t){return Ye.angleDeg?pe.radToDeg(t):t},_capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)},throw(t){throw new Error(f2+t)},error(t){console.error(f2+t)},warn(t){Ye.showWarnings&&console.warn(Iw+t)},each(t,e){for(const n in t)e(n,t[n])},_inRange(t,e,n){return e<=t&&t<n},_getProjectionToSegment(t,e,n,i,s,c){let d,h,p;const u=(t-n)*(t-n)+(e-i)*(e-i);if(u==0)d=t,h=e,p=(s-n)*(s-n)+(c-i)*(c-i);else{const A=((s-t)*(n-t)+(c-e)*(i-e))/u;A<0?(d=t,h=e,p=(t-s)*(t-s)+(e-c)*(e-c)):A>1?(d=n,h=i,p=(n-s)*(n-s)+(i-c)*(i-c)):(d=t+A*(n-t),h=e+A*(i-e),p=(d-s)*(d-s)+(h-c)*(h-c))}return[d,h,p]},_getProjectionToLine(t,e,n){const i=pe.cloneObject(t);let s=Number.MAX_VALUE;return e.forEach(function(c,d){if(!n&&d===e.length-1)return;const h=e[(d+1)%e.length],p=pe._getProjectionToSegment(c.x,c.y,h.x,h.y,t.x,t.y),u=p[0],A=p[1],y=p[2];y<s&&(i.x=u,i.y=A,s=y)}),i},_prepareArrayForTween(t,e,n){const i=[],s=[];if(t.length>e.length){const d=e;e=t,t=d}for(let d=0;d<t.length;d+=2)i.push({x:t[d],y:t[d+1]});for(let d=0;d<e.length;d+=2)s.push({x:e[d],y:e[d+1]});const c=[];return s.forEach(function(d){const h=pe._getProjectionToLine(d,i,n);c.push(h.x),c.push(h.y)}),c},_prepareToStringify(t){let e;t.visitedByCircularReferenceRemoval=!0;for(const n in t)if(t.hasOwnProperty(n)&&t[n]&&typeof t[n]=="object"){if(e=Object.getOwnPropertyDescriptor(t,n),t[n].visitedByCircularReferenceRemoval||pe._isElement(t[n]))if(e.configurable)delete t[n];else return null;else if(pe._prepareToStringify(t[n])===null)if(e.configurable)delete t[n];else return null}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(const n in e)t[n]=e[n];return t},_getFirstPointerId(t){return t.touches?t.changedTouches[0].identifier:t.pointerId||999},releaseCanvas(...t){Ye.releaseCanvasOnDestroy&&t.forEach(e=>{e.width=0,e.height=0})},drawRoundedRectPath(t,e,n,i){let s=e<0?e:0,c=n<0?n:0;e=Math.abs(e),n=Math.abs(n);let d=0,h=0,p=0,u=0;typeof i=="number"?d=h=p=u=Math.min(i,e/2,n/2):(d=Math.min(i[0]||0,e/2,n/2),h=Math.min(i[1]||0,e/2,n/2),u=Math.min(i[2]||0,e/2,n/2),p=Math.min(i[3]||0,e/2,n/2)),t.moveTo(s+d,c),t.lineTo(s+e-h,c),t.arc(s+e-h,c+h,h,Math.PI*3/2,0,!1),t.lineTo(s+e,c+n-u),t.arc(s+e-u,c+n-u,u,0,Math.PI/2,!1),t.lineTo(s+p,c+n),t.arc(s+p,c+n-p,p,Math.PI/2,Math.PI,!1),t.lineTo(s,c+d),t.arc(s+d,c+d,d,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(t,e,n,i,s){i=Math.abs(i);for(let c=0;c<n;c++){const d=e[(c-1+n)%n],h=e[c],p=e[(c+1)%n],u={x:h.x-d.x,y:h.y-d.y},A={x:p.x-h.x,y:p.y-h.y},y=Math.hypot(u.x,u.y),x=Math.hypot(A.x,A.y);let S;typeof s=="number"?S=s:S=c<s.length?s[c]:0,S=i*Math.cos(Math.PI/n)*Math.min(1,S/i*2);const T={x:u.x/y,y:u.y/y},R={x:A.x/x,y:A.y/x},D={x:h.x-T.x*S,y:h.y-T.y*S},N={x:h.x+R.x*S,y:h.y+R.y*S};c===0?t.moveTo(D.x,D.y):t.lineTo(D.x,D.y),t.arcTo(h.x,h.y,N.x,N.y,S)}}};function Gw(t){const e=[],n=t.length,i=pe;for(let s=0;s<n;s++){let c=t[s];i._isNumber(c)?c=Math.round(c*1e3)/1e3:i._isString(c)||(c=c+""),e.push(c)}return e}const h2=",",Hw="(",Xw=")",Ww="([",Qw="])",Yw=";",Vw="()",qw="=",p2=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Kw=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],Jw=100;let Up=null;function A2(){if(Up!==null)return Up;try{const e=pe.createCanvasElement().getContext("2d");return e?!!e&&"filter"in e:(Up=!1,!1)}catch{return Up=!1,!1}}class vA{constructor(e){this.canvas=e,Ye.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,n){let i=this.traceArr,s=i.length,c="",d,h,p,u;for(d=0;d<s;d++)h=i[d],p=h.method,p?(u=h.args,c+=p,e?c+=Vw:pe._isArray(u[0])?c+=Ww+u.join(h2)+Qw:(n&&(u=u.map(A=>typeof A=="number"?Math.floor(A):A)),c+=Hw+u.join(h2)+Xw)):(c+=h.property,e||(c+=qw+h.val)),c+=Yw;return c}clearTrace(){this.traceArr=[]}_trace(e){let n=this.traceArr,i;n.push(e),i=n.length,i>=Jw&&n.shift()}reset(){const e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){const n=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(e){const n=e.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(e){const n=e.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(e){const n=e.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}_applyMiterLimit(e){const n=e.attrs.miterLimit;n!=null&&this.setAttr("miterLimit",n)}setAttr(e,n){this._context[e]=n}arc(e,n,i,s,c,d){this._context.arc(e,n,i,s,c,d)}arcTo(e,n,i,s,c){this._context.arcTo(e,n,i,s,c)}beginPath(){this._context.beginPath()}bezierCurveTo(e,n,i,s,c,d){this._context.bezierCurveTo(e,n,i,s,c,d)}clearRect(e,n,i,s){this._context.clearRect(e,n,i,s)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,n){const i=arguments;if(i.length===2)return this._context.createImageData(e,n);if(i.length===1)return this._context.createImageData(e)}createLinearGradient(e,n,i,s){return this._context.createLinearGradient(e,n,i,s)}createPattern(e,n){return this._context.createPattern(e,n)}createRadialGradient(e,n,i,s,c,d){return this._context.createRadialGradient(e,n,i,s,c,d)}drawImage(e,n,i,s,c,d,h,p,u){const A=arguments,y=this._context;A.length===3?y.drawImage(e,n,i):A.length===5?y.drawImage(e,n,i,s,c):A.length===9&&y.drawImage(e,n,i,s,c,d,h,p,u)}ellipse(e,n,i,s,c,d,h,p){this._context.ellipse(e,n,i,s,c,d,h,p)}isPointInPath(e,n,i,s){return i?this._context.isPointInPath(i,e,n,s):this._context.isPointInPath(e,n,s)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,n,i,s){this._context.fillRect(e,n,i,s)}strokeRect(e,n,i,s){this._context.strokeRect(e,n,i,s)}fillText(e,n,i,s){s?this._context.fillText(e,n,i,s):this._context.fillText(e,n,i)}measureText(e){return this._context.measureText(e)}getImageData(e,n,i,s){return this._context.getImageData(e,n,i,s)}lineTo(e,n){this._context.lineTo(e,n)}moveTo(e,n){this._context.moveTo(e,n)}rect(e,n,i,s){this._context.rect(e,n,i,s)}roundRect(e,n,i,s,c){this._context.roundRect(e,n,i,s,c)}putImageData(e,n,i){this._context.putImageData(e,n,i)}quadraticCurveTo(e,n,i,s){this._context.quadraticCurveTo(e,n,i,s)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,n){this._context.scale(e,n)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,n,i,s,c,d){this._context.setTransform(e,n,i,s,c,d)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,n,i,s){this._context.strokeText(e,n,i,s)}transform(e,n,i,s,c,d){this._context.transform(e,n,i,s,c,d)}translate(e,n){this._context.translate(e,n)}_enableTrace(){let e=this,n=p2.length,i=this.setAttr,s,c;const d=function(h){let p=e[h],u;e[h]=function(){return c=Gw(Array.prototype.slice.call(arguments,0)),u=p.apply(e,arguments),e._trace({method:h,args:c}),u}};for(s=0;s<n;s++)d(p2[s]);e.setAttr=function(){i.apply(e,arguments);const h=arguments[0];let p=arguments[1];(h==="shadowOffsetX"||h==="shadowOffsetY"||h==="shadowBlur")&&(p=p/this.canvas.getPixelRatio()),e._trace({property:h,val:p})}}_applyGlobalCompositeOperation(e){const n=e.attrs.globalCompositeOperation;!n||n==="source-over"||this.setAttr("globalCompositeOperation",n)}}Kw.forEach(function(t){Object.defineProperty(vA.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class Zw extends vA{constructor(e,{willReadFrequently:n=!1}={}){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:n})}_fillColor(e){const n=e.fill();this.setAttr("fillStyle",n),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){const n=e._getLinearGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fillRadialGradient(e){const n=e._getRadialGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fill(e){const n=e.fill(),i=e.getFillPriority();if(n&&i==="color"){this._fillColor(e);return}const s=e.getFillPatternImage();if(s&&i==="pattern"){this._fillPattern(e);return}const c=e.getFillLinearGradientColorStops();if(c&&i==="linear-gradient"){this._fillLinearGradient(e);return}const d=e.getFillRadialGradientColorStops();if(d&&i==="radial-gradient"){this._fillRadialGradient(e);return}n?this._fillColor(e):s?this._fillPattern(e):c?this._fillLinearGradient(e):d&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const n=e.getStrokeLinearGradientStartPoint(),i=e.getStrokeLinearGradientEndPoint(),s=e.getStrokeLinearGradientColorStops(),c=this.createLinearGradient(n.x,n.y,i.x,i.y);if(s){for(let d=0;d<s.length;d+=2)c.addColorStop(s[d],s[d+1]);this.setAttr("strokeStyle",c)}}_stroke(e){const n=e.dash(),i=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!i){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(e),n&&e.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),i||this.restore()}}_applyShadow(e){var n,i,s;const c=(n=e.getShadowRGBA())!==null&&n!==void 0?n:"black",d=(i=e.getShadowBlur())!==null&&i!==void 0?i:5,h=(s=e.getShadowOffset())!==null&&s!==void 0?s:{x:0,y:0},p=e.getAbsoluteScale(),u=this.canvas.getPixelRatio(),A=p.x*u,y=p.y*u;this.setAttr("shadowColor",c),this.setAttr("shadowBlur",d*Math.min(Math.abs(A),Math.abs(y))),this.setAttr("shadowOffsetX",h.x*A),this.setAttr("shadowOffsetY",h.y*y)}}class $w extends vA{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){const n=e.getStrokeScaleEnabled();if(!n){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(e);const i=e.hitStrokeWidth(),s=i==="auto"?e.strokeWidth():i;this.setAttr("lineWidth",s),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),n||this.restore()}}}let jp;function eC(){if(jp)return jp;const t=pe.createCanvasElement(),e=t.getContext("2d");return jp=(function(){const n=Ye._global.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return n/i})(),pe.releaseCanvas(t),jp}class Zg{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const i=(e||{}).pixelRatio||Ye.pixelRatio||eC();this.pixelRatio=i,this._canvas=pe.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){const n=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";const n=this.pixelRatio;this.getContext()._context.scale(n,n)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";const n=this.pixelRatio;this.getContext()._context.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,n){this.setWidth(e||0),this.setHeight(n||0)}toDataURL(e,n){try{return this._canvas.toDataURL(e,n)}catch{try{return this._canvas.toDataURL()}catch(s){return pe.error("Unable to get data URL. "+s.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class jo extends Zg{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new Zw(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}}class $g extends Zg{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new $w(this),this.setSize(e.width,e.height)}}const on={get isDragging(){let t=!1;return on._dragElements.forEach(e=>{e.dragStatus==="dragging"&&(t=!0)}),t},justDragged:!1,get node(){let t;return on._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){const e=[];on._dragElements.forEach((n,i)=>{const{node:s}=n,c=s.getStage();c.setPointersPositions(t),n.pointerId===void 0&&(n.pointerId=pe._getFirstPointerId(t));const d=c._changedPointerPositions.find(h=>h.id===n.pointerId);if(d){if(n.dragStatus!=="dragging"){const h=s.dragDistance();if(Math.max(Math.abs(d.x-n.startPointerPos.x),Math.abs(d.y-n.startPointerPos.y))<h||(s.startDrag({evt:t}),!s.isDragging()))return}s._setDragPosition(t,n),e.push(s)}}),e.forEach(n=>{n.fire("dragmove",{type:"dragmove",target:n,evt:t},!0)})},_endDragBefore(t){const e=[];on._dragElements.forEach(n=>{const{node:i}=n,s=i.getStage();if(t&&s.setPointersPositions(t),!s._changedPointerPositions.find(h=>h.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(on.justDragged=!0,Ye._mouseListenClick=!1,Ye._touchListenClick=!1,Ye._pointerListenClick=!1,n.dragStatus="stopped");const d=n.node.getLayer()||n.node instanceof Ye.Stage&&n.node;d&&e.indexOf(d)===-1&&e.push(d)}),e.forEach(n=>{n.draw()})},_endDragAfter(t){on._dragElements.forEach((e,n)=>{e.dragStatus==="stopped"&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),e.dragStatus!=="dragging"&&on._dragElements.delete(n)})}};Ye.isBrowser&&(window.addEventListener("mouseup",on._endDragBefore,!0),window.addEventListener("touchend",on._endDragBefore,!0),window.addEventListener("touchcancel",on._endDragBefore,!0),window.addEventListener("mousemove",on._drag),window.addEventListener("touchmove",on._drag),window.addEventListener("mouseup",on._endDragAfter,!1),window.addEventListener("touchend",on._endDragAfter,!1),window.addEventListener("touchcancel",on._endDragAfter,!1));function Xo(t){return pe._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||pe._isBoolean(t)?t:Object.prototype.toString.call(t)}function kx(t){return t>255?255:t<0?0:Math.round(t)}function We(){if(Ye.isUnminified)return function(t,e){return pe._isNumber(t)||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function yA(t){if(Ye.isUnminified)return function(e,n){let i=pe._isNumber(e),s=pe._isArray(e)&&e.length==t;return!i&&!s&&pe.warn(Xo(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}}function ev(){if(Ye.isUnminified)return function(t,e){return pe._isNumber(t)||t==="auto"||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function Ol(){if(Ye.isUnminified)return function(t,e){return pe._isString(t)||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function Nx(){if(Ye.isUnminified)return function(t,e){const n=pe._isString(t),i=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return n||i||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function tC(){if(Ye.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(pe._isArray(t)?t.forEach(function(i){pe._isNumber(i)||pe.warn('"'+e+'" attribute has non numeric element '+i+". Make sure that all elements are numbers.")}):pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function Fi(){if(Ye.isUnminified)return function(t,e){return t===!0||t===!1||pe.warn(Xo(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function nC(t){if(Ye.isUnminified)return function(e,n){return e==null||pe.isObject(e)||pe.warn(Xo(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}const uf="get",df="set",ee={addGetterSetter(t,e,n,i,s){ee.addGetter(t,e,n),ee.addSetter(t,e,i,s),ee.addOverloadedGetterSetter(t,e)},addGetter(t,e,n){const i=uf+pe._capitalize(e);t.prototype[i]=t.prototype[i]||function(){const s=this.attrs[e];return s===void 0?n:s}},addSetter(t,e,n,i){const s=df+pe._capitalize(e);t.prototype[s]||ee.overWriteSetter(t,e,n,i)},overWriteSetter(t,e,n,i){const s=df+pe._capitalize(e);t.prototype[s]=function(c){return n&&c!==void 0&&c!==null&&(c=n.call(this,c,e)),this._setAttr(e,c),i&&i.call(this),this}},addComponentsGetterSetter(t,e,n,i,s){const c=n.length,d=pe._capitalize,h=uf+d(e),p=df+d(e);t.prototype[h]=function(){const A={};for(let y=0;y<c;y++){const x=n[y];A[x]=this.getAttr(e+d(x))}return A};const u=nC(n);t.prototype[p]=function(A){const y=this.attrs[e];i&&(A=i.call(this,A,e)),u&&u.call(this,A,e);for(const x in A)A.hasOwnProperty(x)&&this._setAttr(e+d(x),A[x]);return A||n.forEach(x=>{this._setAttr(e+d(x),void 0)}),this._fireChangeEvent(e,y,A),s&&s.call(this),this},ee.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){const n=pe._capitalize(e),i=df+n,s=uf+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[s]()}},addDeprecatedGetterSetter(t,e,n,i){pe.error("Adding deprecated "+e);const s=uf+pe._capitalize(e),c=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[s]=function(){pe.error(c);const d=this.attrs[e];return d===void 0?n:d},ee.addSetter(t,e,i,function(){pe.error(c)}),ee.addOverloadedGetterSetter(t,e)},backCompat(t,e){pe.each(e,function(n,i){const s=t.prototype[i],c=uf+pe._capitalize(n),d=df+pe._capitalize(n);function h(){s.apply(this,arguments),pe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+i+'" instead.')}t.prototype[n]=h,t.prototype[c]=h,t.prototype[d]=h})},afterSetFilter(){this._filterUpToDate=!1}};function rC(t){const e=/(\w+)\(([^)]+)\)/g;let n;for(;(n=e.exec(t))!==null;){const[,i,s]=n;switch(i){case"blur":{const c=parseFloat(s.replace("px",""));return function(d){this.blurRadius(c*.5);const h=Ye.Filters;h&&h.Blur&&h.Blur.call(this,d)}}case"brightness":{const c=s.includes("%")?parseFloat(s)/100:parseFloat(s);return function(d){this.brightness(c);const h=Ye.Filters;h&&h.Brightness&&h.Brightness.call(this,d)}}case"contrast":{const c=parseFloat(s);return function(d){const h=100*(Math.sqrt(c)-1);this.contrast(h);const p=Ye.Filters;p&&p.Contrast&&p.Contrast.call(this,d)}}case"grayscale":return function(c){const d=Ye.Filters;d&&d.Grayscale&&d.Grayscale.call(this,c)};case"sepia":return function(c){const d=Ye.Filters;d&&d.Sepia&&d.Sepia.call(this,c)};case"invert":return function(c){const d=Ye.Filters;d&&d.Invert&&d.Invert.call(this,c)};default:pe.warn(`CSS filter "${i}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const aA="absoluteOpacity",m2="allEventListeners",qs="absoluteTransform",g2="absoluteScale",Pl="canvas",aC="Change",iC="children",sC="konva",kg="listening",oC="mouseenter",lC="mouseleave",cC="pointerenter",uC="pointerleave",dC="touchenter",fC="touchleave",v2="set",y2="Shape",iA=" ",x2="stage",Fo="transform",hC="Stage",Ng="visible",pC=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(iA);let AC=1;class He{constructor(e){this._id=AC++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===Fo||e===qs)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,n){let i=this._cache.get(e);return(i===void 0||(e===Fo||e===qs)&&i.dirty===!0)&&(i=n.call(this),this._cache.set(e,i)),i}_calculate(e,n,i){if(!this._attachedDepsListeners.get(e)){const s=n.map(c=>c+"Change.konva").join(iA);this.on(s,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,i)}_getCanvasCache(){return this._cache.get(Pl)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===qs&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Pl)){const{scene:e,filter:n,hit:i}=this._cache.get(Pl);pe.releaseCanvas(e._canvas,n._canvas,i._canvas),this._cache.delete(Pl)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){const n=e||{};let i={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(i=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let s=Math.ceil(n.width||i.width),c=Math.ceil(n.height||i.height),d=n.pixelRatio,h=n.x===void 0?Math.floor(i.x):n.x,p=n.y===void 0?Math.floor(i.y):n.y,u=n.offset||0,A=n.drawBorder||!1,y=n.hitCanvasPixelRatio||1;if(!s||!c){pe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const x=Math.abs(Math.round(i.x)-h)>.5?1:0,S=Math.abs(Math.round(i.y)-p)>.5?1:0;s+=u*2+x,c+=u*2+S,h-=u,p-=u;const w=new jo({pixelRatio:d,width:s,height:c}),T=new jo({pixelRatio:d,width:0,height:0,willReadFrequently:!0}),R=new $g({pixelRatio:y,width:s,height:c}),D=w.getContext(),N=R.getContext(),M=new jo({width:w.width/w.pixelRatio+Math.abs(h),height:w.height/w.pixelRatio+Math.abs(p),pixelRatio:w.pixelRatio}),O=M.getContext();return R.isCache=!0,w.isCache=!0,this._cache.delete(Pl),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(w.getContext()._context.imageSmoothingEnabled=!1,T.getContext()._context.imageSmoothingEnabled=!1),D.save(),N.save(),O.save(),D.translate(-h,-p),N.translate(-h,-p),O.translate(-h,-p),M.x=h,M.y=p,this._isUnderCache=!0,this._clearSelfAndDescendantCache(aA),this._clearSelfAndDescendantCache(g2),this.drawScene(w,this,M),this.drawHit(R,this),this._isUnderCache=!1,D.restore(),N.restore(),A&&(D.save(),D.beginPath(),D.rect(0,0,s,c),D.closePath(),D.setAttr("strokeStyle","red"),D.setAttr("lineWidth",5),D.stroke(),D.restore()),pe.releaseCanvas(M._canvas),this._cache.set(Pl,{scene:w,filter:T,hit:R,x:h,y:p}),this._requestDraw(),this}isCached(){return this._cache.has(Pl)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,n){const i=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}];let s=1/0,c=1/0,d=-1/0,h=-1/0;const p=this.getAbsoluteTransform(n);return i.forEach(function(u){const A=p.point(u);s===void 0&&(s=d=A.x,c=h=A.y),s=Math.min(s,A.x),c=Math.min(c,A.y),d=Math.max(d,A.x),h=Math.max(h,A.y)}),{x:s,y:c,width:d-s,height:h-c}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();e.translate(n.x,n.y);const i=this._getCachedSceneCanvas(),s=i.pixelRatio;e.drawImage(i._canvas,0,0,i.width/s,i.height/s),e.restore()}_drawCachedHitCanvas(e){const n=this._getCanvasCache(),i=n.hit;e.save(),e.translate(n.x,n.y),e.drawImage(i._canvas,0,0,i.width/i.pixelRatio,i.height/i.pixelRatio),e.restore()}_getCachedSceneCanvas(){let e=this.filters(),n=this._getCanvasCache(),i=n.scene,s=n.filter,c=s.getContext(),d,h,p,u;if(!e||e.length===0)return i;if(this._filterUpToDate)return s;let A=!0;for(let x=0;x<e.length;x++)if(typeof e[x]=="string"&&A2(),typeof e[x]!="string"||!A2()){A=!1;break}const y=i.pixelRatio;if(s.setSize(i.width/i.pixelRatio,i.height/i.pixelRatio),A){const x=e.join(" ");return c.save(),c.setAttr("filter",x),c.drawImage(i._canvas,0,0,i.getWidth()/y,i.getHeight()/y),c.restore(),this._filterUpToDate=!0,s}try{for(d=e.length,c.clear(),c.drawImage(i._canvas,0,0,i.getWidth()/y,i.getHeight()/y),h=c.getImageData(0,0,s.getWidth(),s.getHeight()),p=0;p<d;p++)u=e[p],typeof u=="string"&&(u=rC(u)),u.call(this,h),c.putImageData(h,0,0)}catch(x){pe.error("Unable to apply filter. "+x.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,s}on(e,n){if(this._cache&&this._cache.delete(m2),arguments.length===3)return this._delegate.apply(this,arguments);const i=e.split(iA);for(let s=0;s<i.length;s++){const d=i[s].split("."),h=d[0],p=d[1]||"";this.eventListeners[h]||(this.eventListeners[h]=[]),this.eventListeners[h].push({name:p,handler:n})}return this}off(e,n){let i=(e||"").split(iA),s=i.length,c,d,h,p,u,A;if(this._cache&&this._cache.delete(m2),!e)for(d in this.eventListeners)this._off(d);for(c=0;c<s;c++)if(h=i[c],p=h.split("."),u=p[0],A=p[1],u)this.eventListeners[u]&&this._off(u,A,n);else for(d in this.eventListeners)this._off(d,A,n);return this}dispatchEvent(e){const n={target:this,type:e.type,evt:e};return this.fire(e.type,n),this}addEventListener(e,n){return this.on(e,function(i){n.call(this,i.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,n,i){const s=this;this.on(e,function(c){const d=c.target.findAncestors(n,!0,s);for(let h=0;h<d.length;h++)c=pe.cloneObject(c),c.currentTarget=d[h],i.call(d[h],c)})}remove(){return this.isDragging()&&this.stopDrag(),on._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(qs),this._clearSelfAndDescendantCache(aA),this._clearSelfAndDescendantCache(g2),this._clearSelfAndDescendantCache(x2),this._clearSelfAndDescendantCache(Ng),this._clearSelfAndDescendantCache(kg)}_remove(){this._clearCaches();const e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(e){const n="get"+pe._capitalize(e);return pe._isFunction(this[n])?this[n]():this.attrs[e]}getAncestors(){let e=this.getParent(),n=[];for(;e;)n.push(e),e=e.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{let n,i;if(!e)return this;for(n in e)n!==iC&&(i=v2+pe._capitalize(n),pe._isFunction(this[i])?this[i](e[n]):this._setAttr(n,e[n]))}),this}isListening(){return this._getCache(kg,this._isListening)}_isListening(e){if(!this.listening())return!1;const i=this.getParent();return i&&i!==e&&this!==e?i._isListening(e):!0}isVisible(){return this._getCache(Ng,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const i=this.getParent();return i&&i!==e&&this!==e?i._isVisible(e):!0}shouldDrawHit(e,n=!1){if(e)return this._isVisible(e)&&this._isListening(e);const i=this.getLayer();let s=!1;on._dragElements.forEach(d=>{d.dragStatus==="dragging"&&(d.node.nodeType==="Stage"||d.node.getLayer()===i)&&(s=!0)});const c=!n&&!Ye.hitOnDragEnabled&&(s||Ye.isTransforming());return this.isListening()&&this.isVisible()&&!c}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let e=this.getDepth(),n=this,i=0,s,c,d,h;function p(A){for(s=[],c=A.length,d=0;d<c;d++)h=A[d],i++,h.nodeType!==y2&&(s=s.concat(h.getChildren().slice())),h._id===n._id&&(d=c);s.length>0&&s[0].getDepth()<=e&&p(s)}const u=this.getStage();return n.nodeType!==hC&&u&&p(u.getChildren()),i}getDepth(){let e=0,n=this.parent;for(;n;)e++,n=n.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Fo),this._clearSelfAndDescendantCache(qs)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;const n=e.getPointerPosition();if(!n)return null;const i=this.getAbsoluteTransform().copy();return i.invert(),i.point(n)}getAbsolutePosition(e){let n=!1,i=this.parent;for(;i;){if(i.isCached()){n=!0;break}i=i.parent}n&&!e&&(e=!0);const s=this.getAbsoluteTransform(e).getMatrix(),c=new Va,d=this.offset();return c.m=s.slice(),c.translate(d.x,d.y),c.getTranslation()}setAbsolutePosition(e){const{x:n,y:i,...s}=this._clearTransform();this.attrs.x=n,this.attrs.y=i,this._clearCache(Fo);const c=this._getAbsoluteTransform().copy();return c.invert(),c.translate(e.x,e.y),e={x:this.attrs.x+c.getTranslation().x,y:this.attrs.y+c.getTranslation().y},this._setTransform(s),this.setPosition({x:e.x,y:e.y}),this._clearCache(Fo),this._clearSelfAndDescendantCache(qs),this}_setTransform(e){let n;for(n in e)this.attrs[n]=e[n]}_clearTransform(){const e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){let n=e.x,i=e.y,s=this.x(),c=this.y();return n!==void 0&&(s+=n),i!==void 0&&(c+=i),this.setPosition({x:s,y:c}),this}_eachAncestorReverse(e,n){let i=[],s=this.getParent(),c,d;if(!(n&&n._id===this._id)){for(i.unshift(this);s&&(!n||s._id!==n._id);)i.unshift(s),s=s.parent;for(c=i.length,d=0;d<c;d++)e(i[d])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return pe.warn("Node has no parent. moveToTop function is ignored."),!1;const e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return pe.warn("Node has no parent. moveUp function is ignored."),!1;const e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return pe.warn("Node has no parent. moveDown function is ignored."),!1;const e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return pe.warn("Node has no parent. moveToBottom function is ignored."),!1;const e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return pe.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&pe.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(aA,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let e=this.opacity();const n=this.getParent();return n&&!n._isUnderCache&&(e*=n.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){let e=this.getAttrs(),n,i,s,c,d;const h={attrs:{},className:this.getClassName()};for(n in e)i=e[n],d=pe.isObject(i)&&!pe._isPlainObject(i)&&!pe._isArray(i),!d&&(s=typeof this[n]=="function"&&this[n],delete e[n],c=s?s.call(this):null,e[n]=i,c!==i&&(h.attrs[n]=i));return pe._prepareToStringify(h)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,n,i){const s=[];n&&this._isMatch(e)&&s.push(this);let c=this.parent;for(;c;){if(c===i)return s;c._isMatch(e)&&s.push(c),c=c.parent}return s}isAncestorOf(e){return!1}findAncestor(e,n,i){return this.findAncestors(e,n,i)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);let n=e.replace(/ /g,"").split(","),i=n.length,s,c;for(s=0;s<i;s++)if(c=n[s],pe.isValidSelector(c)||(pe.warn('Selector "'+c+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),pe.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),pe.warn("Konva is awesome, right?")),c.charAt(0)==="#"){if(this.id()===c.slice(1))return!0}else if(c.charAt(0)==="."){if(this.hasName(c.slice(1)))return!0}else if(this.className===c||this.nodeType===c)return!0;return!1}getLayer(){const e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(x2,this._getStage)}_getStage(){const e=this.getParent();return e?e.getStage():null}fire(e,n={},i){return n.target=n.target||this,i?this._fireAndBubble(e,n):this._fire(e,n),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(qs,this._getAbsoluteTransform)}_getAbsoluteTransform(e){let n;if(e)return n=new Va,this._eachAncestorReverse(function(i){const s=i.transformsEnabled();s==="all"?n.multiply(i.getTransform()):s==="position"&&n.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},e),n;{n=this._cache.get(qs)||new Va,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();const i=this.transformsEnabled();if(i==="all")n.multiply(this.getTransform());else if(i==="position"){const s=this.attrs.x||0,c=this.attrs.y||0,d=this.attrs.offsetX||0,h=this.attrs.offsetY||0;n.translate(s-d,c-h)}return n.dirty=!1,n}}getAbsoluteScale(e){let n=this;for(;n;)n._isUnderCache&&(e=n),n=n.getParent();const s=this.getAbsoluteTransform(e).decompose();return{x:s.scaleX,y:s.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Fo,this._getTransform)}_getTransform(){var e,n;const i=this._cache.get(Fo)||new Va;i.reset();const s=this.x(),c=this.y(),d=Ye.getAngle(this.rotation()),h=(e=this.attrs.scaleX)!==null&&e!==void 0?e:1,p=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,A=this.attrs.skewY||0,y=this.attrs.offsetX||0,x=this.attrs.offsetY||0;return(s!==0||c!==0)&&i.translate(s,c),d!==0&&i.rotate(d),(u!==0||A!==0)&&i.skew(u,A),(h!==1||p!==1)&&i.scale(h,p),(y!==0||x!==0)&&i.translate(-1*y,-1*x),i.dirty=!1,i}clone(e){let n=pe.cloneObject(this.attrs),i,s,c,d,h;for(i in e)n[i]=e[i];const p=new this.constructor(n);for(i in this.eventListeners)for(s=this.eventListeners[i],c=s.length,d=0;d<c;d++)h=s[d],h.name.indexOf(sC)<0&&(p.eventListeners[i]||(p.eventListeners[i]=[]),p.eventListeners[i].push(h));return p}_toKonvaCanvas(e){e=e||{};const n=this.getClientRect(),i=this.getStage(),s=e.x!==void 0?e.x:Math.floor(n.x),c=e.y!==void 0?e.y:Math.floor(n.y),d=e.pixelRatio||1,h=new jo({width:e.width||Math.ceil(n.width)||(i?i.width():0),height:e.height||Math.ceil(n.height)||(i?i.height():0),pixelRatio:d}),p=h.getContext(),u=new jo({width:h.width/h.pixelRatio+Math.abs(s),height:h.height/h.pixelRatio+Math.abs(c),pixelRatio:h.pixelRatio});return e.imageSmoothingEnabled===!1&&(p._context.imageSmoothingEnabled=!1),p.save(),(s||c)&&p.translate(-1*s,-1*c),this.drawScene(h,void 0,u),p.restore(),h}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e=e||{};const n=e.mimeType||null,i=e.quality||null,s=this._toKonvaCanvas(e).toDataURL(n,i);return e.callback&&e.callback(s),s}toImage(e){return new Promise((n,i)=>{try{const s=e==null?void 0:e.callback;s&&delete e.callback,pe._urlToImage(this.toDataURL(e),function(c){n(c),s==null||s(c)})}catch(s){i(s)}})}toBlob(e){return new Promise((n,i)=>{try{const s=e==null?void 0:e.callback;s&&delete e.callback,this.toCanvas(e).toBlob(c=>{n(c),s==null||s(c)},e==null?void 0:e.mimeType,e==null?void 0:e.quality)}catch(s){i(s)}})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Ye.dragDistance}_off(e,n,i){let s=this.eventListeners[e],c,d,h;for(c=0;c<s.length;c++)if(d=s[c].name,h=s[c].handler,(d!=="konva"||n==="konva")&&(!n||d===n)&&(!i||i===h)){if(s.splice(c,1),s.length===0){delete this.eventListeners[e];break}c--}}_fireChangeEvent(e,n,i){this._fire(e+aC,{oldVal:n,newVal:i})}addName(e){if(!this.hasName(e)){const n=this.name(),i=n?n+" "+e:e;this.name(i)}return this}hasName(e){if(!e)return!1;const n=this.name();return n?(n||"").split(/\s/g).indexOf(e)!==-1:!1}removeName(e){const n=(this.name()||"").split(/\s/g),i=n.indexOf(e);return i!==-1&&(n.splice(i,1),this.name(n.join(" "))),this}setAttr(e,n){const i=this[v2+pe._capitalize(e)];return pe._isFunction(i)?i.call(this,n):this._setAttr(e,n),this}_requestDraw(){if(Ye.autoDrawEnabled){const e=this.getLayer()||this.getStage();e==null||e.batchDraw()}}_setAttr(e,n){const i=this.attrs[e];i===n&&!pe.isObject(n)||(n==null?delete this.attrs[e]:this.attrs[e]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(e,i,n),this._requestDraw())}_setComponentAttr(e,n,i){let s;i!==void 0&&(s=this.attrs[e],s||(this.attrs[e]=this.getAttr(e)),this.attrs[e][n]=i,this._fireChangeEvent(e,s,i))}_fireAndBubble(e,n,i){n&&this.nodeType===y2&&(n.target=this);const s=[oC,lC,cC,uC,dC,fC];if(!(s.indexOf(e)!==-1&&(i&&(this===i||this.isAncestorOf&&this.isAncestorOf(i))||this.nodeType==="Stage"&&!i))){this._fire(e,n);const d=s.indexOf(e)!==-1&&i&&i.isAncestorOf&&i.isAncestorOf(this)&&!i.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!d&&(i&&i.parent?this._fireAndBubble.call(this.parent,e,n,i):this._fireAndBubble.call(this.parent,e,n))}}_getProtoListeners(e){var n,i;const{nodeType:s}=this,c=He.protoListenerMap.get(s)||{};let d=c==null?void 0:c[e];if(d===void 0){d=[];let h=Object.getPrototypeOf(this);for(;h;){const p=(i=(n=h.eventListeners)===null||n===void 0?void 0:n[e])!==null&&i!==void 0?i:[];d.push(...p),h=Object.getPrototypeOf(h)}c[e]=d,He.protoListenerMap.set(s,c)}return d}_fire(e,n){n=n||{},n.currentTarget=this,n.type=e;const i=this._getProtoListeners(e);if(i)for(let c=0;c<i.length;c++)i[c].handler.call(this,n);const s=this.eventListeners[e];if(s)for(let c=0;c<s.length;c++)s[c].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){const n=e?e.pointerId:void 0,i=this.getStage(),s=this.getAbsolutePosition();if(!i)return;const c=i._getPointerById(n)||i._changedPointerPositions[0]||s;on._dragElements.set(this._id,{node:this,startPointerPos:c,offset:{x:c.x-s.x,y:c.y-s.y},dragStatus:"ready",pointerId:n})}startDrag(e,n=!0){on._dragElements.has(this._id)||this._createDragElement(e);const i=on._dragElements.get(this._id);i.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},n)}_setDragPosition(e,n){const i=this.getStage()._getPointerById(n.pointerId);if(!i)return;let s={x:i.x-n.offset.x,y:i.y-n.offset.y};const c=this.dragBoundFunc();if(c!==void 0){const d=c.call(this,s,e);d?s=d:pe.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==s.x||this._lastPos.y!==s.y)&&(this.setAbsolutePosition(s),this._requestDraw()),this._lastPos=s}stopDrag(e){const n=on._dragElements.get(this._id);n&&(n.dragStatus="stopped"),on._endDragBefore(e),on._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=on._dragElements.get(this._id);return e?e.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(e){if(!(!(e.evt.button!==void 0)||Ye.dragButtons.indexOf(e.evt.button)>=0)||this.isDragging())return;let s=!1;on._dragElements.forEach(c=>{this.isAncestorOf(c.node)&&(s=!0)}),s||this._createDragElement(e)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const n=on._dragElements.get(this._id),i=n&&n.dragStatus==="dragging",s=n&&n.dragStatus==="ready";i?this.stopDrag():s&&on._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const n=this.getStage();if(!n)return!1;const i={x:-e.x,y:-e.y,width:n.width()+2*e.x,height:n.height()+2*e.y};return pe.haveIntersection(i,this.getClientRect())}static create(e,n){return pe._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)}static _createNode(e,n){let i=He.prototype.getClassName.call(e),s=e.children,c,d,h;n&&(e.attrs.container=n),Ye[i]||(pe.warn('Can not find a node with class name "'+i+'". Fallback to "Shape".'),i="Shape");const p=Ye[i];if(c=new p(e.attrs),s)for(d=s.length,h=0;h<d;h++)c.add(He._createNode(s[h]));return c}}He.protoListenerMap=new Map;He.prototype.nodeType="Node";He.prototype._attrsAffectingSize=[];He.prototype.eventListeners={};He.prototype.on.call(He.prototype,pC,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Fo),this._clearSelfAndDescendantCache(qs)});He.prototype.on.call(He.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Ng)});He.prototype.on.call(He.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(kg)});He.prototype.on.call(He.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(aA)});const xn=ee.addGetterSetter;xn(He,"zIndex");xn(He,"absolutePosition");xn(He,"position");xn(He,"x",0,We());xn(He,"y",0,We());xn(He,"globalCompositeOperation","source-over",Ol());xn(He,"opacity",1,We());xn(He,"name","",Ol());xn(He,"id","",Ol());xn(He,"rotation",0,We());ee.addComponentsGetterSetter(He,"scale",["x","y"]);xn(He,"scaleX",1,We());xn(He,"scaleY",1,We());ee.addComponentsGetterSetter(He,"skew",["x","y"]);xn(He,"skewX",0,We());xn(He,"skewY",0,We());ee.addComponentsGetterSetter(He,"offset",["x","y"]);xn(He,"offsetX",0,We());xn(He,"offsetY",0,We());xn(He,"dragDistance",void 0,We());xn(He,"width",0,We());xn(He,"height",0,We());xn(He,"listening",!0,Fi());xn(He,"preventDefault",!0,Fi());xn(He,"filters",void 0,function(t){return this._filterUpToDate=!1,t});xn(He,"visible",!0,Fi());xn(He,"transformsEnabled","all",Ol());xn(He,"size");xn(He,"dragBoundFunc");xn(He,"draggable",!1,Fi());ee.backCompat(He,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class qa extends He{constructor(){super(...arguments),this.children=[]}getChildren(e){const n=this.children||[];return e?n.filter(e):n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(let i=0;i<e.length;i++)this.add(e[i]);return this}const n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){const n=this._generalFind(e,!0);return n.length>0?n[0]:void 0}_generalFind(e,n){const i=[];return this._descendants(s=>{const c=s._isMatch(e);return c&&i.push(s),!!(c&&n)}),i}_descendants(e){let n=!1;const i=this.getChildren();for(const s of i){if(n=e(s),n)return!0;if(s.hasChildren()&&(n=s._descendants(e),n))return!0}return!1}toObject(){const e=He.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(n=>{e.children.push(n.toObject())}),e}isAncestorOf(e){let n=e.getParent();for(;n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(e){const n=He.prototype.clone.call(this,e);return this.getChildren().forEach(function(i){n.add(i.clone())}),n}getAllIntersections(e){const n=[];return this.find("Shape").forEach(i=>{i.isVisible()&&i.intersects(e)&&n.push(i)}),n}_clearSelfAndDescendantCache(e){var n;super._clearSelfAndDescendantCache(e),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(i){i._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(n,i){n.index=i}),this._requestDraw()}drawScene(e,n,i){const s=this.getLayer(),c=e||s&&s.getCanvas(),d=c&&c.getContext(),h=this._getCanvasCache(),p=h&&h.scene,u=c&&c.isCache;if(!this.isVisible()&&!u)return this;if(p){d.save();const A=this.getAbsoluteTransform(n).getMatrix();d.transform(A[0],A[1],A[2],A[3],A[4],A[5]),this._drawCachedSceneCanvas(d),d.restore()}else this._drawChildren("drawScene",c,n,i);return this}drawHit(e,n){if(!this.shouldDrawHit(n))return this;const i=this.getLayer(),s=e||i&&i.hitCanvas,c=s&&s.getContext(),d=this._getCanvasCache();if(d&&d.hit){c.save();const p=this.getAbsoluteTransform(n).getMatrix();c.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedHitCanvas(c),c.restore()}else this._drawChildren("drawHit",s,n);return this}_drawChildren(e,n,i,s){var c;const d=n&&n.getContext(),h=this.clipWidth(),p=this.clipHeight(),u=this.clipFunc(),A=typeof h=="number"&&typeof p=="number"||u,y=i===this;if(A){d.save();const S=this.getAbsoluteTransform(i);let w=S.getMatrix();d.transform(w[0],w[1],w[2],w[3],w[4],w[5]),d.beginPath();let T;if(u)T=u.call(this,d,this);else{const R=this.clipX(),D=this.clipY();d.rect(R||0,D||0,h,p)}d.clip.apply(d,T),w=S.copy().invert().getMatrix(),d.transform(w[0],w[1],w[2],w[3],w[4],w[5])}const x=!y&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";x&&(d.save(),d._applyGlobalCompositeOperation(this)),(c=this.children)===null||c===void 0||c.forEach(function(S){S[e](n,i,s)}),x&&d.restore(),A&&d.restore()}getClientRect(e={}){var n;const i=e.skipTransform,s=e.relativeTo;let c,d,h,p,u={x:1/0,y:1/0,width:0,height:0};const A=this;(n=this.children)===null||n===void 0||n.forEach(function(S){if(!S.visible())return;const w=S.getClientRect({relativeTo:A,skipShadow:e.skipShadow,skipStroke:e.skipStroke});w.width===0&&w.height===0||(c===void 0?(c=w.x,d=w.y,h=w.x+w.width,p=w.y+w.height):(c=Math.min(c,w.x),d=Math.min(d,w.y),h=Math.max(h,w.x+w.width),p=Math.max(p,w.y+w.height)))});const y=this.find("Shape");let x=!1;for(let S=0;S<y.length;S++)if(y[S]._isVisible(this)){x=!0;break}return x&&c!==void 0?u={x:c,y:d,width:h-c,height:p-d}:u={x:0,y:0,width:0,height:0},i?u:this._transformedRect(u,s)}}ee.addComponentsGetterSetter(qa,"clip",["x","y","width","height"]);ee.addGetterSetter(qa,"clipX",void 0,We());ee.addGetterSetter(qa,"clipY",void 0,We());ee.addGetterSetter(qa,"clipWidth",void 0,We());ee.addGetterSetter(qa,"clipHeight",void 0,We());ee.addGetterSetter(qa,"clipFunc");const kf=new Map,Px=Ye._global.PointerEvent!==void 0;function ag(t){return kf.get(t)}function tv(t){return{evt:t,pointerId:t.pointerId}}function Bx(t,e){return kf.get(t)===e}function Mx(t,e){Cf(t),e.getStage()&&(kf.set(t,e),Px&&e._fire("gotpointercapture",tv(new PointerEvent("gotpointercapture"))))}function Cf(t,e){const n=kf.get(t);if(!n)return;const i=n.getStage();i&&i.content,kf.delete(t),Px&&n._fire("lostpointercapture",tv(new PointerEvent("lostpointercapture")))}const mC="Stage",gC="string",b2="px",vC="mouseout",zx="mouseleave",Fx="mouseover",Ix="mouseenter",Ox="mousemove",Ux="mousedown",jx="mouseup",mf="pointermove",gf="pointerdown",Ru="pointerup",vf="pointercancel",yC="lostpointercapture",Gp="pointerout",yf="pointerleave",Hp="pointerover",Xp="pointerenter",Pg="contextmenu",Gx="touchstart",Hx="touchend",Xx="touchmove",Wx="touchcancel",Bg="wheel",xC=5,bC=[[Ix,"_pointerenter"],[Ux,"_pointerdown"],[Ox,"_pointermove"],[jx,"_pointerup"],[zx,"_pointerleave"],[Gx,"_pointerdown"],[Xx,"_pointermove"],[Hx,"_pointerup"],[Wx,"_pointercancel"],[Fx,"_pointerover"],[Bg,"_wheel"],[Pg,"_contextmenu"],[gf,"_pointerdown"],[mf,"_pointermove"],[Ru,"_pointerup"],[vf,"_pointercancel"],[yf,"_pointerleave"],[yC,"_lostpointercapture"]],ig={mouse:{[Gp]:vC,[yf]:zx,[Hp]:Fx,[Xp]:Ix,[mf]:Ox,[gf]:Ux,[Ru]:jx,[vf]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Gp]:"touchout",[yf]:"touchleave",[Hp]:"touchover",[Xp]:"touchenter",[mf]:Xx,[gf]:Gx,[Ru]:Hx,[vf]:Wx,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Gp]:Gp,[yf]:yf,[Hp]:Hp,[Xp]:Xp,[mf]:mf,[gf]:gf,[Ru]:Ru,[vf]:vf,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},xf=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",yu=t=>{const e=xf(t);if(e==="pointer")return Ye.pointerEventsEnabled&&ig.pointer;if(e==="touch")return ig.touch;if(e==="mouse")return ig.mouse};function S2(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&pe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}const SC="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",_f=[];let xA=class extends qa{constructor(e){super(S2(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),_f.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{S2(this.attrs)}),this._checkVisibility()}_validateAdd(e){const n=e.getType()==="Layer",i=e.getType()==="FastLayer";n||i||pe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if(typeof e===gC){let n;if(e.charAt(0)==="."){const i=e.slice(1);e=document.getElementsByClassName(i)[0]}else e.charAt(0)!=="#"?n=e:n=e.slice(1),e=document.getElementById(n);if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const e=this.children,n=e.length;for(let i=0;i<n;i++)e[i].clear();return this}clone(e){return e||(e={}),e.container=typeof document<"u"&&document.createElement("div"),qa.prototype.clone.call(this,e)}destroy(){super.destroy();const e=this.content;e&&pe._isInDocument(e)&&this.container().removeChild(e);const n=_f.indexOf(this);return n>-1&&_f.splice(n,1),pe.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(pe.warn(SC),null)}_getPointerById(e){return this._pointerPositions.find(n=>n.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e={...e},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();const n=new jo({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),i=n.getContext()._context,s=this.children;return(e.x||e.y)&&i.translate(-1*e.x,-1*e.y),s.forEach(function(c){if(!c.isVisible())return;const d=c._toKonvaCanvas(e);i.drawImage(d._canvas,e.x,e.y,d.getWidth()/d.getPixelRatio(),d.getHeight()/d.getPixelRatio())}),n}getIntersection(e){if(!e)return null;const n=this.children,i=n.length,s=i-1;for(let c=s;c>=0;c--){const d=n[c].getIntersection(e);if(d)return d}return null}_resizeDOM(){const e=this.width(),n=this.height();this.content&&(this.content.style.width=e+b2,this.content.style.height=n+b2),this.bufferCanvas.setSize(e,n),this.bufferHitCanvas.setSize(e,n),this.children.forEach(i=>{i.setSize({width:e,height:n}),i.draw()})}add(e,...n){if(arguments.length>1){for(let s=0;s<arguments.length;s++)this.add(arguments[s]);return this}super.add(e);const i=this.children.length;return i>xC&&pe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),e.setSize({width:this.width(),height:this.height()}),e.draw(),Ye.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return Bx(e,this)}setPointerCapture(e){Mx(e,this)}releaseCapture(e){Cf(e)}getLayers(){return this.children}_bindContentEvents(){Ye.isBrowser&&bC.forEach(([e,n])=>{this.content.addEventListener(e,i=>{this[n](i)},{passive:!1})})}_pointerenter(e){this.setPointersPositions(e);const n=yu(e.type);n&&this._fire(n.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const n=yu(e.type);n&&this._fire(n.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let n=this[e+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(e){const n=yu(e.type),i=xf(e.type);if(!n)return;this.setPointersPositions(e);const s=this._getTargetShape(i),c=!(Ye.isDragging()||Ye.isTransforming())||Ye.hitOnDragEnabled;s&&c?(s._fireAndBubble(n.pointerout,{evt:e}),s._fireAndBubble(n.pointerleave,{evt:e}),this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this[i+"targetShape"]=null):c&&(this._fire(n.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(e){const n=yu(e.type),i=xf(e.type);if(!n)return;this.setPointersPositions(e);let s=!1;this._changedPointerPositions.forEach(c=>{const d=this.getIntersection(c);if(on.justDragged=!1,Ye["_"+i+"ListenClick"]=!0,!d||!d.isListening()){this[i+"ClickStartShape"]=void 0;return}Ye.capturePointerEventsEnabled&&d.setPointerCapture(c.id),this[i+"ClickStartShape"]=d,d._fireAndBubble(n.pointerdown,{evt:e,pointerId:c.id}),s=!0;const h=e.type.indexOf("touch")>=0;d.preventDefault()&&e.cancelable&&h&&e.preventDefault()}),s||this._fire(n.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(e){const n=yu(e.type),i=xf(e.type);if(!n)return;const s=e.type.indexOf("touch")>=0||e.pointerType==="touch";if(Ye.isDragging()&&on.node.preventDefault()&&e.cancelable&&s&&e.preventDefault(),this.setPointersPositions(e),!(!(Ye.isDragging()||Ye.isTransforming())||Ye.hitOnDragEnabled))return;const d={};let h=!1;const p=this._getTargetShape(i);this._changedPointerPositions.forEach(u=>{const A=ag(u.id)||this.getIntersection(u),y=u.id,x={evt:e,pointerId:y},S=p!==A;if(S&&p&&(p._fireAndBubble(n.pointerout,{...x},A),p._fireAndBubble(n.pointerleave,{...x},A)),A){if(d[A._id])return;d[A._id]=!0}A&&A.isListening()?(h=!0,S&&(A._fireAndBubble(n.pointerover,{...x},p),A._fireAndBubble(n.pointerenter,{...x},p),this[i+"targetShape"]=A),A._fireAndBubble(n.pointermove,{...x})):p&&(this._fire(n.pointerover,{evt:e,target:this,currentTarget:this,pointerId:y}),this[i+"targetShape"]=null)}),h||this._fire(n.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const n=yu(e.type),i=xf(e.type);if(!n)return;this.setPointersPositions(e);const s=this[i+"ClickStartShape"],c=this[i+"ClickEndShape"],d={};let h=!1;this._changedPointerPositions.forEach(p=>{const u=ag(p.id)||this.getIntersection(p);if(u){if(u.releaseCapture(p.id),d[u._id])return;d[u._id]=!0}const A=p.id,y={evt:e,pointerId:A};let x=!1;Ye["_"+i+"InDblClickWindow"]?(x=!0,clearTimeout(this[i+"DblTimeout"])):on.justDragged||(Ye["_"+i+"InDblClickWindow"]=!0,clearTimeout(this[i+"DblTimeout"])),this[i+"DblTimeout"]=setTimeout(function(){Ye["_"+i+"InDblClickWindow"]=!1},Ye.dblClickWindow),u&&u.isListening()?(h=!0,this[i+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,{...y}),Ye["_"+i+"ListenClick"]&&s&&s===u&&(u._fireAndBubble(n.pointerclick,{...y}),x&&c&&c===u&&u._fireAndBubble(n.pointerdblclick,{...y}))):(this[i+"ClickEndShape"]=null,h||(this._fire(n.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),h=!0),Ye["_"+i+"ListenClick"]&&this._fire(n.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:A}),x&&this._fire(n.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:A}))}),h||this._fire(n.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Ye["_"+i+"ListenClick"]=!1,e.cancelable&&i!=="touch"&&i!=="pointer"&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);const n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(Pg,{evt:e}):this._fire(Pg,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);const n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(Bg,{evt:e}):this._fire(Bg,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const n=ag(e.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Ru,tv(e)),Cf(e.pointerId)}_lostpointercapture(e){Cf(e.pointerId)}setPointersPositions(e){const n=this._getContentPosition();let i=null,s=null;e=e||window.event,e.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,c=>{this._pointerPositions.push({id:c.identifier,x:(c.clientX-n.left)/n.scaleX,y:(c.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,c=>{this._changedPointerPositions.push({id:c.identifier,x:(c.clientX-n.left)/n.scaleX,y:(c.clientY-n.top)/n.scaleY})})):(i=(e.clientX-n.left)/n.scaleX,s=(e.clientY-n.top)/n.scaleY,this.pointerPos={x:i,y:s},this._pointerPositions=[{x:i,y:s,id:pe._getFirstPointerId(e)}],this._changedPointerPositions=[{x:i,y:s,id:pe._getFirstPointerId(e)}])}_setPointerPosition(e){pe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new jo({width:this.width(),height:this.height()}),this.bufferHitCanvas=new $g({pixelRatio:1,width:this.width(),height:this.height()}),!Ye.isBrowser)return;const e=this.container();if(!e)throw"Stage has no container. A container is required.";e.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),e.appendChild(this.content),this._resizeDOM()}cache(){return pe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(e){e.batchDraw()}),this}};xA.prototype.nodeType=mC;Mn(xA);ee.addGetterSetter(xA,"container");Ye.isBrowser&&document.addEventListener("visibilitychange",()=>{_f.forEach(t=>{t.batchDraw()})});const Qx="hasShadow",Yx="shadowRGBA",Vx="patternImage",qx="linearGradient",Kx="radialGradient";let Wp;function sg(){return Wp||(Wp=pe.createCanvasElement().getContext("2d"),Wp)}const Ef={};function wC(t){const e=this.attrs.fillRule;e?t.fill(e):t.fill()}function CC(t){t.stroke()}function _C(t){const e=this.attrs.fillRule;e?t.fill(e):t.fill()}function EC(t){t.stroke()}function TC(){this._clearCache(Qx)}function RC(){this._clearCache(Yx)}function DC(){this._clearCache(Vx)}function LC(){this._clearCache(qx)}function kC(){this._clearCache(Kx)}class Ie extends He{constructor(e){super(e);let n,i=0;for(;n=pe.getHitColor(),!(n&&!(n in Ef));)if(i++,i>=1e4){pe.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),n=pe.getRandomColor();break}this.colorKey=n,Ef[n]=this}getContext(){return pe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return pe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(Qx,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(Vx,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const n=sg().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const i=new Va;i.translate(this.fillPatternX(),this.fillPatternY()),i.rotate(Ye.getAngle(this.fillPatternRotation())),i.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),i.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const s=i.getMatrix(),c=typeof DOMMatrix>"u"?{a:s[0],b:s[1],c:s[2],d:s[3],e:s[4],f:s[5]}:new DOMMatrix(s);n.setTransform(c)}return n}}_getLinearGradient(){return this._getCache(qx,this.__getLinearGradient)}__getLinearGradient(){const e=this.fillLinearGradientColorStops();if(e){const n=sg(),i=this.fillLinearGradientStartPoint(),s=this.fillLinearGradientEndPoint(),c=n.createLinearGradient(i.x,i.y,s.x,s.y);for(let d=0;d<e.length;d+=2)c.addColorStop(e[d],e[d+1]);return c}}_getRadialGradient(){return this._getCache(Kx,this.__getRadialGradient)}__getRadialGradient(){const e=this.fillRadialGradientColorStops();if(e){const n=sg(),i=this.fillRadialGradientStartPoint(),s=this.fillRadialGradientEndPoint(),c=n.createRadialGradient(i.x,i.y,this.fillRadialGradientStartRadius(),s.x,s.y,this.fillRadialGradientEndRadius());for(let d=0;d<e.length;d+=2)c.addColorStop(e[d],e[d+1]);return c}}getShadowRGBA(){return this._getCache(Yx,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const e=pe.colorToRGBA(this.shadowColor());if(e)return"rgba("+e.r+","+e.g+","+e.b+","+e.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const e=this.hitStrokeWidth();return e==="auto"?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){const n=this.getStage();if(!n)return!1;const i=n.bufferHitCanvas;return i.getContext().clear(),this.drawHit(i,void 0,!0),i.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data[3]>0}destroy(){return He.prototype.destroy.call(this),delete Ef[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var n;if(!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const s=e||this.hasFill(),c=this.hasStroke(),d=this.getAbsoluteOpacity()!==1;if(s&&c&&d)return!0;const h=this.hasShadow(),p=this.shadowForStrokeEnabled();return!!(s&&c&&h&&p)}setStrokeHitEnabled(e){pe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){let n=!1,i=this.getParent();for(;i;){if(i.isCached()){n=!0;break}i=i.getParent()}const s=e.skipTransform,c=e.relativeTo||n&&this.getStage()||void 0,d=this.getSelfRect(),p=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,u=d.width+p,A=d.height+p,y=!e.skipShadow&&this.hasShadow(),x=y?this.shadowOffsetX():0,S=y?this.shadowOffsetY():0,w=u+Math.abs(x),T=A+Math.abs(S),R=y&&this.shadowBlur()||0,D=w+R*2,N=T+R*2,M={width:D,height:N,x:-(p/2+R)+Math.min(x,0)+d.x,y:-(p/2+R)+Math.min(S,0)+d.y};return s?M:this._transformedRect(M,c)}drawScene(e,n,i){const s=this.getLayer(),c=e||s.getCanvas(),d=c.getContext(),h=this._getCanvasCache(),p=this.getSceneFunc(),u=this.hasShadow();let A;const y=n===this;if(!this.isVisible()&&!y)return this;if(h){d.save();const x=this.getAbsoluteTransform(n).getMatrix();return d.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedSceneCanvas(d),d.restore(),this}if(!p)return this;if(d.save(),this._useBufferCanvas()){A=this.getStage();const x=i||A.bufferCanvas,S=x.getContext();i?(S.save(),S.setTransform(1,0,0,1,0,0),S.clearRect(0,0,x.width,x.height),S.restore()):S.clear(),S.save(),S._applyLineJoin(this),S._applyMiterLimit(this);const w=this.getAbsoluteTransform(n).getMatrix();S.transform(w[0],w[1],w[2],w[3],w[4],w[5]),p.call(this,S,this),S.restore();const T=x.pixelRatio;u&&d._applyShadow(this),y||(d._applyOpacity(this),d._applyGlobalCompositeOperation(this)),d.drawImage(x._canvas,x.x||0,x.y||0,x.width/T,x.height/T)}else{if(d._applyLineJoin(this),d._applyMiterLimit(this),!y){const x=this.getAbsoluteTransform(n).getMatrix();d.transform(x[0],x[1],x[2],x[3],x[4],x[5]),d._applyOpacity(this),d._applyGlobalCompositeOperation(this)}u&&d._applyShadow(this),p.call(this,d,this)}return d.restore(),this}drawHit(e,n,i=!1){if(!this.shouldDrawHit(n,i))return this;const s=this.getLayer(),c=e||s.hitCanvas,d=c&&c.getContext(),h=this.hitFunc()||this.sceneFunc(),p=this._getCanvasCache(),u=p&&p.hit;if(this.colorKey||pe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){d.save();const y=this.getAbsoluteTransform(n).getMatrix();return d.transform(y[0],y[1],y[2],y[3],y[4],y[5]),this._drawCachedHitCanvas(d),d.restore(),this}if(!h)return this;if(d.save(),d._applyLineJoin(this),d._applyMiterLimit(this),!(this===n)){const y=this.getAbsoluteTransform(n).getMatrix();d.transform(y[0],y[1],y[2],y[3],y[4],y[5])}return h.call(this,d,this),d.restore(),this}drawHitFromCache(e=0){const n=this._getCanvasCache(),i=this._getCachedSceneCanvas(),s=n.hit,c=s.getContext(),d=s.getWidth(),h=s.getHeight();c.clear(),c.drawImage(i._canvas,0,0,d,h);try{const p=c.getImageData(0,0,d,h),u=p.data,A=u.length,y=pe._hexToRgb(this.colorKey);for(let x=0;x<A;x+=4)u[x+3]>e?(u[x]=y.r,u[x+1]=y.g,u[x+2]=y.b,u[x+3]=255):u[x+3]=0;c.putImageData(p,0,0)}catch(p){pe.error("Unable to draw hit graph from cached scene canvas. "+p.message)}return this}hasPointerCapture(e){return Bx(e,this)}setPointerCapture(e){Mx(e,this)}releaseCapture(e){Cf(e)}}Ie.prototype._fillFunc=wC;Ie.prototype._strokeFunc=CC;Ie.prototype._fillFuncHit=_C;Ie.prototype._strokeFuncHit=EC;Ie.prototype._centroid=!1;Ie.prototype.nodeType="Shape";Mn(Ie);Ie.prototype.eventListeners={};Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",TC);Ie.prototype.on.call(Ie.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",RC);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",DC);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",LC);Ie.prototype.on.call(Ie.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",kC);ee.addGetterSetter(Ie,"stroke",void 0,Nx());ee.addGetterSetter(Ie,"strokeWidth",2,We());ee.addGetterSetter(Ie,"fillAfterStrokeEnabled",!1);ee.addGetterSetter(Ie,"hitStrokeWidth","auto",ev());ee.addGetterSetter(Ie,"strokeHitEnabled",!0,Fi());ee.addGetterSetter(Ie,"perfectDrawEnabled",!0,Fi());ee.addGetterSetter(Ie,"shadowForStrokeEnabled",!0,Fi());ee.addGetterSetter(Ie,"lineJoin");ee.addGetterSetter(Ie,"lineCap");ee.addGetterSetter(Ie,"miterLimit");ee.addGetterSetter(Ie,"sceneFunc");ee.addGetterSetter(Ie,"hitFunc");ee.addGetterSetter(Ie,"dash");ee.addGetterSetter(Ie,"dashOffset",0,We());ee.addGetterSetter(Ie,"shadowColor",void 0,Ol());ee.addGetterSetter(Ie,"shadowBlur",0,We());ee.addGetterSetter(Ie,"shadowOpacity",1,We());ee.addComponentsGetterSetter(Ie,"shadowOffset",["x","y"]);ee.addGetterSetter(Ie,"shadowOffsetX",0,We());ee.addGetterSetter(Ie,"shadowOffsetY",0,We());ee.addGetterSetter(Ie,"fillPatternImage");ee.addGetterSetter(Ie,"fill",void 0,Nx());ee.addGetterSetter(Ie,"fillPatternX",0,We());ee.addGetterSetter(Ie,"fillPatternY",0,We());ee.addGetterSetter(Ie,"fillLinearGradientColorStops");ee.addGetterSetter(Ie,"strokeLinearGradientColorStops");ee.addGetterSetter(Ie,"fillRadialGradientStartRadius",0);ee.addGetterSetter(Ie,"fillRadialGradientEndRadius",0);ee.addGetterSetter(Ie,"fillRadialGradientColorStops");ee.addGetterSetter(Ie,"fillPatternRepeat","repeat");ee.addGetterSetter(Ie,"fillEnabled",!0);ee.addGetterSetter(Ie,"strokeEnabled",!0);ee.addGetterSetter(Ie,"shadowEnabled",!0);ee.addGetterSetter(Ie,"dashEnabled",!0);ee.addGetterSetter(Ie,"strokeScaleEnabled",!0);ee.addGetterSetter(Ie,"fillPriority","color");ee.addComponentsGetterSetter(Ie,"fillPatternOffset",["x","y"]);ee.addGetterSetter(Ie,"fillPatternOffsetX",0,We());ee.addGetterSetter(Ie,"fillPatternOffsetY",0,We());ee.addComponentsGetterSetter(Ie,"fillPatternScale",["x","y"]);ee.addGetterSetter(Ie,"fillPatternScaleX",1,We());ee.addGetterSetter(Ie,"fillPatternScaleY",1,We());ee.addComponentsGetterSetter(Ie,"fillLinearGradientStartPoint",["x","y"]);ee.addComponentsGetterSetter(Ie,"strokeLinearGradientStartPoint",["x","y"]);ee.addGetterSetter(Ie,"fillLinearGradientStartPointX",0);ee.addGetterSetter(Ie,"strokeLinearGradientStartPointX",0);ee.addGetterSetter(Ie,"fillLinearGradientStartPointY",0);ee.addGetterSetter(Ie,"strokeLinearGradientStartPointY",0);ee.addComponentsGetterSetter(Ie,"fillLinearGradientEndPoint",["x","y"]);ee.addComponentsGetterSetter(Ie,"strokeLinearGradientEndPoint",["x","y"]);ee.addGetterSetter(Ie,"fillLinearGradientEndPointX",0);ee.addGetterSetter(Ie,"strokeLinearGradientEndPointX",0);ee.addGetterSetter(Ie,"fillLinearGradientEndPointY",0);ee.addGetterSetter(Ie,"strokeLinearGradientEndPointY",0);ee.addComponentsGetterSetter(Ie,"fillRadialGradientStartPoint",["x","y"]);ee.addGetterSetter(Ie,"fillRadialGradientStartPointX",0);ee.addGetterSetter(Ie,"fillRadialGradientStartPointY",0);ee.addComponentsGetterSetter(Ie,"fillRadialGradientEndPoint",["x","y"]);ee.addGetterSetter(Ie,"fillRadialGradientEndPointX",0);ee.addGetterSetter(Ie,"fillRadialGradientEndPointY",0);ee.addGetterSetter(Ie,"fillPatternRotation",0);ee.addGetterSetter(Ie,"fillRule",void 0,Ol());ee.backCompat(Ie,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const NC="beforeDraw",PC="draw",Jx=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],BC=Jx.length;let Ul=class extends qa{constructor(e){super(e),this.canvas=new jo,this.hitCanvas=new $g({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);const n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),e<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[e+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){He.prototype.moveToTop.call(this);const e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!He.prototype.moveUp.call(this))return!1;const n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(He.prototype.moveDown.call(this)){const e=this.getStage();if(e){const n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(He.prototype.moveToBottom.call(this)){const e=this.getStage();if(e){const n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const e=this.getNativeCanvasElement();return He.prototype.remove.call(this),e&&e.parentNode&&pe._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:n}){return this.canvas.setSize(e,n),this.hitCanvas.setSize(e,n),this._setSmoothEnabled(),this}_validateAdd(e){const n=e.getType();n!=="Group"&&n!=="Shape"&&pe.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return e={...e},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x!==void 0?e.x:this.x(),e.y=e.y!==void 0?e.y:this.y(),He.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){pe.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){pe.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,pe.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;let n=1,i=!1;for(;;){for(let s=0;s<BC;s++){const c=Jx[s],d=this._getIntersection({x:e.x+c.x*n,y:e.y+c.y*n}),h=d.shape;if(h)return h;if(i=!!d.antialiased,!d.antialiased)break}if(i)n+=1;else return null}}_getIntersection(e){const n=this.hitCanvas.pixelRatio,i=this.hitCanvas.context.getImageData(Math.round(e.x*n),Math.round(e.y*n),1,1).data,s=i[3];if(s===255){const c=pe.getHitColorKey(i[0],i[1],i[2]),d=Ef[c];return d?{shape:d}:{antialiased:!0}}else if(s>0)return{antialiased:!0};return{}}drawScene(e,n,i){const s=this.getLayer(),c=e||s&&s.getCanvas();return this._fire(NC,{node:this}),this.clearBeforeDraw()&&c.getContext().clear(),qa.prototype.drawScene.call(this,c,n,i),this._fire(PC,{node:this}),this}drawHit(e,n){const i=this.getLayer(),s=e||i&&i.hitCanvas;return i&&i.clearBeforeDraw()&&i.getHitCanvas().getContext().clear(),qa.prototype.drawHit.call(this,s,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){pe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return pe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}destroy(){return pe.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};Ul.prototype.nodeType="Layer";Mn(Ul);ee.addGetterSetter(Ul,"imageSmoothingEnabled",!0);ee.addGetterSetter(Ul,"clearBeforeDraw",!0);ee.addGetterSetter(Ul,"hitGraphEnabled",!0,Fi());class nv extends Ul{constructor(e){super(e),this.listening(!1),pe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}nv.prototype.nodeType="FastLayer";Mn(nv);let ku=class extends qa{_validateAdd(e){const n=e.getType();n!=="Group"&&n!=="Shape"&&pe.throw("You may only add groups and shapes to groups.")}};ku.prototype.nodeType="Group";Mn(ku);const og=(function(){return zl.performance&&zl.performance.now?function(){return zl.performance.now()}:function(){return new Date().getTime()}})();class Ai{constructor(e,n){this.id=Ai.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:og(),frameRate:0},this.func=e,this.setLayers(n)}setLayers(e){let n=[];return e&&(n=Array.isArray(e)?e:[e]),this.layers=n,this}getLayers(){return this.layers}addLayer(e){const n=this.layers,i=n.length;for(let s=0;s<i;s++)if(n[s]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){const n=Ai.animations,i=n.length;for(let s=0;s<i;s++)if(n[s].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=og(),Ai._addAnimation(this),this}stop(){return Ai._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){const n=e.id,i=this.animations,s=i.length;for(let c=0;c<s;c++)if(i[c].id===n){this.animations.splice(c,1);break}}static _runFrames(){const e={},n=this.animations;for(let i=0;i<n.length;i++){const s=n[i],c=s.layers,d=s.func;s._updateFrameObject(og());const h=c.length;let p;if(d?p=d.call(s,s.frame)!==!1:p=!0,!!p)for(let u=0;u<h;u++){const A=c[u];A._id!==void 0&&(e[A._id]=A)}}for(const i in e)e.hasOwnProperty(i)&&e[i].batchDraw()}static _animationLoop(){const e=Ai;e.animations.length?(e._runFrames(),pe.requestAnimFrame(e._animationLoop)):e.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,pe.requestAnimFrame(this._animationLoop))}}Ai.animations=[];Ai.animIdCounter=0;Ai.animRunning=!1;const MC={node:1,duration:1,easing:1,onFinish:1,yoyo:1},zC=1,w2=2,C2=3,_2=["fill","stroke","shadowColor"];let FC=0;class IC{constructor(e,n,i,s,c,d,h){this.prop=e,this.propFunc=n,this.begin=s,this._pos=s,this.duration=d,this._change=0,this.prevPos=0,this.yoyo=h,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=i,this._change=c-this.begin,this.pause()}fire(e){const n=this[e];n&&n()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=w2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=C2,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const e=this.getTimer()-this._startTime;this.state===w2?this.setTime(e):this.state===C2&&this.setTime(this.duration-e)}pause(){this.state=zC,this.fire("onPause")}getTimer(){return new Date().getTime()}}class wn{constructor(e){const n=this,i=e.node,s=i._id,c=e.easing||Tf.Linear,d=!!e.yoyo;let h,p;typeof e.duration>"u"?h=.3:e.duration===0?h=.001:h=e.duration,this.node=i,this._id=FC++;const u=i.getLayer()||(i instanceof Ye.Stage?i.getLayers():null);u||pe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ai(function(){n.tween.onEnterFrame()},u),this.tween=new IC(p,function(A){n._tweenFunc(A)},c,0,1,h*1e3,d),this._addListeners(),wn.attrs[s]||(wn.attrs[s]={}),wn.attrs[s][this._id]||(wn.attrs[s][this._id]={}),wn.tweens[s]||(wn.tweens[s]={});for(p in e)MC[p]===void 0&&this._addAttr(p,e[p]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,n){const i=this.node,s=i._id;let c,d,h,p,u;const A=wn.tweens[s][e];A&&delete wn.attrs[s][A][e];let y=i.getAttr(e);if(pe._isArray(n))if(c=[],d=Math.max(n.length,y.length),e==="points"&&n.length!==y.length&&(n.length>y.length?(p=y,y=pe._prepareArrayForTween(y,n,i.closed())):(h=n,n=pe._prepareArrayForTween(n,y,i.closed()))),e.indexOf("fill")===0)for(let x=0;x<d;x++)if(x%2===0)c.push(n[x]-y[x]);else{const S=pe.colorToRGBA(y[x]);u=pe.colorToRGBA(n[x]),y[x]=S,c.push({r:u.r-S.r,g:u.g-S.g,b:u.b-S.b,a:u.a-S.a})}else for(let x=0;x<d;x++)c.push(n[x]-y[x]);else _2.indexOf(e)!==-1?(y=pe.colorToRGBA(y),u=pe.colorToRGBA(n),c={r:u.r-y.r,g:u.g-y.g,b:u.b-y.b,a:u.a-y.a}):c=n-y;wn.attrs[s][this._id][e]={start:y,diff:c,end:n,trueEnd:h,trueStart:p},wn.tweens[s][e]=this._id}_tweenFunc(e){const n=this.node,i=wn.attrs[n._id][this._id];let s,c,d,h,p,u,A,y;for(s in i){if(c=i[s],d=c.start,h=c.diff,y=c.end,pe._isArray(d))if(p=[],A=Math.max(d.length,y.length),s.indexOf("fill")===0)for(u=0;u<A;u++)u%2===0?p.push((d[u]||0)+h[u]*e):p.push("rgba("+Math.round(d[u].r+h[u].r*e)+","+Math.round(d[u].g+h[u].g*e)+","+Math.round(d[u].b+h[u].b*e)+","+(d[u].a+h[u].a*e)+")");else for(u=0;u<A;u++)p.push((d[u]||0)+h[u]*e);else _2.indexOf(s)!==-1?p="rgba("+Math.round(d.r+h.r*e)+","+Math.round(d.g+h.g*e)+","+Math.round(d.b+h.b*e)+","+(d.a+h.a*e)+")":p=d+h*e;n.setAttr(s,p)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const e=this.node,n=wn.attrs[e._id][this._id];n.points&&n.points.trueEnd&&e.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const e=this.node,n=wn.attrs[e._id][this._id];n.points&&n.points.trueStart&&e.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const e=this.node._id,n=this._id,i=wn.tweens[e];this.pause(),this.anim&&this.anim.stop();for(const s in i)delete wn.tweens[e][s];delete wn.attrs[e][n],wn.tweens[e]&&(Object.keys(wn.tweens[e]).length===0&&delete wn.tweens[e],Object.keys(wn.attrs[e]).length===0&&delete wn.attrs[e])}}wn.attrs={};wn.tweens={};He.prototype.to=function(t){const e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new wn(t).play()};const Tf={BackEaseIn(t,e,n,i){return n*(t/=i)*t*((1.70158+1)*t-1.70158)+e},BackEaseOut(t,e,n,i){return n*((t=t/i-1)*t*((1.70158+1)*t+1.70158)+1)+e},BackEaseInOut(t,e,n,i){let s=1.70158;return(t/=i/2)<1?n/2*(t*t*(((s*=1.525)+1)*t-s))+e:n/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+e},ElasticEaseIn(t,e,n,i,s,c){let d=0;return t===0?e:(t/=i)===1?e+n:(c||(c=i*.3),!s||s<Math.abs(n)?(s=n,d=c/4):d=c/(2*Math.PI)*Math.asin(n/s),-(s*Math.pow(2,10*(t-=1))*Math.sin((t*i-d)*(2*Math.PI)/c))+e)},ElasticEaseOut(t,e,n,i,s,c){let d=0;return t===0?e:(t/=i)===1?e+n:(c||(c=i*.3),!s||s<Math.abs(n)?(s=n,d=c/4):d=c/(2*Math.PI)*Math.asin(n/s),s*Math.pow(2,-10*t)*Math.sin((t*i-d)*(2*Math.PI)/c)+n+e)},ElasticEaseInOut(t,e,n,i,s,c){let d=0;return t===0?e:(t/=i/2)===2?e+n:(c||(c=i*(.3*1.5)),!s||s<Math.abs(n)?(s=n,d=c/4):d=c/(2*Math.PI)*Math.asin(n/s),t<1?-.5*(s*Math.pow(2,10*(t-=1))*Math.sin((t*i-d)*(2*Math.PI)/c))+e:s*Math.pow(2,-10*(t-=1))*Math.sin((t*i-d)*(2*Math.PI)/c)*.5+n+e)},BounceEaseOut(t,e,n,i){return(t/=i)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},BounceEaseIn(t,e,n,i){return n-Tf.BounceEaseOut(i-t,0,n,i)+e},BounceEaseInOut(t,e,n,i){return t<i/2?Tf.BounceEaseIn(t*2,0,n,i)*.5+e:Tf.BounceEaseOut(t*2-i,0,n,i)*.5+n*.5+e},EaseIn(t,e,n,i){return n*(t/=i)*t+e},EaseOut(t,e,n,i){return-n*(t/=i)*(t-2)+e},EaseInOut(t,e,n,i){return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},StrongEaseIn(t,e,n,i){return n*(t/=i)*t*t*t*t+e},StrongEaseOut(t,e,n,i){return n*((t=t/i-1)*t*t*t*t+1)+e},StrongEaseInOut(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},Linear(t,e,n,i){return n*t/i+e}},Il=pe._assign(Ye,{Util:pe,Transform:Va,Node:He,Container:qa,Stage:xA,stages:_f,Layer:Ul,FastLayer:nv,Group:ku,DD:on,Shape:Ie,shapes:Ef,Animation:Ai,Tween:wn,Easings:Tf,Context:vA,Canvas:Zg});class $s extends Ie{_sceneFunc(e){const n=Ye.getAngle(this.angle()),i=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,n,i),e.arc(0,0,this.innerRadius(),n,0,!i),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),n=this.outerRadius(),i=this.clockwise(),s=Ye.getAngle(i?360-this.angle():this.angle()),c=Math.cos(Math.min(s,Math.PI)),d=1,h=Math.sin(Math.min(Math.max(Math.PI,s),3*Math.PI/2)),p=Math.sin(Math.min(s,Math.PI/2)),u=c*(c>0?e:n),A=d*n,y=h*(h>0?e:n),x=p*(p>0?n:e);return{x:u,y:i?-1*x:y,width:A-u,height:x-y}}}$s.prototype._centroid=!0;$s.prototype.className="Arc";$s.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"];Mn($s);ee.addGetterSetter($s,"innerRadius",0,We());ee.addGetterSetter($s,"outerRadius",0,We());ee.addGetterSetter($s,"angle",0,We());ee.addGetterSetter($s,"clockwise",!1,Fi());function Mg(t,e,n,i,s,c,d){const h=Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2)),p=Math.sqrt(Math.pow(s-n,2)+Math.pow(c-i,2)),u=d*h/(h+p),A=d*p/(h+p),y=n-u*(s-t),x=i-u*(c-e),S=n+A*(s-t),w=i+A*(c-e);return[y,x,S,w]}function E2(t,e){const n=t.length,i=[];for(let s=2;s<n-2;s+=2){const c=Mg(t[s-2],t[s-1],t[s],t[s+1],t[s+2],t[s+3],e);isNaN(c[0])||(i.push(c[0]),i.push(c[1]),i.push(t[s]),i.push(t[s+1]),i.push(c[2]),i.push(c[3]))}return i}function OC(t){const e=[[t[0],t[2],t[4],t[6]],[t[1],t[3],t[5],t[7]]],n=[];for(const i of e){const s=-3*i[0]+9*i[1]-9*i[2]+3*i[3];if(s!==0){const c=6*i[0]-12*i[1]+6*i[2],d=-3*i[0]+3*i[1],h=c*c-4*s*d;if(h>=0){const p=Math.sqrt(h);n.push((-c+p)/(2*s)),n.push((-c-p)/(2*s))}}}return n.filter(i=>i>0&&i<1).flatMap(i=>e.map(s=>{const c=1-i;return c*c*c*s[0]+3*c*c*i*s[1]+3*c*i*i*s[2]+i*i*i*s[3]}))}let eo=class extends Ie{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){const n=this.points(),i=n.length,s=this.tension(),c=this.closed(),d=this.bezier();if(!i)return;let h=0;if(e.beginPath(),e.moveTo(n[0],n[1]),s!==0&&i>4){const p=this.getTensionPoints(),u=p.length;for(h=c?0:4,c||e.quadraticCurveTo(p[0],p[1],p[2],p[3]);h<u-2;)e.bezierCurveTo(p[h++],p[h++],p[h++],p[h++],p[h++],p[h++]);c||e.quadraticCurveTo(p[u-2],p[u-1],n[i-2],n[i-1])}else if(d)for(h=2;h<i;)e.bezierCurveTo(n[h++],n[h++],n[h++],n[h++],n[h++],n[h++]);else for(h=2;h<i;h+=2)e.lineTo(n[h],n[h+1]);c?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():E2(this.points(),this.tension())}_getTensionPointsClosed(){const e=this.points(),n=e.length,i=this.tension(),s=Mg(e[n-2],e[n-1],e[0],e[1],e[2],e[3],i),c=Mg(e[n-4],e[n-3],e[n-2],e[n-1],e[0],e[1],i),d=E2(e,i);return[s[2],s[3]].concat(d).concat([c[0],c[1],e[n-2],e[n-1],c[2],c[3],s[0],s[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:this.bezier()?e=[e[0],e[1],...OC(this.points()),e[e.length-2],e[e.length-1]]:e=this.points();let n=e[0],i=e[0],s=e[1],c=e[1],d,h;for(let p=0;p<e.length/2;p++)d=e[p*2],h=e[p*2+1],n=Math.min(n,d),i=Math.max(i,d),s=Math.min(s,h),c=Math.max(c,h);return{x:n,y:s,width:i-n,height:c-s}}};eo.prototype.className="Line";eo.prototype._attrsAffectingSize=["points","bezier","tension"];Mn(eo);ee.addGetterSetter(eo,"closed",!1);ee.addGetterSetter(eo,"bezier",!1);ee.addGetterSetter(eo,"tension",0,We());ee.addGetterSetter(eo,"points",[],tC());const UC=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],jC=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],GC=[[1],[1,1],[1,2,1],[1,3,3,1]],T2=(t,e,n)=>{let i,s;const d=n/2;i=0;for(let h=0;h<20;h++)s=d*UC[20][h]+d,i+=jC[20][h]*HC(t,e,s);return d*i},R2=(t,e,n)=>{n===void 0&&(n=1);const i=t[0]-2*t[1]+t[2],s=e[0]-2*e[1]+e[2],c=2*t[1]-2*t[0],d=2*e[1]-2*e[0],h=4*(i*i+s*s),p=4*(i*c+s*d),u=c*c+d*d;if(h===0)return n*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));const A=p/(2*h),y=u/h,x=n+A,S=y-A*A,w=x*x+S>0?Math.sqrt(x*x+S):0,T=A*A+S>0?Math.sqrt(A*A+S):0,R=A+Math.sqrt(A*A+S)!==0?S*Math.log(Math.abs((x+w)/(A+T))):0;return Math.sqrt(h)/2*(x*w-A*T+R)};function HC(t,e,n){const i=zg(1,n,t),s=zg(1,n,e),c=i*i+s*s;return Math.sqrt(c)}const zg=(t,e,n)=>{const i=n.length-1;let s,c;if(i===0)return 0;if(t===0){c=0;for(let d=0;d<=i;d++)c+=GC[i][d]*Math.pow(1-e,i-d)*Math.pow(e,d)*n[d];return c}else{s=new Array(i);for(let d=0;d<i;d++)s[d]=i*(n[d+1]-n[d]);return zg(t-1,e,s)}},D2=(t,e,n)=>{let i=1,s=t/e,c=(t-n(s))/e,d=0;for(;i>.001;){const h=n(s+c),p=Math.abs(t-h)/e;if(p<i)i=p,s+=c;else{const u=n(s-c),A=Math.abs(t-u)/e;A<i?(i=A,s-=c):c/=2}if(d++,d>500)break}return s};class Cn extends Ie{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Cn.parsePathData(this.data()),this.pathLength=Cn.getPathLength(this.dataArray)}_sceneFunc(e){const n=this.dataArray;e.beginPath();let i=!1;for(let s=0;s<n.length;s++){const c=n[s].command,d=n[s].points;switch(c){case"L":e.lineTo(d[0],d[1]);break;case"M":e.moveTo(d[0],d[1]);break;case"C":e.bezierCurveTo(d[0],d[1],d[2],d[3],d[4],d[5]);break;case"Q":e.quadraticCurveTo(d[0],d[1],d[2],d[3]);break;case"A":const h=d[0],p=d[1],u=d[2],A=d[3],y=d[4],x=d[5],S=d[6],w=d[7],T=u>A?u:A,R=u>A?1:u/A,D=u>A?A/u:1;e.translate(h,p),e.rotate(S),e.scale(R,D),e.arc(0,0,T,y,y+x,1-w),e.scale(1/R,1/D),e.rotate(-S),e.translate(-h,-p);break;case"z":i=!0,e.closePath();break}}!i&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){let e=[];this.dataArray.forEach(function(p){if(p.command==="A"){const u=p.points[4],A=p.points[5],y=p.points[4]+A;let x=Math.PI/180;if(Math.abs(u-y)<x&&(x=Math.abs(u-y)),A<0)for(let S=u-x;S>y;S-=x){const w=Cn.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],S,0);e.push(w.x,w.y)}else for(let S=u+x;S<y;S+=x){const w=Cn.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],S,0);e.push(w.x,w.y)}}else if(p.command==="C")for(let u=0;u<=1;u+=.01){const A=Cn.getPointOnCubicBezier(u,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3],p.points[4],p.points[5]);e.push(A.x,A.y)}else e=e.concat(p.points)});let n=e[0],i=e[0],s=e[1],c=e[1],d,h;for(let p=0;p<e.length/2;p++)d=e[p*2],h=e[p*2+1],isNaN(d)||(n=Math.min(n,d),i=Math.max(i,d)),isNaN(h)||(s=Math.min(s,h),c=Math.max(c,h));return{x:n,y:s,width:i-n,height:c-s}}getLength(){return this.pathLength}getPointAtLength(e){return Cn.getPointAtLengthOfDataArray(e,this.dataArray)}static getLineLength(e,n,i,s){return Math.sqrt((i-e)*(i-e)+(s-n)*(s-n))}static getPathLength(e){let n=0;for(let i=0;i<e.length;++i)n+=e[i].pathLength;return n}static getPointAtLengthOfDataArray(e,n){let i,s=0,c=n.length;if(!c)return null;for(;s<c&&e>n[s].pathLength;)e-=n[s].pathLength,++s;if(s===c)return i=n[s-1].points.slice(-2),{x:i[0],y:i[1]};if(e<.01)return n[s].command==="M"?(i=n[s].points.slice(0,2),{x:i[0],y:i[1]}):{x:n[s].start.x,y:n[s].start.y};const d=n[s],h=d.points;switch(d.command){case"L":return Cn.getPointOnLine(e,d.start.x,d.start.y,h[0],h[1]);case"C":return Cn.getPointOnCubicBezier(D2(e,Cn.getPathLength(n),T=>T2([d.start.x,h[0],h[2],h[4]],[d.start.y,h[1],h[3],h[5]],T)),d.start.x,d.start.y,h[0],h[1],h[2],h[3],h[4],h[5]);case"Q":return Cn.getPointOnQuadraticBezier(D2(e,Cn.getPathLength(n),T=>R2([d.start.x,h[0],h[2]],[d.start.y,h[1],h[3]],T)),d.start.x,d.start.y,h[0],h[1],h[2],h[3]);case"A":const p=h[0],u=h[1],A=h[2],y=h[3],x=h[5],S=h[6];let w=h[4];return w+=x*e/d.pathLength,Cn.getPointOnEllipticalArc(p,u,A,y,w,S)}return null}static getPointOnLine(e,n,i,s,c,d,h){d=d??n,h=h??i;const p=this.getLineLength(n,i,s,c);if(p<1e-10)return{x:n,y:i};if(s===n)return{x:d,y:h+(c>i?e:-e)};const u=(c-i)/(s-n),A=Math.sqrt(e*e/(1+u*u))*(s<n?-1:1),y=u*A;if(Math.abs(h-i-u*(d-n))<1e-10)return{x:d+A,y:h+y};const x=((d-n)*(s-n)+(h-i)*(c-i))/(p*p),S=n+x*(s-n),w=i+x*(c-i),T=this.getLineLength(d,h,S,w),R=Math.sqrt(e*e-T*T),D=Math.sqrt(R*R/(1+u*u))*(s<n?-1:1),N=u*D;return{x:S+D,y:w+N}}static getPointOnCubicBezier(e,n,i,s,c,d,h,p,u){function A(R){return R*R*R}function y(R){return 3*R*R*(1-R)}function x(R){return 3*R*(1-R)*(1-R)}function S(R){return(1-R)*(1-R)*(1-R)}const w=p*A(e)+d*y(e)+s*x(e)+n*S(e),T=u*A(e)+h*y(e)+c*x(e)+i*S(e);return{x:w,y:T}}static getPointOnQuadraticBezier(e,n,i,s,c,d,h){function p(S){return S*S}function u(S){return 2*S*(1-S)}function A(S){return(1-S)*(1-S)}const y=d*p(e)+s*u(e)+n*A(e),x=h*p(e)+c*u(e)+i*A(e);return{x:y,y:x}}static getPointOnEllipticalArc(e,n,i,s,c,d){const h=Math.cos(d),p=Math.sin(d),u={x:i*Math.cos(c),y:s*Math.sin(c)};return{x:e+(u.x*h-u.y*p),y:n+(u.x*p+u.y*h)}}static parsePathData(e){if(!e)return[];let n=e;const i=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(let y=0;y<i.length;y++)n=n.replace(new RegExp(i[y],"g"),"|"+i[y]);const s=n.split("|"),c=[],d=[];let h=0,p=0;const u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let A;for(let y=1;y<s.length;y++){let x=s[y],S=x.charAt(0);for(x=x.slice(1),d.length=0;A=u.exec(x);)d.push(A[0]);let w=[],T=S==="A"||S==="a"?0:-1;for(let R=0,D=d.length;R<D;R++){const N=d[R];if(N==="00"){w.push(0,0),T>=0&&(T+=2,T>=7&&(T-=7));continue}if(T>=0){if(T===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(N)){w.push(parseInt(N[0],10)),w.push(parseInt(N[1],10)),w.push(parseFloat(N.slice(2))),T+=3,T>=7&&(T-=7);continue}if(N==="11"||N==="10"||N==="01"){w.push(parseInt(N[0],10)),w.push(parseInt(N[1],10)),T+=2,T>=7&&(T-=7);continue}if(N==="0"||N==="1"){w.push(parseInt(N,10)),T+=1,T>=7&&(T-=7);continue}}else if(T===4){if(/^[01]\d+(?:\.\d+)?$/.test(N)){w.push(parseInt(N[0],10)),w.push(parseFloat(N.slice(1))),T+=2,T>=7&&(T-=7);continue}if(N==="0"||N==="1"){w.push(parseInt(N,10)),T+=1,T>=7&&(T-=7);continue}}const M=parseFloat(N);isNaN(M)?w.push(0):w.push(M),T+=1,T>=7&&(T-=7)}else{const M=parseFloat(N);isNaN(M)?w.push(0):w.push(M)}}for(;w.length>0&&!isNaN(w[0]);){let R="",D=[];const N=h,M=p;let O,I,Y,J,q,W,V,ge,X,ae;switch(S){case"l":h+=w.shift(),p+=w.shift(),R="L",D.push(h,p);break;case"L":h=w.shift(),p=w.shift(),D.push(h,p);break;case"m":const L=w.shift(),te=w.shift();if(h+=L,p+=te,R="M",c.length>2&&c[c.length-1].command==="z"){for(let le=c.length-2;le>=0;le--)if(c[le].command==="M"){h=c[le].points[0]+L,p=c[le].points[1]+te;break}}D.push(h,p),S="l";break;case"M":h=w.shift(),p=w.shift(),R="M",D.push(h,p),S="L";break;case"h":h+=w.shift(),R="L",D.push(h,p);break;case"H":h=w.shift(),R="L",D.push(h,p);break;case"v":p+=w.shift(),R="L",D.push(h,p);break;case"V":p=w.shift(),R="L",D.push(h,p);break;case"C":D.push(w.shift(),w.shift(),w.shift(),w.shift()),h=w.shift(),p=w.shift(),D.push(h,p);break;case"c":D.push(h+w.shift(),p+w.shift(),h+w.shift(),p+w.shift()),h+=w.shift(),p+=w.shift(),R="C",D.push(h,p);break;case"S":I=h,Y=p,O=c[c.length-1],O.command==="C"&&(I=h+(h-O.points[2]),Y=p+(p-O.points[3])),D.push(I,Y,w.shift(),w.shift()),h=w.shift(),p=w.shift(),R="C",D.push(h,p);break;case"s":I=h,Y=p,O=c[c.length-1],O.command==="C"&&(I=h+(h-O.points[2]),Y=p+(p-O.points[3])),D.push(I,Y,h+w.shift(),p+w.shift()),h+=w.shift(),p+=w.shift(),R="C",D.push(h,p);break;case"Q":D.push(w.shift(),w.shift()),h=w.shift(),p=w.shift(),D.push(h,p);break;case"q":D.push(h+w.shift(),p+w.shift()),h+=w.shift(),p+=w.shift(),R="Q",D.push(h,p);break;case"T":I=h,Y=p,O=c[c.length-1],O.command==="Q"&&(I=h+(h-O.points[0]),Y=p+(p-O.points[1])),h=w.shift(),p=w.shift(),R="Q",D.push(I,Y,h,p);break;case"t":I=h,Y=p,O=c[c.length-1],O.command==="Q"&&(I=h+(h-O.points[0]),Y=p+(p-O.points[1])),h+=w.shift(),p+=w.shift(),R="Q",D.push(I,Y,h,p);break;case"A":J=w.shift(),q=w.shift(),W=w.shift(),V=w.shift(),ge=w.shift(),X=h,ae=p,h=w.shift(),p=w.shift(),R="A",D=this.convertEndpointToCenterParameterization(X,ae,h,p,V,ge,J,q,W);break;case"a":J=w.shift(),q=w.shift(),W=w.shift(),V=w.shift(),ge=w.shift(),X=h,ae=p,h+=w.shift(),p+=w.shift(),R="A",D=this.convertEndpointToCenterParameterization(X,ae,h,p,V,ge,J,q,W);break}c.push({command:R||S,points:D,start:{x:N,y:M},pathLength:this.calcLength(N,M,R||S,D)})}(S==="z"||S==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(e,n,i,s){let c,d,h,p;const u=Cn;switch(i){case"L":return u.getLineLength(e,n,s[0],s[1]);case"C":return T2([e,s[0],s[2],s[4]],[n,s[1],s[3],s[5]],1);case"Q":return R2([e,s[0],s[2]],[n,s[1],s[3]],1);case"A":c=0;const A=s[4],y=s[5],x=s[4]+y;let S=Math.PI/180;if(Math.abs(A-x)<S&&(S=Math.abs(A-x)),d=u.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],A,0),y<0)for(p=A-S;p>x;p-=S)h=u.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],p,0),c+=u.getLineLength(d.x,d.y,h.x,h.y),d=h;else for(p=A+S;p<x;p+=S)h=u.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],p,0),c+=u.getLineLength(d.x,d.y,h.x,h.y),d=h;return h=u.getPointOnEllipticalArc(s[0],s[1],s[2],s[3],x,0),c+=u.getLineLength(d.x,d.y,h.x,h.y),c}return 0}static convertEndpointToCenterParameterization(e,n,i,s,c,d,h,p,u){const A=u*(Math.PI/180),y=Math.cos(A)*(e-i)/2+Math.sin(A)*(n-s)/2,x=-1*Math.sin(A)*(e-i)/2+Math.cos(A)*(n-s)/2,S=y*y/(h*h)+x*x/(p*p);S>1&&(h*=Math.sqrt(S),p*=Math.sqrt(S));let w=Math.sqrt((h*h*(p*p)-h*h*(x*x)-p*p*(y*y))/(h*h*(x*x)+p*p*(y*y)));c===d&&(w*=-1),isNaN(w)&&(w=0);const T=w*h*x/p,R=w*-p*y/h,D=(e+i)/2+Math.cos(A)*T-Math.sin(A)*R,N=(n+s)/2+Math.sin(A)*T+Math.cos(A)*R,M=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},O=function(V,ge){return(V[0]*ge[0]+V[1]*ge[1])/(M(V)*M(ge))},I=function(V,ge){return(V[0]*ge[1]<V[1]*ge[0]?-1:1)*Math.acos(O(V,ge))},Y=I([1,0],[(y-T)/h,(x-R)/p]),J=[(y-T)/h,(x-R)/p],q=[(-1*y-T)/h,(-1*x-R)/p];let W=I(J,q);return O(J,q)<=-1&&(W=Math.PI),O(J,q)>=1&&(W=0),d===0&&W>0&&(W=W-2*Math.PI),d===1&&W<0&&(W=W+2*Math.PI),[D,N,h,p,Y,W,A,d]}}Cn.prototype.className="Path";Cn.prototype._attrsAffectingSize=["data"];Mn(Cn);ee.addGetterSetter(Cn,"data");let jl=class extends eo{_sceneFunc(e){super._sceneFunc(e);const n=Math.PI*2,i=this.points();let s=i;const c=this.tension()!==0&&i.length>4;c&&(s=this.getTensionPoints());const d=this.pointerLength(),h=i.length;let p,u;if(c){const x=[s[s.length-4],s[s.length-3],s[s.length-2],s[s.length-1],i[h-2],i[h-1]],S=Cn.calcLength(s[s.length-4],s[s.length-3],"C",x),w=Cn.getPointOnQuadraticBezier(Math.min(1,1-d/S),x[0],x[1],x[2],x[3],x[4],x[5]);p=i[h-2]-w.x,u=i[h-1]-w.y}else p=i[h-2]-i[h-4],u=i[h-1]-i[h-3];const A=(Math.atan2(u,p)+n)%n,y=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(i[h-2],i[h-1]),e.rotate(A),e.moveTo(0,0),e.lineTo(-d,y/2),e.lineTo(-d,-y/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(i[0],i[1]),c?(p=(s[0]+s[2])/2-i[0],u=(s[1]+s[3])/2-i[1]):(p=i[2]-i[0],u=i[3]-i[1]),e.rotate((Math.atan2(-u,-p)+n)%n),e.moveTo(0,0),e.lineTo(-d,y/2),e.lineTo(-d,-y/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){const n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),n=this.pointerWidth()/2;return{x:e.x,y:e.y-n,width:e.width,height:e.height+n*2}}};jl.prototype.className="Arrow";Mn(jl);ee.addGetterSetter(jl,"pointerLength",10,We());ee.addGetterSetter(jl,"pointerWidth",10,We());ee.addGetterSetter(jl,"pointerAtBeginning",!1);ee.addGetterSetter(jl,"pointerAtEnding",!0);class Nu extends Ie{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}Nu.prototype._centroid=!0;Nu.prototype.className="Circle";Nu.prototype._attrsAffectingSize=["radius"];Mn(Nu);ee.addGetterSetter(Nu,"radius",0,We());let Wo=class extends Ie{_sceneFunc(e){const n=this.radiusX(),i=this.radiusY();e.beginPath(),e.save(),n!==i&&e.scale(1,i/n),e.arc(0,0,n,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};Wo.prototype.className="Ellipse";Wo.prototype._centroid=!0;Wo.prototype._attrsAffectingSize=["radiusX","radiusY"];Mn(Wo);ee.addComponentsGetterSetter(Wo,"radius",["x","y"]);ee.addGetterSetter(Wo,"radiusX",0,We());ee.addGetterSetter(Wo,"radiusY",0,We());let Ii=class Zx extends Ie{constructor(e){super(e),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",n=>{this._removeImageLoad(n.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",this._loadListener)}_removeImageLoad(e){e&&e.removeEventListener&&e.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const e=!!this.cornerRadius(),n=this.hasShadow();return e&&n?!0:super._useBufferCanvas(!0)}_sceneFunc(e){const n=this.getWidth(),i=this.getHeight(),s=this.cornerRadius(),c=this.attrs.image;let d;if(c){const h=this.attrs.cropWidth,p=this.attrs.cropHeight;h&&p?d=[c,this.cropX(),this.cropY(),h,p,0,0,n,i]:d=[c,0,0,n,i]}(this.hasFill()||this.hasStroke()||s)&&(e.beginPath(),s?pe.drawRoundedRectPath(e,n,i,s):e.rect(0,0,n,i),e.closePath(),e.fillStrokeShape(this)),c&&(s&&e.clip(),e.drawImage.apply(e,d))}_hitFunc(e){const n=this.width(),i=this.height(),s=this.cornerRadius();e.beginPath(),s?pe.drawRoundedRectPath(e,n,i,s):e.rect(0,0,n,i),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,n,i;return(i=(e=this.attrs.width)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:0}getHeight(){var e,n,i;return(i=(e=this.attrs.height)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.height)!==null&&i!==void 0?i:0}static fromURL(e,n,i=null){const s=pe.createImageElement();s.onload=function(){const c=new Zx({image:s});n(c)},s.onerror=i,s.crossOrigin="Anonymous",s.src=e}};Ii.prototype.className="Image";Ii.prototype._attrsAffectingSize=["image"];Mn(Ii);ee.addGetterSetter(Ii,"cornerRadius",0,yA(4));ee.addGetterSetter(Ii,"image");ee.addComponentsGetterSetter(Ii,"crop",["x","y","width","height"]);ee.addGetterSetter(Ii,"cropX",0,We());ee.addGetterSetter(Ii,"cropY",0,We());ee.addGetterSetter(Ii,"cropWidth",0,We());ee.addGetterSetter(Ii,"cropHeight",0,We());const $x=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],XC="Change.konva",WC="none",Fg="up",Ig="right",Og="down",Ug="left",QC=$x.length;class rv extends ku{constructor(e){super(e),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){let n=this,i;const s=function(){n._sync()};for(i=0;i<QC;i++)e.on($x[i]+XC,s)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let e=this.getText(),n=this.getTag(),i,s,c,d,h,p,u;if(e&&n){switch(i=e.width(),s=e.height(),c=n.pointerDirection(),d=n.pointerWidth(),u=n.pointerHeight(),h=0,p=0,c){case Fg:h=i/2,p=-1*u;break;case Ig:h=i+d,p=s/2;break;case Og:h=i/2,p=s+u;break;case Ug:h=-1*d,p=s/2;break}n.setAttrs({x:-1*h,y:-1*p,width:i,height:s}),e.setAttrs({x:-1*h,y:-1*p})}}}rv.prototype.className="Label";Mn(rv);class Gl extends Ie{_sceneFunc(e){const n=this.width(),i=this.height(),s=this.pointerDirection(),c=this.pointerWidth(),d=this.pointerHeight(),h=this.cornerRadius();let p=0,u=0,A=0,y=0;typeof h=="number"?p=u=A=y=Math.min(h,n/2,i/2):(p=Math.min(h[0]||0,n/2,i/2),u=Math.min(h[1]||0,n/2,i/2),y=Math.min(h[2]||0,n/2,i/2),A=Math.min(h[3]||0,n/2,i/2)),e.beginPath(),e.moveTo(p,0),s===Fg&&(e.lineTo((n-c)/2,0),e.lineTo(n/2,-1*d),e.lineTo((n+c)/2,0)),e.lineTo(n-u,0),e.arc(n-u,u,u,Math.PI*3/2,0,!1),s===Ig&&(e.lineTo(n,(i-d)/2),e.lineTo(n+c,i/2),e.lineTo(n,(i+d)/2)),e.lineTo(n,i-y),e.arc(n-y,i-y,y,0,Math.PI/2,!1),s===Og&&(e.lineTo((n+c)/2,i),e.lineTo(n/2,i+d),e.lineTo((n-c)/2,i)),e.lineTo(A,i),e.arc(A,i-A,A,Math.PI/2,Math.PI,!1),s===Ug&&(e.lineTo(0,(i+d)/2),e.lineTo(-1*c,i/2),e.lineTo(0,(i-d)/2)),e.lineTo(0,p),e.arc(p,p,p,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){let e=0,n=0,i=this.pointerWidth(),s=this.pointerHeight(),c=this.pointerDirection(),d=this.width(),h=this.height();return c===Fg?(n-=s,h+=s):c===Og?h+=s:c===Ug?(e-=i*1.5,d+=i):c===Ig&&(d+=i*1.5),{x:e,y:n,width:d,height:h}}}Gl.prototype.className="Tag";Mn(Gl);ee.addGetterSetter(Gl,"pointerDirection",WC);ee.addGetterSetter(Gl,"pointerWidth",0,We());ee.addGetterSetter(Gl,"pointerHeight",0,We());ee.addGetterSetter(Gl,"cornerRadius",0,yA(4));let Pf=class extends Ie{_sceneFunc(e){const n=this.cornerRadius(),i=this.width(),s=this.height();e.beginPath(),n?pe.drawRoundedRectPath(e,i,s,n):e.rect(0,0,i,s),e.closePath(),e.fillStrokeShape(this)}};Pf.prototype.className="Rect";Mn(Pf);ee.addGetterSetter(Pf,"cornerRadius",0,yA(4));class Qo extends Ie{_sceneFunc(e){const n=this._getPoints(),i=this.radius(),s=this.sides(),c=this.cornerRadius();if(e.beginPath(),c)pe.drawRoundedPolygonPath(e,n,s,i,c);else{e.moveTo(n[0].x,n[0].y);for(let d=1;d<n.length;d++)e.lineTo(n[d].x,n[d].y)}e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,n=this.attrs.radius||0,i=[];for(let s=0;s<e;s++)i.push({x:n*Math.sin(s*2*Math.PI/e),y:-1*n*Math.cos(s*2*Math.PI/e)});return i}getSelfRect(){const e=this._getPoints();let n=e[0].x,i=e[0].x,s=e[0].y,c=e[0].y;return e.forEach(d=>{n=Math.min(n,d.x),i=Math.max(i,d.x),s=Math.min(s,d.y),c=Math.max(c,d.y)}),{x:n,y:s,width:i-n,height:c-s}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}Qo.prototype.className="RegularPolygon";Qo.prototype._centroid=!0;Qo.prototype._attrsAffectingSize=["radius"];Mn(Qo);ee.addGetterSetter(Qo,"radius",0,We());ee.addGetterSetter(Qo,"sides",0,We());ee.addGetterSetter(Qo,"cornerRadius",0,yA(4));const L2=Math.PI*2;class Hl extends Ie{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,L2,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),L2,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}Hl.prototype.className="Ring";Hl.prototype._centroid=!0;Hl.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Mn(Hl);ee.addGetterSetter(Hl,"innerRadius",0,We());ee.addGetterSetter(Hl,"outerRadius",0,We());class ps extends Ie{constructor(e){super(e),this._updated=!0,this.anim=new Ai(()=>{const n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(e){const n=this.animation(),i=this.frameIndex(),s=i*4,c=this.animations()[n],d=this.frameOffsets(),h=c[s+0],p=c[s+1],u=c[s+2],A=c[s+3],y=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,u,A),e.closePath(),e.fillStrokeShape(this)),y)if(d){const x=d[n],S=i*2;e.drawImage(y,h,p,u,A,x[S+0],x[S+1],u,A)}else e.drawImage(y,h,p,u,A,0,0,u,A)}_hitFunc(e){const n=this.animation(),i=this.frameIndex(),s=i*4,c=this.animations()[n],d=this.frameOffsets(),h=c[s+2],p=c[s+3];if(e.beginPath(),d){const u=d[n],A=i*2;e.rect(u[A+0],u[A+1],h,p)}else e.rect(0,0,h,p);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const e=this.frameIndex(),n=this.animation(),i=this.animations(),s=i[n],c=s.length/4;e<c-1?this.frameIndex(e+1):this.frameIndex(0)}}ps.prototype.className="Sprite";Mn(ps);ee.addGetterSetter(ps,"animation");ee.addGetterSetter(ps,"animations");ee.addGetterSetter(ps,"frameOffsets");ee.addGetterSetter(ps,"image");ee.addGetterSetter(ps,"frameIndex",0,We());ee.addGetterSetter(ps,"frameRate",17,We());ee.backCompat(ps,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Yo extends Ie{_sceneFunc(e){const n=this.innerRadius(),i=this.outerRadius(),s=this.numPoints();e.beginPath(),e.moveTo(0,0-i);for(let c=1;c<s*2;c++){const d=c%2===0?i:n,h=d*Math.sin(c*Math.PI/s),p=-1*d*Math.cos(c*Math.PI/s);e.lineTo(h,p)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}Yo.prototype.className="Star";Yo.prototype._centroid=!0;Yo.prototype._attrsAffectingSize=["innerRadius","outerRadius"];Mn(Yo);ee.addGetterSetter(Yo,"numPoints",5,We());ee.addGetterSetter(Yo,"innerRadius",0,We());ee.addGetterSetter(Yo,"outerRadius",0,We());function Io(t){return[...t].reduce((e,n,i,s)=>{if(new RegExp("\\p{Emoji}","u").test(n)){const c=s[i+1];c&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(c)?(e.push(n+c),s[i+1]=""):e.push(n)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(n+(s[i+1]||""))?e.push(n+s[i+1]):i>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(n)?e[e.length-1]+=n:n&&e.push(n);return e},[])}const xu="auto",YC="center",eb="inherit",ff="justify",VC="Change.konva",qC="2d",k2="-",tb="left",KC="text",JC="Text",ZC="top",$C="bottom",N2="middle",nb="normal",e8="px ",Qp=" ",t8="right",P2="rtl",n8="word",r8="char",B2="none",lg="…",rb=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],a8=rb.length;function i8(t){return t.split(",").map(e=>{e=e.trim();const n=e.indexOf(" ")>=0,i=e.indexOf('"')>=0||e.indexOf("'")>=0;return n&&!i&&(e=`"${e}"`),e}).join(", ")}let Yp;function cg(){return Yp||(Yp=pe.createCanvasElement().getContext(qC),Yp)}function s8(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function o8(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function l8(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}let _n=class extends Ie{constructor(e){super(l8(e)),this._partialTextX=0,this._partialTextY=0;for(let n=0;n<a8;n++)this.on(rb[n]+VC,this._setTextData);this._setTextData()}_sceneFunc(e){var n,i;const s=this.textArr,c=s.length;if(!this.text())return;let d=this.padding(),h=this.fontSize(),p=this.lineHeight()*h,u=this.verticalAlign(),A=this.direction(),y=0,x=this.align(),S=this.getWidth(),w=this.letterSpacing(),T=this.charRenderFunc(),R=this.fill(),D=this.textDecoration(),N=this.underlineOffset(),M=D.indexOf("underline")!==-1,O=D.indexOf("line-through")!==-1,I;A=A===eb?e.direction:A;let Y=p/2,J=N2;if(!Ye.legacyTextRendering){const q=this.measureSize("M");J="alphabetic";const W=(n=q.fontBoundingBoxAscent)!==null&&n!==void 0?n:q.actualBoundingBoxAscent,V=(i=q.fontBoundingBoxDescent)!==null&&i!==void 0?i:q.actualBoundingBoxDescent;Y=(W-V)/2+p/2}for(A===P2&&e.setAttr("direction",A),e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",J),e.setAttr("textAlign",tb),u===N2?y=(this.getHeight()-c*p-d*2)/2:u===$C&&(y=this.getHeight()-c*p-d*2),e.translate(d,y+d),I=0;I<c;I++){let q=0,W=0;const V=s[I],ge=V.text,X=V.width,ae=V.lastInParagraph;if(e.save(),x===t8?q+=S-X-d*2:x===YC&&(q+=(S-X-d*2)/2),M){e.save(),e.beginPath();const te=N??(Ye.legacyTextRendering?Math.round(h/2):Math.round(h/4)),le=q,Ae=Y+W+te;e.moveTo(le,Ae);const ne=x===ff&&!ae?S-d*2:X;e.lineTo(le+Math.round(ne),Ae),e.lineWidth=h/15;const se=this._getLinearGradient();e.strokeStyle=se||R,e.stroke(),e.restore()}const L=q;if(A!==P2&&(w!==0||x===ff||T)){const te=ge.split(" ").length-1,le=Io(ge);for(let Ae=0;Ae<le.length;Ae++){const ne=le[Ae];if(ne===" "&&!ae&&x===ff&&(q+=(S-d*2-X)/te),this._partialTextX=q,this._partialTextY=Y+W,this._partialText=ne,T){e.save();const ie=s.slice(0,I).reduce((K,ve)=>K+Io(ve.text).length,0),j=Ae+ie;T({char:ne,index:j,x:q,y:Y+W,lineIndex:I,column:Ae,isLastInLine:ae,width:this.measureSize(ne).width,context:e})}e.fillStrokeShape(this),T&&e.restore(),q+=this.measureSize(ne).width+w}}else w!==0&&e.setAttr("letterSpacing",`${w}px`),this._partialTextX=q,this._partialTextY=Y+W,this._partialText=ge,e.fillStrokeShape(this);if(O){e.save(),e.beginPath();const te=Ye.legacyTextRendering?0:-Math.round(h/4),le=L;e.moveTo(le,Y+W+te);const Ae=x===ff&&!ae?S-d*2:X;e.lineTo(le+Math.round(Ae),Y+W+te),e.lineWidth=h/15;const ne=this._getLinearGradient();e.strokeStyle=ne||R,e.stroke(),e.restore()}e.restore(),c>1&&(Y+=p)}}_hitFunc(e){const n=this.getWidth(),i=this.getHeight();e.beginPath(),e.rect(0,0,n,i),e.closePath(),e.fillStrokeShape(this)}setText(e){const n=pe._isString(e)?e:e==null?"":e+"";return this._setAttr(KC,n),this}getWidth(){return this.attrs.width===xu||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===xu||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return pe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var n,i,s,c,d,h,p,u,A,y,x;let S=cg(),w=this.fontSize(),T;S.save(),S.font=this._getContextFont(),T=S.measureText(e),S.restore();const R=w/100;return{actualBoundingBoxAscent:(n=T.actualBoundingBoxAscent)!==null&&n!==void 0?n:71.58203125*R,actualBoundingBoxDescent:(i=T.actualBoundingBoxDescent)!==null&&i!==void 0?i:0,actualBoundingBoxLeft:(s=T.actualBoundingBoxLeft)!==null&&s!==void 0?s:-7.421875*R,actualBoundingBoxRight:(c=T.actualBoundingBoxRight)!==null&&c!==void 0?c:75.732421875*R,alphabeticBaseline:(d=T.alphabeticBaseline)!==null&&d!==void 0?d:0,emHeightAscent:(h=T.emHeightAscent)!==null&&h!==void 0?h:100*R,emHeightDescent:(p=T.emHeightDescent)!==null&&p!==void 0?p:-20*R,fontBoundingBoxAscent:(u=T.fontBoundingBoxAscent)!==null&&u!==void 0?u:91*R,fontBoundingBoxDescent:(A=T.fontBoundingBoxDescent)!==null&&A!==void 0?A:21*R,hangingBaseline:(y=T.hangingBaseline)!==null&&y!==void 0?y:72.80000305175781*R,ideographicBaseline:(x=T.ideographicBaseline)!==null&&x!==void 0?x:-21*R,width:T.width,height:w}}_getContextFont(){return this.fontStyle()+Qp+this.fontVariant()+Qp+(this.fontSize()+e8)+i8(this.fontFamily())}_addTextLine(e){this.align()===ff&&(e=e.trim());const i=this._getTextWidth(e);return this.textArr.push({text:e,width:i,lastInParagraph:!1})}_getTextWidth(e){const n=this.letterSpacing(),i=e.length;return cg().measureText(e).width+n*i}_setTextData(){let e=this.text().split(`
328
+ `),n=+this.fontSize(),i=0,s=this.lineHeight()*n,c=this.attrs.width,d=this.attrs.height,h=c!==xu&&c!==void 0,p=d!==xu&&d!==void 0,u=this.padding(),A=c-u*2,y=d-u*2,x=0,S=this.wrap(),w=S!==B2,T=S!==r8&&w,R=this.ellipsis();this.textArr=[],cg().font=this._getContextFont();const D=R?this._getTextWidth(lg):0;for(let N=0,M=e.length;N<M;++N){let O=e[N],I=this._getTextWidth(O);if(h&&I>A)for(;O.length>0;){let Y=0,J=Io(O).length,q="",W=0;for(;Y<J;){const V=Y+J>>>1,ge=Io(O),X=ge.slice(0,V+1).join(""),ae=this._getTextWidth(X);(R&&p&&x+s>y?ae+D:ae)<=A?(Y=V+1,q=X,W=ae):J=V}if(q){if(T){const X=Io(O),ae=Io(q),L=X[ae.length],te=L===Qp||L===k2;let le;if(te&&W<=A)le=ae.length;else{const Ae=ae.lastIndexOf(Qp),ne=ae.lastIndexOf(k2);le=Math.max(Ae,ne)+1}le>0&&(Y=le,q=X.slice(0,Y).join(""),W=this._getTextWidth(q))}if(q=q.trimRight(),this._addTextLine(q),i=Math.max(i,W),x+=s,this._shouldHandleEllipsis(x)){this._tryToAddEllipsisToLastLine();break}if(O=Io(O).slice(Y).join("").trimLeft(),O.length>0&&(I=this._getTextWidth(O),I<=A)){this._addTextLine(O),x+=s,i=Math.max(i,I);break}}else break}else this._addTextLine(O),x+=s,i=Math.max(i,I),this._shouldHandleEllipsis(x)&&N<M-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),p&&x+s>y)break}this.textHeight=n,this.textWidth=i}_shouldHandleEllipsis(e){const n=+this.fontSize(),i=this.lineHeight()*n,s=this.attrs.height,c=s!==xu&&s!==void 0,d=this.padding(),h=s-d*2;return!(this.wrap()!==B2)||c&&e+i>h}_tryToAddEllipsisToLastLine(){const e=this.attrs.width,n=e!==xu&&e!==void 0,i=this.padding(),s=e-i*2,c=this.ellipsis(),d=this.textArr[this.textArr.length-1];!d||!c||(n&&(this._getTextWidth(d.text+lg)<s||(d.text=d.text.slice(0,d.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(d.text+lg))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const e=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,n=this.hasShadow();return e&&n?!0:super._useBufferCanvas()}};_n.prototype._fillFunc=s8;_n.prototype._strokeFunc=o8;_n.prototype.className=JC;_n.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];Mn(_n);ee.overWriteSetter(_n,"width",ev());ee.overWriteSetter(_n,"height",ev());ee.addGetterSetter(_n,"direction",eb);ee.addGetterSetter(_n,"fontFamily","Arial");ee.addGetterSetter(_n,"fontSize",12,We());ee.addGetterSetter(_n,"fontStyle",nb);ee.addGetterSetter(_n,"fontVariant",nb);ee.addGetterSetter(_n,"padding",0,We());ee.addGetterSetter(_n,"align",tb);ee.addGetterSetter(_n,"verticalAlign",ZC);ee.addGetterSetter(_n,"lineHeight",1,We());ee.addGetterSetter(_n,"wrap",n8);ee.addGetterSetter(_n,"ellipsis",!1,Fi());ee.addGetterSetter(_n,"letterSpacing",0,We());ee.addGetterSetter(_n,"text","",Ol());ee.addGetterSetter(_n,"textDecoration","");ee.addGetterSetter(_n,"underlineOffset",void 0,We());ee.addGetterSetter(_n,"charRenderFunc",void 0);const c8="",ab="normal";function ib(t){t.fillText(this.partialText,0,0)}function sb(t){t.strokeText(this.partialText,0,0)}class hr extends Ie{constructor(e){super(e),this.dummyCanvas=pe.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return Cn.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;const n=this.pathLength;return e>n?null:Cn.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=Cn.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();const n=this.textDecoration(),i=this.fill(),s=this.fontSize(),c=this.glyphInfo,d=n.indexOf("underline")!==-1,h=n.indexOf("line-through")!==-1;d&&e.beginPath();for(let p=0;p<c.length;p++){e.save();const u=c[p].p0;e.translate(u.x,u.y),e.rotate(c[p].rotation),this.partialText=c[p].text,e.fillStrokeShape(this),d&&(p===0&&e.moveTo(0,s/2+1),e.lineTo(c[p].width,s/2+1)),e.restore()}if(d&&(e.strokeStyle=i,e.lineWidth=s/20,e.stroke()),h){e.beginPath();for(let p=0;p<c.length;p++){e.save();const u=c[p].p0;e.translate(u.x,u.y),e.rotate(c[p].rotation),p===0&&e.moveTo(0,0),e.lineTo(c[p].width,0),e.restore()}e.strokeStyle=i,e.lineWidth=s/20,e.stroke()}e.restore()}_hitFunc(e){e.beginPath();const n=this.glyphInfo;if(n.length>=1){const i=n[0].p0;e.moveTo(i.x,i.y)}for(let i=0;i<n.length;i++){const s=n[i].p1;e.lineTo(s.x,s.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return pe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return _n.prototype.setText.call(this,e)}_getContextFont(){return _n.prototype._getContextFont.call(this)}_getTextSize(e){const i=this.dummyCanvas.getContext("2d");i.save(),i.font=this._getContextFont();const s=i.measureText(e);return i.restore(),{width:s.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const e=Io(this.text()),n=[];let i=0;for(let y=0;y<e.length;y++)n.push({char:e[y],width:this._getTextSize(e[y]).width}),i+=n[y].width;const{height:s}=this._getTextSize(this.attrs.text);if(this.textWidth=i,this.textHeight=s,this.glyphInfo=[],!this.attrs.data)return null;const c=this.letterSpacing(),d=this.align(),h=this.kerningFunc(),p=Math.max(this.textWidth+((this.attrs.text||"").length-1)*c,0);let u=0;d==="center"&&(u=Math.max(0,this.pathLength/2-p/2)),d==="right"&&(u=Math.max(0,this.pathLength-p));let A=u;for(let y=0;y<n.length;y++){const x=this._getPointAtLength(A);if(!x)return;const S=n[y].char;let w=n[y].width+c;if(S===" "&&d==="justify"){const O=this.text().split(" ").length-1;w+=(this.pathLength-p)/O}const T=this._getPointAtLength(A+w);if(!T)return;const R=Cn.getLineLength(x.x,x.y,T.x,T.y);let D=0;if(h)try{D=h(n[y-1].char,S)*this.fontSize()}catch{D=0}x.x+=D,T.x+=D,this.textWidth+=D;const N=Cn.getPointOnLine(D+R/2,x.x,x.y,T.x,T.y),M=Math.atan2(T.y-x.y,T.x-x.x);this.glyphInfo.push({transposeX:N.x,transposeY:N.y,text:e[y],rotation:M,p0:x,p1:T,width:R}),A+=w}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const e=[];this.glyphInfo.forEach(function(u){e.push(u.p0.x),e.push(u.p0.y),e.push(u.p1.x),e.push(u.p1.y)});let n=e[0]||0,i=e[0]||0,s=e[1]||0,c=e[1]||0,d,h;for(let u=0;u<e.length/2;u++)d=e[u*2],h=e[u*2+1],n=Math.min(n,d),i=Math.max(i,d),s=Math.min(s,h),c=Math.max(c,h);const p=this.fontSize();return{x:n-p/2,y:s-p/2,width:i-n+p,height:c-s+p}}destroy(){return pe.releaseCanvas(this.dummyCanvas),super.destroy()}}hr.prototype._fillFunc=ib;hr.prototype._strokeFunc=sb;hr.prototype._fillFuncHit=ib;hr.prototype._strokeFuncHit=sb;hr.prototype.className="TextPath";hr.prototype._attrsAffectingSize=["text","fontSize","data"];Mn(hr);ee.addGetterSetter(hr,"data");ee.addGetterSetter(hr,"fontFamily","Arial");ee.addGetterSetter(hr,"fontSize",12,We());ee.addGetterSetter(hr,"fontStyle",ab);ee.addGetterSetter(hr,"align","left");ee.addGetterSetter(hr,"letterSpacing",0,We());ee.addGetterSetter(hr,"textBaseline","middle");ee.addGetterSetter(hr,"fontVariant",ab);ee.addGetterSetter(hr,"text",c8);ee.addGetterSetter(hr,"textDecoration","");ee.addGetterSetter(hr,"kerningFunc",void 0);const ob="tr-konva",u8=["resizeEnabledChange","rotateAnchorOffsetChange","rotateAnchorAngleChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${ob}`).join(" "),M2="nodesRect",d8=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],f8={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},h8="ontouchstart"in Ye._global;function p8(t,e,n){if(t==="rotater")return n;e+=pe.degToRad(f8[t]||0);const i=(pe.radToDeg(e)%360+360)%360;return pe._inRange(i,315+22.5,360)||pe._inRange(i,0,22.5)?"ns-resize":pe._inRange(i,45-22.5,45+22.5)?"nesw-resize":pe._inRange(i,90-22.5,90+22.5)?"ew-resize":pe._inRange(i,135-22.5,135+22.5)?"nwse-resize":pe._inRange(i,180-22.5,180+22.5)?"ns-resize":pe._inRange(i,225-22.5,225+22.5)?"nesw-resize":pe._inRange(i,270-22.5,270+22.5)?"ew-resize":pe._inRange(i,315-22.5,315+22.5)?"nwse-resize":(pe.error("Transformer has unknown angle for cursor detection: "+i),"pointer")}const uA=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function A8(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function lb(t,e,n){const i=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),s=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:i,y:s}}function m8(t,e){const n=A8(t);return lb(t,e,n)}function g8(t,e,n){let i=e;for(let s=0;s<t.length;s++){const c=Ye.getAngle(t[s]),d=Math.abs(c-e)%(Math.PI*2);Math.min(d,Math.PI*2-d)<n&&(i=c)}return i}let jg=0,Kt=class extends ku{constructor(e){super(e),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(u8,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return pe.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return ob+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const n=e.filter(s=>s.isAncestorOf(this)?(pe.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=e=n,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(s=>{const c=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(s._attrsAffectingSize.length){const d=s._attrsAffectingSize.map(h=>h+"Change."+this._getEventNamespace()).join(" ");s.on(d,c)}s.on(d8.map(d=>d+`.${this._getEventNamespace()}`).join(" "),c),s.on(`absoluteTransformChange.${this._getEventNamespace()}`,c),this._proxyDrag(s)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let n;e.on(`dragstart.${this._getEventNamespace()}`,i=>{n=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(i,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,i=>{if(!n)return;const s=e.getAbsolutePosition(),c=s.x-n.x,d=s.y-n.y;this.nodes().forEach(h=>{if(h===e||h.isDragging())return;const p=h.getAbsolutePosition();h.setAbsolutePosition({x:p.x+c,y:p.y+d}),h.startDrag(i)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(M2),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(M2,this.__getNodeRect)}__getNodeShape(e,n=this.rotation(),i){const s=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),c=e.getAbsoluteScale(i),d=e.getAbsolutePosition(i),h=s.x*c.x-e.offsetX()*c.x,p=s.y*c.y-e.offsetY()*c.y,u=(Ye.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),A={x:d.x+h*Math.cos(u)+p*Math.sin(-u),y:d.y+p*Math.cos(u)+h*Math.sin(u),width:s.width*c.x,height:s.height*c.y,rotation:u};return lb(A,-Ye.getAngle(n),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const A=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),y=[{x:A.x,y:A.y},{x:A.x+A.width,y:A.y},{x:A.x+A.width,y:A.y+A.height},{x:A.x,y:A.y+A.height}],x=u.getAbsoluteTransform();y.forEach(function(S){const w=x.point(S);n.push(w)})});const i=new Va;i.rotate(-Ye.getAngle(this.rotation()));let s=1/0,c=1/0,d=-1/0,h=-1/0;n.forEach(function(u){const A=i.point(u);s===void 0&&(s=d=A.x,c=h=A.y),s=Math.min(s,A.x),c=Math.min(c,A.y),d=Math.max(d,A.x),h=Math.max(h,A.y)}),i.invert();const p=i.point({x:s,y:c});return{x:p.x,y:p.y,width:d-s,height:h-c,rotation:Ye.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),uA.forEach(e=>{this._createAnchor(e)}),this._createAnchor("rotater")}_createAnchor(e){const n=new Pf({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:h8?10:"auto"}),i=this;n.on("mousedown touchstart",function(s){i._handleMouseDown(s)}),n.on("dragstart",s=>{n.stopDrag(),s.cancelBubble=!0}),n.on("dragend",s=>{s.cancelBubble=!0}),n.on("mouseenter",()=>{const s=Ye.getAngle(this.rotation()),c=this.rotateAnchorCursor(),d=p8(e,s,c);n.getStage().content&&(n.getStage().content.style.cursor=d),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){const e=new Ie({name:"back",width:0,height:0,sceneFunc(n,i){const s=i.getParent(),c=s.padding(),d=i.width(),h=i.height();if(n.beginPath(),n.rect(-c,-c,d+c*2,h+c*2),s.rotateEnabled()&&s.rotateLineVisible()){const p=s.rotateAnchorAngle(),u=s.rotateAnchorOffset(),A=pe.degToRad(p),y=Math.sin(A),x=-Math.cos(A),S=d/2,w=h/2;let T=1/0;x<0?T=Math.min(T,-w/x):x>0&&(T=Math.min(T,(h-w)/x)),y<0?T=Math.min(T,-S/y):y>0&&(T=Math.min(T,(d-S)/y));const R=S+y*T,D=w+x*T,N=pe._sign(h),M=R+y*u*N,O=D+x*u*N;n.moveTo(R,D),n.lineTo(M,O)}n.fillStrokeShape(i)},hitFunc:(n,i)=>{if(!this.shouldOverdrawWholeArea())return;const s=this.padding();n.beginPath(),n.rect(-s,-s,i.width()+s*2,i.height()+s*2),n.fillStrokeShape(i)}});this.add(e),this._proxyDrag(e),e.on("dragstart",n=>{n.cancelBubble=!0}),e.on("dragmove",n=>{n.cancelBubble=!0}),e.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(e){if(this._transforming)return;this._movingAnchorName=e.target.name().split(" ")[0];const n=this._getNodeRect(),i=n.width,s=n.height,c=Math.sqrt(Math.pow(i,2)+Math.pow(s,2));this.sin=Math.abs(s/c),this.cos=Math.abs(i/c),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const d=e.target.getAbsolutePosition(),h=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:h.x-d.x,y:h.y-d.y},jg++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(p=>{p._fire("transformstart",{evt:e.evt,target:p})})}_handleMouseMove(e){let n,i,s;const c=this.findOne("."+this._movingAnchorName),d=c.getStage();d.setPointersPositions(e);const h=d.getPointerPosition();let p={x:h.x-this._anchorDragOffset.x,y:h.y-this._anchorDragOffset.y};const u=c.getAbsolutePosition();this.anchorDragBoundFunc()&&(p=this.anchorDragBoundFunc()(u,p,e)),c.setAbsolutePosition(p);const A=c.getAbsolutePosition();if(u.x===A.x&&u.y===A.y)return;if(this._movingAnchorName==="rotater"){const N=this._getNodeRect();n=c.x()-N.width/2,i=-c.y()+N.height/2;const M=Ye.getAngle(this.rotateAnchorAngle());let O=Math.atan2(-i,n)+Math.PI/2-M;N.height<0&&(O-=Math.PI);const Y=Ye.getAngle(this.rotation())+O,J=Ye.getAngle(this.rotationSnapTolerance()),W=g8(this.rotationSnaps(),Y,J)-N.rotation,V=m8(N,W);this._fitNodesInto(V,e);return}const y=this.shiftBehavior();let x;y==="inverted"?x=this.keepRatio()&&!e.shiftKey:y==="none"?x=this.keepRatio():x=this.keepRatio()||e.shiftKey;let S=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(x){const N=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};s=Math.sqrt(Math.pow(N.x-c.x(),2)+Math.pow(N.y-c.y(),2));const M=this.findOne(".top-left").x()>N.x?-1:1,O=this.findOne(".top-left").y()>N.y?-1:1;n=s*this.cos*M,i=s*this.sin*O,this.findOne(".top-left").x(N.x-n),this.findOne(".top-left").y(N.y-i)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(c.y());else if(this._movingAnchorName==="top-right"){if(x){const N=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};s=Math.sqrt(Math.pow(c.x()-N.x,2)+Math.pow(N.y-c.y(),2));const M=this.findOne(".top-right").x()<N.x?-1:1,O=this.findOne(".top-right").y()>N.y?-1:1;n=s*this.cos*M,i=s*this.sin*O,this.findOne(".top-right").x(N.x+n),this.findOne(".top-right").y(N.y-i)}var w=c.position();this.findOne(".top-left").y(w.y),this.findOne(".bottom-right").x(w.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(c.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(c.x());else if(this._movingAnchorName==="bottom-left"){if(x){const N=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};s=Math.sqrt(Math.pow(N.x-c.x(),2)+Math.pow(c.y()-N.y,2));const M=N.x<c.x()?-1:1,O=c.y()<N.y?-1:1;n=s*this.cos*M,i=s*this.sin*O,c.x(N.x-n),c.y(N.y+i)}w=c.position(),this.findOne(".top-left").x(w.x),this.findOne(".bottom-right").y(w.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(c.y());else if(this._movingAnchorName==="bottom-right"){if(x){const N=S?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};s=Math.sqrt(Math.pow(c.x()-N.x,2)+Math.pow(c.y()-N.y,2));const M=this.findOne(".bottom-right").x()<N.x?-1:1,O=this.findOne(".bottom-right").y()<N.y?-1:1;n=s*this.cos*M,i=s*this.sin*O,this.findOne(".bottom-right").x(N.x+n),this.findOne(".bottom-right").y(N.y+i)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(S=this.centeredScaling()||e.altKey,S){const N=this.findOne(".top-left"),M=this.findOne(".bottom-right"),O=N.x(),I=N.y(),Y=this.getWidth()-M.x(),J=this.getHeight()-M.y();M.move({x:-O,y:-I}),N.move({x:Y,y:J})}const T=this.findOne(".top-left").getAbsolutePosition();n=T.x,i=T.y;const R=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),D=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:i,width:R,height:D,rotation:Ye.getAngle(this.rotation())},e)}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){var n;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const i=this.getNode();jg--,this._fire("transformend",{evt:e,target:i}),(n=this.getLayer())===null||n===void 0||n.batchDraw(),i&&this._nodes.forEach(s=>{var c;s._fire("transformend",{evt:e,target:s}),(c=s.getLayer())===null||c===void 0||c.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,n){const i=this._getNodeRect(),s=1;if(pe._inRange(e.width,-this.padding()*2-s,s)){this.update();return}if(pe._inRange(e.height,-this.padding()*2-s,s)){this.update();return}const c=new Va;if(c.rotate(Ye.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const x=c.point({x:-this.padding()*2,y:0});e.x+=x.x,e.y+=x.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const x=c.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,e.width+=this.padding()*2}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const x=c.point({x:0,y:-this.padding()*2});e.x+=x.x,e.y+=x.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,e.height+=this.padding()*2}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const x=c.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,e.height+=this.padding()*2}if(this.boundBoxFunc()){const x=this.boundBoxFunc()(i,e);x?e=x:pe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const d=1e7,h=new Va;h.translate(i.x,i.y),h.rotate(i.rotation),h.scale(i.width/d,i.height/d);const p=new Va,u=e.width/d,A=e.height/d;this.flipEnabled()===!1?(p.translate(e.x,e.y),p.rotate(e.rotation),p.translate(e.width<0?e.width:0,e.height<0?e.height:0),p.scale(Math.abs(u),Math.abs(A))):(p.translate(e.x,e.y),p.rotate(e.rotation),p.scale(u,A));const y=p.multiply(h.invert());this._nodes.forEach(x=>{var S;if(!x.getStage())return;const w=x.getParent().getAbsoluteTransform(),T=x.getTransform().copy();T.translate(x.offsetX(),x.offsetY());const R=new Va;R.multiply(w.copy().invert()).multiply(y).multiply(w).multiply(T);const D=R.decompose();x.setAttrs(D),(S=x.getLayer())===null||S===void 0||S.batchDraw()}),this.rotation(pe._getRotation(e.rotation)),this._nodes.forEach(x=>{this._fire("transform",{evt:n,target:x}),x._fire("transform",{evt:n,target:x})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,n){this.findOne(e).setAttrs(n)}update(){var e;const n=this._getNodeRect();this.rotation(pe._getRotation(n.rotation));const i=n.width,s=n.height,c=this.enabledAnchors(),d=this.resizeEnabled(),h=this.padding(),p=this.anchorSize(),u=this.find("._anchor");u.forEach(Y=>{Y.setAttrs({width:p,height:p,offsetX:p/2,offsetY:p/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:p/2+h,offsetY:p/2+h,visible:d&&c.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:i/2,y:0,offsetY:p/2+h,visible:d&&c.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:i,y:0,offsetX:p/2-h,offsetY:p/2+h,visible:d&&c.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:s/2,offsetX:p/2+h,visible:d&&c.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:i,y:s/2,offsetX:p/2-h,visible:d&&c.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:s,offsetX:p/2+h,offsetY:p/2-h,visible:d&&c.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:i/2,y:s,offsetY:p/2-h,visible:d&&c.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:i,y:s,offsetX:p/2-h,offsetY:p/2-h,visible:d&&c.indexOf("bottom-right")>=0});const A=this.rotateAnchorAngle(),y=this.rotateAnchorOffset(),x=pe.degToRad(A),S=Math.sin(x),w=-Math.cos(x),T=i/2,R=s/2;let D=1/0;w<0?D=Math.min(D,-R/w):w>0&&(D=Math.min(D,(s-R)/w)),S<0?D=Math.min(D,-T/S):S>0&&(D=Math.min(D,(i-T)/S));const N=T+S*D,M=R+w*D,O=pe._sign(s);this._batchChangeChild(".rotater",{x:N+S*y*O,y:M+w*y*O-h*w,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:i,height:s,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(Y=>Y.draggable()),x:0,y:0});const I=this.anchorStyleFunc();I&&u.forEach(Y=>{I(Y)}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),ku.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return He.prototype.toObject.call(this)}clone(e){return He.prototype.clone.call(this,e)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};Kt.isTransforming=()=>jg>0;function v8(t){return t instanceof Array||pe.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){uA.indexOf(e)===-1&&pe.warn("Unknown anchor name: "+e+". Available names are: "+uA.join(", "))}),t||[]}Kt.prototype.className="Transformer";Mn(Kt);ee.addGetterSetter(Kt,"enabledAnchors",uA,v8);ee.addGetterSetter(Kt,"flipEnabled",!0,Fi());ee.addGetterSetter(Kt,"resizeEnabled",!0);ee.addGetterSetter(Kt,"anchorSize",10,We());ee.addGetterSetter(Kt,"rotateEnabled",!0);ee.addGetterSetter(Kt,"rotateLineVisible",!0);ee.addGetterSetter(Kt,"rotationSnaps",[]);ee.addGetterSetter(Kt,"rotateAnchorOffset",50,We());ee.addGetterSetter(Kt,"rotateAnchorAngle",0,We());ee.addGetterSetter(Kt,"rotateAnchorCursor","crosshair");ee.addGetterSetter(Kt,"rotationSnapTolerance",5,We());ee.addGetterSetter(Kt,"borderEnabled",!0);ee.addGetterSetter(Kt,"anchorStroke","rgb(0, 161, 255)");ee.addGetterSetter(Kt,"anchorStrokeWidth",1,We());ee.addGetterSetter(Kt,"anchorFill","white");ee.addGetterSetter(Kt,"anchorCornerRadius",0,We());ee.addGetterSetter(Kt,"borderStroke","rgb(0, 161, 255)");ee.addGetterSetter(Kt,"borderStrokeWidth",1,We());ee.addGetterSetter(Kt,"borderDash");ee.addGetterSetter(Kt,"keepRatio",!0);ee.addGetterSetter(Kt,"shiftBehavior","default");ee.addGetterSetter(Kt,"centeredScaling",!1);ee.addGetterSetter(Kt,"ignoreStroke",!1);ee.addGetterSetter(Kt,"padding",0,We());ee.addGetterSetter(Kt,"nodes");ee.addGetterSetter(Kt,"node");ee.addGetterSetter(Kt,"boundBoxFunc");ee.addGetterSetter(Kt,"anchorDragBoundFunc");ee.addGetterSetter(Kt,"anchorStyleFunc");ee.addGetterSetter(Kt,"shouldOverdrawWholeArea",!1);ee.addGetterSetter(Kt,"useSingleNodeRotation",!0);ee.backCompat(Kt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class to extends Ie{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,Ye.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}to.prototype.className="Wedge";to.prototype._centroid=!0;to.prototype._attrsAffectingSize=["radius"];Mn(to);ee.addGetterSetter(to,"radius",0,We());ee.addGetterSetter(to,"angle",0,We());ee.addGetterSetter(to,"clockwise",!1);ee.backCompat(to,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function z2(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const y8=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],x8=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b8(t,e){const n=t.data,i=t.width,s=t.height;let c,d,h,p,u,A,y,x,S,w,T,R,D,N,M,O,I,Y,J,q;const W=e+e+1,V=i-1,ge=s-1,X=e+1,ae=X*(X+1)/2,L=new z2,te=y8[e],le=x8[e];let Ae=null,ne=L,se=null,ie=null;for(let j=1;j<W;j++)ne=ne.next=new z2,j===X&&(Ae=ne);ne.next=L,h=d=0;for(let j=0;j<s;j++){R=D=N=M=p=u=A=y=0,x=X*(O=n[d]),S=X*(I=n[d+1]),w=X*(Y=n[d+2]),T=X*(J=n[d+3]),p+=ae*O,u+=ae*I,A+=ae*Y,y+=ae*J,ne=L;for(let K=0;K<X;K++)ne.r=O,ne.g=I,ne.b=Y,ne.a=J,ne=ne.next;for(let K=1;K<X;K++)c=d+((V<K?V:K)<<2),p+=(ne.r=O=n[c])*(q=X-K),u+=(ne.g=I=n[c+1])*q,A+=(ne.b=Y=n[c+2])*q,y+=(ne.a=J=n[c+3])*q,R+=O,D+=I,N+=Y,M+=J,ne=ne.next;se=L,ie=Ae;for(let K=0;K<i;K++)n[d+3]=J=y*te>>le,J!==0?(J=255/J,n[d]=(p*te>>le)*J,n[d+1]=(u*te>>le)*J,n[d+2]=(A*te>>le)*J):n[d]=n[d+1]=n[d+2]=0,p-=x,u-=S,A-=w,y-=T,x-=se.r,S-=se.g,w-=se.b,T-=se.a,c=h+((c=K+e+1)<V?c:V)<<2,R+=se.r=n[c],D+=se.g=n[c+1],N+=se.b=n[c+2],M+=se.a=n[c+3],p+=R,u+=D,A+=N,y+=M,se=se.next,x+=O=ie.r,S+=I=ie.g,w+=Y=ie.b,T+=J=ie.a,R-=O,D-=I,N-=Y,M-=J,ie=ie.next,d+=4;h+=i}for(let j=0;j<i;j++){D=N=M=R=u=A=y=p=0,d=j<<2,x=X*(O=n[d]),S=X*(I=n[d+1]),w=X*(Y=n[d+2]),T=X*(J=n[d+3]),p+=ae*O,u+=ae*I,A+=ae*Y,y+=ae*J,ne=L;for(let ve=0;ve<X;ve++)ne.r=O,ne.g=I,ne.b=Y,ne.a=J,ne=ne.next;let K=i;for(let ve=1;ve<=e;ve++)d=K+j<<2,p+=(ne.r=O=n[d])*(q=X-ve),u+=(ne.g=I=n[d+1])*q,A+=(ne.b=Y=n[d+2])*q,y+=(ne.a=J=n[d+3])*q,R+=O,D+=I,N+=Y,M+=J,ne=ne.next,ve<ge&&(K+=i);d=j,se=L,ie=Ae;for(let ve=0;ve<s;ve++)c=d<<2,n[c+3]=J=y*te>>le,J>0?(J=255/J,n[c]=(p*te>>le)*J,n[c+1]=(u*te>>le)*J,n[c+2]=(A*te>>le)*J):n[c]=n[c+1]=n[c+2]=0,p-=x,u-=S,A-=w,y-=T,x-=se.r,S-=se.g,w-=se.b,T-=se.a,c=j+((c=ve+X)<ge?c:ge)*i<<2,p+=R+=se.r=n[c],u+=D+=se.g=n[c+1],A+=N+=se.b=n[c+2],y+=M+=se.a=n[c+3],se=se.next,x+=O=ie.r,S+=I=ie.g,w+=Y=ie.b,T+=J=ie.a,R-=O,D-=I,N-=Y,M-=J,ie=ie.next,d+=i}}const S8=function(e){const n=Math.round(this.blurRadius());n>0&&b8(e,n)};ee.addGetterSetter(He,"blurRadius",0,We(),ee.afterSetFilter);const w8=function(t){const e=this.brightness()*255,n=t.data,i=n.length;for(let s=0;s<i;s+=4)n[s]+=e,n[s+1]+=e,n[s+2]+=e};ee.addGetterSetter(He,"brightness",0,We(),ee.afterSetFilter);const C8=function(t){const e=this.brightness(),n=t.data,i=n.length;for(let s=0;s<i;s+=4)n[s]=Math.min(255,n[s]*e),n[s+1]=Math.min(255,n[s+1]*e),n[s+2]=Math.min(255,n[s+2]*e)},_8=function(t){const e=Math.pow((this.contrast()+100)/100,2),n=t.data,i=n.length;let s=150,c=150,d=150;for(let h=0;h<i;h+=4)s=n[h],c=n[h+1],d=n[h+2],s/=255,s-=.5,s*=e,s+=.5,s*=255,c/=255,c-=.5,c*=e,c+=.5,c*=255,d/=255,d-=.5,d*=e,d+=.5,d*=255,s=s<0?0:s>255?255:s,c=c<0?0:c>255?255:c,d=d<0?0:d>255?255:d,n[h]=s,n[h+1]=c,n[h+2]=d};ee.addGetterSetter(He,"contrast",0,We(),ee.afterSetFilter);const E8=function(t){var e,n,i,s,c,d,h,p,u;const A=t.data,y=t.width,x=t.height,S=Math.min(1,Math.max(0,(n=(e=this.embossStrength)===null||e===void 0?void 0:e.call(this))!==null&&n!==void 0?n:.5)),w=Math.min(1,Math.max(0,(s=(i=this.embossWhiteLevel)===null||i===void 0?void 0:i.call(this))!==null&&s!==void 0?s:.5)),R=(h={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(d=(c=this.embossDirection)===null||c===void 0?void 0:c.call(this))!==null&&d!==void 0?d:"top-left"])!==null&&h!==void 0?h:315,D=!!((u=(p=this.embossBlend)===null||p===void 0?void 0:p.call(this))!==null&&u!==void 0&&u),N=S*10,M=w*255,O=R*Math.PI/180,I=Math.cos(O),Y=Math.sin(O),J=128/1020*N,q=new Uint8ClampedArray(A),W=new Float32Array(y*x);for(let L=0,te=0;te<A.length;te+=4,L++)W[L]=.2126*q[te]+.7152*q[te+1]+.0722*q[te+2];const V=[-1,0,1,-2,0,2,-1,0,1],ge=[-1,-2,-1,0,0,0,1,2,1],X=[-y-1,-y,-y+1,-1,0,1,y-1,y,y+1],ae=L=>L<0?0:L>255?255:L;for(let L=1;L<x-1;L++)for(let te=1;te<y-1;te++){const le=L*y+te;let Ae=0,ne=0;Ae+=W[le+X[0]]*V[0],ne+=W[le+X[0]]*ge[0],Ae+=W[le+X[1]]*V[1],ne+=W[le+X[1]]*ge[1],Ae+=W[le+X[2]]*V[2],ne+=W[le+X[2]]*ge[2],Ae+=W[le+X[3]]*V[3],ne+=W[le+X[3]]*ge[3],Ae+=W[le+X[5]]*V[5],ne+=W[le+X[5]]*ge[5],Ae+=W[le+X[6]]*V[6],ne+=W[le+X[6]]*ge[6],Ae+=W[le+X[7]]*V[7],ne+=W[le+X[7]]*ge[7],Ae+=W[le+X[8]]*V[8],ne+=W[le+X[8]]*ge[8];const se=I*Ae+Y*ne,ie=ae(M+se*J),j=le*4;if(D){const K=ie-M;A[j]=ae(q[j]+K),A[j+1]=ae(q[j+1]+K),A[j+2]=ae(q[j+2]+K),A[j+3]=q[j+3]}else A[j]=A[j+1]=A[j+2]=ie,A[j+3]=q[j+3]}for(let L=0;L<y;L++){let te=L*4,le=((x-1)*y+L)*4;A[te]=q[te],A[te+1]=q[te+1],A[te+2]=q[te+2],A[te+3]=q[te+3],A[le]=q[le],A[le+1]=q[le+1],A[le+2]=q[le+2],A[le+3]=q[le+3]}for(let L=1;L<x-1;L++){let te=L*y*4,le=(L*y+(y-1))*4;A[te]=q[te],A[te+1]=q[te+1],A[te+2]=q[te+2],A[te+3]=q[te+3],A[le]=q[le],A[le+1]=q[le+1],A[le+2]=q[le+2],A[le+3]=q[le+3]}return t};ee.addGetterSetter(He,"embossStrength",.5,We(),ee.afterSetFilter);ee.addGetterSetter(He,"embossWhiteLevel",.5,We(),ee.afterSetFilter);ee.addGetterSetter(He,"embossDirection","top-left",void 0,ee.afterSetFilter);ee.addGetterSetter(He,"embossBlend",!1,void 0,ee.afterSetFilter);function ug(t,e,n,i,s){const c=n-e,d=s-i;if(c===0)return i+d/2;if(d===0)return i;let h=(t-e)/c;return h=d*h+i,h}const T8=function(t){const e=t.data,n=e.length;let i=e[0],s=i,c,d=e[1],h=d,p,u=e[2],A=u,y;const x=this.enhance();if(x===0)return;for(let M=0;M<n;M+=4)c=e[M+0],c<i?i=c:c>s&&(s=c),p=e[M+1],p<d?d=p:p>h&&(h=p),y=e[M+2],y<u?u=y:y>A&&(A=y);s===i&&(s=255,i=0),h===d&&(h=255,d=0),A===u&&(A=255,u=0);let S,w,T,R,D,N;if(x>0)S=s+x*(255-s),w=i-x*(i-0),T=h+x*(255-h),R=d-x*(d-0),D=A+x*(255-A),N=u-x*(u-0);else{const M=(s+i)*.5;S=s+x*(s-M),w=i+x*(i-M);const O=(h+d)*.5;T=h+x*(h-O),R=d+x*(d-O);const I=(A+u)*.5;D=A+x*(A-I),N=u+x*(u-I)}for(let M=0;M<n;M+=4)e[M+0]=ug(e[M+0],i,s,w,S),e[M+1]=ug(e[M+1],d,h,R,T),e[M+2]=ug(e[M+2],u,A,N,D)};ee.addGetterSetter(He,"enhance",0,We(),ee.afterSetFilter);const R8=function(t){const e=t.data,n=e.length;for(let i=0;i<n;i+=4){const s=.34*e[i]+.5*e[i+1]+.16*e[i+2];e[i]=s,e[i+1]=s,e[i+2]=s}};ee.addGetterSetter(He,"hue",0,We(),ee.afterSetFilter);ee.addGetterSetter(He,"saturation",0,We(),ee.afterSetFilter);ee.addGetterSetter(He,"luminance",0,We(),ee.afterSetFilter);const D8=function(t){const e=t.data,n=e.length,i=1,s=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,d=this.luminance()*127,h=i*s*Math.cos(c*Math.PI/180),p=i*s*Math.sin(c*Math.PI/180),u=.299*i+.701*h+.167*p,A=.587*i-.587*h+.33*p,y=.114*i-.114*h-.497*p,x=.299*i-.299*h-.328*p,S=.587*i+.413*h+.035*p,w=.114*i-.114*h+.293*p,T=.299*i-.3*h+1.25*p,R=.587*i-.586*h-1.05*p,D=.114*i+.886*h-.2*p;let N,M,O,I;for(let Y=0;Y<n;Y+=4)N=e[Y+0],M=e[Y+1],O=e[Y+2],I=e[Y+3],e[Y+0]=u*N+A*M+y*O+d,e[Y+1]=x*N+S*M+w*O+d,e[Y+2]=T*N+R*M+D*O+d,e[Y+3]=I},L8=function(t){const e=t.data,n=e.length,i=Math.pow(2,this.value()),s=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,d=i*s*Math.cos(c*Math.PI/180),h=i*s*Math.sin(c*Math.PI/180),p=.299*i+.701*d+.167*h,u=.587*i-.587*d+.33*h,A=.114*i-.114*d-.497*h,y=.299*i-.299*d-.328*h,x=.587*i+.413*d+.035*h,S=.114*i-.114*d+.293*h,w=.299*i-.3*d+1.25*h,T=.587*i-.586*d-1.05*h,R=.114*i+.886*d-.2*h;for(let D=0;D<n;D+=4){const N=e[D+0],M=e[D+1],O=e[D+2],I=e[D+3];e[D+0]=p*N+u*M+A*O,e[D+1]=y*N+x*M+S*O,e[D+2]=w*N+T*M+R*O,e[D+3]=I}};ee.addGetterSetter(He,"hue",0,We(),ee.afterSetFilter);ee.addGetterSetter(He,"saturation",0,We(),ee.afterSetFilter);ee.addGetterSetter(He,"value",0,We(),ee.afterSetFilter);const k8=function(t){const e=t.data,n=e.length;for(let i=0;i<n;i+=4)e[i]=255-e[i],e[i+1]=255-e[i+1],e[i+2]=255-e[i+2]},N8=function(t,e,n){const i=t.data,s=e.data,c=t.width,d=t.height,h=n.polarCenterX||c/2,p=n.polarCenterY||d/2;let u=Math.sqrt(h*h+p*p),A=c-h,y=d-p;const x=Math.sqrt(A*A+y*y);u=x>u?x:u;const S=d,w=c,T=360/w*Math.PI/180;for(let R=0;R<w;R+=1){const D=Math.sin(R*T),N=Math.cos(R*T);for(let M=0;M<S;M+=1){A=Math.floor(h+u*M/S*N),y=Math.floor(p+u*M/S*D);let O=(y*c+A)*4;const I=i[O+0],Y=i[O+1],J=i[O+2],q=i[O+3];O=(R+M*c)*4,s[O+0]=I,s[O+1]=Y,s[O+2]=J,s[O+3]=q}}},P8=function(t,e,n){const i=t.data,s=e.data,c=t.width,d=t.height,h=n.polarCenterX||c/2,p=n.polarCenterY||d/2;let u=Math.sqrt(h*h+p*p),A=c-h,y=d-p;const x=Math.sqrt(A*A+y*y);u=x>u?x:u;const S=d,w=c,T=0;let R,D;for(A=0;A<c;A+=1)for(y=0;y<d;y+=1){const N=A-h,M=y-p,O=Math.sqrt(N*N+M*M)*S/u;let I=(Math.atan2(M,N)*180/Math.PI+360+T)%360;I=I*w/360,R=Math.floor(I),D=Math.floor(O);let Y=(D*c+R)*4;const J=i[Y+0],q=i[Y+1],W=i[Y+2],V=i[Y+3];Y=(y*c+A)*4,s[Y+0]=J,s[Y+1]=q,s[Y+2]=W,s[Y+3]=V}},B8=function(t){const e=t.width,n=t.height;let i,s,c,d,h,p,u,A,y,x,S=Math.round(this.kaleidoscopePower());const w=Math.round(this.kaleidoscopeAngle()),T=Math.floor(e*(w%360)/360);if(S<1)return;const R=pe.createCanvasElement();R.width=e,R.height=n;const D=R.getContext("2d").getImageData(0,0,e,n);pe.releaseCanvas(R),N8(t,D,{polarCenterX:e/2,polarCenterY:n/2});let N=e/Math.pow(2,S);for(;N<=8;)N=N*2,S-=1;N=Math.ceil(N);let M=N,O=0,I=M,Y=1;for(T+N>e&&(O=M,I=0,Y=-1),s=0;s<n;s+=1)for(i=O;i!==I;i+=Y)c=Math.round(i+T)%e,y=(e*s+c)*4,h=D.data[y+0],p=D.data[y+1],u=D.data[y+2],A=D.data[y+3],x=(e*s+i)*4,D.data[x+0]=h,D.data[x+1]=p,D.data[x+2]=u,D.data[x+3]=A;for(s=0;s<n;s+=1)for(M=Math.floor(N),d=0;d<S;d+=1){for(i=0;i<M+1;i+=1)y=(e*s+i)*4,h=D.data[y+0],p=D.data[y+1],u=D.data[y+2],A=D.data[y+3],x=(e*s+M*2-i-1)*4,D.data[x+0]=h,D.data[x+1]=p,D.data[x+2]=u,D.data[x+3]=A;M*=2}P8(D,t,{})};ee.addGetterSetter(He,"kaleidoscopePower",2,We(),ee.afterSetFilter);ee.addGetterSetter(He,"kaleidoscopeAngle",0,We(),ee.afterSetFilter);function Vp(t,e,n){let i=(n*t.width+e)*4;const s=[];return s.push(t.data[i++],t.data[i++],t.data[i++],t.data[i++]),s}function hf(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function M8(t){const e=[0,0,0];for(let n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function z8(t,e){const n=Vp(t,0,0),i=Vp(t,t.width-1,0),s=Vp(t,0,t.height-1),c=Vp(t,t.width-1,t.height-1),d=e||10;if(hf(n,i)<d&&hf(i,c)<d&&hf(c,s)<d&&hf(s,n)<d){const h=M8([i,n,c,s]),p=[];for(let u=0;u<t.width*t.height;u++){const A=hf(h,[t.data[u*4],t.data[u*4+1],t.data[u*4+2]]);p[u]=A<d?0:255}return p}}function F8(t,e){for(let n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}function I8(t,e,n){const i=[1,1,1,1,0,1,1,1,1],s=Math.round(Math.sqrt(i.length)),c=Math.floor(s/2),d=[];for(let h=0;h<n;h++)for(let p=0;p<e;p++){const u=h*e+p;let A=0;for(let y=0;y<s;y++)for(let x=0;x<s;x++){const S=h+y-c,w=p+x-c;if(S>=0&&S<n&&w>=0&&w<e){const T=S*e+w,R=i[y*s+x];A+=t[T]*R}}d[u]=A===2040?255:0}return d}function O8(t,e,n){const i=[1,1,1,1,1,1,1,1,1],s=Math.round(Math.sqrt(i.length)),c=Math.floor(s/2),d=[];for(let h=0;h<n;h++)for(let p=0;p<e;p++){const u=h*e+p;let A=0;for(let y=0;y<s;y++)for(let x=0;x<s;x++){const S=h+y-c,w=p+x-c;if(S>=0&&S<n&&w>=0&&w<e){const T=S*e+w,R=i[y*s+x];A+=t[T]*R}}d[u]=A>=1020?255:0}return d}function U8(t,e,n){const i=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],s=Math.round(Math.sqrt(i.length)),c=Math.floor(s/2),d=[];for(let h=0;h<n;h++)for(let p=0;p<e;p++){const u=h*e+p;let A=0;for(let y=0;y<s;y++)for(let x=0;x<s;x++){const S=h+y-c,w=p+x-c;if(S>=0&&S<n&&w>=0&&w<e){const T=S*e+w,R=i[y*s+x];A+=t[T]*R}}d[u]=A}return d}const j8=function(t){const e=this.threshold();let n=z8(t,e);return n&&(n=I8(n,t.width,t.height),n=O8(n,t.width,t.height),n=U8(n,t.width,t.height),F8(t,n)),t};ee.addGetterSetter(He,"threshold",0,We(),ee.afterSetFilter);const G8=function(t){const e=this.noise()*255,n=t.data,i=n.length,s=e/2;for(let c=0;c<i;c+=4)n[c+0]+=s-2*s*Math.random(),n[c+1]+=s-2*s*Math.random(),n[c+2]+=s-2*s*Math.random()};ee.addGetterSetter(He,"noise",.2,We(),ee.afterSetFilter);const H8=function(t){let e=Math.ceil(this.pixelSize()),n=t.width,i=t.height,s=Math.ceil(n/e),c=Math.ceil(i/e),d=t.data;if(e<=0){pe.error("pixelSize value can not be <= 0");return}for(let h=0;h<s;h+=1)for(let p=0;p<c;p+=1){let u=0,A=0,y=0,x=0;const S=h*e,w=S+e,T=p*e,R=T+e;let D=0;for(let N=S;N<w;N+=1)if(!(N>=n))for(let M=T;M<R;M+=1){if(M>=i)continue;const O=(n*M+N)*4;u+=d[O+0],A+=d[O+1],y+=d[O+2],x+=d[O+3],D+=1}u=u/D,A=A/D,y=y/D,x=x/D;for(let N=S;N<w;N+=1)if(!(N>=n))for(let M=T;M<R;M+=1){if(M>=i)continue;const O=(n*M+N)*4;d[O+0]=u,d[O+1]=A,d[O+2]=y,d[O+3]=x}}};ee.addGetterSetter(He,"pixelSize",8,We(),ee.afterSetFilter);const X8=function(t){const e=Math.round(this.levels()*254)+1,n=t.data,i=n.length,s=255/e;for(let c=0;c<i;c+=1)n[c]=Math.floor(n[c]/s)*s};ee.addGetterSetter(He,"levels",.5,We(),ee.afterSetFilter);const W8=function(t){const e=t.data,n=e.length,i=this.red(),s=this.green(),c=this.blue();for(let d=0;d<n;d+=4){const h=(.34*e[d]+.5*e[d+1]+.16*e[d+2])/255;e[d]=h*i,e[d+1]=h*s,e[d+2]=h*c,e[d+3]=e[d+3]}};ee.addGetterSetter(He,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ee.addGetterSetter(He,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ee.addGetterSetter(He,"blue",0,kx,ee.afterSetFilter);const Q8=function(t){const e=t.data,n=e.length,i=this.red(),s=this.green(),c=this.blue(),d=this.alpha();for(let h=0;h<n;h+=4){const p=1-d;e[h]=i*d+e[h]*p,e[h+1]=s*d+e[h+1]*p,e[h+2]=c*d+e[h+2]*p}};ee.addGetterSetter(He,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ee.addGetterSetter(He,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ee.addGetterSetter(He,"blue",0,kx,ee.afterSetFilter);ee.addGetterSetter(He,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});const Y8=function(t){const e=t.data,n=e.length;for(let i=0;i<n;i+=4){const s=e[i+0],c=e[i+1],d=e[i+2];e[i+0]=Math.min(255,s*.393+c*.769+d*.189),e[i+1]=Math.min(255,s*.349+c*.686+d*.168),e[i+2]=Math.min(255,s*.272+c*.534+d*.131)}},V8=function(t){const n=t.data;for(let i=0;i<n.length;i+=4){const s=n[i],c=n[i+1],d=n[i+2];.2126*s+.7152*c+.0722*d>=128&&(n[i]=255-s,n[i+1]=255-c,n[i+2]=255-d)}return t},q8=function(t){const e=this.threshold()*255,n=t.data,i=n.length;for(let s=0;s<i;s+=1)n[s]=n[s]<e?0:255};ee.addGetterSetter(He,"threshold",.5,We(),ee.afterSetFilter);Il.Util._assign(Il,{Arc:$s,Arrow:jl,Circle:Nu,Ellipse:Wo,Image:Ii,Label:rv,Tag:Gl,Line:eo,Path:Cn,Rect:Pf,RegularPolygon:Qo,Ring:Hl,Sprite:ps,Star:Yo,Text:_n,TextPath:hr,Transformer:Kt,Wedge:to,Filters:{Blur:S8,Brightness:C8,Brighten:w8,Contrast:_8,Emboss:E8,Enhance:T8,Grayscale:R8,HSL:D8,HSV:L8,Invert:k8,Kaleidoscope:B8,Mask:j8,Noise:G8,Pixelate:H8,Posterize:X8,RGB:W8,RGBA:Q8,Sepia:Y8,Solarize:V8,Threshold:q8}});var qp={exports:{}},Kp={exports:{}},dg={};/**
329
329
  * @license React
330
330
  * scheduler.production.min.js
331
331
  *
@@ -333,7 +333,7 @@ js: import "konva/skia-backend";
333
333
  *
334
334
  * This source code is licensed under the MIT license found in the
335
335
  * LICENSE file in the root directory of this source tree.
336
- */var F2;function K8(){return F2||(F2=1,(function(t){function e(ne,oe){var ie=ne.length;ne.push(oe);e:for(;0<ie;){var j=ie-1>>>1,K=ne[j];if(0<s(K,oe))ne[j]=oe,ne[ie]=K,ie=j;else break e}}function n(ne){return ne.length===0?null:ne[0]}function i(ne){if(ne.length===0)return null;var oe=ne[0],ie=ne.pop();if(ie!==oe){ne[0]=ie;e:for(var j=0,K=ne.length,ve=K>>>1;j<ve;){var xe=2*(j+1)-1,Re=ne[xe],Fe=xe+1,pt=ne[Fe];if(0>s(Re,ie))Fe<K&&0>s(pt,Re)?(ne[j]=pt,ne[Fe]=ie,j=Fe):(ne[j]=Re,ne[xe]=ie,j=xe);else if(Fe<K&&0>s(pt,ie))ne[j]=pt,ne[Fe]=ie,j=Fe;else break e}}return oe}function s(ne,oe){var ie=ne.sortIndex-oe.sortIndex;return ie!==0?ie:ne.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var p=[],u=[],A=1,y=null,x=3,S=!1,w=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(ne){for(var oe=n(u);oe!==null;){if(oe.callback===null)i(u);else if(oe.startTime<=ne)i(u),oe.sortIndex=oe.expirationTime,e(p,oe);else break;oe=n(u)}}function O(ne){if(T=!1,M(ne),!w)if(n(p)!==null)w=!0,le(I);else{var oe=n(u);oe!==null&&Ae(O,oe.startTime-ne)}}function I(ne,oe){w=!1,T&&(T=!1,D(q),q=-1),S=!0;var ie=x;try{for(M(oe),y=n(p);y!==null&&(!(y.expirationTime>oe)||ne&&!ge());){var j=y.callback;if(typeof j=="function"){y.callback=null,x=y.priorityLevel;var K=j(y.expirationTime<=oe);oe=t.unstable_now(),typeof K=="function"?y.callback=K:y===n(p)&&i(p),M(oe)}else i(p);y=n(p)}if(y!==null)var ve=!0;else{var xe=n(u);xe!==null&&Ae(O,xe.startTime-oe),ve=!1}return ve}finally{y=null,x=ie,S=!1}}var Y=!1,J=null,q=-1,W=5,V=-1;function ge(){return!(t.unstable_now()-V<W)}function X(){if(J!==null){var ne=t.unstable_now();V=ne;var oe=!0;try{oe=J(!0,ne)}finally{oe?ae():(Y=!1,J=null)}}else Y=!1}var ae;if(typeof N=="function")ae=function(){N(X)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,te=L.port2;L.port1.onmessage=X,ae=function(){te.postMessage(null)}}else ae=function(){R(X,0)};function le(ne){J=ne,Y||(Y=!0,ae())}function Ae(ne,oe){q=R(function(){ne(t.unstable_now())},oe)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(ne){ne.callback=null},t.unstable_continueExecution=function(){w||S||(w=!0,le(I))},t.unstable_forceFrameRate=function(ne){0>ne||125<ne?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<ne?Math.floor(1e3/ne):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_getFirstCallbackNode=function(){return n(p)},t.unstable_next=function(ne){switch(x){case 1:case 2:case 3:var oe=3;break;default:oe=x}var ie=x;x=oe;try{return ne()}finally{x=ie}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(ne,oe){switch(ne){case 1:case 2:case 3:case 4:case 5:break;default:ne=3}var ie=x;x=ne;try{return oe()}finally{x=ie}},t.unstable_scheduleCallback=function(ne,oe,ie){var j=t.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?j+ie:j):ie=j,ne){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=ie+K,ne={id:A++,callback:oe,priorityLevel:ne,startTime:ie,expirationTime:K,sortIndex:-1},ie>j?(ne.sortIndex=ie,e(u,ne),n(p)===null&&ne===n(u)&&(T?(D(q),q=-1):T=!0,Ae(O,ie-j))):(ne.sortIndex=K,e(p,ne),w||S||(w=!0,le(I))),ne},t.unstable_shouldYield=ge,t.unstable_wrapCallback=function(ne){var oe=x;return function(){var ie=x;x=oe;try{return ne.apply(this,arguments)}finally{x=ie}}}})(dg)),dg}var fg={};/**
336
+ */var F2;function K8(){return F2||(F2=1,(function(t){function e(ne,se){var ie=ne.length;ne.push(se);e:for(;0<ie;){var j=ie-1>>>1,K=ne[j];if(0<s(K,se))ne[j]=se,ne[ie]=K,ie=j;else break e}}function n(ne){return ne.length===0?null:ne[0]}function i(ne){if(ne.length===0)return null;var se=ne[0],ie=ne.pop();if(ie!==se){ne[0]=ie;e:for(var j=0,K=ne.length,ve=K>>>1;j<ve;){var xe=2*(j+1)-1,Re=ne[xe],Fe=xe+1,pt=ne[Fe];if(0>s(Re,ie))Fe<K&&0>s(pt,Re)?(ne[j]=pt,ne[Fe]=ie,j=Fe):(ne[j]=Re,ne[xe]=ie,j=xe);else if(Fe<K&&0>s(pt,ie))ne[j]=pt,ne[Fe]=ie,j=Fe;else break e}}return se}function s(ne,se){var ie=ne.sortIndex-se.sortIndex;return ie!==0?ie:ne.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var p=[],u=[],A=1,y=null,x=3,S=!1,w=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(ne){for(var se=n(u);se!==null;){if(se.callback===null)i(u);else if(se.startTime<=ne)i(u),se.sortIndex=se.expirationTime,e(p,se);else break;se=n(u)}}function O(ne){if(T=!1,M(ne),!w)if(n(p)!==null)w=!0,le(I);else{var se=n(u);se!==null&&Ae(O,se.startTime-ne)}}function I(ne,se){w=!1,T&&(T=!1,D(q),q=-1),S=!0;var ie=x;try{for(M(se),y=n(p);y!==null&&(!(y.expirationTime>se)||ne&&!ge());){var j=y.callback;if(typeof j=="function"){y.callback=null,x=y.priorityLevel;var K=j(y.expirationTime<=se);se=t.unstable_now(),typeof K=="function"?y.callback=K:y===n(p)&&i(p),M(se)}else i(p);y=n(p)}if(y!==null)var ve=!0;else{var xe=n(u);xe!==null&&Ae(O,xe.startTime-se),ve=!1}return ve}finally{y=null,x=ie,S=!1}}var Y=!1,J=null,q=-1,W=5,V=-1;function ge(){return!(t.unstable_now()-V<W)}function X(){if(J!==null){var ne=t.unstable_now();V=ne;var se=!0;try{se=J(!0,ne)}finally{se?ae():(Y=!1,J=null)}}else Y=!1}var ae;if(typeof N=="function")ae=function(){N(X)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,te=L.port2;L.port1.onmessage=X,ae=function(){te.postMessage(null)}}else ae=function(){R(X,0)};function le(ne){J=ne,Y||(Y=!0,ae())}function Ae(ne,se){q=R(function(){ne(t.unstable_now())},se)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(ne){ne.callback=null},t.unstable_continueExecution=function(){w||S||(w=!0,le(I))},t.unstable_forceFrameRate=function(ne){0>ne||125<ne?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<ne?Math.floor(1e3/ne):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_getFirstCallbackNode=function(){return n(p)},t.unstable_next=function(ne){switch(x){case 1:case 2:case 3:var se=3;break;default:se=x}var ie=x;x=se;try{return ne()}finally{x=ie}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(ne,se){switch(ne){case 1:case 2:case 3:case 4:case 5:break;default:ne=3}var ie=x;x=ne;try{return se()}finally{x=ie}},t.unstable_scheduleCallback=function(ne,se,ie){var j=t.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?j+ie:j):ie=j,ne){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=ie+K,ne={id:A++,callback:se,priorityLevel:ne,startTime:ie,expirationTime:K,sortIndex:-1},ie>j?(ne.sortIndex=ie,e(u,ne),n(p)===null&&ne===n(u)&&(T?(D(q),q=-1):T=!0,Ae(O,ie-j))):(ne.sortIndex=K,e(p,ne),w||S||(w=!0,le(I))),ne},t.unstable_shouldYield=ge,t.unstable_wrapCallback=function(ne){var se=x;return function(){var ie=x;x=se;try{return ne.apply(this,arguments)}finally{x=ie}}}})(dg)),dg}var fg={};/**
337
337
  * @license React
338
338
  * scheduler.development.js
339
339
  *
@@ -341,7 +341,7 @@ js: import "konva/skia-backend";
341
341
  *
342
342
  * This source code is licensed under the MIT license found in the
343
343
  * LICENSE file in the root directory of this source tree.
344
- */var I2;function J8(){return I2||(I2=1,(function(t){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=!1,n=5;function i(qe,ht){var Nt=qe.length;qe.push(ht),d(qe,ht,Nt)}function s(qe){return qe.length===0?null:qe[0]}function c(qe){if(qe.length===0)return null;var ht=qe[0],Nt=qe.pop();return Nt!==ht&&(qe[0]=Nt,h(qe,Nt,0)),ht}function d(qe,ht,Nt){for(var et=Nt;et>0;){var pn=et-1>>>1,Wn=qe[pn];if(p(Wn,ht)>0)qe[pn]=ht,qe[et]=Wn,et=pn;else return}}function h(qe,ht,Nt){for(var et=Nt,pn=qe.length,Wn=pn>>>1;et<Wn;){var it=(et+1)*2-1,st=qe[it],En=it+1,un=qe[En];if(p(st,ht)<0)En<pn&&p(un,st)<0?(qe[et]=un,qe[En]=ht,et=En):(qe[et]=st,qe[it]=ht,et=it);else if(En<pn&&p(un,ht)<0)qe[et]=un,qe[En]=ht,et=En;else return}}function p(qe,ht){var Nt=qe.sortIndex-ht.sortIndex;return Nt!==0?Nt:qe.id-ht.id}var u=1,A=2,y=3,x=4,S=5;function w(qe,ht){}var T=typeof performance=="object"&&typeof performance.now=="function";if(T){var R=performance;t.unstable_now=function(){return R.now()}}else{var D=Date,N=D.now();t.unstable_now=function(){return D.now()-N}}var M=1073741823,O=-1,I=250,Y=5e3,J=1e4,q=M,W=[],V=[],ge=1,X=null,ae=y,L=!1,te=!1,le=!1,Ae=typeof setTimeout=="function"?setTimeout:null,ne=typeof clearTimeout=="function"?clearTimeout:null,oe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ie(qe){for(var ht=s(V);ht!==null;){if(ht.callback===null)c(V);else if(ht.startTime<=qe)c(V),ht.sortIndex=ht.expirationTime,i(W,ht);else return;ht=s(V)}}function j(qe){if(le=!1,ie(qe),!te)if(s(W)!==null)te=!0,Oe(K);else{var ht=s(V);ht!==null&&dt(j,ht.startTime-qe)}}function K(qe,ht){te=!1,le&&(le=!1,Jt()),L=!0;var Nt=ae;try{var et;if(!e)return ve(qe,ht)}finally{X=null,ae=Nt,L=!1}}function ve(qe,ht){var Nt=ht;for(ie(Nt),X=s(W);X!==null&&!(X.expirationTime>Nt&&(!qe||G()));){var et=X.callback;if(typeof et=="function"){X.callback=null,ae=X.priorityLevel;var pn=X.expirationTime<=Nt,Wn=et(pn);Nt=t.unstable_now(),typeof Wn=="function"?X.callback=Wn:X===s(W)&&c(W),ie(Nt)}else c(W);X=s(W)}if(X!==null)return!0;var it=s(V);return it!==null&&dt(j,it.startTime-Nt),!1}function xe(qe,ht){switch(qe){case u:case A:case y:case x:case S:break;default:qe=y}var Nt=ae;ae=qe;try{return ht()}finally{ae=Nt}}function Re(qe){var ht;switch(ae){case u:case A:case y:ht=y;break;default:ht=ae;break}var Nt=ae;ae=ht;try{return qe()}finally{ae=Nt}}function Fe(qe){var ht=ae;return function(){var Nt=ae;ae=ht;try{return qe.apply(this,arguments)}finally{ae=Nt}}}function pt(qe,ht,Nt){var et=t.unstable_now(),pn;if(typeof Nt=="object"&&Nt!==null){var Wn=Nt.delay;typeof Wn=="number"&&Wn>0?pn=et+Wn:pn=et}else pn=et;var it;switch(qe){case u:it=O;break;case A:it=I;break;case S:it=q;break;case x:it=J;break;case y:default:it=Y;break}var st=pn+it,En={id:ge++,callback:ht,priorityLevel:qe,startTime:pn,expirationTime:st,sortIndex:-1};return pn>et?(En.sortIndex=pn,i(V,En),s(W)===null&&En===s(V)&&(le?Jt():le=!0,dt(j,pn-et))):(En.sortIndex=st,i(W,En),!te&&!L&&(te=!0,Oe(K))),En}function lt(){}function ut(){!te&&!L&&(te=!0,Oe(K))}function Rt(){return s(W)}function je(qe){qe.callback=null}function St(){return ae}var he=!1,k=null,ce=-1,ue=n,U=-1;function G(){var qe=t.unstable_now()-U;return!(qe<ue)}function Z(){}function be(qe){if(qe<0||qe>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}qe>0?ue=Math.floor(1e3/qe):ue=n}var _e=function(){if(k!==null){var qe=t.unstable_now();U=qe;var ht=!0,Nt=!0;try{Nt=k(ht,qe)}finally{Nt?me():(he=!1,k=null)}}else he=!1},me;if(typeof oe=="function")me=function(){oe(_e)};else if(typeof MessageChannel<"u"){var ze=new MessageChannel,Qe=ze.port2;ze.port1.onmessage=_e,me=function(){Qe.postMessage(null)}}else me=function(){Ae(_e,0)};function Oe(qe){k=qe,he||(he=!0,me())}function dt(qe,ht){ce=Ae(function(){qe(t.unstable_now())},ht)}function Jt(){ne(ce),ce=-1}var zt=Z,pr=null;t.unstable_IdlePriority=S,t.unstable_ImmediatePriority=u,t.unstable_LowPriority=x,t.unstable_NormalPriority=y,t.unstable_Profiling=pr,t.unstable_UserBlockingPriority=A,t.unstable_cancelCallback=je,t.unstable_continueExecution=ut,t.unstable_forceFrameRate=be,t.unstable_getCurrentPriorityLevel=St,t.unstable_getFirstCallbackNode=Rt,t.unstable_next=Re,t.unstable_pauseExecution=lt,t.unstable_requestPaint=zt,t.unstable_runWithPriority=xe,t.unstable_scheduleCallback=pt,t.unstable_shouldYield=G,t.unstable_wrapCallback=Fe,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(fg)),fg}var O2;function av(){return O2||(O2=1,process.env.NODE_ENV==="production"?Kp.exports=K8():Kp.exports=J8()),Kp.exports}/**
344
+ */var I2;function J8(){return I2||(I2=1,(function(t){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=!1,n=5;function i(qe,ht){var Nt=qe.length;qe.push(ht),d(qe,ht,Nt)}function s(qe){return qe.length===0?null:qe[0]}function c(qe){if(qe.length===0)return null;var ht=qe[0],Nt=qe.pop();return Nt!==ht&&(qe[0]=Nt,h(qe,Nt,0)),ht}function d(qe,ht,Nt){for(var et=Nt;et>0;){var pn=et-1>>>1,Wn=qe[pn];if(p(Wn,ht)>0)qe[pn]=ht,qe[et]=Wn,et=pn;else return}}function h(qe,ht,Nt){for(var et=Nt,pn=qe.length,Wn=pn>>>1;et<Wn;){var it=(et+1)*2-1,st=qe[it],En=it+1,un=qe[En];if(p(st,ht)<0)En<pn&&p(un,st)<0?(qe[et]=un,qe[En]=ht,et=En):(qe[et]=st,qe[it]=ht,et=it);else if(En<pn&&p(un,ht)<0)qe[et]=un,qe[En]=ht,et=En;else return}}function p(qe,ht){var Nt=qe.sortIndex-ht.sortIndex;return Nt!==0?Nt:qe.id-ht.id}var u=1,A=2,y=3,x=4,S=5;function w(qe,ht){}var T=typeof performance=="object"&&typeof performance.now=="function";if(T){var R=performance;t.unstable_now=function(){return R.now()}}else{var D=Date,N=D.now();t.unstable_now=function(){return D.now()-N}}var M=1073741823,O=-1,I=250,Y=5e3,J=1e4,q=M,W=[],V=[],ge=1,X=null,ae=y,L=!1,te=!1,le=!1,Ae=typeof setTimeout=="function"?setTimeout:null,ne=typeof clearTimeout=="function"?clearTimeout:null,se=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ie(qe){for(var ht=s(V);ht!==null;){if(ht.callback===null)c(V);else if(ht.startTime<=qe)c(V),ht.sortIndex=ht.expirationTime,i(W,ht);else return;ht=s(V)}}function j(qe){if(le=!1,ie(qe),!te)if(s(W)!==null)te=!0,Oe(K);else{var ht=s(V);ht!==null&&dt(j,ht.startTime-qe)}}function K(qe,ht){te=!1,le&&(le=!1,Jt()),L=!0;var Nt=ae;try{var et;if(!e)return ve(qe,ht)}finally{X=null,ae=Nt,L=!1}}function ve(qe,ht){var Nt=ht;for(ie(Nt),X=s(W);X!==null&&!(X.expirationTime>Nt&&(!qe||G()));){var et=X.callback;if(typeof et=="function"){X.callback=null,ae=X.priorityLevel;var pn=X.expirationTime<=Nt,Wn=et(pn);Nt=t.unstable_now(),typeof Wn=="function"?X.callback=Wn:X===s(W)&&c(W),ie(Nt)}else c(W);X=s(W)}if(X!==null)return!0;var it=s(V);return it!==null&&dt(j,it.startTime-Nt),!1}function xe(qe,ht){switch(qe){case u:case A:case y:case x:case S:break;default:qe=y}var Nt=ae;ae=qe;try{return ht()}finally{ae=Nt}}function Re(qe){var ht;switch(ae){case u:case A:case y:ht=y;break;default:ht=ae;break}var Nt=ae;ae=ht;try{return qe()}finally{ae=Nt}}function Fe(qe){var ht=ae;return function(){var Nt=ae;ae=ht;try{return qe.apply(this,arguments)}finally{ae=Nt}}}function pt(qe,ht,Nt){var et=t.unstable_now(),pn;if(typeof Nt=="object"&&Nt!==null){var Wn=Nt.delay;typeof Wn=="number"&&Wn>0?pn=et+Wn:pn=et}else pn=et;var it;switch(qe){case u:it=O;break;case A:it=I;break;case S:it=q;break;case x:it=J;break;case y:default:it=Y;break}var st=pn+it,En={id:ge++,callback:ht,priorityLevel:qe,startTime:pn,expirationTime:st,sortIndex:-1};return pn>et?(En.sortIndex=pn,i(V,En),s(W)===null&&En===s(V)&&(le?Jt():le=!0,dt(j,pn-et))):(En.sortIndex=st,i(W,En),!te&&!L&&(te=!0,Oe(K))),En}function lt(){}function ut(){!te&&!L&&(te=!0,Oe(K))}function Rt(){return s(W)}function je(qe){qe.callback=null}function St(){return ae}var he=!1,k=null,ce=-1,ue=n,U=-1;function G(){var qe=t.unstable_now()-U;return!(qe<ue)}function Z(){}function be(qe){if(qe<0||qe>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}qe>0?ue=Math.floor(1e3/qe):ue=n}var _e=function(){if(k!==null){var qe=t.unstable_now();U=qe;var ht=!0,Nt=!0;try{Nt=k(ht,qe)}finally{Nt?me():(he=!1,k=null)}}else he=!1},me;if(typeof se=="function")me=function(){se(_e)};else if(typeof MessageChannel<"u"){var ze=new MessageChannel,Qe=ze.port2;ze.port1.onmessage=_e,me=function(){Qe.postMessage(null)}}else me=function(){Ae(_e,0)};function Oe(qe){k=qe,he||(he=!0,me())}function dt(qe,ht){ce=Ae(function(){qe(t.unstable_now())},ht)}function Jt(){ne(ce),ce=-1}var zt=Z,pr=null;t.unstable_IdlePriority=S,t.unstable_ImmediatePriority=u,t.unstable_LowPriority=x,t.unstable_NormalPriority=y,t.unstable_Profiling=pr,t.unstable_UserBlockingPriority=A,t.unstable_cancelCallback=je,t.unstable_continueExecution=ut,t.unstable_forceFrameRate=be,t.unstable_getCurrentPriorityLevel=St,t.unstable_getFirstCallbackNode=Rt,t.unstable_next=Re,t.unstable_pauseExecution=lt,t.unstable_requestPaint=zt,t.unstable_runWithPriority=xe,t.unstable_scheduleCallback=pt,t.unstable_shouldYield=G,t.unstable_wrapCallback=Fe,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(fg)),fg}var O2;function av(){return O2||(O2=1,process.env.NODE_ENV==="production"?Kp.exports=K8():Kp.exports=J8()),Kp.exports}/**
345
345
  * @license React
346
346
  * react-reconciler.production.min.js
347
347
  *
@@ -349,13 +349,13 @@ js: import "konva/skia-backend";
349
349
  *
350
350
  * This source code is licensed under the MIT license found in the
351
351
  * LICENSE file in the root directory of this source tree.
352
- */var hg,U2;function Z8(){return U2||(U2=1,hg=function(e){var n={},i=se,s=av(),c=Object.assign;function d(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,g=1;g<arguments.length;g++)l+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,p=Symbol.for("react.element"),u=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),w=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),I=Symbol.iterator;function Y(o){return o===null||typeof o!="object"?null:(o=I&&o[I]||o["@@iterator"],typeof o=="function"?o:null)}function J(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case A:return"Fragment";case u:return"Portal";case x:return"Profiler";case y:return"StrictMode";case R:return"Suspense";case D:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case w:return(o.displayName||"Context")+".Consumer";case S:return(o._context.displayName||"Context")+".Provider";case T:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return l=o.displayName||null,l!==null?l:J(o.type)||"Memo";case M:l=o._payload,o=o._init;try{return J(o(l))}catch{}}return null}function q(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(l);case 8:return l===y?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function W(o){var l=o,g=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(g=l.return),o=l.return;while(o)}return l.tag===3?g:null}function V(o){if(W(o)!==o)throw Error(d(188))}function ge(o){var l=o.alternate;if(!l){if(l=W(o),l===null)throw Error(d(188));return l!==o?null:o}for(var g=o,b=l;;){var E=g.return;if(E===null)break;var P=E.alternate;if(P===null){if(b=E.return,b!==null){g=b;continue}break}if(E.child===P.child){for(P=E.child;P;){if(P===g)return V(E),o;if(P===b)return V(E),l;P=P.sibling}throw Error(d(188))}if(g.return!==b.return)g=E,b=P;else{for(var Q=!1,fe=E.child;fe;){if(fe===g){Q=!0,g=E,b=P;break}if(fe===b){Q=!0,b=E,g=P;break}fe=fe.sibling}if(!Q){for(fe=P.child;fe;){if(fe===g){Q=!0,g=P,b=E;break}if(fe===b){Q=!0,b=P,g=E;break}fe=fe.sibling}if(!Q)throw Error(d(189))}}if(g.alternate!==b)throw Error(d(190))}if(g.tag!==3)throw Error(d(188));return g.stateNode.current===g?o:l}function X(o){return o=ge(o),o!==null?ae(o):null}function ae(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=ae(o);if(l!==null)return l;o=o.sibling}return null}function L(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){if(o.tag!==4){var l=L(o);if(l!==null)return l}o=o.sibling}return null}var te=Array.isArray,le=e.getPublicInstance,Ae=e.getRootHostContext,ne=e.getChildHostContext,oe=e.prepareForCommit,ie=e.resetAfterCommit,j=e.createInstance,K=e.appendInitialChild,ve=e.finalizeInitialChildren,xe=e.prepareUpdate,Re=e.shouldSetTextContent,Fe=e.createTextInstance,pt=e.scheduleTimeout,lt=e.cancelTimeout,ut=e.noTimeout,Rt=e.isPrimaryRenderer,je=e.supportsMutation,St=e.supportsPersistence,he=e.supportsHydration,k=e.getInstanceFromNode,ce=e.preparePortalMount,ue=e.getCurrentEventPriority,U=e.detachDeletedInstance,G=e.supportsMicrotasks,Z=e.scheduleMicrotask,be=e.supportsTestSelectors,_e=e.findFiberRoot,me=e.getBoundingRect,ze=e.getTextContent,Qe=e.isHiddenSubtree,Oe=e.matchAccessibilityRole,dt=e.setFocusIfFocusable,Jt=e.setupIntersectionObserver,zt=e.appendChild,pr=e.appendChildToContainer,qe=e.commitTextUpdate,ht=e.commitMount,Nt=e.commitUpdate,et=e.insertBefore,pn=e.insertInContainerBefore,Wn=e.removeChild,it=e.removeChildFromContainer,st=e.resetTextContent,En=e.hideInstance,un=e.hideTextInstance,Ut=e.unhideInstance,Ra=e.unhideTextInstance,Da=e.clearContainer,As=e.cloneInstance,Qt=e.createContainerChildSet,Ka=e.appendChildToContainerChildSet,ms=e.finalizeContainerChildren,Oi=e.replaceContainerChildren,mi=e.cloneHiddenInstance,Ja=e.cloneHiddenTextInstance,gs=e.canHydrateInstance,Pu=e.canHydrateTextInstance,SA=e.canHydrateSuspenseInstance,qo=e.isSuspenseInstancePending,tr=e.isSuspenseInstanceFallback,Bu=e.getSuspenseInstanceFallbackErrorDetails,Bf=e.registerSuspenseInstanceRetry,no=e.getNextHydratableSibling,vs=e.getFirstHydratableChild,Mu=e.getFirstHydratableChildWithinContainer,Ui=e.getFirstHydratableChildWithinSuspenseInstance,zu=e.hydrateInstance,Fu=e.hydrateTextInstance,Ko=e.hydrateSuspenseInstance,Jo=e.getNextHydratableInstanceAfterSuspenseInstance,ro=e.commitHydratedContainer,gi=e.commitHydratedSuspenseInstance,wA=e.clearSuspenseBoundary,Xl=e.clearSuspenseBoundaryFromContainer,CA=e.shouldDeleteUnhydratedTailInstances,_A=e.didNotMatchHydratedContainerTextInstance,Mf=e.didNotMatchHydratedTextInstance,Wl;function ys(o){if(Wl===void 0)try{throw Error()}catch(g){var l=g.stack.trim().match(/\n( *(at )?)/);Wl=l&&l[1]||""}return`
352
+ */var hg,U2;function Z8(){return U2||(U2=1,hg=function(e){var n={},i=oe,s=av(),c=Object.assign;function d(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,g=1;g<arguments.length;g++)l+="&args[]="+encodeURIComponent(arguments[g]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,p=Symbol.for("react.element"),u=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),w=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),I=Symbol.iterator;function Y(o){return o===null||typeof o!="object"?null:(o=I&&o[I]||o["@@iterator"],typeof o=="function"?o:null)}function J(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case A:return"Fragment";case u:return"Portal";case x:return"Profiler";case y:return"StrictMode";case R:return"Suspense";case D:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case w:return(o.displayName||"Context")+".Consumer";case S:return(o._context.displayName||"Context")+".Provider";case T:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return l=o.displayName||null,l!==null?l:J(o.type)||"Memo";case M:l=o._payload,o=o._init;try{return J(o(l))}catch{}}return null}function q(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(l);case 8:return l===y?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function W(o){var l=o,g=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(g=l.return),o=l.return;while(o)}return l.tag===3?g:null}function V(o){if(W(o)!==o)throw Error(d(188))}function ge(o){var l=o.alternate;if(!l){if(l=W(o),l===null)throw Error(d(188));return l!==o?null:o}for(var g=o,b=l;;){var E=g.return;if(E===null)break;var P=E.alternate;if(P===null){if(b=E.return,b!==null){g=b;continue}break}if(E.child===P.child){for(P=E.child;P;){if(P===g)return V(E),o;if(P===b)return V(E),l;P=P.sibling}throw Error(d(188))}if(g.return!==b.return)g=E,b=P;else{for(var Q=!1,fe=E.child;fe;){if(fe===g){Q=!0,g=E,b=P;break}if(fe===b){Q=!0,b=E,g=P;break}fe=fe.sibling}if(!Q){for(fe=P.child;fe;){if(fe===g){Q=!0,g=P,b=E;break}if(fe===b){Q=!0,b=P,g=E;break}fe=fe.sibling}if(!Q)throw Error(d(189))}}if(g.alternate!==b)throw Error(d(190))}if(g.tag!==3)throw Error(d(188));return g.stateNode.current===g?o:l}function X(o){return o=ge(o),o!==null?ae(o):null}function ae(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=ae(o);if(l!==null)return l;o=o.sibling}return null}function L(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){if(o.tag!==4){var l=L(o);if(l!==null)return l}o=o.sibling}return null}var te=Array.isArray,le=e.getPublicInstance,Ae=e.getRootHostContext,ne=e.getChildHostContext,se=e.prepareForCommit,ie=e.resetAfterCommit,j=e.createInstance,K=e.appendInitialChild,ve=e.finalizeInitialChildren,xe=e.prepareUpdate,Re=e.shouldSetTextContent,Fe=e.createTextInstance,pt=e.scheduleTimeout,lt=e.cancelTimeout,ut=e.noTimeout,Rt=e.isPrimaryRenderer,je=e.supportsMutation,St=e.supportsPersistence,he=e.supportsHydration,k=e.getInstanceFromNode,ce=e.preparePortalMount,ue=e.getCurrentEventPriority,U=e.detachDeletedInstance,G=e.supportsMicrotasks,Z=e.scheduleMicrotask,be=e.supportsTestSelectors,_e=e.findFiberRoot,me=e.getBoundingRect,ze=e.getTextContent,Qe=e.isHiddenSubtree,Oe=e.matchAccessibilityRole,dt=e.setFocusIfFocusable,Jt=e.setupIntersectionObserver,zt=e.appendChild,pr=e.appendChildToContainer,qe=e.commitTextUpdate,ht=e.commitMount,Nt=e.commitUpdate,et=e.insertBefore,pn=e.insertInContainerBefore,Wn=e.removeChild,it=e.removeChildFromContainer,st=e.resetTextContent,En=e.hideInstance,un=e.hideTextInstance,Ut=e.unhideInstance,Ra=e.unhideTextInstance,Da=e.clearContainer,As=e.cloneInstance,Qt=e.createContainerChildSet,Ka=e.appendChildToContainerChildSet,ms=e.finalizeContainerChildren,Oi=e.replaceContainerChildren,mi=e.cloneHiddenInstance,Ja=e.cloneHiddenTextInstance,gs=e.canHydrateInstance,Pu=e.canHydrateTextInstance,SA=e.canHydrateSuspenseInstance,qo=e.isSuspenseInstancePending,tr=e.isSuspenseInstanceFallback,Bu=e.getSuspenseInstanceFallbackErrorDetails,Bf=e.registerSuspenseInstanceRetry,no=e.getNextHydratableSibling,vs=e.getFirstHydratableChild,Mu=e.getFirstHydratableChildWithinContainer,Ui=e.getFirstHydratableChildWithinSuspenseInstance,zu=e.hydrateInstance,Fu=e.hydrateTextInstance,Ko=e.hydrateSuspenseInstance,Jo=e.getNextHydratableInstanceAfterSuspenseInstance,ro=e.commitHydratedContainer,gi=e.commitHydratedSuspenseInstance,wA=e.clearSuspenseBoundary,Xl=e.clearSuspenseBoundaryFromContainer,CA=e.shouldDeleteUnhydratedTailInstances,_A=e.didNotMatchHydratedContainerTextInstance,Mf=e.didNotMatchHydratedTextInstance,Wl;function ys(o){if(Wl===void 0)try{throw Error()}catch(g){var l=g.stack.trim().match(/\n( *(at )?)/);Wl=l&&l[1]||""}return`
353
353
  `+Wl+o}var Ql=!1;function Iu(o,l){if(!o||Ql)return"";Ql=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(Ge){var b=Ge}Reflect.construct(o,[],l)}else{try{l.call()}catch(Ge){b=Ge}o.call(l.prototype)}else{try{throw Error()}catch(Ge){b=Ge}o()}}catch(Ge){if(Ge&&b&&typeof Ge.stack=="string"){for(var E=Ge.stack.split(`
354
354
  `),P=b.stack.split(`
355
355
  `),Q=E.length-1,fe=P.length-1;1<=Q&&0<=fe&&E[Q]!==P[fe];)fe--;for(;1<=Q&&0<=fe;Q--,fe--)if(E[Q]!==P[fe]){if(Q!==1||fe!==1)do if(Q--,fe--,0>fe||E[Q]!==P[fe]){var Ee=`
356
356
  `+E[Q].replace(" at new "," at ");return o.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",o.displayName)),Ee}while(1<=Q&&0<=fe);break}}}finally{Ql=!1,Error.prepareStackTrace=g}return(o=o?o.displayName||o.name:"")?ys(o):""}var zf=Object.prototype.hasOwnProperty,Ou=[],Qn=-1;function Za(o){return{current:o}}function An(o){0>Qn||(o.current=Ou[Qn],Ou[Qn]=null,Qn--)}function hn(o,l){Qn++,Ou[Qn]=o.current,o.current=l}var ji={},Ar=Za(ji),Mr=Za(!1),vi=ji;function xs(o,l){var g=o.type.contextTypes;if(!g)return ji;var b=o.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===l)return b.__reactInternalMemoizedMaskedChildContext;var E={},P;for(P in g)E[P]=l[P];return b&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=E),E}function Cr(o){return o=o.childContextTypes,o!=null}function ao(){An(Mr),An(Ar)}function Uu(o,l,g){if(Ar.current!==ji)throw Error(d(168));hn(Ar,l),hn(Mr,g)}function ju(o,l,g){var b=o.stateNode;if(l=l.childContextTypes,typeof b.getChildContext!="function")return g;b=b.getChildContext();for(var E in b)if(!(E in l))throw Error(d(108,q(o)||"Unknown",E));return c({},g,b)}function Yl(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||ji,vi=Ar.current,hn(Ar,o),hn(Mr,Mr.current),!0}function Vl(o,l,g){var b=o.stateNode;if(!b)throw Error(d(169));g?(o=ju(o,l,vi),b.__reactInternalMemoizedMergedChildContext=o,An(Mr),An(Ar),hn(Ar,o)):An(Mr),hn(Mr,g)}var zr=Math.clz32?Math.clz32:ql,EA=Math.log,Kr=Math.LN2;function ql(o){return o>>>=0,o===0?32:31-(EA(o)/Kr|0)|0}var _r=64,Kl=4194304;function Zo(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function Jl(o,l){var g=o.pendingLanes;if(g===0)return 0;var b=0,E=o.suspendedLanes,P=o.pingedLanes,Q=g&268435455;if(Q!==0){var fe=Q&~E;fe!==0?b=Zo(fe):(P&=Q,P!==0&&(b=Zo(P)))}else Q=g&~E,Q!==0?b=Zo(Q):P!==0&&(b=Zo(P));if(b===0)return 0;if(l!==0&&l!==b&&(l&E)===0&&(E=b&-b,P=l&-l,E>=P||E===16&&(P&4194240)!==0))return l;if((b&4)!==0&&(b|=g&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=b;0<l;)g=31-zr(l),E=1<<g,b|=o[g],l&=~E;return b}function TA(o,l){switch(o){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function RA(o,l){for(var g=o.suspendedLanes,b=o.pingedLanes,E=o.expirationTimes,P=o.pendingLanes;0<P;){var Q=31-zr(P),fe=1<<Q,Ee=E[Q];Ee===-1?((fe&g)===0||(fe&b)!==0)&&(E[Q]=TA(fe,l)):Ee<=l&&(o.expiredLanes|=fe),P&=~fe}}function Gu(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function bs(){var o=_r;return _r<<=1,(_r&4194240)===0&&(_r=64),o}function Hu(o){for(var l=[],g=0;31>g;g++)l.push(o);return l}function $o(o,l,g){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-zr(l),o[l]=g}function DA(o,l){var g=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var b=o.eventTimes;for(o=o.expirationTimes;0<g;){var E=31-zr(g),P=1<<E;l[E]=0,b[E]=-1,o[E]=-1,g&=~P}}function Ss(o,l){var g=o.entangledLanes|=l;for(o=o.entanglements;g;){var b=31-zr(g),E=1<<b;E&l|o[b]&l&&(o[b]|=l),g&=~E}}var $t=0;function Ff(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var Xu=s.unstable_scheduleCallback,If=s.unstable_cancelCallback,LA=s.unstable_shouldYield,kA=s.unstable_requestPaint,Yn=s.unstable_now,Wu=s.unstable_ImmediatePriority,NA=s.unstable_UserBlockingPriority,Qu=s.unstable_NormalPriority,PA=s.unstable_IdlePriority,Zl=null,La=null;function BA(o){if(La&&typeof La.onCommitFiberRoot=="function")try{La.onCommitFiberRoot(Zl,o,void 0,(o.current.flags&128)===128)}catch{}}function MA(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var ka=typeof Object.is=="function"?Object.is:MA,yi=null,$l=!1,Yu=!1;function Vu(o){yi===null?yi=[o]:yi.push(o)}function Of(o){$l=!0,Vu(o)}function $a(){if(!Yu&&yi!==null){Yu=!0;var o=0,l=$t;try{var g=yi;for($t=1;o<g.length;o++){var b=g[o];do b=b(!0);while(b!==null)}yi=null,$l=!1}catch(E){throw yi!==null&&(yi=yi.slice(o+1)),Xu(Wu,$a),E}finally{$t=l,Yu=!1}}return null}var Gi=[],ws=0,el=null,ec=0,ha=[],pa=0,Hi=null,Na=1,xi="";function Cs(o,l){Gi[ws++]=ec,Gi[ws++]=el,el=o,ec=l}function tl(o,l,g){ha[pa++]=Na,ha[pa++]=xi,ha[pa++]=Hi,Hi=o;var b=Na;o=xi;var E=32-zr(b)-1;b&=~(1<<E),g+=1;var P=32-zr(l)+E;if(30<P){var Q=E-E%5;P=(b&(1<<Q)-1).toString(32),b>>=Q,E-=Q,Na=1<<32-zr(l)+E|g<<E|b,xi=P+o}else Na=1<<P|g<<E|b,xi=o}function qu(o){o.return!==null&&(Cs(o,1),tl(o,1,0))}function Ku(o){for(;o===el;)el=Gi[--ws],Gi[ws]=null,ec=Gi[--ws],Gi[ws]=null;for(;o===Hi;)Hi=ha[--pa],ha[pa]=null,xi=ha[--pa],ha[pa]=null,Na=ha[--pa],ha[pa]=null}var Jr=null,Aa=null,bn=!1,nl=!1,Pa=null;function Uf(o,l){var g=oa(5,null,null,0);g.elementType="DELETED",g.stateNode=l,g.return=o,l=o.deletions,l===null?(o.deletions=[g],o.flags|=16):l.push(g)}function jf(o,l){switch(o.tag){case 5:return l=gs(l,o.type,o.pendingProps),l!==null?(o.stateNode=l,Jr=o,Aa=vs(l),!0):!1;case 6:return l=Pu(l,o.pendingProps),l!==null?(o.stateNode=l,Jr=o,Aa=null,!0):!1;case 13:if(l=SA(l),l!==null){var g=Hi!==null?{id:Na,overflow:xi}:null;return o.memoizedState={dehydrated:l,treeContext:g,retryLane:1073741824},g=oa(18,null,null,0),g.stateNode=l,g.return=o,o.child=g,Jr=o,Aa=null,!0}return!1;default:return!1}}function Ju(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Zu(o){if(bn){var l=Aa;if(l){var g=l;if(!jf(o,l)){if(Ju(o))throw Error(d(418));l=no(g);var b=Jr;l&&jf(o,l)?Uf(b,g):(o.flags=o.flags&-4097|2,bn=!1,Jr=o)}}else{if(Ju(o))throw Error(d(418));o.flags=o.flags&-4097|2,bn=!1,Jr=o}}}function Gf(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Jr=o}function tc(o){if(!he||o!==Jr)return!1;if(!bn)return Gf(o),bn=!0,!1;if(o.tag!==3&&(o.tag!==5||CA(o.type)&&!Re(o.type,o.memoizedProps))){var l=Aa;if(l){if(Ju(o))throw Hf(),Error(d(418));for(;l;)Uf(o,l),l=no(l)}}if(Gf(o),o.tag===13){if(!he)throw Error(d(316));if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(d(317));Aa=Jo(o)}else Aa=Jr?no(o.stateNode):null;return!0}function Hf(){for(var o=Aa;o;)o=no(o)}function io(){he&&(Aa=Jr=null,nl=bn=!1)}function $u(o){Pa===null?Pa=[o]:Pa.push(o)}var zA=h.ReactCurrentBatchConfig;function nc(o,l){if(ka(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var g=Object.keys(o),b=Object.keys(l);if(g.length!==b.length)return!1;for(b=0;b<g.length;b++){var E=g[b];if(!zf.call(l,E)||!ka(o[E],l[E]))return!1}return!0}function FA(o){switch(o.tag){case 5:return ys(o.type);case 16:return ys("Lazy");case 13:return ys("Suspense");case 19:return ys("SuspenseList");case 0:case 2:case 15:return o=Iu(o.type,!1),o;case 11:return o=Iu(o.type.render,!1),o;case 1:return o=Iu(o.type,!0),o;default:return""}}function rl(o,l,g){if(o=g.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(g._owner){if(g=g._owner,g){if(g.tag!==1)throw Error(d(309));var b=g.stateNode}if(!b)throw Error(d(147,o));var E=b,P=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===P?l.ref:(l=function(Q){var fe=E.refs;Q===null?delete fe[P]:fe[P]=Q},l._stringRef=P,l)}if(typeof o!="string")throw Error(d(284));if(!g._owner)throw Error(d(290,o))}return o}function rc(o,l){throw o=Object.prototype.toString.call(l),Error(d(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function Xf(o){var l=o._init;return l(o._payload)}function Wf(o){function l(Se,de){if(o){var De=Se.deletions;De===null?(Se.deletions=[de],Se.flags|=16):De.push(de)}}function g(Se,de){if(!o)return null;for(;de!==null;)l(Se,de),de=de.sibling;return null}function b(Se,de){for(Se=new Map;de!==null;)de.key!==null?Se.set(de.key,de):Se.set(de.index,de),de=de.sibling;return Se}function E(Se,de){return Se=Ei(Se,de),Se.index=0,Se.sibling=null,Se}function P(Se,de,De){return Se.index=De,o?(De=Se.alternate,De!==null?(De=De.index,De<de?(Se.flags|=2,de):De):(Se.flags|=2,de)):(Se.flags|=1048576,de)}function Q(Se){return o&&Se.alternate===null&&(Se.flags|=2),Se}function fe(Se,de,De,Ze){return de===null||de.tag!==6?(de=xl(De,Se.mode,Ze),de.return=Se,de):(de=E(de,De),de.return=Se,de)}function Ee(Se,de,De,Ze){var At=De.type;return At===A?Je(Se,de,De.props.children,Ze,De.key):de!==null&&(de.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===M&&Xf(At)===de.type)?(Ze=E(de,De.props),Ze.ref=rl(Se,de,De),Ze.return=Se,Ze):(Ze=yl(De.type,De.key,De.props,null,Se.mode,Ze),Ze.ref=rl(Se,de,De),Ze.return=Se,Ze)}function Ge(Se,de,De,Ze){return de===null||de.tag!==4||de.stateNode.containerInfo!==De.containerInfo||de.stateNode.implementation!==De.implementation?(de=wd(De,Se.mode,Ze),de.return=Se,de):(de=E(de,De.children||[]),de.return=Se,de)}function Je(Se,de,De,Ze,At){return de===null||de.tag!==7?(de=Ti(De,Se.mode,Ze,At),de.return=Se,de):(de=E(de,De),de.return=Se,de)}function wt(Se,de,De){if(typeof de=="string"&&de!==""||typeof de=="number")return de=xl(""+de,Se.mode,De),de.return=Se,de;if(typeof de=="object"&&de!==null){switch(de.$$typeof){case p:return De=yl(de.type,de.key,de.props,null,Se.mode,De),De.ref=rl(Se,null,de),De.return=Se,De;case u:return de=wd(de,Se.mode,De),de.return=Se,de;case M:var Ze=de._init;return wt(Se,Ze(de._payload),De)}if(te(de)||Y(de))return de=Ti(de,Se.mode,De,null),de.return=Se,de;rc(Se,de)}return null}function nt(Se,de,De,Ze){var At=de!==null?de.key:null;if(typeof De=="string"&&De!==""||typeof De=="number")return At!==null?null:fe(Se,de,""+De,Ze);if(typeof De=="object"&&De!==null){switch(De.$$typeof){case p:return De.key===At?Ee(Se,de,De,Ze):null;case u:return De.key===At?Ge(Se,de,De,Ze):null;case M:return At=De._init,nt(Se,de,At(De._payload),Ze)}if(te(De)||Y(De))return At!==null?null:Je(Se,de,De,Ze,null);rc(Se,De)}return null}function vn(Se,de,De,Ze,At){if(typeof Ze=="string"&&Ze!==""||typeof Ze=="number")return Se=Se.get(De)||null,fe(de,Se,""+Ze,At);if(typeof Ze=="object"&&Ze!==null){switch(Ze.$$typeof){case p:return Se=Se.get(Ze.key===null?De:Ze.key)||null,Ee(de,Se,Ze,At);case u:return Se=Se.get(Ze.key===null?De:Ze.key)||null,Ge(de,Se,Ze,At);case M:var kt=Ze._init;return vn(Se,de,De,kt(Ze._payload),At)}if(te(Ze)||Y(Ze))return Se=Se.get(De)||null,Je(de,Se,Ze,At,null);rc(de,Ze)}return null}function Bt(Se,de,De,Ze){for(var At=null,kt=null,Ct=de,Gt=de=0,Dn=null;Ct!==null&&Gt<De.length;Gt++){Ct.index>Gt?(Dn=Ct,Ct=null):Dn=Ct.sibling;var Ht=nt(Se,Ct,De[Gt],Ze);if(Ht===null){Ct===null&&(Ct=Dn);break}o&&Ct&&Ht.alternate===null&&l(Se,Ct),de=P(Ht,de,Gt),kt===null?At=Ht:kt.sibling=Ht,kt=Ht,Ct=Dn}if(Gt===De.length)return g(Se,Ct),bn&&Cs(Se,Gt),At;if(Ct===null){for(;Gt<De.length;Gt++)Ct=wt(Se,De[Gt],Ze),Ct!==null&&(de=P(Ct,de,Gt),kt===null?At=Ct:kt.sibling=Ct,kt=Ct);return bn&&Cs(Se,Gt),At}for(Ct=b(Se,Ct);Gt<De.length;Gt++)Dn=vn(Ct,Se,Gt,De[Gt],Ze),Dn!==null&&(o&&Dn.alternate!==null&&Ct.delete(Dn.key===null?Gt:Dn.key),de=P(Dn,de,Gt),kt===null?At=Dn:kt.sibling=Dn,kt=Dn);return o&&Ct.forEach(function(Xr){return l(Se,Xr)}),bn&&Cs(Se,Gt),At}function Vt(Se,de,De,Ze){var At=Y(De);if(typeof At!="function")throw Error(d(150));if(De=At.call(De),De==null)throw Error(d(151));for(var kt=At=null,Ct=de,Gt=de=0,Dn=null,Ht=De.next();Ct!==null&&!Ht.done;Gt++,Ht=De.next()){Ct.index>Gt?(Dn=Ct,Ct=null):Dn=Ct.sibling;var Xr=nt(Se,Ct,Ht.value,Ze);if(Xr===null){Ct===null&&(Ct=Dn);break}o&&Ct&&Xr.alternate===null&&l(Se,Ct),de=P(Xr,de,Gt),kt===null?At=Xr:kt.sibling=Xr,kt=Xr,Ct=Dn}if(Ht.done)return g(Se,Ct),bn&&Cs(Se,Gt),At;if(Ct===null){for(;!Ht.done;Gt++,Ht=De.next())Ht=wt(Se,Ht.value,Ze),Ht!==null&&(de=P(Ht,de,Gt),kt===null?At=Ht:kt.sibling=Ht,kt=Ht);return bn&&Cs(Se,Gt),At}for(Ct=b(Se,Ct);!Ht.done;Gt++,Ht=De.next())Ht=vn(Ct,Se,Gt,Ht.value,Ze),Ht!==null&&(o&&Ht.alternate!==null&&Ct.delete(Ht.key===null?Gt:Ht.key),de=P(Ht,de,Gt),kt===null?At=Ht:kt.sibling=Ht,kt=Ht);return o&&Ct.forEach(function(Kc){return l(Se,Kc)}),bn&&Cs(Se,Gt),At}function Ri(Se,de,De,Ze){if(typeof De=="object"&&De!==null&&De.type===A&&De.key===null&&(De=De.props.children),typeof De=="object"&&De!==null){switch(De.$$typeof){case p:e:{for(var At=De.key,kt=de;kt!==null;){if(kt.key===At){if(At=De.type,At===A){if(kt.tag===7){g(Se,kt.sibling),de=E(kt,De.props.children),de.return=Se,Se=de;break e}}else if(kt.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===M&&Xf(At)===kt.type){g(Se,kt.sibling),de=E(kt,De.props),de.ref=rl(Se,kt,De),de.return=Se,Se=de;break e}g(Se,kt);break}else l(Se,kt);kt=kt.sibling}De.type===A?(de=Ti(De.props.children,Se.mode,Ze,De.key),de.return=Se,Se=de):(Ze=yl(De.type,De.key,De.props,null,Se.mode,Ze),Ze.ref=rl(Se,de,De),Ze.return=Se,Se=Ze)}return Q(Se);case u:e:{for(kt=De.key;de!==null;){if(de.key===kt)if(de.tag===4&&de.stateNode.containerInfo===De.containerInfo&&de.stateNode.implementation===De.implementation){g(Se,de.sibling),de=E(de,De.children||[]),de.return=Se,Se=de;break e}else{g(Se,de);break}else l(Se,de);de=de.sibling}de=wd(De,Se.mode,Ze),de.return=Se,Se=de}return Q(Se);case M:return kt=De._init,Ri(Se,de,kt(De._payload),Ze)}if(te(De))return Bt(Se,de,De,Ze);if(Y(De))return Vt(Se,de,De,Ze);rc(Se,De)}return typeof De=="string"&&De!==""||typeof De=="number"?(De=""+De,de!==null&&de.tag===6?(g(Se,de.sibling),de=E(de,De),de.return=Se,Se=de):(g(Se,de),de=xl(De,Se.mode,Ze),de.return=Se,Se=de),Q(Se)):g(Se,de)}return Ri}var so=Wf(!0),Qf=Wf(!1),ac=Za(null),ic=null,ei=null,sc=null;function oc(){sc=ei=ic=null}function ed(o,l,g){Rt?(hn(ac,l._currentValue),l._currentValue=g):(hn(ac,l._currentValue2),l._currentValue2=g)}function lc(o){var l=ac.current;An(ac),Rt?o._currentValue=l:o._currentValue2=l}function cc(o,l,g){for(;o!==null;){var b=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,b!==null&&(b.childLanes|=l)):b!==null&&(b.childLanes&l)!==l&&(b.childLanes|=l),o===g)break;o=o.return}}function _s(o,l){ic=o,sc=ei=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(qn=!0),o.firstContext=null)}function Zr(o){var l=Rt?o._currentValue:o._currentValue2;if(sc!==o)if(o={context:o,memoizedValue:l,next:null},ei===null){if(ic===null)throw Error(d(308));ei=o,ic.dependencies={lanes:0,firstContext:o}}else ei=ei.next=o;return l}var Xi=null;function td(o){Xi===null?Xi=[o]:Xi.push(o)}function Yf(o,l,g,b){var E=l.interleaved;return E===null?(g.next=g,td(l)):(g.next=E.next,E.next=g),l.interleaved=g,ma(o,b)}function ma(o,l){o.lanes|=l;var g=o.alternate;for(g!==null&&(g.lanes|=l),g=o,o=o.return;o!==null;)o.childLanes|=l,g=o.alternate,g!==null&&(g.childLanes|=l),g=o,o=o.return;return g.tag===3?g.stateNode:null}var ti=!1;function ni(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function uc(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function ga(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Wi(o,l,g){var b=o.updateQueue;if(b===null)return null;if(b=b.shared,(It&2)!==0){var E=b.pending;return E===null?l.next=l:(l.next=E.next,E.next=l),b.pending=l,ma(o,g)}return E=b.interleaved,E===null?(l.next=l,td(b)):(l.next=E.next,E.next=l),b.interleaved=l,ma(o,g)}function oo(o,l,g){if(l=l.updateQueue,l!==null&&(l=l.shared,(g&4194240)!==0)){var b=l.lanes;b&=o.pendingLanes,g|=b,l.lanes=g,Ss(o,g)}}function Vf(o,l){var g=o.updateQueue,b=o.alternate;if(b!==null&&(b=b.updateQueue,g===b)){var E=null,P=null;if(g=g.firstBaseUpdate,g!==null){do{var Q={eventTime:g.eventTime,lane:g.lane,tag:g.tag,payload:g.payload,callback:g.callback,next:null};P===null?E=P=Q:P=P.next=Q,g=g.next}while(g!==null);P===null?E=P=l:P=P.next=l}else E=P=l;g={baseState:b.baseState,firstBaseUpdate:E,lastBaseUpdate:P,shared:b.shared,effects:b.effects},o.updateQueue=g;return}o=g.lastBaseUpdate,o===null?g.firstBaseUpdate=l:o.next=l,g.lastBaseUpdate=l}function lo(o,l,g,b){var E=o.updateQueue;ti=!1;var P=E.firstBaseUpdate,Q=E.lastBaseUpdate,fe=E.shared.pending;if(fe!==null){E.shared.pending=null;var Ee=fe,Ge=Ee.next;Ee.next=null,Q===null?P=Ge:Q.next=Ge,Q=Ee;var Je=o.alternate;Je!==null&&(Je=Je.updateQueue,fe=Je.lastBaseUpdate,fe!==Q&&(fe===null?Je.firstBaseUpdate=Ge:fe.next=Ge,Je.lastBaseUpdate=Ee))}if(P!==null){var wt=E.baseState;Q=0,Je=Ge=Ee=null,fe=P;do{var nt=fe.lane,vn=fe.eventTime;if((b&nt)===nt){Je!==null&&(Je=Je.next={eventTime:vn,lane:0,tag:fe.tag,payload:fe.payload,callback:fe.callback,next:null});e:{var Bt=o,Vt=fe;switch(nt=l,vn=g,Vt.tag){case 1:if(Bt=Vt.payload,typeof Bt=="function"){wt=Bt.call(vn,wt,nt);break e}wt=Bt;break e;case 3:Bt.flags=Bt.flags&-65537|128;case 0:if(Bt=Vt.payload,nt=typeof Bt=="function"?Bt.call(vn,wt,nt):Bt,nt==null)break e;wt=c({},wt,nt);break e;case 2:ti=!0}}fe.callback!==null&&fe.lane!==0&&(o.flags|=64,nt=E.effects,nt===null?E.effects=[fe]:nt.push(fe))}else vn={eventTime:vn,lane:nt,tag:fe.tag,payload:fe.payload,callback:fe.callback,next:null},Je===null?(Ge=Je=vn,Ee=wt):Je=Je.next=vn,Q|=nt;if(fe=fe.next,fe===null){if(fe=E.shared.pending,fe===null)break;nt=fe,fe=nt.next,nt.next=null,E.lastBaseUpdate=nt,E.shared.pending=null}}while(!0);if(Je===null&&(Ee=wt),E.baseState=Ee,E.firstBaseUpdate=Ge,E.lastBaseUpdate=Je,l=E.shared.interleaved,l!==null){E=l;do Q|=E.lane,E=E.next;while(E!==l)}else P===null&&(E.shared.lanes=0);Os|=Q,o.lanes=Q,o.memoizedState=wt}}function qf(o,l,g){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var b=o[l],E=b.callback;if(E!==null){if(b.callback=null,b=g,typeof E!="function")throw Error(d(191,E));E.call(b)}}}var Es={},$r=Za(Es),co=Za(Es),Ts=Za(Es);function ea(o){if(o===Es)throw Error(d(174));return o}function ta(o,l){hn(Ts,l),hn(co,o),hn($r,Es),o=Ae(l),An($r),hn($r,o)}function Qi(){An($r),An(co),An(Ts)}function al(o){var l=ea(Ts.current),g=ea($r.current);l=ne(g,o.type,l),g!==l&&(hn(co,o),hn($r,l))}function Ba(o){co.current===o&&(An($r),An(co))}var rn=Za(0);function jn(o){for(var l=o;l!==null;){if(l.tag===13){var g=l.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||qo(g)||tr(g)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Gn=[];function il(){for(var o=0;o<Gn.length;o++){var l=Gn[o];Rt?l._workInProgressVersionPrimary=null:l._workInProgressVersionSecondary=null}Gn.length=0}var mr=h.ReactCurrentDispatcher,Ma=h.ReactCurrentBatchConfig,gr=0,mn=null,Sn=null,Hn=null,bi=!1,Yi=!1,Fr=0,dc=0;function Vn(){throw Error(d(321))}function fc(o,l){if(l===null)return!1;for(var g=0;g<l.length&&g<o.length;g++)if(!ka(o[g],l[g]))return!1;return!0}function hc(o,l,g,b,E,P){if(gr=P,mn=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,mr.current=o===null||o.memoizedState===null?sd:od,o=g(b,E),Yi){P=0;do{if(Yi=!1,Fr=0,25<=P)throw Error(d(301));P+=1,Hn=Sn=null,l.updateQueue=null,mr.current=ld,o=g(b,E)}while(Yi)}if(mr.current=ho,l=Sn!==null&&Sn.next!==null,gr=0,Hn=Sn=mn=null,bi=!1,l)throw Error(d(300));return o}function uo(){var o=Fr!==0;return Fr=0,o}function za(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Hn===null?mn.memoizedState=Hn=o:Hn=Hn.next=o,Hn}function va(){if(Sn===null){var o=mn.alternate;o=o!==null?o.memoizedState:null}else o=Sn.next;var l=Hn===null?mn.memoizedState:Hn.next;if(l!==null)Hn=l,Sn=o;else{if(o===null)throw Error(d(310));Sn=o,o={memoizedState:Sn.memoizedState,baseState:Sn.baseState,baseQueue:Sn.baseQueue,queue:Sn.queue,next:null},Hn===null?mn.memoizedState=Hn=o:Hn=Hn.next=o}return Hn}function ri(o,l){return typeof l=="function"?l(o):l}function pc(o){var l=va(),g=l.queue;if(g===null)throw Error(d(311));g.lastRenderedReducer=o;var b=Sn,E=b.baseQueue,P=g.pending;if(P!==null){if(E!==null){var Q=E.next;E.next=P.next,P.next=Q}b.baseQueue=E=P,g.pending=null}if(E!==null){P=E.next,b=b.baseState;var fe=Q=null,Ee=null,Ge=P;do{var Je=Ge.lane;if((gr&Je)===Je)Ee!==null&&(Ee=Ee.next={lane:0,action:Ge.action,hasEagerState:Ge.hasEagerState,eagerState:Ge.eagerState,next:null}),b=Ge.hasEagerState?Ge.eagerState:o(b,Ge.action);else{var wt={lane:Je,action:Ge.action,hasEagerState:Ge.hasEagerState,eagerState:Ge.eagerState,next:null};Ee===null?(fe=Ee=wt,Q=b):Ee=Ee.next=wt,mn.lanes|=Je,Os|=Je}Ge=Ge.next}while(Ge!==null&&Ge!==P);Ee===null?Q=b:Ee.next=fe,ka(b,l.memoizedState)||(qn=!0),l.memoizedState=b,l.baseState=Q,l.baseQueue=Ee,g.lastRenderedState=b}if(o=g.interleaved,o!==null){E=o;do P=E.lane,mn.lanes|=P,Os|=P,E=E.next;while(E!==o)}else E===null&&(g.lanes=0);return[l.memoizedState,g.dispatch]}function mt(o){var l=va(),g=l.queue;if(g===null)throw Error(d(311));g.lastRenderedReducer=o;var b=g.dispatch,E=g.pending,P=l.memoizedState;if(E!==null){g.pending=null;var Q=E=E.next;do P=o(P,Q.action),Q=Q.next;while(Q!==E);ka(P,l.memoizedState)||(qn=!0),l.memoizedState=P,l.baseQueue===null&&(l.baseState=P),g.lastRenderedState=P}return[P,b]}function jt(){}function tn(o,l){var g=mn,b=va(),E=l(),P=!ka(b.memoizedState,E);if(P&&(b.memoizedState=E,qn=!0),b=b.queue,Ia(nd.bind(null,g,b,o),[o]),b.getSnapshot!==l||P||Hn!==null&&Hn.memoizedState.tag&1){if(g.flags|=2048,Rs(9,Fa.bind(null,g,b,E,l),void 0,null),Jn===null)throw Error(d(349));(gr&30)!==0||Tn(g,l,E)}return E}function Tn(o,l,g){o.flags|=16384,o={getSnapshot:l,value:g},l=mn.updateQueue,l===null?(l={lastEffect:null,stores:null},mn.updateQueue=l,l.stores=[o]):(g=l.stores,g===null?l.stores=[o]:g.push(o))}function Fa(o,l,g,b){l.value=g,l.getSnapshot=b,Kf(l)&&Jf(o)}function nd(o,l,g){return g(function(){Kf(l)&&Jf(o)})}function Kf(o){var l=o.getSnapshot;o=o.value;try{var g=l();return!ka(o,g)}catch{return!0}}function Jf(o){var l=ma(o,1);l!==null&&sr(l,o,1,-1)}function Zf(o){var l=za();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:o},l.queue=o,o=o.dispatch=id.bind(null,mn,o),[l.memoizedState,o]}function Rs(o,l,g,b){return o={tag:o,create:l,destroy:g,deps:b,next:null},l=mn.updateQueue,l===null?(l={lastEffect:null,stores:null},mn.updateQueue=l,l.lastEffect=o.next=o):(g=l.lastEffect,g===null?l.lastEffect=o.next=o:(b=g.next,g.next=o,o.next=b,l.lastEffect=o)),o}function Be(){return va().memoizedState}function Ln(o,l,g,b){var E=za();mn.flags|=o,E.memoizedState=Rs(1|l,g,void 0,b===void 0?null:b)}function vt(o,l,g,b){var E=va();b=b===void 0?null:b;var P=void 0;if(Sn!==null){var Q=Sn.memoizedState;if(P=Q.destroy,b!==null&&fc(b,Q.deps)){E.memoizedState=Rs(l,g,P,b);return}}mn.flags|=o,E.memoizedState=Rs(1|l,g,P,b)}function Ds(o,l){return Ln(8390656,8,o,l)}function Ia(o,l){return vt(2048,8,o,l)}function Vi(o,l){return vt(4,2,o,l)}function Oa(o,l){return vt(4,4,o,l)}function fo(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function Ls(o,l,g){return g=g!=null?g.concat([o]):null,vt(4,4,fo.bind(null,l,o),g)}function ks(){}function Ac(o,l){var g=va();l=l===void 0?null:l;var b=g.memoizedState;return b!==null&&l!==null&&fc(l,b[1])?b[0]:(g.memoizedState=[o,l],o)}function mc(o,l){var g=va();l=l===void 0?null:l;var b=g.memoizedState;return b!==null&&l!==null&&fc(l,b[1])?b[0]:(o=o(),g.memoizedState=[o,l],o)}function gc(o,l,g){return(gr&21)===0?(o.baseState&&(o.baseState=!1,qn=!0),o.memoizedState=g):(ka(g,l)||(g=bs(),mn.lanes|=g,Os|=g,o.baseState=!0),l)}function rd(o,l){var g=$t;$t=g!==0&&4>g?g:4,o(!0);var b=Ma.transition;Ma.transition={};try{o(!1),l()}finally{$t=g,Ma.transition=b}}function vc(){return va().memoizedState}function ad(o,l,g){var b=Ci(o);if(g={lane:b,action:g,hasEagerState:!1,eagerState:null,next:null},yc(o))xc(l,g);else if(g=Yf(o,l,g,b),g!==null){var E=gn();sr(g,o,b,E),bc(g,l,b)}}function id(o,l,g){var b=Ci(o),E={lane:b,action:g,hasEagerState:!1,eagerState:null,next:null};if(yc(o))xc(l,E);else{var P=o.alternate;if(o.lanes===0&&(P===null||P.lanes===0)&&(P=l.lastRenderedReducer,P!==null))try{var Q=l.lastRenderedState,fe=P(Q,g);if(E.hasEagerState=!0,E.eagerState=fe,ka(fe,Q)){var Ee=l.interleaved;Ee===null?(E.next=E,td(l)):(E.next=Ee.next,Ee.next=E),l.interleaved=E;return}}catch{}finally{}g=Yf(o,l,E,b),g!==null&&(E=gn(),sr(g,o,b,E),bc(g,l,b))}}function yc(o){var l=o.alternate;return o===mn||l!==null&&l===mn}function xc(o,l){Yi=bi=!0;var g=o.pending;g===null?l.next=l:(l.next=g.next,g.next=l),o.pending=l}function bc(o,l,g){if((g&4194240)!==0){var b=l.lanes;b&=o.pendingLanes,g|=b,l.lanes=g,Ss(o,g)}}var ho={readContext:Zr,useCallback:Vn,useContext:Vn,useEffect:Vn,useImperativeHandle:Vn,useInsertionEffect:Vn,useLayoutEffect:Vn,useMemo:Vn,useReducer:Vn,useRef:Vn,useState:Vn,useDebugValue:Vn,useDeferredValue:Vn,useTransition:Vn,useMutableSource:Vn,useSyncExternalStore:Vn,useId:Vn,unstable_isNewReconciler:!1},sd={readContext:Zr,useCallback:function(o,l){return za().memoizedState=[o,l===void 0?null:l],o},useContext:Zr,useEffect:Ds,useImperativeHandle:function(o,l,g){return g=g!=null?g.concat([o]):null,Ln(4194308,4,fo.bind(null,l,o),g)},useLayoutEffect:function(o,l){return Ln(4194308,4,o,l)},useInsertionEffect:function(o,l){return Ln(4,2,o,l)},useMemo:function(o,l){var g=za();return l=l===void 0?null:l,o=o(),g.memoizedState=[o,l],o},useReducer:function(o,l,g){var b=za();return l=g!==void 0?g(l):l,b.memoizedState=b.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},b.queue=o,o=o.dispatch=ad.bind(null,mn,o),[b.memoizedState,o]},useRef:function(o){var l=za();return o={current:o},l.memoizedState=o},useState:Zf,useDebugValue:ks,useDeferredValue:function(o){return za().memoizedState=o},useTransition:function(){var o=Zf(!1),l=o[0];return o=rd.bind(null,o[1]),za().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,g){var b=mn,E=za();if(bn){if(g===void 0)throw Error(d(407));g=g()}else{if(g=l(),Jn===null)throw Error(d(349));(gr&30)!==0||Tn(b,l,g)}E.memoizedState=g;var P={value:g,getSnapshot:l};return E.queue=P,Ds(nd.bind(null,b,P,o),[o]),b.flags|=2048,Rs(9,Fa.bind(null,b,P,g,l),void 0,null),g},useId:function(){var o=za(),l=Jn.identifierPrefix;if(bn){var g=xi,b=Na;g=(b&~(1<<32-zr(b)-1)).toString(32)+g,l=":"+l+"R"+g,g=Fr++,0<g&&(l+="H"+g.toString(32)),l+=":"}else g=dc++,l=":"+l+"r"+g.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},od={readContext:Zr,useCallback:Ac,useContext:Zr,useEffect:Ia,useImperativeHandle:Ls,useInsertionEffect:Vi,useLayoutEffect:Oa,useMemo:mc,useReducer:pc,useRef:Be,useState:function(){return pc(ri)},useDebugValue:ks,useDeferredValue:function(o){var l=va();return gc(l,Sn.memoizedState,o)},useTransition:function(){var o=pc(ri)[0],l=va().memoizedState;return[o,l]},useMutableSource:jt,useSyncExternalStore:tn,useId:vc,unstable_isNewReconciler:!1},ld={readContext:Zr,useCallback:Ac,useContext:Zr,useEffect:Ia,useImperativeHandle:Ls,useInsertionEffect:Vi,useLayoutEffect:Oa,useMemo:mc,useReducer:mt,useRef:Be,useState:function(){return mt(ri)},useDebugValue:ks,useDeferredValue:function(o){var l=va();return Sn===null?l.memoizedState=o:gc(l,Sn.memoizedState,o)},useTransition:function(){var o=mt(ri)[0],l=va().memoizedState;return[o,l]},useMutableSource:jt,useSyncExternalStore:tn,useId:vc,unstable_isNewReconciler:!1};function na(o,l){if(o&&o.defaultProps){l=c({},l),o=o.defaultProps;for(var g in o)l[g]===void 0&&(l[g]=o[g]);return l}return l}function po(o,l,g,b){l=o.memoizedState,g=g(b,l),g=g==null?l:c({},l,g),o.memoizedState=g,o.lanes===0&&(o.updateQueue.baseState=g)}var Si={isMounted:function(o){return(o=o._reactInternals)?W(o)===o:!1},enqueueSetState:function(o,l,g){o=o._reactInternals;var b=gn(),E=Ci(o),P=ga(b,E);P.payload=l,g!=null&&(P.callback=g),l=Wi(o,P,E),l!==null&&(sr(l,o,E,b),oo(l,o,E))},enqueueReplaceState:function(o,l,g){o=o._reactInternals;var b=gn(),E=Ci(o),P=ga(b,E);P.tag=1,P.payload=l,g!=null&&(P.callback=g),l=Wi(o,P,E),l!==null&&(sr(l,o,E,b),oo(l,o,E))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var g=gn(),b=Ci(o),E=ga(g,b);E.tag=2,l!=null&&(E.callback=l),l=Wi(o,E,b),l!==null&&(sr(l,o,b,g),oo(l,o,b))}};function Sc(o,l,g,b,E,P,Q){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(b,P,Q):l.prototype&&l.prototype.isPureReactComponent?!nc(g,b)||!nc(E,P):!0}function wc(o,l,g){var b=!1,E=ji,P=l.contextType;return typeof P=="object"&&P!==null?P=Zr(P):(E=Cr(l)?vi:Ar.current,b=l.contextTypes,P=(b=b!=null)?xs(o,E):ji),l=new l(g,P),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Si,o.stateNode=l,l._reactInternals=o,b&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=E,o.__reactInternalMemoizedMaskedChildContext=P),l}function Cc(o,l,g,b){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(g,b),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(g,b),l.state!==o&&Si.enqueueReplaceState(l,l.state,null)}function sl(o,l,g,b){var E=o.stateNode;E.props=g,E.state=o.memoizedState,E.refs={},ni(o);var P=l.contextType;typeof P=="object"&&P!==null?E.context=Zr(P):(P=Cr(l)?vi:Ar.current,E.context=xs(o,P)),E.state=o.memoizedState,P=l.getDerivedStateFromProps,typeof P=="function"&&(po(o,l,P,g),E.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(l=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),l!==E.state&&Si.enqueueReplaceState(E,E.state,null),lo(o,g,E,b),E.state=o.memoizedState),typeof E.componentDidMount=="function"&&(o.flags|=4194308)}function Ns(o,l){try{var g="",b=l;do g+=FA(b),b=b.return;while(b);var E=g}catch(P){E=`
357
357
  Error generating stack: `+P.message+`
358
- `+P.stack}return{value:o,source:l,stack:E,digest:null}}function Ps(o,l,g){return{value:o,source:null,stack:g??null,digest:l??null}}function _c(o,l){try{console.error(l.value)}catch(g){setTimeout(function(){throw g})}}var ol=typeof WeakMap=="function"?WeakMap:Map;function qi(o,l,g){g=ga(-1,g),g.tag=3,g.payload={element:null};var b=l.value;return g.callback=function(){Gc||(Gc=!0,ml=b),_c(o,l)},g}function Ir(o,l,g){g=ga(-1,g),g.tag=3;var b=o.type.getDerivedStateFromError;if(typeof b=="function"){var E=l.value;g.payload=function(){return b(E)},g.callback=function(){_c(o,l)}}var P=o.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(g.callback=function(){_c(o,l),typeof b!="function"&&($i===null?$i=new Set([this]):$i.add(this));var Q=l.stack;this.componentDidCatch(l.value,{componentStack:Q!==null?Q:""})}),g}function $f(o,l,g){var b=o.pingCache;if(b===null){b=o.pingCache=new ol;var E=new Set;b.set(l,E)}else E=b.get(l),E===void 0&&(E=new Set,b.set(l,E));E.has(g)||(E.add(g),o=ts.bind(null,o,l,g),l.then(o,o))}function dn(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function ll(o,l,g,b,E){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(l=ga(-1,1),l.tag=2,Wi(g,l,1))),g.lanes|=1),o):(o.flags|=65536,o.lanes=E,o)}var Ec=h.ReactCurrentOwner,qn=!1;function Kn(o,l,g,b){l.child=o===null?Qf(l,null,g,b):so(l,o.child,g,b)}function eh(o,l,g,b,E){g=g.render;var P=l.ref;return _s(l,E),b=hc(o,l,g,b,P,E),g=uo(),o!==null&&!qn?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~E,Or(o,l,E)):(bn&&g&&qu(l),l.flags|=1,Kn(o,l,b,E),l.child)}function th(o,l,g,b,E){if(o===null){var P=g.type;return typeof P=="function"&&!Vc(P)&&P.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(l.tag=15,l.type=P,nh(o,l,P,b,E)):(o=yl(g.type,null,b,l,l.mode,E),o.ref=l.ref,o.return=l,l.child=o)}if(P=o.child,(o.lanes&E)===0){var Q=P.memoizedProps;if(g=g.compare,g=g!==null?g:nc,g(Q,b)&&o.ref===l.ref)return Or(o,l,E)}return l.flags|=1,o=Ei(P,b),o.ref=l.ref,o.return=l,l.child=o}function nh(o,l,g,b,E){if(o!==null){var P=o.memoizedProps;if(nc(P,b)&&o.ref===l.ref)if(qn=!1,l.pendingProps=b=P,(o.lanes&E)!==0)(o.flags&131072)!==0&&(qn=!0);else return l.lanes=o.lanes,Or(o,l,E)}return cd(o,l,g,b,E)}function rh(o,l,g){var b=l.pendingProps,E=b.children,P=o!==null?o.memoizedState:null;if(b.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},hn(Is,ia),ia|=g;else{if((g&1073741824)===0)return o=P!==null?P.baseLanes|g:g,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,hn(Is,ia),ia|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=P!==null?P.baseLanes:g,hn(Is,ia),ia|=b}else P!==null?(b=P.baseLanes|g,l.memoizedState=null):b=g,hn(Is,ia),ia|=b;return Kn(o,l,E,g),l.child}function Tc(o,l){var g=l.ref;(o===null&&g!==null||o!==null&&o.ref!==g)&&(l.flags|=512,l.flags|=2097152)}function cd(o,l,g,b,E){var P=Cr(g)?vi:Ar.current;return P=xs(l,P),_s(l,E),g=hc(o,l,g,b,P,E),b=uo(),o!==null&&!qn?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~E,Or(o,l,E)):(bn&&b&&qu(l),l.flags|=1,Kn(o,l,g,E),l.child)}function Rc(o,l,g,b,E){if(Cr(g)){var P=!0;Yl(l)}else P=!1;if(_s(l,E),l.stateNode===null)vr(o,l),wc(l,g,b),sl(l,g,b,E),b=!0;else if(o===null){var Q=l.stateNode,fe=l.memoizedProps;Q.props=fe;var Ee=Q.context,Ge=g.contextType;typeof Ge=="object"&&Ge!==null?Ge=Zr(Ge):(Ge=Cr(g)?vi:Ar.current,Ge=xs(l,Ge));var Je=g.getDerivedStateFromProps,wt=typeof Je=="function"||typeof Q.getSnapshotBeforeUpdate=="function";wt||typeof Q.UNSAFE_componentWillReceiveProps!="function"&&typeof Q.componentWillReceiveProps!="function"||(fe!==b||Ee!==Ge)&&Cc(l,Q,b,Ge),ti=!1;var nt=l.memoizedState;Q.state=nt,lo(l,b,Q,E),Ee=l.memoizedState,fe!==b||nt!==Ee||Mr.current||ti?(typeof Je=="function"&&(po(l,g,Je,b),Ee=l.memoizedState),(fe=ti||Sc(l,g,fe,b,nt,Ee,Ge))?(wt||typeof Q.UNSAFE_componentWillMount!="function"&&typeof Q.componentWillMount!="function"||(typeof Q.componentWillMount=="function"&&Q.componentWillMount(),typeof Q.UNSAFE_componentWillMount=="function"&&Q.UNSAFE_componentWillMount()),typeof Q.componentDidMount=="function"&&(l.flags|=4194308)):(typeof Q.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=b,l.memoizedState=Ee),Q.props=b,Q.state=Ee,Q.context=Ge,b=fe):(typeof Q.componentDidMount=="function"&&(l.flags|=4194308),b=!1)}else{Q=l.stateNode,uc(o,l),fe=l.memoizedProps,Ge=l.type===l.elementType?fe:na(l.type,fe),Q.props=Ge,wt=l.pendingProps,nt=Q.context,Ee=g.contextType,typeof Ee=="object"&&Ee!==null?Ee=Zr(Ee):(Ee=Cr(g)?vi:Ar.current,Ee=xs(l,Ee));var vn=g.getDerivedStateFromProps;(Je=typeof vn=="function"||typeof Q.getSnapshotBeforeUpdate=="function")||typeof Q.UNSAFE_componentWillReceiveProps!="function"&&typeof Q.componentWillReceiveProps!="function"||(fe!==wt||nt!==Ee)&&Cc(l,Q,b,Ee),ti=!1,nt=l.memoizedState,Q.state=nt,lo(l,b,Q,E);var Bt=l.memoizedState;fe!==wt||nt!==Bt||Mr.current||ti?(typeof vn=="function"&&(po(l,g,vn,b),Bt=l.memoizedState),(Ge=ti||Sc(l,g,Ge,b,nt,Bt,Ee)||!1)?(Je||typeof Q.UNSAFE_componentWillUpdate!="function"&&typeof Q.componentWillUpdate!="function"||(typeof Q.componentWillUpdate=="function"&&Q.componentWillUpdate(b,Bt,Ee),typeof Q.UNSAFE_componentWillUpdate=="function"&&Q.UNSAFE_componentWillUpdate(b,Bt,Ee)),typeof Q.componentDidUpdate=="function"&&(l.flags|=4),typeof Q.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof Q.componentDidUpdate!="function"||fe===o.memoizedProps&&nt===o.memoizedState||(l.flags|=4),typeof Q.getSnapshotBeforeUpdate!="function"||fe===o.memoizedProps&&nt===o.memoizedState||(l.flags|=1024),l.memoizedProps=b,l.memoizedState=Bt),Q.props=b,Q.state=Bt,Q.context=Ee,b=Ge):(typeof Q.componentDidUpdate!="function"||fe===o.memoizedProps&&nt===o.memoizedState||(l.flags|=4),typeof Q.getSnapshotBeforeUpdate!="function"||fe===o.memoizedProps&&nt===o.memoizedState||(l.flags|=1024),b=!1)}return Dc(o,l,g,b,P,E)}function Dc(o,l,g,b,E,P){Tc(o,l);var Q=(l.flags&128)!==0;if(!b&&!Q)return E&&Vl(l,g,!1),Or(o,l,P);b=l.stateNode,Ec.current=l;var fe=Q&&typeof g.getDerivedStateFromError!="function"?null:b.render();return l.flags|=1,o!==null&&Q?(l.child=so(l,o.child,null,P),l.child=so(l,null,fe,P)):Kn(o,l,fe,P),l.memoizedState=b.state,E&&Vl(l,g,!0),l.child}function ah(o){var l=o.stateNode;l.pendingContext?Uu(o,l.pendingContext,l.pendingContext!==l.context):l.context&&Uu(o,l.context,!1),ta(o,l.containerInfo)}function ih(o,l,g,b,E){return io(),$u(E),l.flags|=256,Kn(o,l,g,b),l.child}var Ao={dehydrated:null,treeContext:null,retryLane:0};function ud(o){return{baseLanes:o,cachePool:null,transitions:null}}function dd(o,l,g){var b=l.pendingProps,E=rn.current,P=!1,Q=(l.flags&128)!==0,fe;if((fe=Q)||(fe=o!==null&&o.memoizedState===null?!1:(E&2)!==0),fe?(P=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(E|=1),hn(rn,E&1),o===null)return Zu(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:tr(o)?l.lanes=8:l.lanes=1073741824,null):(Q=b.children,o=b.fallback,P?(b=l.mode,P=l.child,Q={mode:"hidden",children:Q},(b&1)===0&&P!==null?(P.childLanes=0,P.pendingProps=Q):P=wo(Q,b,0,null),o=Ti(o,b,g,null),P.return=l,o.return=l,P.sibling=o,l.child=P,l.child.memoizedState=ud(g),l.memoizedState=Ao,o):Lc(l,Q));if(E=o.memoizedState,E!==null&&(fe=E.dehydrated,fe!==null))return Bs(o,l,Q,b,fe,E,g);if(P){P=b.fallback,Q=l.mode,E=o.child,fe=E.sibling;var Ee={mode:"hidden",children:b.children};return(Q&1)===0&&l.child!==E?(b=l.child,b.childLanes=0,b.pendingProps=Ee,l.deletions=null):(b=Ei(E,Ee),b.subtreeFlags=E.subtreeFlags&14680064),fe!==null?P=Ei(fe,P):(P=Ti(P,Q,g,null),P.flags|=2),P.return=l,b.return=l,b.sibling=P,l.child=b,b=P,P=l.child,Q=o.child.memoizedState,Q=Q===null?ud(g):{baseLanes:Q.baseLanes|g,cachePool:null,transitions:Q.transitions},P.memoizedState=Q,P.childLanes=o.childLanes&~g,l.memoizedState=Ao,b}return P=o.child,o=P.sibling,b=Ei(P,{mode:"visible",children:b.children}),(l.mode&1)===0&&(b.lanes=g),b.return=l,b.sibling=null,o!==null&&(g=l.deletions,g===null?(l.deletions=[o],l.flags|=16):g.push(o)),l.child=b,l.memoizedState=null,b}function Lc(o,l){return l=wo({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function kc(o,l,g,b){return b!==null&&$u(b),so(l,o.child,null,g),o=Lc(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function Bs(o,l,g,b,E,P,Q){if(g)return l.flags&256?(l.flags&=-257,b=Ps(Error(d(422))),kc(o,l,Q,b)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(P=b.fallback,E=l.mode,b=wo({mode:"visible",children:b.children},E,0,null),P=Ti(P,E,Q,null),P.flags|=2,b.return=l,P.return=l,b.sibling=P,l.child=b,(l.mode&1)!==0&&so(l,o.child,null,Q),l.child.memoizedState=ud(Q),l.memoizedState=Ao,P);if((l.mode&1)===0)return kc(o,l,Q,null);if(tr(E))return b=Bu(E).digest,P=Error(d(419)),b=Ps(P,b,void 0),kc(o,l,Q,b);if(g=(Q&o.childLanes)!==0,qn||g){if(b=Jn,b!==null){switch(Q&-Q){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(b.suspendedLanes|Q))!==0?0:E,E!==0&&E!==P.retryLane&&(P.retryLane=E,ma(o,E),sr(b,o,E,-1))}return Wc(),b=Ps(Error(d(421))),kc(o,l,Q,b)}return qo(E)?(l.flags|=128,l.child=o.child,l=jA.bind(null,o),Bf(E,l),null):(o=P.treeContext,he&&(Aa=Ui(E),Jr=l,bn=!0,Pa=null,nl=!1,o!==null&&(ha[pa++]=Na,ha[pa++]=xi,ha[pa++]=Hi,Na=o.id,xi=o.overflow,Hi=l)),l=Lc(l,b.children),l.flags|=4096,l)}function mo(o,l,g){o.lanes|=l;var b=o.alternate;b!==null&&(b.lanes|=l),cc(o.return,l,g)}function wi(o,l,g,b,E){var P=o.memoizedState;P===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:b,tail:g,tailMode:E}:(P.isBackwards=l,P.rendering=null,P.renderingStartTime=0,P.last=b,P.tail=g,P.tailMode=E)}function Nc(o,l,g){var b=l.pendingProps,E=b.revealOrder,P=b.tail;if(Kn(o,l,b.children,g),b=rn.current,(b&2)!==0)b=b&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&mo(o,g,l);else if(o.tag===19)mo(o,g,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}b&=1}if(hn(rn,b),(l.mode&1)===0)l.memoizedState=null;else switch(E){case"forwards":for(g=l.child,E=null;g!==null;)o=g.alternate,o!==null&&jn(o)===null&&(E=g),g=g.sibling;g=E,g===null?(E=l.child,l.child=null):(E=g.sibling,g.sibling=null),wi(l,!1,E,g,P);break;case"backwards":for(g=null,E=l.child,l.child=null;E!==null;){if(o=E.alternate,o!==null&&jn(o)===null){l.child=E;break}o=E.sibling,E.sibling=g,g=E,E=o}wi(l,!0,g,null,P);break;case"together":wi(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function vr(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function Or(o,l,g){if(o!==null&&(l.dependencies=o.dependencies),Os|=l.lanes,(g&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(d(153));if(l.child!==null){for(o=l.child,g=Ei(o,o.pendingProps),l.child=g,g.return=l;o.sibling!==null;)o=o.sibling,g=g.sibling=Ei(o,o.pendingProps),g.return=l;g.sibling=null}return l.child}function Pt(o,l,g){switch(l.tag){case 3:ah(l),io();break;case 5:al(l);break;case 1:Cr(l.type)&&Yl(l);break;case 4:ta(l,l.stateNode.containerInfo);break;case 10:ed(l,l.type._context,l.memoizedProps.value);break;case 13:var b=l.memoizedState;if(b!==null)return b.dehydrated!==null?(hn(rn,rn.current&1),l.flags|=128,null):(g&l.child.childLanes)!==0?dd(o,l,g):(hn(rn,rn.current&1),o=Or(o,l,g),o!==null?o.sibling:null);hn(rn,rn.current&1);break;case 19:if(b=(g&l.childLanes)!==0,(o.flags&128)!==0){if(b)return Nc(o,l,g);l.flags|=128}var E=l.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),hn(rn,rn.current),b)break;return null;case 22:case 23:return l.lanes=0,rh(o,l,g)}return Or(o,l,g)}function ra(o){o.flags|=4}function fd(o,l){if(o!==null&&o.child===l.child)return!0;if((l.flags&16)!==0)return!1;for(o=l.child;o!==null;){if((o.flags&12854)!==0||(o.subtreeFlags&12854)!==0)return!1;o=o.sibling}return!0}var Pc,cl,go,Ki;if(je)Pc=function(o,l){for(var g=l.child;g!==null;){if(g.tag===5||g.tag===6)K(o,g.stateNode);else if(g.tag!==4&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===l)break;for(;g.sibling===null;){if(g.return===null||g.return===l)return;g=g.return}g.sibling.return=g.return,g=g.sibling}},cl=function(){},go=function(o,l,g,b,E){if(o=o.memoizedProps,o!==b){var P=l.stateNode,Q=ea($r.current);g=xe(P,g,o,b,E,Q),(l.updateQueue=g)&&ra(l)}},Ki=function(o,l,g,b){g!==b&&ra(l)};else if(St){Pc=function(o,l,g,b){for(var E=l.child;E!==null;){if(E.tag===5){var P=E.stateNode;g&&b&&(P=mi(P,E.type,E.memoizedProps,E)),K(o,P)}else if(E.tag===6)P=E.stateNode,g&&b&&(P=Ja(P,E.memoizedProps,E)),K(o,P);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)P=E.child,P!==null&&(P.return=E),Pc(o,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===l)break;for(;E.sibling===null;){if(E.return===null||E.return===l)return;E=E.return}E.sibling.return=E.return,E=E.sibling}};var sh=function(o,l,g,b){for(var E=l.child;E!==null;){if(E.tag===5){var P=E.stateNode;g&&b&&(P=mi(P,E.type,E.memoizedProps,E)),Ka(o,P)}else if(E.tag===6)P=E.stateNode,g&&b&&(P=Ja(P,E.memoizedProps,E)),Ka(o,P);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)P=E.child,P!==null&&(P.return=E),sh(o,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===l)break;for(;E.sibling===null;){if(E.return===null||E.return===l)return;E=E.return}E.sibling.return=E.return,E=E.sibling}};cl=function(o,l){var g=l.stateNode;if(!fd(o,l)){o=g.containerInfo;var b=Qt(o);sh(b,l,!1,!1),g.pendingChildren=b,ra(l),ms(o,b)}},go=function(o,l,g,b,E){var P=o.stateNode,Q=o.memoizedProps;if((o=fd(o,l))&&Q===b)l.stateNode=P;else{var fe=l.stateNode,Ee=ea($r.current),Ge=null;Q!==b&&(Ge=xe(fe,g,Q,b,E,Ee)),o&&Ge===null?l.stateNode=P:(P=As(P,Ge,g,Q,b,l,o,fe),ve(P,g,b,E,Ee)&&ra(l),l.stateNode=P,o?ra(l):Pc(P,l,!1,!1))}},Ki=function(o,l,g,b){g!==b?(o=ea(Ts.current),g=ea($r.current),l.stateNode=Fe(b,o,g,l),ra(l)):l.stateNode=o.stateNode}}else cl=function(){},go=function(){},Ki=function(){};function vo(o,l){if(!bn)switch(o.tailMode){case"hidden":l=o.tail;for(var g=null;l!==null;)l.alternate!==null&&(g=l),l=l.sibling;g===null?o.tail=null:g.sibling=null;break;case"collapsed":g=o.tail;for(var b=null;g!==null;)g.alternate!==null&&(b=g),g=g.sibling;b===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:b.sibling=null}}function yr(o){var l=o.alternate!==null&&o.alternate.child===o.child,g=0,b=0;if(l)for(var E=o.child;E!==null;)g|=E.lanes|E.childLanes,b|=E.subtreeFlags&14680064,b|=E.flags&14680064,E.return=o,E=E.sibling;else for(E=o.child;E!==null;)g|=E.lanes|E.childLanes,b|=E.subtreeFlags,b|=E.flags,E.return=o,E=E.sibling;return o.subtreeFlags|=b,o.childLanes=g,l}function hd(o,l,g){var b=l.pendingProps;switch(Ku(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yr(l),null;case 1:return Cr(l.type)&&ao(),yr(l),null;case 3:return g=l.stateNode,Qi(),An(Mr),An(Ar),il(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(o===null||o.child===null)&&(tc(l)?ra(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Pa!==null&&(Gr(Pa),Pa=null))),cl(o,l),yr(l),null;case 5:Ba(l),g=ea(Ts.current);var E=l.type;if(o!==null&&l.stateNode!=null)go(o,l,E,b,g),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!b){if(l.stateNode===null)throw Error(d(166));return yr(l),null}if(o=ea($r.current),tc(l)){if(!he)throw Error(d(175));o=zu(l.stateNode,l.type,l.memoizedProps,g,o,l,!nl),l.updateQueue=o,o!==null&&ra(l)}else{var P=j(E,b,g,o,l);Pc(P,l,!1,!1),l.stateNode=P,ve(P,E,b,g,o)&&ra(l)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return yr(l),null;case 6:if(o&&l.stateNode!=null)Ki(o,l,o.memoizedProps,b);else{if(typeof b!="string"&&l.stateNode===null)throw Error(d(166));if(o=ea(Ts.current),g=ea($r.current),tc(l)){if(!he)throw Error(d(176));if(o=l.stateNode,g=l.memoizedProps,(b=Fu(o,g,l,!nl))&&(E=Jr,E!==null))switch(E.tag){case 3:_A(E.stateNode.containerInfo,o,g,(E.mode&1)!==0);break;case 5:Mf(E.type,E.memoizedProps,E.stateNode,o,g,(E.mode&1)!==0)}b&&ra(l)}else l.stateNode=Fe(b,o,g,l)}return yr(l),null;case 13:if(An(rn),b=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(bn&&Aa!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Hf(),io(),l.flags|=98560,E=!1;else if(E=tc(l),b!==null&&b.dehydrated!==null){if(o===null){if(!E)throw Error(d(318));if(!he)throw Error(d(344));if(E=l.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(d(317));Ko(E,l)}else io(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;yr(l),E=!1}else Pa!==null&&(Gr(Pa),Pa=null),E=!0;if(!E)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=g,l):(g=b!==null,g!==(o!==null&&o.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(rn.current&1)!==0?On===0&&(On=3):Wc())),l.updateQueue!==null&&(l.flags|=4),yr(l),null);case 4:return Qi(),cl(o,l),o===null&&ce(l.stateNode.containerInfo),yr(l),null;case 10:return lc(l.type._context),yr(l),null;case 17:return Cr(l.type)&&ao(),yr(l),null;case 19:if(An(rn),E=l.memoizedState,E===null)return yr(l),null;if(b=(l.flags&128)!==0,P=E.rendering,P===null)if(b)vo(E,!1);else{if(On!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(P=jn(o),P!==null){for(l.flags|=128,vo(E,!1),o=P.updateQueue,o!==null&&(l.updateQueue=o,l.flags|=4),l.subtreeFlags=0,o=g,g=l.child;g!==null;)b=g,E=o,b.flags&=14680066,P=b.alternate,P===null?(b.childLanes=0,b.lanes=E,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=P.childLanes,b.lanes=P.lanes,b.child=P.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=P.memoizedProps,b.memoizedState=P.memoizedState,b.updateQueue=P.updateQueue,b.type=P.type,E=P.dependencies,b.dependencies=E===null?null:{lanes:E.lanes,firstContext:E.firstContext}),g=g.sibling;return hn(rn,rn.current&1|2),l.child}o=o.sibling}E.tail!==null&&Yn()>xd&&(l.flags|=128,b=!0,vo(E,!1),l.lanes=4194304)}else{if(!b)if(o=jn(P),o!==null){if(l.flags|=128,b=!0,o=o.updateQueue,o!==null&&(l.updateQueue=o,l.flags|=4),vo(E,!0),E.tail===null&&E.tailMode==="hidden"&&!P.alternate&&!bn)return yr(l),null}else 2*Yn()-E.renderingStartTime>xd&&g!==1073741824&&(l.flags|=128,b=!0,vo(E,!1),l.lanes=4194304);E.isBackwards?(P.sibling=l.child,l.child=P):(o=E.last,o!==null?o.sibling=P:l.child=P,E.last=P)}return E.tail!==null?(l=E.tail,E.rendering=l,E.tail=l.sibling,E.renderingStartTime=Yn(),l.sibling=null,o=rn.current,hn(rn,b?o&1|2:o&1),l):(yr(l),null);case 22:case 23:return bd(),g=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(ia&1073741824)!==0&&(yr(l),je&&l.subtreeFlags&6&&(l.flags|=8192)):yr(l),null;case 24:return null;case 25:return null}throw Error(d(156,l.tag))}function IA(o,l){switch(Ku(l),l.tag){case 1:return Cr(l.type)&&ao(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Qi(),An(Mr),An(Ar),il(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Ba(l),null;case 13:if(An(rn),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(d(340));io()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return An(rn),null;case 4:return Qi(),null;case 10:return lc(l.type._context),null;case 22:case 23:return bd(),null;case 24:return null;default:return null}}var ul=!1,nr=!1,oh=typeof WeakSet=="function"?WeakSet:Set,$e=null;function ai(o,l){var g=o.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(b){Yt(o,l,b)}else g.current=null}function Ms(o,l,g){try{g()}catch(b){Yt(o,l,b)}}var Bc=!1;function dl(o,l){for(oe(o.containerInfo),$e=l;$e!==null;)if(o=$e,l=o.child,(o.subtreeFlags&1028)!==0&&l!==null)l.return=o,$e=l;else for(;$e!==null;){o=$e;try{var g=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var b=g.memoizedProps,E=g.memoizedState,P=o.stateNode,Q=P.getSnapshotBeforeUpdate(o.elementType===o.type?b:na(o.type,b),E);P.__reactInternalSnapshotBeforeUpdate=Q}break;case 3:je&&Da(o.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(d(163))}}catch(fe){Yt(o,o.return,fe)}if(l=o.sibling,l!==null){l.return=o.return,$e=l;break}$e=o.return}return g=Bc,Bc=!1,g}function Er(o,l,g){var b=l.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var E=b=b.next;do{if((E.tag&o)===o){var P=E.destroy;E.destroy=void 0,P!==void 0&&Ms(l,g,P)}E=E.next}while(E!==b)}}function kn(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var g=l=l.next;do{if((g.tag&o)===o){var b=g.create;g.destroy=b()}g=g.next}while(g!==l)}}function pd(o){var l=o.ref;if(l!==null){var g=o.stateNode;switch(o.tag){case 5:o=le(g);break;default:o=g}typeof l=="function"?l(o):l.current=o}}function lh(o){var l=o.alternate;l!==null&&(o.alternate=null,lh(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&U(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function ch(o){return o.tag===5||o.tag===3||o.tag===4}function Ad(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||ch(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Mc(o,l,g){var b=o.tag;if(b===5||b===6)o=o.stateNode,l?pn(g,o,l):pr(g,o);else if(b!==4&&(o=o.child,o!==null))for(Mc(o,l,g),o=o.sibling;o!==null;)Mc(o,l,g),o=o.sibling}function zc(o,l,g){var b=o.tag;if(b===5||b===6)o=o.stateNode,l?et(g,o,l):zt(g,o);else if(b!==4&&(o=o.child,o!==null))for(zc(o,l,g),o=o.sibling;o!==null;)zc(o,l,g),o=o.sibling}var rr=null,Ua=!1;function ii(o,l,g){for(g=g.child;g!==null;)zn(o,l,g),g=g.sibling}function zn(o,l,g){if(La&&typeof La.onCommitFiberUnmount=="function")try{La.onCommitFiberUnmount(Zl,g)}catch{}switch(g.tag){case 5:nr||ai(g,l);case 6:if(je){var b=rr,E=Ua;rr=null,ii(o,l,g),rr=b,Ua=E,rr!==null&&(Ua?it(rr,g.stateNode):Wn(rr,g.stateNode))}else ii(o,l,g);break;case 18:je&&rr!==null&&(Ua?Xl(rr,g.stateNode):wA(rr,g.stateNode));break;case 4:je?(b=rr,E=Ua,rr=g.stateNode.containerInfo,Ua=!0,ii(o,l,g),rr=b,Ua=E):(St&&(b=g.stateNode.containerInfo,E=Qt(b),Oi(b,E)),ii(o,l,g));break;case 0:case 11:case 14:case 15:if(!nr&&(b=g.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){E=b=b.next;do{var P=E,Q=P.destroy;P=P.tag,Q!==void 0&&((P&2)!==0||(P&4)!==0)&&Ms(g,l,Q),E=E.next}while(E!==b)}ii(o,l,g);break;case 1:if(!nr&&(ai(g,l),b=g.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=g.memoizedProps,b.state=g.memoizedState,b.componentWillUnmount()}catch(fe){Yt(g,l,fe)}ii(o,l,g);break;case 21:ii(o,l,g);break;case 22:g.mode&1?(nr=(b=nr)||g.memoizedState!==null,ii(o,l,g),nr=b):ii(o,l,g);break;default:ii(o,l,g)}}function fl(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var g=o.stateNode;g===null&&(g=o.stateNode=new oh),l.forEach(function(b){var E=Ah.bind(null,o,b);g.has(b)||(g.add(b),b.then(E,E))})}}function ya(o,l){var g=l.deletions;if(g!==null)for(var b=0;b<g.length;b++){var E=g[b];try{var P=o,Q=l;if(je){var fe=Q;e:for(;fe!==null;){switch(fe.tag){case 5:rr=fe.stateNode,Ua=!1;break e;case 3:rr=fe.stateNode.containerInfo,Ua=!0;break e;case 4:rr=fe.stateNode.containerInfo,Ua=!0;break e}fe=fe.return}if(rr===null)throw Error(d(160));zn(P,Q,E),rr=null,Ua=!1}else zn(P,Q,E);var Ee=E.alternate;Ee!==null&&(Ee.return=null),E.return=null}catch(Ge){Yt(E,l,Ge)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)zs(l,o),l=l.sibling}function zs(o,l){var g=o.alternate,b=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(ya(l,o),ja(o),b&4){try{Er(3,o,o.return),kn(3,o)}catch(nt){Yt(o,o.return,nt)}try{Er(5,o,o.return)}catch(nt){Yt(o,o.return,nt)}}break;case 1:ya(l,o),ja(o),b&512&&g!==null&&ai(g,g.return);break;case 5:if(ya(l,o),ja(o),b&512&&g!==null&&ai(g,g.return),je){if(o.flags&32){var E=o.stateNode;try{st(E)}catch(nt){Yt(o,o.return,nt)}}if(b&4&&(E=o.stateNode,E!=null)){var P=o.memoizedProps;if(g=g!==null?g.memoizedProps:P,b=o.type,l=o.updateQueue,o.updateQueue=null,l!==null)try{Nt(E,l,b,g,P,o)}catch(nt){Yt(o,o.return,nt)}}}break;case 6:if(ya(l,o),ja(o),b&4&&je){if(o.stateNode===null)throw Error(d(162));E=o.stateNode,P=o.memoizedProps,g=g!==null?g.memoizedProps:P;try{qe(E,g,P)}catch(nt){Yt(o,o.return,nt)}}break;case 3:if(ya(l,o),ja(o),b&4){if(je&&he&&g!==null&&g.memoizedState.isDehydrated)try{ro(l.containerInfo)}catch(nt){Yt(o,o.return,nt)}if(St){E=l.containerInfo,P=l.pendingChildren;try{Oi(E,P)}catch(nt){Yt(o,o.return,nt)}}}break;case 4:if(ya(l,o),ja(o),b&4&&St){P=o.stateNode,E=P.containerInfo,P=P.pendingChildren;try{Oi(E,P)}catch(nt){Yt(o,o.return,nt)}}break;case 13:ya(l,o),ja(o),E=o.child,E.flags&8192&&(P=E.memoizedState!==null,E.stateNode.isHidden=P,!P||E.alternate!==null&&E.alternate.memoizedState!==null||(jc=Yn())),b&4&&fl(o);break;case 22:var Q=g!==null&&g.memoizedState!==null;if(o.mode&1?(nr=(g=nr)||Q,ya(l,o),nr=g):ya(l,o),ja(o),b&8192){if(g=o.memoizedState!==null,(o.stateNode.isHidden=g)&&!Q&&(o.mode&1)!==0)for($e=o,b=o.child;b!==null;){for(l=$e=b;$e!==null;){Q=$e;var fe=Q.child;switch(Q.tag){case 0:case 11:case 14:case 15:Er(4,Q,Q.return);break;case 1:ai(Q,Q.return);var Ee=Q.stateNode;if(typeof Ee.componentWillUnmount=="function"){var Ge=Q,Je=Q.return;try{var wt=Ge;Ee.props=wt.memoizedProps,Ee.state=wt.memoizedState,Ee.componentWillUnmount()}catch(nt){Yt(Ge,Je,nt)}}break;case 5:ai(Q,Q.return);break;case 22:if(Q.memoizedState!==null){ar(l);continue}}fe!==null?(fe.return=Q,$e=fe):ar(l)}b=b.sibling}if(je){e:if(b=null,je)for(l=o;;){if(l.tag===5){if(b===null){b=l;try{E=l.stateNode,g?En(E):Ut(l.stateNode,l.memoizedProps)}catch(nt){Yt(o,o.return,nt)}}}else if(l.tag===6){if(b===null)try{P=l.stateNode,g?un(P):Ra(P,l.memoizedProps)}catch(nt){Yt(o,o.return,nt)}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;b===l&&(b=null),l=l.return}b===l&&(b=null),l.sibling.return=l.return,l=l.sibling}}}break;case 19:ya(l,o),ja(o),b&4&&fl(o);break;case 21:break;default:ya(l,o),ja(o)}}function ja(o){var l=o.flags;if(l&2){try{if(je){e:{for(var g=o.return;g!==null;){if(ch(g)){var b=g;break e}g=g.return}throw Error(d(160))}switch(b.tag){case 5:var E=b.stateNode;b.flags&32&&(st(E),b.flags&=-33);var P=Ad(o);zc(o,P,E);break;case 3:case 4:var Q=b.stateNode.containerInfo,fe=Ad(o);Mc(o,fe,Q);break;default:throw Error(d(161))}}}catch(Ee){Yt(o,o.return,Ee)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function OA(o,l,g){$e=o,uh(o)}function uh(o,l,g){for(var b=(o.mode&1)!==0;$e!==null;){var E=$e,P=E.child;if(E.tag===22&&b){var Q=E.memoizedState!==null||ul;if(!Q){var fe=E.alternate,Ee=fe!==null&&fe.memoizedState!==null||nr;fe=ul;var Ge=nr;if(ul=Q,(nr=Ee)&&!Ge)for($e=E;$e!==null;)Q=$e,Ee=Q.child,Q.tag===22&&Q.memoizedState!==null?tt(E):Ee!==null?(Ee.return=Q,$e=Ee):tt(E);for(;P!==null;)$e=P,uh(P),P=P.sibling;$e=E,ul=fe,nr=Ge}Fs(o)}else(E.subtreeFlags&8772)!==0&&P!==null?(P.return=E,$e=P):Fs(o)}}function Fs(o){for(;$e!==null;){var l=$e;if((l.flags&8772)!==0){var g=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:nr||kn(5,l);break;case 1:var b=l.stateNode;if(l.flags&4&&!nr)if(g===null)b.componentDidMount();else{var E=l.elementType===l.type?g.memoizedProps:na(l.type,g.memoizedProps);b.componentDidUpdate(E,g.memoizedState,b.__reactInternalSnapshotBeforeUpdate)}var P=l.updateQueue;P!==null&&qf(l,P,b);break;case 3:var Q=l.updateQueue;if(Q!==null){if(g=null,l.child!==null)switch(l.child.tag){case 5:g=le(l.child.stateNode);break;case 1:g=l.child.stateNode}qf(l,Q,g)}break;case 5:var fe=l.stateNode;g===null&&l.flags&4&&ht(fe,l.type,l.memoizedProps,l);break;case 6:break;case 4:break;case 12:break;case 13:if(he&&l.memoizedState===null){var Ee=l.alternate;if(Ee!==null){var Ge=Ee.memoizedState;if(Ge!==null){var Je=Ge.dehydrated;Je!==null&&gi(Je)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(d(163))}nr||l.flags&512&&pd(l)}catch(wt){Yt(l,l.return,wt)}}if(l===o){$e=null;break}if(g=l.sibling,g!==null){g.return=l.return,$e=g;break}$e=l.return}}function ar(o){for(;$e!==null;){var l=$e;if(l===o){$e=null;break}var g=l.sibling;if(g!==null){g.return=l.return,$e=g;break}$e=l.return}}function tt(o){for(;$e!==null;){var l=$e;try{switch(l.tag){case 0:case 11:case 15:var g=l.return;try{kn(4,l)}catch(Ee){Yt(l,g,Ee)}break;case 1:var b=l.stateNode;if(typeof b.componentDidMount=="function"){var E=l.return;try{b.componentDidMount()}catch(Ee){Yt(l,E,Ee)}}var P=l.return;try{pd(l)}catch(Ee){Yt(l,P,Ee)}break;case 5:var Q=l.return;try{pd(l)}catch(Ee){Yt(l,Q,Ee)}}}catch(Ee){Yt(l,l.return,Ee)}if(l===o){$e=null;break}var fe=l.sibling;if(fe!==null){fe.return=l.return,$e=fe;break}$e=l.return}}var aa=0,Ur=1,Fc=2,Ic=3,Oc=4;if(typeof Symbol=="function"&&Symbol.for){var hl=Symbol.for;aa=hl("selector.component"),Ur=hl("selector.has_pseudo_class"),Fc=hl("selector.role"),Ic=hl("selector.test_id"),Oc=hl("selector.text")}function md(o){var l=k(o);if(l!=null){if(typeof l.memoizedProps["data-testname"]!="string")throw Error(d(364));return l}if(o=_e(o),o===null)throw Error(d(362));return o.stateNode.current}function Fn(o,l){switch(l.$$typeof){case aa:if(o.type===l.value)return!0;break;case Ur:e:{l=l.value,o=[o,0];for(var g=0;g<o.length;){var b=o[g++],E=o[g++],P=l[E];if(b.tag!==5||!Qe(b)){for(;P!=null&&Fn(b,P);)E++,P=l[E];if(E===l.length){l=!0;break e}else for(b=b.child;b!==null;)o.push(b,E),b=b.sibling}}l=!1}return l;case Fc:if(o.tag===5&&Oe(o.stateNode,l.value))return!0;break;case Oc:if((o.tag===5||o.tag===6)&&(o=ze(o),o!==null&&0<=o.indexOf(l.value)))return!0;break;case Ic:if(o.tag===5&&(o=o.memoizedProps["data-testname"],typeof o=="string"&&o.toLowerCase()===l.value.toLowerCase()))return!0;break;default:throw Error(d(365))}return!1}function gd(o){switch(o.$$typeof){case aa:return"<"+(J(o.value)||"Unknown")+">";case Ur:return":has("+(gd(o)||"")+")";case Fc:return'[role="'+o.value+'"]';case Oc:return'"'+o.value+'"';case Ic:return'[data-testname="'+o.value+'"]';default:throw Error(d(365))}}function dh(o,l){var g=[];o=[o,0];for(var b=0;b<o.length;){var E=o[b++],P=o[b++],Q=l[P];if(E.tag!==5||!Qe(E)){for(;Q!=null&&Fn(E,Q);)P++,Q=l[P];if(P===l.length)g.push(E);else for(E=E.child;E!==null;)o.push(E,P),E=E.sibling}}return g}function vd(o,l){if(!be)throw Error(d(363));o=md(o),o=dh(o,l),l=[],o=Array.from(o);for(var g=0;g<o.length;){var b=o[g++];if(b.tag===5)Qe(b)||l.push(b.stateNode);else for(b=b.child;b!==null;)o.push(b),b=b.sibling}return l}var fh=Math.ceil,Ji=h.ReactCurrentDispatcher,Zi=h.ReactCurrentOwner,Nn=h.ReactCurrentBatchConfig,It=0,Jn=null,In=null,ir=0,ia=0,Is=Za(0),On=0,pl=null,Os=0,Uc=0,yd=0,Al=null,jr=null,jc=0,xd=1/0,si=null;function yo(){xd=Yn()+500}var Gc=!1,ml=null,$i=null,xr=!1,br=null,xo=0,Us=0,Hc=null,Xc=-1,gl=0;function gn(){return(It&6)!==0?Yn():Xc!==-1?Xc:Xc=Yn()}function Ci(o){return(o.mode&1)===0?1:(It&2)!==0&&ir!==0?ir&-ir:zA.transition!==null?(gl===0&&(gl=bs()),gl):(o=$t,o!==0?o:ue())}function sr(o,l,g,b){if(50<Us)throw Us=0,Hc=null,Error(d(185));$o(o,g,b),((It&2)===0||o!==Jn)&&(o===Jn&&((It&2)===0&&(Uc|=g),On===4&&Hr(o,ir)),Xn(o,b),g===1&&It===0&&(l.mode&1)===0&&(yo(),$l&&$a()))}function Xn(o,l){var g=o.callbackNode;RA(o,l);var b=Jl(o,o===Jn?ir:0);if(b===0)g!==null&&If(g),o.callbackNode=null,o.callbackPriority=0;else if(l=b&-b,o.callbackPriority!==l){if(g!=null&&If(g),l===1)o.tag===0?Of(oi.bind(null,o)):Vu(oi.bind(null,o)),G?Z(function(){(It&6)===0&&$a()}):Xu(Wu,$a),g=null;else{switch(Ff(b)){case 1:g=Wu;break;case 4:g=NA;break;case 16:g=Qu;break;case 536870912:g=PA;break;default:g=Qu}g=gh(g,vl.bind(null,o))}o.callbackPriority=l,o.callbackNode=g}}function vl(o,l){if(Xc=-1,gl=0,(It&6)!==0)throw Error(d(327));var g=o.callbackNode;if(Rn()&&o.callbackNode!==g)return null;var b=Jl(o,o===Jn?ir:0);if(b===0)return null;if((b&30)!==0||(b&o.expiredLanes)!==0||l)l=So(o,b);else{l=b;var E=It;It|=2;var P=es();(Jn!==o||ir!==l)&&(si=null,yo(),js(o,l));do try{UA();break}catch(fe){hh(o,fe)}while(!0);oc(),Ji.current=P,It=E,In!==null?l=0:(Jn=null,ir=0,l=On)}if(l!==0){if(l===2&&(E=Gu(o),E!==0&&(b=E,l=bo(o,E))),l===1)throw g=pl,js(o,0),Hr(o,b),Xn(o,Yn()),g;if(l===6)Hr(o,b);else{if(E=o.current.alternate,(b&30)===0&&!xa(E)&&(l=So(o,b),l===2&&(P=Gu(o),P!==0&&(b=P,l=bo(o,P))),l===1))throw g=pl,js(o,0),Hr(o,b),Xn(o,Yn()),g;switch(o.finishedWork=E,o.finishedLanes=b,l){case 0:case 1:throw Error(d(345));case 2:Gs(o,jr,si);break;case 3:if(Hr(o,b),(b&130023424)===b&&(l=jc+500-Yn(),10<l)){if(Jl(o,0)!==0)break;if(E=o.suspendedLanes,(E&b)!==b){gn(),o.pingedLanes|=o.suspendedLanes&E;break}o.timeoutHandle=pt(Gs.bind(null,o,jr,si),l);break}Gs(o,jr,si);break;case 4:if(Hr(o,b),(b&4194240)===b)break;for(l=o.eventTimes,E=-1;0<b;){var Q=31-zr(b);P=1<<Q,Q=l[Q],Q>E&&(E=Q),b&=~P}if(b=E,b=Yn()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*fh(b/1960))-b,10<b){o.timeoutHandle=pt(Gs.bind(null,o,jr,si),b);break}Gs(o,jr,si);break;case 5:Gs(o,jr,si);break;default:throw Error(d(329))}}}return Xn(o,Yn()),o.callbackNode===g?vl.bind(null,o):null}function bo(o,l){var g=Al;return o.current.memoizedState.isDehydrated&&(js(o,l).flags|=256),o=So(o,l),o!==2&&(l=jr,jr=g,l!==null&&Gr(l)),o}function Gr(o){jr===null?jr=o:jr.push.apply(jr,o)}function xa(o){for(var l=o;;){if(l.flags&16384){var g=l.updateQueue;if(g!==null&&(g=g.stores,g!==null))for(var b=0;b<g.length;b++){var E=g[b],P=E.getSnapshot;E=E.value;try{if(!ka(P(),E))return!1}catch{return!1}}}if(g=l.child,l.subtreeFlags&16384&&g!==null)g.return=l,l=g;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Hr(o,l){for(l&=~yd,l&=~Uc,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var g=31-zr(l),b=1<<g;o[g]=-1,l&=~b}}function oi(o){if((It&6)!==0)throw Error(d(327));Rn();var l=Jl(o,0);if((l&1)===0)return Xn(o,Yn()),null;var g=So(o,l);if(o.tag!==0&&g===2){var b=Gu(o);b!==0&&(l=b,g=bo(o,b))}if(g===1)throw g=pl,js(o,0),Hr(o,l),Xn(o,Yn()),g;if(g===6)throw Error(d(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,Gs(o,jr,si),Xn(o,Yn()),null}function li(o){br!==null&&br.tag===0&&(It&6)===0&&Rn();var l=It;It|=1;var g=Nn.transition,b=$t;try{if(Nn.transition=null,$t=1,o)return o()}finally{$t=b,Nn.transition=g,It=l,(It&6)===0&&$a()}}function bd(){ia=Is.current,An(Is)}function js(o,l){o.finishedWork=null,o.finishedLanes=0;var g=o.timeoutHandle;if(g!==ut&&(o.timeoutHandle=ut,lt(g)),In!==null)for(g=In.return;g!==null;){var b=g;switch(Ku(b),b.tag){case 1:b=b.type.childContextTypes,b!=null&&ao();break;case 3:Qi(),An(Mr),An(Ar),il();break;case 5:Ba(b);break;case 4:Qi();break;case 13:An(rn);break;case 19:An(rn);break;case 10:lc(b.type._context);break;case 22:case 23:bd()}g=g.return}if(Jn=o,In=o=Ei(o.current,null),ir=ia=l,On=0,pl=null,yd=Uc=Os=0,jr=Al=null,Xi!==null){for(l=0;l<Xi.length;l++)if(g=Xi[l],b=g.interleaved,b!==null){g.interleaved=null;var E=b.next,P=g.pending;if(P!==null){var Q=P.next;P.next=E,b.next=Q}g.pending=b}Xi=null}return o}function hh(o,l){do{var g=In;try{if(oc(),mr.current=ho,bi){for(var b=mn.memoizedState;b!==null;){var E=b.queue;E!==null&&(E.pending=null),b=b.next}bi=!1}if(gr=0,Hn=Sn=mn=null,Yi=!1,Fr=0,Zi.current=null,g===null||g.return===null){On=1,pl=l,In=null;break}e:{var P=o,Q=g.return,fe=g,Ee=l;if(l=ir,fe.flags|=32768,Ee!==null&&typeof Ee=="object"&&typeof Ee.then=="function"){var Ge=Ee,Je=fe,wt=Je.tag;if((Je.mode&1)===0&&(wt===0||wt===11||wt===15)){var nt=Je.alternate;nt?(Je.updateQueue=nt.updateQueue,Je.memoizedState=nt.memoizedState,Je.lanes=nt.lanes):(Je.updateQueue=null,Je.memoizedState=null)}var vn=dn(Q);if(vn!==null){vn.flags&=-257,ll(vn,Q,fe,P,l),vn.mode&1&&$f(P,Ge,l),l=vn,Ee=Ge;var Bt=l.updateQueue;if(Bt===null){var Vt=new Set;Vt.add(Ee),l.updateQueue=Vt}else Bt.add(Ee);break e}else{if((l&1)===0){$f(P,Ge,l),Wc();break e}Ee=Error(d(426))}}else if(bn&&fe.mode&1){var Ri=dn(Q);if(Ri!==null){(Ri.flags&65536)===0&&(Ri.flags|=256),ll(Ri,Q,fe,P,l),$u(Ns(Ee,fe));break e}}P=Ee=Ns(Ee,fe),On!==4&&(On=2),Al===null?Al=[P]:Al.push(P),P=Q;do{switch(P.tag){case 3:P.flags|=65536,l&=-l,P.lanes|=l;var Se=qi(P,Ee,l);Vf(P,Se);break e;case 1:fe=Ee;var de=P.type,De=P.stateNode;if((P.flags&128)===0&&(typeof de.getDerivedStateFromError=="function"||De!==null&&typeof De.componentDidCatch=="function"&&($i===null||!$i.has(De)))){P.flags|=65536,l&=-l,P.lanes|=l;var Ze=Ir(P,fe,l);Vf(P,Ze);break e}}P=P.return}while(P!==null)}ph(g)}catch(At){l=At,In===g&&g!==null&&(In=g=g.return);continue}break}while(!0)}function es(){var o=Ji.current;return Ji.current=ho,o===null?ho:o}function Wc(){(On===0||On===3||On===2)&&(On=4),Jn===null||(Os&268435455)===0&&(Uc&268435455)===0||Hr(Jn,ir)}function So(o,l){var g=It;It|=2;var b=es();(Jn!==o||ir!==l)&&(si=null,js(o,l));do try{Qc();break}catch(E){hh(o,E)}while(!0);if(oc(),It=g,Ji.current=b,In!==null)throw Error(d(261));return Jn=null,ir=0,On}function Qc(){for(;In!==null;)Yc(In)}function UA(){for(;In!==null&&!LA();)Yc(In)}function Yc(o){var l=mh(o.alternate,o,ia);o.memoizedProps=o.pendingProps,l===null?ph(o):In=l,Zi.current=null}function ph(o){var l=o;do{var g=l.alternate;if(o=l.return,(l.flags&32768)===0){if(g=hd(g,l,ia),g!==null){In=g;return}}else{if(g=IA(g,l),g!==null){g.flags&=32767,In=g;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{On=6,In=null;return}}if(l=l.sibling,l!==null){In=l;return}In=l=o}while(l!==null);On===0&&(On=5)}function Gs(o,l,g){var b=$t,E=Nn.transition;try{Nn.transition=null,$t=1,Hs(o,l,g,b)}finally{Nn.transition=E,$t=b}return null}function Hs(o,l,g,b){do Rn();while(br!==null);if((It&6)!==0)throw Error(d(327));g=o.finishedWork;var E=o.finishedLanes;if(g===null)return null;if(o.finishedWork=null,o.finishedLanes=0,g===o.current)throw Error(d(177));o.callbackNode=null,o.callbackPriority=0;var P=g.lanes|g.childLanes;if(DA(o,P),o===Jn&&(In=Jn=null,ir=0),(g.subtreeFlags&2064)===0&&(g.flags&2064)===0||xr||(xr=!0,gh(Qu,function(){return Rn(),null})),P=(g.flags&15990)!==0,(g.subtreeFlags&15990)!==0||P){P=Nn.transition,Nn.transition=null;var Q=$t;$t=1;var fe=It;It|=4,Zi.current=null,dl(o,g),zs(g,o),ie(o.containerInfo),o.current=g,OA(g),kA(),It=fe,$t=Q,Nn.transition=P}else o.current=g;if(xr&&(xr=!1,br=o,xo=E),P=o.pendingLanes,P===0&&($i=null),BA(g.stateNode),Xn(o,Yn()),l!==null)for(b=o.onRecoverableError,g=0;g<l.length;g++)E=l[g],b(E.value,{componentStack:E.stack,digest:E.digest});if(Gc)throw Gc=!1,o=ml,ml=null,o;return(xo&1)!==0&&o.tag!==0&&Rn(),P=o.pendingLanes,(P&1)!==0?o===Hc?Us++:(Us=0,Hc=o):Us=0,$a(),null}function Rn(){if(br!==null){var o=Ff(xo),l=Nn.transition,g=$t;try{if(Nn.transition=null,$t=16>o?16:o,br===null)var b=!1;else{if(o=br,br=null,xo=0,(It&6)!==0)throw Error(d(331));var E=It;for(It|=4,$e=o.current;$e!==null;){var P=$e,Q=P.child;if(($e.flags&16)!==0){var fe=P.deletions;if(fe!==null){for(var Ee=0;Ee<fe.length;Ee++){var Ge=fe[Ee];for($e=Ge;$e!==null;){var Je=$e;switch(Je.tag){case 0:case 11:case 15:Er(8,Je,P)}var wt=Je.child;if(wt!==null)wt.return=Je,$e=wt;else for(;$e!==null;){Je=$e;var nt=Je.sibling,vn=Je.return;if(lh(Je),Je===Ge){$e=null;break}if(nt!==null){nt.return=vn,$e=nt;break}$e=vn}}}var Bt=P.alternate;if(Bt!==null){var Vt=Bt.child;if(Vt!==null){Bt.child=null;do{var Ri=Vt.sibling;Vt.sibling=null,Vt=Ri}while(Vt!==null)}}$e=P}}if((P.subtreeFlags&2064)!==0&&Q!==null)Q.return=P,$e=Q;else e:for(;$e!==null;){if(P=$e,(P.flags&2048)!==0)switch(P.tag){case 0:case 11:case 15:Er(9,P,P.return)}var Se=P.sibling;if(Se!==null){Se.return=P.return,$e=Se;break e}$e=P.return}}var de=o.current;for($e=de;$e!==null;){Q=$e;var De=Q.child;if((Q.subtreeFlags&2064)!==0&&De!==null)De.return=Q,$e=De;else e:for(Q=de;$e!==null;){if(fe=$e,(fe.flags&2048)!==0)try{switch(fe.tag){case 0:case 11:case 15:kn(9,fe)}}catch(At){Yt(fe,fe.return,At)}if(fe===Q){$e=null;break e}var Ze=fe.sibling;if(Ze!==null){Ze.return=fe.return,$e=Ze;break e}$e=fe.return}}if(It=E,$a(),La&&typeof La.onPostCommitFiberRoot=="function")try{La.onPostCommitFiberRoot(Zl,o)}catch{}b=!0}return b}finally{$t=g,Nn.transition=l}}return!1}function sa(o,l,g){l=Ns(g,l),l=qi(o,l,1),o=Wi(o,l,1),l=gn(),o!==null&&($o(o,1,l),Xn(o,l))}function Yt(o,l,g){if(o.tag===3)sa(o,o,g);else for(;l!==null;){if(l.tag===3){sa(l,o,g);break}else if(l.tag===1){var b=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&($i===null||!$i.has(b))){o=Ns(g,o),o=Ir(l,o,1),l=Wi(l,o,1),o=gn(),l!==null&&($o(l,1,o),Xn(l,o));break}}l=l.return}}function ts(o,l,g){var b=o.pingCache;b!==null&&b.delete(l),l=gn(),o.pingedLanes|=o.suspendedLanes&g,Jn===o&&(ir&g)===g&&(On===4||On===3&&(ir&130023424)===ir&&500>Yn()-jc?js(o,0):yd|=g),Xn(o,l)}function _i(o,l){l===0&&((o.mode&1)===0?l=1:(l=Kl,Kl<<=1,(Kl&130023424)===0&&(Kl=4194304)));var g=gn();o=ma(o,l),o!==null&&($o(o,l,g),Xn(o,g))}function jA(o){var l=o.memoizedState,g=0;l!==null&&(g=l.retryLane),_i(o,g)}function Ah(o,l){var g=0;switch(o.tag){case 13:var b=o.stateNode,E=o.memoizedState;E!==null&&(g=E.retryLane);break;case 19:b=o.stateNode;break;default:throw Error(d(314))}b!==null&&b.delete(l),_i(o,g)}var mh;mh=function(o,l,g){if(o!==null)if(o.memoizedProps!==l.pendingProps||Mr.current)qn=!0;else{if((o.lanes&g)===0&&(l.flags&128)===0)return qn=!1,Pt(o,l,g);qn=(o.flags&131072)!==0}else qn=!1,bn&&(l.flags&1048576)!==0&&tl(l,ec,l.index);switch(l.lanes=0,l.tag){case 2:var b=l.type;vr(o,l),o=l.pendingProps;var E=xs(l,Ar.current);_s(l,g),E=hc(null,l,b,o,E,g);var P=uo();return l.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Cr(b)?(P=!0,Yl(l)):P=!1,l.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,ni(l),E.updater=Si,l.stateNode=E,E._reactInternals=l,sl(l,b,o,g),l=Dc(null,l,b,!0,P,g)):(l.tag=0,bn&&P&&qu(l),Kn(null,l,E,g),l=l.child),l;case 16:b=l.elementType;e:{switch(vr(o,l),o=l.pendingProps,E=b._init,b=E(b._payload),l.type=b,E=l.tag=Sd(b),o=na(b,o),E){case 0:l=cd(null,l,b,o,g);break e;case 1:l=Rc(null,l,b,o,g);break e;case 11:l=eh(null,l,b,o,g);break e;case 14:l=th(null,l,b,na(b.type,o),g);break e}throw Error(d(306,b,""))}return l;case 0:return b=l.type,E=l.pendingProps,E=l.elementType===b?E:na(b,E),cd(o,l,b,E,g);case 1:return b=l.type,E=l.pendingProps,E=l.elementType===b?E:na(b,E),Rc(o,l,b,E,g);case 3:e:{if(ah(l),o===null)throw Error(d(387));b=l.pendingProps,P=l.memoizedState,E=P.element,uc(o,l),lo(l,b,null,g);var Q=l.memoizedState;if(b=Q.element,he&&P.isDehydrated)if(P={element:b,isDehydrated:!1,cache:Q.cache,pendingSuspenseBoundaries:Q.pendingSuspenseBoundaries,transitions:Q.transitions},l.updateQueue.baseState=P,l.memoizedState=P,l.flags&256){E=Ns(Error(d(423)),l),l=ih(o,l,b,g,E);break e}else if(b!==E){E=Ns(Error(d(424)),l),l=ih(o,l,b,g,E);break e}else for(he&&(Aa=Mu(l.stateNode.containerInfo),Jr=l,bn=!0,Pa=null,nl=!1),g=Qf(l,null,b,g),l.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(io(),b===E){l=Or(o,l,g);break e}Kn(o,l,b,g)}l=l.child}return l;case 5:return al(l),o===null&&Zu(l),b=l.type,E=l.pendingProps,P=o!==null?o.memoizedProps:null,Q=E.children,Re(b,E)?Q=null:P!==null&&Re(b,P)&&(l.flags|=32),Tc(o,l),Kn(o,l,Q,g),l.child;case 6:return o===null&&Zu(l),null;case 13:return dd(o,l,g);case 4:return ta(l,l.stateNode.containerInfo),b=l.pendingProps,o===null?l.child=so(l,null,b,g):Kn(o,l,b,g),l.child;case 11:return b=l.type,E=l.pendingProps,E=l.elementType===b?E:na(b,E),eh(o,l,b,E,g);case 7:return Kn(o,l,l.pendingProps,g),l.child;case 8:return Kn(o,l,l.pendingProps.children,g),l.child;case 12:return Kn(o,l,l.pendingProps.children,g),l.child;case 10:e:{if(b=l.type._context,E=l.pendingProps,P=l.memoizedProps,Q=E.value,ed(l,b,Q),P!==null)if(ka(P.value,Q)){if(P.children===E.children&&!Mr.current){l=Or(o,l,g);break e}}else for(P=l.child,P!==null&&(P.return=l);P!==null;){var fe=P.dependencies;if(fe!==null){Q=P.child;for(var Ee=fe.firstContext;Ee!==null;){if(Ee.context===b){if(P.tag===1){Ee=ga(-1,g&-g),Ee.tag=2;var Ge=P.updateQueue;if(Ge!==null){Ge=Ge.shared;var Je=Ge.pending;Je===null?Ee.next=Ee:(Ee.next=Je.next,Je.next=Ee),Ge.pending=Ee}}P.lanes|=g,Ee=P.alternate,Ee!==null&&(Ee.lanes|=g),cc(P.return,g,l),fe.lanes|=g;break}Ee=Ee.next}}else if(P.tag===10)Q=P.type===l.type?null:P.child;else if(P.tag===18){if(Q=P.return,Q===null)throw Error(d(341));Q.lanes|=g,fe=Q.alternate,fe!==null&&(fe.lanes|=g),cc(Q,g,l),Q=P.sibling}else Q=P.child;if(Q!==null)Q.return=P;else for(Q=P;Q!==null;){if(Q===l){Q=null;break}if(P=Q.sibling,P!==null){P.return=Q.return,Q=P;break}Q=Q.return}P=Q}Kn(o,l,E.children,g),l=l.child}return l;case 9:return E=l.type,b=l.pendingProps.children,_s(l,g),E=Zr(E),b=b(E),l.flags|=1,Kn(o,l,b,g),l.child;case 14:return b=l.type,E=na(b,l.pendingProps),E=na(b.type,E),th(o,l,b,E,g);case 15:return nh(o,l,l.type,l.pendingProps,g);case 17:return b=l.type,E=l.pendingProps,E=l.elementType===b?E:na(b,E),vr(o,l),l.tag=1,Cr(b)?(o=!0,Yl(l)):o=!1,_s(l,g),wc(l,b,E),sl(l,b,E,g),Dc(null,l,b,!0,o,g);case 19:return Nc(o,l,g);case 22:return rh(o,l,g)}throw Error(d(156,l.tag))};function gh(o,l){return Xu(o,l)}function GA(o,l,g,b){this.tag=o,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oa(o,l,g,b){return new GA(o,l,g,b)}function Vc(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Sd(o){if(typeof o=="function")return Vc(o)?1:0;if(o!=null){if(o=o.$$typeof,o===T)return 11;if(o===N)return 14}return 2}function Ei(o,l){var g=o.alternate;return g===null?(g=oa(o.tag,l,o.key,o.mode),g.elementType=o.elementType,g.type=o.type,g.stateNode=o.stateNode,g.alternate=o,o.alternate=g):(g.pendingProps=l,g.type=o.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=o.flags&14680064,g.childLanes=o.childLanes,g.lanes=o.lanes,g.child=o.child,g.memoizedProps=o.memoizedProps,g.memoizedState=o.memoizedState,g.updateQueue=o.updateQueue,l=o.dependencies,g.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},g.sibling=o.sibling,g.index=o.index,g.ref=o.ref,g}function yl(o,l,g,b,E,P){var Q=2;if(b=o,typeof o=="function")Vc(o)&&(Q=1);else if(typeof o=="string")Q=5;else e:switch(o){case A:return Ti(g.children,E,P,l);case y:Q=8,E|=8;break;case x:return o=oa(12,g,l,E|2),o.elementType=x,o.lanes=P,o;case R:return o=oa(13,g,l,E),o.elementType=R,o.lanes=P,o;case D:return o=oa(19,g,l,E),o.elementType=D,o.lanes=P,o;case O:return wo(g,E,P,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case S:Q=10;break e;case w:Q=9;break e;case T:Q=11;break e;case N:Q=14;break e;case M:Q=16,b=null;break e}throw Error(d(130,o==null?o:typeof o,""))}return l=oa(Q,g,l,E),l.elementType=o,l.type=b,l.lanes=P,l}function Ti(o,l,g,b){return o=oa(7,o,b,l),o.lanes=g,o}function wo(o,l,g,b){return o=oa(22,o,b,l),o.elementType=O,o.lanes=g,o.stateNode={isHidden:!1},o}function xl(o,l,g){return o=oa(6,o,null,l),o.lanes=g,o}function wd(o,l,g){return l=oa(4,o.children!==null?o.children:[],o.key,l),l.lanes=g,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function HA(o,l,g,b,E){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ut,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hu(0),this.expirationTimes=Hu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hu(0),this.identifierPrefix=b,this.onRecoverableError=E,he&&(this.mutableSourceEagerHydrationData=null)}function vh(o,l,g,b,E,P,Q,fe,Ee){return o=new HA(o,l,g,fe,Ee),l===1?(l=1,P===!0&&(l|=8)):l=0,P=oa(3,null,null,l),o.current=P,P.stateNode=o,P.memoizedState={element:b,isDehydrated:g,cache:null,transitions:null,pendingSuspenseBoundaries:null},ni(P),o}function yh(o){if(!o)return ji;o=o._reactInternals;e:{if(W(o)!==o||o.tag!==1)throw Error(d(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Cr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(d(171))}if(o.tag===1){var g=o.type;if(Cr(g))return ju(o,g,l)}return l}function Cd(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(d(188)):(o=Object.keys(o).join(","),Error(d(268,o)));return o=X(l),o===null?null:o.stateNode}function bl(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var g=o.retryLane;o.retryLane=g!==0&&g<l?g:l}}function qc(o,l){bl(o,l),(o=o.alternate)&&bl(o,l)}function xh(o){return o=X(o),o===null?null:o.stateNode}function Co(){return null}return n.attemptContinuousHydration=function(o){if(o.tag===13){var l=ma(o,134217728);if(l!==null){var g=gn();sr(l,o,134217728,g)}qc(o,134217728)}},n.attemptDiscreteHydration=function(o){if(o.tag===13){var l=ma(o,1);if(l!==null){var g=gn();sr(l,o,1,g)}qc(o,1)}},n.attemptHydrationAtCurrentPriority=function(o){if(o.tag===13){var l=Ci(o),g=ma(o,l);if(g!==null){var b=gn();sr(g,o,l,b)}qc(o,l)}},n.attemptSynchronousHydration=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var g=Zo(l.pendingLanes);g!==0&&(Ss(l,g|1),Xn(l,Yn()),(It&6)===0&&(yo(),$a()))}break;case 13:li(function(){var b=ma(o,1);if(b!==null){var E=gn();sr(b,o,1,E)}}),qc(o,1)}},n.batchedUpdates=function(o,l){var g=It;It|=1;try{return o(l)}finally{It=g,It===0&&(yo(),$l&&$a())}},n.createComponentSelector=function(o){return{$$typeof:aa,value:o}},n.createContainer=function(o,l,g,b,E,P,Q){return vh(o,l,!1,null,g,b,E,P,Q)},n.createHasPseudoClassSelector=function(o){return{$$typeof:Ur,value:o}},n.createHydrationContainer=function(o,l,g,b,E,P,Q,fe,Ee){return o=vh(g,b,!0,o,E,P,Q,fe,Ee),o.context=yh(null),g=o.current,b=gn(),E=Ci(g),P=ga(b,E),P.callback=l??null,Wi(g,P,E),o.current.lanes=E,$o(o,E,b),Xn(o,b),o},n.createPortal=function(o,l,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:""+b,children:o,containerInfo:l,implementation:g}},n.createRoleSelector=function(o){return{$$typeof:Fc,value:o}},n.createTestNameSelector=function(o){return{$$typeof:Ic,value:o}},n.createTextSelector=function(o){return{$$typeof:Oc,value:o}},n.deferredUpdates=function(o){var l=$t,g=Nn.transition;try{return Nn.transition=null,$t=16,o()}finally{$t=l,Nn.transition=g}},n.discreteUpdates=function(o,l,g,b,E){var P=$t,Q=Nn.transition;try{return Nn.transition=null,$t=1,o(l,g,b,E)}finally{$t=P,Nn.transition=Q,It===0&&yo()}},n.findAllNodes=vd,n.findBoundingRects=function(o,l){if(!be)throw Error(d(363));l=vd(o,l),o=[];for(var g=0;g<l.length;g++)o.push(me(l[g]));for(l=o.length-1;0<l;l--){g=o[l];for(var b=g.x,E=b+g.width,P=g.y,Q=P+g.height,fe=l-1;0<=fe;fe--)if(l!==fe){var Ee=o[fe],Ge=Ee.x,Je=Ge+Ee.width,wt=Ee.y,nt=wt+Ee.height;if(b>=Ge&&P>=wt&&E<=Je&&Q<=nt){o.splice(l,1);break}else if(b!==Ge||g.width!==Ee.width||nt<P||wt>Q){if(!(P!==wt||g.height!==Ee.height||Je<b||Ge>E)){Ge>b&&(Ee.width+=Ge-b,Ee.x=b),Je<E&&(Ee.width=E-Ge),o.splice(l,1);break}}else{wt>P&&(Ee.height+=wt-P,Ee.y=P),nt<Q&&(Ee.height=Q-wt),o.splice(l,1);break}}}return o},n.findHostInstance=Cd,n.findHostInstanceWithNoPortals=function(o){return o=ge(o),o=o!==null?L(o):null,o===null?null:o.stateNode},n.findHostInstanceWithWarning=function(o){return Cd(o)},n.flushControlled=function(o){var l=It;It|=1;var g=Nn.transition,b=$t;try{Nn.transition=null,$t=1,o()}finally{$t=b,Nn.transition=g,It=l,It===0&&(yo(),$a())}},n.flushPassiveEffects=Rn,n.flushSync=li,n.focusWithin=function(o,l){if(!be)throw Error(d(363));for(o=md(o),l=dh(o,l),l=Array.from(l),o=0;o<l.length;){var g=l[o++];if(!Qe(g)){if(g.tag===5&&dt(g.stateNode))return!0;for(g=g.child;g!==null;)l.push(g),g=g.sibling}}return!1},n.getCurrentUpdatePriority=function(){return $t},n.getFindAllNodesFailureDescription=function(o,l){if(!be)throw Error(d(363));var g=0,b=[];o=[md(o),0];for(var E=0;E<o.length;){var P=o[E++],Q=o[E++],fe=l[Q];if((P.tag!==5||!Qe(P))&&(Fn(P,fe)&&(b.push(gd(fe)),Q++,Q>g&&(g=Q)),Q<l.length))for(P=P.child;P!==null;)o.push(P,Q),P=P.sibling}if(g<l.length){for(o=[];g<l.length;g++)o.push(gd(l[g]));return`findAllNodes was able to match part of the selector:
358
+ `+P.stack}return{value:o,source:l,stack:E,digest:null}}function Ps(o,l,g){return{value:o,source:null,stack:g??null,digest:l??null}}function _c(o,l){try{console.error(l.value)}catch(g){setTimeout(function(){throw g})}}var ol=typeof WeakMap=="function"?WeakMap:Map;function qi(o,l,g){g=ga(-1,g),g.tag=3,g.payload={element:null};var b=l.value;return g.callback=function(){Gc||(Gc=!0,ml=b),_c(o,l)},g}function Ir(o,l,g){g=ga(-1,g),g.tag=3;var b=o.type.getDerivedStateFromError;if(typeof b=="function"){var E=l.value;g.payload=function(){return b(E)},g.callback=function(){_c(o,l)}}var P=o.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(g.callback=function(){_c(o,l),typeof b!="function"&&($i===null?$i=new Set([this]):$i.add(this));var Q=l.stack;this.componentDidCatch(l.value,{componentStack:Q!==null?Q:""})}),g}function $f(o,l,g){var b=o.pingCache;if(b===null){b=o.pingCache=new ol;var E=new Set;b.set(l,E)}else E=b.get(l),E===void 0&&(E=new Set,b.set(l,E));E.has(g)||(E.add(g),o=ts.bind(null,o,l,g),l.then(o,o))}function dn(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function ll(o,l,g,b,E){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,g.flags|=131072,g.flags&=-52805,g.tag===1&&(g.alternate===null?g.tag=17:(l=ga(-1,1),l.tag=2,Wi(g,l,1))),g.lanes|=1),o):(o.flags|=65536,o.lanes=E,o)}var Ec=h.ReactCurrentOwner,qn=!1;function Kn(o,l,g,b){l.child=o===null?Qf(l,null,g,b):so(l,o.child,g,b)}function eh(o,l,g,b,E){g=g.render;var P=l.ref;return _s(l,E),b=hc(o,l,g,b,P,E),g=uo(),o!==null&&!qn?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~E,Or(o,l,E)):(bn&&g&&qu(l),l.flags|=1,Kn(o,l,b,E),l.child)}function th(o,l,g,b,E){if(o===null){var P=g.type;return typeof P=="function"&&!Vc(P)&&P.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(l.tag=15,l.type=P,nh(o,l,P,b,E)):(o=yl(g.type,null,b,l,l.mode,E),o.ref=l.ref,o.return=l,l.child=o)}if(P=o.child,(o.lanes&E)===0){var Q=P.memoizedProps;if(g=g.compare,g=g!==null?g:nc,g(Q,b)&&o.ref===l.ref)return Or(o,l,E)}return l.flags|=1,o=Ei(P,b),o.ref=l.ref,o.return=l,l.child=o}function nh(o,l,g,b,E){if(o!==null){var P=o.memoizedProps;if(nc(P,b)&&o.ref===l.ref)if(qn=!1,l.pendingProps=b=P,(o.lanes&E)!==0)(o.flags&131072)!==0&&(qn=!0);else return l.lanes=o.lanes,Or(o,l,E)}return cd(o,l,g,b,E)}function rh(o,l,g){var b=l.pendingProps,E=b.children,P=o!==null?o.memoizedState:null;if(b.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},hn(Is,ia),ia|=g;else{if((g&1073741824)===0)return o=P!==null?P.baseLanes|g:g,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,hn(Is,ia),ia|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=P!==null?P.baseLanes:g,hn(Is,ia),ia|=b}else P!==null?(b=P.baseLanes|g,l.memoizedState=null):b=g,hn(Is,ia),ia|=b;return Kn(o,l,E,g),l.child}function Tc(o,l){var g=l.ref;(o===null&&g!==null||o!==null&&o.ref!==g)&&(l.flags|=512,l.flags|=2097152)}function cd(o,l,g,b,E){var P=Cr(g)?vi:Ar.current;return P=xs(l,P),_s(l,E),g=hc(o,l,g,b,P,E),b=uo(),o!==null&&!qn?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~E,Or(o,l,E)):(bn&&b&&qu(l),l.flags|=1,Kn(o,l,g,E),l.child)}function Rc(o,l,g,b,E){if(Cr(g)){var P=!0;Yl(l)}else P=!1;if(_s(l,E),l.stateNode===null)vr(o,l),wc(l,g,b),sl(l,g,b,E),b=!0;else if(o===null){var Q=l.stateNode,fe=l.memoizedProps;Q.props=fe;var Ee=Q.context,Ge=g.contextType;typeof Ge=="object"&&Ge!==null?Ge=Zr(Ge):(Ge=Cr(g)?vi:Ar.current,Ge=xs(l,Ge));var Je=g.getDerivedStateFromProps,wt=typeof Je=="function"||typeof Q.getSnapshotBeforeUpdate=="function";wt||typeof Q.UNSAFE_componentWillReceiveProps!="function"&&typeof Q.componentWillReceiveProps!="function"||(fe!==b||Ee!==Ge)&&Cc(l,Q,b,Ge),ti=!1;var nt=l.memoizedState;Q.state=nt,lo(l,b,Q,E),Ee=l.memoizedState,fe!==b||nt!==Ee||Mr.current||ti?(typeof Je=="function"&&(po(l,g,Je,b),Ee=l.memoizedState),(fe=ti||Sc(l,g,fe,b,nt,Ee,Ge))?(wt||typeof Q.UNSAFE_componentWillMount!="function"&&typeof Q.componentWillMount!="function"||(typeof Q.componentWillMount=="function"&&Q.componentWillMount(),typeof Q.UNSAFE_componentWillMount=="function"&&Q.UNSAFE_componentWillMount()),typeof Q.componentDidMount=="function"&&(l.flags|=4194308)):(typeof Q.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=b,l.memoizedState=Ee),Q.props=b,Q.state=Ee,Q.context=Ge,b=fe):(typeof Q.componentDidMount=="function"&&(l.flags|=4194308),b=!1)}else{Q=l.stateNode,uc(o,l),fe=l.memoizedProps,Ge=l.type===l.elementType?fe:na(l.type,fe),Q.props=Ge,wt=l.pendingProps,nt=Q.context,Ee=g.contextType,typeof Ee=="object"&&Ee!==null?Ee=Zr(Ee):(Ee=Cr(g)?vi:Ar.current,Ee=xs(l,Ee));var vn=g.getDerivedStateFromProps;(Je=typeof vn=="function"||typeof Q.getSnapshotBeforeUpdate=="function")||typeof Q.UNSAFE_componentWillReceiveProps!="function"&&typeof Q.componentWillReceiveProps!="function"||(fe!==wt||nt!==Ee)&&Cc(l,Q,b,Ee),ti=!1,nt=l.memoizedState,Q.state=nt,lo(l,b,Q,E);var Bt=l.memoizedState;fe!==wt||nt!==Bt||Mr.current||ti?(typeof vn=="function"&&(po(l,g,vn,b),Bt=l.memoizedState),(Ge=ti||Sc(l,g,Ge,b,nt,Bt,Ee)||!1)?(Je||typeof Q.UNSAFE_componentWillUpdate!="function"&&typeof Q.componentWillUpdate!="function"||(typeof Q.componentWillUpdate=="function"&&Q.componentWillUpdate(b,Bt,Ee),typeof Q.UNSAFE_componentWillUpdate=="function"&&Q.UNSAFE_componentWillUpdate(b,Bt,Ee)),typeof Q.componentDidUpdate=="function"&&(l.flags|=4),typeof Q.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof Q.componentDidUpdate!="function"||fe===o.memoizedProps&&nt===o.memoizedState||(l.flags|=4),typeof Q.getSnapshotBeforeUpdate!="function"||fe===o.memoizedProps&&nt===o.memoizedState||(l.flags|=1024),l.memoizedProps=b,l.memoizedState=Bt),Q.props=b,Q.state=Bt,Q.context=Ee,b=Ge):(typeof Q.componentDidUpdate!="function"||fe===o.memoizedProps&&nt===o.memoizedState||(l.flags|=4),typeof Q.getSnapshotBeforeUpdate!="function"||fe===o.memoizedProps&&nt===o.memoizedState||(l.flags|=1024),b=!1)}return Dc(o,l,g,b,P,E)}function Dc(o,l,g,b,E,P){Tc(o,l);var Q=(l.flags&128)!==0;if(!b&&!Q)return E&&Vl(l,g,!1),Or(o,l,P);b=l.stateNode,Ec.current=l;var fe=Q&&typeof g.getDerivedStateFromError!="function"?null:b.render();return l.flags|=1,o!==null&&Q?(l.child=so(l,o.child,null,P),l.child=so(l,null,fe,P)):Kn(o,l,fe,P),l.memoizedState=b.state,E&&Vl(l,g,!0),l.child}function ah(o){var l=o.stateNode;l.pendingContext?Uu(o,l.pendingContext,l.pendingContext!==l.context):l.context&&Uu(o,l.context,!1),ta(o,l.containerInfo)}function ih(o,l,g,b,E){return io(),$u(E),l.flags|=256,Kn(o,l,g,b),l.child}var Ao={dehydrated:null,treeContext:null,retryLane:0};function ud(o){return{baseLanes:o,cachePool:null,transitions:null}}function dd(o,l,g){var b=l.pendingProps,E=rn.current,P=!1,Q=(l.flags&128)!==0,fe;if((fe=Q)||(fe=o!==null&&o.memoizedState===null?!1:(E&2)!==0),fe?(P=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(E|=1),hn(rn,E&1),o===null)return Zu(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:tr(o)?l.lanes=8:l.lanes=1073741824,null):(Q=b.children,o=b.fallback,P?(b=l.mode,P=l.child,Q={mode:"hidden",children:Q},(b&1)===0&&P!==null?(P.childLanes=0,P.pendingProps=Q):P=wo(Q,b,0,null),o=Ti(o,b,g,null),P.return=l,o.return=l,P.sibling=o,l.child=P,l.child.memoizedState=ud(g),l.memoizedState=Ao,o):Lc(l,Q));if(E=o.memoizedState,E!==null&&(fe=E.dehydrated,fe!==null))return Bs(o,l,Q,b,fe,E,g);if(P){P=b.fallback,Q=l.mode,E=o.child,fe=E.sibling;var Ee={mode:"hidden",children:b.children};return(Q&1)===0&&l.child!==E?(b=l.child,b.childLanes=0,b.pendingProps=Ee,l.deletions=null):(b=Ei(E,Ee),b.subtreeFlags=E.subtreeFlags&14680064),fe!==null?P=Ei(fe,P):(P=Ti(P,Q,g,null),P.flags|=2),P.return=l,b.return=l,b.sibling=P,l.child=b,b=P,P=l.child,Q=o.child.memoizedState,Q=Q===null?ud(g):{baseLanes:Q.baseLanes|g,cachePool:null,transitions:Q.transitions},P.memoizedState=Q,P.childLanes=o.childLanes&~g,l.memoizedState=Ao,b}return P=o.child,o=P.sibling,b=Ei(P,{mode:"visible",children:b.children}),(l.mode&1)===0&&(b.lanes=g),b.return=l,b.sibling=null,o!==null&&(g=l.deletions,g===null?(l.deletions=[o],l.flags|=16):g.push(o)),l.child=b,l.memoizedState=null,b}function Lc(o,l){return l=wo({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function kc(o,l,g,b){return b!==null&&$u(b),so(l,o.child,null,g),o=Lc(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function Bs(o,l,g,b,E,P,Q){if(g)return l.flags&256?(l.flags&=-257,b=Ps(Error(d(422))),kc(o,l,Q,b)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(P=b.fallback,E=l.mode,b=wo({mode:"visible",children:b.children},E,0,null),P=Ti(P,E,Q,null),P.flags|=2,b.return=l,P.return=l,b.sibling=P,l.child=b,(l.mode&1)!==0&&so(l,o.child,null,Q),l.child.memoizedState=ud(Q),l.memoizedState=Ao,P);if((l.mode&1)===0)return kc(o,l,Q,null);if(tr(E))return b=Bu(E).digest,P=Error(d(419)),b=Ps(P,b,void 0),kc(o,l,Q,b);if(g=(Q&o.childLanes)!==0,qn||g){if(b=Jn,b!==null){switch(Q&-Q){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(b.suspendedLanes|Q))!==0?0:E,E!==0&&E!==P.retryLane&&(P.retryLane=E,ma(o,E),sr(b,o,E,-1))}return Wc(),b=Ps(Error(d(421))),kc(o,l,Q,b)}return qo(E)?(l.flags|=128,l.child=o.child,l=jA.bind(null,o),Bf(E,l),null):(o=P.treeContext,he&&(Aa=Ui(E),Jr=l,bn=!0,Pa=null,nl=!1,o!==null&&(ha[pa++]=Na,ha[pa++]=xi,ha[pa++]=Hi,Na=o.id,xi=o.overflow,Hi=l)),l=Lc(l,b.children),l.flags|=4096,l)}function mo(o,l,g){o.lanes|=l;var b=o.alternate;b!==null&&(b.lanes|=l),cc(o.return,l,g)}function wi(o,l,g,b,E){var P=o.memoizedState;P===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:b,tail:g,tailMode:E}:(P.isBackwards=l,P.rendering=null,P.renderingStartTime=0,P.last=b,P.tail=g,P.tailMode=E)}function Nc(o,l,g){var b=l.pendingProps,E=b.revealOrder,P=b.tail;if(Kn(o,l,b.children,g),b=rn.current,(b&2)!==0)b=b&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&mo(o,g,l);else if(o.tag===19)mo(o,g,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}b&=1}if(hn(rn,b),(l.mode&1)===0)l.memoizedState=null;else switch(E){case"forwards":for(g=l.child,E=null;g!==null;)o=g.alternate,o!==null&&jn(o)===null&&(E=g),g=g.sibling;g=E,g===null?(E=l.child,l.child=null):(E=g.sibling,g.sibling=null),wi(l,!1,E,g,P);break;case"backwards":for(g=null,E=l.child,l.child=null;E!==null;){if(o=E.alternate,o!==null&&jn(o)===null){l.child=E;break}o=E.sibling,E.sibling=g,g=E,E=o}wi(l,!0,g,null,P);break;case"together":wi(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function vr(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function Or(o,l,g){if(o!==null&&(l.dependencies=o.dependencies),Os|=l.lanes,(g&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(d(153));if(l.child!==null){for(o=l.child,g=Ei(o,o.pendingProps),l.child=g,g.return=l;o.sibling!==null;)o=o.sibling,g=g.sibling=Ei(o,o.pendingProps),g.return=l;g.sibling=null}return l.child}function Pt(o,l,g){switch(l.tag){case 3:ah(l),io();break;case 5:al(l);break;case 1:Cr(l.type)&&Yl(l);break;case 4:ta(l,l.stateNode.containerInfo);break;case 10:ed(l,l.type._context,l.memoizedProps.value);break;case 13:var b=l.memoizedState;if(b!==null)return b.dehydrated!==null?(hn(rn,rn.current&1),l.flags|=128,null):(g&l.child.childLanes)!==0?dd(o,l,g):(hn(rn,rn.current&1),o=Or(o,l,g),o!==null?o.sibling:null);hn(rn,rn.current&1);break;case 19:if(b=(g&l.childLanes)!==0,(o.flags&128)!==0){if(b)return Nc(o,l,g);l.flags|=128}var E=l.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),hn(rn,rn.current),b)break;return null;case 22:case 23:return l.lanes=0,rh(o,l,g)}return Or(o,l,g)}function ra(o){o.flags|=4}function fd(o,l){if(o!==null&&o.child===l.child)return!0;if((l.flags&16)!==0)return!1;for(o=l.child;o!==null;){if((o.flags&12854)!==0||(o.subtreeFlags&12854)!==0)return!1;o=o.sibling}return!0}var Pc,cl,go,Ki;if(je)Pc=function(o,l){for(var g=l.child;g!==null;){if(g.tag===5||g.tag===6)K(o,g.stateNode);else if(g.tag!==4&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===l)break;for(;g.sibling===null;){if(g.return===null||g.return===l)return;g=g.return}g.sibling.return=g.return,g=g.sibling}},cl=function(){},go=function(o,l,g,b,E){if(o=o.memoizedProps,o!==b){var P=l.stateNode,Q=ea($r.current);g=xe(P,g,o,b,E,Q),(l.updateQueue=g)&&ra(l)}},Ki=function(o,l,g,b){g!==b&&ra(l)};else if(St){Pc=function(o,l,g,b){for(var E=l.child;E!==null;){if(E.tag===5){var P=E.stateNode;g&&b&&(P=mi(P,E.type,E.memoizedProps,E)),K(o,P)}else if(E.tag===6)P=E.stateNode,g&&b&&(P=Ja(P,E.memoizedProps,E)),K(o,P);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)P=E.child,P!==null&&(P.return=E),Pc(o,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===l)break;for(;E.sibling===null;){if(E.return===null||E.return===l)return;E=E.return}E.sibling.return=E.return,E=E.sibling}};var sh=function(o,l,g,b){for(var E=l.child;E!==null;){if(E.tag===5){var P=E.stateNode;g&&b&&(P=mi(P,E.type,E.memoizedProps,E)),Ka(o,P)}else if(E.tag===6)P=E.stateNode,g&&b&&(P=Ja(P,E.memoizedProps,E)),Ka(o,P);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)P=E.child,P!==null&&(P.return=E),sh(o,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===l)break;for(;E.sibling===null;){if(E.return===null||E.return===l)return;E=E.return}E.sibling.return=E.return,E=E.sibling}};cl=function(o,l){var g=l.stateNode;if(!fd(o,l)){o=g.containerInfo;var b=Qt(o);sh(b,l,!1,!1),g.pendingChildren=b,ra(l),ms(o,b)}},go=function(o,l,g,b,E){var P=o.stateNode,Q=o.memoizedProps;if((o=fd(o,l))&&Q===b)l.stateNode=P;else{var fe=l.stateNode,Ee=ea($r.current),Ge=null;Q!==b&&(Ge=xe(fe,g,Q,b,E,Ee)),o&&Ge===null?l.stateNode=P:(P=As(P,Ge,g,Q,b,l,o,fe),ve(P,g,b,E,Ee)&&ra(l),l.stateNode=P,o?ra(l):Pc(P,l,!1,!1))}},Ki=function(o,l,g,b){g!==b?(o=ea(Ts.current),g=ea($r.current),l.stateNode=Fe(b,o,g,l),ra(l)):l.stateNode=o.stateNode}}else cl=function(){},go=function(){},Ki=function(){};function vo(o,l){if(!bn)switch(o.tailMode){case"hidden":l=o.tail;for(var g=null;l!==null;)l.alternate!==null&&(g=l),l=l.sibling;g===null?o.tail=null:g.sibling=null;break;case"collapsed":g=o.tail;for(var b=null;g!==null;)g.alternate!==null&&(b=g),g=g.sibling;b===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:b.sibling=null}}function yr(o){var l=o.alternate!==null&&o.alternate.child===o.child,g=0,b=0;if(l)for(var E=o.child;E!==null;)g|=E.lanes|E.childLanes,b|=E.subtreeFlags&14680064,b|=E.flags&14680064,E.return=o,E=E.sibling;else for(E=o.child;E!==null;)g|=E.lanes|E.childLanes,b|=E.subtreeFlags,b|=E.flags,E.return=o,E=E.sibling;return o.subtreeFlags|=b,o.childLanes=g,l}function hd(o,l,g){var b=l.pendingProps;switch(Ku(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yr(l),null;case 1:return Cr(l.type)&&ao(),yr(l),null;case 3:return g=l.stateNode,Qi(),An(Mr),An(Ar),il(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(o===null||o.child===null)&&(tc(l)?ra(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Pa!==null&&(Gr(Pa),Pa=null))),cl(o,l),yr(l),null;case 5:Ba(l),g=ea(Ts.current);var E=l.type;if(o!==null&&l.stateNode!=null)go(o,l,E,b,g),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!b){if(l.stateNode===null)throw Error(d(166));return yr(l),null}if(o=ea($r.current),tc(l)){if(!he)throw Error(d(175));o=zu(l.stateNode,l.type,l.memoizedProps,g,o,l,!nl),l.updateQueue=o,o!==null&&ra(l)}else{var P=j(E,b,g,o,l);Pc(P,l,!1,!1),l.stateNode=P,ve(P,E,b,g,o)&&ra(l)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return yr(l),null;case 6:if(o&&l.stateNode!=null)Ki(o,l,o.memoizedProps,b);else{if(typeof b!="string"&&l.stateNode===null)throw Error(d(166));if(o=ea(Ts.current),g=ea($r.current),tc(l)){if(!he)throw Error(d(176));if(o=l.stateNode,g=l.memoizedProps,(b=Fu(o,g,l,!nl))&&(E=Jr,E!==null))switch(E.tag){case 3:_A(E.stateNode.containerInfo,o,g,(E.mode&1)!==0);break;case 5:Mf(E.type,E.memoizedProps,E.stateNode,o,g,(E.mode&1)!==0)}b&&ra(l)}else l.stateNode=Fe(b,o,g,l)}return yr(l),null;case 13:if(An(rn),b=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(bn&&Aa!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Hf(),io(),l.flags|=98560,E=!1;else if(E=tc(l),b!==null&&b.dehydrated!==null){if(o===null){if(!E)throw Error(d(318));if(!he)throw Error(d(344));if(E=l.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(d(317));Ko(E,l)}else io(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;yr(l),E=!1}else Pa!==null&&(Gr(Pa),Pa=null),E=!0;if(!E)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=g,l):(g=b!==null,g!==(o!==null&&o.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(rn.current&1)!==0?On===0&&(On=3):Wc())),l.updateQueue!==null&&(l.flags|=4),yr(l),null);case 4:return Qi(),cl(o,l),o===null&&ce(l.stateNode.containerInfo),yr(l),null;case 10:return lc(l.type._context),yr(l),null;case 17:return Cr(l.type)&&ao(),yr(l),null;case 19:if(An(rn),E=l.memoizedState,E===null)return yr(l),null;if(b=(l.flags&128)!==0,P=E.rendering,P===null)if(b)vo(E,!1);else{if(On!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(P=jn(o),P!==null){for(l.flags|=128,vo(E,!1),o=P.updateQueue,o!==null&&(l.updateQueue=o,l.flags|=4),l.subtreeFlags=0,o=g,g=l.child;g!==null;)b=g,E=o,b.flags&=14680066,P=b.alternate,P===null?(b.childLanes=0,b.lanes=E,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=P.childLanes,b.lanes=P.lanes,b.child=P.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=P.memoizedProps,b.memoizedState=P.memoizedState,b.updateQueue=P.updateQueue,b.type=P.type,E=P.dependencies,b.dependencies=E===null?null:{lanes:E.lanes,firstContext:E.firstContext}),g=g.sibling;return hn(rn,rn.current&1|2),l.child}o=o.sibling}E.tail!==null&&Yn()>xd&&(l.flags|=128,b=!0,vo(E,!1),l.lanes=4194304)}else{if(!b)if(o=jn(P),o!==null){if(l.flags|=128,b=!0,o=o.updateQueue,o!==null&&(l.updateQueue=o,l.flags|=4),vo(E,!0),E.tail===null&&E.tailMode==="hidden"&&!P.alternate&&!bn)return yr(l),null}else 2*Yn()-E.renderingStartTime>xd&&g!==1073741824&&(l.flags|=128,b=!0,vo(E,!1),l.lanes=4194304);E.isBackwards?(P.sibling=l.child,l.child=P):(o=E.last,o!==null?o.sibling=P:l.child=P,E.last=P)}return E.tail!==null?(l=E.tail,E.rendering=l,E.tail=l.sibling,E.renderingStartTime=Yn(),l.sibling=null,o=rn.current,hn(rn,b?o&1|2:o&1),l):(yr(l),null);case 22:case 23:return bd(),g=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(ia&1073741824)!==0&&(yr(l),je&&l.subtreeFlags&6&&(l.flags|=8192)):yr(l),null;case 24:return null;case 25:return null}throw Error(d(156,l.tag))}function IA(o,l){switch(Ku(l),l.tag){case 1:return Cr(l.type)&&ao(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Qi(),An(Mr),An(Ar),il(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Ba(l),null;case 13:if(An(rn),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(d(340));io()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return An(rn),null;case 4:return Qi(),null;case 10:return lc(l.type._context),null;case 22:case 23:return bd(),null;case 24:return null;default:return null}}var ul=!1,nr=!1,oh=typeof WeakSet=="function"?WeakSet:Set,$e=null;function ai(o,l){var g=o.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(b){Yt(o,l,b)}else g.current=null}function Ms(o,l,g){try{g()}catch(b){Yt(o,l,b)}}var Bc=!1;function dl(o,l){for(se(o.containerInfo),$e=l;$e!==null;)if(o=$e,l=o.child,(o.subtreeFlags&1028)!==0&&l!==null)l.return=o,$e=l;else for(;$e!==null;){o=$e;try{var g=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var b=g.memoizedProps,E=g.memoizedState,P=o.stateNode,Q=P.getSnapshotBeforeUpdate(o.elementType===o.type?b:na(o.type,b),E);P.__reactInternalSnapshotBeforeUpdate=Q}break;case 3:je&&Da(o.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(d(163))}}catch(fe){Yt(o,o.return,fe)}if(l=o.sibling,l!==null){l.return=o.return,$e=l;break}$e=o.return}return g=Bc,Bc=!1,g}function Er(o,l,g){var b=l.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var E=b=b.next;do{if((E.tag&o)===o){var P=E.destroy;E.destroy=void 0,P!==void 0&&Ms(l,g,P)}E=E.next}while(E!==b)}}function kn(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var g=l=l.next;do{if((g.tag&o)===o){var b=g.create;g.destroy=b()}g=g.next}while(g!==l)}}function pd(o){var l=o.ref;if(l!==null){var g=o.stateNode;switch(o.tag){case 5:o=le(g);break;default:o=g}typeof l=="function"?l(o):l.current=o}}function lh(o){var l=o.alternate;l!==null&&(o.alternate=null,lh(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&U(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function ch(o){return o.tag===5||o.tag===3||o.tag===4}function Ad(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||ch(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Mc(o,l,g){var b=o.tag;if(b===5||b===6)o=o.stateNode,l?pn(g,o,l):pr(g,o);else if(b!==4&&(o=o.child,o!==null))for(Mc(o,l,g),o=o.sibling;o!==null;)Mc(o,l,g),o=o.sibling}function zc(o,l,g){var b=o.tag;if(b===5||b===6)o=o.stateNode,l?et(g,o,l):zt(g,o);else if(b!==4&&(o=o.child,o!==null))for(zc(o,l,g),o=o.sibling;o!==null;)zc(o,l,g),o=o.sibling}var rr=null,Ua=!1;function ii(o,l,g){for(g=g.child;g!==null;)zn(o,l,g),g=g.sibling}function zn(o,l,g){if(La&&typeof La.onCommitFiberUnmount=="function")try{La.onCommitFiberUnmount(Zl,g)}catch{}switch(g.tag){case 5:nr||ai(g,l);case 6:if(je){var b=rr,E=Ua;rr=null,ii(o,l,g),rr=b,Ua=E,rr!==null&&(Ua?it(rr,g.stateNode):Wn(rr,g.stateNode))}else ii(o,l,g);break;case 18:je&&rr!==null&&(Ua?Xl(rr,g.stateNode):wA(rr,g.stateNode));break;case 4:je?(b=rr,E=Ua,rr=g.stateNode.containerInfo,Ua=!0,ii(o,l,g),rr=b,Ua=E):(St&&(b=g.stateNode.containerInfo,E=Qt(b),Oi(b,E)),ii(o,l,g));break;case 0:case 11:case 14:case 15:if(!nr&&(b=g.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){E=b=b.next;do{var P=E,Q=P.destroy;P=P.tag,Q!==void 0&&((P&2)!==0||(P&4)!==0)&&Ms(g,l,Q),E=E.next}while(E!==b)}ii(o,l,g);break;case 1:if(!nr&&(ai(g,l),b=g.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=g.memoizedProps,b.state=g.memoizedState,b.componentWillUnmount()}catch(fe){Yt(g,l,fe)}ii(o,l,g);break;case 21:ii(o,l,g);break;case 22:g.mode&1?(nr=(b=nr)||g.memoizedState!==null,ii(o,l,g),nr=b):ii(o,l,g);break;default:ii(o,l,g)}}function fl(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var g=o.stateNode;g===null&&(g=o.stateNode=new oh),l.forEach(function(b){var E=Ah.bind(null,o,b);g.has(b)||(g.add(b),b.then(E,E))})}}function ya(o,l){var g=l.deletions;if(g!==null)for(var b=0;b<g.length;b++){var E=g[b];try{var P=o,Q=l;if(je){var fe=Q;e:for(;fe!==null;){switch(fe.tag){case 5:rr=fe.stateNode,Ua=!1;break e;case 3:rr=fe.stateNode.containerInfo,Ua=!0;break e;case 4:rr=fe.stateNode.containerInfo,Ua=!0;break e}fe=fe.return}if(rr===null)throw Error(d(160));zn(P,Q,E),rr=null,Ua=!1}else zn(P,Q,E);var Ee=E.alternate;Ee!==null&&(Ee.return=null),E.return=null}catch(Ge){Yt(E,l,Ge)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)zs(l,o),l=l.sibling}function zs(o,l){var g=o.alternate,b=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(ya(l,o),ja(o),b&4){try{Er(3,o,o.return),kn(3,o)}catch(nt){Yt(o,o.return,nt)}try{Er(5,o,o.return)}catch(nt){Yt(o,o.return,nt)}}break;case 1:ya(l,o),ja(o),b&512&&g!==null&&ai(g,g.return);break;case 5:if(ya(l,o),ja(o),b&512&&g!==null&&ai(g,g.return),je){if(o.flags&32){var E=o.stateNode;try{st(E)}catch(nt){Yt(o,o.return,nt)}}if(b&4&&(E=o.stateNode,E!=null)){var P=o.memoizedProps;if(g=g!==null?g.memoizedProps:P,b=o.type,l=o.updateQueue,o.updateQueue=null,l!==null)try{Nt(E,l,b,g,P,o)}catch(nt){Yt(o,o.return,nt)}}}break;case 6:if(ya(l,o),ja(o),b&4&&je){if(o.stateNode===null)throw Error(d(162));E=o.stateNode,P=o.memoizedProps,g=g!==null?g.memoizedProps:P;try{qe(E,g,P)}catch(nt){Yt(o,o.return,nt)}}break;case 3:if(ya(l,o),ja(o),b&4){if(je&&he&&g!==null&&g.memoizedState.isDehydrated)try{ro(l.containerInfo)}catch(nt){Yt(o,o.return,nt)}if(St){E=l.containerInfo,P=l.pendingChildren;try{Oi(E,P)}catch(nt){Yt(o,o.return,nt)}}}break;case 4:if(ya(l,o),ja(o),b&4&&St){P=o.stateNode,E=P.containerInfo,P=P.pendingChildren;try{Oi(E,P)}catch(nt){Yt(o,o.return,nt)}}break;case 13:ya(l,o),ja(o),E=o.child,E.flags&8192&&(P=E.memoizedState!==null,E.stateNode.isHidden=P,!P||E.alternate!==null&&E.alternate.memoizedState!==null||(jc=Yn())),b&4&&fl(o);break;case 22:var Q=g!==null&&g.memoizedState!==null;if(o.mode&1?(nr=(g=nr)||Q,ya(l,o),nr=g):ya(l,o),ja(o),b&8192){if(g=o.memoizedState!==null,(o.stateNode.isHidden=g)&&!Q&&(o.mode&1)!==0)for($e=o,b=o.child;b!==null;){for(l=$e=b;$e!==null;){Q=$e;var fe=Q.child;switch(Q.tag){case 0:case 11:case 14:case 15:Er(4,Q,Q.return);break;case 1:ai(Q,Q.return);var Ee=Q.stateNode;if(typeof Ee.componentWillUnmount=="function"){var Ge=Q,Je=Q.return;try{var wt=Ge;Ee.props=wt.memoizedProps,Ee.state=wt.memoizedState,Ee.componentWillUnmount()}catch(nt){Yt(Ge,Je,nt)}}break;case 5:ai(Q,Q.return);break;case 22:if(Q.memoizedState!==null){ar(l);continue}}fe!==null?(fe.return=Q,$e=fe):ar(l)}b=b.sibling}if(je){e:if(b=null,je)for(l=o;;){if(l.tag===5){if(b===null){b=l;try{E=l.stateNode,g?En(E):Ut(l.stateNode,l.memoizedProps)}catch(nt){Yt(o,o.return,nt)}}}else if(l.tag===6){if(b===null)try{P=l.stateNode,g?un(P):Ra(P,l.memoizedProps)}catch(nt){Yt(o,o.return,nt)}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;b===l&&(b=null),l=l.return}b===l&&(b=null),l.sibling.return=l.return,l=l.sibling}}}break;case 19:ya(l,o),ja(o),b&4&&fl(o);break;case 21:break;default:ya(l,o),ja(o)}}function ja(o){var l=o.flags;if(l&2){try{if(je){e:{for(var g=o.return;g!==null;){if(ch(g)){var b=g;break e}g=g.return}throw Error(d(160))}switch(b.tag){case 5:var E=b.stateNode;b.flags&32&&(st(E),b.flags&=-33);var P=Ad(o);zc(o,P,E);break;case 3:case 4:var Q=b.stateNode.containerInfo,fe=Ad(o);Mc(o,fe,Q);break;default:throw Error(d(161))}}}catch(Ee){Yt(o,o.return,Ee)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function OA(o,l,g){$e=o,uh(o)}function uh(o,l,g){for(var b=(o.mode&1)!==0;$e!==null;){var E=$e,P=E.child;if(E.tag===22&&b){var Q=E.memoizedState!==null||ul;if(!Q){var fe=E.alternate,Ee=fe!==null&&fe.memoizedState!==null||nr;fe=ul;var Ge=nr;if(ul=Q,(nr=Ee)&&!Ge)for($e=E;$e!==null;)Q=$e,Ee=Q.child,Q.tag===22&&Q.memoizedState!==null?tt(E):Ee!==null?(Ee.return=Q,$e=Ee):tt(E);for(;P!==null;)$e=P,uh(P),P=P.sibling;$e=E,ul=fe,nr=Ge}Fs(o)}else(E.subtreeFlags&8772)!==0&&P!==null?(P.return=E,$e=P):Fs(o)}}function Fs(o){for(;$e!==null;){var l=$e;if((l.flags&8772)!==0){var g=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:nr||kn(5,l);break;case 1:var b=l.stateNode;if(l.flags&4&&!nr)if(g===null)b.componentDidMount();else{var E=l.elementType===l.type?g.memoizedProps:na(l.type,g.memoizedProps);b.componentDidUpdate(E,g.memoizedState,b.__reactInternalSnapshotBeforeUpdate)}var P=l.updateQueue;P!==null&&qf(l,P,b);break;case 3:var Q=l.updateQueue;if(Q!==null){if(g=null,l.child!==null)switch(l.child.tag){case 5:g=le(l.child.stateNode);break;case 1:g=l.child.stateNode}qf(l,Q,g)}break;case 5:var fe=l.stateNode;g===null&&l.flags&4&&ht(fe,l.type,l.memoizedProps,l);break;case 6:break;case 4:break;case 12:break;case 13:if(he&&l.memoizedState===null){var Ee=l.alternate;if(Ee!==null){var Ge=Ee.memoizedState;if(Ge!==null){var Je=Ge.dehydrated;Je!==null&&gi(Je)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(d(163))}nr||l.flags&512&&pd(l)}catch(wt){Yt(l,l.return,wt)}}if(l===o){$e=null;break}if(g=l.sibling,g!==null){g.return=l.return,$e=g;break}$e=l.return}}function ar(o){for(;$e!==null;){var l=$e;if(l===o){$e=null;break}var g=l.sibling;if(g!==null){g.return=l.return,$e=g;break}$e=l.return}}function tt(o){for(;$e!==null;){var l=$e;try{switch(l.tag){case 0:case 11:case 15:var g=l.return;try{kn(4,l)}catch(Ee){Yt(l,g,Ee)}break;case 1:var b=l.stateNode;if(typeof b.componentDidMount=="function"){var E=l.return;try{b.componentDidMount()}catch(Ee){Yt(l,E,Ee)}}var P=l.return;try{pd(l)}catch(Ee){Yt(l,P,Ee)}break;case 5:var Q=l.return;try{pd(l)}catch(Ee){Yt(l,Q,Ee)}}}catch(Ee){Yt(l,l.return,Ee)}if(l===o){$e=null;break}var fe=l.sibling;if(fe!==null){fe.return=l.return,$e=fe;break}$e=l.return}}var aa=0,Ur=1,Fc=2,Ic=3,Oc=4;if(typeof Symbol=="function"&&Symbol.for){var hl=Symbol.for;aa=hl("selector.component"),Ur=hl("selector.has_pseudo_class"),Fc=hl("selector.role"),Ic=hl("selector.test_id"),Oc=hl("selector.text")}function md(o){var l=k(o);if(l!=null){if(typeof l.memoizedProps["data-testname"]!="string")throw Error(d(364));return l}if(o=_e(o),o===null)throw Error(d(362));return o.stateNode.current}function Fn(o,l){switch(l.$$typeof){case aa:if(o.type===l.value)return!0;break;case Ur:e:{l=l.value,o=[o,0];for(var g=0;g<o.length;){var b=o[g++],E=o[g++],P=l[E];if(b.tag!==5||!Qe(b)){for(;P!=null&&Fn(b,P);)E++,P=l[E];if(E===l.length){l=!0;break e}else for(b=b.child;b!==null;)o.push(b,E),b=b.sibling}}l=!1}return l;case Fc:if(o.tag===5&&Oe(o.stateNode,l.value))return!0;break;case Oc:if((o.tag===5||o.tag===6)&&(o=ze(o),o!==null&&0<=o.indexOf(l.value)))return!0;break;case Ic:if(o.tag===5&&(o=o.memoizedProps["data-testname"],typeof o=="string"&&o.toLowerCase()===l.value.toLowerCase()))return!0;break;default:throw Error(d(365))}return!1}function gd(o){switch(o.$$typeof){case aa:return"<"+(J(o.value)||"Unknown")+">";case Ur:return":has("+(gd(o)||"")+")";case Fc:return'[role="'+o.value+'"]';case Oc:return'"'+o.value+'"';case Ic:return'[data-testname="'+o.value+'"]';default:throw Error(d(365))}}function dh(o,l){var g=[];o=[o,0];for(var b=0;b<o.length;){var E=o[b++],P=o[b++],Q=l[P];if(E.tag!==5||!Qe(E)){for(;Q!=null&&Fn(E,Q);)P++,Q=l[P];if(P===l.length)g.push(E);else for(E=E.child;E!==null;)o.push(E,P),E=E.sibling}}return g}function vd(o,l){if(!be)throw Error(d(363));o=md(o),o=dh(o,l),l=[],o=Array.from(o);for(var g=0;g<o.length;){var b=o[g++];if(b.tag===5)Qe(b)||l.push(b.stateNode);else for(b=b.child;b!==null;)o.push(b),b=b.sibling}return l}var fh=Math.ceil,Ji=h.ReactCurrentDispatcher,Zi=h.ReactCurrentOwner,Nn=h.ReactCurrentBatchConfig,It=0,Jn=null,In=null,ir=0,ia=0,Is=Za(0),On=0,pl=null,Os=0,Uc=0,yd=0,Al=null,jr=null,jc=0,xd=1/0,si=null;function yo(){xd=Yn()+500}var Gc=!1,ml=null,$i=null,xr=!1,br=null,xo=0,Us=0,Hc=null,Xc=-1,gl=0;function gn(){return(It&6)!==0?Yn():Xc!==-1?Xc:Xc=Yn()}function Ci(o){return(o.mode&1)===0?1:(It&2)!==0&&ir!==0?ir&-ir:zA.transition!==null?(gl===0&&(gl=bs()),gl):(o=$t,o!==0?o:ue())}function sr(o,l,g,b){if(50<Us)throw Us=0,Hc=null,Error(d(185));$o(o,g,b),((It&2)===0||o!==Jn)&&(o===Jn&&((It&2)===0&&(Uc|=g),On===4&&Hr(o,ir)),Xn(o,b),g===1&&It===0&&(l.mode&1)===0&&(yo(),$l&&$a()))}function Xn(o,l){var g=o.callbackNode;RA(o,l);var b=Jl(o,o===Jn?ir:0);if(b===0)g!==null&&If(g),o.callbackNode=null,o.callbackPriority=0;else if(l=b&-b,o.callbackPriority!==l){if(g!=null&&If(g),l===1)o.tag===0?Of(oi.bind(null,o)):Vu(oi.bind(null,o)),G?Z(function(){(It&6)===0&&$a()}):Xu(Wu,$a),g=null;else{switch(Ff(b)){case 1:g=Wu;break;case 4:g=NA;break;case 16:g=Qu;break;case 536870912:g=PA;break;default:g=Qu}g=gh(g,vl.bind(null,o))}o.callbackPriority=l,o.callbackNode=g}}function vl(o,l){if(Xc=-1,gl=0,(It&6)!==0)throw Error(d(327));var g=o.callbackNode;if(Rn()&&o.callbackNode!==g)return null;var b=Jl(o,o===Jn?ir:0);if(b===0)return null;if((b&30)!==0||(b&o.expiredLanes)!==0||l)l=So(o,b);else{l=b;var E=It;It|=2;var P=es();(Jn!==o||ir!==l)&&(si=null,yo(),js(o,l));do try{UA();break}catch(fe){hh(o,fe)}while(!0);oc(),Ji.current=P,It=E,In!==null?l=0:(Jn=null,ir=0,l=On)}if(l!==0){if(l===2&&(E=Gu(o),E!==0&&(b=E,l=bo(o,E))),l===1)throw g=pl,js(o,0),Hr(o,b),Xn(o,Yn()),g;if(l===6)Hr(o,b);else{if(E=o.current.alternate,(b&30)===0&&!xa(E)&&(l=So(o,b),l===2&&(P=Gu(o),P!==0&&(b=P,l=bo(o,P))),l===1))throw g=pl,js(o,0),Hr(o,b),Xn(o,Yn()),g;switch(o.finishedWork=E,o.finishedLanes=b,l){case 0:case 1:throw Error(d(345));case 2:Gs(o,jr,si);break;case 3:if(Hr(o,b),(b&130023424)===b&&(l=jc+500-Yn(),10<l)){if(Jl(o,0)!==0)break;if(E=o.suspendedLanes,(E&b)!==b){gn(),o.pingedLanes|=o.suspendedLanes&E;break}o.timeoutHandle=pt(Gs.bind(null,o,jr,si),l);break}Gs(o,jr,si);break;case 4:if(Hr(o,b),(b&4194240)===b)break;for(l=o.eventTimes,E=-1;0<b;){var Q=31-zr(b);P=1<<Q,Q=l[Q],Q>E&&(E=Q),b&=~P}if(b=E,b=Yn()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*fh(b/1960))-b,10<b){o.timeoutHandle=pt(Gs.bind(null,o,jr,si),b);break}Gs(o,jr,si);break;case 5:Gs(o,jr,si);break;default:throw Error(d(329))}}}return Xn(o,Yn()),o.callbackNode===g?vl.bind(null,o):null}function bo(o,l){var g=Al;return o.current.memoizedState.isDehydrated&&(js(o,l).flags|=256),o=So(o,l),o!==2&&(l=jr,jr=g,l!==null&&Gr(l)),o}function Gr(o){jr===null?jr=o:jr.push.apply(jr,o)}function xa(o){for(var l=o;;){if(l.flags&16384){var g=l.updateQueue;if(g!==null&&(g=g.stores,g!==null))for(var b=0;b<g.length;b++){var E=g[b],P=E.getSnapshot;E=E.value;try{if(!ka(P(),E))return!1}catch{return!1}}}if(g=l.child,l.subtreeFlags&16384&&g!==null)g.return=l,l=g;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Hr(o,l){for(l&=~yd,l&=~Uc,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var g=31-zr(l),b=1<<g;o[g]=-1,l&=~b}}function oi(o){if((It&6)!==0)throw Error(d(327));Rn();var l=Jl(o,0);if((l&1)===0)return Xn(o,Yn()),null;var g=So(o,l);if(o.tag!==0&&g===2){var b=Gu(o);b!==0&&(l=b,g=bo(o,b))}if(g===1)throw g=pl,js(o,0),Hr(o,l),Xn(o,Yn()),g;if(g===6)throw Error(d(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,Gs(o,jr,si),Xn(o,Yn()),null}function li(o){br!==null&&br.tag===0&&(It&6)===0&&Rn();var l=It;It|=1;var g=Nn.transition,b=$t;try{if(Nn.transition=null,$t=1,o)return o()}finally{$t=b,Nn.transition=g,It=l,(It&6)===0&&$a()}}function bd(){ia=Is.current,An(Is)}function js(o,l){o.finishedWork=null,o.finishedLanes=0;var g=o.timeoutHandle;if(g!==ut&&(o.timeoutHandle=ut,lt(g)),In!==null)for(g=In.return;g!==null;){var b=g;switch(Ku(b),b.tag){case 1:b=b.type.childContextTypes,b!=null&&ao();break;case 3:Qi(),An(Mr),An(Ar),il();break;case 5:Ba(b);break;case 4:Qi();break;case 13:An(rn);break;case 19:An(rn);break;case 10:lc(b.type._context);break;case 22:case 23:bd()}g=g.return}if(Jn=o,In=o=Ei(o.current,null),ir=ia=l,On=0,pl=null,yd=Uc=Os=0,jr=Al=null,Xi!==null){for(l=0;l<Xi.length;l++)if(g=Xi[l],b=g.interleaved,b!==null){g.interleaved=null;var E=b.next,P=g.pending;if(P!==null){var Q=P.next;P.next=E,b.next=Q}g.pending=b}Xi=null}return o}function hh(o,l){do{var g=In;try{if(oc(),mr.current=ho,bi){for(var b=mn.memoizedState;b!==null;){var E=b.queue;E!==null&&(E.pending=null),b=b.next}bi=!1}if(gr=0,Hn=Sn=mn=null,Yi=!1,Fr=0,Zi.current=null,g===null||g.return===null){On=1,pl=l,In=null;break}e:{var P=o,Q=g.return,fe=g,Ee=l;if(l=ir,fe.flags|=32768,Ee!==null&&typeof Ee=="object"&&typeof Ee.then=="function"){var Ge=Ee,Je=fe,wt=Je.tag;if((Je.mode&1)===0&&(wt===0||wt===11||wt===15)){var nt=Je.alternate;nt?(Je.updateQueue=nt.updateQueue,Je.memoizedState=nt.memoizedState,Je.lanes=nt.lanes):(Je.updateQueue=null,Je.memoizedState=null)}var vn=dn(Q);if(vn!==null){vn.flags&=-257,ll(vn,Q,fe,P,l),vn.mode&1&&$f(P,Ge,l),l=vn,Ee=Ge;var Bt=l.updateQueue;if(Bt===null){var Vt=new Set;Vt.add(Ee),l.updateQueue=Vt}else Bt.add(Ee);break e}else{if((l&1)===0){$f(P,Ge,l),Wc();break e}Ee=Error(d(426))}}else if(bn&&fe.mode&1){var Ri=dn(Q);if(Ri!==null){(Ri.flags&65536)===0&&(Ri.flags|=256),ll(Ri,Q,fe,P,l),$u(Ns(Ee,fe));break e}}P=Ee=Ns(Ee,fe),On!==4&&(On=2),Al===null?Al=[P]:Al.push(P),P=Q;do{switch(P.tag){case 3:P.flags|=65536,l&=-l,P.lanes|=l;var Se=qi(P,Ee,l);Vf(P,Se);break e;case 1:fe=Ee;var de=P.type,De=P.stateNode;if((P.flags&128)===0&&(typeof de.getDerivedStateFromError=="function"||De!==null&&typeof De.componentDidCatch=="function"&&($i===null||!$i.has(De)))){P.flags|=65536,l&=-l,P.lanes|=l;var Ze=Ir(P,fe,l);Vf(P,Ze);break e}}P=P.return}while(P!==null)}ph(g)}catch(At){l=At,In===g&&g!==null&&(In=g=g.return);continue}break}while(!0)}function es(){var o=Ji.current;return Ji.current=ho,o===null?ho:o}function Wc(){(On===0||On===3||On===2)&&(On=4),Jn===null||(Os&268435455)===0&&(Uc&268435455)===0||Hr(Jn,ir)}function So(o,l){var g=It;It|=2;var b=es();(Jn!==o||ir!==l)&&(si=null,js(o,l));do try{Qc();break}catch(E){hh(o,E)}while(!0);if(oc(),It=g,Ji.current=b,In!==null)throw Error(d(261));return Jn=null,ir=0,On}function Qc(){for(;In!==null;)Yc(In)}function UA(){for(;In!==null&&!LA();)Yc(In)}function Yc(o){var l=mh(o.alternate,o,ia);o.memoizedProps=o.pendingProps,l===null?ph(o):In=l,Zi.current=null}function ph(o){var l=o;do{var g=l.alternate;if(o=l.return,(l.flags&32768)===0){if(g=hd(g,l,ia),g!==null){In=g;return}}else{if(g=IA(g,l),g!==null){g.flags&=32767,In=g;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{On=6,In=null;return}}if(l=l.sibling,l!==null){In=l;return}In=l=o}while(l!==null);On===0&&(On=5)}function Gs(o,l,g){var b=$t,E=Nn.transition;try{Nn.transition=null,$t=1,Hs(o,l,g,b)}finally{Nn.transition=E,$t=b}return null}function Hs(o,l,g,b){do Rn();while(br!==null);if((It&6)!==0)throw Error(d(327));g=o.finishedWork;var E=o.finishedLanes;if(g===null)return null;if(o.finishedWork=null,o.finishedLanes=0,g===o.current)throw Error(d(177));o.callbackNode=null,o.callbackPriority=0;var P=g.lanes|g.childLanes;if(DA(o,P),o===Jn&&(In=Jn=null,ir=0),(g.subtreeFlags&2064)===0&&(g.flags&2064)===0||xr||(xr=!0,gh(Qu,function(){return Rn(),null})),P=(g.flags&15990)!==0,(g.subtreeFlags&15990)!==0||P){P=Nn.transition,Nn.transition=null;var Q=$t;$t=1;var fe=It;It|=4,Zi.current=null,dl(o,g),zs(g,o),ie(o.containerInfo),o.current=g,OA(g),kA(),It=fe,$t=Q,Nn.transition=P}else o.current=g;if(xr&&(xr=!1,br=o,xo=E),P=o.pendingLanes,P===0&&($i=null),BA(g.stateNode),Xn(o,Yn()),l!==null)for(b=o.onRecoverableError,g=0;g<l.length;g++)E=l[g],b(E.value,{componentStack:E.stack,digest:E.digest});if(Gc)throw Gc=!1,o=ml,ml=null,o;return(xo&1)!==0&&o.tag!==0&&Rn(),P=o.pendingLanes,(P&1)!==0?o===Hc?Us++:(Us=0,Hc=o):Us=0,$a(),null}function Rn(){if(br!==null){var o=Ff(xo),l=Nn.transition,g=$t;try{if(Nn.transition=null,$t=16>o?16:o,br===null)var b=!1;else{if(o=br,br=null,xo=0,(It&6)!==0)throw Error(d(331));var E=It;for(It|=4,$e=o.current;$e!==null;){var P=$e,Q=P.child;if(($e.flags&16)!==0){var fe=P.deletions;if(fe!==null){for(var Ee=0;Ee<fe.length;Ee++){var Ge=fe[Ee];for($e=Ge;$e!==null;){var Je=$e;switch(Je.tag){case 0:case 11:case 15:Er(8,Je,P)}var wt=Je.child;if(wt!==null)wt.return=Je,$e=wt;else for(;$e!==null;){Je=$e;var nt=Je.sibling,vn=Je.return;if(lh(Je),Je===Ge){$e=null;break}if(nt!==null){nt.return=vn,$e=nt;break}$e=vn}}}var Bt=P.alternate;if(Bt!==null){var Vt=Bt.child;if(Vt!==null){Bt.child=null;do{var Ri=Vt.sibling;Vt.sibling=null,Vt=Ri}while(Vt!==null)}}$e=P}}if((P.subtreeFlags&2064)!==0&&Q!==null)Q.return=P,$e=Q;else e:for(;$e!==null;){if(P=$e,(P.flags&2048)!==0)switch(P.tag){case 0:case 11:case 15:Er(9,P,P.return)}var Se=P.sibling;if(Se!==null){Se.return=P.return,$e=Se;break e}$e=P.return}}var de=o.current;for($e=de;$e!==null;){Q=$e;var De=Q.child;if((Q.subtreeFlags&2064)!==0&&De!==null)De.return=Q,$e=De;else e:for(Q=de;$e!==null;){if(fe=$e,(fe.flags&2048)!==0)try{switch(fe.tag){case 0:case 11:case 15:kn(9,fe)}}catch(At){Yt(fe,fe.return,At)}if(fe===Q){$e=null;break e}var Ze=fe.sibling;if(Ze!==null){Ze.return=fe.return,$e=Ze;break e}$e=fe.return}}if(It=E,$a(),La&&typeof La.onPostCommitFiberRoot=="function")try{La.onPostCommitFiberRoot(Zl,o)}catch{}b=!0}return b}finally{$t=g,Nn.transition=l}}return!1}function sa(o,l,g){l=Ns(g,l),l=qi(o,l,1),o=Wi(o,l,1),l=gn(),o!==null&&($o(o,1,l),Xn(o,l))}function Yt(o,l,g){if(o.tag===3)sa(o,o,g);else for(;l!==null;){if(l.tag===3){sa(l,o,g);break}else if(l.tag===1){var b=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&($i===null||!$i.has(b))){o=Ns(g,o),o=Ir(l,o,1),l=Wi(l,o,1),o=gn(),l!==null&&($o(l,1,o),Xn(l,o));break}}l=l.return}}function ts(o,l,g){var b=o.pingCache;b!==null&&b.delete(l),l=gn(),o.pingedLanes|=o.suspendedLanes&g,Jn===o&&(ir&g)===g&&(On===4||On===3&&(ir&130023424)===ir&&500>Yn()-jc?js(o,0):yd|=g),Xn(o,l)}function _i(o,l){l===0&&((o.mode&1)===0?l=1:(l=Kl,Kl<<=1,(Kl&130023424)===0&&(Kl=4194304)));var g=gn();o=ma(o,l),o!==null&&($o(o,l,g),Xn(o,g))}function jA(o){var l=o.memoizedState,g=0;l!==null&&(g=l.retryLane),_i(o,g)}function Ah(o,l){var g=0;switch(o.tag){case 13:var b=o.stateNode,E=o.memoizedState;E!==null&&(g=E.retryLane);break;case 19:b=o.stateNode;break;default:throw Error(d(314))}b!==null&&b.delete(l),_i(o,g)}var mh;mh=function(o,l,g){if(o!==null)if(o.memoizedProps!==l.pendingProps||Mr.current)qn=!0;else{if((o.lanes&g)===0&&(l.flags&128)===0)return qn=!1,Pt(o,l,g);qn=(o.flags&131072)!==0}else qn=!1,bn&&(l.flags&1048576)!==0&&tl(l,ec,l.index);switch(l.lanes=0,l.tag){case 2:var b=l.type;vr(o,l),o=l.pendingProps;var E=xs(l,Ar.current);_s(l,g),E=hc(null,l,b,o,E,g);var P=uo();return l.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Cr(b)?(P=!0,Yl(l)):P=!1,l.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,ni(l),E.updater=Si,l.stateNode=E,E._reactInternals=l,sl(l,b,o,g),l=Dc(null,l,b,!0,P,g)):(l.tag=0,bn&&P&&qu(l),Kn(null,l,E,g),l=l.child),l;case 16:b=l.elementType;e:{switch(vr(o,l),o=l.pendingProps,E=b._init,b=E(b._payload),l.type=b,E=l.tag=Sd(b),o=na(b,o),E){case 0:l=cd(null,l,b,o,g);break e;case 1:l=Rc(null,l,b,o,g);break e;case 11:l=eh(null,l,b,o,g);break e;case 14:l=th(null,l,b,na(b.type,o),g);break e}throw Error(d(306,b,""))}return l;case 0:return b=l.type,E=l.pendingProps,E=l.elementType===b?E:na(b,E),cd(o,l,b,E,g);case 1:return b=l.type,E=l.pendingProps,E=l.elementType===b?E:na(b,E),Rc(o,l,b,E,g);case 3:e:{if(ah(l),o===null)throw Error(d(387));b=l.pendingProps,P=l.memoizedState,E=P.element,uc(o,l),lo(l,b,null,g);var Q=l.memoizedState;if(b=Q.element,he&&P.isDehydrated)if(P={element:b,isDehydrated:!1,cache:Q.cache,pendingSuspenseBoundaries:Q.pendingSuspenseBoundaries,transitions:Q.transitions},l.updateQueue.baseState=P,l.memoizedState=P,l.flags&256){E=Ns(Error(d(423)),l),l=ih(o,l,b,g,E);break e}else if(b!==E){E=Ns(Error(d(424)),l),l=ih(o,l,b,g,E);break e}else for(he&&(Aa=Mu(l.stateNode.containerInfo),Jr=l,bn=!0,Pa=null,nl=!1),g=Qf(l,null,b,g),l.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(io(),b===E){l=Or(o,l,g);break e}Kn(o,l,b,g)}l=l.child}return l;case 5:return al(l),o===null&&Zu(l),b=l.type,E=l.pendingProps,P=o!==null?o.memoizedProps:null,Q=E.children,Re(b,E)?Q=null:P!==null&&Re(b,P)&&(l.flags|=32),Tc(o,l),Kn(o,l,Q,g),l.child;case 6:return o===null&&Zu(l),null;case 13:return dd(o,l,g);case 4:return ta(l,l.stateNode.containerInfo),b=l.pendingProps,o===null?l.child=so(l,null,b,g):Kn(o,l,b,g),l.child;case 11:return b=l.type,E=l.pendingProps,E=l.elementType===b?E:na(b,E),eh(o,l,b,E,g);case 7:return Kn(o,l,l.pendingProps,g),l.child;case 8:return Kn(o,l,l.pendingProps.children,g),l.child;case 12:return Kn(o,l,l.pendingProps.children,g),l.child;case 10:e:{if(b=l.type._context,E=l.pendingProps,P=l.memoizedProps,Q=E.value,ed(l,b,Q),P!==null)if(ka(P.value,Q)){if(P.children===E.children&&!Mr.current){l=Or(o,l,g);break e}}else for(P=l.child,P!==null&&(P.return=l);P!==null;){var fe=P.dependencies;if(fe!==null){Q=P.child;for(var Ee=fe.firstContext;Ee!==null;){if(Ee.context===b){if(P.tag===1){Ee=ga(-1,g&-g),Ee.tag=2;var Ge=P.updateQueue;if(Ge!==null){Ge=Ge.shared;var Je=Ge.pending;Je===null?Ee.next=Ee:(Ee.next=Je.next,Je.next=Ee),Ge.pending=Ee}}P.lanes|=g,Ee=P.alternate,Ee!==null&&(Ee.lanes|=g),cc(P.return,g,l),fe.lanes|=g;break}Ee=Ee.next}}else if(P.tag===10)Q=P.type===l.type?null:P.child;else if(P.tag===18){if(Q=P.return,Q===null)throw Error(d(341));Q.lanes|=g,fe=Q.alternate,fe!==null&&(fe.lanes|=g),cc(Q,g,l),Q=P.sibling}else Q=P.child;if(Q!==null)Q.return=P;else for(Q=P;Q!==null;){if(Q===l){Q=null;break}if(P=Q.sibling,P!==null){P.return=Q.return,Q=P;break}Q=Q.return}P=Q}Kn(o,l,E.children,g),l=l.child}return l;case 9:return E=l.type,b=l.pendingProps.children,_s(l,g),E=Zr(E),b=b(E),l.flags|=1,Kn(o,l,b,g),l.child;case 14:return b=l.type,E=na(b,l.pendingProps),E=na(b.type,E),th(o,l,b,E,g);case 15:return nh(o,l,l.type,l.pendingProps,g);case 17:return b=l.type,E=l.pendingProps,E=l.elementType===b?E:na(b,E),vr(o,l),l.tag=1,Cr(b)?(o=!0,Yl(l)):o=!1,_s(l,g),wc(l,b,E),sl(l,b,E,g),Dc(null,l,b,!0,o,g);case 19:return Nc(o,l,g);case 22:return rh(o,l,g)}throw Error(d(156,l.tag))};function gh(o,l){return Xu(o,l)}function GA(o,l,g,b){this.tag=o,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oa(o,l,g,b){return new GA(o,l,g,b)}function Vc(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Sd(o){if(typeof o=="function")return Vc(o)?1:0;if(o!=null){if(o=o.$$typeof,o===T)return 11;if(o===N)return 14}return 2}function Ei(o,l){var g=o.alternate;return g===null?(g=oa(o.tag,l,o.key,o.mode),g.elementType=o.elementType,g.type=o.type,g.stateNode=o.stateNode,g.alternate=o,o.alternate=g):(g.pendingProps=l,g.type=o.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=o.flags&14680064,g.childLanes=o.childLanes,g.lanes=o.lanes,g.child=o.child,g.memoizedProps=o.memoizedProps,g.memoizedState=o.memoizedState,g.updateQueue=o.updateQueue,l=o.dependencies,g.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},g.sibling=o.sibling,g.index=o.index,g.ref=o.ref,g}function yl(o,l,g,b,E,P){var Q=2;if(b=o,typeof o=="function")Vc(o)&&(Q=1);else if(typeof o=="string")Q=5;else e:switch(o){case A:return Ti(g.children,E,P,l);case y:Q=8,E|=8;break;case x:return o=oa(12,g,l,E|2),o.elementType=x,o.lanes=P,o;case R:return o=oa(13,g,l,E),o.elementType=R,o.lanes=P,o;case D:return o=oa(19,g,l,E),o.elementType=D,o.lanes=P,o;case O:return wo(g,E,P,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case S:Q=10;break e;case w:Q=9;break e;case T:Q=11;break e;case N:Q=14;break e;case M:Q=16,b=null;break e}throw Error(d(130,o==null?o:typeof o,""))}return l=oa(Q,g,l,E),l.elementType=o,l.type=b,l.lanes=P,l}function Ti(o,l,g,b){return o=oa(7,o,b,l),o.lanes=g,o}function wo(o,l,g,b){return o=oa(22,o,b,l),o.elementType=O,o.lanes=g,o.stateNode={isHidden:!1},o}function xl(o,l,g){return o=oa(6,o,null,l),o.lanes=g,o}function wd(o,l,g){return l=oa(4,o.children!==null?o.children:[],o.key,l),l.lanes=g,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function HA(o,l,g,b,E){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ut,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hu(0),this.expirationTimes=Hu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hu(0),this.identifierPrefix=b,this.onRecoverableError=E,he&&(this.mutableSourceEagerHydrationData=null)}function vh(o,l,g,b,E,P,Q,fe,Ee){return o=new HA(o,l,g,fe,Ee),l===1?(l=1,P===!0&&(l|=8)):l=0,P=oa(3,null,null,l),o.current=P,P.stateNode=o,P.memoizedState={element:b,isDehydrated:g,cache:null,transitions:null,pendingSuspenseBoundaries:null},ni(P),o}function yh(o){if(!o)return ji;o=o._reactInternals;e:{if(W(o)!==o||o.tag!==1)throw Error(d(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Cr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(d(171))}if(o.tag===1){var g=o.type;if(Cr(g))return ju(o,g,l)}return l}function Cd(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(d(188)):(o=Object.keys(o).join(","),Error(d(268,o)));return o=X(l),o===null?null:o.stateNode}function bl(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var g=o.retryLane;o.retryLane=g!==0&&g<l?g:l}}function qc(o,l){bl(o,l),(o=o.alternate)&&bl(o,l)}function xh(o){return o=X(o),o===null?null:o.stateNode}function Co(){return null}return n.attemptContinuousHydration=function(o){if(o.tag===13){var l=ma(o,134217728);if(l!==null){var g=gn();sr(l,o,134217728,g)}qc(o,134217728)}},n.attemptDiscreteHydration=function(o){if(o.tag===13){var l=ma(o,1);if(l!==null){var g=gn();sr(l,o,1,g)}qc(o,1)}},n.attemptHydrationAtCurrentPriority=function(o){if(o.tag===13){var l=Ci(o),g=ma(o,l);if(g!==null){var b=gn();sr(g,o,l,b)}qc(o,l)}},n.attemptSynchronousHydration=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var g=Zo(l.pendingLanes);g!==0&&(Ss(l,g|1),Xn(l,Yn()),(It&6)===0&&(yo(),$a()))}break;case 13:li(function(){var b=ma(o,1);if(b!==null){var E=gn();sr(b,o,1,E)}}),qc(o,1)}},n.batchedUpdates=function(o,l){var g=It;It|=1;try{return o(l)}finally{It=g,It===0&&(yo(),$l&&$a())}},n.createComponentSelector=function(o){return{$$typeof:aa,value:o}},n.createContainer=function(o,l,g,b,E,P,Q){return vh(o,l,!1,null,g,b,E,P,Q)},n.createHasPseudoClassSelector=function(o){return{$$typeof:Ur,value:o}},n.createHydrationContainer=function(o,l,g,b,E,P,Q,fe,Ee){return o=vh(g,b,!0,o,E,P,Q,fe,Ee),o.context=yh(null),g=o.current,b=gn(),E=Ci(g),P=ga(b,E),P.callback=l??null,Wi(g,P,E),o.current.lanes=E,$o(o,E,b),Xn(o,b),o},n.createPortal=function(o,l,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:""+b,children:o,containerInfo:l,implementation:g}},n.createRoleSelector=function(o){return{$$typeof:Fc,value:o}},n.createTestNameSelector=function(o){return{$$typeof:Ic,value:o}},n.createTextSelector=function(o){return{$$typeof:Oc,value:o}},n.deferredUpdates=function(o){var l=$t,g=Nn.transition;try{return Nn.transition=null,$t=16,o()}finally{$t=l,Nn.transition=g}},n.discreteUpdates=function(o,l,g,b,E){var P=$t,Q=Nn.transition;try{return Nn.transition=null,$t=1,o(l,g,b,E)}finally{$t=P,Nn.transition=Q,It===0&&yo()}},n.findAllNodes=vd,n.findBoundingRects=function(o,l){if(!be)throw Error(d(363));l=vd(o,l),o=[];for(var g=0;g<l.length;g++)o.push(me(l[g]));for(l=o.length-1;0<l;l--){g=o[l];for(var b=g.x,E=b+g.width,P=g.y,Q=P+g.height,fe=l-1;0<=fe;fe--)if(l!==fe){var Ee=o[fe],Ge=Ee.x,Je=Ge+Ee.width,wt=Ee.y,nt=wt+Ee.height;if(b>=Ge&&P>=wt&&E<=Je&&Q<=nt){o.splice(l,1);break}else if(b!==Ge||g.width!==Ee.width||nt<P||wt>Q){if(!(P!==wt||g.height!==Ee.height||Je<b||Ge>E)){Ge>b&&(Ee.width+=Ge-b,Ee.x=b),Je<E&&(Ee.width=E-Ge),o.splice(l,1);break}}else{wt>P&&(Ee.height+=wt-P,Ee.y=P),nt<Q&&(Ee.height=Q-wt),o.splice(l,1);break}}}return o},n.findHostInstance=Cd,n.findHostInstanceWithNoPortals=function(o){return o=ge(o),o=o!==null?L(o):null,o===null?null:o.stateNode},n.findHostInstanceWithWarning=function(o){return Cd(o)},n.flushControlled=function(o){var l=It;It|=1;var g=Nn.transition,b=$t;try{Nn.transition=null,$t=1,o()}finally{$t=b,Nn.transition=g,It=l,It===0&&(yo(),$a())}},n.flushPassiveEffects=Rn,n.flushSync=li,n.focusWithin=function(o,l){if(!be)throw Error(d(363));for(o=md(o),l=dh(o,l),l=Array.from(l),o=0;o<l.length;){var g=l[o++];if(!Qe(g)){if(g.tag===5&&dt(g.stateNode))return!0;for(g=g.child;g!==null;)l.push(g),g=g.sibling}}return!1},n.getCurrentUpdatePriority=function(){return $t},n.getFindAllNodesFailureDescription=function(o,l){if(!be)throw Error(d(363));var g=0,b=[];o=[md(o),0];for(var E=0;E<o.length;){var P=o[E++],Q=o[E++],fe=l[Q];if((P.tag!==5||!Qe(P))&&(Fn(P,fe)&&(b.push(gd(fe)),Q++,Q>g&&(g=Q)),Q<l.length))for(P=P.child;P!==null;)o.push(P,Q),P=P.sibling}if(g<l.length){for(o=[];g<l.length;g++)o.push(gd(l[g]));return`findAllNodes was able to match part of the selector:
359
359
  `+(b.join(" > ")+`
360
360
 
361
361
  No matching component was found for:
@@ -367,7 +367,7 @@ No matching component was found for:
367
367
  *
368
368
  * This source code is licensed under the MIT license found in the
369
369
  * LICENSE file in the root directory of this source tree.
370
- */var j2;function $8(){return j2||(j2=1,process.env.NODE_ENV!=="production"&&(pg.exports=function(e){var n={},i=se,s=av(),c=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,d=!1;function h(r){d=r}function p(r){if(!d){for(var a=arguments.length,f=new Array(a>1?a-1:0),m=1;m<a;m++)f[m-1]=arguments[m];A("warn",r,f)}}function u(r){if(!d){for(var a=arguments.length,f=new Array(a>1?a-1:0),m=1;m<a;m++)f[m-1]=arguments[m];A("error",r,f)}}function A(r,a,f){{var m=c.ReactDebugCurrentFrame,v=m.getStackAddendum();v!==""&&(a+="%s",f=f.concat([v]));var _=f.map(function(B){return String(B)});_.unshift("Warning: "+a),Function.prototype.apply.call(console[r],console,_)}}var y=Object.assign;function x(r){return r._reactInternals}function S(r,a){r._reactInternals=a}var w=!1,T=!1,R=!1,D=!0,N=!0,M=!0,O=!0,I=0,Y=1,J=2,q=3,W=4,V=5,ge=6,X=7,ae=8,L=9,te=10,le=11,Ae=12,ne=13,oe=14,ie=15,j=16,K=17,ve=18,xe=19,Re=21,Fe=22,pt=23,lt=24,ut=25,Rt=Symbol.for("react.element"),je=Symbol.for("react.portal"),St=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),ue=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),me=Symbol.for("react.scope"),ze=Symbol.for("react.debug_trace_mode"),Qe=Symbol.for("react.offscreen"),Oe=Symbol.for("react.legacy_hidden"),dt=Symbol.for("react.cache"),Jt=Symbol.for("react.tracing_marker"),zt=Symbol.iterator,pr="@@iterator";function qe(r){if(r===null||typeof r!="object")return null;var a=zt&&r[zt]||r[pr];return typeof a=="function"?a:null}function ht(r,a,f){var m=r.displayName;if(m)return m;var v=a.displayName||a.name||"";return v!==""?f+"("+v+")":f}function Nt(r){return r.displayName||"Context"}function et(r){if(r==null)return null;if(typeof r.tag=="number"&&u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case St:return"Fragment";case je:return"Portal";case k:return"Profiler";case he:return"StrictMode";case G:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ue:var a=r;return Nt(a)+".Consumer";case ce:var f=r;return Nt(f._context)+".Provider";case U:return ht(r,r.render,"ForwardRef");case be:var m=r.displayName||null;return m!==null?m:et(r.type)||"Memo";case _e:{var v=r,_=v._payload,B=v._init;try{return et(B(_))}catch{return null}}}return null}function pn(r,a,f){var m=a.displayName||a.name||"";return r.displayName||(m!==""?f+"("+m+")":f)}function Wn(r){return r.displayName||"Context"}function it(r){var a=r.tag,f=r.type;switch(a){case lt:return"Cache";case L:var m=f;return Wn(m)+".Consumer";case te:var v=f;return Wn(v._context)+".Provider";case ve:return"DehydratedFragment";case le:return pn(f,f.render,"ForwardRef");case X:return"Fragment";case V:return f;case W:return"Portal";case q:return"Root";case ge:return"Text";case j:return et(f);case ae:return f===he?"StrictMode":"Mode";case Fe:return"Offscreen";case Ae:return"Profiler";case Re:return"Scope";case ne:return"Suspense";case xe:return"SuspenseList";case ut:return"TracingMarker";case Y:case I:case K:case J:case oe:case ie:if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;break}return null}var st=0,En=1,un=2,Ut=4,Ra=16,Da=32,As=64,Qt=128,Ka=256,ms=512,Oi=1024,mi=2048,Ja=4096,gs=8192,Pu=16384,SA=32767,qo=32768,tr=65536,Bu=131072,Bf=1048576,no=2097152,vs=4194304,Mu=8388608,Ui=16777216,zu=33554432,Fu=Ut|Oi|0,Ko=un|Ut|Ra|Da|ms|Ja|gs,Jo=Ut|As|ms|gs,ro=mi|Ra,gi=vs|Mu|no,wA=c.ReactCurrentOwner;function Xl(r){var a=r,f=r;if(r.alternate)for(;a.return;)a=a.return;else{var m=a;do a=m,(a.flags&(un|Ja))!==st&&(f=a.return),m=a.return;while(m)}return a.tag===q?f:null}function CA(r){return Xl(r)===r}function _A(r){{var a=wA.current;if(a!==null&&a.tag===Y){var f=a,m=f.stateNode;m._warnedAboutRefsInRender||u("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",it(f)||"A component"),m._warnedAboutRefsInRender=!0}}var v=x(r);return v?Xl(v)===v:!1}function Mf(r){if(Xl(r)!==r)throw new Error("Unable to find node on an unmounted component.")}function Wl(r){var a=r.alternate;if(!a){var f=Xl(r);if(f===null)throw new Error("Unable to find node on an unmounted component.");return f!==r?null:r}for(var m=r,v=a;;){var _=m.return;if(_===null)break;var B=_.alternate;if(B===null){var F=_.return;if(F!==null){m=v=F;continue}break}if(_.child===B.child){for(var H=_.child;H;){if(H===m)return Mf(_),r;if(H===v)return Mf(_),a;H=H.sibling}throw new Error("Unable to find node on an unmounted component.")}if(m.return!==v.return)m=_,v=B;else{for(var $=!1,re=_.child;re;){if(re===m){$=!0,m=_,v=B;break}if(re===v){$=!0,v=_,m=B;break}re=re.sibling}if(!$){for(re=B.child;re;){if(re===m){$=!0,m=B,v=_;break}if(re===v){$=!0,v=B,m=_;break}re=re.sibling}if(!$)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(m.alternate!==v)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(m.tag!==q)throw new Error("Unable to find node on an unmounted component.");return m.stateNode.current===m?r:a}function ys(r){var a=Wl(r);return a!==null?Ql(a):null}function Ql(r){if(r.tag===V||r.tag===ge)return r;for(var a=r.child;a!==null;){var f=Ql(a);if(f!==null)return f;a=a.sibling}return null}function Iu(r){var a=Wl(r);return a!==null?zf(a):null}function zf(r){if(r.tag===V||r.tag===ge)return r;for(var a=r.child;a!==null;){if(a.tag!==W){var f=zf(a);if(f!==null)return f}a=a.sibling}return null}var Ou=Array.isArray;function Qn(r){return Ou(r)}var Za=e.getPublicInstance,An=e.getRootHostContext,hn=e.getChildHostContext,ji=e.prepareForCommit,Ar=e.resetAfterCommit,Mr=e.createInstance,vi=e.appendInitialChild,xs=e.finalizeInitialChildren,Cr=e.prepareUpdate,ao=e.shouldSetTextContent,Uu=e.createTextInstance,ju=e.scheduleTimeout,Yl=e.cancelTimeout,Vl=e.noTimeout,zr=e.isPrimaryRenderer,EA=e.warnsIfNotActing,Kr=e.supportsMutation,ql=e.supportsPersistence,_r=e.supportsHydration,Kl=e.getInstanceFromNode;e.beforeActiveInstanceBlur,e.afterActiveInstanceBlur;var Zo=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var Jl=e.getCurrentEventPriority,TA=e.detachDeletedInstance,RA=e.supportsMicrotasks,Gu=e.scheduleMicrotask,bs=e.supportsTestSelectors,Hu=e.findFiberRoot,$o=e.getBoundingRect,DA=e.getTextContent,Ss=e.isHiddenSubtree,$t=e.matchAccessibilityRole,Ff=e.setFocusIfFocusable,Xu=e.setupIntersectionObserver,If=e.appendChild,LA=e.appendChildToContainer,kA=e.commitTextUpdate,Yn=e.commitMount,Wu=e.commitUpdate,NA=e.insertBefore,Qu=e.insertInContainerBefore,PA=e.removeChild,Zl=e.removeChildFromContainer,La=e.resetTextContent,BA=e.hideInstance,MA=e.hideTextInstance,ka=e.unhideInstance,yi=e.unhideTextInstance,$l=e.clearContainer,Yu=e.cloneInstance,Vu=e.createContainerChildSet,Of=e.appendChildToContainerChildSet,$a=e.finalizeContainerChildren,Gi=e.replaceContainerChildren,ws=e.cloneHiddenInstance,el=e.cloneHiddenTextInstance,ec=e.canHydrateInstance,ha=e.canHydrateTextInstance,pa=e.canHydrateSuspenseInstance,Hi=e.isSuspenseInstancePending,Na=e.isSuspenseInstanceFallback,xi=e.getSuspenseInstanceFallbackErrorDetails,Cs=e.registerSuspenseInstanceRetry,tl=e.getNextHydratableSibling,qu=e.getFirstHydratableChild,Ku=e.getFirstHydratableChildWithinContainer,Jr=e.getFirstHydratableChildWithinSuspenseInstance,Aa=e.hydrateInstance,bn=e.hydrateTextInstance,nl=e.hydrateSuspenseInstance,Pa=e.getNextHydratableInstanceAfterSuspenseInstance,Uf=e.commitHydratedContainer,jf=e.commitHydratedSuspenseInstance,Ju=e.clearSuspenseBoundary,Zu=e.clearSuspenseBoundaryFromContainer,Gf=e.shouldDeleteUnhydratedTailInstances,tc=e.didNotMatchHydratedContainerTextInstance,Hf=e.didNotMatchHydratedTextInstance,io=e.didNotHydrateInstanceWithinContainer,$u=e.didNotHydrateInstanceWithinSuspenseInstance,zA=e.didNotHydrateInstance,nc=e.didNotFindHydratableInstanceWithinContainer,FA=e.didNotFindHydratableTextInstanceWithinContainer,rl=e.didNotFindHydratableSuspenseInstanceWithinContainer,rc=e.didNotFindHydratableInstanceWithinSuspenseInstance,Xf=e.didNotFindHydratableTextInstanceWithinSuspenseInstance,Wf=e.didNotFindHydratableSuspenseInstanceWithinSuspenseInstance,so=e.didNotFindHydratableInstance,Qf=e.didNotFindHydratableTextInstance,ac=e.didNotFindHydratableSuspenseInstance,ic=e.errorHydratingContainer,ei=0,sc,oc,ed,lc,cc,_s,Zr;function Xi(){}Xi.__reactDisabledLog=!0;function td(){{if(ei===0){sc=console.log,oc=console.info,ed=console.warn,lc=console.error,cc=console.group,_s=console.groupCollapsed,Zr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Xi,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}ei++}}function Yf(){{if(ei--,ei===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:y({},r,{value:sc}),info:y({},r,{value:oc}),warn:y({},r,{value:ed}),error:y({},r,{value:lc}),group:y({},r,{value:cc}),groupCollapsed:y({},r,{value:_s}),groupEnd:y({},r,{value:Zr})})}ei<0&&u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ma=c.ReactCurrentDispatcher,ti;function ni(r,a,f){{if(ti===void 0)try{throw Error()}catch(v){var m=v.stack.trim().match(/\n( *(at )?)/);ti=m&&m[1]||""}return`
370
+ */var j2;function $8(){return j2||(j2=1,process.env.NODE_ENV!=="production"&&(pg.exports=function(e){var n={},i=oe,s=av(),c=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,d=!1;function h(r){d=r}function p(r){if(!d){for(var a=arguments.length,f=new Array(a>1?a-1:0),m=1;m<a;m++)f[m-1]=arguments[m];A("warn",r,f)}}function u(r){if(!d){for(var a=arguments.length,f=new Array(a>1?a-1:0),m=1;m<a;m++)f[m-1]=arguments[m];A("error",r,f)}}function A(r,a,f){{var m=c.ReactDebugCurrentFrame,v=m.getStackAddendum();v!==""&&(a+="%s",f=f.concat([v]));var _=f.map(function(B){return String(B)});_.unshift("Warning: "+a),Function.prototype.apply.call(console[r],console,_)}}var y=Object.assign;function x(r){return r._reactInternals}function S(r,a){r._reactInternals=a}var w=!1,T=!1,R=!1,D=!0,N=!0,M=!0,O=!0,I=0,Y=1,J=2,q=3,W=4,V=5,ge=6,X=7,ae=8,L=9,te=10,le=11,Ae=12,ne=13,se=14,ie=15,j=16,K=17,ve=18,xe=19,Re=21,Fe=22,pt=23,lt=24,ut=25,Rt=Symbol.for("react.element"),je=Symbol.for("react.portal"),St=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),ue=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),me=Symbol.for("react.scope"),ze=Symbol.for("react.debug_trace_mode"),Qe=Symbol.for("react.offscreen"),Oe=Symbol.for("react.legacy_hidden"),dt=Symbol.for("react.cache"),Jt=Symbol.for("react.tracing_marker"),zt=Symbol.iterator,pr="@@iterator";function qe(r){if(r===null||typeof r!="object")return null;var a=zt&&r[zt]||r[pr];return typeof a=="function"?a:null}function ht(r,a,f){var m=r.displayName;if(m)return m;var v=a.displayName||a.name||"";return v!==""?f+"("+v+")":f}function Nt(r){return r.displayName||"Context"}function et(r){if(r==null)return null;if(typeof r.tag=="number"&&u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case St:return"Fragment";case je:return"Portal";case k:return"Profiler";case he:return"StrictMode";case G:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ue:var a=r;return Nt(a)+".Consumer";case ce:var f=r;return Nt(f._context)+".Provider";case U:return ht(r,r.render,"ForwardRef");case be:var m=r.displayName||null;return m!==null?m:et(r.type)||"Memo";case _e:{var v=r,_=v._payload,B=v._init;try{return et(B(_))}catch{return null}}}return null}function pn(r,a,f){var m=a.displayName||a.name||"";return r.displayName||(m!==""?f+"("+m+")":f)}function Wn(r){return r.displayName||"Context"}function it(r){var a=r.tag,f=r.type;switch(a){case lt:return"Cache";case L:var m=f;return Wn(m)+".Consumer";case te:var v=f;return Wn(v._context)+".Provider";case ve:return"DehydratedFragment";case le:return pn(f,f.render,"ForwardRef");case X:return"Fragment";case V:return f;case W:return"Portal";case q:return"Root";case ge:return"Text";case j:return et(f);case ae:return f===he?"StrictMode":"Mode";case Fe:return"Offscreen";case Ae:return"Profiler";case Re:return"Scope";case ne:return"Suspense";case xe:return"SuspenseList";case ut:return"TracingMarker";case Y:case I:case K:case J:case se:case ie:if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;break}return null}var st=0,En=1,un=2,Ut=4,Ra=16,Da=32,As=64,Qt=128,Ka=256,ms=512,Oi=1024,mi=2048,Ja=4096,gs=8192,Pu=16384,SA=32767,qo=32768,tr=65536,Bu=131072,Bf=1048576,no=2097152,vs=4194304,Mu=8388608,Ui=16777216,zu=33554432,Fu=Ut|Oi|0,Ko=un|Ut|Ra|Da|ms|Ja|gs,Jo=Ut|As|ms|gs,ro=mi|Ra,gi=vs|Mu|no,wA=c.ReactCurrentOwner;function Xl(r){var a=r,f=r;if(r.alternate)for(;a.return;)a=a.return;else{var m=a;do a=m,(a.flags&(un|Ja))!==st&&(f=a.return),m=a.return;while(m)}return a.tag===q?f:null}function CA(r){return Xl(r)===r}function _A(r){{var a=wA.current;if(a!==null&&a.tag===Y){var f=a,m=f.stateNode;m._warnedAboutRefsInRender||u("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",it(f)||"A component"),m._warnedAboutRefsInRender=!0}}var v=x(r);return v?Xl(v)===v:!1}function Mf(r){if(Xl(r)!==r)throw new Error("Unable to find node on an unmounted component.")}function Wl(r){var a=r.alternate;if(!a){var f=Xl(r);if(f===null)throw new Error("Unable to find node on an unmounted component.");return f!==r?null:r}for(var m=r,v=a;;){var _=m.return;if(_===null)break;var B=_.alternate;if(B===null){var F=_.return;if(F!==null){m=v=F;continue}break}if(_.child===B.child){for(var H=_.child;H;){if(H===m)return Mf(_),r;if(H===v)return Mf(_),a;H=H.sibling}throw new Error("Unable to find node on an unmounted component.")}if(m.return!==v.return)m=_,v=B;else{for(var $=!1,re=_.child;re;){if(re===m){$=!0,m=_,v=B;break}if(re===v){$=!0,v=_,m=B;break}re=re.sibling}if(!$){for(re=B.child;re;){if(re===m){$=!0,m=B,v=_;break}if(re===v){$=!0,v=B,m=_;break}re=re.sibling}if(!$)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(m.alternate!==v)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(m.tag!==q)throw new Error("Unable to find node on an unmounted component.");return m.stateNode.current===m?r:a}function ys(r){var a=Wl(r);return a!==null?Ql(a):null}function Ql(r){if(r.tag===V||r.tag===ge)return r;for(var a=r.child;a!==null;){var f=Ql(a);if(f!==null)return f;a=a.sibling}return null}function Iu(r){var a=Wl(r);return a!==null?zf(a):null}function zf(r){if(r.tag===V||r.tag===ge)return r;for(var a=r.child;a!==null;){if(a.tag!==W){var f=zf(a);if(f!==null)return f}a=a.sibling}return null}var Ou=Array.isArray;function Qn(r){return Ou(r)}var Za=e.getPublicInstance,An=e.getRootHostContext,hn=e.getChildHostContext,ji=e.prepareForCommit,Ar=e.resetAfterCommit,Mr=e.createInstance,vi=e.appendInitialChild,xs=e.finalizeInitialChildren,Cr=e.prepareUpdate,ao=e.shouldSetTextContent,Uu=e.createTextInstance,ju=e.scheduleTimeout,Yl=e.cancelTimeout,Vl=e.noTimeout,zr=e.isPrimaryRenderer,EA=e.warnsIfNotActing,Kr=e.supportsMutation,ql=e.supportsPersistence,_r=e.supportsHydration,Kl=e.getInstanceFromNode;e.beforeActiveInstanceBlur,e.afterActiveInstanceBlur;var Zo=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var Jl=e.getCurrentEventPriority,TA=e.detachDeletedInstance,RA=e.supportsMicrotasks,Gu=e.scheduleMicrotask,bs=e.supportsTestSelectors,Hu=e.findFiberRoot,$o=e.getBoundingRect,DA=e.getTextContent,Ss=e.isHiddenSubtree,$t=e.matchAccessibilityRole,Ff=e.setFocusIfFocusable,Xu=e.setupIntersectionObserver,If=e.appendChild,LA=e.appendChildToContainer,kA=e.commitTextUpdate,Yn=e.commitMount,Wu=e.commitUpdate,NA=e.insertBefore,Qu=e.insertInContainerBefore,PA=e.removeChild,Zl=e.removeChildFromContainer,La=e.resetTextContent,BA=e.hideInstance,MA=e.hideTextInstance,ka=e.unhideInstance,yi=e.unhideTextInstance,$l=e.clearContainer,Yu=e.cloneInstance,Vu=e.createContainerChildSet,Of=e.appendChildToContainerChildSet,$a=e.finalizeContainerChildren,Gi=e.replaceContainerChildren,ws=e.cloneHiddenInstance,el=e.cloneHiddenTextInstance,ec=e.canHydrateInstance,ha=e.canHydrateTextInstance,pa=e.canHydrateSuspenseInstance,Hi=e.isSuspenseInstancePending,Na=e.isSuspenseInstanceFallback,xi=e.getSuspenseInstanceFallbackErrorDetails,Cs=e.registerSuspenseInstanceRetry,tl=e.getNextHydratableSibling,qu=e.getFirstHydratableChild,Ku=e.getFirstHydratableChildWithinContainer,Jr=e.getFirstHydratableChildWithinSuspenseInstance,Aa=e.hydrateInstance,bn=e.hydrateTextInstance,nl=e.hydrateSuspenseInstance,Pa=e.getNextHydratableInstanceAfterSuspenseInstance,Uf=e.commitHydratedContainer,jf=e.commitHydratedSuspenseInstance,Ju=e.clearSuspenseBoundary,Zu=e.clearSuspenseBoundaryFromContainer,Gf=e.shouldDeleteUnhydratedTailInstances,tc=e.didNotMatchHydratedContainerTextInstance,Hf=e.didNotMatchHydratedTextInstance,io=e.didNotHydrateInstanceWithinContainer,$u=e.didNotHydrateInstanceWithinSuspenseInstance,zA=e.didNotHydrateInstance,nc=e.didNotFindHydratableInstanceWithinContainer,FA=e.didNotFindHydratableTextInstanceWithinContainer,rl=e.didNotFindHydratableSuspenseInstanceWithinContainer,rc=e.didNotFindHydratableInstanceWithinSuspenseInstance,Xf=e.didNotFindHydratableTextInstanceWithinSuspenseInstance,Wf=e.didNotFindHydratableSuspenseInstanceWithinSuspenseInstance,so=e.didNotFindHydratableInstance,Qf=e.didNotFindHydratableTextInstance,ac=e.didNotFindHydratableSuspenseInstance,ic=e.errorHydratingContainer,ei=0,sc,oc,ed,lc,cc,_s,Zr;function Xi(){}Xi.__reactDisabledLog=!0;function td(){{if(ei===0){sc=console.log,oc=console.info,ed=console.warn,lc=console.error,cc=console.group,_s=console.groupCollapsed,Zr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Xi,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}ei++}}function Yf(){{if(ei--,ei===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:y({},r,{value:sc}),info:y({},r,{value:oc}),warn:y({},r,{value:ed}),error:y({},r,{value:lc}),group:y({},r,{value:cc}),groupCollapsed:y({},r,{value:_s}),groupEnd:y({},r,{value:Zr})})}ei<0&&u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ma=c.ReactCurrentDispatcher,ti;function ni(r,a,f){{if(ti===void 0)try{throw Error()}catch(v){var m=v.stack.trim().match(/\n( *(at )?)/);ti=m&&m[1]||""}return`
371
371
  `+ti+r}}var uc=!1,ga;{var Wi=typeof WeakMap=="function"?WeakMap:Map;ga=new Wi}function oo(r,a){if(!r||uc)return"";{var f=ga.get(r);if(f!==void 0)return f}var m;uc=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _;_=ma.current,ma.current=null,td();try{if(a){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(Me){m=Me}Reflect.construct(r,[],B)}else{try{B.call()}catch(Me){m=Me}r.call(B.prototype)}}else{try{throw Error()}catch(Me){m=Me}r()}}catch(Me){if(Me&&m&&typeof Me.stack=="string"){for(var F=Me.stack.split(`
372
372
  `),H=m.stack.split(`
373
373
  `),$=F.length-1,re=H.length-1;$>=1&&re>=0&&F[$]!==H[re];)re--;for(;$>=1&&re>=0;$--,re--)if(F[$]!==H[re]){if($!==1||re!==1)do if($--,re--,re<0||F[$]!==H[re]){var ye=`
@@ -441,9 +441,9 @@ https://reactjs.org/link/unsafe-component-lifecycles`,ct,bt,Ne!==null?`
441
441
  Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var re=it(r)||"Anonymous";$="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+re+".")}var ye=H+`
442
442
  `+B+`
443
443
 
444
- `+(""+$);console.error(ye)}catch(Te){setTimeout(function(){throw Te})}}var a5=typeof WeakMap=="function"?WeakMap:Map;function c1(r,a,f){var m=Xs(dn,f);m.tag=e0,m.payload={element:null};var v=a.value;return m.callback=function(){h4(v),q0(r,a)},m}function K0(r,a,f){var m=Xs(dn,f);m.tag=e0;var v=r.type.getDerivedStateFromError;if(typeof v=="function"){var _=a.value;m.payload=function(){return v(_)},m.callback=function(){by(r),q0(r,a)}}var B=r.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(m.callback=function(){by(r),q0(r,a),typeof v!="function"&&d4(this);var H=a.value,$=a.stack;this.componentDidCatch(H,{componentStack:$!==null?$:""}),typeof v!="function"&&(vr(r.lanes,vt)||u("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",it(r)||"Unknown"))}),m}function u1(r,a,f){var m=r.pingCache,v;if(m===null?(m=r.pingCache=new a5,v=new Set,m.set(a,v)):(v=m.get(a),v===void 0&&(v=new Set,m.set(a,v))),!v.has(f)){v.add(f);var _=p4.bind(null,r,a,f);Ur&&rf(r,f),a.then(_,_)}}function i5(r,a,f,m){var v=r.updateQueue;if(v===null){var _=new Set;_.add(f),r.updateQueue=_}else v.add(f)}function s5(r,a){var f=r.tag;if((r.mode&jt)===mt&&(f===I||f===le||f===ie)){var m=r.alternate;m?(r.updateQueue=m.updateQueue,r.memoizedState=m.memoizedState,r.lanes=m.lanes):(r.updateQueue=null,r.memoizedState=null)}}function d1(r){var a=r;do{if(a.tag===ne&&Ub(a))return a;a=a.return}while(a!==null);return null}function f1(r,a,f,m,v){if((r.mode&jt)===mt){if(r===a)r.flags|=tr;else{if(r.flags|=Qt,f.flags|=Bu,f.flags&=-52805,f.tag===Y){var _=f.alternate;if(_===null)f.tag=K;else{var B=Xs(dn,vt);B.tag=Rh,_o(f,B,vt)}}f.lanes=Pt(f.lanes,vt)}return r}return r.flags|=tr,r.lanes=v,r}function o5(r,a,f,m,v){if(f.flags|=qo,Ur&&rf(r,v),m!==null&&typeof m=="object"&&typeof m.then=="function"){var _=m;s5(f),l()&&f.mode&jt&&Ah();var B=d1(a);if(B!==null){B.flags&=~Ka,f1(B,a,f,r,v),B.mode&jt&&u1(r,_,v),i5(B,r,_);return}else{if(!cd(v)){u1(r,_,v),Pm();return}var F=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");m=F}}else if(l()&&f.mode&jt){Ah();var H=d1(a);if(H!==null){(H.flags&tr)===st&&(H.flags|=Ka),f1(H,a,f,r,v),g(Cl(m,f));return}}m=Cl(m,f),r4(m);var $=a;do{switch($.tag){case q:{var re=m;$.flags|=tr;var ye=mo(v);$.lanes=Pt($.lanes,ye);var Te=c1($,re,ye);r0($,Te);return}case Y:var Ne=m,Me=$.type,Pe=$.stateNode;if(($.flags&Qt)===st&&(typeof Me.getDerivedStateFromError=="function"||Pe!==null&&typeof Pe.componentDidCatch=="function"&&!fy(Pe))){$.flags|=tr;var ct=mo(v);$.lanes=Pt($.lanes,ct);var bt=K0($,Ne,ct);r0($,bt);return}break}$=$.return}while($!==null)}function l5(){return null}var Od=c.ReactCurrentOwner,Ni=!1,J0,Ud,Z0,$0,em,_l,tm,rp,jd;J0={},Ud={},Z0={},$0={},em={},_l=!1,tm={},rp={},jd={};function ca(r,a,f,m){r===null?a.child=mv(a,null,f,m):a.child=Jc(a,r.child,f,m)}function c5(r,a,f,m){a.child=Jc(a,r.child,null,m),a.child=Jc(a,null,f,m)}function h1(r,a,f,m,v){if(a.type!==a.elementType){var _=f.propTypes;_&&ta(_,m,"prop",et(f))}var B=f.render,F=a.ref,H,$;$c(a,v),Ji(a);{if(Od.current=a,Se(!0),H=iu(r,a,B,m,F,v),$=su(),a.mode&Tn){Fn(!0);try{H=iu(r,a,B,m,F,v),$=su()}finally{Fn(!1)}}Se(!1)}return Zi(),r!==null&&!Ni?(Dv(r,a,v),Ws(r,a,v)):(l()&&$&&So(a),a.flags|=En,ca(r,a,H,v),a.child)}function p1(r,a,f,m,v){if(r===null){var _=f.type;if(k4(_)&&f.compare===null&&f.defaultProps===void 0){var B=_;return B=pu(_),a.tag=ie,a.type=B,am(a,_),A1(r,a,B,m,v)}{var F=_.propTypes;if(F&&ta(F,m,"prop",et(_)),f.defaultProps!==void 0){var H=et(_)||"Unknown";jd[H]||(u("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",H),jd[H]=!0)}}var $=Hm(f.type,null,m,a,a.mode,v);return $.ref=a.ref,$.return=a,a.child=$,$}{var re=f.type,ye=re.propTypes;ye&&ta(ye,m,"prop",et(re))}var Te=r.child,Ne=um(r,v);if(!Ne){var Me=Te.memoizedProps,Pe=f.compare;if(Pe=Pe!==null?Pe:Q,Pe(Me,m)&&r.ref===a.ref)return Ws(r,a,v)}a.flags|=En;var ct=Ll(Te,m);return ct.ref=a.ref,ct.return=a,a.child=ct,ct}function A1(r,a,f,m,v){if(a.type!==a.elementType){var _=a.elementType;if(_.$$typeof===_e){var B=_,F=B._payload,H=B._init;try{_=H(F)}catch{_=null}var $=_&&_.propTypes;$&&ta($,m,"prop",et(_))}}if(r!==null){var re=r.memoizedProps;if(Q(re,m)&&r.ref===a.ref&&a.type===r.type)if(Ni=!1,a.pendingProps=m=re,um(r,v))(r.flags&Bu)!==st&&(Ni=!0);else return a.lanes=r.lanes,Ws(r,a,v)}return nm(r,a,f,m,v)}function m1(r,a,f){var m=a.pendingProps,v=m.children,_=r!==null?r.memoizedState:null;if(m.mode==="hidden"||R)if((a.mode&jt)===mt){var B={baseLanes:Be,cachePool:null,transitions:null};a.memoizedState=B,Tp(a,f)}else if(vr(f,Ir)){var ye={baseLanes:Be,cachePool:null,transitions:null};a.memoizedState=ye;var Te=_!==null?_.baseLanes:f;Tp(a,Te)}else{var F=null,H;if(_!==null){var $=_.baseLanes;H=Pt($,f)}else H=f;a.lanes=a.childLanes=Ir;var re={baseLanes:H,cachePool:F,transitions:null};return a.memoizedState=re,a.updateQueue=null,Tp(a,H),null}else{var Ne;_!==null?(Ne=Pt(_.baseLanes,f),a.memoizedState=null):Ne=f,Tp(a,Ne)}return ca(r,a,v,f),a.child}function u5(r,a,f){var m=a.pendingProps;return ca(r,a,m,f),a.child}function d5(r,a,f){var m=a.pendingProps.children;return ca(r,a,m,f),a.child}function f5(r,a,f){{a.flags|=Ut;{var m=a.stateNode;m.effectDuration=0,m.passiveEffectDuration=0}}var v=a.pendingProps,_=v.children;return ca(r,a,_,f),a.child}function g1(r,a){var f=a.ref;(r===null&&f!==null||r!==null&&r.ref!==f)&&(a.flags|=ms,a.flags|=no)}function nm(r,a,f,m,v){if(a.type!==a.elementType){var _=f.propTypes;_&&ta(_,m,"prop",et(f))}var B;{var F=Sn(a,f,!0);B=bi(a,F)}var H,$;$c(a,v),Ji(a);{if(Od.current=a,Se(!0),H=iu(r,a,f,m,B,v),$=su(),a.mode&Tn){Fn(!0);try{H=iu(r,a,f,m,B,v),$=su()}finally{Fn(!1)}}Se(!1)}return Zi(),r!==null&&!Ni?(Dv(r,a,v),Ws(r,a,v)):(l()&&$&&So(a),a.flags|=En,ca(r,a,H,v),a.child)}function v1(r,a,f,m,v){{switch(Ly(a)){case!1:{var _=a.stateNode,B=a.type,F=new B(a.memoizedProps,_.context),H=F.state;_.updater.enqueueSetState(_,H,null);break}case!0:{a.flags|=Qt,a.flags|=tr;var $=new Error("Simulated error coming from DevTools"),re=mo(v);a.lanes=Pt(a.lanes,re);var ye=K0(a,Cl($,a),re);r0(a,ye);break}}if(a.type!==a.elementType){var Te=f.propTypes;Te&&ta(Te,m,"prop",et(f))}}var Ne;Fr(f)?(Ne=!0,uo(a)):Ne=!1,$c(a,v);var Me=a.stateNode,Pe;Me===null?(ip(r,a),o1(a,f,m),Y0(a,f,m,v),Pe=!0):r===null?Pe=t5(a,f,m,v):Pe=n5(r,a,f,m,v);var ct=rm(r,a,f,Pe,Ne,v);{var bt=a.stateNode;Pe&&bt.props!==m&&(_l||u("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",it(a)||"a component"),_l=!0)}return ct}function rm(r,a,f,m,v,_){g1(r,a);var B=(a.flags&Qt)!==st;if(!m&&!B)return v&&za(a,f,!1),Ws(r,a,_);var F=a.stateNode;Od.current=a;var H;if(B&&typeof f.getDerivedStateFromError!="function")H=null,n1();else{Ji(a);{if(Se(!0),H=F.render(),a.mode&Tn){Fn(!0);try{F.render()}finally{Fn(!1)}}Se(!1)}Zi()}return a.flags|=En,r!==null&&B?c5(r,a,H,_):ca(r,a,H,_),a.memoizedState=F.state,v&&za(a,f,!0),a.child}function y1(r){var a=r.stateNode;a.pendingContext?fc(r,a.pendingContext,a.pendingContext!==a.context):a.context&&fc(r,a.context,!1),i0(r,a.containerInfo)}function h5(r,a,f){if(y1(a),r===null)throw new Error("Should have a current fiber. This is a bug in React.");var m=a.pendingProps,v=a.memoizedState,_=v.element;wv(r,a),Nh(a,m,null,f);var B=a.memoizedState;a.stateNode;var F=B.element;if(_r&&v.isDehydrated){var H={element:F,isDehydrated:!1,cache:B.cache,pendingSuspenseBoundaries:B.pendingSuspenseBoundaries,transitions:B.transitions},$=a.updateQueue;if($.baseState=H,a.memoizedState=H,a.flags&Ka){var re=Cl(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),a);return x1(r,a,F,f,re)}else if(F!==_){var ye=Cl(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),a);return x1(r,a,F,f,ye)}else{gh(a);var Te=mv(a,null,F,f);a.child=Te;for(var Ne=Te;Ne;)Ne.flags=Ne.flags&~un|Ja,Ne=Ne.sibling}}else{if(Co(),F===_)return Ws(r,a,f);ca(r,a,F,f)}return a.child}function x1(r,a,f,m,v){return Co(),g(v),a.flags|=Ka,ca(r,a,f,m),a.child}function p5(r,a,f){Ev(a),r===null&&xl(a);var m=a.type,v=a.pendingProps,_=r!==null?r.memoizedProps:null,B=v.children,F=ao(m,v);return F?B=null:_!==null&&ao(m,_)&&(a.flags|=Da),g1(r,a),ca(r,a,B,f),a.child}function A5(r,a){return r===null&&xl(a),null}function m5(r,a,f,m){ip(r,a);var v=a.pendingProps,_=f,B=_._payload,F=_._init,H=F(B);a.type=H;var $=a.tag=N4(H),re=ki(H,v),ye;switch($){case I:return am(a,H),a.type=H=pu(H),ye=nm(null,a,H,re,m),ye;case Y:return a.type=H=Fm(H),ye=v1(null,a,H,re,m),ye;case le:return a.type=H=Im(H),ye=h1(null,a,H,re,m),ye;case oe:{if(a.type!==a.elementType){var Te=H.propTypes;Te&&ta(Te,re,"prop",et(H))}return ye=p1(null,a,H,ki(H.type,re),m),ye}}var Ne="";throw H!==null&&typeof H=="object"&&H.$$typeof===_e&&(Ne=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+H+". "+("Lazy element type must resolve to a class or function."+Ne))}function g5(r,a,f,m,v){ip(r,a),a.tag=Y;var _;return Fr(f)?(_=!0,uo(a)):_=!1,$c(a,v),o1(a,f,m),Y0(a,f,m,v),rm(null,a,f,!0,_,v)}function v5(r,a,f,m){ip(r,a);var v=a.pendingProps,_;{var B=Sn(a,f,!1);_=bi(a,B)}$c(a,m);var F,H;Ji(a);{if(f.prototype&&typeof f.prototype.render=="function"){var $=et(f)||"Unknown";J0[$]||(u("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",$,$),J0[$]=!0)}a.mode&Tn&&de.recordLegacyContextWarning(a,null),Se(!0),Od.current=a,F=iu(null,a,f,v,_,m),H=su(),Se(!1)}if(Zi(),a.flags|=En,typeof F=="object"&&F!==null&&typeof F.render=="function"&&F.$$typeof===void 0){var re=et(f)||"Unknown";Ud[re]||(u("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",re,re,re),Ud[re]=!0)}if(typeof F=="object"&&F!==null&&typeof F.render=="function"&&F.$$typeof===void 0){{var ye=et(f)||"Unknown";Ud[ye]||(u("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",ye,ye,ye),Ud[ye]=!0)}a.tag=Y,a.memoizedState=null,a.updateQueue=null;var Te=!1;return Fr(f)?(Te=!0,uo(a)):Te=!1,a.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,n0(a),s1(a,F),Y0(a,f,v,m),rm(null,a,f,!0,Te,m)}else{if(a.tag=I,a.mode&Tn){Fn(!0);try{F=iu(null,a,f,v,_,m),H=su()}finally{Fn(!1)}}return l()&&H&&So(a),ca(null,a,F,m),am(a,f),a.child}}function am(r,a){{if(a&&a.childContextTypes&&u("%s(...): childContextTypes cannot be defined on a function component.",a.displayName||a.name||"Component"),r.ref!==null){var f="",m=nt();m&&(f+=`
444
+ `+(""+$);console.error(ye)}catch(Te){setTimeout(function(){throw Te})}}var a5=typeof WeakMap=="function"?WeakMap:Map;function c1(r,a,f){var m=Xs(dn,f);m.tag=e0,m.payload={element:null};var v=a.value;return m.callback=function(){h4(v),q0(r,a)},m}function K0(r,a,f){var m=Xs(dn,f);m.tag=e0;var v=r.type.getDerivedStateFromError;if(typeof v=="function"){var _=a.value;m.payload=function(){return v(_)},m.callback=function(){by(r),q0(r,a)}}var B=r.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(m.callback=function(){by(r),q0(r,a),typeof v!="function"&&d4(this);var H=a.value,$=a.stack;this.componentDidCatch(H,{componentStack:$!==null?$:""}),typeof v!="function"&&(vr(r.lanes,vt)||u("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",it(r)||"Unknown"))}),m}function u1(r,a,f){var m=r.pingCache,v;if(m===null?(m=r.pingCache=new a5,v=new Set,m.set(a,v)):(v=m.get(a),v===void 0&&(v=new Set,m.set(a,v))),!v.has(f)){v.add(f);var _=p4.bind(null,r,a,f);Ur&&rf(r,f),a.then(_,_)}}function i5(r,a,f,m){var v=r.updateQueue;if(v===null){var _=new Set;_.add(f),r.updateQueue=_}else v.add(f)}function s5(r,a){var f=r.tag;if((r.mode&jt)===mt&&(f===I||f===le||f===ie)){var m=r.alternate;m?(r.updateQueue=m.updateQueue,r.memoizedState=m.memoizedState,r.lanes=m.lanes):(r.updateQueue=null,r.memoizedState=null)}}function d1(r){var a=r;do{if(a.tag===ne&&Ub(a))return a;a=a.return}while(a!==null);return null}function f1(r,a,f,m,v){if((r.mode&jt)===mt){if(r===a)r.flags|=tr;else{if(r.flags|=Qt,f.flags|=Bu,f.flags&=-52805,f.tag===Y){var _=f.alternate;if(_===null)f.tag=K;else{var B=Xs(dn,vt);B.tag=Rh,_o(f,B,vt)}}f.lanes=Pt(f.lanes,vt)}return r}return r.flags|=tr,r.lanes=v,r}function o5(r,a,f,m,v){if(f.flags|=qo,Ur&&rf(r,v),m!==null&&typeof m=="object"&&typeof m.then=="function"){var _=m;s5(f),l()&&f.mode&jt&&Ah();var B=d1(a);if(B!==null){B.flags&=~Ka,f1(B,a,f,r,v),B.mode&jt&&u1(r,_,v),i5(B,r,_);return}else{if(!cd(v)){u1(r,_,v),Pm();return}var F=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");m=F}}else if(l()&&f.mode&jt){Ah();var H=d1(a);if(H!==null){(H.flags&tr)===st&&(H.flags|=Ka),f1(H,a,f,r,v),g(Cl(m,f));return}}m=Cl(m,f),r4(m);var $=a;do{switch($.tag){case q:{var re=m;$.flags|=tr;var ye=mo(v);$.lanes=Pt($.lanes,ye);var Te=c1($,re,ye);r0($,Te);return}case Y:var Ne=m,Me=$.type,Pe=$.stateNode;if(($.flags&Qt)===st&&(typeof Me.getDerivedStateFromError=="function"||Pe!==null&&typeof Pe.componentDidCatch=="function"&&!fy(Pe))){$.flags|=tr;var ct=mo(v);$.lanes=Pt($.lanes,ct);var bt=K0($,Ne,ct);r0($,bt);return}break}$=$.return}while($!==null)}function l5(){return null}var Od=c.ReactCurrentOwner,Ni=!1,J0,Ud,Z0,$0,em,_l,tm,rp,jd;J0={},Ud={},Z0={},$0={},em={},_l=!1,tm={},rp={},jd={};function ca(r,a,f,m){r===null?a.child=mv(a,null,f,m):a.child=Jc(a,r.child,f,m)}function c5(r,a,f,m){a.child=Jc(a,r.child,null,m),a.child=Jc(a,null,f,m)}function h1(r,a,f,m,v){if(a.type!==a.elementType){var _=f.propTypes;_&&ta(_,m,"prop",et(f))}var B=f.render,F=a.ref,H,$;$c(a,v),Ji(a);{if(Od.current=a,Se(!0),H=iu(r,a,B,m,F,v),$=su(),a.mode&Tn){Fn(!0);try{H=iu(r,a,B,m,F,v),$=su()}finally{Fn(!1)}}Se(!1)}return Zi(),r!==null&&!Ni?(Dv(r,a,v),Ws(r,a,v)):(l()&&$&&So(a),a.flags|=En,ca(r,a,H,v),a.child)}function p1(r,a,f,m,v){if(r===null){var _=f.type;if(k4(_)&&f.compare===null&&f.defaultProps===void 0){var B=_;return B=pu(_),a.tag=ie,a.type=B,am(a,_),A1(r,a,B,m,v)}{var F=_.propTypes;if(F&&ta(F,m,"prop",et(_)),f.defaultProps!==void 0){var H=et(_)||"Unknown";jd[H]||(u("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",H),jd[H]=!0)}}var $=Hm(f.type,null,m,a,a.mode,v);return $.ref=a.ref,$.return=a,a.child=$,$}{var re=f.type,ye=re.propTypes;ye&&ta(ye,m,"prop",et(re))}var Te=r.child,Ne=um(r,v);if(!Ne){var Me=Te.memoizedProps,Pe=f.compare;if(Pe=Pe!==null?Pe:Q,Pe(Me,m)&&r.ref===a.ref)return Ws(r,a,v)}a.flags|=En;var ct=Ll(Te,m);return ct.ref=a.ref,ct.return=a,a.child=ct,ct}function A1(r,a,f,m,v){if(a.type!==a.elementType){var _=a.elementType;if(_.$$typeof===_e){var B=_,F=B._payload,H=B._init;try{_=H(F)}catch{_=null}var $=_&&_.propTypes;$&&ta($,m,"prop",et(_))}}if(r!==null){var re=r.memoizedProps;if(Q(re,m)&&r.ref===a.ref&&a.type===r.type)if(Ni=!1,a.pendingProps=m=re,um(r,v))(r.flags&Bu)!==st&&(Ni=!0);else return a.lanes=r.lanes,Ws(r,a,v)}return nm(r,a,f,m,v)}function m1(r,a,f){var m=a.pendingProps,v=m.children,_=r!==null?r.memoizedState:null;if(m.mode==="hidden"||R)if((a.mode&jt)===mt){var B={baseLanes:Be,cachePool:null,transitions:null};a.memoizedState=B,Tp(a,f)}else if(vr(f,Ir)){var ye={baseLanes:Be,cachePool:null,transitions:null};a.memoizedState=ye;var Te=_!==null?_.baseLanes:f;Tp(a,Te)}else{var F=null,H;if(_!==null){var $=_.baseLanes;H=Pt($,f)}else H=f;a.lanes=a.childLanes=Ir;var re={baseLanes:H,cachePool:F,transitions:null};return a.memoizedState=re,a.updateQueue=null,Tp(a,H),null}else{var Ne;_!==null?(Ne=Pt(_.baseLanes,f),a.memoizedState=null):Ne=f,Tp(a,Ne)}return ca(r,a,v,f),a.child}function u5(r,a,f){var m=a.pendingProps;return ca(r,a,m,f),a.child}function d5(r,a,f){var m=a.pendingProps.children;return ca(r,a,m,f),a.child}function f5(r,a,f){{a.flags|=Ut;{var m=a.stateNode;m.effectDuration=0,m.passiveEffectDuration=0}}var v=a.pendingProps,_=v.children;return ca(r,a,_,f),a.child}function g1(r,a){var f=a.ref;(r===null&&f!==null||r!==null&&r.ref!==f)&&(a.flags|=ms,a.flags|=no)}function nm(r,a,f,m,v){if(a.type!==a.elementType){var _=f.propTypes;_&&ta(_,m,"prop",et(f))}var B;{var F=Sn(a,f,!0);B=bi(a,F)}var H,$;$c(a,v),Ji(a);{if(Od.current=a,Se(!0),H=iu(r,a,f,m,B,v),$=su(),a.mode&Tn){Fn(!0);try{H=iu(r,a,f,m,B,v),$=su()}finally{Fn(!1)}}Se(!1)}return Zi(),r!==null&&!Ni?(Dv(r,a,v),Ws(r,a,v)):(l()&&$&&So(a),a.flags|=En,ca(r,a,H,v),a.child)}function v1(r,a,f,m,v){{switch(Ly(a)){case!1:{var _=a.stateNode,B=a.type,F=new B(a.memoizedProps,_.context),H=F.state;_.updater.enqueueSetState(_,H,null);break}case!0:{a.flags|=Qt,a.flags|=tr;var $=new Error("Simulated error coming from DevTools"),re=mo(v);a.lanes=Pt(a.lanes,re);var ye=K0(a,Cl($,a),re);r0(a,ye);break}}if(a.type!==a.elementType){var Te=f.propTypes;Te&&ta(Te,m,"prop",et(f))}}var Ne;Fr(f)?(Ne=!0,uo(a)):Ne=!1,$c(a,v);var Me=a.stateNode,Pe;Me===null?(ip(r,a),o1(a,f,m),Y0(a,f,m,v),Pe=!0):r===null?Pe=t5(a,f,m,v):Pe=n5(r,a,f,m,v);var ct=rm(r,a,f,Pe,Ne,v);{var bt=a.stateNode;Pe&&bt.props!==m&&(_l||u("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",it(a)||"a component"),_l=!0)}return ct}function rm(r,a,f,m,v,_){g1(r,a);var B=(a.flags&Qt)!==st;if(!m&&!B)return v&&za(a,f,!1),Ws(r,a,_);var F=a.stateNode;Od.current=a;var H;if(B&&typeof f.getDerivedStateFromError!="function")H=null,n1();else{Ji(a);{if(Se(!0),H=F.render(),a.mode&Tn){Fn(!0);try{F.render()}finally{Fn(!1)}}Se(!1)}Zi()}return a.flags|=En,r!==null&&B?c5(r,a,H,_):ca(r,a,H,_),a.memoizedState=F.state,v&&za(a,f,!0),a.child}function y1(r){var a=r.stateNode;a.pendingContext?fc(r,a.pendingContext,a.pendingContext!==a.context):a.context&&fc(r,a.context,!1),i0(r,a.containerInfo)}function h5(r,a,f){if(y1(a),r===null)throw new Error("Should have a current fiber. This is a bug in React.");var m=a.pendingProps,v=a.memoizedState,_=v.element;wv(r,a),Nh(a,m,null,f);var B=a.memoizedState;a.stateNode;var F=B.element;if(_r&&v.isDehydrated){var H={element:F,isDehydrated:!1,cache:B.cache,pendingSuspenseBoundaries:B.pendingSuspenseBoundaries,transitions:B.transitions},$=a.updateQueue;if($.baseState=H,a.memoizedState=H,a.flags&Ka){var re=Cl(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),a);return x1(r,a,F,f,re)}else if(F!==_){var ye=Cl(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),a);return x1(r,a,F,f,ye)}else{gh(a);var Te=mv(a,null,F,f);a.child=Te;for(var Ne=Te;Ne;)Ne.flags=Ne.flags&~un|Ja,Ne=Ne.sibling}}else{if(Co(),F===_)return Ws(r,a,f);ca(r,a,F,f)}return a.child}function x1(r,a,f,m,v){return Co(),g(v),a.flags|=Ka,ca(r,a,f,m),a.child}function p5(r,a,f){Ev(a),r===null&&xl(a);var m=a.type,v=a.pendingProps,_=r!==null?r.memoizedProps:null,B=v.children,F=ao(m,v);return F?B=null:_!==null&&ao(m,_)&&(a.flags|=Da),g1(r,a),ca(r,a,B,f),a.child}function A5(r,a){return r===null&&xl(a),null}function m5(r,a,f,m){ip(r,a);var v=a.pendingProps,_=f,B=_._payload,F=_._init,H=F(B);a.type=H;var $=a.tag=N4(H),re=ki(H,v),ye;switch($){case I:return am(a,H),a.type=H=pu(H),ye=nm(null,a,H,re,m),ye;case Y:return a.type=H=Fm(H),ye=v1(null,a,H,re,m),ye;case le:return a.type=H=Im(H),ye=h1(null,a,H,re,m),ye;case se:{if(a.type!==a.elementType){var Te=H.propTypes;Te&&ta(Te,re,"prop",et(H))}return ye=p1(null,a,H,ki(H.type,re),m),ye}}var Ne="";throw H!==null&&typeof H=="object"&&H.$$typeof===_e&&(Ne=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+H+". "+("Lazy element type must resolve to a class or function."+Ne))}function g5(r,a,f,m,v){ip(r,a),a.tag=Y;var _;return Fr(f)?(_=!0,uo(a)):_=!1,$c(a,v),o1(a,f,m),Y0(a,f,m,v),rm(null,a,f,!0,_,v)}function v5(r,a,f,m){ip(r,a);var v=a.pendingProps,_;{var B=Sn(a,f,!1);_=bi(a,B)}$c(a,m);var F,H;Ji(a);{if(f.prototype&&typeof f.prototype.render=="function"){var $=et(f)||"Unknown";J0[$]||(u("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",$,$),J0[$]=!0)}a.mode&Tn&&de.recordLegacyContextWarning(a,null),Se(!0),Od.current=a,F=iu(null,a,f,v,_,m),H=su(),Se(!1)}if(Zi(),a.flags|=En,typeof F=="object"&&F!==null&&typeof F.render=="function"&&F.$$typeof===void 0){var re=et(f)||"Unknown";Ud[re]||(u("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",re,re,re),Ud[re]=!0)}if(typeof F=="object"&&F!==null&&typeof F.render=="function"&&F.$$typeof===void 0){{var ye=et(f)||"Unknown";Ud[ye]||(u("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",ye,ye,ye),Ud[ye]=!0)}a.tag=Y,a.memoizedState=null,a.updateQueue=null;var Te=!1;return Fr(f)?(Te=!0,uo(a)):Te=!1,a.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,n0(a),s1(a,F),Y0(a,f,v,m),rm(null,a,f,!0,Te,m)}else{if(a.tag=I,a.mode&Tn){Fn(!0);try{F=iu(null,a,f,v,_,m),H=su()}finally{Fn(!1)}}return l()&&H&&So(a),ca(null,a,F,m),am(a,f),a.child}}function am(r,a){{if(a&&a.childContextTypes&&u("%s(...): childContextTypes cannot be defined on a function component.",a.displayName||a.name||"Component"),r.ref!==null){var f="",m=nt();m&&(f+=`
445
445
 
446
- Check the render method of \``+m+"`.");var v=m||"",_=r._debugSource;_&&(v=_.fileName+":"+_.lineNumber),em[v]||(em[v]=!0,u("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",f))}if(a.defaultProps!==void 0){var B=et(a)||"Unknown";jd[B]||(u("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",B),jd[B]=!0)}if(typeof a.getDerivedStateFromProps=="function"){var F=et(a)||"Unknown";$0[F]||(u("%s: Function components do not support getDerivedStateFromProps.",F),$0[F]=!0)}if(typeof a.contextType=="object"&&a.contextType!==null){var H=et(a)||"Unknown";Z0[H]||(u("%s: Function components do not support contextType.",H),Z0[H]=!0)}}}var im={dehydrated:null,treeContext:null,retryLane:Ln};function sm(r){return{baseLanes:r,cachePool:l5(),transitions:null}}function y5(r,a){var f=null;return{baseLanes:Pt(r.baseLanes,a),cachePool:f,transitions:r.transitions}}function x5(r,a,f,m){if(a!==null){var v=a.memoizedState;if(v===null)return!1}return o0(r,Ld)}function b5(r,a){return ra(r.childLanes,a)}function b1(r,a,f){var m=a.pendingProps;Ny(a)&&(a.flags|=Qt);var v=Di.current,_=!1,B=(a.flags&Qt)!==st;if(B||x5(v,r)?(_=!0,a.flags&=~Qt):(r===null||r.memoizedState!==null)&&(v=Ob(v,Rv)),v=tu(v),To(a,v),r===null){xl(a);var F=a.memoizedState;if(F!==null){var H=F.dehydrated;if(H!==null)return E5(a,H)}var $=m.children,re=m.fallback;if(_){var ye=S5(a,$,re,f),Te=a.child;return Te.memoizedState=sm(f),a.memoizedState=im,ye}else return om(a,$)}else{var Ne=r.memoizedState;if(Ne!==null){var Me=Ne.dehydrated;if(Me!==null)return T5(r,a,B,m,Me,Ne,f)}if(_){var Pe=m.fallback,ct=m.children,bt=C5(r,a,ct,Pe,f),gt=a.child,cn=r.child.memoizedState;return gt.memoizedState=cn===null?sm(f):y5(cn,f),gt.childLanes=b5(r,f),a.memoizedState=im,bt}else{var qt=m.children,Ce=w5(r,a,qt,f);return a.memoizedState=null,Ce}}}function om(r,a,f){var m=r.mode,v={mode:"visible",children:a},_=lm(v,m);return _.return=r,r.child=_,_}function S5(r,a,f,m){var v=r.mode,_=r.child,B={mode:"hidden",children:a},F,H;return(v&jt)===mt&&_!==null?(F=_,F.childLanes=Be,F.pendingProps=B,r.mode&tn&&(F.actualDuration=0,F.actualStartTime=-1,F.selfBaseDuration=0,F.treeBaseDuration=0),H=Bo(f,v,m,null)):(F=lm(B,v),H=Bo(f,v,m,null)),F.return=r,H.return=r,F.sibling=H,r.child=F,H}function lm(r,a,f){return wy(r,a,Be,null)}function S1(r,a){return Ll(r,a)}function w5(r,a,f,m){var v=r.child,_=v.sibling,B=S1(v,{mode:"visible",children:f});if((a.mode&jt)===mt&&(B.lanes=m),B.return=a,B.sibling=null,_!==null){var F=a.deletions;F===null?(a.deletions=[_],a.flags|=Ra):F.push(_)}return a.child=B,B}function C5(r,a,f,m,v){var _=a.mode,B=r.child,F=B.sibling,H={mode:"hidden",children:f},$;if((_&jt)===mt&&a.child!==B){var re=a.child;$=re,$.childLanes=Be,$.pendingProps=H,a.mode&tn&&($.actualDuration=0,$.actualStartTime=-1,$.selfBaseDuration=B.selfBaseDuration,$.treeBaseDuration=B.treeBaseDuration),a.deletions=null}else $=S1(B,H),$.subtreeFlags=B.subtreeFlags&gi;var ye;return F!==null?ye=Ll(F,m):(ye=Bo(m,_,v,null),ye.flags|=un),ye.return=a,$.return=a,$.sibling=ye,a.child=$,ye}function ap(r,a,f,m){m!==null&&g(m),Jc(a,r.child,null,f);var v=a.pendingProps,_=v.children,B=om(a,_);return B.flags|=un,a.memoizedState=null,B}function _5(r,a,f,m,v){var _=a.mode,B={mode:"visible",children:f},F=lm(B,_),H=Bo(m,_,v,null);return H.flags|=un,F.return=a,H.return=a,F.sibling=H,a.child=F,(a.mode&jt)!==mt&&Jc(a,r.child,null,v),H}function E5(r,a,f){return(r.mode&jt)===mt?(u("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),r.lanes=vt):Na(a)?r.lanes=Vi:r.lanes=Ir,null}function T5(r,a,f,m,v,_,B){if(f)if(a.flags&Ka){a.flags&=~Ka;var Ce=V0(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return ap(r,a,B,Ce)}else{if(a.memoizedState!==null)return a.child=r.child,a.flags|=Qt,null;var Le=m.children,we=m.fallback,Xe=_5(r,a,Le,we,B),ft=a.child;return ft.memoizedState=sm(B),a.memoizedState=im,Xe}else{if(jA(),(a.mode&jt)===mt)return ap(r,a,B,null);if(Na(v)){var F,H,$;{var re=xi(v);F=re.digest,H=re.message,$=re.stack}var ye;H?ye=new Error(H):ye=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var Te=V0(ye,F,$);return ap(r,a,B,Te)}var Ne=vr(B,r.childLanes);if(Ni||Ne){var Me=_p();if(Me!==null){var Pe=IA(Me,B);if(Pe!==Ln&&Pe!==_.retryLane){_.retryLane=Pe;var ct=dn;la(r,Pe),er(Me,r,Pe,ct)}}Pm();var bt=V0(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return ap(r,a,B,bt)}else if(Hi(v)){a.flags|=Qt,a.child=r.child;var gt=A4.bind(null,r);return Cs(v,gt),null}else{GA(a,v,_.treeContext);var cn=m.children,qt=om(a,cn);return qt.flags|=Ja,qt}}}function w1(r,a,f){r.lanes=Pt(r.lanes,a);var m=r.alternate;m!==null&&(m.lanes=Pt(m.lanes,a)),ZA(r.return,a,f)}function R5(r,a,f){for(var m=a;m!==null;){if(m.tag===ne){var v=m.memoizedState;v!==null&&w1(m,f,r)}else if(m.tag===xe)w1(m,f,r);else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===r)return;for(;m.sibling===null;){if(m.return===null||m.return===r)return;m=m.return}m.sibling.return=m.return,m=m.sibling}}function D5(r){for(var a=r,f=null;a!==null;){var m=a.alternate;m!==null&&zh(m)===null&&(f=a),a=a.sibling}return f}function L5(r){if(r!==void 0&&r!=="forwards"&&r!=="backwards"&&r!=="together"&&!tm[r])if(tm[r]=!0,typeof r=="string")switch(r.toLowerCase()){case"together":case"forwards":case"backwards":{u('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',r,r.toLowerCase());break}case"forward":case"backward":{u('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',r,r.toLowerCase());break}default:u('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',r);break}else u('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',r)}function k5(r,a){r!==void 0&&!rp[r]&&(r!=="collapsed"&&r!=="hidden"?(rp[r]=!0,u('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',r)):a!=="forwards"&&a!=="backwards"&&(rp[r]=!0,u('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',r)))}function C1(r,a){{var f=Qn(r),m=!f&&typeof qe(r)=="function";if(f||m){var v=f?"array":"iterable";return u("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",v,a,v),!1}}return!0}function N5(r,a){if((a==="forwards"||a==="backwards")&&r!==void 0&&r!==null&&r!==!1)if(Qn(r)){for(var f=0;f<r.length;f++)if(!C1(r[f],f))return}else{var m=qe(r);if(typeof m=="function"){var v=m.call(r);if(v)for(var _=v.next(),B=0;!_.done;_=v.next()){if(!C1(_.value,B))return;B++}}else u('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',a)}}function cm(r,a,f,m,v){var _=r.memoizedState;_===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:f,tailMode:v}:(_.isBackwards=a,_.rendering=null,_.renderingStartTime=0,_.last=m,_.tail=f,_.tailMode=v)}function _1(r,a,f){var m=a.pendingProps,v=m.revealOrder,_=m.tail,B=m.children;L5(v),k5(_,v),N5(B,v),ca(r,a,B,f);var F=Di.current,H=o0(F,Ld);if(H)F=l0(F,Ld),a.flags|=Qt;else{var $=r!==null&&(r.flags&Qt)!==st;$&&R5(a,a.child,f),F=tu(F)}if(To(a,F),(a.mode&jt)===mt)a.memoizedState=null;else switch(v){case"forwards":{var re=D5(a.child),ye;re===null?(ye=a.child,a.child=null):(ye=re.sibling,re.sibling=null),cm(a,!1,ye,re,_);break}case"backwards":{var Te=null,Ne=a.child;for(a.child=null;Ne!==null;){var Me=Ne.alternate;if(Me!==null&&zh(Me)===null){a.child=Ne;break}var Pe=Ne.sibling;Ne.sibling=Te,Te=Ne,Ne=Pe}cm(a,!0,Te,null,_);break}case"together":{cm(a,!1,null,null,void 0);break}default:a.memoizedState=null}return a.child}function P5(r,a,f){i0(a,a.stateNode.containerInfo);var m=a.pendingProps;return r===null?a.child=Jc(a,null,m,f):ca(r,a,m,f),a.child}var E1=!1;function B5(r,a,f){var m=a.type,v=m._context,_=a.pendingProps,B=a.memoizedProps,F=_.value;{"value"in _||E1||(E1=!0,u("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var H=a.type.propTypes;H&&ta(H,_,"prop","Context.Provider")}if(yv(a,v,F),B!==null){var $=B.value;if(xr($,F)){if(B.children===_.children&&!Yi())return Ws(r,a,f)}else Lb(a,v,f)}var re=_.children;return ca(r,a,re,f),a.child}var T1=!1;function M5(r,a,f){var m=a.type;m._context===void 0?m!==m.Consumer&&(T1||(T1=!0,u("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):m=m._context;var v=a.pendingProps,_=v.children;typeof _!="function"&&u("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),$c(a,f);var B=Zn(m);Ji(a);var F;return Od.current=a,Se(!0),F=_(B),Se(!1),Zi(),a.flags|=En,ca(r,a,F,f),a.child}function Gd(){Ni=!0}function ip(r,a){(a.mode&jt)===mt&&r!==null&&(r.alternate=null,a.alternate=null,a.flags|=un)}function Ws(r,a,f){return r!==null&&(a.dependencies=r.dependencies),n1(),nf(a.lanes),vr(f,a.childLanes)?(Rb(r,a),a.child):null}function z5(r,a,f){{var m=a.return;if(m===null)throw new Error("Cannot swap the root fiber.");if(r.alternate=null,a.alternate=null,f.index=a.index,f.sibling=a.sibling,f.return=a.return,f.ref=a.ref,a===m.child)m.child=f;else{var v=m.child;if(v===null)throw new Error("Expected parent to have a child.");for(;v.sibling!==a;)if(v=v.sibling,v===null)throw new Error("Expected to find the previous sibling.");v.sibling=f}var _=m.deletions;return _===null?(m.deletions=[r],m.flags|=Ra):_.push(r),f.flags|=un,f}}function um(r,a){var f=r.lanes;return!!vr(f,a)}function F5(r,a,f){switch(a.tag){case q:y1(a),a.stateNode,Co();break;case V:Ev(a);break;case Y:{var m=a.type;Fr(m)&&uo(a);break}case W:i0(a,a.stateNode.containerInfo);break;case te:{var v=a.memoizedProps.value,_=a.type._context;yv(a,_,v);break}case Ae:{var B=vr(f,a.childLanes);B&&(a.flags|=Ut);{var F=a.stateNode;F.effectDuration=0,F.passiveEffectDuration=0}}break;case ne:{var H=a.memoizedState;if(H!==null){if(H.dehydrated!==null)return To(a,tu(Di.current)),a.flags|=Qt,null;var $=a.child,re=$.childLanes;if(vr(f,re))return b1(r,a,f);To(a,tu(Di.current));var ye=Ws(r,a,f);return ye!==null?ye.sibling:null}else To(a,tu(Di.current));break}case xe:{var Te=(r.flags&Qt)!==st,Ne=vr(f,a.childLanes);if(Te){if(Ne)return _1(r,a,f);a.flags|=Qt}var Me=a.memoizedState;if(Me!==null&&(Me.rendering=null,Me.tail=null,Me.lastEffect=null),To(a,Di.current),Ne)break;return null}case Fe:case pt:return a.lanes=Be,m1(r,a,f)}return Ws(r,a,f)}function R1(r,a,f){if(a._debugNeedsRemount&&r!==null)return z5(r,a,Hm(a.type,a.key,a.pendingProps,a._debugOwner||null,a.mode,a.lanes));if(r!==null){var m=r.memoizedProps,v=a.pendingProps;if(m!==v||Yi()||a.type!==r.type)Ni=!0;else{var _=um(r,f);if(!_&&(a.flags&Qt)===st)return Ni=!1,F5(r,a,f);(r.flags&Bu)!==st?Ni=!0:Ni=!1}}else if(Ni=!1,l()&&bd(a)){var B=a.index,F=js();Wc(a,F,B)}switch(a.lanes=Be,a.tag){case J:return v5(r,a,a.type,f);case j:{var H=a.elementType;return m5(r,a,H,f)}case I:{var $=a.type,re=a.pendingProps,ye=a.elementType===$?re:ki($,re);return nm(r,a,$,ye,f)}case Y:{var Te=a.type,Ne=a.pendingProps,Me=a.elementType===Te?Ne:ki(Te,Ne);return v1(r,a,Te,Me,f)}case q:return h5(r,a,f);case V:return p5(r,a,f);case ge:return A5(r,a);case ne:return b1(r,a,f);case W:return P5(r,a,f);case le:{var Pe=a.type,ct=a.pendingProps,bt=a.elementType===Pe?ct:ki(Pe,ct);return h1(r,a,Pe,bt,f)}case X:return u5(r,a,f);case ae:return d5(r,a,f);case Ae:return f5(r,a,f);case te:return B5(r,a,f);case L:return M5(r,a,f);case oe:{var gt=a.type,cn=a.pendingProps,qt=ki(gt,cn);if(a.type!==a.elementType){var Ce=gt.propTypes;Ce&&ta(Ce,qt,"prop",et(gt))}return qt=ki(gt.type,qt),p1(r,a,gt,qt,f)}case ie:return A1(r,a,a.type,a.pendingProps,f);case K:{var Le=a.type,we=a.pendingProps,Xe=a.elementType===Le?we:ki(Le,we);return g5(r,a,Le,Xe,f)}case xe:return _1(r,a,f);case Re:break;case Fe:return m1(r,a,f)}throw new Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function os(r){r.flags|=Ut}function D1(r){r.flags|=ms,r.flags|=no}function L1(r,a){var f=r!==null&&r.child===a.child;if(f)return!0;if((a.flags&Ra)!==st)return!1;for(var m=a.child;m!==null;){if((m.flags&Ko)!==st||(m.subtreeFlags&Ko)!==st)return!1;m=m.sibling}return!0}var Hd,Xd,sp,op;if(Kr)Hd=function(r,a,f,m){for(var v=a.child;v!==null;){if(v.tag===V||v.tag===ge)vi(r,v.stateNode);else if(v.tag!==W){if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===a)return;for(;v.sibling===null;){if(v.return===null||v.return===a)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},Xd=function(r,a){},sp=function(r,a,f,m,v){var _=r.memoizedProps;if(_!==m){var B=a.stateNode,F=Dd(),H=Cr(B,f,_,m,v,F);a.updateQueue=H,H&&os(a)}},op=function(r,a,f,m){f!==m&&os(a)};else if(ql){Hd=function(r,a,f,m){for(var v=a.child;v!==null;){if(v.tag===V){var _=v.stateNode;if(f&&m){var B=v.memoizedProps,F=v.type;_=ws(_,F,B,v)}vi(r,_)}else if(v.tag===ge){var H=v.stateNode;if(f&&m){var $=v.memoizedProps;H=el(H,$,v)}vi(r,H)}else if(v.tag!==W){if(v.tag===Fe&&v.memoizedState!==null){var re=v.child;re!==null&&(re.return=v),Hd(r,v,!0,!0)}else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v=v,v===a)return;for(;v.sibling===null;){if(v.return===null||v.return===a)return;v=v.return}v.sibling.return=v.return,v=v.sibling}};var k1=function(r,a,f,m){for(var v=a.child;v!==null;){if(v.tag===V){var _=v.stateNode;if(f&&m){var B=v.memoizedProps,F=v.type;_=ws(_,F,B,v)}Of(r,_)}else if(v.tag===ge){var H=v.stateNode;if(f&&m){var $=v.memoizedProps;H=el(H,$,v)}Of(r,H)}else if(v.tag!==W){if(v.tag===Fe&&v.memoizedState!==null){var re=v.child;re!==null&&(re.return=v),k1(r,v,!0,!0)}else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v=v,v===a)return;for(;v.sibling===null;){if(v.return===null||v.return===a)return;v=v.return}v.sibling.return=v.return,v=v.sibling}};Xd=function(r,a){var f=a.stateNode,m=L1(r,a);if(!m){var v=f.containerInfo,_=Vu(v);k1(_,a,!1,!1),f.pendingChildren=_,os(a),$a(v,_)}},sp=function(r,a,f,m,v){var _=r.stateNode,B=r.memoizedProps,F=L1(r,a);if(F&&B===m){a.stateNode=_;return}var H=a.stateNode,$=Dd(),re=null;if(B!==m&&(re=Cr(H,f,B,m,v,$)),F&&re===null){a.stateNode=_;return}var ye=Yu(_,re,f,B,m,a,F,H);xs(ye,f,m,v,$)&&os(a),a.stateNode=ye,F?os(a):Hd(ye,a,!1,!1)},op=function(r,a,f,m){if(f!==m){var v=a0(),_=Dd();a.stateNode=Uu(m,v,_,a),os(a)}else a.stateNode=r.stateNode}}else Xd=function(r,a){},sp=function(r,a,f,m,v){},op=function(r,a,f,m){};function Wd(r,a){if(!l())switch(r.tailMode){case"hidden":{for(var f=r.tail,m=null;f!==null;)f.alternate!==null&&(m=f),f=f.sibling;m===null?r.tail=null:m.sibling=null;break}case"collapsed":{for(var v=r.tail,_=null;v!==null;)v.alternate!==null&&(_=v),v=v.sibling;_===null?!a&&r.tail!==null?r.tail.sibling=null:r.tail=null:_.sibling=null;break}}}function Rr(r){var a=r.alternate!==null&&r.alternate.child===r.child,f=Be,m=st;if(a){if((r.mode&tn)!==mt){for(var H=r.selfBaseDuration,$=r.child;$!==null;)f=Pt(f,Pt($.lanes,$.childLanes)),m|=$.subtreeFlags&gi,m|=$.flags&gi,H+=$.treeBaseDuration,$=$.sibling;r.treeBaseDuration=H}else for(var re=r.child;re!==null;)f=Pt(f,Pt(re.lanes,re.childLanes)),m|=re.subtreeFlags&gi,m|=re.flags&gi,re.return=r,re=re.sibling;r.subtreeFlags|=m}else{if((r.mode&tn)!==mt){for(var v=r.actualDuration,_=r.selfBaseDuration,B=r.child;B!==null;)f=Pt(f,Pt(B.lanes,B.childLanes)),m|=B.subtreeFlags,m|=B.flags,v+=B.actualDuration,_+=B.treeBaseDuration,B=B.sibling;r.actualDuration=v,r.treeBaseDuration=_}else for(var F=r.child;F!==null;)f=Pt(f,Pt(F.lanes,F.childLanes)),m|=F.subtreeFlags,m|=F.flags,F.return=r,F=F.sibling;r.subtreeFlags|=m}return r.childLanes=f,a}function I5(r,a,f){if(qc()&&(a.mode&jt)!==mt&&(a.flags&Qt)===st)return xh(a),Co(),a.flags|=Ka|qo|tr,!1;var m=bl(a);if(f!==null&&f.dehydrated!==null)if(r===null){if(!m)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(vh(a),Rr(a),(a.mode&tn)!==mt){var v=f!==null;if(v){var _=a.child;_!==null&&(a.treeBaseDuration-=_.treeBaseDuration)}}return!1}else{if(Co(),(a.flags&Qt)===st&&(a.memoizedState=null),a.flags|=Ut,Rr(a),(a.mode&tn)!==mt){var B=f!==null;if(B){var F=a.child;F!==null&&(a.treeBaseDuration-=F.treeBaseDuration)}}return!1}else return o(),!0}function N1(r,a,f){var m=a.pendingProps;switch(Yc(a),a.tag){case J:case j:case ie:case I:case le:case X:case ae:case Ae:case L:case oe:return Rr(a),null;case Y:{var v=a.type;return Fr(v)&&dc(a),Rr(a),null}case q:{var _=a.stateNode;if(eu(a),Vn(a),u0(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),r===null||r.child===null){var B=bl(a);if(B)os(a);else if(r!==null){var F=r.memoizedState;(!F.isDehydrated||(a.flags&Ka)!==st)&&(a.flags|=Oi,o())}}return Xd(r,a),Rr(a),null}case V:{s0(a);var H=a0(),$=a.type;if(r!==null&&a.stateNode!=null)sp(r,a,$,m,H),r.ref!==a.ref&&D1(a);else{if(!m){if(a.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Rr(a),null}var re=Dd(),ye=bl(a);if(ye)wd(a,H,re)&&os(a);else{var Te=Mr($,m,H,re,a);Hd(Te,a,!1,!1),a.stateNode=Te,xs(Te,$,m,H,re)&&os(a)}a.ref!==null&&D1(a)}return Rr(a),null}case ge:{var Ne=m;if(r&&a.stateNode!=null){var Me=r.memoizedProps;op(r,a,Me,Ne)}else{if(typeof Ne!="string"&&a.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var Pe=a0(),ct=Dd(),bt=bl(a);bt?HA(a)&&os(a):a.stateNode=Uu(Ne,Pe,ct,a)}return Rr(a),null}case ne:{nu(a);var gt=a.memoizedState;if(r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){var cn=I5(r,a,gt);if(!cn)return a.flags&tr?a:null}if((a.flags&Qt)!==st)return a.lanes=f,(a.mode&tn)!==mt&&M0(a),a;var qt=gt!==null,Ce=r!==null&&r.memoizedState!==null;if(qt!==Ce&&qt){var Le=a.child;if(Le.flags|=gs,(a.mode&jt)!==mt){var we=r===null&&(a.memoizedProps.unstable_avoidThisFallback!==!0||!0);we||o0(Di.current,Rv)?n4():Pm()}}var Xe=a.updateQueue;if(Xe!==null&&(a.flags|=Ut),Rr(a),(a.mode&tn)!==mt&&qt){var ft=a.child;ft!==null&&(a.treeBaseDuration-=ft.treeBaseDuration)}return null}case W:return eu(a),Xd(r,a),r===null&&Zo(a.stateNode.containerInfo),Rr(a),null;case te:var at=a.type._context;return JA(at,a),Rr(a),null;case K:{var Xt=a.type;return Fr(Xt)&&dc(a),Rr(a),null}case xe:{nu(a);var _t=a.memoizedState;if(_t===null)return Rr(a),null;var en=(a.flags&Qt)!==st,Ot=_t.rendering;if(Ot===null)if(en)Wd(_t,!1);else{var yn=a4()&&(r===null||(r.flags&Qt)===st);if(!yn)for(var yt=a.child;yt!==null;){var Un=zh(yt);if(Un!==null){en=!0,a.flags|=Qt,Wd(_t,!1);var Yr=Un.updateQueue;return Yr!==null&&(a.updateQueue=Yr,a.flags|=Ut),a.subtreeFlags=st,Db(a,f),To(a,l0(Di.current,Ld)),a.child}yt=yt.sibling}_t.tail!==null&&zn()>ny()&&(a.flags|=Qt,en=!0,Wd(_t,!1),a.lanes=Ns)}else{if(!en){var Nr=zh(Ot);if(Nr!==null){a.flags|=Qt,en=!0;var Ha=Nr.updateQueue;if(Ha!==null&&(a.updateQueue=Ha,a.flags|=Ut),Wd(_t,!0),_t.tail===null&&_t.tailMode==="hidden"&&!Ot.alternate&&!l())return Rr(a),null}else zn()*2-_t.renderingStartTime>ny()&&f!==Ir&&(a.flags|=Qt,en=!0,Wd(_t,!1),a.lanes=Ns)}if(_t.isBackwards)Ot.sibling=a.child,a.child=Ot;else{var da=_t.last;da!==null?da.sibling=Ot:a.child=Ot,_t.last=Ot}}if(_t.tail!==null){var fa=_t.tail;_t.rendering=fa,_t.tail=fa.sibling,_t.renderingStartTime=zn(),fa.sibling=null;var Vr=Di.current;return en?Vr=l0(Vr,Ld):Vr=tu(Vr),To(a,Vr),fa}return Rr(a),null}case Re:break;case Fe:case pt:{Nm(a);var Vs=a.memoizedState,Au=Vs!==null;if(r!==null){var sf=r.memoizedState,fs=sf!==null;fs!==Au&&!R&&(a.flags|=gs)}return!Au||(a.mode&jt)===mt?Rr(a):vr(us,Ir)&&(Rr(a),Kr&&a.subtreeFlags&(un|Ut)&&(a.flags|=gs)),null}case lt:return null;case ut:return null}throw new Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function O5(r,a,f){switch(Yc(a),a.tag){case Y:{var m=a.type;Fr(m)&&dc(a);var v=a.flags;return v&tr?(a.flags=v&~tr|Qt,(a.mode&tn)!==mt&&M0(a),a):null}case q:{a.stateNode,eu(a),Vn(a),u0();var _=a.flags;return(_&tr)!==st&&(_&Qt)===st?(a.flags=_&~tr|Qt,a):null}case V:return s0(a),null;case ne:{nu(a);var B=a.memoizedState;if(B!==null&&B.dehydrated!==null){if(a.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Co()}var F=a.flags;return F&tr?(a.flags=F&~tr|Qt,(a.mode&tn)!==mt&&M0(a),a):null}case xe:return nu(a),null;case W:return eu(a),null;case te:var H=a.type._context;return JA(H,a),null;case Fe:case pt:return Nm(a),null;case lt:return null;default:return null}}function P1(r,a,f){switch(Yc(a),a.tag){case Y:{var m=a.type.childContextTypes;m!=null&&dc(a);break}case q:{a.stateNode,eu(a),Vn(a),u0();break}case V:{s0(a);break}case W:eu(a);break;case ne:nu(a);break;case xe:nu(a);break;case te:var v=a.type._context;JA(v,a);break;case Fe:case pt:Nm(a);break}}function B1(r,a,f,m,v,_,B,F,H){var $=Array.prototype.slice.call(arguments,3);try{a.apply(f,$)}catch(re){this.onError(re)}}var M1=B1;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var dm=document.createElement("react");M1=function(a,f,m,v,_,B,F,H,$){if(typeof document>"u"||document===null)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var re=document.createEvent("Event"),ye=!1,Te=!0,Ne=window.event,Me=Object.getOwnPropertyDescriptor(window,"event");function Pe(){dm.removeEventListener(Le,bt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Ne)}var ct=Array.prototype.slice.call(arguments,3);function bt(){ye=!0,Pe(),f.apply(m,ct),Te=!1}var gt,cn=!1,qt=!1;function Ce(we){if(gt=we.error,cn=!0,gt===null&&we.colno===0&&we.lineno===0&&(qt=!0),we.defaultPrevented&&gt!=null&&typeof gt=="object")try{gt._suppressLogging=!0}catch{}}var Le="react-"+(a||"invokeguardedcallback");if(window.addEventListener("error",Ce),dm.addEventListener(Le,bt,!1),re.initEvent(Le,!1,!1),dm.dispatchEvent(re),Me&&Object.defineProperty(window,"event",Me),ye&&Te&&(cn?qt&&(gt=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):gt=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(gt)),window.removeEventListener("error",Ce),!ye)return Pe(),B1.apply(this,arguments)}}var U5=M1,Qd=!1,lp=null,j5={onError:function(r){Qd=!0,lp=r}};function z1(r,a,f,m,v,_,B,F,H){Qd=!1,lp=null,U5.apply(j5,arguments)}function G5(){return Qd}function F1(){if(Qd){var r=lp;return Qd=!1,lp=null,r}else throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}var I1=null;I1=new Set;var cp=!1,Dr=!1,H5=typeof WeakSet=="function"?WeakSet:Set,ot=null,ou=null,lu=null;function X5(r){z1(null,function(){throw r}),F1()}var W5=function(r,a){if(a.props=r.memoizedProps,a.state=r.memoizedState,r.mode&tn)try{ss(),a.componentWillUnmount()}finally{is(r)}else a.componentWillUnmount()};function O1(r,a){try{Lo(lr,r)}catch(f){fn(r,a,f)}}function fm(r,a,f){try{W5(r,f)}catch(m){fn(r,a,m)}}function Q5(r,a,f){try{f.componentDidMount()}catch(m){fn(r,a,m)}}function U1(r,a){try{G1(r)}catch(f){fn(r,a,f)}}function cu(r,a){var f=r.ref;if(f!==null)if(typeof f=="function"){var m;try{if(M&&O&&r.mode&tn)try{ss(),m=f(null)}finally{is(r)}else m=f(null)}catch(v){fn(r,a,v)}typeof m=="function"&&u("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",it(r))}else f.current=null}function up(r,a,f){try{f()}catch(m){fn(r,a,m)}}var j1=!1;function Y5(r,a){ji(r.containerInfo),ot=a,V5();var f=j1;return j1=!1,f}function V5(){for(;ot!==null;){var r=ot,a=r.child;(r.subtreeFlags&Fu)!==st&&a!==null?(a.return=r,ot=a):q5()}}function q5(){for(;ot!==null;){var r=ot;Vt(r);try{K5(r)}catch(f){fn(r,r.return,f)}Bt();var a=r.sibling;if(a!==null){a.return=r.return,ot=a;return}ot=r.return}}function K5(r){var a=r.alternate,f=r.flags;if((f&Oi)!==st){switch(Vt(r),r.tag){case I:case le:case ie:break;case Y:{if(a!==null){var m=a.memoizedProps,v=a.memoizedState,_=r.stateNode;r.type===r.elementType&&!_l&&(_.props!==r.memoizedProps&&u("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",it(r)||"instance"),_.state!==r.memoizedState&&u("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",it(r)||"instance"));var B=_.getSnapshotBeforeUpdate(r.elementType===r.type?m:ki(r.type,m),v);{var F=I1;B===void 0&&!F.has(r.type)&&(F.add(r.type),u("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",it(r)))}_.__reactInternalSnapshotBeforeUpdate=B}break}case q:{if(Kr){var H=r.stateNode;$l(H.containerInfo)}break}case V:case ge:case W:case K:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Bt()}}function Pi(r,a,f){var m=a.updateQueue,v=m!==null?m.lastEffect:null;if(v!==null){var _=v.next,B=_;do{if((B.tag&r)===r){var F=B.destroy;B.destroy=void 0,F!==void 0&&((r&Tr)!==ba?Jn(a):(r&lr)!==ba&&Is(a),(r&ns)!==ba&&af(!0),up(a,f,F),(r&ns)!==ba&&af(!1),(r&Tr)!==ba?In():(r&lr)!==ba&&On())}B=B.next}while(B!==_)}}function Lo(r,a){var f=a.updateQueue,m=f!==null?f.lastEffect:null;if(m!==null){var v=m.next,_=v;do{if((_.tag&r)===r){(r&Tr)!==ba?Nn(a):(r&lr)!==ba&&ir(a);var B=_.create;(r&ns)!==ba&&af(!0),_.destroy=B(),(r&ns)!==ba&&af(!1),(r&Tr)!==ba?It():(r&lr)!==ba&&ia();{var F=_.destroy;if(F!==void 0&&typeof F!="function"){var H=void 0;(_.tag&lr)!==st?H="useLayoutEffect":(_.tag&ns)!==st?H="useInsertionEffect":H="useEffect";var $=void 0;F===null?$=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof F.then=="function"?$=`
446
+ Check the render method of \``+m+"`.");var v=m||"",_=r._debugSource;_&&(v=_.fileName+":"+_.lineNumber),em[v]||(em[v]=!0,u("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",f))}if(a.defaultProps!==void 0){var B=et(a)||"Unknown";jd[B]||(u("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",B),jd[B]=!0)}if(typeof a.getDerivedStateFromProps=="function"){var F=et(a)||"Unknown";$0[F]||(u("%s: Function components do not support getDerivedStateFromProps.",F),$0[F]=!0)}if(typeof a.contextType=="object"&&a.contextType!==null){var H=et(a)||"Unknown";Z0[H]||(u("%s: Function components do not support contextType.",H),Z0[H]=!0)}}}var im={dehydrated:null,treeContext:null,retryLane:Ln};function sm(r){return{baseLanes:r,cachePool:l5(),transitions:null}}function y5(r,a){var f=null;return{baseLanes:Pt(r.baseLanes,a),cachePool:f,transitions:r.transitions}}function x5(r,a,f,m){if(a!==null){var v=a.memoizedState;if(v===null)return!1}return o0(r,Ld)}function b5(r,a){return ra(r.childLanes,a)}function b1(r,a,f){var m=a.pendingProps;Ny(a)&&(a.flags|=Qt);var v=Di.current,_=!1,B=(a.flags&Qt)!==st;if(B||x5(v,r)?(_=!0,a.flags&=~Qt):(r===null||r.memoizedState!==null)&&(v=Ob(v,Rv)),v=tu(v),To(a,v),r===null){xl(a);var F=a.memoizedState;if(F!==null){var H=F.dehydrated;if(H!==null)return E5(a,H)}var $=m.children,re=m.fallback;if(_){var ye=S5(a,$,re,f),Te=a.child;return Te.memoizedState=sm(f),a.memoizedState=im,ye}else return om(a,$)}else{var Ne=r.memoizedState;if(Ne!==null){var Me=Ne.dehydrated;if(Me!==null)return T5(r,a,B,m,Me,Ne,f)}if(_){var Pe=m.fallback,ct=m.children,bt=C5(r,a,ct,Pe,f),gt=a.child,cn=r.child.memoizedState;return gt.memoizedState=cn===null?sm(f):y5(cn,f),gt.childLanes=b5(r,f),a.memoizedState=im,bt}else{var qt=m.children,Ce=w5(r,a,qt,f);return a.memoizedState=null,Ce}}}function om(r,a,f){var m=r.mode,v={mode:"visible",children:a},_=lm(v,m);return _.return=r,r.child=_,_}function S5(r,a,f,m){var v=r.mode,_=r.child,B={mode:"hidden",children:a},F,H;return(v&jt)===mt&&_!==null?(F=_,F.childLanes=Be,F.pendingProps=B,r.mode&tn&&(F.actualDuration=0,F.actualStartTime=-1,F.selfBaseDuration=0,F.treeBaseDuration=0),H=Bo(f,v,m,null)):(F=lm(B,v),H=Bo(f,v,m,null)),F.return=r,H.return=r,F.sibling=H,r.child=F,H}function lm(r,a,f){return wy(r,a,Be,null)}function S1(r,a){return Ll(r,a)}function w5(r,a,f,m){var v=r.child,_=v.sibling,B=S1(v,{mode:"visible",children:f});if((a.mode&jt)===mt&&(B.lanes=m),B.return=a,B.sibling=null,_!==null){var F=a.deletions;F===null?(a.deletions=[_],a.flags|=Ra):F.push(_)}return a.child=B,B}function C5(r,a,f,m,v){var _=a.mode,B=r.child,F=B.sibling,H={mode:"hidden",children:f},$;if((_&jt)===mt&&a.child!==B){var re=a.child;$=re,$.childLanes=Be,$.pendingProps=H,a.mode&tn&&($.actualDuration=0,$.actualStartTime=-1,$.selfBaseDuration=B.selfBaseDuration,$.treeBaseDuration=B.treeBaseDuration),a.deletions=null}else $=S1(B,H),$.subtreeFlags=B.subtreeFlags&gi;var ye;return F!==null?ye=Ll(F,m):(ye=Bo(m,_,v,null),ye.flags|=un),ye.return=a,$.return=a,$.sibling=ye,a.child=$,ye}function ap(r,a,f,m){m!==null&&g(m),Jc(a,r.child,null,f);var v=a.pendingProps,_=v.children,B=om(a,_);return B.flags|=un,a.memoizedState=null,B}function _5(r,a,f,m,v){var _=a.mode,B={mode:"visible",children:f},F=lm(B,_),H=Bo(m,_,v,null);return H.flags|=un,F.return=a,H.return=a,F.sibling=H,a.child=F,(a.mode&jt)!==mt&&Jc(a,r.child,null,v),H}function E5(r,a,f){return(r.mode&jt)===mt?(u("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),r.lanes=vt):Na(a)?r.lanes=Vi:r.lanes=Ir,null}function T5(r,a,f,m,v,_,B){if(f)if(a.flags&Ka){a.flags&=~Ka;var Ce=V0(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return ap(r,a,B,Ce)}else{if(a.memoizedState!==null)return a.child=r.child,a.flags|=Qt,null;var Le=m.children,we=m.fallback,Xe=_5(r,a,Le,we,B),ft=a.child;return ft.memoizedState=sm(B),a.memoizedState=im,Xe}else{if(jA(),(a.mode&jt)===mt)return ap(r,a,B,null);if(Na(v)){var F,H,$;{var re=xi(v);F=re.digest,H=re.message,$=re.stack}var ye;H?ye=new Error(H):ye=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var Te=V0(ye,F,$);return ap(r,a,B,Te)}var Ne=vr(B,r.childLanes);if(Ni||Ne){var Me=_p();if(Me!==null){var Pe=IA(Me,B);if(Pe!==Ln&&Pe!==_.retryLane){_.retryLane=Pe;var ct=dn;la(r,Pe),er(Me,r,Pe,ct)}}Pm();var bt=V0(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return ap(r,a,B,bt)}else if(Hi(v)){a.flags|=Qt,a.child=r.child;var gt=A4.bind(null,r);return Cs(v,gt),null}else{GA(a,v,_.treeContext);var cn=m.children,qt=om(a,cn);return qt.flags|=Ja,qt}}}function w1(r,a,f){r.lanes=Pt(r.lanes,a);var m=r.alternate;m!==null&&(m.lanes=Pt(m.lanes,a)),ZA(r.return,a,f)}function R5(r,a,f){for(var m=a;m!==null;){if(m.tag===ne){var v=m.memoizedState;v!==null&&w1(m,f,r)}else if(m.tag===xe)w1(m,f,r);else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===r)return;for(;m.sibling===null;){if(m.return===null||m.return===r)return;m=m.return}m.sibling.return=m.return,m=m.sibling}}function D5(r){for(var a=r,f=null;a!==null;){var m=a.alternate;m!==null&&zh(m)===null&&(f=a),a=a.sibling}return f}function L5(r){if(r!==void 0&&r!=="forwards"&&r!=="backwards"&&r!=="together"&&!tm[r])if(tm[r]=!0,typeof r=="string")switch(r.toLowerCase()){case"together":case"forwards":case"backwards":{u('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',r,r.toLowerCase());break}case"forward":case"backward":{u('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',r,r.toLowerCase());break}default:u('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',r);break}else u('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',r)}function k5(r,a){r!==void 0&&!rp[r]&&(r!=="collapsed"&&r!=="hidden"?(rp[r]=!0,u('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',r)):a!=="forwards"&&a!=="backwards"&&(rp[r]=!0,u('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',r)))}function C1(r,a){{var f=Qn(r),m=!f&&typeof qe(r)=="function";if(f||m){var v=f?"array":"iterable";return u("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",v,a,v),!1}}return!0}function N5(r,a){if((a==="forwards"||a==="backwards")&&r!==void 0&&r!==null&&r!==!1)if(Qn(r)){for(var f=0;f<r.length;f++)if(!C1(r[f],f))return}else{var m=qe(r);if(typeof m=="function"){var v=m.call(r);if(v)for(var _=v.next(),B=0;!_.done;_=v.next()){if(!C1(_.value,B))return;B++}}else u('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',a)}}function cm(r,a,f,m,v){var _=r.memoizedState;_===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:f,tailMode:v}:(_.isBackwards=a,_.rendering=null,_.renderingStartTime=0,_.last=m,_.tail=f,_.tailMode=v)}function _1(r,a,f){var m=a.pendingProps,v=m.revealOrder,_=m.tail,B=m.children;L5(v),k5(_,v),N5(B,v),ca(r,a,B,f);var F=Di.current,H=o0(F,Ld);if(H)F=l0(F,Ld),a.flags|=Qt;else{var $=r!==null&&(r.flags&Qt)!==st;$&&R5(a,a.child,f),F=tu(F)}if(To(a,F),(a.mode&jt)===mt)a.memoizedState=null;else switch(v){case"forwards":{var re=D5(a.child),ye;re===null?(ye=a.child,a.child=null):(ye=re.sibling,re.sibling=null),cm(a,!1,ye,re,_);break}case"backwards":{var Te=null,Ne=a.child;for(a.child=null;Ne!==null;){var Me=Ne.alternate;if(Me!==null&&zh(Me)===null){a.child=Ne;break}var Pe=Ne.sibling;Ne.sibling=Te,Te=Ne,Ne=Pe}cm(a,!0,Te,null,_);break}case"together":{cm(a,!1,null,null,void 0);break}default:a.memoizedState=null}return a.child}function P5(r,a,f){i0(a,a.stateNode.containerInfo);var m=a.pendingProps;return r===null?a.child=Jc(a,null,m,f):ca(r,a,m,f),a.child}var E1=!1;function B5(r,a,f){var m=a.type,v=m._context,_=a.pendingProps,B=a.memoizedProps,F=_.value;{"value"in _||E1||(E1=!0,u("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var H=a.type.propTypes;H&&ta(H,_,"prop","Context.Provider")}if(yv(a,v,F),B!==null){var $=B.value;if(xr($,F)){if(B.children===_.children&&!Yi())return Ws(r,a,f)}else Lb(a,v,f)}var re=_.children;return ca(r,a,re,f),a.child}var T1=!1;function M5(r,a,f){var m=a.type;m._context===void 0?m!==m.Consumer&&(T1||(T1=!0,u("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):m=m._context;var v=a.pendingProps,_=v.children;typeof _!="function"&&u("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),$c(a,f);var B=Zn(m);Ji(a);var F;return Od.current=a,Se(!0),F=_(B),Se(!1),Zi(),a.flags|=En,ca(r,a,F,f),a.child}function Gd(){Ni=!0}function ip(r,a){(a.mode&jt)===mt&&r!==null&&(r.alternate=null,a.alternate=null,a.flags|=un)}function Ws(r,a,f){return r!==null&&(a.dependencies=r.dependencies),n1(),nf(a.lanes),vr(f,a.childLanes)?(Rb(r,a),a.child):null}function z5(r,a,f){{var m=a.return;if(m===null)throw new Error("Cannot swap the root fiber.");if(r.alternate=null,a.alternate=null,f.index=a.index,f.sibling=a.sibling,f.return=a.return,f.ref=a.ref,a===m.child)m.child=f;else{var v=m.child;if(v===null)throw new Error("Expected parent to have a child.");for(;v.sibling!==a;)if(v=v.sibling,v===null)throw new Error("Expected to find the previous sibling.");v.sibling=f}var _=m.deletions;return _===null?(m.deletions=[r],m.flags|=Ra):_.push(r),f.flags|=un,f}}function um(r,a){var f=r.lanes;return!!vr(f,a)}function F5(r,a,f){switch(a.tag){case q:y1(a),a.stateNode,Co();break;case V:Ev(a);break;case Y:{var m=a.type;Fr(m)&&uo(a);break}case W:i0(a,a.stateNode.containerInfo);break;case te:{var v=a.memoizedProps.value,_=a.type._context;yv(a,_,v);break}case Ae:{var B=vr(f,a.childLanes);B&&(a.flags|=Ut);{var F=a.stateNode;F.effectDuration=0,F.passiveEffectDuration=0}}break;case ne:{var H=a.memoizedState;if(H!==null){if(H.dehydrated!==null)return To(a,tu(Di.current)),a.flags|=Qt,null;var $=a.child,re=$.childLanes;if(vr(f,re))return b1(r,a,f);To(a,tu(Di.current));var ye=Ws(r,a,f);return ye!==null?ye.sibling:null}else To(a,tu(Di.current));break}case xe:{var Te=(r.flags&Qt)!==st,Ne=vr(f,a.childLanes);if(Te){if(Ne)return _1(r,a,f);a.flags|=Qt}var Me=a.memoizedState;if(Me!==null&&(Me.rendering=null,Me.tail=null,Me.lastEffect=null),To(a,Di.current),Ne)break;return null}case Fe:case pt:return a.lanes=Be,m1(r,a,f)}return Ws(r,a,f)}function R1(r,a,f){if(a._debugNeedsRemount&&r!==null)return z5(r,a,Hm(a.type,a.key,a.pendingProps,a._debugOwner||null,a.mode,a.lanes));if(r!==null){var m=r.memoizedProps,v=a.pendingProps;if(m!==v||Yi()||a.type!==r.type)Ni=!0;else{var _=um(r,f);if(!_&&(a.flags&Qt)===st)return Ni=!1,F5(r,a,f);(r.flags&Bu)!==st?Ni=!0:Ni=!1}}else if(Ni=!1,l()&&bd(a)){var B=a.index,F=js();Wc(a,F,B)}switch(a.lanes=Be,a.tag){case J:return v5(r,a,a.type,f);case j:{var H=a.elementType;return m5(r,a,H,f)}case I:{var $=a.type,re=a.pendingProps,ye=a.elementType===$?re:ki($,re);return nm(r,a,$,ye,f)}case Y:{var Te=a.type,Ne=a.pendingProps,Me=a.elementType===Te?Ne:ki(Te,Ne);return v1(r,a,Te,Me,f)}case q:return h5(r,a,f);case V:return p5(r,a,f);case ge:return A5(r,a);case ne:return b1(r,a,f);case W:return P5(r,a,f);case le:{var Pe=a.type,ct=a.pendingProps,bt=a.elementType===Pe?ct:ki(Pe,ct);return h1(r,a,Pe,bt,f)}case X:return u5(r,a,f);case ae:return d5(r,a,f);case Ae:return f5(r,a,f);case te:return B5(r,a,f);case L:return M5(r,a,f);case se:{var gt=a.type,cn=a.pendingProps,qt=ki(gt,cn);if(a.type!==a.elementType){var Ce=gt.propTypes;Ce&&ta(Ce,qt,"prop",et(gt))}return qt=ki(gt.type,qt),p1(r,a,gt,qt,f)}case ie:return A1(r,a,a.type,a.pendingProps,f);case K:{var Le=a.type,we=a.pendingProps,Xe=a.elementType===Le?we:ki(Le,we);return g5(r,a,Le,Xe,f)}case xe:return _1(r,a,f);case Re:break;case Fe:return m1(r,a,f)}throw new Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function os(r){r.flags|=Ut}function D1(r){r.flags|=ms,r.flags|=no}function L1(r,a){var f=r!==null&&r.child===a.child;if(f)return!0;if((a.flags&Ra)!==st)return!1;for(var m=a.child;m!==null;){if((m.flags&Ko)!==st||(m.subtreeFlags&Ko)!==st)return!1;m=m.sibling}return!0}var Hd,Xd,sp,op;if(Kr)Hd=function(r,a,f,m){for(var v=a.child;v!==null;){if(v.tag===V||v.tag===ge)vi(r,v.stateNode);else if(v.tag!==W){if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===a)return;for(;v.sibling===null;){if(v.return===null||v.return===a)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},Xd=function(r,a){},sp=function(r,a,f,m,v){var _=r.memoizedProps;if(_!==m){var B=a.stateNode,F=Dd(),H=Cr(B,f,_,m,v,F);a.updateQueue=H,H&&os(a)}},op=function(r,a,f,m){f!==m&&os(a)};else if(ql){Hd=function(r,a,f,m){for(var v=a.child;v!==null;){if(v.tag===V){var _=v.stateNode;if(f&&m){var B=v.memoizedProps,F=v.type;_=ws(_,F,B,v)}vi(r,_)}else if(v.tag===ge){var H=v.stateNode;if(f&&m){var $=v.memoizedProps;H=el(H,$,v)}vi(r,H)}else if(v.tag!==W){if(v.tag===Fe&&v.memoizedState!==null){var re=v.child;re!==null&&(re.return=v),Hd(r,v,!0,!0)}else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v=v,v===a)return;for(;v.sibling===null;){if(v.return===null||v.return===a)return;v=v.return}v.sibling.return=v.return,v=v.sibling}};var k1=function(r,a,f,m){for(var v=a.child;v!==null;){if(v.tag===V){var _=v.stateNode;if(f&&m){var B=v.memoizedProps,F=v.type;_=ws(_,F,B,v)}Of(r,_)}else if(v.tag===ge){var H=v.stateNode;if(f&&m){var $=v.memoizedProps;H=el(H,$,v)}Of(r,H)}else if(v.tag!==W){if(v.tag===Fe&&v.memoizedState!==null){var re=v.child;re!==null&&(re.return=v),k1(r,v,!0,!0)}else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v=v,v===a)return;for(;v.sibling===null;){if(v.return===null||v.return===a)return;v=v.return}v.sibling.return=v.return,v=v.sibling}};Xd=function(r,a){var f=a.stateNode,m=L1(r,a);if(!m){var v=f.containerInfo,_=Vu(v);k1(_,a,!1,!1),f.pendingChildren=_,os(a),$a(v,_)}},sp=function(r,a,f,m,v){var _=r.stateNode,B=r.memoizedProps,F=L1(r,a);if(F&&B===m){a.stateNode=_;return}var H=a.stateNode,$=Dd(),re=null;if(B!==m&&(re=Cr(H,f,B,m,v,$)),F&&re===null){a.stateNode=_;return}var ye=Yu(_,re,f,B,m,a,F,H);xs(ye,f,m,v,$)&&os(a),a.stateNode=ye,F?os(a):Hd(ye,a,!1,!1)},op=function(r,a,f,m){if(f!==m){var v=a0(),_=Dd();a.stateNode=Uu(m,v,_,a),os(a)}else a.stateNode=r.stateNode}}else Xd=function(r,a){},sp=function(r,a,f,m,v){},op=function(r,a,f,m){};function Wd(r,a){if(!l())switch(r.tailMode){case"hidden":{for(var f=r.tail,m=null;f!==null;)f.alternate!==null&&(m=f),f=f.sibling;m===null?r.tail=null:m.sibling=null;break}case"collapsed":{for(var v=r.tail,_=null;v!==null;)v.alternate!==null&&(_=v),v=v.sibling;_===null?!a&&r.tail!==null?r.tail.sibling=null:r.tail=null:_.sibling=null;break}}}function Rr(r){var a=r.alternate!==null&&r.alternate.child===r.child,f=Be,m=st;if(a){if((r.mode&tn)!==mt){for(var H=r.selfBaseDuration,$=r.child;$!==null;)f=Pt(f,Pt($.lanes,$.childLanes)),m|=$.subtreeFlags&gi,m|=$.flags&gi,H+=$.treeBaseDuration,$=$.sibling;r.treeBaseDuration=H}else for(var re=r.child;re!==null;)f=Pt(f,Pt(re.lanes,re.childLanes)),m|=re.subtreeFlags&gi,m|=re.flags&gi,re.return=r,re=re.sibling;r.subtreeFlags|=m}else{if((r.mode&tn)!==mt){for(var v=r.actualDuration,_=r.selfBaseDuration,B=r.child;B!==null;)f=Pt(f,Pt(B.lanes,B.childLanes)),m|=B.subtreeFlags,m|=B.flags,v+=B.actualDuration,_+=B.treeBaseDuration,B=B.sibling;r.actualDuration=v,r.treeBaseDuration=_}else for(var F=r.child;F!==null;)f=Pt(f,Pt(F.lanes,F.childLanes)),m|=F.subtreeFlags,m|=F.flags,F.return=r,F=F.sibling;r.subtreeFlags|=m}return r.childLanes=f,a}function I5(r,a,f){if(qc()&&(a.mode&jt)!==mt&&(a.flags&Qt)===st)return xh(a),Co(),a.flags|=Ka|qo|tr,!1;var m=bl(a);if(f!==null&&f.dehydrated!==null)if(r===null){if(!m)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(vh(a),Rr(a),(a.mode&tn)!==mt){var v=f!==null;if(v){var _=a.child;_!==null&&(a.treeBaseDuration-=_.treeBaseDuration)}}return!1}else{if(Co(),(a.flags&Qt)===st&&(a.memoizedState=null),a.flags|=Ut,Rr(a),(a.mode&tn)!==mt){var B=f!==null;if(B){var F=a.child;F!==null&&(a.treeBaseDuration-=F.treeBaseDuration)}}return!1}else return o(),!0}function N1(r,a,f){var m=a.pendingProps;switch(Yc(a),a.tag){case J:case j:case ie:case I:case le:case X:case ae:case Ae:case L:case se:return Rr(a),null;case Y:{var v=a.type;return Fr(v)&&dc(a),Rr(a),null}case q:{var _=a.stateNode;if(eu(a),Vn(a),u0(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),r===null||r.child===null){var B=bl(a);if(B)os(a);else if(r!==null){var F=r.memoizedState;(!F.isDehydrated||(a.flags&Ka)!==st)&&(a.flags|=Oi,o())}}return Xd(r,a),Rr(a),null}case V:{s0(a);var H=a0(),$=a.type;if(r!==null&&a.stateNode!=null)sp(r,a,$,m,H),r.ref!==a.ref&&D1(a);else{if(!m){if(a.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Rr(a),null}var re=Dd(),ye=bl(a);if(ye)wd(a,H,re)&&os(a);else{var Te=Mr($,m,H,re,a);Hd(Te,a,!1,!1),a.stateNode=Te,xs(Te,$,m,H,re)&&os(a)}a.ref!==null&&D1(a)}return Rr(a),null}case ge:{var Ne=m;if(r&&a.stateNode!=null){var Me=r.memoizedProps;op(r,a,Me,Ne)}else{if(typeof Ne!="string"&&a.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var Pe=a0(),ct=Dd(),bt=bl(a);bt?HA(a)&&os(a):a.stateNode=Uu(Ne,Pe,ct,a)}return Rr(a),null}case ne:{nu(a);var gt=a.memoizedState;if(r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){var cn=I5(r,a,gt);if(!cn)return a.flags&tr?a:null}if((a.flags&Qt)!==st)return a.lanes=f,(a.mode&tn)!==mt&&M0(a),a;var qt=gt!==null,Ce=r!==null&&r.memoizedState!==null;if(qt!==Ce&&qt){var Le=a.child;if(Le.flags|=gs,(a.mode&jt)!==mt){var we=r===null&&(a.memoizedProps.unstable_avoidThisFallback!==!0||!0);we||o0(Di.current,Rv)?n4():Pm()}}var Xe=a.updateQueue;if(Xe!==null&&(a.flags|=Ut),Rr(a),(a.mode&tn)!==mt&&qt){var ft=a.child;ft!==null&&(a.treeBaseDuration-=ft.treeBaseDuration)}return null}case W:return eu(a),Xd(r,a),r===null&&Zo(a.stateNode.containerInfo),Rr(a),null;case te:var at=a.type._context;return JA(at,a),Rr(a),null;case K:{var Xt=a.type;return Fr(Xt)&&dc(a),Rr(a),null}case xe:{nu(a);var _t=a.memoizedState;if(_t===null)return Rr(a),null;var en=(a.flags&Qt)!==st,Ot=_t.rendering;if(Ot===null)if(en)Wd(_t,!1);else{var yn=a4()&&(r===null||(r.flags&Qt)===st);if(!yn)for(var yt=a.child;yt!==null;){var Un=zh(yt);if(Un!==null){en=!0,a.flags|=Qt,Wd(_t,!1);var Yr=Un.updateQueue;return Yr!==null&&(a.updateQueue=Yr,a.flags|=Ut),a.subtreeFlags=st,Db(a,f),To(a,l0(Di.current,Ld)),a.child}yt=yt.sibling}_t.tail!==null&&zn()>ny()&&(a.flags|=Qt,en=!0,Wd(_t,!1),a.lanes=Ns)}else{if(!en){var Nr=zh(Ot);if(Nr!==null){a.flags|=Qt,en=!0;var Ha=Nr.updateQueue;if(Ha!==null&&(a.updateQueue=Ha,a.flags|=Ut),Wd(_t,!0),_t.tail===null&&_t.tailMode==="hidden"&&!Ot.alternate&&!l())return Rr(a),null}else zn()*2-_t.renderingStartTime>ny()&&f!==Ir&&(a.flags|=Qt,en=!0,Wd(_t,!1),a.lanes=Ns)}if(_t.isBackwards)Ot.sibling=a.child,a.child=Ot;else{var da=_t.last;da!==null?da.sibling=Ot:a.child=Ot,_t.last=Ot}}if(_t.tail!==null){var fa=_t.tail;_t.rendering=fa,_t.tail=fa.sibling,_t.renderingStartTime=zn(),fa.sibling=null;var Vr=Di.current;return en?Vr=l0(Vr,Ld):Vr=tu(Vr),To(a,Vr),fa}return Rr(a),null}case Re:break;case Fe:case pt:{Nm(a);var Vs=a.memoizedState,Au=Vs!==null;if(r!==null){var sf=r.memoizedState,fs=sf!==null;fs!==Au&&!R&&(a.flags|=gs)}return!Au||(a.mode&jt)===mt?Rr(a):vr(us,Ir)&&(Rr(a),Kr&&a.subtreeFlags&(un|Ut)&&(a.flags|=gs)),null}case lt:return null;case ut:return null}throw new Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function O5(r,a,f){switch(Yc(a),a.tag){case Y:{var m=a.type;Fr(m)&&dc(a);var v=a.flags;return v&tr?(a.flags=v&~tr|Qt,(a.mode&tn)!==mt&&M0(a),a):null}case q:{a.stateNode,eu(a),Vn(a),u0();var _=a.flags;return(_&tr)!==st&&(_&Qt)===st?(a.flags=_&~tr|Qt,a):null}case V:return s0(a),null;case ne:{nu(a);var B=a.memoizedState;if(B!==null&&B.dehydrated!==null){if(a.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Co()}var F=a.flags;return F&tr?(a.flags=F&~tr|Qt,(a.mode&tn)!==mt&&M0(a),a):null}case xe:return nu(a),null;case W:return eu(a),null;case te:var H=a.type._context;return JA(H,a),null;case Fe:case pt:return Nm(a),null;case lt:return null;default:return null}}function P1(r,a,f){switch(Yc(a),a.tag){case Y:{var m=a.type.childContextTypes;m!=null&&dc(a);break}case q:{a.stateNode,eu(a),Vn(a),u0();break}case V:{s0(a);break}case W:eu(a);break;case ne:nu(a);break;case xe:nu(a);break;case te:var v=a.type._context;JA(v,a);break;case Fe:case pt:Nm(a);break}}function B1(r,a,f,m,v,_,B,F,H){var $=Array.prototype.slice.call(arguments,3);try{a.apply(f,$)}catch(re){this.onError(re)}}var M1=B1;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var dm=document.createElement("react");M1=function(a,f,m,v,_,B,F,H,$){if(typeof document>"u"||document===null)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var re=document.createEvent("Event"),ye=!1,Te=!0,Ne=window.event,Me=Object.getOwnPropertyDescriptor(window,"event");function Pe(){dm.removeEventListener(Le,bt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Ne)}var ct=Array.prototype.slice.call(arguments,3);function bt(){ye=!0,Pe(),f.apply(m,ct),Te=!1}var gt,cn=!1,qt=!1;function Ce(we){if(gt=we.error,cn=!0,gt===null&&we.colno===0&&we.lineno===0&&(qt=!0),we.defaultPrevented&&gt!=null&&typeof gt=="object")try{gt._suppressLogging=!0}catch{}}var Le="react-"+(a||"invokeguardedcallback");if(window.addEventListener("error",Ce),dm.addEventListener(Le,bt,!1),re.initEvent(Le,!1,!1),dm.dispatchEvent(re),Me&&Object.defineProperty(window,"event",Me),ye&&Te&&(cn?qt&&(gt=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):gt=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(gt)),window.removeEventListener("error",Ce),!ye)return Pe(),B1.apply(this,arguments)}}var U5=M1,Qd=!1,lp=null,j5={onError:function(r){Qd=!0,lp=r}};function z1(r,a,f,m,v,_,B,F,H){Qd=!1,lp=null,U5.apply(j5,arguments)}function G5(){return Qd}function F1(){if(Qd){var r=lp;return Qd=!1,lp=null,r}else throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}var I1=null;I1=new Set;var cp=!1,Dr=!1,H5=typeof WeakSet=="function"?WeakSet:Set,ot=null,ou=null,lu=null;function X5(r){z1(null,function(){throw r}),F1()}var W5=function(r,a){if(a.props=r.memoizedProps,a.state=r.memoizedState,r.mode&tn)try{ss(),a.componentWillUnmount()}finally{is(r)}else a.componentWillUnmount()};function O1(r,a){try{Lo(lr,r)}catch(f){fn(r,a,f)}}function fm(r,a,f){try{W5(r,f)}catch(m){fn(r,a,m)}}function Q5(r,a,f){try{f.componentDidMount()}catch(m){fn(r,a,m)}}function U1(r,a){try{G1(r)}catch(f){fn(r,a,f)}}function cu(r,a){var f=r.ref;if(f!==null)if(typeof f=="function"){var m;try{if(M&&O&&r.mode&tn)try{ss(),m=f(null)}finally{is(r)}else m=f(null)}catch(v){fn(r,a,v)}typeof m=="function"&&u("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",it(r))}else f.current=null}function up(r,a,f){try{f()}catch(m){fn(r,a,m)}}var j1=!1;function Y5(r,a){ji(r.containerInfo),ot=a,V5();var f=j1;return j1=!1,f}function V5(){for(;ot!==null;){var r=ot,a=r.child;(r.subtreeFlags&Fu)!==st&&a!==null?(a.return=r,ot=a):q5()}}function q5(){for(;ot!==null;){var r=ot;Vt(r);try{K5(r)}catch(f){fn(r,r.return,f)}Bt();var a=r.sibling;if(a!==null){a.return=r.return,ot=a;return}ot=r.return}}function K5(r){var a=r.alternate,f=r.flags;if((f&Oi)!==st){switch(Vt(r),r.tag){case I:case le:case ie:break;case Y:{if(a!==null){var m=a.memoizedProps,v=a.memoizedState,_=r.stateNode;r.type===r.elementType&&!_l&&(_.props!==r.memoizedProps&&u("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",it(r)||"instance"),_.state!==r.memoizedState&&u("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",it(r)||"instance"));var B=_.getSnapshotBeforeUpdate(r.elementType===r.type?m:ki(r.type,m),v);{var F=I1;B===void 0&&!F.has(r.type)&&(F.add(r.type),u("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",it(r)))}_.__reactInternalSnapshotBeforeUpdate=B}break}case q:{if(Kr){var H=r.stateNode;$l(H.containerInfo)}break}case V:case ge:case W:case K:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Bt()}}function Pi(r,a,f){var m=a.updateQueue,v=m!==null?m.lastEffect:null;if(v!==null){var _=v.next,B=_;do{if((B.tag&r)===r){var F=B.destroy;B.destroy=void 0,F!==void 0&&((r&Tr)!==ba?Jn(a):(r&lr)!==ba&&Is(a),(r&ns)!==ba&&af(!0),up(a,f,F),(r&ns)!==ba&&af(!1),(r&Tr)!==ba?In():(r&lr)!==ba&&On())}B=B.next}while(B!==_)}}function Lo(r,a){var f=a.updateQueue,m=f!==null?f.lastEffect:null;if(m!==null){var v=m.next,_=v;do{if((_.tag&r)===r){(r&Tr)!==ba?Nn(a):(r&lr)!==ba&&ir(a);var B=_.create;(r&ns)!==ba&&af(!0),_.destroy=B(),(r&ns)!==ba&&af(!1),(r&Tr)!==ba?It():(r&lr)!==ba&&ia();{var F=_.destroy;if(F!==void 0&&typeof F!="function"){var H=void 0;(_.tag&lr)!==st?H="useLayoutEffect":(_.tag&ns)!==st?H="useInsertionEffect":H="useEffect";var $=void 0;F===null?$=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof F.then=="function"?$=`
447
447
 
448
448
  It looks like you wrote `+H+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
449
449
 
@@ -456,7 +456,7 @@ It looks like you wrote `+H+`(async () => ...) or returned a Promise. Instead, w
456
456
  fetchData();
457
457
  }, [someId]); // Or [] if effect doesn't need props or state
458
458
 
459
- Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:$=" You returned: "+F,u("%s must not return anything besides a function, which is used for clean-up.%s",H,$)}}}_=_.next}while(_!==v)}}function J5(r,a){if((a.flags&Ut)!==st)switch(a.tag){case Ae:{var f=a.stateNode.passiveEffectDuration,m=a.memoizedProps,v=m.id,_=m.onPostCommit,B=e1(),F=a.alternate===null?"mount":"update";$v()&&(F="nested-update"),typeof _=="function"&&_(v,F,f,B);var H=a.return;e:for(;H!==null;){switch(H.tag){case q:var $=H.stateNode;$.passiveEffectDuration+=f;break e;case Ae:var re=H.stateNode;re.passiveEffectDuration+=f;break e}H=H.return}break}}}function Z5(r,a,f,m){if((f.flags&Jo)!==st)switch(f.tag){case I:case le:case ie:{if(!Dr)if(f.mode&tn)try{ss(),Lo(lr|or,f)}finally{is(f)}else Lo(lr|or,f);break}case Y:{var v=f.stateNode;if(f.flags&Ut&&!Dr)if(a===null)if(f.type===f.elementType&&!_l&&(v.props!==f.memoizedProps&&u("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",it(f)||"instance"),v.state!==f.memoizedState&&u("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",it(f)||"instance")),f.mode&tn)try{ss(),v.componentDidMount()}finally{is(f)}else v.componentDidMount();else{var _=f.elementType===f.type?a.memoizedProps:ki(f.type,a.memoizedProps),B=a.memoizedState;if(f.type===f.elementType&&!_l&&(v.props!==f.memoizedProps&&u("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",it(f)||"instance"),v.state!==f.memoizedState&&u("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",it(f)||"instance")),f.mode&tn)try{ss(),v.componentDidUpdate(_,B,v.__reactInternalSnapshotBeforeUpdate)}finally{is(f)}else v.componentDidUpdate(_,B,v.__reactInternalSnapshotBeforeUpdate)}var F=f.updateQueue;F!==null&&(f.type===f.elementType&&!_l&&(v.props!==f.memoizedProps&&u("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",it(f)||"instance"),v.state!==f.memoizedState&&u("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",it(f)||"instance")),_v(f,F,v));break}case q:{var H=f.updateQueue;if(H!==null){var $=null;if(f.child!==null)switch(f.child.tag){case V:$=Za(f.child.stateNode);break;case Y:$=f.child.stateNode;break}_v(f,H,$)}break}case V:{var re=f.stateNode;if(a===null&&f.flags&Ut){var ye=f.type,Te=f.memoizedProps;Yn(re,ye,Te,f)}break}case ge:break;case W:break;case Ae:{{var Ne=f.memoizedProps,Me=Ne.onCommit,Pe=Ne.onRender,ct=f.stateNode.effectDuration,bt=e1(),gt=a===null?"mount":"update";$v()&&(gt="nested-update"),typeof Pe=="function"&&Pe(f.memoizedProps.id,gt,f.actualDuration,f.treeBaseDuration,f.actualStartTime,bt);{typeof Me=="function"&&Me(f.memoizedProps.id,gt,ct,bt),c4(f);var cn=f.return;e:for(;cn!==null;){switch(cn.tag){case q:var qt=cn.stateNode;qt.effectDuration+=ct;break e;case Ae:var Ce=cn.stateNode;Ce.effectDuration+=ct;break e}cn=cn.return}}}break}case ne:{o3(r,f);break}case xe:case K:case Re:case Fe:case pt:case ut:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Dr||f.flags&ms&&G1(f)}function $5(r){switch(r.tag){case I:case le:case ie:{if(r.mode&tn)try{ss(),O1(r,r.return)}finally{is(r)}else O1(r,r.return);break}case Y:{var a=r.stateNode;typeof a.componentDidMount=="function"&&Q5(r,r.return,a),U1(r,r.return);break}case V:{U1(r,r.return);break}}}function e3(r,a){var f=null;if(Kr)for(var m=r;;){if(m.tag===V){if(f===null){f=m;try{var v=m.stateNode;a?BA(v):ka(m.stateNode,m.memoizedProps)}catch(B){fn(r,r.return,B)}}}else if(m.tag===ge){if(f===null)try{var _=m.stateNode;a?MA(_):yi(_,m.memoizedProps)}catch(B){fn(r,r.return,B)}}else if(!((m.tag===Fe||m.tag===pt)&&m.memoizedState!==null&&m!==r)){if(m.child!==null){m.child.return=m,m=m.child;continue}}if(m===r)return;for(;m.sibling===null;){if(m.return===null||m.return===r)return;f===m&&(f=null),m=m.return}f===m&&(f=null),m.sibling.return=m.return,m=m.sibling}}function G1(r){var a=r.ref;if(a!==null){var f=r.stateNode,m;switch(r.tag){case V:m=Za(f);break;default:m=f}if(typeof a=="function"){var v;if(r.mode&tn)try{ss(),v=a(m)}finally{is(r)}else v=a(m);typeof v=="function"&&u("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",it(r))}else a.hasOwnProperty("current")||u("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",it(r)),a.current=m}}function t3(r){var a=r.alternate;a!==null&&(a.return=null),r.return=null}function H1(r){var a=r.alternate;a!==null&&(r.alternate=null,H1(a));{if(r.child=null,r.deletions=null,r.sibling=null,r.tag===V){var f=r.stateNode;f!==null&&TA(f)}r.stateNode=null,r._debugOwner=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}}function n3(r){if(ql){var a=r.stateNode,f=a.containerInfo,m=Vu(f);Gi(f,m)}}function r3(r){for(var a=r.return;a!==null;){if(X1(a))return a;a=a.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function X1(r){return r.tag===V||r.tag===q||r.tag===W}function W1(r){var a=r;e:for(;;){for(;a.sibling===null;){if(a.return===null||X1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==V&&a.tag!==ge&&a.tag!==ve;){if(a.flags&un||a.child===null||a.tag===W)continue e;a.child.return=a,a=a.child}if(!(a.flags&un))return a.stateNode}}function a3(r){if(Kr){var a=r3(r);switch(a.tag){case V:{var f=a.stateNode;a.flags&Da&&(La(f),a.flags&=~Da);var m=W1(r);pm(r,m,f);break}case q:case W:{var v=a.stateNode.containerInfo,_=W1(r);hm(r,_,v);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function hm(r,a,f){var m=r.tag,v=m===V||m===ge;if(v){var _=r.stateNode;a?Qu(f,_,a):LA(f,_)}else if(m!==W){var B=r.child;if(B!==null){hm(B,a,f);for(var F=B.sibling;F!==null;)hm(F,a,f),F=F.sibling}}}function pm(r,a,f){var m=r.tag,v=m===V||m===ge;if(v){var _=r.stateNode;a?NA(f,_,a):If(f,_)}else if(m!==W){var B=r.child;if(B!==null){pm(B,a,f);for(var F=B.sibling;F!==null;)pm(F,a,f),F=F.sibling}}}var Lr=null,Bi=!1;function i3(r,a,f){if(Kr){var m=a;e:for(;m!==null;){switch(m.tag){case V:{Lr=m.stateNode,Bi=!1;break e}case q:{Lr=m.stateNode.containerInfo,Bi=!0;break e}case W:{Lr=m.stateNode.containerInfo,Bi=!0;break e}}m=m.return}if(Lr===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Am(r,a,f),Lr=null,Bi=!1}else Am(r,a,f);t3(f)}function ls(r,a,f){for(var m=f.child;m!==null;)Am(r,a,m),m=m.sibling}function Am(r,a,f){switch(md(f),f.tag){case V:Dr||cu(f,a);case ge:{if(Kr){var m=Lr,v=Bi;Lr=null,ls(r,a,f),Lr=m,Bi=v,Lr!==null&&(Bi?Zl(Lr,f.stateNode):PA(Lr,f.stateNode))}else ls(r,a,f);return}case ve:{Kr&&Lr!==null&&(Bi?Zu(Lr,f.stateNode):Ju(Lr,f.stateNode));return}case W:{if(Kr){var _=Lr,B=Bi;Lr=f.stateNode.containerInfo,Bi=!0,ls(r,a,f),Lr=_,Bi=B}else n3(f),ls(r,a,f);return}case I:case le:case oe:case ie:{if(!Dr){var F=f.updateQueue;if(F!==null){var H=F.lastEffect;if(H!==null){var $=H.next,re=$;do{var ye=re,Te=ye.destroy,Ne=ye.tag;Te!==void 0&&((Ne&ns)!==ba?up(f,a,Te):(Ne&lr)!==ba&&(Is(f),f.mode&tn?(ss(),up(f,a,Te),is(f)):up(f,a,Te),On())),re=re.next}while(re!==$)}}}ls(r,a,f);return}case Y:{if(!Dr){cu(f,a);var Me=f.stateNode;typeof Me.componentWillUnmount=="function"&&fm(f,a,Me)}ls(r,a,f);return}case Re:{ls(r,a,f);return}case Fe:{if(f.mode&jt){var Pe=Dr;Dr=Pe||f.memoizedState!==null,ls(r,a,f),Dr=Pe}else ls(r,a,f);break}default:{ls(r,a,f);return}}}function s3(r){r.memoizedState}function o3(r,a){if(_r){var f=a.memoizedState;if(f===null){var m=a.alternate;if(m!==null){var v=m.memoizedState;if(v!==null){var _=v.dehydrated;_!==null&&jf(_)}}}}}function Q1(r){var a=r.updateQueue;if(a!==null){r.updateQueue=null;var f=r.stateNode;f===null&&(f=r.stateNode=new H5),a.forEach(function(m){var v=m4.bind(null,r,m);if(!f.has(m)){if(f.add(m),Ur)if(ou!==null&&lu!==null)rf(lu,ou);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");m.then(v,v)}})}}function l3(r,a,f){ou=f,lu=r,Vt(a),Y1(a,r),Vt(a),ou=null,lu=null}function Mi(r,a,f){var m=a.deletions;if(m!==null)for(var v=0;v<m.length;v++){var _=m[v];try{i3(r,a,_)}catch(H){fn(_,a,H)}}var B=Ri();if(a.subtreeFlags&Ko)for(var F=a.child;F!==null;)Vt(F),Y1(F,r),F=F.sibling;Vt(B)}function Y1(r,a,f){var m=r.alternate,v=r.flags;switch(r.tag){case I:case le:case oe:case ie:{if(Mi(a,r),cs(r),v&Ut){try{Pi(ns|or,r,r.return),Lo(ns|or,r)}catch(yt){fn(r,r.return,yt)}if(r.mode&tn){try{ss(),Pi(lr|or,r,r.return)}catch(yt){fn(r,r.return,yt)}is(r)}else try{Pi(lr|or,r,r.return)}catch(yt){fn(r,r.return,yt)}}return}case Y:{Mi(a,r),cs(r),v&ms&&m!==null&&cu(m,m.return);return}case V:{if(Mi(a,r),cs(r),v&ms&&m!==null&&cu(m,m.return),Kr){if(r.flags&Da){var _=r.stateNode;try{La(_)}catch(yt){fn(r,r.return,yt)}}if(v&Ut){var B=r.stateNode;if(B!=null){var F=r.memoizedProps,H=m!==null?m.memoizedProps:F,$=r.type,re=r.updateQueue;if(r.updateQueue=null,re!==null)try{Wu(B,re,$,H,F,r)}catch(yt){fn(r,r.return,yt)}}}}return}case ge:{if(Mi(a,r),cs(r),v&Ut&&Kr){if(r.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var ye=r.stateNode,Te=r.memoizedProps,Ne=m!==null?m.memoizedProps:Te;try{kA(ye,Ne,Te)}catch(yt){fn(r,r.return,yt)}}return}case q:{if(Mi(a,r),cs(r),v&Ut){if(Kr&&_r&&m!==null){var Me=m.memoizedState;if(Me.isDehydrated)try{Uf(a.containerInfo)}catch(yt){fn(r,r.return,yt)}}if(ql){var Pe=a.containerInfo,ct=a.pendingChildren;try{Gi(Pe,ct)}catch(yt){fn(r,r.return,yt)}}}return}case W:{if(Mi(a,r),cs(r),v&Ut&&ql){var bt=r.stateNode,gt=bt.containerInfo,cn=bt.pendingChildren;try{Gi(gt,cn)}catch(yt){fn(r,r.return,yt)}}return}case ne:{Mi(a,r),cs(r);var qt=r.child;if(qt.flags&gs){var Ce=qt.stateNode,Le=qt.memoizedState,we=Le!==null;if(Ce.isHidden=we,we){var Xe=qt.alternate!==null&&qt.alternate.memoizedState!==null;Xe||t4()}}if(v&Ut){try{s3(r)}catch(yt){fn(r,r.return,yt)}Q1(r)}return}case Fe:{var ft=m!==null&&m.memoizedState!==null;if(r.mode&jt){var at=Dr;Dr=at||ft,Mi(a,r),Dr=at}else Mi(a,r);if(cs(r),v&gs){var Xt=r.stateNode,_t=r.memoizedState,en=_t!==null,Ot=r;if(Xt.isHidden=en,en&&!ft&&(Ot.mode&jt)!==mt){ot=Ot;for(var yn=Ot.child;yn!==null;)ot=yn,u3(yn),yn=yn.sibling}Kr&&e3(Ot,en)}return}case xe:{Mi(a,r),cs(r),v&Ut&&Q1(r);return}case Re:return;default:{Mi(a,r),cs(r);return}}}function cs(r){var a=r.flags;if(a&un){try{a3(r)}catch(f){fn(r,r.return,f)}r.flags&=~un}a&Ja&&(r.flags&=~Ja)}function c3(r,a,f){ou=f,lu=a,ot=r,V1(r,a,f),ou=null,lu=null}function V1(r,a,f){for(var m=(r.mode&jt)!==mt;ot!==null;){var v=ot,_=v.child;if(v.tag===Fe&&m){var B=v.memoizedState!==null,F=B||cp;if(F){mm(r,a,f);continue}else{var H=v.alternate,$=H!==null&&H.memoizedState!==null,re=$||Dr,ye=cp,Te=Dr;cp=F,Dr=re,Dr&&!Te&&(ot=v,d3(v));for(var Ne=_;Ne!==null;)ot=Ne,V1(Ne,a,f),Ne=Ne.sibling;ot=v,cp=ye,Dr=Te,mm(r,a,f);continue}}(v.subtreeFlags&Jo)!==st&&_!==null?(_.return=v,ot=_):mm(r,a,f)}}function mm(r,a,f){for(;ot!==null;){var m=ot;if((m.flags&Jo)!==st){var v=m.alternate;Vt(m);try{Z5(a,v,m,f)}catch(B){fn(m,m.return,B)}Bt()}if(m===r){ot=null;return}var _=m.sibling;if(_!==null){_.return=m.return,ot=_;return}ot=m.return}}function u3(r){for(;ot!==null;){var a=ot,f=a.child;switch(a.tag){case I:case le:case oe:case ie:{if(a.mode&tn)try{ss(),Pi(lr,a,a.return)}finally{is(a)}else Pi(lr,a,a.return);break}case Y:{cu(a,a.return);var m=a.stateNode;typeof m.componentWillUnmount=="function"&&fm(a,a.return,m);break}case V:{cu(a,a.return);break}case Fe:{var v=a.memoizedState!==null;if(v){q1(r);continue}break}}f!==null?(f.return=a,ot=f):q1(r)}}function q1(r){for(;ot!==null;){var a=ot;if(a===r){ot=null;return}var f=a.sibling;if(f!==null){f.return=a.return,ot=f;return}ot=a.return}}function d3(r){for(;ot!==null;){var a=ot,f=a.child;if(a.tag===Fe){var m=a.memoizedState!==null;if(m){K1(r);continue}}f!==null?(f.return=a,ot=f):K1(r)}}function K1(r){for(;ot!==null;){var a=ot;Vt(a);try{$5(a)}catch(m){fn(a,a.return,m)}if(Bt(),a===r){ot=null;return}var f=a.sibling;if(f!==null){f.return=a.return,ot=f;return}ot=a.return}}function f3(r,a,f,m){ot=a,h3(a,r,f,m)}function h3(r,a,f,m){for(;ot!==null;){var v=ot,_=v.child;(v.subtreeFlags&ro)!==st&&_!==null?(_.return=v,ot=_):p3(r,a,f,m)}}function p3(r,a,f,m){for(;ot!==null;){var v=ot;if((v.flags&mi)!==st){Vt(v);try{A3(a,v,f,m)}catch(B){fn(v,v.return,B)}Bt()}if(v===r){ot=null;return}var _=v.sibling;if(_!==null){_.return=v.return,ot=_;return}ot=v.return}}function A3(r,a,f,m){switch(a.tag){case I:case le:case ie:{if(a.mode&tn){B0();try{Lo(Tr|or,a)}finally{P0(a)}}else Lo(Tr|or,a);break}}}function m3(r){ot=r,g3()}function g3(){for(;ot!==null;){var r=ot,a=r.child;if((ot.flags&Ra)!==st){var f=r.deletions;if(f!==null){for(var m=0;m<f.length;m++){var v=f[m];ot=v,x3(v,r)}{var _=r.alternate;if(_!==null){var B=_.child;if(B!==null){_.child=null;do{var F=B.sibling;B.sibling=null,B=F}while(B!==null)}}}ot=r}}(r.subtreeFlags&ro)!==st&&a!==null?(a.return=r,ot=a):v3()}}function v3(){for(;ot!==null;){var r=ot;(r.flags&mi)!==st&&(Vt(r),y3(r),Bt());var a=r.sibling;if(a!==null){a.return=r.return,ot=a;return}ot=r.return}}function y3(r){switch(r.tag){case I:case le:case ie:{r.mode&tn?(B0(),Pi(Tr|or,r,r.return),P0(r)):Pi(Tr|or,r,r.return);break}}}function x3(r,a){for(;ot!==null;){var f=ot;Vt(f),S3(f,a),Bt();var m=f.child;m!==null?(m.return=f,ot=m):b3(r)}}function b3(r){for(;ot!==null;){var a=ot,f=a.sibling,m=a.return;if(H1(a),a===r){ot=null;return}if(f!==null){f.return=m,ot=f;return}ot=m}}function S3(r,a){switch(r.tag){case I:case le:case ie:{r.mode&tn?(B0(),Pi(Tr,r,a),P0(r)):Pi(Tr,r,a);break}}}function w3(r){switch(r.tag){case I:case le:case ie:{try{Lo(lr|or,r)}catch(f){fn(r,r.return,f)}break}case Y:{var a=r.stateNode;try{a.componentDidMount()}catch(f){fn(r,r.return,f)}break}}}function C3(r){switch(r.tag){case I:case le:case ie:{try{Lo(Tr|or,r)}catch(a){fn(r,r.return,a)}break}}}function _3(r){switch(r.tag){case I:case le:case ie:{try{Pi(lr|or,r,r.return)}catch(f){fn(r,r.return,f)}break}case Y:{var a=r.stateNode;typeof a.componentWillUnmount=="function"&&fm(r,r.return,a);break}}}function E3(r){switch(r.tag){case I:case le:case ie:try{Pi(Tr|or,r,r.return)}catch(a){fn(r,r.return,a)}}}var dp=0,fp=1,hp=2,pp=3,Ap=4;if(typeof Symbol=="function"&&Symbol.for){var Yd=Symbol.for;dp=Yd("selector.component"),fp=Yd("selector.has_pseudo_class"),hp=Yd("selector.role"),pp=Yd("selector.test_id"),Ap=Yd("selector.text")}function T3(r){return{$$typeof:dp,value:r}}function R3(r){return{$$typeof:fp,value:r}}function D3(r){return{$$typeof:hp,value:r}}function L3(r){return{$$typeof:Ap,value:r}}function k3(r){return{$$typeof:pp,value:r}}function gm(r){var a=Kl(r);if(a!=null){if(typeof a.memoizedProps["data-testname"]!="string")throw new Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return a}else{var f=Hu(r);if(f===null)throw new Error("Could not find React container within specified host subtree.");return f.stateNode.current}}function vm(r,a){switch(a.$$typeof){case dp:if(r.type===a.value)return!0;break;case fp:return N3(r,a.value);case hp:if(r.tag===V){var f=r.stateNode;if($t(f,a.value))return!0}break;case Ap:if(r.tag===V||r.tag===ge){var m=DA(r);if(m!==null&&m.indexOf(a.value)>=0)return!0}break;case pp:if(r.tag===V){var v=r.memoizedProps["data-testname"];if(typeof v=="string"&&v.toLowerCase()===a.value.toLowerCase())return!0}break;default:throw new Error("Invalid selector type specified.")}return!1}function ym(r){switch(r.$$typeof){case dp:var a=et(r.value)||"Unknown";return"<"+a+">";case fp:return":has("+(ym(r)||"")+")";case hp:return'[role="'+r.value+'"]';case Ap:return'"'+r.value+'"';case pp:return'[data-testname="'+r.value+'"]';default:throw new Error("Invalid selector type specified.")}}function J1(r,a){for(var f=[],m=[r,0],v=0;v<m.length;){var _=m[v++],B=m[v++],F=a[B];if(!(_.tag===V&&Ss(_))){for(;F!=null&&vm(_,F);)B++,F=a[B];if(B===a.length)f.push(_);else for(var H=_.child;H!==null;)m.push(H,B),H=H.sibling}}return f}function N3(r,a){for(var f=[r,0],m=0;m<f.length;){var v=f[m++],_=f[m++],B=a[_];if(!(v.tag===V&&Ss(v))){for(;B!=null&&vm(v,B);)_++,B=a[_];if(_===a.length)return!0;for(var F=v.child;F!==null;)f.push(F,_),F=F.sibling}}return!1}function mp(r,a){if(!bs)throw new Error("Test selector API is not supported by this renderer.");for(var f=gm(r),m=J1(f,a),v=[],_=Array.from(m),B=0;B<_.length;){var F=_[B++];if(F.tag===V){if(Ss(F))continue;v.push(F.stateNode)}else for(var H=F.child;H!==null;)_.push(H),H=H.sibling}return v}function P3(r,a){if(!bs)throw new Error("Test selector API is not supported by this renderer.");for(var f=gm(r),m=0,v=[],_=[f,0],B=0;B<_.length;){var F=_[B++],H=_[B++],$=a[H];if(!(F.tag===V&&Ss(F))&&(vm(F,$)&&(v.push(ym($)),H++,H>m&&(m=H)),H<a.length))for(var re=F.child;re!==null;)_.push(re,H),re=re.sibling}if(m<a.length){for(var ye=[],Te=m;Te<a.length;Te++)ye.push(ym(a[Te]));return`findAllNodes was able to match part of the selector:
459
+ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:$=" You returned: "+F,u("%s must not return anything besides a function, which is used for clean-up.%s",H,$)}}}_=_.next}while(_!==v)}}function J5(r,a){if((a.flags&Ut)!==st)switch(a.tag){case Ae:{var f=a.stateNode.passiveEffectDuration,m=a.memoizedProps,v=m.id,_=m.onPostCommit,B=e1(),F=a.alternate===null?"mount":"update";$v()&&(F="nested-update"),typeof _=="function"&&_(v,F,f,B);var H=a.return;e:for(;H!==null;){switch(H.tag){case q:var $=H.stateNode;$.passiveEffectDuration+=f;break e;case Ae:var re=H.stateNode;re.passiveEffectDuration+=f;break e}H=H.return}break}}}function Z5(r,a,f,m){if((f.flags&Jo)!==st)switch(f.tag){case I:case le:case ie:{if(!Dr)if(f.mode&tn)try{ss(),Lo(lr|or,f)}finally{is(f)}else Lo(lr|or,f);break}case Y:{var v=f.stateNode;if(f.flags&Ut&&!Dr)if(a===null)if(f.type===f.elementType&&!_l&&(v.props!==f.memoizedProps&&u("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",it(f)||"instance"),v.state!==f.memoizedState&&u("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",it(f)||"instance")),f.mode&tn)try{ss(),v.componentDidMount()}finally{is(f)}else v.componentDidMount();else{var _=f.elementType===f.type?a.memoizedProps:ki(f.type,a.memoizedProps),B=a.memoizedState;if(f.type===f.elementType&&!_l&&(v.props!==f.memoizedProps&&u("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",it(f)||"instance"),v.state!==f.memoizedState&&u("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",it(f)||"instance")),f.mode&tn)try{ss(),v.componentDidUpdate(_,B,v.__reactInternalSnapshotBeforeUpdate)}finally{is(f)}else v.componentDidUpdate(_,B,v.__reactInternalSnapshotBeforeUpdate)}var F=f.updateQueue;F!==null&&(f.type===f.elementType&&!_l&&(v.props!==f.memoizedProps&&u("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",it(f)||"instance"),v.state!==f.memoizedState&&u("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",it(f)||"instance")),_v(f,F,v));break}case q:{var H=f.updateQueue;if(H!==null){var $=null;if(f.child!==null)switch(f.child.tag){case V:$=Za(f.child.stateNode);break;case Y:$=f.child.stateNode;break}_v(f,H,$)}break}case V:{var re=f.stateNode;if(a===null&&f.flags&Ut){var ye=f.type,Te=f.memoizedProps;Yn(re,ye,Te,f)}break}case ge:break;case W:break;case Ae:{{var Ne=f.memoizedProps,Me=Ne.onCommit,Pe=Ne.onRender,ct=f.stateNode.effectDuration,bt=e1(),gt=a===null?"mount":"update";$v()&&(gt="nested-update"),typeof Pe=="function"&&Pe(f.memoizedProps.id,gt,f.actualDuration,f.treeBaseDuration,f.actualStartTime,bt);{typeof Me=="function"&&Me(f.memoizedProps.id,gt,ct,bt),c4(f);var cn=f.return;e:for(;cn!==null;){switch(cn.tag){case q:var qt=cn.stateNode;qt.effectDuration+=ct;break e;case Ae:var Ce=cn.stateNode;Ce.effectDuration+=ct;break e}cn=cn.return}}}break}case ne:{o3(r,f);break}case xe:case K:case Re:case Fe:case pt:case ut:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Dr||f.flags&ms&&G1(f)}function $5(r){switch(r.tag){case I:case le:case ie:{if(r.mode&tn)try{ss(),O1(r,r.return)}finally{is(r)}else O1(r,r.return);break}case Y:{var a=r.stateNode;typeof a.componentDidMount=="function"&&Q5(r,r.return,a),U1(r,r.return);break}case V:{U1(r,r.return);break}}}function e3(r,a){var f=null;if(Kr)for(var m=r;;){if(m.tag===V){if(f===null){f=m;try{var v=m.stateNode;a?BA(v):ka(m.stateNode,m.memoizedProps)}catch(B){fn(r,r.return,B)}}}else if(m.tag===ge){if(f===null)try{var _=m.stateNode;a?MA(_):yi(_,m.memoizedProps)}catch(B){fn(r,r.return,B)}}else if(!((m.tag===Fe||m.tag===pt)&&m.memoizedState!==null&&m!==r)){if(m.child!==null){m.child.return=m,m=m.child;continue}}if(m===r)return;for(;m.sibling===null;){if(m.return===null||m.return===r)return;f===m&&(f=null),m=m.return}f===m&&(f=null),m.sibling.return=m.return,m=m.sibling}}function G1(r){var a=r.ref;if(a!==null){var f=r.stateNode,m;switch(r.tag){case V:m=Za(f);break;default:m=f}if(typeof a=="function"){var v;if(r.mode&tn)try{ss(),v=a(m)}finally{is(r)}else v=a(m);typeof v=="function"&&u("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",it(r))}else a.hasOwnProperty("current")||u("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",it(r)),a.current=m}}function t3(r){var a=r.alternate;a!==null&&(a.return=null),r.return=null}function H1(r){var a=r.alternate;a!==null&&(r.alternate=null,H1(a));{if(r.child=null,r.deletions=null,r.sibling=null,r.tag===V){var f=r.stateNode;f!==null&&TA(f)}r.stateNode=null,r._debugOwner=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}}function n3(r){if(ql){var a=r.stateNode,f=a.containerInfo,m=Vu(f);Gi(f,m)}}function r3(r){for(var a=r.return;a!==null;){if(X1(a))return a;a=a.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function X1(r){return r.tag===V||r.tag===q||r.tag===W}function W1(r){var a=r;e:for(;;){for(;a.sibling===null;){if(a.return===null||X1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==V&&a.tag!==ge&&a.tag!==ve;){if(a.flags&un||a.child===null||a.tag===W)continue e;a.child.return=a,a=a.child}if(!(a.flags&un))return a.stateNode}}function a3(r){if(Kr){var a=r3(r);switch(a.tag){case V:{var f=a.stateNode;a.flags&Da&&(La(f),a.flags&=~Da);var m=W1(r);pm(r,m,f);break}case q:case W:{var v=a.stateNode.containerInfo,_=W1(r);hm(r,_,v);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function hm(r,a,f){var m=r.tag,v=m===V||m===ge;if(v){var _=r.stateNode;a?Qu(f,_,a):LA(f,_)}else if(m!==W){var B=r.child;if(B!==null){hm(B,a,f);for(var F=B.sibling;F!==null;)hm(F,a,f),F=F.sibling}}}function pm(r,a,f){var m=r.tag,v=m===V||m===ge;if(v){var _=r.stateNode;a?NA(f,_,a):If(f,_)}else if(m!==W){var B=r.child;if(B!==null){pm(B,a,f);for(var F=B.sibling;F!==null;)pm(F,a,f),F=F.sibling}}}var Lr=null,Bi=!1;function i3(r,a,f){if(Kr){var m=a;e:for(;m!==null;){switch(m.tag){case V:{Lr=m.stateNode,Bi=!1;break e}case q:{Lr=m.stateNode.containerInfo,Bi=!0;break e}case W:{Lr=m.stateNode.containerInfo,Bi=!0;break e}}m=m.return}if(Lr===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Am(r,a,f),Lr=null,Bi=!1}else Am(r,a,f);t3(f)}function ls(r,a,f){for(var m=f.child;m!==null;)Am(r,a,m),m=m.sibling}function Am(r,a,f){switch(md(f),f.tag){case V:Dr||cu(f,a);case ge:{if(Kr){var m=Lr,v=Bi;Lr=null,ls(r,a,f),Lr=m,Bi=v,Lr!==null&&(Bi?Zl(Lr,f.stateNode):PA(Lr,f.stateNode))}else ls(r,a,f);return}case ve:{Kr&&Lr!==null&&(Bi?Zu(Lr,f.stateNode):Ju(Lr,f.stateNode));return}case W:{if(Kr){var _=Lr,B=Bi;Lr=f.stateNode.containerInfo,Bi=!0,ls(r,a,f),Lr=_,Bi=B}else n3(f),ls(r,a,f);return}case I:case le:case se:case ie:{if(!Dr){var F=f.updateQueue;if(F!==null){var H=F.lastEffect;if(H!==null){var $=H.next,re=$;do{var ye=re,Te=ye.destroy,Ne=ye.tag;Te!==void 0&&((Ne&ns)!==ba?up(f,a,Te):(Ne&lr)!==ba&&(Is(f),f.mode&tn?(ss(),up(f,a,Te),is(f)):up(f,a,Te),On())),re=re.next}while(re!==$)}}}ls(r,a,f);return}case Y:{if(!Dr){cu(f,a);var Me=f.stateNode;typeof Me.componentWillUnmount=="function"&&fm(f,a,Me)}ls(r,a,f);return}case Re:{ls(r,a,f);return}case Fe:{if(f.mode&jt){var Pe=Dr;Dr=Pe||f.memoizedState!==null,ls(r,a,f),Dr=Pe}else ls(r,a,f);break}default:{ls(r,a,f);return}}}function s3(r){r.memoizedState}function o3(r,a){if(_r){var f=a.memoizedState;if(f===null){var m=a.alternate;if(m!==null){var v=m.memoizedState;if(v!==null){var _=v.dehydrated;_!==null&&jf(_)}}}}}function Q1(r){var a=r.updateQueue;if(a!==null){r.updateQueue=null;var f=r.stateNode;f===null&&(f=r.stateNode=new H5),a.forEach(function(m){var v=m4.bind(null,r,m);if(!f.has(m)){if(f.add(m),Ur)if(ou!==null&&lu!==null)rf(lu,ou);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");m.then(v,v)}})}}function l3(r,a,f){ou=f,lu=r,Vt(a),Y1(a,r),Vt(a),ou=null,lu=null}function Mi(r,a,f){var m=a.deletions;if(m!==null)for(var v=0;v<m.length;v++){var _=m[v];try{i3(r,a,_)}catch(H){fn(_,a,H)}}var B=Ri();if(a.subtreeFlags&Ko)for(var F=a.child;F!==null;)Vt(F),Y1(F,r),F=F.sibling;Vt(B)}function Y1(r,a,f){var m=r.alternate,v=r.flags;switch(r.tag){case I:case le:case se:case ie:{if(Mi(a,r),cs(r),v&Ut){try{Pi(ns|or,r,r.return),Lo(ns|or,r)}catch(yt){fn(r,r.return,yt)}if(r.mode&tn){try{ss(),Pi(lr|or,r,r.return)}catch(yt){fn(r,r.return,yt)}is(r)}else try{Pi(lr|or,r,r.return)}catch(yt){fn(r,r.return,yt)}}return}case Y:{Mi(a,r),cs(r),v&ms&&m!==null&&cu(m,m.return);return}case V:{if(Mi(a,r),cs(r),v&ms&&m!==null&&cu(m,m.return),Kr){if(r.flags&Da){var _=r.stateNode;try{La(_)}catch(yt){fn(r,r.return,yt)}}if(v&Ut){var B=r.stateNode;if(B!=null){var F=r.memoizedProps,H=m!==null?m.memoizedProps:F,$=r.type,re=r.updateQueue;if(r.updateQueue=null,re!==null)try{Wu(B,re,$,H,F,r)}catch(yt){fn(r,r.return,yt)}}}}return}case ge:{if(Mi(a,r),cs(r),v&Ut&&Kr){if(r.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var ye=r.stateNode,Te=r.memoizedProps,Ne=m!==null?m.memoizedProps:Te;try{kA(ye,Ne,Te)}catch(yt){fn(r,r.return,yt)}}return}case q:{if(Mi(a,r),cs(r),v&Ut){if(Kr&&_r&&m!==null){var Me=m.memoizedState;if(Me.isDehydrated)try{Uf(a.containerInfo)}catch(yt){fn(r,r.return,yt)}}if(ql){var Pe=a.containerInfo,ct=a.pendingChildren;try{Gi(Pe,ct)}catch(yt){fn(r,r.return,yt)}}}return}case W:{if(Mi(a,r),cs(r),v&Ut&&ql){var bt=r.stateNode,gt=bt.containerInfo,cn=bt.pendingChildren;try{Gi(gt,cn)}catch(yt){fn(r,r.return,yt)}}return}case ne:{Mi(a,r),cs(r);var qt=r.child;if(qt.flags&gs){var Ce=qt.stateNode,Le=qt.memoizedState,we=Le!==null;if(Ce.isHidden=we,we){var Xe=qt.alternate!==null&&qt.alternate.memoizedState!==null;Xe||t4()}}if(v&Ut){try{s3(r)}catch(yt){fn(r,r.return,yt)}Q1(r)}return}case Fe:{var ft=m!==null&&m.memoizedState!==null;if(r.mode&jt){var at=Dr;Dr=at||ft,Mi(a,r),Dr=at}else Mi(a,r);if(cs(r),v&gs){var Xt=r.stateNode,_t=r.memoizedState,en=_t!==null,Ot=r;if(Xt.isHidden=en,en&&!ft&&(Ot.mode&jt)!==mt){ot=Ot;for(var yn=Ot.child;yn!==null;)ot=yn,u3(yn),yn=yn.sibling}Kr&&e3(Ot,en)}return}case xe:{Mi(a,r),cs(r),v&Ut&&Q1(r);return}case Re:return;default:{Mi(a,r),cs(r);return}}}function cs(r){var a=r.flags;if(a&un){try{a3(r)}catch(f){fn(r,r.return,f)}r.flags&=~un}a&Ja&&(r.flags&=~Ja)}function c3(r,a,f){ou=f,lu=a,ot=r,V1(r,a,f),ou=null,lu=null}function V1(r,a,f){for(var m=(r.mode&jt)!==mt;ot!==null;){var v=ot,_=v.child;if(v.tag===Fe&&m){var B=v.memoizedState!==null,F=B||cp;if(F){mm(r,a,f);continue}else{var H=v.alternate,$=H!==null&&H.memoizedState!==null,re=$||Dr,ye=cp,Te=Dr;cp=F,Dr=re,Dr&&!Te&&(ot=v,d3(v));for(var Ne=_;Ne!==null;)ot=Ne,V1(Ne,a,f),Ne=Ne.sibling;ot=v,cp=ye,Dr=Te,mm(r,a,f);continue}}(v.subtreeFlags&Jo)!==st&&_!==null?(_.return=v,ot=_):mm(r,a,f)}}function mm(r,a,f){for(;ot!==null;){var m=ot;if((m.flags&Jo)!==st){var v=m.alternate;Vt(m);try{Z5(a,v,m,f)}catch(B){fn(m,m.return,B)}Bt()}if(m===r){ot=null;return}var _=m.sibling;if(_!==null){_.return=m.return,ot=_;return}ot=m.return}}function u3(r){for(;ot!==null;){var a=ot,f=a.child;switch(a.tag){case I:case le:case se:case ie:{if(a.mode&tn)try{ss(),Pi(lr,a,a.return)}finally{is(a)}else Pi(lr,a,a.return);break}case Y:{cu(a,a.return);var m=a.stateNode;typeof m.componentWillUnmount=="function"&&fm(a,a.return,m);break}case V:{cu(a,a.return);break}case Fe:{var v=a.memoizedState!==null;if(v){q1(r);continue}break}}f!==null?(f.return=a,ot=f):q1(r)}}function q1(r){for(;ot!==null;){var a=ot;if(a===r){ot=null;return}var f=a.sibling;if(f!==null){f.return=a.return,ot=f;return}ot=a.return}}function d3(r){for(;ot!==null;){var a=ot,f=a.child;if(a.tag===Fe){var m=a.memoizedState!==null;if(m){K1(r);continue}}f!==null?(f.return=a,ot=f):K1(r)}}function K1(r){for(;ot!==null;){var a=ot;Vt(a);try{$5(a)}catch(m){fn(a,a.return,m)}if(Bt(),a===r){ot=null;return}var f=a.sibling;if(f!==null){f.return=a.return,ot=f;return}ot=a.return}}function f3(r,a,f,m){ot=a,h3(a,r,f,m)}function h3(r,a,f,m){for(;ot!==null;){var v=ot,_=v.child;(v.subtreeFlags&ro)!==st&&_!==null?(_.return=v,ot=_):p3(r,a,f,m)}}function p3(r,a,f,m){for(;ot!==null;){var v=ot;if((v.flags&mi)!==st){Vt(v);try{A3(a,v,f,m)}catch(B){fn(v,v.return,B)}Bt()}if(v===r){ot=null;return}var _=v.sibling;if(_!==null){_.return=v.return,ot=_;return}ot=v.return}}function A3(r,a,f,m){switch(a.tag){case I:case le:case ie:{if(a.mode&tn){B0();try{Lo(Tr|or,a)}finally{P0(a)}}else Lo(Tr|or,a);break}}}function m3(r){ot=r,g3()}function g3(){for(;ot!==null;){var r=ot,a=r.child;if((ot.flags&Ra)!==st){var f=r.deletions;if(f!==null){for(var m=0;m<f.length;m++){var v=f[m];ot=v,x3(v,r)}{var _=r.alternate;if(_!==null){var B=_.child;if(B!==null){_.child=null;do{var F=B.sibling;B.sibling=null,B=F}while(B!==null)}}}ot=r}}(r.subtreeFlags&ro)!==st&&a!==null?(a.return=r,ot=a):v3()}}function v3(){for(;ot!==null;){var r=ot;(r.flags&mi)!==st&&(Vt(r),y3(r),Bt());var a=r.sibling;if(a!==null){a.return=r.return,ot=a;return}ot=r.return}}function y3(r){switch(r.tag){case I:case le:case ie:{r.mode&tn?(B0(),Pi(Tr|or,r,r.return),P0(r)):Pi(Tr|or,r,r.return);break}}}function x3(r,a){for(;ot!==null;){var f=ot;Vt(f),S3(f,a),Bt();var m=f.child;m!==null?(m.return=f,ot=m):b3(r)}}function b3(r){for(;ot!==null;){var a=ot,f=a.sibling,m=a.return;if(H1(a),a===r){ot=null;return}if(f!==null){f.return=m,ot=f;return}ot=m}}function S3(r,a){switch(r.tag){case I:case le:case ie:{r.mode&tn?(B0(),Pi(Tr,r,a),P0(r)):Pi(Tr,r,a);break}}}function w3(r){switch(r.tag){case I:case le:case ie:{try{Lo(lr|or,r)}catch(f){fn(r,r.return,f)}break}case Y:{var a=r.stateNode;try{a.componentDidMount()}catch(f){fn(r,r.return,f)}break}}}function C3(r){switch(r.tag){case I:case le:case ie:{try{Lo(Tr|or,r)}catch(a){fn(r,r.return,a)}break}}}function _3(r){switch(r.tag){case I:case le:case ie:{try{Pi(lr|or,r,r.return)}catch(f){fn(r,r.return,f)}break}case Y:{var a=r.stateNode;typeof a.componentWillUnmount=="function"&&fm(r,r.return,a);break}}}function E3(r){switch(r.tag){case I:case le:case ie:try{Pi(Tr|or,r,r.return)}catch(a){fn(r,r.return,a)}}}var dp=0,fp=1,hp=2,pp=3,Ap=4;if(typeof Symbol=="function"&&Symbol.for){var Yd=Symbol.for;dp=Yd("selector.component"),fp=Yd("selector.has_pseudo_class"),hp=Yd("selector.role"),pp=Yd("selector.test_id"),Ap=Yd("selector.text")}function T3(r){return{$$typeof:dp,value:r}}function R3(r){return{$$typeof:fp,value:r}}function D3(r){return{$$typeof:hp,value:r}}function L3(r){return{$$typeof:Ap,value:r}}function k3(r){return{$$typeof:pp,value:r}}function gm(r){var a=Kl(r);if(a!=null){if(typeof a.memoizedProps["data-testname"]!="string")throw new Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return a}else{var f=Hu(r);if(f===null)throw new Error("Could not find React container within specified host subtree.");return f.stateNode.current}}function vm(r,a){switch(a.$$typeof){case dp:if(r.type===a.value)return!0;break;case fp:return N3(r,a.value);case hp:if(r.tag===V){var f=r.stateNode;if($t(f,a.value))return!0}break;case Ap:if(r.tag===V||r.tag===ge){var m=DA(r);if(m!==null&&m.indexOf(a.value)>=0)return!0}break;case pp:if(r.tag===V){var v=r.memoizedProps["data-testname"];if(typeof v=="string"&&v.toLowerCase()===a.value.toLowerCase())return!0}break;default:throw new Error("Invalid selector type specified.")}return!1}function ym(r){switch(r.$$typeof){case dp:var a=et(r.value)||"Unknown";return"<"+a+">";case fp:return":has("+(ym(r)||"")+")";case hp:return'[role="'+r.value+'"]';case Ap:return'"'+r.value+'"';case pp:return'[data-testname="'+r.value+'"]';default:throw new Error("Invalid selector type specified.")}}function J1(r,a){for(var f=[],m=[r,0],v=0;v<m.length;){var _=m[v++],B=m[v++],F=a[B];if(!(_.tag===V&&Ss(_))){for(;F!=null&&vm(_,F);)B++,F=a[B];if(B===a.length)f.push(_);else for(var H=_.child;H!==null;)m.push(H,B),H=H.sibling}}return f}function N3(r,a){for(var f=[r,0],m=0;m<f.length;){var v=f[m++],_=f[m++],B=a[_];if(!(v.tag===V&&Ss(v))){for(;B!=null&&vm(v,B);)_++,B=a[_];if(_===a.length)return!0;for(var F=v.child;F!==null;)f.push(F,_),F=F.sibling}}return!1}function mp(r,a){if(!bs)throw new Error("Test selector API is not supported by this renderer.");for(var f=gm(r),m=J1(f,a),v=[],_=Array.from(m),B=0;B<_.length;){var F=_[B++];if(F.tag===V){if(Ss(F))continue;v.push(F.stateNode)}else for(var H=F.child;H!==null;)_.push(H),H=H.sibling}return v}function P3(r,a){if(!bs)throw new Error("Test selector API is not supported by this renderer.");for(var f=gm(r),m=0,v=[],_=[f,0],B=0;B<_.length;){var F=_[B++],H=_[B++],$=a[H];if(!(F.tag===V&&Ss(F))&&(vm(F,$)&&(v.push(ym($)),H++,H>m&&(m=H)),H<a.length))for(var re=F.child;re!==null;)_.push(re,H),re=re.sibling}if(m<a.length){for(var ye=[],Te=m;Te<a.length;Te++)ye.push(ym(a[Te]));return`findAllNodes was able to match part of the selector:
460
460
  `+(" "+v.join(" > ")+`
461
461
 
462
462
  `)+`No matching component was found for:
@@ -464,7 +464,7 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
464
464
 
465
465
  Error message:
466
466
 
467
- %s`,f)}function p4(r,a,f){var m=r.pingCache;m!==null&&m.delete(a);var v=Qr();vo(r,f),w4(r),ua===r&&Or(dr,f)&&(fr===qd||fr===vp&&Dc(dr)&&zn()-_m<ey?Rl(r,Be):xp=Pt(xp,f)),wa(r,v)}function py(r,a){a===Ln&&(a=X3(r));var f=Qr(),m=la(r,a);m!==null&&(Ki(m,a,f),wa(m,f))}function A4(r){var a=r.memoizedState,f=Ln;a!==null&&(f=a.retryLane),py(r,f)}function m4(r,a){var f=Ln,m;switch(r.tag){case ne:m=r.stateNode;var v=r.memoizedState;v!==null&&(f=v.retryLane);break;case xe:m=r.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}m!==null&&m.delete(a),py(r,f)}function g4(r){return r<120?120:r<480?480:r<1080?1080:r<1920?1920:r<3e3?3e3:r<4320?4320:U3(r/1960)*1960}function v4(){if(ef>G3)throw ef=0,Dm=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");fu>H3&&(fu=0,wp=null,u("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function y4(){de.flushLegacyContextWarning(),de.flushPendingUnsafeLifecycleWarnings()}function Ay(r,a){Vt(r),Dp(r,Ui,_3),a&&Dp(r,zu,E3),Dp(r,Ui,w3),a&&Dp(r,zu,C3),Bt()}function Dp(r,a,f){for(var m=r,v=null;m!==null;){var _=m.subtreeFlags&a;m!==v&&m.child!==null&&_!==st?m=m.child:((m.flags&a)!==st&&f(m),m.sibling!==null?m=m.sibling:m=v=m.return)}}var Lp=null;function my(r){{if((Ft&kr)!==$n||!(r.mode&jt))return;var a=r.tag;if(a!==J&&a!==q&&a!==Y&&a!==I&&a!==le&&a!==oe&&a!==ie)return;var f=it(r)||"ReactComponent";if(Lp!==null){if(Lp.has(f))return;Lp.add(f)}else Lp=new Set([f]);var m=Je;try{Vt(r),u("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{m?Vt(r):Bt()}}}var Bm;{var x4=null;Bm=function(r,a,f){var m=Cy(x4,a);try{return R1(r,a,f)}catch(_){if(mh()||_!==null&&typeof _=="object"&&typeof _.then=="function")throw _;if(Eh(),Lv(),P1(r,a),Cy(a,m),a.mode&tn&&N0(a),z1(null,R1,null,r,a,f),G5()){var v=F1();typeof v=="object"&&v!==null&&v._suppressLogging&&typeof _=="object"&&_!==null&&!_._suppressLogging&&(_._suppressLogging=!0)}throw _}}}var gy=!1,Mm;Mm=new Set;function b4(r){if(wt&&!Yb())switch(r.tag){case I:case le:case ie:{var a=Bn&&it(Bn)||"Unknown",f=a;if(!Mm.has(f)){Mm.add(f);var m=it(r)||"Unknown";u("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",m,a,a)}break}case Y:{gy||(u("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),gy=!0);break}}}function rf(r,a){if(Ur){var f=r.memoizedUpdaters;f.forEach(function(m){ul(r,m,a)})}}var zm={};function kp(r,a){{var f=zi.current;return f!==null?(f.push(a),zm):zc(r,a)}}function vy(r){if(r!==zm)return rr(r)}function yy(){return zi.current!==null}function S4(r){{if(r.mode&jt){if(!Z1())return}else if(!O3()||Ft!==$n||r.tag!==I&&r.tag!==le&&r.tag!==ie)return;if(zi.current===null){var a=Je;try{Vt(r),u(`An update to %s inside a test was not wrapped in act(...).
467
+ %s`,f)}function p4(r,a,f){var m=r.pingCache;m!==null&&m.delete(a);var v=Qr();vo(r,f),w4(r),ua===r&&Or(dr,f)&&(fr===qd||fr===vp&&Dc(dr)&&zn()-_m<ey?Rl(r,Be):xp=Pt(xp,f)),wa(r,v)}function py(r,a){a===Ln&&(a=X3(r));var f=Qr(),m=la(r,a);m!==null&&(Ki(m,a,f),wa(m,f))}function A4(r){var a=r.memoizedState,f=Ln;a!==null&&(f=a.retryLane),py(r,f)}function m4(r,a){var f=Ln,m;switch(r.tag){case ne:m=r.stateNode;var v=r.memoizedState;v!==null&&(f=v.retryLane);break;case xe:m=r.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}m!==null&&m.delete(a),py(r,f)}function g4(r){return r<120?120:r<480?480:r<1080?1080:r<1920?1920:r<3e3?3e3:r<4320?4320:U3(r/1960)*1960}function v4(){if(ef>G3)throw ef=0,Dm=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");fu>H3&&(fu=0,wp=null,u("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function y4(){de.flushLegacyContextWarning(),de.flushPendingUnsafeLifecycleWarnings()}function Ay(r,a){Vt(r),Dp(r,Ui,_3),a&&Dp(r,zu,E3),Dp(r,Ui,w3),a&&Dp(r,zu,C3),Bt()}function Dp(r,a,f){for(var m=r,v=null;m!==null;){var _=m.subtreeFlags&a;m!==v&&m.child!==null&&_!==st?m=m.child:((m.flags&a)!==st&&f(m),m.sibling!==null?m=m.sibling:m=v=m.return)}}var Lp=null;function my(r){{if((Ft&kr)!==$n||!(r.mode&jt))return;var a=r.tag;if(a!==J&&a!==q&&a!==Y&&a!==I&&a!==le&&a!==se&&a!==ie)return;var f=it(r)||"ReactComponent";if(Lp!==null){if(Lp.has(f))return;Lp.add(f)}else Lp=new Set([f]);var m=Je;try{Vt(r),u("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{m?Vt(r):Bt()}}}var Bm;{var x4=null;Bm=function(r,a,f){var m=Cy(x4,a);try{return R1(r,a,f)}catch(_){if(mh()||_!==null&&typeof _=="object"&&typeof _.then=="function")throw _;if(Eh(),Lv(),P1(r,a),Cy(a,m),a.mode&tn&&N0(a),z1(null,R1,null,r,a,f),G5()){var v=F1();typeof v=="object"&&v!==null&&v._suppressLogging&&typeof _=="object"&&_!==null&&!_._suppressLogging&&(_._suppressLogging=!0)}throw _}}}var gy=!1,Mm;Mm=new Set;function b4(r){if(wt&&!Yb())switch(r.tag){case I:case le:case ie:{var a=Bn&&it(Bn)||"Unknown",f=a;if(!Mm.has(f)){Mm.add(f);var m=it(r)||"Unknown";u("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",m,a,a)}break}case Y:{gy||(u("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),gy=!0);break}}}function rf(r,a){if(Ur){var f=r.memoizedUpdaters;f.forEach(function(m){ul(r,m,a)})}}var zm={};function kp(r,a){{var f=zi.current;return f!==null?(f.push(a),zm):zc(r,a)}}function vy(r){if(r!==zm)return rr(r)}function yy(){return zi.current!==null}function S4(r){{if(r.mode&jt){if(!Z1())return}else if(!O3()||Ft!==$n||r.tag!==I&&r.tag!==le&&r.tag!==ie)return;if(zi.current===null){var a=Je;try{Vt(r),u(`An update to %s inside a test was not wrapped in act(...).
468
468
 
469
469
  When testing, code that causes React state updates should be wrapped into act(...):
470
470
 
@@ -482,7 +482,7 @@ act(() => {
482
482
  });
483
483
  /* assert on the output */
484
484
 
485
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function af(r){ry=r}var fi=null,hu=null,C4=function(r){fi=r};function pu(r){{if(fi===null)return r;var a=fi(r);return a===void 0?r:a.current}}function Fm(r){return pu(r)}function Im(r){{if(fi===null)return r;var a=fi(r);if(a===void 0){if(r!=null&&typeof r.render=="function"){var f=pu(r.render);if(r.render!==f){var m={$$typeof:U,render:f};return r.displayName!==void 0&&(m.displayName=r.displayName),m}}return r}return a.current}}function xy(r,a){{if(fi===null)return!1;var f=r.elementType,m=a.type,v=!1,_=typeof m=="object"&&m!==null?m.$$typeof:null;switch(r.tag){case Y:{typeof m=="function"&&(v=!0);break}case I:{(typeof m=="function"||_===_e)&&(v=!0);break}case le:{(_===U||_===_e)&&(v=!0);break}case oe:case ie:{(_===be||_===_e)&&(v=!0);break}default:return!1}if(v){var B=fi(f);if(B!==void 0&&B===fi(m))return!0}return!1}}function by(r){{if(fi===null||typeof WeakSet!="function")return;hu===null&&(hu=new WeakSet),hu.add(r)}}var _4=function(r,a){{if(fi===null)return;var f=a.staleFamilies,m=a.updatedFamilies;ds(),Ep(function(){Om(r.current,m,f)})}},E4=function(r,a){{if(r.context!==mr)return;ds(),Ep(function(){Ty(a,r,null,null)})}};function Om(r,a,f){{var m=r.alternate,v=r.child,_=r.sibling,B=r.tag,F=r.type,H=null;switch(B){case I:case ie:case Y:H=F;break;case le:H=F.render;break}if(fi===null)throw new Error("Expected resolveFamily to be set during hot reload.");var $=!1,re=!1;if(H!==null){var ye=fi(H);ye!==void 0&&(f.has(ye)?re=!0:a.has(ye)&&(B===Y?re=!0:$=!0))}if(hu!==null&&(hu.has(r)||m!==null&&hu.has(m))&&(re=!0),re&&(r._debugNeedsRemount=!0),re||$){var Te=la(r,vt);Te!==null&&er(Te,r,vt,dn)}v!==null&&!re&&Om(v,a,f),_!==null&&Om(_,a,f)}}var T4=function(r,a){{var f=new Set,m=new Set(a.map(function(v){return v.current}));return Um(r.current,m,f),f}};function Um(r,a,f){{var m=r.child,v=r.sibling,_=r.tag,B=r.type,F=null;switch(_){case I:case ie:case Y:F=B;break;case le:F=B.render;break}var H=!1;F!==null&&a.has(F)&&(H=!0),H?R4(r,f):m!==null&&Um(m,a,f),v!==null&&Um(v,a,f)}}function R4(r,a){{var f=D4(r,a);if(f)return;for(var m=r;;){switch(m.tag){case V:a.add(m.stateNode);return;case W:a.add(m.stateNode.containerInfo);return;case q:a.add(m.stateNode.containerInfo);return}if(m.return===null)throw new Error("Expected to reach root first.");m=m.return}}}function D4(r,a){for(var f=r,m=!1;;){if(f.tag===V)m=!0,a.add(f.stateNode);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===r)return m;for(;f.sibling===null;){if(f.return===null||f.return===r)return m;f=f.return}f.sibling.return=f.return,f=f.sibling}return!1}var jm;{jm=!1;try{var Sy=Object.preventExtensions({})}catch{jm=!0}}function L4(r,a,f,m){this.tag=r,this.key=f,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=a,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=m,this.flags=st,this.subtreeFlags=st,this.deletions=null,this.lanes=Be,this.childLanes=Be,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!jm&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Ga=function(r,a,f,m){return new L4(r,a,f,m)};function Gm(r){var a=r.prototype;return!!(a&&a.isReactComponent)}function k4(r){return typeof r=="function"&&!Gm(r)&&r.defaultProps===void 0}function N4(r){if(typeof r=="function")return Gm(r)?Y:I;if(r!=null){var a=r.$$typeof;if(a===U)return le;if(a===be)return oe}return J}function Ll(r,a){var f=r.alternate;f===null?(f=Ga(r.tag,a,r.key,r.mode),f.elementType=r.elementType,f.type=r.type,f.stateNode=r.stateNode,f._debugSource=r._debugSource,f._debugOwner=r._debugOwner,f._debugHookTypes=r._debugHookTypes,f.alternate=r,r.alternate=f):(f.pendingProps=a,f.type=r.type,f.flags=st,f.subtreeFlags=st,f.deletions=null,f.actualDuration=0,f.actualStartTime=-1),f.flags=r.flags&gi,f.childLanes=r.childLanes,f.lanes=r.lanes,f.child=r.child,f.memoizedProps=r.memoizedProps,f.memoizedState=r.memoizedState,f.updateQueue=r.updateQueue;var m=r.dependencies;switch(f.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},f.sibling=r.sibling,f.index=r.index,f.ref=r.ref,f.selfBaseDuration=r.selfBaseDuration,f.treeBaseDuration=r.treeBaseDuration,f._debugNeedsRemount=r._debugNeedsRemount,f.tag){case J:case I:case ie:f.type=pu(r.type);break;case Y:f.type=Fm(r.type);break;case le:f.type=Im(r.type);break}return f}function P4(r,a){r.flags&=gi|un;var f=r.alternate;if(f===null)r.childLanes=Be,r.lanes=a,r.child=null,r.subtreeFlags=st,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null,r.selfBaseDuration=0,r.treeBaseDuration=0;else{r.childLanes=f.childLanes,r.lanes=f.lanes,r.child=f.child,r.subtreeFlags=st,r.deletions=null,r.memoizedProps=f.memoizedProps,r.memoizedState=f.memoizedState,r.updateQueue=f.updateQueue,r.type=f.type;var m=f.dependencies;r.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},r.selfBaseDuration=f.selfBaseDuration,r.treeBaseDuration=f.treeBaseDuration}return r}function B4(r,a,f){var m;return r===pc?(m=jt,a===!0&&(m|=Tn,m|=Fa)):m=mt,Ur&&(m|=tn),Ga(q,null,null,m)}function Hm(r,a,f,m,v,_){var B=J,F=r;if(typeof r=="function")Gm(r)?(B=Y,F=Fm(F)):F=pu(F);else if(typeof r=="string")B=V;else e:switch(r){case St:return Bo(f.children,v,_,a);case he:B=ae,v|=Tn,(v&jt)!==mt&&(v|=Fa);break;case k:return M4(f,v,_,a);case G:return z4(f,v,_,a);case Z:return F4(f,v,_,a);case Qe:return wy(f,v,_,a);case Oe:case me:case dt:case Jt:case ze:default:{if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ce:B=te;break e;case ue:B=L;break e;case U:B=le,F=Im(F);break e;case be:B=oe;break e;case _e:B=j,F=null;break e}var H="";{(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(H+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var $=m?it(m):null;$&&(H+=`
485
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function af(r){ry=r}var fi=null,hu=null,C4=function(r){fi=r};function pu(r){{if(fi===null)return r;var a=fi(r);return a===void 0?r:a.current}}function Fm(r){return pu(r)}function Im(r){{if(fi===null)return r;var a=fi(r);if(a===void 0){if(r!=null&&typeof r.render=="function"){var f=pu(r.render);if(r.render!==f){var m={$$typeof:U,render:f};return r.displayName!==void 0&&(m.displayName=r.displayName),m}}return r}return a.current}}function xy(r,a){{if(fi===null)return!1;var f=r.elementType,m=a.type,v=!1,_=typeof m=="object"&&m!==null?m.$$typeof:null;switch(r.tag){case Y:{typeof m=="function"&&(v=!0);break}case I:{(typeof m=="function"||_===_e)&&(v=!0);break}case le:{(_===U||_===_e)&&(v=!0);break}case se:case ie:{(_===be||_===_e)&&(v=!0);break}default:return!1}if(v){var B=fi(f);if(B!==void 0&&B===fi(m))return!0}return!1}}function by(r){{if(fi===null||typeof WeakSet!="function")return;hu===null&&(hu=new WeakSet),hu.add(r)}}var _4=function(r,a){{if(fi===null)return;var f=a.staleFamilies,m=a.updatedFamilies;ds(),Ep(function(){Om(r.current,m,f)})}},E4=function(r,a){{if(r.context!==mr)return;ds(),Ep(function(){Ty(a,r,null,null)})}};function Om(r,a,f){{var m=r.alternate,v=r.child,_=r.sibling,B=r.tag,F=r.type,H=null;switch(B){case I:case ie:case Y:H=F;break;case le:H=F.render;break}if(fi===null)throw new Error("Expected resolveFamily to be set during hot reload.");var $=!1,re=!1;if(H!==null){var ye=fi(H);ye!==void 0&&(f.has(ye)?re=!0:a.has(ye)&&(B===Y?re=!0:$=!0))}if(hu!==null&&(hu.has(r)||m!==null&&hu.has(m))&&(re=!0),re&&(r._debugNeedsRemount=!0),re||$){var Te=la(r,vt);Te!==null&&er(Te,r,vt,dn)}v!==null&&!re&&Om(v,a,f),_!==null&&Om(_,a,f)}}var T4=function(r,a){{var f=new Set,m=new Set(a.map(function(v){return v.current}));return Um(r.current,m,f),f}};function Um(r,a,f){{var m=r.child,v=r.sibling,_=r.tag,B=r.type,F=null;switch(_){case I:case ie:case Y:F=B;break;case le:F=B.render;break}var H=!1;F!==null&&a.has(F)&&(H=!0),H?R4(r,f):m!==null&&Um(m,a,f),v!==null&&Um(v,a,f)}}function R4(r,a){{var f=D4(r,a);if(f)return;for(var m=r;;){switch(m.tag){case V:a.add(m.stateNode);return;case W:a.add(m.stateNode.containerInfo);return;case q:a.add(m.stateNode.containerInfo);return}if(m.return===null)throw new Error("Expected to reach root first.");m=m.return}}}function D4(r,a){for(var f=r,m=!1;;){if(f.tag===V)m=!0,a.add(f.stateNode);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===r)return m;for(;f.sibling===null;){if(f.return===null||f.return===r)return m;f=f.return}f.sibling.return=f.return,f=f.sibling}return!1}var jm;{jm=!1;try{var Sy=Object.preventExtensions({})}catch{jm=!0}}function L4(r,a,f,m){this.tag=r,this.key=f,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=a,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=m,this.flags=st,this.subtreeFlags=st,this.deletions=null,this.lanes=Be,this.childLanes=Be,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!jm&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Ga=function(r,a,f,m){return new L4(r,a,f,m)};function Gm(r){var a=r.prototype;return!!(a&&a.isReactComponent)}function k4(r){return typeof r=="function"&&!Gm(r)&&r.defaultProps===void 0}function N4(r){if(typeof r=="function")return Gm(r)?Y:I;if(r!=null){var a=r.$$typeof;if(a===U)return le;if(a===be)return se}return J}function Ll(r,a){var f=r.alternate;f===null?(f=Ga(r.tag,a,r.key,r.mode),f.elementType=r.elementType,f.type=r.type,f.stateNode=r.stateNode,f._debugSource=r._debugSource,f._debugOwner=r._debugOwner,f._debugHookTypes=r._debugHookTypes,f.alternate=r,r.alternate=f):(f.pendingProps=a,f.type=r.type,f.flags=st,f.subtreeFlags=st,f.deletions=null,f.actualDuration=0,f.actualStartTime=-1),f.flags=r.flags&gi,f.childLanes=r.childLanes,f.lanes=r.lanes,f.child=r.child,f.memoizedProps=r.memoizedProps,f.memoizedState=r.memoizedState,f.updateQueue=r.updateQueue;var m=r.dependencies;switch(f.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},f.sibling=r.sibling,f.index=r.index,f.ref=r.ref,f.selfBaseDuration=r.selfBaseDuration,f.treeBaseDuration=r.treeBaseDuration,f._debugNeedsRemount=r._debugNeedsRemount,f.tag){case J:case I:case ie:f.type=pu(r.type);break;case Y:f.type=Fm(r.type);break;case le:f.type=Im(r.type);break}return f}function P4(r,a){r.flags&=gi|un;var f=r.alternate;if(f===null)r.childLanes=Be,r.lanes=a,r.child=null,r.subtreeFlags=st,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null,r.selfBaseDuration=0,r.treeBaseDuration=0;else{r.childLanes=f.childLanes,r.lanes=f.lanes,r.child=f.child,r.subtreeFlags=st,r.deletions=null,r.memoizedProps=f.memoizedProps,r.memoizedState=f.memoizedState,r.updateQueue=f.updateQueue,r.type=f.type;var m=f.dependencies;r.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},r.selfBaseDuration=f.selfBaseDuration,r.treeBaseDuration=f.treeBaseDuration}return r}function B4(r,a,f){var m;return r===pc?(m=jt,a===!0&&(m|=Tn,m|=Fa)):m=mt,Ur&&(m|=tn),Ga(q,null,null,m)}function Hm(r,a,f,m,v,_){var B=J,F=r;if(typeof r=="function")Gm(r)?(B=Y,F=Fm(F)):F=pu(F);else if(typeof r=="string")B=V;else e:switch(r){case St:return Bo(f.children,v,_,a);case he:B=ae,v|=Tn,(v&jt)!==mt&&(v|=Fa);break;case k:return M4(f,v,_,a);case G:return z4(f,v,_,a);case Z:return F4(f,v,_,a);case Qe:return wy(f,v,_,a);case Oe:case me:case dt:case Jt:case ze:default:{if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ce:B=te;break e;case ue:B=L;break e;case U:B=le,F=Im(F);break e;case be:B=se;break e;case _e:B=j,F=null;break e}var H="";{(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(H+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var $=m?it(m):null;$&&(H+=`
486
486
 
487
487
  Check the render method of \``+$+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(r==null?r:typeof r)+"."+H))}}var re=Ga(B,f,a,v);return re.elementType=r,re.type=F,re.lanes=_,re._debugOwner=m,re}function Xm(r,a,f){var m=null;m=r._owner;var v=r.type,_=r.key,B=r.props,F=Hm(v,_,B,m,a,f);return F._debugSource=r._source,F._debugOwner=r._owner,F}function Bo(r,a,f,m){var v=Ga(X,r,m,a);return v.lanes=f,v}function M4(r,a,f,m){typeof r.id!="string"&&u('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof r.id);var v=Ga(Ae,r,m,a|tn);return v.elementType=k,v.lanes=f,v.stateNode={effectDuration:0,passiveEffectDuration:0},v}function z4(r,a,f,m){var v=Ga(ne,r,m,a);return v.elementType=G,v.lanes=f,v}function F4(r,a,f,m){var v=Ga(xe,r,m,a);return v.elementType=Z,v.lanes=f,v}function wy(r,a,f,m){var v=Ga(Fe,r,m,a);v.elementType=Qe,v.lanes=f;var _={isHidden:!1};return v.stateNode=_,v}function Wm(r,a,f){var m=Ga(ge,r,null,a);return m.lanes=f,m}function I4(){var r=Ga(V,null,null,mt);return r.elementType="DELETED",r}function O4(r){var a=Ga(ve,null,null,mt);return a.stateNode=r,a}function Qm(r,a,f){var m=r.children!==null?r.children:[],v=Ga(W,m,r.key,a);return v.lanes=f,v.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},v}function Cy(r,a){return r===null&&(r=Ga(J,null,null,mt)),r.tag=a.tag,r.key=a.key,r.elementType=a.elementType,r.type=a.type,r.stateNode=a.stateNode,r.return=a.return,r.child=a.child,r.sibling=a.sibling,r.index=a.index,r.ref=a.ref,r.pendingProps=a.pendingProps,r.memoizedProps=a.memoizedProps,r.updateQueue=a.updateQueue,r.memoizedState=a.memoizedState,r.dependencies=a.dependencies,r.mode=a.mode,r.flags=a.flags,r.subtreeFlags=a.subtreeFlags,r.deletions=a.deletions,r.lanes=a.lanes,r.childLanes=a.childLanes,r.alternate=a.alternate,r.actualDuration=a.actualDuration,r.actualStartTime=a.actualStartTime,r.selfBaseDuration=a.selfBaseDuration,r.treeBaseDuration=a.treeBaseDuration,r._debugSource=a._debugSource,r._debugOwner=a._debugOwner,r._debugNeedsRemount=a._debugNeedsRemount,r._debugHookTypes=a._debugHookTypes,r}function U4(r,a,f,m,v){this.tag=a,this.containerInfo=r,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Vl,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=Ln,this.eventTimes=go(Be),this.expirationTimes=go(dn),this.pendingLanes=Be,this.suspendedLanes=Be,this.pingedLanes=Be,this.expiredLanes=Be,this.mutableReadLanes=Be,this.finishedLanes=Be,this.entangledLanes=Be,this.entanglements=go(Be),this.identifierPrefix=m,this.onRecoverableError=v,_r&&(this.mutableSourceEagerHydrationData=null),this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var _=this.pendingUpdatersLaneMap=[],B=0;B<Rs;B++)_.push(new Set)}switch(a){case pc:this._debugRootType=f?"hydrateRoot()":"createRoot()";break;case ri:this._debugRootType=f?"hydrate()":"render()";break}}function _y(r,a,f,m,v,_,B,F,H,$){var re=new U4(r,a,f,F,H),ye=B4(a,_);re.current=ye,ye.stateNode=re;{var Te={element:m,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null};ye.memoizedState=Te}return n0(ye),re}var j4="18.3.1";function G4(r,a,f){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return _b(m),{$$typeof:je,key:m==null?null:""+m,children:r,containerInfo:a,implementation:f}}var Ym,Vm;Ym=!1,Vm={};function Ey(r){if(!r)return mr;var a=x(r),f=va(a);if(a.tag===Y){var m=a.type;if(Fr(m))return hc(a,m,f)}return f}function H4(r){var a=x(r);if(a===void 0){if(typeof r.render=="function")throw new Error("Unable to find node on an unmounted component.");var f=Object.keys(r).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+f)}var m=ys(a);return m===null?null:m.stateNode}function X4(r,a){{var f=x(r);if(f===void 0){if(typeof r.render=="function")throw new Error("Unable to find node on an unmounted component.");var m=Object.keys(r).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+m)}var v=ys(f);if(v===null)return null;if(v.mode&Tn){var _=it(f)||"Component";if(!Vm[_]){Vm[_]=!0;var B=Je;try{Vt(v),f.mode&Tn?u("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",a,a,_):u("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",a,a,_)}finally{B?Vt(B):Bt()}}}return v.stateNode}}function W4(r,a,f,m,v,_,B,F){var H=!1,$=null;return _y(r,a,H,$,f,m,v,_,B)}function Q4(r,a,f,m,v,_,B,F,H,$){var re=!0,ye=_y(f,m,re,r,v,_,B,F,H);ye.context=Ey(null);var Te=ye.current,Ne=Qr(),Me=No(Te),Pe=Xs(Ne,Me);return Pe.callback=a??null,_o(Te,Pe,Me),W3(ye,Me,Ne),ye}function Ty(r,a,f,m){Ic(a,r);var v=a.current,_=Qr(),B=No(v);yo(B);var F=Ey(f);a.context===null?a.context=F:a.pendingContext=F,wt&&Je!==null&&!Ym&&(Ym=!0,u(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
488
488
 
@@ -509,12 +509,12 @@ For more info see: https://github.com/konvajs/react-konva/issues/256
509
509
  `,o9=`ReactKonva: You are using "zIndex" attribute for a Konva node.
510
510
  react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
511
511
  For more info see: https://github.com/konvajs/react-konva/issues/194
512
- `,l9={};function bA(t,e,n=l9){if(!Y2&&"zIndex"in e&&(console.warn(o9),Y2=!0),!V2&&e.draggable){var i=e.x!==void 0||e.y!==void 0,s=e.onDragEnd||e.onDragMove;i&&!s&&(console.warn(s9),V2=!0)}for(var c in n)if(!Q2[c]){var d=c.slice(0,2)==="on",h=n[c]!==e[c];if(d&&h){var p=c.substr(2).toLowerCase();p.substr(0,7)==="content"&&(p="content"+p.substr(7,1).toUpperCase()+p.substr(8)),t.off(p,n[c])}var u=!e.hasOwnProperty(c);u&&t.setAttr(c,void 0)}var A=e._useStrictMode,y={},x=!1;const S={};for(var c in e)if(!Q2[c]){var d=c.slice(0,2)==="on",w=n[c]!==e[c];if(d&&w){var p=c.substr(2).toLowerCase();p.substr(0,7)==="content"&&(p="content"+p.substr(7,1).toUpperCase()+p.substr(8)),e[c]&&(S[p]=e[c])}!d&&(e[c]!==n[c]||A&&e[c]!==t.getAttr(c))&&(x=!0,y[c]=e[c])}x&&(t.setAttrs(y),Vo(t));for(var p in S)t.on(p+iv,S[p])}function Vo(t){if(!Ye.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}var Ag=av();const ub={},c9={};Il.Node.prototype._applyProps=bA;function u9(t,e){if(typeof e=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`);return}t.add(e),Vo(t)}function d9(t,e,n){let i=Il[t];i||(console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),i=Il.Group);const s={},c={};for(var d in e){var h=d.slice(0,2)==="on";h?c[d]=e[d]:s[d]=e[d]}const p=new i(s);return bA(p,c),p}function f9(t,e,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function h9(t,e,n){return!1}function p9(t){return t}function A9(){return null}function m9(){return null}function g9(t,e,n,i){return c9}function v9(){}function y9(t){}function x9(t,e){return!1}function b9(){return ub}function S9(){return ub}const w9=setTimeout,C9=clearTimeout,_9=-1;function E9(t,e){return!1}const T9=!1,R9=!0,D9=!0;function L9(t,e){e.parent===t?e.moveToTop():t.add(e),Vo(t)}function k9(t,e){e.parent===t?e.moveToTop():t.add(e),Vo(t)}function db(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),Vo(t)}function N9(t,e,n){db(t,e,n)}function P9(t,e){e.destroy(),e.off(iv),Vo(t)}function B9(t,e){e.destroy(),e.off(iv),Vo(t)}function M9(t,e,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function z9(t,e,n){}function F9(t,e,n,i,s){bA(t,s,i)}function I9(t){t.hide(),Vo(t)}function O9(t){}function U9(t,e){(e.visible==null||e.visible)&&t.show()}function j9(t,e){}function G9(t){}function H9(){}const X9=()=>cb.DefaultEventPriority,W9=Object.freeze(Object.defineProperty({__proto__:null,appendChild:L9,appendChildToContainer:k9,appendInitialChild:u9,cancelTimeout:C9,clearContainer:G9,commitMount:z9,commitTextUpdate:M9,commitUpdate:F9,createInstance:d9,createTextInstance:f9,detachDeletedInstance:H9,finalizeInitialChildren:h9,getChildHostContext:S9,getCurrentEventPriority:X9,getPublicInstance:p9,getRootHostContext:b9,hideInstance:I9,hideTextInstance:O9,idlePriority:Ag.unstable_IdlePriority,insertBefore:db,insertInContainerBefore:N9,isPrimaryRenderer:T9,noTimeout:_9,now:Ag.unstable_now,prepareForCommit:A9,preparePortalMount:m9,prepareUpdate:g9,removeChild:P9,removeChildFromContainer:B9,resetAfterCommit:v9,resetTextContent:y9,run:Ag.unstable_runWithPriority,scheduleTimeout:w9,shouldDeprioritizeSubtree:x9,shouldSetTextContent:E9,supportsMutation:D9,unhideInstance:U9,unhideTextInstance:j9,warnsIfNotActing:R9},Symbol.toStringTag,{value:"Module"}));var Q9=Object.defineProperty,Y9=Object.defineProperties,V9=Object.getOwnPropertyDescriptors,q2=Object.getOwnPropertySymbols,q9=Object.prototype.hasOwnProperty,K9=Object.prototype.propertyIsEnumerable,K2=(t,e,n)=>e in t?Q9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J2=(t,e)=>{for(var n in e||(e={}))q9.call(e,n)&&K2(t,n,e[n]);if(q2)for(var n of q2(e))K9.call(e,n)&&K2(t,n,e[n]);return t},J9=(t,e)=>Y9(t,V9(e)),Z2,$2;typeof window<"u"&&((Z2=window.document)!=null&&Z2.createElement||(($2=window.navigator)==null?void 0:$2.product)==="ReactNative")?Ea.useLayoutEffect:Ea.useEffect;function fb(t,e,n){if(!t)return;if(n(t)===!0)return t;let i=t.child;for(;i;){const s=fb(i,e,n);if(s)return s;i=i.sibling}}function hb(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const ex=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=ex;return}return ex.apply(this,arguments)};const sv=hb(Ea.createContext(null));class pb extends Ea.Component{render(){return Ea.createElement(sv.Provider,{value:this._reactInternals},this.props.children)}}function Z9(){const t=Ea.useContext(sv);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=Ea.useId();return Ea.useMemo(()=>{for(const i of[t,t==null?void 0:t.alternate]){if(!i)continue;const s=fb(i,!1,c=>{let d=c.memoizedState;for(;d;){if(d.memoizedState===e)return!0;d=d.next}});if(s)return s}},[t,e])}function $9(){const t=Z9(),[e]=Ea.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const s=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;s&&s!==sv&&!e.has(s)&&e.set(s,Ea.useContext(hb(s)))}n=n.return}return e}function Ab(){const t=$9();return Ea.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>i=>Ea.createElement(e,null,Ea.createElement(n.Provider,J9(J2({},i),{value:t.get(n)}))),e=>Ea.createElement(pb,J2({},e))),[t])}function e7(t){const e=se.useRef({});return se.useLayoutEffect(()=>{e.current=t}),se.useLayoutEffect(()=>()=>{e.current={}},[]),e.current}const t7=t=>{const e=se.useRef(null),n=se.useRef(null),i=se.useRef(null),s=e7(t),c=Ab(),d=h=>{const{forwardedRef:p}=t;p&&(typeof p=="function"?p(h):p.current=h)};return se.useLayoutEffect(()=>(n.current=new Il.Stage({width:t.width,height:t.height,container:e.current}),d(n.current),i.current=bf.createContainer(n.current,cb.LegacyRoot,!1,null),bf.updateContainer(se.createElement(c,{},t.children),i.current),()=>{Il.isBrowser&&(d(null),bf.updateContainer(null,i.current,null),n.current.destroy())}),[]),se.useLayoutEffect(()=>{d(n.current),bA(n.current,t,s),bf.updateContainer(se.createElement(c,{},t.children),i.current,null)}),se.createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},mb="Layer",hi="Group",qr="Rect",ov="Ellipse",Go="Line",sA="Image",Js="Text",lv="Arrow",cv="Transformer",bf=n9(W9);bf.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:process.env.NODE_ENV!=="production"?1:0,version:se.version,rendererPackageName:"react-konva"});const gb=se.forwardRef((t,e)=>se.createElement(pb,{},se.createElement(t7,{...t,forwardedRef:e}))),Zp=960,$p=540,vb=(t,e,n)=>{if(!n.enabled)return{x:t.x,y:t.y,guides:[]};let i=t.x,s=t.y;const c=[],d=Math.max(n.threshold,15),h=t.x,p=t.x+t.width,u=t.x+t.width/2,A=t.y,y=t.y+t.height,x=t.y+t.height/2,S=Zp/2,w=$p/2;if(n.snapToCenter&&(Math.abs(u-S)<d?(i=S-t.width/2,c.push({type:"vertical",position:S,isCenter:!0})):Math.abs(h-S)<d?(i=S,c.push({type:"vertical",position:S,isCenter:!0})):Math.abs(p-S)<d&&(i=S-t.width,c.push({type:"vertical",position:S,isCenter:!0})),Math.abs(x-w)<d?(s=w-t.height/2,c.push({type:"horizontal",position:w,isCenter:!0})):Math.abs(A-w)<d?(s=w,c.push({type:"horizontal",position:w,isCenter:!0})):Math.abs(y-w)<d&&(s=w-t.height,c.push({type:"horizontal",position:w,isCenter:!0}))),n.snapToEdges&&(Math.abs(h)<d&&(i=0,c.push({type:"vertical",position:0})),Math.abs(p-Zp)<d&&(i=Zp-t.width,c.push({type:"vertical",position:Zp})),Math.abs(A)<d&&(s=0,c.push({type:"horizontal",position:0})),Math.abs(y-$p)<d&&(s=$p-t.height,c.push({type:"horizontal",position:$p}))),n.snapToElements)for(const T of e){const R=T.x,D=T.x+T.width,N=T.x+T.width/2,M=T.y,O=T.y+T.height,I=T.y+T.height/2;Math.abs(h-R)<d&&(i=R,c.push({type:"vertical",position:R})),Math.abs(p-D)<d&&(i=D-t.width,c.push({type:"vertical",position:D})),Math.abs(u-N)<d&&(i=N-t.width/2,c.push({type:"vertical",position:N})),Math.abs(A-M)<d&&(s=M,c.push({type:"horizontal",position:M})),Math.abs(y-O)<d&&(s=O-t.height,c.push({type:"horizontal",position:O})),Math.abs(x-I)<d&&(s=I-t.height/2,c.push({type:"horizontal",position:I}))}return{x:i,y:s,guides:c}};var bu={},tx;function n7(){if(tx)return bu;tx=1;var t=ax;if(process.env.NODE_ENV==="production")bu.createRoot=t.createRoot,bu.hydrateRoot=t.hydrateRoot;else{var e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;bu.createRoot=function(n,i){e.usingClientEntryPoint=!0;try{return t.createRoot(n,i)}finally{e.usingClientEntryPoint=!1}},bu.hydrateRoot=function(n,i,s){e.usingClientEntryPoint=!0;try{return t.hydrateRoot(n,i,s)}finally{e.usingClientEntryPoint=!1}}}return bu}var r7=n7();const a7=fA(r7);var i7=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]]);return n};const s7=t=>{const e=window.getComputedStyle(t).position;return!(e==="absolute"||e==="relative")};function o7(t=()=>{}){const e=se.useRef(t);return e.current=t,se.useCallback((...n)=>e.current.apply(null,n),[])}const Gg=({children:t,groupProps:e,divProps:n,transform:i,transformFunc:s,parentNodeFunc:c})=>{const d=Ab(),h=se.useRef(null),[p]=se.useState(()=>document.createElement("div")),u=se.useMemo(()=>a7.createRoot(p),[p]),A=i??!0,y=o7(()=>{if(A&&h.current){let R=h.current.getAbsoluteTransform().decompose();s&&(R=s(R)),p.style.position="absolute",p.style.zIndex="10",p.style.top="0px",p.style.left="0px",p.style.transform=`translate(${R.x}px, ${R.y}px) rotate(${R.rotation}deg) scaleX(${R.scaleX}) scaleY(${R.scaleY})`,p.style.transformOrigin="top left"}else p.style.position="",p.style.zIndex="",p.style.top="",p.style.left="",p.style.transform="",p.style.transformOrigin="";const x=n||{},{style:S}=x,w=i7(x,["style"]);Object.assign(p.style,S),Object.assign(p,w)});return se.useLayoutEffect(()=>{var x;const S=h.current;if(!S)return;const w=c?c({stage:S.getStage()}):(x=S.getStage())===null||x===void 0?void 0:x.container();if(w)return w.appendChild(p),A&&s7(w)&&(w.style.position="relative"),S.on("absoluteTransformChange",y),y(),()=>{var T;S.off("absoluteTransformChange",y),(T=p.parentNode)===null||T===void 0||T.removeChild(p)}},[A,c]),se.useLayoutEffect(()=>{y()},[n,s]),se.useLayoutEffect(()=>{queueMicrotask(()=>{ax.flushSync(()=>{u.render(se.createElement(d,null,t))})})}),se.useLayoutEffect(()=>()=>{setTimeout(()=>{u.unmount()})},[]),se.createElement(hi,Object.assign({ref:h},e))};var mg,nx;function l7(){if(nx)return mg;nx=1;var t=se;return mg=function(n,i,s){const c=t.useRef("loading"),d=t.useRef(),[h,p]=t.useState(0),u=t.useRef(),A=t.useRef(),y=t.useRef();return(u.current!==n||A.current!==i||y.current!==s)&&(c.current="loading",d.current=void 0,u.current=n,A.current=i,y.current=s),t.useLayoutEffect(function(){if(!n)return;var x=document.createElement("img");function S(){x.decode().catch(()=>{}).finally(()=>{c.current="loaded",d.current=x,p(Math.random())})}function w(){c.current="failed",d.current=void 0,p(Math.random())}return x.addEventListener("load",S),x.addEventListener("error",w),i&&(x.crossOrigin=i),s&&(x.referrerPolicy=s),x.src=n,function(){x.removeEventListener("load",S),x.removeEventListener("error",w)}},[n,i,s]),[d.current,c.current]},mg}var c7=l7();const u7=fA(c7),yb=({element:t,isSelected:e,onSelect:n,onChange:i,onDragStart:s,onDragEnd:c})=>{const d=se.useRef(null),h=se.useRef(null),p=se.useRef(null),[u,A]=se.useState(!1),[y,x]=se.useState(t.fontSize*2);se.useEffect(()=>{var N;e&&!u&&p.current&&d.current&&(p.current.nodes([d.current]),(N=p.current.getLayer())==null||N.batchDraw())},[e,u]),se.useEffect(()=>{h.current&&x(h.current.height())},[t.content,t.fontSize,t.width]);const S=se.useCallback(()=>{A(!0)},[]),w=se.useCallback(N=>{i({content:N}),A(!1)},[i]),T=N=>{const M=N.target;i({x:M.x()-M.offsetX(),y:M.y()-M.offsetY()},!0)},R=N=>{const M=N.target;i({x:M.x()-M.offsetX(),y:M.y()-M.offsetY()}),c==null||c()},D=()=>{const N=d.current;if(!N)return;const M=N.scaleX(),O=Math.max(50,t.width*M);N.scaleX(1),N.scaleY(1),N.offsetX(O/2),i({x:N.x()-O/2,y:N.y()-N.offsetY(),width:O,rotation:N.rotation()})};return C.jsxs(C.Fragment,{children:[C.jsx(hi,{ref:d,x:t.x+t.width/2,y:t.y+y/2,offsetX:t.width/2,offsetY:y/2,rotation:t.rotation,draggable:!u,onClick:n,onTap:n,onDblClick:S,onDblTap:S,onDragStart:()=>s==null?void 0:s(),onDragMove:T,onDragEnd:R,onTransformStart:()=>s==null?void 0:s(),onTransformEnd:D,children:C.jsx(Js,{ref:h,x:0,y:0,width:t.width,text:t.content,fontSize:t.fontSize,fontFamily:t.fontFamily,fontStyle:t.fontWeight==="700"||t.fontWeight==="800"?"bold":"normal",fill:t.fill,align:t.align,lineHeight:t.lineHeight||1.2,opacity:u?0:1})}),e&&!u&&C.jsx(cv,{ref:p,flipEnabled:!1,enabledAnchors:["middle-left","middle-right"],rotateEnabled:!0,rotateAnchorOffset:20,rotateAnchorCursor:"grab",anchorSize:10,anchorCornerRadius:5,anchorFill:"#ffffff",anchorStroke:"#5B6EF7",anchorStrokeWidth:2,borderStroke:"#5B6EF7",borderStrokeWidth:2,rotationSnaps:[0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345],rotationSnapTolerance:5,boundBoxFunc:(N,M)=>Math.abs(M.width)<50?N:M}),u&&C.jsx(Gg,{groupProps:{x:t.x,y:t.y},divProps:{style:{opacity:1}},children:C.jsx(f7,{element:t,onComplete:w,onCancel:()=>A(!1)})})]})},d7=t=>{let e=t.replace("#","");e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const n=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),s=parseInt(e.substring(4,6),16);return(n*299+i*587+s*114)/1e3>180},f7=({element:t,onComplete:e,onCancel:n})=>{const i=se.useRef(null),[s,c]=se.useState(t.content),d=d7(t.fill)?"#1e293b":t.fill;se.useEffect(()=>{const u=i.current;u&&requestAnimationFrame(()=>{u.focus(),u.select()})},[]);const h=u=>{u.key==="Escape"?n():u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),e(s))},p=()=>{setTimeout(()=>{e(s)},100)};return C.jsx("textarea",{ref:i,value:s,onChange:u=>c(u.target.value),onKeyDown:h,onBlur:p,style:{width:`${t.width}px`,minHeight:"60px",padding:"8px",fontSize:`${t.fontSize}px`,fontFamily:t.fontFamily,color:d,textAlign:t.align,border:"2px solid #5B6EF7",borderRadius:"8px",outline:"none",resize:"vertical",backgroundColor:"white",boxShadow:"0 4px 20px rgba(0,0,0,0.15)",lineHeight:t.lineHeight||1.2},placeholder:"텍스트를 입력하세요... (마크다운 지원: **굵게**, *기울임*)"})},xb=({element:t,isSelected:e,onSelect:n,onChange:i,onDragStart:s,onDragEnd:c,onReplaceWithImage:d})=>{const h=se.useRef(null),p=se.useRef(null),u=se.useRef(null),[A,y]=se.useState(!1);se.useEffect(()=>{var q;e&&!A&&p.current&&h.current&&(p.current.nodes([h.current]),(q=p.current.getLayer())==null||q.batchDraw())},[e,A]);const x=q=>{const W=q.target;i({x:W.x()-W.offsetX(),y:W.y()-W.offsetY()},!0)},S=q=>{const W=q.target;i({x:W.x()-W.offsetX(),y:W.y()-W.offsetY()}),c==null||c()},w=()=>{const q=h.current;if(!q)return;const W=q.scaleX(),V=q.scaleY(),ge=Math.max(10,t.width*W),X=Math.max(10,t.height*V);q.scaleX(1),q.scaleY(1),q.offsetX(ge/2),q.offsetY(X/2),i({x:q.x()-ge/2,y:q.y()-X/2,width:ge,height:X,rotation:q.rotation()})},T=se.useCallback(()=>{t.isImagePlaceholder&&u.current&&u.current.click()},[t.isImagePlaceholder]),R=se.useCallback(q=>{var ge;const W=(ge=q.target.files)==null?void 0:ge[0];if(!W||!d)return;const V=new FileReader;V.onload=X=>{var te;const ae=(te=X.target)==null?void 0:te.result,L=new window.Image;L.onload=()=>{const le=L.width/L.height,Ae=t.width/t.height;let ne=0,oe=0,ie=L.width,j=L.height;le>Ae?(ie=L.height*Ae,ne=(L.width-ie)/2):(j=L.width/Ae,oe=(L.height-j)/2),d({src:ae,width:t.width,height:t.height,crop:{x:ne,y:oe,width:ie,height:j}})},L.src=ae},V.readAsDataURL(W),q.target.value=""},[t.width,t.height,d]),D=se.useCallback(()=>{t.isImagePlaceholder||t.shapeType==="line"||t.shapeType==="arrow"||y(!0)},[t.shapeType,t.isImagePlaceholder]),N=se.useCallback(q=>{i({text:q}),y(!1)},[i]),M=()=>[t.width/2,0,t.width,t.height,0,t.height],O=()=>[0,0,t.width,t.height],I=()=>{const q={fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth};switch(t.shapeType){case"rect":return C.jsx(qr,{width:t.width,height:t.height,cornerRadius:t.cornerRadius||0,...q});case"ellipse":return C.jsx(ov,{x:t.width/2,y:t.height/2,radiusX:t.width/2,radiusY:t.height/2,...q});case"triangle":return C.jsx(Go,{points:M(),closed:!0,...q});case"line":return C.jsx(Go,{points:O(),stroke:t.stroke,strokeWidth:t.strokeWidth});case"arrow":return C.jsx(lv,{points:O(),stroke:t.stroke,fill:t.stroke,strokeWidth:t.strokeWidth,pointerLength:10,pointerWidth:10});default:return null}},Y=t.shapeType!=="line"&&t.shapeType!=="arrow",J=se.useCallback(()=>{t.isImagePlaceholder&&T(),n()},[t.isImagePlaceholder,T,n]);return C.jsxs(C.Fragment,{children:[t.isImagePlaceholder&&C.jsx(Gg,{groupProps:{x:0,y:0},divProps:{style:{display:"none"}},children:C.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:R,style:{display:"none"}})}),C.jsxs(hi,{ref:h,x:t.x+t.width/2,y:t.y+t.height/2,offsetX:t.width/2,offsetY:t.height/2,rotation:t.rotation,draggable:!A,onClick:J,onTap:J,onDblClick:D,onDblTap:D,onDragStart:()=>s==null?void 0:s(),onDragMove:x,onDragEnd:S,onTransformStart:()=>s==null?void 0:s(),onTransformEnd:w,style:{cursor:t.isImagePlaceholder?"pointer":"move"},children:[I(),Y&&t.text&&!A&&C.jsx(Js,{x:0,y:0,width:t.width,height:t.height,text:t.text,fontSize:t.textSize||16,fill:t.textColor||"#1e293b",align:"center",verticalAlign:"middle",listening:!1}),A&&C.jsx(Gg,{groupProps:{x:0,y:0},divProps:{style:{opacity:1}},children:C.jsx(p7,{element:t,onComplete:N,onCancel:()=>y(!1)})})]}),e&&!A&&C.jsx(cv,{ref:p,flipEnabled:!1,rotateEnabled:!0,rotateAnchorOffset:20,rotateAnchorCursor:"grab",anchorSize:10,anchorCornerRadius:5,anchorFill:"#ffffff",anchorStroke:"#5B6EF7",anchorStrokeWidth:2,borderStroke:"#5B6EF7",borderStrokeWidth:2,rotationSnaps:[0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345],rotationSnapTolerance:5,boundBoxFunc:(q,W)=>Math.abs(W.width)<10||Math.abs(W.height)<10?q:W})]})},h7=t=>{let e=t.replace("#","");e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const n=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),s=parseInt(e.substring(4,6),16);return(n*299+i*587+s*114)/1e3>180},p7=({element:t,onComplete:e,onCancel:n})=>{const i=se.useRef(null),[s,c]=se.useState(t.text||""),d=t.textColor||"#1e293b",h=h7(d)?"#1e293b":d;se.useEffect(()=>{i.current&&requestAnimationFrame(()=>{var A,y;(A=i.current)==null||A.focus(),(y=i.current)==null||y.select()})},[]);const p=A=>{A.key==="Escape"?n():A.key==="Enter"&&(A.preventDefault(),e(s))},u=()=>{setTimeout(()=>{e(s)},100)};return C.jsx("input",{ref:i,type:"text",value:s,onChange:A=>c(A.target.value),onKeyDown:p,onBlur:u,style:{width:`${t.width}px`,height:`${t.height}px`,padding:"8px",fontSize:`${t.textSize||16}px`,color:h,textAlign:"center",border:"2px solid #5B6EF7",borderRadius:t.shapeType==="ellipse"?"50%":"8px",outline:"none",backgroundColor:"rgba(255,255,255,0.9)",boxShadow:"0 4px 20px rgba(0,0,0,0.15)"},placeholder:"텍스트 입력..."})},bb=({element:t,isSelected:e,onSelect:n,onChange:i,onDragStart:s,onDragEnd:c})=>{const d=se.useRef(null),h=se.useRef(null),p=se.useRef(null),[u,A]=se.useState(null),[y,x]=se.useState(!1),[S,w]=se.useState({x:0,y:0}),[T,R]=se.useState(1);se.useEffect(()=>{const ie=new window.Image;ie.src=t.src,ie.onload=()=>{A(ie)}},[t.src]),se.useEffect(()=>{var ie;e&&!y&&h.current&&d.current&&(h.current.nodes([d.current]),(ie=h.current.getLayer())==null||ie.batchDraw())},[e,y]),se.useEffect(()=>{y&&(w({x:0,y:0}),R(1))},[y]);const D=se.useCallback(ie=>{if(!t.crop||!u)return;const j=t.crop,K=T,ve=Math.max(1,Math.min(3,ie)),xe=t.width/2,Re=t.height/2,Fe=t.width/j.width*K,pt=t.height/j.height*K,lt=-j.x*Fe+S.x,ut=-j.y*pt+S.y,Rt=(xe-lt)/Fe,je=(Re-ut)/pt,St=t.width/j.width*ve,he=t.height/j.height*ve,k=xe-Rt*St,ce=Re-je*he,ue=k+j.x*St,U=ce+j.y*he,G=u.width*St,Z=u.height*he,be=t.width-G,_e=0,me=t.height-Z,ze=0,Qe=Math.max(be,Math.min(_e,ue)),Oe=Math.max(me,Math.min(ze,U));R(ve),w({x:Qe,y:Oe})},[t.crop,t.width,t.height,u,T,S]),N=ie=>{const j=ie.target;i({x:j.x()-t.width/2,y:j.y()-t.height/2},!0)},M=ie=>{const j=ie.target;i({x:j.x()-t.width/2,y:j.y()-t.height/2}),c==null||c()},O=()=>{const ie=d.current;if(!ie)return;const j=ie.scaleX(),K=ie.scaleY(),ve=Math.max(20,t.width*j),xe=Math.max(20,t.height*K);ie.scaleX(1),ie.scaleY(1),ie.offsetX(ve/2),ie.offsetY(xe/2),i({x:ie.x()-ve/2,y:ie.y()-xe/2,width:ve,height:xe,rotation:ie.rotation()})},I=se.useCallback(ie=>{const j=t.cornerRadius||0,K=t.width,ve=t.height;if(j===0)ie.rect(0,0,K,ve);else{const xe=Math.min(j,K/2,ve/2);ie.beginPath(),ie.moveTo(xe,0),ie.lineTo(K-xe,0),ie.arcTo(K,0,K,xe,xe),ie.lineTo(K,ve-xe),ie.arcTo(K,ve,K-xe,ve,xe),ie.lineTo(xe,ve),ie.arcTo(0,ve,0,ve-xe,xe),ie.lineTo(0,xe),ie.arcTo(0,0,xe,0,xe),ie.closePath()}},[t.cornerRadius,t.width,t.height]),Y=se.useCallback(()=>{t.crop&&x(!0)},[t.crop]),J=se.useCallback(ie=>{const j=ie.target,K=t.crop;if(!K||!u)return;const ve=t.width/K.width*T,xe=t.height/K.height*T,Re=u.width*ve,Fe=u.height*xe,pt=-K.x*ve,lt=-K.y*xe,ut=t.width-Re,Rt=0,je=t.height-Fe,St=0,he=Math.max(ut,Math.min(Rt,j.x())),k=Math.max(je,Math.min(St,j.y()));j.x(he),j.y(k),w({x:he-pt,y:k-lt})},[t.crop,t.width,t.height,u,T]),q=se.useCallback(()=>{if(!t.crop||!u){x(!1);return}const ie=t.crop,j=ie.width/t.width/T,K=ie.height/t.height/T,ve=ie.width/T,xe=ie.height/T,Re=Math.max(0,Math.min(u.width-ve,ie.x-S.x*j)),Fe=Math.max(0,Math.min(u.height-xe,ie.y-S.y*K));i({crop:{x:Re,y:Fe,width:ve,height:xe}}),x(!1),w({x:0,y:0}),R(1)},[t.crop,t.width,t.height,u,S,T,i]),W=se.useCallback(()=>{x(!1),w({x:0,y:0}),R(1)},[]),V=se.useCallback(()=>{w({x:0,y:0}),R(1)},[]);if(se.useEffect(()=>{if(!y)return;const ie=j=>{j.key==="Escape"?W():j.key==="Enter"&&q()};return window.addEventListener("keydown",ie),()=>window.removeEventListener("keydown",ie)},[y,q,W]),!u)return null;const ge=t.crop,X=ge?t.width/ge.width:1,ae=ge?t.height/ge.height:1,L=y?X*T:X,te=y?ae*T:ae,le=u.width*L,Ae=u.height*te,ne=ge?-ge.x*L:0,oe=ge?-ge.y*te:0;return C.jsxs(C.Fragment,{children:[y&&ge&&C.jsxs(hi,{x:t.x+t.width/2,y:t.y+t.height/2,offsetX:t.width/2,offsetY:t.height/2,rotation:t.rotation,children:[C.jsx(qr,{x:ne+S.x-500,y:oe+S.y-500,width:le+1e3,height:Ae+1e3,fill:"rgba(0,0,0,0.5)",listening:!1}),C.jsx(sA,{ref:p,image:u,x:ne+S.x,y:oe+S.y,width:le,height:Ae,opacity:.7,draggable:!0,onDragMove:J}),C.jsx(hi,{clipFunc:ie=>ie.rect(0,0,t.width,t.height),listening:!1,children:C.jsx(sA,{image:u,x:ne+S.x,y:oe+S.y,width:le,height:Ae})}),C.jsx(qr,{x:0,y:0,width:t.width,height:t.height,stroke:"#5B6EF7",strokeWidth:2,fill:"transparent",listening:!1}),[{x:0,y:0},{x:t.width,y:0},{x:0,y:t.height},{x:t.width,y:t.height}].map((ie,j)=>C.jsx(qr,{x:ie.x-5,y:ie.y-5,width:10,height:10,fill:"#ffffff",stroke:"#5B6EF7",strokeWidth:2,cornerRadius:2,listening:!1},j))]}),!y&&C.jsx(hi,{ref:d,x:t.x+t.width/2,y:t.y+t.height/2,offsetX:t.width/2,offsetY:t.height/2,rotation:t.rotation,draggable:!0,onClick:n,onTap:n,onDblClick:Y,onDblTap:Y,onDragStart:()=>s==null?void 0:s(),onDragMove:N,onDragEnd:M,onTransformStart:()=>s==null?void 0:s(),onTransformEnd:O,clipFunc:t.cornerRadius?I:void 0,children:C.jsx(sA,{image:u,x:0,y:0,width:t.width,height:t.height,crop:t.crop})}),y&&C.jsxs(hi,{x:t.x,y:t.y-50,children:[C.jsx(qr,{x:0,y:0,width:390,height:40,fill:"white",cornerRadius:8,shadowColor:"black",shadowBlur:10,shadowOpacity:.15}),C.jsxs(hi,{x:10,y:5,onClick:()=>D(T-.25),onTap:()=>D(T-.25),children:[C.jsx(qr,{width:30,height:30,fill:T<=1?"#e2e8f0":"#f1f5f9",cornerRadius:6}),C.jsx(Js,{text:"-",x:0,y:0,width:30,height:30,align:"center",verticalAlign:"middle",fill:T<=1?"#94a3b8":"#64748b",fontSize:18,fontFamily:"Inter"})]}),C.jsx(Js,{text:`${Math.round(T*100)}%`,x:45,y:5,width:50,height:30,align:"center",verticalAlign:"middle",fill:"#334155",fontSize:12,fontFamily:"Inter"}),C.jsxs(hi,{x:100,y:5,onClick:()=>D(T+.25),onTap:()=>D(T+.25),children:[C.jsx(qr,{width:30,height:30,fill:T>=3?"#e2e8f0":"#f1f5f9",cornerRadius:6}),C.jsx(Js,{text:"+",x:0,y:0,width:30,height:30,align:"center",verticalAlign:"middle",fill:T>=3?"#94a3b8":"#64748b",fontSize:18,fontFamily:"Inter"})]}),C.jsxs(hi,{x:140,y:5,onClick:V,onTap:V,children:[C.jsx(qr,{width:50,height:30,fill:"#f1f5f9",cornerRadius:6}),C.jsx(Js,{text:"↺",x:0,y:0,width:50,height:30,align:"center",verticalAlign:"middle",fill:"#64748b",fontSize:16,fontFamily:"Inter"})]}),C.jsxs(hi,{x:200,y:5,onClick:q,onTap:q,children:[C.jsx(qr,{width:85,height:30,fill:"#5B6EF7",cornerRadius:6}),C.jsx(Js,{text:"완료",x:0,y:0,width:85,height:30,align:"center",verticalAlign:"middle",fill:"white",fontSize:13,fontFamily:"Malgun Gothic"})]}),C.jsxs(hi,{x:295,y:5,onClick:W,onTap:W,children:[C.jsx(qr,{width:85,height:30,fill:"#f1f5f9",cornerRadius:6}),C.jsx(Js,{text:"취소",x:0,y:0,width:85,height:30,align:"center",verticalAlign:"middle",fill:"#64748b",fontSize:13,fontFamily:"Malgun Gothic"})]})]}),e&&!y&&C.jsx(cv,{ref:h,flipEnabled:!1,rotateEnabled:!0,rotateAnchorOffset:20,rotateAnchorCursor:"grab",anchorSize:10,anchorCornerRadius:5,anchorFill:"#ffffff",anchorStroke:"#5B6EF7",anchorStrokeWidth:2,borderStroke:"#5B6EF7",borderStrokeWidth:2,rotationSnaps:[0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345],rotationSnapTolerance:5,boundBoxFunc:(ie,j)=>Math.abs(j.width)<20||Math.abs(j.height)<20?ie:j})]})},Su=960,wu=540,Sb=()=>{const t=se.useRef(null),e=se.useRef(null),[n,i]=se.useState(1);se.useEffect(()=>{const he=()=>{if(!e.current)return;const ce=e.current.offsetWidth,ue=e.current.offsetHeight,U=48,G=ce-U,Z=ue-U,be=G/Su,_e=Z/wu,me=Math.min(be,_e);i(me)};he();const k=new ResizeObserver(he);return e.current&&k.observe(e.current),()=>k.disconnect()},[]);const s=Ve(he=>he.slides),c=Ve(he=>he.currentSlideIndex),d=Ve(he=>he.selectedElementId),h=Ve(he=>he.mode),p=Ve(he=>he.currentShapeType),u=Ve(he=>he.currentTextStyle),A=Ve(he=>he.currentFontFamily),y=Ve(he=>he.addElement),x=Ve(he=>he.updateElement),S=Ve(he=>he.deleteElement),w=Ve(he=>he.selectElement),T=Ve(he=>he.setMode),R=Ve(he=>he.snapSettings),D=Ve(he=>he.commitElementUpdate),N=Ve(he=>he.selectedElementIds),M=Ve(he=>he.selectElements),O=Ve(he=>he.clearSelection),I=s[c],[Y,J]=se.useState([]),[q,W]=se.useState(!1),[V,ge]=se.useState(null),[X,ae]=se.useState(!1),[L,te]=se.useState(null),[le,Ae]=se.useState(!1),[ne,oe]=se.useState(null),[ie,j]=se.useState("default"),K=se.useCallback(he=>{if(!d)return{isInZone:!1,element:null,corner:""};const k=I.elements.find(G=>G.id===d);if(!k)return{isInZone:!1,element:null,corner:""};const ce=[{name:"nw",x:k.x,y:k.y,checkX:-1,checkY:-1},{name:"ne",x:k.x+k.width,y:k.y,checkX:1,checkY:-1},{name:"sw",x:k.x,y:k.y+k.height,checkX:-1,checkY:1},{name:"se",x:k.x+k.width,y:k.y+k.height,checkX:1,checkY:1}],ue=5,U=40;for(const G of ce){const Z=he.x-G.x,be=he.y-G.y,_e=Math.sqrt(Z*Z+be*be);if(_e>=ue&&_e<=U){const me=G.checkX<0&&Z<0||G.checkX>0&&Z>0,ze=G.checkY<0&&be<0||G.checkY>0&&be>0;if(me&&ze)return{isInZone:!0,element:k,corner:G.name};if((me||ze)&&_e<=25)return{isInZone:!0,element:k,corner:G.name}}}return{isInZone:!1,element:null,corner:""}},[d,I.elements]),ve=se.useCallback(he=>{var U;const k=t.current;if(!k)return;const ce=k.getPointerPosition();if(!ce)return;if(h==="select"){const G=K(ce);if(G.isInZone&&G.element){D();const Z=G.element,be=Z.x+Z.width/2,_e=Z.y+Z.height/2,me=Math.atan2(ce.y-_e,ce.x-be)*(180/Math.PI);Ae(!0),oe({elementId:Z.id,centerX:be,centerY:_e,startAngle:me,initialRotation:Z.rotation||0});return}}he.target===((U=he.target.getStage())==null?void 0:U.findOne(".background"))&&(h==="select"?(ae(!0),te({startX:ce.x,startY:ce.y,currentX:ce.x,currentY:ce.y})):(h==="text"||h==="shape")&&(W(!0),ge({startX:ce.x,startY:ce.y,currentX:ce.x,currentY:ce.y})))},[h,O,K,D]),xe=se.useCallback(he=>{const k=t.current;if(!k)return;const ce=k.getPointerPosition();if(ce){if(le&&ne){const U=Math.atan2(ce.y-ne.centerY,ce.x-ne.centerX)*(180/Math.PI)-ne.startAngle;let G=ne.initialRotation+U;const Z=15,be=5,_e=Math.round(G/Z)*Z;Math.abs(G-_e)<be&&(G=_e),G=(G%360+360)%360,x(ne.elementId,{rotation:G});return}if(h==="select"&&!X&&!q){const ue=K(ce);ue.isInZone?j({nw:"nwse-resize",ne:"nesw-resize",sw:"nesw-resize",se:"nwse-resize"}[ue.corner]||"grab"):j("default")}if(X&&L){te({...L,currentX:ce.x,currentY:ce.y});return}q&&V&&ge({...V,currentX:ce.x,currentY:ce.y})}},[q,V,X,L,le,ne,h,K,x]),Re=se.useCallback(he=>{const k=Math.min(he.startX,he.currentX),ce=Math.min(he.startY,he.currentY),ue=Math.abs(he.currentX-he.startX),U=Math.abs(he.currentY-he.startY);return ue<5&&U<5?[]:I.elements.filter(G=>{const Z=G.x+G.width,be=G.y+G.height,_e=k+ue,me=ce+U;return G.x<_e&&Z>k&&G.y<me&&be>ce}).map(G=>G.id)},[I.elements]),Fe=se.useCallback(()=>{if(le){Ae(!1),oe(null),j("default");return}if(X&&L){const be=Re(L);be.length>0?M(be):O(),ae(!1),te(null);return}if(!q||!V)return;const he=Math.min(V.startX,V.currentX),k=Math.min(V.startY,V.currentY),ce=Math.abs(V.currentX-V.startX),ue=Math.abs(V.currentY-V.startY),U=20,G=Math.max(ce,U),Z=Math.max(ue,U);if(h==="text"){const be=Du[u],_e={id:Pr(),type:"text",x:he,y:k,width:G<100?u==="title"?600:300:G,height:Z<50?be.fontSize*2:Z,rotation:0,content:u==="title"?"제목을 입력하세요":u==="subtitle"?"소제목을 입력하세요":"텍스트를 입력하세요",fontSize:be.fontSize,fontFamily:A,fill:"#1e293b",align:u==="title"||u==="subtitle"?"center":"left",textStyle:u,fontWeight:be.fontWeight,lineHeight:be.lineHeight};y(_e)}else if(h==="shape"){const be={id:Pr(),type:"shape",x:he,y:k,width:G,height:Z,rotation:0,shapeType:p,fill:"#5B6EF7",stroke:"#4338ca",strokeWidth:2};y(be)}W(!1),ge(null),T("select")},[q,V,h,p,u,A,y,T,X,L,Re,M,O,le]),pt=()=>{if(!X||!L)return null;const he=Math.min(L.startX,L.currentX),k=Math.min(L.startY,L.currentY),ce=Math.abs(L.currentX-L.startX),ue=Math.abs(L.currentY-L.startY);return C.jsx(qr,{x:he,y:k,width:ce,height:ue,fill:"rgba(91, 110, 247, 0.1)",stroke:"#5B6EF7",strokeWidth:1,dash:[4,4]})},lt=()=>{if(!q||!V)return null;const he=Math.min(V.startX,V.currentX),k=Math.min(V.startY,V.currentY),ce=Math.abs(V.currentX-V.startX),ue=Math.abs(V.currentY-V.startY);if(h==="text")return C.jsx(qr,{x:he,y:k,width:ce||100,height:ue||40,fill:"rgba(91, 110, 247, 0.1)",stroke:"#5B6EF7",strokeWidth:1,dash:[5,5]});if(h==="shape"){const U={fill:"rgba(91, 110, 247, 0.3)",stroke:"#5B6EF7",strokeWidth:2};switch(p){case"rect":return C.jsx(qr,{x:he,y:k,width:ce,height:ue,...U});case"ellipse":return C.jsx(ov,{x:he+ce/2,y:k+ue/2,radiusX:ce/2,radiusY:ue/2,...U});case"triangle":return C.jsx(Go,{points:[he+ce/2,k,he+ce,k+ue,he,k+ue],closed:!0,...U});case"line":return C.jsx(Go,{points:[V.startX,V.startY,V.currentX,V.currentY],stroke:"#5B6EF7",strokeWidth:2});case"arrow":return C.jsx(lv,{points:[V.startX,V.startY,V.currentX,V.currentY],stroke:"#5B6EF7",fill:"#5B6EF7",strokeWidth:2,pointerLength:10,pointerWidth:10});default:return null}}return null},ut=se.useCallback((he,k,ce=!1)=>{if(ce&&R.enabled&&"x"in k&&"y"in k){const ue=I.elements.find(U=>U.id===he);if(ue){const U="width"in k?k.width:ue.width,G="height"in k?k.height:ue.height,Z=I.elements.filter(_e=>_e.id!==he),be=vb({x:k.x,y:k.y,width:U,height:G},Z,R);J(be.guides),x(he,{...k,x:be.x,y:be.y});return}}J([]),x(he,k)},[x,R,I.elements]),Rt=se.useCallback(()=>{J([])},[]),je=se.useCallback((he,k)=>{const ce={id:Pr(),type:"image",x:he.x,y:he.y,width:he.width,height:he.height,rotation:he.rotation,src:k.src,crop:k.crop};S(he.id),y(ce)},[S,y]),St=()=>Y.length===0?null:Y.map((he,k)=>{const ce=he.isCenter,ue=ce?"#5B6EF7":"#ef4444",U=ce?2:1,G=ce?[8,4]:[4,4];return he.type==="vertical"?C.jsx(Go,{points:[he.position,0,he.position,wu],stroke:ue,strokeWidth:U,dash:G},`guide-${k}`):C.jsx(Go,{points:[0,he.position,Su,he.position],stroke:ue,strokeWidth:U,dash:G},`guide-${k}`)});return C.jsx(z.Center,{ref:e,w:"100%",h:"100%",children:C.jsx(z.Box,{style:{width:Su*n,height:wu*n},children:C.jsx(z.Box,{bg:"white",style:{width:Su,height:wu,transform:`scale(${n})`,transformOrigin:"top left",borderRadius:"var(--mantine-radius-md)",overflow:"hidden",boxShadow:"0 20px 70px rgba(0, 0, 0, 0.12)"},children:C.jsx(gb,{ref:t,width:Su,height:wu,onMouseDown:ve,onMouseMove:xe,onMouseUp:Fe,onMouseLeave:Fe,style:{cursor:h!=="select"?"crosshair":le?"grabbing":ie},children:C.jsxs(mb,{children:[C.jsx(qr,{name:"background",x:0,y:0,width:Su,height:wu,fill:I.background}),I.elements.map(he=>{const k=d===he.id||N.includes(he.id);return he.type==="text"?C.jsx(yb,{element:he,isSelected:k,onSelect:()=>w(he.id),onChange:(ce,ue)=>ut(he.id,ce,ue),onDragStart:D,onDragEnd:Rt},he.id):he.type==="shape"?C.jsx(xb,{element:he,isSelected:k,onSelect:()=>w(he.id),onChange:(ce,ue)=>ut(he.id,ce,ue),onDragStart:D,onDragEnd:Rt,onReplaceWithImage:ce=>je(he,ce)},he.id):he.type==="image"?C.jsx(bb,{element:he,isSelected:k,onSelect:()=>w(he.id),onChange:(ce,ue)=>ut(he.id,ce,ue),onDragStart:D,onDragEnd:Rt},he.id):null}),St(),lt(),pt()]})})})})})},dA=142,Hg=80,A7=960,nn=dA/A7,m7=({element:t,scale:e})=>{const[n]=u7(t.src);return n?C.jsx(sA,{image:n,x:t.x*e,y:t.y*e,width:t.width*e,height:t.height*e,rotation:t.rotation}):null},g7=({slide:t})=>{const e=se.useMemo(()=>t.elements.map(n=>{if(n.type==="text"){const i=n;return C.jsx(Js,{x:i.x*nn,y:i.y*nn,width:i.width*nn,height:i.height*nn,text:h6(i.content),fontSize:i.fontSize*nn,fontFamily:i.fontFamily,fill:i.fill,align:i.align,rotation:i.rotation},n.id)}else if(n.type==="shape"){const i=n,s={x:i.x*nn,y:i.y*nn,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth*nn,rotation:i.rotation};switch(i.shapeType){case"rect":return C.jsx(qr,{width:i.width*nn,height:i.height*nn,...s},n.id);case"ellipse":return C.jsx(ov,{x:(i.x+i.width/2)*nn,y:(i.y+i.height/2)*nn,radiusX:i.width/2*nn,radiusY:i.height/2*nn,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth*nn,rotation:i.rotation},n.id);case"triangle":return C.jsx(Go,{points:[(i.x+i.width/2)*nn,i.y*nn,(i.x+i.width)*nn,(i.y+i.height)*nn,i.x*nn,(i.y+i.height)*nn],closed:!0,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth*nn},n.id);case"line":return C.jsx(Go,{points:[i.x*nn,i.y*nn,(i.x+i.width)*nn,(i.y+i.height)*nn],stroke:i.stroke,strokeWidth:i.strokeWidth*nn},n.id);case"arrow":return C.jsx(lv,{points:[i.x*nn,i.y*nn,(i.x+i.width)*nn,(i.y+i.height)*nn],stroke:i.stroke,fill:i.stroke,strokeWidth:i.strokeWidth*nn,pointerLength:5,pointerWidth:5},n.id);default:return null}}else if(n.type==="image")return C.jsx(m7,{element:n,scale:nn},n.id);return null}),[t.elements]);return C.jsx(gb,{width:dA,height:Hg,children:C.jsxs(mb,{children:[C.jsx(qr,{x:0,y:0,width:dA,height:Hg,fill:t.background}),e]})})},wb=()=>{const t=Ve(p=>p.slides),e=Ve(p=>p.currentSlideIndex),n=Ve(p=>p.selectSlide),i=Ve(p=>p.addSlide),s=Ve(p=>p.deleteSlide),[c,d]=se.useState(null),h=(p,u)=>{p.stopPropagation(),t.length>1&&s(u)};return C.jsx(z.Box,{h:128,bg:"white",px:"md",style:{borderTop:"1px solid var(--devdive-border-light)"},children:C.jsx(z.ScrollArea,{h:"100%",type:"auto",scrollbarSize:6,children:C.jsxs(z.Group,{gap:"md",h:128,align:"center",wrap:"nowrap",children:[t.map((p,u)=>C.jsxs(z.Box,{pos:"relative",style:{flexShrink:0},onMouseEnter:()=>d(u),onMouseLeave:()=>d(null),children:[C.jsxs(z.Badge,{size:"xs",color:e===u?"devdive":"gray",pos:"absolute",top:-8,left:8,style:{zIndex:10},children:["#",u+1]}),c===u&&t.length>1&&C.jsx(z.ActionIcon,{variant:"filled",color:"red",size:"xs",radius:"xl",pos:"absolute",top:-6,right:-6,style:{zIndex:20},onClick:A=>h(A,u),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:12},children:"close"})}),C.jsx(z.UnstyledButton,{onClick:()=>n(u),style:{borderRadius:"var(--mantine-radius-lg)",overflow:"hidden",border:e===u?"2px solid var(--devdive-primary)":"1px solid var(--devdive-border-light)",boxShadow:e===u?"0 0 0 4px rgba(91, 110, 247, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1)":void 0,transition:"all 150ms ease"},children:C.jsx(g7,{slide:p})})]},p.id)),C.jsx(z.ActionIcon,{variant:"outline",color:"gray",size:Hg,w:dA,radius:"lg",onClick:i,style:{flexShrink:0,borderStyle:"dashed",borderWidth:2},children:C.jsxs(z.Box,{ta:"center",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20},children:"add"}),C.jsx(z.Box,{fz:9,fw:700,tt:"uppercase",lts:"0.05em",children:"Add"})]})})]})})})},Cb=()=>{const[t,e]=se.useState(!1),n=Ve(R=>R.slides),i=Ve(R=>R.currentSlideIndex),s=Ve(R=>R.selectedElementId),c=Ve(R=>R.updateElement),d=Ve(R=>R.updateSlideBackground),h=Ve(R=>R.bringToFront),p=Ve(R=>R.sendToBack),u=Ve(R=>R.bringForward),A=Ve(R=>R.sendBackward),y=Ve(R=>R.copyElement),x=Ve(R=>R.commitElementUpdate),S=n[i],w=s?S.elements.find(R=>R.id===s):null;if(t)return C.jsx(z.Box,{w:40,bg:"white",py:"md",style:{borderLeft:"1px solid var(--devdive-border-light)"},children:C.jsx(z.Stack,{align:"center",children:C.jsx(z.Tooltip,{label:"속성 패널 펼치기",position:"left",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:()=>e(!1),children:C.jsx("span",{className:"material-symbols-outlined",children:"chevron_left"})})})})});if(!w)return C.jsxs(z.Box,{w:256,p:"md",bg:"white",style:{borderLeft:"1px solid var(--devdive-border-light)",overflowY:"auto"},children:[C.jsxs(z.Group,{justify:"space-between",mb:"md",children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{color:"var(--devdive-primary)",fontSize:18},children:"palette"}),C.jsx(z.Text,{size:"sm",fw:700,children:"슬라이드 설정"})]}),C.jsx(z.Tooltip,{label:"패널 접기",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"sm",onClick:()=>e(!0),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"chevron_right"})})})]}),C.jsx(Rf,{color:S.background,onChange:R=>d(R),label:"배경 색상"}),C.jsxs(z.Box,{mt:"xl",pt:"md",ta:"center",c:"dimmed",style:{borderTop:"1px solid var(--devdive-border-light)"},children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:32,marginBottom:4},children:"touch_app"}),C.jsxs(z.Text,{size:"xs",children:["요소를 선택하면",C.jsx("br",{}),"속성을 편집할 수 있습니다"]}),C.jsxs(z.Text,{size:"xs",c:"dimmed",mt:"sm",children:["하단 입력창에서 AI로",C.jsx("br",{}),"슬라이드 내용을 수정하세요"]})]})]});const T=R=>{c(s,R)};return C.jsxs(z.Box,{w:256,p:"md",bg:"white",style:{borderLeft:"1px solid var(--devdive-border-light)",overflowY:"auto"},children:[C.jsxs(z.Group,{justify:"space-between",mb:"md",children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{color:"var(--devdive-primary)",fontSize:18},children:"tune"}),C.jsx(z.Text,{size:"sm",fw:700,children:"속성"})]}),C.jsx(z.Tooltip,{label:"패널 접기",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"sm",onClick:()=>e(!0),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"chevron_right"})})})]}),C.jsxs(z.Box,{mb:"md",pb:"md",style:{borderBottom:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"레이어 순서"}),C.jsxs(z.Group,{gap:4,children:[C.jsx(z.Tooltip,{label:"맨 뒤로 (Ctrl+[)",children:C.jsx(z.ActionIcon,{variant:"light",color:"gray",onClick:p,flex:1,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"vertical_align_bottom"})})}),C.jsx(z.Tooltip,{label:"한 단계 뒤로",children:C.jsx(z.ActionIcon,{variant:"light",color:"gray",onClick:A,flex:1,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"arrow_downward"})})}),C.jsx(z.Tooltip,{label:"한 단계 앞으로",children:C.jsx(z.ActionIcon,{variant:"light",color:"gray",onClick:u,flex:1,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"arrow_upward"})})}),C.jsx(z.Tooltip,{label:"맨 앞으로 (Ctrl+])",children:C.jsx(z.ActionIcon,{variant:"light",color:"gray",onClick:h,flex:1,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"vertical_align_top"})})})]}),C.jsx(z.Button,{variant:"light",color:"gray",size:"xs",fullWidth:!0,mt:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"content_copy"}),onClick:y,children:"복사"})]}),C.jsx(v7,{element:w,onUpdate:T,onStartEdit:x}),w.type==="text"&&C.jsx(y7,{element:w,onUpdate:T,onStartEdit:x}),w.type==="shape"&&C.jsx(x7,{element:w,onUpdate:T,onStartEdit:x}),w.type==="image"&&C.jsx(b7,{element:w,onUpdate:T,onStartEdit:x})]})},v7=({element:t,onUpdate:e,onStartEdit:n})=>{const[i,s]=se.useState(Math.round(t.width)),[c,d]=se.useState(Math.round(t.height)),[h,p]=se.useState(!0),u=t.width/t.height;se.useEffect(()=>{s(Math.round(t.width)),d(Math.round(t.height))},[t.width,t.height]);const A=x=>{const S=Number(x);if(s(S),h){const w=Math.round(S/u);d(w),e({width:S,height:w})}else e({width:S})},y=x=>{const S=Number(x);if(d(S),h){const w=Math.round(S*u);s(w),e({width:w,height:S})}else e({height:S})};return C.jsxs(z.Box,{mb:"md",pb:"md",style:{borderBottom:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"크기"}),C.jsxs(z.Group,{gap:"xs",align:"flex-end",children:[C.jsxs(z.Box,{flex:1,children:[C.jsx(z.Text,{size:"xs",c:"dimmed",mb:2,children:"너비"}),C.jsx(z.NumberInput,{value:i,onFocus:n,onChange:A,size:"xs",min:10})]}),C.jsx(z.Tooltip,{label:h?"비율 잠금 해제":"비율 잠금",children:C.jsx(z.ActionIcon,{variant:h?"light":"subtle",color:h?"devdive":"gray",onClick:()=>p(!h),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:h?"link":"link_off"})})}),C.jsxs(z.Box,{flex:1,children:[C.jsx(z.Text,{size:"xs",c:"dimmed",mb:2,children:"높이"}),C.jsx(z.NumberInput,{value:c,onFocus:n,onChange:y,size:"xs",min:10})]})]})]})},Rf=({color:t,onChange:e,label:n,onStartEdit:i})=>{const[s,c]=se.useState(!1),[d,h]=se.useState(t);se.useEffect(()=>{h(t)},[t]);const p=["#5B6EF7","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#8b5cf6","#ec4899","#1e293b","#64748b","#e2e8f0","#ffffff"];return C.jsxs(z.Box,{mb:"sm",children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:n}),C.jsxs(z.Group,{gap:"xs",children:[C.jsxs(z.Popover,{opened:s,onChange:c,position:"bottom-start",radius:"lg",shadow:"xl",children:[C.jsx(z.Popover.Target,{children:C.jsx(z.ActionIcon,{variant:"outline",size:"lg",onClick:()=>{s||i==null||i(),c(!s)},style:{backgroundColor:d,borderColor:"var(--devdive-border-light)"}})}),C.jsx(z.Popover.Dropdown,{p:"sm",children:C.jsxs(z.Stack,{gap:"sm",children:[C.jsx(Dx,{color:d,onChange:u=>{h(u),e(u)}}),C.jsx(z.Box,{pt:"sm",style:{borderTop:"1px solid var(--devdive-border-light)"},children:C.jsx(z.SimpleGrid,{cols:4,spacing:6,children:p.map(u=>C.jsx(z.ActionIcon,{size:"sm",variant:"outline",onClick:()=>{h(u),e(u)},style:{backgroundColor:u,borderColor:"var(--devdive-border-light)"}},u))})})]})})]}),C.jsx(z.NumberInput,{value:d,onChange:u=>{const A=String(u);h(A),/^#[0-9A-Fa-f]{6}$/.test(A)&&e(A)},hideControls:!0,size:"xs",flex:1,styles:{input:{fontFamily:"monospace"}}})]})]})},y7=({element:t,onUpdate:e,onStartEdit:n})=>C.jsxs(z.Stack,{gap:"md",children:[C.jsx(Rf,{color:t.fill,onChange:i=>e({fill:i}),label:"텍스트 색상",onStartEdit:n}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"폰트 크기"}),C.jsx(z.NumberInput,{value:t.fontSize,onFocus:n,onChange:i=>e({fontSize:Number(i)}),size:"xs",min:8,max:200})]}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"정렬"}),C.jsx(z.SegmentedControl,{value:t.align,onChange:i=>{n(),e({align:i})},fullWidth:!0,size:"xs",data:[{value:"left",label:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"format_align_left"})},{value:"center",label:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"format_align_center"})},{value:"right",label:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"format_align_right"})}]})]})]}),x7=({element:t,onUpdate:e,onStartEdit:n})=>{const i=t.shapeType!=="line"&&t.shapeType!=="arrow";return C.jsxs(z.Stack,{gap:"md",children:[C.jsx(Rf,{color:t.fill,onChange:s=>e({fill:s}),label:"채우기 색상",onStartEdit:n}),C.jsx(Rf,{color:t.stroke,onChange:s=>e({stroke:s}),label:"외곽선 색상",onStartEdit:n}),C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["외곽선 두께: ",t.strokeWidth,"px"]}),C.jsx(z.Slider,{value:t.strokeWidth,onChange:s=>e({strokeWidth:s}),onChangeEnd:n,min:0,max:20,color:"devdive",size:"sm"})]}),t.shapeType==="rect"&&C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["모서리 곡률: ",t.cornerRadius||0,"px"]}),C.jsx(z.Slider,{value:t.cornerRadius||0,onChange:s=>e({cornerRadius:s}),onChangeEnd:n,min:0,max:Math.min(t.width,t.height)/2,color:"devdive",size:"sm"}),C.jsx(z.Group,{gap:4,mt:"xs",children:[0,8,16,24,999].map(s=>C.jsx(z.Button,{variant:(t.cornerRadius||0)===s?"filled":"light",color:(t.cornerRadius||0)===s?"devdive":"gray",size:"xs",flex:1,px:4,onClick:()=>{n(),e({cornerRadius:s===999?Math.min(t.width,t.height)/2:s})},children:s===999?"원형":s},s))})]}),i&&C.jsxs(z.Box,{pt:"md",style:{borderTop:"1px solid var(--devdive-border-light)"},children:[C.jsxs(z.Group,{gap:"xs",mb:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"text_fields"}),C.jsx(z.Text,{size:"xs",fw:600,children:"도형 텍스트"})]}),C.jsx(z.Text,{size:"xs",c:"dimmed",mb:"sm",children:"더블클릭으로 텍스트 편집"}),C.jsx(Rf,{color:t.textColor||"#1e293b",onChange:s=>e({textColor:s}),label:"텍스트 색상",onStartEdit:n}),C.jsxs(z.Box,{mb:"sm",children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"텍스트 크기"}),C.jsx(z.NumberInput,{value:t.textSize||16,onFocus:n,onChange:s=>e({textSize:Number(s)}),size:"xs",min:8,max:72})]}),t.text&&C.jsxs(z.Box,{p:"xs",bg:"gray.0",style:{borderRadius:"var(--mantine-radius-md)"},children:[C.jsx(z.Text,{size:"xs",c:"dimmed",mb:2,children:"현재 텍스트"}),C.jsx(z.Text,{size:"sm",truncate:!0,children:t.text})]})]})]})},b7=({element:t,onUpdate:e,onStartEdit:n})=>{const[i,s]=se.useState(100),c=t.width,d=t.height,h=p=>{s(p);const u=p/100;e({width:Math.round(c*u),height:Math.round(d*u)})};return C.jsxs(z.Stack,{gap:"md",children:[C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"미리보기"}),C.jsx(z.Box,{h:96,bg:"gray.1",style:{borderRadius:"var(--mantine-radius-md)",border:"1px solid var(--devdive-border-light)",overflow:"hidden"},children:C.jsx("img",{src:t.src,alt:"preview",style:{width:"100%",height:"100%",objectFit:"contain"}})})]}),C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["크기 비율: ",i,"%"]}),C.jsx(z.Slider,{value:i,onChange:h,onChangeEnd:n,min:10,max:200,color:"devdive",size:"sm"}),C.jsx(z.Group,{gap:4,mt:"xs",children:[50,75,100,125,150].map(p=>C.jsxs(z.Button,{variant:i===p?"filled":"light",color:i===p?"devdive":"gray",size:"xs",flex:1,px:4,onClick:()=>{n(),h(p)},children:[p,"%"]},p))})]}),C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["모서리 곡률: ",t.cornerRadius||0,"px"]}),C.jsx(z.Slider,{value:t.cornerRadius||0,onChange:p=>e({cornerRadius:p}),onChangeEnd:n,min:0,max:Math.min(t.width,t.height)/2,color:"devdive",size:"sm"}),C.jsx(z.Group,{gap:4,mt:"xs",children:[0,8,16,24,999].map(p=>C.jsx(z.Button,{variant:(t.cornerRadius||0)===p?"filled":"light",color:(t.cornerRadius||0)===p?"devdive":"gray",size:"xs",flex:1,px:4,onClick:()=>{n(),e({cornerRadius:p===999?Math.min(t.width,t.height)/2:p})},children:p===999?"원형":p},p))})]}),C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["회전: ",Math.round(t.rotation||0),"°"]}),C.jsx(z.Slider,{value:t.rotation||0,onChange:p=>e({rotation:p}),onChangeEnd:n,min:0,max:360,color:"devdive",size:"sm"})]})]})},S7=()=>{const[t,e]=se.useState(!1),[n,i]=se.useState([]),[s,c]=se.useState(""),[d,h]=se.useState(!1),[p,u]=se.useState([]),[A,y]=se.useState(-1),[x,S]=se.useState({x:0,y:0}),[w,T]=se.useState(!1),R=se.useRef({x:0,y:0,posX:0,posY:0}),D=se.useRef(null),N=se.useRef(null),M=se.useRef(null),{generateSlideContent:O,generateImage:I}=mA(),Y=Ve(j=>j.slides),J=Ve(j=>j.currentSlideIndex),q=Ve(j=>j.updateElement),W=Ve(j=>j.addElement),V=Y[J],ge=se.useCallback(async j=>{const K=[];for(const ve of j)if(ve.type==="addImage"){const xe={right:{x:620,y:150},left:{x:40,y:150},bottom:{x:280,y:350},center:{x:330,y:170}},Re=xe[ve.position]||xe.center,Fe=ve.suggestedSize||{width:300,height:200};try{const lt=await I({prompt:ve.description||"이미지",style:"realistic",size:"1024x1024"});if(lt.base64){const ut={id:`ai-img-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,type:"image",src:`data:image/png;base64,${lt.base64}`,x:Re.x,y:Re.y,width:Fe.width,height:Fe.height,rotation:0};W(ut),K.push(`이미지 생성 완료 (${ve.position}): "${ve.description}"`);continue}}catch{}const pt={id:`img-placeholder-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,type:"shape",shapeType:"rect",x:Re.x,y:Re.y,width:Fe.width,height:Fe.height,rotation:0,fill:"#f1f5f9",stroke:"#94a3b8",strokeWidth:2,cornerRadius:8,text:ve.description||"이미지",textSize:14,textColor:"#64748b"};W(pt),K.push(`이미지 영역 추가 (${ve.position}): "${ve.description}"`)}else ve.type==="suggestLayout"&&K.push(`레이아웃 제안: ${ve.layout} - ${ve.reason}`);return K},[W,I]);se.useEffect(()=>{D.current&&t&&D.current.scrollTo({top:D.current.scrollHeight,behavior:"smooth"})},[n,t]),se.useEffect(()=>{if(V){const j={id:`snapshot-initial-${J}`,timestamp:new Date,elements:JSON.parse(JSON.stringify(V.elements)),messageId:"initial"};u([j]),y(0),i([]),e(!1)}},[J]);const X=se.useCallback(()=>{setTimeout(()=>{var ve;const j=(ve=Ve.getState().slides[J])==null?void 0:ve.elements;if(!j)return;const K={id:`snapshot-after-${Date.now()}`,timestamp:new Date,elements:JSON.parse(JSON.stringify(j)),messageId:"after-change"};u(xe=>[...xe.slice(0,A+1),K]),y(xe=>xe+1)},50)},[J,A]),ae=se.useCallback(()=>{if(A<=0)return;const j=A-1,K=p[j];if(!K)return;K.elements.forEach(xe=>{q(xe.id,{...xe})}),y(j);const ve={id:`undo-${Date.now()}`,role:"assistant",content:"이전 상태로 되돌렸습니다.",timestamp:new Date};i(xe=>[...xe,ve])},[A,p,q]),L=se.useCallback(()=>{if(A>=p.length-1)return;const j=A+1,K=p[j];if(!K)return;K.elements.forEach(xe=>{q(xe.id,{...xe})}),y(j);const ve={id:`redo-${Date.now()}`,role:"assistant",content:"변경사항을 다시 적용했습니다.",timestamp:new Date};i(xe=>[...xe,ve])},[A,p,q]),te=async()=>{var K;if(!s.trim()||d)return;t||e(!0);const j={id:`user-${Date.now()}`,role:"user",content:s.trim(),timestamp:new Date};i(ve=>[...ve,j]),c(""),h(!0);try{const ve=V.elements.filter(U=>U.type==="text"),xe=ve.find(U=>U.textStyle==="title"),Re=ve.find(U=>U.textStyle==="subtitle"),Fe=ve.filter(U=>U.textStyle==="body"),pt=ve.filter(U=>U.textStyle==="caption"),lt=xe||Re,ut=Fe.length>0?Fe:pt,Rt={title:(lt==null?void 0:lt.content)||"",subtitle:Re&&xe?Re.content:"",bodyTexts:ut.map(U=>U.content)},je=await O({topic:s.trim(),slideIndex:J,totalSlides:Y.length,layout:"content",purpose:s.trim(),style:"사용자 요청에 맞게 수정",language:"ko",currentContent:Rt}),St=`assistant-${Date.now()}`;let he=!1;const k=[];if(je.title&&ve.length>0){const U=xe||Re;U&&(q(U.id,{content:je.title}),k.push(`제목: "${je.title}"`),he=!0)}if(je.subtitle&&xe&&Re&&(q(Re.id,{content:je.subtitle}),k.push(`부제목: "${je.subtitle}"`),he=!0),je.bulletPoints&&je.bulletPoints.length>0){const U=ut;je.bulletPoints.forEach((G,Z)=>{U[Z]&&(q(U[Z].id,{content:G}),he=!0)}),je.bulletPoints.length>0&&k.push(`불릿포인트 ${je.bulletPoints.length}개 수정`)}if(je.actions&&je.actions.length>0){const U=await ge(je.actions);k.push(...U),U.length>0&&(he=!0)}he&&X();const ce=he?`수정 완료!
512
+ `,l9={};function bA(t,e,n=l9){if(!Y2&&"zIndex"in e&&(console.warn(o9),Y2=!0),!V2&&e.draggable){var i=e.x!==void 0||e.y!==void 0,s=e.onDragEnd||e.onDragMove;i&&!s&&(console.warn(s9),V2=!0)}for(var c in n)if(!Q2[c]){var d=c.slice(0,2)==="on",h=n[c]!==e[c];if(d&&h){var p=c.substr(2).toLowerCase();p.substr(0,7)==="content"&&(p="content"+p.substr(7,1).toUpperCase()+p.substr(8)),t.off(p,n[c])}var u=!e.hasOwnProperty(c);u&&t.setAttr(c,void 0)}var A=e._useStrictMode,y={},x=!1;const S={};for(var c in e)if(!Q2[c]){var d=c.slice(0,2)==="on",w=n[c]!==e[c];if(d&&w){var p=c.substr(2).toLowerCase();p.substr(0,7)==="content"&&(p="content"+p.substr(7,1).toUpperCase()+p.substr(8)),e[c]&&(S[p]=e[c])}!d&&(e[c]!==n[c]||A&&e[c]!==t.getAttr(c))&&(x=!0,y[c]=e[c])}x&&(t.setAttrs(y),Vo(t));for(var p in S)t.on(p+iv,S[p])}function Vo(t){if(!Ye.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}var Ag=av();const ub={},c9={};Il.Node.prototype._applyProps=bA;function u9(t,e){if(typeof e=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`);return}t.add(e),Vo(t)}function d9(t,e,n){let i=Il[t];i||(console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),i=Il.Group);const s={},c={};for(var d in e){var h=d.slice(0,2)==="on";h?c[d]=e[d]:s[d]=e[d]}const p=new i(s);return bA(p,c),p}function f9(t,e,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function h9(t,e,n){return!1}function p9(t){return t}function A9(){return null}function m9(){return null}function g9(t,e,n,i){return c9}function v9(){}function y9(t){}function x9(t,e){return!1}function b9(){return ub}function S9(){return ub}const w9=setTimeout,C9=clearTimeout,_9=-1;function E9(t,e){return!1}const T9=!1,R9=!0,D9=!0;function L9(t,e){e.parent===t?e.moveToTop():t.add(e),Vo(t)}function k9(t,e){e.parent===t?e.moveToTop():t.add(e),Vo(t)}function db(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),Vo(t)}function N9(t,e,n){db(t,e,n)}function P9(t,e){e.destroy(),e.off(iv),Vo(t)}function B9(t,e){e.destroy(),e.off(iv),Vo(t)}function M9(t,e,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function z9(t,e,n){}function F9(t,e,n,i,s){bA(t,s,i)}function I9(t){t.hide(),Vo(t)}function O9(t){}function U9(t,e){(e.visible==null||e.visible)&&t.show()}function j9(t,e){}function G9(t){}function H9(){}const X9=()=>cb.DefaultEventPriority,W9=Object.freeze(Object.defineProperty({__proto__:null,appendChild:L9,appendChildToContainer:k9,appendInitialChild:u9,cancelTimeout:C9,clearContainer:G9,commitMount:z9,commitTextUpdate:M9,commitUpdate:F9,createInstance:d9,createTextInstance:f9,detachDeletedInstance:H9,finalizeInitialChildren:h9,getChildHostContext:S9,getCurrentEventPriority:X9,getPublicInstance:p9,getRootHostContext:b9,hideInstance:I9,hideTextInstance:O9,idlePriority:Ag.unstable_IdlePriority,insertBefore:db,insertInContainerBefore:N9,isPrimaryRenderer:T9,noTimeout:_9,now:Ag.unstable_now,prepareForCommit:A9,preparePortalMount:m9,prepareUpdate:g9,removeChild:P9,removeChildFromContainer:B9,resetAfterCommit:v9,resetTextContent:y9,run:Ag.unstable_runWithPriority,scheduleTimeout:w9,shouldDeprioritizeSubtree:x9,shouldSetTextContent:E9,supportsMutation:D9,unhideInstance:U9,unhideTextInstance:j9,warnsIfNotActing:R9},Symbol.toStringTag,{value:"Module"}));var Q9=Object.defineProperty,Y9=Object.defineProperties,V9=Object.getOwnPropertyDescriptors,q2=Object.getOwnPropertySymbols,q9=Object.prototype.hasOwnProperty,K9=Object.prototype.propertyIsEnumerable,K2=(t,e,n)=>e in t?Q9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J2=(t,e)=>{for(var n in e||(e={}))q9.call(e,n)&&K2(t,n,e[n]);if(q2)for(var n of q2(e))K9.call(e,n)&&K2(t,n,e[n]);return t},J9=(t,e)=>Y9(t,V9(e)),Z2,$2;typeof window<"u"&&((Z2=window.document)!=null&&Z2.createElement||(($2=window.navigator)==null?void 0:$2.product)==="ReactNative")?Ea.useLayoutEffect:Ea.useEffect;function fb(t,e,n){if(!t)return;if(n(t)===!0)return t;let i=t.child;for(;i;){const s=fb(i,e,n);if(s)return s;i=i.sibling}}function hb(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const ex=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=ex;return}return ex.apply(this,arguments)};const sv=hb(Ea.createContext(null));class pb extends Ea.Component{render(){return Ea.createElement(sv.Provider,{value:this._reactInternals},this.props.children)}}function Z9(){const t=Ea.useContext(sv);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=Ea.useId();return Ea.useMemo(()=>{for(const i of[t,t==null?void 0:t.alternate]){if(!i)continue;const s=fb(i,!1,c=>{let d=c.memoizedState;for(;d;){if(d.memoizedState===e)return!0;d=d.next}});if(s)return s}},[t,e])}function $9(){const t=Z9(),[e]=Ea.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const s=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;s&&s!==sv&&!e.has(s)&&e.set(s,Ea.useContext(hb(s)))}n=n.return}return e}function Ab(){const t=$9();return Ea.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>i=>Ea.createElement(e,null,Ea.createElement(n.Provider,J9(J2({},i),{value:t.get(n)}))),e=>Ea.createElement(pb,J2({},e))),[t])}function e7(t){const e=oe.useRef({});return oe.useLayoutEffect(()=>{e.current=t}),oe.useLayoutEffect(()=>()=>{e.current={}},[]),e.current}const t7=t=>{const e=oe.useRef(null),n=oe.useRef(null),i=oe.useRef(null),s=e7(t),c=Ab(),d=h=>{const{forwardedRef:p}=t;p&&(typeof p=="function"?p(h):p.current=h)};return oe.useLayoutEffect(()=>(n.current=new Il.Stage({width:t.width,height:t.height,container:e.current}),d(n.current),i.current=bf.createContainer(n.current,cb.LegacyRoot,!1,null),bf.updateContainer(oe.createElement(c,{},t.children),i.current),()=>{Il.isBrowser&&(d(null),bf.updateContainer(null,i.current,null),n.current.destroy())}),[]),oe.useLayoutEffect(()=>{d(n.current),bA(n.current,t,s),bf.updateContainer(oe.createElement(c,{},t.children),i.current,null)}),oe.createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},mb="Layer",hi="Group",qr="Rect",ov="Ellipse",Go="Line",sA="Image",Js="Text",lv="Arrow",cv="Transformer",bf=n9(W9);bf.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:process.env.NODE_ENV!=="production"?1:0,version:oe.version,rendererPackageName:"react-konva"});const gb=oe.forwardRef((t,e)=>oe.createElement(pb,{},oe.createElement(t7,{...t,forwardedRef:e}))),Zp=960,$p=540,vb=(t,e,n)=>{if(!n.enabled)return{x:t.x,y:t.y,guides:[]};let i=t.x,s=t.y;const c=[],d=Math.max(n.threshold,15),h=t.x,p=t.x+t.width,u=t.x+t.width/2,A=t.y,y=t.y+t.height,x=t.y+t.height/2,S=Zp/2,w=$p/2;if(n.snapToCenter&&(Math.abs(u-S)<d?(i=S-t.width/2,c.push({type:"vertical",position:S,isCenter:!0})):Math.abs(h-S)<d?(i=S,c.push({type:"vertical",position:S,isCenter:!0})):Math.abs(p-S)<d&&(i=S-t.width,c.push({type:"vertical",position:S,isCenter:!0})),Math.abs(x-w)<d?(s=w-t.height/2,c.push({type:"horizontal",position:w,isCenter:!0})):Math.abs(A-w)<d?(s=w,c.push({type:"horizontal",position:w,isCenter:!0})):Math.abs(y-w)<d&&(s=w-t.height,c.push({type:"horizontal",position:w,isCenter:!0}))),n.snapToEdges&&(Math.abs(h)<d&&(i=0,c.push({type:"vertical",position:0})),Math.abs(p-Zp)<d&&(i=Zp-t.width,c.push({type:"vertical",position:Zp})),Math.abs(A)<d&&(s=0,c.push({type:"horizontal",position:0})),Math.abs(y-$p)<d&&(s=$p-t.height,c.push({type:"horizontal",position:$p}))),n.snapToElements)for(const T of e){const R=T.x,D=T.x+T.width,N=T.x+T.width/2,M=T.y,O=T.y+T.height,I=T.y+T.height/2;Math.abs(h-R)<d&&(i=R,c.push({type:"vertical",position:R})),Math.abs(p-D)<d&&(i=D-t.width,c.push({type:"vertical",position:D})),Math.abs(u-N)<d&&(i=N-t.width/2,c.push({type:"vertical",position:N})),Math.abs(A-M)<d&&(s=M,c.push({type:"horizontal",position:M})),Math.abs(y-O)<d&&(s=O-t.height,c.push({type:"horizontal",position:O})),Math.abs(x-I)<d&&(s=I-t.height/2,c.push({type:"horizontal",position:I}))}return{x:i,y:s,guides:c}};var bu={},tx;function n7(){if(tx)return bu;tx=1;var t=ax;if(process.env.NODE_ENV==="production")bu.createRoot=t.createRoot,bu.hydrateRoot=t.hydrateRoot;else{var e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;bu.createRoot=function(n,i){e.usingClientEntryPoint=!0;try{return t.createRoot(n,i)}finally{e.usingClientEntryPoint=!1}},bu.hydrateRoot=function(n,i,s){e.usingClientEntryPoint=!0;try{return t.hydrateRoot(n,i,s)}finally{e.usingClientEntryPoint=!1}}}return bu}var r7=n7();const a7=fA(r7);var i7=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]]);return n};const s7=t=>{const e=window.getComputedStyle(t).position;return!(e==="absolute"||e==="relative")};function o7(t=()=>{}){const e=oe.useRef(t);return e.current=t,oe.useCallback((...n)=>e.current.apply(null,n),[])}const Gg=({children:t,groupProps:e,divProps:n,transform:i,transformFunc:s,parentNodeFunc:c})=>{const d=Ab(),h=oe.useRef(null),[p]=oe.useState(()=>document.createElement("div")),u=oe.useMemo(()=>a7.createRoot(p),[p]),A=i??!0,y=o7(()=>{if(A&&h.current){let R=h.current.getAbsoluteTransform().decompose();s&&(R=s(R)),p.style.position="absolute",p.style.zIndex="10",p.style.top="0px",p.style.left="0px",p.style.transform=`translate(${R.x}px, ${R.y}px) rotate(${R.rotation}deg) scaleX(${R.scaleX}) scaleY(${R.scaleY})`,p.style.transformOrigin="top left"}else p.style.position="",p.style.zIndex="",p.style.top="",p.style.left="",p.style.transform="",p.style.transformOrigin="";const x=n||{},{style:S}=x,w=i7(x,["style"]);Object.assign(p.style,S),Object.assign(p,w)});return oe.useLayoutEffect(()=>{var x;const S=h.current;if(!S)return;const w=c?c({stage:S.getStage()}):(x=S.getStage())===null||x===void 0?void 0:x.container();if(w)return w.appendChild(p),A&&s7(w)&&(w.style.position="relative"),S.on("absoluteTransformChange",y),y(),()=>{var T;S.off("absoluteTransformChange",y),(T=p.parentNode)===null||T===void 0||T.removeChild(p)}},[A,c]),oe.useLayoutEffect(()=>{y()},[n,s]),oe.useLayoutEffect(()=>{queueMicrotask(()=>{ax.flushSync(()=>{u.render(oe.createElement(d,null,t))})})}),oe.useLayoutEffect(()=>()=>{setTimeout(()=>{u.unmount()})},[]),oe.createElement(hi,Object.assign({ref:h},e))};var mg,nx;function l7(){if(nx)return mg;nx=1;var t=oe;return mg=function(n,i,s){const c=t.useRef("loading"),d=t.useRef(),[h,p]=t.useState(0),u=t.useRef(),A=t.useRef(),y=t.useRef();return(u.current!==n||A.current!==i||y.current!==s)&&(c.current="loading",d.current=void 0,u.current=n,A.current=i,y.current=s),t.useLayoutEffect(function(){if(!n)return;var x=document.createElement("img");function S(){x.decode().catch(()=>{}).finally(()=>{c.current="loaded",d.current=x,p(Math.random())})}function w(){c.current="failed",d.current=void 0,p(Math.random())}return x.addEventListener("load",S),x.addEventListener("error",w),i&&(x.crossOrigin=i),s&&(x.referrerPolicy=s),x.src=n,function(){x.removeEventListener("load",S),x.removeEventListener("error",w)}},[n,i,s]),[d.current,c.current]},mg}var c7=l7();const u7=fA(c7),yb=({element:t,isSelected:e,onSelect:n,onChange:i,onDragStart:s,onDragEnd:c})=>{const d=oe.useRef(null),h=oe.useRef(null),p=oe.useRef(null),[u,A]=oe.useState(!1),[y,x]=oe.useState(t.fontSize*2);oe.useEffect(()=>{var N;e&&!u&&p.current&&d.current&&(p.current.nodes([d.current]),(N=p.current.getLayer())==null||N.batchDraw())},[e,u]),oe.useEffect(()=>{h.current&&x(h.current.height())},[t.content,t.fontSize,t.width]);const S=oe.useCallback(()=>{A(!0)},[]),w=oe.useCallback(N=>{i({content:N}),A(!1)},[i]),T=N=>{const M=N.target;i({x:M.x()-M.offsetX(),y:M.y()-M.offsetY()},!0)},R=N=>{const M=N.target;i({x:M.x()-M.offsetX(),y:M.y()-M.offsetY()}),c==null||c()},D=()=>{const N=d.current;if(!N)return;const M=N.scaleX(),O=Math.max(50,t.width*M);N.scaleX(1),N.scaleY(1),N.offsetX(O/2),i({x:N.x()-O/2,y:N.y()-N.offsetY(),width:O,rotation:N.rotation()})};return C.jsxs(C.Fragment,{children:[C.jsx(hi,{ref:d,x:t.x+t.width/2,y:t.y+y/2,offsetX:t.width/2,offsetY:y/2,rotation:t.rotation,draggable:!u,onClick:n,onTap:n,onDblClick:S,onDblTap:S,onDragStart:()=>s==null?void 0:s(),onDragMove:T,onDragEnd:R,onTransformStart:()=>s==null?void 0:s(),onTransformEnd:D,children:C.jsx(Js,{ref:h,x:0,y:0,width:t.width,text:t.content,fontSize:t.fontSize,fontFamily:t.fontFamily,fontStyle:t.fontWeight==="700"||t.fontWeight==="800"?"bold":"normal",fill:t.fill,align:t.align,lineHeight:t.lineHeight||1.2,opacity:u?0:1})}),e&&!u&&C.jsx(cv,{ref:p,flipEnabled:!1,enabledAnchors:["middle-left","middle-right"],rotateEnabled:!0,rotateAnchorOffset:20,rotateAnchorCursor:"grab",anchorSize:10,anchorCornerRadius:5,anchorFill:"#ffffff",anchorStroke:"#5B6EF7",anchorStrokeWidth:2,borderStroke:"#5B6EF7",borderStrokeWidth:2,rotationSnaps:[0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345],rotationSnapTolerance:5,boundBoxFunc:(N,M)=>Math.abs(M.width)<50?N:M}),u&&C.jsx(Gg,{groupProps:{x:t.x,y:t.y},divProps:{style:{opacity:1}},children:C.jsx(f7,{element:t,onComplete:w,onCancel:()=>A(!1)})})]})},d7=t=>{let e=t.replace("#","");e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const n=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),s=parseInt(e.substring(4,6),16);return(n*299+i*587+s*114)/1e3>180},f7=({element:t,onComplete:e,onCancel:n})=>{const i=oe.useRef(null),[s,c]=oe.useState(t.content),d=d7(t.fill)?"#1e293b":t.fill;oe.useEffect(()=>{const u=i.current;u&&requestAnimationFrame(()=>{u.focus(),u.select()})},[]);const h=u=>{u.key==="Escape"?n():u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),e(s))},p=()=>{setTimeout(()=>{e(s)},100)};return C.jsx("textarea",{ref:i,value:s,onChange:u=>c(u.target.value),onKeyDown:h,onBlur:p,style:{width:`${t.width}px`,minHeight:"60px",padding:"8px",fontSize:`${t.fontSize}px`,fontFamily:t.fontFamily,color:d,textAlign:t.align,border:"2px solid #5B6EF7",borderRadius:"8px",outline:"none",resize:"vertical",backgroundColor:"white",boxShadow:"0 4px 20px rgba(0,0,0,0.15)",lineHeight:t.lineHeight||1.2},placeholder:"텍스트를 입력하세요... (마크다운 지원: **굵게**, *기울임*)"})},xb=({element:t,isSelected:e,onSelect:n,onChange:i,onDragStart:s,onDragEnd:c,onReplaceWithImage:d})=>{const h=oe.useRef(null),p=oe.useRef(null),u=oe.useRef(null),[A,y]=oe.useState(!1);oe.useEffect(()=>{var q;e&&!A&&p.current&&h.current&&(p.current.nodes([h.current]),(q=p.current.getLayer())==null||q.batchDraw())},[e,A]);const x=q=>{const W=q.target;i({x:W.x()-W.offsetX(),y:W.y()-W.offsetY()},!0)},S=q=>{const W=q.target;i({x:W.x()-W.offsetX(),y:W.y()-W.offsetY()}),c==null||c()},w=()=>{const q=h.current;if(!q)return;const W=q.scaleX(),V=q.scaleY(),ge=Math.max(10,t.width*W),X=Math.max(10,t.height*V);q.scaleX(1),q.scaleY(1),q.offsetX(ge/2),q.offsetY(X/2),i({x:q.x()-ge/2,y:q.y()-X/2,width:ge,height:X,rotation:q.rotation()})},T=oe.useCallback(()=>{t.isImagePlaceholder&&u.current&&u.current.click()},[t.isImagePlaceholder]),R=oe.useCallback(q=>{var ge;const W=(ge=q.target.files)==null?void 0:ge[0];if(!W||!d)return;const V=new FileReader;V.onload=X=>{var te;const ae=(te=X.target)==null?void 0:te.result,L=new window.Image;L.onload=()=>{const le=L.width/L.height,Ae=t.width/t.height;let ne=0,se=0,ie=L.width,j=L.height;le>Ae?(ie=L.height*Ae,ne=(L.width-ie)/2):(j=L.width/Ae,se=(L.height-j)/2),d({src:ae,width:t.width,height:t.height,crop:{x:ne,y:se,width:ie,height:j}})},L.src=ae},V.readAsDataURL(W),q.target.value=""},[t.width,t.height,d]),D=oe.useCallback(()=>{t.isImagePlaceholder||t.shapeType==="line"||t.shapeType==="arrow"||y(!0)},[t.shapeType,t.isImagePlaceholder]),N=oe.useCallback(q=>{i({text:q}),y(!1)},[i]),M=()=>[t.width/2,0,t.width,t.height,0,t.height],O=()=>[0,0,t.width,t.height],I=()=>{const q={fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth};switch(t.shapeType){case"rect":return C.jsx(qr,{width:t.width,height:t.height,cornerRadius:t.cornerRadius||0,...q});case"ellipse":return C.jsx(ov,{x:t.width/2,y:t.height/2,radiusX:t.width/2,radiusY:t.height/2,...q});case"triangle":return C.jsx(Go,{points:M(),closed:!0,...q});case"line":return C.jsx(Go,{points:O(),stroke:t.stroke,strokeWidth:t.strokeWidth});case"arrow":return C.jsx(lv,{points:O(),stroke:t.stroke,fill:t.stroke,strokeWidth:t.strokeWidth,pointerLength:10,pointerWidth:10});default:return null}},Y=t.shapeType!=="line"&&t.shapeType!=="arrow",J=oe.useCallback(()=>{t.isImagePlaceholder&&T(),n()},[t.isImagePlaceholder,T,n]);return C.jsxs(C.Fragment,{children:[t.isImagePlaceholder&&C.jsx(Gg,{groupProps:{x:0,y:0},divProps:{style:{display:"none"}},children:C.jsx("input",{ref:u,type:"file",accept:"image/*",onChange:R,style:{display:"none"}})}),C.jsxs(hi,{ref:h,x:t.x+t.width/2,y:t.y+t.height/2,offsetX:t.width/2,offsetY:t.height/2,rotation:t.rotation,draggable:!A,onClick:J,onTap:J,onDblClick:D,onDblTap:D,onDragStart:()=>s==null?void 0:s(),onDragMove:x,onDragEnd:S,onTransformStart:()=>s==null?void 0:s(),onTransformEnd:w,style:{cursor:t.isImagePlaceholder?"pointer":"move"},children:[I(),Y&&t.text&&!A&&C.jsx(Js,{x:0,y:0,width:t.width,height:t.height,text:t.text,fontSize:t.textSize||16,fill:t.textColor||"#1e293b",align:"center",verticalAlign:"middle",listening:!1}),A&&C.jsx(Gg,{groupProps:{x:0,y:0},divProps:{style:{opacity:1}},children:C.jsx(p7,{element:t,onComplete:N,onCancel:()=>y(!1)})})]}),e&&!A&&C.jsx(cv,{ref:p,flipEnabled:!1,rotateEnabled:!0,rotateAnchorOffset:20,rotateAnchorCursor:"grab",anchorSize:10,anchorCornerRadius:5,anchorFill:"#ffffff",anchorStroke:"#5B6EF7",anchorStrokeWidth:2,borderStroke:"#5B6EF7",borderStrokeWidth:2,rotationSnaps:[0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345],rotationSnapTolerance:5,boundBoxFunc:(q,W)=>Math.abs(W.width)<10||Math.abs(W.height)<10?q:W})]})},h7=t=>{let e=t.replace("#","");e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const n=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),s=parseInt(e.substring(4,6),16);return(n*299+i*587+s*114)/1e3>180},p7=({element:t,onComplete:e,onCancel:n})=>{const i=oe.useRef(null),[s,c]=oe.useState(t.text||""),d=t.textColor||"#1e293b",h=h7(d)?"#1e293b":d;oe.useEffect(()=>{i.current&&requestAnimationFrame(()=>{var A,y;(A=i.current)==null||A.focus(),(y=i.current)==null||y.select()})},[]);const p=A=>{A.key==="Escape"?n():A.key==="Enter"&&(A.preventDefault(),e(s))},u=()=>{setTimeout(()=>{e(s)},100)};return C.jsx("input",{ref:i,type:"text",value:s,onChange:A=>c(A.target.value),onKeyDown:p,onBlur:u,style:{width:`${t.width}px`,height:`${t.height}px`,padding:"8px",fontSize:`${t.textSize||16}px`,color:h,textAlign:"center",border:"2px solid #5B6EF7",borderRadius:t.shapeType==="ellipse"?"50%":"8px",outline:"none",backgroundColor:"rgba(255,255,255,0.9)",boxShadow:"0 4px 20px rgba(0,0,0,0.15)"},placeholder:"텍스트 입력..."})},bb=({element:t,isSelected:e,onSelect:n,onChange:i,onDragStart:s,onDragEnd:c})=>{const d=oe.useRef(null),h=oe.useRef(null),p=oe.useRef(null),[u,A]=oe.useState(null),[y,x]=oe.useState(!1),[S,w]=oe.useState({x:0,y:0}),[T,R]=oe.useState(1);oe.useEffect(()=>{const ie=new window.Image;ie.src=t.src,ie.onload=()=>{A(ie)}},[t.src]),oe.useEffect(()=>{var ie;e&&!y&&h.current&&d.current&&(h.current.nodes([d.current]),(ie=h.current.getLayer())==null||ie.batchDraw())},[e,y]),oe.useEffect(()=>{y&&(w({x:0,y:0}),R(1))},[y]);const D=oe.useCallback(ie=>{if(!t.crop||!u)return;const j=t.crop,K=T,ve=Math.max(1,Math.min(3,ie)),xe=t.width/2,Re=t.height/2,Fe=t.width/j.width*K,pt=t.height/j.height*K,lt=-j.x*Fe+S.x,ut=-j.y*pt+S.y,Rt=(xe-lt)/Fe,je=(Re-ut)/pt,St=t.width/j.width*ve,he=t.height/j.height*ve,k=xe-Rt*St,ce=Re-je*he,ue=k+j.x*St,U=ce+j.y*he,G=u.width*St,Z=u.height*he,be=t.width-G,_e=0,me=t.height-Z,ze=0,Qe=Math.max(be,Math.min(_e,ue)),Oe=Math.max(me,Math.min(ze,U));R(ve),w({x:Qe,y:Oe})},[t.crop,t.width,t.height,u,T,S]),N=ie=>{const j=ie.target;i({x:j.x()-t.width/2,y:j.y()-t.height/2},!0)},M=ie=>{const j=ie.target;i({x:j.x()-t.width/2,y:j.y()-t.height/2}),c==null||c()},O=()=>{const ie=d.current;if(!ie)return;const j=ie.scaleX(),K=ie.scaleY(),ve=Math.max(20,t.width*j),xe=Math.max(20,t.height*K);ie.scaleX(1),ie.scaleY(1),ie.offsetX(ve/2),ie.offsetY(xe/2),i({x:ie.x()-ve/2,y:ie.y()-xe/2,width:ve,height:xe,rotation:ie.rotation()})},I=oe.useCallback(ie=>{const j=t.cornerRadius||0,K=t.width,ve=t.height;if(j===0)ie.rect(0,0,K,ve);else{const xe=Math.min(j,K/2,ve/2);ie.beginPath(),ie.moveTo(xe,0),ie.lineTo(K-xe,0),ie.arcTo(K,0,K,xe,xe),ie.lineTo(K,ve-xe),ie.arcTo(K,ve,K-xe,ve,xe),ie.lineTo(xe,ve),ie.arcTo(0,ve,0,ve-xe,xe),ie.lineTo(0,xe),ie.arcTo(0,0,xe,0,xe),ie.closePath()}},[t.cornerRadius,t.width,t.height]),Y=oe.useCallback(()=>{t.crop&&x(!0)},[t.crop]),J=oe.useCallback(ie=>{const j=ie.target,K=t.crop;if(!K||!u)return;const ve=t.width/K.width*T,xe=t.height/K.height*T,Re=u.width*ve,Fe=u.height*xe,pt=-K.x*ve,lt=-K.y*xe,ut=t.width-Re,Rt=0,je=t.height-Fe,St=0,he=Math.max(ut,Math.min(Rt,j.x())),k=Math.max(je,Math.min(St,j.y()));j.x(he),j.y(k),w({x:he-pt,y:k-lt})},[t.crop,t.width,t.height,u,T]),q=oe.useCallback(()=>{if(!t.crop||!u){x(!1);return}const ie=t.crop,j=ie.width/t.width/T,K=ie.height/t.height/T,ve=ie.width/T,xe=ie.height/T,Re=Math.max(0,Math.min(u.width-ve,ie.x-S.x*j)),Fe=Math.max(0,Math.min(u.height-xe,ie.y-S.y*K));i({crop:{x:Re,y:Fe,width:ve,height:xe}}),x(!1),w({x:0,y:0}),R(1)},[t.crop,t.width,t.height,u,S,T,i]),W=oe.useCallback(()=>{x(!1),w({x:0,y:0}),R(1)},[]),V=oe.useCallback(()=>{w({x:0,y:0}),R(1)},[]);if(oe.useEffect(()=>{if(!y)return;const ie=j=>{j.key==="Escape"?W():j.key==="Enter"&&q()};return window.addEventListener("keydown",ie),()=>window.removeEventListener("keydown",ie)},[y,q,W]),!u)return null;const ge=t.crop,X=ge?t.width/ge.width:1,ae=ge?t.height/ge.height:1,L=y?X*T:X,te=y?ae*T:ae,le=u.width*L,Ae=u.height*te,ne=ge?-ge.x*L:0,se=ge?-ge.y*te:0;return C.jsxs(C.Fragment,{children:[y&&ge&&C.jsxs(hi,{x:t.x+t.width/2,y:t.y+t.height/2,offsetX:t.width/2,offsetY:t.height/2,rotation:t.rotation,children:[C.jsx(qr,{x:ne+S.x-500,y:se+S.y-500,width:le+1e3,height:Ae+1e3,fill:"rgba(0,0,0,0.5)",listening:!1}),C.jsx(sA,{ref:p,image:u,x:ne+S.x,y:se+S.y,width:le,height:Ae,opacity:.7,draggable:!0,onDragMove:J}),C.jsx(hi,{clipFunc:ie=>ie.rect(0,0,t.width,t.height),listening:!1,children:C.jsx(sA,{image:u,x:ne+S.x,y:se+S.y,width:le,height:Ae})}),C.jsx(qr,{x:0,y:0,width:t.width,height:t.height,stroke:"#5B6EF7",strokeWidth:2,fill:"transparent",listening:!1}),[{x:0,y:0},{x:t.width,y:0},{x:0,y:t.height},{x:t.width,y:t.height}].map((ie,j)=>C.jsx(qr,{x:ie.x-5,y:ie.y-5,width:10,height:10,fill:"#ffffff",stroke:"#5B6EF7",strokeWidth:2,cornerRadius:2,listening:!1},j))]}),!y&&C.jsx(hi,{ref:d,x:t.x+t.width/2,y:t.y+t.height/2,offsetX:t.width/2,offsetY:t.height/2,rotation:t.rotation,draggable:!0,onClick:n,onTap:n,onDblClick:Y,onDblTap:Y,onDragStart:()=>s==null?void 0:s(),onDragMove:N,onDragEnd:M,onTransformStart:()=>s==null?void 0:s(),onTransformEnd:O,clipFunc:t.cornerRadius?I:void 0,children:C.jsx(sA,{image:u,x:0,y:0,width:t.width,height:t.height,crop:t.crop})}),y&&C.jsxs(hi,{x:t.x,y:t.y-50,children:[C.jsx(qr,{x:0,y:0,width:390,height:40,fill:"white",cornerRadius:8,shadowColor:"black",shadowBlur:10,shadowOpacity:.15}),C.jsxs(hi,{x:10,y:5,onClick:()=>D(T-.25),onTap:()=>D(T-.25),children:[C.jsx(qr,{width:30,height:30,fill:T<=1?"#e2e8f0":"#f1f5f9",cornerRadius:6}),C.jsx(Js,{text:"-",x:0,y:0,width:30,height:30,align:"center",verticalAlign:"middle",fill:T<=1?"#94a3b8":"#64748b",fontSize:18,fontFamily:"Inter"})]}),C.jsx(Js,{text:`${Math.round(T*100)}%`,x:45,y:5,width:50,height:30,align:"center",verticalAlign:"middle",fill:"#334155",fontSize:12,fontFamily:"Inter"}),C.jsxs(hi,{x:100,y:5,onClick:()=>D(T+.25),onTap:()=>D(T+.25),children:[C.jsx(qr,{width:30,height:30,fill:T>=3?"#e2e8f0":"#f1f5f9",cornerRadius:6}),C.jsx(Js,{text:"+",x:0,y:0,width:30,height:30,align:"center",verticalAlign:"middle",fill:T>=3?"#94a3b8":"#64748b",fontSize:18,fontFamily:"Inter"})]}),C.jsxs(hi,{x:140,y:5,onClick:V,onTap:V,children:[C.jsx(qr,{width:50,height:30,fill:"#f1f5f9",cornerRadius:6}),C.jsx(Js,{text:"↺",x:0,y:0,width:50,height:30,align:"center",verticalAlign:"middle",fill:"#64748b",fontSize:16,fontFamily:"Inter"})]}),C.jsxs(hi,{x:200,y:5,onClick:q,onTap:q,children:[C.jsx(qr,{width:85,height:30,fill:"#5B6EF7",cornerRadius:6}),C.jsx(Js,{text:"완료",x:0,y:0,width:85,height:30,align:"center",verticalAlign:"middle",fill:"white",fontSize:13,fontFamily:"Malgun Gothic"})]}),C.jsxs(hi,{x:295,y:5,onClick:W,onTap:W,children:[C.jsx(qr,{width:85,height:30,fill:"#f1f5f9",cornerRadius:6}),C.jsx(Js,{text:"취소",x:0,y:0,width:85,height:30,align:"center",verticalAlign:"middle",fill:"#64748b",fontSize:13,fontFamily:"Malgun Gothic"})]})]}),e&&!y&&C.jsx(cv,{ref:h,flipEnabled:!1,rotateEnabled:!0,rotateAnchorOffset:20,rotateAnchorCursor:"grab",anchorSize:10,anchorCornerRadius:5,anchorFill:"#ffffff",anchorStroke:"#5B6EF7",anchorStrokeWidth:2,borderStroke:"#5B6EF7",borderStrokeWidth:2,rotationSnaps:[0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345],rotationSnapTolerance:5,boundBoxFunc:(ie,j)=>Math.abs(j.width)<20||Math.abs(j.height)<20?ie:j})]})},Su=960,wu=540,Sb=()=>{const t=oe.useRef(null),e=oe.useRef(null),[n,i]=oe.useState(1);oe.useEffect(()=>{const he=()=>{if(!e.current)return;const ce=e.current.offsetWidth,ue=e.current.offsetHeight,U=48,G=ce-U,Z=ue-U,be=G/Su,_e=Z/wu,me=Math.min(be,_e);i(me)};he();const k=new ResizeObserver(he);return e.current&&k.observe(e.current),()=>k.disconnect()},[]);const s=Ve(he=>he.slides),c=Ve(he=>he.currentSlideIndex),d=Ve(he=>he.selectedElementId),h=Ve(he=>he.mode),p=Ve(he=>he.currentShapeType),u=Ve(he=>he.currentTextStyle),A=Ve(he=>he.currentFontFamily),y=Ve(he=>he.addElement),x=Ve(he=>he.updateElement),S=Ve(he=>he.deleteElement),w=Ve(he=>he.selectElement),T=Ve(he=>he.setMode),R=Ve(he=>he.snapSettings),D=Ve(he=>he.commitElementUpdate),N=Ve(he=>he.selectedElementIds),M=Ve(he=>he.selectElements),O=Ve(he=>he.clearSelection),I=s[c],[Y,J]=oe.useState([]),[q,W]=oe.useState(!1),[V,ge]=oe.useState(null),[X,ae]=oe.useState(!1),[L,te]=oe.useState(null),[le,Ae]=oe.useState(!1),[ne,se]=oe.useState(null),[ie,j]=oe.useState("default"),K=oe.useCallback(he=>{if(!d)return{isInZone:!1,element:null,corner:""};const k=I.elements.find(G=>G.id===d);if(!k)return{isInZone:!1,element:null,corner:""};const ce=[{name:"nw",x:k.x,y:k.y,checkX:-1,checkY:-1},{name:"ne",x:k.x+k.width,y:k.y,checkX:1,checkY:-1},{name:"sw",x:k.x,y:k.y+k.height,checkX:-1,checkY:1},{name:"se",x:k.x+k.width,y:k.y+k.height,checkX:1,checkY:1}],ue=5,U=40;for(const G of ce){const Z=he.x-G.x,be=he.y-G.y,_e=Math.sqrt(Z*Z+be*be);if(_e>=ue&&_e<=U){const me=G.checkX<0&&Z<0||G.checkX>0&&Z>0,ze=G.checkY<0&&be<0||G.checkY>0&&be>0;if(me&&ze)return{isInZone:!0,element:k,corner:G.name};if((me||ze)&&_e<=25)return{isInZone:!0,element:k,corner:G.name}}}return{isInZone:!1,element:null,corner:""}},[d,I.elements]),ve=oe.useCallback(he=>{var U;const k=t.current;if(!k)return;const ce=k.getPointerPosition();if(!ce)return;if(h==="select"){const G=K(ce);if(G.isInZone&&G.element){D();const Z=G.element,be=Z.x+Z.width/2,_e=Z.y+Z.height/2,me=Math.atan2(ce.y-_e,ce.x-be)*(180/Math.PI);Ae(!0),se({elementId:Z.id,centerX:be,centerY:_e,startAngle:me,initialRotation:Z.rotation||0});return}}he.target===((U=he.target.getStage())==null?void 0:U.findOne(".background"))&&(h==="select"?(ae(!0),te({startX:ce.x,startY:ce.y,currentX:ce.x,currentY:ce.y})):(h==="text"||h==="shape")&&(W(!0),ge({startX:ce.x,startY:ce.y,currentX:ce.x,currentY:ce.y})))},[h,O,K,D]),xe=oe.useCallback(he=>{const k=t.current;if(!k)return;const ce=k.getPointerPosition();if(ce){if(le&&ne){const U=Math.atan2(ce.y-ne.centerY,ce.x-ne.centerX)*(180/Math.PI)-ne.startAngle;let G=ne.initialRotation+U;const Z=15,be=5,_e=Math.round(G/Z)*Z;Math.abs(G-_e)<be&&(G=_e),G=(G%360+360)%360,x(ne.elementId,{rotation:G});return}if(h==="select"&&!X&&!q){const ue=K(ce);ue.isInZone?j({nw:"nwse-resize",ne:"nesw-resize",sw:"nesw-resize",se:"nwse-resize"}[ue.corner]||"grab"):j("default")}if(X&&L){te({...L,currentX:ce.x,currentY:ce.y});return}q&&V&&ge({...V,currentX:ce.x,currentY:ce.y})}},[q,V,X,L,le,ne,h,K,x]),Re=oe.useCallback(he=>{const k=Math.min(he.startX,he.currentX),ce=Math.min(he.startY,he.currentY),ue=Math.abs(he.currentX-he.startX),U=Math.abs(he.currentY-he.startY);return ue<5&&U<5?[]:I.elements.filter(G=>{const Z=G.x+G.width,be=G.y+G.height,_e=k+ue,me=ce+U;return G.x<_e&&Z>k&&G.y<me&&be>ce}).map(G=>G.id)},[I.elements]),Fe=oe.useCallback(()=>{if(le){Ae(!1),se(null),j("default");return}if(X&&L){const be=Re(L);be.length>0?M(be):O(),ae(!1),te(null);return}if(!q||!V)return;const he=Math.min(V.startX,V.currentX),k=Math.min(V.startY,V.currentY),ce=Math.abs(V.currentX-V.startX),ue=Math.abs(V.currentY-V.startY),U=20,G=Math.max(ce,U),Z=Math.max(ue,U);if(h==="text"){const be=Du[u],_e={id:Pr(),type:"text",x:he,y:k,width:G<100?u==="title"?600:300:G,height:Z<50?be.fontSize*2:Z,rotation:0,content:u==="title"?"제목을 입력하세요":u==="subtitle"?"소제목을 입력하세요":"텍스트를 입력하세요",fontSize:be.fontSize,fontFamily:A,fill:"#1e293b",align:u==="title"||u==="subtitle"?"center":"left",textStyle:u,fontWeight:be.fontWeight,lineHeight:be.lineHeight};y(_e)}else if(h==="shape"){const be={id:Pr(),type:"shape",x:he,y:k,width:G,height:Z,rotation:0,shapeType:p,fill:"#5B6EF7",stroke:"#4338ca",strokeWidth:2};y(be)}W(!1),ge(null),T("select")},[q,V,h,p,u,A,y,T,X,L,Re,M,O,le]),pt=()=>{if(!X||!L)return null;const he=Math.min(L.startX,L.currentX),k=Math.min(L.startY,L.currentY),ce=Math.abs(L.currentX-L.startX),ue=Math.abs(L.currentY-L.startY);return C.jsx(qr,{x:he,y:k,width:ce,height:ue,fill:"rgba(91, 110, 247, 0.1)",stroke:"#5B6EF7",strokeWidth:1,dash:[4,4]})},lt=()=>{if(!q||!V)return null;const he=Math.min(V.startX,V.currentX),k=Math.min(V.startY,V.currentY),ce=Math.abs(V.currentX-V.startX),ue=Math.abs(V.currentY-V.startY);if(h==="text")return C.jsx(qr,{x:he,y:k,width:ce||100,height:ue||40,fill:"rgba(91, 110, 247, 0.1)",stroke:"#5B6EF7",strokeWidth:1,dash:[5,5]});if(h==="shape"){const U={fill:"rgba(91, 110, 247, 0.3)",stroke:"#5B6EF7",strokeWidth:2};switch(p){case"rect":return C.jsx(qr,{x:he,y:k,width:ce,height:ue,...U});case"ellipse":return C.jsx(ov,{x:he+ce/2,y:k+ue/2,radiusX:ce/2,radiusY:ue/2,...U});case"triangle":return C.jsx(Go,{points:[he+ce/2,k,he+ce,k+ue,he,k+ue],closed:!0,...U});case"line":return C.jsx(Go,{points:[V.startX,V.startY,V.currentX,V.currentY],stroke:"#5B6EF7",strokeWidth:2});case"arrow":return C.jsx(lv,{points:[V.startX,V.startY,V.currentX,V.currentY],stroke:"#5B6EF7",fill:"#5B6EF7",strokeWidth:2,pointerLength:10,pointerWidth:10});default:return null}}return null},ut=oe.useCallback((he,k,ce=!1)=>{if(ce&&R.enabled&&"x"in k&&"y"in k){const ue=I.elements.find(U=>U.id===he);if(ue){const U="width"in k?k.width:ue.width,G="height"in k?k.height:ue.height,Z=I.elements.filter(_e=>_e.id!==he),be=vb({x:k.x,y:k.y,width:U,height:G},Z,R);J(be.guides),x(he,{...k,x:be.x,y:be.y});return}}J([]),x(he,k)},[x,R,I.elements]),Rt=oe.useCallback(()=>{J([])},[]),je=oe.useCallback((he,k)=>{const ce={id:Pr(),type:"image",x:he.x,y:he.y,width:he.width,height:he.height,rotation:he.rotation,src:k.src,crop:k.crop};S(he.id),y(ce)},[S,y]),St=()=>Y.length===0?null:Y.map((he,k)=>{const ce=he.isCenter,ue=ce?"#5B6EF7":"#ef4444",U=ce?2:1,G=ce?[8,4]:[4,4];return he.type==="vertical"?C.jsx(Go,{points:[he.position,0,he.position,wu],stroke:ue,strokeWidth:U,dash:G},`guide-${k}`):C.jsx(Go,{points:[0,he.position,Su,he.position],stroke:ue,strokeWidth:U,dash:G},`guide-${k}`)});return C.jsx(z.Center,{ref:e,w:"100%",h:"100%",children:C.jsx(z.Box,{style:{width:Su*n,height:wu*n},children:C.jsx(z.Box,{bg:"white",style:{width:Su,height:wu,transform:`scale(${n})`,transformOrigin:"top left",borderRadius:"var(--mantine-radius-md)",overflow:"hidden",boxShadow:"0 20px 70px rgba(0, 0, 0, 0.12)"},children:C.jsx(gb,{ref:t,width:Su,height:wu,onMouseDown:ve,onMouseMove:xe,onMouseUp:Fe,onMouseLeave:Fe,style:{cursor:h!=="select"?"crosshair":le?"grabbing":ie},children:C.jsxs(mb,{children:[C.jsx(qr,{name:"background",x:0,y:0,width:Su,height:wu,fill:I.background}),I.elements.map(he=>{const k=d===he.id||N.includes(he.id);return he.type==="text"?C.jsx(yb,{element:he,isSelected:k,onSelect:()=>w(he.id),onChange:(ce,ue)=>ut(he.id,ce,ue),onDragStart:D,onDragEnd:Rt},he.id):he.type==="shape"?C.jsx(xb,{element:he,isSelected:k,onSelect:()=>w(he.id),onChange:(ce,ue)=>ut(he.id,ce,ue),onDragStart:D,onDragEnd:Rt,onReplaceWithImage:ce=>je(he,ce)},he.id):he.type==="image"?C.jsx(bb,{element:he,isSelected:k,onSelect:()=>w(he.id),onChange:(ce,ue)=>ut(he.id,ce,ue),onDragStart:D,onDragEnd:Rt},he.id):null}),St(),lt(),pt()]})})})})})},dA=142,Hg=80,A7=960,nn=dA/A7,m7=({element:t,scale:e})=>{const[n]=u7(t.src);return n?C.jsx(sA,{image:n,x:t.x*e,y:t.y*e,width:t.width*e,height:t.height*e,rotation:t.rotation}):null},g7=({slide:t})=>{const e=oe.useMemo(()=>t.elements.map(n=>{if(n.type==="text"){const i=n;return C.jsx(Js,{x:i.x*nn,y:i.y*nn,width:i.width*nn,height:i.height*nn,text:h6(i.content),fontSize:i.fontSize*nn,fontFamily:i.fontFamily,fill:i.fill,align:i.align,rotation:i.rotation},n.id)}else if(n.type==="shape"){const i=n,s={x:i.x*nn,y:i.y*nn,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth*nn,rotation:i.rotation};switch(i.shapeType){case"rect":return C.jsx(qr,{width:i.width*nn,height:i.height*nn,...s},n.id);case"ellipse":return C.jsx(ov,{x:(i.x+i.width/2)*nn,y:(i.y+i.height/2)*nn,radiusX:i.width/2*nn,radiusY:i.height/2*nn,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth*nn,rotation:i.rotation},n.id);case"triangle":return C.jsx(Go,{points:[(i.x+i.width/2)*nn,i.y*nn,(i.x+i.width)*nn,(i.y+i.height)*nn,i.x*nn,(i.y+i.height)*nn],closed:!0,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth*nn},n.id);case"line":return C.jsx(Go,{points:[i.x*nn,i.y*nn,(i.x+i.width)*nn,(i.y+i.height)*nn],stroke:i.stroke,strokeWidth:i.strokeWidth*nn},n.id);case"arrow":return C.jsx(lv,{points:[i.x*nn,i.y*nn,(i.x+i.width)*nn,(i.y+i.height)*nn],stroke:i.stroke,fill:i.stroke,strokeWidth:i.strokeWidth*nn,pointerLength:5,pointerWidth:5},n.id);default:return null}}else if(n.type==="image")return C.jsx(m7,{element:n,scale:nn},n.id);return null}),[t.elements]);return C.jsx(gb,{width:dA,height:Hg,children:C.jsxs(mb,{children:[C.jsx(qr,{x:0,y:0,width:dA,height:Hg,fill:t.background}),e]})})},wb=()=>{const t=Ve(p=>p.slides),e=Ve(p=>p.currentSlideIndex),n=Ve(p=>p.selectSlide),i=Ve(p=>p.addSlide),s=Ve(p=>p.deleteSlide),[c,d]=oe.useState(null),h=(p,u)=>{p.stopPropagation(),t.length>1&&s(u)};return C.jsx(z.Box,{h:128,bg:"white",px:"md",style:{borderTop:"1px solid var(--devdive-border-light)"},children:C.jsx(z.ScrollArea,{h:"100%",type:"auto",scrollbarSize:6,children:C.jsxs(z.Group,{gap:"md",h:128,align:"center",wrap:"nowrap",children:[t.map((p,u)=>C.jsxs(z.Box,{pos:"relative",style:{flexShrink:0},onMouseEnter:()=>d(u),onMouseLeave:()=>d(null),children:[C.jsxs(z.Badge,{size:"xs",color:e===u?"devdive":"gray",pos:"absolute",top:-8,left:8,style:{zIndex:10},children:["#",u+1]}),c===u&&t.length>1&&C.jsx(z.ActionIcon,{variant:"filled",color:"red",size:"xs",radius:"xl",pos:"absolute",top:-6,right:-6,style:{zIndex:20},onClick:A=>h(A,u),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:12},children:"close"})}),C.jsx(z.UnstyledButton,{onClick:()=>n(u),style:{borderRadius:"var(--mantine-radius-lg)",overflow:"hidden",border:e===u?"2px solid var(--devdive-primary)":"1px solid var(--devdive-border-light)",boxShadow:e===u?"0 0 0 4px rgba(91, 110, 247, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1)":void 0,transition:"all 150ms ease"},children:C.jsx(g7,{slide:p})})]},p.id)),C.jsx(z.ActionIcon,{variant:"outline",color:"gray",size:Hg,w:dA,radius:"lg",onClick:i,style:{flexShrink:0,borderStyle:"dashed",borderWidth:2},children:C.jsxs(z.Box,{ta:"center",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:20},children:"add"}),C.jsx(z.Box,{fz:9,fw:700,tt:"uppercase",lts:"0.05em",children:"Add"})]})})]})})})},Cb=()=>{const[t,e]=oe.useState(!1),n=Ve(R=>R.slides),i=Ve(R=>R.currentSlideIndex),s=Ve(R=>R.selectedElementId),c=Ve(R=>R.updateElement),d=Ve(R=>R.updateSlideBackground),h=Ve(R=>R.bringToFront),p=Ve(R=>R.sendToBack),u=Ve(R=>R.bringForward),A=Ve(R=>R.sendBackward),y=Ve(R=>R.copyElement),x=Ve(R=>R.commitElementUpdate),S=n[i],w=s?S.elements.find(R=>R.id===s):null;if(t)return C.jsx(z.Box,{w:40,bg:"white",py:"md",style:{borderLeft:"1px solid var(--devdive-border-light)"},children:C.jsx(z.Stack,{align:"center",children:C.jsx(z.Tooltip,{label:"속성 패널 펼치기",position:"left",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",onClick:()=>e(!1),children:C.jsx("span",{className:"material-symbols-outlined",children:"chevron_left"})})})})});if(!w)return C.jsxs(z.Box,{w:256,p:"md",bg:"white",style:{borderLeft:"1px solid var(--devdive-border-light)",overflowY:"auto"},children:[C.jsxs(z.Group,{justify:"space-between",mb:"md",children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{color:"var(--devdive-primary)",fontSize:18},children:"palette"}),C.jsx(z.Text,{size:"sm",fw:700,children:"슬라이드 설정"})]}),C.jsx(z.Tooltip,{label:"패널 접기",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"sm",onClick:()=>e(!0),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"chevron_right"})})})]}),C.jsx(Rf,{color:S.background,onChange:R=>d(R),label:"배경 색상"}),C.jsxs(z.Box,{mt:"xl",pt:"md",ta:"center",c:"dimmed",style:{borderTop:"1px solid var(--devdive-border-light)"},children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:32,marginBottom:4},children:"touch_app"}),C.jsxs(z.Text,{size:"xs",children:["요소를 선택하면",C.jsx("br",{}),"속성을 편집할 수 있습니다"]}),C.jsxs(z.Text,{size:"xs",c:"dimmed",mt:"sm",children:["하단 입력창에서 AI로",C.jsx("br",{}),"슬라이드 내용을 수정하세요"]})]})]});const T=R=>{c(s,R)};return C.jsxs(z.Box,{w:256,p:"md",bg:"white",style:{borderLeft:"1px solid var(--devdive-border-light)",overflowY:"auto"},children:[C.jsxs(z.Group,{justify:"space-between",mb:"md",children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{color:"var(--devdive-primary)",fontSize:18},children:"tune"}),C.jsx(z.Text,{size:"sm",fw:700,children:"속성"})]}),C.jsx(z.Tooltip,{label:"패널 접기",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"sm",onClick:()=>e(!0),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"chevron_right"})})})]}),C.jsxs(z.Box,{mb:"md",pb:"md",style:{borderBottom:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"레이어 순서"}),C.jsxs(z.Group,{gap:4,children:[C.jsx(z.Tooltip,{label:"맨 뒤로 (Ctrl+[)",children:C.jsx(z.ActionIcon,{variant:"light",color:"gray",onClick:p,flex:1,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"vertical_align_bottom"})})}),C.jsx(z.Tooltip,{label:"한 단계 뒤로",children:C.jsx(z.ActionIcon,{variant:"light",color:"gray",onClick:A,flex:1,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"arrow_downward"})})}),C.jsx(z.Tooltip,{label:"한 단계 앞으로",children:C.jsx(z.ActionIcon,{variant:"light",color:"gray",onClick:u,flex:1,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"arrow_upward"})})}),C.jsx(z.Tooltip,{label:"맨 앞으로 (Ctrl+])",children:C.jsx(z.ActionIcon,{variant:"light",color:"gray",onClick:h,flex:1,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"vertical_align_top"})})})]}),C.jsx(z.Button,{variant:"light",color:"gray",size:"xs",fullWidth:!0,mt:"xs",leftSection:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"content_copy"}),onClick:y,children:"복사"})]}),C.jsx(v7,{element:w,onUpdate:T,onStartEdit:x}),w.type==="text"&&C.jsx(y7,{element:w,onUpdate:T,onStartEdit:x}),w.type==="shape"&&C.jsx(x7,{element:w,onUpdate:T,onStartEdit:x}),w.type==="image"&&C.jsx(b7,{element:w,onUpdate:T,onStartEdit:x})]})},v7=({element:t,onUpdate:e,onStartEdit:n})=>{const[i,s]=oe.useState(Math.round(t.width)),[c,d]=oe.useState(Math.round(t.height)),[h,p]=oe.useState(!0),u=t.width/t.height;oe.useEffect(()=>{s(Math.round(t.width)),d(Math.round(t.height))},[t.width,t.height]);const A=x=>{const S=Number(x);if(s(S),h){const w=Math.round(S/u);d(w),e({width:S,height:w})}else e({width:S})},y=x=>{const S=Number(x);if(d(S),h){const w=Math.round(S*u);s(w),e({width:w,height:S})}else e({height:S})};return C.jsxs(z.Box,{mb:"md",pb:"md",style:{borderBottom:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"크기"}),C.jsxs(z.Group,{gap:"xs",align:"flex-end",children:[C.jsxs(z.Box,{flex:1,children:[C.jsx(z.Text,{size:"xs",c:"dimmed",mb:2,children:"너비"}),C.jsx(z.NumberInput,{value:i,onFocus:n,onChange:A,size:"xs",min:10})]}),C.jsx(z.Tooltip,{label:h?"비율 잠금 해제":"비율 잠금",children:C.jsx(z.ActionIcon,{variant:h?"light":"subtle",color:h?"devdive":"gray",onClick:()=>p(!h),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:h?"link":"link_off"})})}),C.jsxs(z.Box,{flex:1,children:[C.jsx(z.Text,{size:"xs",c:"dimmed",mb:2,children:"높이"}),C.jsx(z.NumberInput,{value:c,onFocus:n,onChange:y,size:"xs",min:10})]})]})]})},Rf=({color:t,onChange:e,label:n,onStartEdit:i})=>{const[s,c]=oe.useState(!1),[d,h]=oe.useState(t);oe.useEffect(()=>{h(t)},[t]);const p=["#5B6EF7","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#8b5cf6","#ec4899","#1e293b","#64748b","#e2e8f0","#ffffff"];return C.jsxs(z.Box,{mb:"sm",children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:n}),C.jsxs(z.Group,{gap:"xs",children:[C.jsxs(z.Popover,{opened:s,onChange:c,position:"bottom-start",radius:"lg",shadow:"xl",children:[C.jsx(z.Popover.Target,{children:C.jsx(z.ActionIcon,{variant:"outline",size:"lg",onClick:()=>{s||i==null||i(),c(!s)},style:{backgroundColor:d,borderColor:"var(--devdive-border-light)"}})}),C.jsx(z.Popover.Dropdown,{p:"sm",children:C.jsxs(z.Stack,{gap:"sm",children:[C.jsx(Dx,{color:d,onChange:u=>{h(u),e(u)}}),C.jsx(z.Box,{pt:"sm",style:{borderTop:"1px solid var(--devdive-border-light)"},children:C.jsx(z.SimpleGrid,{cols:4,spacing:6,children:p.map(u=>C.jsx(z.ActionIcon,{size:"sm",variant:"outline",onClick:()=>{h(u),e(u)},style:{backgroundColor:u,borderColor:"var(--devdive-border-light)"}},u))})})]})})]}),C.jsx(z.NumberInput,{value:d,onChange:u=>{const A=String(u);h(A),/^#[0-9A-Fa-f]{6}$/.test(A)&&e(A)},hideControls:!0,size:"xs",flex:1,styles:{input:{fontFamily:"monospace"}}})]})]})},y7=({element:t,onUpdate:e,onStartEdit:n})=>C.jsxs(z.Stack,{gap:"md",children:[C.jsx(Rf,{color:t.fill,onChange:i=>e({fill:i}),label:"텍스트 색상",onStartEdit:n}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"폰트 크기"}),C.jsx(z.NumberInput,{value:t.fontSize,onFocus:n,onChange:i=>e({fontSize:Number(i)}),size:"xs",min:8,max:200})]}),C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"정렬"}),C.jsx(z.SegmentedControl,{value:t.align,onChange:i=>{n(),e({align:i})},fullWidth:!0,size:"xs",data:[{value:"left",label:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"format_align_left"})},{value:"center",label:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"format_align_center"})},{value:"right",label:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"format_align_right"})}]})]})]}),x7=({element:t,onUpdate:e,onStartEdit:n})=>{const i=t.shapeType!=="line"&&t.shapeType!=="arrow";return C.jsxs(z.Stack,{gap:"md",children:[C.jsx(Rf,{color:t.fill,onChange:s=>e({fill:s}),label:"채우기 색상",onStartEdit:n}),C.jsx(Rf,{color:t.stroke,onChange:s=>e({stroke:s}),label:"외곽선 색상",onStartEdit:n}),C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["외곽선 두께: ",t.strokeWidth,"px"]}),C.jsx(z.Slider,{value:t.strokeWidth,onChange:s=>e({strokeWidth:s}),onChangeEnd:n,min:0,max:20,color:"devdive",size:"sm"})]}),t.shapeType==="rect"&&C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["모서리 곡률: ",t.cornerRadius||0,"px"]}),C.jsx(z.Slider,{value:t.cornerRadius||0,onChange:s=>e({cornerRadius:s}),onChangeEnd:n,min:0,max:Math.min(t.width,t.height)/2,color:"devdive",size:"sm"}),C.jsx(z.Group,{gap:4,mt:"xs",children:[0,8,16,24,999].map(s=>C.jsx(z.Button,{variant:(t.cornerRadius||0)===s?"filled":"light",color:(t.cornerRadius||0)===s?"devdive":"gray",size:"xs",flex:1,px:4,onClick:()=>{n(),e({cornerRadius:s===999?Math.min(t.width,t.height)/2:s})},children:s===999?"원형":s},s))})]}),i&&C.jsxs(z.Box,{pt:"md",style:{borderTop:"1px solid var(--devdive-border-light)"},children:[C.jsxs(z.Group,{gap:"xs",mb:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"text_fields"}),C.jsx(z.Text,{size:"xs",fw:600,children:"도형 텍스트"})]}),C.jsx(z.Text,{size:"xs",c:"dimmed",mb:"sm",children:"더블클릭으로 텍스트 편집"}),C.jsx(Rf,{color:t.textColor||"#1e293b",onChange:s=>e({textColor:s}),label:"텍스트 색상",onStartEdit:n}),C.jsxs(z.Box,{mb:"sm",children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"텍스트 크기"}),C.jsx(z.NumberInput,{value:t.textSize||16,onFocus:n,onChange:s=>e({textSize:Number(s)}),size:"xs",min:8,max:72})]}),t.text&&C.jsxs(z.Box,{p:"xs",bg:"gray.0",style:{borderRadius:"var(--mantine-radius-md)"},children:[C.jsx(z.Text,{size:"xs",c:"dimmed",mb:2,children:"현재 텍스트"}),C.jsx(z.Text,{size:"sm",truncate:!0,children:t.text})]})]})]})},b7=({element:t,onUpdate:e,onStartEdit:n})=>{const[i,s]=oe.useState(100),c=t.width,d=t.height,h=p=>{s(p);const u=p/100;e({width:Math.round(c*u),height:Math.round(d*u)})};return C.jsxs(z.Stack,{gap:"md",children:[C.jsxs(z.Box,{children:[C.jsx(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:"미리보기"}),C.jsx(z.Box,{h:96,bg:"gray.1",style:{borderRadius:"var(--mantine-radius-md)",border:"1px solid var(--devdive-border-light)",overflow:"hidden"},children:C.jsx("img",{src:t.src,alt:"preview",style:{width:"100%",height:"100%",objectFit:"contain"}})})]}),C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["크기 비율: ",i,"%"]}),C.jsx(z.Slider,{value:i,onChange:h,onChangeEnd:n,min:10,max:200,color:"devdive",size:"sm"}),C.jsx(z.Group,{gap:4,mt:"xs",children:[50,75,100,125,150].map(p=>C.jsxs(z.Button,{variant:i===p?"filled":"light",color:i===p?"devdive":"gray",size:"xs",flex:1,px:4,onClick:()=>{n(),h(p)},children:[p,"%"]},p))})]}),C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["모서리 곡률: ",t.cornerRadius||0,"px"]}),C.jsx(z.Slider,{value:t.cornerRadius||0,onChange:p=>e({cornerRadius:p}),onChangeEnd:n,min:0,max:Math.min(t.width,t.height)/2,color:"devdive",size:"sm"}),C.jsx(z.Group,{gap:4,mt:"xs",children:[0,8,16,24,999].map(p=>C.jsx(z.Button,{variant:(t.cornerRadius||0)===p?"filled":"light",color:(t.cornerRadius||0)===p?"devdive":"gray",size:"xs",flex:1,px:4,onClick:()=>{n(),e({cornerRadius:p===999?Math.min(t.width,t.height)/2:p})},children:p===999?"원형":p},p))})]}),C.jsxs(z.Box,{children:[C.jsxs(z.Text,{size:"xs",fw:500,c:"dimmed",mb:"xs",children:["회전: ",Math.round(t.rotation||0),"°"]}),C.jsx(z.Slider,{value:t.rotation||0,onChange:p=>e({rotation:p}),onChangeEnd:n,min:0,max:360,color:"devdive",size:"sm"})]})]})},S7=()=>{const[t,e]=oe.useState(!1),[n,i]=oe.useState([]),[s,c]=oe.useState(""),[d,h]=oe.useState(!1),[p,u]=oe.useState([]),[A,y]=oe.useState(-1),[x,S]=oe.useState({x:0,y:0}),[w,T]=oe.useState(!1),R=oe.useRef({x:0,y:0,posX:0,posY:0}),D=oe.useRef(null),N=oe.useRef(null),M=oe.useRef(null),{generateSlideContent:O,generateImage:I}=mA(),Y=Ve(j=>j.slides),J=Ve(j=>j.currentSlideIndex),q=Ve(j=>j.updateElement),W=Ve(j=>j.addElement),V=Y[J],ge=oe.useCallback(async j=>{const K=[];for(const ve of j)if(ve.type==="addImage"){const xe={right:{x:620,y:150},left:{x:40,y:150},bottom:{x:280,y:350},center:{x:330,y:170}},Re=xe[ve.position]||xe.center,Fe=ve.suggestedSize||{width:300,height:200};try{const lt=await I({prompt:ve.description||"이미지",style:"realistic",size:"1024x1024"});if(lt.base64){const ut={id:`ai-img-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,type:"image",src:`data:image/png;base64,${lt.base64}`,x:Re.x,y:Re.y,width:Fe.width,height:Fe.height,rotation:0};W(ut),K.push(`이미지 생성 완료 (${ve.position}): "${ve.description}"`);continue}}catch{}const pt={id:`img-placeholder-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,type:"shape",shapeType:"rect",x:Re.x,y:Re.y,width:Fe.width,height:Fe.height,rotation:0,fill:"#f1f5f9",stroke:"#94a3b8",strokeWidth:2,cornerRadius:8,text:ve.description||"이미지",textSize:14,textColor:"#64748b"};W(pt),K.push(`이미지 영역 추가 (${ve.position}): "${ve.description}"`)}else ve.type==="suggestLayout"&&K.push(`레이아웃 제안: ${ve.layout} - ${ve.reason}`);return K},[W,I]);oe.useEffect(()=>{D.current&&t&&D.current.scrollTo({top:D.current.scrollHeight,behavior:"smooth"})},[n,t]),oe.useEffect(()=>{if(V){const j={id:`snapshot-initial-${J}`,timestamp:new Date,elements:JSON.parse(JSON.stringify(V.elements)),messageId:"initial"};u([j]),y(0),i([]),e(!1)}},[J]);const X=oe.useCallback(()=>{setTimeout(()=>{var ve;const j=(ve=Ve.getState().slides[J])==null?void 0:ve.elements;if(!j)return;const K={id:`snapshot-after-${Date.now()}`,timestamp:new Date,elements:JSON.parse(JSON.stringify(j)),messageId:"after-change"};u(xe=>[...xe.slice(0,A+1),K]),y(xe=>xe+1)},50)},[J,A]),ae=oe.useCallback(()=>{if(A<=0)return;const j=A-1,K=p[j];if(!K)return;K.elements.forEach(xe=>{q(xe.id,{...xe})}),y(j);const ve={id:`undo-${Date.now()}`,role:"assistant",content:"이전 상태로 되돌렸습니다.",timestamp:new Date};i(xe=>[...xe,ve])},[A,p,q]),L=oe.useCallback(()=>{if(A>=p.length-1)return;const j=A+1,K=p[j];if(!K)return;K.elements.forEach(xe=>{q(xe.id,{...xe})}),y(j);const ve={id:`redo-${Date.now()}`,role:"assistant",content:"변경사항을 다시 적용했습니다.",timestamp:new Date};i(xe=>[...xe,ve])},[A,p,q]),te=async()=>{var K;if(!s.trim()||d)return;t||e(!0);const j={id:`user-${Date.now()}`,role:"user",content:s.trim(),timestamp:new Date};i(ve=>[...ve,j]),c(""),h(!0);try{const ve=V.elements.filter(U=>U.type==="text"),xe=ve.find(U=>U.textStyle==="title"),Re=ve.find(U=>U.textStyle==="subtitle"),Fe=ve.filter(U=>U.textStyle==="body"),pt=ve.filter(U=>U.textStyle==="caption"),lt=xe||Re,ut=Fe.length>0?Fe:pt,Rt={title:(lt==null?void 0:lt.content)||"",subtitle:Re&&xe?Re.content:"",bodyTexts:ut.map(U=>U.content)},je=await O({topic:s.trim(),slideIndex:J,totalSlides:Y.length,layout:"content",purpose:s.trim(),style:"사용자 요청에 맞게 수정",language:"ko",currentContent:Rt}),St=`assistant-${Date.now()}`;let he=!1;const k=[];if(je.title&&ve.length>0){const U=xe||Re;U&&(q(U.id,{content:je.title}),k.push(`제목: "${je.title}"`),he=!0)}if(je.subtitle&&xe&&Re&&(q(Re.id,{content:je.subtitle}),k.push(`부제목: "${je.subtitle}"`),he=!0),je.bulletPoints&&je.bulletPoints.length>0){const U=ut;je.bulletPoints.forEach((G,Z)=>{U[Z]&&(q(U[Z].id,{content:G}),he=!0)}),je.bulletPoints.length>0&&k.push(`불릿포인트 ${je.bulletPoints.length}개 수정`)}if(je.actions&&je.actions.length>0){const U=await ge(je.actions);k.push(...U),U.length>0&&(he=!0)}he&&X();const ce=he?`수정 완료!
513
513
  ${k.join(`
514
- `)}`:"요청을 처리할 수 없습니다. 다시 시도해주세요.",ue={id:St,role:"assistant",content:ce,timestamp:new Date};i(U=>[...U,ue])}catch(ve){console.error("AI 편집 실패:",ve);const xe={id:`error-${Date.now()}`,role:"assistant",content:"오류가 발생했습니다. 다시 시도해주세요.",timestamp:new Date};i(Re=>[...Re,xe])}finally{h(!1),(K=N.current)==null||K.focus()}},le=j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),te())},Ae=se.useCallback(j=>{j.preventDefault(),T(!0),R.current={x:j.clientX,y:j.clientY,posX:x.x,posY:x.y}},[x]);se.useEffect(()=>{if(!w)return;const j=ve=>{const xe=ve.clientX-R.current.x,Re=ve.clientY-R.current.y;S({x:R.current.posX+xe,y:R.current.posY-Re})},K=()=>{T(!1)};return document.addEventListener("mousemove",j),document.addEventListener("mouseup",K),()=>{document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",K)}},[w]);const ne=se.useCallback(()=>{S({x:0,y:0})},[]),oe=A>0,ie=A<p.length-1;return C.jsxs(z.Box,{ref:M,pos:"absolute",bottom:140+x.y,left:"50%",style:{transform:`translateX(calc(-50% + ${x.x}px))`,zIndex:100,width:"100%",maxWidth:600,pointerEvents:"none",transition:w?"none":"bottom 0.1s, transform 0.1s"},children:[C.jsx(z.Collapse,{in:t&&n.length>0,children:C.jsxs(z.Paper,{shadow:"xl",radius:"lg",mb:"xs",style:{pointerEvents:"auto",maxHeight:300,overflow:"hidden",border:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Box,{px:"sm",py:"xs",bg:"gray.0",style:{borderBottom:"1px solid var(--devdive-border-light)"},children:C.jsxs(z.Group,{justify:"space-between",children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16,color:"var(--devdive-primary)"},children:"auto_awesome"}),C.jsx(z.Text,{size:"xs",fw:600,children:"AI 편집 히스토리"})]}),C.jsxs(z.Group,{gap:4,children:[C.jsx(z.Tooltip,{label:"되돌리기",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xs",disabled:!oe,onClick:ae,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"undo"})})}),C.jsx(z.Tooltip,{label:"다시실행",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xs",disabled:!ie,onClick:L,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"redo"})})}),C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xs",onClick:()=>e(!1),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"expand_more"})})]})]})}),C.jsx(z.ScrollArea,{h:200,px:"sm",py:"xs",viewportRef:D,children:C.jsxs(z.Stack,{gap:"xs",children:[n.map(j=>C.jsx(w7,{message:j},j.id)),d&&C.jsx(z.Box,{children:C.jsx(z.Paper,{px:"xs",py:4,radius:"md",bg:"gray.1",style:{display:"inline-block"},children:C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14,color:"var(--devdive-primary)",animation:"spin 1s linear infinite"},children:"progress_activity"}),C.jsx(z.Text,{size:"xs",c:"dimmed",children:"생성 중..."})]})})})]})})]})}),C.jsx(z.Paper,{shadow:"xl",radius:"xl",px:"md",py:"xs",style:{pointerEvents:"auto",border:"1px solid var(--devdive-border-light)"},children:C.jsxs(z.Group,{gap:"sm",children:[C.jsx(z.Tooltip,{label:"드래그하여 이동 (더블클릭: 초기화)",children:C.jsx(z.Box,{onMouseDown:Ae,onDoubleClick:ne,style:{cursor:w?"grabbing":"grab",display:"flex",alignItems:"center",padding:"4px 0",flexShrink:0},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"var(--mantine-color-gray-5)"},children:"drag_indicator"})})}),C.jsx(z.Box,{w:32,h:32,bg:"linear-gradient(135deg, #5B6EF7 0%, #3b82f6 100%)",style:{borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"white"},children:"auto_awesome"})}),C.jsx(z.TextInput,{ref:N,flex:1,placeholder:"슬라이드 내용을 어떻게 수정할까요? (예: 제목을 더 간결하게)",value:s,onChange:j=>c(j.currentTarget.value),onKeyDown:le,disabled:d,variant:"unstyled",size:"sm",styles:{input:{fontSize:14}}}),n.length>0&&C.jsx(z.Tooltip,{label:t?"채팅 접기":"채팅 보기",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"sm",onClick:()=>e(!t),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:t?"expand_more":"expand_less"})})}),C.jsx(z.ActionIcon,{variant:"filled",color:"devdive",size:"lg",radius:"xl",disabled:!s.trim()||d,onClick:te,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"send"})})]})}),C.jsx("style",{children:`
514
+ `)}`:"요청을 처리할 수 없습니다. 다시 시도해주세요.",ue={id:St,role:"assistant",content:ce,timestamp:new Date};i(U=>[...U,ue])}catch(ve){console.error("AI 편집 실패:",ve);const xe={id:`error-${Date.now()}`,role:"assistant",content:"오류가 발생했습니다. 다시 시도해주세요.",timestamp:new Date};i(Re=>[...Re,xe])}finally{h(!1),(K=N.current)==null||K.focus()}},le=j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),te())},Ae=oe.useCallback(j=>{j.preventDefault(),T(!0),R.current={x:j.clientX,y:j.clientY,posX:x.x,posY:x.y}},[x]);oe.useEffect(()=>{if(!w)return;const j=ve=>{const xe=ve.clientX-R.current.x,Re=ve.clientY-R.current.y;S({x:R.current.posX+xe,y:R.current.posY-Re})},K=()=>{T(!1)};return document.addEventListener("mousemove",j),document.addEventListener("mouseup",K),()=>{document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",K)}},[w]);const ne=oe.useCallback(()=>{S({x:0,y:0})},[]),se=A>0,ie=A<p.length-1;return C.jsxs(z.Box,{ref:M,pos:"absolute",bottom:140+x.y,left:"50%",style:{transform:`translateX(calc(-50% + ${x.x}px))`,zIndex:100,width:"100%",maxWidth:600,pointerEvents:"none",transition:w?"none":"bottom 0.1s, transform 0.1s"},children:[C.jsx(z.Collapse,{in:t&&n.length>0,children:C.jsxs(z.Paper,{shadow:"xl",radius:"lg",mb:"xs",style:{pointerEvents:"auto",maxHeight:300,overflow:"hidden",border:"1px solid var(--devdive-border-light)"},children:[C.jsx(z.Box,{px:"sm",py:"xs",bg:"gray.0",style:{borderBottom:"1px solid var(--devdive-border-light)"},children:C.jsxs(z.Group,{justify:"space-between",children:[C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16,color:"var(--devdive-primary)"},children:"auto_awesome"}),C.jsx(z.Text,{size:"xs",fw:600,children:"AI 편집 히스토리"})]}),C.jsxs(z.Group,{gap:4,children:[C.jsx(z.Tooltip,{label:"되돌리기",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xs",disabled:!se,onClick:ae,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"undo"})})}),C.jsx(z.Tooltip,{label:"다시실행",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xs",disabled:!ie,onClick:L,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"redo"})})}),C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xs",onClick:()=>e(!1),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"expand_more"})})]})]})}),C.jsx(z.ScrollArea,{h:200,px:"sm",py:"xs",viewportRef:D,children:C.jsxs(z.Stack,{gap:"xs",children:[n.map(j=>C.jsx(w7,{message:j},j.id)),d&&C.jsx(z.Box,{children:C.jsx(z.Paper,{px:"xs",py:4,radius:"md",bg:"gray.1",style:{display:"inline-block"},children:C.jsxs(z.Group,{gap:"xs",children:[C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14,color:"var(--devdive-primary)",animation:"spin 1s linear infinite"},children:"progress_activity"}),C.jsx(z.Text,{size:"xs",c:"dimmed",children:"생성 중..."})]})})})]})})]})}),C.jsx(z.Paper,{shadow:"xl",radius:"xl",px:"md",py:"xs",style:{pointerEvents:"auto",border:"1px solid var(--devdive-border-light)"},children:C.jsxs(z.Group,{gap:"sm",children:[C.jsx(z.Tooltip,{label:"드래그하여 이동 (더블클릭: 초기화)",children:C.jsx(z.Box,{onMouseDown:Ae,onDoubleClick:ne,style:{cursor:w?"grabbing":"grab",display:"flex",alignItems:"center",padding:"4px 0",flexShrink:0},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"var(--mantine-color-gray-5)"},children:"drag_indicator"})})}),C.jsx(z.Box,{w:32,h:32,bg:"linear-gradient(135deg, #5B6EF7 0%, #3b82f6 100%)",style:{borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"white"},children:"auto_awesome"})}),C.jsx(z.TextInput,{ref:N,flex:1,placeholder:"슬라이드 내용을 어떻게 수정할까요? (예: 제목을 더 간결하게)",value:s,onChange:j=>c(j.currentTarget.value),onKeyDown:le,disabled:d,variant:"unstyled",size:"sm",styles:{input:{fontSize:14}}}),n.length>0&&C.jsx(z.Tooltip,{label:t?"채팅 접기":"채팅 보기",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"sm",onClick:()=>e(!t),children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:t?"expand_more":"expand_less"})})}),C.jsx(z.ActionIcon,{variant:"filled",color:"devdive",size:"lg",radius:"xl",disabled:!s.trim()||d,loading:d,onClick:te,children:C.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18},children:"send"})})]})}),C.jsx("style",{children:`
515
515
  @keyframes spin {
516
516
  from { transform: rotate(0deg); }
517
517
  to { transform: rotate(360deg); }
518
518
  }
519
- `})]})},w7=({message:t})=>{const e=t.role==="user";return C.jsx(z.Box,{style:{textAlign:e?"right":"left"},children:C.jsx(z.Paper,{px:"xs",py:4,radius:"md",bg:e?"var(--devdive-primary)":"gray.1",c:e?"white":"inherit",style:{maxWidth:"85%",display:"inline-block"},children:C.jsx(z.Text,{size:"xs",style:{whiteSpace:"pre-wrap",lineHeight:1.4},children:t.content})})})},C7=()=>{const t=Ve(p=>p.copyElement),e=Ve(p=>p.pasteElement),n=Ve(p=>p.deleteElement),i=Ve(p=>p.selectedElementId),s=Ve(p=>p.bringToFront),c=Ve(p=>p.sendToBack),d=Ve(p=>p.undo),h=Ve(p=>p.redo);se.useEffect(()=>{const p=u=>{const A=u.target;if(A.tagName==="INPUT"||A.tagName==="TEXTAREA")return;const y=u.ctrlKey||u.metaKey;y&&u.key==="c"&&(u.preventDefault(),t()),y&&u.key==="v"&&(u.preventDefault(),e()),(u.key==="Delete"||u.key==="Backspace")&&i&&(u.preventDefault(),n(i)),y&&u.key==="]"&&(u.preventDefault(),s()),y&&u.key==="["&&(u.preventDefault(),c()),y&&u.key==="z"&&!u.shiftKey&&(u.preventDefault(),d()),(y&&u.key==="z"&&u.shiftKey||y&&u.key==="y")&&(u.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[t,e,n,i,s,c,d,h])},_7=({aiConfig:t})=>{C7();const e=AA(n=>n.setProviderConfig);return se.useEffect(()=>{t&&e(t)},[t,e]),C.jsxs(z.Flex,{direction:"column",h:"100%",c:"slate.8",children:[C.jsx(Cx,{}),C.jsxs(z.Flex,{flex:1,style:{overflow:"hidden"},children:[C.jsxs(z.Box,{component:"main",flex:1,pos:"relative",className:"dot-grid",style:{display:"flex",flexDirection:"column",overflow:"hidden"},children:[C.jsx(Lx,{}),C.jsx(z.Box,{flex:1,style:{overflow:"hidden"},children:C.jsx(Sb,{})}),C.jsx(S7,{})]}),C.jsx(Cb,{})]}),C.jsx(wb,{})]})},rx={position:"fixed",top:"50%",transform:"translateY(-50%)",zIndex:30,width:48,height:48,borderRadius:"50%",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(12px)",border:"1px solid var(--devdive-border-light)",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.1)"},E7=()=>{const t=Ve(h=>h.slides),e=Ve(h=>h.currentSlideIndex),n=Ve(h=>h.selectSlide),i=e>0,s=e<t.length-1,c=()=>{i&&n(e-1)},d=()=>{s&&n(e+1)};return C.jsxs(C.Fragment,{children:[C.jsx(z.Tooltip,{label:"이전 슬라이드",position:"right",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xl",onClick:c,disabled:!i,style:{...rx,left:24},children:C.jsx("span",{className:"material-symbols-outlined",children:"chevron_left"})})}),C.jsx(z.Tooltip,{label:"다음 슬라이드",position:"left",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xl",onClick:d,disabled:!s,style:{...rx,right:24},children:C.jsx("span",{className:"material-symbols-outlined",children:"chevron_right"})})})]})},T7=t=>{AA.getState().setProviderConfig(t)};exports.Editor=_7;exports.FloatingToolbar=Lx;exports.Header=Cx;exports.ImageNode=bb;exports.LAYOUT_TEMPLATES=Xg;exports.PropertiesPanel=Cb;exports.ShapeNode=xb;exports.SlideCanvas=Sb;exports.SlideNavigation=E7;exports.SlideThumbnails=wb;exports.TEXT_STYLE_PRESETS=Du;exports.THEME_PRESETS=hs;exports.TemplateGallery=bx;exports.TextNode=yb;exports.calculateSnap=vb;exports.devdiveTheme=lS;exports.devdiveThemeLight=cS;exports.generateId=Pr;exports.generatePptx=yx;exports.getLayoutTemplate=vg;exports.initAiConfig=T7;exports.parsePptx=xx;exports.themeVars=uS;exports.useAiStore=AA;exports.useEditorStore=Ve;
519
+ `})]})},w7=({message:t})=>{const e=t.role==="user";return C.jsx(z.Box,{style:{textAlign:e?"right":"left"},children:C.jsx(z.Paper,{px:"xs",py:4,radius:"md",bg:e?"var(--devdive-primary)":"gray.1",c:e?"white":"inherit",style:{maxWidth:"85%",display:"inline-block"},children:C.jsx(z.Text,{size:"xs",style:{whiteSpace:"pre-wrap",lineHeight:1.4},children:t.content})})})},C7=()=>{const t=Ve(p=>p.copyElement),e=Ve(p=>p.pasteElement),n=Ve(p=>p.deleteElement),i=Ve(p=>p.selectedElementId),s=Ve(p=>p.bringToFront),c=Ve(p=>p.sendToBack),d=Ve(p=>p.undo),h=Ve(p=>p.redo);oe.useEffect(()=>{const p=u=>{const A=u.target;if(A.tagName==="INPUT"||A.tagName==="TEXTAREA")return;const y=u.ctrlKey||u.metaKey;y&&u.key==="c"&&(u.preventDefault(),t()),y&&u.key==="v"&&(u.preventDefault(),e()),(u.key==="Delete"||u.key==="Backspace")&&i&&(u.preventDefault(),n(i)),y&&u.key==="]"&&(u.preventDefault(),s()),y&&u.key==="["&&(u.preventDefault(),c()),y&&u.key==="z"&&!u.shiftKey&&(u.preventDefault(),d()),(y&&u.key==="z"&&u.shiftKey||y&&u.key==="y")&&(u.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[t,e,n,i,s,c,d,h])},_7=({aiConfig:t})=>{C7();const e=AA(n=>n.setProviderConfig);return oe.useEffect(()=>{t&&e(t)},[t,e]),C.jsxs(z.Flex,{direction:"column",h:"100%",c:"slate.8",children:[C.jsx(Cx,{}),C.jsxs(z.Flex,{flex:1,style:{overflow:"hidden"},children:[C.jsxs(z.Box,{component:"main",flex:1,pos:"relative",className:"dot-grid",style:{display:"flex",flexDirection:"column",overflow:"hidden"},children:[C.jsx(Lx,{}),C.jsx(z.Box,{flex:1,style:{overflow:"hidden"},children:C.jsx(Sb,{})}),C.jsx(S7,{})]}),C.jsx(Cb,{})]}),C.jsx(wb,{})]})},rx={position:"fixed",top:"50%",transform:"translateY(-50%)",zIndex:30,width:48,height:48,borderRadius:"50%",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(12px)",border:"1px solid var(--devdive-border-light)",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.1)"},E7=()=>{const t=Ve(h=>h.slides),e=Ve(h=>h.currentSlideIndex),n=Ve(h=>h.selectSlide),i=e>0,s=e<t.length-1,c=()=>{i&&n(e-1)},d=()=>{s&&n(e+1)};return C.jsxs(C.Fragment,{children:[C.jsx(z.Tooltip,{label:"이전 슬라이드",position:"right",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xl",onClick:c,disabled:!i,style:{...rx,left:24},children:C.jsx("span",{className:"material-symbols-outlined",children:"chevron_left"})})}),C.jsx(z.Tooltip,{label:"다음 슬라이드",position:"left",children:C.jsx(z.ActionIcon,{variant:"subtle",color:"gray",size:"xl",onClick:d,disabled:!s,style:{...rx,right:24},children:C.jsx("span",{className:"material-symbols-outlined",children:"chevron_right"})})})]})},T7=t=>{AA.getState().setProviderConfig(t)};exports.Editor=_7;exports.FloatingToolbar=Lx;exports.Header=Cx;exports.ImageNode=bb;exports.LAYOUT_TEMPLATES=Xg;exports.PropertiesPanel=Cb;exports.ShapeNode=xb;exports.SlideCanvas=Sb;exports.SlideNavigation=E7;exports.SlideThumbnails=wb;exports.TEXT_STYLE_PRESETS=Du;exports.THEME_PRESETS=hs;exports.TemplateGallery=bx;exports.TextNode=yb;exports.calculateSnap=vb;exports.devdiveTheme=lS;exports.devdiveThemeLight=cS;exports.generateId=Pr;exports.generatePptx=yx;exports.getLayoutTemplate=vg;exports.initAiConfig=T7;exports.parsePptx=xx;exports.themeVars=uS;exports.useAiStore=AA;exports.useEditorStore=Ve;
520
520
  //# sourceMappingURL=devdive-slide.cjs.js.map