szld-libs 0.3.72 → 0.3.73
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.
|
@@ -193,7 +193,7 @@ Check the render method of %s.`,Tt(cr)||"Unknown"));var K=Ks(E,M);K.payload={ele
|
|
|
193
193
|
root.render(<App />);`),a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.transitionCallbacks!==void 0&&a.transitionCallbacks);var M=lF(n,fx,null,u,p,y,E);ax(M.current,n);var I=n.nodeType===fr?n.parentNode:n;return cm(I),new N4(M)}function mb(n){this._internalRoot=n}function HW(n){n&&F1(n)}mb.prototype.unstable_scheduleHydration=HW;function VW(n,a,u){if(!gb(n))throw new Error("hydrateRoot(...): Target container is not a DOM element.");AF(n),a===void 0&&c("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var p=u??null,y=u!=null&&u.hydratedSources||null,E=!1,M=!1,I="",K=TF;u!=null&&(u.unstable_strictMode===!0&&(E=!0),u.identifierPrefix!==void 0&&(I=u.identifierPrefix),u.onRecoverableError!==void 0&&(K=u.onRecoverableError));var ae=sF(a,null,n,fx,p,E,M,I,K);if(ax(ae.current,n),cm(n),y)for(var ie=0;ie<y.length;ie++){var he=y[ie];Zq(ae,he)}return new mb(ae)}function gb(n){return!!(n&&(n.nodeType===Ta||n.nodeType===Hi||n.nodeType===vs||!te))}function rg(n){return!!(n&&(n.nodeType===Ta||n.nodeType===Hi||n.nodeType===vs||n.nodeType===fr&&n.nodeValue===" react-mount-point-unstable "))}function AF(n){n.nodeType===Ta&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),Cm(n)&&(n._reactRootContainer?c("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):c("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var $W=t.ReactCurrentOwner,OF;OF=function(n){if(n._reactRootContainer&&n.nodeType!==fr){var a=cF(n._reactRootContainer.current);a&&a.parentNode!==n&&c("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var u=!!n._reactRootContainer,p=M4(n),y=!!(p&&ec(p));y&&!u&&c("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),n.nodeType===Ta&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function M4(n){return n?n.nodeType===Hi?n.documentElement:n.firstChild:null}function RF(){}function YW(n,a,u,p,y){if(y){if(typeof p=="function"){var E=p;p=function(){var fe=vb(M);E.call(fe)}}var M=sF(a,p,n,nc,null,!1,!1,"",RF);n._reactRootContainer=M,ax(M.current,n);var I=n.nodeType===fr?n.parentNode:n;return cm(I),Xs(),M}else{for(var K;K=n.lastChild;)n.removeChild(K);if(typeof p=="function"){var ae=p;p=function(){var fe=vb(ie);ae.call(fe)}}var ie=lF(n,nc,null,!1,!1,"",RF);n._reactRootContainer=ie,ax(ie.current,n);var he=n.nodeType===fr?n.parentNode:n;return cm(he),Xs(function(){ng(a,ie,u,p)}),ie}}function qW(n,a){n!==null&&typeof n!="function"&&c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",a,n)}function yb(n,a,u,p,y){OF(u),qW(y===void 0?null:y,"render");var E=u._reactRootContainer,M;if(!E)M=YW(u,a,n,y,p);else{if(M=E,typeof y=="function"){var I=y;y=function(){var K=vb(M);I.call(K)}}ng(a,M,n,y)}return vb(M)}function GW(n){{var a=$W.current;if(a!==null&&a.stateNode!==null){var u=a.stateNode._warnedAboutRefsInRender;u||c("%s is accessing findDOMNode inside its render(). 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.",Tn(a.type)||"A component"),a.stateNode._warnedAboutRefsInRender=!0}}return n==null?null:n.nodeType===Ta?n:RW(n,"findDOMNode")}function KW(n,a,u){if(c("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rg(a))throw new Error("Target container is not a DOM element.");{var p=Cm(a)&&a._reactRootContainer===void 0;p&&c("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return yb(null,n,a,!0,u)}function WW(n,a,u){if(c("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rg(a))throw new Error("Target container is not a DOM element.");{var p=Cm(a)&&a._reactRootContainer===void 0;p&&c("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return yb(null,n,a,!1,u)}function QW(n,a,u,p){if(c("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rg(u))throw new Error("Target container is not a DOM element.");if(n==null||!ff(n))throw new Error("parentComponent must be a valid React Component");return yb(n,a,u,!1,p)}function ZW(n){if(!rg(n))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var a=Cm(n)&&n._reactRootContainer===void 0;a&&c("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(n._reactRootContainer){{var u=M4(n),p=u&&!ec(u);p&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Xs(function(){yb(null,null,n,!1,function(){n._reactRootContainer=null,kA(n)})}),!0}else{{var y=M4(n),E=!!(y&&ec(y)),M=n.nodeType===Ta&&rg(n.parentNode)&&!!n.parentNode._reactRootContainer;E&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",M?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}nt(FW),D1(NW),Df(MW),qv(Ci),T1(_f),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&c("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),o1(eY),Wd(f4,VK,Xs);function XW(n,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!gb(a))throw new Error("Target container is not a DOM element.");return OW(n,a,null,u)}function JW(n,a,u,p){return QW(n,a,u,p)}var P4={usingClientEntryPoint:!1,Events:[ec,Z0,ix,Kd,sf,f4]};function eQ(n,a){return P4.usingClientEntryPoint||c('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),IW(n,a)}function tQ(n,a,u){return P4.usingClientEntryPoint||c('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),VW(n,a,u)}function nQ(n){return jR()&&c("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Xs(n)}var rQ=jW({findFiberByHostInstance:Bf,bundleType:1,version:T4,rendererPackageName:"react-dom"});if(!rQ&&We&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var aQ=window.location.protocol;/^(https?|file):$/.test(aQ)}ii.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P4,ii.createPortal=XW,ii.createRoot=eQ,ii.findDOMNode=GW,ii.flushSync=nQ,ii.hydrate=KW,ii.hydrateRoot=tQ,ii.render=WW,ii.unmountComponentAtNode=ZW,ii.unstable_batchedUpdates=f4,ii.unstable_renderSubtreeIntoContainer=JW,ii.version=T4,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ii}(function(e){function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch{}}}process.env.NODE_ENV==="production"?(r(),e.exports=p9()):e.exports=h9()})(tu);const fg=PF(tu.exports),v9=MF({__proto__:null,default:fg},[tu.exports]);var Lb=(e=>(e.zip="application/zip",e.png="image/png",e.jpg="image/jpg",e.jpeg="image/jpeg",e.pdf="application/pdf",e.doc="application/msword",e.docx="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.pptx="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.ppt="application/vnd.ms-powerpoint",e.xlsx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.xls="application/vnd.ms-excel",e.txt="text/plain",e.csv="text/csv",e.svg="image/svg+xml",e))(Lb||{});const zb=new Map(Object.entries(Lb));var ed=(e=>(e.zip=".zip",e.png=".png",e.jpg=".jpg",e.jpeg=".jpeg",e.pdf=".pdf",e.doc=".doc",e.docx=".docx",e.ppt=".ppt",e.pptx=".pptx",e.xls=".xls",e.xlsx=".xlsx",e.txt=".txt",e.csv=".csv",e.svg=".svg",e.rar=".rar",e))(ed||{});const m9=Object.freeze(Object.defineProperty({__proto__:null,FileType:Lb,FileTypeMap:zb,FileSuffix:ed},Symbol.toStringTag,{value:"Module"})),g9=e=>{if(!ns.isObject(e))return e;const r=e;return ns.pick(r,ns.keys(r).filter(t=>!ns.isNil(r[t])))},M8=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),dg=e=>{var r;if(e)return"."+((r=e.split(".").at(-1))==null?void 0:r.toLowerCase())},y9=e=>{if(e){if(e.startsWith("http")){const r=e.split(".").at(-1);if(r&&zb.has(r))return zb.get(r)}if(e.startsWith("data:")&&e.includes("base64")){const r=e.indexOf(";base64"),t=e.slice(0,r).split(":");if(t[1])return t[1]}}},P8=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;localStorage.setItem(e,t)},Ub=e=>{let t=localStorage.getItem(e);return typeof t=="string"&&(t=jb(t)),t||null},x9=e=>{localStorage.removeItem(e)},b9=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;sessionStorage.setItem(e,t)},C9=e=>{let t=sessionStorage.getItem(e);return typeof t=="string"&&(t=jb(t)),t||null},w9=e=>{sessionStorage.removeItem(e)},_9=(e,r)=>{const t=[];for(let i=0;i<r.length;i++)t.findIndex(l=>l[e]===r[i][e])<0&&t.push(r[i]);return t},jb=e=>{if(!e)return null;if(typeof e=="object")return e;if(typeof e=="string"){let r=e;try{r=JSON.parse(e)}catch{}return r}};function E9(){var e=URL.createObjectURL(new Blob),r=e.toString();return URL.revokeObjectURL(e),r.substr(r.lastIndexOf("/")+1)}const S9=Object.freeze(Object.defineProperty({__proto__:null,filterObject:g9,getBase64:M8,getFileSuffix:dg,getFileType:y9,setLocalStorage:P8,getLocalStorage:Ub,removeLocalStorage:x9,setSessionStorage:b9,getSessionStorage:C9,removeSessionStorage:w9,arrayDeduplication:_9,JSONParse:jb,uuid:E9,forceReload:()=>{const e="FORCERELOAD";sessionStorage.getItem(e)!=="1"&&(sessionStorage.setItem(e,"1"),window.location.reload())},formatResponse:e=>{if(typeof e=="string"){const r=e.indexOf(",");return JSON.parse(e.slice(r+1))}return e}},Symbol.toStringTag,{value:"Module"}));const D9=4,B8=0,L8=1,k9=2;function td(e){let r=e.length;for(;--r>=0;)e[r]=0}const T9=0,z8=1,A9=2,O9=3,R9=258,Ib=29,kp=256,Tp=kp+1+Ib,nd=30,Hb=19,U8=2*Tp+1,gc=15,Vb=16,F9=7,$b=256,j8=16,I8=17,H8=18,Yb=new Uint8Array([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]),pg=new Uint8Array([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]),N9=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),V8=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),M9=512,as=new Array((Tp+2)*2);td(as);const Ap=new Array(nd*2);td(Ap);const Op=new Array(M9);td(Op);const Rp=new Array(R9-O9+1);td(Rp);const qb=new Array(Ib);td(qb);const hg=new Array(nd);td(hg);function Gb(e,r,t,i,l){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=i,this.max_length=l,this.has_stree=e&&e.length}let $8,Y8,q8;function Kb(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}const G8=e=>e<256?Op[e]:Op[256+(e>>>7)],Fp=(e,r)=>{e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255},oi=(e,r,t)=>{e.bi_valid>Vb-t?(e.bi_buf|=r<<e.bi_valid&65535,Fp(e,e.bi_buf),e.bi_buf=r>>Vb-e.bi_valid,e.bi_valid+=t-Vb):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)},il=(e,r,t)=>{oi(e,t[r*2],t[r*2+1])},K8=(e,r)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1},P9=e=>{e.bi_valid===16?(Fp(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},B9=(e,r)=>{const t=r.dyn_tree,i=r.max_code,l=r.stat_desc.static_tree,f=r.stat_desc.has_stree,c=r.stat_desc.extra_bits,h=r.stat_desc.extra_base,m=r.stat_desc.max_length;let d,g,C,b,x,_,k=0;for(b=0;b<=gc;b++)e.bl_count[b]=0;for(t[e.heap[e.heap_max]*2+1]=0,d=e.heap_max+1;d<U8;d++)g=e.heap[d],b=t[t[g*2+1]*2+1]+1,b>m&&(b=m,k++),t[g*2+1]=b,!(g>i)&&(e.bl_count[b]++,x=0,g>=h&&(x=c[g-h]),_=t[g*2],e.opt_len+=_*(b+x),f&&(e.static_len+=_*(l[g*2+1]+x)));if(k!==0){do{for(b=m-1;e.bl_count[b]===0;)b--;e.bl_count[b]--,e.bl_count[b+1]+=2,e.bl_count[m]--,k-=2}while(k>0);for(b=m;b!==0;b--)for(g=e.bl_count[b];g!==0;)C=e.heap[--d],!(C>i)&&(t[C*2+1]!==b&&(e.opt_len+=(b-t[C*2+1])*t[C*2],t[C*2+1]=b),g--)}},W8=(e,r,t)=>{const i=new Array(gc+1);let l=0,f,c;for(f=1;f<=gc;f++)l=l+t[f-1]<<1,i[f]=l;for(c=0;c<=r;c++){let h=e[c*2+1];h!==0&&(e[c*2]=K8(i[h]++,h))}},L9=()=>{let e,r,t,i,l;const f=new Array(gc+1);for(t=0,i=0;i<Ib-1;i++)for(qb[i]=t,e=0;e<1<<Yb[i];e++)Rp[t++]=i;for(Rp[t-1]=i,l=0,i=0;i<16;i++)for(hg[i]=l,e=0;e<1<<pg[i];e++)Op[l++]=i;for(l>>=7;i<nd;i++)for(hg[i]=l<<7,e=0;e<1<<pg[i]-7;e++)Op[256+l++]=i;for(r=0;r<=gc;r++)f[r]=0;for(e=0;e<=143;)as[e*2+1]=8,e++,f[8]++;for(;e<=255;)as[e*2+1]=9,e++,f[9]++;for(;e<=279;)as[e*2+1]=7,e++,f[7]++;for(;e<=287;)as[e*2+1]=8,e++,f[8]++;for(W8(as,Tp+1,f),e=0;e<nd;e++)Ap[e*2+1]=5,Ap[e*2]=K8(e,5);$8=new Gb(as,Yb,kp+1,Tp,gc),Y8=new Gb(Ap,pg,0,nd,gc),q8=new Gb(new Array(0),N9,0,Hb,F9)},Q8=e=>{let r;for(r=0;r<Tp;r++)e.dyn_ltree[r*2]=0;for(r=0;r<nd;r++)e.dyn_dtree[r*2]=0;for(r=0;r<Hb;r++)e.bl_tree[r*2]=0;e.dyn_ltree[$b*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Z8=e=>{e.bi_valid>8?Fp(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},X8=(e,r,t,i)=>{const l=r*2,f=t*2;return e[l]<e[f]||e[l]===e[f]&&i[r]<=i[t]},Wb=(e,r,t)=>{const i=e.heap[t];let l=t<<1;for(;l<=e.heap_len&&(l<e.heap_len&&X8(r,e.heap[l+1],e.heap[l],e.depth)&&l++,!X8(r,i,e.heap[l],e.depth));)e.heap[t]=e.heap[l],t=l,l<<=1;e.heap[t]=i},J8=(e,r,t)=>{let i,l,f=0,c,h;if(e.sym_next!==0)do i=e.pending_buf[e.sym_buf+f++]&255,i+=(e.pending_buf[e.sym_buf+f++]&255)<<8,l=e.pending_buf[e.sym_buf+f++],i===0?il(e,l,r):(c=Rp[l],il(e,c+kp+1,r),h=Yb[c],h!==0&&(l-=qb[c],oi(e,l,h)),i--,c=G8(i),il(e,c,t),h=pg[c],h!==0&&(i-=hg[c],oi(e,i,h)));while(f<e.sym_next);il(e,$b,r)},Qb=(e,r)=>{const t=r.dyn_tree,i=r.stat_desc.static_tree,l=r.stat_desc.has_stree,f=r.stat_desc.elems;let c,h,m=-1,d;for(e.heap_len=0,e.heap_max=U8,c=0;c<f;c++)t[c*2]!==0?(e.heap[++e.heap_len]=m=c,e.depth[c]=0):t[c*2+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=m<2?++m:0,t[d*2]=1,e.depth[d]=0,e.opt_len--,l&&(e.static_len-=i[d*2+1]);for(r.max_code=m,c=e.heap_len>>1;c>=1;c--)Wb(e,t,c);d=f;do c=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Wb(e,t,1),h=e.heap[1],e.heap[--e.heap_max]=c,e.heap[--e.heap_max]=h,t[d*2]=t[c*2]+t[h*2],e.depth[d]=(e.depth[c]>=e.depth[h]?e.depth[c]:e.depth[h])+1,t[c*2+1]=t[h*2+1]=d,e.heap[1]=d++,Wb(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],B9(e,r),W8(t,m,e.bl_count)},e5=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],h=0,m=7,d=4;for(c===0&&(m=138,d=3),r[(t+1)*2+1]=65535,i=0;i<=t;i++)f=c,c=r[(i+1)*2+1],!(++h<m&&f===c)&&(h<d?e.bl_tree[f*2]+=h:f!==0?(f!==l&&e.bl_tree[f*2]++,e.bl_tree[j8*2]++):h<=10?e.bl_tree[I8*2]++:e.bl_tree[H8*2]++,h=0,l=f,c===0?(m=138,d=3):f===c?(m=6,d=3):(m=7,d=4))},t5=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],h=0,m=7,d=4;for(c===0&&(m=138,d=3),i=0;i<=t;i++)if(f=c,c=r[(i+1)*2+1],!(++h<m&&f===c)){if(h<d)do il(e,f,e.bl_tree);while(--h!==0);else f!==0?(f!==l&&(il(e,f,e.bl_tree),h--),il(e,j8,e.bl_tree),oi(e,h-3,2)):h<=10?(il(e,I8,e.bl_tree),oi(e,h-3,3)):(il(e,H8,e.bl_tree),oi(e,h-11,7));h=0,l=f,c===0?(m=138,d=3):f===c?(m=6,d=3):(m=7,d=4)}},z9=e=>{let r;for(e5(e,e.dyn_ltree,e.l_desc.max_code),e5(e,e.dyn_dtree,e.d_desc.max_code),Qb(e,e.bl_desc),r=Hb-1;r>=3&&e.bl_tree[V8[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r},U9=(e,r,t,i)=>{let l;for(oi(e,r-257,5),oi(e,t-1,5),oi(e,i-4,4),l=0;l<i;l++)oi(e,e.bl_tree[V8[l]*2+1],3);t5(e,e.dyn_ltree,r-1),t5(e,e.dyn_dtree,t-1)},j9=e=>{let r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return B8;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return L8;for(t=32;t<kp;t++)if(e.dyn_ltree[t*2]!==0)return L8;return B8};let n5=!1;const I9=e=>{n5||(L9(),n5=!0),e.l_desc=new Kb(e.dyn_ltree,$8),e.d_desc=new Kb(e.dyn_dtree,Y8),e.bl_desc=new Kb(e.bl_tree,q8),e.bi_buf=0,e.bi_valid=0,Q8(e)},r5=(e,r,t,i)=>{oi(e,(T9<<1)+(i?1:0),3),Z8(e),Fp(e,t),Fp(e,~t),t&&e.pending_buf.set(e.window.subarray(r,r+t),e.pending),e.pending+=t},H9=e=>{oi(e,z8<<1,3),il(e,$b,as),P9(e)},V9=(e,r,t,i)=>{let l,f,c=0;e.level>0?(e.strm.data_type===k9&&(e.strm.data_type=j9(e)),Qb(e,e.l_desc),Qb(e,e.d_desc),c=z9(e),l=e.opt_len+3+7>>>3,f=e.static_len+3+7>>>3,f<=l&&(l=f)):l=f=t+5,t+4<=l&&r!==-1?r5(e,r,t,i):e.strategy===D9||f===l?(oi(e,(z8<<1)+(i?1:0),3),J8(e,as,Ap)):(oi(e,(A9<<1)+(i?1:0),3),U9(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),J8(e,e.dyn_ltree,e.dyn_dtree)),Q8(e),i&&Z8(e)},$9=(e,r,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=r,e.pending_buf[e.sym_buf+e.sym_next++]=r>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(Rp[t]+kp+1)*2]++,e.dyn_dtree[G8(r)*2]++),e.sym_next===e.sym_end);var Y9=I9,q9=r5,G9=V9,K9=$9,W9=H9,Q9={_tr_init:Y9,_tr_stored_block:q9,_tr_flush_block:G9,_tr_tally:K9,_tr_align:W9},Np=(e,r,t,i)=>{let l=e&65535|0,f=e>>>16&65535|0,c=0;for(;t!==0;){c=t>2e3?2e3:t,t-=c;do l=l+r[i++]|0,f=f+l|0;while(--c);l%=65521,f%=65521}return l|f<<16|0};const Z9=()=>{let e,r=[];for(var t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r},X9=new Uint32Array(Z9());var Xr=(e,r,t,i)=>{const l=X9,f=i+t;e^=-1;for(let c=i;c<f;c++)e=e>>>8^l[(e^r[c])&255];return e^-1},yc={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"},xc={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_MEM_ERROR:-4,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};const{_tr_init:J9,_tr_stored_block:Zb,_tr_flush_block:eN,_tr_tally:nu,_tr_align:tN}=Q9,{Z_NO_FLUSH:ru,Z_PARTIAL_FLUSH:nN,Z_FULL_FLUSH:rN,Z_FINISH:Zi,Z_BLOCK:a5,Z_OK:da,Z_STREAM_END:i5,Z_STREAM_ERROR:ol,Z_DATA_ERROR:aN,Z_BUF_ERROR:Xb,Z_DEFAULT_COMPRESSION:iN,Z_FILTERED:oN,Z_HUFFMAN_ONLY:vg,Z_RLE:lN,Z_FIXED:sN,Z_DEFAULT_STRATEGY:uN,Z_UNKNOWN:cN,Z_DEFLATED:mg}=xc,fN=9,dN=15,pN=8,hN=29,Jb=256+1+hN,vN=30,mN=19,gN=2*Jb+1,yN=15,Kt=3,au=258,ll=au+Kt+1,xN=32,rd=42,e2=57,t2=69,n2=73,r2=91,a2=103,bc=113,Mp=666,Ha=1,ad=2,Cc=3,id=4,bN=3,wc=(e,r)=>(e.msg=yc[r],r),o5=e=>e*2-(e>4?9:0),iu=e=>{let r=e.length;for(;--r>=0;)e[r]=0},CN=e=>{let r,t,i,l=e.w_size;r=e.hash_size,i=r;do t=e.head[--i],e.head[i]=t>=l?t-l:0;while(--r);r=l,i=r;do t=e.prev[--i],e.prev[i]=t>=l?t-l:0;while(--r)};let ou=(e,r,t)=>(r<<e.hash_shift^t)&e.hash_mask;const Oi=e=>{const r=e.state;let t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(r.pending_buf.subarray(r.pending_out,r.pending_out+t),e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))},Ri=(e,r)=>{eN(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Oi(e.strm)},fn=(e,r)=>{e.pending_buf[e.pending++]=r},Pp=(e,r)=>{e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255},i2=(e,r,t,i)=>{let l=e.avail_in;return l>i&&(l=i),l===0?0:(e.avail_in-=l,r.set(e.input.subarray(e.next_in,e.next_in+l),t),e.state.wrap===1?e.adler=Np(e.adler,r,l,t):e.state.wrap===2&&(e.adler=Xr(e.adler,r,l,t)),e.next_in+=l,e.total_in+=l,l)},l5=(e,r)=>{let t=e.max_chain_length,i=e.strstart,l,f,c=e.prev_length,h=e.nice_match;const m=e.strstart>e.w_size-ll?e.strstart-(e.w_size-ll):0,d=e.window,g=e.w_mask,C=e.prev,b=e.strstart+au;let x=d[i+c-1],_=d[i+c];e.prev_length>=e.good_match&&(t>>=2),h>e.lookahead&&(h=e.lookahead);do if(l=r,!(d[l+c]!==_||d[l+c-1]!==x||d[l]!==d[i]||d[++l]!==d[i+1])){i+=2,l++;do;while(d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&i<b);if(f=au-(b-i),i=b-au,f>c){if(e.match_start=r,c=f,f>=h)break;x=d[i+c-1],_=d[i+c]}}while((r=C[r&g])>m&&--t!==0);return c<=e.lookahead?c:e.lookahead},od=e=>{const r=e.w_size;let t,i,l;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-ll)&&(e.window.set(e.window.subarray(r,r+r-i),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),CN(e),i+=r),e.strm.avail_in===0)break;if(t=i2(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=Kt)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=ou(e,e.ins_h,e.window[l+1]);e.insert&&(e.ins_h=ou(e,e.ins_h,e.window[l+Kt-1]),e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<Kt)););}while(e.lookahead<ll&&e.strm.avail_in!==0)},s5=(e,r)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i,l,f,c=0,h=e.strm.avail_in;do{if(i=65535,f=e.bi_valid+42>>3,e.strm.avail_out<f||(f=e.strm.avail_out-f,l=e.strstart-e.block_start,i>l+e.strm.avail_in&&(i=l+e.strm.avail_in),i>f&&(i=f),i<t&&(i===0&&r!==Zi||r===ru||i!==l+e.strm.avail_in)))break;c=r===Zi&&i===l+e.strm.avail_in?1:0,Zb(e,0,0,c),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,Oi(e.strm),l&&(l>i&&(l=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+l),e.strm.next_out),e.strm.next_out+=l,e.strm.avail_out-=l,e.strm.total_out+=l,e.block_start+=l,i-=l),i&&(i2(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(c===0);return h-=e.strm.avail_in,h&&(h>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=h&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-h,e.strm.next_in),e.strstart),e.strstart+=h,e.insert+=h>e.w_size-e.insert?e.w_size-e.insert:h),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),c?id:r!==ru&&r!==Zi&&e.strm.avail_in===0&&e.strstart===e.block_start?ad:(f=e.window_size-e.strstart,e.strm.avail_in>f&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,f+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),f>e.strm.avail_in&&(f=e.strm.avail_in),f&&(i2(e.strm,e.window,e.strstart,f),e.strstart+=f,e.insert+=f>e.w_size-e.insert?e.w_size-e.insert:f),e.high_water<e.strstart&&(e.high_water=e.strstart),f=e.bi_valid+42>>3,f=e.pending_buf_size-f>65535?65535:e.pending_buf_size-f,t=f>e.w_size?e.w_size:f,l=e.strstart-e.block_start,(l>=t||(l||r===Zi)&&r!==ru&&e.strm.avail_in===0&&l<=f)&&(i=l>f?f:l,c=r===Zi&&e.strm.avail_in===0&&i===l?1:0,Zb(e,e.block_start,i,c),e.block_start+=i,Oi(e.strm)),c?Cc:Ha)},o2=(e,r)=>{let t,i;for(;;){if(e.lookahead<ll){if(od(e),e.lookahead<ll&&r===ru)return Ha;if(e.lookahead===0)break}if(t=0,e.lookahead>=Kt&&(e.ins_h=ou(e,e.ins_h,e.window[e.strstart+Kt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-ll&&(e.match_length=l5(e,t)),e.match_length>=Kt)if(i=nu(e,e.strstart-e.match_start,e.match_length-Kt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Kt){e.match_length--;do e.strstart++,e.ins_h=ou(e,e.ins_h,e.window[e.strstart+Kt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ou(e,e.ins_h,e.window[e.strstart+1]);else i=nu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Ri(e,!1),e.strm.avail_out===0))return Ha}return e.insert=e.strstart<Kt-1?e.strstart:Kt-1,r===Zi?(Ri(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Ri(e,!1),e.strm.avail_out===0)?Ha:ad},ld=(e,r)=>{let t,i,l;for(;;){if(e.lookahead<ll){if(od(e),e.lookahead<ll&&r===ru)return Ha;if(e.lookahead===0)break}if(t=0,e.lookahead>=Kt&&(e.ins_h=ou(e,e.ins_h,e.window[e.strstart+Kt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Kt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-ll&&(e.match_length=l5(e,t),e.match_length<=5&&(e.strategy===oN||e.match_length===Kt&&e.strstart-e.match_start>4096)&&(e.match_length=Kt-1)),e.prev_length>=Kt&&e.match_length<=e.prev_length){l=e.strstart+e.lookahead-Kt,i=nu(e,e.strstart-1-e.prev_match,e.prev_length-Kt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=l&&(e.ins_h=ou(e,e.ins_h,e.window[e.strstart+Kt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Kt-1,e.strstart++,i&&(Ri(e,!1),e.strm.avail_out===0))return Ha}else if(e.match_available){if(i=nu(e,0,e.window[e.strstart-1]),i&&Ri(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ha}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=nu(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Kt-1?e.strstart:Kt-1,r===Zi?(Ri(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Ri(e,!1),e.strm.avail_out===0)?Ha:ad},wN=(e,r)=>{let t,i,l,f;const c=e.window;for(;;){if(e.lookahead<=au){if(od(e),e.lookahead<=au&&r===ru)return Ha;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Kt&&e.strstart>0&&(l=e.strstart-1,i=c[l],i===c[++l]&&i===c[++l]&&i===c[++l])){f=e.strstart+au;do;while(i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&l<f);e.match_length=au-(f-l),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Kt?(t=nu(e,1,e.match_length-Kt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=nu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Ri(e,!1),e.strm.avail_out===0))return Ha}return e.insert=0,r===Zi?(Ri(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Ri(e,!1),e.strm.avail_out===0)?Ha:ad},_N=(e,r)=>{let t;for(;;){if(e.lookahead===0&&(od(e),e.lookahead===0)){if(r===ru)return Ha;break}if(e.match_length=0,t=nu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Ri(e,!1),e.strm.avail_out===0))return Ha}return e.insert=0,r===Zi?(Ri(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Ri(e,!1),e.strm.avail_out===0)?Ha:ad};function sl(e,r,t,i,l){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=i,this.func=l}const Bp=[new sl(0,0,0,0,s5),new sl(4,4,8,4,o2),new sl(4,5,16,8,o2),new sl(4,6,32,32,o2),new sl(4,4,16,16,ld),new sl(8,16,32,32,ld),new sl(8,16,128,128,ld),new sl(8,32,128,256,ld),new sl(32,128,258,1024,ld),new sl(32,258,258,4096,ld)],EN=e=>{e.window_size=2*e.w_size,iu(e.head),e.max_lazy_match=Bp[e.level].max_lazy,e.good_match=Bp[e.level].good_length,e.nice_match=Bp[e.level].nice_length,e.max_chain_length=Bp[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Kt-1,e.match_available=0,e.ins_h=0};function SN(){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=mg,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 Uint16Array(gN*2),this.dyn_dtree=new Uint16Array((2*vN+1)*2),this.bl_tree=new Uint16Array((2*mN+1)*2),iu(this.dyn_ltree),iu(this.dyn_dtree),iu(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(yN+1),this.heap=new Uint16Array(2*Jb+1),iu(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Jb+1),iu(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Lp=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.status!==rd&&r.status!==e2&&r.status!==t2&&r.status!==n2&&r.status!==r2&&r.status!==a2&&r.status!==bc&&r.status!==Mp?1:0},u5=e=>{if(Lp(e))return wc(e,ol);e.total_in=e.total_out=0,e.data_type=cN;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap===2?e2:r.wrap?rd:bc,e.adler=r.wrap===2?0:1,r.last_flush=-2,J9(r),da},c5=e=>{const r=u5(e);return r===da&&EN(e.state),r},DN=(e,r)=>Lp(e)||e.state.wrap!==2?ol:(e.state.gzhead=r,da),f5=(e,r,t,i,l,f)=>{if(!e)return ol;let c=1;if(r===iN&&(r=6),i<0?(c=0,i=-i):i>15&&(c=2,i-=16),l<1||l>fN||t!==mg||i<8||i>15||r<0||r>9||f<0||f>sN||i===8&&c!==1)return wc(e,ol);i===8&&(i=9);const h=new SN;return e.state=h,h.strm=e,h.status=rd,h.wrap=c,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=l+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+Kt-1)/Kt),h.window=new Uint8Array(h.w_size*2),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<l+6,h.pending_buf_size=h.lit_bufsize*4,h.pending_buf=new Uint8Array(h.pending_buf_size),h.sym_buf=h.lit_bufsize,h.sym_end=(h.lit_bufsize-1)*3,h.level=r,h.strategy=f,h.method=t,c5(e)},kN=(e,r)=>f5(e,r,mg,dN,pN,uN),TN=(e,r)=>{if(Lp(e)||r>a5||r<0)return e?wc(e,ol):ol;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===Mp&&r!==Zi)return wc(e,e.avail_out===0?Xb:ol);const i=t.last_flush;if(t.last_flush=r,t.pending!==0){if(Oi(e),e.avail_out===0)return t.last_flush=-1,da}else if(e.avail_in===0&&o5(r)<=o5(i)&&r!==Zi)return wc(e,Xb);if(t.status===Mp&&e.avail_in!==0)return wc(e,Xb);if(t.status===rd&&t.wrap===0&&(t.status=bc),t.status===rd){let l=mg+(t.w_bits-8<<4)<<8,f=-1;if(t.strategy>=vg||t.level<2?f=0:t.level<6?f=1:t.level===6?f=2:f=3,l|=f<<6,t.strstart!==0&&(l|=xN),l+=31-l%31,Pp(t,l),t.strstart!==0&&(Pp(t,e.adler>>>16),Pp(t,e.adler&65535)),e.adler=1,t.status=bc,Oi(e),t.pending!==0)return t.last_flush=-1,da}if(t.status===e2){if(e.adler=0,fn(t,31),fn(t,139),fn(t,8),t.gzhead)fn(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),fn(t,t.gzhead.time&255),fn(t,t.gzhead.time>>8&255),fn(t,t.gzhead.time>>16&255),fn(t,t.gzhead.time>>24&255),fn(t,t.level===9?2:t.strategy>=vg||t.level<2?4:0),fn(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(fn(t,t.gzhead.extra.length&255),fn(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=Xr(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=t2;else if(fn(t,0),fn(t,0),fn(t,0),fn(t,0),fn(t,0),fn(t,t.level===9?2:t.strategy>=vg||t.level<2?4:0),fn(t,bN),t.status=bc,Oi(e),t.pending!==0)return t.last_flush=-1,da}if(t.status===t2){if(t.gzhead.extra){let l=t.pending,f=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+f>t.pending_buf_size;){let h=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+h),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex+=h,Oi(e),t.pending!==0)return t.last_flush=-1,da;l=0,f-=h}let c=new Uint8Array(t.gzhead.extra);t.pending_buf.set(c.subarray(t.gzindex,t.gzindex+f),t.pending),t.pending+=f,t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=n2}if(t.status===n2){if(t.gzhead.name){let l=t.pending,f;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),Oi(e),t.pending!==0)return t.last_flush=-1,da;l=0}t.gzindex<t.gzhead.name.length?f=t.gzhead.name.charCodeAt(t.gzindex++)&255:f=0,fn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=r2}if(t.status===r2){if(t.gzhead.comment){let l=t.pending,f;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),Oi(e),t.pending!==0)return t.last_flush=-1,da;l=0}t.gzindex<t.gzhead.comment.length?f=t.gzhead.comment.charCodeAt(t.gzindex++)&255:f=0,fn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l))}t.status=a2}if(t.status===a2){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(Oi(e),t.pending!==0))return t.last_flush=-1,da;fn(t,e.adler&255),fn(t,e.adler>>8&255),e.adler=0}if(t.status=bc,Oi(e),t.pending!==0)return t.last_flush=-1,da}if(e.avail_in!==0||t.lookahead!==0||r!==ru&&t.status!==Mp){let l=t.level===0?s5(t,r):t.strategy===vg?_N(t,r):t.strategy===lN?wN(t,r):Bp[t.level].func(t,r);if((l===Cc||l===id)&&(t.status=Mp),l===Ha||l===Cc)return e.avail_out===0&&(t.last_flush=-1),da;if(l===ad&&(r===nN?tN(t):r!==a5&&(Zb(t,0,0,!1),r===rN&&(iu(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),Oi(e),e.avail_out===0))return t.last_flush=-1,da}return r!==Zi?da:t.wrap<=0?i5:(t.wrap===2?(fn(t,e.adler&255),fn(t,e.adler>>8&255),fn(t,e.adler>>16&255),fn(t,e.adler>>24&255),fn(t,e.total_in&255),fn(t,e.total_in>>8&255),fn(t,e.total_in>>16&255),fn(t,e.total_in>>24&255)):(Pp(t,e.adler>>>16),Pp(t,e.adler&65535)),Oi(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?da:i5)},AN=e=>{if(Lp(e))return ol;const r=e.state.status;return e.state=null,r===bc?wc(e,aN):da},ON=(e,r)=>{let t=r.length;if(Lp(e))return ol;const i=e.state,l=i.wrap;if(l===2||l===1&&i.status!==rd||i.lookahead)return ol;if(l===1&&(e.adler=Np(e.adler,r,t,0)),i.wrap=0,t>=i.w_size){l===0&&(iu(i.head),i.strstart=0,i.block_start=0,i.insert=0);let m=new Uint8Array(i.w_size);m.set(r.subarray(t-i.w_size,t),0),r=m,t=i.w_size}const f=e.avail_in,c=e.next_in,h=e.input;for(e.avail_in=t,e.next_in=0,e.input=r,od(i);i.lookahead>=Kt;){let m=i.strstart,d=i.lookahead-(Kt-1);do i.ins_h=ou(i,i.ins_h,i.window[m+Kt-1]),i.prev[m&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=m,m++;while(--d);i.strstart=m,i.lookahead=Kt-1,od(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Kt-1,i.match_available=0,e.next_in=c,e.input=h,e.avail_in=f,i.wrap=l,da};var RN=kN,FN=f5,NN=c5,MN=u5,PN=DN,BN=TN,LN=AN,zN=ON,UN="pako deflate (from Nodeca project)",zp={deflateInit:RN,deflateInit2:FN,deflateReset:NN,deflateResetKeep:MN,deflateSetHeader:PN,deflate:BN,deflateEnd:LN,deflateSetDictionary:zN,deflateInfo:UN};const jN=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var IN=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const t=r.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)jN(t,i)&&(e[i]=t[i])}}return e},HN=e=>{let r=0;for(let i=0,l=e.length;i<l;i++)r+=e[i].length;const t=new Uint8Array(r);for(let i=0,l=0,f=e.length;i<f;i++){let c=e[i];t.set(c,l),l+=c.length}return t},gg={assign:IN,flattenChunks:HN};let d5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{d5=!1}const Up=new Uint8Array(256);for(let e=0;e<256;e++)Up[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Up[254]=Up[254]=1;var VN=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let r,t,i,l,f,c=e.length,h=0;for(l=0;l<c;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<c&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),h+=t<128?1:t<2048?2:t<65536?3:4;for(r=new Uint8Array(h),f=0,l=0;f<h;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<c&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),t<128?r[f++]=t:t<2048?(r[f++]=192|t>>>6,r[f++]=128|t&63):t<65536?(r[f++]=224|t>>>12,r[f++]=128|t>>>6&63,r[f++]=128|t&63):(r[f++]=240|t>>>18,r[f++]=128|t>>>12&63,r[f++]=128|t>>>6&63,r[f++]=128|t&63);return r};const $N=(e,r)=>{if(r<65534&&e.subarray&&d5)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let t="";for(let i=0;i<r;i++)t+=String.fromCharCode(e[i]);return t};var YN=(e,r)=>{const t=r||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,r));let i,l;const f=new Array(t*2);for(l=0,i=0;i<t;){let c=e[i++];if(c<128){f[l++]=c;continue}let h=Up[c];if(h>4){f[l++]=65533,i+=h-1;continue}for(c&=h===2?31:h===3?15:7;h>1&&i<t;)c=c<<6|e[i++]&63,h--;if(h>1){f[l++]=65533;continue}c<65536?f[l++]=c:(c-=65536,f[l++]=55296|c>>10&1023,f[l++]=56320|c&1023)}return $N(f,l)},qN=(e,r)=>{r=r||e.length,r>e.length&&(r=e.length);let t=r-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+Up[e[t]]>r?t:r},jp={string2buf:VN,buf2string:YN,utf8border:qN};function GN(){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}var p5=GN;const h5=Object.prototype.toString,{Z_NO_FLUSH:KN,Z_SYNC_FLUSH:WN,Z_FULL_FLUSH:QN,Z_FINISH:ZN,Z_OK:yg,Z_STREAM_END:XN,Z_DEFAULT_COMPRESSION:JN,Z_DEFAULT_STRATEGY:eM,Z_DEFLATED:tM}=xc;function Ip(e){this.options=gg.assign({level:JN,method:tM,chunkSize:16384,windowBits:15,memLevel:8,strategy:eM},e||{});let r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p5,this.strm.avail_out=0;let t=zp.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==yg)throw new Error(yc[t]);if(r.header&&zp.deflateSetHeader(this.strm,r.header),r.dictionary){let i;if(typeof r.dictionary=="string"?i=jp.string2buf(r.dictionary):h5.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,t=zp.deflateSetDictionary(this.strm,i),t!==yg)throw new Error(yc[t]);this._dict_set=!0}}Ip.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize;let l,f;if(this.ended)return!1;for(r===~~r?f=r:f=r===!0?ZN:KN,typeof e=="string"?t.input=jp.string2buf(e):h5.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(f===WN||f===QN)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(l=zp.deflate(t,f),l===XN)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),l=zp.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===yg;if(t.avail_out===0){this.onData(t.output);continue}if(f>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0},Ip.prototype.onData=function(e){this.chunks.push(e)},Ip.prototype.onEnd=function(e){e===yg&&(this.result=gg.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function l2(e,r){const t=new Ip(r);if(t.push(e,!0),t.err)throw t.msg||yc[t.err];return t.result}function nM(e,r){return r=r||{},r.raw=!0,l2(e,r)}function rM(e,r){return r=r||{},r.gzip=!0,l2(e,r)}var aM=Ip,iM=l2,oM=nM,lM=rM,sM=xc,uM={Deflate:aM,deflate:iM,deflateRaw:oM,gzip:lM,constants:sM};const xg=16209,cM=16191;var fM=function(r,t){let i,l,f,c,h,m,d,g,C,b,x,_,k,S,A,T,D,F,N,L,P,U,$,O;const z=r.state;i=r.next_in,$=r.input,l=i+(r.avail_in-5),f=r.next_out,O=r.output,c=f-(t-r.avail_out),h=f+(r.avail_out-257),m=z.dmax,d=z.wsize,g=z.whave,C=z.wnext,b=z.window,x=z.hold,_=z.bits,k=z.lencode,S=z.distcode,A=(1<<z.lenbits)-1,T=(1<<z.distbits)-1;e:do{_<15&&(x+=$[i++]<<_,_+=8,x+=$[i++]<<_,_+=8),D=k[x&A];t:for(;;){if(F=D>>>24,x>>>=F,_-=F,F=D>>>16&255,F===0)O[f++]=D&65535;else if(F&16){N=D&65535,F&=15,F&&(_<F&&(x+=$[i++]<<_,_+=8),N+=x&(1<<F)-1,x>>>=F,_-=F),_<15&&(x+=$[i++]<<_,_+=8,x+=$[i++]<<_,_+=8),D=S[x&T];n:for(;;){if(F=D>>>24,x>>>=F,_-=F,F=D>>>16&255,F&16){if(L=D&65535,F&=15,_<F&&(x+=$[i++]<<_,_+=8,_<F&&(x+=$[i++]<<_,_+=8)),L+=x&(1<<F)-1,L>m){r.msg="invalid distance too far back",z.mode=xg;break e}if(x>>>=F,_-=F,F=f-c,L>F){if(F=L-F,F>g&&z.sane){r.msg="invalid distance too far back",z.mode=xg;break e}if(P=0,U=b,C===0){if(P+=d-F,F<N){N-=F;do O[f++]=b[P++];while(--F);P=f-L,U=O}}else if(C<F){if(P+=d+C-F,F-=C,F<N){N-=F;do O[f++]=b[P++];while(--F);if(P=0,C<N){F=C,N-=F;do O[f++]=b[P++];while(--F);P=f-L,U=O}}}else if(P+=C-F,F<N){N-=F;do O[f++]=b[P++];while(--F);P=f-L,U=O}for(;N>2;)O[f++]=U[P++],O[f++]=U[P++],O[f++]=U[P++],N-=3;N&&(O[f++]=U[P++],N>1&&(O[f++]=U[P++]))}else{P=f-L;do O[f++]=O[P++],O[f++]=O[P++],O[f++]=O[P++],N-=3;while(N>2);N&&(O[f++]=O[P++],N>1&&(O[f++]=O[P++]))}}else if(F&64){r.msg="invalid distance code",z.mode=xg;break e}else{D=S[(D&65535)+(x&(1<<F)-1)];continue n}break}}else if(F&64)if(F&32){z.mode=cM;break e}else{r.msg="invalid literal/length code",z.mode=xg;break e}else{D=k[(D&65535)+(x&(1<<F)-1)];continue t}break}}while(i<l&&f<h);N=_>>3,i-=N,_-=N<<3,x&=(1<<_)-1,r.next_in=i,r.next_out=f,r.avail_in=i<l?5+(l-i):5-(i-l),r.avail_out=f<h?257+(h-f):257-(f-h),z.hold=x,z.bits=_};const sd=15,v5=852,m5=592,g5=0,s2=1,y5=2,dM=new Uint16Array([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]),pM=new Uint8Array([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]),hM=new Uint16Array([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]),vM=new Uint8Array([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]);var Hp=(e,r,t,i,l,f,c,h)=>{const m=h.bits;let d=0,g=0,C=0,b=0,x=0,_=0,k=0,S=0,A=0,T=0,D,F,N,L,P,U=null,$;const O=new Uint16Array(sd+1),z=new Uint16Array(sd+1);let j=null,H,Y,q;for(d=0;d<=sd;d++)O[d]=0;for(g=0;g<i;g++)O[r[t+g]]++;for(x=m,b=sd;b>=1&&O[b]===0;b--);if(x>b&&(x=b),b===0)return l[f++]=1<<24|64<<16|0,l[f++]=1<<24|64<<16|0,h.bits=1,0;for(C=1;C<b&&O[C]===0;C++);for(x<C&&(x=C),S=1,d=1;d<=sd;d++)if(S<<=1,S-=O[d],S<0)return-1;if(S>0&&(e===g5||b!==1))return-1;for(z[1]=0,d=1;d<sd;d++)z[d+1]=z[d]+O[d];for(g=0;g<i;g++)r[t+g]!==0&&(c[z[r[t+g]]++]=g);if(e===g5?(U=j=c,$=20):e===s2?(U=dM,j=pM,$=257):(U=hM,j=vM,$=0),T=0,g=0,d=C,P=f,_=x,k=0,N=-1,A=1<<x,L=A-1,e===s2&&A>v5||e===y5&&A>m5)return 1;for(;;){H=d-k,c[g]+1<$?(Y=0,q=c[g]):c[g]>=$?(Y=j[c[g]-$],q=U[c[g]-$]):(Y=32+64,q=0),D=1<<d-k,F=1<<_,C=F;do F-=D,l[P+(T>>k)+F]=H<<24|Y<<16|q|0;while(F!==0);for(D=1<<d-1;T&D;)D>>=1;if(D!==0?(T&=D-1,T+=D):T=0,g++,--O[d]===0){if(d===b)break;d=r[t+c[g]]}if(d>x&&(T&L)!==N){for(k===0&&(k=x),P+=C,_=d-k,S=1<<_;_+k<b&&(S-=O[_+k],!(S<=0));)_++,S<<=1;if(A+=1<<_,e===s2&&A>v5||e===y5&&A>m5)return 1;N=T&L,l[N]=x<<24|_<<16|P-f|0}}return T!==0&&(l[P+T]=d-k<<24|64<<16|0),h.bits=x,0};const mM=0,x5=1,b5=2,{Z_FINISH:C5,Z_BLOCK:gM,Z_TREES:bg,Z_OK:_c,Z_STREAM_END:yM,Z_NEED_DICT:xM,Z_STREAM_ERROR:Xi,Z_DATA_ERROR:w5,Z_MEM_ERROR:_5,Z_BUF_ERROR:bM,Z_DEFLATED:E5}=xc,Cg=16180,S5=16181,D5=16182,k5=16183,T5=16184,A5=16185,O5=16186,R5=16187,F5=16188,N5=16189,wg=16190,is=16191,u2=16192,M5=16193,c2=16194,P5=16195,B5=16196,L5=16197,z5=16198,_g=16199,Eg=16200,U5=16201,j5=16202,I5=16203,H5=16204,V5=16205,f2=16206,$5=16207,Y5=16208,er=16209,q5=16210,G5=16211,CM=852,wM=592,_M=15,K5=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function EM(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ec=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.mode<Cg||r.mode>G5?1:0},W5=e=>{if(Ec(e))return Xi;const r=e.state;return e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=Cg,r.last=0,r.havedict=0,r.flags=-1,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Int32Array(CM),r.distcode=r.distdyn=new Int32Array(wM),r.sane=1,r.back=-1,_c},Q5=e=>{if(Ec(e))return Xi;const r=e.state;return r.wsize=0,r.whave=0,r.wnext=0,W5(e)},Z5=(e,r)=>{let t;if(Ec(e))return Xi;const i=e.state;return r<0?(t=0,r=-r):(t=(r>>4)+5,r<48&&(r&=15)),r&&(r<8||r>15)?Xi:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=t,i.wbits=r,Q5(e))},X5=(e,r)=>{if(!e)return Xi;const t=new EM;e.state=t,t.strm=e,t.window=null,t.mode=Cg;const i=Z5(e,r);return i!==_c&&(e.state=null),i},SM=e=>X5(e,_M);let J5=!0,d2,p2;const DM=e=>{if(J5){d2=new Int32Array(512),p2=new Int32Array(32);let r=0;for(;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Hp(x5,e.lens,0,288,d2,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Hp(b5,e.lens,0,32,p2,0,e.work,{bits:5}),J5=!1}e.lencode=d2,e.lenbits=9,e.distcode=p2,e.distbits=5},e6=(e,r,t,i)=>{let l;const f=e.state;return f.window===null&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new Uint8Array(f.wsize)),i>=f.wsize?(f.window.set(r.subarray(t-f.wsize,t),0),f.wnext=0,f.whave=f.wsize):(l=f.wsize-f.wnext,l>i&&(l=i),f.window.set(r.subarray(t-i,t-i+l),f.wnext),i-=l,i?(f.window.set(r.subarray(t-i,t),0),f.wnext=i,f.whave=f.wsize):(f.wnext+=l,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=l))),0},kM=(e,r)=>{let t,i,l,f,c,h,m,d,g,C,b,x,_,k,S=0,A,T,D,F,N,L,P,U;const $=new Uint8Array(4);let O,z;const j=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ec(e)||!e.output||!e.input&&e.avail_in!==0)return Xi;t=e.state,t.mode===is&&(t.mode=u2),c=e.next_out,l=e.output,m=e.avail_out,f=e.next_in,i=e.input,h=e.avail_in,d=t.hold,g=t.bits,C=h,b=m,U=_c;e:for(;;)switch(t.mode){case Cg:if(t.wrap===0){t.mode=u2;break}for(;g<16;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(t.wrap&2&&d===35615){t.wbits===0&&(t.wbits=15),t.check=0,$[0]=d&255,$[1]=d>>>8&255,t.check=Xr(t.check,$,2,0),d=0,g=0,t.mode=S5;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){e.msg="incorrect header check",t.mode=er;break}if((d&15)!==E5){e.msg="unknown compression method",t.mode=er;break}if(d>>>=4,g-=4,P=(d&15)+8,t.wbits===0&&(t.wbits=P),P>15||P>t.wbits){e.msg="invalid window size",t.mode=er;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=d&512?N5:is,d=0,g=0;break;case S5:for(;g<16;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(t.flags=d,(t.flags&255)!==E5){e.msg="unknown compression method",t.mode=er;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=er;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&t.wrap&4&&($[0]=d&255,$[1]=d>>>8&255,t.check=Xr(t.check,$,2,0)),d=0,g=0,t.mode=D5;case D5:for(;g<32;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}t.head&&(t.head.time=d),t.flags&512&&t.wrap&4&&($[0]=d&255,$[1]=d>>>8&255,$[2]=d>>>16&255,$[3]=d>>>24&255,t.check=Xr(t.check,$,4,0)),d=0,g=0,t.mode=k5;case k5:for(;g<16;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}t.head&&(t.head.xflags=d&255,t.head.os=d>>8),t.flags&512&&t.wrap&4&&($[0]=d&255,$[1]=d>>>8&255,t.check=Xr(t.check,$,2,0)),d=0,g=0,t.mode=T5;case T5:if(t.flags&1024){for(;g<16;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}t.length=d,t.head&&(t.head.extra_len=d),t.flags&512&&t.wrap&4&&($[0]=d&255,$[1]=d>>>8&255,t.check=Xr(t.check,$,2,0)),d=0,g=0}else t.head&&(t.head.extra=null);t.mode=A5;case A5:if(t.flags&1024&&(x=t.length,x>h&&(x=h),x&&(t.head&&(P=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(f,f+x),P)),t.flags&512&&t.wrap&4&&(t.check=Xr(t.check,i,x,f)),h-=x,f+=x,t.length-=x),t.length))break e;t.length=0,t.mode=O5;case O5:if(t.flags&2048){if(h===0)break e;x=0;do P=i[f+x++],t.head&&P&&t.length<65536&&(t.head.name+=String.fromCharCode(P));while(P&&x<h);if(t.flags&512&&t.wrap&4&&(t.check=Xr(t.check,i,x,f)),h-=x,f+=x,P)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=R5;case R5:if(t.flags&4096){if(h===0)break e;x=0;do P=i[f+x++],t.head&&P&&t.length<65536&&(t.head.comment+=String.fromCharCode(P));while(P&&x<h);if(t.flags&512&&t.wrap&4&&(t.check=Xr(t.check,i,x,f)),h-=x,f+=x,P)break e}else t.head&&(t.head.comment=null);t.mode=F5;case F5:if(t.flags&512){for(;g<16;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(t.wrap&4&&d!==(t.check&65535)){e.msg="header crc mismatch",t.mode=er;break}d=0,g=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=is;break;case N5:for(;g<32;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}e.adler=t.check=K5(d),d=0,g=0,t.mode=wg;case wg:if(t.havedict===0)return e.next_out=c,e.avail_out=m,e.next_in=f,e.avail_in=h,t.hold=d,t.bits=g,xM;e.adler=t.check=1,t.mode=is;case is:if(r===gM||r===bg)break e;case u2:if(t.last){d>>>=g&7,g-=g&7,t.mode=f2;break}for(;g<3;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}switch(t.last=d&1,d>>>=1,g-=1,d&3){case 0:t.mode=M5;break;case 1:if(DM(t),t.mode=_g,r===bg){d>>>=2,g-=2;break e}break;case 2:t.mode=B5;break;case 3:e.msg="invalid block type",t.mode=er}d>>>=2,g-=2;break;case M5:for(d>>>=g&7,g-=g&7;g<32;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if((d&65535)!==(d>>>16^65535)){e.msg="invalid stored block lengths",t.mode=er;break}if(t.length=d&65535,d=0,g=0,t.mode=c2,r===bg)break e;case c2:t.mode=P5;case P5:if(x=t.length,x){if(x>h&&(x=h),x>m&&(x=m),x===0)break e;l.set(i.subarray(f,f+x),c),h-=x,f+=x,m-=x,c+=x,t.length-=x;break}t.mode=is;break;case B5:for(;g<14;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(t.nlen=(d&31)+257,d>>>=5,g-=5,t.ndist=(d&31)+1,d>>>=5,g-=5,t.ncode=(d&15)+4,d>>>=4,g-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=er;break}t.have=0,t.mode=L5;case L5:for(;t.have<t.ncode;){for(;g<3;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}t.lens[j[t.have++]]=d&7,d>>>=3,g-=3}for(;t.have<19;)t.lens[j[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,O={bits:t.lenbits},U=Hp(mM,t.lens,0,19,t.lencode,0,t.work,O),t.lenbits=O.bits,U){e.msg="invalid code lengths set",t.mode=er;break}t.have=0,t.mode=z5;case z5:for(;t.have<t.nlen+t.ndist;){for(;S=t.lencode[d&(1<<t.lenbits)-1],A=S>>>24,T=S>>>16&255,D=S&65535,!(A<=g);){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(D<16)d>>>=A,g-=A,t.lens[t.have++]=D;else{if(D===16){for(z=A+2;g<z;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(d>>>=A,g-=A,t.have===0){e.msg="invalid bit length repeat",t.mode=er;break}P=t.lens[t.have-1],x=3+(d&3),d>>>=2,g-=2}else if(D===17){for(z=A+3;g<z;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}d>>>=A,g-=A,P=0,x=3+(d&7),d>>>=3,g-=3}else{for(z=A+7;g<z;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}d>>>=A,g-=A,P=0,x=11+(d&127),d>>>=7,g-=7}if(t.have+x>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=er;break}for(;x--;)t.lens[t.have++]=P}}if(t.mode===er)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=er;break}if(t.lenbits=9,O={bits:t.lenbits},U=Hp(x5,t.lens,0,t.nlen,t.lencode,0,t.work,O),t.lenbits=O.bits,U){e.msg="invalid literal/lengths set",t.mode=er;break}if(t.distbits=6,t.distcode=t.distdyn,O={bits:t.distbits},U=Hp(b5,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,O),t.distbits=O.bits,U){e.msg="invalid distances set",t.mode=er;break}if(t.mode=_g,r===bg)break e;case _g:t.mode=Eg;case Eg:if(h>=6&&m>=258){e.next_out=c,e.avail_out=m,e.next_in=f,e.avail_in=h,t.hold=d,t.bits=g,fM(e,b),c=e.next_out,l=e.output,m=e.avail_out,f=e.next_in,i=e.input,h=e.avail_in,d=t.hold,g=t.bits,t.mode===is&&(t.back=-1);break}for(t.back=0;S=t.lencode[d&(1<<t.lenbits)-1],A=S>>>24,T=S>>>16&255,D=S&65535,!(A<=g);){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(T&&!(T&240)){for(F=A,N=T,L=D;S=t.lencode[L+((d&(1<<F+N)-1)>>F)],A=S>>>24,T=S>>>16&255,D=S&65535,!(F+A<=g);){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}d>>>=F,g-=F,t.back+=F}if(d>>>=A,g-=A,t.back+=A,t.length=D,T===0){t.mode=V5;break}if(T&32){t.back=-1,t.mode=is;break}if(T&64){e.msg="invalid literal/length code",t.mode=er;break}t.extra=T&15,t.mode=U5;case U5:if(t.extra){for(z=t.extra;g<z;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,g-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=j5;case j5:for(;S=t.distcode[d&(1<<t.distbits)-1],A=S>>>24,T=S>>>16&255,D=S&65535,!(A<=g);){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(!(T&240)){for(F=A,N=T,L=D;S=t.distcode[L+((d&(1<<F+N)-1)>>F)],A=S>>>24,T=S>>>16&255,D=S&65535,!(F+A<=g);){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}d>>>=F,g-=F,t.back+=F}if(d>>>=A,g-=A,t.back+=A,T&64){e.msg="invalid distance code",t.mode=er;break}t.offset=D,t.extra=T&15,t.mode=I5;case I5:if(t.extra){for(z=t.extra;g<z;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,g-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=er;break}t.mode=H5;case H5:if(m===0)break e;if(x=b-m,t.offset>x){if(x=t.offset-x,x>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=er;break}x>t.wnext?(x-=t.wnext,_=t.wsize-x):_=t.wnext-x,x>t.length&&(x=t.length),k=t.window}else k=l,_=c-t.offset,x=t.length;x>m&&(x=m),m-=x,t.length-=x;do l[c++]=k[_++];while(--x);t.length===0&&(t.mode=Eg);break;case V5:if(m===0)break e;l[c++]=t.length,m--,t.mode=Eg;break;case f2:if(t.wrap){for(;g<32;){if(h===0)break e;h--,d|=i[f++]<<g,g+=8}if(b-=m,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Xr(t.check,l,b,c-b):Np(t.check,l,b,c-b)),b=m,t.wrap&4&&(t.flags?d:K5(d))!==t.check){e.msg="incorrect data check",t.mode=er;break}d=0,g=0}t.mode=$5;case $5:if(t.wrap&&t.flags){for(;g<32;){if(h===0)break e;h--,d+=i[f++]<<g,g+=8}if(t.wrap&4&&d!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=er;break}d=0,g=0}t.mode=Y5;case Y5:U=yM;break e;case er:U=w5;break e;case q5:return _5;case G5:default:return Xi}return e.next_out=c,e.avail_out=m,e.next_in=f,e.avail_in=h,t.hold=d,t.bits=g,(t.wsize||b!==e.avail_out&&t.mode<er&&(t.mode<f2||r!==C5))&&e6(e,e.output,e.next_out,b-e.avail_out),C-=e.avail_in,b-=e.avail_out,e.total_in+=C,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Xr(t.check,l,b,e.next_out-b):Np(t.check,l,b,e.next_out-b)),e.data_type=t.bits+(t.last?64:0)+(t.mode===is?128:0)+(t.mode===_g||t.mode===c2?256:0),(C===0&&b===0||r===C5)&&U===_c&&(U=bM),U},TM=e=>{if(Ec(e))return Xi;let r=e.state;return r.window&&(r.window=null),e.state=null,_c},AM=(e,r)=>{if(Ec(e))return Xi;const t=e.state;return t.wrap&2?(t.head=r,r.done=!1,_c):Xi},OM=(e,r)=>{const t=r.length;let i,l,f;return Ec(e)||(i=e.state,i.wrap!==0&&i.mode!==wg)?Xi:i.mode===wg&&(l=1,l=Np(l,r,t,0),l!==i.check)?w5:(f=e6(e,r,t,t),f?(i.mode=q5,_5):(i.havedict=1,_c))};var RM=Q5,FM=Z5,NM=W5,MM=SM,PM=X5,BM=kM,LM=TM,zM=AM,UM=OM,jM="pako inflate (from Nodeca project)",os={inflateReset:RM,inflateReset2:FM,inflateResetKeep:NM,inflateInit:MM,inflateInit2:PM,inflate:BM,inflateEnd:LM,inflateGetHeader:zM,inflateSetDictionary:UM,inflateInfo:jM};function IM(){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}var HM=IM;const t6=Object.prototype.toString,{Z_NO_FLUSH:VM,Z_FINISH:$M,Z_OK:Vp,Z_STREAM_END:h2,Z_NEED_DICT:v2,Z_STREAM_ERROR:YM,Z_DATA_ERROR:n6,Z_MEM_ERROR:qM}=xc;function $p(e){this.options=gg.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p5,this.strm.avail_out=0;let t=os.inflateInit2(this.strm,r.windowBits);if(t!==Vp)throw new Error(yc[t]);if(this.header=new HM,os.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=jp.string2buf(r.dictionary):t6.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=os.inflateSetDictionary(this.strm,r.dictionary),t!==Vp)))throw new Error(yc[t])}$p.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize,l=this.options.dictionary;let f,c,h;if(this.ended)return!1;for(r===~~r?c=r:c=r===!0?$M:VM,t6.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),f=os.inflate(t,c),f===v2&&l&&(f=os.inflateSetDictionary(t,l),f===Vp?f=os.inflate(t,c):f===n6&&(f=v2));t.avail_in>0&&f===h2&&t.state.wrap>0&&e[t.next_in]!==0;)os.inflateReset(t),f=os.inflate(t,c);switch(f){case YM:case n6:case v2:case qM:return this.onEnd(f),this.ended=!0,!1}if(h=t.avail_out,t.next_out&&(t.avail_out===0||f===h2))if(this.options.to==="string"){let m=jp.utf8border(t.output,t.next_out),d=t.next_out-m,g=jp.buf2string(t.output,m);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(m,m+d),0),this.onData(g)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(f===Vp&&h===0)){if(f===h2)return f=os.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,!0;if(t.avail_in===0)break}}return!0},$p.prototype.onData=function(e){this.chunks.push(e)},$p.prototype.onEnd=function(e){e===Vp&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=gg.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function m2(e,r){const t=new $p(r);if(t.push(e),t.err)throw t.msg||yc[t.err];return t.result}function GM(e,r){return r=r||{},r.raw=!0,m2(e,r)}var KM=$p,WM=m2,QM=GM,ZM=m2,XM=xc,JM={Inflate:KM,inflate:WM,inflateRaw:QM,ungzip:ZM,constants:XM};const{Deflate:eP,deflate:tP,deflateRaw:nP,gzip:rP}=uM,{Inflate:aP,inflate:iP,inflateRaw:oP,ungzip:lP}=JM;var sP=eP,uP=tP,cP=nP,fP=rP,dP=aP,pP=iP,hP=oP,vP=lP,mP=xc,gP={Deflate:sP,deflate:uP,deflateRaw:cP,gzip:fP,Inflate:dP,inflate:pP,inflateRaw:hP,ungzip:vP,constants:mP},Le={};Le.toRGBA8=function(e){var r=e.width,t=e.height;if(e.tabs.acTL==null)return[Le.toRGBA8.decodeImage(e.data,r,t,e).buffer];var i=[];e.frames[0].data==null&&(e.frames[0].data=e.data);for(var l=r*t*4,f=new Uint8Array(l),c=new Uint8Array(l),h=new Uint8Array(l),m=0;m<e.frames.length;m++){var d=e.frames[m],g=d.rect.x,C=d.rect.y,b=d.rect.width,x=d.rect.height,_=Le.toRGBA8.decodeImage(d.data,b,x,e);if(m!=0)for(var k=0;k<l;k++)h[k]=f[k];if(d.blend==0?Le._copyTile(_,b,x,f,r,t,g,C,0):d.blend==1&&Le._copyTile(_,b,x,f,r,t,g,C,1),i.push(f.buffer.slice(0)),d.dispose!=0){if(d.dispose==1)Le._copyTile(c,b,x,f,r,t,g,C,0);else if(d.dispose==2)for(var k=0;k<l;k++)f[k]=h[k]}}return i},Le.toRGBA8.decodeImage=function(e,r,t,i){var l=r*t,f=Le.decode._getBPP(i),c=Math.ceil(r*f/8),h=new Uint8Array(l*4),m=new Uint32Array(h.buffer),d=i.ctype,g=i.depth,C=Le._bin.readUshort;if(d==6){var b=l<<2;if(g==8)for(var x=0;x<b;x+=4)h[x]=e[x],h[x+1]=e[x+1],h[x+2]=e[x+2],h[x+3]=e[x+3];if(g==16)for(var x=0;x<b;x++)h[x]=e[x<<1]}else if(d==2){var _=i.tabs.tRNS;if(_==null){if(g==8)for(var x=0;x<l;x++){var k=x*3;m[x]=255<<24|e[k+2]<<16|e[k+1]<<8|e[k]}if(g==16)for(var x=0;x<l;x++){var k=x*6;m[x]=255<<24|e[k+4]<<16|e[k+2]<<8|e[k]}}else{var S=_[0],A=_[1],T=_[2];if(g==8)for(var x=0;x<l;x++){var D=x<<2,k=x*3;m[x]=255<<24|e[k+2]<<16|e[k+1]<<8|e[k],e[k]==S&&e[k+1]==A&&e[k+2]==T&&(h[D+3]=0)}if(g==16)for(var x=0;x<l;x++){var D=x<<2,k=x*6;m[x]=255<<24|e[k+4]<<16|e[k+2]<<8|e[k],C(e,k)==S&&C(e,k+2)==A&&C(e,k+4)==T&&(h[D+3]=0)}}}else if(d==3){var F=i.tabs.PLTE,N=i.tabs.tRNS,L=N?N.length:0;if(g==1)for(var P=0;P<t;P++)for(var U=P*c,$=P*r,x=0;x<r;x++){var D=$+x<<2,O=e[U+(x>>3)]>>7-((x&7)<<0)&1,z=3*O;h[D]=F[z],h[D+1]=F[z+1],h[D+2]=F[z+2],h[D+3]=O<L?N[O]:255}if(g==2)for(var P=0;P<t;P++)for(var U=P*c,$=P*r,x=0;x<r;x++){var D=$+x<<2,O=e[U+(x>>2)]>>6-((x&3)<<1)&3,z=3*O;h[D]=F[z],h[D+1]=F[z+1],h[D+2]=F[z+2],h[D+3]=O<L?N[O]:255}if(g==4)for(var P=0;P<t;P++)for(var U=P*c,$=P*r,x=0;x<r;x++){var D=$+x<<2,O=e[U+(x>>1)]>>4-((x&1)<<2)&15,z=3*O;h[D]=F[z],h[D+1]=F[z+1],h[D+2]=F[z+2],h[D+3]=O<L?N[O]:255}if(g==8)for(var x=0;x<l;x++){var D=x<<2,O=e[x],z=3*O;h[D]=F[z],h[D+1]=F[z+1],h[D+2]=F[z+2],h[D+3]=O<L?N[O]:255}}else if(d==4){if(g==8)for(var x=0;x<l;x++){var D=x<<2,j=x<<1,H=e[j];h[D]=H,h[D+1]=H,h[D+2]=H,h[D+3]=e[j+1]}if(g==16)for(var x=0;x<l;x++){var D=x<<2,j=x<<2,H=e[j];h[D]=H,h[D+1]=H,h[D+2]=H,h[D+3]=e[j+2]}}else if(d==0)for(var S=i.tabs.tRNS?i.tabs.tRNS:-1,P=0;P<t;P++){var Y=P*c,q=P*r;if(g==1)for(var X=0;X<r;X++){var H=255*(e[Y+(X>>>3)]>>>7-(X&7)&1),ne=H==S*255?0:255;m[q+X]=ne<<24|H<<16|H<<8|H}else if(g==2)for(var X=0;X<r;X++){var H=85*(e[Y+(X>>>2)]>>>6-((X&3)<<1)&3),ne=H==S*85?0:255;m[q+X]=ne<<24|H<<16|H<<8|H}else if(g==4)for(var X=0;X<r;X++){var H=17*(e[Y+(X>>>1)]>>>4-((X&1)<<2)&15),ne=H==S*17?0:255;m[q+X]=ne<<24|H<<16|H<<8|H}else if(g==8)for(var X=0;X<r;X++){var H=e[Y+X],ne=H==S?0:255;m[q+X]=ne<<24|H<<16|H<<8|H}else if(g==16)for(var X=0;X<r;X++){var H=e[Y+(X<<1)],ne=C(e,Y+(X<<x))==S?0:255;m[q+X]=ne<<24|H<<16|H<<8|H}}return h},Le.decode=function(e){for(var r=new Uint8Array(e),t=8,i=Le._bin,l=i.readUshort,f=i.readUint,c={tabs:{},frames:[]},h=new Uint8Array(r.length),m=0,d,g=0,C=[137,80,78,71,13,10,26,10],b=0;b<8;b++)if(r[b]!=C[b])throw"The input is not a PNG file!";for(;t<r.length;){var x=i.readUint(r,t);t+=4;var _=i.readASCII(r,t,4);if(t+=4,_=="IHDR")Le.decode._IHDR(r,t,c);else if(_=="CgBI")c.tabs[_]=r.slice(t,t+4);else if(_=="IDAT"){for(var b=0;b<x;b++)h[m+b]=r[t+b];m+=x}else if(_=="acTL")c.tabs[_]={num_frames:f(r,t),num_plays:f(r,t+4)},d=new Uint8Array(r.length);else if(_=="fcTL"){if(g!=0){var k=c.frames[c.frames.length-1];k.data=Le.decode._decompress(c,d.slice(0,g),k.rect.width,k.rect.height),g=0}var S={x:f(r,t+12),y:f(r,t+16),width:f(r,t+4),height:f(r,t+8)},A=l(r,t+22);A=l(r,t+20)/(A==0?100:A);var T={rect:S,delay:Math.round(A*1e3),dispose:r[t+24],blend:r[t+25]};c.frames.push(T)}else if(_=="fdAT"){for(var b=0;b<x-4;b++)d[g+b]=r[t+b+4];g+=x-4}else if(_=="pHYs")c.tabs[_]=[i.readUint(r,t),i.readUint(r,t+4),r[t+8]];else if(_=="cHRM"){c.tabs[_]=[];for(var b=0;b<8;b++)c.tabs[_].push(i.readUint(r,t+b*4))}else if(_=="tEXt"||_=="zTXt"){c.tabs[_]==null&&(c.tabs[_]={});var D=i.nextZero(r,t),F=i.readASCII(r,t,D-t),N,L=t+x-D-1;if(_=="tEXt")N=i.readASCII(r,D+1,L);else{var P=Le.decode._inflate(r.slice(D+2,D+2+L));N=i.readUTF8(P,0,P.length)}c.tabs[_][F]=N}else if(_=="iTXt"){c.tabs[_]==null&&(c.tabs[_]={});var D=0,U=t;D=i.nextZero(r,U);var F=i.readASCII(r,U,D-U);U=D+1;var $=r[U];r[U+1],U+=2,D=i.nextZero(r,U),i.readASCII(r,U,D-U),U=D+1,D=i.nextZero(r,U),i.readUTF8(r,U,D-U),U=D+1;var N,L=x-(U-t);if($==0)N=i.readUTF8(r,U,L);else{var P=Le.decode._inflate(r.slice(U,U+L));N=i.readUTF8(P,0,P.length)}c.tabs[_][F]=N}else if(_=="PLTE")c.tabs[_]=i.readBytes(r,t,x);else if(_=="hIST"){var O=c.tabs.PLTE.length/3;c.tabs[_]=[];for(var b=0;b<O;b++)c.tabs[_].push(l(r,t+b*2))}else if(_=="tRNS")c.ctype==3?c.tabs[_]=i.readBytes(r,t,x):c.ctype==0?c.tabs[_]=l(r,t):c.ctype==2&&(c.tabs[_]=[l(r,t),l(r,t+2),l(r,t+4)]);else if(_=="gAMA")c.tabs[_]=i.readUint(r,t)/1e5;else if(_=="sRGB")c.tabs[_]=r[t];else if(_=="bKGD")c.ctype==0||c.ctype==4?c.tabs[_]=[l(r,t)]:c.ctype==2||c.ctype==6?c.tabs[_]=[l(r,t),l(r,t+2),l(r,t+4)]:c.ctype==3&&(c.tabs[_]=r[t]);else if(_=="IEND")break;t+=x,i.readUint(r,t),t+=4}if(g!=0){var k=c.frames[c.frames.length-1];k.data=Le.decode._decompress(c,d.slice(0,g),k.rect.width,k.rect.height),g=0}return c.data=Le.decode._decompress(c,h,c.width,c.height),delete c.compress,delete c.interlace,delete c.filter,c},Le.decode._decompress=function(e,r,t,i){var l=Le.decode._getBPP(e),f=Math.ceil(t*l/8),c=new Uint8Array((f+1+e.interlace)*i);return e.tabs.CgBI?r=Le.inflateRaw(r,c):r=Le.decode._inflate(r,c),e.interlace==0?r=Le.decode._filterZero(r,e,0,t,i):e.interlace==1&&(r=Le.decode._readInterlace(r,e)),r},Le.decode._inflate=function(e,r){var t=Le.inflateRaw(new Uint8Array(e.buffer,2,e.length-6),r);return t},Le.inflateRaw=function(){var e={};return e.H={},e.H.N=function(r,t){var i=Uint8Array,l=0,f=0,c=0,h=0,m=0,d=0,g=0,C=0,b=0,x,_;if(r[0]==3&&r[1]==0)return t||new i(0);var k=e.H,S=k.b,A=k.e,T=k.R,D=k.n,F=k.A,N=k.Z,L=k.m,P=t==null;for(P&&(t=new i(r.length>>>2<<3));l==0;){if(l=S(r,b,1),f=S(r,b+1,2),b+=3,f==0){b&7&&(b+=8-(b&7));var U=(b>>>3)+4,$=r[U-4]|r[U-3]<<8;P&&(t=e.H.W(t,C+$)),t.set(new i(r.buffer,r.byteOffset+U,$),C),b=U+$<<3,C+=$;continue}if(P&&(t=e.H.W(t,C+(1<<17))),f==1&&(x=L.J,_=L.h,d=(1<<9)-1,g=(1<<5)-1),f==2){c=A(r,b,5)+257,h=A(r,b+5,5)+1,m=A(r,b+10,4)+4,b+=14;for(var O=1,z=0;z<38;z+=2)L.Q[z]=0,L.Q[z+1]=0;for(var z=0;z<m;z++){var j=A(r,b+z*3,3);L.Q[(L.X[z]<<1)+1]=j,j>O&&(O=j)}b+=3*m,D(L.Q,O),F(L.Q,O,L.u),x=L.w,_=L.d,b=T(L.u,(1<<O)-1,c+h,r,b,L.v);var H=k.V(L.v,0,c,L.C);d=(1<<H)-1;var Y=k.V(L.v,c,h,L.D);g=(1<<Y)-1,D(L.C,H),F(L.C,H,x),D(L.D,Y),F(L.D,Y,_)}for(;;){var q=x[N(r,b)&d];b+=q&15;var X=q>>>4;if(!(X>>>8))t[C++]=X;else{if(X==256)break;var ne=C+X-254;if(X>264){var G=L.q[X-257];ne=C+(G>>>3)+A(r,b,G&7),b+=G&7}var ee=_[N(r,b)&g];b+=ee&15;var Z=ee>>>4,V=L.c[Z],te=(V>>>4)+S(r,b,V&15);for(b+=V&15;C<ne;)t[C]=t[C++-te],t[C]=t[C++-te],t[C]=t[C++-te],t[C]=t[C++-te];C=ne}}}return t.length==C?t:t.slice(0,C)},e.H.W=function(r,t){var i=r.length;if(t<=i)return r;var l=new Uint8Array(i<<1);return l.set(r,0),l},e.H.R=function(r,t,i,l,f,c){for(var h=e.H.e,m=e.H.Z,d=0;d<i;){var g=r[m(l,f)&t];f+=g&15;var C=g>>>4;if(C<=15)c[d]=C,d++;else{var b=0,x=0;C==16?(x=3+h(l,f,2),f+=2,b=c[d-1]):C==17?(x=3+h(l,f,3),f+=3):C==18&&(x=11+h(l,f,7),f+=7);for(var _=d+x;d<_;)c[d]=b,d++}}return f},e.H.V=function(r,t,i,l){for(var f=0,c=0,h=l.length>>>1;c<i;){var m=r[c+t];l[c<<1]=0,l[(c<<1)+1]=m,m>f&&(f=m),c++}for(;c<h;)l[c<<1]=0,l[(c<<1)+1]=0,c++;return f},e.H.n=function(r,t){for(var i=e.H.m,l=r.length,f,c,h,m,d,g=i.j,m=0;m<=t;m++)g[m]=0;for(m=1;m<l;m+=2)g[r[m]]++;var C=i.K;for(f=0,g[0]=0,c=1;c<=t;c++)f=f+g[c-1]<<1,C[c]=f;for(h=0;h<l;h+=2)d=r[h+1],d!=0&&(r[h]=C[d],C[d]++)},e.H.A=function(r,t,i){for(var l=r.length,f=e.H.m,c=f.r,h=0;h<l;h+=2)if(r[h+1]!=0)for(var m=h>>1,d=r[h+1],g=m<<4|d,C=t-d,b=r[h]<<C,x=b+(1<<C);b!=x;){var _=c[b]>>>15-t;i[_]=g,b++}},e.H.l=function(r,t){for(var i=e.H.m.r,l=15-t,f=0;f<r.length;f+=2){var c=r[f]<<t-r[f+1];r[f]=i[c]>>>l}},e.H.M=function(r,t,i){i=i<<(t&7);var l=t>>>3;r[l]|=i,r[l+1]|=i>>>8},e.H.I=function(r,t,i){i=i<<(t&7);var l=t>>>3;r[l]|=i,r[l+1]|=i>>>8,r[l+2]|=i>>>16},e.H.e=function(r,t,i){return(r[t>>>3]|r[(t>>>3)+1]<<8)>>>(t&7)&(1<<i)-1},e.H.b=function(r,t,i){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16)>>>(t&7)&(1<<i)-1},e.H.Z=function(r,t){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16)>>>(t&7)},e.H.i=function(r,t){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16|r[(t>>>3)+3]<<24)>>>(t&7)},e.H.m=function(){var r=Uint16Array,t=Uint32Array;return{K:new r(16),j:new r(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[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,999,999,999],T:[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,0,0,0],q:new r(32),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,65535,65535],z:[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,0,0],c:new t(32),J:new r(512),_:[],h:new r(32),$:[],w:new r(32768),C:[],v:[],d:new r(32768),D:[],u:new r(512),Q:[],r:new r(1<<15),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new r(1<<16),g:new r(1<<15)}}(),function(){for(var r=e.H.m,t=1<<15,i=0;i<t;i++){var l=i;l=(l&2863311530)>>>1|(l&1431655765)<<1,l=(l&3435973836)>>>2|(l&858993459)<<2,l=(l&4042322160)>>>4|(l&252645135)<<4,l=(l&4278255360)>>>8|(l&16711935)<<8,r.r[i]=(l>>>16|l<<16)>>>17}function f(c,h,m){for(;h--!=0;)c.push(0,m)}for(var i=0;i<32;i++)r.q[i]=r.S[i]<<3|r.T[i],r.c[i]=r.p[i]<<4|r.z[i];f(r._,144,8),f(r._,255-143,9),f(r._,279-255,7),f(r._,287-279,8),e.H.n(r._,9),e.H.A(r._,9,r.J),e.H.l(r._,9),f(r.$,32,5),e.H.n(r.$,5),e.H.A(r.$,5,r.h),e.H.l(r.$,5),f(r.Q,19,0),f(r.C,286,0),f(r.D,30,0),f(r.v,320,0)}(),e.H.N}(),Le.decode._readInterlace=function(e,r){for(var t=r.width,i=r.height,l=Le.decode._getBPP(r),f=l>>3,c=Math.ceil(t*l/8),h=new Uint8Array(i*c),m=0,d=[0,0,4,0,2,0,1],g=[0,4,0,2,0,1,0],C=[8,8,8,4,4,2,2],b=[8,8,4,4,2,2,1],x=0;x<7;){for(var _=C[x],k=b[x],S=0,A=0,T=d[x];T<i;)T+=_,A++;for(var D=g[x];D<t;)D+=k,S++;var F=Math.ceil(S*l/8);Le.decode._filterZero(e,r,m,S,A);for(var N=0,L=d[x];L<i;){for(var P=g[x],U=m+N*F<<3;P<t;){if(l==1){var $=e[U>>3];$=$>>7-(U&7)&1,h[L*c+(P>>3)]|=$<<7-((P&7)<<0)}if(l==2){var $=e[U>>3];$=$>>6-(U&7)&3,h[L*c+(P>>2)]|=$<<6-((P&3)<<1)}if(l==4){var $=e[U>>3];$=$>>4-(U&7)&15,h[L*c+(P>>1)]|=$<<4-((P&1)<<2)}if(l>=8)for(var O=L*c+P*f,z=0;z<f;z++)h[O+z]=e[(U>>3)+z];U+=l,P+=k}N++,L+=_}S*A!=0&&(m+=A*(1+F)),x=x+1}return h},Le.decode._getBPP=function(e){var r=[1,null,3,1,2,null,4][e.ctype];return r*e.depth},Le.decode._filterZero=function(e,r,t,i,l){var f=Le.decode._getBPP(r),c=Math.ceil(i*f/8),h=Le.decode._paeth;f=Math.ceil(f/8);var m=0,d=1,g=e[t],C=0;if(g>1&&(e[t]=[0,0,1][g-2]),g==3)for(C=f;C<c;C++)e[C+1]=e[C+1]+(e[C+1-f]>>>1)&255;for(var b=0;b<l;b++)if(m=t+b*c,d=m+b+1,g=e[d-1],C=0,g==0)for(;C<c;C++)e[m+C]=e[d+C];else if(g==1){for(;C<f;C++)e[m+C]=e[d+C];for(;C<c;C++)e[m+C]=e[d+C]+e[m+C-f]}else if(g==2)for(;C<c;C++)e[m+C]=e[d+C]+e[m+C-c];else if(g==3){for(;C<f;C++)e[m+C]=e[d+C]+(e[m+C-c]>>>1);for(;C<c;C++)e[m+C]=e[d+C]+(e[m+C-c]+e[m+C-f]>>>1)}else{for(;C<f;C++)e[m+C]=e[d+C]+h(0,e[m+C-c],0);for(;C<c;C++)e[m+C]=e[d+C]+h(e[m+C-f],e[m+C-c],e[m+C-f-c])}return e},Le.decode._paeth=function(e,r,t){var i=e+r-t,l=i-e,f=i-r,c=i-t;return l*l<=f*f&&l*l<=c*c?e:f*f<=c*c?r:t},Le.decode._IHDR=function(e,r,t){var i=Le._bin;t.width=i.readUint(e,r),r+=4,t.height=i.readUint(e,r),r+=4,t.depth=e[r],r++,t.ctype=e[r],r++,t.compress=e[r],r++,t.filter=e[r],r++,t.interlace=e[r],r++},Le._bin={nextZero:function(e,r){for(;e[r]!=0;)r++;return r},readUshort:function(e,r){return e[r]<<8|e[r+1]},writeUshort:function(e,r,t){e[r]=t>>8&255,e[r+1]=t&255},readUint:function(e,r){return e[r]*(256*256*256)+(e[r+1]<<16|e[r+2]<<8|e[r+3])},writeUint:function(e,r,t){e[r]=t>>24&255,e[r+1]=t>>16&255,e[r+2]=t>>8&255,e[r+3]=t&255},readASCII:function(e,r,t){for(var i="",l=0;l<t;l++)i+=String.fromCharCode(e[r+l]);return i},writeASCII:function(e,r,t){for(var i=0;i<t.length;i++)e[r+i]=t.charCodeAt(i)},readBytes:function(e,r,t){for(var i=[],l=0;l<t;l++)i.push(e[r+l]);return i},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,r,t){for(var i="",l,f=0;f<t;f++)i+="%"+Le._bin.pad(e[r+f].toString(16));try{l=decodeURIComponent(i)}catch{return Le._bin.readASCII(e,r,t)}return l}},Le._copyTile=function(e,r,t,i,l,f,c,h,m){for(var d=Math.min(r,l),g=Math.min(t,f),C=0,b=0,x=0;x<g;x++)for(var _=0;_<d;_++)if(c>=0&&h>=0?(C=x*r+_<<2,b=(h+x)*l+c+_<<2):(C=(-h+x)*r-c+_<<2,b=x*l+_<<2),m==0)i[b]=e[C],i[b+1]=e[C+1],i[b+2]=e[C+2],i[b+3]=e[C+3];else if(m==1){var k=e[C+3]*.00392156862745098,S=e[C]*k,A=e[C+1]*k,T=e[C+2]*k,D=i[b+3]*(1/255),F=i[b]*D,N=i[b+1]*D,L=i[b+2]*D,P=1-k,U=k+D*P,$=U==0?0:1/U;i[b+3]=255*U,i[b+0]=(S+F*P)*$,i[b+1]=(A+N*P)*$,i[b+2]=(T+L*P)*$}else if(m==2){var k=e[C+3],S=e[C],A=e[C+1],T=e[C+2],D=i[b+3],F=i[b],N=i[b+1],L=i[b+2];k==D&&S==F&&A==N&&T==L?(i[b]=0,i[b+1]=0,i[b+2]=0,i[b+3]=0):(i[b]=S,i[b+1]=A,i[b+2]=T,i[b+3]=k)}else if(m==3){var k=e[C+3],S=e[C],A=e[C+1],T=e[C+2],D=i[b+3],F=i[b],N=i[b+1],L=i[b+2];if(k==D&&S==F&&A==N&&T==L)continue;if(k<220&&D>20)return!1}return!0},Le.encode=function(e,r,t,i,l,f,c){i==null&&(i=0),c==null&&(c=!1);var h=Le.encode.compress(e,r,t,i,[!1,!1,!1,0,c]);return Le.encode.compressPNG(h,-1),Le.encode._main(h,r,t,l,f)},Le.encodeLL=function(e,r,t,i,l,f,c,h){for(var m={ctype:0+(i==1?0:2)+(l==0?0:4),depth:f,frames:[]},d=(i+l)*f,g=d*r,C=0;C<e.length;C++)m.frames.push({rect:{x:0,y:0,width:r,height:t},img:new Uint8Array(e[C]),blend:0,dispose:1,bpp:Math.ceil(d/8),bpl:Math.ceil(g/8)});Le.encode.compressPNG(m,0,!0);var b=Le.encode._main(m,r,t,c,h);return b},Le.encode._main=function(e,r,t,i,l){l==null&&(l={});var f=Le.crc.crc,c=Le._bin.writeUint,h=Le._bin.writeUshort,m=Le._bin.writeASCII,d=8,g=e.frames.length>1,C=!1,b=8+(16+5+4)+(g?20:0);if(l.sRGB!=null&&(b+=8+1+4),l.pHYs!=null&&(b+=8+9+4),e.ctype==3){for(var x=e.plte.length,_=0;_<x;_++)e.plte[_]>>>24!=255&&(C=!0);b+=8+x*3+4+(C?8+x*1+4:0)}for(var k=0;k<e.frames.length;k++){var S=e.frames[k];g&&(b+=38),b+=S.cimg.length+12,k!=0&&(b+=4)}b+=12;for(var A=new Uint8Array(b),T=[137,80,78,71,13,10,26,10],_=0;_<8;_++)A[_]=T[_];if(c(A,d,13),d+=4,m(A,d,"IHDR"),d+=4,c(A,d,r),d+=4,c(A,d,t),d+=4,A[d]=e.depth,d++,A[d]=e.ctype,d++,A[d]=0,d++,A[d]=0,d++,A[d]=0,d++,c(A,d,f(A,d-17,17)),d+=4,l.sRGB!=null&&(c(A,d,1),d+=4,m(A,d,"sRGB"),d+=4,A[d]=l.sRGB,d++,c(A,d,f(A,d-5,5)),d+=4),l.pHYs!=null&&(c(A,d,9),d+=4,m(A,d,"pHYs"),d+=4,c(A,d,l.pHYs[0]),d+=4,c(A,d,l.pHYs[1]),d+=4,A[d]=l.pHYs[2],d++,c(A,d,f(A,d-13,13)),d+=4),g&&(c(A,d,8),d+=4,m(A,d,"acTL"),d+=4,c(A,d,e.frames.length),d+=4,c(A,d,l.loop!=null?l.loop:0),d+=4,c(A,d,f(A,d-12,12)),d+=4),e.ctype==3){var x=e.plte.length;c(A,d,x*3),d+=4,m(A,d,"PLTE"),d+=4;for(var _=0;_<x;_++){var D=_*3,F=e.plte[_],N=F&255,L=F>>>8&255,P=F>>>16&255;A[d+D+0]=N,A[d+D+1]=L,A[d+D+2]=P}if(d+=x*3,c(A,d,f(A,d-x*3-4,x*3+4)),d+=4,C){c(A,d,x),d+=4,m(A,d,"tRNS"),d+=4;for(var _=0;_<x;_++)A[d+_]=e.plte[_]>>>24&255;d+=x,c(A,d,f(A,d-x-4,x+4)),d+=4}}for(var U=0,k=0;k<e.frames.length;k++){var S=e.frames[k];g&&(c(A,d,26),d+=4,m(A,d,"fcTL"),d+=4,c(A,d,U++),d+=4,c(A,d,S.rect.width),d+=4,c(A,d,S.rect.height),d+=4,c(A,d,S.rect.x),d+=4,c(A,d,S.rect.y),d+=4,h(A,d,i[k]),d+=2,h(A,d,1e3),d+=2,A[d]=S.dispose,d++,A[d]=S.blend,d++,c(A,d,f(A,d-30,30)),d+=4);var $=S.cimg,x=$.length;c(A,d,x+(k==0?0:4)),d+=4;var O=d;m(A,d,k==0?"IDAT":"fdAT"),d+=4,k!=0&&(c(A,d,U++),d+=4),A.set($,d),d+=x,c(A,d,f(A,O,d-O)),d+=4}return c(A,d,0),d+=4,m(A,d,"IEND"),d+=4,c(A,d,f(A,d-4,4)),d+=4,A.buffer},Le.encode.compressPNG=function(e,r,t){for(var i=0;i<e.frames.length;i++){var l=e.frames[i];l.rect.width;var f=l.rect.height,c=new Uint8Array(f*l.bpl+f);l.cimg=Le.encode._filterZero(l.img,f,l.bpp,l.bpl,c,r,t)}},Le.encode.compress=function(e,r,t,i,l){for(var f=l[0],c=l[1],h=l[2],m=l[3],d=l[4],g=6,C=8,b=255,x=0;x<e.length;x++)for(var _=new Uint8Array(e[x]),k=_.length,S=0;S<k;S+=4)b&=_[S+3];var A=b!=255,T=Le.encode.framize(e,r,t,f,c,h),D={},F=[],N=[];if(i!=0){for(var L=[],S=0;S<T.length;S++)L.push(T[S].img.buffer);for(var P=Le.encode.concatRGBA(L),U=Le.quantize(P,i),$=0,O=new Uint8Array(U.abuf),S=0;S<T.length;S++){var z=T[S].img,j=z.length;N.push(new Uint8Array(U.inds.buffer,$>>2,j>>2));for(var x=0;x<j;x+=4)z[x]=O[$+x],z[x+1]=O[$+x+1],z[x+2]=O[$+x+2],z[x+3]=O[$+x+3];$+=j}for(var S=0;S<U.plte.length;S++)F.push(U.plte[S].est.rgba)}else for(var x=0;x<T.length;x++){var H=T[x],Y=new Uint32Array(H.img.buffer),q=H.rect.width,k=Y.length,X=new Uint8Array(k);N.push(X);for(var S=0;S<k;S++){var ne=Y[S];if(S!=0&&ne==Y[S-1])X[S]=X[S-1];else if(S>q&&ne==Y[S-q])X[S]=X[S-q];else{var G=D[ne];if(G==null&&(D[ne]=G=F.length,F.push(ne),F.length>=300))break;X[S]=G}}}var ee=F.length;ee<=256&&d==!1&&(ee<=2?C=1:ee<=4?C=2:ee<=16?C=4:C=8,C=Math.max(C,m));for(var x=0;x<T.length;x++){var H=T[x];H.rect.x,H.rect.y;var q=H.rect.width,Z=H.rect.height,V=H.img;new Uint32Array(V.buffer);var te=4*q,oe=4;if(ee<=256&&d==!1){te=Math.ceil(C*q/8);for(var re=new Uint8Array(te*Z),pe=N[x],me=0;me<Z;me++){var S=me*te,Ce=me*q;if(C==8)for(var se=0;se<q;se++)re[S+se]=pe[Ce+se];else if(C==4)for(var se=0;se<q;se++)re[S+(se>>1)]|=pe[Ce+se]<<4-(se&1)*4;else if(C==2)for(var se=0;se<q;se++)re[S+(se>>2)]|=pe[Ce+se]<<6-(se&3)*2;else if(C==1)for(var se=0;se<q;se++)re[S+(se>>3)]|=pe[Ce+se]<<7-(se&7)*1}V=re,g=3,oe=1}else if(A==!1&&T.length==1){for(var re=new Uint8Array(q*Z*3),Ae=q*Z,S=0;S<Ae;S++){var z=S*3,De=S*4;re[z]=V[De],re[z+1]=V[De+1],re[z+2]=V[De+2]}V=re,g=2,oe=3,te=3*q}H.img=V,H.bpl=te,H.bpp=oe}return{ctype:g,depth:C,plte:F,frames:T}},Le.encode.framize=function(e,r,t,i,l,f){for(var c=[],h=0;h<e.length;h++){var m=new Uint8Array(e[h]),d=new Uint32Array(m.buffer),g,C=0,b=0,x=r,_=t,k=i?1:0;if(h!=0){for(var S=f||i||h==1||c[h-2].dispose!=0?1:2,A=0,T=1e9,D=0;D<S;D++){for(var H=new Uint8Array(e[h-1-D]),F=new Uint32Array(e[h-1-D]),N=r,L=t,P=-1,U=-1,$=0;$<t;$++)for(var O=0;O<r;O++){var z=$*r+O;d[z]!=F[z]&&(O<N&&(N=O),O>P&&(P=O),$<L&&(L=$),$>U&&(U=$))}P==-1&&(N=L=P=U=0),l&&((N&1)==1&&N--,(L&1)==1&&L--);var j=(P-N+1)*(U-L+1);j<T&&(T=j,A=D,C=N,b=L,x=P-N+1,_=U-L+1)}var H=new Uint8Array(e[h-1-A]);A==1&&(c[h-1].dispose=2),g=new Uint8Array(x*_*4),Le._copyTile(H,r,t,g,x,_,-C,-b,0),k=Le._copyTile(m,r,t,g,x,_,-C,-b,3)?1:0,k==1?Le.encode._prepareDiff(m,r,t,g,{x:C,y:b,width:x,height:_}):Le._copyTile(m,r,t,g,x,_,-C,-b,0)}else g=m.slice(0);c.push({rect:{x:C,y:b,width:x,height:_},img:g,blend:k,dispose:0})}if(i)for(var h=0;h<c.length;h++){var Y=c[h];if(Y.blend!=1){var q=Y.rect,X=c[h-1].rect,ne=Math.min(q.x,X.x),G=Math.min(q.y,X.y),ee=Math.max(q.x+q.width,X.x+X.width),Z=Math.max(q.y+q.height,X.y+X.height),V={x:ne,y:G,width:ee-ne,height:Z-G};c[h-1].dispose=1,h-1!=0&&Le.encode._updateFrame(e,r,t,c,h-1,V,l),Le.encode._updateFrame(e,r,t,c,h,V,l)}}var te=0;if(e.length!=1)for(var z=0;z<c.length;z++){var Y=c[z];te+=Y.rect.width*Y.rect.height}return c},Le.encode._updateFrame=function(e,r,t,i,l,f,c){for(var h=Uint8Array,m=Uint32Array,d=new h(e[l-1]),g=new m(e[l-1]),C=l+1<e.length?new h(e[l+1]):null,b=new h(e[l]),x=new m(b.buffer),_=r,k=t,S=-1,A=-1,T=0;T<f.height;T++)for(var D=0;D<f.width;D++){var F=f.x+D,N=f.y+T,L=N*r+F,P=x[L];P==0||i[l-1].dispose==0&&g[L]==P&&(C==null||C[L*4+3]!=0)||(F<_&&(_=F),F>S&&(S=F),N<k&&(k=N),N>A&&(A=N))}S==-1&&(_=k=S=A=0),c&&((_&1)==1&&_--,(k&1)==1&&k--),f={x:_,y:k,width:S-_+1,height:A-k+1};var U=i[l];U.rect=f,U.blend=1,U.img=new Uint8Array(f.width*f.height*4),i[l-1].dispose==0?(Le._copyTile(d,r,t,U.img,f.width,f.height,-f.x,-f.y,0),Le.encode._prepareDiff(b,r,t,U.img,f)):Le._copyTile(b,r,t,U.img,f.width,f.height,-f.x,-f.y,0)},Le.encode._prepareDiff=function(e,r,t,i,l){Le._copyTile(e,r,t,i,l.width,l.height,-l.x,-l.y,2)},Le.encode._filterZero=function(e,r,t,i,l,f,c){var h=[],m=[0,1,2,3,4];f!=-1?m=[f]:(r*i>5e5||t==1)&&(m=[0]);var d;c&&(d={level:0});for(var g=l.length>1e7&&UZIP!=null?UZIP:gP,C=0;C<m.length;C++){for(var b=0;b<r;b++)Le.encode._filterLine(l,e,b,i,t,m[C]);h.push(g.deflate(l,d))}for(var x,_=1e9,C=0;C<h.length;C++)h[C].length<_&&(x=C,_=h[C].length);return h[x]},Le.encode._filterLine=function(e,r,t,i,l,f){var c=t*i,h=c+t,m=Le.decode._paeth;if(e[h]=f,h++,f==0)if(i<500)for(var d=0;d<i;d++)e[h+d]=r[c+d];else e.set(new Uint8Array(r.buffer,c,i),h);else if(f==1){for(var d=0;d<l;d++)e[h+d]=r[c+d];for(var d=l;d<i;d++)e[h+d]=r[c+d]-r[c+d-l]+256&255}else if(t==0){for(var d=0;d<l;d++)e[h+d]=r[c+d];if(f==2)for(var d=l;d<i;d++)e[h+d]=r[c+d];if(f==3)for(var d=l;d<i;d++)e[h+d]=r[c+d]-(r[c+d-l]>>1)+256&255;if(f==4)for(var d=l;d<i;d++)e[h+d]=r[c+d]-m(r[c+d-l],0,0)+256&255}else{if(f==2)for(var d=0;d<i;d++)e[h+d]=r[c+d]+256-r[c+d-i]&255;if(f==3){for(var d=0;d<l;d++)e[h+d]=r[c+d]+256-(r[c+d-i]>>1)&255;for(var d=l;d<i;d++)e[h+d]=r[c+d]+256-(r[c+d-i]+r[c+d-l]>>1)&255}if(f==4){for(var d=0;d<l;d++)e[h+d]=r[c+d]+256-m(0,r[c+d-i],0)&255;for(var d=l;d<i;d++)e[h+d]=r[c+d]+256-m(r[c+d-l],r[c+d-i],r[c+d-l-i])&255}}},Le.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var t=r,i=0;i<8;i++)t&1?t=3988292384^t>>>1:t=t>>>1;e[r]=t}return e}(),update:function(e,r,t,i){for(var l=0;l<i;l++)e=Le.crc.table[(e^r[t+l])&255]^e>>>8;return e},crc:function(e,r,t){return Le.crc.update(4294967295,e,r,t)^4294967295}},Le.quantize=function(e,r){var t=new Uint8Array(e),i=t.slice(0),l=new Uint32Array(i.buffer),f=Le.quantize.getKDtree(i,r),c=f[0],h=f[1],m=Le.quantize.planeDst,d=t,g=l,C=d.length,b=new Uint8Array(t.length>>2),x;if(t.length<2e7)for(var _=0;_<C;_+=4){var k=d[_]*.00392156862745098,S=d[_+1]*(1/255),A=d[_+2]*(1/255),T=d[_+3]*(1/255);x=Le.quantize.getNearest(c,k,S,A,T),b[_>>2]=x.ind,g[_>>2]=x.est.rgba}else for(var _=0;_<C;_+=4){var k=d[_]*.00392156862745098,S=d[_+1]*(1/255),A=d[_+2]*(1/255),T=d[_+3]*(1/255);for(x=c;x.left;)x=m(x.est,k,S,A,T)<=0?x.left:x.right;b[_>>2]=x.ind,g[_>>2]=x.est.rgba}return{abuf:i.buffer,inds:b,plte:h}},Le.quantize.getKDtree=function(e,r,t){t==null&&(t=1e-4);var i=new Uint32Array(e.buffer),l={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};l.bst=Le.quantize.stats(e,l.i0,l.i1),l.est=Le.quantize.estats(l.bst);for(var f=[l];f.length<r;){for(var c=0,h=0,m=0;m<f.length;m++)f[m].est.L>c&&(c=f[m].est.L,h=m);if(c<t)break;var d=f[h],g=Le.quantize.splitPixels(e,i,d.i0,d.i1,d.est.e,d.est.eMq255),C=d.i0>=g||d.i1<=g;if(C){d.est.L=0;continue}var b={i0:d.i0,i1:g,bst:null,est:null,tdst:0,left:null,right:null};b.bst=Le.quantize.stats(e,b.i0,b.i1),b.est=Le.quantize.estats(b.bst);var x={i0:g,i1:d.i1,bst:null,est:null,tdst:0,left:null,right:null};x.bst={R:[],m:[],N:d.bst.N-b.bst.N};for(var m=0;m<16;m++)x.bst.R[m]=d.bst.R[m]-b.bst.R[m];for(var m=0;m<4;m++)x.bst.m[m]=d.bst.m[m]-b.bst.m[m];x.est=Le.quantize.estats(x.bst),d.left=b,d.right=x,f[h]=b,f.push(x)}f.sort(function(_,k){return k.bst.N-_.bst.N});for(var m=0;m<f.length;m++)f[m].ind=m;return[l,f]},Le.quantize.getNearest=function(e,r,t,i,l){if(e.left==null)return e.tdst=Le.quantize.dist(e.est.q,r,t,i,l),e;var f=Le.quantize.planeDst(e.est,r,t,i,l),c=e.left,h=e.right;f>0&&(c=e.right,h=e.left);var m=Le.quantize.getNearest(c,r,t,i,l);if(m.tdst<=f*f)return m;var d=Le.quantize.getNearest(h,r,t,i,l);return d.tdst<m.tdst?d:m},Le.quantize.planeDst=function(e,r,t,i,l){var f=e.e;return f[0]*r+f[1]*t+f[2]*i+f[3]*l-e.eMq},Le.quantize.dist=function(e,r,t,i,l){var f=r-e[0],c=t-e[1],h=i-e[2],m=l-e[3];return f*f+c*c+h*h+m*m},Le.quantize.splitPixels=function(e,r,t,i,l,f){var c=Le.quantize.vecDot;for(i-=4;t<i;){for(;c(e,t,l)<=f;)t+=4;for(;c(e,i,l)>f;)i-=4;if(t>=i)break;var h=r[t>>2];r[t>>2]=r[i>>2],r[i>>2]=h,t+=4,i-=4}for(;c(e,t,l)>f;)t-=4;return t+4},Le.quantize.vecDot=function(e,r,t){return e[r]*t[0]+e[r+1]*t[1]+e[r+2]*t[2]+e[r+3]*t[3]},Le.quantize.stats=function(e,r,t){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=[0,0,0,0],f=t-r>>2,c=r;c<t;c+=4){var h=e[c]*.00392156862745098,m=e[c+1]*(1/255),d=e[c+2]*(1/255),g=e[c+3]*(1/255);l[0]+=h,l[1]+=m,l[2]+=d,l[3]+=g,i[0]+=h*h,i[1]+=h*m,i[2]+=h*d,i[3]+=h*g,i[5]+=m*m,i[6]+=m*d,i[7]+=m*g,i[10]+=d*d,i[11]+=d*g,i[15]+=g*g}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:l,N:f}},Le.quantize.estats=function(e){var r=e.R,t=e.m,i=e.N,l=t[0],f=t[1],c=t[2],h=t[3],m=i==0?0:1/i,d=[r[0]-l*l*m,r[1]-l*f*m,r[2]-l*c*m,r[3]-l*h*m,r[4]-f*l*m,r[5]-f*f*m,r[6]-f*c*m,r[7]-f*h*m,r[8]-c*l*m,r[9]-c*f*m,r[10]-c*c*m,r[11]-c*h*m,r[12]-h*l*m,r[13]-h*f*m,r[14]-h*c*m,r[15]-h*h*m],g=d,C=Le.M4,b=[Math.random(),Math.random(),Math.random(),Math.random()],x=0,_=0;if(i!=0)for(var k=0;k<16&&(b=C.multVec(g,b),_=Math.sqrt(C.dot(b,b)),b=C.sml(1/_,b),!(k!=0&&Math.abs(_-x)<1e-9));k++)x=_;var S=[l*m,f*m,c*m,h*m],A=C.dot(C.sml(255,S),b);return{Cov:d,q:S,e:b,L:x,eMq255:A,eMq:C.dot(b,S),rgba:(Math.round(255*S[3])<<24|Math.round(255*S[2])<<16|Math.round(255*S[1])<<8|Math.round(255*S[0])<<0)>>>0}},Le.M4={multVec:function(e,r){return[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]]},dot:function(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]},sml:function(e,r){return[e*r[0],e*r[1],e*r[2],e*r[3]]}},Le.encode.concatRGBA=function(e){for(var r=0,t=0;t<e.length;t++)r+=e[t].byteLength;for(var i=new Uint8Array(r),l=0,t=0;t<e.length;t++){for(var f=new Uint8Array(e[t]),c=f.length,h=0;h<c;h+=4){var m=f[h],d=f[h+1],g=f[h+2],C=f[h+3];C==0&&(m=d=g=0),i[l+h]=m,i[l+h+1]=d,i[l+h+2]=g,i[l+h+3]=C}l+=c}return i.buffer};const yP=e=>new Promise((r,t)=>{const i=new FileReader;i.onloadend=l=>r(l.target.result),i.onerror=l=>t(l),i.readAsDataURL(e)}),xP=e=>new Promise((r,t)=>{const i=new Image;i.onload=()=>r(i),i.onerror=l=>t(l),i.src=e}),bP=(e,r,t)=>new Promise(i=>e.toBlob(l=>i(l),r,t)),CP=e=>{const i=e.width,l=e.height;let f=e.width,c=e.height;return(i>2e3||l>2e3)&&(i/l>2e3/2e3?(f=2e3,c=Math.round(2e3*(l/i))):(c=2e3,f=Math.round(2e3*(i/l)))),{width:f,height:c}},wP=e=>{let r=0;return e>1||e<0?r=0:r=e?e*256:0,r},r6=async(e,r=.5,t=5)=>{const i=e.name;if(e.size/1024/1024<t)return e;try{const l=document.createElement("canvas"),f=l.getContext("2d"),c=await yP(e),h=await xP(c),m=CP(h);if(l.width=m.width,l.height=m.height,f.clearRect(0,0,m.width,m.height),f.drawImage(h,0,0,m.width,m.height),["image/jpeg","image/jpg"].includes(e.type)){const d=await bP(l,e.type,r);return new File([d],i,{type:e.type})}else{const d=f.getImageData(0,0,m.width,m.height).data,g=wP(r),C=Le.encode([d.buffer],m.width,m.height,g);return new File([C],e.name,{type:e.type})}}catch{return e}},a6=[ed.jpeg,ed.jpg,ed.png],i6=e=>{const{maxCount:r=1,listType:t="picture-card",fileList:i=[],maxSize:l=2,accept:f=a6.join(","),uploadBtnName:c="上传",uploadHint:h=null,compression:m}=e,[d,g]=W.useState(!1),[C,b]=W.useState(""),x=()=>t!=="text"?Pe("div",{style:{position:"relative"},children:[Pe("div",{children:[Q(Fb,{}),Q("div",{style:{marginTop:8},children:c})]}),h]}):Pe(rn,{children:[Q(ve.Button,{icon:Q(Nb,{}),children:c}),h]}),_=T=>new Promise(async(F,N)=>{const L=f.split(","),P=dg(T.name)||"";if(f&&!L.includes(P)&&(ve.message.error(`只允许上传 ${f} 文件`),N(!1)),!(T.size/1024/1024<l)&&!m&&(ve.message.error(`文件必须小于${l}MB`),N(!1)),m){let $=0;async function O(j){if(!m)return;const H=await r6(j,m.quality,m.limit);if($++,$>=5)return H;if(H.size/1024/1024>l)await O(H);else return H}const z=await O(T);F(z)}F(T)}).catch(F=>ve.Upload.LIST_IGNORE),k=T=>{e.onChange&&e.onChange(T)},S=T=>{e.onPreview?e.onPreview(T):A(T)},A=async T=>{let D=dg(T.name)||"";if(D||(D=dg(T.name||T.url)||""),D===ed.pdf)return ve.Modal.info({title:"PDF",width:"60%",content:Q("iframe",{title:"PDF预览",src:T.url||T.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});a6.includes(D)&&(!T.url&&!T.thumbUrl&&!T.preview&&(T.preview=await M8(T.originFileObj)),b(T.url||T.thumbUrl||T.preview),g(!0))};return Pe(rn,{children:[Q(ve.Upload,{beforeUpload:_,onChange:k,listType:t,...e,onPreview:S,children:i.length>=r?null:x()}),Q(ve.Image,{style:{display:"none"},preview:{visible:d,src:C,onVisibleChange:()=>{g(!1),b("")}}})]})},Sg={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},_P={labelCol:{span:4},wrapperCol:{span:20}},o6=e=>{switch(e){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},g2=e=>{const{items:r,rowProps:t,formProps:i,readonly:l=!1,hiddenTitle:f=!1,langId:c="10001"}=e,h=(g,C)=>{var b,x;if(C.btnType==="submit"){(b=i==null?void 0:i.form)==null||b.validateFields().then(_=>{C.onClick&&C.onClick(_)});return}if(C.btnType==="reset"){(x=i==null?void 0:i.form)==null||x.resetFields(),C.onClick&&C.onClick(g);return}C.btnType==="cancel"&&C.onClick&&C.onClick(g)},m=g=>Array.isArray(g)?g:g&&g.fileList,d=g=>{var b;const C=i==null?void 0:i.initialValues;return g.dataIndex?((b=g.render)==null?void 0:b.call(g,C==null?void 0:C[g.dataIndex],C))||g.value||(C==null?void 0:C[g.dataIndex]):""};return Q(ve.Form,{layout:"horizontal",form:i==null?void 0:i.form,..._P,...i||{},children:Q(ve.Row,{gutter:16,...t,children:r.filter(g=>!g.hidden).map((g,C)=>Q(ve.Col,{...g.colProps||{span:24},children:Q(ve.Form.Item,{...g.valueType==="upload"?{getValueFromEvent:m}:{},label:f?"":g.title,name:g.valueType==="btns"?void 0:g.dataIndex,...g.formItemProps,children:g.readonly?Q("div",{children:d(g)}):g.readonly===void 0&&l?Q("div",{children:d(g)}):Q(l6,{onChange:b=>{var x;return(x=g==null?void 0:g.onChange)==null?void 0:x.call(g,b)},valueType:g.valueType,onBtnClick:h,valueProps:g.valueProps,formItemProps:g.formItemProps,langId:c})})},g.dataIndex||C))})})},l6=e=>{const{valueType:r,valueProps:t,value:i,onChange:l,onBtnClick:f,inputRef:c,formItemProps:h,langId:m}=e,d=W.useMemo(()=>{let g=Q(ve.Input,{placeholder:m==="10001"?"请输入":"Please input",allowClear:!0,...t});switch(r){case"rate":g=Q(ve.Rate,{...t});break;case"password":g=Q(ve.Input.Password,{...t});break;case"modal":g=Q(EP,{...t});break;case"checkbox":g=Q(ve.Checkbox.Group,{...t});break;case"select":g=Q(ve.Select,{placeholder:m==="10001"?"请选择":"Please select",allowClear:!0,...t});break;case"inputNumber":g=Q(ve.InputNumber,{style:{width:"100%"},placeholder:m==="10001"?"请输入":"Please input",...t});break;case"textarea":g=Q(ve.Input.TextArea,{placeholder:m==="10001"?"请输入":"Please input",allowClear:!0,...t});break;case"radio":g=Q(ve.Radio.Group,{...t});break;case"switch":g=Q(ve.Switch,{...t});break;case"datePicker":g=Q(ve.DatePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"rangePicker":g=Q(ve.DatePicker.RangePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"timePicker":g=Q(ve.TimePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"cascader":g=Q(ve.Cascader,{allowClear:!0,...t});break;case"upload":g=Q(i6,{...t});break;case"btns":g=Q(ve.Space,{children:t==null?void 0:t.map(C=>W.createElement(ve.Button,{type:C.btnType==="submit"?"primary":"default",...ns.omit(C,["btnType"]),key:C.key||C.btnType,onClick:b=>{f==null||f(b,C)}},C.title||C.children))});break}return g},[r,t,l,i]);if(r==="custom"){const g=t;return W.cloneElement(g.children,{[(h==null?void 0:h.valuePropName)||o6(r||"input")]:i,onChange:l,ref:c})}return W.cloneElement(d,{[o6(r||"input")]:i,onChange:l,ref:c})},EP=e=>{const{placeholder:r,labelKey:t,onToggle:i,value:l,onClear:f,className:c,style:h}=e;return Pe("div",{className:[Sg.fieldModal,c].filter(m=>m).join(" "),style:h,children:[Q("div",{className:Sg.content,onClick:()=>i(!0),children:l?Q("span",{children:l[t]}):Q("span",{className:Sg.placeholder,children:r})}),Q("span",{className:Sg.suffix,onClick:f,children:l&&Q(S7,{})})]})};var y2={exports:{}},Yp={},Dg={exports:{}},s6={},wt={exports:{}},x2={exports:{}},yn={};var u6;function SP(){if(u6)return yn;u6=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,f=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,h=e?Symbol.for("react.context"):60110,m=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,C=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function D(N){if(typeof N=="object"&&N!==null){var L=N.$$typeof;switch(L){case r:switch(N=N.type,N){case m:case d:case i:case f:case l:case C:return N;default:switch(N=N&&N.$$typeof,N){case h:case g:case _:case x:case c:return N;default:return L}}case t:return L}}}function F(N){return D(N)===d}return yn.AsyncMode=m,yn.ConcurrentMode=d,yn.ContextConsumer=h,yn.ContextProvider=c,yn.Element=r,yn.ForwardRef=g,yn.Fragment=i,yn.Lazy=_,yn.Memo=x,yn.Portal=t,yn.Profiler=f,yn.StrictMode=l,yn.Suspense=C,yn.isAsyncMode=function(N){return F(N)||D(N)===m},yn.isConcurrentMode=F,yn.isContextConsumer=function(N){return D(N)===h},yn.isContextProvider=function(N){return D(N)===c},yn.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===r},yn.isForwardRef=function(N){return D(N)===g},yn.isFragment=function(N){return D(N)===i},yn.isLazy=function(N){return D(N)===_},yn.isMemo=function(N){return D(N)===x},yn.isPortal=function(N){return D(N)===t},yn.isProfiler=function(N){return D(N)===f},yn.isStrictMode=function(N){return D(N)===l},yn.isSuspense=function(N){return D(N)===C},yn.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===i||N===d||N===f||N===l||N===C||N===b||typeof N=="object"&&N!==null&&(N.$$typeof===_||N.$$typeof===x||N.$$typeof===c||N.$$typeof===h||N.$$typeof===g||N.$$typeof===S||N.$$typeof===A||N.$$typeof===T||N.$$typeof===k)},yn.typeOf=D,yn}var xn={};var c6;function DP(){return c6||(c6=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,f=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,h=e?Symbol.for("react.context"):60110,m=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,C=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function D(Se){return typeof Se=="string"||typeof Se=="function"||Se===i||Se===d||Se===f||Se===l||Se===C||Se===b||typeof Se=="object"&&Se!==null&&(Se.$$typeof===_||Se.$$typeof===x||Se.$$typeof===c||Se.$$typeof===h||Se.$$typeof===g||Se.$$typeof===S||Se.$$typeof===A||Se.$$typeof===T||Se.$$typeof===k)}function F(Se){if(typeof Se=="object"&&Se!==null){var We=Se.$$typeof;switch(We){case r:var Me=Se.type;switch(Me){case m:case d:case i:case f:case l:case C:return Me;default:var bt=Me&&Me.$$typeof;switch(bt){case h:case g:case _:case x:case c:return bt;default:return We}}case t:return We}}}var N=m,L=d,P=h,U=c,$=r,O=g,z=i,j=_,H=x,Y=t,q=f,X=l,ne=C,G=!1;function ee(Se){return G||(G=!0),Z(Se)||F(Se)===m}function Z(Se){return F(Se)===d}function V(Se){return F(Se)===h}function te(Se){return F(Se)===c}function oe(Se){return typeof Se=="object"&&Se!==null&&Se.$$typeof===r}function re(Se){return F(Se)===g}function pe(Se){return F(Se)===i}function me(Se){return F(Se)===_}function Ce(Se){return F(Se)===x}function se(Se){return F(Se)===t}function Ae(Se){return F(Se)===f}function De(Se){return F(Se)===l}function qe(Se){return F(Se)===C}xn.AsyncMode=N,xn.ConcurrentMode=L,xn.ContextConsumer=P,xn.ContextProvider=U,xn.Element=$,xn.ForwardRef=O,xn.Fragment=z,xn.Lazy=j,xn.Memo=H,xn.Portal=Y,xn.Profiler=q,xn.StrictMode=X,xn.Suspense=ne,xn.isAsyncMode=ee,xn.isConcurrentMode=Z,xn.isContextConsumer=V,xn.isContextProvider=te,xn.isElement=oe,xn.isForwardRef=re,xn.isFragment=pe,xn.isLazy=me,xn.isMemo=Ce,xn.isPortal=se,xn.isProfiler=Ae,xn.isStrictMode=De,xn.isSuspense=qe,xn.isValidElementType=D,xn.typeOf=F}()),xn}var f6;function d6(){return f6||(f6=1,function(e){process.env.NODE_ENV==="production"?e.exports=SP():e.exports=DP()}(x2)),x2.exports}var b2,p6;function kP(){if(p6)return b2;p6=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function i(f){if(f==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(f)}function l(){try{if(!Object.assign)return!1;var f=new String("abc");if(f[5]="de",Object.getOwnPropertyNames(f)[0]==="5")return!1;for(var c={},h=0;h<10;h++)c["_"+String.fromCharCode(h)]=h;var m=Object.getOwnPropertyNames(c).map(function(g){return c[g]});if(m.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(g){d[g]=g}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return b2=l()?Object.assign:function(f,c){for(var h,m=i(f),d,g=1;g<arguments.length;g++){h=Object(arguments[g]);for(var C in h)r.call(h,C)&&(m[C]=h[C]);if(e){d=e(h);for(var b=0;b<d.length;b++)t.call(h,d[b])&&(m[d[b]]=h[d[b]])}}return m},b2}var C2,h6;function w2(){if(h6)return C2;h6=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return C2=e,C2}var _2,v6;function m6(){return v6||(v6=1,_2=Function.call.bind(Object.prototype.hasOwnProperty)),_2}var E2,g6;function TP(){if(g6)return E2;g6=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=w2(),t={},i=m6();e=function(f){var c="Warning: "+f;try{throw new Error(c)}catch{}}}function l(f,c,h,m,d){if(process.env.NODE_ENV!=="production"){for(var g in f)if(i(f,g)){var C;try{if(typeof f[g]!="function"){var b=Error((m||"React class")+": "+h+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}C=f[g](c,g,m,h,null,r)}catch(_){C=_}if(C&&!(C instanceof Error)&&e((m||"React class")+": type specification of "+h+" `"+g+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in t)){t[C.message]=!0;var x=d?d():"";e("Failed "+h+" type: "+C.message+(x??""))}}}}return l.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},E2=l,E2}var S2,y6;function AP(){if(y6)return S2;y6=1;var e=d6(),r=kP(),t=w2(),i=m6(),l=TP(),f=function(){};process.env.NODE_ENV!=="production"&&(f=function(h){var m="Warning: "+h;try{throw new Error(m)}catch{}});function c(){return null}return S2=function(h,m){var d=typeof Symbol=="function"&&Symbol.iterator,g="@@iterator";function C(Z){var V=Z&&(d&&Z[d]||Z[g]);if(typeof V=="function")return V}var b="<<anonymous>>",x={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:T(),arrayOf:D,element:F(),elementType:N(),instanceOf:L,node:O(),objectOf:U,oneOf:P,oneOfType:$,shape:j,exact:H};function _(Z,V){return Z===V?Z!==0||1/Z===1/V:Z!==Z&&V!==V}function k(Z,V){this.message=Z,this.data=V&&typeof V=="object"?V:{},this.stack=""}k.prototype=Error.prototype;function S(Z){if(process.env.NODE_ENV!=="production")var V={},te=0;function oe(pe,me,Ce,se,Ae,De,qe){if(se=se||b,De=De||Ce,qe!==t){if(m){var Se=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Se.name="Invariant Violation",Se}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var We=se+":"+Ce;!V[We]&&te<3&&(f("You are manually calling a React.PropTypes validation function for the `"+De+"` prop on `"+se+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[We]=!0,te++)}}return me[Ce]==null?pe?me[Ce]===null?new k("The "+Ae+" `"+De+"` is marked as required "+("in `"+se+"`, but its value is `null`.")):new k("The "+Ae+" `"+De+"` is marked as required in "+("`"+se+"`, but its value is `undefined`.")):null:Z(me,Ce,se,Ae,De)}var re=oe.bind(null,!1);return re.isRequired=oe.bind(null,!0),re}function A(Z){function V(te,oe,re,pe,me,Ce){var se=te[oe],Ae=X(se);if(Ae!==Z){var De=ne(se);return new k("Invalid "+pe+" `"+me+"` of type "+("`"+De+"` supplied to `"+re+"`, expected ")+("`"+Z+"`."),{expectedType:Z})}return null}return S(V)}function T(){return S(c)}function D(Z){function V(te,oe,re,pe,me){if(typeof Z!="function")return new k("Property `"+me+"` of component `"+re+"` has invalid PropType notation inside arrayOf.");var Ce=te[oe];if(!Array.isArray(Ce)){var se=X(Ce);return new k("Invalid "+pe+" `"+me+"` of type "+("`"+se+"` supplied to `"+re+"`, expected an array."))}for(var Ae=0;Ae<Ce.length;Ae++){var De=Z(Ce,Ae,re,pe,me+"["+Ae+"]",t);if(De instanceof Error)return De}return null}return S(V)}function F(){function Z(V,te,oe,re,pe){var me=V[te];if(!h(me)){var Ce=X(me);return new k("Invalid "+re+" `"+pe+"` of type "+("`"+Ce+"` supplied to `"+oe+"`, expected a single ReactElement."))}return null}return S(Z)}function N(){function Z(V,te,oe,re,pe){var me=V[te];if(!e.isValidElementType(me)){var Ce=X(me);return new k("Invalid "+re+" `"+pe+"` of type "+("`"+Ce+"` supplied to `"+oe+"`, expected a single ReactElement type."))}return null}return S(Z)}function L(Z){function V(te,oe,re,pe,me){if(!(te[oe]instanceof Z)){var Ce=Z.name||b,se=ee(te[oe]);return new k("Invalid "+pe+" `"+me+"` of type "+("`"+se+"` supplied to `"+re+"`, expected ")+("instance of `"+Ce+"`."))}return null}return S(V)}function P(Z){if(!Array.isArray(Z))return process.env.NODE_ENV!=="production"&&(arguments.length>1?f("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):f("Invalid argument supplied to oneOf, expected an array.")),c;function V(te,oe,re,pe,me){for(var Ce=te[oe],se=0;se<Z.length;se++)if(_(Ce,Z[se]))return null;var Ae=JSON.stringify(Z,function(qe,Se){var We=ne(Se);return We==="symbol"?String(Se):Se});return new k("Invalid "+pe+" `"+me+"` of value `"+String(Ce)+"` "+("supplied to `"+re+"`, expected one of "+Ae+"."))}return S(V)}function U(Z){function V(te,oe,re,pe,me){if(typeof Z!="function")return new k("Property `"+me+"` of component `"+re+"` has invalid PropType notation inside objectOf.");var Ce=te[oe],se=X(Ce);if(se!=="object")return new k("Invalid "+pe+" `"+me+"` of type "+("`"+se+"` supplied to `"+re+"`, expected an object."));for(var Ae in Ce)if(i(Ce,Ae)){var De=Z(Ce,Ae,re,pe,me+"."+Ae,t);if(De instanceof Error)return De}return null}return S(V)}function $(Z){if(!Array.isArray(Z))return process.env.NODE_ENV!=="production"&&f("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var V=0;V<Z.length;V++){var te=Z[V];if(typeof te!="function")return f("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(te)+" at index "+V+"."),c}function oe(re,pe,me,Ce,se){for(var Ae=[],De=0;De<Z.length;De++){var qe=Z[De],Se=qe(re,pe,me,Ce,se,t);if(Se==null)return null;Se.data&&i(Se.data,"expectedType")&&Ae.push(Se.data.expectedType)}var We=Ae.length>0?", expected one of type ["+Ae.join(", ")+"]":"";return new k("Invalid "+Ce+" `"+se+"` supplied to "+("`"+me+"`"+We+"."))}return S(oe)}function O(){function Z(V,te,oe,re,pe){return Y(V[te])?null:new k("Invalid "+re+" `"+pe+"` supplied to "+("`"+oe+"`, expected a ReactNode."))}return S(Z)}function z(Z,V,te,oe,re){return new k((Z||"React class")+": "+V+" type `"+te+"."+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+re+"`.")}function j(Z){function V(te,oe,re,pe,me){var Ce=te[oe],se=X(Ce);if(se!=="object")return new k("Invalid "+pe+" `"+me+"` of type `"+se+"` "+("supplied to `"+re+"`, expected `object`."));for(var Ae in Z){var De=Z[Ae];if(typeof De!="function")return z(re,pe,me,Ae,ne(De));var qe=De(Ce,Ae,re,pe,me+"."+Ae,t);if(qe)return qe}return null}return S(V)}function H(Z){function V(te,oe,re,pe,me){var Ce=te[oe],se=X(Ce);if(se!=="object")return new k("Invalid "+pe+" `"+me+"` of type `"+se+"` "+("supplied to `"+re+"`, expected `object`."));var Ae=r({},te[oe],Z);for(var De in Ae){var qe=Z[De];if(i(Z,De)&&typeof qe!="function")return z(re,pe,me,De,ne(qe));if(!qe)return new k("Invalid "+pe+" `"+me+"` key `"+De+"` supplied to `"+re+"`.\nBad object: "+JSON.stringify(te[oe],null," ")+`
|
|
194
194
|
Valid keys: `+JSON.stringify(Object.keys(Z),null," "));var Se=qe(Ce,De,re,pe,me+"."+De,t);if(Se)return Se}return null}return S(V)}function Y(Z){switch(typeof Z){case"number":case"string":case"undefined":return!0;case"boolean":return!Z;case"object":if(Array.isArray(Z))return Z.every(Y);if(Z===null||h(Z))return!0;var V=C(Z);if(V){var te=V.call(Z),oe;if(V!==Z.entries){for(;!(oe=te.next()).done;)if(!Y(oe.value))return!1}else for(;!(oe=te.next()).done;){var re=oe.value;if(re&&!Y(re[1]))return!1}}else return!1;return!0;default:return!1}}function q(Z,V){return Z==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function X(Z){var V=typeof Z;return Array.isArray(Z)?"array":Z instanceof RegExp?"object":q(V,Z)?"symbol":V}function ne(Z){if(typeof Z>"u"||Z===null)return""+Z;var V=X(Z);if(V==="object"){if(Z instanceof Date)return"date";if(Z instanceof RegExp)return"regexp"}return V}function G(Z){var V=ne(Z);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function ee(Z){return!Z.constructor||!Z.constructor.name?b:Z.constructor.name}return x.checkPropTypes=l,x.resetWarningCache=l.resetWarningCache,x.PropTypes=x,x},S2}var D2,x6;function OP(){if(x6)return D2;x6=1;var e=w2();function r(){}function t(){}return t.resetWarningCache=r,D2=function(){function i(c,h,m,d,g,C){if(C!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}i.isRequired=i;function l(){return i}var f={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:l,element:i,elementType:i,instanceOf:l,node:i,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:t,resetWarningCache:r};return f.PropTypes=f,f},D2}if(process.env.NODE_ENV!=="production"){var RP=d6(),FP=!0;wt.exports=AP()(RP.isElement,FP)}else wt.exports=OP()();function b6(e){var r,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(t=b6(e[r]))&&(i&&(i+=" "),i+=t);else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Re(){for(var e,r,t=0,i="";t<arguments.length;)(e=arguments[t++])&&(r=b6(e))&&(i&&(i+=" "),i+=r);return i}const NP=B4(Object.freeze(Object.defineProperty({__proto__:null,clsx:Re,default:Re},Symbol.toStringTag,{value:"Module"})));var sr={},ul={};Object.defineProperty(ul,"__esModule",{value:!0}),ul.dontSetMe=zP,ul.findInArray=MP,ul.int=LP,ul.isFunction=PP,ul.isNum=BP;function MP(e,r){for(let t=0,i=e.length;t<i;t++)if(r.apply(r,[e[t],t,e]))return e[t]}function PP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function BP(e){return typeof e=="number"&&!isNaN(e)}function LP(e){return parseInt(e,10)}function zP(e,r,t){if(e[r])return new Error("Invalid prop ".concat(r," passed to ").concat(t," - do not set this, set it on the child."))}var Sc={};Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.browserPrefixToKey=w6,Sc.browserPrefixToStyle=UP,Sc.default=void 0,Sc.getPrefix=C6;const k2=["Moz","Webkit","O","ms"];function C6(){var e;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const t=(e=window.document)===null||e===void 0||(e=e.documentElement)===null||e===void 0?void 0:e.style;if(!t||r in t)return"";for(let i=0;i<k2.length;i++)if(w6(r,k2[i])in t)return k2[i];return""}function w6(e,r){return r?"".concat(r).concat(jP(e)):e}function UP(e,r){return r?"-".concat(r.toLowerCase(),"-").concat(e):e}function jP(e){let r="",t=!0;for(let i=0;i<e.length;i++)t?(r+=e[i].toUpperCase(),t=!1):e[i]==="-"?t=!0:r+=e[i];return r}Sc.default=C6(),Object.defineProperty(sr,"__esModule",{value:!0}),sr.addClassName=D6,sr.addEvent=VP,sr.addUserSelectStyles=eB,sr.createCSSTransform=QP,sr.createSVGTransform=ZP,sr.getTouch=XP,sr.getTouchIdentifier=JP,sr.getTranslation=T2,sr.innerHeight=GP,sr.innerWidth=KP,sr.matchesSelector=S6,sr.matchesSelectorAndParentsTo=HP,sr.offsetXYFromParent=WP,sr.outerHeight=YP,sr.outerWidth=qP,sr.removeClassName=k6,sr.removeEvent=$P,sr.removeUserSelectStyles=tB;var Fi=ul,_6=IP(Sc);function E6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(E6=function(i){return i?t:r})(e)}function IP(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=E6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}let kg="";function S6(e,r){return kg||(kg=(0,Fi.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,Fi.isFunction)(e[t])})),(0,Fi.isFunction)(e[kg])?e[kg](r):!1}function HP(e,r,t){let i=e;do{if(S6(i,r))return!0;if(i===t)return!1;i=i.parentNode}while(i);return!1}function VP(e,r,t,i){if(!e)return;const l={capture:!0,...i};e.addEventListener?e.addEventListener(r,t,l):e.attachEvent?e.attachEvent("on"+r,t):e["on"+r]=t}function $P(e,r,t,i){if(!e)return;const l={capture:!0,...i};e.removeEventListener?e.removeEventListener(r,t,l):e.detachEvent?e.detachEvent("on"+r,t):e["on"+r]=null}function YP(e){let r=e.clientHeight;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r+=(0,Fi.int)(t.borderTopWidth),r+=(0,Fi.int)(t.borderBottomWidth),r}function qP(e){let r=e.clientWidth;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r+=(0,Fi.int)(t.borderLeftWidth),r+=(0,Fi.int)(t.borderRightWidth),r}function GP(e){let r=e.clientHeight;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r-=(0,Fi.int)(t.paddingTop),r-=(0,Fi.int)(t.paddingBottom),r}function KP(e){let r=e.clientWidth;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r-=(0,Fi.int)(t.paddingLeft),r-=(0,Fi.int)(t.paddingRight),r}function WP(e,r,t){const l=r===r.ownerDocument.body?{left:0,top:0}:r.getBoundingClientRect(),f=(e.clientX+r.scrollLeft-l.left)/t,c=(e.clientY+r.scrollTop-l.top)/t;return{x:f,y:c}}function QP(e,r){const t=T2(e,r,"px");return{[(0,_6.browserPrefixToKey)("transform",_6.default)]:t}}function ZP(e,r){return T2(e,r,"")}function T2(e,r,t){let{x:i,y:l}=e,f="translate(".concat(i).concat(t,",").concat(l).concat(t,")");if(r){const c="".concat(typeof r.x=="string"?r.x:r.x+t),h="".concat(typeof r.y=="string"?r.y:r.y+t);f="translate(".concat(c,", ").concat(h,")")+f}return f}function XP(e,r){return e.targetTouches&&(0,Fi.findInArray)(e.targetTouches,t=>r===t.identifier)||e.changedTouches&&(0,Fi.findInArray)(e.changedTouches,t=>r===t.identifier)}function JP(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function eB(e){if(!e)return;let r=e.getElementById("react-draggable-style-el");r||(r=e.createElement("style"),r.type="text/css",r.id="react-draggable-style-el",r.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
195
195
|
`,r.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
196
|
-
`,e.getElementsByTagName("head")[0].appendChild(r)),e.body&&D6(e.body,"react-draggable-transparent-selection")}function tB(e){if(e)try{if(e.body&&k6(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const r=(e.defaultView||window).getSelection();r&&r.type!=="Caret"&&r.removeAllRanges()}}catch{}}function D6(e,r){e.classList?e.classList.add(r):e.className.match(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)")))||(e.className+=" ".concat(r))}function k6(e,r){e.classList?e.classList.remove(r):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)"),"g"),"")}var cl={};Object.defineProperty(cl,"__esModule",{value:!0}),cl.canDragX=aB,cl.canDragY=iB,cl.createCoreData=lB,cl.createDraggableData=sB,cl.getBoundPosition=nB,cl.getControlPosition=oB,cl.snapToGrid=rB;var Ni=ul,ud=sr;function nB(e,r,t){if(!e.props.bounds)return[r,t];let{bounds:i}=e.props;i=typeof i=="string"?i:uB(i);const l=A2(e);if(typeof i=="string"){const{ownerDocument:f}=l,c=f.defaultView;let h;if(i==="parent"?h=l.parentNode:h=f.querySelector(i),!(h instanceof c.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');const m=h,d=c.getComputedStyle(l),g=c.getComputedStyle(m);i={left:-l.offsetLeft+(0,Ni.int)(g.paddingLeft)+(0,Ni.int)(d.marginLeft),top:-l.offsetTop+(0,Ni.int)(g.paddingTop)+(0,Ni.int)(d.marginTop),right:(0,ud.innerWidth)(m)-(0,ud.outerWidth)(l)-l.offsetLeft+(0,Ni.int)(g.paddingRight)-(0,Ni.int)(d.marginRight),bottom:(0,ud.innerHeight)(m)-(0,ud.outerHeight)(l)-l.offsetTop+(0,Ni.int)(g.paddingBottom)-(0,Ni.int)(d.marginBottom)}}return(0,Ni.isNum)(i.right)&&(r=Math.min(r,i.right)),(0,Ni.isNum)(i.bottom)&&(t=Math.min(t,i.bottom)),(0,Ni.isNum)(i.left)&&(r=Math.max(r,i.left)),(0,Ni.isNum)(i.top)&&(t=Math.max(t,i.top)),[r,t]}function rB(e,r,t){const i=Math.round(r/e[0])*e[0],l=Math.round(t/e[1])*e[1];return[i,l]}function aB(e){return e.props.axis==="both"||e.props.axis==="x"}function iB(e){return e.props.axis==="both"||e.props.axis==="y"}function oB(e,r,t){const i=typeof r=="number"?(0,ud.getTouch)(e,r):null;if(typeof r=="number"&&!i)return null;const l=A2(t),f=t.props.offsetParent||l.offsetParent||l.ownerDocument.body;return(0,ud.offsetXYFromParent)(i||e,f,t.props.scale)}function lB(e,r,t){const i=!(0,Ni.isNum)(e.lastX),l=A2(e);return i?{node:l,deltaX:0,deltaY:0,lastX:r,lastY:t,x:r,y:t}:{node:l,deltaX:r-e.lastX,deltaY:t-e.lastY,lastX:e.lastX,lastY:e.lastY,x:r,y:t}}function sB(e,r){const t=e.props.scale;return{node:r.node,x:e.state.x+r.deltaX/t,y:e.state.y+r.deltaY/t,deltaX:r.deltaX/t,deltaY:r.deltaY/t,lastX:e.state.x,lastY:e.state.y}}function uB(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function A2(e){const r=e.findDOMNode();if(!r)throw new Error("<DraggableCore>: Unmounted during event!");return r}var Tg={},Ag={};Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.default=cB;function cB(){}Object.defineProperty(Tg,"__esModule",{value:!0}),Tg.default=void 0;var O2=dB(W),li=F2(wt.exports),fB=F2(tu.exports),Ea=sr,lu=cl,R2=ul,qp=F2(Ag);function F2(e){return e&&e.__esModule?e:{default:e}}function T6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(T6=function(i){return i?t:r})(e)}function dB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=T6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function Va(e,r,t){return r=pB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function pB(e){var r=hB(e,"string");return typeof r=="symbol"?r:String(r)}function hB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}const bo={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let su=bo.mouse,Og=class extends O2.Component{constructor(){super(...arguments),Va(this,"dragging",!1),Va(this,"lastX",NaN),Va(this,"lastY",NaN),Va(this,"touchIdentifier",null),Va(this,"mounted",!1),Va(this,"handleDragStart",r=>{if(this.props.onMouseDown(r),!this.props.allowAnyClick&&typeof r.button=="number"&&r.button!==0)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:i}=t;if(this.props.disabled||!(r.target instanceof i.defaultView.Node)||this.props.handle&&!(0,Ea.matchesSelectorAndParentsTo)(r.target,this.props.handle,t)||this.props.cancel&&(0,Ea.matchesSelectorAndParentsTo)(r.target,this.props.cancel,t))return;r.type==="touchstart"&&r.preventDefault();const l=(0,Ea.getTouchIdentifier)(r);this.touchIdentifier=l;const f=(0,lu.getControlPosition)(r,l,this);if(f==null)return;const{x:c,y:h}=f,m=(0,lu.createCoreData)(this,c,h);(0,qp.default)("DraggableCore: handleDragStart: %j",m),(0,qp.default)("calling",this.props.onStart),!(this.props.onStart(r,m)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Ea.addUserSelectStyles)(i),this.dragging=!0,this.lastX=c,this.lastY=h,(0,Ea.addEvent)(i,su.move,this.handleDrag),(0,Ea.addEvent)(i,su.stop,this.handleDragStop))}),Va(this,"handleDrag",r=>{const t=(0,lu.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let h=i-this.lastX,m=l-this.lastY;if([h,m]=(0,lu.snapToGrid)(this.props.grid,h,m),!h&&!m)return;i=this.lastX+h,l=this.lastY+m}const f=(0,lu.createCoreData)(this,i,l);if((0,qp.default)("DraggableCore: handleDrag: %j",f),this.props.onDrag(r,f)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const m=document.createEvent("MouseEvents");m.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(m)}return}this.lastX=i,this.lastY=l}),Va(this,"handleDragStop",r=>{if(!this.dragging)return;const t=(0,lu.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let m=i-this.lastX||0,d=l-this.lastY||0;[m,d]=(0,lu.snapToGrid)(this.props.grid,m,d),i=this.lastX+m,l=this.lastY+d}const f=(0,lu.createCoreData)(this,i,l);if(this.props.onStop(r,f)===!1||this.mounted===!1)return!1;const h=this.findDOMNode();h&&this.props.enableUserSelectHack&&(0,Ea.removeUserSelectStyles)(h.ownerDocument),(0,qp.default)("DraggableCore: handleDragStop: %j",f),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,h&&((0,qp.default)("DraggableCore: Removing handlers"),(0,Ea.removeEvent)(h.ownerDocument,su.move,this.handleDrag),(0,Ea.removeEvent)(h.ownerDocument,su.stop,this.handleDragStop))}),Va(this,"onMouseDown",r=>(su=bo.mouse,this.handleDragStart(r))),Va(this,"onMouseUp",r=>(su=bo.mouse,this.handleDragStop(r))),Va(this,"onTouchStart",r=>(su=bo.touch,this.handleDragStart(r))),Va(this,"onTouchEnd",r=>(su=bo.touch,this.handleDragStop(r)))}componentDidMount(){this.mounted=!0;const r=this.findDOMNode();r&&(0,Ea.addEvent)(r,bo.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const r=this.findDOMNode();if(r){const{ownerDocument:t}=r;(0,Ea.removeEvent)(t,bo.mouse.move,this.handleDrag),(0,Ea.removeEvent)(t,bo.touch.move,this.handleDrag),(0,Ea.removeEvent)(t,bo.mouse.stop,this.handleDragStop),(0,Ea.removeEvent)(t,bo.touch.stop,this.handleDragStop),(0,Ea.removeEvent)(r,bo.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Ea.removeUserSelectStyles)(t)}}findDOMNode(){var r,t;return(r=this.props)!==null&&r!==void 0&&r.nodeRef?(t=this.props)===null||t===void 0||(t=t.nodeRef)===null||t===void 0?void 0:t.current:fB.default.findDOMNode(this)}render(){return O2.cloneElement(O2.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Tg.default=Og,Va(Og,"displayName","DraggableCore"),Va(Og,"propTypes",{allowAnyClick:li.default.bool,children:li.default.node.isRequired,disabled:li.default.bool,enableUserSelectHack:li.default.bool,offsetParent:function(e,r){if(e[r]&&e[r].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:li.default.arrayOf(li.default.number),handle:li.default.string,cancel:li.default.string,nodeRef:li.default.object,onStart:li.default.func,onDrag:li.default.func,onStop:li.default.func,onMouseDown:li.default.func,scale:li.default.number,className:R2.dontSetMe,style:R2.dontSetMe,transform:R2.dontSetMe}),Va(Og,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return m.default}}),e.default=void 0;var r=b(W),t=g(wt.exports),i=g(tu.exports),l=g(NP),f=sr,c=cl,h=ul,m=g(Tg),d=g(Ag);function g(T){return T&&T.__esModule?T:{default:T}}function C(T){if(typeof WeakMap!="function")return null;var D=new WeakMap,F=new WeakMap;return(C=function(N){return N?F:D})(T)}function b(T,D){if(!D&&T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var F=C(D);if(F&&F.has(T))return F.get(T);var N={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in T)if(P!=="default"&&Object.prototype.hasOwnProperty.call(T,P)){var U=L?Object.getOwnPropertyDescriptor(T,P):null;U&&(U.get||U.set)?Object.defineProperty(N,P,U):N[P]=T[P]}return N.default=T,F&&F.set(T,N),N}function x(){return x=Object.assign?Object.assign.bind():function(T){for(var D=1;D<arguments.length;D++){var F=arguments[D];for(var N in F)Object.prototype.hasOwnProperty.call(F,N)&&(T[N]=F[N])}return T},x.apply(this,arguments)}function _(T,D,F){return D=k(D),D in T?Object.defineProperty(T,D,{value:F,enumerable:!0,configurable:!0,writable:!0}):T[D]=F,T}function k(T){var D=S(T,"string");return typeof D=="symbol"?D:String(D)}function S(T,D){if(typeof T!="object"||T===null)return T;var F=T[Symbol.toPrimitive];if(F!==void 0){var N=F.call(T,D||"default");if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(T)}class A extends r.Component{static getDerivedStateFromProps(D,F){let{position:N}=D,{prevPropsPosition:L}=F;return N&&(!L||N.x!==L.x||N.y!==L.y)?((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:N,prevPropsPosition:L}),{x:N.x,y:N.y,prevPropsPosition:{...N}}):null}constructor(D){super(D),_(this,"onDragStart",(F,N)=>{if((0,d.default)("Draggable: onDragStart: %j",N),this.props.onStart(F,(0,c.createDraggableData)(this,N))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),_(this,"onDrag",(F,N)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",N);const L=(0,c.createDraggableData)(this,N),P={x:L.x,y:L.y,slackX:0,slackY:0};if(this.props.bounds){const{x:$,y:O}=P;P.x+=this.state.slackX,P.y+=this.state.slackY;const[z,j]=(0,c.getBoundPosition)(this,P.x,P.y);P.x=z,P.y=j,P.slackX=this.state.slackX+($-P.x),P.slackY=this.state.slackY+(O-P.y),L.x=P.x,L.y=P.y,L.deltaX=P.x-this.state.x,L.deltaY=P.y-this.state.y}if(this.props.onDrag(F,L)===!1)return!1;this.setState(P)}),_(this,"onDragStop",(F,N)=>{if(!this.state.dragging||this.props.onStop(F,(0,c.createDraggableData)(this,N))===!1)return!1;(0,d.default)("Draggable: onDragStop: %j",N);const P={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:$,y:O}=this.props.position;P.x=$,P.y=O}this.setState(P)}),this.state={dragging:!1,dragged:!1,x:D.position?D.position.x:D.defaultPosition.x,y:D.position?D.position.y:D.defaultPosition.y,prevPropsPosition:{...D.position},slackX:0,slackY:0,isElementSVG:!1},D.position&&(D.onDrag||D.onStop)}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var D,F;return(D=(F=this.props)===null||F===void 0||(F=F.nodeRef)===null||F===void 0?void 0:F.current)!==null&&D!==void 0?D:i.default.findDOMNode(this)}render(){const{axis:D,bounds:F,children:N,defaultPosition:L,defaultClassName:P,defaultClassNameDragging:U,defaultClassNameDragged:$,position:O,positionOffset:z,scale:j,...H}=this.props;let Y={},q=null;const ne=!Boolean(O)||this.state.dragging,G=O||L,ee={x:(0,c.canDragX)(this)&&ne?this.state.x:G.x,y:(0,c.canDragY)(this)&&ne?this.state.y:G.y};this.state.isElementSVG?q=(0,f.createSVGTransform)(ee,z):Y=(0,f.createCSSTransform)(ee,z);const Z=(0,l.default)(N.props.className||"",P,{[U]:this.state.dragging,[$]:this.state.dragged});return r.createElement(m.default,x({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(N),{className:Z,style:{...N.props.style,...Y},transform:q}))}}e.default=A,_(A,"displayName","Draggable"),_(A,"propTypes",{...m.default.propTypes,axis:t.default.oneOf(["both","x","y","none"]),bounds:t.default.oneOfType([t.default.shape({left:t.default.number,right:t.default.number,top:t.default.number,bottom:t.default.number}),t.default.string,t.default.oneOf([!1])]),defaultClassName:t.default.string,defaultClassNameDragging:t.default.string,defaultClassNameDragged:t.default.string,defaultPosition:t.default.shape({x:t.default.number,y:t.default.number}),positionOffset:t.default.shape({x:t.default.oneOfType([t.default.number,t.default.string]),y:t.default.oneOfType([t.default.number,t.default.string])}),position:t.default.shape({x:t.default.number,y:t.default.number}),className:h.dontSetMe,style:h.dontSetMe,transform:h.dontSetMe}),_(A,"defaultProps",{...m.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(s6);const{default:A6,DraggableCore:vB}=s6;Dg.exports=A6,Dg.exports.default=A6,Dg.exports.DraggableCore=vB;var N2={};N2.__esModule=!0,N2.cloneElement=CB;var mB=gB(W);function gB(e){return e&&e.__esModule?e:{default:e}}function O6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function R6(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?O6(Object(t),!0).forEach(function(i){yB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function yB(e,r,t){return r=xB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xB(e){var r=bB(e,"string");return typeof r=="symbol"?r:String(r)}function bB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function CB(e,r){return r.style&&e.props.style&&(r.style=R6(R6({},e.props.style),r.style)),r.className&&e.props.className&&(r.className=e.props.className+" "+r.className),mB.default.cloneElement(e,r)}var Gp={};Gp.__esModule=!0,Gp.resizableProps=void 0;var Bt=wB(wt.exports);function wB(e){return e&&e.__esModule?e:{default:e}}var _B={axis:Bt.default.oneOf(["both","x","y","none"]),className:Bt.default.string,children:Bt.default.element.isRequired,draggableOpts:Bt.default.shape({allowAnyClick:Bt.default.bool,cancel:Bt.default.string,children:Bt.default.node,disabled:Bt.default.bool,enableUserSelectHack:Bt.default.bool,offsetParent:Bt.default.node,grid:Bt.default.arrayOf(Bt.default.number),handle:Bt.default.string,nodeRef:Bt.default.object,onStart:Bt.default.func,onDrag:Bt.default.func,onStop:Bt.default.func,onMouseDown:Bt.default.func,scale:Bt.default.number}),height:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="y"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)},handle:Bt.default.oneOfType([Bt.default.node,Bt.default.func]),handleSize:Bt.default.arrayOf(Bt.default.number),lockAspectRatio:Bt.default.bool,maxConstraints:Bt.default.arrayOf(Bt.default.number),minConstraints:Bt.default.arrayOf(Bt.default.number),onResizeStop:Bt.default.func,onResizeStart:Bt.default.func,onResize:Bt.default.func,resizeHandles:Bt.default.arrayOf(Bt.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Bt.default.number,width:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="x"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)}};Gp.resizableProps=_B,Yp.__esModule=!0,Yp.default=void 0;var Kp=TB(W),EB=Dg.exports,SB=N2,DB=Gp,kB=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function F6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(F6=function(l){return l?t:r})(e)}function TB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=F6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},M2.apply(this,arguments)}function AB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function N6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function P2(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?N6(Object(t),!0).forEach(function(i){OB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function OB(e,r,t){return r=RB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RB(e){var r=FB(e,"string");return typeof r=="symbol"?r:String(r)}function FB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function NB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,B2(e,r)}function B2(e,r){return B2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},B2(e,r)}var L2=function(e){NB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.handleRefs={},i.lastHandleRect=null,i.slack=null,i}var t=r.prototype;return t.componentWillUnmount=function(){this.resetData()},t.resetData=function(){this.lastHandleRect=this.slack=null},t.runConstraints=function(l,f){var c=this.props,h=c.minConstraints,m=c.maxConstraints,d=c.lockAspectRatio;if(!h&&!m&&!d)return[l,f];if(d){var g=this.props.width/this.props.height,C=l-this.props.width,b=f-this.props.height;Math.abs(C)>Math.abs(b*g)?f=l/g:l=f*g}var x=l,_=f,k=this.slack||[0,0],S=k[0],A=k[1];return l+=S,f+=A,h&&(l=Math.max(h[0],l),f=Math.max(h[1],f)),m&&(l=Math.min(m[0],l),f=Math.min(m[1],f)),this.slack=[S+(x-l),A+(_-f)],[l,f]},t.resizeHandler=function(l,f){var c=this;return function(h,m){var d=m.node,g=m.deltaX,C=m.deltaY;l==="onResizeStart"&&c.resetData();var b=(c.props.axis==="both"||c.props.axis==="x")&&f!=="n"&&f!=="s",x=(c.props.axis==="both"||c.props.axis==="y")&&f!=="e"&&f!=="w";if(!(!b&&!x)){var _=f[0],k=f[f.length-1],S=d.getBoundingClientRect();if(c.lastHandleRect!=null){if(k==="w"){var A=S.left-c.lastHandleRect.left;g+=A}if(_==="n"){var T=S.top-c.lastHandleRect.top;C+=T}}c.lastHandleRect=S,k==="w"&&(g=-g),_==="n"&&(C=-C);var D=c.props.width+(b?g/c.props.transformScale:0),F=c.props.height+(x?C/c.props.transformScale:0),N=c.runConstraints(D,F);D=N[0],F=N[1];var L=D!==c.props.width||F!==c.props.height,P=typeof c.props[l]=="function"?c.props[l]:null,U=l==="onResize"&&!L;P&&!U&&(h.persist==null||h.persist(),P(h,{node:d,size:{width:D,height:F},handle:f})),l==="onResizeStop"&&c.resetData()}}},t.renderResizeHandle=function(l,f){var c=this.props.handle;if(!c)return Kp.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:f});if(typeof c=="function")return c(l,f);var h=typeof c.type=="string",m=P2({ref:f},h?{}:{handleAxis:l});return Kp.cloneElement(c,m)},t.render=function(){var l=this,f=this.props,c=f.children,h=f.className,m=f.draggableOpts;f.width,f.height,f.handle,f.handleSize,f.lockAspectRatio,f.axis,f.minConstraints,f.maxConstraints,f.onResize,f.onResizeStop,f.onResizeStart;var d=f.resizeHandles;f.transformScale;var g=AB(f,kB);return(0,SB.cloneElement)(c,P2(P2({},g),{},{className:(h?h+" ":"")+"react-resizable",children:[].concat(c.props.children,d.map(function(C){var b,x=(b=l.handleRefs[C])!=null?b:l.handleRefs[C]=Kp.createRef();return Kp.createElement(EB.DraggableCore,M2({},m,{nodeRef:x,key:"resizableHandle-"+C,onStop:l.resizeHandler("onResizeStop",C),onStart:l.resizeHandler("onResizeStart",C),onDrag:l.resizeHandler("onResize",C)}),l.renderResizeHandle(C,x))}))}))},r}(Kp.Component);Yp.default=L2,L2.propTypes=DB.resizableProps,L2.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Rg={};Rg.__esModule=!0,Rg.default=void 0;var z2=zB(W),MB=M6(wt.exports),PB=M6(Yp),BB=Gp,LB=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function M6(e){return e&&e.__esModule?e:{default:e}}function P6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(P6=function(l){return l?t:r})(e)}function zB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=P6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},U2.apply(this,arguments)}function B6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function Fg(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?B6(Object(t),!0).forEach(function(i){UB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function UB(e,r,t){return r=jB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function jB(e){var r=IB(e,"string");return typeof r=="symbol"?r:String(r)}function IB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function HB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function VB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,j2(e,r)}function j2(e,r){return j2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},j2(e,r)}var L6=function(e){VB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.state={width:i.props.width,height:i.props.height,propsWidth:i.props.width,propsHeight:i.props.height},i.onResize=function(h,m){var d=m.size;i.props.onResize?(h.persist==null||h.persist(),i.setState(d,function(){return i.props.onResize&&i.props.onResize(h,m)})):i.setState(d)},i}r.getDerivedStateFromProps=function(l,f){return f.propsWidth!==l.width||f.propsHeight!==l.height?{width:l.width,height:l.height,propsWidth:l.width,propsHeight:l.height}:null};var t=r.prototype;return t.render=function(){var l=this.props,f=l.handle,c=l.handleSize;l.onResize;var h=l.onResizeStart,m=l.onResizeStop,d=l.draggableOpts,g=l.minConstraints,C=l.maxConstraints,b=l.lockAspectRatio,x=l.axis;l.width,l.height;var _=l.resizeHandles,k=l.style,S=l.transformScale,A=HB(l,LB);return z2.createElement(PB.default,{axis:x,draggableOpts:d,handle:f,handleSize:c,height:this.state.height,lockAspectRatio:b,maxConstraints:C,minConstraints:g,onResizeStart:h,onResize:this.onResize,onResizeStop:m,resizeHandles:_,transformScale:S,width:this.state.width},z2.createElement("div",U2({},A,{style:Fg(Fg({},k),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(z2.Component);Rg.default=L6,L6.propTypes=Fg(Fg({},BB.resizableProps),{},{children:MB.default.element}),y2.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var $B=y2.exports.Resizable=Yp.default;y2.exports.ResizableBox=Rg.default;const YB={search:"search-table-module_search_17add",table:"search-table-module_table_5f652"},qB=e=>{const{onResize:r,width:t,resizeable:i,...l}=e;return!t||!i?Q("th",{...l}):Q($B,{width:t||200,height:0,onResize:r,draggableOpts:{enableUserSelectHack:!1},children:Q("th",{...l})})};function GB(e){const{tableProps:r={},searchProps:t,langId:i}=e,{minColumnWidth:l=200,resizeable:f=!1,tableId:c,storageKey:h="szld_table_cell_width",emptyText:m,...d}=r,[g,C]=W.useState(r.columns||[]),b=S=>{var T,D;let A=S.width||l;if(S.dataIndex&&c){const F=Array.isArray(S.dataIndex)?S.dataIndex.join("-"):String(S.dataIndex),N=(D=(T=Ub(h))==null?void 0:T[c])==null?void 0:D[F];N&&(A=N)}return A};W.useEffect(()=>{const S=r.columns||[];if(S.length===0||!f){C(S);return}const A=S==null?void 0:S.filter(T=>!T.hidden).map(T=>T.dataIndex?{...T,width:b(T),onHeaderCell:D=>({width:D.width,resizeable:f,onResize:(F,{size:N})=>x(D,N)})}:T);A.length>0&&(A[A.length-1].minWidth=A[A.length-1].width,A[A.length-1].width=void 0),C(A)},[r.columns,c,l,f]);const x=(S,A)=>{C(T=>{const D=T==null?void 0:T.map(F=>F.dataIndex===S.dataIndex?{...F,width:A.width}:F);if(c){const F=Ub(h)||{};F[c]=F[c]||{},D==null||D.forEach(N=>{if(N.dataIndex){const L=Array.isArray(N.dataIndex)?N.dataIndex.join("-"):String(N.dataIndex);F[c][L]=N.width}}),localStorage.setItem(h,JSON.stringify(F))}return D})},_={header:{cell:qB},...d==null?void 0:d.components},k=W.useMemo(()=>{var A;const S=T=>{let D=T.width||T.minWidth;return(!D||typeof D=="string")&&(D=l),D};return(A=g==null?void 0:g.map(T=>S(T)))==null?void 0:A.reduce((T,D)=>T+D,0)},[g,l]);return Pe(rn,{children:[t&&Q(g2,{hiddenTitle:!0,...t,items:t.items}),Q(ve.Table,{scroll:{x:k},...d,components:_,columns:g,className:rs(YB.table,r==null?void 0:r.className),locale:{emptyText:Q(ve.Empty,{image:ve.Empty.PRESENTED_IMAGE_SIMPLE,description:m})},pagination:typeof(r==null?void 0:r.pagination)=="boolean"?r.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:S=>i==="10001"?`共 ${S} 条`:`Total ${S} items`,...r==null?void 0:r.pagination}})]})}const KB={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},z6=W.createContext(null),WB=({index:e,...r})=>{const[t]=ve.Form.useForm();return Q(ve.Form,{form:t,component:!1,children:Q(z6.Provider,{value:t,children:Q("tr",{...r})})})};function QB(e){const{title:r,editable:t,children:i,dataIndex:l,record:f,rules:c,onChange:h,type:m="input",valueProps:d,initialValue:g,...C}=e,b=W.useRef(null),x=W.useContext(z6),_=async()=>{try{const A=await x.validateFields();h({...f,...A})}catch{}},k=()=>Q(l6,{valueType:m,valueProps:{...d,onBlur:_,onPressEnter:_},inputRef:b});let S=i;return t&&(S=Q(ve.Form.Item,{style:{margin:0},initialValue:g||ns.get(f,l),name:l,rules:c,children:k()})),Q("td",{...C,children:S})}function ZB(e){const{columns:r,onChange:t,...i}=e,l={body:{row:WB,cell:QB}},f=r==null?void 0:r.map(c=>c.editable?{...c,onCell:h=>({...c,record:h,onChange:t})}:c);return Q(ve.Table,{...i,components:l,rowClassName:()=>KB.editableRow,columns:f})}const U6=e=>{const{auth:r=!0,...t}=e;return r?Q(ve.Button,{...t}):null},XB=e=>{const{PId:r,auths:t,...i}=e,l=W.useMemo(()=>t?!!(typeof r=="number"&&t.find(f=>f.PId===r)||Array.isArray(r)&&t.filter(f=>r.includes(f.PId)).length>0):!1,[r,t]);return Q(U6,{...i,auth:l})},Wp={wrapper:"LoopSlide-module_wrapper_dde90",container:"LoopSlide-module_container_be123",scrollContent:"LoopSlide-module_scrollContent_36ed7",content:"LoopSlide-module_content_f392a"},JB=({speed:e=10,delay:r=1,timingFunction:t="linear",className:i="",style:l,children:f,height:c="100vh",mouseControl:h=!1,classes:m})=>{const d=W.useRef(null),g=W.useRef(null),C=W.useRef(null),b=W.useRef(null),x=W.useRef(0),_=W.useRef(),k=W.useRef(0),S=W.useMemo(()=>{if(!g.current||!C.current)return;const P=g.current,U=C.current,$=parseFloat(U.scrollHeight.toString());return $*2-P.clientHeight<$},[]),A=()=>{if(!g.current||!C.current)return;const P=g.current,U=C.current,$=parseFloat(U.scrollHeight.toString());if($*2<=P.clientHeight){P.style.animation="none";return}const O=$/P.clientHeight;P.style.setProperty("--content-height",`${$}px`),P.style.animationDuration=`${e*O}s`,P.style.animationDelay=`${r}s`,P.style.animationTimingFunction=t};W.useEffect(()=>(A(),g.current&&(b.current=new ResizeObserver(A),b.current.observe(g.current)),()=>{b.current&&g.current&&b.current.unobserve(g.current)}),[e,r]);const T=()=>{h&&g.current&&(g.current.style.animationPlayState="paused")},D=()=>{h&&g.current&&(L(),g.current.style.animationPlayState="running")},F=()=>{if(!g.current||!h)return;const U=g.current.getAnimations()[0];if(U)if(Math.abs(x.current)>.1){const $=performance.now(),O=$-k.current;k.current=$;const z=.95;x.current*=Math.pow(z,O/16);const j=U.currentTime||0;U.currentTime=j+x.current,_.current=requestAnimationFrame(F)}else x.current=0,L()},N=P=>{if(!h||!g.current)return;P.preventDefault();const U=P.deltaY,$=.25;x.current+=U*$;const O=50;x.current=Math.max(-O,Math.min(O,x.current)),_.current||(k.current=performance.now(),_.current=requestAnimationFrame(F))},L=()=>{_.current&&(cancelAnimationFrame(_.current),_.current=void 0)};return W.useEffect(()=>()=>{L()},[]),W.useEffect(()=>{const P=d.current;if(P)return h&&P.addEventListener("wheel",N,{passive:!1}),()=>{P.removeEventListener("wheel",N)}},[h]),Q("div",{ref:d,className:`${Wp.wrapper} ${i}`,style:{height:c,...l},onMouseEnter:T,onMouseLeave:D,children:Pe("div",{ref:g,className:rs(Wp.container,m==null?void 0:m.container),children:[Q("div",{ref:C,className:rs(Wp.content,m==null?void 0:m.content),children:f}),Q("div",{className:rs(Wp.content,m==null?void 0:m.content),children:f}),S&&Q("div",{className:rs(Wp.content,m==null?void 0:m.content),children:f})]})})},Pr={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},j6=e=>{const{data:r,current:t,rowKey:i,renderContent:l}=e,[f,c]=W.useState(!1),h=W.useMemo(()=>e.currentIndex!==void 0?e.currentIndex:!t||r.length===0?0:r.findIndex(C=>C.PNId===t),[t,r]),m=W.useMemo(()=>h>1?f?0:h-1:0,[h,f]),d=()=>{c(!0)};return Pe("ul",{className:Pr.main,children:[h>1&&!f&&Pe("li",{className:rs(Pr.item,Pr.itemDone),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Q("div",{className:Pr.content,children:Pe("div",{className:Pr.collpase,children:[Pe("div",{children:["已收起",Q("span",{children:h-1}),"个节点"]}),Pe("a",{className:Pr.btn,onClick:d,children:["展开节点",Q(F7,{})]})]})})]}),r.slice(m).map((g,C)=>Pe("li",{className:rs(Pr.item,h===C+m?Pr.itemActive:h>C+m?Pr.itemDone:Pr.itemUnDo),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Pe("div",{className:Pr.content,children:[l?l(g,C,f?h:h-m):Pe(rn,{children:[Q("div",{className:Pr.title,children:g.PNName}),Pe("div",{className:Pr.dateWrapper,children:[g.PlanFinishDate&&Pe("span",{children:["预计完成时间: ",g.PlanFinishDate]}),g.UpdateTime&&Pe("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",g.UpdateTime]})]}),g.Remark&&Q("div",{className:Pr.remark,children:g.Remark})]}),f&&h-1===C&&Pe("a",{className:Pr.btn,onClick:()=>c(!1),children:["收起节点 ",Q(X7,{})]})]})]},typeof i=="string"?g[i]:i(g)))]})},eL=e=>{const{current:r,data:t,rowKey:i,renderContent:l,currentIndex:f,...c}=e;return(()=>{ve.Modal.info({icon:null,title:"流程节点",width:700,content:Q(j6,{rowKey:i,renderContent:l,current:r,currentIndex:f,data:t}),closable:!0,footer:null,maskClosable:!0,...c})})(),null},I6={customPagination:"custom-pagination-module_customPagination_bb6f7",jumpBtns:"custom-pagination-module_jumpBtns_a6c0b"};function tL(e){const{totalText:r="共",unitText:t="条",jumpText:i="跳至",pageText:l="页",paginationProps:f}=e,[c,h]=W.useState(""),m=(f==null?void 0:f.pageSize)||10,d=b=>{h(b.target.value)},g=b=>{var x;h(""),!Number.isNaN(Number(b.target.value))&&((x=f==null?void 0:f.onChange)==null||x.call(f,Number(b.target.value),m))},C=b=>{var x;if(b.key==="Enter"){if(h(""),Number.isNaN(Number(c)))return;(x=f==null?void 0:f.onChange)==null||x.call(f,Number(c),m)}};return Pe("div",{className:I6.customPagination,children:[Q(ve.Pagination,{showTotal:b=>`${r} ${b} ${t}`,showSizeChanger:{options:[{label:`10 ${t}/${l}`,value:10},{label:`20 ${t}/${l}`,value:20},{label:`50 ${t}/${l}`,value:50},{label:`100 ${t}/${l}`,value:100}]},...f}),Pe("div",{className:I6.jumpBtns,children:[i,Q(ve.Input,{style:{width:"50px",margin:"0 8px"},value:c,onChange:d,onBlur:b=>g(b),onKeyDown:b=>C(b)}),l]})]})}var H6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t=1e3,i=6e4,l=36e5,f="millisecond",c="second",h="minute",m="hour",d="day",g="week",C="month",b="quarter",x="year",_="date",k="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var q=["th","st","nd","rd"],X=Y%100;return"["+Y+(q[(X-20)%10]||q[X]||q[0])+"]"}},D=function(Y,q,X){var ne=String(Y);return!ne||ne.length>=q?Y:""+Array(q+1-ne.length).join(X)+Y},F={s:D,z:function(Y){var q=-Y.utcOffset(),X=Math.abs(q),ne=Math.floor(X/60),G=X%60;return(q<=0?"+":"-")+D(ne,2,"0")+":"+D(G,2,"0")},m:function Y(q,X){if(q.date()<X.date())return-Y(X,q);var ne=12*(X.year()-q.year())+(X.month()-q.month()),G=q.clone().add(ne,C),ee=X-G<0,Z=q.clone().add(ne+(ee?-1:1),C);return+(-(ne+(X-G)/(ee?G-Z:Z-G))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:C,y:x,w:g,d,D:_,h:m,m:h,s:c,ms:f,Q:b}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},N="en",L={};L[N]=T;var P="$isDayjsObject",U=function(Y){return Y instanceof j||!(!Y||!Y[P])},$=function Y(q,X,ne){var G;if(!q)return N;if(typeof q=="string"){var ee=q.toLowerCase();L[ee]&&(G=ee),X&&(L[ee]=X,G=ee);var Z=q.split("-");if(!G&&Z.length>1)return Y(Z[0])}else{var V=q.name;L[V]=q,G=V}return!ne&&G&&(N=G),G||!ne&&N},O=function(Y,q){if(U(Y))return Y.clone();var X=typeof q=="object"?q:{};return X.date=Y,X.args=arguments,new j(X)},z=F;z.l=$,z.i=U,z.w=function(Y,q){return O(Y,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var j=function(){function Y(X){this.$L=$(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[P]=!0}var q=Y.prototype;return q.parse=function(X){this.$d=function(ne){var G=ne.date,ee=ne.utc;if(G===null)return new Date(NaN);if(z.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var Z=G.match(S);if(Z){var V=Z[2]-1||0,te=(Z[7]||"0").substring(0,3);return ee?new Date(Date.UTC(Z[1],V,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,te)):new Date(Z[1],V,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,te)}}return new Date(G)}(X),this.init()},q.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},q.$utils=function(){return z},q.isValid=function(){return this.$d.toString()!==k},q.isSame=function(X,ne){var G=O(X);return this.startOf(ne)<=G&&G<=this.endOf(ne)},q.isAfter=function(X,ne){return O(X)<this.startOf(ne)},q.isBefore=function(X,ne){return this.endOf(ne)<O(X)},q.$g=function(X,ne,G){return z.u(X)?this[ne]:this.set(G,X)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(X,ne){var G=this,ee=!!z.u(ne)||ne,Z=z.p(X),V=function(Ae,De){var qe=z.w(G.$u?Date.UTC(G.$y,De,Ae):new Date(G.$y,De,Ae),G);return ee?qe:qe.endOf(d)},te=function(Ae,De){return z.w(G.toDate()[Ae].apply(G.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(De)),G)},oe=this.$W,re=this.$M,pe=this.$D,me="set"+(this.$u?"UTC":"");switch(Z){case x:return ee?V(1,0):V(31,11);case C:return ee?V(1,re):V(0,re+1);case g:var Ce=this.$locale().weekStart||0,se=(oe<Ce?oe+7:oe)-Ce;return V(ee?pe-se:pe+(6-se),re);case d:case _:return te(me+"Hours",0);case m:return te(me+"Minutes",1);case h:return te(me+"Seconds",2);case c:return te(me+"Milliseconds",3);default:return this.clone()}},q.endOf=function(X){return this.startOf(X,!1)},q.$set=function(X,ne){var G,ee=z.p(X),Z="set"+(this.$u?"UTC":""),V=(G={},G[d]=Z+"Date",G[_]=Z+"Date",G[C]=Z+"Month",G[x]=Z+"FullYear",G[m]=Z+"Hours",G[h]=Z+"Minutes",G[c]=Z+"Seconds",G[f]=Z+"Milliseconds",G)[ee],te=ee===d?this.$D+(ne-this.$W):ne;if(ee===C||ee===x){var oe=this.clone().set(_,1);oe.$d[V](te),oe.init(),this.$d=oe.set(_,Math.min(this.$D,oe.daysInMonth())).$d}else V&&this.$d[V](te);return this.init(),this},q.set=function(X,ne){return this.clone().$set(X,ne)},q.get=function(X){return this[z.p(X)]()},q.add=function(X,ne){var G,ee=this;X=Number(X);var Z=z.p(ne),V=function(re){var pe=O(ee);return z.w(pe.date(pe.date()+Math.round(re*X)),ee)};if(Z===C)return this.set(C,this.$M+X);if(Z===x)return this.set(x,this.$y+X);if(Z===d)return V(1);if(Z===g)return V(7);var te=(G={},G[h]=i,G[m]=l,G[c]=t,G)[Z]||1,oe=this.$d.getTime()+X*te;return z.w(oe,this)},q.subtract=function(X,ne){return this.add(-1*X,ne)},q.format=function(X){var ne=this,G=this.$locale();if(!this.isValid())return G.invalidDate||k;var ee=X||"YYYY-MM-DDTHH:mm:ssZ",Z=z.z(this),V=this.$H,te=this.$m,oe=this.$M,re=G.weekdays,pe=G.months,me=G.meridiem,Ce=function(De,qe,Se,We){return De&&(De[qe]||De(ne,ee))||Se[qe].slice(0,We)},se=function(De){return z.s(V%12||12,De,"0")},Ae=me||function(De,qe,Se){var We=De<12?"AM":"PM";return Se?We.toLowerCase():We};return ee.replace(A,function(De,qe){return qe||function(Se){switch(Se){case"YY":return String(ne.$y).slice(-2);case"YYYY":return z.s(ne.$y,4,"0");case"M":return oe+1;case"MM":return z.s(oe+1,2,"0");case"MMM":return Ce(G.monthsShort,oe,pe,3);case"MMMM":return Ce(pe,oe);case"D":return ne.$D;case"DD":return z.s(ne.$D,2,"0");case"d":return String(ne.$W);case"dd":return Ce(G.weekdaysMin,ne.$W,re,2);case"ddd":return Ce(G.weekdaysShort,ne.$W,re,3);case"dddd":return re[ne.$W];case"H":return String(V);case"HH":return z.s(V,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return Ae(V,te,!0);case"A":return Ae(V,te,!1);case"m":return String(te);case"mm":return z.s(te,2,"0");case"s":return String(ne.$s);case"ss":return z.s(ne.$s,2,"0");case"SSS":return z.s(ne.$ms,3,"0");case"Z":return Z}return null}(De)||Z.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(X,ne,G){var ee,Z=this,V=z.p(ne),te=O(X),oe=(te.utcOffset()-this.utcOffset())*i,re=this-te,pe=function(){return z.m(Z,te)};switch(V){case x:ee=pe()/12;break;case C:ee=pe();break;case b:ee=pe()/3;break;case g:ee=(re-oe)/6048e5;break;case d:ee=(re-oe)/864e5;break;case m:ee=re/l;break;case h:ee=re/i;break;case c:ee=re/t;break;default:ee=re}return G?ee:z.a(ee)},q.daysInMonth=function(){return this.endOf(C).$D},q.$locale=function(){return L[this.$L]},q.locale=function(X,ne){if(!X)return this.$L;var G=this.clone(),ee=$(X,ne,!0);return ee&&(G.$L=ee),G},q.clone=function(){return z.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},Y}(),H=j.prototype;return O.prototype=H,[["$ms",f],["$s",c],["$m",h],["$H",m],["$W",d],["$M",C],["$y",x],["$D",_]].forEach(function(Y){H[Y[1]]=function(q){return this.$g(q,Y[0],Y[1])}}),O.extend=function(Y,q){return Y.$i||(Y(q,j,O),Y.$i=!0),O},O.locale=$,O.isDayjs=U,O.unix=function(Y){return O(1e3*Y)},O.en=L[N],O.Ls=L,O.p={},O})})(H6);const bn=H6.exports,Qp=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},Dc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default);if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t==null?void 0:t.split("~"),t=t.map(h=>h)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(h=>bn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const h=(c=e.json)==null?void 0:c["cascader-delimiter"];h&&(t=t.split(h).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(m=>({...m,url:m.FilePath,name:m.FileName,uid:m.FileId}))}catch{t=[]}return e.attrtype===1&&(t=nL(e.children||[])),t||null},V6=e=>e&&e<bn().startOf("day"),$6=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},nL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)},I2=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c})=>{var g;let h=[];const m=async C=>{var x;let b=[];if(c.classify)try{const _=await r(C,{asctypeid:c.classify});(x=_==null?void 0:_.data)!=null&&x.list&&Array.isArray(_.data.list)&&(b=_.data.list.map(k=>({label:`${k.dicid||""}-${k.info||""}`,value:`${k.dicid||""}-${k.info||""}`})))}catch{ve.message.error("加载选项失败")}return b},d=async()=>{var C,b;try{const x=((C=c==null?void 0:c["key-field"])==null?void 0:C.list)||[],_=((b=c==null?void 0:c["key-field"])==null?void 0:b.delimiter)||"",k=c==null?void 0:c["field-names"];if(!x.length){ve.message.error("请配置key-field");return}const S=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(S!=null&&S.data){const A=S==null?void 0:S.data,T=(A==null?void 0:A.list)||[];let D=[];Array.isArray(A)&&(D=A),Array.isArray(T)&&(D=T),k?h=D:h=D.map(F=>({label:$6(F,_,x),value:$6(F,_,x)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(h=((g=c.data)==null?void 0:g.map(C=>({label:C,value:C})))||[],c.options&&Array.isArray(c.options)&&(h=c.options)):c.inputType==="dictionary"?h=await m(t):c.inputType==="system-dictionary"&&(h=await m(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await d(),h};function uu(e){try{return JSON.parse(e)}catch{return{}}}function Zp(e){if(!Y6(e))return e;const r=atob(e),t=new Uint8Array(r.length);for(let i=0;i<r.length;i++)t[i]=r.charCodeAt(i);return new TextDecoder().decode(t)}function Y6(e){return e?e.length%4!==0?!1:/^[A-Za-z0-9+/]+(?:=?=?)$/.test(e):!0}const rL=(e,r)=>{var b;let t=ns.cloneDeep(e);const{attr_list:i=[]}=t,{isMobile:l=!1,guid:f,isListToObj:c=!1,isAutoFill:h=!0,onlyNumber:m=""}=e;let d=[];h&&((b=t==null?void 0:t.attr_list)==null||b.forEach(x=>{var _,k,S,A,T,D;(_=x==null?void 0:x.json)!=null&&_["auto-generate"]&&((k=x==null?void 0:x.json)!=null&&k["auto-generate-type"])&&(((S=x==null?void 0:x.json)==null?void 0:S["auto-generate-type"])==="currenttime"&&(x.attrvalue=bn().format("YYYY-MM-DD HH:mm:ss")),((A=x==null?void 0:x.json)==null?void 0:A["auto-generate-type"])==="guid"&&(x.attrvalue=m||f||"")),(T=x==null?void 0:x.json)!=null&&T.default&&(x.attrvalue=(D=x==null?void 0:x.json)==null?void 0:D.default)}));const g=(x,_)=>{try{const k=new Map(x.map((S,A)=>[S.attrid,A]));for(const[S,A]of Object.entries(_)){const T=k.get(S);if(T===void 0)continue;let D=x[T];if(!A&&A!==0){D.attrvalue="";continue}D=C(D,A,l)}x.forEach(S=>{S.children&&Array.isArray(S.children)&&S.children.length>0&&!Array.isArray(S.children[0])&&_[S.attrid]&&g(S.children,_[S.attrid]),S.children&&Array.isArray(S.children)&&S.children.length>0&&Array.isArray(S.children[0])&&S.children.forEach((A,T)=>{var D,F;A&&Array.isArray(A)&&((D=_==null?void 0:_[S.attrid])!=null&&D[T])&&g(A,(F=_==null?void 0:_[S.attrid])==null?void 0:F[T])})})}catch{}},C=(x,_,k)=>{var T,D,F,N;const S=(T=x.json)==null?void 0:T.input,A=(D=x.json)==null?void 0:D.format;switch(S){case"image":case"file":case"video":case"audio":const L=typeof _=="string"?JSON.parse(_):_;if(!Array.isArray(L)){x.attrvalue=JSON.stringify([]);return}const P=L.filter(O=>O.FileId),U=L.filter(O=>{var z;return O.status==="done"&&((z=O.response)==null?void 0:z.data)}).map(O=>O.response.data),$=[...P,...U];d=[...d,...U],x.attrvalue=JSON.stringify($);break;case"cascader":if(Array.isArray(_)&&_.length>0){const O=((F=x.json)==null?void 0:F["cascader-delimiter"])||"/";x.attrvalue=_.join(O)}else x.attrvalue="";break;case"range-picker":k?Array.isArray(_)&&_.length>0?x.attrvalue=_==null?void 0:_.map(O=>bn(O).format(A||"YYYY-MM-DD")).join("~"):x.attrvalue="":Array.isArray(_)&&_.length>0?x.attrvalue=_.join("~"):x.attrvalue="";break;case"multiple-date-picker":k?Array.isArray(_)&&_.length>0?x.attrvalue=_==null?void 0:_.map(O=>bn(O).format(A||"YYYY-MM-DD")).join(","):x.attrvalue=_:Array.isArray(_)&&_.length>0?x.attrvalue=_.join(","):x.attrvalue=_;break;case"checkbox":case"mult-select":Array.isArray(_)&&_.length>0?x.attrvalue=_.join(","):x.attrvalue=_;break;case"date-picker":_?x.attrvalue=bn(_).format(A||"YYYY-MM-DD"):x.attrvalue="";break;case"time-picker":_?x.attrvalue=bn(_).format(A||"YYYY-MM-DD HH:mm:ss"):x.attrvalue="";break;default:(N=x==null?void 0:x.json)!=null&&N["properties-multiple"]||(x.attrvalue=_);break}return x};return t.attr_list&&Array.isArray(t.attr_list)&&g(i,r),{updatedData:c?W6(t.attr_list||[]):t,uploadedFiles:d}},H2=(e,r)=>e.map(t=>{var f,c,h;const i=q6(t,r),{children:l}=i;if(l&&!Array.isArray(l==null?void 0:l[0])&&(l!=null&&l.length)&&(i.children=[H2(l)]),i!=null&&i.children&&Array.isArray((f=i==null?void 0:i.children)==null?void 0:f[0])&&((c=i==null?void 0:i.children)!=null&&c.length)){const m=(h=i==null?void 0:i.children)==null?void 0:h.map(d=>d==null?void 0:d.map(g=>q6(g,r)));i.children=m}return i}),q6=(e,r)=>{var t,i;if(!e.json&&e.info)try{const l=e.info_base64===1?Zp(e.info):e.info,f=uu(l),c=ns.cloneDeep(r)||{},{langConfig:h=[],attrLangConfig:m=[]}=c||{};return c==null||delete c.langConfig,h!=null&&h.length&&((t=f==null?void 0:f.data)!=null&&t.length)&&(f==null?void 0:f.inputType)==="local"&&(f.options=(i=f.data)==null?void 0:i.map(d=>({label:Ji(h,d),value:d})),f==null||delete f.data),h!=null&&h.length&&(f!=null&&f["combination-name"])&&(f["combination-name"]=Ji(m,f["combination-name"])||Ji(h,f["combination-name"])),h!=null&&h.length&&(f!=null&&f["default-prompt"])&&(f["default-prompt"]=Ji(m,f["default-prompt"])),h!=null&&h.length&&(f!=null&&f.instruction)&&(f.instruction=Ji(m,f.instruction)),h!=null&&h.length&&(f!=null&&f["regexp-message"])&&(f["regexp-message"]=Ji(m,f["regexp-message"])),{...e,json:f,...c,info:JSON.stringify(f)}}catch{return{...e,json:{},...r}}return{...e,...r}},G6=(e,r)=>H2(e,r),K6=(e,r)=>{const t=H2(e,r),i=t.filter(c=>{var h;return(h=c.json)==null?void 0:h.combination}).reduce((c,h)=>{const m=h.json["combination-id"];return m&&(c[m]||(c[m]=[]),c[m].push(h)),c},{}),l=new Set;Object.values(i).forEach(c=>{(c==null?void 0:c.length)!==0&&c.slice(1).forEach(h=>l.add(h.attrid))});const f=c=>c.filter(h=>!l.has(h.attrid)).map(h=>{var g;const m=(g=h.json)==null?void 0:g["combination-id"];if(m&&i[m]){const C={...h,json:{...h.json,combinations:i[m]}},{children:b}=C;return b&&Array.isArray(b==null?void 0:b[0])&&(b!=null&&b.length)&&(C.children=b==null?void 0:b.map(x=>f(x))),C}const{children:d}=h;return d&&Array.isArray(d==null?void 0:d[0])&&(d!=null&&d.length)&&(h.children=d==null?void 0:d.map(C=>f(C))),h});return f(t)},aL=async({number:e,key:r,sourceNumber:t,guidInterfaceName:i,SelPCParamInterfaceName:l,servicerAttrListInterfaceName:f,accepterAttrListInterfaceName:c,defaultAttrListInterfaceName:h,commonRequest:m,guidParams:d,pcParam:g,attrReqKey:C="asid",attrListExtraParams:b={}})=>new Promise(async(x,_)=>{var N,L,P,U;let k="",S=[],A={},T={};const D=await m(i||"FWDXGLCreateGUID",d||{"source-number":t});(D==null?void 0:D.ReturnValue)===1&&((N=D==null?void 0:D.data)!=null&&N.GUID)?k=D.data.GUID:_("获取GUID失败");const F=await m(l||"FWDXGLSelPCParam",g||{"source-number":t});if((F==null?void 0:F.ReturnValue)===1){const $=(L=F.data[e])==null?void 0:L[r],O=(P=F.data[e])==null?void 0:P["properties-type"],z={server:f||"",accepter:c||""};T=F.data;const j=await m(z[O]||h,{[C]:$,"source-number":t,...b});if((j==null?void 0:j.ReturnValue)===1&&j.data){const H=((U=j.data)==null?void 0:U.attr_list)||[];S=K6(H),A={...j.data,attr_list:S},x({baseData:A,newGUID:k,attrListConfigs:S,selPCParam:T})}else _("请配置属性集")}else _("获取配置失败")}),iL=async(e,r,t)=>await t(e,r);function oL(e){return e.replace(/-([a-z])/g,function(r,t){return t.toUpperCase()})}const W6=e=>{var l;function r(f){const c={};return f.forEach(h=>{var d,g,C,b,x,_,k;const m=`${h.attrid}_${h.attrtype}`;if(h.attrtype===1&&h.children.length>0&&!Array.isArray(h.children))c[m]={asid:((g=(d=h.children)==null?void 0:d[0])==null?void 0:g.asid)||"",data_list:[r(h.children)]};else if(h.attrtype===1&&h.children.length>0&&Array.isArray(h.children)){let{children:S=[],attrvalue:A}=h||{};A&&(A!=null&&A.length)&&Array.isArray(A)?S=A.map(T=>{var N,L,P,U;const D=(N=Object.values(T))==null?void 0:N.findIndex($=>Array.isArray($)),F=((L=Object.keys(T))==null?void 0:L[D])||"";if(F){const $=((P=S==null?void 0:S[0])==null?void 0:P.find(z=>z.attrid===F))||{},{input:O}=($==null?void 0:$.json)||{};if(["file","image","video","audio"].includes(O)){const z=((U=Object.values(T))==null?void 0:U[D])||[],j=z.filter(q=>q.FileId),H=z.filter(q=>{var X;return q.status==="done"&&((X=q.response)==null?void 0:X.data)}).map(q=>q.response.data),Y=[...j,...H];T[F]=Y}}return X6((S==null?void 0:S[0])||[],T)}):(h.childAsid=((b=(C=S==null?void 0:S[0])==null?void 0:C[0])==null?void 0:b.asid)||"",S=[[]]),S!=null&&S.length&&Array.isArray(S==null?void 0:S[0])&&(c[m]={asid:((_=(x=S==null?void 0:S[0])==null?void 0:x[0])==null?void 0:_.asid)||h.childAsid||"",data_list:(S==null?void 0:S.length)&&((k=S==null?void 0:S[0])==null?void 0:k.length)&&S.map(T=>r(T))||[]})}else c[m]=h.attrvalue}),c}const t=((l=e[0])==null?void 0:l.asid)||"",i=[r(e)];return{data:{asid:t,data_list:i}}},Q6=async({attrList:e,params:r,extra:t={},commonRequest:i})=>{var h;const l=await i("YLFWLRDataDetails",r),f=((h=l==null?void 0:l.data)==null?void 0:h.list)||[];return f.length?await Promise.all(f.map(async m=>await Promise.all((e==null?void 0:e.map(async g=>{const C={...g,...t};if(C.attrvalue=(m==null?void 0:m[g.attrid])||"",g.attrtype===1&&Array.isArray(g.children)&&g.children.length>0){const b=(m==null?void 0:m[g.attrid])||{};C.children=await Q6({attrList:g.children,params:b,extra:t,commonRequest:i})}return C}))||[])))||[]:e.map(m=>({...m,...t,attrvalue:"",children:[]}))},kc=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},Ji=(e,r)=>{const t=e.find(i=>(i==null?void 0:i.dataid)===r);return(t==null?void 0:t.content)??r},Z6=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:h=[]})=>{var C;let m=[];const d=async b=>{var _;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(_=k==null?void 0:k.data)!=null&&_.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(S=>({label:`${S.dicid||""}-${S.info||""}`,value:`${S.dicid||""}-${S.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},g=async()=>{var b,x;try{const _=((b=c==null?void 0:c["key-field"])==null?void 0:b.list)||[],k=((x=c==null?void 0:c["key-field"])==null?void 0:x.delimiter)||"",S=c==null?void 0:c["field-names"];if(!_.length){ve.message.error("请配置key-field");return}const A=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(A!=null&&A.data){const T=A==null?void 0:A.data,D=(T==null?void 0:T.list)||[];let F=[];Array.isArray(T)&&(F=T),Array.isArray(D)&&(F=D),S?m=F:m=F.map(N=>({label:kc(N,k,_),value:kc(N,k,_)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(m=((C=c.data)==null?void 0:C.map(b=>({label:Ji(h,b),value:b})))||[],c.options&&Array.isArray(c.options)&&(m=c.options)):c.inputType==="dictionary"?m=await d(t):c.inputType==="system-dictionary"&&(m=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await g(),m},X6=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),lL=Object.freeze(Object.defineProperty({__proto__:null,getJson:uu,base64ToString:Zp,isBase64:Y6,handleSubmitForm:rL,handleBaseAttrList:G6,handleAttrList:K6,handleFormConfig:aL,handleOperationFile:iL,handleKebabToCamel:oL,handleAttrListToObj:W6,handleAttrListToObjDetail:Q6,handleUrlOptions:kc,getTitle:Ji,handleSelectOptions:Z6,handleObjDetailToSignleAttrList:X6},Symbol.toStringTag,{value:"Module"})),J6=async(e,r,t)=>{var i;try{const l=await r(t||"SERATTALLList",e);return(l==null?void 0:l.ReturnValue)===1?((i=l==null?void 0:l.data)==null?void 0:i.attr_list)||[]:[]}catch{}},sL=async(e,r,t)=>{var i;try{const l=await r(t||"YLFWLRDataDetails",e);return(l==null?void 0:l.ReturnValue)===1?((i=l==null?void 0:l.data)==null?void 0:i.list)||[]:[]}catch{}},uL=async(e,r,t)=>{var l;const i={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"};try{const f=await r(t||i,e);return(f==null?void 0:f.ReturnValue)===1?((l=f==null?void 0:f.data)==null?void 0:l.list)||[]:[]}catch{}},cL=async({params:e,commonRequestWidthParams:r,requestParams:t})=>{const i={PageName:"PCInstanceData",Controlname:"DataProcess"};try{return await r(t||i||{},e)}catch{}},fL=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),eD=(e,r,t)=>({style:{backgroundColor:r!==void 0&&r%2===1?(t==null?void 0:t[0])||"var(--bg-color-2)":(t==null?void 0:t[1])||"var(--bg-color-3)"}}),dL=Object.freeze(Object.defineProperty({__proto__:null,handleGetAttrList:J6,handleGetAttrDetail:sL,handleGetList:uL,handleCallSupportCode:cL,handleObjDetailToSignleAttrList:fL,handleSetTableRowColor:eD},Symbol.toStringTag,{value:"Module"})),pL=(e,r)=>{const t=new URL(e),i=new URL(r);return t.protocol===i.protocol&&t.host===i.host&&t.port===i.port},hL=e=>{const r=String(e).split("/");return r[r.length-1]},vL=e=>{var t;return(t=e.headers.get("content-disposition"))==null?void 0:t.split(";")[1].split("=")[1]},tD=(e,r)=>{const t=r||hL(e);if(pL(e,window.location.href)){V2(e,t);return}let i=r;fetch(e,{method:"get"}).then(l=>(i||(i=vL(l)),l.blob())).then(l=>{nD(l,i||t)}).catch(()=>{V2(e,"")})},mL=e=>{for(var r=e.split(","),t=r[0].match(/:(.*?);/)[1],i=window.atob(r[1]),l=i.length,f=new Uint8Array(l);l--;)f[l]=i.charCodeAt(l);return new Blob([f],{type:t})},nD=(e,r)=>{let t="";e instanceof Blob?t=window.URL.createObjectURL(e):t=window.URL.createObjectURL(mL(e));const i=window.navigator;if(i.msSaveOrOpenBlob){i.msSaveOrOpenBlob(e,r);return}V2(t,r),window.URL.revokeObjectURL(t)},V2=(e,r)=>{let t=document.createElement("a");t.style.display="none",t.href=e,t.target="_blank",t.download=r,document.body.appendChild(t),t.click(),document.body.removeChild(t)},gL=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:tD,downloadBlob:nD},Symbol.toStringTag,{value:"Module"}));function rD(){const{message:e,modal:r}=ve.App.useApp(),t={},i=async({selListData:C,handleSearch:b,handleReset:x,detail:_,styles:k,attributeSetId:S,commonRequest:A,commonRequestWidthParams:T,getTitle:D,searchText:F="搜索",resetText:N="重置",langConfig:L=[]})=>{var P;try{C!=null&&C.length&&_&&C.forEach(Y=>{var X;const q=((X=Y["default-render-data"])==null?void 0:X.key)||"";q&&(Y.attrvalue=(_==null?void 0:_[q])||"")});const U=C.filter(Y=>{var q;return((q=Y.renderdata)==null?void 0:q.input)!=="tab"&&!(Y!=null&&Y["default-render-data"])}),$=U.filter(Y=>{var q;return["select","checkbox","radio","mult-select","cascader"].includes((q=Y.renderdata)==null?void 0:q.input)});let O=[];if($!=null&&$.length)if((P=t[S])!=null&&P.length)O=t[S];else{const Y=await J6({asid:S},A);O=G6(Y)||[],t[S]=O||[]}const z=await Promise.all(U.map(async Y=>{var te;const q=Y.renderdata||{},{input:X,width:ne}=q||{},G=(q==null?void 0:q["label-col"])||6,ee=()=>{const oe=q["default-prompt"];if(D){if(typeof oe=="string"){const re=D(S||"",oe),pe=g(re);return X==="range-picker"&&oe&&pe?JSON.parse(re):re}}else return oe||""};let Z="input";switch(X){case"range-picker":Z="rangePicker";break;case"number":Z="inputNumber";break;case"select":case"checkbox":case"radio":case"textarea":Z=X;break;case"mult-select":Z="select";break;case"time-picker":Z="timePicker";break;case"date-picker":Z="datePicker";break;case"cascader":Z="cascader";break;default:Z="input";break}const V={dataIndex:Y.attrid,title:Y.attrname||"",valueType:Z,valueProps:{placeholder:ee()},colProps:{},formItemProps:{style:{marginBottom:10,width:typeof ne=="string"?`${ne}px`:ne||240},labelCol:{span:G}}};if(["select","checkbox","radio","mult-select","cascader"].includes(X)){const oe=Y.attrid||"",re=O.find(Ce=>Ce.attrid===oe);let pe=(re==null?void 0:re.json)||{};!(pe!=null&&pe.inputType)&&(q!=null&&q["input-type"])&&(pe={...pe,inputType:q==null?void 0:q["input-type"],"action-url":q==null?void 0:q["action-url"],"field-names":q==null?void 0:q["field-names"],"key-field":{...q==null?void 0:q["key-field"]}});let me=await Z6({item:pe||{},commonRequest:A,commonRequestWidthParams:T,langConfig:L||[]});if(!(me!=null&&me.length)){const{data:Ce=[]}=q||{};Ce!=null&&Ce.length&&(me=Ce==null?void 0:Ce.map(se=>({label:se||"",value:se||""}))),(te=q==null?void 0:q.options)!=null&&te.length&&(me=(q==null?void 0:q.options)||[])}if(X==="cascader"){const Ce=d(me,q==null?void 0:q["field-names"]);V.valueProps.options=Ce||[]}else V.valueProps.options=me||[]}return V}));let j={color:"#ffffff",borderRadius:4,fontSize:14,height:32},H={color:"#333333",borderRadius:4,fontSize:14,height:32,borderColor:"#D9D9D9"};return z.push({dataIndex:"btns",valueType:"btns",valueProps:[{btnType:"submit",title:F,type:"primary",shape:"default",style:{...j,...k==null?void 0:k.searchStyle},onClick:Y=>b(Y,C)},{btnType:"reset",title:N,style:{...H,...k==null?void 0:k.resetStyle},onClick:()=>x(C)}],colProps:{flex:"none"},formItemProps:{style:{marginBottom:10,minWidth:127}}}),{formItems:z,selList:C}}catch{return{formItems:[],selList:[]}}},l=({universalHeader:C,extraBtn:b,operationColumnConfig:x,attributeSetId:_,getTitle:k,downloadText:S="下载",isDefaultWidth:A=!0,otherLangPageId:T,objDefaultLangPageId:D="5000000"})=>{if(!(C!=null&&C.length))return e.error("请配置 universalHeader表头数据");const F=f(C),N=F==null?void 0:F.map(L=>{const P={title:_?(k==null?void 0:k(_,L==null?void 0:L["header-attribute-id"]))||"":(L==null?void 0:L["header-name"])||"",dataIndex:(L==null?void 0:L["header-attribute-id"])||"",width:A?(L==null?void 0:L["header-width"])||180:void 0,render:(O,z)=>{var j,H;if(O&&O&&typeof O=="string"&&(O!=null&&O.includes("FileName"))&&(O!=null&&O.includes("FilePath"))){try{const Y=JSON.parse(O);return Y!=null&&Y.length?Q(ve.Flex,{vertical:!0,children:Y==null?void 0:Y.map(q=>{const{FileName:X,FilePath:ne}=q||{};return Pe(ve.Space,{children:[Q("span",{children:X}),Q(ve.Button,{type:"link",size:"small",onClick:()=>tD(ne),children:S})]})})}):"-"}catch{}return Q(ve.Space,{})}if(L!=null&&L["show-lang-data-id"]&&T){if(O&&O&&typeof O=="object"&&((j=Object.keys(O))!=null&&j.includes("delimiter"))){const{list:Y,delimiter:q=","}=O||{},X=Y==null?void 0:Y.map(ne=>{const G=(ne==null?void 0:ne.split("|"))||[],ee=(G==null?void 0:G.length)>1?G[0]:D,Z=(G==null?void 0:G.length)>1?G[1]:G[0];return k==null?void 0:k(ee,Z)});return Q("span",{dangerouslySetInnerHTML:{__html:((H=X==null?void 0:X.join(q))==null?void 0:H.replace(/br/g,"<br>"))||"-"}})}return Q(ve.Tooltip,{title:O,children:Q("span",{style:{cursor:"pointer"},children:k==null?void 0:k(T,O??"-")})})}return O??"-"}},U=L==null?void 0:L["header-mul-attribute-id"],$=L==null?void 0:L["show-btn"];return U&&U.list&&Array.isArray(U.list)?P.render=(O,z)=>{const{list:j,delimiter:H=","}=U,Y=j.map(X=>X?z[X]??"":"").filter(X=>X!==""),q=(Y==null?void 0:Y.join(H))??"-";return $&&b?Pe(rn,{children:[q??"-",b==null?void 0:b(z,q,L)]}):q||"-"}:$&&b&&(P.render=(O,z)=>{const j=z[P.dataIndex]||"";return Pe(rn,{children:[j||"-",b(z,j,L)]})}),P});return x&&(N!=null&&N.length)&&N.push(x),N},f=C=>C.slice().sort((b,x)=>{const _=typeof b["header-number"]=="number"?b["header-number"]:1/0,k=typeof x["header-number"]=="number"?x["header-number"]:1/0;return _-k}),c=({commonRequest:C,refresh:b,interfaceType:x="YLFWLRInstanceDelete",record:_,configData:k,title:S,okText:A,cancelText:T,getTitle:D,pageID:F})=>{const N=(k==null?void 0:k["must-attrid"])||[],L={};for(const[U,$]of Object.entries(_))N.includes(U)&&(L[U]=$);const P={instanceid:_==null?void 0:_.instanceid,asid:_==null?void 0:_.asid,...L};r.confirm({title:S||"",icon:null,okType:"danger",okText:A||"",cancelText:T||"",onOk:()=>new Promise(async(U,$)=>{const O=await C(x,P),z=D&&D(F||"",O==null?void 0:O["msg-code"],O==null?void 0:O.msg)||"删除失败";(O==null?void 0:O.ReturnValue)===1?(e.success(z),b(),U(O)):(e.error(z||"删除失败"),$(O))})})},h=({values:C,currentSelList:b,currentActive:x,onSearch:_,tabItems:k})=>{const A={"sel-list":b.map(T=>{var P,U;const{input:D,inputType:F}=(T==null?void 0:T.renderdata)||{};if(D==="tab"&&(F!=null&&F.startsWith("local-"))&&(k!=null&&k.length)&&(x||x===0)){const $=b.find(Y=>D==="tab"&&(F==null?void 0:F.startsWith("local-"))),O=k[x],z=((P=$==null?void 0:$.renderdata["key-field"])==null?void 0:P.list)||[],j=((U=$==null?void 0:$.renderdata["key-field"])==null?void 0:U.delimiter)||"-",H=z==null?void 0:z.map(Y=>O[Y]||"").join(j);return{...T,attrvalue:H}}const N=C[T.attrid];let L;return N!=null&&(D==="cascader"&&Array.isArray(N)?L=N.join("|"):Array.isArray(N)&&["range-picker"].includes(D)?L=N.map($=>{var O;return((O=$==null?void 0:$.format)==null?void 0:O.call($,"YYYY-MM-DD"))||$}).join("~"):Array.isArray(N)?L=N:L=String(N)),{...T,attrvalue:L}}),...C};_(A)},m=({currentSelList:C,tabItems:b,currentActive:x,onSearch:_,setSelList:k})=>{const S=C.map(A=>{var T,D,F,N,L;if(((T=A.renderdata)==null?void 0:T.input)==="tab"&&(b!=null&&b.length)&&(x||x===0)){if((F=(D=A.renderdata)==null?void 0:D.inputType)!=null&&F.startsWith("local-")){const P=C.find(j=>{var H,Y,q;return((H=j.renderdata)==null?void 0:H.input)==="tab"&&((q=(Y=j.renderdata)==null?void 0:Y.inputType)==null?void 0:q.startsWith("local-"))}),U=b[x],$=((N=P==null?void 0:P.renderdata["key-field"])==null?void 0:N.list)||[],O=((L=P==null?void 0:P.renderdata["key-field"])==null?void 0:L.delimiter)||"-",z=$==null?void 0:$.map(j=>(U==null?void 0:U[j])||"").join(O);return{...A,attrvalue:z}}return A}return{...A,attrvalue:""}});k(S),_({"sel-list":S})},d=(C,b)=>{const{label:x,value:_,children:k}=b,S=A=>A.map(T=>{const D={label:T[x],value:T[_],children:[]};return Array.isArray(T[k])&&T[k].length>0&&(D.children=S(T[k])),D});return S(C)},g=C=>{if(typeof C!="string")return!1;try{const b=JSON.parse(C);return Array.isArray(b)}catch{return!1}};return{handleUniversalHeaderToColumns:l,handleSelListToFormItems:i,handleUniversalDelete:c,handleUniversalSearch:h,handleUniversalReset:m,isArrayString:g}}function yL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,commonRequest:f,CustomModalComponent:c,attrid:h,form:m,langId:d,getTitle:g}=e,C=ve.Form.useWatch(h,m),{message:b}=ve.App.useApp(),x=r.input,[_,k]=W.useState(e.value),[S,A]=W.useState(!1),[T,D]=W.useState([]),[F,N]=W.useState([]),[L,P]=W.useState(!1),[U,$]=W.useState({PageNum:1,PageSize:6}),[O,z]=W.useState([]),[j,H]=W.useState(0),[Y,q]=W.useState(te()),{handleUniversalHeaderToColumns:X}=rD();W.useEffect(()=>{S&&G()},[S,U]);const ne=(re,pe)=>{D(re),N(pe)},G=async()=>{var re,pe,me,Ce,se;if(r.inputType==="url"&&(r!=null&&r["action-url"])){P(!0);try{const Ae=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...U,...(r==null?void 0:r["action-url-extra-params"])||{}});if((Ae==null?void 0:Ae.ReturnValue)===0){b.error(Ae.msg),P(!1);return}const De=Ae==null?void 0:Ae.data,qe=(re=De==null?void 0:De.list)==null?void 0:re.map((We,Me)=>{const bt=(U.PageNum-1)*U.PageSize+Me;return{...We,_rowKey:bt}}),Se=(qe==null?void 0:qe.filter(We=>T.includes(We._rowKey)))||[];N(Se),z([...qe||[]]),H((De==null?void 0:De.number)||0),P(!1)}catch{P(!1)}return}if(r.inputType==="instance-url"&&(r!=null&&r["instance-source-number"])){const Ae={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"},De={"source-number":r==null?void 0:r["instance-source-number"],...U};try{const qe=await l(Ae,De);if((qe==null?void 0:qe.ReturnValue)===1){const We=(me=((pe=qe==null?void 0:qe.data)==null?void 0:pe.list)||[])==null?void 0:me.map((Me,bt)=>{const ft=(U.PageNum-1)*U.PageSize+bt;return{...Me,_rowKey:ft}});H(((Ce=qe==null?void 0:qe.data)==null?void 0:Ce.number)||0),z([...We])}const Se=await f("YLKHDSelPCParam",{"source-number":r==null?void 0:r["instance-source-number"]});if((Se==null?void 0:Se.ReturnValue)===1){const We=(se=Se==null?void 0:Se.data)==null?void 0:se[r==null?void 0:r["instance-source-number"]],Me=(We==null?void 0:We["universal-header"])||[],bt=(We==null?void 0:We["attribute-set-id"])||"",ft=X({universalHeader:Me,attributeSetId:bt,getTitle:g})||[];q([...ft])}}catch{}return}b.error(d==="10001"?"参数配置错误":"Parameter configuration error")},ee=()=>{var re;if(!t){if(_){const pe=r==null?void 0:r["key-field"],me=pe==null?void 0:pe[h],{delimiter:Ce="-",list:se=[]}=me||{};if(!pe){b.error(d==="10001"?"请配置key-field":"Please configure key-field");return}switch(x){case"mul-field-modal-select":const Ae=(re=_==null?void 0:_.split(Ce))==null?void 0:re[0],De=O==null?void 0:O.findIndex(We=>Object.values(We).includes(Ae));D([De]);break;case"modal-mult-select":const qe=_==null?void 0:_.split(","),Se=qe==null?void 0:qe.map(We=>{var bt;const Me=(bt=We.split(Ce))==null?void 0:bt[0];return O==null?void 0:O.findIndex(ft=>Me.includes((ft==null?void 0:ft.typeid)||(ft==null?void 0:ft.instanceid)))});D(Se);break}}A(!0)}},Z=async()=>{try{const re=await xL(F,r,d);k((re==null?void 0:re[h])||""),e.onSure(re),A(!1)}catch(re){b.error(re.msg||"参数错误")}},V=()=>{$({...U,PageNum:1}),A(!1)};function te(){const re=r["modal-field-list"];if(!re)return[];let pe=[];for(let me in re){let Ce=re[me];const se={dataIndex:me,title:Ce};pe=[...pe,se]}return pe}const oe=re=>{$({...U,PageNum:re})};return Pe(rn,{children:[Q(ve.Select,{placeholder:Qp({json:r}),onClick:ee,open:!1,value:C,disabled:t,style:i}),c&&Q(c,{title:r["modal-caption"]||"",open:S,onOk:Z,onCancel:V,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:Y,loading:L,dataSource:O,rowKey:re=>re._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:T,onChange:ne},pagination:{total:j,current:U.PageNum,pageSize:U.PageSize,onChange:oe}})})||Q(ve.Modal,{title:r["modal-caption"],open:S,onOk:Z,onCancel:V,width:r["modal-width"]??600,okButtonProps:{disabled:T.length===0},children:Q(ve.Table,{columns:Y,loading:L,dataSource:O,rowKey:re=>re._rowKey,rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:T,onChange:ne},pagination:{total:j,current:U.PageNum,pageSize:U.PageSize,onChange:oe}})})]})}function xL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}let c={};e.forEach(h=>{for(let[m,d]of Object.entries(f)){const g=(d==null?void 0:d.list)??[],C=(d==null?void 0:d.delimiter)??"-",b=g.map(x=>h==null?void 0:h[x]);c[m]=b.join(C)}}),i(c)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}var aD={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t="day";return function(i,l,f){var c=function(d){return d.add(4-d.isoWeekday(),t)},h=l.prototype;h.isoWeekYear=function(){return c(this).year()},h.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),t);var g,C,b,x,_=c(this),k=(g=this.isoWeekYear(),C=this.$u,b=(C?f.utc:f)().year(g).startOf("year"),x=4-b.isoWeekday(),b.isoWeekday()>4&&(x+=7),b.add(x,t));return _.diff(k,"week")+1},h.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var m=h.startOf;h.startOf=function(d,g){var C=this.$utils(),b=!!C.u(g)||g;return C.p(d)==="isoweek"?b?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):m.bind(this)(d,g)}}})})(aD);const iD=aD.exports;function bL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:h}=ve.App.useApp(),m=r.input,[d,g]=W.useState(e.value),[C,b]=W.useState(!1),[x,_]=W.useState([]),[k,S]=W.useState([]),[A,T]=W.useState(!1),[D,F]=W.useState({PageNum:1,PageSize:6}),[N,L]=W.useState([]),[P,U]=W.useState(0),$=q();W.useEffect(()=>{C&&z()},[C,D]);const O=(ne,G)=>{_(ne),S(G)},z=async()=>{var ne;if(r.inputType==="url"&&(r!=null&&r["action-url"])){T(!0);try{const G=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...D});if((G==null?void 0:G.ReturnValue)===0){h.error(G.msg),T(!1);return}const ee=G==null?void 0:G.data,Z=(ne=ee==null?void 0:ee.list)==null?void 0:ne.map((te,oe)=>{const re=(D.PageNum-1)*D.PageSize+oe;return{...te,_rowKey:re}}),V=(Z==null?void 0:Z.filter(te=>x.includes(te._rowKey)))||[];S(V),L([...Z||[]]),U((ee==null?void 0:ee.number)||0),T(!1)}catch(G){T(!1),h.error(G.msg||"参数错误")}return}h.error("请配置action-url")},j=()=>{var ne,G;if(!t){if(d){const ee=((ne=r==null?void 0:r["key-field"])==null?void 0:ne.list)??[],Z=((G=r==null?void 0:r["key-field"])==null?void 0:G.delimiter)??"-";if(!ee.length){h.error("请配置key-field");return}switch(m){case"modal-select":const V=d==null?void 0:d.split("-"),te=N==null?void 0:N.findIndex(pe=>V.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));_([te]);break;case"modal-mult-select":const oe=d==null?void 0:d.split(","),re=oe==null?void 0:oe.map(pe=>{var Ce;const me=(Ce=pe.split(Z))==null?void 0:Ce[0];return N==null?void 0:N.findIndex(se=>me.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)))});_(re);break}}b(!0)}},H=async()=>{try{const ne=await CL(k,r,c);g(ne),e.onSure(ne),b(!1)}catch(ne){h.error(ne.msg||"参数错误")}},Y=()=>{F({...D,PageNum:1}),b(!1)};function q(){const ne=r["modal-field-list"];let G=[];for(let ee in ne){let Z=ne[ee];const V={dataIndex:ee,title:Z};G=[...G,V]}return G}const X=ne=>{F({...D,PageNum:ne})};return Pe(rn,{children:[Q(ve.Select,{placeholder:Qp({json:r},c),onClick:j,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:Y,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:$,loading:A,dataSource:N,rowKey:ne=>ne._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:m==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:O},pagination:{total:P,current:D.PageNum,pageSize:D.PageSize,onChange:X}})})||Q(ve.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:Y,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(ve.Table,{columns:$,loading:A,dataSource:N,rowKey:ne=>ne._rowKey,rowSelection:{type:m==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:O},pagination:{total:P,current:D.PageNum,pageSize:D.PageSize,onChange:X}})})]})}function CL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let h=e.map(m=>c.map(g=>m[g]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(h)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}const wL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:h,handleUrlOptions:m,value:d,interfaceTypeDict:g,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x}=e,[_,k]=W.useState([]),[S,A]=W.useState(d||[]);W.useEffect(()=>{T()},[r.inputType,r.classify,r.data,r.options]);const T=async()=>{const D=await I2({commonRequestWidthParams:c,commonRequest:h,interfaceTypeDict:g,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,item:r});k(D)};return Q(ve.Checkbox.Group,{...l,options:_,value:S,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:D=>{A(D),t==null||t(D)},disabled:i})},_L=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:h,interfaceTypeSysDict:m,actionUrlKey:d,actionUrlExtraParams:g,langId:C="10001"})=>{const[b,x]=W.useState([]),[_,k]=W.useState(!1),{message:S}=ve.App.useApp();W.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let P=[];e.data&&Array.isArray(e.data)?P=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(P=e.options),x(P)}else if(e.inputType==="dictionary")await T(m);else if(e.inputType==="system-dictionary")T(m);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const P=await F();P&&Array.isArray(P)&&x(P)}else{let P=[];e.data&&Array.isArray(e.data)?P=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(P=e.options),x(P)}},T=async P=>{var U;if(e.classify){k(!0);try{const $=await c(P,{asctypeid:e.classify});if((U=$==null?void 0:$.data)!=null&&U.list&&Array.isArray($.data.list)){const O=$.data.list.map(z=>({label:`${z.dicid||""}-${z.info||""}`,value:`${z.dicid||""}-${z.info||""}`}));x(O)}}catch{S.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},D=(P,U)=>{i&&i(P)},F=async P=>new Promise(async(U,$)=>{var Y,q,X;const O=((Y=e==null?void 0:e["key-field"])==null?void 0:Y.list)||[],z=(e==null?void 0:e["search-field"])||[],j=((q=e==null?void 0:e["key-field"])==null?void 0:q.delimiter)||"-";if(!O.length){S.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...g};P&&(z.forEach(ne=>{H[ne]=P[ne]||""}),H.level=Number(P.level||0)+1||""),k(!0);try{const ne=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((X=ne==null?void 0:ne.data)!=null&&X.list&&Array.isArray(ne.data.list)){const G=ne.data.list.map(ee=>({...ee,label:`${ee[O[0]]||""}${j}${ee[O[1]]||""}`,value:`${ee[O[0]]||""}${j}${ee[O[1]]||""}`,children:[],isLeaf:(ee==null?void 0:ee.subcount)===0}));U(G)}$([])}catch{S.error(C==="10001"?"加载选项失败":"Failed to load options"),$([])}finally{$([]),k(!1)}}),N=async P=>{const U=P[P.length-1],$=await F(U)||[];return U.children=$,x([...b]),$},L=(P,U)=>U.some($=>$.label.toLowerCase().includes(P.toLowerCase()));return Q(ve.Cascader,{showSearch:{filter:L},loading:_,placeholder:"请选择",loadData:N,disabled:r,onChange:D,style:{...l},options:b,value:t,onOpenChange:async P=>{var U;if(P&&(t!=null&&t.length)){const $=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],O=(e==null?void 0:e["search-field"])||[];if(!$.length||!O.length){S.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const z=$.findIndex(Y=>Y===O[0]);if(z===-1){S.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const j=t.map(Y=>Y.split("-")[z]||"").filter(Boolean);let H=b;for(const[Y,q]of j.entries()){if(Y===j.length-1)break;const X=H.filter(ee=>ee[O[0]]===q);if(X.length===0)break;const ne=X[0];if(ne.children&&ne.children.length>0){H=ne.children;continue}H=await N(X)}}}})},EL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,langId:c})=>{const[h,m]=W.useState([]),[d,g]=W.useState(!1);W.useEffect(()=>{(async()=>{var D;if(e.inputType==="url"&&e["action-url"]){g(!0);try{const F=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(D=F==null?void 0:F.data)!=null&&D.list&&Array.isArray(F.data.list)?m(F.data.list):F!=null&&F.data&&Array.isArray(F.data)?m(F.data):Array.isArray(F==null?void 0:F.list)?m(F.list):(F==null?void 0:F.ReturnValue)===1&&(F!=null&&F.data)&&(Array.isArray(F.data)?m(F.data):m([F.data]))}catch{}finally{g(!1)}}else e.data&&Array.isArray(e.data)&&m(e.data)})()},[e.inputType,e["action-url"],e.data]);const C=T=>JSON.stringify(T),b=T=>{const D=C(T);return t===D},x=T=>{if(r)return;const D=C(T);i&&i(D)},_=e["card-image-width"]||200,k=e["card-image-height"]||100,S=e["card-image-field"],A=e["card-info-field"];return Q("div",{style:{...l},children:d?Q("div",{style:{textAlign:"center",padding:"20px"},children:"loading..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"50px"},children:h.map((T,D)=>{const F=b(T);return Pe("div",{onClick:()=>x(T),style:{flex:"1 1 auto",width:`${_}px`,padding:"12px 0",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[T[S]&&Q("img",{src:T.picurl,alt:T[A]||"",style:{width:`${_}px`,height:`${k}px`,objectFit:"cover",borderRadius:"8px",marginBottom:"8px"},onError:N=>{N.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Pe(ve.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:F?"none":"1px solid #d9d9d9",backgroundColor:F?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:F&&Q(f8,{style:{fontSize:"12px",color:"#fff"}})}),T[A]||""]})})]},D)})})})},SL=({item:e,readonly:r,style:t,commonRequestWidthParams:i,commonRequest:l,value:f,onChange:c,interfaceTypeDict:h,interfaceTypeSysDict:m,actionUrlKey:d,actionUrlExtraParams:g,langId:C})=>{const[b,x]=W.useState([]),[_,k]=W.useState(!1);W.useEffect(()=>{S()},[e.inputType,e.classify,e.data,e.options]);const S=async()=>{k(!0);const A=await I2({commonRequestWidthParams:i,commonRequest:l,interfaceTypeDict:h,interfaceTypeSysDict:m,actionUrlKey:d,actionUrlExtraParams:g,item:e});x(A),k(!1)};return Q(ve.Select,{placeholder:Qp({json:e},C),mode:e.input==="mult-select"?"multiple":void 0,disabled:r,loading:_,showSearch:!0,value:f,filterOption:(A,T)=>{var D;return((D=T==null?void 0:T.label)==null?void 0:D.toLowerCase().indexOf(A.toLowerCase()))>=0},options:b,style:{...t},allowClear:!0,onChange:A=>{c(A)}})},DL={customUpload:"myUpload-module_customUpload_7c7d3"},kL=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),TL=e=>{const{langId:r="10001"}=e,{action:t,item:i,onChange:l,readonly:f=!1,relatedid:c,uploadText:h=r==="10001"?"上传文件":"Upload File",onRemove:m,list:d=[],uploadType:g,relatedidKey:C}=e,{message:b}=ve.App.useApp(),x=(i==null?void 0:i["upload-accept"])||"*",_=i==null?void 0:i.input,k=i==null?void 0:i["upload-size"],S=(i==null?void 0:i["upload-max-count"])||1,[A,T]=W.useState(_==="image"?"picture-card":"text"),[D,F]=W.useState([]),[N,L]=W.useState(!1),[P,U]=W.useState("");W.useEffect(()=>{d&&d.length&&F(d)},[d]);const $=async H=>{g==="image"&&(!H.url&&!H.preview&&(H.preview=await kL(H.originFileObj)),U(H.url||H.preview),L(!0))},O=({fileList:H})=>{F(H),l&&l(H)},z=H=>{if(!k)return!0;const Y=H.size/1024/1024<Number(k);return Y||b.error(r==="10001"?`请上传不超过${k}MB的文件`:`Please upload files smaller than ${k}MB`),Y},j=_==="image"?Pe("button",{style:{border:0,background:"none"},type:"button",children:[Q(Fb,{}),Q("div",{style:{marginTop:8},children:"Upload"})]}):Q(rn,{children:Q(ve.Button,{style:{fontSize:14},icon:Q(Nb,{}),children:h})});return Pe(rn,{children:[Q(ve.Upload,{action:t,beforeUpload:z,listType:A,accept:x,fileList:D,onPreview:$,data:{[C]:c},maxCount:S,onChange:O,onRemove:m,disabled:f,className:DL.customUpload,children:D.length>=S?null:j}),P&&Q(ve.Image,{wrapperStyle:{display:"none"},preview:{visible:N,onVisibleChange:H=>L(H),afterOpenChange:H=>!H&&U("")},src:P})]})},AL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:h,value:m,interfaceTypeDict:d,interfaceTypeSysDict:g,actionUrlKey:C,actionUrlExtraParams:b}=e,[x,_]=W.useState([]);W.useEffect(()=>{k()},[r.inputType,r.classify,r.data,r.options]);const k=async()=>{const S=await I2({commonRequestWidthParams:c,commonRequest:h,interfaceTypeDict:d,interfaceTypeSysDict:g,actionUrlKey:C,actionUrlExtraParams:b,item:r});_(S)};return Q(ve.Radio.Group,{...l,options:x,onChange:t,disabled:i,value:m,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"}})};bn.extend(iD);function OL(e){const{commonRequestWidthParams:r,uploadAction:t,commonRequest:i,formConfig:l,updateDelFileList:f,interfaceTypeDict:c,interfaceTypeSysDict:h,relatedidKey:m,actionUrlKey:d,actionUrlExtraParams:g,CustomModalComponent:C,isEdit:b,formShowType:x="form",langId:_,getTitle:k}=e,S=W.useRef([]),{message:A}=ve.App.useApp();W.useEffect(()=>{l&&(S.current=l)},[l]);const T=W.useCallback(j=>Array.isArray(j)?j:(j==null?void 0:j.fileList)??[],[]),D=j=>{f(j)},F=W.useCallback(j=>{var X,ne;const H=(X=j.json)==null?void 0:X.input,Y=(ne=j.json)==null?void 0:ne.format,q={};switch(H){case"image":case"file":case"video":case"audio":q.getValueFromEvent=T;break;case"date-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY-MM-DD"),q.getValueProps=G=>({value:G?bn(G):null});break;case"time-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY-MM-DD HH:mm:ss"),q.getValueProps=G=>({value:G?bn(G):null});break;case"week-picker":q.getValueFromEvent=G=>`${G==null?void 0:G.year()}-${bn(G).isoWeek()}周`,q.getValueProps=G=>{if(!G)return{value:null};const[ee,Z]=G.split("-"),V=Number(ee),te=Number(Z.replace("周",""));return{value:bn().year(V).isoWeek(te)}};break;case"month-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY-MM"),q.getValueProps=G=>({value:G?bn(G):null});break;case"quarter-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY年第Q季度"),q.getValueProps=G=>({value:G?bn(G,Y||"YYYY年第Q季度"):null});break;case"year-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY"),q.getValueProps=G=>({value:G?bn(G):null});break;case"second-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"HH:mm:ss"),q.getValueProps=G=>({value:G?bn(G,Y||"HH:mm:ss"):null});break;case"range-picker":q.getValueFromEvent=G=>G==null?void 0:G.map(ee=>ee==null?void 0:ee.format(Y||"YYYY-MM-DD")),q.getValueProps=G=>!(G!=null&&G.length)&&!Array.isArray(G)?{value:null}:{value:(G==null?void 0:G.map(ee=>bn(ee)))||null};break;case"multiple-date-picker":q.getValueFromEvent=G=>G==null?void 0:G.map(ee=>ee==null?void 0:ee.format(Y||"YYYY-MM-DD")),q.getValueProps=G=>({value:(G==null?void 0:G.map(ee=>bn(ee)))||null});break}return q},[T]),N=W.useCallback(({isActive:j})=>j?Q(x8,{style:{fontSize:18,color:"#999"}}):Q(w8,{style:{fontSize:18,color:"#999"}}),[]),L=(j,H)=>{var Y,q,X,ne,G;return Pe(ve.Flex,{gap:10,vertical:H==="flex",align:"center",children:[Q("span",{children:j.attrname}),((Y=j==null?void 0:j.json)==null?void 0:Y.instruction)&&H==="icon"&&Q(ve.Tooltip,{title:(q=j==null?void 0:j.json)==null?void 0:q.instruction,children:Q(g8,{style:{color:((X=j==null?void 0:j.json)==null?void 0:X["instruction-color"])??"#888888",fontSize:16,cursor:"pointer"}})})||Q("span",{style:{color:((ne=j==null?void 0:j.json)==null?void 0:ne["instruction-color"])??"red"},children:(G=j==null?void 0:j.json)==null?void 0:G.instruction})]})},P=W.useCallback(({itemWithJson:j,colNum:H=1,readonly:Y=!1,instructionShowMode:q="icon",radioAlign:X="horizontal",formItemStyle:ne,relatedid:G,form:ee,defaultWidth:Z=358,parentFormListField:V,isShowLabel:te=!0})=>{const oe=Dc(j);let re=j.children||[];Array.isArray(re==null?void 0:re[0])&&re.length&&(re=re[0]);const pe=me=>{const Ce=(V==null?void 0:V.parentName)||(V==null?void 0:V.name);return Ce?Array.isArray(Ce)?[...Ce,j.attrid,me.name]:[Ce,j.attrid,me.name]:[j.attrid,me.name]};return Q(ve.Col,{span:24/H,children:Q(ve.Collapse,{bordered:!1,style:{backgroundColor:"transparent"},expandIcon:({isActive:me})=>N({isActive:me}),items:[{key:j.attrid,label:j.attrname,styles:{header:{paddingLeft:0}},children:Q(ve.Form.List,{name:V?Array.isArray(V.name)?[...V.name,j.attrid]:[V.name,j.attrid]:j.attrid,initialValue:oe,children:(me,{add:Ce,remove:se})=>Pe("div",{style:{display:"flex",rowGap:16,flexDirection:"column"},children:[me.map(Ae=>{const De={...Ae,parentName:pe(Ae)};return Q(ve.Card,{style:{width:Z+100},size:"small",title:`${j.attrname} ${Ae.name+1}`,extra:!b&&Q(h8,{onClick:()=>{me.length>1?se(Ae.name):A.warning("至少需要保留一个!")}}),children:(re||[]).map((qe,Se)=>Q(W.Fragment,{children:z({item:qe,readonly:Y,colNum:H,instructionShowMode:q,relatedid:G,form:ee,defaultWidth:Z,formItemStyle:ne,radioAlign:X,isFormListItem:!0,formListField:De,isShowLabel:!0})},qe.attrid||`child-${Se}`))},Ae.key)}),!b&&Q(ve.Flex,{style:{width:200},children:Pe(ve.Button,{type:"dashed",onClick:()=>Ce(),block:!0,children:["+ ",_==="10001"?"新增":"Add"]})})]})})}]},j.attrid)})},[N,Dc]),U=W.useCallback(({itemWithJson:j,colNum:H=1,readonly:Y=!1,instructionShowMode:q="icon",radioAlign:X="horizontal",formItemStyle:ne,relatedid:G,form:ee,defaultWidth:Z=358,isFormListItem:V=!1,formListField:te,isShowLabel:oe=!0})=>{var re,pe,me,Ce,se,Ae,De;if(((re=j.json)==null?void 0:re.hide)===!0)return Q(rn,{});if(j.attrtype===1)return P({itemWithJson:j,colNum:H,readonly:Y,instructionShowMode:q,radioAlign:X,formItemStyle:ne,relatedid:G,form:ee,defaultWidth:Z,parentFormListField:te,isShowLabel:oe});if(j.attrtype===2)return Q(rn,{children:"实例信息"});if(j.attrtype===0){const qe=Dc(j),Se=(pe=j.json)==null?void 0:pe["default-prompt"],We=Qp(j,_),{combinations:Me=[]}=j.json||{};if(Me!=null&&Me.length)return Q(ve.Col,{span:24/H,children:Q(ve.Form.Item,{label:(me=j==null?void 0:j.json)==null?void 0:me["combination-name"],required:(Ce=j.json)==null?void 0:Ce.must,children:Q(ve.Space.Compact,{children:Me.map((ft,It)=>{var In,Mn,Fn,Jt;let wn=Dc(ft),kn=Z;const jn={},sn=ft.json.input||"text",Ht=ne==null?void 0:ne.find(Kn=>Kn.type===sn);if(Ht){const{width:Kn}=(Ht==null?void 0:Ht.style)||{};Kn&&(jn.width=Kn)}const on=(In=ft==null?void 0:ft.json)==null?void 0:In["combination-width-ratio"];return on&&(kn=Z*on),Q(ve.Form.Item,{name:te?Array.isArray(te.name)?[...te.name,ft.attrid]:[te.name,ft.attrid]:ft.attrid,noStyle:!0,initialValue:wn,rules:[...(Mn=ft.json)!=null&&Mn.must?[{required:!0,message:Se||`${We}${ft.attrname}`}]:[],...(Fn=j.json)!=null&&Fn.regexp?[{pattern:new RegExp(j.json.regexp.replace(/^\/|\/$/g,"")),message:((Jt=j.json)==null?void 0:Jt["regexp-message"])||`${j.attrname}${_==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...F(ft),children:O({item:ft,readonly:Y,formItemStyle:ne,radioAlign:X,relatedid:G,form:ee,defaultWidth:kn,customWidth:jn})},It)})})},`${j.attrid}+1`)});const bt=V&&te?Array.isArray(te.name)?[...te.name,j.attrid]:[te.name,j.attrid]:j.attrid;return Q(ve.Col,{span:24/H,children:Q(ve.Form.Item,{name:bt,label:oe&&L(j,q)||null,initialValue:qe,rules:[...(se=j.json)!=null&&se.must?[{required:!0,message:`${We}${j.attrname}`}]:[],...(Ae=j.json)!=null&&Ae.regexp?[{pattern:new RegExp(j.json.regexp.replace(/^\/|\/$/g,"")),message:((De=j.json)==null?void 0:De["regexp-message"])||`${j.attrname}${_==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...F(j),children:O({item:j,readonly:Y,formItemStyle:ne,radioAlign:X,relatedid:G,form:ee,defaultWidth:Z})},j.attrid)})}return null},[L,Dc,F,P]),$=async j=>{var H;try{const Y=(H=j==null?void 0:j.response)==null?void 0:H.data;if(Y){if(!r)return;const q=await r({Controlname:"DelFile",PageName:"initializationfile"},Y);if((q==null?void 0:q.ReturnValue)!==1)return A.error(q==null?void 0:q.msg),!1}else D(j);return!0}catch{return!1}},O=({item:j,readonly:H=!1,formItemStyle:Y=[],radioAlign:q="horizontal",relatedid:X,form:ne,defaultWidth:G=358,customWidth:ee={}})=>{var qe,Se,We,Me,bt,ft,It,wn,kn,jn,sn,Ht,on,In,Mn,Fn,Jt,Kn,ka,Lr,$e,rt;const Z=j.json.input||"text",V=((qe=j.json)==null?void 0:qe.format)||"",te=j.attrid,oe=Dc(j),re=((Se=j.json)==null?void 0:Se["default-prompt"])||"",pe=((We=j.json)==null?void 0:We["disable-date-goover"])||!1,me=Qp(j,_),Ce=j.json.length&&{maxLength:j.json.length}||{},se=Y.find(ut=>ut.type===Z);let Ae=(Me=j.json)==null?void 0:Me["input-width"];Ae&&(Ae=x==="table"?Number(Ae)-32:Ae);const De=Ae||G;switch(Z){case"label":return Q(ve.Input,{disabled:!0,value:((bt=j.json)==null?void 0:bt["label-value"])||j.attrvalue||((ft=j.json)==null?void 0:ft.default)||"-",style:{width:De,...se==null?void 0:se.style,...ee}});case"text":return Q(ve.Input,{placeholder:re||me,...Ce,disabled:H||((It=j.json)==null?void 0:It.readonly),allowClear:!0,style:{width:De,...se==null?void 0:se.style,...ee}});case"password":return Q(ve.Input.Password,{placeholder:re||me,...Ce,disabled:H||((wn=j.json)==null?void 0:wn.readonly),allowClear:!0,style:{width:De,...se==null?void 0:se.style,...ee}});case"textarea":return Q(ve.Input.TextArea,{allowClear:!0,placeholder:re||me,rows:5,...Ce,disabled:H||((kn=j.json)==null?void 0:kn.readonly),style:{width:De,...se==null?void 0:se.style,...ee}});case"number":return Q(ve.InputNumber,{controls:!1,placeholder:re||me,...Ce,disabled:H||((jn=j.json)==null?void 0:jn.readonly),style:{width:De,...se==null?void 0:se.style,...ee}});case"select":case"mult-select":return Q(SL,{item:j.json,readonly:H||((sn=j.json)==null?void 0:sn.readonly),style:{width:De,...se==null?void 0:se.style,...ee},commonRequestWidthParams:r,commonRequest:i,value:oe,interfaceTypeDict:c,interfaceTypeSysDict:h,actionUrlKey:d,actionUrlExtraParams:g,langId:_,onChange:ut=>{ne.setFieldValue(j.attrid,ut)}});case"modal-mult-select":case"modal-select":return Q(bL,{style:{width:De,...se==null?void 0:se.style,...ee},item:j.json,value:j.attrvalue||j.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async ut=>{ne.setFieldValue(j.attrid,ut)},disabled:H||((Ht=j.json)==null?void 0:Ht.readonly),langId:_,CustomModalComponent:C});case"mul-field-modal-select":return Q(yL,{style:{width:De,...se==null?void 0:se.style,...ee},item:j.json,form:ne,attrid:te,getTitle:k,value:j.attrvalue||j.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async ut=>{ne.setFieldsValue(ut)},disabled:H||((on=j.json)==null?void 0:on.readonly),CustomModalComponent:C,langId:_});case"date-picker":case"time-picker":case"week-picker":case"month-picker":case"quarter-picker":case"year-picker":case"second-picker":{const ut={"date-picker":"date","time-picker":"date","week-picker":"week","month-picker":"month","quarter-picker":"quarter","year-picker":"year","second-picker":"time"};let Vt;return Z==="date-picker"&&(Vt=pe?V6:void 0),Q(ve.DatePicker,{showTime:Z==="time-picker",format:V||void 0,picker:ut[Z]||"date",disabled:H||((In=j.json)==null?void 0:In.readonly),disabledDate:Vt,placement:"bottomLeft",style:{width:De,...se==null?void 0:se.style,...ee}})}case"range-picker":return Q(ve.DatePicker.RangePicker,{disabledDate:pe?V6:void 0,disabled:H||((Mn=j.json)==null?void 0:Mn.readonly),style:{width:De,...se==null?void 0:se.style,...ee}});case"multiple-date-picker":return Q(ve.DatePicker,{multiple:!0,maxTagCount:((Fn=j==null?void 0:j.json)==null?void 0:Fn["max-tag-count"])||2,disabled:H||((Jt=j.json)==null?void 0:Jt.readonly)||!1,style:{width:De,...se==null?void 0:se.style,...ee}});case"radio":return Q(AL,{radioAlign:q,commonRequest:i,commonRequestWidthParams:r,item:j.json,readonly:H||((Kn=j.json)==null?void 0:Kn.readonly),options:Ce,handleUrlOptions:kc,value:oe,interfaceTypeDict:c,interfaceTypeSysDict:h,actionUrlKey:d,actionUrlExtraParams:g,onChange:ut=>{ne.setFieldValue(j.attrid,ut.target.value)}});case"checkbox":return Q(wL,{radioAlign:q,commonRequest:i,commonRequestWidthParams:r,item:j.json,readonly:H||((ka=j.json)==null?void 0:ka.readonly),options:Ce,value:oe,handleUrlOptions:kc,interfaceTypeDict:c,interfaceTypeSysDict:h,actionUrlKey:d,actionUrlExtraParams:g,onChange:ut=>{ne.setFieldValue(j.attrid,ut.join(","))}});case"audio":case"file":case"image":case"video":return Q(TL,{action:t&&t("initializationfile"),item:j.json,uploadType:Z,langId:_,list:oe,readonly:H||((Lr=j.json)==null?void 0:Lr.readonly),relatedid:X,relatedidKey:m,onRemove:ut=>$(ut)});case"cascader":return Q(_L,{commonRequestWidthParams:r,commonRequest:i,item:j.json,value:j.attrvalue,style:{width:De,...se==null?void 0:se.style,...ee},interfaceTypeDict:c,interfaceTypeSysDict:h,actionUrlKey:d,actionUrlExtraParams:g,langId:_});case"radio-card":return Q(EL,{item:j.json,readonly:H||(($e=j.json)==null?void 0:$e.readonly),onChange:ut=>{ne.setFieldValue(j.attrid,ut)},langId:_,commonRequestWidthParams:r});default:return Q(ve.Input,{placeholder:re||me,...Ce,showCount:!0,disabled:H||((rt=j.json)==null?void 0:rt.readonly),style:{width:De,...se==null?void 0:se.style,...ee}})}},z=({item:j,readonly:H=!1,colNum:Y=1,instructionShowMode:q="icon",relatedid:X,form:ne,defaultWidth:G=358,formItemStyle:ee,radioAlign:Z="horizontal",isFormListItem:V=!1,formListField:te,isShowLabel:oe=!0})=>{var me;const re=j.info_base64===1?uu(Zp(j.info)):uu(j.info),pe={...j,json:{...j==null?void 0:j.json,...re}};return((me=pe.json)==null?void 0:me.hide)===!0?null:Q(W.Fragment,{children:U({itemWithJson:pe,readonly:H,colNum:Y,instructionShowMode:q,relatedid:X,form:ne,defaultWidth:G,formItemStyle:ee,radioAlign:Z,isFormListItem:V,formListField:te,isShowLabel:oe})},pe.attrid)};return{handleRenderItem:z,handleSetFormItemInitialValue:Dc}}const RL=W.forwardRef((e,r)=>{const{formConfig:t,form:i,readonly:l=!1,relatedid:f,colNum:c=1,colSpace:h=[0,0],instructionShowMode:m="flex",defaultWidth:d=358,commonRequestWidthParams:g,uploadAction:C,commonRequest:b,formItemStyle:x=[],radioAlign:_="horizontal",interfaceTypeChildren:k="YLLRDetailAttrlist",interfaceTypeDict:S="YLZDDictList",interfaceTypeSysDict:A="YLZDSysConfigList",relatedidKey:T="relatedid",actionUrlKey:D="action-url",actionUrlExtraParams:F={},CustomModalComponent:N,formShowType:L="form",formListItemWidth:P,formListItemName:U,isEdit:$=!1,langId:O="10001",getTitle:z}=e,j=W.useRef([]),H=q=>{j.current.push(q)},{handleRenderItem:Y}=OL({commonRequestWidthParams:g,uploadAction:C,commonRequest:b,updateDelFileList:H,formConfig:t,interfaceTypeChildren:k,interfaceTypeDict:S,interfaceTypeSysDict:A,relatedidKey:T,actionUrlKey:D,actionUrlExtraParams:F,CustomModalComponent:N,isEdit:$,formShowType:L,langId:O,getTitle:z});return W.useImperativeHandle(r,()=>({getDelFileList:()=>j.current})),Q(rn,{children:L==="table"?Q(ve.Form.List,{name:U||"customFormList",initialValue:[{}],children:(q,{add:X,remove:ne})=>Q(ve.Flex,{className:"custom-form-body",children:Pe("div",{className:"custom-form-list",children:[Pe(ve.Flex,{align:"center",style:{position:"relative",backgroundColor:"#004d32"},children:[Q(ve.Flex,{className:"custom-form-list-header",align:"center",children:t==null?void 0:t.map((G,ee)=>{var V,te;const Z=((V=G==null?void 0:G.json)==null?void 0:V["input-width"])&&Number((te=G==null?void 0:G.json)==null?void 0:te["input-width"])||d;return Pe(ve.Flex,{style:{width:Z,flexShrink:0},align:"center",children:[ee!==0&&Q("div",{className:"line"}),Q("div",{className:"custom-form-list-header-item",children:G.attrname})]},ee)})}),Q("a",{className:"custom-form-list-add-btn",onClick:()=>X(),children:O==="10001"?"新增":"Add"})]}),q.map(G=>Pe(ve.Flex,{align:"center",className:"custom-form-list-item-container",children:[Q(ve.Flex,{className:"custom-form-list-item",align:"center",children:t==null?void 0:t.map((ee,Z)=>{var te,oe;const V=((te=ee==null?void 0:ee.json)==null?void 0:te["input-width"])&&Number((oe=ee==null?void 0:ee.json)==null?void 0:oe["input-width"])||d;return Q(ve.Flex,{align:"center",className:"custom-form-list-item-content",justify:"center",style:{width:V,flexShrink:0},children:Y({item:ee,readonly:l,colNum:c,instructionShowMode:m,relatedid:f,form:i,defaultWidth:(P==null?void 0:P[Z])||d,formItemStyle:x,isFormListItem:!0,formListField:G,isShowLabel:!1})},ee.attrid||`child-${Z}`)})}),Q("a",{className:"custom-form-list-del-btn",onClick:()=>ne(G.key),children:O==="10001"?"删除":"Delete"})]},G.key))]})})}):Q(ve.Row,{gutter:h,children:t.map((q,X)=>Q(W.Fragment,{children:Y({item:q,readonly:l,colNum:c,instructionShowMode:m,relatedid:f,form:i,defaultWidth:d,formItemStyle:x,radioAlign:_})},q.attrid||`form-item-${X}`))})})}),oD=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},Tc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default)||"";if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t==null?void 0:t.split("~"),t=t.map(h=>h)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(h=>bn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const h=(c=e.json)==null?void 0:c["cascader-delimiter"];h&&(t=t.split(h).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(m=>({...m,url:m.FilePath,name:m.FileName,uid:m.FileId}))}catch{t=[]}return e.attrtype===1&&(t=FL(e.children||[])),t||void 0},lD=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},FL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)},NL=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:h})=>{var C;let m=[];const d=async b=>{var _;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(_=k==null?void 0:k.data)!=null&&_.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(S=>({label:`${S.dicid||""}-${S.info||""}`,value:`${S.dicid||""}-${S.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},g=async()=>{var b,x;try{const _=((b=c==null?void 0:c["key-field"])==null?void 0:b.list)||[],k=((x=c==null?void 0:c["key-field"])==null?void 0:x.delimiter)||"",S=c==null?void 0:c["field-names"];if(!_.length){ve.message.error("请配置key-field");return}const A=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(A!=null&&A.data){const T=A==null?void 0:A.data,D=(T==null?void 0:T.list)||[];let F=[];Array.isArray(T)&&(F=T),Array.isArray(D)&&(F=D),S?m=F:m=F.map(N=>({label:lD(N,k,_),value:lD(N,k,_)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(m=((C=c.data)==null?void 0:C.map(b=>({label:b,value:b})))||[],c.options&&Array.isArray(c.options)&&(m=c.options)):c.inputType==="dictionary"?m=await d(t):c.inputType==="system-dictionary"&&(m=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await g(),m};function ML(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,attrid:c,form:h,langId:m}=e,d=ve.Form.useWatch(c,h),{message:g}=ve.App.useApp(),C=r.input,[b,x]=W.useState(e.value),[_,k]=W.useState(!1),[S,A]=W.useState([]),[T,D]=W.useState([]),[F,N]=W.useState(!1),[L,P]=W.useState({PageNum:1,PageSize:6}),[U,$]=W.useState([]),[O,z]=W.useState(0),j=G();W.useEffect(()=>{_&&Y()},[_,L]);const H=(Z,V)=>{A(Z),D(V)},Y=async()=>{var Z;if(r.inputType==="url"&&(r!=null&&r["action-url"])){N(!0);try{const V=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...L,...(r==null?void 0:r["action-url-extra-params"])||{}});if((V==null?void 0:V.ReturnValue)===0){g.error(V.msg),N(!1);return}const te=V==null?void 0:V.data,oe=(Z=te==null?void 0:te.list)==null?void 0:Z.map((pe,me)=>{const Ce=(L.PageNum-1)*L.PageSize+me;return{...pe,_rowKey:Ce}}),re=(oe==null?void 0:oe.filter(pe=>S.includes(pe._rowKey)))||[];D(re),$([...oe||[]]),z((te==null?void 0:te.number)||0),N(!1)}catch(V){N(!1),g.error(m==="10001"?V.msg||"参数错误":"Failed to load data")}return}g.error(m==="10001"?"请配置action-url":"Please configure action-url")},q=()=>{var Z;if(!t){if(b){const V=r==null?void 0:r["key-field"],te=V==null?void 0:V[c],{delimiter:oe="-",list:re=[]}=te||{};if(!V){g.error(m==="10001"?"请配置key-field":"Please configure key-field");return}switch(C){case"mul-field-modal-select":const pe=(Z=b==null?void 0:b.split(oe))==null?void 0:Z[0],me=U==null?void 0:U.findIndex(Ae=>Object.values(Ae).includes(pe));A([me]);break;case"modal-mult-select":const Ce=b==null?void 0:b.split(","),se=Ce==null?void 0:Ce.map(Ae=>{var qe;const De=(qe=Ae.split(oe))==null?void 0:qe[0];return U==null?void 0:U.findIndex(Se=>De.includes((Se==null?void 0:Se.typeid)||(Se==null?void 0:Se.instanceid)))});A(se);break}}k(!0)}},X=async()=>{try{const Z=await PL(T,r);x((Z==null?void 0:Z[c])||""),e.onSure(Z),k(!1)}catch(Z){g.error(m==="10001"?Z.msg||"参数错误":"Failed to load data")}},ne=()=>{P({...L,PageNum:1}),k(!1)};function G(){const Z=r["modal-field-list"];let V=[];for(let te in Z){let oe=Z[te];const re={dataIndex:te,title:oe};V=[...V,re]}return V}const ee=Z=>{P({...L,PageNum:Z})};return Pe(rn,{children:[Q(ve.Select,{placeholder:m==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:q,open:!1,value:d,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:_,onOk:X,onCancel:ne,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:j,loading:F,dataSource:U,rowKey:Z=>Z._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:S,onChange:H},pagination:{total:O,current:L.PageNum,pageSize:L.PageSize,onChange:ee}})})||Q(ve.Modal,{title:r["modal-caption"],open:_,onOk:X,onCancel:ne,width:r["modal-width"]??600,okButtonProps:{disabled:S.length===0},children:Q(ve.Table,{columns:j,loading:F,dataSource:U,rowKey:Z=>Z._rowKey,rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:S,onChange:H},pagination:{total:O,current:L.PageNum,pageSize:L.PageSize,onChange:ee}})})]})}function PL(e,r){return new Promise((t,i)=>{try{var l=r["key-field"];if(!l){i({msg:"请配置key-field"});return}let f={};e.forEach(c=>{for(let[h,m]of Object.entries(l)){const d=(m==null?void 0:m.list)??[],g=(m==null?void 0:m.delimiter)??"-",C=d.map(b=>c==null?void 0:c[b]);f[h]=C.join(g)}}),t(f)}catch{i({msg:"key-field参数配置错误"})}})}function BL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:h}=ve.App.useApp(),m=r.input,[d,g]=W.useState(e.value),[C,b]=W.useState(!1),[x,_]=W.useState([]),[k,S]=W.useState([]),[A,T]=W.useState(!1),[D,F]=W.useState({PageNum:1,PageSize:6}),[N,L]=W.useState([]),[P,U]=W.useState(0),$=q();W.useEffect(()=>{C&&z()},[C,D]);const O=(ne,G)=>{_(ne),S(G)},z=async()=>{var ne;if(r.inputType==="url"&&(r!=null&&r["action-url"])){T(!0);try{const G=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...D});if((G==null?void 0:G.ReturnValue)===0){h.error(G.msg),T(!1);return}const ee=G==null?void 0:G.data,Z=(ne=ee==null?void 0:ee.list)==null?void 0:ne.map((te,oe)=>{const re=(D.PageNum-1)*D.PageSize+oe;return{...te,_rowKey:re}}),V=(Z==null?void 0:Z.filter(te=>x.includes(te._rowKey)))||[];S(V),L([...Z||[]]),U((ee==null?void 0:ee.number)||0),T(!1)}catch(G){T(!1),h.error(c==="10001"?G.msg||"参数错误":"Failed to load data")}return}h.error(c==="10001"?"请配置action-url":"Please configure action-url")},j=()=>{var ne,G;if(!t){if(d){const ee=((ne=r==null?void 0:r["key-field"])==null?void 0:ne.list)??[],Z=((G=r==null?void 0:r["key-field"])==null?void 0:G.delimiter)??"-";if(!ee.length){h.error(c==="10001"?"请配置key-field":"Please configure key-field");return}switch(m){case"modal-select":const V=d==null?void 0:d.split("-"),te=N==null?void 0:N.findIndex(pe=>V.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));_([te]);break;case"modal-mult-select":const oe=d==null?void 0:d.split(","),re=oe==null?void 0:oe.map(pe=>{var Ce;const me=(Ce=pe.split(Z))==null?void 0:Ce[0];return N==null?void 0:N.findIndex(se=>me.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)))});_(re);break}}b(!0)}},H=async()=>{try{const ne=await LL(k,r,c);g(ne),e.onSure(ne),b(!1)}catch(ne){h.error(c==="10001"?ne.msg||"参数错误":"Failed to build value")}},Y=()=>{F({...D,PageNum:1}),b(!1)};function q(){const ne=r["modal-field-list"];let G=[];for(let ee in ne){let Z=ne[ee];const V={dataIndex:ee,title:Z};G=[...G,V]}return G}const X=ne=>{F({...D,PageNum:ne})};return Pe(rn,{children:[Q(ve.Select,{placeholder:c==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:j,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:Y,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:$,loading:A,dataSource:N,rowKey:ne=>ne._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:m==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:O},pagination:{total:P,current:D.PageNum,pageSize:D.PageSize,onChange:X}})})||Q(ve.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:Y,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(ve.Table,{columns:$,loading:A,dataSource:N,rowKey:ne=>ne._rowKey,rowSelection:{type:m==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:O},pagination:{total:P,current:D.PageNum,pageSize:D.PageSize,onChange:X}})})]})}function LL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let h=e.map(m=>c.map(g=>m[g]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(h)}catch{l({msg:t==="10001"?"key-field参数配置错误":"Failed to build value"})}})}const zL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:h,handleUrlOptions:m,value:d,interfaceTypeDict:g,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:_}=e,{message:k}=ve.App.useApp(),[S,A]=W.useState([]),[T,D]=W.useState(d||[]);W.useEffect(()=>{if((r==null?void 0:r.inputType)==="local"){const L=(r==null?void 0:r.data)||[];A(L.map(P=>({value:P,label:P})))}else(r==null?void 0:r.inputType)==="dictionary"?F(r.classify,g):(r==null?void 0:r.inputType)==="system-dictionary"?F(r.classify,C):(r==null?void 0:r.inputType)==="url"&&N()},[r==null?void 0:r.inputType]);const F=async(L,P)=>{var $;if(!L)return;const U=await h(P,{asctypeid:L});if((U==null?void 0:U.ReturnValue)===1){const O=(($=U==null?void 0:U.data)==null?void 0:$.list)||[];A(O.map(z=>{const j=z.dicid+"-"+z.info;return{value:j,label:j}}))}},N=async()=>{var L,P;try{const U=((L=r==null?void 0:r["key-field"])==null?void 0:L.list)||[],$=((P=r==null?void 0:r["key-field"])==null?void 0:P.delimiter)||"";if(!U.length){k.error(_==="10001"?"请配置key-field":"Please configure key-field");return}const O=await c({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[b]:r==null?void 0:r["action-url"],...x});if(O!=null&&O.data){const z=O==null?void 0:O.data,j=z==null?void 0:z.list;let H=[];Array.isArray(z)&&(H=z),Array.isArray(j)&&(H=j);const Y=H.map(q=>({label:m(q,$,U),value:m(q,$,U)}));A([...Y])}}catch{k.error(_==="10001"?"加载选项失败":"Failed to load options")}finally{}};return Q(ve.Checkbox.Group,{...l,options:S,value:T,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:L=>{D(L),t==null||t(L)},disabled:i})},UL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:h,interfaceTypeSysDict:m,actionUrlKey:d,actionUrlExtraParams:g,langId:C})=>{const[b,x]=W.useState([]),[_,k]=W.useState(!1),{message:S}=ve.App.useApp();W.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let P=[];e.data&&Array.isArray(e.data)?P=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(P=e.options),x(P)}else if(e.inputType==="dictionary")await T(m);else if(e.inputType==="system-dictionary")T(m);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const P=await F();P&&Array.isArray(P)&&x(P)}else{let P=[];e.data&&Array.isArray(e.data)?P=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(P=e.options),x(P)}},T=async P=>{var U;if(e.classify){k(!0);try{const $=await c(P,{asctypeid:e.classify});if((U=$==null?void 0:$.data)!=null&&U.list&&Array.isArray($.data.list)){const O=$.data.list.map(z=>({label:`${z.dicid||""}-${z.info||""}`,value:`${z.dicid||""}-${z.info||""}`}));x(O)}}catch{S.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},D=(P,U)=>{i&&i(P)},F=async P=>new Promise(async(U,$)=>{var Y,q,X;const O=((Y=e==null?void 0:e["key-field"])==null?void 0:Y.list)||[],z=(e==null?void 0:e["search-field"])||[],j=((q=e==null?void 0:e["key-field"])==null?void 0:q.delimiter)||"-";if(!O.length){S.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...g};P&&(z.forEach(ne=>{H[ne]=P[ne]||""}),H.level=Number(P.level||0)+1||""),k(!0);try{const ne=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((X=ne==null?void 0:ne.data)!=null&&X.list&&Array.isArray(ne.data.list)){const G=ne.data.list.map(ee=>({...ee,label:`${ee[O[0]]||""}${j}${ee[O[1]]||""}`,value:`${ee[O[0]]||""}${j}${ee[O[1]]||""}`,children:[],isLeaf:(ee==null?void 0:ee.subcount)===0}));U(G)}$([])}catch{S.error(C==="10001"?"加载选项失败":"Failed to load options"),$([])}finally{$([]),k(!1)}}),N=async P=>{const U=P[P.length-1],$=await F(U)||[];return U.children=$,x([...b]),$},L=(P,U)=>U.some($=>$.label.toLowerCase().includes(P.toLowerCase()));return Q(ve.Cascader,{showSearch:{filter:L},loading:_,placeholder:C==="10001"?"请选择":"Please select",loadData:N,disabled:r,onChange:D,style:{...l},options:b,value:t,onOpenChange:async P=>{var U;if(P&&(t!=null&&t.length)){const $=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],O=(e==null?void 0:e["search-field"])||[];if(!$.length||!O.length){S.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const z=$.findIndex(Y=>Y===O[0]);if(z===-1){S.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const j=t.map(Y=>Y.split("-")[z]||"").filter(Boolean);let H=b;for(const[Y,q]of j.entries()){if(Y===j.length-1)break;const X=H.filter(ee=>ee[O[0]]===q);if(X.length===0)break;const ne=X[0];if(ne.children&&ne.children.length>0){H=ne.children;continue}H=await N(X)}}}})},jL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f})=>{const[c,h]=W.useState([]),[m,d]=W.useState(!1);W.useEffect(()=>{(async()=>{var T;if(e.inputType==="url"&&e["action-url"]){d(!0);try{const D=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(T=D==null?void 0:D.data)!=null&&T.list&&Array.isArray(D.data.list)?h(D.data.list):D!=null&&D.data&&Array.isArray(D.data)?h(D.data):Array.isArray(D==null?void 0:D.list)?h(D.list):(D==null?void 0:D.ReturnValue)===1&&(D!=null&&D.data)&&(Array.isArray(D.data)?h(D.data):h([D.data]))}catch{}finally{d(!1)}}else e.data&&Array.isArray(e.data)&&h(e.data)})()},[e.inputType,e["action-url"],e.data]);const g=A=>JSON.stringify(A),C=A=>{const T=g(A);return t===T},b=A=>{if(r)return;const T=g(A);i&&i(T)},x=e["card-image-width"]||200,_=e["card-image-height"]||100,k=e["card-image-field"],S=e["card-info-field"];return Q("div",{style:{...l},children:m?Q("div",{style:{textAlign:"center",padding:"20px"},children:"加载中..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"0px"},children:c.map((A,T)=>{const D=C(A);return Pe("div",{onClick:()=>b(A),style:{flex:"1 1 auto",width:`${x}px`,padding:"12px",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[A[k]&&Q("img",{src:A.picurl,alt:A[S]||"",style:{width:`${x}px`,height:`${_}px`,objectFit:"cover",borderRadius:"4px",marginBottom:"8px"},onError:F=>{F.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Pe(ve.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:D?"none":"1px solid #d9d9d9",backgroundColor:D?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:D&&Q(f8,{style:{fontSize:"12px",color:"#fff"}})}),A[S]||""]})})]},T)})})})},WQ="";function Xp(e,r){if(!e)return r;let t;return typeof e=="function"?t=e():"current"in e?t=e.current:t=e,t}function Mi(){}const Jp=Object.assign,Ac=typeof window<"u";function Jr(e){return e!=null}function Oc(e){return typeof e=="function"}function IL(e){return cd(e)&&Oc(e.then)&&Oc(e.catch)}function cd(e){return e!==null&&typeof e=="object"}function sD(e,r,t){return r.reduce((i,l)=>((!t||e[l]!==void 0)&&(i[l]=e[l]),i),{})}function $2(e,r){return r?typeof r=="string"?` ${e}--${r}`:Array.isArray(r)?r.reduce((t,i)=>t+$2(e,i),""):Object.keys(r).reduce((t,i)=>t+(r[i]?$2(e,i):""),""):""}function HL(e){return(r,t)=>(r&&typeof r!="string"&&(t=r,r=""),r=r?`${e}__${r}`:e,`${r}${$2(r,t)}`)}function Cn(e,r){return e=`${r||"rv"}-${e}`,[HL(e),e]}function VL(e){e.stopPropagation()}function Y2(e,r){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),r&&VL(e)}const $L={click:"onClick"};function uD(e,r){const t=Object.assign({},r.props);for(const i of e){const l=$L[i];t[l]=function(f){var c,h;f.stopPropagation(),(h=(c=r.props)[l])===null||h===void 0||h.call(c,f)}}return W.cloneElement(r,t)}const fd=Ac?window:global;let cD=Date.now();function YL(e){const r=Date.now(),t=Math.max(0,16-(r-cD)),i=setTimeout(e,t);return cD=r+t,i}function q2(e){return(fd.requestAnimationFrame||YL).call(fd,e)}function qL(){return Ac?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1}function GL(e){const r="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(r,0)}function KL(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function WL(e){fD(window,e)}function fD(e,r){"scrollTop"in e?e.scrollTop=r:e.scrollTo(e.scrollX,r)}const QL=qL();function dD(){QL&&WL(KL())}function pD(e){return/^\d+(\.\d+)?$/.test(e)}function hD(e){return Number.isNaN?Number.isNaN(e):e!==e}function fl(e){if(Jr(e))return e=String(e),pD(e)?`${e}px`:e}function ZL(e){if(Jr(e)){const r=fl(e);return{width:r,height:r}}return{}}let G2;function XL(){if(!G2){const e=document.documentElement,r=e.style.fontSize||window.getComputedStyle(e).fontSize;G2=parseFloat(r)}return G2}function JL(e){return e=e.replace(/rem/g,""),+e*XL()}function ez(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function tz(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function vD(e){if(typeof e=="number")return e;if(Ac){if(e.indexOf("rem")!==-1)return JL(e);if(e.indexOf("vw")!==-1)return ez(e);if(e.indexOf("vh")!==-1)return tz(e)}return parseFloat(e)}function eh(e,r,t){return Math.min(Math.max(e,r),t)}function mD(e,r,t){const i=e.indexOf(r);return i===-1?e:r==="-"&&i!==0?e.slice(0,i):e.slice(0,i+1)+e.slice(i).replace(t,"")}function nz(e,r=!0,t=!0){r?e=mD(e,".",/\./g):e=e.split(".")[0],t?e=mD(e,"-",/-/g):e=e.replace(/-/,"");const i=r?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(i,"")}function dl(e,r=2){let t=`${e}`;for(;t.length<r;)t=`0${t}`;return t}let gD=!1;if(Ac)try{const e={};Object.defineProperty(e,"passive",{get(){gD=!0}}),window.addEventListener("test-passive",null,e)}catch{}function K2(e,r,t={}){if(!Ac)return;const{target:i=window,passive:l=!1,capture:f=!1,depends:c=[]}=t;let h;const m=()=>{const g=Xp(i);g&&!h&&(g.addEventListener(e,r,gD?{capture:f,passive:l}:f),h=!0)},d=()=>{const g=Xp(i);g&&h&&(g.removeEventListener(e,r,f),h=!1)};W.useEffect(()=>(m(),()=>d()),[i,...c])}function W2(e){const[r,t]=W.useState(e),i=W.useRef(r),l=W.useCallback(f=>{t(c=>i.current=Oc(f)?f(c):f)},[r]);return[r,l,i]}const rz=()=>{const e=W.useRef(!1);return W.useEffect(()=>(e.current=!1,()=>{e.current=!0}),[]),e},yD=(e={})=>{const r=rz(),[t,i,l]=W2(e),f=W.useCallback(c=>{r.current||i(h=>Object.assign(Object.assign({},h),Oc(c)?c(h):c))},[]);return[t,f,l]},Rc=(e,r)=>{const t=W.useRef(!1);W.useEffect(()=>{if(!t.current)t.current=!0;else return e()},r)};function xD(e){const r=W.useRef(e);return r.current=e,r}const az=process.env.NODE_ENV==="development";function JQ(e,r){}const bD=e=>{process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=xD(e);W.useEffect(()=>()=>{r.current()},[])};function CD(e,r){if(e===r)return!0;for(let t=0;t<e.length;t++)if(!Object.is(e[t],r[t]))return!1;return!0}const iz=(e=>(t,i,l)=>{const f=W.useRef(!1),c=W.useRef([]),h=W.useRef([]),m=W.useRef();e(()=>{var d;const C=(Array.isArray(l)?l:[l]).map(b=>Xp(b));if(!f.current){f.current=!0,c.current=C,h.current=i,m.current=t();return}(C.length!==c.current.length||!CD(C,c.current)||!CD(i,h.current))&&((d=m.current)===null||d===void 0||d.call(m),c.current=C,h.current=i,m.current=t())}),bD(()=>{var d;(d=m.current)===null||d===void 0||d.call(m),f.current=!1})})(W.useEffect);function oz(e,r){const[t,i]=W.useState(),[l,f]=W.useState();return iz(()=>{const c=Xp(e);if(!c)return;const h=new IntersectionObserver(m=>{for(const d of m)f(d.intersectionRatio),i(d.isIntersecting)},Object.assign(Object.assign({},r),{root:Xp(r==null?void 0:r.root)}));return h.observe(c),()=>{h.disconnect()}},[],e),[t,l]}const wD=10;function lz(e,r){return e>r&&e>wD?"horizontal":r>e&&r>wD?"vertical":""}function _D(){const e=W.useRef(0),r=W.useRef(0),t=W.useRef(0),i=W.useRef(0),l=W.useRef(0),f=W.useRef(0),c=W.useRef(""),h=W.useRef(null),m=()=>c.current==="vertical",d=()=>c.current==="horizontal",g=()=>{t.current=0,i.current=0,l.current=0,f.current=0,c.current="",h.current=null};return{move:x=>{const _=x.touches[0];t.current=_.clientX<0?0:_.clientX-e.current,i.current=_.clientY-r.current,l.current=Math.abs(t.current),f.current=Math.abs(i.current),h.current===null?h.current=!0:h.current=!1,c.current||(c.current=lz(l.current,f.current))},start:x=>{g(),e.current=x.touches[0].clientX,r.current=x.touches[0].clientY},reset:g,startX:e,startY:r,deltaX:t,deltaY:i,offsetX:l,offsetY:f,direction:c,isVertical:m,isHorizontal:d,firstMove:h}}const ED=/scroll|auto/i,sz=Ac?window:void 0;function uz(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function cz(e,r=sz){r===void 0&&(r=window);let t=e;for(;t&&t!==r&&uz(t);){const{overflowY:i}=window.getComputedStyle(t);if(ED.test(i)){if(t.tagName!=="BODY")return t;const l=window.getComputedStyle(t.parentNode).overflowY;if(ED.test(l))return t}t=t.parentNode}return r}const fz=e=>(r,t)=>{const i=W.useRef(!1);e(()=>()=>{i.current=!1},[]),e(()=>{if(!i.current)i.current=!0;else return r()},t)},th=Ac?W.useLayoutEffect:W.useEffect,dz=fz(th),SD=()=>{const[,e]=W.useState({});return W.useCallback(()=>e({}),[])};function DD(e){process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=W.useRef(e);r.current=W.useMemo(()=>e,[e]);const t=W.useRef();return t.current||(t.current=function(...i){return r.current.apply(this,i)}),t.current}function nh(e){const{value:r,defaultValue:t,onChange:i}=e,l=SD(),f=W.useRef(r!==void 0?r:t);r!==void 0&&(f.current=r);const c=DD((h,m)=>{const d=typeof h=="function"?h(f.current):h;!m&&d===f.current||(f.current=d,l(),i==null||i(d))});return[f.current,c]}const aZ="";function $a(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t}function Q2(e,r,t,i){function l(f){return f instanceof t?f:new t(function(c){c(f)})}return new(t||(t=Promise))(function(f,c){function h(g){try{d(i.next(g))}catch(C){c(C)}}function m(g){try{d(i.throw(g))}catch(C){c(C)}}function d(g){g.done?f(g.value):l(g.value).then(h,m)}d((i=i.apply(e,r||[])).next())})}const iZ="",pz=({bem:e})=>Q(rn,{children:Array(12).fill(null).map((r,t)=>Q("i",{className:Re(e("line",String(t+1)))},t))}),hz=({bem:e})=>Q("svg",Object.assign({className:Re(e("circular")),viewBox:"25 25 50 50"},{children:Q("circle",{cx:"50",cy:"50",r:"20",fill:"none"})})),vz=({bem:e})=>Pe("div",Object.assign({className:Re(e("ball"))},{children:[Q("div",{}),Q("div",{}),Q("div",{})]})),mz=e=>({spinner:Q(pz,{bem:e}),circular:Q(hz,{bem:e}),ball:Q(vz,{bem:e})}),[Ng]=Cn("loading"),Z2=e=>{const{className:r,type:t="circular",vertical:i,color:l,size:f,textColor:c,children:h,textSize:m}=e,d=W.useMemo(()=>Object.assign({color:l},ZL(f)),[l,f]),g=()=>h?Q("span",Object.assign({className:Re(Ng("text")),style:{fontSize:fl(m),color:c??l}},{children:h})):null;return Pe("div",Object.assign({className:Re(r,Ng([t,{vertical:i}])),style:e.style},{children:[Q("span",Object.assign({className:Re(Ng("spinner",t)),style:d},{children:mz(Ng)[t]})),g()]}))},gz="#fff",rh="rv-hairline",yz=`${rh}--top`,xz=`${rh}--left`,bz=`${rh}--surround`,Cz=`${rh}--top-bottom`,wz=`${rh}-unset--top-bottom`,kD="rv-shadow",_z="__REACT_VANT_COMPONENT",TD=W.createContext({}),[ah]=Cn("button"),Ez=e=>{const{color:r,loading:t,className:i,hairline:l,loadingText:f,round:c,square:h,plain:m,block:d,loadingType:g,nativeType:C,iconPosition:b}=e,x=$a(e,["color","loading","className","hairline","loadingText","round","square","plain","block","loadingType","nativeType","iconPosition"]),{parent:_}=W.useContext(TD),k=W.useMemo(()=>e.size||(_==null?void 0:_.size)||"normal",[_==null?void 0:_.size,e.size]),S=W.useMemo(()=>e.type||(_==null?void 0:_.type)||"default",[_==null?void 0:_.type,e.type]),A=W.useMemo(()=>m??(_==null?void 0:_.plain),[_==null?void 0:_.plain,m]),T=W.useMemo(()=>d??(_==null?void 0:_.block),[_==null?void 0:_.block,d]),D=W.useMemo(()=>b||(_==null?void 0:_.iconPosition)||"left",[_==null?void 0:_.iconPosition,b]),F=W.useMemo(()=>{var q;return(q=e.disabled)!==null&&q!==void 0?q:_==null?void 0:_.disabled},[_==null?void 0:_.disabled,e.disabled]),N=W.useMemo(()=>C||(_==null?void 0:_.nativeType)||"button",[_==null?void 0:_.nativeType,C]),P=W.useMemo(()=>e.tag||(_==null?void 0:_.tag)||"button",[_==null?void 0:_.tag,e.tag]),U=Re(i,ah([S,k,{plain:A,loading:t,disabled:F,hairline:l,block:T,round:c,square:h}]),{[bz]:l},e.shadow&&`${kD}--${+e.shadow}`),$=Object.assign({},e.style);r&&($.color=A?r:gz,A||($.background=r),r.indexOf("gradient")!==-1?$.border=0:$.borderColor=r);const O=q=>{!t&&!F&&e.onClick&&e.onClick(q)},z=()=>{if(t){const{loadingSize:q="20px"}=e;return Q(Z2,{className:Re(ah("loading")),size:q,type:g,color:S==="default"?void 0:""})}return null},j=()=>e.loading?z():e.icon?W.cloneElement(e.icon,{className:Re(ah("icon"))}):null,H=()=>{let q;return t?q=f:q=e.children||e.text,q?Q("span",Object.assign({className:Re(ah("text"))},{children:q}),"text"):null};return Q(P,Object.assign({},x,{disabled:F,className:U,style:$,type:N,onClick:O},{children:(()=>Pe("div",Object.assign({className:Re(ah("content"))},{children:[D==="left"&&j(),H(),D==="right"&&j()]})))()}))},[Sz]=Cn("button-group"),ih=Object.assign(Ez,{Group:e=>{var{className:r,style:t,children:i,onClick:l}=e,f=$a(e,["className","style","children","onClick"]);return Q("div",Object.assign({onClick:h=>{f.disabled||l==null||l(h)},style:t,className:Re(r,Sz([f.type,{round:f.round,plain:f.plain,disabled:f.disabled}]),f.shadow&&`${kD}--${+f.shadow}`)},{children:Q(TD.Provider,Object.assign({value:{parent:f}},{children:i}))}))}}),fZ="";function ea(...e){const r=Object.assign({},e[0]);return e.forEach(t=>{for(const i in t){const l=t[i];r[i]=r.hasOwnProperty(i)?r[i]:l}}),r}const[AD]=Cn("badge"),Dz=e=>{const r=ea(e,{tag:"div",showZero:!0}),{content:t,max:i,dot:l,showZero:f,tag:c="div"}=r,h=c,m=()=>r.content?!0:Jr(t)&&t!==""&&(f||+t!=0),d=()=>!l&&m()?Jr(i)&&pD(t==null?void 0:t.toString())&&+t>i?`${i}+`:t:null,g=()=>{if(m()||r.dot){let C={background:r.color};if(r.offset){const[b,x]=r.offset;r.children?(C.top=fl(x),C.right=fl(b)):(C.marginTop=fl(x),C.marginLeft=fl(b))}return r.children||(C=Object.assign(Object.assign({},r.style),C)),Q("div",Object.assign({className:Re({[r.className]:r.className&&!r.children},AD({dot:r.dot,fixed:!!r.children})),style:C},{children:d()}))}return null};return r.children?Pe(h,Object.assign({className:Re(AD("wrapper"),r.className),style:r.style,onClick:r.onClick,onTouchStart:r.onTouchStart},{children:[r.children,g()]})):g()},pZ="";var kz=globalThis&&globalThis.__rest||function(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t};function Tz(e){return e.substring(3).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}const ls=W.forwardRef((e,r)=>{const{name:t="",className:i,style:l,spin:f,rotate:c,tabIndex:h,onClick:m,children:d}=e,g=kz(e,["name","className","style","spin","rotate","tabIndex","onClick","children"]),C={};c&&(C.msTransform=`rotate(${c}deg)`,C.transform=`rotate(${c}deg)`);const b=t?Tz(t):void 0;let x=h;x===void 0&&m&&(x=-1);const _=Object.assign({role:"img","aria-label":b,focusable:"false","data-icon":b,"aria-hidden":"true",preserveAspectRatio:"xMidYMid meet",ref:r,tabIndex:x,onClick:m,className:["rv-icon",b?`rv-icon-${b}`:"",f?"rv-icon--spin":"",i].join(" ").trim(),style:Object.assign(Object.assign({},l),C)},g);return W.cloneElement(d,_)}),Az=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M494.094 733.426a41.472 41.472 0 01-20.023-11.126L140.16 388.388c-16.272-16.271-16.272-42.653 0-58.925 16.271-16.272 42.653-16.272 58.925 0L503.66 634.037 808.186 329.51c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L533.2 722.347c-10.607 10.607-25.508 14.3-39.106 11.08z",fillRule:"evenodd"})),Oz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgArrowDown"},e,{ref:r}),Ne.createElement(Az,null))),Rz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M296.114 508.035c-3.22-13.597.473-28.499 11.079-39.105l333.912-333.912c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L395.504 498.47l304.574 304.574c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L307.241 528.058a41.472 41.472 0 01-11.127-20.023z",fillRule:"evenodd"})),Fz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgArrowLeft"},e,{ref:r}),Ne.createElement(Rz,null))),Nz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M513.176 285.05a41.472 41.472 0 0120.024 11.127L867.11 630.089c16.272 16.271 16.272 42.653 0 58.925s-42.654 16.272-58.925 0L503.612 384.44 199.085 688.967c-16.272 16.271-42.654 16.271-58.925 0-16.272-16.272-16.272-42.654 0-58.926L474.07 296.129c10.606-10.606 25.508-14.299 39.105-11.078z",fillRule:"evenodd"})),Mz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgArrowUp"},e,{ref:r}),Ne.createElement(Nz,null))),Pz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M711.156 508.035a41.472 41.472 0 01-11.126 20.023L366.12 861.97c-16.272 16.272-42.654 16.272-58.926 0s-16.272-42.654 0-58.926L611.767 498.47 307.241 193.944c-16.272-16.272-16.272-42.654 0-58.926 16.271-16.272 42.653-16.272 58.925 0L700.078 468.93c10.606 10.606 14.299 25.508 11.078 39.105z",fillRule:"evenodd"})),Bz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgArrow"},e,{ref:r}),Ne.createElement(Pz,null))),Lz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M500 55.556c245.46 0 444.444 198.984 444.444 444.444S745.46 944.444 500 944.444 55.556 745.46 55.556 500 254.54 55.556 500 55.556zm176.441 267.887c-10.848-10.848-28.436-10.848-39.284 0L499.665 460.936 362.172 323.443c-10.848-10.848-28.436-10.848-39.284 0-10.848 10.848-10.848 28.436 0 39.284L460.38 500.22 322.888 637.713c-10.848 10.848-10.848 28.436 0 39.284 10.848 10.848 28.436 10.848 39.284 0l137.493-137.493 137.492 137.493c10.848 10.848 28.436 10.848 39.284 0 10.848-10.848 10.848-28.436 0-39.284L538.948 500.22l137.493-137.493c10.848-10.848 10.848-28.436 0-39.284z",fillRule:"evenodd"})),Mg=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgClear"},e,{ref:r}),Ne.createElement(Lz,null))),zz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M560.149 501.223l255.344 255.344c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L501.223 560.149 245.88 815.493c-16.272 16.272-42.654 16.272-58.925 0-16.272-16.272-16.272-42.654 0-58.926l255.344-255.344L186.954 245.88c-16.272-16.272-16.272-42.654 0-58.925 16.271-16.272 42.653-16.272 58.925 0l255.344 255.344 255.344-255.344c16.272-16.272 42.654-16.272 58.926 0 16.272 16.271 16.272 42.653 0 58.925L560.149 501.223z",fillRule:"nonzero"})),X2=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgCross"},e,{ref:r}),Ne.createElement(zz,null))),Uz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M537.5 537.5v325c0 20.71-16.79 37.5-37.5 37.5s-37.5-16.79-37.5-37.5v-325h-325c-20.71 0-37.5-16.79-37.5-37.5s16.79-37.5 37.5-37.5h325v-325c0-20.71 16.79-37.5 37.5-37.5s37.5 16.79 37.5 37.5v325h325c20.71 0 37.5 16.79 37.5 37.5s-16.79 37.5-37.5 37.5h-325z",fillRule:"nonzero"})),jz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgPlus"},e,{ref:r}),Ne.createElement(Uz,null))),Iz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M500 888.889c-214.389 0-388.889-174.5-388.889-388.889S285.611 111.111 500 111.111 888.889 285.611 888.889 500 714.389 888.889 500 888.889m0-833.333c-245.444 0-444.444 199-444.444 444.444 0 245.444 199 444.444 444.444 444.444 245.444 0 444.444-199 444.444-444.444 0-245.444-199-444.444-444.444-444.444m6.456 222.222c-44.612 0-80 12.778-105.612 39.055-26.277 25.667-39.055 60.445-39.055 105.056v1c0 17.944 14.444 32.444 32.389 32.444 17.889 0 32.389-14.5 32.389-32.444 0-.389-.111-1-.111-1 0-26.945 5.444-48.222 16.444-62.889 12.222-17.111 32.333-25.667 59.889-25.667 21.944 0 39.055 6.111 51.222 18.334 11.611 12.222 17.778 28.722 17.778 50.055 0 15.89-5.556 30.5-16.556 44.556l-10.389 11.61c-37.777 33.556-60.333 59-69.61 75.668-13.834 24.944-11.334 48-11.334 48 0 17.888 14.556 32.388 32.444 32.388 17.945 0 29.778-12.333 32.39-32.388 0 0 3.333-18.667 10.055-30.89 5.5-10.944 14.055-21.388 25-31.11 29.389-25.056 46.444-40.945 51.889-47.667 14.666-19.5 22.555-44.556 22.555-74.445 0-36.61-12.166-65.944-35.944-87.333-24.445-21.944-56.167-32.333-95.833-32.333m-10.417 357.15c-12.778 0-23.222 3.666-31.111 12.222-9.222 7.889-13.5 18.333-13.5 31.111 0 12.222 4.278 22.611 13.5 31.167 7.889 8.5 18.333 12.778 31.11 12.778 12.279 0 23.223-4.278 32.39-12.167 8.5-8.611 12.778-18.945 12.778-31.778 0-12.778-4.278-23.222-12.778-31.111-8.556-8.556-19.556-12.222-32.39-12.222",fillRule:"evenodd"})),Hz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgQuestionO"},e,{ref:r}),Ne.createElement(Iz,null))),Vz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M119.415 524.046c-9.708-9.693-11.278-24.766-2.72-35.554l20.007-25.223c8.201-10.34 23.543-12.936 34.386-5.699l173.175 115.585c9.134 6.097 24.856 5.303 33.384-1.616l457.6-371.25c10.286-8.345 26.397-7.634 35.412 1.368l11.272 11.255c9.81 9.795 9.096 25.343-1.187 35.611l-491.14 490.414c-15.28 15.258-40.369 14.59-56.099-1.116l-214.09-213.775z",fillRule:"nonzero"})),OD=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgSuccess"},e,{ref:r}),Ne.createElement(Vz,null))),EZ="",[RD]=Cn("cell-group"),$z=e=>{const r=ea(e,{border:!0}),{title:t,border:i,inset:l,card:f}=r,c=f||l,h=()=>Q("div",Object.assign({className:Re(RD({inset:c}),{[Cz]:!c&&i})},{children:r.children})),m=()=>t?Q("div",Object.assign({className:Re(RD("title"))},{children:t})):null;return Pe("div",Object.assign({className:r.className,style:r.style},{children:[m(),h()]}))},[dd]=Cn("cell"),J2=Object.assign(e=>{const r=()=>Jr(e.label)?Q("div",Object.assign({className:Re(dd("label"),e.labelClass)},{children:e.label})):null,t=()=>Jr(e.title)?Pe("div",Object.assign({className:Re(dd("title"),e.titleClass),style:e.titleStyle},{children:[e.title,r()]})):null,i=()=>{const S=Jr(e.title);return Jr(e.children)||Jr(e.value)?Q("div",Object.assign({className:Re(dd("value",{alone:!S}),e.valueClass)},{children:Jr(e.children)?e.children:Q("span",{children:e.value})})):null},l=()=>e.icon?W.cloneElement(e.icon,{className:Re(dd("left-icon"))}):null,f=()=>{if(e.rightIcon)return e.rightIcon;if(e.isLink){const S=Re(dd("right-icon"));return e.arrowDirection==="left"?Q(Fz,{className:S}):e.arrowDirection==="up"?Q(Mz,{className:S}):e.arrowDirection==="down"?Q(Oz,{className:S}):Q(Bz,{className:S})}return null},{className:c,style:h,size:m,center:d,border:g=!0,isLink:C,required:b,onClick:x}=e,_=C||e.clickable,k={center:d,required:b,clickable:_,borderless:!g};return m&&(k[m]=!!m),Pe("div",Object.assign({style:h,className:Re(dd(k),c),role:_?"button":void 0,onClick:x},{children:[l(),t(),i(),f(),e.extra]}))},{Group:$z}),TZ="",AZ="";function Pg(e,r){return Pg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Pg(e,r)}function FD(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Pg(e,r)}function Yz(e,r){return e.classList?!!r&&e.classList.contains(r):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+r+" ")!==-1}function qz(e,r){e.classList?e.classList.add(r):Yz(e,r)||(typeof e.className=="string"?e.className=e.className+" "+r:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+r))}function ND(e,r){return e.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Gz(e,r){e.classList?e.classList.remove(r):typeof e.className=="string"?e.className=ND(e.className,r):e.setAttribute("class",ND(e.className&&e.className.baseVal||"",r))}const MD={disabled:!1};var Kz=process.env.NODE_ENV!=="production"?wt.exports.oneOfType([wt.exports.number,wt.exports.shape({enter:wt.exports.number,exit:wt.exports.number,appear:wt.exports.number}).isRequired]):null,Wz=process.env.NODE_ENV!=="production"?wt.exports.oneOfType([wt.exports.string,wt.exports.shape({enter:wt.exports.string,exit:wt.exports.string,active:wt.exports.string}),wt.exports.shape({enter:wt.exports.string,enterDone:wt.exports.string,enterActive:wt.exports.string,exit:wt.exports.string,exitDone:wt.exports.string,exitActive:wt.exports.string})]):null;const PD=W.createContext(null);var oh="unmounted",Fc="exited",Nc="entering",pd="entered",eC="exiting",ss=function(e){FD(r,e);function r(i,l){var f;f=e.call(this,i,l)||this;var c=l,h=c&&!c.isMounting?i.enter:i.appear,m;return f.appearStatus=null,i.in?h?(m=Fc,f.appearStatus=Nc):m=pd:i.unmountOnExit||i.mountOnEnter?m=oh:m=Fc,f.state={status:m},f.nextCallback=null,f}r.getDerivedStateFromProps=function(l,f){var c=l.in;return c&&f.status===oh?{status:Fc}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(l){var f=null;if(l!==this.props){var c=this.state.status;this.props.in?c!==Nc&&c!==pd&&(f=Nc):(c===Nc||c===pd)&&(f=eC)}this.updateStatus(!1,f)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var l=this.props.timeout,f,c,h;return f=c=h=l,l!=null&&typeof l!="number"&&(f=l.exit,c=l.enter,h=l.appear!==void 0?l.appear:c),{exit:f,enter:c,appear:h}},t.updateStatus=function(l,f){l===void 0&&(l=!1),f!==null?(this.cancelNextCallback(),f===Nc?this.performEnter(l):this.performExit()):this.props.unmountOnExit&&this.state.status===Fc&&this.setState({status:oh})},t.performEnter=function(l){var f=this,c=this.props.enter,h=this.context?this.context.isMounting:l,m=this.props.nodeRef?[h]:[fg.findDOMNode(this),h],d=m[0],g=m[1],C=this.getTimeouts(),b=h?C.appear:C.enter;if(!l&&!c||MD.disabled){this.safeSetState({status:pd},function(){f.props.onEntered(d)});return}this.props.onEnter(d,g),this.safeSetState({status:Nc},function(){f.props.onEntering(d,g),f.onTransitionEnd(b,function(){f.safeSetState({status:pd},function(){f.props.onEntered(d,g)})})})},t.performExit=function(){var l=this,f=this.props.exit,c=this.getTimeouts(),h=this.props.nodeRef?void 0:fg.findDOMNode(this);if(!f||MD.disabled){this.safeSetState({status:Fc},function(){l.props.onExited(h)});return}this.props.onExit(h),this.safeSetState({status:eC},function(){l.props.onExiting(h),l.onTransitionEnd(c.exit,function(){l.safeSetState({status:Fc},function(){l.props.onExited(h)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(l,f){f=this.setNextCallback(f),this.setState(l,f)},t.setNextCallback=function(l){var f=this,c=!0;return this.nextCallback=function(h){c&&(c=!1,f.nextCallback=null,l(h))},this.nextCallback.cancel=function(){c=!1},this.nextCallback},t.onTransitionEnd=function(l,f){this.setNextCallback(f);var c=this.props.nodeRef?this.props.nodeRef.current:fg.findDOMNode(this),h=l==null&&!this.props.addEndListener;if(!c||h){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var m=this.props.nodeRef?[this.nextCallback]:[c,this.nextCallback],d=m[0],g=m[1];this.props.addEndListener(d,g)}l!=null&&setTimeout(this.nextCallback,l)},t.render=function(){var l=this.state.status;if(l===oh)return null;var f=this.props,c=f.children;f.in,f.mountOnEnter,f.unmountOnExit,f.appear,f.enter,f.exit,f.timeout,f.addEndListener,f.onEnter,f.onEntering,f.onEntered,f.onExit,f.onExiting,f.onExited,f.nodeRef;var h=wb(f,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(PD.Provider,{value:null},typeof c=="function"?c(l,h):W.cloneElement(W.Children.only(c),h))},r}(W.Component);ss.contextType=PD,ss.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:wt.exports.shape({current:typeof Element>"u"?wt.exports.any:function(e,r,t,i,l,f){var c=e[r];return wt.exports.instanceOf(c&&"ownerDocument"in c?c.ownerDocument.defaultView.Element:Element)(e,r,t,i,l,f)}}),children:wt.exports.oneOfType([wt.exports.func.isRequired,wt.exports.element.isRequired]).isRequired,in:wt.exports.bool,mountOnEnter:wt.exports.bool,unmountOnExit:wt.exports.bool,appear:wt.exports.bool,enter:wt.exports.bool,exit:wt.exports.bool,timeout:function(r){var t=Kz;r.addEndListener||(t=t.isRequired);for(var i=arguments.length,l=new Array(i>1?i-1:0),f=1;f<i;f++)l[f-1]=arguments[f];return t.apply(void 0,[r].concat(l))},addEndListener:wt.exports.func,onEnter:wt.exports.func,onEntering:wt.exports.func,onEntered:wt.exports.func,onExit:wt.exports.func,onExiting:wt.exports.func,onExited:wt.exports.func}:{};function hd(){}ss.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hd,onEntering:hd,onEntered:hd,onExit:hd,onExiting:hd,onExited:hd},ss.UNMOUNTED=oh,ss.EXITED=Fc,ss.ENTERING=Nc,ss.ENTERED=pd,ss.EXITING=eC;const BD=ss;var Qz=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return qz(r,i)})},tC=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Gz(r,i)})},nC=function(e){FD(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.appliedClasses={appear:{},enter:{},exit:{}},i.onEnter=function(h,m){var d=i.resolveArguments(h,m),g=d[0],C=d[1];i.removeClasses(g,"exit"),i.addClass(g,C?"appear":"enter","base"),i.props.onEnter&&i.props.onEnter(h,m)},i.onEntering=function(h,m){var d=i.resolveArguments(h,m),g=d[0],C=d[1],b=C?"appear":"enter";i.addClass(g,b,"active"),i.props.onEntering&&i.props.onEntering(h,m)},i.onEntered=function(h,m){var d=i.resolveArguments(h,m),g=d[0],C=d[1],b=C?"appear":"enter";i.removeClasses(g,b),i.addClass(g,b,"done"),i.props.onEntered&&i.props.onEntered(h,m)},i.onExit=function(h){var m=i.resolveArguments(h),d=m[0];i.removeClasses(d,"appear"),i.removeClasses(d,"enter"),i.addClass(d,"exit","base"),i.props.onExit&&i.props.onExit(h)},i.onExiting=function(h){var m=i.resolveArguments(h),d=m[0];i.addClass(d,"exit","active"),i.props.onExiting&&i.props.onExiting(h)},i.onExited=function(h){var m=i.resolveArguments(h),d=m[0];i.removeClasses(d,"exit"),i.addClass(d,"exit","done"),i.props.onExited&&i.props.onExited(h)},i.resolveArguments=function(h,m){return i.props.nodeRef?[i.props.nodeRef.current,h]:[h,m]},i.getClassNames=function(h){var m=i.props.classNames,d=typeof m=="string",g=d&&m?m+"-":"",C=d?""+g+h:m[h],b=d?C+"-active":m[h+"Active"],x=d?C+"-done":m[h+"Done"];return{baseClassName:C,activeClassName:b,doneClassName:x}},i}var t=r.prototype;return t.addClass=function(l,f,c){var h=this.getClassNames(f)[c+"ClassName"],m=this.getClassNames("enter"),d=m.doneClassName;f==="appear"&&c==="done"&&d&&(h+=" "+d),c==="active"&&l&&l.scrollTop,h&&(this.appliedClasses[f][c]=h,Qz(l,h))},t.removeClasses=function(l,f){var c=this.appliedClasses[f],h=c.base,m=c.active,d=c.done;this.appliedClasses[f]={},h&&tC(l,h),m&&tC(l,m),d&&tC(l,d)},t.render=function(){var l=this.props;l.classNames;var f=wb(l,["classNames"]);return W.createElement(BD,Nr({},f,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(W.Component);nC.defaultProps={classNames:""},nC.propTypes=process.env.NODE_ENV!=="production"?Nr({},BD.propTypes,{classNames:Wz,onEnter:wt.exports.func,onEntering:wt.exports.func,onEntered:wt.exports.func,onExit:wt.exports.func,onExiting:wt.exports.func,onExited:wt.exports.func}):{};const LD=nC;function dn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const OZ="",[Zz]=Cn("overlay"),Xz=e=>{const r=W.useRef(null),t=ea(e,{stopPropagation:["click"],lockScroll:!0,duration:300}),{visible:i,duration:l}=t,f=h=>{t.lockScroll&&Y2(h,!0)},c=()=>{const h=Object.assign(Object.assign({zIndex:t.zIndex!==void 0?+t.zIndex:void 0,touchAction:t.lockScroll&&"none"},t.style),t.customStyle);return Jr(l)&&(h.animationDuration=`${l}ms`),uD(t.stopPropagation,Q("div",Object.assign({ref:r,style:h,onClick:m=>{var d;m.target===m.currentTarget&&((d=t.onClick)===null||d===void 0||d.call(t,m))},className:Re(Zz(),t.className)},{children:t.children})))};return K2("touchmove",f,{target:r}),Q(LD,Object.assign({nodeRef:r,mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:l,classNames:"rv-fade"},{children:c()}))};function Jz(e){const{interceptor:r,args:t,done:i,canceled:l}=e;if(r){const f=r.apply(null,t||[]);IL(f)?f.then(c=>{c?i():l&&l()}).catch(Mi):f?i():l&&l()}else i()}function rC(e){return(typeof e=="function"?e():e)||document.body}function Bg(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function eU(e,r){if(Bg()&&e){const t=rC(e);return tu.exports.createPortal(r,t)}return r}const tU=W.createContext({});let zD=!1;if(Bg())try{const e={};Object.defineProperty(e,"passive",{get(){zD=!0}}),window.addEventListener("test-passive",null,e)}catch{}let lh=0;const UD="rv-overflow-hidden";function nU(e,r){const t=_D(),i=c=>{t.move(c);const h=t.deltaY.current>0?"10":"01",m=cz(c.target,e.current);if(!m)return;const{scrollHeight:d,offsetHeight:g,scrollTop:C}=m;let b="11";C===0?b=g>=d?"00":"01":C+g>=d&&(b="10"),b!=="11"&&t.isVertical()&&!(parseInt(b,2)&parseInt(h,2))&&c.cancelable&&c.preventDefault()},l=()=>{document.addEventListener("touchstart",t.start),document.addEventListener("touchmove",i,zD?{passive:!1}:!1),lh||document.body.classList.add(UD),lh++},f=()=>{lh&&(document.removeEventListener("touchstart",t.start),document.removeEventListener("touchmove",i),lh--,lh||document.body.classList.remove(UD))};W.useEffect(()=>{if(r)return l(),()=>{f()}},[r])}let jD=2e3;const[Lg]=Cn("popup"),sh=W.forwardRef((e,r)=>{var t;const i=ea(e,{duration:300,overlay:!0,lockScroll:!0,position:"center",closeIcon:Q(X2,{}),closeIconPosition:"top-right",closeOnClickOverlay:!0,stopPropagation:["click"],teleport:()=>document.body}),{round:l,closeable:f,title:c,description:h,children:m,duration:d,closeIcon:g,position:C}=i,b=W.useRef(!1),x=W.useRef((t=i.zIndex)!==null&&t!==void 0?t:jD),_=W.useRef(),[k,S]=W.useState(i.visible),[A,T]=W.useState(k),D=W.useMemo(()=>{const Y=Object.assign({zIndex:x.current},i.style);if(Jr(i.duration)){const q=i.position==="center"?"animationDuration":"transitionDuration";Y[q]=`${i.duration}ms`}return Y},[x.current,i.position,i.style,i.duration]),F=()=>{var Y;i.zIndex!==void 0?x.current=+i.zIndex:x.current=jD++,b.current=!0,(Y=i.onOpen)===null||Y===void 0||Y.call(i)},N=()=>{Jz({interceptor:i.beforeClose,args:["close"],done:()=>{var Y;b.current=!1,(Y=i.onClose)===null||Y===void 0||Y.call(i)}})},L=Y=>{var q;(q=i.onClickOverlay)===null||q===void 0||q.call(i,Y),i.closeOnClickOverlay&&N()},P=()=>i.overlay?Q(Xz,{visible:k,className:i.overlayClass,customStyle:i.overlayStyle,zIndex:x.current,duration:d,onClick:L}):null,U=Y=>{i.onClickCloseIcon&&i.onClickCloseIcon(Y),N()},$=()=>{if(f){const{closeIconPosition:Y}=i;return g?Q("div",Object.assign({className:Re(Lg("close-icon",Y)),onClick:U},{children:g})):null}return null},O=()=>c?Q("div",Object.assign({className:Re(Lg("title"))},{children:c})):null,z=()=>h?Q("div",Object.assign({className:Re(Lg("description"))},{children:h})):null,j=()=>{const{safeAreaInsetBottom:Y}=i;return uD(i.stopPropagation,Pe("div",Object.assign({ref:_,style:Object.assign(Object.assign({},D),{display:!k&&!A?"none":void 0}),className:Re(Lg({round:l,[C]:C}),{"rv-safe-area-bottom":Y},i.className),onClick:i.onClick},{children:[O(),z(),m,$()]})))},H=()=>{const{transition:Y,destroyOnClose:q,forceRender:X}=i,ne=C==="center"?"rv-fade":`rv-popup-slide-${C}`;return Q(LD,Object.assign({in:k,nodeRef:_,timeout:d,classNames:Y||ne,mountOnEnter:!X,unmountOnExit:q,onEnter:F,onEntered:i.onOpened,onExited:()=>{var G;T(!1),(G=i.onClosed)===null||G===void 0||G.call(i)}},{children:j()}))};return K2("popstate",()=>{i.closeOnPopstate&&N()}),th(()=>{k&&T(!0)},[k]),th(()=>{S(i.visible)},[i.visible]),nU(_,k&&i.lockScroll),W.useImperativeHandle(r,()=>({popupRef:_})),eU(i.teleport,Pe(tU.Provider,Object.assign({value:{visible:k}},{children:[P(),H()]})))}),MZ="",ID=W.createContext({}),[rU]=Cn("action-bar"),aU=e=>{const r=ea(e,{safeAreaInsetBottom:!0}),t=W.useMemo(()=>W.Children.toArray(r.children),[r.children]);return Q(ID.Provider,Object.assign({value:{parent:{children:t}}},{children:Q("div",Object.assign({className:Re(r.className,rU(),{"rv-safe-area-bottom":r.safeAreaInsetBottom}),style:r.style},{children:W.Children.toArray(r.children).filter(Boolean).map((i,l)=>W.cloneElement(i,{index:l}))}))}))},[HD]=Cn("action-bar-icon"),iU=e=>{const r=()=>{const{badge:t,icon:i}=e;return i?Q(Dz,Object.assign({},t,{className:Re(HD("icon"))},{children:i})):null};return Pe("div",Object.assign({role:"button",className:Re(e.className,HD()),style:e.style,tabIndex:0,onClick:e.onClick},{children:[r(),e.children||e.text]}))},[oU]=Cn("action-bar-button"),lU=Object.assign(e=>{const{type:r,icon:t,text:i,color:l,loading:f,disabled:c,index:h}=e,{parent:m}=W.useContext(ID),d=W.useMemo(()=>{if(m){const C=m.children[h-1];return!(C&&"isButton"in C.type)}return!1},[h,m]),g=W.useMemo(()=>{if(m){const C=m.children[h+1];return!(C&&"isButton"in C.type)}return!1},[h,m]);return Q(ih,Object.assign({className:Re(e.className,oU([r,{last:g,first:d}])),style:e.style,size:"large",type:r,icon:t,color:l,loading:f,disabled:c,onClick:e.onClick},{children:e.children?e.children:i}))},{isButton:!0}),aC=Object.assign(aU,{Icon:iU,Button:lU});function sU(e,r,t){const i=r[t];Jr(i)&&(!Object.prototype.hasOwnProperty.call(e,t)||!cd(i)?e[t]=i:e[t]=VD(Object(e[t]),r[t]))}function VD(e,r){return Object.keys(r).forEach(t=>{sU(e,r,t)}),e}const uU={locale:VD({name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,r)=>`${e}年${r}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanPicker:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新...",loading:"加载中..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码不正确",defaultAddress:"设为默认收货地址"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌信息"},vanAddressList:{add:"新增地址"}},{})},vd=W.createContext(uU),[Co]=Cn("dialog"),$D=e=>{const{locale:r}=W.useContext(vd),t=ea(e,{transition:"rv-dialog-bounce",showConfirmButton:!0,closeOnPopstate:!0}),{width:i,title:l,theme:f,visible:c,message:h,className:m,messageAlign:d,closeOnClickOverlay:g,onClickCloseIcon:C}=t,b=$a(t,["width","title","theme","visible","message","className","messageAlign","closeOnClickOverlay","onClickCloseIcon"]),x=()=>t.title?Q("div",Object.assign({className:Re(Co("header",{isolated:!t.message&&!t.children}))},{children:l})):null,_=()=>t.children?Q("div",Object.assign({className:Re(Co("content"))},{children:t.children})):h?Q("div",Object.assign({className:Re(Co("content",{isolated:!l}))},{children:Q("div",Object.assign({className:Re(Co("message",{"has-title":l,[d]:d}))},{children:h}))})):null,k=()=>{var T,D,F,N,L,P;return Pe("div",Object.assign({className:Re(yz,Co("footer"))},{children:[t.showCancelButton&&Q(ih,{size:"large",text:t.cancelButtonText||r.cancel,className:Re(Co("cancel")),style:{color:t.cancelButtonColor},loading:(T=t.cancelProps)===null||T===void 0?void 0:T.loading,disabled:(D=t.cancelProps)===null||D===void 0?void 0:D.disabled,onClick:!((F=t.cancelProps)===null||F===void 0)&&F.loading?Mi:t.onCancel}),t.showConfirmButton&&Q(ih,{size:"large",text:t.confirmButtonText||r.confirm,className:Re(Co("confirm"),{[xz]:t.showCancelButton}),round:f==="round-button"||void 0,style:{color:t.confirmButtonColor},loading:(N=t.confirmProps)===null||N===void 0?void 0:N.loading,disabled:(L=t.confirmProps)===null||L===void 0?void 0:L.disabled,onClick:!((P=t.confirmProps)===null||P===void 0)&&P.loading?Mi:t.onConfirm})]}))},S=()=>{var T,D,F,N,L,P;return Pe(aC,Object.assign({className:Re(Co("footer"))},{children:[t.showCancelButton&&Q(aC.Button,{type:"warning",text:t.cancelButtonText||r.cancel,className:Re(Co("cancel")),color:t.cancelButtonColor,loading:(T=t.cancelProps)===null||T===void 0?void 0:T.loading,disabled:(D=t.cancelProps)===null||D===void 0?void 0:D.disabled,onClick:!((F=t.cancelProps)===null||F===void 0)&&F.loading?Mi:t.onCancel}),t.showConfirmButton&&Q(aC.Button,{type:"danger",text:t.confirmButtonText||r.confirm,className:Re(Co("confirm")),color:t.confirmButtonColor,loading:(N=t.confirmProps)===null||N===void 0?void 0:N.loading,disabled:(L=t.confirmProps)===null||L===void 0?void 0:L.disabled,onClick:!((P=t.confirmProps)===null||P===void 0)&&P.loading?Mi:t.onConfirm})]}))},A=()=>t.footer?t.footer:t.theme==="round-button"?S():k();return Pe(sh,Object.assign({},b,{visible:c,className:Re(Co([f]),m),style:{width:fl(i)},"aria-labelledby":l||h,closeOnClickOverlay:g,onClickCloseIcon:C,onClose:t.onClose,onClosed:t.onClosed},{children:[x(),_(),A()]}))};Number((W.version||"").split(".")[0]);const cU=Number((tu.exports.version||"").split(".")[0]),zg=Object.assign({},v9),{render:fU,unmountComponentAtNode:dU}=zg;let Ug;try{cU>=18&&zg.createRoot&&(Ug=zg.createRoot)}catch{}function YD(e){const{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:r}=zg;r&&typeof r=="object"&&(r.usingClientEntryPoint=e)}const jg="__react_vant_root__";function pU(e,r){fU(e,r)}function hU(e,r){YD(!0);const t=r[jg]||Ug(r);YD(!1),t.render(e),r[jg]=t}function qD(e,r){if(Ug){hU(e,r);return}pU(e,r)}function vU(e){return dU(e)}function mU(e){return Q2(this,void 0,void 0,function*(){return Promise.resolve().then(()=>{var r;(r=e[jg])===null||r===void 0||r.unmount(),delete e[jg]})})}function GD(e){return Ug?mU(e):vU(e)}const md=$D;md.show=e=>{if(!Bg())return null;const r={overlay:!0,closeable:!1,closeIcon:Q(X2,{}),lockScroll:!0,transition:"rv-dialog-bounce",showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1},{onClosed:t,onCancel:i=Mi,onConfirm:l=Mi,onClose:f=Mi,cancelProps:c,confirmProps:h}=e,m=$a(e,["onClosed","onCancel","onConfirm","onClose","cancelProps","confirmProps"]),d=rC(e.teleport),g=document.createElement("div");d.appendChild(g);let C=Mi;return qD(Q(()=>{const[x,_]=W.useState(!1),[k,S]=W.useState(!1),[A,T]=W.useState(!1);W.useEffect(()=>{_(!0)},[]),C=()=>{_(!1),f&&f()};const D=()=>{t&&t(),GD(g)&&g.parentNode&&g.parentNode.removeChild(g)},F=L=>Q2(void 0,void 0,void 0,function*(){const P=setTimeout(()=>T(!0));(yield l(L))!==!1?(clearTimeout(P),C()):(clearTimeout(P),T(!1))}),N=(L,P)=>Q2(void 0,void 0,void 0,function*(){if(P){C();return}const U=setTimeout(()=>S(!0));(yield i(L))!==!1?(clearTimeout(U),C()):(clearTimeout(U),S(!1))});return Q($D,Object.assign({},r,m,{visible:x,teleport:()=>g,cancelProps:Object.assign({loading:k},c),confirmProps:Object.assign({loading:A},h),onClose:C,onCancel:N,onConfirm:F,onClosed:D}))},{}),g),C},md.alert=e=>{const{onConfirm:r=Mi}=e;return new Promise(t=>{md.show(Object.assign(Object.assign({},e),{onConfirm:i=>{r(i),t(i)}}))})},md.confirm=e=>{const{onCancel:r=Mi,onConfirm:t=Mi}=e;return new Promise((i,l)=>{md.show(Object.assign(Object.assign({showCancelButton:!0},e),{onCancel:f=>{r(f),l()},onConfirm:f=>{t(f),i(!0)}}))})};const gU=md,[uh]=Cn("input"),yU=W.forwardRef((e,r)=>{const t=ea(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),i=W.useRef(),[l,f]=W.useState(!1),c=W.useRef(!1),[h,m]=nh(t),{className:d,style:g,align:C,type:b,name:x,placeholder:_,disabled:k,readOnly:S,maxLength:A,autoFocus:T}=t,D=()=>{i!=null&&i.current&&i.current.focus()},F=()=>{i!=null&&i.current&&i.current.blur()};W.useImperativeHandle(r,()=>({clear:()=>{m("")},focus:D,blur:F,get nativeElement(){return i.current}}));const N=W.useMemo(()=>{if(t.clearable&&!S){const j=h!=="",H=t.clearTrigger==="always"||t.clearTrigger==="focus"&&l;return j&&H}return!1},[h,t.clearTrigger,l]),L=j=>{var H;let Y=j;if(!c.current&&(Jr(A)&&Y.length>+A&&(Y=Y.slice(0,A),(H=t.onOverlimit)===null||H===void 0||H.call(t)),b==="number"||b==="digit")){const q=b==="number";Y=nz(Y,q,q)}m(Y)},P=j=>{var H;f(!0),(H=t.onFocus)===null||H===void 0||H.call(t,j),S&&F()},U=j=>{var H;f(!1),(H=t.onBlur)===null||H===void 0||H.call(t,j),dD()},$=j=>{var H;(j.key==="Enter"||+j.charCode==13)&&(Y2(j),t.type==="search"&&F()),(H=t.onKeyPress)===null||H===void 0||H.call(t,j)},O=()=>{let j=b,H;return b==="number"&&(j="text",H="decimal"),b==="digit"&&(j="tel",H="numeric"),Q("input",{value:h,type:j,inputMode:H,ref:i,name:x,className:Re(uh("control")),disabled:k,autoFocus:T,readOnly:S,placeholder:_||"",onBlur:U,onFocus:P,onChange:Y=>{var q;return L((q=Y==null?void 0:Y.currentTarget)===null||q===void 0?void 0:q.value)},onKeyPress:$,autoCapitalize:t.autoCapitalize,autoCorrect:t.autoCorrect,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onCompositionStart:Y=>{var q;c.current=!0,(q=t.onCompositionStart)===null||q===void 0||q.call(t,Y)},onCompositionEnd:Y=>{var q,X;c.current=!1,(q=t.onCompositionEnd)===null||q===void 0||q.call(t,Y),L((X=Y==null?void 0:Y.currentTarget)===null||X===void 0?void 0:X.value)},onClick:t.onClick})},z=j=>{var H;m(""),(H=t.onClear)===null||H===void 0||H.call(t,j)};return Pe("div",Object.assign({className:Re(uh([C]),d),style:g},{children:[t.prefix&&Q("div",Object.assign({className:Re(uh("prefix"))},{children:t.prefix})),O(),N&&W.cloneElement(t.clearIcon||Q(Mg,{}),{className:Re(uh("clear")),onTouchStart:z}),t.suffix&&Q("div",Object.assign({className:Re(uh("suffix"))},{children:t.suffix}))]}))}),[ch]=Cn("textarea"),xU=W.forwardRef((e,r)=>{const t=ea(e,{rows:2,clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),[i,l]=W.useState(!1),f=W.useRef(),c=W.useRef(!1),[h,m]=nh(t),{className:d,style:g,name:C,rows:b,placeholder:x,disabled:_,readOnly:k,maxLength:S,showWordLimit:A,autoFocus:T}=t,D=()=>{f!=null&&f.current&&f.current.focus()},F=()=>{f!=null&&f.current&&f.current.blur()};W.useImperativeHandle(r,()=>({clear:()=>{m("")},focus:D,blur:F,get nativeElement(){return f.current}}));const N=()=>{const H=f.current;if(!H)return;H.style.height="auto";let Y=H.scrollHeight;if(cd(t.autoSize)){const{maxHeight:q,minHeight:X}=t.autoSize;q&&(Y=Math.min(Y,q)),X&&(Y=Math.max(Y,X))}Y&&(H.style.height=`${Y}px`)};W.useEffect(()=>{N()},[h]);const L=W.useMemo(()=>ch("control",[{"min-height":!t.autoSize,clear:t.clearable}]),[t.autoSize]),P=H=>{var Y;let q=H;c.current||Jr(S)&&q.length>+S&&(q=q.slice(0,S),(Y=t.onOverlimit)===null||Y===void 0||Y.call(t)),m(q)},U=H=>{var Y;l(!0),(Y=t.onFocus)===null||Y===void 0||Y.call(t,H),k&&F()},$=H=>{var Y;l(!1),(Y=t.onBlur)===null||Y===void 0||Y.call(t,H),dD()},O=()=>{if(A){const H=(h?`${h}`:"").length;return Q("div",Object.assign({className:Re(ch("word-limit"))},{children:typeof A=="function"?A({currentCount:H,maxLength:S}):Pe(rn,{children:[Q("span",Object.assign({className:Re(ch("word-num"))},{children:H})),S?`/${S}`:!1]})}))}return null},z=H=>{var Y;m(""),(Y=t.onClear)===null||Y===void 0||Y.call(t,H)},j=W.useMemo(()=>{if(t.clearable&&!k){const H=h!=="",Y=t.clearTrigger==="always"||t.clearTrigger==="focus"&&i;return H&&Y}return!1},[h,t.clearTrigger,i]);return Pe("div",Object.assign({className:Re(ch(),d),style:g},{children:[Q("textarea",{ref:f,name:C,rows:b,className:Re(L),value:h,disabled:_,autoFocus:T,readOnly:k,placeholder:x||"",onBlur:$,onFocus:U,onChange:H=>{var Y;return P((Y=H==null?void 0:H.currentTarget)===null||Y===void 0?void 0:Y.value)},onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,autoComplete:t.autoComplete,onCompositionStart:H=>{var Y;c.current=!0,(Y=t.onCompositionStart)===null||Y===void 0||Y.call(t,H)},onCompositionEnd:H=>{var Y,q;c.current=!1,(Y=t.onCompositionEnd)===null||Y===void 0||Y.call(t,H),P((q=H==null?void 0:H.currentTarget)===null||q===void 0?void 0:q.value)},onClick:t.onClick}),j&&W.cloneElement(t.clearIcon,{className:Re(ch("clear")),onTouchStart:z}),O()]}))}),KZ="",WZ="",cu=Object.assign(yU,{TextArea:xU}),[Pi]=Cn("field"),bU=W.forwardRef((e,r)=>{var t;const i=ea(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",formatTrigger:"onChange",defaultValue:""}),l=W.useRef(null),f=W.useRef(null),c=i.type==="textarea"?f:l,h=()=>{c.current&&c.current.focus()},m=()=>{c.current&&c.current.blur()},d=()=>{c.current&&c.current.clear()};W.useImperativeHandle(r,()=>({focus:h,blur:m,clear:d,get nativeElement(){return c.current.nativeElement}}));const g=V=>Jr(i[V])?i[V]:null,C=()=>{const V=g("labelWidth");return V?{width:fl(V)}:{}},b=(V,te="onChange")=>{const{formatTrigger:oe,formatter:re}=i;return re&&te===oe?re(V):V},x=V=>{var te;(te=i.onChange)===null||te===void 0||te.call(i,b(V))},_=()=>{const{value:V,defaultValue:te,align:oe,type:re,placeholder:pe,name:me,maxLength:Ce,disabled:se,readOnly:Ae,clearable:De,clearIcon:qe,clearTrigger:Se,autoFocus:We,onClear:Me,onBlur:bt,onFocus:ft,onKeyPress:It,onOverlimit:wn}=i;if(Jr(i.children))return Q("div",Object.assign({className:Re(Pi("children"))},{children:i.children}));const kn={value:V,onChange:x,placeholder:pe,name:me,defaultValue:te,disabled:se,clearable:De,clearIcon:qe,clearTrigger:Se,onClear:Me,onBlur:bt,onFocus:ft,onKeyPress:It,onOverlimit:wn,autoFocus:We,readOnly:Ae,maxLength:Ce,onClick:i.onClickInput};return re==="textarea"?Q(cu.TextArea,Object.assign({ref:f,autoSize:i.autoSize,showWordLimit:i.showWordLimit,rows:i.rows},kn)):Q(cu,Object.assign({ref:l,type:re,align:oe},kn))},k=()=>{const{leftIcon:V,onClickLeftIcon:te}=i;return V?Q("div",Object.assign({className:Re(Pi("left-icon")),onClick:te},{children:V})):null},S=()=>{const{rightIcon:V,onClickRightIcon:te}=i;return V?Q("div",Object.assign({className:Re(Pi("right-icon")),onClick:te},{children:V})):null},A=()=>{const V=i.errorMessage;return V?Q("div",Object.assign({className:Re(Pi("error-message"))},{children:V})):null},T=()=>i.intro?Q("div",Object.assign({className:Re(Pi("intro"))},{children:i.intro})):null,D=()=>{const{tooltip:V}=i;if(V){let te=Q(Hz,{}),oe={message:V};if(!(W.isValidElement(V)||typeof V=="string")){const re=V,{icon:pe}=re,me=$a(re,["icon"]);te=pe||te,oe=me}return Q("div",Object.assign({className:Re(Pi("tooltip")),onClick:()=>gU.show(oe)},{children:te}))}return null},F=()=>{const{label:V,colon:te}=i;return V?Pe(rn,{children:[V,!!te&&":",D()]}):null},{size:N,center:L,border:P,isLink:U,required:$,clickable:O,labelAlign:z,className:j,labelClass:H,valueClass:Y,controlAlign:q,arrowDirection:X,disabled:ne,titleStyle:G,error:ee}=i,Z=(t=i.suffix)!==null&&t!==void 0?t:i.button;return Pe(J2,Object.assign({title:F(),size:N,icon:k(),center:L,border:P,isLink:U,required:$,clickable:O,extra:i.extra,titleStyle:Object.assign(Object.assign({},C()),G),valueClass:Re(Pi("value",[q]),Y),titleClass:Re(Pi("label",z),H),arrowDirection:X,onClick:i.onClick,style:i.style,className:Re(Pi({error:ee,disabled:ne,[`label-${z}`]:z}),j)},{children:[Pe("div",Object.assign({className:Re(Pi("body"))},{children:[i.prefix&&Q("div",Object.assign({className:Re(Pi("prefix"))},{children:i.prefix})),Q("div",Object.assign({className:Re(Pi("control-wrapper"))},{children:_()})),S(),Z&&Q("div",Object.assign({className:Re(Pi("suffix"))},{children:Z}))]})),A(),T()]}))}),CU=Symbol("field"),iC=Object.assign(bU,{[_z]:CU});function wU(e,r,t){return Math.max(r,Math.min(e,t))}const Sa={toVector(e,r){return e===void 0&&(e=r),Array.isArray(e)?e:[e,e]},add(e,r){return[e[0]+r[0],e[1]+r[1]]},sub(e,r){return[e[0]-r[0],e[1]-r[1]]},addTo(e,r){e[0]+=r[0],e[1]+=r[1]},subTo(e,r){e[0]-=r[0],e[1]-=r[1]}};function KD(e,r,t){return r===0||Math.abs(r)===1/0?Math.pow(e,t*5):e*r*t/(r+t*e)}function WD(e,r,t,i=.15){return i===0?wU(e,r,t):e<r?-KD(r-e,t-r,i)+r:e>t?+KD(e-t,t-r,i)+t:e}function _U(e,[r,t],[i,l]){const[[f,c],[h,m]]=e;return[WD(r,f,c,i),WD(t,h,m,l)]}function si(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function QD(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function ar(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?QD(Object(t),!0).forEach(function(i){si(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QD(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}const ZD={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function XD(e){return e?e[0].toUpperCase()+e.slice(1):""}const EU=["enter","leave"];function SU(e=!1,r){return e&&!EU.includes(r)}function DU(e,r="",t=!1){const i=ZD[e],l=i&&i[r]||r;return"on"+XD(e)+XD(l)+(SU(t,l)?"Capture":"")}const kU=["gotpointercapture","lostpointercapture"];function TU(e){let r=e.substring(2).toLowerCase();const t=!!~r.indexOf("passive");t&&(r=r.replace("passive",""));const i=kU.includes(r)?"capturecapture":"capture",l=!!~r.indexOf(i);return l&&(r=r.replace("capture","")),{device:r,capture:l,passive:t}}function AU(e,r=""){const t=ZD[e],i=t&&t[r]||r;return e+i}function Ig(e){return"touches"in e}function JD(e){return Ig(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function OU(e){return Array.from(e.touches).filter(r=>{var t,i;return r.target===e.currentTarget||((t=e.currentTarget)===null||t===void 0||(i=t.contains)===null||i===void 0?void 0:i.call(t,r.target))})}function RU(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function ek(e){return Ig(e)?RU(e)[0]:e}function FU(e){return OU(e).map(r=>r.identifier)}function oC(e){const r=ek(e);return Ig(e)?r.identifier:r.pointerId}function tk(e){const r=ek(e);return[r.clientX,r.clientY]}function NU(e){const r={};if("buttons"in e&&(r.buttons=e.buttons),"shiftKey"in e){const{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f}=e;Object.assign(r,{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f})}return r}function Hg(e,...r){return typeof e=="function"?e(...r):e}function MU(){}function PU(...e){return e.length===0?MU:e.length===1?e[0]:function(){let r;for(const t of e)r=t.apply(this,arguments)||r;return r}}function nk(e,r){return Object.assign({},r,e||{})}const BU=32;class LU{constructor(r,t,i){this.ctrl=r,this.args=t,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(r){this.ctrl.state[this.key]=r}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:r,shared:t,ingKey:i,args:l}=this;t[i]=r._active=r.active=r._blocked=r._force=!1,r._step=[!1,!1],r.intentional=!1,r._movement=[0,0],r._distance=[0,0],r._direction=[0,0],r._delta=[0,0],r._bounds=[[-1/0,1/0],[-1/0,1/0]],r.args=l,r.axis=void 0,r.memo=void 0,r.elapsedTime=0,r.direction=[0,0],r.distance=[0,0],r.overflow=[0,0],r._movementBound=[!1,!1],r.velocity=[0,0],r.movement=[0,0],r.delta=[0,0],r.timeStamp=0}start(r){const t=this.state,i=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=r.target,t.currentTarget=r.currentTarget,t.lastOffset=i.from?Hg(i.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=r.timeStamp}computeValues(r){const t=this.state;t._values=r,t.values=this.config.transform(r)}computeInitial(){const r=this.state;r._initial=r._values,r.initial=r.values}compute(r){const{state:t,config:i,shared:l}=this;t.args=this.args;let f=0;if(r&&(t.event=r,i.preventDefault&&r.cancelable&&t.event.preventDefault(),t.type=r.type,l.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,l.locked=!!document.pointerLockElement,Object.assign(l,NU(r)),l.down=l.pressed=l.buttons%2===1||l.touches>0,f=r.timeStamp-t.timeStamp,t.timeStamp=r.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const L=t._delta.map(Math.abs);Sa.addTo(t._distance,L)}this.axisIntent&&this.axisIntent(r);const[c,h]=t._movement,[m,d]=i.threshold,{_step:g,values:C}=t;if(i.hasCustomTransform?(g[0]===!1&&(g[0]=Math.abs(c)>=m&&C[0]),g[1]===!1&&(g[1]=Math.abs(h)>=d&&C[1])):(g[0]===!1&&(g[0]=Math.abs(c)>=m&&Math.sign(c)*m),g[1]===!1&&(g[1]=Math.abs(h)>=d&&Math.sign(h)*d)),t.intentional=g[0]!==!1||g[1]!==!1,!t.intentional)return;const b=[0,0];if(i.hasCustomTransform){const[L,P]=C;b[0]=g[0]!==!1?L-g[0]:0,b[1]=g[1]!==!1?P-g[1]:0}else b[0]=g[0]!==!1?c-g[0]:0,b[1]=g[1]!==!1?h-g[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(b);const x=t.offset,_=t._active&&!t._blocked||t.active;_&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=l[this.ingKey]=t._active,r&&(t.first&&("bounds"in i&&(t._bounds=Hg(i.bounds,t)),this.setup&&this.setup()),t.movement=b,this.computeOffset()));const[k,S]=t.offset,[[A,T],[D,F]]=t._bounds;t.overflow=[k<A?-1:k>T?1:0,S<D?-1:S>F?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const N=t._active?i.rubberband||[0,0]:[0,0];if(t.offset=_U(t._bounds,t.offset,N),t.delta=Sa.sub(t.offset,x),this.computeMovement(),_&&(!t.last||f>BU)){t.delta=Sa.sub(t.offset,x);const L=t.delta.map(Math.abs);Sa.addTo(t.distance,L),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&f>0&&(t.velocity=[L[0]/f,L[1]/f])}}emit(){const r=this.state,t=this.shared,i=this.config;if(r._active||this.clean(),(r._blocked||!r.intentional)&&!r._force&&!i.triggerAllEvents)return;const l=this.handler(ar(ar(ar({},t),r),{},{[this.aliasKey]:r.values}));l!==void 0&&(r.memo=l)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function zU([e,r],t){const i=Math.abs(e),l=Math.abs(r);if(i>l&&i>t)return"x";if(l>i&&l>t)return"y"}class UU extends LU{constructor(...r){super(...r),si(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Sa.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Sa.sub(this.state.offset,this.state.lastOffset)}axisIntent(r){const t=this.state,i=this.config;if(!t.axis&&r){const l=typeof i.axisThreshold=="object"?i.axisThreshold[JD(r)]:i.axisThreshold;t.axis=zU(t._movement,l)}t._blocked=(i.lockDirection||!!i.axis)&&!t.axis||!!i.axis&&i.axis!==t.axis}restrictToAxis(r){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":r[1]=0;break;case"y":r[0]=0;break}}}const rk=e=>e,ak=.15,lC={enabled(e=!0){return e},eventOptions(e,r,t){return ar(ar({},t.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[ak,ak];case!1:return[0,0];default:return Sa.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Sa.toVector(e)},transform(e,r,t){const i=e||t.shared.transform;if(this.hasCustomTransform=!!i,process.env.NODE_ENV==="development"){const l=i||rk;return f=>{const c=l(f);return!isFinite(c[0])||isFinite(c[1]),c}}return i||rk},threshold(e){return Sa.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(lC,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const jU=0,fh=ar(ar({},lC),{},{axis(e,r,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(e=jU){return e},bounds(e={}){if(typeof e=="function")return f=>fh.bounds(e(f));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:r=-1/0,right:t=1/0,top:i=-1/0,bottom:l=1/0}=e;return[[r,t],[i,l]]}}),Vg=10,ik={ArrowRight:(e=1)=>[Vg*e,0],ArrowLeft:(e=1)=>[-Vg*e,0],ArrowUp:(e=1)=>[0,-Vg*e],ArrowDown:(e=1)=>[0,Vg*e]};class IU extends UU{constructor(...r){super(...r),si(this,"ingKey","dragging")}reset(){super.reset();const r=this.state;r._pointerId=void 0,r._pointerActive=!1,r._keyboardActive=!1,r._preventScroll=!1,r._delayed=!1,r.swipe=[0,0],r.tap=!1,r.canceled=!1,r.cancel=this.cancel.bind(this)}setup(){const r=this.state;if(r._bounds instanceof HTMLElement){const t=r._bounds.getBoundingClientRect(),i=r.currentTarget.getBoundingClientRect(),l={left:t.left-i.left+r.offset[0],right:t.right-i.right+r.offset[0],top:t.top-i.top+r.offset[1],bottom:t.bottom-i.bottom+r.offset[1]};r._bounds=fh.bounds(l)}}cancel(){const r=this.state;r.canceled||(r.canceled=!0,r._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(r){const t=this.config,i=this.state;if(r.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(r.buttons):t.pointerButtons!==-1&&t.pointerButtons!==r.buttons))return;const l=this.ctrl.setEventIds(r);t.pointerCapture&&r.target.setPointerCapture(r.pointerId),!(l&&l.size>1&&i._pointerActive)&&(this.start(r),this.setupPointer(r),i._pointerId=oC(r),i._pointerActive=!0,this.computeValues(tk(r)),this.computeInitial(),t.preventScrollAxis&&JD(r)!=="mouse"?(i._active=!1,this.setupScrollPrevention(r)):t.delay>0?(this.setupDelayTrigger(r),t.triggerAllEvents&&(this.compute(r),this.emit())):this.startPointerDrag(r))}startPointerDrag(r){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(r),this.emit()}pointerMove(r){const t=this.state,i=this.config;if(!t._pointerActive||t.type===r.type&&r.timeStamp===t.timeStamp)return;const l=oC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;const f=tk(r);if(document.pointerLockElement===r.target?t._delta=[r.movementX,r.movementY]:(t._delta=Sa.sub(f,t._values),this.computeValues(f)),Sa.addTo(t._movement,t._delta),this.compute(r),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(r);return}if(i.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===i.preventScrollAxis||i.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(r);return}else return;this.emit()}pointerUp(r){this.ctrl.setEventIds(r);try{this.config.pointerCapture&&r.target.hasPointerCapture(r.pointerId)&&r.target.releasePointerCapture(r.pointerId)}catch{process.env.NODE_ENV}const t=this.state,i=this.config;if(!t._active||!t._pointerActive)return;const l=oC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(r);const[f,c]=t._distance;if(t.tap=f<=i.tapsThreshold&&c<=i.tapsThreshold,t.tap&&i.filterTaps)t._force=!0;else{const[h,m]=t.direction,[d,g]=t.velocity,[C,b]=t.movement,[x,_]=i.swipe.velocity,[k,S]=i.swipe.distance,A=i.swipe.duration;t.elapsedTime<A&&(Math.abs(d)>x&&Math.abs(C)>k&&(t.swipe[0]=h),Math.abs(g)>_&&Math.abs(b)>S&&(t.swipe[1]=m))}this.emit()}pointerClick(r){this.state.tap||(r.preventDefault(),r.stopPropagation())}setupPointer(r){const t=this.config,i=t.device;if(process.env.NODE_ENV==="development")try{if(i==="pointer"&&t.preventScrollDelay===void 0){const l="uv"in r?r.sourceEvent.currentTarget:r.currentTarget;window.getComputedStyle(l).touchAction}}catch{}t.pointerLock&&r.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(r){this.state._preventScroll&&r.cancelable&&r.preventDefault()}setupScrollPrevention(r){this.state._preventScroll=!1,HU(r);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,r)}setupDelayTrigger(r){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(r)},this.config.delay)}keyDown(r){const t=ik[r.key];if(t){const i=this.state,l=r.shiftKey?10:r.altKey?.1:1;this.start(r),i._delta=t(l),i._keyboardActive=!0,Sa.addTo(i._movement,i._delta),this.compute(r),this.emit()}}keyUp(r){r.key in ik&&(this.state._keyboardActive=!1,this.setActive(),this.compute(r),this.emit())}bind(r){const t=this.config.device;r(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(r(t,"change",this.pointerMove.bind(this)),r(t,"end",this.pointerUp.bind(this)),r(t,"cancel",this.pointerUp.bind(this)),r("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(r("key","down",this.keyDown.bind(this)),r("key","up",this.keyUp.bind(this))),this.config.filterTaps&&r("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function HU(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const dh=typeof window<"u"&&window.document&&window.document.createElement;function VU(){return dh&&"ontouchstart"in window}function ok(){return VU()||dh&&window.navigator.maxTouchPoints>1}function $U(){return dh&&"onpointerdown"in window}function YU(){return dh&&"exitPointerLock"in window.document}function qU(){try{return"constructor"in GestureEvent}catch{return!1}}const eo={isBrowser:dh,gesture:qU(),touch:ok(),touchscreen:ok(),pointer:$U(),pointerLock:YU()},GU=250,KU=180,WU=.5,QU=50,ZU=250,lk={mouse:0,touch:0,pen:8},sk=ar(ar({},fh),{},{device(e,r,{pointer:{touch:t=!1,lock:i=!1,mouse:l=!1}={}}){return this.pointerLock=i&&eo.pointerLock,eo.touch&&t?"touch":this.pointerLock?"mouse":eo.pointer&&!l?"pointer":eo.touch?"touch":"mouse"},preventScrollAxis(e,r,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&e?GU:void 0,!(!eo.touchscreen||t===!1))return e||(t!==void 0?"y":void 0)},pointerCapture(e,r,{pointer:{capture:t=!0,buttons:i=1}={}}){return this.pointerButtons=i,!this.pointerLock&&this.device==="pointer"&&t},keys(e=!0){return e},threshold(e,r,{filterTaps:t=!1,tapsThreshold:i=3,axis:l=void 0}){const f=Sa.toVector(e,t?i:l?1:0);return this.filterTaps=t,this.tapsThreshold=i,f},swipe({velocity:e=WU,distance:r=QU,duration:t=ZU}={}){return{velocity:this.transform(Sa.toVector(e)),distance:this.transform(Sa.toVector(r)),duration:t}},delay(e=0){switch(e){case!0:return KU;case!1:return 0;default:return e}},axisThreshold(e){return e?ar(ar({},lk),e):lk}});process.env.NODE_ENV==="development"&&Object.assign(sk,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}}),ar(ar({},lC),{},{device(e,r,{shared:t,pointer:{touch:i=!1}={}}){if(t.target&&!eo.touch&&eo.gesture)return"gesture";if(eo.touch&&i)return"touch";if(eo.touchscreen){if(eo.pointer)return"pointer";if(eo.touch)return"touch"}},bounds(e,r,{scaleBounds:t={},angleBounds:i={}}){const l=c=>{const h=nk(Hg(t,c),{min:-1/0,max:1/0});return[h.min,h.max]},f=c=>{const h=nk(Hg(i,c),{min:-1/0,max:1/0});return[h.min,h.max]};return typeof t!="function"&&typeof i!="function"?[l(),f()]:c=>[l(c),f(c)]},threshold(e,r,t){return this.lockDirection=t.axis==="lock",Sa.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e}}),ar(ar({},fh),{},{mouseOnly:(e=!0)=>e}),ar(ar({},fh),{},{mouseOnly:(e=!0)=>e});const uk=new Map,sC=new Map;function XU(e){uk.set(e.key,e.engine),sC.set(e.key,e.resolver)}const JU={key:"drag",engine:IU,resolver:sk};function ej(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function tj(e,r){if(e==null)return{};var t=ej(e,r),i,l;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(l=0;l<f.length;l++)i=f[l],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}const nj={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=eo.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:r=!1}={}){return{passive:e,capture:r}},transform(e){return e}},rj=["target","eventOptions","window","enabled","transform"];function $g(e={},r){const t={};for(const[i,l]of Object.entries(r))switch(typeof l){case"function":if(process.env.NODE_ENV==="development"){const f=l.call(t,e[i],i,e);Number.isNaN(f)||(t[i]=f)}else t[i]=l.call(t,e[i],i,e);break;case"object":t[i]=$g(e[i],l);break;case"boolean":l&&(t[i]=e[i]);break}return t}function aj(e,r){const t=e,{target:i,eventOptions:l,window:f,enabled:c,transform:h}=t,m=tj(t,rj),d={shared:$g({target:i,eventOptions:l,window:f,enabled:c,transform:h},nj)};if(r){const g=sC.get(r);d[r]=$g(ar({shared:d.shared},m),g)}else for(const g in m){const C=sC.get(g);if(C)d[g]=$g(ar({shared:d.shared},m[g]),C);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(g)&&g==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.")}return d}class ck{constructor(r,t){si(this,"_listeners",new Set),this._ctrl=r,this._gestureKey=t}add(r,t,i,l,f){const c=this._listeners,h=AU(t,i),m=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},d=ar(ar({},m),f);r.addEventListener(h,l,d);const g=()=>{r.removeEventListener(h,l,d),c.delete(g)};return c.add(g),g}clean(){this._listeners.forEach(r=>r()),this._listeners.clear()}}class ij{constructor(){si(this,"_timeouts",new Map)}add(r,t,i=140,...l){this.remove(r),this._timeouts.set(r,window.setTimeout(t,i,...l))}remove(r){const t=this._timeouts.get(r);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(r=>void window.clearTimeout(r)),this._timeouts.clear()}}let oj=class{constructor(r){si(this,"gestures",new Set),si(this,"_targetEventStore",new ck(this)),si(this,"gestureEventStores",{}),si(this,"gestureTimeoutStores",{}),si(this,"handlers",{}),si(this,"config",{}),si(this,"pointerIds",new Set),si(this,"touchIds",new Set),si(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),lj(this,r)}setEventIds(r){if(Ig(r))return this.touchIds=new Set(FU(r)),this.touchIds;if("pointerId"in r)return r.type==="pointerup"||r.type==="pointercancel"?this.pointerIds.delete(r.pointerId):r.type==="pointerdown"&&this.pointerIds.add(r.pointerId),this.pointerIds}applyHandlers(r,t){this.handlers=r,this.nativeHandlers=t}applyConfig(r,t){this.config=aj(r,t)}clean(){this._targetEventStore.clean();for(const r of this.gestures)this.gestureEventStores[r].clean(),this.gestureTimeoutStores[r].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...r){const t=this.config.shared,i={};let l;if(!(t.target&&(l=t.target(),!l))){if(t.enabled){for(const c of this.gestures){const h=this.config[c],m=fk(i,h.eventOptions,!!l);if(h.enabled){const d=uk.get(c);new d(this,r,c).bind(m)}}const f=fk(i,t.eventOptions,!!l);for(const c in this.nativeHandlers)f(c,"",h=>this.nativeHandlers[c](ar(ar({},this.state.shared),{},{event:h,args:r})),void 0,!0)}for(const f in i)i[f]=PU(...i[f]);if(!l)return i;for(const f in i){const{device:c,capture:h,passive:m}=TU(f);this._targetEventStore.add(l,c,"",i[f],{capture:h,passive:m})}}}};function gd(e,r){e.gestures.add(r),e.gestureEventStores[r]=new ck(e,r),e.gestureTimeoutStores[r]=new ij}function lj(e,r){r.drag&&gd(e,"drag"),r.wheel&&gd(e,"wheel"),r.scroll&&gd(e,"scroll"),r.move&&gd(e,"move"),r.pinch&&gd(e,"pinch"),r.hover&&gd(e,"hover")}const fk=(e,r,t)=>(i,l,f,c={},h=!1)=>{var m,d;const g=(m=c.capture)!==null&&m!==void 0?m:r.capture,C=(d=c.passive)!==null&&d!==void 0?d:r.passive;let b=h?i:DU(i,l,g);t&&C&&(b+="Passive"),e[b]=e[b]||[],e[b].push(f)};function sj(e,r={},t,i){const l=W.useMemo(()=>new oj(e),[]);if(l.applyHandlers(e,i),l.applyConfig(r,t),W.useEffect(l.effect.bind(l)),W.useEffect(()=>l.clean.bind(l),[]),r.target===void 0)return l.bind.bind(l)}function uj(e,r){return XU(JU),sj({drag:e},r||{},"drag")}var uC=hh(),Nt=e=>ph(e,uC),cC=hh();Nt.write=e=>ph(e,cC);var Yg=hh();Nt.onStart=e=>ph(e,Yg);var fC=hh();Nt.onFrame=e=>ph(e,fC);var dC=hh();Nt.onFinish=e=>ph(e,dC);var yd=[];Nt.setTimeout=(e,r)=>{const t=Nt.now()+r,i=()=>{const f=yd.findIndex(c=>c.cancel==i);~f&&yd.splice(f,1),du-=~f?1:0},l={time:t,handler:e,cancel:i};return yd.splice(dk(t),0,l),du+=1,pk(),l};var dk=e=>~(~yd.findIndex(r=>r.time>e)||~yd.length);Nt.cancel=e=>{Yg.delete(e),fC.delete(e),dC.delete(e),uC.delete(e),cC.delete(e)},Nt.sync=e=>{hC=!0,Nt.batchedUpdates(e),hC=!1},Nt.throttle=e=>{let r;function t(){try{e(...r)}finally{r=null}}function i(...l){r=l,Nt.onStart(t)}return i.handler=e,i.cancel=()=>{Yg.delete(t),r=null},i};var pC=typeof window<"u"?window.requestAnimationFrame:()=>{};Nt.use=e=>pC=e,Nt.now=typeof performance<"u"?()=>performance.now():Date.now,Nt.batchedUpdates=e=>e(),Nt.catch=console.error,Nt.frameLoop="always",Nt.advance=()=>{Nt.frameLoop!=="demand"||vk()};var fu=-1,du=0,hC=!1;function ph(e,r){hC?(r.delete(e),e(0)):(r.add(e),pk())}function pk(){fu<0&&(fu=0,Nt.frameLoop!=="demand"&&pC(hk))}function cj(){fu=-1}function hk(){~fu&&(pC(hk),Nt.batchedUpdates(vk))}function vk(){const e=fu;fu=Nt.now();const r=dk(fu);if(r&&(mk(yd.splice(0,r),t=>t.handler()),du-=r),!du){cj();return}Yg.flush(),uC.flush(e?Math.min(64,fu-e):16.667),fC.flush(),cC.flush(),dC.flush()}function hh(){let e=new Set,r=e;return{add(t){du+=r==e&&!e.has(t)?1:0,e.add(t)},delete(t){return du-=r==e&&e.has(t)?1:0,e.delete(t)},flush(t){r.size&&(e=new Set,du-=r.size,mk(r,i=>i(t)&&e.add(i)),du+=e.size,r=e)}}}function mk(e,r){e.forEach(t=>{try{r(t)}catch(i){Nt.catch(i)}})}var fj=Object.defineProperty,dj=(e,r)=>{for(var t in r)fj(e,t,{get:r[t],enumerable:!0})},wo={};dj(wo,{assign:()=>hj,colors:()=>pu,createStringInterpolator:()=>gC,skipAnimation:()=>yk,to:()=>gk,willAdvance:()=>yC});function vC(){}var pj=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),Ye={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function us(e,r){if(Ye.arr(e)){if(!Ye.arr(r)||e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}return e===r}var Wt=(e,r)=>e.forEach(r);function pl(e,r,t){if(Ye.arr(e)){for(let i=0;i<e.length;i++)r.call(t,e[i],`${i}`);return}for(const i in e)e.hasOwnProperty(i)&&r.call(t,e[i],i)}var Bi=e=>Ye.und(e)?[]:Ye.arr(e)?e:[e];function vh(e,r){if(e.size){const t=Array.from(e);e.clear(),Wt(t,r)}}var mh=(e,...r)=>vh(e,t=>t(...r)),mC=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),gC,gk,pu=null,yk=!1,yC=vC,hj=e=>{e.to&&(gk=e.to),e.now&&(Nt.now=e.now),e.colors!==void 0&&(pu=e.colors),e.skipAnimation!=null&&(yk=e.skipAnimation),e.createStringInterpolator&&(gC=e.createStringInterpolator),e.requestAnimationFrame&&Nt.use(e.requestAnimationFrame),e.batchedUpdates&&(Nt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(yC=e.willAdvance),e.frameLoop&&(Nt.frameLoop=e.frameLoop)},gh=new Set,to=[],xC=[],qg=0,Gg={get idle(){return!gh.size&&!to.length},start(e){qg>e.priority?(gh.add(e),Nt.onStart(vj)):(xk(e),Nt(bC))},advance:bC,sort(e){if(qg)Nt.onFrame(()=>Gg.sort(e));else{const r=to.indexOf(e);~r&&(to.splice(r,1),bk(e))}},clear(){to=[],gh.clear()}};function vj(){gh.forEach(xk),gh.clear(),Nt(bC)}function xk(e){to.includes(e)||bk(e)}function bk(e){to.splice(mj(to,r=>r.priority>e.priority),0,e)}function bC(e){const r=xC;for(let t=0;t<to.length;t++){const i=to[t];qg=i.priority,i.idle||(yC(i),i.advance(e),i.idle||r.push(i))}return qg=0,xC=to,xC.length=0,to=r,to.length>0}function mj(e,r){const t=e.findIndex(r);return t<0?e.length:t}var gj=(e,r,t)=>Math.min(Math.max(t,e),r),yj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},_o="[-+]?\\d*\\.?\\d+",Kg=_o+"%";function Wg(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var xj=new RegExp("rgb"+Wg(_o,_o,_o)),bj=new RegExp("rgba"+Wg(_o,_o,_o,_o)),Cj=new RegExp("hsl"+Wg(_o,Kg,Kg)),wj=new RegExp("hsla"+Wg(_o,Kg,Kg,_o)),_j=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ej=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Sj=/^#([0-9a-fA-F]{6})$/,Dj=/^#([0-9a-fA-F]{8})$/;function kj(e){let r;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(r=Sj.exec(e))?parseInt(r[1]+"ff",16)>>>0:pu&&pu[e]!==void 0?pu[e]:(r=xj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|255)>>>0:(r=bj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|_k(r[4]))>>>0:(r=_j.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=Dj.exec(e))?parseInt(r[1],16)>>>0:(r=Ej.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=Cj.exec(e))?(Ck(wk(r[1]),Qg(r[2]),Qg(r[3]))|255)>>>0:(r=wj.exec(e))?(Ck(wk(r[1]),Qg(r[2]),Qg(r[3]))|_k(r[4]))>>>0:null}function CC(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*6*t:t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function Ck(e,r,t){const i=t<.5?t*(1+r):t+r-t*r,l=2*t-i,f=CC(l,i,e+1/3),c=CC(l,i,e),h=CC(l,i,e-1/3);return Math.round(f*255)<<24|Math.round(c*255)<<16|Math.round(h*255)<<8}function xd(e){const r=parseInt(e,10);return r<0?0:r>255?255:r}function wk(e){return(parseFloat(e)%360+360)%360/360}function _k(e){const r=parseFloat(e);return r<0?0:r>1?255:Math.round(r*255)}function Qg(e){const r=parseFloat(e);return r<0?0:r>100?1:r/100}function Ek(e){let r=kj(e);if(r===null)return e;r=r||0;const t=(r&4278190080)>>>24,i=(r&16711680)>>>16,l=(r&65280)>>>8,f=(r&255)/255;return`rgba(${t}, ${i}, ${l}, ${f})`}var yh=(e,r,t)=>{if(Ye.fun(e))return e;if(Ye.arr(e))return yh({range:e,output:r,extrapolate:t});if(Ye.str(e.output[0]))return gC(e);const i=e,l=i.output,f=i.range||[0,1],c=i.extrapolateLeft||i.extrapolate||"extend",h=i.extrapolateRight||i.extrapolate||"extend",m=i.easing||(d=>d);return d=>{const g=Aj(d,f);return Tj(d,f[g],f[g+1],l[g],l[g+1],m,c,h,i.map)}};function Tj(e,r,t,i,l,f,c,h,m){let d=m?m(e):e;if(d<r){if(c==="identity")return d;c==="clamp"&&(d=r)}if(d>t){if(h==="identity")return d;h==="clamp"&&(d=t)}return i===l?i:r===t?e<=r?i:l:(r===-1/0?d=-d:t===1/0?d=d-r:d=(d-r)/(t-r),d=f(d),i===-1/0?d=-d:l===1/0?d=d+i:d=d*(l-i)+i,d)}function Aj(e,r){for(var t=1;t<r.length-1&&!(r[t]>=e);++t);return t-1}var Oj=(e,r="end")=>t=>{t=r==="end"?Math.min(t,.999):Math.max(t,.001);const i=t*e,l=r==="end"?Math.floor(i):Math.ceil(i);return gj(0,1,l/e)},Zg=1.70158,Xg=Zg*1.525,Sk=Zg+1,Dk=2*Math.PI/3,kk=2*Math.PI/4.5,Jg=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Rj={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Sk*e*e*e-Zg*e*e,easeOutBack:e=>1+Sk*Math.pow(e-1,3)+Zg*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Xg+1)*2*e-Xg)/2:(Math.pow(2*e-2,2)*((Xg+1)*(e*2-2)+Xg)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Dk),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Dk)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*kk))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*kk)/2+1,easeInBounce:e=>1-Jg(1-e),easeOutBounce:Jg,easeInOutBounce:e=>e<.5?(1-Jg(1-2*e))/2:(1+Jg(2*e-1))/2,steps:Oj},xh=Symbol.for("FluidValue.get"),bd=Symbol.for("FluidValue.observers"),no=e=>Boolean(e&&e[xh]),ui=e=>e&&e[xh]?e[xh]():e,Tk=e=>e[bd]||null;function Fj(e,r){e.eventObserved?e.eventObserved(r):e(r)}function bh(e,r){const t=e[bd];t&&t.forEach(i=>{Fj(i,r)})}var Ak=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Nj(this,e)}},Nj=(e,r)=>Ok(e,xh,r);function Cd(e,r){if(e[xh]){let t=e[bd];t||Ok(e,bd,t=new Set),t.has(r)||(t.add(r),e.observerAdded&&e.observerAdded(t.size,r))}return r}function Ch(e,r){const t=e[bd];if(t&&t.has(r)){const i=t.size-1;i?t.delete(r):e[bd]=null,e.observerRemoved&&e.observerRemoved(i,r)}}var Ok=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),ey=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Mj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Rk=new RegExp(`(${ey.source})(%|[a-z]+)`,"i"),Pj=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ty=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Fk=e=>{const[r,t]=Bj(e);if(!r||mC())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);if(i)return i.trim();if(t&&t.startsWith("--")){const l=window.getComputedStyle(document.documentElement).getPropertyValue(t);return l||e}else{if(t&&ty.test(t))return Fk(t);if(t)return t}return e},Bj=e=>{const r=ty.exec(e);if(!r)return[,];const[,t,i]=r;return[t,i]},wC,Lj=(e,r,t,i,l)=>`rgba(${Math.round(r)}, ${Math.round(t)}, ${Math.round(i)}, ${l})`,Nk=e=>{wC||(wC=pu?new RegExp(`(${Object.keys(pu).join("|")})(?!\\w)`,"g"):/^\b$/);const r=e.output.map(f=>ui(f).replace(ty,Fk).replace(Mj,Ek).replace(wC,Ek)),t=r.map(f=>f.match(ey).map(Number)),l=t[0].map((f,c)=>t.map(h=>{if(!(c in h))throw Error('The arity of each "output" value must be equal');return h[c]})).map(f=>yh({...e,output:f}));return f=>{var m;const c=!Rk.test(r[0])&&((m=r.find(d=>Rk.test(d)))==null?void 0:m.replace(ey,""));let h=0;return r[0].replace(ey,()=>`${l[h++](f)}${c||""}`).replace(Pj,Lj)}},_C="react-spring: ",Mk=e=>{const r=e;let t=!1;if(typeof r!="function")throw new TypeError(`${_C}once requires a function parameter`);return(...i)=>{t||(r(...i),t=!0)}},zj=Mk(console.warn);function Uj(){zj(`${_C}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var jj=Mk(console.warn);function Ij(){jj(`${_C}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ny(e){return Ye.str(e)&&(e[0]=="#"||/\d/.test(e)||!mC()&&ty.test(e)||e in(pu||{}))}var EC=mC()?W.useEffect:W.useLayoutEffect,Hj=()=>{const e=W.useRef(!1);return EC(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Pk(){const e=W.useState()[1],r=Hj();return()=>{r.current&&e(Math.random())}}function Vj(e,r){const[t]=W.useState(()=>({inputs:r,result:e()})),i=W.useRef(),l=i.current;let f=l;return f?Boolean(r&&f.inputs&&$j(r,f.inputs))||(f={inputs:r,result:e()}):f=t,W.useEffect(()=>{i.current=f,l==t&&(t.inputs=t.result=void 0)},[f]),f.result}function $j(e,r){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}var Bk=e=>W.useEffect(e,Yj),Yj=[];function Lk(e){const r=W.useRef();return W.useEffect(()=>{r.current=e}),r.current}var wh=Symbol.for("Animated:node"),qj=e=>!!e&&e[wh]===e,hl=e=>e&&e[wh],SC=(e,r)=>pj(e,wh,r),ry=e=>e&&e[wh]&&e[wh].getPayload(),zk=class{constructor(){SC(this,this)}getPayload(){return this.payload||[]}},_h=class extends zk{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Ye.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new _h(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,r){return Ye.num(e)&&(this.lastPosition=e,r&&(e=Math.round(e/r)*r,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Ye.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Eh=class extends _h{constructor(e){super(0),this._string=null,this._toString=yh({output:[e,e]})}static create(e){return new Eh(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Ye.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=yh({output:[this.getValue(),e]})),this._value=0,super.reset()}},ay={dependencies:null},iy=class extends zk{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const r={};return pl(this.source,(t,i)=>{qj(t)?r[i]=t.getValue(e):no(t)?r[i]=ui(t):e||(r[i]=t)}),r}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Wt(this.payload,e=>e.reset())}_makePayload(e){if(e){const r=new Set;return pl(e,this._addToPayload,r),Array.from(r)}}_addToPayload(e){ay.dependencies&&no(e)&&ay.dependencies.add(e);const r=ry(e);r&&Wt(r,t=>this.add(t))}},Uk=class extends iy{constructor(e){super(e)}static create(e){return new Uk(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const r=this.getPayload();return e.length==r.length?r.map((t,i)=>t.setValue(e[i])).some(Boolean):(super.setValue(e.map(Gj)),!0)}};function Gj(e){return(ny(e)?Eh:_h).create(e)}function DC(e){const r=hl(e);return r?r.constructor:Ye.arr(e)?Uk:ny(e)?Eh:_h}var jk=(e,r)=>{const t=!Ye.fun(e)||e.prototype&&e.prototype.isReactComponent;return W.forwardRef((i,l)=>{const f=W.useRef(null),c=t&&W.useCallback(_=>{f.current=Qj(l,_)},[l]),[h,m]=Wj(i,r),d=Pk(),g=()=>{const _=f.current;if(t&&!_)return;(_?r.applyAnimatedValues(_,h.getValue(!0)):!1)===!1&&d()},C=new Kj(g,m),b=W.useRef();EC(()=>(b.current=C,Wt(m,_=>Cd(_,C)),()=>{b.current&&(Wt(b.current.deps,_=>Ch(_,b.current)),Nt.cancel(b.current.update))})),W.useEffect(g,[]),Bk(()=>()=>{const _=b.current;Wt(_.deps,k=>Ch(k,_))});const x=r.getComponentProps(h.getValue());return Ne.createElement(e,{...x,ref:c})})},Kj=class{constructor(e,r){this.update=e,this.deps=r}eventObserved(e){e.type=="change"&&Nt.write(this.update)}};function Wj(e,r){const t=new Set;return ay.dependencies=t,e.style&&(e={...e,style:r.createAnimatedStyle(e.style)}),e=new iy(e),ay.dependencies=null,[e,t]}function Qj(e,r){return e&&(Ye.fun(e)?e(r):e.current=r),r}var Ik=Symbol.for("AnimatedComponent"),Zj=(e,{applyAnimatedValues:r=()=>!1,createAnimatedStyle:t=l=>new iy(l),getComponentProps:i=l=>l}={})=>{const l={applyAnimatedValues:r,createAnimatedStyle:t,getComponentProps:i},f=c=>{const h=Hk(c)||"Anonymous";return Ye.str(c)?c=f[c]||(f[c]=jk(c,l)):c=c[Ik]||(c[Ik]=jk(c,l)),c.displayName=`Animated(${h})`,c};return pl(e,(c,h)=>{Ye.arr(e)&&(h=Hk(c)),f[h]=f(c)}),{animated:f}},Hk=e=>Ye.str(e)?e:e&&Ye.str(e.displayName)?e.displayName:Ye.fun(e)&&e.name||null;function Mc(e,...r){return Ye.fun(e)?e(...r):e}var Sh=(e,r)=>e===!0||!!(r&&e&&(Ye.fun(e)?e(r):Bi(e).includes(r))),Vk=(e,r)=>Ye.obj(e)?r&&e[r]:e,$k=(e,r)=>e.default===!0?e[r]:e.default?e.default[r]:void 0,Xj=e=>e,kC=(e,r=Xj)=>{let t=Jj;e.default&&e.default!==!0&&(e=e.default,t=Object.keys(e));const i={};for(const l of t){const f=r(e[l],l);Ye.und(f)||(i[l]=f)}return i},Jj=["config","onProps","onStart","onChange","onPause","onResume","onRest"],eI={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function tI(e){const r={};let t=0;if(pl(e,(i,l)=>{eI[l]||(r[l]=i,t++)}),t)return r}function Yk(e){const r=tI(e);if(r){const t={to:r};return pl(e,(i,l)=>l in r||(t[l]=i)),t}return{...e}}function Dh(e){return e=ui(e),Ye.arr(e)?e.map(Dh):ny(e)?wo.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function nI(e){for(const r in e)return!0;return!1}function TC(e){return Ye.fun(e)||Ye.arr(e)&&Ye.obj(e[0])}function rI(e,r){var t;(t=e.ref)==null||t.delete(e),r==null||r.delete(e)}function aI(e,r){var t;r&&e.ref!==r&&((t=e.ref)==null||t.delete(e),r.add(e),e.ref=r)}var iI={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},AC={...iI.default,mass:1,damping:1,easing:Rj.linear,clamp:!1},oI=class{constructor(){this.velocity=0,Object.assign(this,AC)}};function lI(e,r,t){t&&(t={...t},qk(t,r),r={...t,...r}),qk(e,r),Object.assign(e,r);for(const c in AC)e[c]==null&&(e[c]=AC[c]);let{frequency:i,damping:l}=e;const{mass:f}=e;return Ye.und(i)||(i<.01&&(i=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/i,2)*f,e.friction=4*Math.PI*l*f/i),e}function qk(e,r){if(!Ye.und(r.decay))e.duration=void 0;else{const t=!Ye.und(r.tension)||!Ye.und(r.friction);(t||!Ye.und(r.frequency)||!Ye.und(r.damping)||!Ye.und(r.mass))&&(e.duration=void 0,e.decay=void 0),t&&(e.frequency=void 0)}}var Gk=[],sI=class{constructor(){this.changed=!1,this.values=Gk,this.toValues=null,this.fromValues=Gk,this.config=new oI,this.immediate=!1}};function Kk(e,{key:r,props:t,defaultProps:i,state:l,actions:f}){return new Promise((c,h)=>{let m,d,g=Sh(t.cancel??(i==null?void 0:i.cancel),r);if(g)x();else{Ye.und(t.pause)||(l.paused=Sh(t.pause,r));let _=i==null?void 0:i.pause;_!==!0&&(_=l.paused||Sh(_,r)),m=Mc(t.delay||0,r),_?(l.resumeQueue.add(b),f.pause()):(f.resume(),b())}function C(){l.resumeQueue.add(b),l.timeouts.delete(d),d.cancel(),m=d.time-Nt.now()}function b(){m>0&&!wo.skipAnimation?(l.delayed=!0,d=Nt.setTimeout(x,m),l.pauseQueue.add(C),l.timeouts.add(d)):x()}function x(){l.delayed&&(l.delayed=!1),l.pauseQueue.delete(C),l.timeouts.delete(d),e<=(l.cancelId||0)&&(g=!0);try{f.start({...t,callId:e,cancel:g},c)}catch(_){h(_)}}})}var OC=(e,r)=>r.length==1?r[0]:r.some(t=>t.cancelled)?wd(e.get()):r.every(t=>t.noop)?Wk(e.get()):Eo(e.get(),r.every(t=>t.finished)),Wk=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Eo=(e,r,t=!1)=>({value:e,finished:r,cancelled:t}),wd=e=>({value:e,cancelled:!0,finished:!1});function Qk(e,r,t,i){const{callId:l,parentId:f,onRest:c}=r,{asyncTo:h,promise:m}=t;return!f&&e===h&&!r.reset?m:t.promise=(async()=>{t.asyncId=l,t.asyncTo=e;const d=kC(r,(S,A)=>A==="onRest"?void 0:S);let g,C;const b=new Promise((S,A)=>(g=S,C=A)),x=S=>{const A=l<=(t.cancelId||0)&&wd(i)||l!==t.asyncId&&Eo(i,!1);if(A)throw S.result=A,C(S),S},_=(S,A)=>{const T=new Zk,D=new Xk;return(async()=>{if(wo.skipAnimation)throw kh(t),D.result=Eo(i,!1),C(D),D;x(T);const F=Ye.obj(S)?{...S}:{...A,to:S};F.parentId=l,pl(d,(L,P)=>{Ye.und(F[P])&&(F[P]=L)});const N=await i.start(F);return x(T),t.paused&&await new Promise(L=>{t.resumeQueue.add(L)}),N})()};let k;if(wo.skipAnimation)return kh(t),Eo(i,!1);try{let S;Ye.arr(e)?S=(async A=>{for(const T of A)await _(T)})(e):S=Promise.resolve(e(_,i.stop.bind(i))),await Promise.all([S.then(g),b]),k=Eo(i.get(),!0,!1)}catch(S){if(S instanceof Zk)k=S.result;else if(S instanceof Xk)k=S.result;else throw S}finally{l==t.asyncId&&(t.asyncId=f,t.asyncTo=f?h:void 0,t.promise=f?m:void 0)}return Ye.fun(c)&&Nt.batchedUpdates(()=>{c(k,i,i.item)}),k})()}function kh(e,r){vh(e.timeouts,t=>t.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,r&&(e.cancelId=r)}var Zk=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Xk=class extends Error{constructor(){super("SkipAnimationSignal")}},RC=e=>e instanceof FC,uI=1,FC=class extends Ak{constructor(){super(...arguments),this.id=uI++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=hl(this);return e&&e.getValue()}to(...e){return wo.to(this,e)}interpolate(...e){return Uj(),wo.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,r=!1){bh(this,{type:"change",parent:this,value:e,idle:r})}_onPriorityChange(e){this.idle||Gg.sort(this),bh(this,{type:"priority",parent:this,priority:e})}},Pc=Symbol.for("SpringPhase"),Jk=1,NC=2,MC=4,PC=e=>(e[Pc]&Jk)>0,hu=e=>(e[Pc]&NC)>0,Th=e=>(e[Pc]&MC)>0,eT=(e,r)=>r?e[Pc]|=NC|Jk:e[Pc]&=~NC,tT=(e,r)=>r?e[Pc]|=MC:e[Pc]&=~MC,cI=class extends FC{constructor(e,r){if(super(),this.animation=new sI,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Ye.und(e)||!Ye.und(r)){const t=Ye.obj(e)?{...e}:{...r,from:e};Ye.und(t.default)&&(t.default=!0),this.start(t)}}get idle(){return!(hu(this)||this._state.asyncTo)||Th(this)}get goal(){return ui(this.animation.to)}get velocity(){const e=hl(this);return e instanceof _h?e.lastVelocity||0:e.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return PC(this)}get isAnimating(){return hu(this)}get isPaused(){return Th(this)}get isDelayed(){return this._state.delayed}advance(e){let r=!0,t=!1;const i=this.animation;let{toValues:l}=i;const{config:f}=i,c=ry(i.to);!c&&no(i.to)&&(l=Bi(ui(i.to))),i.values.forEach((d,g)=>{if(d.done)return;const C=d.constructor==Eh?1:c?c[g].lastPosition:l[g];let b=i.immediate,x=C;if(!b){if(x=d.lastPosition,f.tension<=0){d.done=!0;return}let _=d.elapsedTime+=e;const k=i.fromValues[g],S=d.v0!=null?d.v0:d.v0=Ye.arr(f.velocity)?f.velocity[g]:f.velocity;let A;const T=f.precision||(k==C?.005:Math.min(1,Math.abs(C-k)*.001));if(Ye.und(f.duration))if(f.decay){const D=f.decay===!0?.998:f.decay,F=Math.exp(-(1-D)*_);x=k+S/(1-D)*(1-F),b=Math.abs(d.lastPosition-x)<=T,A=S*F}else{A=d.lastVelocity==null?S:d.lastVelocity;const D=f.restVelocity||T/10,F=f.clamp?0:f.bounce,N=!Ye.und(F),L=k==C?d.v0>0:k<C;let P,U=!1;const $=1,O=Math.ceil(e/$);for(let z=0;z<O&&(P=Math.abs(A)>D,!(!P&&(b=Math.abs(C-x)<=T,b)));++z){N&&(U=x==C||x>C==L,U&&(A=-A*F,x=C));const j=-f.tension*1e-6*(x-C),H=-f.friction*.001*A,Y=(j+H)/f.mass;A=A+Y*$,x=x+A*$}}else{let D=1;f.duration>0&&(this._memoizedDuration!==f.duration&&(this._memoizedDuration=f.duration,d.durationProgress>0&&(d.elapsedTime=f.duration*d.durationProgress,_=d.elapsedTime+=e)),D=(f.progress||0)+_/this._memoizedDuration,D=D>1?1:D<0?0:D,d.durationProgress=D),x=k+f.easing(D)*(C-k),A=(x-d.lastPosition)/e,b=D==1}d.lastVelocity=A,Number.isNaN(x)&&(b=!0)}c&&!c[g].done&&(b=!1),b?d.done=!0:r=!1,d.setValue(x,f.round)&&(t=!0)});const h=hl(this),m=h.getValue();if(r){const d=ui(i.to);(m!==d||t)&&!f.decay?(h.setValue(d),this._onChange(d)):t&&f.decay&&this._onChange(m),this._stop()}else t&&this._onChange(m)}set(e){return Nt.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(hu(this)){const{to:e,config:r}=this.animation;Nt.batchedUpdates(()=>{this._onStart(),r.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,r){let t;return Ye.und(e)?(t=this.queue||[],this.queue=[]):t=[Ye.obj(e)?e:{...r,to:e}],Promise.all(t.map(i=>this._update(i))).then(i=>OC(this,i))}stop(e){const{to:r}=this.animation;return this._focus(this.get()),kh(this._state,e&&this._lastCallId),Nt.batchedUpdates(()=>this._stop(r,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const r=this.key||"";let{to:t,from:i}=e;t=Ye.obj(t)?t[r]:t,(t==null||TC(t))&&(t=void 0),i=Ye.obj(i)?i[r]:i,i==null&&(i=void 0);const l={to:t,from:i};return PC(this)||(e.reverse&&([t,i]=[i,t]),i=ui(i),Ye.und(i)?hl(this)||this._set(t):this._set(i)),l}_update({...e},r){const{key:t,defaultProps:i}=this;e.default&&Object.assign(i,kC(e,(c,h)=>/^on/.test(h)?Vk(c,t):c)),aT(this,e,"onProps"),Rh(this,"onProps",e,this);const l=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const f=this._state;return Kk(++this._lastCallId,{key:t,props:e,defaultProps:i,state:f,actions:{pause:()=>{Th(this)||(tT(this,!0),mh(f.pauseQueue),Rh(this,"onPause",Eo(this,Ah(this,this.animation.to)),this))},resume:()=>{Th(this)&&(tT(this,!1),hu(this)&&this._resume(),mh(f.resumeQueue),Rh(this,"onResume",Eo(this,Ah(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then(c=>{if(e.loop&&c.finished&&!(r&&c.noop)){const h=nT(e);if(h)return this._update(h,!0)}return c})}_merge(e,r,t){if(r.cancel)return this.stop(!0),t(wd(this));const i=!Ye.und(e.to),l=!Ye.und(e.from);if(i||l)if(r.callId>this._lastToId)this._lastToId=r.callId;else return t(wd(this));const{key:f,defaultProps:c,animation:h}=this,{to:m,from:d}=h;let{to:g=m,from:C=d}=e;l&&!i&&(!r.default||Ye.und(g))&&(g=C),r.reverse&&([g,C]=[C,g]);const b=!us(C,d);b&&(h.from=C),C=ui(C);const x=!us(g,m);x&&this._focus(g);const _=TC(r.to),{config:k}=h,{decay:S,velocity:A}=k;(i||l)&&(k.velocity=0),r.config&&!_&&lI(k,Mc(r.config,f),r.config!==c.config?Mc(c.config,f):void 0);let T=hl(this);if(!T||Ye.und(g))return t(Eo(this,!0));const D=Ye.und(r.reset)?l&&!r.default:!Ye.und(C)&&Sh(r.reset,f),F=D?C:this.get(),N=Dh(g),L=Ye.num(N)||Ye.arr(N)||ny(N),P=!_&&(!L||Sh(c.immediate||r.immediate,f));if(x){const z=DC(g);if(z!==T.constructor)if(P)T=this._set(N);else throw Error(`Cannot animate between ${T.constructor.name} and ${z.name}, as the "to" prop suggests`)}const U=T.constructor;let $=no(g),O=!1;if(!$){const z=D||!PC(this)&&b;(x||z)&&(O=us(Dh(F),N),$=!O),(!us(h.immediate,P)&&!P||!us(k.decay,S)||!us(k.velocity,A))&&($=!0)}if(O&&hu(this)&&(h.changed&&!D?$=!0:$||this._stop(m)),!_&&(($||no(m))&&(h.values=T.getPayload(),h.toValues=no(g)?null:U==Eh?[1]:Bi(N)),h.immediate!=P&&(h.immediate=P,!P&&!D&&this._set(m)),$)){const{onRest:z}=h;Wt(dI,H=>aT(this,r,H));const j=Eo(this,Ah(this,m));mh(this._pendingCalls,j),this._pendingCalls.add(t),h.changed&&Nt.batchedUpdates(()=>{var H;h.changed=!D,z==null||z(j,this),D?Mc(c.onRest,j):(H=h.onStart)==null||H.call(h,j,this)})}D&&this._set(F),_?t(Qk(r.to,r,this._state,this)):$?this._start():hu(this)&&!x?this._pendingCalls.add(t):t(Wk(F))}_focus(e){const r=this.animation;e!==r.to&&(Tk(this)&&this._detach(),r.to=e,Tk(this)&&this._attach())}_attach(){let e=0;const{to:r}=this.animation;no(r)&&(Cd(r,this),RC(r)&&(e=r.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;no(e)&&Ch(e,this)}_set(e,r=!0){const t=ui(e);if(!Ye.und(t)){const i=hl(this);if(!i||!us(t,i.getValue())){const l=DC(t);!i||i.constructor!=l?SC(this,l.create(t)):i.setValue(t),i&&Nt.batchedUpdates(()=>{this._onChange(t,r)})}}return hl(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Rh(this,"onStart",Eo(this,Ah(this,e.to)),this))}_onChange(e,r){r||(this._onStart(),Mc(this.animation.onChange,e,this)),Mc(this.defaultProps.onChange,e,this),super._onChange(e,r)}_start(){const e=this.animation;hl(this).reset(ui(e.to)),e.immediate||(e.fromValues=e.values.map(r=>r.lastPosition)),hu(this)||(eT(this,!0),Th(this)||this._resume())}_resume(){wo.skipAnimation?this.finish():Gg.start(this)}_stop(e,r){if(hu(this)){eT(this,!1);const t=this.animation;Wt(t.values,l=>{l.done=!0}),t.toValues&&(t.onChange=t.onPause=t.onResume=void 0),bh(this,{type:"idle",parent:this});const i=r?wd(this.get()):Eo(this.get(),Ah(this,e??t.to));mh(this._pendingCalls,i),t.changed&&(t.changed=!1,Rh(this,"onRest",i,this))}}};function Ah(e,r){const t=Dh(r),i=Dh(e.get());return us(i,t)}function nT(e,r=e.loop,t=e.to){const i=Mc(r);if(i){const l=i!==!0&&Yk(i),f=(l||e).reverse,c=!l||l.reset;return Oh({...e,loop:r,default:!1,pause:void 0,to:!f||TC(t)?t:void 0,from:c?e.from:void 0,reset:c,...l})}}function Oh(e){const{to:r,from:t}=e=Yk(e),i=new Set;return Ye.obj(r)&&rT(r,i),Ye.obj(t)&&rT(t,i),e.keys=i.size?Array.from(i):null,e}function fI(e){const r=Oh(e);return Ye.und(r.default)&&(r.default=kC(r)),r}function rT(e,r){pl(e,(t,i)=>t!=null&&r.add(i))}var dI=["onStart","onRest","onChange","onPause","onResume"];function aT(e,r,t){e.animation[t]=r[t]!==$k(r,t)?Vk(r[t],e.key):void 0}function Rh(e,r,...t){var i,l,f,c;(l=(i=e.animation)[r])==null||l.call(i,...t),(c=(f=e.defaultProps)[r])==null||c.call(f,...t)}var pI=["onStart","onChange","onRest"],hI=1,vI=class{constructor(e,r){this.id=hI++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((r,t)=>e[t]=r.get()),e}set(e){for(const r in e){const t=e[r];Ye.und(t)||this.springs[r].set(t)}}update(e){return e&&this.queue.push(Oh(e)),this}start(e){let{queue:r}=this;return e?r=Bi(e).map(Oh):this.queue=[],this._flush?this._flush(this,r):(cT(this,r),BC(this,r))}stop(e,r){if(e!==!!e&&(r=e),r){const t=this.springs;Wt(Bi(r),i=>t[i].stop(!!e))}else kh(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(Ye.und(e))this.start({pause:!0});else{const r=this.springs;Wt(Bi(e),t=>r[t].pause())}return this}resume(e){if(Ye.und(e))this.start({pause:!1});else{const r=this.springs;Wt(Bi(e),t=>r[t].resume())}return this}each(e){pl(this.springs,e)}_onFrame(){const{onStart:e,onChange:r,onRest:t}=this._events,i=this._active.size>0,l=this._changed.size>0;(i&&!this._started||l&&!this._started)&&(this._started=!0,vh(e,([h,m])=>{m.value=this.get(),h(m,this,this._item)}));const f=!i&&this._started,c=l||f&&t.size?this.get():null;l&&r.size&&vh(r,([h,m])=>{m.value=c,h(m,this,this._item)}),f&&(this._started=!1,vh(t,([h,m])=>{m.value=c,h(m,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Nt.onFrame(this._onFrame)}};function BC(e,r){return Promise.all(r.map(t=>iT(e,t))).then(t=>OC(e,t))}async function iT(e,r,t){const{keys:i,to:l,from:f,loop:c,onRest:h,onResolve:m}=r,d=Ye.obj(r.default)&&r.default;c&&(r.loop=!1),l===!1&&(r.to=null),f===!1&&(r.from=null);const g=Ye.arr(l)||Ye.fun(l)?l:void 0;g?(r.to=void 0,r.onRest=void 0,d&&(d.onRest=void 0)):Wt(pI,k=>{const S=r[k];if(Ye.fun(S)){const A=e._events[k];r[k]=({finished:T,cancelled:D})=>{const F=A.get(S);F?(T||(F.finished=!1),D&&(F.cancelled=!0)):A.set(S,{value:null,finished:T||!1,cancelled:D||!1})},d&&(d[k]=r[k])}});const C=e._state;r.pause===!C.paused?(C.paused=r.pause,mh(r.pause?C.pauseQueue:C.resumeQueue)):C.paused&&(r.pause=!0);const b=(i||Object.keys(e.springs)).map(k=>e.springs[k].start(r)),x=r.cancel===!0||$k(r,"cancel")===!0;(g||x&&C.asyncId)&&b.push(Kk(++e._lastAsyncId,{props:r,state:C,actions:{pause:vC,resume:vC,start(k,S){x?(kh(C,e._lastAsyncId),S(wd(e))):(k.onRest=h,S(Qk(g,k,C,e)))}}})),C.paused&&await new Promise(k=>{C.resumeQueue.add(k)});const _=OC(e,await Promise.all(b));if(c&&_.finished&&!(t&&_.noop)){const k=nT(r,c,l);if(k)return cT(e,[k]),iT(e,k,!0)}return m&&Nt.batchedUpdates(()=>m(_,e,e.item)),_}function oT(e,r){const t={...e.springs};return r&&Wt(Bi(r),i=>{Ye.und(i.keys)&&(i=Oh(i)),Ye.obj(i.to)||(i={...i,to:void 0}),uT(t,i,l=>sT(l))}),lT(e,t),t}function lT(e,r){pl(r,(t,i)=>{e.springs[i]||(e.springs[i]=t,Cd(t,e))})}function sT(e,r){const t=new cI;return t.key=e,r&&Cd(t,r),t}function uT(e,r,t){r.keys&&Wt(r.keys,i=>{(e[i]||(e[i]=t(i)))._prepareNode(r)})}function cT(e,r){Wt(r,t=>{uT(e.springs,t,i=>sT(i,e))})}var oy=({children:e,...r})=>{const t=W.useContext(ly),i=r.pause||!!t.pause,l=r.immediate||!!t.immediate;r=Vj(()=>({pause:i,immediate:l}),[i,l]);const{Provider:f}=ly;return Ne.createElement(f,{value:r},e)},ly=mI(oy,{});oy.Provider=ly.Provider,oy.Consumer=ly.Consumer;function mI(e,r){return Object.assign(e,Ne.createContext(r)),e.Provider._context=e,e.Consumer._context=e,e}var gI=()=>{const e=[],r=function(i){Ij();const l=[];return Wt(e,(f,c)=>{if(Ye.und(i))l.push(f.start());else{const h=t(i,f,c);h&&l.push(f.start(h))}}),l};r.current=e,r.add=function(i){e.includes(i)||e.push(i)},r.delete=function(i){const l=e.indexOf(i);~l&&e.splice(l,1)},r.pause=function(){return Wt(e,i=>i.pause(...arguments)),this},r.resume=function(){return Wt(e,i=>i.resume(...arguments)),this},r.set=function(i){Wt(e,(l,f)=>{const c=Ye.fun(i)?i(f,l):i;c&&l.set(c)})},r.start=function(i){const l=[];return Wt(e,(f,c)=>{if(Ye.und(i))l.push(f.start());else{const h=this._getProps(i,f,c);h&&l.push(f.start(h))}}),l},r.stop=function(){return Wt(e,i=>i.stop(...arguments)),this},r.update=function(i){return Wt(e,(l,f)=>l.update(this._getProps(i,l,f))),this};const t=function(i,l,f){return Ye.fun(i)?i(f,l):i};return r._getProps=t,r};function yI(e,r,t){const i=Ye.fun(r)&&r;i&&!t&&(t=[]);const l=W.useMemo(()=>i||arguments.length==3?gI():void 0,[]),f=W.useRef(0),c=Pk(),h=W.useMemo(()=>({ctrls:[],queue:[],flush(A,T){const D=oT(A,T);return f.current>0&&!h.queue.length&&!Object.keys(D).some(N=>!A.springs[N])?BC(A,T):new Promise(N=>{lT(A,D),h.queue.push(()=>{N(BC(A,T))}),c()})}}),[]),m=W.useRef([...h.ctrls]),d=[],g=Lk(e)||0;W.useMemo(()=>{Wt(m.current.slice(e,g),A=>{rI(A,l),A.stop(!0)}),m.current.length=e,C(g,e)},[e]),W.useMemo(()=>{C(0,Math.min(g,e))},t);function C(A,T){for(let D=A;D<T;D++){const F=m.current[D]||(m.current[D]=new vI(null,h.flush)),N=i?i(D,F):r[D];N&&(d[D]=fI(N))}}const b=m.current.map((A,T)=>oT(A,d[T])),x=W.useContext(oy),_=Lk(x),k=x!==_&&nI(x);EC(()=>{f.current++,h.ctrls=m.current;const{queue:A}=h;A.length&&(h.queue=[],Wt(A,T=>T())),Wt(m.current,(T,D)=>{l==null||l.add(T),k&&T.start({default:x});const F=d[D];F&&(aI(T,F.ref),T.ref?T.queue.push(F):T.start(F))})}),Bk(()=>()=>{Wt(h.ctrls,A=>A.stop(!0))});const S=b.map(A=>({...A}));return l?[S,l]:S}function xI(e,r){const t=Ye.fun(e),[[i],l]=yI(1,t?e:[e],t?r||[]:r);return t||arguments.length==2?[i,l]:i}var bI=class extends FC{constructor(e,r){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=yh(...r);const t=this._get(),i=DC(t);SC(this,i.create(t))}advance(e){const r=this._get(),t=this.get();us(r,t)||(hl(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&fT(this._active)&&LC(this)}_get(){const e=Ye.arr(this.source)?this.source.map(ui):Bi(ui(this.source));return this.calc(...e)}_start(){this.idle&&!fT(this._active)&&(this.idle=!1,Wt(ry(this),e=>{e.done=!1}),wo.skipAnimation?(Nt.batchedUpdates(()=>this.advance()),LC(this)):Gg.start(this))}_attach(){let e=1;Wt(Bi(this.source),r=>{no(r)&&Cd(r,this),RC(r)&&(r.idle||this._active.add(r),e=Math.max(e,r.priority+1))}),this.priority=e,this._start()}_detach(){Wt(Bi(this.source),e=>{no(e)&&Ch(e,this)}),this._active.clear(),LC(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Bi(this.source).reduce((r,t)=>Math.max(r,(RC(t)?t.priority:0)+1),0))}};function CI(e){return e.idle!==!1}function fT(e){return!e.size||Array.from(e).every(CI)}function LC(e){e.idle||(e.idle=!0,Wt(ry(e),r=>{r.done=!0}),bh(e,{type:"idle",parent:e}))}wo.assign({createStringInterpolator:Nk,to:(e,r)=>new bI(e,r)});var dT=/^--/;function wI(e,r){return r==null||typeof r=="boolean"||r===""?"":typeof r=="number"&&r!==0&&!dT.test(e)&&!(Fh.hasOwnProperty(e)&&Fh[e])?r+"px":(""+r).trim()}var pT={};function _I(e,r){if(!e.nodeType||!e.setAttribute)return!1;const t=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:i,style:l,children:f,scrollTop:c,scrollLeft:h,viewBox:m,...d}=r,g=Object.values(d),C=Object.keys(d).map(b=>t||e.hasAttribute(b)?b:pT[b]||(pT[b]=b.replace(/([A-Z])/g,x=>"-"+x.toLowerCase())));f!==void 0&&(e.textContent=f);for(const b in l)if(l.hasOwnProperty(b)){const x=wI(b,l[b]);dT.test(b)?e.style.setProperty(b,x):e.style[b]=x}C.forEach((b,x)=>{e.setAttribute(b,g[x])}),i!==void 0&&(e.className=i),c!==void 0&&(e.scrollTop=c),h!==void 0&&(e.scrollLeft=h),m!==void 0&&e.setAttribute("viewBox",m)}var Fh={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},EI=(e,r)=>e+r.charAt(0).toUpperCase()+r.substring(1),SI=["Webkit","Ms","Moz","O"];Fh=Object.keys(Fh).reduce((e,r)=>(SI.forEach(t=>e[EI(t,r)]=e[r]),e),Fh);var DI=/^(matrix|translate|scale|rotate|skew)/,kI=/^(translate)/,TI=/^(rotate|skew)/,zC=(e,r)=>Ye.num(e)&&e!==0?e+r:e,sy=(e,r)=>Ye.arr(e)?e.every(t=>sy(t,r)):Ye.num(e)?e===r:parseFloat(e)===r,AI=class extends iy{constructor({x:e,y:r,z:t,...i}){const l=[],f=[];(e||r||t)&&(l.push([e||0,r||0,t||0]),f.push(c=>[`translate3d(${c.map(h=>zC(h,"px")).join(",")})`,sy(c,0)])),pl(i,(c,h)=>{if(h==="transform")l.push([c||""]),f.push(m=>[m,m===""]);else if(DI.test(h)){if(delete i[h],Ye.und(c))return;const m=kI.test(h)?"px":TI.test(h)?"deg":"";l.push(Bi(c)),f.push(h==="rotate3d"?([d,g,C,b])=>[`rotate3d(${d},${g},${C},${zC(b,m)})`,sy(b,0)]:d=>[`${h}(${d.map(g=>zC(g,m)).join(",")})`,sy(d,h.startsWith("scale")?1:0)])}}),l.length&&(i.transform=new OI(l,f)),super(i)}},OI=class extends Ak{constructor(e,r){super(),this.inputs=e,this.transforms=r,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",r=!0;return Wt(this.inputs,(t,i)=>{const l=ui(t[0]),[f,c]=this.transforms[i](Ye.arr(l)?l:t.map(ui));e+=" "+f,r=r&&c}),r?"none":e}observerAdded(e){e==1&&Wt(this.inputs,r=>Wt(r,t=>no(t)&&Cd(t,this)))}observerRemoved(e){e==0&&Wt(this.inputs,r=>Wt(r,t=>no(t)&&Ch(t,this)))}eventObserved(e){e.type=="change"&&(this._value=null),bh(this,e)}},RI=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];wo.assign({batchedUpdates:tu.exports.unstable_batchedUpdates,createStringInterpolator:Nk,colors:yj});var FI=Zj(RI,{applyAnimatedValues:_I,createAnimatedStyle:e=>new AI(e),getComponentProps:({scrollTop:e,scrollLeft:r,...t})=>t}),hT=FI.animated;function vT(e,r,t){let i=e;return r!==void 0&&(i=Math.max(e,r)),t!==void 0&&(i=Math.min(i,t)),i}const[mT]=Cn("indicator"),NI=W.memo(e=>{var{vertical:r}=e,t=$a(e,["vertical"]);const i=[];for(let l=0;l<t.total;l++)i.push(Q("div",{className:Re(mT("dot",{active:t.current===l}))},l));return Q("div",Object.assign({className:Re(t.className,mT({vertical:r})),style:t.style},{children:i}))});let Nh=0;function UC(e){e?(Nh||document.body.classList.add("rv-toast--unclickable"),Nh+=1):Nh&&(Nh-=1,Nh||document.body.classList.remove("rv-toast--unclickable"))}function MI(e){return e===window}const gT=e=>{const r=e;if(MI(r)){const t=r.innerWidth,i=r.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}return r&&r.getBoundingClientRect?r.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};function PI(e,r,t){let i,l,f,c,h,m,d=0,g=!1,C=!1,b=!0;const x=!r&&r!==0&&typeof fd.requestAnimationFrame=="function";if(typeof e!="function")throw new TypeError("Expected a function");r=+r||0,cd(t)&&(g=!!t.leading,C="maxWait"in t,f=C?Math.max(+t.maxWait||0,r):f,b="trailing"in t?!!t.trailing:b);function _(O){const z=i,j=l;return i=l=void 0,d=O,c=e.apply(j,z),c}function k(O,z){return x?(fd.cancelAnimationFrame(h),fd.requestAnimationFrame(O)):setTimeout(()=>O(),z)}function S(O){if(x)return fd.cancelAnimationFrame(O);clearTimeout(O)}function A(O){return d=O,h=k(F,r),g?_(O):c}function T(O){const z=O-m,j=O-d,H=r-z;return C?Math.min(H,f-j):H}function D(O){const z=O-m,j=O-d;return m===void 0||z>=r||z<0||C&&j>=f}function F(){const O=Date.now();if(D(O))return N(O);h=k(F,T(O))}function N(O){return h=void 0,b&&i?_(O):(i=l=void 0,c)}function L(){h!==void 0&&S(h),d=0,i=m=l=h=void 0}function P(){return h===void 0?c:N(Date.now())}function U(){return h!==void 0}function $(...O){const z=Date.now(),j=D(z);if(i=O,l=this,m=z,j){if(h===void 0)return A(m);if(C)return h=k(F,r),_(m)}return h===void 0&&(h=k(F,r)),c}return $.cancel=L,$.flush=P,$.pending=U,$}const XZ="",[uy]=Cn("toast"),BI=e=>{const r=ea(e,{type:"info",duration:2e3,position:"middle",transition:"rv-fade",loadingType:"circular",overlay:!1}),t=()=>{r.closeOnClick&&r.onClose()};W.useEffect(()=>{if(!r.visible){UC(!1);return}let f=!1;const c=r.visible&&r.forbidClick;f!==c&&(f=c,UC(f))},[r.visible,r.forbidClick]);const i=()=>{const{icon:f,type:c,iconSize:h,loadingType:m}=r;if(f||c==="success"||c==="fail"){const g=c==="fail"?Q(X2,{}):Q(OD,{});return W.cloneElement(f||g,{className:Re(uy("icon")),fontSize:h})}return c==="loading"?Q(Z2,{className:Re(uy("loading")),type:m}):null},l=()=>{const{message:f}=r;return Jr(f)&&f!==""?Q("div",Object.assign({className:Re(uy("info"))},{children:f})):null};return Pe(sh,Object.assign({className:Re([uy([r.position,{[r.type]:!r.icon}]),r.className]),visible:r.visible,overlay:r.overlay,transition:r.transition,overlayClass:r.overlayClass,overlayStyle:r.overlayStyle,closeOnClickOverlay:r.closeOnClickOverlay,lockScroll:!1,onClick:t,onClose:r.onClose,onClosed:r.onClosed,onOpened:r.onOpened,teleport:r.teleport},{children:[i(),l()]}))},jC={message:"",className:"",type:"info",position:"middle",forbidClick:!1,duration:2e3,teleport:()=>document.body},IC=[];let yT=!1,HC=Jp({},jC);const cy=new Map;function xT(){let e=IC.pop();for(;e;)e(),e=IC.pop()}function LI(){setTimeout(xT)}const Bc=e=>{if(!Bg())return null;const r=bT(e),t={config:()=>{},clear:()=>null};let i=0;const{onClose:l,teleport:f}=r,c=document.createElement("div");return rC(f).appendChild(c),qD(Q(()=>{const d=Object.assign({duration:2e3},r),[g,C]=W.useState(!1),[b,x]=W.useState(Object.assign({},d)),_=W.useCallback(()=>{b.forbidClick&&UC(!1),C(!1),window.setTimeout(()=>{GD(c)&&c.parentNode&&c.parentNode.removeChild(c)},+b.duration||+jC.duration)},[c]),k=W.useCallback(()=>{C(!1),l&&l()},[]);return t.clear=_,t.config=W.useCallback(S=>{x(A=>typeof S=="function"?Object.assign(Object.assign({},A),S(A)):Object.assign(Object.assign({},A),S))},[x]),W.useEffect(()=>(C(!0),yT||xT(),IC.push(_),b.duration!==0&&"duration"in b&&(i=window.setTimeout(k,+b.duration)),()=>{i!==0&&window.clearTimeout(i)}),[]),Q(BI,Object.assign({},b,{visible:g,teleport:()=>c,onClose:k,onClosed:_}))},{}),c),t};function bT(e){return cd(e)?e:{message:e}}const zI=e=>r=>Bc(Object.assign(Object.assign(Object.assign(Object.assign({},HC),cy.get(e)),bT(r)),{type:e}));["info","loading","success","fail"].forEach(e=>{Bc[e]=zI(e)}),Bc.allowMultiple=(e=!0)=>{yT=e},Bc.clear=LI;function UI(e,r){typeof e=="string"?cy.set(e,r):Jp(HC,e)}Bc.setDefaultOptions=UI,Bc.resetDefaultOptions=e=>{typeof e=="string"?cy.delete(e):(HC=Jp({},jC),cy.clear())};const CT=Bc;function fy(){const e=W.useRef([]),r=W.useCallback(i=>l=>{l&&(e.current[i]=l)},[]),t=W.useCallback(()=>{e.current=[]},[]);return[e.current,r,t]}const wT=e=>{const{defaultValue:r,value:t}=e||{},[i,l]=W.useState(()=>{if(t!==void 0)return t;if(r!==void 0)return typeof r=="function"?r():r}),f=t!==void 0?t:i;function c(h){l(h)}return[f,c]},nX="",[jI]=Cn("swiper-item"),_T=W.forwardRef((e,r)=>{const t=W.useRef(null);W.useImperativeHandle(r,()=>({self:t.current}));const[i]=oz(t,{rootMargin:"-0.1px",threshold:0,root:()=>{var l;return(l=e.trackRef)===null||l===void 0?void 0:l.current}});return Q("div",Object.assign({ref:t,className:Re(e.className,jI({hidden:e.autoHeight&&i===!1})),onClick:e.onClick,style:e.style},{children:e.children}))}),[Lc]=Cn("swiper"),II=W.forwardRef((e,r)=>{const t=ea(e,{initialSwipe:0,loop:!0,touchable:!0,enabled:!0,rubberband:!0,autoplay:!1,slideSize:100,trackOffset:0,stuckAtBoundary:!1,preventScroll:!0}),{loop:i,autoplay:l,vertical:f,duration:c,autoHeight:h}=t,m=f?"y":"x",d=t.slideSize/100,g=t.trackOffset/100,{validChildren:C,count:b}=W.useMemo(()=>{let ee=0;return{validChildren:W.Children.map(t.children,V=>W.isValidElement(V)?V.type!==_T?null:(ee++,V):null),count:ee}},[t.children]),x=W.useRef(null),[_,k]=fy(),[S,A]=W.useState(()=>t.enabled),[T,D]=W.useState(t.initialSwipe),[F,N,L]=W2(!1),P=W.useMemo(()=>Object.assign({["--rv-swipe-slide-size"]:`${t.slideSize}%`,["--rv-swipe-track-offset"]:`${t.trackOffset}%`},t.style),[t.slideSize,t.trackOffset,t.style]),U=W.useMemo(()=>d*(b-1)<1?!1:i,[b,i,d]),$=()=>{const ee=x.current;return ee?(f?ee.offsetHeight:ee.offsetWidth)*t.slideSize/100:0},O=ee=>{let Z=0,V=b-1;return t.stuckAtBoundary&&(Z+=(1-d-g)/d,V-=(1-d-g)/d),vT(ee,Z,V)},[{position:z},j]=xI(()=>({position:O(T)*100,config:{tension:200,friction:30,duration:c},onRest:()=>{if(L.current||!U)return;const ee=z.get(),Z=100*b,V=VC(ee,Z);V!==ee&&j.start({position:V,immediate:!0})}}),[b]),H=uj(ee=>{var Z;const V=$();if(!V||!t.preventScroll&&ET(ee.target,(Z=_[T])===null||Z===void 0?void 0:Z.self))return;const te=f?1:0,oe=ee.offset[te],re=ee.direction[te],pe=ee.velocity[te];if(N(!0),!ee.last)j.start({position:oe*100/V,immediate:!0});else{const me=Math.round((oe+Math.min(pe*2e3,V)*re)/V);q(me),window.setTimeout(()=>{N(!1)})}},{enabled:S,transform:([ee,Z])=>[-ee,-Z],from:()=>{const ee=$();return[z.get()/100*ee,z.get()/100*ee]},bounds:()=>{if(U)return{};const ee=$(),Z=O(0)*ee,V=O(b-1)*ee;return f?{top:Z,bottom:V}:{left:Z,right:V}},rubberband:t.rubberband,axis:m,preventScroll:m==="x"?t.preventScroll:!1,pointer:{touch:!0}}),Y=()=>t.indicator===void 0||t.indicator===!0?Q("div",Object.assign({className:Re(Lc("indicator",{vertical:f}))},{children:Q(NI,Object.assign({},t.indicatorProps,{vertical:f,total:b,current:T}))})):typeof t.indicator=="function"?t.indicator(b,T):null;function q(ee,Z=!1){const V=Math.round(ee),te=U?VC(V,b):vT(V,0,b-1);D(te),j.start({position:(U?V:O(V))*100,immediate:Z})}const X=()=>{q(Math.round(z.get()/100)+1)},ne=()=>{q(Math.round(z.get()/100)-1)};W.useImperativeHandle(r,()=>({activeIndex:T,swipeTo:q,swipeNext:X,swipePrev:ne,enable:()=>{A(!0)},disable:()=>{A(!1)}})),th(()=>{const ee=C.length-1;T>ee&&q(ee,!0)}),Rc(()=>{var ee;(ee=t.onChange)===null||ee===void 0||ee.call(t,T)},[T]),W.useEffect(()=>{if(!l||F)return Mi;const ee=typeof l=="boolean"?5e3:l,Z=window.setInterval(()=>{X()},ee);return()=>{window.clearInterval(Z)}},[l,F]);const G=()=>U?Q("div",Object.assign({className:Re(Lc("track-inner",{vertical:f}))},{children:W.Children.map(C,(ee,Z)=>Q(hT.div,Object.assign({className:Re(Lc("slide")),style:{[m]:z.to(V=>{let te=-V+Z*100;const oe=b*100,re=oe/2;return te=VC(te+re,oe)-re,`${te}%`}),[f?"top":"left"]:`-${Z*100}%`}},{children:W.cloneElement(ee,{ref:k(Z),autoHeight:h,trackRef:x})})))})):Q(hT.div,Object.assign({className:Re(Lc("track-inner")),style:{[m]:z.to(ee=>`${-ee}%`)}},{children:W.Children.map(C,(ee,Z)=>Q("div",Object.assign({className:Re(Lc("slide"))},{children:W.cloneElement(ee,{ref:k(Z),autoHeight:h})})))}));return b===0&&void 0,Pe("div",Object.assign({className:Re(t.className,Lc({vertical:f})),style:P},{children:[Q("div",Object.assign({ref:x,className:Re(Lc("track",{"allow-touch-move":t.touchable})),onClickCapture:ee=>{L.current&&ee.stopPropagation()}},t.touchable?H():{},{children:G()})),Y()]}))});function VC(e,r){const t=e%r;return t<0?t+r:t}function ET(e,r){return r?e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?!0:e.parentElement&&e.parentElement!==r?ET(e.parentElement,r):!1:!1}const ST=Object.assign(II,{Item:_T}),HI=e=>{const r=ea(e,{shape:"round",bindGroup:!0}),t=W.useRef(null),i=g=>r.parent&&r.bindGroup?r.parent.props[g]:null,l=W.useMemo(()=>i("disabled")||r.disabled,[r.parent,r.disabled]),f=W.useMemo(()=>i("direction")||null,[r.parent]),c=W.useMemo(()=>{const g=r.checkedColor||i("checkedColor");return g&&r.checked&&!l?{borderColor:g,backgroundColor:g}:{}},[r.checkedColor,r.checked,l]),h=g=>{const{target:C}=g,b=t.current,x=b===C||(b==null?void 0:b.contains(C));!l&&(x||!r.labelDisabled)&&r.onToggle&&r.onToggle(),r.onClick&&r.onClick(g)},m=()=>{const{bem:g,shape:C,checked:b}=r,x=r.iconSize||i("iconSize");return Q("div",Object.assign({ref:t,className:Re(g("icon",[C,{disabled:l,checked:b}])),style:{fontSize:fl(x)}},{children:r.iconRender?r.iconRender({checked:b,disabled:l}):Q(OD,{style:c})}))},d=()=>r.children?Q("span",Object.assign({className:r.bem("label",[r.labelPosition,{disabled:l}])},{children:r.children})):null;return Pe("div",Object.assign({role:r.role,className:Re(r.bem([{disabled:l,"label-disabled":r.labelDisabled},f]),r.className),style:r.style,tabIndex:l?-1:0,"aria-checked":r.checked,onClick:h},{children:[r.labelPosition==="left"&&d(),m(),r.labelPosition!=="left"&&d()]}))},lX="";function VI(e){return[e.getFullYear(),e.getMonth()+1]}function $C(e,r){const t=e.getFullYear(),i=r.getFullYear();if(t===i){const l=e.getMonth(),f=r.getMonth();return l===f?0:l>f?1:-1}return t>i?1:-1}function vl(e,r){const t=$C(e,r);if(t===0){const i=e.getDate(),l=r.getDate();return i===l?0:i>l?1:-1}return t}const dy=e=>new Date(e),DT=e=>Array.isArray(e)?e.map(dy):dy(e);function YC(e,r){const t=dy(e);return t.setDate(t.getDate()+r),t}const kT=e=>YC(e,-1),TT=e=>YC(e,1),qC=()=>{const e=new Date;return e.setHours(0,0,0,0),e};function $I(e){const r=e[0].getTime();return(e[1].getTime()-r)/(1e3*60*60*24)+1}function AT(e,r){let t=-1;const i=Array(e);for(;++t<e;)i[t]=r(t);return i}function YI(e){if(!e)return 0;for(;hD(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function GC(e,r){return 32-new Date(e,r-1,32).getDate()}const[Mh]=Cn("calendar"),qI=e=>{const r=ea(e,{offset:0}),t=W.useMemo(()=>{const{item:d,index:g,color:C,offset:b,rowHeight:x}=r,_={height:x};if(d.type==="placeholder")return _.width="100%",_;if(g===0&&(_.marginLeft=`${100*b/7}%`),C)switch(d.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":_.background=C;break;case"middle":_.color=C;break}return _},[r.item,r.index,r.color,r.offset,r.rowHeight]),i=()=>{var d;r.item.type!=="disabled"&&((d=r.onClick)===null||d===void 0||d.call(r,r.item))},l=()=>{const{topInfo:d}=r.item;return d||r.topInfoRender?Q("div",Object.assign({className:Re(Mh("top-info"))},{children:r.topInfoRender?r.topInfoRender(r.item):d})):null},f=()=>{const{bottomInfo:d}=r.item;return d||r.bottomInfoRender?Q("div",Object.assign({className:Re(Mh("bottom-info"))},{children:r.bottomInfoRender?r.bottomInfoRender(r.item):d})):null},c=()=>{const{item:d,color:g,rowHeight:C}=r,{type:b,text:x}=d,_=Pe(rn,{children:[l(),x,f()]});return b==="selected"?Q("div",Object.assign({className:Re(Mh("selected-day")),style:{width:C,height:C,background:g}},{children:_})):_},{type:h,className:m}=r.item;return h==="placeholder"?Q("div",{className:Re(Mh("day")),style:t}):Q("div",Object.assign({role:"gridcell",style:t,className:Re(Mh("day",h),m),tabIndex:h==="disabled"?void 0:-1,onClick:i},{children:c()}))},[py]=Cn("calendar"),GI=W.forwardRef((e,r)=>{const[t,i]=W.useState(),l=W.useRef(),[f,c]=W.useState(),h=W.useRef(0),{locale:m}=W.useContext(vd);W.useEffect(()=>{f&&(h.current=gT(f).height)},[f]);const d=W.useMemo(()=>e.formatMonthTitle?e.formatMonthTitle(e.date):m.vanCalendar.monthTitle(...VI(e.date)),[e.date,e.formatMonthTitle]),g=W.useMemo(()=>fl(e.rowHeight),[e.rowHeight]),C=W.useMemo(()=>{const O=e.date.getDay();return e.firstDayOfWeek?(O+7-e.firstDayOfWeek)%7:O},[e.date,e.firstDayOfWeek]),b=W.useMemo(()=>GC(e.date.getFullYear(),e.date.getMonth()+1),[e.date]),x=W.useMemo(()=>t||!e.lazyRender,[t]),_=()=>d,k=O=>{const z=e.showSubtitle?l.current:f,j=(z==null?void 0:z.getBoundingClientRect().top)-O.getBoundingClientRect().top+O.scrollTop;fD(O,j)},S=O=>{const z=j=>e.currentDate.some(H=>vl(H,j)===0);if(z(O)){const j=kT(O),H=TT(O),Y=z(j),q=z(H);return Y&&q?"multiple-middle":Y?"end":q?"start":"multiple-selected"}return""},A=O=>{const[z,j]=e.currentDate;if(!z)return"";const H=vl(O,z);if(!j)return H===0?"start":"";const Y=vl(O,j);return e.allowSameDay&&H===0&&Y===0?"start-end":H===0?"start":Y===0?"end":H>0&&Y<0?"middle":""},T=O=>{const{type:z,minDate:j,maxDate:H,currentDate:Y}=e;if(vl(O,j)<0||vl(O,H)>0)return"disabled";if(Y===null)return"";if(Array.isArray(Y)){if(z==="multiple")return S(O);if(z==="range")return A(O)}else if(z==="single")return vl(O,Y)===0?"selected":"";return""},D=O=>{if(e.type==="range"){if(O==="start")return m.vanCalendar.start;if(O==="end")return m.vanCalendar.end;if(O==="start-end")return m.vanCalendar.startEnd}return null},F=()=>e.showMonthTitle?Q("div",Object.assign({className:Re(py("month-title"))},{children:d})):null,N=()=>e.showMark&&x?Q("div",Object.assign({className:Re(py("month-mark"))},{children:e.date.getMonth()+1})):null,L=W.useMemo(()=>{const O=Math.ceil((b+C)/7);return Array(O).fill({type:"placeholder"})},[b,C]),P=W.useMemo(()=>{const O=[],z=e.date.getFullYear(),j=e.date.getMonth();for(let H=1;H<=b;H++){const Y=new Date(z,j,H),q=T(Y);let X={date:Y,type:q,text:H,bottomInfo:D(q)};e.formatter&&(X=e.formatter(X)),O.push(X)}return O},[T,e.date,e.formatter]),U=(O,z)=>Q(qI,{item:O,index:z,color:e.color,offset:C,rowHeight:g,onClick:e.onClick,topInfoRender:e.topInfoRender,bottomInfoRender:e.bottomInfoRender},z),$=()=>Pe("div",Object.assign({ref:l,role:"grid",className:Re(py("days"))},{children:[N(),(x?P:L).map(U)]}));return W.useImperativeHandle(r,()=>({getTitle:_,getHeight:()=>h.current,setVisible:i,scrollIntoView:k})),Pe("div",Object.assign({className:Re(py("month")),ref:c},{children:[F(),$()]}))}),[Ph]=Cn("calendar"),KI=e=>{const{locale:r}=W.useContext(vd),t=()=>{if(e.showTitle){const c=e.title||r.vanCalendar.title;return Q("div",Object.assign({className:Re(Ph("header-title"))},{children:c}))}return null},i=c=>{var h;(h=e.onClickSubtitle)===null||h===void 0||h.call(e,c)},l=()=>e.showSubtitle?Q("div",Object.assign({className:Re(Ph("header-subtitle")),onClick:i},{children:e.subtitle})):null,f=()=>{const{weekdays:c,firstDayOfWeek:h}=e,m=r.vanCalendar.weekdays,d=c?m.map((C,b)=>c[b]||C):m,g=[...d.slice(h,7),...d.slice(0,h)];return Q("div",Object.assign({className:Re(Ph("weekdays"))},{children:g.map((C,b)=>Q("span",Object.assign({className:Re(Ph("weekday"))},{children:C}),b))}))};return Pe("div",Object.assign({className:Re(Ph("header"))},{children:[t(),l(),f()]}))},[_d]=Cn("calendar"),WI=qC(),QI=(()=>{const e=qC();return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())})(),OT=W.forwardRef((e,r)=>{var t,{className:i,style:l}=e,f=$a(e,["className","style"]);const c=ea(f,{round:!0,poppable:!0,showMark:!0,showTitle:!0,showConfirm:!0,showSubtitle:!0,closeOnPopstate:!0,closeOnClickOverlay:!0,safeAreaInsetBottom:!0,defaultValue:null,type:"single",position:"bottom",maxRange:null,minDate:WI,maxDate:QI,firstDayOfWeek:0,showRangePrompt:!0}),{locale:h}=W.useContext(vd),[m,d]=nh({value:c.visible,defaultValue:!1,onChange:V=>{var te;V===!1&&((te=c.onClose)===null||te===void 0||te.call(c))}}),g=(V,te=c.minDate,oe=c.maxDate)=>vl(V,te)===-1?te:vl(V,oe)===1?oe:V,C=(V=c.defaultValue)=>{const{type:te,minDate:oe,maxDate:re}=c;if(V===null)return V;const pe=qC();if(te==="range"){Array.isArray(V)||(V=[]);const me=g(V[0]||pe,oe,kT(re)),Ce=g(V[1]||pe,TT(oe));return[me,Ce]}return te==="multiple"?Array.isArray(V)?V.map(me=>g(me)):[g(pe)]:((!V||Array.isArray(V))&&(V=pe),g(V))},b=W.useRef(),x=W.useRef(0),[_,k]=W.useState(C(c.value===void 0?c.defaultValue:c.value)),[S,A]=yD({subtitle:"",currentDate:_});Rc(()=>{c.value!==void 0&&JSON.stringify(_)!==JSON.stringify(c.value)&&k(c.value)},[c.value]),W.useEffect(()=>{JSON.stringify(S.currentDate)!==JSON.stringify(_)&&A({currentDate:_})},[_]);const[T,D]=fy(),F=W.useMemo(()=>c.firstDayOfWeek?+c.firstDayOfWeek%7:0,[c.firstDayOfWeek,c.firstDayOfWeek]),N=W.useMemo(()=>{const V=[],te=new Date(c.minDate);te.setDate(1);do V.push(new Date(te)),te.setMonth(te.getMonth()+1);while($C(te,c.maxDate)!==1);return V},[c.minDate,c.maxDate]),L=W.useMemo(()=>{const{currentDate:V}=S;if(V){if(c.type==="range")return!V[0]||!V[1];if(c.type==="multiple")return!V.length}return!V},[c.type,S.currentDate]),P=()=>{var V;const te=GL(b.current),oe=te+x.current,re=N.map((Ae,De)=>T[De].getHeight()),pe=re.reduce((Ae,De)=>Ae+De,0);if(oe>pe&&te>0)return;let me=0,Ce;const se=[-1,-1];for(let Ae=0;Ae<N.length;Ae++){const De=T[Ae];me<=oe&&me+re[Ae]>=te&&(se[1]=Ae,Ce||(Ce=De,se[0]=Ae),T[Ae].showed||(T[Ae].showed=!0,(V=c.onMonthShow)===null||V===void 0||V.call(c,{date:De.date,title:De.getTitle()}))),me+=re[Ae]}N.forEach((Ae,De)=>{const qe=De>=se[0]-1&&De<=se[1]+1;T[De].setVisible(qe)}),Ce&&Ce.getTitle()!==S.subtitle&&!c.horizontal&&A({subtitle:Ce.getTitle()})},U=V=>{q2(()=>{N.some((te,oe)=>$C(te,V)===0?(b.current&&T[oe].scrollIntoView(b.current),!0):!1),P()})},$=()=>{if(c.poppable&&!m)return;const{currentDate:V}=S;if(V){const te=c.type==="single"?V:V[0];U(te)}else q2(P)},O=()=>{q2(()=>{x.current=Math.floor(gT(b.current).height),$()})},z=(V=C())=>{A({currentDate:V}),$()},j=V=>{var te;const{maxRange:oe,rangePrompt:re,showRangePrompt:pe}=c;return oe&&$I(V)>oe?(pe&&CT.info(re||h.vanCalendar.rangePrompt(+oe)),(te=c.onOverRange)===null||te===void 0||te.call(c),!1):!0},H=()=>{var V;const te=DT(S.currentDate);c.poppable&&k(te),(V=c.onConfirm)===null||V===void 0||V.call(c,te),Z.close()},Y=(V,te)=>{const oe=re=>{var pe;S.currentDate=re,A({currentDate:re}),(pe=c.onSelect)===null||pe===void 0||pe.call(c,DT(S.currentDate))};if(te&&c.type==="range"&&!j(V)){c.showConfirm?oe([V[0],YC(V[0],+c.maxRange-1)]):oe(V);return}oe(V),te&&!c.showConfirm&&H()},q=V=>{var te;if(c.readOnly||!V.date)return;const{date:oe}=V,{type:re}=c,{currentDate:pe}=S;if(re==="range"){if(!pe){Y([oe]);return}const[me,Ce]=pe;if(me&&!Ce){const se=vl(oe,me);se===1?Y([me,oe],!0):se===-1?Y([oe]):c.allowSameDay&&Y([oe,oe],!0)}else Y([oe])}else if(re==="multiple"){if(!pe){Y([oe]);return}let me;if(S.currentDate.some((se,Ae)=>{const De=vl(se,oe)===0;return De&&(me=Ae),De})){const[se]=pe.splice(me,1);(te=c.onUnselect)===null||te===void 0||te.call(c,dy(se)),Y([...pe])}else c.maxRange&&pe.length>=c.maxRange?CT(c.rangePrompt||`选择天数不能超过 ${c.maxRange} 天`):Y([...pe,oe])}else Y(oe,!0)},X=(V,te)=>{const oe=!c.horizontal&&(te!==0||!c.showSubtitle);return Q(GI,Object.assign({ref:D(te),date:V,currentDate:S.currentDate,showMonthTitle:oe,firstDayOfWeek:F},sD(c,["type","color","minDate","maxDate","showMark","formatter","rowHeight","showSubtitle","lazyRender","allowSameDay","topInfoRender","bottomInfoRender","formatMonthTitle"]),{onClick:q}),te)},ne=()=>{if(c.footer)return c.footer;if(c.showConfirm){const V=L?c.confirmDisabledText:c.confirmText;return Q(ih,Object.assign({round:!0,block:!0,type:"danger",color:c.color,className:Re(_d("confirm")),disabled:L,nativeType:"button",onClick:H},{children:V||h.vanCalendar.confirm}))}return null},G=()=>Q("div",Object.assign({className:Re(_d("footer"),{"rv-safe-area-bottom":c.safeAreaInsetBottom})},{children:ne()})),ee=()=>Pe("div",Object.assign({className:Re(i,_d()),style:l},{children:[Q(KI,{weekdays:c.weekdays,title:c.title,subtitle:c.subtitle||S.subtitle,showTitle:c.showTitle,showSubtitle:c.showSubtitle,firstDayOfWeek:F,onClickSubtitle:V=>{var te;(te=c.onClickSubtitle)===null||te===void 0||te.call(c,V)}}),c.horizontal?Q("div",Object.assign({ref:b,className:Re(_d("horizontal-body"))},{children:Q(ST,Object.assign({indicator:()=>null,onChange:V=>{A({subtitle:T[V].getTitle()})}},{children:N.map((V,te)=>Q(ST.Item,{children:X(V,te)},V))}))})):Q("div",Object.assign({ref:b,className:Re(_d("body")),onScroll:P},{children:N.map(X)})),G()]})),Z={toggle:()=>{c.poppable&&d(V=>!V)},open:()=>{c.poppable&&d(!0)},close:()=>{c.poppable&&d(!1)}};return W.useEffect(()=>{c.poppable||O()},[]),W.useEffect(()=>{c.poppable&&m&&O()},[m]),Rc(()=>{z(C(S.currentDate))},[c.type,c.minDate,c.maxDate]),W.useImperativeHandle(r,()=>Object.assign({reset:z,scrollToDate:U},Z)),c.poppable?Pe(rn,{children:[Q(sh,Object.assign({visible:m,className:Re(_d("popup")),round:c.round,position:c.position,closeable:c.showTitle||c.showSubtitle,closeOnPopstate:c.closeOnPopstate,closeOnClickOverlay:c.closeOnClickOverlay,onClose:Z.close,onClosed:()=>{var V;c.poppable&&JSON.stringify(S.currentDate)!==JSON.stringify(_)&&A({currentDate:_}),(V=c.onClosed)===null||V===void 0||V.call(c)}},{children:ee()})),(t=c.children)===null||t===void 0?void 0:t.call(c,_,Z)]}):ee()});function ZI(e,r){var t;process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const i=xD(e),l=(t=r==null?void 0:r.wait)!==null&&t!==void 0?t:1e3,f=W.useMemo(()=>PI((...c)=>i.current(...c),l,r),[]);return bD(()=>{f.cancel()}),{run:f,cancel:f.cancel,flush:f.flush}}function XI(e,r,t){const[i,l]=W.useState({}),{run:f}=ZI(()=>{l({})},t);W.useEffect(()=>f(),r),Rc(e,[i])}const dX="",RT=W.createContext({}),[JI]=Cn("checkbox-group"),eH=W.forwardRef((e,r)=>{const[t,i]=fy(),[l,f]=wT({value:e.value,defaultValue:e.defaultValue}),c=(m={})=>{typeof m=="boolean"&&(m={checked:m});const{checked:d,skipDisabled:g}=m,b=t.filter(x=>x.props.bindGroup?x.props.disabled&&g?x.checked:d??!x.checked:!1).map(x=>x.props.name);f(b),e.onChange(b)},h=m=>{var d;f(m),(d=e.onChange)===null||d===void 0||d.call(e,m)};return W.useImperativeHandle(r,()=>({toggleAll:c})),Q(RT.Provider,Object.assign({value:{parent:{props:e},toggle:h,checked:l||[]}},{children:Q("div",Object.assign({className:Re(e.className,JI([e.direction]))},{children:W.Children.toArray(e.children).filter(Boolean).map((m,d)=>{var g;return((g=m.type)===null||g===void 0?void 0:g.displayName)!=="Checkbox"?m:W.cloneElement(m,{ref:i(d)})})}))}))}),[tH]=Cn("checkbox"),FT=W.forwardRef((e,r)=>{const t=ea(e,{bindGroup:!0}),i=W.useContext(RT),{parent:l}=i,f=$a(i,["parent"]),[c,h]=wT({value:t.checked,defaultValue:t.defaultChecked}),m=C=>{const{name:b}=t,{max:x}=l.props,_=f.checked.slice();if(C)!(x&&_.length>=x)&&_.indexOf(b)===-1&&(_.push(b),t.bindGroup&&f.toggle(_));else{const k=_.indexOf(b);k!==-1&&(_.splice(k,1),t.bindGroup&&f.toggle(_))}},d=W.useMemo(()=>l&&t.bindGroup?f.checked.indexOf(t.name)!==-1:c,[f.checked,c]),g=(C=!d)=>{var b;l&&t.bindGroup?m(C):(h(C),(b=t.onChange)===null||b===void 0||b.call(t,C))};return W.useImperativeHandle(r,()=>({toggle:g,checked:d,props:t})),Q(HI,Object.assign({},t,{bem:tH,role:"checkbox",parent:l,checked:d,className:t.className,bindGroup:t.bindGroup,onToggle:g}))});FT.displayName="Checkbox";const NT=Object.assign(FT,{Group:eH}),mX="",MT=200,PT=300,nH=15;function rH(e){const r=window.getComputedStyle(e),t=r.transform||r.webkitTransform,i=t.slice(7,t.length-1).split(", ")[5];return Number(i)}const[KC]=Cn("picker-column"),aH=W.memo(W.forwardRef((e,r)=>{const{locale:t}=W.useContext(vd),{valueKey:i,textKey:l,itemHeight:f,visibleItemCount:c,placeholder:h,value:m}=e,d=W.useMemo(()=>vD(f),[f]),g=W.useMemo(()=>Array.isArray(e.options)&&!e.options.length?[]:h?[{[i]:void 0,[l]:h===!0?t.vanPicker.select:h},...e.options]:e.options,[e.options]),C=W.useRef(null),b=W.useRef(!1),x=W.useRef(0),_=W.useRef(null),k=W.useRef(0),S=W.useRef(0),[A,T,D]=yD({offset:0,duration:0}),F=_D(),N=W.useMemo(()=>d*(+c-1)/2,[d,c]),L=G=>{var ee,Z;G=eh(G,0,g.length);for(let V=G;V<g.length;V+=1)if(!(!((ee=g[V])===null||ee===void 0)&&ee.disabled))return V;for(let V=G-1;V>=0;V-=1)if(!(!((Z=g[V])===null||Z===void 0)&&Z.disabled))return V;return null},P=G=>{e.onSelect(G,e.index)},U=G=>{G=L(G)||0;const ee=-G*d,Z=()=>{var V;((V=g[G])===null||V===void 0?void 0:V[i])!==m&&P(g[G])};b.current&&ee!==D.current.offset?_.current=Z:Z(),T({offset:ee})},$=G=>{G=L(G)||0;const ee=-G*d;T({offset:ee})};th(()=>{if(g.length===0)m!==void 0&&P(void 0);else{let G=g.findIndex(ee=>ee[i]===m);G<0&&(G=0,P(g[0])),$(G)}},[m,JSON.stringify(g)]);const O=G=>{b.current||e.readOnly||(_.current=null,T({duration:MT}),U(G))},z=G=>eh(Math.round(-G/d),0,g.length-1),j=(G,ee)=>{const Z=Math.abs(G/ee);G=D.current.offset+Z/.003*(G<0?-1:1);const V=z(G);T({duration:+e.swipeDuration}),U(V)},H=()=>{b.current=!1,T({duration:0}),_.current&&(_.current(),_.current=null)},Y=G=>{if(e.readOnly)return;F.start(G);let{offset:ee}=A;if(b.current){const Z=rH(C.current);ee=Math.min(0,Z-N),x.current=ee}else x.current=ee;T({duration:0,offset:ee}),k.current=Date.now(),S.current=x.current,_.current=null},q=G=>{if(e.readOnly)return;F.move(G),F.isVertical()&&(b.current=!0);const ee=eh(x.current+F.deltaY.current,-(g.length*d),d);T({offset:ee});const Z=Date.now();Z-k.current>PT&&(k.current=Z,S.current=ee)},X=()=>{if(e.readOnly||!b.current)return;const G=D.current.offset-S.current,ee=Date.now()-k.current;if(ee<PT&&Math.abs(G)>nH){j(G,ee);return}const V=z(D.current.offset);T({duration:MT}),U(V),setTimeout(()=>{b.current=!1},0)},ne=()=>{const G={height:`${e.itemHeight}px`};return g.map((ee,Z)=>{const{disabled:V}=ee,te={role:"button",style:G,tabIndex:V?-1:0,className:Re(KC("item",{disabled:V,selected:ee[i]===m})),onClick:()=>{O(Z)}},oe={className:"rv-ellipsis",children:ee[l]};return W.createElement("li",Object.assign({},te,{key:Z}),e.optionRender?e.optionRender(ee):Q("div",Object.assign({},oe)))})};return W.useImperativeHandle(r,()=>({stopMomentum:H})),Q("div",Object.assign({className:Re(KC(),e.className),onTouchStart:Y,onTouchMove:q,onTouchEnd:X,onTouchCancel:X},{children:Q("ul",Object.assign({ref:C,style:{transform:`translate3d(0, ${A.offset+N}px, 0)`,transitionDuration:`${A.duration}ms`,transitionProperty:A.duration?"all":"none"},className:Re(KC("wrapper")),onTransitionEnd:H},{children:ne()}))}))}),(e,r)=>!(e.index!==r.index||e.value!==r.value||e.onSelect!==r.onSelect||JSON.stringify(e.options)!==JSON.stringify(r.options)));function iH(e,r){const{textKey:t,valueKey:i,childrenKey:l}=r,f=W.useMemo(()=>{if(e.some(d=>typeof d=="object"&&l in d))return"cascade";const m=e[0]||{};return typeof m=="object"?l in m?"cascade":"object":"plain"},[e,l]),c=W.useMemo(()=>{let h=0;function m(d,g){g>h&&(h=g);const C=g+1;d.forEach(b=>{b[l]&&m(b[l],C)})}return m(e,1),h},[e,l]);return f!=="cascade"?e:h=>{const m=[];let d=e,g=0;for(;;){m.push(d.map(x=>{var _;return{[t]:x[t],[i]:(_=x[i])!==null&&_!==void 0?_:x[t]}}));const C=h[g],b=d.find(x=>{var _;return((_=x[i])!==null&&_!==void 0?_:x[t])===C});if(!b||!b[l])break;d=b[l],g++}for(;g<c-1;)m.push([]),g++;return m}}function WC(e){let r=null;return()=>(r===null&&(r=e()),r)}function oH(e,r,t){const{textKey:i,valueKey:l}=r,f=WC(()=>{let d=typeof e=="function"?e(t):e;return Array.isArray(d[0])||(d=[d]),d.map(g=>g.map(C=>typeof C=="string"?{[i]:C,[l]:C}:(l in C||(C[l]=C[i]),C)))}),c=WC(()=>t.map((d,g)=>{var C;const b=f()[g];return b?(C=b.find(x=>x[l]===d))!==null&&C!==void 0?C:void 0:null})),h=WC(()=>t.map((d,g)=>{var C;const b=f()[g];return b&&(C=b.findIndex(x=>x[l]===d))!==null&&C!==void 0?C:null}));return{get columns(){return f()},get items(){return c()},get indexes(){return h()}}}function BT(e,r,t){const i=iH(e,r);return W.useMemo(()=>oH(i,r,t),[e,r,t])}const[cs]=Cn("picker");function lH(e){const{locale:r}=W.useContext(vd),t=W.useRef(null),[i,l]=fy(),{text:f,value:c,children:h}=Jp({text:"text",value:"value",children:"children"},e.columnsFieldNames),[m,d]=W.useState(e.value);W.useEffect(()=>{e.value!==void 0&&JSON.stringify(m)!==JSON.stringify(e.value)&&d(e.value)},[e.value]);const g=BT(e.columns,{textKey:f,valueKey:c,childrenKey:h},m),{columns:C,items:b,indexes:x}=g;XI(()=>{var U;JSON.stringify(e.value)!==JSON.stringify(m)&&((U=e.onChange)===null||U===void 0||U.call(e,m,b,x))},[m],{wait:100,leading:!1,trailing:!0});const _=W.useMemo(()=>vD(e.itemHeight),[e.itemHeight]),k=(U,$)=>{d(O=>{const z=[...O];return z[$]=U==null?void 0:U[c],z})},S=()=>{var U;i.forEach($=>$.stopMomentum()),(U=e.onConfirm)===null||U===void 0||U.call(e,m,b,x)},A=()=>{var U;(U=e.onCancel)===null||U===void 0||U.call(e)},T=()=>e.title?Q("div",Object.assign({className:Re(cs("title"),"rv-ellipsis")},{children:e.title})):null,D=()=>{const U=e.cancelButtonText||r.cancel;return Q("button",Object.assign({type:"button",className:Re(cs("cancel")),onClick:A},{children:U}))},F=()=>{const U=e.confirmButtonText||r.confirm;return Q("button",Object.assign({type:"button",className:Re(cs("confirm")),onClick:S},{children:U}))},N=()=>e.showToolbar?Q("div",Object.assign({className:Re(cs("toolbar"))},{children:e.toolbar||Pe(rn,{children:[D(),T(),F()]})})):null,L=()=>C.map((U,$)=>{const O=Array.isArray(e.placeholder)?e.placeholder[$]:e.placeholder;return Q(aH,{textKey:f,valueKey:c,ref:l($),placeholder:O,optionRender:e.optionRender,readOnly:e.readOnly,value:m[$],itemHeight:_,index:$,swipeDuration:e.swipeDuration,visibleItemCount:e.visibleItemCount,options:U,onSelect:k},$)}),P=()=>{const U=_*e.visibleItemCount,$={height:`${_}px`},O={height:`${U}px`},z={backgroundSize:`100% ${(U-_)/2}px`};return Pe("div",Object.assign({ref:t,className:Re(cs("columns")),style:O},{children:[L(),Q("div",{className:Re(cs("mask")),style:z}),Q("div",{className:Re(wz,cs("frame")),style:$})]}))};return K2("touchmove",Y2,{target:t.current}),Pe("div",Object.assign({className:Re(cs(),e.className)},{children:[e.toolbarPosition==="top"?N():null,e.loading?Q(Z2,{className:Re(cs("loading"))}):null,e.columnsTop,P(),e.columnsBottom,e.toolbarPosition==="bottom"?N():null]}))}function sH(e,r){const t=ea(e,{columns:[],itemHeight:44,visibleItemCount:5,swipeDuration:300,showToolbar:!0,placeholder:!0,toolbarPosition:"top"}),{visible:i,popup:l,children:f,defaultValue:c=[]}=t,h=$a(t,["visible","popup","children","defaultValue"]),[m,d]=nh({value:i,defaultValue:!1,onChange:j=>{var H;j===!1&&((H=t.onClose)===null||H===void 0||H.call(t))}}),g={toggle:()=>{l&&d(j=>!j)},open:()=>{l&&d(!0)},close:()=>{l&&d(!1)}};W.useImperativeHandle(r,()=>g);const C=Array.isArray(t.value)?t.value:t.value!==void 0?[t.value]:void 0,b=Array.isArray(c)?c:c!==void 0?[c]:[],{text:x,value:_,children:k}=Jp({text:"text",value:"value",children:"children"},t.columnsFieldNames),S=W.useMemo(()=>{const j=t.columns[0]||{};return!(Array.isArray(j)||typeof j=="object"&&k in j)},[t.columns,k]),A=j=>S?j==null?void 0:j[0]:j,[T,D]=nh({value:C,defaultValue:b}),F=BT(t.columns,{textKey:x,valueKey:_,childrenKey:k},T),[N,L]=W.useState(T);W.useEffect(()=>{l&&JSON.stringify(N)!==JSON.stringify(T)&&L(T)},[m]),W.useEffect(()=>{!l&&JSON.stringify(N)!==JSON.stringify(T)&&L(T)},[T]);const P=(j,H,Y)=>{var q;D(N,!0),(q=t.onConfirm)===null||q===void 0||q.call(t,A(j),A(H),A(Y)),l&&g.close()},U=()=>{var j;(j=t.onCancel)===null||j===void 0||j.call(t),l&&g.close()},$=DD((j,H,Y)=>{var q,X;L(j),l?m&&((q=t.onChange)===null||q===void 0||q.call(t,A(j),A(H),A(Y))):(X=t.onChange)===null||X===void 0||X.call(t,A(j),A(H),A(Y))}),O=cd(l)?Object.assign({closeOnClickOverlay:!0},l):{closeOnClickOverlay:!0},z=Q(lH,Object.assign({},h,{value:N,onCancel:U,onConfirm:P,onChange:$}));return l?Pe(rn,{children:[Q(sh,Object.assign({round:!0,position:"bottom",visible:m,closeOnClickOverlay:!0,onClickOverlay:()=>{O!=null&&O.closeOnClickOverlay&&d(!1)}},O,{children:z})),f==null?void 0:f(A(T),A(F.items),g)]}):z}const QC=W.forwardRef(sH);function uH(e){return Object.prototype.toString.call(e)==="[object Date]"&&!hD(e.getTime())}const cH=W.forwardRef((e,r)=>{const t=ea(e,{type:"datetime",placeholder:!1,minDate:fH,maxDate:dH,formatter:(P,U)=>U}),{value:i,defaultValue:l,formatter:f,columnsOrder:c,type:h,filter:m,minDate:d,maxDate:g}=t,C=$a(t,["value","defaultValue","formatter","columnsOrder","type","filter","minDate","maxDate"]),b=P=>(uH(P)||(P=new Date),P=Math.max(P,d.getTime()),P=Math.min(P,g.getTime()),new Date(P)),[x,_,k]=W2(()=>b(i||l)),S=(P,U)=>{const $=t[`${P}Date`],O=$.getFullYear();let z=1,j=1,H=0,Y=0;return P==="max"&&(z=12,j=GC(U.getFullYear(),U.getMonth()+1),H=23,Y=59),U.getFullYear()===O&&(z=$.getMonth()+1,U.getMonth()+1===z&&(j=$.getDate(),U.getDate()===j&&(H=$.getHours(),U.getHours()===H&&(Y=$.getMinutes())))),{[`${P}Year`]:O,[`${P}Month`]:z,[`${P}Date`]:j,[`${P}Hour`]:H,[`${P}Minute`]:Y}},A=W.useMemo(()=>{const{maxYear:P,maxDate:U,maxMonth:$,maxHour:O,maxMinute:z}=S("max",k.current),{minYear:j,minDate:H,minMonth:Y,minHour:q,minMinute:X}=S("min",k.current);let ne=[{type:"year",range:[j,P]},{type:"month",range:[Y,$]},{type:"day",range:[H,U]},{type:"hour",range:[q,O]},{type:"minute",range:[X,z]}];switch(h){case"date":ne=ne.slice(0,3);break;case"year-month":ne=ne.slice(0,2);break;case"month-day":ne=ne.slice(1,3);break;case"datehour":ne=ne.slice(0,4);break}if(c){const G=c.concat(ne.map(ee=>ee.type));ne.sort((ee,Z)=>G.indexOf(ee.type)-G.indexOf(Z.type))}return ne.map(({type:G,range:ee})=>{let Z=AT(ee[1]-ee[0]+1,V=>dl(ee[0]+V));return m&&(Z=m(G,Z)),{type:G,values:Z}})},[c,k.current,d,g]),T=W.useMemo(()=>A.map(P=>P.values.map(U=>f(P.type,U))),[A,f]),D=W.useMemo(()=>{const P=t.popup?b(k.current):k.current;return A.map($=>{switch($.type){case"year":return f("year",`${P.getFullYear()}`);case"month":return f("month",dl(P.getMonth()+1));case"day":return f("day",dl(P.getDate()));case"hour":return f("hour",dl(P.getHours()));case"minute":return f("minute",dl(P.getMinutes()));default:return""}})},[t.value,k.current,b]),F=P=>{const{type:U}=t,$=X=>{let ne=0;A.forEach((ee,Z)=>{X===ee.type&&(ne=Z)});const{values:G}=A[ne];return YI(G[P[ne]])};let O=null,z=null,j=null;U==="month-day"?(O=(x||d).getFullYear(),z=$("month"),j=$("day")):(O=$("year"),z=$("month"),j=U==="year-month"?1:$("day"));const H=GC(O,z);j=j>H?H:j;let Y=0,q=0;return U==="datehour"&&(Y=+$("hour")),U==="datetime"&&(Y=+$("hour"),q=+$("minute")),b(new Date(O,z-1,j,Y,q))},N=(P,U,$)=>{var O;const z=F($);_(z),(O=t.onChange)===null||O===void 0||O.call(t,z)},L=()=>{var P;(P=t.onConfirm)===null||P===void 0||P.call(t,x)};return Rc(()=>{const P=b(i);P&&P.valueOf()!==(x==null?void 0:x.valueOf())&&_(P)},[i,m,d,g]),Q(QC,Object.assign({},C,{value:D,ref:r,columns:T,onChange:N,onConfirm:L,onCancel:t.onCancel},{children:(P,U,$)=>{var O;return(O=t.children)===null||O===void 0?void 0:O.call(t,i||l,U,$)}}))}),LT=new Date().getFullYear(),fH=new Date(LT-10,0,1),dH=new Date(LT+10,11,31),pH=cH,hH=W.forwardRef((e,r)=>{const t=ea(e,{minHour:0,maxHour:23,minMinute:0,maxMinute:59,placeholder:!1,defaultValue:"",formatter:(L,P)=>P}),{value:i,defaultValue:l,formatter:f,filter:c,minHour:h,maxHour:m,minMinute:d,maxMinute:g}=t,C=$a(t,["value","defaultValue","formatter","filter","minHour","maxHour","minMinute","maxMinute"]),b=L=>{L||(L=`${dl(h)}:${dl(d)}`);let[P,U]=L.split(":");return P=dl(eh(P,+h,+m)),U=dl(eh(U,+d,+g)),`${P}:${U}`},[x,_]=W.useState(()=>b(i===void 0?l:i)),k=W.useMemo(()=>[{type:"hour",range:[+h,+m]},{type:"minute",range:[+d,+g]}],[h,m,d,g]),S=W.useMemo(()=>k.map(({type:L,range:P})=>{let U=AT(P[1]-P[0]+1,$=>dl(P[0]+$));return c&&(U=c(L,U)),{type:L,values:U}}),[k]),A=W.useMemo(()=>S.map(L=>L.values.map(P=>f(L.type,P))),[S]),T=W.useMemo(()=>{const L=(t.popup?b(t.value):x).split(":");return[f("hour",L[0]),f("minute",L[1])]},[t.value,x,b]),D=()=>{var L;(L=t.onConfirm)===null||L===void 0||L.call(t,x)},F=()=>{var L;(L=t.onCancel)===null||L===void 0||L.call(t)},N=L=>{var P;const U=b(L.join(":"));_(U),(P=t.onChange)===null||P===void 0||P.call(t,U)};return Rc(()=>{const L=b(x);_(L)},[c,h,m,d,g]),Rc(()=>{const L=b(i);L!==x&&_(L)},[i]),Q(QC,Object.assign({},C,{ref:r,columns:A,value:T,onChange:N,onConfirm:D,onCancel:F},{children:(L,P,U)=>{var $;return($=t.children)===null||$===void 0?void 0:$.call(t,i,P,U)}}))}),[zT]=Cn("datetime-picker"),ZC=W.forwardRef((e,r)=>e.type==="time"?Q(hH,Object.assign({ref:r,className:Re(zT())},e)):Q(pH,Object.assign({ref:r,className:Re(zT())},e)));function XC(e){return Array.isArray(e)?e:[e]}const CX="";function UT(e,r){this.v=e,this.k=r}function Da(e,r,t,i){var l=Object.defineProperty;try{l({},"",{})}catch{l=0}Da=function(c,h,m,d){function g(C,b){Da(c,C,function(x){return this._invoke(C,b,x)})}h?l?l(c,h,{value:m,enumerable:!d,configurable:!d,writable:!d}):c[h]=m:(g("next",0),g("throw",1),g("return",2))},Da(e,r,t,i)}function JC(){var e,r,t=typeof Symbol=="function"?Symbol:{},i=t.iterator||"@@iterator",l=t.toStringTag||"@@toStringTag";function f(x,_,k,S){var A=_&&_.prototype instanceof h?_:h,T=Object.create(A.prototype);return Da(T,"_invoke",function(D,F,N){var L,P,U,$=0,O=N||[],z=!1,j={p:0,n:0,v:e,a:H,f:H.bind(e,4),d:function(q,X){return L=q,P=0,U=e,j.n=X,c}};function H(Y,q){for(P=Y,U=q,r=0;!z&&$&&!X&&r<O.length;r++){var X,ne=O[r],G=j.p,ee=ne[2];Y>3?(X=ee===q)&&(U=ne[(P=ne[4])?5:(P=3,3)],ne[4]=ne[5]=e):ne[0]<=G&&((X=Y<2&&G<ne[1])?(P=0,j.v=q,j.n=ne[1]):G<ee&&(X=Y<3||ne[0]>q||q>ee)&&(ne[4]=Y,ne[5]=q,j.n=ee,P=0))}if(X||Y>1)return c;throw z=!0,q}return function(Y,q,X){if($>1)throw TypeError("Generator is already running");for(z&&q===1&&H(q,X),P=q,U=X;(r=P<2?e:U)||!z;){L||(P?P<3?(P>1&&(j.n=-1),H(P,U)):j.n=U:j.v=U);try{if($=2,L){if(P||(Y="next"),r=L[Y]){if(!(r=r.call(L,U)))throw TypeError("iterator result is not an object");if(!r.done)return r;U=r.value,P<2&&(P=0)}else P===1&&(r=L.return)&&r.call(L),P<2&&(U=TypeError("The iterator does not provide a '"+Y+"' method"),P=1);L=e}else if((r=(z=j.n<0)?U:D.call(F,j))!==c)break}catch(ne){L=e,P=1,U=ne}finally{$=1}}return{value:r,done:z}}}(x,k,S),!0),T}var c={};function h(){}function m(){}function d(){}r=Object.getPrototypeOf;var g=[][i]?r(r([][i]())):(Da(r={},i,function(){return this}),r),C=d.prototype=h.prototype=Object.create(g);function b(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,d):(x.__proto__=d,Da(x,l,"GeneratorFunction")),x.prototype=Object.create(C),x}return m.prototype=d,Da(C,"constructor",d),Da(d,"constructor",m),m.displayName="GeneratorFunction",Da(d,l,"GeneratorFunction"),Da(C),Da(C,l,"Generator"),Da(C,i,function(){return this}),Da(C,"toString",function(){return"[object Generator]"}),(JC=function(){return{w:f,m:b}})()}function hy(e,r){function t(l,f,c,h){try{var m=e[l](f),d=m.value;return d instanceof UT?r.resolve(d.v).then(function(g){t("next",g,c,h)},function(g){t("throw",g,c,h)}):r.resolve(d).then(function(g){m.value=g,c(m)},function(g){return t("throw",g,c,h)})}catch(g){h(g)}}var i;this.next||(Da(hy.prototype),Da(hy.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Da(this,"_invoke",function(l,f,c){function h(){return new r(function(m,d){t(l,c,m,d)})}return i=i?i.then(h,h):h()},!0)}function jT(e,r,t,i,l){return new hy(JC().w(e,r,t,i),l||Promise)}function vH(e,r,t,i,l){var f=jT(e,r,t,i,l);return f.next().then(function(c){return c.done?c.value:f.next()})}function mH(e){var r=Object(e),t=[];for(var i in r)t.unshift(i);return function l(){for(;t.length;)if((i=t.pop())in r)return l.value=i,l.done=!1,l;return l.done=!0,l}}function IT(e){if(e!=null){var r=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],t=0;if(r)return r.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}throw new TypeError(Mr(e)+" is not iterable")}function ro(){var e=JC(),r=e.m(ro),t=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function i(c){var h=typeof c=="function"&&c.constructor;return!!h&&(h===t||(h.displayName||h.name)==="GeneratorFunction")}var l={throw:1,return:2,break:3,continue:3};function f(c){var h,m;return function(d){h||(h={stop:function(){return m(d.a,2)},catch:function(){return d.v},abrupt:function(C,b){return m(d.a,l[C],b)},delegateYield:function(C,b,x){return h.resultName=b,m(d.d,IT(C),x)},finish:function(C){return m(d.f,C)}},m=function(C,b,x){d.p=h.prev,d.n=h.next;try{return C(b,x)}finally{h.next=d.n}}),h.resultName&&(h[h.resultName]=d.v,h.resultName=void 0),h.sent=d.v,h.next=d.n;try{return c.call(this,h)}finally{d.p=h.prev,d.n=h.next}}}return(ro=function(){return{wrap:function(m,d,g,C){return e.w(f(m),d,g,C&&C.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(m,d){return new UT(m,d)},AsyncIterator:hy,async:function(m,d,g,C,b){return(i(d)?jT:vH)(f(m),d,g,C,b)},keys:mH,values:IT}})()}function HT(e,r,t,i,l,f,c){try{var h=e[f](c),m=h.value}catch(d){return void t(d)}h.done?r(m):Promise.resolve(m).then(i,l)}function Bh(e){return function(){var r=this,t=arguments;return new Promise(function(i,l){var f=e.apply(r,t);function c(m){HT(f,i,l,c,h,"next",m)}function h(m){HT(f,i,l,c,h,"throw",m)}c(void 0)})}}function gH(e){if(Array.isArray(e))return bb(e)}function VT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
196
|
+
`,e.getElementsByTagName("head")[0].appendChild(r)),e.body&&D6(e.body,"react-draggable-transparent-selection")}function tB(e){if(e)try{if(e.body&&k6(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const r=(e.defaultView||window).getSelection();r&&r.type!=="Caret"&&r.removeAllRanges()}}catch{}}function D6(e,r){e.classList?e.classList.add(r):e.className.match(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)")))||(e.className+=" ".concat(r))}function k6(e,r){e.classList?e.classList.remove(r):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)"),"g"),"")}var cl={};Object.defineProperty(cl,"__esModule",{value:!0}),cl.canDragX=aB,cl.canDragY=iB,cl.createCoreData=lB,cl.createDraggableData=sB,cl.getBoundPosition=nB,cl.getControlPosition=oB,cl.snapToGrid=rB;var Ni=ul,ud=sr;function nB(e,r,t){if(!e.props.bounds)return[r,t];let{bounds:i}=e.props;i=typeof i=="string"?i:uB(i);const l=A2(e);if(typeof i=="string"){const{ownerDocument:f}=l,c=f.defaultView;let h;if(i==="parent"?h=l.parentNode:h=f.querySelector(i),!(h instanceof c.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');const m=h,d=c.getComputedStyle(l),g=c.getComputedStyle(m);i={left:-l.offsetLeft+(0,Ni.int)(g.paddingLeft)+(0,Ni.int)(d.marginLeft),top:-l.offsetTop+(0,Ni.int)(g.paddingTop)+(0,Ni.int)(d.marginTop),right:(0,ud.innerWidth)(m)-(0,ud.outerWidth)(l)-l.offsetLeft+(0,Ni.int)(g.paddingRight)-(0,Ni.int)(d.marginRight),bottom:(0,ud.innerHeight)(m)-(0,ud.outerHeight)(l)-l.offsetTop+(0,Ni.int)(g.paddingBottom)-(0,Ni.int)(d.marginBottom)}}return(0,Ni.isNum)(i.right)&&(r=Math.min(r,i.right)),(0,Ni.isNum)(i.bottom)&&(t=Math.min(t,i.bottom)),(0,Ni.isNum)(i.left)&&(r=Math.max(r,i.left)),(0,Ni.isNum)(i.top)&&(t=Math.max(t,i.top)),[r,t]}function rB(e,r,t){const i=Math.round(r/e[0])*e[0],l=Math.round(t/e[1])*e[1];return[i,l]}function aB(e){return e.props.axis==="both"||e.props.axis==="x"}function iB(e){return e.props.axis==="both"||e.props.axis==="y"}function oB(e,r,t){const i=typeof r=="number"?(0,ud.getTouch)(e,r):null;if(typeof r=="number"&&!i)return null;const l=A2(t),f=t.props.offsetParent||l.offsetParent||l.ownerDocument.body;return(0,ud.offsetXYFromParent)(i||e,f,t.props.scale)}function lB(e,r,t){const i=!(0,Ni.isNum)(e.lastX),l=A2(e);return i?{node:l,deltaX:0,deltaY:0,lastX:r,lastY:t,x:r,y:t}:{node:l,deltaX:r-e.lastX,deltaY:t-e.lastY,lastX:e.lastX,lastY:e.lastY,x:r,y:t}}function sB(e,r){const t=e.props.scale;return{node:r.node,x:e.state.x+r.deltaX/t,y:e.state.y+r.deltaY/t,deltaX:r.deltaX/t,deltaY:r.deltaY/t,lastX:e.state.x,lastY:e.state.y}}function uB(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function A2(e){const r=e.findDOMNode();if(!r)throw new Error("<DraggableCore>: Unmounted during event!");return r}var Tg={},Ag={};Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.default=cB;function cB(){}Object.defineProperty(Tg,"__esModule",{value:!0}),Tg.default=void 0;var O2=dB(W),li=F2(wt.exports),fB=F2(tu.exports),Ea=sr,lu=cl,R2=ul,qp=F2(Ag);function F2(e){return e&&e.__esModule?e:{default:e}}function T6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(T6=function(i){return i?t:r})(e)}function dB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=T6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function Va(e,r,t){return r=pB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function pB(e){var r=hB(e,"string");return typeof r=="symbol"?r:String(r)}function hB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}const bo={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let su=bo.mouse,Og=class extends O2.Component{constructor(){super(...arguments),Va(this,"dragging",!1),Va(this,"lastX",NaN),Va(this,"lastY",NaN),Va(this,"touchIdentifier",null),Va(this,"mounted",!1),Va(this,"handleDragStart",r=>{if(this.props.onMouseDown(r),!this.props.allowAnyClick&&typeof r.button=="number"&&r.button!==0)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:i}=t;if(this.props.disabled||!(r.target instanceof i.defaultView.Node)||this.props.handle&&!(0,Ea.matchesSelectorAndParentsTo)(r.target,this.props.handle,t)||this.props.cancel&&(0,Ea.matchesSelectorAndParentsTo)(r.target,this.props.cancel,t))return;r.type==="touchstart"&&r.preventDefault();const l=(0,Ea.getTouchIdentifier)(r);this.touchIdentifier=l;const f=(0,lu.getControlPosition)(r,l,this);if(f==null)return;const{x:c,y:h}=f,m=(0,lu.createCoreData)(this,c,h);(0,qp.default)("DraggableCore: handleDragStart: %j",m),(0,qp.default)("calling",this.props.onStart),!(this.props.onStart(r,m)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Ea.addUserSelectStyles)(i),this.dragging=!0,this.lastX=c,this.lastY=h,(0,Ea.addEvent)(i,su.move,this.handleDrag),(0,Ea.addEvent)(i,su.stop,this.handleDragStop))}),Va(this,"handleDrag",r=>{const t=(0,lu.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let h=i-this.lastX,m=l-this.lastY;if([h,m]=(0,lu.snapToGrid)(this.props.grid,h,m),!h&&!m)return;i=this.lastX+h,l=this.lastY+m}const f=(0,lu.createCoreData)(this,i,l);if((0,qp.default)("DraggableCore: handleDrag: %j",f),this.props.onDrag(r,f)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const m=document.createEvent("MouseEvents");m.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(m)}return}this.lastX=i,this.lastY=l}),Va(this,"handleDragStop",r=>{if(!this.dragging)return;const t=(0,lu.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let m=i-this.lastX||0,d=l-this.lastY||0;[m,d]=(0,lu.snapToGrid)(this.props.grid,m,d),i=this.lastX+m,l=this.lastY+d}const f=(0,lu.createCoreData)(this,i,l);if(this.props.onStop(r,f)===!1||this.mounted===!1)return!1;const h=this.findDOMNode();h&&this.props.enableUserSelectHack&&(0,Ea.removeUserSelectStyles)(h.ownerDocument),(0,qp.default)("DraggableCore: handleDragStop: %j",f),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,h&&((0,qp.default)("DraggableCore: Removing handlers"),(0,Ea.removeEvent)(h.ownerDocument,su.move,this.handleDrag),(0,Ea.removeEvent)(h.ownerDocument,su.stop,this.handleDragStop))}),Va(this,"onMouseDown",r=>(su=bo.mouse,this.handleDragStart(r))),Va(this,"onMouseUp",r=>(su=bo.mouse,this.handleDragStop(r))),Va(this,"onTouchStart",r=>(su=bo.touch,this.handleDragStart(r))),Va(this,"onTouchEnd",r=>(su=bo.touch,this.handleDragStop(r)))}componentDidMount(){this.mounted=!0;const r=this.findDOMNode();r&&(0,Ea.addEvent)(r,bo.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const r=this.findDOMNode();if(r){const{ownerDocument:t}=r;(0,Ea.removeEvent)(t,bo.mouse.move,this.handleDrag),(0,Ea.removeEvent)(t,bo.touch.move,this.handleDrag),(0,Ea.removeEvent)(t,bo.mouse.stop,this.handleDragStop),(0,Ea.removeEvent)(t,bo.touch.stop,this.handleDragStop),(0,Ea.removeEvent)(r,bo.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Ea.removeUserSelectStyles)(t)}}findDOMNode(){var r,t;return(r=this.props)!==null&&r!==void 0&&r.nodeRef?(t=this.props)===null||t===void 0||(t=t.nodeRef)===null||t===void 0?void 0:t.current:fB.default.findDOMNode(this)}render(){return O2.cloneElement(O2.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Tg.default=Og,Va(Og,"displayName","DraggableCore"),Va(Og,"propTypes",{allowAnyClick:li.default.bool,children:li.default.node.isRequired,disabled:li.default.bool,enableUserSelectHack:li.default.bool,offsetParent:function(e,r){if(e[r]&&e[r].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:li.default.arrayOf(li.default.number),handle:li.default.string,cancel:li.default.string,nodeRef:li.default.object,onStart:li.default.func,onDrag:li.default.func,onStop:li.default.func,onMouseDown:li.default.func,scale:li.default.number,className:R2.dontSetMe,style:R2.dontSetMe,transform:R2.dontSetMe}),Va(Og,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return m.default}}),e.default=void 0;var r=b(W),t=g(wt.exports),i=g(tu.exports),l=g(NP),f=sr,c=cl,h=ul,m=g(Tg),d=g(Ag);function g(T){return T&&T.__esModule?T:{default:T}}function C(T){if(typeof WeakMap!="function")return null;var D=new WeakMap,F=new WeakMap;return(C=function(N){return N?F:D})(T)}function b(T,D){if(!D&&T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var F=C(D);if(F&&F.has(T))return F.get(T);var N={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in T)if(P!=="default"&&Object.prototype.hasOwnProperty.call(T,P)){var U=L?Object.getOwnPropertyDescriptor(T,P):null;U&&(U.get||U.set)?Object.defineProperty(N,P,U):N[P]=T[P]}return N.default=T,F&&F.set(T,N),N}function x(){return x=Object.assign?Object.assign.bind():function(T){for(var D=1;D<arguments.length;D++){var F=arguments[D];for(var N in F)Object.prototype.hasOwnProperty.call(F,N)&&(T[N]=F[N])}return T},x.apply(this,arguments)}function _(T,D,F){return D=k(D),D in T?Object.defineProperty(T,D,{value:F,enumerable:!0,configurable:!0,writable:!0}):T[D]=F,T}function k(T){var D=S(T,"string");return typeof D=="symbol"?D:String(D)}function S(T,D){if(typeof T!="object"||T===null)return T;var F=T[Symbol.toPrimitive];if(F!==void 0){var N=F.call(T,D||"default");if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(T)}class A extends r.Component{static getDerivedStateFromProps(D,F){let{position:N}=D,{prevPropsPosition:L}=F;return N&&(!L||N.x!==L.x||N.y!==L.y)?((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:N,prevPropsPosition:L}),{x:N.x,y:N.y,prevPropsPosition:{...N}}):null}constructor(D){super(D),_(this,"onDragStart",(F,N)=>{if((0,d.default)("Draggable: onDragStart: %j",N),this.props.onStart(F,(0,c.createDraggableData)(this,N))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),_(this,"onDrag",(F,N)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",N);const L=(0,c.createDraggableData)(this,N),P={x:L.x,y:L.y,slackX:0,slackY:0};if(this.props.bounds){const{x:$,y:O}=P;P.x+=this.state.slackX,P.y+=this.state.slackY;const[z,j]=(0,c.getBoundPosition)(this,P.x,P.y);P.x=z,P.y=j,P.slackX=this.state.slackX+($-P.x),P.slackY=this.state.slackY+(O-P.y),L.x=P.x,L.y=P.y,L.deltaX=P.x-this.state.x,L.deltaY=P.y-this.state.y}if(this.props.onDrag(F,L)===!1)return!1;this.setState(P)}),_(this,"onDragStop",(F,N)=>{if(!this.state.dragging||this.props.onStop(F,(0,c.createDraggableData)(this,N))===!1)return!1;(0,d.default)("Draggable: onDragStop: %j",N);const P={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:$,y:O}=this.props.position;P.x=$,P.y=O}this.setState(P)}),this.state={dragging:!1,dragged:!1,x:D.position?D.position.x:D.defaultPosition.x,y:D.position?D.position.y:D.defaultPosition.y,prevPropsPosition:{...D.position},slackX:0,slackY:0,isElementSVG:!1},D.position&&(D.onDrag||D.onStop)}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var D,F;return(D=(F=this.props)===null||F===void 0||(F=F.nodeRef)===null||F===void 0?void 0:F.current)!==null&&D!==void 0?D:i.default.findDOMNode(this)}render(){const{axis:D,bounds:F,children:N,defaultPosition:L,defaultClassName:P,defaultClassNameDragging:U,defaultClassNameDragged:$,position:O,positionOffset:z,scale:j,...H}=this.props;let Y={},q=null;const ne=!Boolean(O)||this.state.dragging,G=O||L,ee={x:(0,c.canDragX)(this)&&ne?this.state.x:G.x,y:(0,c.canDragY)(this)&&ne?this.state.y:G.y};this.state.isElementSVG?q=(0,f.createSVGTransform)(ee,z):Y=(0,f.createCSSTransform)(ee,z);const Z=(0,l.default)(N.props.className||"",P,{[U]:this.state.dragging,[$]:this.state.dragged});return r.createElement(m.default,x({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(N),{className:Z,style:{...N.props.style,...Y},transform:q}))}}e.default=A,_(A,"displayName","Draggable"),_(A,"propTypes",{...m.default.propTypes,axis:t.default.oneOf(["both","x","y","none"]),bounds:t.default.oneOfType([t.default.shape({left:t.default.number,right:t.default.number,top:t.default.number,bottom:t.default.number}),t.default.string,t.default.oneOf([!1])]),defaultClassName:t.default.string,defaultClassNameDragging:t.default.string,defaultClassNameDragged:t.default.string,defaultPosition:t.default.shape({x:t.default.number,y:t.default.number}),positionOffset:t.default.shape({x:t.default.oneOfType([t.default.number,t.default.string]),y:t.default.oneOfType([t.default.number,t.default.string])}),position:t.default.shape({x:t.default.number,y:t.default.number}),className:h.dontSetMe,style:h.dontSetMe,transform:h.dontSetMe}),_(A,"defaultProps",{...m.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(s6);const{default:A6,DraggableCore:vB}=s6;Dg.exports=A6,Dg.exports.default=A6,Dg.exports.DraggableCore=vB;var N2={};N2.__esModule=!0,N2.cloneElement=CB;var mB=gB(W);function gB(e){return e&&e.__esModule?e:{default:e}}function O6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function R6(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?O6(Object(t),!0).forEach(function(i){yB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function yB(e,r,t){return r=xB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xB(e){var r=bB(e,"string");return typeof r=="symbol"?r:String(r)}function bB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function CB(e,r){return r.style&&e.props.style&&(r.style=R6(R6({},e.props.style),r.style)),r.className&&e.props.className&&(r.className=e.props.className+" "+r.className),mB.default.cloneElement(e,r)}var Gp={};Gp.__esModule=!0,Gp.resizableProps=void 0;var Bt=wB(wt.exports);function wB(e){return e&&e.__esModule?e:{default:e}}var _B={axis:Bt.default.oneOf(["both","x","y","none"]),className:Bt.default.string,children:Bt.default.element.isRequired,draggableOpts:Bt.default.shape({allowAnyClick:Bt.default.bool,cancel:Bt.default.string,children:Bt.default.node,disabled:Bt.default.bool,enableUserSelectHack:Bt.default.bool,offsetParent:Bt.default.node,grid:Bt.default.arrayOf(Bt.default.number),handle:Bt.default.string,nodeRef:Bt.default.object,onStart:Bt.default.func,onDrag:Bt.default.func,onStop:Bt.default.func,onMouseDown:Bt.default.func,scale:Bt.default.number}),height:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="y"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)},handle:Bt.default.oneOfType([Bt.default.node,Bt.default.func]),handleSize:Bt.default.arrayOf(Bt.default.number),lockAspectRatio:Bt.default.bool,maxConstraints:Bt.default.arrayOf(Bt.default.number),minConstraints:Bt.default.arrayOf(Bt.default.number),onResizeStop:Bt.default.func,onResizeStart:Bt.default.func,onResize:Bt.default.func,resizeHandles:Bt.default.arrayOf(Bt.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Bt.default.number,width:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="x"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)}};Gp.resizableProps=_B,Yp.__esModule=!0,Yp.default=void 0;var Kp=TB(W),EB=Dg.exports,SB=N2,DB=Gp,kB=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function F6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(F6=function(l){return l?t:r})(e)}function TB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=F6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},M2.apply(this,arguments)}function AB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function N6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function P2(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?N6(Object(t),!0).forEach(function(i){OB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function OB(e,r,t){return r=RB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RB(e){var r=FB(e,"string");return typeof r=="symbol"?r:String(r)}function FB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function NB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,B2(e,r)}function B2(e,r){return B2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},B2(e,r)}var L2=function(e){NB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.handleRefs={},i.lastHandleRect=null,i.slack=null,i}var t=r.prototype;return t.componentWillUnmount=function(){this.resetData()},t.resetData=function(){this.lastHandleRect=this.slack=null},t.runConstraints=function(l,f){var c=this.props,h=c.minConstraints,m=c.maxConstraints,d=c.lockAspectRatio;if(!h&&!m&&!d)return[l,f];if(d){var g=this.props.width/this.props.height,C=l-this.props.width,b=f-this.props.height;Math.abs(C)>Math.abs(b*g)?f=l/g:l=f*g}var x=l,_=f,k=this.slack||[0,0],S=k[0],A=k[1];return l+=S,f+=A,h&&(l=Math.max(h[0],l),f=Math.max(h[1],f)),m&&(l=Math.min(m[0],l),f=Math.min(m[1],f)),this.slack=[S+(x-l),A+(_-f)],[l,f]},t.resizeHandler=function(l,f){var c=this;return function(h,m){var d=m.node,g=m.deltaX,C=m.deltaY;l==="onResizeStart"&&c.resetData();var b=(c.props.axis==="both"||c.props.axis==="x")&&f!=="n"&&f!=="s",x=(c.props.axis==="both"||c.props.axis==="y")&&f!=="e"&&f!=="w";if(!(!b&&!x)){var _=f[0],k=f[f.length-1],S=d.getBoundingClientRect();if(c.lastHandleRect!=null){if(k==="w"){var A=S.left-c.lastHandleRect.left;g+=A}if(_==="n"){var T=S.top-c.lastHandleRect.top;C+=T}}c.lastHandleRect=S,k==="w"&&(g=-g),_==="n"&&(C=-C);var D=c.props.width+(b?g/c.props.transformScale:0),F=c.props.height+(x?C/c.props.transformScale:0),N=c.runConstraints(D,F);D=N[0],F=N[1];var L=D!==c.props.width||F!==c.props.height,P=typeof c.props[l]=="function"?c.props[l]:null,U=l==="onResize"&&!L;P&&!U&&(h.persist==null||h.persist(),P(h,{node:d,size:{width:D,height:F},handle:f})),l==="onResizeStop"&&c.resetData()}}},t.renderResizeHandle=function(l,f){var c=this.props.handle;if(!c)return Kp.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:f});if(typeof c=="function")return c(l,f);var h=typeof c.type=="string",m=P2({ref:f},h?{}:{handleAxis:l});return Kp.cloneElement(c,m)},t.render=function(){var l=this,f=this.props,c=f.children,h=f.className,m=f.draggableOpts;f.width,f.height,f.handle,f.handleSize,f.lockAspectRatio,f.axis,f.minConstraints,f.maxConstraints,f.onResize,f.onResizeStop,f.onResizeStart;var d=f.resizeHandles;f.transformScale;var g=AB(f,kB);return(0,SB.cloneElement)(c,P2(P2({},g),{},{className:(h?h+" ":"")+"react-resizable",children:[].concat(c.props.children,d.map(function(C){var b,x=(b=l.handleRefs[C])!=null?b:l.handleRefs[C]=Kp.createRef();return Kp.createElement(EB.DraggableCore,M2({},m,{nodeRef:x,key:"resizableHandle-"+C,onStop:l.resizeHandler("onResizeStop",C),onStart:l.resizeHandler("onResizeStart",C),onDrag:l.resizeHandler("onResize",C)}),l.renderResizeHandle(C,x))}))}))},r}(Kp.Component);Yp.default=L2,L2.propTypes=DB.resizableProps,L2.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Rg={};Rg.__esModule=!0,Rg.default=void 0;var z2=zB(W),MB=M6(wt.exports),PB=M6(Yp),BB=Gp,LB=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function M6(e){return e&&e.__esModule?e:{default:e}}function P6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(P6=function(l){return l?t:r})(e)}function zB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=P6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},U2.apply(this,arguments)}function B6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function Fg(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?B6(Object(t),!0).forEach(function(i){UB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function UB(e,r,t){return r=jB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function jB(e){var r=IB(e,"string");return typeof r=="symbol"?r:String(r)}function IB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function HB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function VB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,j2(e,r)}function j2(e,r){return j2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},j2(e,r)}var L6=function(e){VB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.state={width:i.props.width,height:i.props.height,propsWidth:i.props.width,propsHeight:i.props.height},i.onResize=function(h,m){var d=m.size;i.props.onResize?(h.persist==null||h.persist(),i.setState(d,function(){return i.props.onResize&&i.props.onResize(h,m)})):i.setState(d)},i}r.getDerivedStateFromProps=function(l,f){return f.propsWidth!==l.width||f.propsHeight!==l.height?{width:l.width,height:l.height,propsWidth:l.width,propsHeight:l.height}:null};var t=r.prototype;return t.render=function(){var l=this.props,f=l.handle,c=l.handleSize;l.onResize;var h=l.onResizeStart,m=l.onResizeStop,d=l.draggableOpts,g=l.minConstraints,C=l.maxConstraints,b=l.lockAspectRatio,x=l.axis;l.width,l.height;var _=l.resizeHandles,k=l.style,S=l.transformScale,A=HB(l,LB);return z2.createElement(PB.default,{axis:x,draggableOpts:d,handle:f,handleSize:c,height:this.state.height,lockAspectRatio:b,maxConstraints:C,minConstraints:g,onResizeStart:h,onResize:this.onResize,onResizeStop:m,resizeHandles:_,transformScale:S,width:this.state.width},z2.createElement("div",U2({},A,{style:Fg(Fg({},k),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(z2.Component);Rg.default=L6,L6.propTypes=Fg(Fg({},BB.resizableProps),{},{children:MB.default.element}),y2.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var $B=y2.exports.Resizable=Yp.default;y2.exports.ResizableBox=Rg.default;const YB={search:"search-table-module_search_17add",table:"search-table-module_table_5f652"},qB=e=>{const{onResize:r,width:t,resizeable:i,...l}=e;return!t||!i?Q("th",{...l}):Q($B,{width:t||200,height:0,onResize:r,draggableOpts:{enableUserSelectHack:!1},children:Q("th",{...l})})};function GB(e){const{tableProps:r={},searchProps:t,langId:i}=e,{minColumnWidth:l=200,resizeable:f=!1,tableId:c,storageKey:h="szld_table_cell_width",emptyText:m,...d}=r,[g,C]=W.useState(r.columns||[]),b=S=>{var T,D;let A=S.width||l;if(S.dataIndex&&c){const F=Array.isArray(S.dataIndex)?S.dataIndex.join("-"):String(S.dataIndex),N=(D=(T=Ub(h))==null?void 0:T[c])==null?void 0:D[F];N&&(A=N)}return A};W.useEffect(()=>{const S=r.columns||[];if(S.length===0||!f){C(S);return}const A=S==null?void 0:S.filter(T=>!T.hidden).map(T=>T.dataIndex?{...T,width:b(T),onHeaderCell:D=>({width:D.width,resizeable:f,onResize:(F,{size:N})=>x(D,N)})}:T);A.length>0&&(A[A.length-1].minWidth=A[A.length-1].width,A[A.length-1].width=void 0),C(A)},[r.columns,c,l,f]);const x=(S,A)=>{C(T=>{const D=T==null?void 0:T.map(F=>F.dataIndex===S.dataIndex?{...F,width:A.width}:F);if(c){const F=Ub(h)||{};F[c]=F[c]||{},D==null||D.forEach(N=>{if(N.dataIndex){const L=Array.isArray(N.dataIndex)?N.dataIndex.join("-"):String(N.dataIndex);F[c][L]=N.width}}),localStorage.setItem(h,JSON.stringify(F))}return D})},_={header:{cell:qB},...d==null?void 0:d.components},k=W.useMemo(()=>{var A;const S=T=>{let D=T.width||T.minWidth;return(!D||typeof D=="string")&&(D=l),D};return(A=g==null?void 0:g.map(T=>S(T)))==null?void 0:A.reduce((T,D)=>T+D,0)},[g,l]);return Pe(rn,{children:[t&&Q(g2,{hiddenTitle:!0,...t,items:t.items}),Q(ve.Table,{scroll:{x:k},...d,components:_,columns:g,className:rs(YB.table,r==null?void 0:r.className),locale:{emptyText:Q(ve.Empty,{image:ve.Empty.PRESENTED_IMAGE_SIMPLE,description:m})},pagination:typeof(r==null?void 0:r.pagination)=="boolean"?r.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:S=>i==="10001"?`共 ${S} 条`:`Total ${S} items`,...r==null?void 0:r.pagination}})]})}const KB={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},z6=W.createContext(null),WB=({index:e,...r})=>{const[t]=ve.Form.useForm();return Q(ve.Form,{form:t,component:!1,children:Q(z6.Provider,{value:t,children:Q("tr",{...r})})})};function QB(e){const{title:r,editable:t,children:i,dataIndex:l,record:f,rules:c,onChange:h,type:m="input",valueProps:d,initialValue:g,...C}=e,b=W.useRef(null),x=W.useContext(z6),_=async()=>{try{const A=await x.validateFields();h({...f,...A})}catch{}},k=()=>Q(l6,{valueType:m,valueProps:{...d,onBlur:_,onPressEnter:_},inputRef:b});let S=i;return t&&(S=Q(ve.Form.Item,{style:{margin:0},initialValue:g||ns.get(f,l),name:l,rules:c,children:k()})),Q("td",{...C,children:S})}function ZB(e){const{columns:r,onChange:t,...i}=e,l={body:{row:WB,cell:QB}},f=r==null?void 0:r.map(c=>c.editable?{...c,onCell:h=>({...c,record:h,onChange:t})}:c);return Q(ve.Table,{...i,components:l,rowClassName:()=>KB.editableRow,columns:f})}const U6=e=>{const{auth:r=!0,...t}=e;return r?Q(ve.Button,{...t}):null},XB=e=>{const{PId:r,auths:t,...i}=e,l=W.useMemo(()=>t?!!(typeof r=="number"&&t.find(f=>f.PId===r)||Array.isArray(r)&&t.filter(f=>r.includes(f.PId)).length>0):!1,[r,t]);return Q(U6,{...i,auth:l})},Wp={wrapper:"LoopSlide-module_wrapper_dde90",container:"LoopSlide-module_container_be123",scrollContent:"LoopSlide-module_scrollContent_36ed7",content:"LoopSlide-module_content_f392a"},JB=({speed:e=10,delay:r=1,timingFunction:t="linear",className:i="",style:l,children:f,height:c="100vh",mouseControl:h=!1,classes:m})=>{const d=W.useRef(null),g=W.useRef(null),C=W.useRef(null),b=W.useRef(null),x=W.useRef(0),_=W.useRef(),k=W.useRef(0),S=W.useMemo(()=>{if(!g.current||!C.current)return;const P=g.current,U=C.current,$=parseFloat(U.scrollHeight.toString());return $*2-P.clientHeight<$},[]),A=()=>{if(!g.current||!C.current)return;const P=g.current,U=C.current,$=parseFloat(U.scrollHeight.toString());if($*2<=P.clientHeight){P.style.animation="none";return}const O=$/P.clientHeight;P.style.setProperty("--content-height",`${$}px`),P.style.animationDuration=`${e*O}s`,P.style.animationDelay=`${r}s`,P.style.animationTimingFunction=t};W.useEffect(()=>(A(),g.current&&(b.current=new ResizeObserver(A),b.current.observe(g.current)),()=>{b.current&&g.current&&b.current.unobserve(g.current)}),[e,r]);const T=()=>{h&&g.current&&(g.current.style.animationPlayState="paused")},D=()=>{h&&g.current&&(L(),g.current.style.animationPlayState="running")},F=()=>{if(!g.current||!h)return;const U=g.current.getAnimations()[0];if(U)if(Math.abs(x.current)>.1){const $=performance.now(),O=$-k.current;k.current=$;const z=.95;x.current*=Math.pow(z,O/16);const j=U.currentTime||0;U.currentTime=j+x.current,_.current=requestAnimationFrame(F)}else x.current=0,L()},N=P=>{if(!h||!g.current)return;P.preventDefault();const U=P.deltaY,$=.25;x.current+=U*$;const O=50;x.current=Math.max(-O,Math.min(O,x.current)),_.current||(k.current=performance.now(),_.current=requestAnimationFrame(F))},L=()=>{_.current&&(cancelAnimationFrame(_.current),_.current=void 0)};return W.useEffect(()=>()=>{L()},[]),W.useEffect(()=>{const P=d.current;if(P)return h&&P.addEventListener("wheel",N,{passive:!1}),()=>{P.removeEventListener("wheel",N)}},[h]),Q("div",{ref:d,className:`${Wp.wrapper} ${i}`,style:{height:c,...l},onMouseEnter:T,onMouseLeave:D,children:Pe("div",{ref:g,className:rs(Wp.container,m==null?void 0:m.container),children:[Q("div",{ref:C,className:rs(Wp.content,m==null?void 0:m.content),children:f}),Q("div",{className:rs(Wp.content,m==null?void 0:m.content),children:f}),S&&Q("div",{className:rs(Wp.content,m==null?void 0:m.content),children:f})]})})},Pr={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},j6=e=>{const{data:r,current:t,rowKey:i,renderContent:l}=e,[f,c]=W.useState(!1),h=W.useMemo(()=>e.currentIndex!==void 0?e.currentIndex:!t||r.length===0?0:r.findIndex(C=>C.PNId===t),[t,r]),m=W.useMemo(()=>h>1?f?0:h-1:0,[h,f]),d=()=>{c(!0)};return Pe("ul",{className:Pr.main,children:[h>1&&!f&&Pe("li",{className:rs(Pr.item,Pr.itemDone),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Q("div",{className:Pr.content,children:Pe("div",{className:Pr.collpase,children:[Pe("div",{children:["已收起",Q("span",{children:h-1}),"个节点"]}),Pe("a",{className:Pr.btn,onClick:d,children:["展开节点",Q(F7,{})]})]})})]}),r.slice(m).map((g,C)=>Pe("li",{className:rs(Pr.item,h===C+m?Pr.itemActive:h>C+m?Pr.itemDone:Pr.itemUnDo),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Pe("div",{className:Pr.content,children:[l?l(g,C,f?h:h-m):Pe(rn,{children:[Q("div",{className:Pr.title,children:g.PNName}),Pe("div",{className:Pr.dateWrapper,children:[g.PlanFinishDate&&Pe("span",{children:["预计完成时间: ",g.PlanFinishDate]}),g.UpdateTime&&Pe("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",g.UpdateTime]})]}),g.Remark&&Q("div",{className:Pr.remark,children:g.Remark})]}),f&&h-1===C&&Pe("a",{className:Pr.btn,onClick:()=>c(!1),children:["收起节点 ",Q(X7,{})]})]})]},typeof i=="string"?g[i]:i(g)))]})},eL=e=>{const{current:r,data:t,rowKey:i,renderContent:l,currentIndex:f,...c}=e;return(()=>{ve.Modal.info({icon:null,title:"流程节点",width:700,content:Q(j6,{rowKey:i,renderContent:l,current:r,currentIndex:f,data:t}),closable:!0,footer:null,maskClosable:!0,...c})})(),null},I6={customPagination:"custom-pagination-module_customPagination_bb6f7",jumpBtns:"custom-pagination-module_jumpBtns_a6c0b"};function tL(e){const{totalText:r="共",unitText:t="条",jumpText:i="跳至",pageText:l="页",paginationProps:f}=e,[c,h]=W.useState(""),m=(f==null?void 0:f.pageSize)||10,d=b=>{h(b.target.value)},g=b=>{var x;h(""),!Number.isNaN(Number(b.target.value))&&((x=f==null?void 0:f.onChange)==null||x.call(f,Number(b.target.value),m))},C=b=>{var x;if(b.key==="Enter"){if(h(""),Number.isNaN(Number(c)))return;(x=f==null?void 0:f.onChange)==null||x.call(f,Number(c),m)}};return Pe("div",{className:I6.customPagination,children:[Q(ve.Pagination,{showTotal:b=>`${r} ${b} ${t}`,showSizeChanger:{options:[{label:`10 ${t}/${l}`,value:10},{label:`20 ${t}/${l}`,value:20},{label:`50 ${t}/${l}`,value:50},{label:`100 ${t}/${l}`,value:100}]},...f}),Pe("div",{className:I6.jumpBtns,children:[i,Q(ve.Input,{style:{width:"50px",margin:"0 8px"},value:c,onChange:d,onBlur:b=>g(b),onKeyDown:b=>C(b)}),l]})]})}var H6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t=1e3,i=6e4,l=36e5,f="millisecond",c="second",h="minute",m="hour",d="day",g="week",C="month",b="quarter",x="year",_="date",k="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var q=["th","st","nd","rd"],X=Y%100;return"["+Y+(q[(X-20)%10]||q[X]||q[0])+"]"}},D=function(Y,q,X){var ne=String(Y);return!ne||ne.length>=q?Y:""+Array(q+1-ne.length).join(X)+Y},F={s:D,z:function(Y){var q=-Y.utcOffset(),X=Math.abs(q),ne=Math.floor(X/60),G=X%60;return(q<=0?"+":"-")+D(ne,2,"0")+":"+D(G,2,"0")},m:function Y(q,X){if(q.date()<X.date())return-Y(X,q);var ne=12*(X.year()-q.year())+(X.month()-q.month()),G=q.clone().add(ne,C),ee=X-G<0,Z=q.clone().add(ne+(ee?-1:1),C);return+(-(ne+(X-G)/(ee?G-Z:Z-G))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:C,y:x,w:g,d,D:_,h:m,m:h,s:c,ms:f,Q:b}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},N="en",L={};L[N]=T;var P="$isDayjsObject",U=function(Y){return Y instanceof j||!(!Y||!Y[P])},$=function Y(q,X,ne){var G;if(!q)return N;if(typeof q=="string"){var ee=q.toLowerCase();L[ee]&&(G=ee),X&&(L[ee]=X,G=ee);var Z=q.split("-");if(!G&&Z.length>1)return Y(Z[0])}else{var V=q.name;L[V]=q,G=V}return!ne&&G&&(N=G),G||!ne&&N},O=function(Y,q){if(U(Y))return Y.clone();var X=typeof q=="object"?q:{};return X.date=Y,X.args=arguments,new j(X)},z=F;z.l=$,z.i=U,z.w=function(Y,q){return O(Y,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var j=function(){function Y(X){this.$L=$(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[P]=!0}var q=Y.prototype;return q.parse=function(X){this.$d=function(ne){var G=ne.date,ee=ne.utc;if(G===null)return new Date(NaN);if(z.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var Z=G.match(S);if(Z){var V=Z[2]-1||0,te=(Z[7]||"0").substring(0,3);return ee?new Date(Date.UTC(Z[1],V,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,te)):new Date(Z[1],V,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,te)}}return new Date(G)}(X),this.init()},q.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},q.$utils=function(){return z},q.isValid=function(){return this.$d.toString()!==k},q.isSame=function(X,ne){var G=O(X);return this.startOf(ne)<=G&&G<=this.endOf(ne)},q.isAfter=function(X,ne){return O(X)<this.startOf(ne)},q.isBefore=function(X,ne){return this.endOf(ne)<O(X)},q.$g=function(X,ne,G){return z.u(X)?this[ne]:this.set(G,X)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(X,ne){var G=this,ee=!!z.u(ne)||ne,Z=z.p(X),V=function(Ae,De){var qe=z.w(G.$u?Date.UTC(G.$y,De,Ae):new Date(G.$y,De,Ae),G);return ee?qe:qe.endOf(d)},te=function(Ae,De){return z.w(G.toDate()[Ae].apply(G.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(De)),G)},oe=this.$W,re=this.$M,pe=this.$D,me="set"+(this.$u?"UTC":"");switch(Z){case x:return ee?V(1,0):V(31,11);case C:return ee?V(1,re):V(0,re+1);case g:var Ce=this.$locale().weekStart||0,se=(oe<Ce?oe+7:oe)-Ce;return V(ee?pe-se:pe+(6-se),re);case d:case _:return te(me+"Hours",0);case m:return te(me+"Minutes",1);case h:return te(me+"Seconds",2);case c:return te(me+"Milliseconds",3);default:return this.clone()}},q.endOf=function(X){return this.startOf(X,!1)},q.$set=function(X,ne){var G,ee=z.p(X),Z="set"+(this.$u?"UTC":""),V=(G={},G[d]=Z+"Date",G[_]=Z+"Date",G[C]=Z+"Month",G[x]=Z+"FullYear",G[m]=Z+"Hours",G[h]=Z+"Minutes",G[c]=Z+"Seconds",G[f]=Z+"Milliseconds",G)[ee],te=ee===d?this.$D+(ne-this.$W):ne;if(ee===C||ee===x){var oe=this.clone().set(_,1);oe.$d[V](te),oe.init(),this.$d=oe.set(_,Math.min(this.$D,oe.daysInMonth())).$d}else V&&this.$d[V](te);return this.init(),this},q.set=function(X,ne){return this.clone().$set(X,ne)},q.get=function(X){return this[z.p(X)]()},q.add=function(X,ne){var G,ee=this;X=Number(X);var Z=z.p(ne),V=function(re){var pe=O(ee);return z.w(pe.date(pe.date()+Math.round(re*X)),ee)};if(Z===C)return this.set(C,this.$M+X);if(Z===x)return this.set(x,this.$y+X);if(Z===d)return V(1);if(Z===g)return V(7);var te=(G={},G[h]=i,G[m]=l,G[c]=t,G)[Z]||1,oe=this.$d.getTime()+X*te;return z.w(oe,this)},q.subtract=function(X,ne){return this.add(-1*X,ne)},q.format=function(X){var ne=this,G=this.$locale();if(!this.isValid())return G.invalidDate||k;var ee=X||"YYYY-MM-DDTHH:mm:ssZ",Z=z.z(this),V=this.$H,te=this.$m,oe=this.$M,re=G.weekdays,pe=G.months,me=G.meridiem,Ce=function(De,qe,Se,We){return De&&(De[qe]||De(ne,ee))||Se[qe].slice(0,We)},se=function(De){return z.s(V%12||12,De,"0")},Ae=me||function(De,qe,Se){var We=De<12?"AM":"PM";return Se?We.toLowerCase():We};return ee.replace(A,function(De,qe){return qe||function(Se){switch(Se){case"YY":return String(ne.$y).slice(-2);case"YYYY":return z.s(ne.$y,4,"0");case"M":return oe+1;case"MM":return z.s(oe+1,2,"0");case"MMM":return Ce(G.monthsShort,oe,pe,3);case"MMMM":return Ce(pe,oe);case"D":return ne.$D;case"DD":return z.s(ne.$D,2,"0");case"d":return String(ne.$W);case"dd":return Ce(G.weekdaysMin,ne.$W,re,2);case"ddd":return Ce(G.weekdaysShort,ne.$W,re,3);case"dddd":return re[ne.$W];case"H":return String(V);case"HH":return z.s(V,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return Ae(V,te,!0);case"A":return Ae(V,te,!1);case"m":return String(te);case"mm":return z.s(te,2,"0");case"s":return String(ne.$s);case"ss":return z.s(ne.$s,2,"0");case"SSS":return z.s(ne.$ms,3,"0");case"Z":return Z}return null}(De)||Z.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(X,ne,G){var ee,Z=this,V=z.p(ne),te=O(X),oe=(te.utcOffset()-this.utcOffset())*i,re=this-te,pe=function(){return z.m(Z,te)};switch(V){case x:ee=pe()/12;break;case C:ee=pe();break;case b:ee=pe()/3;break;case g:ee=(re-oe)/6048e5;break;case d:ee=(re-oe)/864e5;break;case m:ee=re/l;break;case h:ee=re/i;break;case c:ee=re/t;break;default:ee=re}return G?ee:z.a(ee)},q.daysInMonth=function(){return this.endOf(C).$D},q.$locale=function(){return L[this.$L]},q.locale=function(X,ne){if(!X)return this.$L;var G=this.clone(),ee=$(X,ne,!0);return ee&&(G.$L=ee),G},q.clone=function(){return z.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},Y}(),H=j.prototype;return O.prototype=H,[["$ms",f],["$s",c],["$m",h],["$H",m],["$W",d],["$M",C],["$y",x],["$D",_]].forEach(function(Y){H[Y[1]]=function(q){return this.$g(q,Y[0],Y[1])}}),O.extend=function(Y,q){return Y.$i||(Y(q,j,O),Y.$i=!0),O},O.locale=$,O.isDayjs=U,O.unix=function(Y){return O(1e3*Y)},O.en=L[N],O.Ls=L,O.p={},O})})(H6);const bn=H6.exports,Qp=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},Dc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default);if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t==null?void 0:t.split("~"),t=t.map(h=>h)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(h=>bn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const h=(c=e.json)==null?void 0:c["cascader-delimiter"];h&&(t=t.split(h).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(m=>({...m,url:m.FilePath,name:m.FileName,uid:m.FileId}))}catch{t=[]}return e.attrtype===1&&(t=nL(e.children||[])),t||null},V6=e=>e&&e<bn().startOf("day"),$6=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},nL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)},I2=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c})=>{var g;let h=[];const m=async C=>{var x;let b=[];if(c.classify)try{const _=await r(C,{asctypeid:c.classify});(x=_==null?void 0:_.data)!=null&&x.list&&Array.isArray(_.data.list)&&(b=_.data.list.map(k=>({label:`${k.dicid||""}-${k.info||""}`,value:`${k.dicid||""}-${k.info||""}`})))}catch{ve.message.error("加载选项失败")}return b},d=async()=>{var C,b;try{const x=((C=c==null?void 0:c["key-field"])==null?void 0:C.list)||[],_=((b=c==null?void 0:c["key-field"])==null?void 0:b.delimiter)||"",k=c==null?void 0:c["field-names"];if(!x.length){ve.message.error("请配置key-field");return}const S=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(S!=null&&S.data){const A=S==null?void 0:S.data,T=(A==null?void 0:A.list)||[];let D=[];Array.isArray(A)&&(D=A),Array.isArray(T)&&(D=T),k?h=D:h=D.map(F=>({label:$6(F,_,x),value:$6(F,_,x)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(h=((g=c.data)==null?void 0:g.map(C=>({label:C,value:C})))||[],c.options&&Array.isArray(c.options)&&(h=c.options)):c.inputType==="dictionary"?h=await m(t):c.inputType==="system-dictionary"&&(h=await m(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await d(),h};function uu(e){try{return JSON.parse(e)}catch{return{}}}function Zp(e){if(!Y6(e))return e;const r=atob(e),t=new Uint8Array(r.length);for(let i=0;i<r.length;i++)t[i]=r.charCodeAt(i);return new TextDecoder().decode(t)}function Y6(e){return e?e.length%4!==0?!1:/^[A-Za-z0-9+/]+(?:=?=?)$/.test(e):!0}const rL=(e,r)=>{var b;let t=ns.cloneDeep(e);const{attr_list:i=[]}=t,{isMobile:l=!1,guid:f,isListToObj:c=!1,isAutoFill:h=!0,onlyNumber:m=""}=e;let d=[];h&&((b=t==null?void 0:t.attr_list)==null||b.forEach(x=>{var _,k,S,A,T,D;(_=x==null?void 0:x.json)!=null&&_["auto-generate"]&&((k=x==null?void 0:x.json)!=null&&k["auto-generate-type"])&&(((S=x==null?void 0:x.json)==null?void 0:S["auto-generate-type"])==="currenttime"&&(x.attrvalue=bn().format("YYYY-MM-DD HH:mm:ss")),((A=x==null?void 0:x.json)==null?void 0:A["auto-generate-type"])==="guid"&&(x.attrvalue=m||f||"")),(T=x==null?void 0:x.json)!=null&&T.default&&(x.attrvalue=(D=x==null?void 0:x.json)==null?void 0:D.default)}));const g=(x,_)=>{try{const k=new Map(x.map((S,A)=>[S.attrid,A]));for(const[S,A]of Object.entries(_)){const T=k.get(S);if(T===void 0)continue;let D=x[T];if(!A&&A!==0){D.attrvalue="";continue}D=C(D,A,l)}x.forEach(S=>{S.children&&Array.isArray(S.children)&&S.children.length>0&&!Array.isArray(S.children[0])&&_[S.attrid]&&g(S.children,_[S.attrid]),S.children&&Array.isArray(S.children)&&S.children.length>0&&Array.isArray(S.children[0])&&S.children.forEach((A,T)=>{var D,F;A&&Array.isArray(A)&&((D=_==null?void 0:_[S.attrid])!=null&&D[T])&&g(A,(F=_==null?void 0:_[S.attrid])==null?void 0:F[T])})})}catch{}},C=(x,_,k)=>{var T,D,F,N;const S=(T=x.json)==null?void 0:T.input,A=(D=x.json)==null?void 0:D.format;switch(S){case"image":case"file":case"video":case"audio":const L=typeof _=="string"?JSON.parse(_):_;if(!Array.isArray(L)){x.attrvalue=JSON.stringify([]);return}const P=L.filter(O=>O.FileId),U=L.filter(O=>{var z;return O.status==="done"&&((z=O.response)==null?void 0:z.data)}).map(O=>O.response.data),$=[...P,...U];d=[...d,...U],x.attrvalue=JSON.stringify($);break;case"cascader":if(Array.isArray(_)&&_.length>0){const O=((F=x.json)==null?void 0:F["cascader-delimiter"])||"/";x.attrvalue=_.join(O)}else x.attrvalue="";break;case"range-picker":k?Array.isArray(_)&&_.length>0?x.attrvalue=_==null?void 0:_.map(O=>bn(O).format(A||"YYYY-MM-DD")).join("~"):x.attrvalue="":Array.isArray(_)&&_.length>0?x.attrvalue=_.join("~"):x.attrvalue="";break;case"multiple-date-picker":k?Array.isArray(_)&&_.length>0?x.attrvalue=_==null?void 0:_.map(O=>bn(O).format(A||"YYYY-MM-DD")).join(","):x.attrvalue=_:Array.isArray(_)&&_.length>0?x.attrvalue=_.join(","):x.attrvalue=_;break;case"checkbox":case"mult-select":Array.isArray(_)&&_.length>0?x.attrvalue=_.join(","):x.attrvalue=_;break;case"date-picker":_?x.attrvalue=bn(_).format(A||"YYYY-MM-DD"):x.attrvalue="";break;case"time-picker":_?x.attrvalue=bn(_).format(A||"YYYY-MM-DD HH:mm:ss"):x.attrvalue="";break;default:(N=x==null?void 0:x.json)!=null&&N["properties-multiple"]||(x.attrvalue=_);break}return x};return t.attr_list&&Array.isArray(t.attr_list)&&g(i,r),{updatedData:c?W6(t.attr_list||[]):t,uploadedFiles:d}},H2=(e,r)=>e.map(t=>{var f,c,h;const i=q6(t,r),{children:l}=i;if(l&&!Array.isArray(l==null?void 0:l[0])&&(l!=null&&l.length)&&(i.children=[H2(l)]),i!=null&&i.children&&Array.isArray((f=i==null?void 0:i.children)==null?void 0:f[0])&&((c=i==null?void 0:i.children)!=null&&c.length)){const m=(h=i==null?void 0:i.children)==null?void 0:h.map(d=>d==null?void 0:d.map(g=>q6(g,r)));i.children=m}return i}),q6=(e,r)=>{var t,i;if(!e.json&&e.info)try{const l=e.info_base64===1?Zp(e.info):e.info,f=uu(l),c=ns.cloneDeep(r)||{},{langConfig:h=[],attrLangConfig:m=[]}=c||{};return c==null||delete c.langConfig,h!=null&&h.length&&((t=f==null?void 0:f.data)!=null&&t.length)&&(f==null?void 0:f.inputType)==="local"&&(f.options=(i=f.data)==null?void 0:i.map(d=>({label:Ji(h,d),value:d})),f==null||delete f.data),h!=null&&h.length&&(f!=null&&f["combination-name"])&&(f["combination-name"]=Ji(m,f["combination-name"])||Ji(h,f["combination-name"])),h!=null&&h.length&&(f!=null&&f["default-prompt"])&&(f["default-prompt"]=Ji(m,f["default-prompt"])),h!=null&&h.length&&(f!=null&&f.instruction)&&(f.instruction=Ji(m,f.instruction)),h!=null&&h.length&&(f!=null&&f["regexp-message"])&&(f["regexp-message"]=Ji(m,f["regexp-message"])),{...e,json:f,...c,info:JSON.stringify(f)}}catch{return{...e,json:{},...r}}return{...e,...r}},G6=(e,r)=>H2(e,r),K6=(e,r)=>{const t=H2(e,r),i=t.filter(c=>{var h;return(h=c.json)==null?void 0:h.combination}).reduce((c,h)=>{const m=h.json["combination-id"];return m&&(c[m]||(c[m]=[]),c[m].push(h)),c},{}),l=new Set;Object.values(i).forEach(c=>{(c==null?void 0:c.length)!==0&&c.slice(1).forEach(h=>l.add(h.attrid))});const f=c=>c.filter(h=>!l.has(h.attrid)).map(h=>{var g;const m=(g=h.json)==null?void 0:g["combination-id"];if(m&&i[m]){const C={...h,json:{...h.json,combinations:i[m]}},{children:b}=C;return b&&Array.isArray(b==null?void 0:b[0])&&(b!=null&&b.length)&&(C.children=b==null?void 0:b.map(x=>f(x))),C}const{children:d}=h;return d&&Array.isArray(d==null?void 0:d[0])&&(d!=null&&d.length)&&(h.children=d==null?void 0:d.map(C=>f(C))),h});return f(t)},aL=async({number:e,key:r,sourceNumber:t,guidInterfaceName:i,SelPCParamInterfaceName:l,servicerAttrListInterfaceName:f,accepterAttrListInterfaceName:c,defaultAttrListInterfaceName:h,commonRequest:m,guidParams:d,pcParam:g,attrReqKey:C="asid",attrListExtraParams:b={}})=>new Promise(async(x,_)=>{var N,L,P,U;let k="",S=[],A={},T={};const D=await m(i||"FWDXGLCreateGUID",d||{"source-number":t});(D==null?void 0:D.ReturnValue)===1&&((N=D==null?void 0:D.data)!=null&&N.GUID)?k=D.data.GUID:_("获取GUID失败");const F=await m(l||"FWDXGLSelPCParam",g||{"source-number":t});if((F==null?void 0:F.ReturnValue)===1){const $=(L=F.data[e])==null?void 0:L[r],O=(P=F.data[e])==null?void 0:P["properties-type"],z={server:f||"",accepter:c||""};T=F.data;const j=await m(z[O]||h,{[C]:$,"source-number":t,...b});if((j==null?void 0:j.ReturnValue)===1&&j.data){const H=((U=j.data)==null?void 0:U.attr_list)||[];S=K6(H),A={...j.data,attr_list:S},x({baseData:A,newGUID:k,attrListConfigs:S,selPCParam:T})}else _("请配置属性集")}else _("获取配置失败")}),iL=async(e,r,t)=>await t(e,r);function oL(e){return e.replace(/-([a-z])/g,function(r,t){return t.toUpperCase()})}const W6=e=>{var l;function r(f){const c={};return f.forEach(h=>{var d,g,C,b,x,_,k;const m=`${h.attrid}_${h.attrtype}`;if(h.attrtype===1&&h.children.length>0&&!Array.isArray(h.children))c[m]={asid:((g=(d=h.children)==null?void 0:d[0])==null?void 0:g.asid)||"",data_list:[r(h.children)]};else if(h.attrtype===1&&h.children.length>0&&Array.isArray(h.children)){let{children:S=[],attrvalue:A}=h||{};A&&(A!=null&&A.length)&&Array.isArray(A)?S=A.map(T=>{var N,L,P,U;const D=(N=Object.values(T))==null?void 0:N.findIndex($=>Array.isArray($)),F=((L=Object.keys(T))==null?void 0:L[D])||"";if(F){const $=((P=S==null?void 0:S[0])==null?void 0:P.find(z=>z.attrid===F))||{},{input:O}=($==null?void 0:$.json)||{};if(["file","image","video","audio"].includes(O)){const z=((U=Object.values(T))==null?void 0:U[D])||[],j=z.filter(q=>q.FileId),H=z.filter(q=>{var X;return q.status==="done"&&((X=q.response)==null?void 0:X.data)}).map(q=>q.response.data),Y=[...j,...H];T[F]=Y}}return X6((S==null?void 0:S[0])||[],T)}):(h.childAsid=((b=(C=S==null?void 0:S[0])==null?void 0:C[0])==null?void 0:b.asid)||"",S=[[]]),S!=null&&S.length&&Array.isArray(S==null?void 0:S[0])&&(c[m]={asid:((_=(x=S==null?void 0:S[0])==null?void 0:x[0])==null?void 0:_.asid)||h.childAsid||"",data_list:(S==null?void 0:S.length)&&((k=S==null?void 0:S[0])==null?void 0:k.length)&&S.map(T=>r(T))||[]})}else c[m]=h.attrvalue}),c}const t=((l=e[0])==null?void 0:l.asid)||"",i=[r(e)];return{data:{asid:t,data_list:i}}},Q6=async({attrList:e,params:r,extra:t={},commonRequest:i})=>{var h;const l=await i("YLFWLRDataDetails",r),f=((h=l==null?void 0:l.data)==null?void 0:h.list)||[];return f.length?await Promise.all(f.map(async m=>await Promise.all((e==null?void 0:e.map(async g=>{const C={...g,...t};if(C.attrvalue=(m==null?void 0:m[g.attrid])||"",g.attrtype===1&&Array.isArray(g.children)&&g.children.length>0){const b=(m==null?void 0:m[g.attrid])||{};C.children=await Q6({attrList:g.children,params:b,extra:t,commonRequest:i})}return C}))||[])))||[]:e.map(m=>({...m,...t,attrvalue:"",children:[]}))},kc=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},Ji=(e,r)=>{const t=e.find(i=>(i==null?void 0:i.dataid)===r);return(t==null?void 0:t.content)??r},Z6=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:h=[]})=>{var C;let m=[];const d=async b=>{var _;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(_=k==null?void 0:k.data)!=null&&_.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(S=>({label:`${S.dicid||""}-${S.info||""}`,value:`${S.dicid||""}-${S.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},g=async()=>{var b,x;try{const _=((b=c==null?void 0:c["key-field"])==null?void 0:b.list)||[],k=((x=c==null?void 0:c["key-field"])==null?void 0:x.delimiter)||"",S=c==null?void 0:c["field-names"];if(!_.length){ve.message.error("请配置key-field");return}const A=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(A!=null&&A.data){const T=A==null?void 0:A.data,D=(T==null?void 0:T.list)||[];let F=[];Array.isArray(T)&&(F=T),Array.isArray(D)&&(F=D),S?m=F:m=F.map(N=>({label:kc(N,k,_),value:kc(N,k,_)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(m=((C=c.data)==null?void 0:C.map(b=>({label:Ji(h,b),value:b})))||[],c.options&&Array.isArray(c.options)&&(m=c.options)):c.inputType==="dictionary"?m=await d(t):c.inputType==="system-dictionary"&&(m=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await g(),m},X6=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),lL=Object.freeze(Object.defineProperty({__proto__:null,getJson:uu,base64ToString:Zp,isBase64:Y6,handleSubmitForm:rL,handleBaseAttrList:G6,handleAttrList:K6,handleFormConfig:aL,handleOperationFile:iL,handleKebabToCamel:oL,handleAttrListToObj:W6,handleAttrListToObjDetail:Q6,handleUrlOptions:kc,getTitle:Ji,handleSelectOptions:Z6,handleObjDetailToSignleAttrList:X6},Symbol.toStringTag,{value:"Module"})),J6=async(e,r,t)=>{var i;try{const l=await r(t||"SERATTALLList",e);return(l==null?void 0:l.ReturnValue)===1?((i=l==null?void 0:l.data)==null?void 0:i.attr_list)||[]:[]}catch{}},sL=async(e,r,t)=>{var i;try{const l=await r(t||"YLFWLRDataDetails",e);return(l==null?void 0:l.ReturnValue)===1?((i=l==null?void 0:l.data)==null?void 0:i.list)||[]:[]}catch{}},uL=async(e,r,t)=>{var l;const i={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"};try{const f=await r(t||i,e);return(f==null?void 0:f.ReturnValue)===1?((l=f==null?void 0:f.data)==null?void 0:l.list)||[]:[]}catch{}},cL=async({params:e,commonRequestWidthParams:r,requestParams:t})=>{const i={PageName:"PCInstanceData",Controlname:"DataProcess"};try{return await r(t||i||{},e)}catch{}},fL=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),eD=(e,r,t)=>({style:{backgroundColor:r!==void 0&&r%2===1?(t==null?void 0:t[0])||"var(--bg-color-2)":(t==null?void 0:t[1])||"var(--bg-color-3)"}}),dL=Object.freeze(Object.defineProperty({__proto__:null,handleGetAttrList:J6,handleGetAttrDetail:sL,handleGetList:uL,handleCallSupportCode:cL,handleObjDetailToSignleAttrList:fL,handleSetTableRowColor:eD},Symbol.toStringTag,{value:"Module"})),pL=(e,r)=>{const t=new URL(e),i=new URL(r);return t.protocol===i.protocol&&t.host===i.host&&t.port===i.port},hL=e=>{const r=String(e).split("/");return r[r.length-1]},vL=e=>{var t;return(t=e.headers.get("content-disposition"))==null?void 0:t.split(";")[1].split("=")[1]},tD=(e,r)=>{const t=r||hL(e);if(pL(e,window.location.href)){V2(e,t);return}let i=r;fetch(e,{method:"get"}).then(l=>(i||(i=vL(l)),l.blob())).then(l=>{nD(l,i||t)}).catch(()=>{V2(e,"")})},mL=e=>{for(var r=e.split(","),t=r[0].match(/:(.*?);/)[1],i=window.atob(r[1]),l=i.length,f=new Uint8Array(l);l--;)f[l]=i.charCodeAt(l);return new Blob([f],{type:t})},nD=(e,r)=>{let t="";e instanceof Blob?t=window.URL.createObjectURL(e):t=window.URL.createObjectURL(mL(e));const i=window.navigator;if(i.msSaveOrOpenBlob){i.msSaveOrOpenBlob(e,r);return}V2(t,r),window.URL.revokeObjectURL(t)},V2=(e,r)=>{let t=document.createElement("a");t.style.display="none",t.href=e,t.target="_blank",t.download=r,document.body.appendChild(t),t.click(),document.body.removeChild(t)},gL=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:tD,downloadBlob:nD},Symbol.toStringTag,{value:"Module"}));function rD(){const{message:e,modal:r}=ve.App.useApp(),t={},i=async({selListData:C,handleSearch:b,handleReset:x,detail:_,styles:k,attributeSetId:S,commonRequest:A,commonRequestWidthParams:T,getTitle:D,searchText:F="搜索",resetText:N="重置",langConfig:L=[]})=>{var P;try{C!=null&&C.length&&_&&C.forEach(Y=>{var X;const q=((X=Y["default-render-data"])==null?void 0:X.key)||"";q&&(Y.attrvalue=(_==null?void 0:_[q])||"")});const U=C.filter(Y=>{var q;return((q=Y.renderdata)==null?void 0:q.input)!=="tab"&&!(Y!=null&&Y["default-render-data"])}),$=U.filter(Y=>{var q;return["select","checkbox","radio","mult-select","cascader"].includes((q=Y.renderdata)==null?void 0:q.input)});let O=[];if($!=null&&$.length)if((P=t[S])!=null&&P.length)O=t[S];else{const Y=await J6({asid:S},A);O=G6(Y)||[],t[S]=O||[]}const z=await Promise.all(U.map(async Y=>{var te;const q=Y.renderdata||{},{input:X,width:ne}=q||{},G=(q==null?void 0:q["label-col"])||6,ee=()=>{const oe=q["default-prompt"];if(D){if(typeof oe=="string"){const re=D(S||"",oe),pe=g(re);return X==="range-picker"&&oe&&pe?JSON.parse(re):re}}else return oe||""};let Z="input";switch(X){case"range-picker":Z="rangePicker";break;case"number":Z="inputNumber";break;case"select":case"checkbox":case"radio":case"textarea":Z=X;break;case"mult-select":Z="select";break;case"time-picker":Z="timePicker";break;case"date-picker":Z="datePicker";break;case"cascader":Z="cascader";break;default:Z="input";break}const V={dataIndex:Y.attrid,title:Y.attrname||"",valueType:Z,valueProps:{placeholder:ee()},colProps:{},formItemProps:{style:{marginBottom:10,width:typeof ne=="string"?`${ne}px`:ne||240},labelCol:{span:G}}};if(["select","checkbox","radio","mult-select","cascader"].includes(X)){const oe=Y.attrid||"",re=O.find(Ce=>Ce.attrid===oe);let pe=(re==null?void 0:re.json)||{};!(pe!=null&&pe.inputType)&&(q!=null&&q["input-type"])&&(pe={...pe,inputType:q==null?void 0:q["input-type"],"action-url":q==null?void 0:q["action-url"],"field-names":q==null?void 0:q["field-names"],"key-field":{...q==null?void 0:q["key-field"]}});let me=await Z6({item:pe||{},commonRequest:A,commonRequestWidthParams:T,langConfig:L||[]});if(!(me!=null&&me.length)){const{data:Ce=[]}=q||{};Ce!=null&&Ce.length&&(me=Ce==null?void 0:Ce.map(se=>({label:se||"",value:se||""}))),(te=q==null?void 0:q.options)!=null&&te.length&&(me=(q==null?void 0:q.options)||[])}if(X==="cascader"){const Ce=d(me,q==null?void 0:q["field-names"]);V.valueProps.options=Ce||[]}else V.valueProps.options=me||[]}return V}));let j={color:"#ffffff",borderRadius:4,fontSize:14,height:32},H={color:"#333333",borderRadius:4,fontSize:14,height:32,borderColor:"#D9D9D9"};return z.push({dataIndex:"btns",valueType:"btns",valueProps:[{btnType:"submit",title:F,type:"primary",shape:"default",style:{...j,...k==null?void 0:k.searchStyle},onClick:Y=>b(Y,C)},{btnType:"reset",title:N,style:{...H,...k==null?void 0:k.resetStyle},onClick:()=>x(C)}],colProps:{flex:"none"},formItemProps:{style:{marginBottom:10,minWidth:127}}}),{formItems:z,selList:C}}catch{return{formItems:[],selList:[]}}},l=({universalHeader:C,extraBtn:b,operationColumnConfig:x,attributeSetId:_,getTitle:k,downloadText:S="下载",isDefaultWidth:A=!0,otherLangPageId:T,objDefaultLangPageId:D="5000000"})=>{if(!(C!=null&&C.length))return e.error("请配置 universalHeader表头数据");const F=f(C),N=F==null?void 0:F.map(L=>{const P={title:_?(k==null?void 0:k(_,L==null?void 0:L["header-attribute-id"]))||"":(L==null?void 0:L["header-name"])||"",dataIndex:(L==null?void 0:L["header-attribute-id"])||"",width:A?(L==null?void 0:L["header-width"])||180:void 0,render:(O,z)=>{var j,H;if(O&&O&&typeof O=="string"&&(O!=null&&O.includes("FileName"))&&(O!=null&&O.includes("FilePath"))){try{const Y=JSON.parse(O);return Y!=null&&Y.length?Q(ve.Flex,{vertical:!0,children:Y==null?void 0:Y.map(q=>{const{FileName:X,FilePath:ne}=q||{};return Pe(ve.Space,{children:[Q("span",{children:X}),Q(ve.Button,{type:"link",size:"small",onClick:()=>tD(ne),children:S})]})})}):"-"}catch{}return Q(ve.Space,{})}if(L!=null&&L["show-lang-data-id"]&&T){if(O&&O&&typeof O=="object"&&((j=Object.keys(O))!=null&&j.includes("delimiter"))){const{list:Y,delimiter:q=","}=O||{},X=Y==null?void 0:Y.map(ne=>{const G=(ne==null?void 0:ne.split("|"))||[],ee=(G==null?void 0:G.length)>1?G[0]:D,Z=(G==null?void 0:G.length)>1?G[1]:G[0];return k==null?void 0:k(ee,Z)});return Q("span",{dangerouslySetInnerHTML:{__html:((H=X==null?void 0:X.join(q))==null?void 0:H.replace(/br/g,"<br>"))||"-"}})}return Q(ve.Tooltip,{title:O,children:Q("span",{style:{cursor:"pointer"},children:k==null?void 0:k(T,O??"-")})})}return O??"-"}},U=L==null?void 0:L["header-mul-attribute-id"],$=L==null?void 0:L["show-btn"];return U&&U.list&&Array.isArray(U.list)?P.render=(O,z)=>{const{list:j,delimiter:H=","}=U,Y=j.map(X=>X?z[X]??"":"").filter(X=>X!==""),q=(Y==null?void 0:Y.join(H))??"-";return $&&b?Pe(rn,{children:[q??"-",b==null?void 0:b(z,q,L)]}):q||"-"}:$&&b&&(P.render=(O,z)=>{const j=z[P.dataIndex]||"";return Pe(rn,{children:[j||"-",b(z,j,L)]})}),P});return x&&(N!=null&&N.length)&&N.push(x),N},f=C=>C.slice().sort((b,x)=>{const _=typeof b["header-number"]=="number"?b["header-number"]:1/0,k=typeof x["header-number"]=="number"?x["header-number"]:1/0;return _-k}),c=({commonRequest:C,refresh:b,interfaceType:x="YLFWLRInstanceDelete",record:_,configData:k,title:S,okText:A,cancelText:T,getTitle:D,pageID:F})=>{const N=(k==null?void 0:k["must-attrid"])||[],L={};for(const[U,$]of Object.entries(_))N.includes(U)&&(L[U]=$);const P={instanceid:_==null?void 0:_.instanceid,asid:_==null?void 0:_.asid,...L};r.confirm({title:S||"",icon:null,okType:"danger",okText:A||"",cancelText:T||"",onOk:()=>new Promise(async(U,$)=>{const O=await C(x,P),z=D&&D(F||"",O==null?void 0:O["msg-code"],O==null?void 0:O.msg)||"删除失败";(O==null?void 0:O.ReturnValue)===1?(e.success(z),b(),U(O)):(e.error(z||"删除失败"),$(O))})})},h=({values:C,currentSelList:b,currentActive:x,onSearch:_,tabItems:k})=>{const A={"sel-list":b.map(T=>{var P,U;const{input:D,inputType:F}=(T==null?void 0:T.renderdata)||{};if(D==="tab"&&(F!=null&&F.startsWith("local-"))&&(k!=null&&k.length)&&(x||x===0)){const $=b.find(Y=>D==="tab"&&(F==null?void 0:F.startsWith("local-"))),O=k[x],z=((P=$==null?void 0:$.renderdata["key-field"])==null?void 0:P.list)||[],j=((U=$==null?void 0:$.renderdata["key-field"])==null?void 0:U.delimiter)||"-",H=z==null?void 0:z.map(Y=>O[Y]||"").join(j);return{...T,attrvalue:H}}const N=C[T.attrid];let L;return N!=null&&(D==="cascader"&&Array.isArray(N)?L=N.join("|"):Array.isArray(N)&&["range-picker"].includes(D)?L=N.map($=>{var O;return((O=$==null?void 0:$.format)==null?void 0:O.call($,"YYYY-MM-DD"))||$}).join("~"):Array.isArray(N)?L=N:L=String(N)),{...T,attrvalue:L}}),...C};_(A)},m=({currentSelList:C,tabItems:b,currentActive:x,onSearch:_,setSelList:k})=>{const S=C.map(A=>{var T,D,F,N,L;if(((T=A.renderdata)==null?void 0:T.input)==="tab"&&(b!=null&&b.length)&&(x||x===0)){if((F=(D=A.renderdata)==null?void 0:D.inputType)!=null&&F.startsWith("local-")){const P=C.find(j=>{var H,Y,q;return((H=j.renderdata)==null?void 0:H.input)==="tab"&&((q=(Y=j.renderdata)==null?void 0:Y.inputType)==null?void 0:q.startsWith("local-"))}),U=b[x],$=((N=P==null?void 0:P.renderdata["key-field"])==null?void 0:N.list)||[],O=((L=P==null?void 0:P.renderdata["key-field"])==null?void 0:L.delimiter)||"-",z=$==null?void 0:$.map(j=>(U==null?void 0:U[j])||"").join(O);return{...A,attrvalue:z}}return A}return{...A,attrvalue:""}});k(S),_({"sel-list":S})},d=(C,b)=>{const{label:x,value:_,children:k}=b,S=A=>A.map(T=>{const D={label:T[x],value:T[_],children:[]};return Array.isArray(T[k])&&T[k].length>0&&(D.children=S(T[k])),D});return S(C)},g=C=>{if(typeof C!="string")return!1;try{const b=JSON.parse(C);return Array.isArray(b)}catch{return!1}};return{handleUniversalHeaderToColumns:l,handleSelListToFormItems:i,handleUniversalDelete:c,handleUniversalSearch:h,handleUniversalReset:m,isArrayString:g}}function yL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,commonRequest:f,CustomModalComponent:c,attrid:h,form:m,langId:d,getTitle:g}=e,C=ve.Form.useWatch(h,m),{message:b}=ve.App.useApp(),x=r.input,[_,k]=W.useState(e.value),[S,A]=W.useState(!1),[T,D]=W.useState([]),[F,N]=W.useState([]),[L,P]=W.useState(!1),[U,$]=W.useState({PageNum:1,PageSize:6}),[O,z]=W.useState([]),[j,H]=W.useState(0),[Y,q]=W.useState(te()),{handleUniversalHeaderToColumns:X}=rD();W.useEffect(()=>{S&&G()},[S,U]);const ne=(re,pe)=>{D(re),N(pe)},G=async()=>{var re,pe,me,Ce,se;if(r.inputType==="url"&&(r!=null&&r["action-url"])){P(!0);try{const Ae=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...U,...(r==null?void 0:r["action-url-extra-params"])||{}});if((Ae==null?void 0:Ae.ReturnValue)===0){b.error(Ae.msg),P(!1);return}const De=Ae==null?void 0:Ae.data,qe=(re=De==null?void 0:De.list)==null?void 0:re.map((We,Me)=>{const bt=(U.PageNum-1)*U.PageSize+Me;return{...We,_rowKey:bt}}),Se=(qe==null?void 0:qe.filter(We=>T.includes(We._rowKey)))||[];N(Se),z([...qe||[]]),H((De==null?void 0:De.number)||0),P(!1)}catch{P(!1)}return}if(r.inputType==="instance-url"&&(r!=null&&r["instance-source-number"])){const Ae={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"},De={"source-number":r==null?void 0:r["instance-source-number"],...U};try{const qe=await l(Ae,De);if((qe==null?void 0:qe.ReturnValue)===1){const We=(me=((pe=qe==null?void 0:qe.data)==null?void 0:pe.list)||[])==null?void 0:me.map((Me,bt)=>{const ft=(U.PageNum-1)*U.PageSize+bt;return{...Me,_rowKey:ft}});H(((Ce=qe==null?void 0:qe.data)==null?void 0:Ce.number)||0),z([...We])}const Se=await f("YLKHDSelPCParam",{"source-number":r==null?void 0:r["instance-source-number"]});if((Se==null?void 0:Se.ReturnValue)===1){const We=(se=Se==null?void 0:Se.data)==null?void 0:se[r==null?void 0:r["instance-source-number"]],Me=(We==null?void 0:We["universal-header"])||[],bt=(We==null?void 0:We["attribute-set-id"])||"",ft=X({universalHeader:Me,attributeSetId:bt,getTitle:g})||[];q([...ft])}}catch{}return}b.error(d==="10001"?"参数配置错误":"Parameter configuration error")},ee=()=>{var re;if(!t){if(_){const pe=r==null?void 0:r["key-field"],me=pe==null?void 0:pe[h],{delimiter:Ce="-",list:se=[]}=me||{};if(!pe){b.error(d==="10001"?"请配置key-field":"Please configure key-field");return}switch(x){case"mul-field-modal-select":const Ae=(re=_==null?void 0:_.split(Ce))==null?void 0:re[0],De=O==null?void 0:O.findIndex(We=>Object.values(We).includes(Ae));D([De]);break;case"modal-mult-select":const qe=_==null?void 0:_.split(","),Se=qe==null?void 0:qe.map(We=>{var bt;const Me=(bt=We.split(Ce))==null?void 0:bt[0];return O==null?void 0:O.findIndex(ft=>Me.includes((ft==null?void 0:ft.typeid)||(ft==null?void 0:ft.instanceid)))});D(Se);break}}A(!0)}},Z=async()=>{try{const re=await xL(F,r,d);k((re==null?void 0:re[h])||""),e.onSure(re),A(!1)}catch(re){b.error(re.msg||"参数错误")}},V=()=>{$({...U,PageNum:1}),A(!1)};function te(){const re=r["modal-field-list"];if(!re)return[];let pe=[];for(let me in re){let Ce=re[me];const se={dataIndex:me,title:Ce};pe=[...pe,se]}return pe}const oe=re=>{$({...U,PageNum:re})};return Pe(rn,{children:[Q(ve.Select,{placeholder:Qp({json:r},d),onClick:ee,open:!1,value:C,disabled:t,style:i}),c&&Q(c,{title:r["modal-caption"]||"",open:S,onOk:Z,onCancel:V,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:Y,loading:L,dataSource:O,rowKey:re=>re._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:T,onChange:ne},pagination:{total:j,current:U.PageNum,pageSize:U.PageSize,onChange:oe}})})||Q(ve.Modal,{title:r["modal-caption"],open:S,onOk:Z,onCancel:V,width:r["modal-width"]??600,okButtonProps:{disabled:T.length===0},children:Q(ve.Table,{columns:Y,loading:L,dataSource:O,rowKey:re=>re._rowKey,rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:T,onChange:ne},pagination:{total:j,current:U.PageNum,pageSize:U.PageSize,onChange:oe}})})]})}function xL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}let c={};e.forEach(h=>{for(let[m,d]of Object.entries(f)){const g=(d==null?void 0:d.list)??[],C=(d==null?void 0:d.delimiter)??"-",b=g.map(x=>h==null?void 0:h[x]);c[m]=b.join(C)}}),i(c)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}var aD={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t="day";return function(i,l,f){var c=function(d){return d.add(4-d.isoWeekday(),t)},h=l.prototype;h.isoWeekYear=function(){return c(this).year()},h.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),t);var g,C,b,x,_=c(this),k=(g=this.isoWeekYear(),C=this.$u,b=(C?f.utc:f)().year(g).startOf("year"),x=4-b.isoWeekday(),b.isoWeekday()>4&&(x+=7),b.add(x,t));return _.diff(k,"week")+1},h.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var m=h.startOf;h.startOf=function(d,g){var C=this.$utils(),b=!!C.u(g)||g;return C.p(d)==="isoweek"?b?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):m.bind(this)(d,g)}}})})(aD);const iD=aD.exports;function bL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:h}=ve.App.useApp(),m=r.input,[d,g]=W.useState(e.value),[C,b]=W.useState(!1),[x,_]=W.useState([]),[k,S]=W.useState([]),[A,T]=W.useState(!1),[D,F]=W.useState({PageNum:1,PageSize:6}),[N,L]=W.useState([]),[P,U]=W.useState(0),$=q();W.useEffect(()=>{C&&z()},[C,D]);const O=(ne,G)=>{_(ne),S(G)},z=async()=>{var ne;if(r.inputType==="url"&&(r!=null&&r["action-url"])){T(!0);try{const G=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...D});if((G==null?void 0:G.ReturnValue)===0){h.error(G.msg),T(!1);return}const ee=G==null?void 0:G.data,Z=(ne=ee==null?void 0:ee.list)==null?void 0:ne.map((te,oe)=>{const re=(D.PageNum-1)*D.PageSize+oe;return{...te,_rowKey:re}}),V=(Z==null?void 0:Z.filter(te=>x.includes(te._rowKey)))||[];S(V),L([...Z||[]]),U((ee==null?void 0:ee.number)||0),T(!1)}catch(G){T(!1),h.error(G.msg||"参数错误")}return}h.error("请配置action-url")},j=()=>{var ne,G;if(!t){if(d){const ee=((ne=r==null?void 0:r["key-field"])==null?void 0:ne.list)??[],Z=((G=r==null?void 0:r["key-field"])==null?void 0:G.delimiter)??"-";if(!ee.length){h.error("请配置key-field");return}switch(m){case"modal-select":const V=d==null?void 0:d.split("-"),te=N==null?void 0:N.findIndex(pe=>V.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));_([te]);break;case"modal-mult-select":const oe=d==null?void 0:d.split(","),re=oe==null?void 0:oe.map(pe=>{var Ce;const me=(Ce=pe.split(Z))==null?void 0:Ce[0];return N==null?void 0:N.findIndex(se=>me.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)))});_(re);break}}b(!0)}},H=async()=>{try{const ne=await CL(k,r,c);g(ne),e.onSure(ne),b(!1)}catch(ne){h.error(ne.msg||"参数错误")}},Y=()=>{F({...D,PageNum:1}),b(!1)};function q(){const ne=r["modal-field-list"];let G=[];for(let ee in ne){let Z=ne[ee];const V={dataIndex:ee,title:Z};G=[...G,V]}return G}const X=ne=>{F({...D,PageNum:ne})};return Pe(rn,{children:[Q(ve.Select,{placeholder:Qp({json:r},c),onClick:j,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:Y,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:$,loading:A,dataSource:N,rowKey:ne=>ne._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:m==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:O},pagination:{total:P,current:D.PageNum,pageSize:D.PageSize,onChange:X}})})||Q(ve.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:Y,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(ve.Table,{columns:$,loading:A,dataSource:N,rowKey:ne=>ne._rowKey,rowSelection:{type:m==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:O},pagination:{total:P,current:D.PageNum,pageSize:D.PageSize,onChange:X}})})]})}function CL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let h=e.map(m=>c.map(g=>m[g]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(h)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}const wL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:h,handleUrlOptions:m,value:d,interfaceTypeDict:g,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x}=e,[_,k]=W.useState([]),[S,A]=W.useState(d||[]);W.useEffect(()=>{T()},[r.inputType,r.classify,r.data,r.options]);const T=async()=>{const D=await I2({commonRequestWidthParams:c,commonRequest:h,interfaceTypeDict:g,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,item:r});k(D)};return Q(ve.Checkbox.Group,{...l,options:_,value:S,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:D=>{A(D),t==null||t(D)},disabled:i})},_L=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:h,interfaceTypeSysDict:m,actionUrlKey:d,actionUrlExtraParams:g,langId:C="10001"})=>{const[b,x]=W.useState([]),[_,k]=W.useState(!1),{message:S}=ve.App.useApp();W.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let P=[];e.data&&Array.isArray(e.data)?P=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(P=e.options),x(P)}else if(e.inputType==="dictionary")await T(m);else if(e.inputType==="system-dictionary")T(m);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const P=await F();P&&Array.isArray(P)&&x(P)}else{let P=[];e.data&&Array.isArray(e.data)?P=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(P=e.options),x(P)}},T=async P=>{var U;if(e.classify){k(!0);try{const $=await c(P,{asctypeid:e.classify});if((U=$==null?void 0:$.data)!=null&&U.list&&Array.isArray($.data.list)){const O=$.data.list.map(z=>({label:`${z.dicid||""}-${z.info||""}`,value:`${z.dicid||""}-${z.info||""}`}));x(O)}}catch{S.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},D=(P,U)=>{i&&i(P)},F=async P=>new Promise(async(U,$)=>{var Y,q,X;const O=((Y=e==null?void 0:e["key-field"])==null?void 0:Y.list)||[],z=(e==null?void 0:e["search-field"])||[],j=((q=e==null?void 0:e["key-field"])==null?void 0:q.delimiter)||"-";if(!O.length){S.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...g};P&&(z.forEach(ne=>{H[ne]=P[ne]||""}),H.level=Number(P.level||0)+1||""),k(!0);try{const ne=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((X=ne==null?void 0:ne.data)!=null&&X.list&&Array.isArray(ne.data.list)){const G=ne.data.list.map(ee=>({...ee,label:`${ee[O[0]]||""}${j}${ee[O[1]]||""}`,value:`${ee[O[0]]||""}${j}${ee[O[1]]||""}`,children:[],isLeaf:(ee==null?void 0:ee.subcount)===0}));U(G)}$([])}catch{S.error(C==="10001"?"加载选项失败":"Failed to load options"),$([])}finally{$([]),k(!1)}}),N=async P=>{const U=P[P.length-1],$=await F(U)||[];return U.children=$,x([...b]),$},L=(P,U)=>U.some($=>$.label.toLowerCase().includes(P.toLowerCase()));return Q(ve.Cascader,{showSearch:{filter:L},loading:_,placeholder:"请选择",loadData:N,disabled:r,onChange:D,style:{...l},options:b,value:t,onOpenChange:async P=>{var U;if(P&&(t!=null&&t.length)){const $=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],O=(e==null?void 0:e["search-field"])||[];if(!$.length||!O.length){S.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const z=$.findIndex(Y=>Y===O[0]);if(z===-1){S.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const j=t.map(Y=>Y.split("-")[z]||"").filter(Boolean);let H=b;for(const[Y,q]of j.entries()){if(Y===j.length-1)break;const X=H.filter(ee=>ee[O[0]]===q);if(X.length===0)break;const ne=X[0];if(ne.children&&ne.children.length>0){H=ne.children;continue}H=await N(X)}}}})},EL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,langId:c})=>{const[h,m]=W.useState([]),[d,g]=W.useState(!1);W.useEffect(()=>{(async()=>{var D;if(e.inputType==="url"&&e["action-url"]){g(!0);try{const F=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(D=F==null?void 0:F.data)!=null&&D.list&&Array.isArray(F.data.list)?m(F.data.list):F!=null&&F.data&&Array.isArray(F.data)?m(F.data):Array.isArray(F==null?void 0:F.list)?m(F.list):(F==null?void 0:F.ReturnValue)===1&&(F!=null&&F.data)&&(Array.isArray(F.data)?m(F.data):m([F.data]))}catch{}finally{g(!1)}}else e.data&&Array.isArray(e.data)&&m(e.data)})()},[e.inputType,e["action-url"],e.data]);const C=T=>JSON.stringify(T),b=T=>{const D=C(T);return t===D},x=T=>{if(r)return;const D=C(T);i&&i(D)},_=e["card-image-width"]||200,k=e["card-image-height"]||100,S=e["card-image-field"],A=e["card-info-field"];return Q("div",{style:{...l},children:d?Q("div",{style:{textAlign:"center",padding:"20px"},children:"loading..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"50px"},children:h.map((T,D)=>{const F=b(T);return Pe("div",{onClick:()=>x(T),style:{flex:"1 1 auto",width:`${_}px`,padding:"12px 0",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[T[S]&&Q("img",{src:T.picurl,alt:T[A]||"",style:{width:`${_}px`,height:`${k}px`,objectFit:"cover",borderRadius:"8px",marginBottom:"8px"},onError:N=>{N.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Pe(ve.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:F?"none":"1px solid #d9d9d9",backgroundColor:F?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:F&&Q(f8,{style:{fontSize:"12px",color:"#fff"}})}),T[A]||""]})})]},D)})})})},SL=({item:e,readonly:r,style:t,commonRequestWidthParams:i,commonRequest:l,value:f,onChange:c,interfaceTypeDict:h,interfaceTypeSysDict:m,actionUrlKey:d,actionUrlExtraParams:g,langId:C})=>{const[b,x]=W.useState([]),[_,k]=W.useState(!1);W.useEffect(()=>{S()},[e.inputType,e.classify,e.data,e.options]);const S=async()=>{k(!0);const A=await I2({commonRequestWidthParams:i,commonRequest:l,interfaceTypeDict:h,interfaceTypeSysDict:m,actionUrlKey:d,actionUrlExtraParams:g,item:e});x(A),k(!1)};return Q(ve.Select,{placeholder:Qp({json:e},C),mode:e.input==="mult-select"?"multiple":void 0,disabled:r,loading:_,showSearch:!0,value:f,filterOption:(A,T)=>{var D;return((D=T==null?void 0:T.label)==null?void 0:D.toLowerCase().indexOf(A.toLowerCase()))>=0},options:b,style:{...t},allowClear:!0,onChange:A=>{c(A)}})},DL={customUpload:"myUpload-module_customUpload_7c7d3"},kL=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),TL=e=>{const{langId:r="10001"}=e,{action:t,item:i,onChange:l,readonly:f=!1,relatedid:c,uploadText:h=r==="10001"?"上传文件":"Upload File",onRemove:m,list:d=[],uploadType:g,relatedidKey:C}=e,{message:b}=ve.App.useApp(),x=(i==null?void 0:i["upload-accept"])||"*",_=i==null?void 0:i.input,k=i==null?void 0:i["upload-size"],S=(i==null?void 0:i["upload-max-count"])||1,[A,T]=W.useState(_==="image"?"picture-card":"text"),[D,F]=W.useState([]),[N,L]=W.useState(!1),[P,U]=W.useState("");W.useEffect(()=>{d&&d.length&&F(d)},[d]);const $=async H=>{g==="image"&&(!H.url&&!H.preview&&(H.preview=await kL(H.originFileObj)),U(H.url||H.preview),L(!0))},O=({fileList:H})=>{F(H),l&&l(H)},z=H=>{if(!k)return!0;const Y=H.size/1024/1024<Number(k);return Y||b.error(r==="10001"?`请上传不超过${k}MB的文件`:`Please upload files smaller than ${k}MB`),Y},j=_==="image"?Pe("button",{style:{border:0,background:"none"},type:"button",children:[Q(Fb,{}),Q("div",{style:{marginTop:8},children:"Upload"})]}):Q(rn,{children:Q(ve.Button,{style:{fontSize:14},icon:Q(Nb,{}),children:h})});return Pe(rn,{children:[Q(ve.Upload,{action:t,beforeUpload:z,listType:A,accept:x,fileList:D,onPreview:$,data:{[C]:c},maxCount:S,onChange:O,onRemove:m,disabled:f,className:DL.customUpload,children:D.length>=S?null:j}),P&&Q(ve.Image,{wrapperStyle:{display:"none"},preview:{visible:N,onVisibleChange:H=>L(H),afterOpenChange:H=>!H&&U("")},src:P})]})},AL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:h,value:m,interfaceTypeDict:d,interfaceTypeSysDict:g,actionUrlKey:C,actionUrlExtraParams:b}=e,[x,_]=W.useState([]);W.useEffect(()=>{k()},[r.inputType,r.classify,r.data,r.options]);const k=async()=>{const S=await I2({commonRequestWidthParams:c,commonRequest:h,interfaceTypeDict:d,interfaceTypeSysDict:g,actionUrlKey:C,actionUrlExtraParams:b,item:r});_(S)};return Q(ve.Radio.Group,{...l,options:x,onChange:t,disabled:i,value:m,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"}})};bn.extend(iD);function OL(e){const{commonRequestWidthParams:r,uploadAction:t,commonRequest:i,formConfig:l,updateDelFileList:f,interfaceTypeDict:c,interfaceTypeSysDict:h,relatedidKey:m,actionUrlKey:d,actionUrlExtraParams:g,CustomModalComponent:C,isEdit:b,formShowType:x="form",langId:_,getTitle:k}=e,S=W.useRef([]),{message:A}=ve.App.useApp();W.useEffect(()=>{l&&(S.current=l)},[l]);const T=W.useCallback(j=>Array.isArray(j)?j:(j==null?void 0:j.fileList)??[],[]),D=j=>{f(j)},F=W.useCallback(j=>{var X,ne;const H=(X=j.json)==null?void 0:X.input,Y=(ne=j.json)==null?void 0:ne.format,q={};switch(H){case"image":case"file":case"video":case"audio":q.getValueFromEvent=T;break;case"date-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY-MM-DD"),q.getValueProps=G=>({value:G?bn(G):null});break;case"time-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY-MM-DD HH:mm:ss"),q.getValueProps=G=>({value:G?bn(G):null});break;case"week-picker":q.getValueFromEvent=G=>`${G==null?void 0:G.year()}-${bn(G).isoWeek()}周`,q.getValueProps=G=>{if(!G)return{value:null};const[ee,Z]=G.split("-"),V=Number(ee),te=Number(Z.replace("周",""));return{value:bn().year(V).isoWeek(te)}};break;case"month-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY-MM"),q.getValueProps=G=>({value:G?bn(G):null});break;case"quarter-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY年第Q季度"),q.getValueProps=G=>({value:G?bn(G,Y||"YYYY年第Q季度"):null});break;case"year-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"YYYY"),q.getValueProps=G=>({value:G?bn(G):null});break;case"second-picker":q.getValueFromEvent=G=>G==null?void 0:G.format(Y||"HH:mm:ss"),q.getValueProps=G=>({value:G?bn(G,Y||"HH:mm:ss"):null});break;case"range-picker":q.getValueFromEvent=G=>G==null?void 0:G.map(ee=>ee==null?void 0:ee.format(Y||"YYYY-MM-DD")),q.getValueProps=G=>!(G!=null&&G.length)&&!Array.isArray(G)?{value:null}:{value:(G==null?void 0:G.map(ee=>bn(ee)))||null};break;case"multiple-date-picker":q.getValueFromEvent=G=>G==null?void 0:G.map(ee=>ee==null?void 0:ee.format(Y||"YYYY-MM-DD")),q.getValueProps=G=>({value:(G==null?void 0:G.map(ee=>bn(ee)))||null});break}return q},[T]),N=W.useCallback(({isActive:j})=>j?Q(x8,{style:{fontSize:18,color:"#999"}}):Q(w8,{style:{fontSize:18,color:"#999"}}),[]),L=(j,H)=>{var Y,q,X,ne,G;return Pe(ve.Flex,{gap:10,vertical:H==="flex",align:"center",children:[Q("span",{children:j.attrname}),((Y=j==null?void 0:j.json)==null?void 0:Y.instruction)&&H==="icon"&&Q(ve.Tooltip,{title:(q=j==null?void 0:j.json)==null?void 0:q.instruction,children:Q(g8,{style:{color:((X=j==null?void 0:j.json)==null?void 0:X["instruction-color"])??"#888888",fontSize:16,cursor:"pointer"}})})||Q("span",{style:{color:((ne=j==null?void 0:j.json)==null?void 0:ne["instruction-color"])??"red"},children:(G=j==null?void 0:j.json)==null?void 0:G.instruction})]})},P=W.useCallback(({itemWithJson:j,colNum:H=1,readonly:Y=!1,instructionShowMode:q="icon",radioAlign:X="horizontal",formItemStyle:ne,relatedid:G,form:ee,defaultWidth:Z=358,parentFormListField:V,isShowLabel:te=!0})=>{const oe=Dc(j);let re=j.children||[];Array.isArray(re==null?void 0:re[0])&&re.length&&(re=re[0]);const pe=me=>{const Ce=(V==null?void 0:V.parentName)||(V==null?void 0:V.name);return Ce?Array.isArray(Ce)?[...Ce,j.attrid,me.name]:[Ce,j.attrid,me.name]:[j.attrid,me.name]};return Q(ve.Col,{span:24/H,children:Q(ve.Collapse,{bordered:!1,style:{backgroundColor:"transparent"},expandIcon:({isActive:me})=>N({isActive:me}),items:[{key:j.attrid,label:j.attrname,styles:{header:{paddingLeft:0}},children:Q(ve.Form.List,{name:V?Array.isArray(V.name)?[...V.name,j.attrid]:[V.name,j.attrid]:j.attrid,initialValue:oe,children:(me,{add:Ce,remove:se})=>Pe("div",{style:{display:"flex",rowGap:16,flexDirection:"column"},children:[me.map(Ae=>{const De={...Ae,parentName:pe(Ae)};return Q(ve.Card,{style:{width:Z+100},size:"small",title:`${j.attrname} ${Ae.name+1}`,extra:!b&&Q(h8,{onClick:()=>{me.length>1?se(Ae.name):A.warning("至少需要保留一个!")}}),children:(re||[]).map((qe,Se)=>Q(W.Fragment,{children:z({item:qe,readonly:Y,colNum:H,instructionShowMode:q,relatedid:G,form:ee,defaultWidth:Z,formItemStyle:ne,radioAlign:X,isFormListItem:!0,formListField:De,isShowLabel:!0})},qe.attrid||`child-${Se}`))},Ae.key)}),!b&&Q(ve.Flex,{style:{width:200},children:Pe(ve.Button,{type:"dashed",onClick:()=>Ce(),block:!0,children:["+ ",_==="10001"?"新增":"Add"]})})]})})}]},j.attrid)})},[N,Dc]),U=W.useCallback(({itemWithJson:j,colNum:H=1,readonly:Y=!1,instructionShowMode:q="icon",radioAlign:X="horizontal",formItemStyle:ne,relatedid:G,form:ee,defaultWidth:Z=358,isFormListItem:V=!1,formListField:te,isShowLabel:oe=!0})=>{var re,pe,me,Ce,se,Ae,De;if(((re=j.json)==null?void 0:re.hide)===!0)return Q(rn,{});if(j.attrtype===1)return P({itemWithJson:j,colNum:H,readonly:Y,instructionShowMode:q,radioAlign:X,formItemStyle:ne,relatedid:G,form:ee,defaultWidth:Z,parentFormListField:te,isShowLabel:oe});if(j.attrtype===2)return Q(rn,{children:"实例信息"});if(j.attrtype===0){const qe=Dc(j),Se=(pe=j.json)==null?void 0:pe["default-prompt"],We=Qp(j,_),{combinations:Me=[]}=j.json||{};if(Me!=null&&Me.length)return Q(ve.Col,{span:24/H,children:Q(ve.Form.Item,{label:(me=j==null?void 0:j.json)==null?void 0:me["combination-name"],required:(Ce=j.json)==null?void 0:Ce.must,children:Q(ve.Space.Compact,{children:Me.map((ft,It)=>{var In,Mn,Fn,Jt;let wn=Dc(ft),kn=Z;const jn={},sn=ft.json.input||"text",Ht=ne==null?void 0:ne.find(Kn=>Kn.type===sn);if(Ht){const{width:Kn}=(Ht==null?void 0:Ht.style)||{};Kn&&(jn.width=Kn)}const on=(In=ft==null?void 0:ft.json)==null?void 0:In["combination-width-ratio"];return on&&(kn=Z*on),Q(ve.Form.Item,{name:te?Array.isArray(te.name)?[...te.name,ft.attrid]:[te.name,ft.attrid]:ft.attrid,noStyle:!0,initialValue:wn,rules:[...(Mn=ft.json)!=null&&Mn.must?[{required:!0,message:Se||`${We}${ft.attrname}`}]:[],...(Fn=j.json)!=null&&Fn.regexp?[{pattern:new RegExp(j.json.regexp.replace(/^\/|\/$/g,"")),message:((Jt=j.json)==null?void 0:Jt["regexp-message"])||`${j.attrname}${_==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...F(ft),children:O({item:ft,readonly:Y,formItemStyle:ne,radioAlign:X,relatedid:G,form:ee,defaultWidth:kn,customWidth:jn})},It)})})},`${j.attrid}+1`)});const bt=V&&te?Array.isArray(te.name)?[...te.name,j.attrid]:[te.name,j.attrid]:j.attrid;return Q(ve.Col,{span:24/H,children:Q(ve.Form.Item,{name:bt,label:oe&&L(j,q)||null,initialValue:qe,rules:[...(se=j.json)!=null&&se.must?[{required:!0,message:`${We}${j.attrname}`}]:[],...(Ae=j.json)!=null&&Ae.regexp?[{pattern:new RegExp(j.json.regexp.replace(/^\/|\/$/g,"")),message:((De=j.json)==null?void 0:De["regexp-message"])||`${j.attrname}${_==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...F(j),children:O({item:j,readonly:Y,formItemStyle:ne,radioAlign:X,relatedid:G,form:ee,defaultWidth:Z})},j.attrid)})}return null},[L,Dc,F,P]),$=async j=>{var H;try{const Y=(H=j==null?void 0:j.response)==null?void 0:H.data;if(Y){if(!r)return;const q=await r({Controlname:"DelFile",PageName:"initializationfile"},Y);if((q==null?void 0:q.ReturnValue)!==1)return A.error(q==null?void 0:q.msg),!1}else D(j);return!0}catch{return!1}},O=({item:j,readonly:H=!1,formItemStyle:Y=[],radioAlign:q="horizontal",relatedid:X,form:ne,defaultWidth:G=358,customWidth:ee={}})=>{var qe,Se,We,Me,bt,ft,It,wn,kn,jn,sn,Ht,on,In,Mn,Fn,Jt,Kn,ka,Lr,$e,rt;const Z=j.json.input||"text",V=((qe=j.json)==null?void 0:qe.format)||"",te=j.attrid,oe=Dc(j),re=((Se=j.json)==null?void 0:Se["default-prompt"])||"",pe=((We=j.json)==null?void 0:We["disable-date-goover"])||!1,me=Qp(j,_),Ce=j.json.length&&{maxLength:j.json.length}||{},se=Y.find(ut=>ut.type===Z);let Ae=(Me=j.json)==null?void 0:Me["input-width"];Ae&&(Ae=x==="table"?Number(Ae)-32:Ae);const De=Ae||G;switch(Z){case"label":return Q(ve.Input,{disabled:!0,value:((bt=j.json)==null?void 0:bt["label-value"])||j.attrvalue||((ft=j.json)==null?void 0:ft.default)||"-",style:{width:De,...se==null?void 0:se.style,...ee}});case"text":return Q(ve.Input,{placeholder:re||me,...Ce,disabled:H||((It=j.json)==null?void 0:It.readonly),allowClear:!0,style:{width:De,...se==null?void 0:se.style,...ee}});case"password":return Q(ve.Input.Password,{placeholder:re||me,...Ce,disabled:H||((wn=j.json)==null?void 0:wn.readonly),allowClear:!0,style:{width:De,...se==null?void 0:se.style,...ee}});case"textarea":return Q(ve.Input.TextArea,{allowClear:!0,placeholder:re||me,rows:5,...Ce,disabled:H||((kn=j.json)==null?void 0:kn.readonly),style:{width:De,...se==null?void 0:se.style,...ee}});case"number":return Q(ve.InputNumber,{controls:!1,placeholder:re||me,...Ce,disabled:H||((jn=j.json)==null?void 0:jn.readonly),style:{width:De,...se==null?void 0:se.style,...ee}});case"select":case"mult-select":return Q(SL,{item:j.json,readonly:H||((sn=j.json)==null?void 0:sn.readonly),style:{width:De,...se==null?void 0:se.style,...ee},commonRequestWidthParams:r,commonRequest:i,value:oe,interfaceTypeDict:c,interfaceTypeSysDict:h,actionUrlKey:d,actionUrlExtraParams:g,langId:_,onChange:ut=>{ne.setFieldValue(j.attrid,ut)}});case"modal-mult-select":case"modal-select":return Q(bL,{style:{width:De,...se==null?void 0:se.style,...ee},item:j.json,value:j.attrvalue||j.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async ut=>{ne.setFieldValue(j.attrid,ut)},disabled:H||((Ht=j.json)==null?void 0:Ht.readonly),langId:_,CustomModalComponent:C});case"mul-field-modal-select":return Q(yL,{style:{width:De,...se==null?void 0:se.style,...ee},item:j.json,form:ne,attrid:te,getTitle:k,value:j.attrvalue||j.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async ut=>{ne.setFieldsValue(ut)},disabled:H||((on=j.json)==null?void 0:on.readonly),CustomModalComponent:C,langId:_});case"date-picker":case"time-picker":case"week-picker":case"month-picker":case"quarter-picker":case"year-picker":case"second-picker":{const ut={"date-picker":"date","time-picker":"date","week-picker":"week","month-picker":"month","quarter-picker":"quarter","year-picker":"year","second-picker":"time"};let Vt;return Z==="date-picker"&&(Vt=pe?V6:void 0),Q(ve.DatePicker,{showTime:Z==="time-picker",format:V||void 0,picker:ut[Z]||"date",disabled:H||((In=j.json)==null?void 0:In.readonly),disabledDate:Vt,placement:"bottomLeft",style:{width:De,...se==null?void 0:se.style,...ee}})}case"range-picker":return Q(ve.DatePicker.RangePicker,{disabledDate:pe?V6:void 0,disabled:H||((Mn=j.json)==null?void 0:Mn.readonly),style:{width:De,...se==null?void 0:se.style,...ee}});case"multiple-date-picker":return Q(ve.DatePicker,{multiple:!0,maxTagCount:((Fn=j==null?void 0:j.json)==null?void 0:Fn["max-tag-count"])||2,disabled:H||((Jt=j.json)==null?void 0:Jt.readonly)||!1,style:{width:De,...se==null?void 0:se.style,...ee}});case"radio":return Q(AL,{radioAlign:q,commonRequest:i,commonRequestWidthParams:r,item:j.json,readonly:H||((Kn=j.json)==null?void 0:Kn.readonly),options:Ce,handleUrlOptions:kc,value:oe,interfaceTypeDict:c,interfaceTypeSysDict:h,actionUrlKey:d,actionUrlExtraParams:g,onChange:ut=>{ne.setFieldValue(j.attrid,ut.target.value)}});case"checkbox":return Q(wL,{radioAlign:q,commonRequest:i,commonRequestWidthParams:r,item:j.json,readonly:H||((ka=j.json)==null?void 0:ka.readonly),options:Ce,value:oe,handleUrlOptions:kc,interfaceTypeDict:c,interfaceTypeSysDict:h,actionUrlKey:d,actionUrlExtraParams:g,onChange:ut=>{ne.setFieldValue(j.attrid,ut.join(","))}});case"audio":case"file":case"image":case"video":return Q(TL,{action:t&&t("initializationfile"),item:j.json,uploadType:Z,langId:_,list:oe,readonly:H||((Lr=j.json)==null?void 0:Lr.readonly),relatedid:X,relatedidKey:m,onRemove:ut=>$(ut)});case"cascader":return Q(_L,{commonRequestWidthParams:r,commonRequest:i,item:j.json,value:j.attrvalue,style:{width:De,...se==null?void 0:se.style,...ee},interfaceTypeDict:c,interfaceTypeSysDict:h,actionUrlKey:d,actionUrlExtraParams:g,langId:_});case"radio-card":return Q(EL,{item:j.json,readonly:H||(($e=j.json)==null?void 0:$e.readonly),onChange:ut=>{ne.setFieldValue(j.attrid,ut)},langId:_,commonRequestWidthParams:r});default:return Q(ve.Input,{placeholder:re||me,...Ce,showCount:!0,disabled:H||((rt=j.json)==null?void 0:rt.readonly),style:{width:De,...se==null?void 0:se.style,...ee}})}},z=({item:j,readonly:H=!1,colNum:Y=1,instructionShowMode:q="icon",relatedid:X,form:ne,defaultWidth:G=358,formItemStyle:ee,radioAlign:Z="horizontal",isFormListItem:V=!1,formListField:te,isShowLabel:oe=!0})=>{var me;const re=j.info_base64===1?uu(Zp(j.info)):uu(j.info),pe={...j,json:{...j==null?void 0:j.json,...re}};return((me=pe.json)==null?void 0:me.hide)===!0?null:Q(W.Fragment,{children:U({itemWithJson:pe,readonly:H,colNum:Y,instructionShowMode:q,relatedid:X,form:ne,defaultWidth:G,formItemStyle:ee,radioAlign:Z,isFormListItem:V,formListField:te,isShowLabel:oe})},pe.attrid)};return{handleRenderItem:z,handleSetFormItemInitialValue:Dc}}const RL=W.forwardRef((e,r)=>{const{formConfig:t,form:i,readonly:l=!1,relatedid:f,colNum:c=1,colSpace:h=[0,0],instructionShowMode:m="flex",defaultWidth:d=358,commonRequestWidthParams:g,uploadAction:C,commonRequest:b,formItemStyle:x=[],radioAlign:_="horizontal",interfaceTypeChildren:k="YLLRDetailAttrlist",interfaceTypeDict:S="YLZDDictList",interfaceTypeSysDict:A="YLZDSysConfigList",relatedidKey:T="relatedid",actionUrlKey:D="action-url",actionUrlExtraParams:F={},CustomModalComponent:N,formShowType:L="form",formListItemWidth:P,formListItemName:U,isEdit:$=!1,langId:O="10001",getTitle:z}=e,j=W.useRef([]),H=q=>{j.current.push(q)},{handleRenderItem:Y}=OL({commonRequestWidthParams:g,uploadAction:C,commonRequest:b,updateDelFileList:H,formConfig:t,interfaceTypeChildren:k,interfaceTypeDict:S,interfaceTypeSysDict:A,relatedidKey:T,actionUrlKey:D,actionUrlExtraParams:F,CustomModalComponent:N,isEdit:$,formShowType:L,langId:O,getTitle:z});return W.useImperativeHandle(r,()=>({getDelFileList:()=>j.current})),Q(rn,{children:L==="table"?Q(ve.Form.List,{name:U||"customFormList",initialValue:[{}],children:(q,{add:X,remove:ne})=>Q(ve.Flex,{className:"custom-form-body",children:Pe("div",{className:"custom-form-list",children:[Pe(ve.Flex,{align:"center",style:{position:"relative",backgroundColor:"#004d32"},children:[Q(ve.Flex,{className:"custom-form-list-header",align:"center",children:t==null?void 0:t.map((G,ee)=>{var V,te;const Z=((V=G==null?void 0:G.json)==null?void 0:V["input-width"])&&Number((te=G==null?void 0:G.json)==null?void 0:te["input-width"])||d;return Pe(ve.Flex,{style:{width:Z,flexShrink:0},align:"center",children:[ee!==0&&Q("div",{className:"line"}),Q("div",{className:"custom-form-list-header-item",children:G.attrname})]},ee)})}),Q("a",{className:"custom-form-list-add-btn",onClick:()=>X(),children:O==="10001"?"新增":"Add"})]}),q.map(G=>Pe(ve.Flex,{align:"center",className:"custom-form-list-item-container",children:[Q(ve.Flex,{className:"custom-form-list-item",align:"center",children:t==null?void 0:t.map((ee,Z)=>{var te,oe;const V=((te=ee==null?void 0:ee.json)==null?void 0:te["input-width"])&&Number((oe=ee==null?void 0:ee.json)==null?void 0:oe["input-width"])||d;return Q(ve.Flex,{align:"center",className:"custom-form-list-item-content",justify:"center",style:{width:V,flexShrink:0},children:Y({item:ee,readonly:l,colNum:c,instructionShowMode:m,relatedid:f,form:i,defaultWidth:(P==null?void 0:P[Z])||d,formItemStyle:x,isFormListItem:!0,formListField:G,isShowLabel:!1})},ee.attrid||`child-${Z}`)})}),Q("a",{className:"custom-form-list-del-btn",onClick:()=>ne(G.key),children:O==="10001"?"删除":"Delete"})]},G.key))]})})}):Q(ve.Row,{gutter:h,children:t.map((q,X)=>Q(W.Fragment,{children:Y({item:q,readonly:l,colNum:c,instructionShowMode:m,relatedid:f,form:i,defaultWidth:d,formItemStyle:x,radioAlign:_})},q.attrid||`form-item-${X}`))})})}),oD=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},Tc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default)||"";if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t==null?void 0:t.split("~"),t=t.map(h=>h)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(h=>bn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const h=(c=e.json)==null?void 0:c["cascader-delimiter"];h&&(t=t.split(h).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(m=>({...m,url:m.FilePath,name:m.FileName,uid:m.FileId}))}catch{t=[]}return e.attrtype===1&&(t=FL(e.children||[])),t||void 0},lD=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},FL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)},NL=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:h})=>{var C;let m=[];const d=async b=>{var _;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(_=k==null?void 0:k.data)!=null&&_.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(S=>({label:`${S.dicid||""}-${S.info||""}`,value:`${S.dicid||""}-${S.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},g=async()=>{var b,x;try{const _=((b=c==null?void 0:c["key-field"])==null?void 0:b.list)||[],k=((x=c==null?void 0:c["key-field"])==null?void 0:x.delimiter)||"",S=c==null?void 0:c["field-names"];if(!_.length){ve.message.error("请配置key-field");return}const A=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(A!=null&&A.data){const T=A==null?void 0:A.data,D=(T==null?void 0:T.list)||[];let F=[];Array.isArray(T)&&(F=T),Array.isArray(D)&&(F=D),S?m=F:m=F.map(N=>({label:lD(N,k,_),value:lD(N,k,_)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(m=((C=c.data)==null?void 0:C.map(b=>({label:b,value:b})))||[],c.options&&Array.isArray(c.options)&&(m=c.options)):c.inputType==="dictionary"?m=await d(t):c.inputType==="system-dictionary"&&(m=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await g(),m};function ML(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,attrid:c,form:h,langId:m}=e,d=ve.Form.useWatch(c,h),{message:g}=ve.App.useApp(),C=r.input,[b,x]=W.useState(e.value),[_,k]=W.useState(!1),[S,A]=W.useState([]),[T,D]=W.useState([]),[F,N]=W.useState(!1),[L,P]=W.useState({PageNum:1,PageSize:6}),[U,$]=W.useState([]),[O,z]=W.useState(0),j=G();W.useEffect(()=>{_&&Y()},[_,L]);const H=(Z,V)=>{A(Z),D(V)},Y=async()=>{var Z;if(r.inputType==="url"&&(r!=null&&r["action-url"])){N(!0);try{const V=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...L,...(r==null?void 0:r["action-url-extra-params"])||{}});if((V==null?void 0:V.ReturnValue)===0){g.error(V.msg),N(!1);return}const te=V==null?void 0:V.data,oe=(Z=te==null?void 0:te.list)==null?void 0:Z.map((pe,me)=>{const Ce=(L.PageNum-1)*L.PageSize+me;return{...pe,_rowKey:Ce}}),re=(oe==null?void 0:oe.filter(pe=>S.includes(pe._rowKey)))||[];D(re),$([...oe||[]]),z((te==null?void 0:te.number)||0),N(!1)}catch(V){N(!1),g.error(m==="10001"?V.msg||"参数错误":"Failed to load data")}return}g.error(m==="10001"?"请配置action-url":"Please configure action-url")},q=()=>{var Z;if(!t){if(b){const V=r==null?void 0:r["key-field"],te=V==null?void 0:V[c],{delimiter:oe="-",list:re=[]}=te||{};if(!V){g.error(m==="10001"?"请配置key-field":"Please configure key-field");return}switch(C){case"mul-field-modal-select":const pe=(Z=b==null?void 0:b.split(oe))==null?void 0:Z[0],me=U==null?void 0:U.findIndex(Ae=>Object.values(Ae).includes(pe));A([me]);break;case"modal-mult-select":const Ce=b==null?void 0:b.split(","),se=Ce==null?void 0:Ce.map(Ae=>{var qe;const De=(qe=Ae.split(oe))==null?void 0:qe[0];return U==null?void 0:U.findIndex(Se=>De.includes((Se==null?void 0:Se.typeid)||(Se==null?void 0:Se.instanceid)))});A(se);break}}k(!0)}},X=async()=>{try{const Z=await PL(T,r);x((Z==null?void 0:Z[c])||""),e.onSure(Z),k(!1)}catch(Z){g.error(m==="10001"?Z.msg||"参数错误":"Failed to load data")}},ne=()=>{P({...L,PageNum:1}),k(!1)};function G(){const Z=r["modal-field-list"];let V=[];for(let te in Z){let oe=Z[te];const re={dataIndex:te,title:oe};V=[...V,re]}return V}const ee=Z=>{P({...L,PageNum:Z})};return Pe(rn,{children:[Q(ve.Select,{placeholder:m==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:q,open:!1,value:d,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:_,onOk:X,onCancel:ne,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:j,loading:F,dataSource:U,rowKey:Z=>Z._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:S,onChange:H},pagination:{total:O,current:L.PageNum,pageSize:L.PageSize,onChange:ee}})})||Q(ve.Modal,{title:r["modal-caption"],open:_,onOk:X,onCancel:ne,width:r["modal-width"]??600,okButtonProps:{disabled:S.length===0},children:Q(ve.Table,{columns:j,loading:F,dataSource:U,rowKey:Z=>Z._rowKey,rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:S,onChange:H},pagination:{total:O,current:L.PageNum,pageSize:L.PageSize,onChange:ee}})})]})}function PL(e,r){return new Promise((t,i)=>{try{var l=r["key-field"];if(!l){i({msg:"请配置key-field"});return}let f={};e.forEach(c=>{for(let[h,m]of Object.entries(l)){const d=(m==null?void 0:m.list)??[],g=(m==null?void 0:m.delimiter)??"-",C=d.map(b=>c==null?void 0:c[b]);f[h]=C.join(g)}}),t(f)}catch{i({msg:"key-field参数配置错误"})}})}function BL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:h}=ve.App.useApp(),m=r.input,[d,g]=W.useState(e.value),[C,b]=W.useState(!1),[x,_]=W.useState([]),[k,S]=W.useState([]),[A,T]=W.useState(!1),[D,F]=W.useState({PageNum:1,PageSize:6}),[N,L]=W.useState([]),[P,U]=W.useState(0),$=q();W.useEffect(()=>{C&&z()},[C,D]);const O=(ne,G)=>{_(ne),S(G)},z=async()=>{var ne;if(r.inputType==="url"&&(r!=null&&r["action-url"])){T(!0);try{const G=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...D});if((G==null?void 0:G.ReturnValue)===0){h.error(G.msg),T(!1);return}const ee=G==null?void 0:G.data,Z=(ne=ee==null?void 0:ee.list)==null?void 0:ne.map((te,oe)=>{const re=(D.PageNum-1)*D.PageSize+oe;return{...te,_rowKey:re}}),V=(Z==null?void 0:Z.filter(te=>x.includes(te._rowKey)))||[];S(V),L([...Z||[]]),U((ee==null?void 0:ee.number)||0),T(!1)}catch(G){T(!1),h.error(c==="10001"?G.msg||"参数错误":"Failed to load data")}return}h.error(c==="10001"?"请配置action-url":"Please configure action-url")},j=()=>{var ne,G;if(!t){if(d){const ee=((ne=r==null?void 0:r["key-field"])==null?void 0:ne.list)??[],Z=((G=r==null?void 0:r["key-field"])==null?void 0:G.delimiter)??"-";if(!ee.length){h.error(c==="10001"?"请配置key-field":"Please configure key-field");return}switch(m){case"modal-select":const V=d==null?void 0:d.split("-"),te=N==null?void 0:N.findIndex(pe=>V.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));_([te]);break;case"modal-mult-select":const oe=d==null?void 0:d.split(","),re=oe==null?void 0:oe.map(pe=>{var Ce;const me=(Ce=pe.split(Z))==null?void 0:Ce[0];return N==null?void 0:N.findIndex(se=>me.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)))});_(re);break}}b(!0)}},H=async()=>{try{const ne=await LL(k,r,c);g(ne),e.onSure(ne),b(!1)}catch(ne){h.error(c==="10001"?ne.msg||"参数错误":"Failed to build value")}},Y=()=>{F({...D,PageNum:1}),b(!1)};function q(){const ne=r["modal-field-list"];let G=[];for(let ee in ne){let Z=ne[ee];const V={dataIndex:ee,title:Z};G=[...G,V]}return G}const X=ne=>{F({...D,PageNum:ne})};return Pe(rn,{children:[Q(ve.Select,{placeholder:c==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:j,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:Y,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:$,loading:A,dataSource:N,rowKey:ne=>ne._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:m==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:O},pagination:{total:P,current:D.PageNum,pageSize:D.PageSize,onChange:X}})})||Q(ve.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:Y,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(ve.Table,{columns:$,loading:A,dataSource:N,rowKey:ne=>ne._rowKey,rowSelection:{type:m==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:O},pagination:{total:P,current:D.PageNum,pageSize:D.PageSize,onChange:X}})})]})}function LL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let h=e.map(m=>c.map(g=>m[g]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(h)}catch{l({msg:t==="10001"?"key-field参数配置错误":"Failed to build value"})}})}const zL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:h,handleUrlOptions:m,value:d,interfaceTypeDict:g,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:_}=e,{message:k}=ve.App.useApp(),[S,A]=W.useState([]),[T,D]=W.useState(d||[]);W.useEffect(()=>{if((r==null?void 0:r.inputType)==="local"){const L=(r==null?void 0:r.data)||[];A(L.map(P=>({value:P,label:P})))}else(r==null?void 0:r.inputType)==="dictionary"?F(r.classify,g):(r==null?void 0:r.inputType)==="system-dictionary"?F(r.classify,C):(r==null?void 0:r.inputType)==="url"&&N()},[r==null?void 0:r.inputType]);const F=async(L,P)=>{var $;if(!L)return;const U=await h(P,{asctypeid:L});if((U==null?void 0:U.ReturnValue)===1){const O=(($=U==null?void 0:U.data)==null?void 0:$.list)||[];A(O.map(z=>{const j=z.dicid+"-"+z.info;return{value:j,label:j}}))}},N=async()=>{var L,P;try{const U=((L=r==null?void 0:r["key-field"])==null?void 0:L.list)||[],$=((P=r==null?void 0:r["key-field"])==null?void 0:P.delimiter)||"";if(!U.length){k.error(_==="10001"?"请配置key-field":"Please configure key-field");return}const O=await c({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[b]:r==null?void 0:r["action-url"],...x});if(O!=null&&O.data){const z=O==null?void 0:O.data,j=z==null?void 0:z.list;let H=[];Array.isArray(z)&&(H=z),Array.isArray(j)&&(H=j);const Y=H.map(q=>({label:m(q,$,U),value:m(q,$,U)}));A([...Y])}}catch{k.error(_==="10001"?"加载选项失败":"Failed to load options")}finally{}};return Q(ve.Checkbox.Group,{...l,options:S,value:T,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:L=>{D(L),t==null||t(L)},disabled:i})},UL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:h,interfaceTypeSysDict:m,actionUrlKey:d,actionUrlExtraParams:g,langId:C})=>{const[b,x]=W.useState([]),[_,k]=W.useState(!1),{message:S}=ve.App.useApp();W.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let P=[];e.data&&Array.isArray(e.data)?P=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(P=e.options),x(P)}else if(e.inputType==="dictionary")await T(m);else if(e.inputType==="system-dictionary")T(m);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const P=await F();P&&Array.isArray(P)&&x(P)}else{let P=[];e.data&&Array.isArray(e.data)?P=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(P=e.options),x(P)}},T=async P=>{var U;if(e.classify){k(!0);try{const $=await c(P,{asctypeid:e.classify});if((U=$==null?void 0:$.data)!=null&&U.list&&Array.isArray($.data.list)){const O=$.data.list.map(z=>({label:`${z.dicid||""}-${z.info||""}`,value:`${z.dicid||""}-${z.info||""}`}));x(O)}}catch{S.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},D=(P,U)=>{i&&i(P)},F=async P=>new Promise(async(U,$)=>{var Y,q,X;const O=((Y=e==null?void 0:e["key-field"])==null?void 0:Y.list)||[],z=(e==null?void 0:e["search-field"])||[],j=((q=e==null?void 0:e["key-field"])==null?void 0:q.delimiter)||"-";if(!O.length){S.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...g};P&&(z.forEach(ne=>{H[ne]=P[ne]||""}),H.level=Number(P.level||0)+1||""),k(!0);try{const ne=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((X=ne==null?void 0:ne.data)!=null&&X.list&&Array.isArray(ne.data.list)){const G=ne.data.list.map(ee=>({...ee,label:`${ee[O[0]]||""}${j}${ee[O[1]]||""}`,value:`${ee[O[0]]||""}${j}${ee[O[1]]||""}`,children:[],isLeaf:(ee==null?void 0:ee.subcount)===0}));U(G)}$([])}catch{S.error(C==="10001"?"加载选项失败":"Failed to load options"),$([])}finally{$([]),k(!1)}}),N=async P=>{const U=P[P.length-1],$=await F(U)||[];return U.children=$,x([...b]),$},L=(P,U)=>U.some($=>$.label.toLowerCase().includes(P.toLowerCase()));return Q(ve.Cascader,{showSearch:{filter:L},loading:_,placeholder:C==="10001"?"请选择":"Please select",loadData:N,disabled:r,onChange:D,style:{...l},options:b,value:t,onOpenChange:async P=>{var U;if(P&&(t!=null&&t.length)){const $=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],O=(e==null?void 0:e["search-field"])||[];if(!$.length||!O.length){S.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const z=$.findIndex(Y=>Y===O[0]);if(z===-1){S.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const j=t.map(Y=>Y.split("-")[z]||"").filter(Boolean);let H=b;for(const[Y,q]of j.entries()){if(Y===j.length-1)break;const X=H.filter(ee=>ee[O[0]]===q);if(X.length===0)break;const ne=X[0];if(ne.children&&ne.children.length>0){H=ne.children;continue}H=await N(X)}}}})},jL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f})=>{const[c,h]=W.useState([]),[m,d]=W.useState(!1);W.useEffect(()=>{(async()=>{var T;if(e.inputType==="url"&&e["action-url"]){d(!0);try{const D=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(T=D==null?void 0:D.data)!=null&&T.list&&Array.isArray(D.data.list)?h(D.data.list):D!=null&&D.data&&Array.isArray(D.data)?h(D.data):Array.isArray(D==null?void 0:D.list)?h(D.list):(D==null?void 0:D.ReturnValue)===1&&(D!=null&&D.data)&&(Array.isArray(D.data)?h(D.data):h([D.data]))}catch{}finally{d(!1)}}else e.data&&Array.isArray(e.data)&&h(e.data)})()},[e.inputType,e["action-url"],e.data]);const g=A=>JSON.stringify(A),C=A=>{const T=g(A);return t===T},b=A=>{if(r)return;const T=g(A);i&&i(T)},x=e["card-image-width"]||200,_=e["card-image-height"]||100,k=e["card-image-field"],S=e["card-info-field"];return Q("div",{style:{...l},children:m?Q("div",{style:{textAlign:"center",padding:"20px"},children:"加载中..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"0px"},children:c.map((A,T)=>{const D=C(A);return Pe("div",{onClick:()=>b(A),style:{flex:"1 1 auto",width:`${x}px`,padding:"12px",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[A[k]&&Q("img",{src:A.picurl,alt:A[S]||"",style:{width:`${x}px`,height:`${_}px`,objectFit:"cover",borderRadius:"4px",marginBottom:"8px"},onError:F=>{F.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Pe(ve.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:D?"none":"1px solid #d9d9d9",backgroundColor:D?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:D&&Q(f8,{style:{fontSize:"12px",color:"#fff"}})}),A[S]||""]})})]},T)})})})},WQ="";function Xp(e,r){if(!e)return r;let t;return typeof e=="function"?t=e():"current"in e?t=e.current:t=e,t}function Mi(){}const Jp=Object.assign,Ac=typeof window<"u";function Jr(e){return e!=null}function Oc(e){return typeof e=="function"}function IL(e){return cd(e)&&Oc(e.then)&&Oc(e.catch)}function cd(e){return e!==null&&typeof e=="object"}function sD(e,r,t){return r.reduce((i,l)=>((!t||e[l]!==void 0)&&(i[l]=e[l]),i),{})}function $2(e,r){return r?typeof r=="string"?` ${e}--${r}`:Array.isArray(r)?r.reduce((t,i)=>t+$2(e,i),""):Object.keys(r).reduce((t,i)=>t+(r[i]?$2(e,i):""),""):""}function HL(e){return(r,t)=>(r&&typeof r!="string"&&(t=r,r=""),r=r?`${e}__${r}`:e,`${r}${$2(r,t)}`)}function Cn(e,r){return e=`${r||"rv"}-${e}`,[HL(e),e]}function VL(e){e.stopPropagation()}function Y2(e,r){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),r&&VL(e)}const $L={click:"onClick"};function uD(e,r){const t=Object.assign({},r.props);for(const i of e){const l=$L[i];t[l]=function(f){var c,h;f.stopPropagation(),(h=(c=r.props)[l])===null||h===void 0||h.call(c,f)}}return W.cloneElement(r,t)}const fd=Ac?window:global;let cD=Date.now();function YL(e){const r=Date.now(),t=Math.max(0,16-(r-cD)),i=setTimeout(e,t);return cD=r+t,i}function q2(e){return(fd.requestAnimationFrame||YL).call(fd,e)}function qL(){return Ac?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1}function GL(e){const r="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(r,0)}function KL(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function WL(e){fD(window,e)}function fD(e,r){"scrollTop"in e?e.scrollTop=r:e.scrollTo(e.scrollX,r)}const QL=qL();function dD(){QL&&WL(KL())}function pD(e){return/^\d+(\.\d+)?$/.test(e)}function hD(e){return Number.isNaN?Number.isNaN(e):e!==e}function fl(e){if(Jr(e))return e=String(e),pD(e)?`${e}px`:e}function ZL(e){if(Jr(e)){const r=fl(e);return{width:r,height:r}}return{}}let G2;function XL(){if(!G2){const e=document.documentElement,r=e.style.fontSize||window.getComputedStyle(e).fontSize;G2=parseFloat(r)}return G2}function JL(e){return e=e.replace(/rem/g,""),+e*XL()}function ez(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function tz(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function vD(e){if(typeof e=="number")return e;if(Ac){if(e.indexOf("rem")!==-1)return JL(e);if(e.indexOf("vw")!==-1)return ez(e);if(e.indexOf("vh")!==-1)return tz(e)}return parseFloat(e)}function eh(e,r,t){return Math.min(Math.max(e,r),t)}function mD(e,r,t){const i=e.indexOf(r);return i===-1?e:r==="-"&&i!==0?e.slice(0,i):e.slice(0,i+1)+e.slice(i).replace(t,"")}function nz(e,r=!0,t=!0){r?e=mD(e,".",/\./g):e=e.split(".")[0],t?e=mD(e,"-",/-/g):e=e.replace(/-/,"");const i=r?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(i,"")}function dl(e,r=2){let t=`${e}`;for(;t.length<r;)t=`0${t}`;return t}let gD=!1;if(Ac)try{const e={};Object.defineProperty(e,"passive",{get(){gD=!0}}),window.addEventListener("test-passive",null,e)}catch{}function K2(e,r,t={}){if(!Ac)return;const{target:i=window,passive:l=!1,capture:f=!1,depends:c=[]}=t;let h;const m=()=>{const g=Xp(i);g&&!h&&(g.addEventListener(e,r,gD?{capture:f,passive:l}:f),h=!0)},d=()=>{const g=Xp(i);g&&h&&(g.removeEventListener(e,r,f),h=!1)};W.useEffect(()=>(m(),()=>d()),[i,...c])}function W2(e){const[r,t]=W.useState(e),i=W.useRef(r),l=W.useCallback(f=>{t(c=>i.current=Oc(f)?f(c):f)},[r]);return[r,l,i]}const rz=()=>{const e=W.useRef(!1);return W.useEffect(()=>(e.current=!1,()=>{e.current=!0}),[]),e},yD=(e={})=>{const r=rz(),[t,i,l]=W2(e),f=W.useCallback(c=>{r.current||i(h=>Object.assign(Object.assign({},h),Oc(c)?c(h):c))},[]);return[t,f,l]},Rc=(e,r)=>{const t=W.useRef(!1);W.useEffect(()=>{if(!t.current)t.current=!0;else return e()},r)};function xD(e){const r=W.useRef(e);return r.current=e,r}const az=process.env.NODE_ENV==="development";function JQ(e,r){}const bD=e=>{process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=xD(e);W.useEffect(()=>()=>{r.current()},[])};function CD(e,r){if(e===r)return!0;for(let t=0;t<e.length;t++)if(!Object.is(e[t],r[t]))return!1;return!0}const iz=(e=>(t,i,l)=>{const f=W.useRef(!1),c=W.useRef([]),h=W.useRef([]),m=W.useRef();e(()=>{var d;const C=(Array.isArray(l)?l:[l]).map(b=>Xp(b));if(!f.current){f.current=!0,c.current=C,h.current=i,m.current=t();return}(C.length!==c.current.length||!CD(C,c.current)||!CD(i,h.current))&&((d=m.current)===null||d===void 0||d.call(m),c.current=C,h.current=i,m.current=t())}),bD(()=>{var d;(d=m.current)===null||d===void 0||d.call(m),f.current=!1})})(W.useEffect);function oz(e,r){const[t,i]=W.useState(),[l,f]=W.useState();return iz(()=>{const c=Xp(e);if(!c)return;const h=new IntersectionObserver(m=>{for(const d of m)f(d.intersectionRatio),i(d.isIntersecting)},Object.assign(Object.assign({},r),{root:Xp(r==null?void 0:r.root)}));return h.observe(c),()=>{h.disconnect()}},[],e),[t,l]}const wD=10;function lz(e,r){return e>r&&e>wD?"horizontal":r>e&&r>wD?"vertical":""}function _D(){const e=W.useRef(0),r=W.useRef(0),t=W.useRef(0),i=W.useRef(0),l=W.useRef(0),f=W.useRef(0),c=W.useRef(""),h=W.useRef(null),m=()=>c.current==="vertical",d=()=>c.current==="horizontal",g=()=>{t.current=0,i.current=0,l.current=0,f.current=0,c.current="",h.current=null};return{move:x=>{const _=x.touches[0];t.current=_.clientX<0?0:_.clientX-e.current,i.current=_.clientY-r.current,l.current=Math.abs(t.current),f.current=Math.abs(i.current),h.current===null?h.current=!0:h.current=!1,c.current||(c.current=lz(l.current,f.current))},start:x=>{g(),e.current=x.touches[0].clientX,r.current=x.touches[0].clientY},reset:g,startX:e,startY:r,deltaX:t,deltaY:i,offsetX:l,offsetY:f,direction:c,isVertical:m,isHorizontal:d,firstMove:h}}const ED=/scroll|auto/i,sz=Ac?window:void 0;function uz(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function cz(e,r=sz){r===void 0&&(r=window);let t=e;for(;t&&t!==r&&uz(t);){const{overflowY:i}=window.getComputedStyle(t);if(ED.test(i)){if(t.tagName!=="BODY")return t;const l=window.getComputedStyle(t.parentNode).overflowY;if(ED.test(l))return t}t=t.parentNode}return r}const fz=e=>(r,t)=>{const i=W.useRef(!1);e(()=>()=>{i.current=!1},[]),e(()=>{if(!i.current)i.current=!0;else return r()},t)},th=Ac?W.useLayoutEffect:W.useEffect,dz=fz(th),SD=()=>{const[,e]=W.useState({});return W.useCallback(()=>e({}),[])};function DD(e){process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=W.useRef(e);r.current=W.useMemo(()=>e,[e]);const t=W.useRef();return t.current||(t.current=function(...i){return r.current.apply(this,i)}),t.current}function nh(e){const{value:r,defaultValue:t,onChange:i}=e,l=SD(),f=W.useRef(r!==void 0?r:t);r!==void 0&&(f.current=r);const c=DD((h,m)=>{const d=typeof h=="function"?h(f.current):h;!m&&d===f.current||(f.current=d,l(),i==null||i(d))});return[f.current,c]}const aZ="";function $a(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t}function Q2(e,r,t,i){function l(f){return f instanceof t?f:new t(function(c){c(f)})}return new(t||(t=Promise))(function(f,c){function h(g){try{d(i.next(g))}catch(C){c(C)}}function m(g){try{d(i.throw(g))}catch(C){c(C)}}function d(g){g.done?f(g.value):l(g.value).then(h,m)}d((i=i.apply(e,r||[])).next())})}const iZ="",pz=({bem:e})=>Q(rn,{children:Array(12).fill(null).map((r,t)=>Q("i",{className:Re(e("line",String(t+1)))},t))}),hz=({bem:e})=>Q("svg",Object.assign({className:Re(e("circular")),viewBox:"25 25 50 50"},{children:Q("circle",{cx:"50",cy:"50",r:"20",fill:"none"})})),vz=({bem:e})=>Pe("div",Object.assign({className:Re(e("ball"))},{children:[Q("div",{}),Q("div",{}),Q("div",{})]})),mz=e=>({spinner:Q(pz,{bem:e}),circular:Q(hz,{bem:e}),ball:Q(vz,{bem:e})}),[Ng]=Cn("loading"),Z2=e=>{const{className:r,type:t="circular",vertical:i,color:l,size:f,textColor:c,children:h,textSize:m}=e,d=W.useMemo(()=>Object.assign({color:l},ZL(f)),[l,f]),g=()=>h?Q("span",Object.assign({className:Re(Ng("text")),style:{fontSize:fl(m),color:c??l}},{children:h})):null;return Pe("div",Object.assign({className:Re(r,Ng([t,{vertical:i}])),style:e.style},{children:[Q("span",Object.assign({className:Re(Ng("spinner",t)),style:d},{children:mz(Ng)[t]})),g()]}))},gz="#fff",rh="rv-hairline",yz=`${rh}--top`,xz=`${rh}--left`,bz=`${rh}--surround`,Cz=`${rh}--top-bottom`,wz=`${rh}-unset--top-bottom`,kD="rv-shadow",_z="__REACT_VANT_COMPONENT",TD=W.createContext({}),[ah]=Cn("button"),Ez=e=>{const{color:r,loading:t,className:i,hairline:l,loadingText:f,round:c,square:h,plain:m,block:d,loadingType:g,nativeType:C,iconPosition:b}=e,x=$a(e,["color","loading","className","hairline","loadingText","round","square","plain","block","loadingType","nativeType","iconPosition"]),{parent:_}=W.useContext(TD),k=W.useMemo(()=>e.size||(_==null?void 0:_.size)||"normal",[_==null?void 0:_.size,e.size]),S=W.useMemo(()=>e.type||(_==null?void 0:_.type)||"default",[_==null?void 0:_.type,e.type]),A=W.useMemo(()=>m??(_==null?void 0:_.plain),[_==null?void 0:_.plain,m]),T=W.useMemo(()=>d??(_==null?void 0:_.block),[_==null?void 0:_.block,d]),D=W.useMemo(()=>b||(_==null?void 0:_.iconPosition)||"left",[_==null?void 0:_.iconPosition,b]),F=W.useMemo(()=>{var q;return(q=e.disabled)!==null&&q!==void 0?q:_==null?void 0:_.disabled},[_==null?void 0:_.disabled,e.disabled]),N=W.useMemo(()=>C||(_==null?void 0:_.nativeType)||"button",[_==null?void 0:_.nativeType,C]),P=W.useMemo(()=>e.tag||(_==null?void 0:_.tag)||"button",[_==null?void 0:_.tag,e.tag]),U=Re(i,ah([S,k,{plain:A,loading:t,disabled:F,hairline:l,block:T,round:c,square:h}]),{[bz]:l},e.shadow&&`${kD}--${+e.shadow}`),$=Object.assign({},e.style);r&&($.color=A?r:gz,A||($.background=r),r.indexOf("gradient")!==-1?$.border=0:$.borderColor=r);const O=q=>{!t&&!F&&e.onClick&&e.onClick(q)},z=()=>{if(t){const{loadingSize:q="20px"}=e;return Q(Z2,{className:Re(ah("loading")),size:q,type:g,color:S==="default"?void 0:""})}return null},j=()=>e.loading?z():e.icon?W.cloneElement(e.icon,{className:Re(ah("icon"))}):null,H=()=>{let q;return t?q=f:q=e.children||e.text,q?Q("span",Object.assign({className:Re(ah("text"))},{children:q}),"text"):null};return Q(P,Object.assign({},x,{disabled:F,className:U,style:$,type:N,onClick:O},{children:(()=>Pe("div",Object.assign({className:Re(ah("content"))},{children:[D==="left"&&j(),H(),D==="right"&&j()]})))()}))},[Sz]=Cn("button-group"),ih=Object.assign(Ez,{Group:e=>{var{className:r,style:t,children:i,onClick:l}=e,f=$a(e,["className","style","children","onClick"]);return Q("div",Object.assign({onClick:h=>{f.disabled||l==null||l(h)},style:t,className:Re(r,Sz([f.type,{round:f.round,plain:f.plain,disabled:f.disabled}]),f.shadow&&`${kD}--${+f.shadow}`)},{children:Q(TD.Provider,Object.assign({value:{parent:f}},{children:i}))}))}}),fZ="";function ea(...e){const r=Object.assign({},e[0]);return e.forEach(t=>{for(const i in t){const l=t[i];r[i]=r.hasOwnProperty(i)?r[i]:l}}),r}const[AD]=Cn("badge"),Dz=e=>{const r=ea(e,{tag:"div",showZero:!0}),{content:t,max:i,dot:l,showZero:f,tag:c="div"}=r,h=c,m=()=>r.content?!0:Jr(t)&&t!==""&&(f||+t!=0),d=()=>!l&&m()?Jr(i)&&pD(t==null?void 0:t.toString())&&+t>i?`${i}+`:t:null,g=()=>{if(m()||r.dot){let C={background:r.color};if(r.offset){const[b,x]=r.offset;r.children?(C.top=fl(x),C.right=fl(b)):(C.marginTop=fl(x),C.marginLeft=fl(b))}return r.children||(C=Object.assign(Object.assign({},r.style),C)),Q("div",Object.assign({className:Re({[r.className]:r.className&&!r.children},AD({dot:r.dot,fixed:!!r.children})),style:C},{children:d()}))}return null};return r.children?Pe(h,Object.assign({className:Re(AD("wrapper"),r.className),style:r.style,onClick:r.onClick,onTouchStart:r.onTouchStart},{children:[r.children,g()]})):g()},pZ="";var kz=globalThis&&globalThis.__rest||function(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t};function Tz(e){return e.substring(3).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}const ls=W.forwardRef((e,r)=>{const{name:t="",className:i,style:l,spin:f,rotate:c,tabIndex:h,onClick:m,children:d}=e,g=kz(e,["name","className","style","spin","rotate","tabIndex","onClick","children"]),C={};c&&(C.msTransform=`rotate(${c}deg)`,C.transform=`rotate(${c}deg)`);const b=t?Tz(t):void 0;let x=h;x===void 0&&m&&(x=-1);const _=Object.assign({role:"img","aria-label":b,focusable:"false","data-icon":b,"aria-hidden":"true",preserveAspectRatio:"xMidYMid meet",ref:r,tabIndex:x,onClick:m,className:["rv-icon",b?`rv-icon-${b}`:"",f?"rv-icon--spin":"",i].join(" ").trim(),style:Object.assign(Object.assign({},l),C)},g);return W.cloneElement(d,_)}),Az=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M494.094 733.426a41.472 41.472 0 01-20.023-11.126L140.16 388.388c-16.272-16.271-16.272-42.653 0-58.925 16.271-16.272 42.653-16.272 58.925 0L503.66 634.037 808.186 329.51c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L533.2 722.347c-10.607 10.607-25.508 14.3-39.106 11.08z",fillRule:"evenodd"})),Oz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgArrowDown"},e,{ref:r}),Ne.createElement(Az,null))),Rz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M296.114 508.035c-3.22-13.597.473-28.499 11.079-39.105l333.912-333.912c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L395.504 498.47l304.574 304.574c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L307.241 528.058a41.472 41.472 0 01-11.127-20.023z",fillRule:"evenodd"})),Fz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgArrowLeft"},e,{ref:r}),Ne.createElement(Rz,null))),Nz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M513.176 285.05a41.472 41.472 0 0120.024 11.127L867.11 630.089c16.272 16.271 16.272 42.653 0 58.925s-42.654 16.272-58.925 0L503.612 384.44 199.085 688.967c-16.272 16.271-42.654 16.271-58.925 0-16.272-16.272-16.272-42.654 0-58.926L474.07 296.129c10.606-10.606 25.508-14.299 39.105-11.078z",fillRule:"evenodd"})),Mz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgArrowUp"},e,{ref:r}),Ne.createElement(Nz,null))),Pz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M711.156 508.035a41.472 41.472 0 01-11.126 20.023L366.12 861.97c-16.272 16.272-42.654 16.272-58.926 0s-16.272-42.654 0-58.926L611.767 498.47 307.241 193.944c-16.272-16.272-16.272-42.654 0-58.926 16.271-16.272 42.653-16.272 58.925 0L700.078 468.93c10.606 10.606 14.299 25.508 11.078 39.105z",fillRule:"evenodd"})),Bz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgArrow"},e,{ref:r}),Ne.createElement(Pz,null))),Lz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M500 55.556c245.46 0 444.444 198.984 444.444 444.444S745.46 944.444 500 944.444 55.556 745.46 55.556 500 254.54 55.556 500 55.556zm176.441 267.887c-10.848-10.848-28.436-10.848-39.284 0L499.665 460.936 362.172 323.443c-10.848-10.848-28.436-10.848-39.284 0-10.848 10.848-10.848 28.436 0 39.284L460.38 500.22 322.888 637.713c-10.848 10.848-10.848 28.436 0 39.284 10.848 10.848 28.436 10.848 39.284 0l137.493-137.493 137.492 137.493c10.848 10.848 28.436 10.848 39.284 0 10.848-10.848 10.848-28.436 0-39.284L538.948 500.22l137.493-137.493c10.848-10.848 10.848-28.436 0-39.284z",fillRule:"evenodd"})),Mg=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgClear"},e,{ref:r}),Ne.createElement(Lz,null))),zz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M560.149 501.223l255.344 255.344c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L501.223 560.149 245.88 815.493c-16.272 16.272-42.654 16.272-58.925 0-16.272-16.272-16.272-42.654 0-58.926l255.344-255.344L186.954 245.88c-16.272-16.272-16.272-42.654 0-58.925 16.271-16.272 42.653-16.272 58.925 0l255.344 255.344 255.344-255.344c16.272-16.272 42.654-16.272 58.926 0 16.272 16.271 16.272 42.653 0 58.925L560.149 501.223z",fillRule:"nonzero"})),X2=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgCross"},e,{ref:r}),Ne.createElement(zz,null))),Uz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M537.5 537.5v325c0 20.71-16.79 37.5-37.5 37.5s-37.5-16.79-37.5-37.5v-325h-325c-20.71 0-37.5-16.79-37.5-37.5s16.79-37.5 37.5-37.5h325v-325c0-20.71 16.79-37.5 37.5-37.5s37.5 16.79 37.5 37.5v325h325c20.71 0 37.5 16.79 37.5 37.5s-16.79 37.5-37.5 37.5h-325z",fillRule:"nonzero"})),jz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgPlus"},e,{ref:r}),Ne.createElement(Uz,null))),Iz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M500 888.889c-214.389 0-388.889-174.5-388.889-388.889S285.611 111.111 500 111.111 888.889 285.611 888.889 500 714.389 888.889 500 888.889m0-833.333c-245.444 0-444.444 199-444.444 444.444 0 245.444 199 444.444 444.444 444.444 245.444 0 444.444-199 444.444-444.444 0-245.444-199-444.444-444.444-444.444m6.456 222.222c-44.612 0-80 12.778-105.612 39.055-26.277 25.667-39.055 60.445-39.055 105.056v1c0 17.944 14.444 32.444 32.389 32.444 17.889 0 32.389-14.5 32.389-32.444 0-.389-.111-1-.111-1 0-26.945 5.444-48.222 16.444-62.889 12.222-17.111 32.333-25.667 59.889-25.667 21.944 0 39.055 6.111 51.222 18.334 11.611 12.222 17.778 28.722 17.778 50.055 0 15.89-5.556 30.5-16.556 44.556l-10.389 11.61c-37.777 33.556-60.333 59-69.61 75.668-13.834 24.944-11.334 48-11.334 48 0 17.888 14.556 32.388 32.444 32.388 17.945 0 29.778-12.333 32.39-32.388 0 0 3.333-18.667 10.055-30.89 5.5-10.944 14.055-21.388 25-31.11 29.389-25.056 46.444-40.945 51.889-47.667 14.666-19.5 22.555-44.556 22.555-74.445 0-36.61-12.166-65.944-35.944-87.333-24.445-21.944-56.167-32.333-95.833-32.333m-10.417 357.15c-12.778 0-23.222 3.666-31.111 12.222-9.222 7.889-13.5 18.333-13.5 31.111 0 12.222 4.278 22.611 13.5 31.167 7.889 8.5 18.333 12.778 31.11 12.778 12.279 0 23.223-4.278 32.39-12.167 8.5-8.611 12.778-18.945 12.778-31.778 0-12.778-4.278-23.222-12.778-31.111-8.556-8.556-19.556-12.222-32.39-12.222",fillRule:"evenodd"})),Hz=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgQuestionO"},e,{ref:r}),Ne.createElement(Iz,null))),Vz=e=>Ne.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Ne.createElement("path",{d:"M119.415 524.046c-9.708-9.693-11.278-24.766-2.72-35.554l20.007-25.223c8.201-10.34 23.543-12.936 34.386-5.699l173.175 115.585c9.134 6.097 24.856 5.303 33.384-1.616l457.6-371.25c10.286-8.345 26.397-7.634 35.412 1.368l11.272 11.255c9.81 9.795 9.096 25.343-1.187 35.611l-491.14 490.414c-15.28 15.258-40.369 14.59-56.099-1.116l-214.09-213.775z",fillRule:"nonzero"})),OD=Ne.forwardRef((e,r)=>Ne.createElement(ls,Object.assign({name:"SvgSuccess"},e,{ref:r}),Ne.createElement(Vz,null))),EZ="",[RD]=Cn("cell-group"),$z=e=>{const r=ea(e,{border:!0}),{title:t,border:i,inset:l,card:f}=r,c=f||l,h=()=>Q("div",Object.assign({className:Re(RD({inset:c}),{[Cz]:!c&&i})},{children:r.children})),m=()=>t?Q("div",Object.assign({className:Re(RD("title"))},{children:t})):null;return Pe("div",Object.assign({className:r.className,style:r.style},{children:[m(),h()]}))},[dd]=Cn("cell"),J2=Object.assign(e=>{const r=()=>Jr(e.label)?Q("div",Object.assign({className:Re(dd("label"),e.labelClass)},{children:e.label})):null,t=()=>Jr(e.title)?Pe("div",Object.assign({className:Re(dd("title"),e.titleClass),style:e.titleStyle},{children:[e.title,r()]})):null,i=()=>{const S=Jr(e.title);return Jr(e.children)||Jr(e.value)?Q("div",Object.assign({className:Re(dd("value",{alone:!S}),e.valueClass)},{children:Jr(e.children)?e.children:Q("span",{children:e.value})})):null},l=()=>e.icon?W.cloneElement(e.icon,{className:Re(dd("left-icon"))}):null,f=()=>{if(e.rightIcon)return e.rightIcon;if(e.isLink){const S=Re(dd("right-icon"));return e.arrowDirection==="left"?Q(Fz,{className:S}):e.arrowDirection==="up"?Q(Mz,{className:S}):e.arrowDirection==="down"?Q(Oz,{className:S}):Q(Bz,{className:S})}return null},{className:c,style:h,size:m,center:d,border:g=!0,isLink:C,required:b,onClick:x}=e,_=C||e.clickable,k={center:d,required:b,clickable:_,borderless:!g};return m&&(k[m]=!!m),Pe("div",Object.assign({style:h,className:Re(dd(k),c),role:_?"button":void 0,onClick:x},{children:[l(),t(),i(),f(),e.extra]}))},{Group:$z}),TZ="",AZ="";function Pg(e,r){return Pg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Pg(e,r)}function FD(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Pg(e,r)}function Yz(e,r){return e.classList?!!r&&e.classList.contains(r):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+r+" ")!==-1}function qz(e,r){e.classList?e.classList.add(r):Yz(e,r)||(typeof e.className=="string"?e.className=e.className+" "+r:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+r))}function ND(e,r){return e.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Gz(e,r){e.classList?e.classList.remove(r):typeof e.className=="string"?e.className=ND(e.className,r):e.setAttribute("class",ND(e.className&&e.className.baseVal||"",r))}const MD={disabled:!1};var Kz=process.env.NODE_ENV!=="production"?wt.exports.oneOfType([wt.exports.number,wt.exports.shape({enter:wt.exports.number,exit:wt.exports.number,appear:wt.exports.number}).isRequired]):null,Wz=process.env.NODE_ENV!=="production"?wt.exports.oneOfType([wt.exports.string,wt.exports.shape({enter:wt.exports.string,exit:wt.exports.string,active:wt.exports.string}),wt.exports.shape({enter:wt.exports.string,enterDone:wt.exports.string,enterActive:wt.exports.string,exit:wt.exports.string,exitDone:wt.exports.string,exitActive:wt.exports.string})]):null;const PD=W.createContext(null);var oh="unmounted",Fc="exited",Nc="entering",pd="entered",eC="exiting",ss=function(e){FD(r,e);function r(i,l){var f;f=e.call(this,i,l)||this;var c=l,h=c&&!c.isMounting?i.enter:i.appear,m;return f.appearStatus=null,i.in?h?(m=Fc,f.appearStatus=Nc):m=pd:i.unmountOnExit||i.mountOnEnter?m=oh:m=Fc,f.state={status:m},f.nextCallback=null,f}r.getDerivedStateFromProps=function(l,f){var c=l.in;return c&&f.status===oh?{status:Fc}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(l){var f=null;if(l!==this.props){var c=this.state.status;this.props.in?c!==Nc&&c!==pd&&(f=Nc):(c===Nc||c===pd)&&(f=eC)}this.updateStatus(!1,f)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var l=this.props.timeout,f,c,h;return f=c=h=l,l!=null&&typeof l!="number"&&(f=l.exit,c=l.enter,h=l.appear!==void 0?l.appear:c),{exit:f,enter:c,appear:h}},t.updateStatus=function(l,f){l===void 0&&(l=!1),f!==null?(this.cancelNextCallback(),f===Nc?this.performEnter(l):this.performExit()):this.props.unmountOnExit&&this.state.status===Fc&&this.setState({status:oh})},t.performEnter=function(l){var f=this,c=this.props.enter,h=this.context?this.context.isMounting:l,m=this.props.nodeRef?[h]:[fg.findDOMNode(this),h],d=m[0],g=m[1],C=this.getTimeouts(),b=h?C.appear:C.enter;if(!l&&!c||MD.disabled){this.safeSetState({status:pd},function(){f.props.onEntered(d)});return}this.props.onEnter(d,g),this.safeSetState({status:Nc},function(){f.props.onEntering(d,g),f.onTransitionEnd(b,function(){f.safeSetState({status:pd},function(){f.props.onEntered(d,g)})})})},t.performExit=function(){var l=this,f=this.props.exit,c=this.getTimeouts(),h=this.props.nodeRef?void 0:fg.findDOMNode(this);if(!f||MD.disabled){this.safeSetState({status:Fc},function(){l.props.onExited(h)});return}this.props.onExit(h),this.safeSetState({status:eC},function(){l.props.onExiting(h),l.onTransitionEnd(c.exit,function(){l.safeSetState({status:Fc},function(){l.props.onExited(h)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(l,f){f=this.setNextCallback(f),this.setState(l,f)},t.setNextCallback=function(l){var f=this,c=!0;return this.nextCallback=function(h){c&&(c=!1,f.nextCallback=null,l(h))},this.nextCallback.cancel=function(){c=!1},this.nextCallback},t.onTransitionEnd=function(l,f){this.setNextCallback(f);var c=this.props.nodeRef?this.props.nodeRef.current:fg.findDOMNode(this),h=l==null&&!this.props.addEndListener;if(!c||h){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var m=this.props.nodeRef?[this.nextCallback]:[c,this.nextCallback],d=m[0],g=m[1];this.props.addEndListener(d,g)}l!=null&&setTimeout(this.nextCallback,l)},t.render=function(){var l=this.state.status;if(l===oh)return null;var f=this.props,c=f.children;f.in,f.mountOnEnter,f.unmountOnExit,f.appear,f.enter,f.exit,f.timeout,f.addEndListener,f.onEnter,f.onEntering,f.onEntered,f.onExit,f.onExiting,f.onExited,f.nodeRef;var h=wb(f,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(PD.Provider,{value:null},typeof c=="function"?c(l,h):W.cloneElement(W.Children.only(c),h))},r}(W.Component);ss.contextType=PD,ss.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:wt.exports.shape({current:typeof Element>"u"?wt.exports.any:function(e,r,t,i,l,f){var c=e[r];return wt.exports.instanceOf(c&&"ownerDocument"in c?c.ownerDocument.defaultView.Element:Element)(e,r,t,i,l,f)}}),children:wt.exports.oneOfType([wt.exports.func.isRequired,wt.exports.element.isRequired]).isRequired,in:wt.exports.bool,mountOnEnter:wt.exports.bool,unmountOnExit:wt.exports.bool,appear:wt.exports.bool,enter:wt.exports.bool,exit:wt.exports.bool,timeout:function(r){var t=Kz;r.addEndListener||(t=t.isRequired);for(var i=arguments.length,l=new Array(i>1?i-1:0),f=1;f<i;f++)l[f-1]=arguments[f];return t.apply(void 0,[r].concat(l))},addEndListener:wt.exports.func,onEnter:wt.exports.func,onEntering:wt.exports.func,onEntered:wt.exports.func,onExit:wt.exports.func,onExiting:wt.exports.func,onExited:wt.exports.func}:{};function hd(){}ss.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hd,onEntering:hd,onEntered:hd,onExit:hd,onExiting:hd,onExited:hd},ss.UNMOUNTED=oh,ss.EXITED=Fc,ss.ENTERING=Nc,ss.ENTERED=pd,ss.EXITING=eC;const BD=ss;var Qz=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return qz(r,i)})},tC=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Gz(r,i)})},nC=function(e){FD(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.appliedClasses={appear:{},enter:{},exit:{}},i.onEnter=function(h,m){var d=i.resolveArguments(h,m),g=d[0],C=d[1];i.removeClasses(g,"exit"),i.addClass(g,C?"appear":"enter","base"),i.props.onEnter&&i.props.onEnter(h,m)},i.onEntering=function(h,m){var d=i.resolveArguments(h,m),g=d[0],C=d[1],b=C?"appear":"enter";i.addClass(g,b,"active"),i.props.onEntering&&i.props.onEntering(h,m)},i.onEntered=function(h,m){var d=i.resolveArguments(h,m),g=d[0],C=d[1],b=C?"appear":"enter";i.removeClasses(g,b),i.addClass(g,b,"done"),i.props.onEntered&&i.props.onEntered(h,m)},i.onExit=function(h){var m=i.resolveArguments(h),d=m[0];i.removeClasses(d,"appear"),i.removeClasses(d,"enter"),i.addClass(d,"exit","base"),i.props.onExit&&i.props.onExit(h)},i.onExiting=function(h){var m=i.resolveArguments(h),d=m[0];i.addClass(d,"exit","active"),i.props.onExiting&&i.props.onExiting(h)},i.onExited=function(h){var m=i.resolveArguments(h),d=m[0];i.removeClasses(d,"exit"),i.addClass(d,"exit","done"),i.props.onExited&&i.props.onExited(h)},i.resolveArguments=function(h,m){return i.props.nodeRef?[i.props.nodeRef.current,h]:[h,m]},i.getClassNames=function(h){var m=i.props.classNames,d=typeof m=="string",g=d&&m?m+"-":"",C=d?""+g+h:m[h],b=d?C+"-active":m[h+"Active"],x=d?C+"-done":m[h+"Done"];return{baseClassName:C,activeClassName:b,doneClassName:x}},i}var t=r.prototype;return t.addClass=function(l,f,c){var h=this.getClassNames(f)[c+"ClassName"],m=this.getClassNames("enter"),d=m.doneClassName;f==="appear"&&c==="done"&&d&&(h+=" "+d),c==="active"&&l&&l.scrollTop,h&&(this.appliedClasses[f][c]=h,Qz(l,h))},t.removeClasses=function(l,f){var c=this.appliedClasses[f],h=c.base,m=c.active,d=c.done;this.appliedClasses[f]={},h&&tC(l,h),m&&tC(l,m),d&&tC(l,d)},t.render=function(){var l=this.props;l.classNames;var f=wb(l,["classNames"]);return W.createElement(BD,Nr({},f,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(W.Component);nC.defaultProps={classNames:""},nC.propTypes=process.env.NODE_ENV!=="production"?Nr({},BD.propTypes,{classNames:Wz,onEnter:wt.exports.func,onEntering:wt.exports.func,onEntered:wt.exports.func,onExit:wt.exports.func,onExiting:wt.exports.func,onExited:wt.exports.func}):{};const LD=nC;function dn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const OZ="",[Zz]=Cn("overlay"),Xz=e=>{const r=W.useRef(null),t=ea(e,{stopPropagation:["click"],lockScroll:!0,duration:300}),{visible:i,duration:l}=t,f=h=>{t.lockScroll&&Y2(h,!0)},c=()=>{const h=Object.assign(Object.assign({zIndex:t.zIndex!==void 0?+t.zIndex:void 0,touchAction:t.lockScroll&&"none"},t.style),t.customStyle);return Jr(l)&&(h.animationDuration=`${l}ms`),uD(t.stopPropagation,Q("div",Object.assign({ref:r,style:h,onClick:m=>{var d;m.target===m.currentTarget&&((d=t.onClick)===null||d===void 0||d.call(t,m))},className:Re(Zz(),t.className)},{children:t.children})))};return K2("touchmove",f,{target:r}),Q(LD,Object.assign({nodeRef:r,mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:l,classNames:"rv-fade"},{children:c()}))};function Jz(e){const{interceptor:r,args:t,done:i,canceled:l}=e;if(r){const f=r.apply(null,t||[]);IL(f)?f.then(c=>{c?i():l&&l()}).catch(Mi):f?i():l&&l()}else i()}function rC(e){return(typeof e=="function"?e():e)||document.body}function Bg(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function eU(e,r){if(Bg()&&e){const t=rC(e);return tu.exports.createPortal(r,t)}return r}const tU=W.createContext({});let zD=!1;if(Bg())try{const e={};Object.defineProperty(e,"passive",{get(){zD=!0}}),window.addEventListener("test-passive",null,e)}catch{}let lh=0;const UD="rv-overflow-hidden";function nU(e,r){const t=_D(),i=c=>{t.move(c);const h=t.deltaY.current>0?"10":"01",m=cz(c.target,e.current);if(!m)return;const{scrollHeight:d,offsetHeight:g,scrollTop:C}=m;let b="11";C===0?b=g>=d?"00":"01":C+g>=d&&(b="10"),b!=="11"&&t.isVertical()&&!(parseInt(b,2)&parseInt(h,2))&&c.cancelable&&c.preventDefault()},l=()=>{document.addEventListener("touchstart",t.start),document.addEventListener("touchmove",i,zD?{passive:!1}:!1),lh||document.body.classList.add(UD),lh++},f=()=>{lh&&(document.removeEventListener("touchstart",t.start),document.removeEventListener("touchmove",i),lh--,lh||document.body.classList.remove(UD))};W.useEffect(()=>{if(r)return l(),()=>{f()}},[r])}let jD=2e3;const[Lg]=Cn("popup"),sh=W.forwardRef((e,r)=>{var t;const i=ea(e,{duration:300,overlay:!0,lockScroll:!0,position:"center",closeIcon:Q(X2,{}),closeIconPosition:"top-right",closeOnClickOverlay:!0,stopPropagation:["click"],teleport:()=>document.body}),{round:l,closeable:f,title:c,description:h,children:m,duration:d,closeIcon:g,position:C}=i,b=W.useRef(!1),x=W.useRef((t=i.zIndex)!==null&&t!==void 0?t:jD),_=W.useRef(),[k,S]=W.useState(i.visible),[A,T]=W.useState(k),D=W.useMemo(()=>{const Y=Object.assign({zIndex:x.current},i.style);if(Jr(i.duration)){const q=i.position==="center"?"animationDuration":"transitionDuration";Y[q]=`${i.duration}ms`}return Y},[x.current,i.position,i.style,i.duration]),F=()=>{var Y;i.zIndex!==void 0?x.current=+i.zIndex:x.current=jD++,b.current=!0,(Y=i.onOpen)===null||Y===void 0||Y.call(i)},N=()=>{Jz({interceptor:i.beforeClose,args:["close"],done:()=>{var Y;b.current=!1,(Y=i.onClose)===null||Y===void 0||Y.call(i)}})},L=Y=>{var q;(q=i.onClickOverlay)===null||q===void 0||q.call(i,Y),i.closeOnClickOverlay&&N()},P=()=>i.overlay?Q(Xz,{visible:k,className:i.overlayClass,customStyle:i.overlayStyle,zIndex:x.current,duration:d,onClick:L}):null,U=Y=>{i.onClickCloseIcon&&i.onClickCloseIcon(Y),N()},$=()=>{if(f){const{closeIconPosition:Y}=i;return g?Q("div",Object.assign({className:Re(Lg("close-icon",Y)),onClick:U},{children:g})):null}return null},O=()=>c?Q("div",Object.assign({className:Re(Lg("title"))},{children:c})):null,z=()=>h?Q("div",Object.assign({className:Re(Lg("description"))},{children:h})):null,j=()=>{const{safeAreaInsetBottom:Y}=i;return uD(i.stopPropagation,Pe("div",Object.assign({ref:_,style:Object.assign(Object.assign({},D),{display:!k&&!A?"none":void 0}),className:Re(Lg({round:l,[C]:C}),{"rv-safe-area-bottom":Y},i.className),onClick:i.onClick},{children:[O(),z(),m,$()]})))},H=()=>{const{transition:Y,destroyOnClose:q,forceRender:X}=i,ne=C==="center"?"rv-fade":`rv-popup-slide-${C}`;return Q(LD,Object.assign({in:k,nodeRef:_,timeout:d,classNames:Y||ne,mountOnEnter:!X,unmountOnExit:q,onEnter:F,onEntered:i.onOpened,onExited:()=>{var G;T(!1),(G=i.onClosed)===null||G===void 0||G.call(i)}},{children:j()}))};return K2("popstate",()=>{i.closeOnPopstate&&N()}),th(()=>{k&&T(!0)},[k]),th(()=>{S(i.visible)},[i.visible]),nU(_,k&&i.lockScroll),W.useImperativeHandle(r,()=>({popupRef:_})),eU(i.teleport,Pe(tU.Provider,Object.assign({value:{visible:k}},{children:[P(),H()]})))}),MZ="",ID=W.createContext({}),[rU]=Cn("action-bar"),aU=e=>{const r=ea(e,{safeAreaInsetBottom:!0}),t=W.useMemo(()=>W.Children.toArray(r.children),[r.children]);return Q(ID.Provider,Object.assign({value:{parent:{children:t}}},{children:Q("div",Object.assign({className:Re(r.className,rU(),{"rv-safe-area-bottom":r.safeAreaInsetBottom}),style:r.style},{children:W.Children.toArray(r.children).filter(Boolean).map((i,l)=>W.cloneElement(i,{index:l}))}))}))},[HD]=Cn("action-bar-icon"),iU=e=>{const r=()=>{const{badge:t,icon:i}=e;return i?Q(Dz,Object.assign({},t,{className:Re(HD("icon"))},{children:i})):null};return Pe("div",Object.assign({role:"button",className:Re(e.className,HD()),style:e.style,tabIndex:0,onClick:e.onClick},{children:[r(),e.children||e.text]}))},[oU]=Cn("action-bar-button"),lU=Object.assign(e=>{const{type:r,icon:t,text:i,color:l,loading:f,disabled:c,index:h}=e,{parent:m}=W.useContext(ID),d=W.useMemo(()=>{if(m){const C=m.children[h-1];return!(C&&"isButton"in C.type)}return!1},[h,m]),g=W.useMemo(()=>{if(m){const C=m.children[h+1];return!(C&&"isButton"in C.type)}return!1},[h,m]);return Q(ih,Object.assign({className:Re(e.className,oU([r,{last:g,first:d}])),style:e.style,size:"large",type:r,icon:t,color:l,loading:f,disabled:c,onClick:e.onClick},{children:e.children?e.children:i}))},{isButton:!0}),aC=Object.assign(aU,{Icon:iU,Button:lU});function sU(e,r,t){const i=r[t];Jr(i)&&(!Object.prototype.hasOwnProperty.call(e,t)||!cd(i)?e[t]=i:e[t]=VD(Object(e[t]),r[t]))}function VD(e,r){return Object.keys(r).forEach(t=>{sU(e,r,t)}),e}const uU={locale:VD({name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,r)=>`${e}年${r}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanPicker:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新...",loading:"加载中..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码不正确",defaultAddress:"设为默认收货地址"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌信息"},vanAddressList:{add:"新增地址"}},{})},vd=W.createContext(uU),[Co]=Cn("dialog"),$D=e=>{const{locale:r}=W.useContext(vd),t=ea(e,{transition:"rv-dialog-bounce",showConfirmButton:!0,closeOnPopstate:!0}),{width:i,title:l,theme:f,visible:c,message:h,className:m,messageAlign:d,closeOnClickOverlay:g,onClickCloseIcon:C}=t,b=$a(t,["width","title","theme","visible","message","className","messageAlign","closeOnClickOverlay","onClickCloseIcon"]),x=()=>t.title?Q("div",Object.assign({className:Re(Co("header",{isolated:!t.message&&!t.children}))},{children:l})):null,_=()=>t.children?Q("div",Object.assign({className:Re(Co("content"))},{children:t.children})):h?Q("div",Object.assign({className:Re(Co("content",{isolated:!l}))},{children:Q("div",Object.assign({className:Re(Co("message",{"has-title":l,[d]:d}))},{children:h}))})):null,k=()=>{var T,D,F,N,L,P;return Pe("div",Object.assign({className:Re(yz,Co("footer"))},{children:[t.showCancelButton&&Q(ih,{size:"large",text:t.cancelButtonText||r.cancel,className:Re(Co("cancel")),style:{color:t.cancelButtonColor},loading:(T=t.cancelProps)===null||T===void 0?void 0:T.loading,disabled:(D=t.cancelProps)===null||D===void 0?void 0:D.disabled,onClick:!((F=t.cancelProps)===null||F===void 0)&&F.loading?Mi:t.onCancel}),t.showConfirmButton&&Q(ih,{size:"large",text:t.confirmButtonText||r.confirm,className:Re(Co("confirm"),{[xz]:t.showCancelButton}),round:f==="round-button"||void 0,style:{color:t.confirmButtonColor},loading:(N=t.confirmProps)===null||N===void 0?void 0:N.loading,disabled:(L=t.confirmProps)===null||L===void 0?void 0:L.disabled,onClick:!((P=t.confirmProps)===null||P===void 0)&&P.loading?Mi:t.onConfirm})]}))},S=()=>{var T,D,F,N,L,P;return Pe(aC,Object.assign({className:Re(Co("footer"))},{children:[t.showCancelButton&&Q(aC.Button,{type:"warning",text:t.cancelButtonText||r.cancel,className:Re(Co("cancel")),color:t.cancelButtonColor,loading:(T=t.cancelProps)===null||T===void 0?void 0:T.loading,disabled:(D=t.cancelProps)===null||D===void 0?void 0:D.disabled,onClick:!((F=t.cancelProps)===null||F===void 0)&&F.loading?Mi:t.onCancel}),t.showConfirmButton&&Q(aC.Button,{type:"danger",text:t.confirmButtonText||r.confirm,className:Re(Co("confirm")),color:t.confirmButtonColor,loading:(N=t.confirmProps)===null||N===void 0?void 0:N.loading,disabled:(L=t.confirmProps)===null||L===void 0?void 0:L.disabled,onClick:!((P=t.confirmProps)===null||P===void 0)&&P.loading?Mi:t.onConfirm})]}))},A=()=>t.footer?t.footer:t.theme==="round-button"?S():k();return Pe(sh,Object.assign({},b,{visible:c,className:Re(Co([f]),m),style:{width:fl(i)},"aria-labelledby":l||h,closeOnClickOverlay:g,onClickCloseIcon:C,onClose:t.onClose,onClosed:t.onClosed},{children:[x(),_(),A()]}))};Number((W.version||"").split(".")[0]);const cU=Number((tu.exports.version||"").split(".")[0]),zg=Object.assign({},v9),{render:fU,unmountComponentAtNode:dU}=zg;let Ug;try{cU>=18&&zg.createRoot&&(Ug=zg.createRoot)}catch{}function YD(e){const{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:r}=zg;r&&typeof r=="object"&&(r.usingClientEntryPoint=e)}const jg="__react_vant_root__";function pU(e,r){fU(e,r)}function hU(e,r){YD(!0);const t=r[jg]||Ug(r);YD(!1),t.render(e),r[jg]=t}function qD(e,r){if(Ug){hU(e,r);return}pU(e,r)}function vU(e){return dU(e)}function mU(e){return Q2(this,void 0,void 0,function*(){return Promise.resolve().then(()=>{var r;(r=e[jg])===null||r===void 0||r.unmount(),delete e[jg]})})}function GD(e){return Ug?mU(e):vU(e)}const md=$D;md.show=e=>{if(!Bg())return null;const r={overlay:!0,closeable:!1,closeIcon:Q(X2,{}),lockScroll:!0,transition:"rv-dialog-bounce",showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1},{onClosed:t,onCancel:i=Mi,onConfirm:l=Mi,onClose:f=Mi,cancelProps:c,confirmProps:h}=e,m=$a(e,["onClosed","onCancel","onConfirm","onClose","cancelProps","confirmProps"]),d=rC(e.teleport),g=document.createElement("div");d.appendChild(g);let C=Mi;return qD(Q(()=>{const[x,_]=W.useState(!1),[k,S]=W.useState(!1),[A,T]=W.useState(!1);W.useEffect(()=>{_(!0)},[]),C=()=>{_(!1),f&&f()};const D=()=>{t&&t(),GD(g)&&g.parentNode&&g.parentNode.removeChild(g)},F=L=>Q2(void 0,void 0,void 0,function*(){const P=setTimeout(()=>T(!0));(yield l(L))!==!1?(clearTimeout(P),C()):(clearTimeout(P),T(!1))}),N=(L,P)=>Q2(void 0,void 0,void 0,function*(){if(P){C();return}const U=setTimeout(()=>S(!0));(yield i(L))!==!1?(clearTimeout(U),C()):(clearTimeout(U),S(!1))});return Q($D,Object.assign({},r,m,{visible:x,teleport:()=>g,cancelProps:Object.assign({loading:k},c),confirmProps:Object.assign({loading:A},h),onClose:C,onCancel:N,onConfirm:F,onClosed:D}))},{}),g),C},md.alert=e=>{const{onConfirm:r=Mi}=e;return new Promise(t=>{md.show(Object.assign(Object.assign({},e),{onConfirm:i=>{r(i),t(i)}}))})},md.confirm=e=>{const{onCancel:r=Mi,onConfirm:t=Mi}=e;return new Promise((i,l)=>{md.show(Object.assign(Object.assign({showCancelButton:!0},e),{onCancel:f=>{r(f),l()},onConfirm:f=>{t(f),i(!0)}}))})};const gU=md,[uh]=Cn("input"),yU=W.forwardRef((e,r)=>{const t=ea(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),i=W.useRef(),[l,f]=W.useState(!1),c=W.useRef(!1),[h,m]=nh(t),{className:d,style:g,align:C,type:b,name:x,placeholder:_,disabled:k,readOnly:S,maxLength:A,autoFocus:T}=t,D=()=>{i!=null&&i.current&&i.current.focus()},F=()=>{i!=null&&i.current&&i.current.blur()};W.useImperativeHandle(r,()=>({clear:()=>{m("")},focus:D,blur:F,get nativeElement(){return i.current}}));const N=W.useMemo(()=>{if(t.clearable&&!S){const j=h!=="",H=t.clearTrigger==="always"||t.clearTrigger==="focus"&&l;return j&&H}return!1},[h,t.clearTrigger,l]),L=j=>{var H;let Y=j;if(!c.current&&(Jr(A)&&Y.length>+A&&(Y=Y.slice(0,A),(H=t.onOverlimit)===null||H===void 0||H.call(t)),b==="number"||b==="digit")){const q=b==="number";Y=nz(Y,q,q)}m(Y)},P=j=>{var H;f(!0),(H=t.onFocus)===null||H===void 0||H.call(t,j),S&&F()},U=j=>{var H;f(!1),(H=t.onBlur)===null||H===void 0||H.call(t,j),dD()},$=j=>{var H;(j.key==="Enter"||+j.charCode==13)&&(Y2(j),t.type==="search"&&F()),(H=t.onKeyPress)===null||H===void 0||H.call(t,j)},O=()=>{let j=b,H;return b==="number"&&(j="text",H="decimal"),b==="digit"&&(j="tel",H="numeric"),Q("input",{value:h,type:j,inputMode:H,ref:i,name:x,className:Re(uh("control")),disabled:k,autoFocus:T,readOnly:S,placeholder:_||"",onBlur:U,onFocus:P,onChange:Y=>{var q;return L((q=Y==null?void 0:Y.currentTarget)===null||q===void 0?void 0:q.value)},onKeyPress:$,autoCapitalize:t.autoCapitalize,autoCorrect:t.autoCorrect,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onCompositionStart:Y=>{var q;c.current=!0,(q=t.onCompositionStart)===null||q===void 0||q.call(t,Y)},onCompositionEnd:Y=>{var q,X;c.current=!1,(q=t.onCompositionEnd)===null||q===void 0||q.call(t,Y),L((X=Y==null?void 0:Y.currentTarget)===null||X===void 0?void 0:X.value)},onClick:t.onClick})},z=j=>{var H;m(""),(H=t.onClear)===null||H===void 0||H.call(t,j)};return Pe("div",Object.assign({className:Re(uh([C]),d),style:g},{children:[t.prefix&&Q("div",Object.assign({className:Re(uh("prefix"))},{children:t.prefix})),O(),N&&W.cloneElement(t.clearIcon||Q(Mg,{}),{className:Re(uh("clear")),onTouchStart:z}),t.suffix&&Q("div",Object.assign({className:Re(uh("suffix"))},{children:t.suffix}))]}))}),[ch]=Cn("textarea"),xU=W.forwardRef((e,r)=>{const t=ea(e,{rows:2,clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),[i,l]=W.useState(!1),f=W.useRef(),c=W.useRef(!1),[h,m]=nh(t),{className:d,style:g,name:C,rows:b,placeholder:x,disabled:_,readOnly:k,maxLength:S,showWordLimit:A,autoFocus:T}=t,D=()=>{f!=null&&f.current&&f.current.focus()},F=()=>{f!=null&&f.current&&f.current.blur()};W.useImperativeHandle(r,()=>({clear:()=>{m("")},focus:D,blur:F,get nativeElement(){return f.current}}));const N=()=>{const H=f.current;if(!H)return;H.style.height="auto";let Y=H.scrollHeight;if(cd(t.autoSize)){const{maxHeight:q,minHeight:X}=t.autoSize;q&&(Y=Math.min(Y,q)),X&&(Y=Math.max(Y,X))}Y&&(H.style.height=`${Y}px`)};W.useEffect(()=>{N()},[h]);const L=W.useMemo(()=>ch("control",[{"min-height":!t.autoSize,clear:t.clearable}]),[t.autoSize]),P=H=>{var Y;let q=H;c.current||Jr(S)&&q.length>+S&&(q=q.slice(0,S),(Y=t.onOverlimit)===null||Y===void 0||Y.call(t)),m(q)},U=H=>{var Y;l(!0),(Y=t.onFocus)===null||Y===void 0||Y.call(t,H),k&&F()},$=H=>{var Y;l(!1),(Y=t.onBlur)===null||Y===void 0||Y.call(t,H),dD()},O=()=>{if(A){const H=(h?`${h}`:"").length;return Q("div",Object.assign({className:Re(ch("word-limit"))},{children:typeof A=="function"?A({currentCount:H,maxLength:S}):Pe(rn,{children:[Q("span",Object.assign({className:Re(ch("word-num"))},{children:H})),S?`/${S}`:!1]})}))}return null},z=H=>{var Y;m(""),(Y=t.onClear)===null||Y===void 0||Y.call(t,H)},j=W.useMemo(()=>{if(t.clearable&&!k){const H=h!=="",Y=t.clearTrigger==="always"||t.clearTrigger==="focus"&&i;return H&&Y}return!1},[h,t.clearTrigger,i]);return Pe("div",Object.assign({className:Re(ch(),d),style:g},{children:[Q("textarea",{ref:f,name:C,rows:b,className:Re(L),value:h,disabled:_,autoFocus:T,readOnly:k,placeholder:x||"",onBlur:$,onFocus:U,onChange:H=>{var Y;return P((Y=H==null?void 0:H.currentTarget)===null||Y===void 0?void 0:Y.value)},onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,autoComplete:t.autoComplete,onCompositionStart:H=>{var Y;c.current=!0,(Y=t.onCompositionStart)===null||Y===void 0||Y.call(t,H)},onCompositionEnd:H=>{var Y,q;c.current=!1,(Y=t.onCompositionEnd)===null||Y===void 0||Y.call(t,H),P((q=H==null?void 0:H.currentTarget)===null||q===void 0?void 0:q.value)},onClick:t.onClick}),j&&W.cloneElement(t.clearIcon,{className:Re(ch("clear")),onTouchStart:z}),O()]}))}),KZ="",WZ="",cu=Object.assign(yU,{TextArea:xU}),[Pi]=Cn("field"),bU=W.forwardRef((e,r)=>{var t;const i=ea(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",formatTrigger:"onChange",defaultValue:""}),l=W.useRef(null),f=W.useRef(null),c=i.type==="textarea"?f:l,h=()=>{c.current&&c.current.focus()},m=()=>{c.current&&c.current.blur()},d=()=>{c.current&&c.current.clear()};W.useImperativeHandle(r,()=>({focus:h,blur:m,clear:d,get nativeElement(){return c.current.nativeElement}}));const g=V=>Jr(i[V])?i[V]:null,C=()=>{const V=g("labelWidth");return V?{width:fl(V)}:{}},b=(V,te="onChange")=>{const{formatTrigger:oe,formatter:re}=i;return re&&te===oe?re(V):V},x=V=>{var te;(te=i.onChange)===null||te===void 0||te.call(i,b(V))},_=()=>{const{value:V,defaultValue:te,align:oe,type:re,placeholder:pe,name:me,maxLength:Ce,disabled:se,readOnly:Ae,clearable:De,clearIcon:qe,clearTrigger:Se,autoFocus:We,onClear:Me,onBlur:bt,onFocus:ft,onKeyPress:It,onOverlimit:wn}=i;if(Jr(i.children))return Q("div",Object.assign({className:Re(Pi("children"))},{children:i.children}));const kn={value:V,onChange:x,placeholder:pe,name:me,defaultValue:te,disabled:se,clearable:De,clearIcon:qe,clearTrigger:Se,onClear:Me,onBlur:bt,onFocus:ft,onKeyPress:It,onOverlimit:wn,autoFocus:We,readOnly:Ae,maxLength:Ce,onClick:i.onClickInput};return re==="textarea"?Q(cu.TextArea,Object.assign({ref:f,autoSize:i.autoSize,showWordLimit:i.showWordLimit,rows:i.rows},kn)):Q(cu,Object.assign({ref:l,type:re,align:oe},kn))},k=()=>{const{leftIcon:V,onClickLeftIcon:te}=i;return V?Q("div",Object.assign({className:Re(Pi("left-icon")),onClick:te},{children:V})):null},S=()=>{const{rightIcon:V,onClickRightIcon:te}=i;return V?Q("div",Object.assign({className:Re(Pi("right-icon")),onClick:te},{children:V})):null},A=()=>{const V=i.errorMessage;return V?Q("div",Object.assign({className:Re(Pi("error-message"))},{children:V})):null},T=()=>i.intro?Q("div",Object.assign({className:Re(Pi("intro"))},{children:i.intro})):null,D=()=>{const{tooltip:V}=i;if(V){let te=Q(Hz,{}),oe={message:V};if(!(W.isValidElement(V)||typeof V=="string")){const re=V,{icon:pe}=re,me=$a(re,["icon"]);te=pe||te,oe=me}return Q("div",Object.assign({className:Re(Pi("tooltip")),onClick:()=>gU.show(oe)},{children:te}))}return null},F=()=>{const{label:V,colon:te}=i;return V?Pe(rn,{children:[V,!!te&&":",D()]}):null},{size:N,center:L,border:P,isLink:U,required:$,clickable:O,labelAlign:z,className:j,labelClass:H,valueClass:Y,controlAlign:q,arrowDirection:X,disabled:ne,titleStyle:G,error:ee}=i,Z=(t=i.suffix)!==null&&t!==void 0?t:i.button;return Pe(J2,Object.assign({title:F(),size:N,icon:k(),center:L,border:P,isLink:U,required:$,clickable:O,extra:i.extra,titleStyle:Object.assign(Object.assign({},C()),G),valueClass:Re(Pi("value",[q]),Y),titleClass:Re(Pi("label",z),H),arrowDirection:X,onClick:i.onClick,style:i.style,className:Re(Pi({error:ee,disabled:ne,[`label-${z}`]:z}),j)},{children:[Pe("div",Object.assign({className:Re(Pi("body"))},{children:[i.prefix&&Q("div",Object.assign({className:Re(Pi("prefix"))},{children:i.prefix})),Q("div",Object.assign({className:Re(Pi("control-wrapper"))},{children:_()})),S(),Z&&Q("div",Object.assign({className:Re(Pi("suffix"))},{children:Z}))]})),A(),T()]}))}),CU=Symbol("field"),iC=Object.assign(bU,{[_z]:CU});function wU(e,r,t){return Math.max(r,Math.min(e,t))}const Sa={toVector(e,r){return e===void 0&&(e=r),Array.isArray(e)?e:[e,e]},add(e,r){return[e[0]+r[0],e[1]+r[1]]},sub(e,r){return[e[0]-r[0],e[1]-r[1]]},addTo(e,r){e[0]+=r[0],e[1]+=r[1]},subTo(e,r){e[0]-=r[0],e[1]-=r[1]}};function KD(e,r,t){return r===0||Math.abs(r)===1/0?Math.pow(e,t*5):e*r*t/(r+t*e)}function WD(e,r,t,i=.15){return i===0?wU(e,r,t):e<r?-KD(r-e,t-r,i)+r:e>t?+KD(e-t,t-r,i)+t:e}function _U(e,[r,t],[i,l]){const[[f,c],[h,m]]=e;return[WD(r,f,c,i),WD(t,h,m,l)]}function si(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function QD(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function ar(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?QD(Object(t),!0).forEach(function(i){si(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QD(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}const ZD={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function XD(e){return e?e[0].toUpperCase()+e.slice(1):""}const EU=["enter","leave"];function SU(e=!1,r){return e&&!EU.includes(r)}function DU(e,r="",t=!1){const i=ZD[e],l=i&&i[r]||r;return"on"+XD(e)+XD(l)+(SU(t,l)?"Capture":"")}const kU=["gotpointercapture","lostpointercapture"];function TU(e){let r=e.substring(2).toLowerCase();const t=!!~r.indexOf("passive");t&&(r=r.replace("passive",""));const i=kU.includes(r)?"capturecapture":"capture",l=!!~r.indexOf(i);return l&&(r=r.replace("capture","")),{device:r,capture:l,passive:t}}function AU(e,r=""){const t=ZD[e],i=t&&t[r]||r;return e+i}function Ig(e){return"touches"in e}function JD(e){return Ig(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function OU(e){return Array.from(e.touches).filter(r=>{var t,i;return r.target===e.currentTarget||((t=e.currentTarget)===null||t===void 0||(i=t.contains)===null||i===void 0?void 0:i.call(t,r.target))})}function RU(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function ek(e){return Ig(e)?RU(e)[0]:e}function FU(e){return OU(e).map(r=>r.identifier)}function oC(e){const r=ek(e);return Ig(e)?r.identifier:r.pointerId}function tk(e){const r=ek(e);return[r.clientX,r.clientY]}function NU(e){const r={};if("buttons"in e&&(r.buttons=e.buttons),"shiftKey"in e){const{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f}=e;Object.assign(r,{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f})}return r}function Hg(e,...r){return typeof e=="function"?e(...r):e}function MU(){}function PU(...e){return e.length===0?MU:e.length===1?e[0]:function(){let r;for(const t of e)r=t.apply(this,arguments)||r;return r}}function nk(e,r){return Object.assign({},r,e||{})}const BU=32;class LU{constructor(r,t,i){this.ctrl=r,this.args=t,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(r){this.ctrl.state[this.key]=r}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:r,shared:t,ingKey:i,args:l}=this;t[i]=r._active=r.active=r._blocked=r._force=!1,r._step=[!1,!1],r.intentional=!1,r._movement=[0,0],r._distance=[0,0],r._direction=[0,0],r._delta=[0,0],r._bounds=[[-1/0,1/0],[-1/0,1/0]],r.args=l,r.axis=void 0,r.memo=void 0,r.elapsedTime=0,r.direction=[0,0],r.distance=[0,0],r.overflow=[0,0],r._movementBound=[!1,!1],r.velocity=[0,0],r.movement=[0,0],r.delta=[0,0],r.timeStamp=0}start(r){const t=this.state,i=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=r.target,t.currentTarget=r.currentTarget,t.lastOffset=i.from?Hg(i.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=r.timeStamp}computeValues(r){const t=this.state;t._values=r,t.values=this.config.transform(r)}computeInitial(){const r=this.state;r._initial=r._values,r.initial=r.values}compute(r){const{state:t,config:i,shared:l}=this;t.args=this.args;let f=0;if(r&&(t.event=r,i.preventDefault&&r.cancelable&&t.event.preventDefault(),t.type=r.type,l.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,l.locked=!!document.pointerLockElement,Object.assign(l,NU(r)),l.down=l.pressed=l.buttons%2===1||l.touches>0,f=r.timeStamp-t.timeStamp,t.timeStamp=r.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const L=t._delta.map(Math.abs);Sa.addTo(t._distance,L)}this.axisIntent&&this.axisIntent(r);const[c,h]=t._movement,[m,d]=i.threshold,{_step:g,values:C}=t;if(i.hasCustomTransform?(g[0]===!1&&(g[0]=Math.abs(c)>=m&&C[0]),g[1]===!1&&(g[1]=Math.abs(h)>=d&&C[1])):(g[0]===!1&&(g[0]=Math.abs(c)>=m&&Math.sign(c)*m),g[1]===!1&&(g[1]=Math.abs(h)>=d&&Math.sign(h)*d)),t.intentional=g[0]!==!1||g[1]!==!1,!t.intentional)return;const b=[0,0];if(i.hasCustomTransform){const[L,P]=C;b[0]=g[0]!==!1?L-g[0]:0,b[1]=g[1]!==!1?P-g[1]:0}else b[0]=g[0]!==!1?c-g[0]:0,b[1]=g[1]!==!1?h-g[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(b);const x=t.offset,_=t._active&&!t._blocked||t.active;_&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=l[this.ingKey]=t._active,r&&(t.first&&("bounds"in i&&(t._bounds=Hg(i.bounds,t)),this.setup&&this.setup()),t.movement=b,this.computeOffset()));const[k,S]=t.offset,[[A,T],[D,F]]=t._bounds;t.overflow=[k<A?-1:k>T?1:0,S<D?-1:S>F?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const N=t._active?i.rubberband||[0,0]:[0,0];if(t.offset=_U(t._bounds,t.offset,N),t.delta=Sa.sub(t.offset,x),this.computeMovement(),_&&(!t.last||f>BU)){t.delta=Sa.sub(t.offset,x);const L=t.delta.map(Math.abs);Sa.addTo(t.distance,L),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&f>0&&(t.velocity=[L[0]/f,L[1]/f])}}emit(){const r=this.state,t=this.shared,i=this.config;if(r._active||this.clean(),(r._blocked||!r.intentional)&&!r._force&&!i.triggerAllEvents)return;const l=this.handler(ar(ar(ar({},t),r),{},{[this.aliasKey]:r.values}));l!==void 0&&(r.memo=l)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function zU([e,r],t){const i=Math.abs(e),l=Math.abs(r);if(i>l&&i>t)return"x";if(l>i&&l>t)return"y"}class UU extends LU{constructor(...r){super(...r),si(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Sa.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Sa.sub(this.state.offset,this.state.lastOffset)}axisIntent(r){const t=this.state,i=this.config;if(!t.axis&&r){const l=typeof i.axisThreshold=="object"?i.axisThreshold[JD(r)]:i.axisThreshold;t.axis=zU(t._movement,l)}t._blocked=(i.lockDirection||!!i.axis)&&!t.axis||!!i.axis&&i.axis!==t.axis}restrictToAxis(r){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":r[1]=0;break;case"y":r[0]=0;break}}}const rk=e=>e,ak=.15,lC={enabled(e=!0){return e},eventOptions(e,r,t){return ar(ar({},t.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[ak,ak];case!1:return[0,0];default:return Sa.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Sa.toVector(e)},transform(e,r,t){const i=e||t.shared.transform;if(this.hasCustomTransform=!!i,process.env.NODE_ENV==="development"){const l=i||rk;return f=>{const c=l(f);return!isFinite(c[0])||isFinite(c[1]),c}}return i||rk},threshold(e){return Sa.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(lC,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const jU=0,fh=ar(ar({},lC),{},{axis(e,r,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(e=jU){return e},bounds(e={}){if(typeof e=="function")return f=>fh.bounds(e(f));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:r=-1/0,right:t=1/0,top:i=-1/0,bottom:l=1/0}=e;return[[r,t],[i,l]]}}),Vg=10,ik={ArrowRight:(e=1)=>[Vg*e,0],ArrowLeft:(e=1)=>[-Vg*e,0],ArrowUp:(e=1)=>[0,-Vg*e],ArrowDown:(e=1)=>[0,Vg*e]};class IU extends UU{constructor(...r){super(...r),si(this,"ingKey","dragging")}reset(){super.reset();const r=this.state;r._pointerId=void 0,r._pointerActive=!1,r._keyboardActive=!1,r._preventScroll=!1,r._delayed=!1,r.swipe=[0,0],r.tap=!1,r.canceled=!1,r.cancel=this.cancel.bind(this)}setup(){const r=this.state;if(r._bounds instanceof HTMLElement){const t=r._bounds.getBoundingClientRect(),i=r.currentTarget.getBoundingClientRect(),l={left:t.left-i.left+r.offset[0],right:t.right-i.right+r.offset[0],top:t.top-i.top+r.offset[1],bottom:t.bottom-i.bottom+r.offset[1]};r._bounds=fh.bounds(l)}}cancel(){const r=this.state;r.canceled||(r.canceled=!0,r._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(r){const t=this.config,i=this.state;if(r.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(r.buttons):t.pointerButtons!==-1&&t.pointerButtons!==r.buttons))return;const l=this.ctrl.setEventIds(r);t.pointerCapture&&r.target.setPointerCapture(r.pointerId),!(l&&l.size>1&&i._pointerActive)&&(this.start(r),this.setupPointer(r),i._pointerId=oC(r),i._pointerActive=!0,this.computeValues(tk(r)),this.computeInitial(),t.preventScrollAxis&&JD(r)!=="mouse"?(i._active=!1,this.setupScrollPrevention(r)):t.delay>0?(this.setupDelayTrigger(r),t.triggerAllEvents&&(this.compute(r),this.emit())):this.startPointerDrag(r))}startPointerDrag(r){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(r),this.emit()}pointerMove(r){const t=this.state,i=this.config;if(!t._pointerActive||t.type===r.type&&r.timeStamp===t.timeStamp)return;const l=oC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;const f=tk(r);if(document.pointerLockElement===r.target?t._delta=[r.movementX,r.movementY]:(t._delta=Sa.sub(f,t._values),this.computeValues(f)),Sa.addTo(t._movement,t._delta),this.compute(r),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(r);return}if(i.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===i.preventScrollAxis||i.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(r);return}else return;this.emit()}pointerUp(r){this.ctrl.setEventIds(r);try{this.config.pointerCapture&&r.target.hasPointerCapture(r.pointerId)&&r.target.releasePointerCapture(r.pointerId)}catch{process.env.NODE_ENV}const t=this.state,i=this.config;if(!t._active||!t._pointerActive)return;const l=oC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(r);const[f,c]=t._distance;if(t.tap=f<=i.tapsThreshold&&c<=i.tapsThreshold,t.tap&&i.filterTaps)t._force=!0;else{const[h,m]=t.direction,[d,g]=t.velocity,[C,b]=t.movement,[x,_]=i.swipe.velocity,[k,S]=i.swipe.distance,A=i.swipe.duration;t.elapsedTime<A&&(Math.abs(d)>x&&Math.abs(C)>k&&(t.swipe[0]=h),Math.abs(g)>_&&Math.abs(b)>S&&(t.swipe[1]=m))}this.emit()}pointerClick(r){this.state.tap||(r.preventDefault(),r.stopPropagation())}setupPointer(r){const t=this.config,i=t.device;if(process.env.NODE_ENV==="development")try{if(i==="pointer"&&t.preventScrollDelay===void 0){const l="uv"in r?r.sourceEvent.currentTarget:r.currentTarget;window.getComputedStyle(l).touchAction}}catch{}t.pointerLock&&r.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(r){this.state._preventScroll&&r.cancelable&&r.preventDefault()}setupScrollPrevention(r){this.state._preventScroll=!1,HU(r);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,r)}setupDelayTrigger(r){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(r)},this.config.delay)}keyDown(r){const t=ik[r.key];if(t){const i=this.state,l=r.shiftKey?10:r.altKey?.1:1;this.start(r),i._delta=t(l),i._keyboardActive=!0,Sa.addTo(i._movement,i._delta),this.compute(r),this.emit()}}keyUp(r){r.key in ik&&(this.state._keyboardActive=!1,this.setActive(),this.compute(r),this.emit())}bind(r){const t=this.config.device;r(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(r(t,"change",this.pointerMove.bind(this)),r(t,"end",this.pointerUp.bind(this)),r(t,"cancel",this.pointerUp.bind(this)),r("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(r("key","down",this.keyDown.bind(this)),r("key","up",this.keyUp.bind(this))),this.config.filterTaps&&r("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function HU(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const dh=typeof window<"u"&&window.document&&window.document.createElement;function VU(){return dh&&"ontouchstart"in window}function ok(){return VU()||dh&&window.navigator.maxTouchPoints>1}function $U(){return dh&&"onpointerdown"in window}function YU(){return dh&&"exitPointerLock"in window.document}function qU(){try{return"constructor"in GestureEvent}catch{return!1}}const eo={isBrowser:dh,gesture:qU(),touch:ok(),touchscreen:ok(),pointer:$U(),pointerLock:YU()},GU=250,KU=180,WU=.5,QU=50,ZU=250,lk={mouse:0,touch:0,pen:8},sk=ar(ar({},fh),{},{device(e,r,{pointer:{touch:t=!1,lock:i=!1,mouse:l=!1}={}}){return this.pointerLock=i&&eo.pointerLock,eo.touch&&t?"touch":this.pointerLock?"mouse":eo.pointer&&!l?"pointer":eo.touch?"touch":"mouse"},preventScrollAxis(e,r,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&e?GU:void 0,!(!eo.touchscreen||t===!1))return e||(t!==void 0?"y":void 0)},pointerCapture(e,r,{pointer:{capture:t=!0,buttons:i=1}={}}){return this.pointerButtons=i,!this.pointerLock&&this.device==="pointer"&&t},keys(e=!0){return e},threshold(e,r,{filterTaps:t=!1,tapsThreshold:i=3,axis:l=void 0}){const f=Sa.toVector(e,t?i:l?1:0);return this.filterTaps=t,this.tapsThreshold=i,f},swipe({velocity:e=WU,distance:r=QU,duration:t=ZU}={}){return{velocity:this.transform(Sa.toVector(e)),distance:this.transform(Sa.toVector(r)),duration:t}},delay(e=0){switch(e){case!0:return KU;case!1:return 0;default:return e}},axisThreshold(e){return e?ar(ar({},lk),e):lk}});process.env.NODE_ENV==="development"&&Object.assign(sk,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}}),ar(ar({},lC),{},{device(e,r,{shared:t,pointer:{touch:i=!1}={}}){if(t.target&&!eo.touch&&eo.gesture)return"gesture";if(eo.touch&&i)return"touch";if(eo.touchscreen){if(eo.pointer)return"pointer";if(eo.touch)return"touch"}},bounds(e,r,{scaleBounds:t={},angleBounds:i={}}){const l=c=>{const h=nk(Hg(t,c),{min:-1/0,max:1/0});return[h.min,h.max]},f=c=>{const h=nk(Hg(i,c),{min:-1/0,max:1/0});return[h.min,h.max]};return typeof t!="function"&&typeof i!="function"?[l(),f()]:c=>[l(c),f(c)]},threshold(e,r,t){return this.lockDirection=t.axis==="lock",Sa.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e}}),ar(ar({},fh),{},{mouseOnly:(e=!0)=>e}),ar(ar({},fh),{},{mouseOnly:(e=!0)=>e});const uk=new Map,sC=new Map;function XU(e){uk.set(e.key,e.engine),sC.set(e.key,e.resolver)}const JU={key:"drag",engine:IU,resolver:sk};function ej(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function tj(e,r){if(e==null)return{};var t=ej(e,r),i,l;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(l=0;l<f.length;l++)i=f[l],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}const nj={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=eo.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:r=!1}={}){return{passive:e,capture:r}},transform(e){return e}},rj=["target","eventOptions","window","enabled","transform"];function $g(e={},r){const t={};for(const[i,l]of Object.entries(r))switch(typeof l){case"function":if(process.env.NODE_ENV==="development"){const f=l.call(t,e[i],i,e);Number.isNaN(f)||(t[i]=f)}else t[i]=l.call(t,e[i],i,e);break;case"object":t[i]=$g(e[i],l);break;case"boolean":l&&(t[i]=e[i]);break}return t}function aj(e,r){const t=e,{target:i,eventOptions:l,window:f,enabled:c,transform:h}=t,m=tj(t,rj),d={shared:$g({target:i,eventOptions:l,window:f,enabled:c,transform:h},nj)};if(r){const g=sC.get(r);d[r]=$g(ar({shared:d.shared},m),g)}else for(const g in m){const C=sC.get(g);if(C)d[g]=$g(ar({shared:d.shared},m[g]),C);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(g)&&g==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.")}return d}class ck{constructor(r,t){si(this,"_listeners",new Set),this._ctrl=r,this._gestureKey=t}add(r,t,i,l,f){const c=this._listeners,h=AU(t,i),m=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},d=ar(ar({},m),f);r.addEventListener(h,l,d);const g=()=>{r.removeEventListener(h,l,d),c.delete(g)};return c.add(g),g}clean(){this._listeners.forEach(r=>r()),this._listeners.clear()}}class ij{constructor(){si(this,"_timeouts",new Map)}add(r,t,i=140,...l){this.remove(r),this._timeouts.set(r,window.setTimeout(t,i,...l))}remove(r){const t=this._timeouts.get(r);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(r=>void window.clearTimeout(r)),this._timeouts.clear()}}let oj=class{constructor(r){si(this,"gestures",new Set),si(this,"_targetEventStore",new ck(this)),si(this,"gestureEventStores",{}),si(this,"gestureTimeoutStores",{}),si(this,"handlers",{}),si(this,"config",{}),si(this,"pointerIds",new Set),si(this,"touchIds",new Set),si(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),lj(this,r)}setEventIds(r){if(Ig(r))return this.touchIds=new Set(FU(r)),this.touchIds;if("pointerId"in r)return r.type==="pointerup"||r.type==="pointercancel"?this.pointerIds.delete(r.pointerId):r.type==="pointerdown"&&this.pointerIds.add(r.pointerId),this.pointerIds}applyHandlers(r,t){this.handlers=r,this.nativeHandlers=t}applyConfig(r,t){this.config=aj(r,t)}clean(){this._targetEventStore.clean();for(const r of this.gestures)this.gestureEventStores[r].clean(),this.gestureTimeoutStores[r].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...r){const t=this.config.shared,i={};let l;if(!(t.target&&(l=t.target(),!l))){if(t.enabled){for(const c of this.gestures){const h=this.config[c],m=fk(i,h.eventOptions,!!l);if(h.enabled){const d=uk.get(c);new d(this,r,c).bind(m)}}const f=fk(i,t.eventOptions,!!l);for(const c in this.nativeHandlers)f(c,"",h=>this.nativeHandlers[c](ar(ar({},this.state.shared),{},{event:h,args:r})),void 0,!0)}for(const f in i)i[f]=PU(...i[f]);if(!l)return i;for(const f in i){const{device:c,capture:h,passive:m}=TU(f);this._targetEventStore.add(l,c,"",i[f],{capture:h,passive:m})}}}};function gd(e,r){e.gestures.add(r),e.gestureEventStores[r]=new ck(e,r),e.gestureTimeoutStores[r]=new ij}function lj(e,r){r.drag&&gd(e,"drag"),r.wheel&&gd(e,"wheel"),r.scroll&&gd(e,"scroll"),r.move&&gd(e,"move"),r.pinch&&gd(e,"pinch"),r.hover&&gd(e,"hover")}const fk=(e,r,t)=>(i,l,f,c={},h=!1)=>{var m,d;const g=(m=c.capture)!==null&&m!==void 0?m:r.capture,C=(d=c.passive)!==null&&d!==void 0?d:r.passive;let b=h?i:DU(i,l,g);t&&C&&(b+="Passive"),e[b]=e[b]||[],e[b].push(f)};function sj(e,r={},t,i){const l=W.useMemo(()=>new oj(e),[]);if(l.applyHandlers(e,i),l.applyConfig(r,t),W.useEffect(l.effect.bind(l)),W.useEffect(()=>l.clean.bind(l),[]),r.target===void 0)return l.bind.bind(l)}function uj(e,r){return XU(JU),sj({drag:e},r||{},"drag")}var uC=hh(),Nt=e=>ph(e,uC),cC=hh();Nt.write=e=>ph(e,cC);var Yg=hh();Nt.onStart=e=>ph(e,Yg);var fC=hh();Nt.onFrame=e=>ph(e,fC);var dC=hh();Nt.onFinish=e=>ph(e,dC);var yd=[];Nt.setTimeout=(e,r)=>{const t=Nt.now()+r,i=()=>{const f=yd.findIndex(c=>c.cancel==i);~f&&yd.splice(f,1),du-=~f?1:0},l={time:t,handler:e,cancel:i};return yd.splice(dk(t),0,l),du+=1,pk(),l};var dk=e=>~(~yd.findIndex(r=>r.time>e)||~yd.length);Nt.cancel=e=>{Yg.delete(e),fC.delete(e),dC.delete(e),uC.delete(e),cC.delete(e)},Nt.sync=e=>{hC=!0,Nt.batchedUpdates(e),hC=!1},Nt.throttle=e=>{let r;function t(){try{e(...r)}finally{r=null}}function i(...l){r=l,Nt.onStart(t)}return i.handler=e,i.cancel=()=>{Yg.delete(t),r=null},i};var pC=typeof window<"u"?window.requestAnimationFrame:()=>{};Nt.use=e=>pC=e,Nt.now=typeof performance<"u"?()=>performance.now():Date.now,Nt.batchedUpdates=e=>e(),Nt.catch=console.error,Nt.frameLoop="always",Nt.advance=()=>{Nt.frameLoop!=="demand"||vk()};var fu=-1,du=0,hC=!1;function ph(e,r){hC?(r.delete(e),e(0)):(r.add(e),pk())}function pk(){fu<0&&(fu=0,Nt.frameLoop!=="demand"&&pC(hk))}function cj(){fu=-1}function hk(){~fu&&(pC(hk),Nt.batchedUpdates(vk))}function vk(){const e=fu;fu=Nt.now();const r=dk(fu);if(r&&(mk(yd.splice(0,r),t=>t.handler()),du-=r),!du){cj();return}Yg.flush(),uC.flush(e?Math.min(64,fu-e):16.667),fC.flush(),cC.flush(),dC.flush()}function hh(){let e=new Set,r=e;return{add(t){du+=r==e&&!e.has(t)?1:0,e.add(t)},delete(t){return du-=r==e&&e.has(t)?1:0,e.delete(t)},flush(t){r.size&&(e=new Set,du-=r.size,mk(r,i=>i(t)&&e.add(i)),du+=e.size,r=e)}}}function mk(e,r){e.forEach(t=>{try{r(t)}catch(i){Nt.catch(i)}})}var fj=Object.defineProperty,dj=(e,r)=>{for(var t in r)fj(e,t,{get:r[t],enumerable:!0})},wo={};dj(wo,{assign:()=>hj,colors:()=>pu,createStringInterpolator:()=>gC,skipAnimation:()=>yk,to:()=>gk,willAdvance:()=>yC});function vC(){}var pj=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),Ye={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function us(e,r){if(Ye.arr(e)){if(!Ye.arr(r)||e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}return e===r}var Wt=(e,r)=>e.forEach(r);function pl(e,r,t){if(Ye.arr(e)){for(let i=0;i<e.length;i++)r.call(t,e[i],`${i}`);return}for(const i in e)e.hasOwnProperty(i)&&r.call(t,e[i],i)}var Bi=e=>Ye.und(e)?[]:Ye.arr(e)?e:[e];function vh(e,r){if(e.size){const t=Array.from(e);e.clear(),Wt(t,r)}}var mh=(e,...r)=>vh(e,t=>t(...r)),mC=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),gC,gk,pu=null,yk=!1,yC=vC,hj=e=>{e.to&&(gk=e.to),e.now&&(Nt.now=e.now),e.colors!==void 0&&(pu=e.colors),e.skipAnimation!=null&&(yk=e.skipAnimation),e.createStringInterpolator&&(gC=e.createStringInterpolator),e.requestAnimationFrame&&Nt.use(e.requestAnimationFrame),e.batchedUpdates&&(Nt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(yC=e.willAdvance),e.frameLoop&&(Nt.frameLoop=e.frameLoop)},gh=new Set,to=[],xC=[],qg=0,Gg={get idle(){return!gh.size&&!to.length},start(e){qg>e.priority?(gh.add(e),Nt.onStart(vj)):(xk(e),Nt(bC))},advance:bC,sort(e){if(qg)Nt.onFrame(()=>Gg.sort(e));else{const r=to.indexOf(e);~r&&(to.splice(r,1),bk(e))}},clear(){to=[],gh.clear()}};function vj(){gh.forEach(xk),gh.clear(),Nt(bC)}function xk(e){to.includes(e)||bk(e)}function bk(e){to.splice(mj(to,r=>r.priority>e.priority),0,e)}function bC(e){const r=xC;for(let t=0;t<to.length;t++){const i=to[t];qg=i.priority,i.idle||(yC(i),i.advance(e),i.idle||r.push(i))}return qg=0,xC=to,xC.length=0,to=r,to.length>0}function mj(e,r){const t=e.findIndex(r);return t<0?e.length:t}var gj=(e,r,t)=>Math.min(Math.max(t,e),r),yj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},_o="[-+]?\\d*\\.?\\d+",Kg=_o+"%";function Wg(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var xj=new RegExp("rgb"+Wg(_o,_o,_o)),bj=new RegExp("rgba"+Wg(_o,_o,_o,_o)),Cj=new RegExp("hsl"+Wg(_o,Kg,Kg)),wj=new RegExp("hsla"+Wg(_o,Kg,Kg,_o)),_j=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ej=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Sj=/^#([0-9a-fA-F]{6})$/,Dj=/^#([0-9a-fA-F]{8})$/;function kj(e){let r;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(r=Sj.exec(e))?parseInt(r[1]+"ff",16)>>>0:pu&&pu[e]!==void 0?pu[e]:(r=xj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|255)>>>0:(r=bj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|_k(r[4]))>>>0:(r=_j.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=Dj.exec(e))?parseInt(r[1],16)>>>0:(r=Ej.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=Cj.exec(e))?(Ck(wk(r[1]),Qg(r[2]),Qg(r[3]))|255)>>>0:(r=wj.exec(e))?(Ck(wk(r[1]),Qg(r[2]),Qg(r[3]))|_k(r[4]))>>>0:null}function CC(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*6*t:t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function Ck(e,r,t){const i=t<.5?t*(1+r):t+r-t*r,l=2*t-i,f=CC(l,i,e+1/3),c=CC(l,i,e),h=CC(l,i,e-1/3);return Math.round(f*255)<<24|Math.round(c*255)<<16|Math.round(h*255)<<8}function xd(e){const r=parseInt(e,10);return r<0?0:r>255?255:r}function wk(e){return(parseFloat(e)%360+360)%360/360}function _k(e){const r=parseFloat(e);return r<0?0:r>1?255:Math.round(r*255)}function Qg(e){const r=parseFloat(e);return r<0?0:r>100?1:r/100}function Ek(e){let r=kj(e);if(r===null)return e;r=r||0;const t=(r&4278190080)>>>24,i=(r&16711680)>>>16,l=(r&65280)>>>8,f=(r&255)/255;return`rgba(${t}, ${i}, ${l}, ${f})`}var yh=(e,r,t)=>{if(Ye.fun(e))return e;if(Ye.arr(e))return yh({range:e,output:r,extrapolate:t});if(Ye.str(e.output[0]))return gC(e);const i=e,l=i.output,f=i.range||[0,1],c=i.extrapolateLeft||i.extrapolate||"extend",h=i.extrapolateRight||i.extrapolate||"extend",m=i.easing||(d=>d);return d=>{const g=Aj(d,f);return Tj(d,f[g],f[g+1],l[g],l[g+1],m,c,h,i.map)}};function Tj(e,r,t,i,l,f,c,h,m){let d=m?m(e):e;if(d<r){if(c==="identity")return d;c==="clamp"&&(d=r)}if(d>t){if(h==="identity")return d;h==="clamp"&&(d=t)}return i===l?i:r===t?e<=r?i:l:(r===-1/0?d=-d:t===1/0?d=d-r:d=(d-r)/(t-r),d=f(d),i===-1/0?d=-d:l===1/0?d=d+i:d=d*(l-i)+i,d)}function Aj(e,r){for(var t=1;t<r.length-1&&!(r[t]>=e);++t);return t-1}var Oj=(e,r="end")=>t=>{t=r==="end"?Math.min(t,.999):Math.max(t,.001);const i=t*e,l=r==="end"?Math.floor(i):Math.ceil(i);return gj(0,1,l/e)},Zg=1.70158,Xg=Zg*1.525,Sk=Zg+1,Dk=2*Math.PI/3,kk=2*Math.PI/4.5,Jg=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Rj={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Sk*e*e*e-Zg*e*e,easeOutBack:e=>1+Sk*Math.pow(e-1,3)+Zg*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Xg+1)*2*e-Xg)/2:(Math.pow(2*e-2,2)*((Xg+1)*(e*2-2)+Xg)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Dk),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Dk)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*kk))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*kk)/2+1,easeInBounce:e=>1-Jg(1-e),easeOutBounce:Jg,easeInOutBounce:e=>e<.5?(1-Jg(1-2*e))/2:(1+Jg(2*e-1))/2,steps:Oj},xh=Symbol.for("FluidValue.get"),bd=Symbol.for("FluidValue.observers"),no=e=>Boolean(e&&e[xh]),ui=e=>e&&e[xh]?e[xh]():e,Tk=e=>e[bd]||null;function Fj(e,r){e.eventObserved?e.eventObserved(r):e(r)}function bh(e,r){const t=e[bd];t&&t.forEach(i=>{Fj(i,r)})}var Ak=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Nj(this,e)}},Nj=(e,r)=>Ok(e,xh,r);function Cd(e,r){if(e[xh]){let t=e[bd];t||Ok(e,bd,t=new Set),t.has(r)||(t.add(r),e.observerAdded&&e.observerAdded(t.size,r))}return r}function Ch(e,r){const t=e[bd];if(t&&t.has(r)){const i=t.size-1;i?t.delete(r):e[bd]=null,e.observerRemoved&&e.observerRemoved(i,r)}}var Ok=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),ey=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Mj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Rk=new RegExp(`(${ey.source})(%|[a-z]+)`,"i"),Pj=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ty=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Fk=e=>{const[r,t]=Bj(e);if(!r||mC())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);if(i)return i.trim();if(t&&t.startsWith("--")){const l=window.getComputedStyle(document.documentElement).getPropertyValue(t);return l||e}else{if(t&&ty.test(t))return Fk(t);if(t)return t}return e},Bj=e=>{const r=ty.exec(e);if(!r)return[,];const[,t,i]=r;return[t,i]},wC,Lj=(e,r,t,i,l)=>`rgba(${Math.round(r)}, ${Math.round(t)}, ${Math.round(i)}, ${l})`,Nk=e=>{wC||(wC=pu?new RegExp(`(${Object.keys(pu).join("|")})(?!\\w)`,"g"):/^\b$/);const r=e.output.map(f=>ui(f).replace(ty,Fk).replace(Mj,Ek).replace(wC,Ek)),t=r.map(f=>f.match(ey).map(Number)),l=t[0].map((f,c)=>t.map(h=>{if(!(c in h))throw Error('The arity of each "output" value must be equal');return h[c]})).map(f=>yh({...e,output:f}));return f=>{var m;const c=!Rk.test(r[0])&&((m=r.find(d=>Rk.test(d)))==null?void 0:m.replace(ey,""));let h=0;return r[0].replace(ey,()=>`${l[h++](f)}${c||""}`).replace(Pj,Lj)}},_C="react-spring: ",Mk=e=>{const r=e;let t=!1;if(typeof r!="function")throw new TypeError(`${_C}once requires a function parameter`);return(...i)=>{t||(r(...i),t=!0)}},zj=Mk(console.warn);function Uj(){zj(`${_C}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var jj=Mk(console.warn);function Ij(){jj(`${_C}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ny(e){return Ye.str(e)&&(e[0]=="#"||/\d/.test(e)||!mC()&&ty.test(e)||e in(pu||{}))}var EC=mC()?W.useEffect:W.useLayoutEffect,Hj=()=>{const e=W.useRef(!1);return EC(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Pk(){const e=W.useState()[1],r=Hj();return()=>{r.current&&e(Math.random())}}function Vj(e,r){const[t]=W.useState(()=>({inputs:r,result:e()})),i=W.useRef(),l=i.current;let f=l;return f?Boolean(r&&f.inputs&&$j(r,f.inputs))||(f={inputs:r,result:e()}):f=t,W.useEffect(()=>{i.current=f,l==t&&(t.inputs=t.result=void 0)},[f]),f.result}function $j(e,r){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}var Bk=e=>W.useEffect(e,Yj),Yj=[];function Lk(e){const r=W.useRef();return W.useEffect(()=>{r.current=e}),r.current}var wh=Symbol.for("Animated:node"),qj=e=>!!e&&e[wh]===e,hl=e=>e&&e[wh],SC=(e,r)=>pj(e,wh,r),ry=e=>e&&e[wh]&&e[wh].getPayload(),zk=class{constructor(){SC(this,this)}getPayload(){return this.payload||[]}},_h=class extends zk{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Ye.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new _h(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,r){return Ye.num(e)&&(this.lastPosition=e,r&&(e=Math.round(e/r)*r,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Ye.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Eh=class extends _h{constructor(e){super(0),this._string=null,this._toString=yh({output:[e,e]})}static create(e){return new Eh(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Ye.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=yh({output:[this.getValue(),e]})),this._value=0,super.reset()}},ay={dependencies:null},iy=class extends zk{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const r={};return pl(this.source,(t,i)=>{qj(t)?r[i]=t.getValue(e):no(t)?r[i]=ui(t):e||(r[i]=t)}),r}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Wt(this.payload,e=>e.reset())}_makePayload(e){if(e){const r=new Set;return pl(e,this._addToPayload,r),Array.from(r)}}_addToPayload(e){ay.dependencies&&no(e)&&ay.dependencies.add(e);const r=ry(e);r&&Wt(r,t=>this.add(t))}},Uk=class extends iy{constructor(e){super(e)}static create(e){return new Uk(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const r=this.getPayload();return e.length==r.length?r.map((t,i)=>t.setValue(e[i])).some(Boolean):(super.setValue(e.map(Gj)),!0)}};function Gj(e){return(ny(e)?Eh:_h).create(e)}function DC(e){const r=hl(e);return r?r.constructor:Ye.arr(e)?Uk:ny(e)?Eh:_h}var jk=(e,r)=>{const t=!Ye.fun(e)||e.prototype&&e.prototype.isReactComponent;return W.forwardRef((i,l)=>{const f=W.useRef(null),c=t&&W.useCallback(_=>{f.current=Qj(l,_)},[l]),[h,m]=Wj(i,r),d=Pk(),g=()=>{const _=f.current;if(t&&!_)return;(_?r.applyAnimatedValues(_,h.getValue(!0)):!1)===!1&&d()},C=new Kj(g,m),b=W.useRef();EC(()=>(b.current=C,Wt(m,_=>Cd(_,C)),()=>{b.current&&(Wt(b.current.deps,_=>Ch(_,b.current)),Nt.cancel(b.current.update))})),W.useEffect(g,[]),Bk(()=>()=>{const _=b.current;Wt(_.deps,k=>Ch(k,_))});const x=r.getComponentProps(h.getValue());return Ne.createElement(e,{...x,ref:c})})},Kj=class{constructor(e,r){this.update=e,this.deps=r}eventObserved(e){e.type=="change"&&Nt.write(this.update)}};function Wj(e,r){const t=new Set;return ay.dependencies=t,e.style&&(e={...e,style:r.createAnimatedStyle(e.style)}),e=new iy(e),ay.dependencies=null,[e,t]}function Qj(e,r){return e&&(Ye.fun(e)?e(r):e.current=r),r}var Ik=Symbol.for("AnimatedComponent"),Zj=(e,{applyAnimatedValues:r=()=>!1,createAnimatedStyle:t=l=>new iy(l),getComponentProps:i=l=>l}={})=>{const l={applyAnimatedValues:r,createAnimatedStyle:t,getComponentProps:i},f=c=>{const h=Hk(c)||"Anonymous";return Ye.str(c)?c=f[c]||(f[c]=jk(c,l)):c=c[Ik]||(c[Ik]=jk(c,l)),c.displayName=`Animated(${h})`,c};return pl(e,(c,h)=>{Ye.arr(e)&&(h=Hk(c)),f[h]=f(c)}),{animated:f}},Hk=e=>Ye.str(e)?e:e&&Ye.str(e.displayName)?e.displayName:Ye.fun(e)&&e.name||null;function Mc(e,...r){return Ye.fun(e)?e(...r):e}var Sh=(e,r)=>e===!0||!!(r&&e&&(Ye.fun(e)?e(r):Bi(e).includes(r))),Vk=(e,r)=>Ye.obj(e)?r&&e[r]:e,$k=(e,r)=>e.default===!0?e[r]:e.default?e.default[r]:void 0,Xj=e=>e,kC=(e,r=Xj)=>{let t=Jj;e.default&&e.default!==!0&&(e=e.default,t=Object.keys(e));const i={};for(const l of t){const f=r(e[l],l);Ye.und(f)||(i[l]=f)}return i},Jj=["config","onProps","onStart","onChange","onPause","onResume","onRest"],eI={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function tI(e){const r={};let t=0;if(pl(e,(i,l)=>{eI[l]||(r[l]=i,t++)}),t)return r}function Yk(e){const r=tI(e);if(r){const t={to:r};return pl(e,(i,l)=>l in r||(t[l]=i)),t}return{...e}}function Dh(e){return e=ui(e),Ye.arr(e)?e.map(Dh):ny(e)?wo.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function nI(e){for(const r in e)return!0;return!1}function TC(e){return Ye.fun(e)||Ye.arr(e)&&Ye.obj(e[0])}function rI(e,r){var t;(t=e.ref)==null||t.delete(e),r==null||r.delete(e)}function aI(e,r){var t;r&&e.ref!==r&&((t=e.ref)==null||t.delete(e),r.add(e),e.ref=r)}var iI={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},AC={...iI.default,mass:1,damping:1,easing:Rj.linear,clamp:!1},oI=class{constructor(){this.velocity=0,Object.assign(this,AC)}};function lI(e,r,t){t&&(t={...t},qk(t,r),r={...t,...r}),qk(e,r),Object.assign(e,r);for(const c in AC)e[c]==null&&(e[c]=AC[c]);let{frequency:i,damping:l}=e;const{mass:f}=e;return Ye.und(i)||(i<.01&&(i=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/i,2)*f,e.friction=4*Math.PI*l*f/i),e}function qk(e,r){if(!Ye.und(r.decay))e.duration=void 0;else{const t=!Ye.und(r.tension)||!Ye.und(r.friction);(t||!Ye.und(r.frequency)||!Ye.und(r.damping)||!Ye.und(r.mass))&&(e.duration=void 0,e.decay=void 0),t&&(e.frequency=void 0)}}var Gk=[],sI=class{constructor(){this.changed=!1,this.values=Gk,this.toValues=null,this.fromValues=Gk,this.config=new oI,this.immediate=!1}};function Kk(e,{key:r,props:t,defaultProps:i,state:l,actions:f}){return new Promise((c,h)=>{let m,d,g=Sh(t.cancel??(i==null?void 0:i.cancel),r);if(g)x();else{Ye.und(t.pause)||(l.paused=Sh(t.pause,r));let _=i==null?void 0:i.pause;_!==!0&&(_=l.paused||Sh(_,r)),m=Mc(t.delay||0,r),_?(l.resumeQueue.add(b),f.pause()):(f.resume(),b())}function C(){l.resumeQueue.add(b),l.timeouts.delete(d),d.cancel(),m=d.time-Nt.now()}function b(){m>0&&!wo.skipAnimation?(l.delayed=!0,d=Nt.setTimeout(x,m),l.pauseQueue.add(C),l.timeouts.add(d)):x()}function x(){l.delayed&&(l.delayed=!1),l.pauseQueue.delete(C),l.timeouts.delete(d),e<=(l.cancelId||0)&&(g=!0);try{f.start({...t,callId:e,cancel:g},c)}catch(_){h(_)}}})}var OC=(e,r)=>r.length==1?r[0]:r.some(t=>t.cancelled)?wd(e.get()):r.every(t=>t.noop)?Wk(e.get()):Eo(e.get(),r.every(t=>t.finished)),Wk=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Eo=(e,r,t=!1)=>({value:e,finished:r,cancelled:t}),wd=e=>({value:e,cancelled:!0,finished:!1});function Qk(e,r,t,i){const{callId:l,parentId:f,onRest:c}=r,{asyncTo:h,promise:m}=t;return!f&&e===h&&!r.reset?m:t.promise=(async()=>{t.asyncId=l,t.asyncTo=e;const d=kC(r,(S,A)=>A==="onRest"?void 0:S);let g,C;const b=new Promise((S,A)=>(g=S,C=A)),x=S=>{const A=l<=(t.cancelId||0)&&wd(i)||l!==t.asyncId&&Eo(i,!1);if(A)throw S.result=A,C(S),S},_=(S,A)=>{const T=new Zk,D=new Xk;return(async()=>{if(wo.skipAnimation)throw kh(t),D.result=Eo(i,!1),C(D),D;x(T);const F=Ye.obj(S)?{...S}:{...A,to:S};F.parentId=l,pl(d,(L,P)=>{Ye.und(F[P])&&(F[P]=L)});const N=await i.start(F);return x(T),t.paused&&await new Promise(L=>{t.resumeQueue.add(L)}),N})()};let k;if(wo.skipAnimation)return kh(t),Eo(i,!1);try{let S;Ye.arr(e)?S=(async A=>{for(const T of A)await _(T)})(e):S=Promise.resolve(e(_,i.stop.bind(i))),await Promise.all([S.then(g),b]),k=Eo(i.get(),!0,!1)}catch(S){if(S instanceof Zk)k=S.result;else if(S instanceof Xk)k=S.result;else throw S}finally{l==t.asyncId&&(t.asyncId=f,t.asyncTo=f?h:void 0,t.promise=f?m:void 0)}return Ye.fun(c)&&Nt.batchedUpdates(()=>{c(k,i,i.item)}),k})()}function kh(e,r){vh(e.timeouts,t=>t.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,r&&(e.cancelId=r)}var Zk=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Xk=class extends Error{constructor(){super("SkipAnimationSignal")}},RC=e=>e instanceof FC,uI=1,FC=class extends Ak{constructor(){super(...arguments),this.id=uI++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=hl(this);return e&&e.getValue()}to(...e){return wo.to(this,e)}interpolate(...e){return Uj(),wo.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,r=!1){bh(this,{type:"change",parent:this,value:e,idle:r})}_onPriorityChange(e){this.idle||Gg.sort(this),bh(this,{type:"priority",parent:this,priority:e})}},Pc=Symbol.for("SpringPhase"),Jk=1,NC=2,MC=4,PC=e=>(e[Pc]&Jk)>0,hu=e=>(e[Pc]&NC)>0,Th=e=>(e[Pc]&MC)>0,eT=(e,r)=>r?e[Pc]|=NC|Jk:e[Pc]&=~NC,tT=(e,r)=>r?e[Pc]|=MC:e[Pc]&=~MC,cI=class extends FC{constructor(e,r){if(super(),this.animation=new sI,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Ye.und(e)||!Ye.und(r)){const t=Ye.obj(e)?{...e}:{...r,from:e};Ye.und(t.default)&&(t.default=!0),this.start(t)}}get idle(){return!(hu(this)||this._state.asyncTo)||Th(this)}get goal(){return ui(this.animation.to)}get velocity(){const e=hl(this);return e instanceof _h?e.lastVelocity||0:e.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return PC(this)}get isAnimating(){return hu(this)}get isPaused(){return Th(this)}get isDelayed(){return this._state.delayed}advance(e){let r=!0,t=!1;const i=this.animation;let{toValues:l}=i;const{config:f}=i,c=ry(i.to);!c&&no(i.to)&&(l=Bi(ui(i.to))),i.values.forEach((d,g)=>{if(d.done)return;const C=d.constructor==Eh?1:c?c[g].lastPosition:l[g];let b=i.immediate,x=C;if(!b){if(x=d.lastPosition,f.tension<=0){d.done=!0;return}let _=d.elapsedTime+=e;const k=i.fromValues[g],S=d.v0!=null?d.v0:d.v0=Ye.arr(f.velocity)?f.velocity[g]:f.velocity;let A;const T=f.precision||(k==C?.005:Math.min(1,Math.abs(C-k)*.001));if(Ye.und(f.duration))if(f.decay){const D=f.decay===!0?.998:f.decay,F=Math.exp(-(1-D)*_);x=k+S/(1-D)*(1-F),b=Math.abs(d.lastPosition-x)<=T,A=S*F}else{A=d.lastVelocity==null?S:d.lastVelocity;const D=f.restVelocity||T/10,F=f.clamp?0:f.bounce,N=!Ye.und(F),L=k==C?d.v0>0:k<C;let P,U=!1;const $=1,O=Math.ceil(e/$);for(let z=0;z<O&&(P=Math.abs(A)>D,!(!P&&(b=Math.abs(C-x)<=T,b)));++z){N&&(U=x==C||x>C==L,U&&(A=-A*F,x=C));const j=-f.tension*1e-6*(x-C),H=-f.friction*.001*A,Y=(j+H)/f.mass;A=A+Y*$,x=x+A*$}}else{let D=1;f.duration>0&&(this._memoizedDuration!==f.duration&&(this._memoizedDuration=f.duration,d.durationProgress>0&&(d.elapsedTime=f.duration*d.durationProgress,_=d.elapsedTime+=e)),D=(f.progress||0)+_/this._memoizedDuration,D=D>1?1:D<0?0:D,d.durationProgress=D),x=k+f.easing(D)*(C-k),A=(x-d.lastPosition)/e,b=D==1}d.lastVelocity=A,Number.isNaN(x)&&(b=!0)}c&&!c[g].done&&(b=!1),b?d.done=!0:r=!1,d.setValue(x,f.round)&&(t=!0)});const h=hl(this),m=h.getValue();if(r){const d=ui(i.to);(m!==d||t)&&!f.decay?(h.setValue(d),this._onChange(d)):t&&f.decay&&this._onChange(m),this._stop()}else t&&this._onChange(m)}set(e){return Nt.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(hu(this)){const{to:e,config:r}=this.animation;Nt.batchedUpdates(()=>{this._onStart(),r.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,r){let t;return Ye.und(e)?(t=this.queue||[],this.queue=[]):t=[Ye.obj(e)?e:{...r,to:e}],Promise.all(t.map(i=>this._update(i))).then(i=>OC(this,i))}stop(e){const{to:r}=this.animation;return this._focus(this.get()),kh(this._state,e&&this._lastCallId),Nt.batchedUpdates(()=>this._stop(r,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const r=this.key||"";let{to:t,from:i}=e;t=Ye.obj(t)?t[r]:t,(t==null||TC(t))&&(t=void 0),i=Ye.obj(i)?i[r]:i,i==null&&(i=void 0);const l={to:t,from:i};return PC(this)||(e.reverse&&([t,i]=[i,t]),i=ui(i),Ye.und(i)?hl(this)||this._set(t):this._set(i)),l}_update({...e},r){const{key:t,defaultProps:i}=this;e.default&&Object.assign(i,kC(e,(c,h)=>/^on/.test(h)?Vk(c,t):c)),aT(this,e,"onProps"),Rh(this,"onProps",e,this);const l=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const f=this._state;return Kk(++this._lastCallId,{key:t,props:e,defaultProps:i,state:f,actions:{pause:()=>{Th(this)||(tT(this,!0),mh(f.pauseQueue),Rh(this,"onPause",Eo(this,Ah(this,this.animation.to)),this))},resume:()=>{Th(this)&&(tT(this,!1),hu(this)&&this._resume(),mh(f.resumeQueue),Rh(this,"onResume",Eo(this,Ah(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then(c=>{if(e.loop&&c.finished&&!(r&&c.noop)){const h=nT(e);if(h)return this._update(h,!0)}return c})}_merge(e,r,t){if(r.cancel)return this.stop(!0),t(wd(this));const i=!Ye.und(e.to),l=!Ye.und(e.from);if(i||l)if(r.callId>this._lastToId)this._lastToId=r.callId;else return t(wd(this));const{key:f,defaultProps:c,animation:h}=this,{to:m,from:d}=h;let{to:g=m,from:C=d}=e;l&&!i&&(!r.default||Ye.und(g))&&(g=C),r.reverse&&([g,C]=[C,g]);const b=!us(C,d);b&&(h.from=C),C=ui(C);const x=!us(g,m);x&&this._focus(g);const _=TC(r.to),{config:k}=h,{decay:S,velocity:A}=k;(i||l)&&(k.velocity=0),r.config&&!_&&lI(k,Mc(r.config,f),r.config!==c.config?Mc(c.config,f):void 0);let T=hl(this);if(!T||Ye.und(g))return t(Eo(this,!0));const D=Ye.und(r.reset)?l&&!r.default:!Ye.und(C)&&Sh(r.reset,f),F=D?C:this.get(),N=Dh(g),L=Ye.num(N)||Ye.arr(N)||ny(N),P=!_&&(!L||Sh(c.immediate||r.immediate,f));if(x){const z=DC(g);if(z!==T.constructor)if(P)T=this._set(N);else throw Error(`Cannot animate between ${T.constructor.name} and ${z.name}, as the "to" prop suggests`)}const U=T.constructor;let $=no(g),O=!1;if(!$){const z=D||!PC(this)&&b;(x||z)&&(O=us(Dh(F),N),$=!O),(!us(h.immediate,P)&&!P||!us(k.decay,S)||!us(k.velocity,A))&&($=!0)}if(O&&hu(this)&&(h.changed&&!D?$=!0:$||this._stop(m)),!_&&(($||no(m))&&(h.values=T.getPayload(),h.toValues=no(g)?null:U==Eh?[1]:Bi(N)),h.immediate!=P&&(h.immediate=P,!P&&!D&&this._set(m)),$)){const{onRest:z}=h;Wt(dI,H=>aT(this,r,H));const j=Eo(this,Ah(this,m));mh(this._pendingCalls,j),this._pendingCalls.add(t),h.changed&&Nt.batchedUpdates(()=>{var H;h.changed=!D,z==null||z(j,this),D?Mc(c.onRest,j):(H=h.onStart)==null||H.call(h,j,this)})}D&&this._set(F),_?t(Qk(r.to,r,this._state,this)):$?this._start():hu(this)&&!x?this._pendingCalls.add(t):t(Wk(F))}_focus(e){const r=this.animation;e!==r.to&&(Tk(this)&&this._detach(),r.to=e,Tk(this)&&this._attach())}_attach(){let e=0;const{to:r}=this.animation;no(r)&&(Cd(r,this),RC(r)&&(e=r.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;no(e)&&Ch(e,this)}_set(e,r=!0){const t=ui(e);if(!Ye.und(t)){const i=hl(this);if(!i||!us(t,i.getValue())){const l=DC(t);!i||i.constructor!=l?SC(this,l.create(t)):i.setValue(t),i&&Nt.batchedUpdates(()=>{this._onChange(t,r)})}}return hl(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Rh(this,"onStart",Eo(this,Ah(this,e.to)),this))}_onChange(e,r){r||(this._onStart(),Mc(this.animation.onChange,e,this)),Mc(this.defaultProps.onChange,e,this),super._onChange(e,r)}_start(){const e=this.animation;hl(this).reset(ui(e.to)),e.immediate||(e.fromValues=e.values.map(r=>r.lastPosition)),hu(this)||(eT(this,!0),Th(this)||this._resume())}_resume(){wo.skipAnimation?this.finish():Gg.start(this)}_stop(e,r){if(hu(this)){eT(this,!1);const t=this.animation;Wt(t.values,l=>{l.done=!0}),t.toValues&&(t.onChange=t.onPause=t.onResume=void 0),bh(this,{type:"idle",parent:this});const i=r?wd(this.get()):Eo(this.get(),Ah(this,e??t.to));mh(this._pendingCalls,i),t.changed&&(t.changed=!1,Rh(this,"onRest",i,this))}}};function Ah(e,r){const t=Dh(r),i=Dh(e.get());return us(i,t)}function nT(e,r=e.loop,t=e.to){const i=Mc(r);if(i){const l=i!==!0&&Yk(i),f=(l||e).reverse,c=!l||l.reset;return Oh({...e,loop:r,default:!1,pause:void 0,to:!f||TC(t)?t:void 0,from:c?e.from:void 0,reset:c,...l})}}function Oh(e){const{to:r,from:t}=e=Yk(e),i=new Set;return Ye.obj(r)&&rT(r,i),Ye.obj(t)&&rT(t,i),e.keys=i.size?Array.from(i):null,e}function fI(e){const r=Oh(e);return Ye.und(r.default)&&(r.default=kC(r)),r}function rT(e,r){pl(e,(t,i)=>t!=null&&r.add(i))}var dI=["onStart","onRest","onChange","onPause","onResume"];function aT(e,r,t){e.animation[t]=r[t]!==$k(r,t)?Vk(r[t],e.key):void 0}function Rh(e,r,...t){var i,l,f,c;(l=(i=e.animation)[r])==null||l.call(i,...t),(c=(f=e.defaultProps)[r])==null||c.call(f,...t)}var pI=["onStart","onChange","onRest"],hI=1,vI=class{constructor(e,r){this.id=hI++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((r,t)=>e[t]=r.get()),e}set(e){for(const r in e){const t=e[r];Ye.und(t)||this.springs[r].set(t)}}update(e){return e&&this.queue.push(Oh(e)),this}start(e){let{queue:r}=this;return e?r=Bi(e).map(Oh):this.queue=[],this._flush?this._flush(this,r):(cT(this,r),BC(this,r))}stop(e,r){if(e!==!!e&&(r=e),r){const t=this.springs;Wt(Bi(r),i=>t[i].stop(!!e))}else kh(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(Ye.und(e))this.start({pause:!0});else{const r=this.springs;Wt(Bi(e),t=>r[t].pause())}return this}resume(e){if(Ye.und(e))this.start({pause:!1});else{const r=this.springs;Wt(Bi(e),t=>r[t].resume())}return this}each(e){pl(this.springs,e)}_onFrame(){const{onStart:e,onChange:r,onRest:t}=this._events,i=this._active.size>0,l=this._changed.size>0;(i&&!this._started||l&&!this._started)&&(this._started=!0,vh(e,([h,m])=>{m.value=this.get(),h(m,this,this._item)}));const f=!i&&this._started,c=l||f&&t.size?this.get():null;l&&r.size&&vh(r,([h,m])=>{m.value=c,h(m,this,this._item)}),f&&(this._started=!1,vh(t,([h,m])=>{m.value=c,h(m,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Nt.onFrame(this._onFrame)}};function BC(e,r){return Promise.all(r.map(t=>iT(e,t))).then(t=>OC(e,t))}async function iT(e,r,t){const{keys:i,to:l,from:f,loop:c,onRest:h,onResolve:m}=r,d=Ye.obj(r.default)&&r.default;c&&(r.loop=!1),l===!1&&(r.to=null),f===!1&&(r.from=null);const g=Ye.arr(l)||Ye.fun(l)?l:void 0;g?(r.to=void 0,r.onRest=void 0,d&&(d.onRest=void 0)):Wt(pI,k=>{const S=r[k];if(Ye.fun(S)){const A=e._events[k];r[k]=({finished:T,cancelled:D})=>{const F=A.get(S);F?(T||(F.finished=!1),D&&(F.cancelled=!0)):A.set(S,{value:null,finished:T||!1,cancelled:D||!1})},d&&(d[k]=r[k])}});const C=e._state;r.pause===!C.paused?(C.paused=r.pause,mh(r.pause?C.pauseQueue:C.resumeQueue)):C.paused&&(r.pause=!0);const b=(i||Object.keys(e.springs)).map(k=>e.springs[k].start(r)),x=r.cancel===!0||$k(r,"cancel")===!0;(g||x&&C.asyncId)&&b.push(Kk(++e._lastAsyncId,{props:r,state:C,actions:{pause:vC,resume:vC,start(k,S){x?(kh(C,e._lastAsyncId),S(wd(e))):(k.onRest=h,S(Qk(g,k,C,e)))}}})),C.paused&&await new Promise(k=>{C.resumeQueue.add(k)});const _=OC(e,await Promise.all(b));if(c&&_.finished&&!(t&&_.noop)){const k=nT(r,c,l);if(k)return cT(e,[k]),iT(e,k,!0)}return m&&Nt.batchedUpdates(()=>m(_,e,e.item)),_}function oT(e,r){const t={...e.springs};return r&&Wt(Bi(r),i=>{Ye.und(i.keys)&&(i=Oh(i)),Ye.obj(i.to)||(i={...i,to:void 0}),uT(t,i,l=>sT(l))}),lT(e,t),t}function lT(e,r){pl(r,(t,i)=>{e.springs[i]||(e.springs[i]=t,Cd(t,e))})}function sT(e,r){const t=new cI;return t.key=e,r&&Cd(t,r),t}function uT(e,r,t){r.keys&&Wt(r.keys,i=>{(e[i]||(e[i]=t(i)))._prepareNode(r)})}function cT(e,r){Wt(r,t=>{uT(e.springs,t,i=>sT(i,e))})}var oy=({children:e,...r})=>{const t=W.useContext(ly),i=r.pause||!!t.pause,l=r.immediate||!!t.immediate;r=Vj(()=>({pause:i,immediate:l}),[i,l]);const{Provider:f}=ly;return Ne.createElement(f,{value:r},e)},ly=mI(oy,{});oy.Provider=ly.Provider,oy.Consumer=ly.Consumer;function mI(e,r){return Object.assign(e,Ne.createContext(r)),e.Provider._context=e,e.Consumer._context=e,e}var gI=()=>{const e=[],r=function(i){Ij();const l=[];return Wt(e,(f,c)=>{if(Ye.und(i))l.push(f.start());else{const h=t(i,f,c);h&&l.push(f.start(h))}}),l};r.current=e,r.add=function(i){e.includes(i)||e.push(i)},r.delete=function(i){const l=e.indexOf(i);~l&&e.splice(l,1)},r.pause=function(){return Wt(e,i=>i.pause(...arguments)),this},r.resume=function(){return Wt(e,i=>i.resume(...arguments)),this},r.set=function(i){Wt(e,(l,f)=>{const c=Ye.fun(i)?i(f,l):i;c&&l.set(c)})},r.start=function(i){const l=[];return Wt(e,(f,c)=>{if(Ye.und(i))l.push(f.start());else{const h=this._getProps(i,f,c);h&&l.push(f.start(h))}}),l},r.stop=function(){return Wt(e,i=>i.stop(...arguments)),this},r.update=function(i){return Wt(e,(l,f)=>l.update(this._getProps(i,l,f))),this};const t=function(i,l,f){return Ye.fun(i)?i(f,l):i};return r._getProps=t,r};function yI(e,r,t){const i=Ye.fun(r)&&r;i&&!t&&(t=[]);const l=W.useMemo(()=>i||arguments.length==3?gI():void 0,[]),f=W.useRef(0),c=Pk(),h=W.useMemo(()=>({ctrls:[],queue:[],flush(A,T){const D=oT(A,T);return f.current>0&&!h.queue.length&&!Object.keys(D).some(N=>!A.springs[N])?BC(A,T):new Promise(N=>{lT(A,D),h.queue.push(()=>{N(BC(A,T))}),c()})}}),[]),m=W.useRef([...h.ctrls]),d=[],g=Lk(e)||0;W.useMemo(()=>{Wt(m.current.slice(e,g),A=>{rI(A,l),A.stop(!0)}),m.current.length=e,C(g,e)},[e]),W.useMemo(()=>{C(0,Math.min(g,e))},t);function C(A,T){for(let D=A;D<T;D++){const F=m.current[D]||(m.current[D]=new vI(null,h.flush)),N=i?i(D,F):r[D];N&&(d[D]=fI(N))}}const b=m.current.map((A,T)=>oT(A,d[T])),x=W.useContext(oy),_=Lk(x),k=x!==_&&nI(x);EC(()=>{f.current++,h.ctrls=m.current;const{queue:A}=h;A.length&&(h.queue=[],Wt(A,T=>T())),Wt(m.current,(T,D)=>{l==null||l.add(T),k&&T.start({default:x});const F=d[D];F&&(aI(T,F.ref),T.ref?T.queue.push(F):T.start(F))})}),Bk(()=>()=>{Wt(h.ctrls,A=>A.stop(!0))});const S=b.map(A=>({...A}));return l?[S,l]:S}function xI(e,r){const t=Ye.fun(e),[[i],l]=yI(1,t?e:[e],t?r||[]:r);return t||arguments.length==2?[i,l]:i}var bI=class extends FC{constructor(e,r){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=yh(...r);const t=this._get(),i=DC(t);SC(this,i.create(t))}advance(e){const r=this._get(),t=this.get();us(r,t)||(hl(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&fT(this._active)&&LC(this)}_get(){const e=Ye.arr(this.source)?this.source.map(ui):Bi(ui(this.source));return this.calc(...e)}_start(){this.idle&&!fT(this._active)&&(this.idle=!1,Wt(ry(this),e=>{e.done=!1}),wo.skipAnimation?(Nt.batchedUpdates(()=>this.advance()),LC(this)):Gg.start(this))}_attach(){let e=1;Wt(Bi(this.source),r=>{no(r)&&Cd(r,this),RC(r)&&(r.idle||this._active.add(r),e=Math.max(e,r.priority+1))}),this.priority=e,this._start()}_detach(){Wt(Bi(this.source),e=>{no(e)&&Ch(e,this)}),this._active.clear(),LC(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Bi(this.source).reduce((r,t)=>Math.max(r,(RC(t)?t.priority:0)+1),0))}};function CI(e){return e.idle!==!1}function fT(e){return!e.size||Array.from(e).every(CI)}function LC(e){e.idle||(e.idle=!0,Wt(ry(e),r=>{r.done=!0}),bh(e,{type:"idle",parent:e}))}wo.assign({createStringInterpolator:Nk,to:(e,r)=>new bI(e,r)});var dT=/^--/;function wI(e,r){return r==null||typeof r=="boolean"||r===""?"":typeof r=="number"&&r!==0&&!dT.test(e)&&!(Fh.hasOwnProperty(e)&&Fh[e])?r+"px":(""+r).trim()}var pT={};function _I(e,r){if(!e.nodeType||!e.setAttribute)return!1;const t=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:i,style:l,children:f,scrollTop:c,scrollLeft:h,viewBox:m,...d}=r,g=Object.values(d),C=Object.keys(d).map(b=>t||e.hasAttribute(b)?b:pT[b]||(pT[b]=b.replace(/([A-Z])/g,x=>"-"+x.toLowerCase())));f!==void 0&&(e.textContent=f);for(const b in l)if(l.hasOwnProperty(b)){const x=wI(b,l[b]);dT.test(b)?e.style.setProperty(b,x):e.style[b]=x}C.forEach((b,x)=>{e.setAttribute(b,g[x])}),i!==void 0&&(e.className=i),c!==void 0&&(e.scrollTop=c),h!==void 0&&(e.scrollLeft=h),m!==void 0&&e.setAttribute("viewBox",m)}var Fh={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},EI=(e,r)=>e+r.charAt(0).toUpperCase()+r.substring(1),SI=["Webkit","Ms","Moz","O"];Fh=Object.keys(Fh).reduce((e,r)=>(SI.forEach(t=>e[EI(t,r)]=e[r]),e),Fh);var DI=/^(matrix|translate|scale|rotate|skew)/,kI=/^(translate)/,TI=/^(rotate|skew)/,zC=(e,r)=>Ye.num(e)&&e!==0?e+r:e,sy=(e,r)=>Ye.arr(e)?e.every(t=>sy(t,r)):Ye.num(e)?e===r:parseFloat(e)===r,AI=class extends iy{constructor({x:e,y:r,z:t,...i}){const l=[],f=[];(e||r||t)&&(l.push([e||0,r||0,t||0]),f.push(c=>[`translate3d(${c.map(h=>zC(h,"px")).join(",")})`,sy(c,0)])),pl(i,(c,h)=>{if(h==="transform")l.push([c||""]),f.push(m=>[m,m===""]);else if(DI.test(h)){if(delete i[h],Ye.und(c))return;const m=kI.test(h)?"px":TI.test(h)?"deg":"";l.push(Bi(c)),f.push(h==="rotate3d"?([d,g,C,b])=>[`rotate3d(${d},${g},${C},${zC(b,m)})`,sy(b,0)]:d=>[`${h}(${d.map(g=>zC(g,m)).join(",")})`,sy(d,h.startsWith("scale")?1:0)])}}),l.length&&(i.transform=new OI(l,f)),super(i)}},OI=class extends Ak{constructor(e,r){super(),this.inputs=e,this.transforms=r,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",r=!0;return Wt(this.inputs,(t,i)=>{const l=ui(t[0]),[f,c]=this.transforms[i](Ye.arr(l)?l:t.map(ui));e+=" "+f,r=r&&c}),r?"none":e}observerAdded(e){e==1&&Wt(this.inputs,r=>Wt(r,t=>no(t)&&Cd(t,this)))}observerRemoved(e){e==0&&Wt(this.inputs,r=>Wt(r,t=>no(t)&&Ch(t,this)))}eventObserved(e){e.type=="change"&&(this._value=null),bh(this,e)}},RI=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];wo.assign({batchedUpdates:tu.exports.unstable_batchedUpdates,createStringInterpolator:Nk,colors:yj});var FI=Zj(RI,{applyAnimatedValues:_I,createAnimatedStyle:e=>new AI(e),getComponentProps:({scrollTop:e,scrollLeft:r,...t})=>t}),hT=FI.animated;function vT(e,r,t){let i=e;return r!==void 0&&(i=Math.max(e,r)),t!==void 0&&(i=Math.min(i,t)),i}const[mT]=Cn("indicator"),NI=W.memo(e=>{var{vertical:r}=e,t=$a(e,["vertical"]);const i=[];for(let l=0;l<t.total;l++)i.push(Q("div",{className:Re(mT("dot",{active:t.current===l}))},l));return Q("div",Object.assign({className:Re(t.className,mT({vertical:r})),style:t.style},{children:i}))});let Nh=0;function UC(e){e?(Nh||document.body.classList.add("rv-toast--unclickable"),Nh+=1):Nh&&(Nh-=1,Nh||document.body.classList.remove("rv-toast--unclickable"))}function MI(e){return e===window}const gT=e=>{const r=e;if(MI(r)){const t=r.innerWidth,i=r.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}return r&&r.getBoundingClientRect?r.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};function PI(e,r,t){let i,l,f,c,h,m,d=0,g=!1,C=!1,b=!0;const x=!r&&r!==0&&typeof fd.requestAnimationFrame=="function";if(typeof e!="function")throw new TypeError("Expected a function");r=+r||0,cd(t)&&(g=!!t.leading,C="maxWait"in t,f=C?Math.max(+t.maxWait||0,r):f,b="trailing"in t?!!t.trailing:b);function _(O){const z=i,j=l;return i=l=void 0,d=O,c=e.apply(j,z),c}function k(O,z){return x?(fd.cancelAnimationFrame(h),fd.requestAnimationFrame(O)):setTimeout(()=>O(),z)}function S(O){if(x)return fd.cancelAnimationFrame(O);clearTimeout(O)}function A(O){return d=O,h=k(F,r),g?_(O):c}function T(O){const z=O-m,j=O-d,H=r-z;return C?Math.min(H,f-j):H}function D(O){const z=O-m,j=O-d;return m===void 0||z>=r||z<0||C&&j>=f}function F(){const O=Date.now();if(D(O))return N(O);h=k(F,T(O))}function N(O){return h=void 0,b&&i?_(O):(i=l=void 0,c)}function L(){h!==void 0&&S(h),d=0,i=m=l=h=void 0}function P(){return h===void 0?c:N(Date.now())}function U(){return h!==void 0}function $(...O){const z=Date.now(),j=D(z);if(i=O,l=this,m=z,j){if(h===void 0)return A(m);if(C)return h=k(F,r),_(m)}return h===void 0&&(h=k(F,r)),c}return $.cancel=L,$.flush=P,$.pending=U,$}const XZ="",[uy]=Cn("toast"),BI=e=>{const r=ea(e,{type:"info",duration:2e3,position:"middle",transition:"rv-fade",loadingType:"circular",overlay:!1}),t=()=>{r.closeOnClick&&r.onClose()};W.useEffect(()=>{if(!r.visible){UC(!1);return}let f=!1;const c=r.visible&&r.forbidClick;f!==c&&(f=c,UC(f))},[r.visible,r.forbidClick]);const i=()=>{const{icon:f,type:c,iconSize:h,loadingType:m}=r;if(f||c==="success"||c==="fail"){const g=c==="fail"?Q(X2,{}):Q(OD,{});return W.cloneElement(f||g,{className:Re(uy("icon")),fontSize:h})}return c==="loading"?Q(Z2,{className:Re(uy("loading")),type:m}):null},l=()=>{const{message:f}=r;return Jr(f)&&f!==""?Q("div",Object.assign({className:Re(uy("info"))},{children:f})):null};return Pe(sh,Object.assign({className:Re([uy([r.position,{[r.type]:!r.icon}]),r.className]),visible:r.visible,overlay:r.overlay,transition:r.transition,overlayClass:r.overlayClass,overlayStyle:r.overlayStyle,closeOnClickOverlay:r.closeOnClickOverlay,lockScroll:!1,onClick:t,onClose:r.onClose,onClosed:r.onClosed,onOpened:r.onOpened,teleport:r.teleport},{children:[i(),l()]}))},jC={message:"",className:"",type:"info",position:"middle",forbidClick:!1,duration:2e3,teleport:()=>document.body},IC=[];let yT=!1,HC=Jp({},jC);const cy=new Map;function xT(){let e=IC.pop();for(;e;)e(),e=IC.pop()}function LI(){setTimeout(xT)}const Bc=e=>{if(!Bg())return null;const r=bT(e),t={config:()=>{},clear:()=>null};let i=0;const{onClose:l,teleport:f}=r,c=document.createElement("div");return rC(f).appendChild(c),qD(Q(()=>{const d=Object.assign({duration:2e3},r),[g,C]=W.useState(!1),[b,x]=W.useState(Object.assign({},d)),_=W.useCallback(()=>{b.forbidClick&&UC(!1),C(!1),window.setTimeout(()=>{GD(c)&&c.parentNode&&c.parentNode.removeChild(c)},+b.duration||+jC.duration)},[c]),k=W.useCallback(()=>{C(!1),l&&l()},[]);return t.clear=_,t.config=W.useCallback(S=>{x(A=>typeof S=="function"?Object.assign(Object.assign({},A),S(A)):Object.assign(Object.assign({},A),S))},[x]),W.useEffect(()=>(C(!0),yT||xT(),IC.push(_),b.duration!==0&&"duration"in b&&(i=window.setTimeout(k,+b.duration)),()=>{i!==0&&window.clearTimeout(i)}),[]),Q(BI,Object.assign({},b,{visible:g,teleport:()=>c,onClose:k,onClosed:_}))},{}),c),t};function bT(e){return cd(e)?e:{message:e}}const zI=e=>r=>Bc(Object.assign(Object.assign(Object.assign(Object.assign({},HC),cy.get(e)),bT(r)),{type:e}));["info","loading","success","fail"].forEach(e=>{Bc[e]=zI(e)}),Bc.allowMultiple=(e=!0)=>{yT=e},Bc.clear=LI;function UI(e,r){typeof e=="string"?cy.set(e,r):Jp(HC,e)}Bc.setDefaultOptions=UI,Bc.resetDefaultOptions=e=>{typeof e=="string"?cy.delete(e):(HC=Jp({},jC),cy.clear())};const CT=Bc;function fy(){const e=W.useRef([]),r=W.useCallback(i=>l=>{l&&(e.current[i]=l)},[]),t=W.useCallback(()=>{e.current=[]},[]);return[e.current,r,t]}const wT=e=>{const{defaultValue:r,value:t}=e||{},[i,l]=W.useState(()=>{if(t!==void 0)return t;if(r!==void 0)return typeof r=="function"?r():r}),f=t!==void 0?t:i;function c(h){l(h)}return[f,c]},nX="",[jI]=Cn("swiper-item"),_T=W.forwardRef((e,r)=>{const t=W.useRef(null);W.useImperativeHandle(r,()=>({self:t.current}));const[i]=oz(t,{rootMargin:"-0.1px",threshold:0,root:()=>{var l;return(l=e.trackRef)===null||l===void 0?void 0:l.current}});return Q("div",Object.assign({ref:t,className:Re(e.className,jI({hidden:e.autoHeight&&i===!1})),onClick:e.onClick,style:e.style},{children:e.children}))}),[Lc]=Cn("swiper"),II=W.forwardRef((e,r)=>{const t=ea(e,{initialSwipe:0,loop:!0,touchable:!0,enabled:!0,rubberband:!0,autoplay:!1,slideSize:100,trackOffset:0,stuckAtBoundary:!1,preventScroll:!0}),{loop:i,autoplay:l,vertical:f,duration:c,autoHeight:h}=t,m=f?"y":"x",d=t.slideSize/100,g=t.trackOffset/100,{validChildren:C,count:b}=W.useMemo(()=>{let ee=0;return{validChildren:W.Children.map(t.children,V=>W.isValidElement(V)?V.type!==_T?null:(ee++,V):null),count:ee}},[t.children]),x=W.useRef(null),[_,k]=fy(),[S,A]=W.useState(()=>t.enabled),[T,D]=W.useState(t.initialSwipe),[F,N,L]=W2(!1),P=W.useMemo(()=>Object.assign({["--rv-swipe-slide-size"]:`${t.slideSize}%`,["--rv-swipe-track-offset"]:`${t.trackOffset}%`},t.style),[t.slideSize,t.trackOffset,t.style]),U=W.useMemo(()=>d*(b-1)<1?!1:i,[b,i,d]),$=()=>{const ee=x.current;return ee?(f?ee.offsetHeight:ee.offsetWidth)*t.slideSize/100:0},O=ee=>{let Z=0,V=b-1;return t.stuckAtBoundary&&(Z+=(1-d-g)/d,V-=(1-d-g)/d),vT(ee,Z,V)},[{position:z},j]=xI(()=>({position:O(T)*100,config:{tension:200,friction:30,duration:c},onRest:()=>{if(L.current||!U)return;const ee=z.get(),Z=100*b,V=VC(ee,Z);V!==ee&&j.start({position:V,immediate:!0})}}),[b]),H=uj(ee=>{var Z;const V=$();if(!V||!t.preventScroll&&ET(ee.target,(Z=_[T])===null||Z===void 0?void 0:Z.self))return;const te=f?1:0,oe=ee.offset[te],re=ee.direction[te],pe=ee.velocity[te];if(N(!0),!ee.last)j.start({position:oe*100/V,immediate:!0});else{const me=Math.round((oe+Math.min(pe*2e3,V)*re)/V);q(me),window.setTimeout(()=>{N(!1)})}},{enabled:S,transform:([ee,Z])=>[-ee,-Z],from:()=>{const ee=$();return[z.get()/100*ee,z.get()/100*ee]},bounds:()=>{if(U)return{};const ee=$(),Z=O(0)*ee,V=O(b-1)*ee;return f?{top:Z,bottom:V}:{left:Z,right:V}},rubberband:t.rubberband,axis:m,preventScroll:m==="x"?t.preventScroll:!1,pointer:{touch:!0}}),Y=()=>t.indicator===void 0||t.indicator===!0?Q("div",Object.assign({className:Re(Lc("indicator",{vertical:f}))},{children:Q(NI,Object.assign({},t.indicatorProps,{vertical:f,total:b,current:T}))})):typeof t.indicator=="function"?t.indicator(b,T):null;function q(ee,Z=!1){const V=Math.round(ee),te=U?VC(V,b):vT(V,0,b-1);D(te),j.start({position:(U?V:O(V))*100,immediate:Z})}const X=()=>{q(Math.round(z.get()/100)+1)},ne=()=>{q(Math.round(z.get()/100)-1)};W.useImperativeHandle(r,()=>({activeIndex:T,swipeTo:q,swipeNext:X,swipePrev:ne,enable:()=>{A(!0)},disable:()=>{A(!1)}})),th(()=>{const ee=C.length-1;T>ee&&q(ee,!0)}),Rc(()=>{var ee;(ee=t.onChange)===null||ee===void 0||ee.call(t,T)},[T]),W.useEffect(()=>{if(!l||F)return Mi;const ee=typeof l=="boolean"?5e3:l,Z=window.setInterval(()=>{X()},ee);return()=>{window.clearInterval(Z)}},[l,F]);const G=()=>U?Q("div",Object.assign({className:Re(Lc("track-inner",{vertical:f}))},{children:W.Children.map(C,(ee,Z)=>Q(hT.div,Object.assign({className:Re(Lc("slide")),style:{[m]:z.to(V=>{let te=-V+Z*100;const oe=b*100,re=oe/2;return te=VC(te+re,oe)-re,`${te}%`}),[f?"top":"left"]:`-${Z*100}%`}},{children:W.cloneElement(ee,{ref:k(Z),autoHeight:h,trackRef:x})})))})):Q(hT.div,Object.assign({className:Re(Lc("track-inner")),style:{[m]:z.to(ee=>`${-ee}%`)}},{children:W.Children.map(C,(ee,Z)=>Q("div",Object.assign({className:Re(Lc("slide"))},{children:W.cloneElement(ee,{ref:k(Z),autoHeight:h})})))}));return b===0&&void 0,Pe("div",Object.assign({className:Re(t.className,Lc({vertical:f})),style:P},{children:[Q("div",Object.assign({ref:x,className:Re(Lc("track",{"allow-touch-move":t.touchable})),onClickCapture:ee=>{L.current&&ee.stopPropagation()}},t.touchable?H():{},{children:G()})),Y()]}))});function VC(e,r){const t=e%r;return t<0?t+r:t}function ET(e,r){return r?e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?!0:e.parentElement&&e.parentElement!==r?ET(e.parentElement,r):!1:!1}const ST=Object.assign(II,{Item:_T}),HI=e=>{const r=ea(e,{shape:"round",bindGroup:!0}),t=W.useRef(null),i=g=>r.parent&&r.bindGroup?r.parent.props[g]:null,l=W.useMemo(()=>i("disabled")||r.disabled,[r.parent,r.disabled]),f=W.useMemo(()=>i("direction")||null,[r.parent]),c=W.useMemo(()=>{const g=r.checkedColor||i("checkedColor");return g&&r.checked&&!l?{borderColor:g,backgroundColor:g}:{}},[r.checkedColor,r.checked,l]),h=g=>{const{target:C}=g,b=t.current,x=b===C||(b==null?void 0:b.contains(C));!l&&(x||!r.labelDisabled)&&r.onToggle&&r.onToggle(),r.onClick&&r.onClick(g)},m=()=>{const{bem:g,shape:C,checked:b}=r,x=r.iconSize||i("iconSize");return Q("div",Object.assign({ref:t,className:Re(g("icon",[C,{disabled:l,checked:b}])),style:{fontSize:fl(x)}},{children:r.iconRender?r.iconRender({checked:b,disabled:l}):Q(OD,{style:c})}))},d=()=>r.children?Q("span",Object.assign({className:r.bem("label",[r.labelPosition,{disabled:l}])},{children:r.children})):null;return Pe("div",Object.assign({role:r.role,className:Re(r.bem([{disabled:l,"label-disabled":r.labelDisabled},f]),r.className),style:r.style,tabIndex:l?-1:0,"aria-checked":r.checked,onClick:h},{children:[r.labelPosition==="left"&&d(),m(),r.labelPosition!=="left"&&d()]}))},lX="";function VI(e){return[e.getFullYear(),e.getMonth()+1]}function $C(e,r){const t=e.getFullYear(),i=r.getFullYear();if(t===i){const l=e.getMonth(),f=r.getMonth();return l===f?0:l>f?1:-1}return t>i?1:-1}function vl(e,r){const t=$C(e,r);if(t===0){const i=e.getDate(),l=r.getDate();return i===l?0:i>l?1:-1}return t}const dy=e=>new Date(e),DT=e=>Array.isArray(e)?e.map(dy):dy(e);function YC(e,r){const t=dy(e);return t.setDate(t.getDate()+r),t}const kT=e=>YC(e,-1),TT=e=>YC(e,1),qC=()=>{const e=new Date;return e.setHours(0,0,0,0),e};function $I(e){const r=e[0].getTime();return(e[1].getTime()-r)/(1e3*60*60*24)+1}function AT(e,r){let t=-1;const i=Array(e);for(;++t<e;)i[t]=r(t);return i}function YI(e){if(!e)return 0;for(;hD(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function GC(e,r){return 32-new Date(e,r-1,32).getDate()}const[Mh]=Cn("calendar"),qI=e=>{const r=ea(e,{offset:0}),t=W.useMemo(()=>{const{item:d,index:g,color:C,offset:b,rowHeight:x}=r,_={height:x};if(d.type==="placeholder")return _.width="100%",_;if(g===0&&(_.marginLeft=`${100*b/7}%`),C)switch(d.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":_.background=C;break;case"middle":_.color=C;break}return _},[r.item,r.index,r.color,r.offset,r.rowHeight]),i=()=>{var d;r.item.type!=="disabled"&&((d=r.onClick)===null||d===void 0||d.call(r,r.item))},l=()=>{const{topInfo:d}=r.item;return d||r.topInfoRender?Q("div",Object.assign({className:Re(Mh("top-info"))},{children:r.topInfoRender?r.topInfoRender(r.item):d})):null},f=()=>{const{bottomInfo:d}=r.item;return d||r.bottomInfoRender?Q("div",Object.assign({className:Re(Mh("bottom-info"))},{children:r.bottomInfoRender?r.bottomInfoRender(r.item):d})):null},c=()=>{const{item:d,color:g,rowHeight:C}=r,{type:b,text:x}=d,_=Pe(rn,{children:[l(),x,f()]});return b==="selected"?Q("div",Object.assign({className:Re(Mh("selected-day")),style:{width:C,height:C,background:g}},{children:_})):_},{type:h,className:m}=r.item;return h==="placeholder"?Q("div",{className:Re(Mh("day")),style:t}):Q("div",Object.assign({role:"gridcell",style:t,className:Re(Mh("day",h),m),tabIndex:h==="disabled"?void 0:-1,onClick:i},{children:c()}))},[py]=Cn("calendar"),GI=W.forwardRef((e,r)=>{const[t,i]=W.useState(),l=W.useRef(),[f,c]=W.useState(),h=W.useRef(0),{locale:m}=W.useContext(vd);W.useEffect(()=>{f&&(h.current=gT(f).height)},[f]);const d=W.useMemo(()=>e.formatMonthTitle?e.formatMonthTitle(e.date):m.vanCalendar.monthTitle(...VI(e.date)),[e.date,e.formatMonthTitle]),g=W.useMemo(()=>fl(e.rowHeight),[e.rowHeight]),C=W.useMemo(()=>{const O=e.date.getDay();return e.firstDayOfWeek?(O+7-e.firstDayOfWeek)%7:O},[e.date,e.firstDayOfWeek]),b=W.useMemo(()=>GC(e.date.getFullYear(),e.date.getMonth()+1),[e.date]),x=W.useMemo(()=>t||!e.lazyRender,[t]),_=()=>d,k=O=>{const z=e.showSubtitle?l.current:f,j=(z==null?void 0:z.getBoundingClientRect().top)-O.getBoundingClientRect().top+O.scrollTop;fD(O,j)},S=O=>{const z=j=>e.currentDate.some(H=>vl(H,j)===0);if(z(O)){const j=kT(O),H=TT(O),Y=z(j),q=z(H);return Y&&q?"multiple-middle":Y?"end":q?"start":"multiple-selected"}return""},A=O=>{const[z,j]=e.currentDate;if(!z)return"";const H=vl(O,z);if(!j)return H===0?"start":"";const Y=vl(O,j);return e.allowSameDay&&H===0&&Y===0?"start-end":H===0?"start":Y===0?"end":H>0&&Y<0?"middle":""},T=O=>{const{type:z,minDate:j,maxDate:H,currentDate:Y}=e;if(vl(O,j)<0||vl(O,H)>0)return"disabled";if(Y===null)return"";if(Array.isArray(Y)){if(z==="multiple")return S(O);if(z==="range")return A(O)}else if(z==="single")return vl(O,Y)===0?"selected":"";return""},D=O=>{if(e.type==="range"){if(O==="start")return m.vanCalendar.start;if(O==="end")return m.vanCalendar.end;if(O==="start-end")return m.vanCalendar.startEnd}return null},F=()=>e.showMonthTitle?Q("div",Object.assign({className:Re(py("month-title"))},{children:d})):null,N=()=>e.showMark&&x?Q("div",Object.assign({className:Re(py("month-mark"))},{children:e.date.getMonth()+1})):null,L=W.useMemo(()=>{const O=Math.ceil((b+C)/7);return Array(O).fill({type:"placeholder"})},[b,C]),P=W.useMemo(()=>{const O=[],z=e.date.getFullYear(),j=e.date.getMonth();for(let H=1;H<=b;H++){const Y=new Date(z,j,H),q=T(Y);let X={date:Y,type:q,text:H,bottomInfo:D(q)};e.formatter&&(X=e.formatter(X)),O.push(X)}return O},[T,e.date,e.formatter]),U=(O,z)=>Q(qI,{item:O,index:z,color:e.color,offset:C,rowHeight:g,onClick:e.onClick,topInfoRender:e.topInfoRender,bottomInfoRender:e.bottomInfoRender},z),$=()=>Pe("div",Object.assign({ref:l,role:"grid",className:Re(py("days"))},{children:[N(),(x?P:L).map(U)]}));return W.useImperativeHandle(r,()=>({getTitle:_,getHeight:()=>h.current,setVisible:i,scrollIntoView:k})),Pe("div",Object.assign({className:Re(py("month")),ref:c},{children:[F(),$()]}))}),[Ph]=Cn("calendar"),KI=e=>{const{locale:r}=W.useContext(vd),t=()=>{if(e.showTitle){const c=e.title||r.vanCalendar.title;return Q("div",Object.assign({className:Re(Ph("header-title"))},{children:c}))}return null},i=c=>{var h;(h=e.onClickSubtitle)===null||h===void 0||h.call(e,c)},l=()=>e.showSubtitle?Q("div",Object.assign({className:Re(Ph("header-subtitle")),onClick:i},{children:e.subtitle})):null,f=()=>{const{weekdays:c,firstDayOfWeek:h}=e,m=r.vanCalendar.weekdays,d=c?m.map((C,b)=>c[b]||C):m,g=[...d.slice(h,7),...d.slice(0,h)];return Q("div",Object.assign({className:Re(Ph("weekdays"))},{children:g.map((C,b)=>Q("span",Object.assign({className:Re(Ph("weekday"))},{children:C}),b))}))};return Pe("div",Object.assign({className:Re(Ph("header"))},{children:[t(),l(),f()]}))},[_d]=Cn("calendar"),WI=qC(),QI=(()=>{const e=qC();return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())})(),OT=W.forwardRef((e,r)=>{var t,{className:i,style:l}=e,f=$a(e,["className","style"]);const c=ea(f,{round:!0,poppable:!0,showMark:!0,showTitle:!0,showConfirm:!0,showSubtitle:!0,closeOnPopstate:!0,closeOnClickOverlay:!0,safeAreaInsetBottom:!0,defaultValue:null,type:"single",position:"bottom",maxRange:null,minDate:WI,maxDate:QI,firstDayOfWeek:0,showRangePrompt:!0}),{locale:h}=W.useContext(vd),[m,d]=nh({value:c.visible,defaultValue:!1,onChange:V=>{var te;V===!1&&((te=c.onClose)===null||te===void 0||te.call(c))}}),g=(V,te=c.minDate,oe=c.maxDate)=>vl(V,te)===-1?te:vl(V,oe)===1?oe:V,C=(V=c.defaultValue)=>{const{type:te,minDate:oe,maxDate:re}=c;if(V===null)return V;const pe=qC();if(te==="range"){Array.isArray(V)||(V=[]);const me=g(V[0]||pe,oe,kT(re)),Ce=g(V[1]||pe,TT(oe));return[me,Ce]}return te==="multiple"?Array.isArray(V)?V.map(me=>g(me)):[g(pe)]:((!V||Array.isArray(V))&&(V=pe),g(V))},b=W.useRef(),x=W.useRef(0),[_,k]=W.useState(C(c.value===void 0?c.defaultValue:c.value)),[S,A]=yD({subtitle:"",currentDate:_});Rc(()=>{c.value!==void 0&&JSON.stringify(_)!==JSON.stringify(c.value)&&k(c.value)},[c.value]),W.useEffect(()=>{JSON.stringify(S.currentDate)!==JSON.stringify(_)&&A({currentDate:_})},[_]);const[T,D]=fy(),F=W.useMemo(()=>c.firstDayOfWeek?+c.firstDayOfWeek%7:0,[c.firstDayOfWeek,c.firstDayOfWeek]),N=W.useMemo(()=>{const V=[],te=new Date(c.minDate);te.setDate(1);do V.push(new Date(te)),te.setMonth(te.getMonth()+1);while($C(te,c.maxDate)!==1);return V},[c.minDate,c.maxDate]),L=W.useMemo(()=>{const{currentDate:V}=S;if(V){if(c.type==="range")return!V[0]||!V[1];if(c.type==="multiple")return!V.length}return!V},[c.type,S.currentDate]),P=()=>{var V;const te=GL(b.current),oe=te+x.current,re=N.map((Ae,De)=>T[De].getHeight()),pe=re.reduce((Ae,De)=>Ae+De,0);if(oe>pe&&te>0)return;let me=0,Ce;const se=[-1,-1];for(let Ae=0;Ae<N.length;Ae++){const De=T[Ae];me<=oe&&me+re[Ae]>=te&&(se[1]=Ae,Ce||(Ce=De,se[0]=Ae),T[Ae].showed||(T[Ae].showed=!0,(V=c.onMonthShow)===null||V===void 0||V.call(c,{date:De.date,title:De.getTitle()}))),me+=re[Ae]}N.forEach((Ae,De)=>{const qe=De>=se[0]-1&&De<=se[1]+1;T[De].setVisible(qe)}),Ce&&Ce.getTitle()!==S.subtitle&&!c.horizontal&&A({subtitle:Ce.getTitle()})},U=V=>{q2(()=>{N.some((te,oe)=>$C(te,V)===0?(b.current&&T[oe].scrollIntoView(b.current),!0):!1),P()})},$=()=>{if(c.poppable&&!m)return;const{currentDate:V}=S;if(V){const te=c.type==="single"?V:V[0];U(te)}else q2(P)},O=()=>{q2(()=>{x.current=Math.floor(gT(b.current).height),$()})},z=(V=C())=>{A({currentDate:V}),$()},j=V=>{var te;const{maxRange:oe,rangePrompt:re,showRangePrompt:pe}=c;return oe&&$I(V)>oe?(pe&&CT.info(re||h.vanCalendar.rangePrompt(+oe)),(te=c.onOverRange)===null||te===void 0||te.call(c),!1):!0},H=()=>{var V;const te=DT(S.currentDate);c.poppable&&k(te),(V=c.onConfirm)===null||V===void 0||V.call(c,te),Z.close()},Y=(V,te)=>{const oe=re=>{var pe;S.currentDate=re,A({currentDate:re}),(pe=c.onSelect)===null||pe===void 0||pe.call(c,DT(S.currentDate))};if(te&&c.type==="range"&&!j(V)){c.showConfirm?oe([V[0],YC(V[0],+c.maxRange-1)]):oe(V);return}oe(V),te&&!c.showConfirm&&H()},q=V=>{var te;if(c.readOnly||!V.date)return;const{date:oe}=V,{type:re}=c,{currentDate:pe}=S;if(re==="range"){if(!pe){Y([oe]);return}const[me,Ce]=pe;if(me&&!Ce){const se=vl(oe,me);se===1?Y([me,oe],!0):se===-1?Y([oe]):c.allowSameDay&&Y([oe,oe],!0)}else Y([oe])}else if(re==="multiple"){if(!pe){Y([oe]);return}let me;if(S.currentDate.some((se,Ae)=>{const De=vl(se,oe)===0;return De&&(me=Ae),De})){const[se]=pe.splice(me,1);(te=c.onUnselect)===null||te===void 0||te.call(c,dy(se)),Y([...pe])}else c.maxRange&&pe.length>=c.maxRange?CT(c.rangePrompt||`选择天数不能超过 ${c.maxRange} 天`):Y([...pe,oe])}else Y(oe,!0)},X=(V,te)=>{const oe=!c.horizontal&&(te!==0||!c.showSubtitle);return Q(GI,Object.assign({ref:D(te),date:V,currentDate:S.currentDate,showMonthTitle:oe,firstDayOfWeek:F},sD(c,["type","color","minDate","maxDate","showMark","formatter","rowHeight","showSubtitle","lazyRender","allowSameDay","topInfoRender","bottomInfoRender","formatMonthTitle"]),{onClick:q}),te)},ne=()=>{if(c.footer)return c.footer;if(c.showConfirm){const V=L?c.confirmDisabledText:c.confirmText;return Q(ih,Object.assign({round:!0,block:!0,type:"danger",color:c.color,className:Re(_d("confirm")),disabled:L,nativeType:"button",onClick:H},{children:V||h.vanCalendar.confirm}))}return null},G=()=>Q("div",Object.assign({className:Re(_d("footer"),{"rv-safe-area-bottom":c.safeAreaInsetBottom})},{children:ne()})),ee=()=>Pe("div",Object.assign({className:Re(i,_d()),style:l},{children:[Q(KI,{weekdays:c.weekdays,title:c.title,subtitle:c.subtitle||S.subtitle,showTitle:c.showTitle,showSubtitle:c.showSubtitle,firstDayOfWeek:F,onClickSubtitle:V=>{var te;(te=c.onClickSubtitle)===null||te===void 0||te.call(c,V)}}),c.horizontal?Q("div",Object.assign({ref:b,className:Re(_d("horizontal-body"))},{children:Q(ST,Object.assign({indicator:()=>null,onChange:V=>{A({subtitle:T[V].getTitle()})}},{children:N.map((V,te)=>Q(ST.Item,{children:X(V,te)},V))}))})):Q("div",Object.assign({ref:b,className:Re(_d("body")),onScroll:P},{children:N.map(X)})),G()]})),Z={toggle:()=>{c.poppable&&d(V=>!V)},open:()=>{c.poppable&&d(!0)},close:()=>{c.poppable&&d(!1)}};return W.useEffect(()=>{c.poppable||O()},[]),W.useEffect(()=>{c.poppable&&m&&O()},[m]),Rc(()=>{z(C(S.currentDate))},[c.type,c.minDate,c.maxDate]),W.useImperativeHandle(r,()=>Object.assign({reset:z,scrollToDate:U},Z)),c.poppable?Pe(rn,{children:[Q(sh,Object.assign({visible:m,className:Re(_d("popup")),round:c.round,position:c.position,closeable:c.showTitle||c.showSubtitle,closeOnPopstate:c.closeOnPopstate,closeOnClickOverlay:c.closeOnClickOverlay,onClose:Z.close,onClosed:()=>{var V;c.poppable&&JSON.stringify(S.currentDate)!==JSON.stringify(_)&&A({currentDate:_}),(V=c.onClosed)===null||V===void 0||V.call(c)}},{children:ee()})),(t=c.children)===null||t===void 0?void 0:t.call(c,_,Z)]}):ee()});function ZI(e,r){var t;process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const i=xD(e),l=(t=r==null?void 0:r.wait)!==null&&t!==void 0?t:1e3,f=W.useMemo(()=>PI((...c)=>i.current(...c),l,r),[]);return bD(()=>{f.cancel()}),{run:f,cancel:f.cancel,flush:f.flush}}function XI(e,r,t){const[i,l]=W.useState({}),{run:f}=ZI(()=>{l({})},t);W.useEffect(()=>f(),r),Rc(e,[i])}const dX="",RT=W.createContext({}),[JI]=Cn("checkbox-group"),eH=W.forwardRef((e,r)=>{const[t,i]=fy(),[l,f]=wT({value:e.value,defaultValue:e.defaultValue}),c=(m={})=>{typeof m=="boolean"&&(m={checked:m});const{checked:d,skipDisabled:g}=m,b=t.filter(x=>x.props.bindGroup?x.props.disabled&&g?x.checked:d??!x.checked:!1).map(x=>x.props.name);f(b),e.onChange(b)},h=m=>{var d;f(m),(d=e.onChange)===null||d===void 0||d.call(e,m)};return W.useImperativeHandle(r,()=>({toggleAll:c})),Q(RT.Provider,Object.assign({value:{parent:{props:e},toggle:h,checked:l||[]}},{children:Q("div",Object.assign({className:Re(e.className,JI([e.direction]))},{children:W.Children.toArray(e.children).filter(Boolean).map((m,d)=>{var g;return((g=m.type)===null||g===void 0?void 0:g.displayName)!=="Checkbox"?m:W.cloneElement(m,{ref:i(d)})})}))}))}),[tH]=Cn("checkbox"),FT=W.forwardRef((e,r)=>{const t=ea(e,{bindGroup:!0}),i=W.useContext(RT),{parent:l}=i,f=$a(i,["parent"]),[c,h]=wT({value:t.checked,defaultValue:t.defaultChecked}),m=C=>{const{name:b}=t,{max:x}=l.props,_=f.checked.slice();if(C)!(x&&_.length>=x)&&_.indexOf(b)===-1&&(_.push(b),t.bindGroup&&f.toggle(_));else{const k=_.indexOf(b);k!==-1&&(_.splice(k,1),t.bindGroup&&f.toggle(_))}},d=W.useMemo(()=>l&&t.bindGroup?f.checked.indexOf(t.name)!==-1:c,[f.checked,c]),g=(C=!d)=>{var b;l&&t.bindGroup?m(C):(h(C),(b=t.onChange)===null||b===void 0||b.call(t,C))};return W.useImperativeHandle(r,()=>({toggle:g,checked:d,props:t})),Q(HI,Object.assign({},t,{bem:tH,role:"checkbox",parent:l,checked:d,className:t.className,bindGroup:t.bindGroup,onToggle:g}))});FT.displayName="Checkbox";const NT=Object.assign(FT,{Group:eH}),mX="",MT=200,PT=300,nH=15;function rH(e){const r=window.getComputedStyle(e),t=r.transform||r.webkitTransform,i=t.slice(7,t.length-1).split(", ")[5];return Number(i)}const[KC]=Cn("picker-column"),aH=W.memo(W.forwardRef((e,r)=>{const{locale:t}=W.useContext(vd),{valueKey:i,textKey:l,itemHeight:f,visibleItemCount:c,placeholder:h,value:m}=e,d=W.useMemo(()=>vD(f),[f]),g=W.useMemo(()=>Array.isArray(e.options)&&!e.options.length?[]:h?[{[i]:void 0,[l]:h===!0?t.vanPicker.select:h},...e.options]:e.options,[e.options]),C=W.useRef(null),b=W.useRef(!1),x=W.useRef(0),_=W.useRef(null),k=W.useRef(0),S=W.useRef(0),[A,T,D]=yD({offset:0,duration:0}),F=_D(),N=W.useMemo(()=>d*(+c-1)/2,[d,c]),L=G=>{var ee,Z;G=eh(G,0,g.length);for(let V=G;V<g.length;V+=1)if(!(!((ee=g[V])===null||ee===void 0)&&ee.disabled))return V;for(let V=G-1;V>=0;V-=1)if(!(!((Z=g[V])===null||Z===void 0)&&Z.disabled))return V;return null},P=G=>{e.onSelect(G,e.index)},U=G=>{G=L(G)||0;const ee=-G*d,Z=()=>{var V;((V=g[G])===null||V===void 0?void 0:V[i])!==m&&P(g[G])};b.current&&ee!==D.current.offset?_.current=Z:Z(),T({offset:ee})},$=G=>{G=L(G)||0;const ee=-G*d;T({offset:ee})};th(()=>{if(g.length===0)m!==void 0&&P(void 0);else{let G=g.findIndex(ee=>ee[i]===m);G<0&&(G=0,P(g[0])),$(G)}},[m,JSON.stringify(g)]);const O=G=>{b.current||e.readOnly||(_.current=null,T({duration:MT}),U(G))},z=G=>eh(Math.round(-G/d),0,g.length-1),j=(G,ee)=>{const Z=Math.abs(G/ee);G=D.current.offset+Z/.003*(G<0?-1:1);const V=z(G);T({duration:+e.swipeDuration}),U(V)},H=()=>{b.current=!1,T({duration:0}),_.current&&(_.current(),_.current=null)},Y=G=>{if(e.readOnly)return;F.start(G);let{offset:ee}=A;if(b.current){const Z=rH(C.current);ee=Math.min(0,Z-N),x.current=ee}else x.current=ee;T({duration:0,offset:ee}),k.current=Date.now(),S.current=x.current,_.current=null},q=G=>{if(e.readOnly)return;F.move(G),F.isVertical()&&(b.current=!0);const ee=eh(x.current+F.deltaY.current,-(g.length*d),d);T({offset:ee});const Z=Date.now();Z-k.current>PT&&(k.current=Z,S.current=ee)},X=()=>{if(e.readOnly||!b.current)return;const G=D.current.offset-S.current,ee=Date.now()-k.current;if(ee<PT&&Math.abs(G)>nH){j(G,ee);return}const V=z(D.current.offset);T({duration:MT}),U(V),setTimeout(()=>{b.current=!1},0)},ne=()=>{const G={height:`${e.itemHeight}px`};return g.map((ee,Z)=>{const{disabled:V}=ee,te={role:"button",style:G,tabIndex:V?-1:0,className:Re(KC("item",{disabled:V,selected:ee[i]===m})),onClick:()=>{O(Z)}},oe={className:"rv-ellipsis",children:ee[l]};return W.createElement("li",Object.assign({},te,{key:Z}),e.optionRender?e.optionRender(ee):Q("div",Object.assign({},oe)))})};return W.useImperativeHandle(r,()=>({stopMomentum:H})),Q("div",Object.assign({className:Re(KC(),e.className),onTouchStart:Y,onTouchMove:q,onTouchEnd:X,onTouchCancel:X},{children:Q("ul",Object.assign({ref:C,style:{transform:`translate3d(0, ${A.offset+N}px, 0)`,transitionDuration:`${A.duration}ms`,transitionProperty:A.duration?"all":"none"},className:Re(KC("wrapper")),onTransitionEnd:H},{children:ne()}))}))}),(e,r)=>!(e.index!==r.index||e.value!==r.value||e.onSelect!==r.onSelect||JSON.stringify(e.options)!==JSON.stringify(r.options)));function iH(e,r){const{textKey:t,valueKey:i,childrenKey:l}=r,f=W.useMemo(()=>{if(e.some(d=>typeof d=="object"&&l in d))return"cascade";const m=e[0]||{};return typeof m=="object"?l in m?"cascade":"object":"plain"},[e,l]),c=W.useMemo(()=>{let h=0;function m(d,g){g>h&&(h=g);const C=g+1;d.forEach(b=>{b[l]&&m(b[l],C)})}return m(e,1),h},[e,l]);return f!=="cascade"?e:h=>{const m=[];let d=e,g=0;for(;;){m.push(d.map(x=>{var _;return{[t]:x[t],[i]:(_=x[i])!==null&&_!==void 0?_:x[t]}}));const C=h[g],b=d.find(x=>{var _;return((_=x[i])!==null&&_!==void 0?_:x[t])===C});if(!b||!b[l])break;d=b[l],g++}for(;g<c-1;)m.push([]),g++;return m}}function WC(e){let r=null;return()=>(r===null&&(r=e()),r)}function oH(e,r,t){const{textKey:i,valueKey:l}=r,f=WC(()=>{let d=typeof e=="function"?e(t):e;return Array.isArray(d[0])||(d=[d]),d.map(g=>g.map(C=>typeof C=="string"?{[i]:C,[l]:C}:(l in C||(C[l]=C[i]),C)))}),c=WC(()=>t.map((d,g)=>{var C;const b=f()[g];return b?(C=b.find(x=>x[l]===d))!==null&&C!==void 0?C:void 0:null})),h=WC(()=>t.map((d,g)=>{var C;const b=f()[g];return b&&(C=b.findIndex(x=>x[l]===d))!==null&&C!==void 0?C:null}));return{get columns(){return f()},get items(){return c()},get indexes(){return h()}}}function BT(e,r,t){const i=iH(e,r);return W.useMemo(()=>oH(i,r,t),[e,r,t])}const[cs]=Cn("picker");function lH(e){const{locale:r}=W.useContext(vd),t=W.useRef(null),[i,l]=fy(),{text:f,value:c,children:h}=Jp({text:"text",value:"value",children:"children"},e.columnsFieldNames),[m,d]=W.useState(e.value);W.useEffect(()=>{e.value!==void 0&&JSON.stringify(m)!==JSON.stringify(e.value)&&d(e.value)},[e.value]);const g=BT(e.columns,{textKey:f,valueKey:c,childrenKey:h},m),{columns:C,items:b,indexes:x}=g;XI(()=>{var U;JSON.stringify(e.value)!==JSON.stringify(m)&&((U=e.onChange)===null||U===void 0||U.call(e,m,b,x))},[m],{wait:100,leading:!1,trailing:!0});const _=W.useMemo(()=>vD(e.itemHeight),[e.itemHeight]),k=(U,$)=>{d(O=>{const z=[...O];return z[$]=U==null?void 0:U[c],z})},S=()=>{var U;i.forEach($=>$.stopMomentum()),(U=e.onConfirm)===null||U===void 0||U.call(e,m,b,x)},A=()=>{var U;(U=e.onCancel)===null||U===void 0||U.call(e)},T=()=>e.title?Q("div",Object.assign({className:Re(cs("title"),"rv-ellipsis")},{children:e.title})):null,D=()=>{const U=e.cancelButtonText||r.cancel;return Q("button",Object.assign({type:"button",className:Re(cs("cancel")),onClick:A},{children:U}))},F=()=>{const U=e.confirmButtonText||r.confirm;return Q("button",Object.assign({type:"button",className:Re(cs("confirm")),onClick:S},{children:U}))},N=()=>e.showToolbar?Q("div",Object.assign({className:Re(cs("toolbar"))},{children:e.toolbar||Pe(rn,{children:[D(),T(),F()]})})):null,L=()=>C.map((U,$)=>{const O=Array.isArray(e.placeholder)?e.placeholder[$]:e.placeholder;return Q(aH,{textKey:f,valueKey:c,ref:l($),placeholder:O,optionRender:e.optionRender,readOnly:e.readOnly,value:m[$],itemHeight:_,index:$,swipeDuration:e.swipeDuration,visibleItemCount:e.visibleItemCount,options:U,onSelect:k},$)}),P=()=>{const U=_*e.visibleItemCount,$={height:`${_}px`},O={height:`${U}px`},z={backgroundSize:`100% ${(U-_)/2}px`};return Pe("div",Object.assign({ref:t,className:Re(cs("columns")),style:O},{children:[L(),Q("div",{className:Re(cs("mask")),style:z}),Q("div",{className:Re(wz,cs("frame")),style:$})]}))};return K2("touchmove",Y2,{target:t.current}),Pe("div",Object.assign({className:Re(cs(),e.className)},{children:[e.toolbarPosition==="top"?N():null,e.loading?Q(Z2,{className:Re(cs("loading"))}):null,e.columnsTop,P(),e.columnsBottom,e.toolbarPosition==="bottom"?N():null]}))}function sH(e,r){const t=ea(e,{columns:[],itemHeight:44,visibleItemCount:5,swipeDuration:300,showToolbar:!0,placeholder:!0,toolbarPosition:"top"}),{visible:i,popup:l,children:f,defaultValue:c=[]}=t,h=$a(t,["visible","popup","children","defaultValue"]),[m,d]=nh({value:i,defaultValue:!1,onChange:j=>{var H;j===!1&&((H=t.onClose)===null||H===void 0||H.call(t))}}),g={toggle:()=>{l&&d(j=>!j)},open:()=>{l&&d(!0)},close:()=>{l&&d(!1)}};W.useImperativeHandle(r,()=>g);const C=Array.isArray(t.value)?t.value:t.value!==void 0?[t.value]:void 0,b=Array.isArray(c)?c:c!==void 0?[c]:[],{text:x,value:_,children:k}=Jp({text:"text",value:"value",children:"children"},t.columnsFieldNames),S=W.useMemo(()=>{const j=t.columns[0]||{};return!(Array.isArray(j)||typeof j=="object"&&k in j)},[t.columns,k]),A=j=>S?j==null?void 0:j[0]:j,[T,D]=nh({value:C,defaultValue:b}),F=BT(t.columns,{textKey:x,valueKey:_,childrenKey:k},T),[N,L]=W.useState(T);W.useEffect(()=>{l&&JSON.stringify(N)!==JSON.stringify(T)&&L(T)},[m]),W.useEffect(()=>{!l&&JSON.stringify(N)!==JSON.stringify(T)&&L(T)},[T]);const P=(j,H,Y)=>{var q;D(N,!0),(q=t.onConfirm)===null||q===void 0||q.call(t,A(j),A(H),A(Y)),l&&g.close()},U=()=>{var j;(j=t.onCancel)===null||j===void 0||j.call(t),l&&g.close()},$=DD((j,H,Y)=>{var q,X;L(j),l?m&&((q=t.onChange)===null||q===void 0||q.call(t,A(j),A(H),A(Y))):(X=t.onChange)===null||X===void 0||X.call(t,A(j),A(H),A(Y))}),O=cd(l)?Object.assign({closeOnClickOverlay:!0},l):{closeOnClickOverlay:!0},z=Q(lH,Object.assign({},h,{value:N,onCancel:U,onConfirm:P,onChange:$}));return l?Pe(rn,{children:[Q(sh,Object.assign({round:!0,position:"bottom",visible:m,closeOnClickOverlay:!0,onClickOverlay:()=>{O!=null&&O.closeOnClickOverlay&&d(!1)}},O,{children:z})),f==null?void 0:f(A(T),A(F.items),g)]}):z}const QC=W.forwardRef(sH);function uH(e){return Object.prototype.toString.call(e)==="[object Date]"&&!hD(e.getTime())}const cH=W.forwardRef((e,r)=>{const t=ea(e,{type:"datetime",placeholder:!1,minDate:fH,maxDate:dH,formatter:(P,U)=>U}),{value:i,defaultValue:l,formatter:f,columnsOrder:c,type:h,filter:m,minDate:d,maxDate:g}=t,C=$a(t,["value","defaultValue","formatter","columnsOrder","type","filter","minDate","maxDate"]),b=P=>(uH(P)||(P=new Date),P=Math.max(P,d.getTime()),P=Math.min(P,g.getTime()),new Date(P)),[x,_,k]=W2(()=>b(i||l)),S=(P,U)=>{const $=t[`${P}Date`],O=$.getFullYear();let z=1,j=1,H=0,Y=0;return P==="max"&&(z=12,j=GC(U.getFullYear(),U.getMonth()+1),H=23,Y=59),U.getFullYear()===O&&(z=$.getMonth()+1,U.getMonth()+1===z&&(j=$.getDate(),U.getDate()===j&&(H=$.getHours(),U.getHours()===H&&(Y=$.getMinutes())))),{[`${P}Year`]:O,[`${P}Month`]:z,[`${P}Date`]:j,[`${P}Hour`]:H,[`${P}Minute`]:Y}},A=W.useMemo(()=>{const{maxYear:P,maxDate:U,maxMonth:$,maxHour:O,maxMinute:z}=S("max",k.current),{minYear:j,minDate:H,minMonth:Y,minHour:q,minMinute:X}=S("min",k.current);let ne=[{type:"year",range:[j,P]},{type:"month",range:[Y,$]},{type:"day",range:[H,U]},{type:"hour",range:[q,O]},{type:"minute",range:[X,z]}];switch(h){case"date":ne=ne.slice(0,3);break;case"year-month":ne=ne.slice(0,2);break;case"month-day":ne=ne.slice(1,3);break;case"datehour":ne=ne.slice(0,4);break}if(c){const G=c.concat(ne.map(ee=>ee.type));ne.sort((ee,Z)=>G.indexOf(ee.type)-G.indexOf(Z.type))}return ne.map(({type:G,range:ee})=>{let Z=AT(ee[1]-ee[0]+1,V=>dl(ee[0]+V));return m&&(Z=m(G,Z)),{type:G,values:Z}})},[c,k.current,d,g]),T=W.useMemo(()=>A.map(P=>P.values.map(U=>f(P.type,U))),[A,f]),D=W.useMemo(()=>{const P=t.popup?b(k.current):k.current;return A.map($=>{switch($.type){case"year":return f("year",`${P.getFullYear()}`);case"month":return f("month",dl(P.getMonth()+1));case"day":return f("day",dl(P.getDate()));case"hour":return f("hour",dl(P.getHours()));case"minute":return f("minute",dl(P.getMinutes()));default:return""}})},[t.value,k.current,b]),F=P=>{const{type:U}=t,$=X=>{let ne=0;A.forEach((ee,Z)=>{X===ee.type&&(ne=Z)});const{values:G}=A[ne];return YI(G[P[ne]])};let O=null,z=null,j=null;U==="month-day"?(O=(x||d).getFullYear(),z=$("month"),j=$("day")):(O=$("year"),z=$("month"),j=U==="year-month"?1:$("day"));const H=GC(O,z);j=j>H?H:j;let Y=0,q=0;return U==="datehour"&&(Y=+$("hour")),U==="datetime"&&(Y=+$("hour"),q=+$("minute")),b(new Date(O,z-1,j,Y,q))},N=(P,U,$)=>{var O;const z=F($);_(z),(O=t.onChange)===null||O===void 0||O.call(t,z)},L=()=>{var P;(P=t.onConfirm)===null||P===void 0||P.call(t,x)};return Rc(()=>{const P=b(i);P&&P.valueOf()!==(x==null?void 0:x.valueOf())&&_(P)},[i,m,d,g]),Q(QC,Object.assign({},C,{value:D,ref:r,columns:T,onChange:N,onConfirm:L,onCancel:t.onCancel},{children:(P,U,$)=>{var O;return(O=t.children)===null||O===void 0?void 0:O.call(t,i||l,U,$)}}))}),LT=new Date().getFullYear(),fH=new Date(LT-10,0,1),dH=new Date(LT+10,11,31),pH=cH,hH=W.forwardRef((e,r)=>{const t=ea(e,{minHour:0,maxHour:23,minMinute:0,maxMinute:59,placeholder:!1,defaultValue:"",formatter:(L,P)=>P}),{value:i,defaultValue:l,formatter:f,filter:c,minHour:h,maxHour:m,minMinute:d,maxMinute:g}=t,C=$a(t,["value","defaultValue","formatter","filter","minHour","maxHour","minMinute","maxMinute"]),b=L=>{L||(L=`${dl(h)}:${dl(d)}`);let[P,U]=L.split(":");return P=dl(eh(P,+h,+m)),U=dl(eh(U,+d,+g)),`${P}:${U}`},[x,_]=W.useState(()=>b(i===void 0?l:i)),k=W.useMemo(()=>[{type:"hour",range:[+h,+m]},{type:"minute",range:[+d,+g]}],[h,m,d,g]),S=W.useMemo(()=>k.map(({type:L,range:P})=>{let U=AT(P[1]-P[0]+1,$=>dl(P[0]+$));return c&&(U=c(L,U)),{type:L,values:U}}),[k]),A=W.useMemo(()=>S.map(L=>L.values.map(P=>f(L.type,P))),[S]),T=W.useMemo(()=>{const L=(t.popup?b(t.value):x).split(":");return[f("hour",L[0]),f("minute",L[1])]},[t.value,x,b]),D=()=>{var L;(L=t.onConfirm)===null||L===void 0||L.call(t,x)},F=()=>{var L;(L=t.onCancel)===null||L===void 0||L.call(t)},N=L=>{var P;const U=b(L.join(":"));_(U),(P=t.onChange)===null||P===void 0||P.call(t,U)};return Rc(()=>{const L=b(x);_(L)},[c,h,m,d,g]),Rc(()=>{const L=b(i);L!==x&&_(L)},[i]),Q(QC,Object.assign({},C,{ref:r,columns:A,value:T,onChange:N,onConfirm:D,onCancel:F},{children:(L,P,U)=>{var $;return($=t.children)===null||$===void 0?void 0:$.call(t,i,P,U)}}))}),[zT]=Cn("datetime-picker"),ZC=W.forwardRef((e,r)=>e.type==="time"?Q(hH,Object.assign({ref:r,className:Re(zT())},e)):Q(pH,Object.assign({ref:r,className:Re(zT())},e)));function XC(e){return Array.isArray(e)?e:[e]}const CX="";function UT(e,r){this.v=e,this.k=r}function Da(e,r,t,i){var l=Object.defineProperty;try{l({},"",{})}catch{l=0}Da=function(c,h,m,d){function g(C,b){Da(c,C,function(x){return this._invoke(C,b,x)})}h?l?l(c,h,{value:m,enumerable:!d,configurable:!d,writable:!d}):c[h]=m:(g("next",0),g("throw",1),g("return",2))},Da(e,r,t,i)}function JC(){var e,r,t=typeof Symbol=="function"?Symbol:{},i=t.iterator||"@@iterator",l=t.toStringTag||"@@toStringTag";function f(x,_,k,S){var A=_&&_.prototype instanceof h?_:h,T=Object.create(A.prototype);return Da(T,"_invoke",function(D,F,N){var L,P,U,$=0,O=N||[],z=!1,j={p:0,n:0,v:e,a:H,f:H.bind(e,4),d:function(q,X){return L=q,P=0,U=e,j.n=X,c}};function H(Y,q){for(P=Y,U=q,r=0;!z&&$&&!X&&r<O.length;r++){var X,ne=O[r],G=j.p,ee=ne[2];Y>3?(X=ee===q)&&(U=ne[(P=ne[4])?5:(P=3,3)],ne[4]=ne[5]=e):ne[0]<=G&&((X=Y<2&&G<ne[1])?(P=0,j.v=q,j.n=ne[1]):G<ee&&(X=Y<3||ne[0]>q||q>ee)&&(ne[4]=Y,ne[5]=q,j.n=ee,P=0))}if(X||Y>1)return c;throw z=!0,q}return function(Y,q,X){if($>1)throw TypeError("Generator is already running");for(z&&q===1&&H(q,X),P=q,U=X;(r=P<2?e:U)||!z;){L||(P?P<3?(P>1&&(j.n=-1),H(P,U)):j.n=U:j.v=U);try{if($=2,L){if(P||(Y="next"),r=L[Y]){if(!(r=r.call(L,U)))throw TypeError("iterator result is not an object");if(!r.done)return r;U=r.value,P<2&&(P=0)}else P===1&&(r=L.return)&&r.call(L),P<2&&(U=TypeError("The iterator does not provide a '"+Y+"' method"),P=1);L=e}else if((r=(z=j.n<0)?U:D.call(F,j))!==c)break}catch(ne){L=e,P=1,U=ne}finally{$=1}}return{value:r,done:z}}}(x,k,S),!0),T}var c={};function h(){}function m(){}function d(){}r=Object.getPrototypeOf;var g=[][i]?r(r([][i]())):(Da(r={},i,function(){return this}),r),C=d.prototype=h.prototype=Object.create(g);function b(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,d):(x.__proto__=d,Da(x,l,"GeneratorFunction")),x.prototype=Object.create(C),x}return m.prototype=d,Da(C,"constructor",d),Da(d,"constructor",m),m.displayName="GeneratorFunction",Da(d,l,"GeneratorFunction"),Da(C),Da(C,l,"Generator"),Da(C,i,function(){return this}),Da(C,"toString",function(){return"[object Generator]"}),(JC=function(){return{w:f,m:b}})()}function hy(e,r){function t(l,f,c,h){try{var m=e[l](f),d=m.value;return d instanceof UT?r.resolve(d.v).then(function(g){t("next",g,c,h)},function(g){t("throw",g,c,h)}):r.resolve(d).then(function(g){m.value=g,c(m)},function(g){return t("throw",g,c,h)})}catch(g){h(g)}}var i;this.next||(Da(hy.prototype),Da(hy.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Da(this,"_invoke",function(l,f,c){function h(){return new r(function(m,d){t(l,c,m,d)})}return i=i?i.then(h,h):h()},!0)}function jT(e,r,t,i,l){return new hy(JC().w(e,r,t,i),l||Promise)}function vH(e,r,t,i,l){var f=jT(e,r,t,i,l);return f.next().then(function(c){return c.done?c.value:f.next()})}function mH(e){var r=Object(e),t=[];for(var i in r)t.unshift(i);return function l(){for(;t.length;)if((i=t.pop())in r)return l.value=i,l.done=!1,l;return l.done=!0,l}}function IT(e){if(e!=null){var r=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],t=0;if(r)return r.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}throw new TypeError(Mr(e)+" is not iterable")}function ro(){var e=JC(),r=e.m(ro),t=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function i(c){var h=typeof c=="function"&&c.constructor;return!!h&&(h===t||(h.displayName||h.name)==="GeneratorFunction")}var l={throw:1,return:2,break:3,continue:3};function f(c){var h,m;return function(d){h||(h={stop:function(){return m(d.a,2)},catch:function(){return d.v},abrupt:function(C,b){return m(d.a,l[C],b)},delegateYield:function(C,b,x){return h.resultName=b,m(d.d,IT(C),x)},finish:function(C){return m(d.f,C)}},m=function(C,b,x){d.p=h.prev,d.n=h.next;try{return C(b,x)}finally{h.next=d.n}}),h.resultName&&(h[h.resultName]=d.v,h.resultName=void 0),h.sent=d.v,h.next=d.n;try{return c.call(this,h)}finally{d.p=h.prev,d.n=h.next}}}return(ro=function(){return{wrap:function(m,d,g,C){return e.w(f(m),d,g,C&&C.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(m,d){return new UT(m,d)},AsyncIterator:hy,async:function(m,d,g,C,b){return(i(d)?jT:vH)(f(m),d,g,C,b)},keys:mH,values:IT}})()}function HT(e,r,t,i,l,f,c){try{var h=e[f](c),m=h.value}catch(d){return void t(d)}h.done?r(m):Promise.resolve(m).then(i,l)}function Bh(e){return function(){var r=this,t=arguments;return new Promise(function(i,l){var f=e.apply(r,t);function c(m){HT(f,i,l,c,h,"next",m)}function h(m){HT(f,i,l,c,h,"throw",m)}c(void 0)})}}function gH(e){if(Array.isArray(e))return bb(e)}function VT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
197
197
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function an(e){return gH(e)||VT(e)||Cb(e)||yH()}function ew(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function $T(e,r){for(var t=0;t<r.length;t++){var i=r[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,H4(i.key),i)}}function tw(e,r,t){return r&&$T(e.prototype,r),t&&$T(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xH(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&Pg(e,r)}function vy(e){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vy(e)}function YT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YT=function(){return!!e})()}function bH(e,r){if(r&&(Mr(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dn(e)}function CH(e){var r=YT();return function(){var t,i=vy(e);if(r){var l=vy(this).constructor;t=Reflect.construct(i,arguments,l)}else t=i.apply(this,arguments);return bH(this,t)}}function nw(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[];return W.Children.forEach(e,function(i){i==null&&!r.keepEmpty||(Array.isArray(i)?t=t.concat(nw(i)):l9(i)&&i.props?t=t.concat(nw(i.props.children,r)):t.push(i))}),t}function qT(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=new Set;function l(f,c){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,m=i.has(f);if(_r(!m,"Warning: There may be circular references"),m)return!1;if(f===c)return!0;if(t&&h>1)return!1;i.add(f);var d=h+1;if(Array.isArray(f)){if(!Array.isArray(c)||f.length!==c.length)return!1;for(var g=0;g<f.length;g++)if(!l(f[g],c[g],d))return!1;return!0}if(f&&c&&Mr(f)==="object"&&Mr(c)==="object"){var C=Object.keys(f);return C.length!==Object.keys(c).length?!1:C.every(function(b){return l(f[b],c[b],d)})}return!1}return l(e,r)}var zc="RC_FORM_INTERNAL_HOOKS",Rn=function(){_r(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},vu=Ne.createContext({getFieldValue:Rn,getFieldsValue:Rn,getFieldError:Rn,getFieldWarning:Rn,getFieldsError:Rn,isFieldsTouched:Rn,isFieldTouched:Rn,isFieldValidating:Rn,isFieldsValidating:Rn,resetFields:Rn,setFields:Rn,setFieldValue:Rn,setFieldsValue:Rn,validateFields:Rn,submit:Rn,getInternalHooks:function(){return Rn(),{dispatch:Rn,initEntityValue:Rn,registerField:Rn,useSubscribe:Rn,setInitialValues:Rn,destroyForm:Rn,setCallbacks:Rn,registerWatch:Rn,getFields:Rn,setValidateMessages:Rn,setPreserve:Rn,getInitialValue:Rn}}}),my=Ne.createContext(null);function rw(e){return e==null?[]:Array.isArray(e)?e:[e]}function wH(e){return e&&!!e._init}function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Uc.apply(this,arguments)}function _H(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Lh(e,r)}function aw(e){return aw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},aw(e)}function Lh(e,r){return Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},Lh(e,r)}function EH(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gy(e,r,t){return EH()?gy=Reflect.construct.bind():gy=function(l,f,c){var h=[null];h.push.apply(h,f);var m=Function.bind.apply(l,h),d=new m;return c&&Lh(d,c.prototype),d},gy.apply(null,arguments)}function SH(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function iw(e){var r=typeof Map=="function"?new Map:void 0;return iw=function(i){if(i===null||!SH(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r<"u"){if(r.has(i))return r.get(i);r.set(i,l)}function l(){return gy(i,arguments,aw(this).constructor)}return l.prototype=Object.create(i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),Lh(l,i)},iw(e)}var DH=/%[sdj%]/g,GT=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(GT=function(r,t){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&t.every(function(i){return typeof i=="string"})});function ow(e){if(!e||!e.length)return null;var r={};return e.forEach(function(t){var i=t.field;r[i]=r[i]||[],r[i].push(t)}),r}function Li(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i<r;i++)t[i-1]=arguments[i];var l=0,f=t.length;if(typeof e=="function")return e.apply(null,t);if(typeof e=="string"){var c=e.replace(DH,function(h){if(h==="%%")return"%";if(l>=f)return h;switch(h){case"%s":return String(t[l++]);case"%d":return Number(t[l++]);case"%j":try{return JSON.stringify(t[l++])}catch{return"[Circular]"}break;default:return h}});return c}return e}function kH(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Br(e,r){return!!(e==null||r==="array"&&Array.isArray(e)&&!e.length||kH(r)&&typeof e=="string"&&!e)}function TH(e,r,t){var i=[],l=0,f=e.length;function c(h){i.push.apply(i,h||[]),l++,l===f&&t(i)}e.forEach(function(h){r(h,c)})}function KT(e,r,t){var i=0,l=e.length;function f(c){if(c&&c.length){t(c);return}var h=i;i=i+1,h<l?r(e[h],f):t([])}f([])}function AH(e){var r=[];return Object.keys(e).forEach(function(t){r.push.apply(r,e[t]||[])}),r}var WT=function(e){_H(r,e);function r(t,i){var l;return l=e.call(this,"Async Validation Error")||this,l.errors=t,l.fields=i,l}return r}(iw(Error));function OH(e,r,t,i,l){if(r.first){var f=new Promise(function(b,x){var _=function(A){return i(A),A.length?x(new WT(A,ow(A))):b(l)},k=AH(e);KT(k,t,_)});return f.catch(function(b){return b}),f}var c=r.firstFields===!0?Object.keys(e):r.firstFields||[],h=Object.keys(e),m=h.length,d=0,g=[],C=new Promise(function(b,x){var _=function(S){if(g.push.apply(g,S),d++,d===m)return i(g),g.length?x(new WT(g,ow(g))):b(l)};h.length||(i(g),b(l)),h.forEach(function(k){var S=e[k];c.indexOf(k)!==-1?KT(S,t,_):TH(S,t,_)})});return C.catch(function(b){return b}),C}function RH(e){return!!(e&&e.message!==void 0)}function FH(e,r){for(var t=e,i=0;i<r.length;i++){if(t==null)return t;t=t[r[i]]}return t}function QT(e,r){return function(t){var i;return e.fullFields?i=FH(r,e.fullFields):i=r[t.field||e.fullField],RH(t)?(t.field=t.field||e.fullField,t.fieldValue=i,t):{message:typeof t=="function"?t():t,fieldValue:i,field:t.field||e.fullField}}}function ZT(e,r){if(r){for(var t in r)if(r.hasOwnProperty(t)){var i=r[t];typeof i=="object"&&typeof e[t]=="object"?e[t]=Uc({},e[t],i):e[t]=i}}return e}var XT=function(r,t,i,l,f,c){r.required&&(!i.hasOwnProperty(r.field)||Br(t,c||r.type))&&l.push(Li(f.messages.required,r.fullField))},NH=function(r,t,i,l,f){(/^\s+$/.test(t)||t==="")&&l.push(Li(f.messages.whitespace,r.fullField))},yy,MH=function(){if(yy)return yy;var e="[a-fA-F\\d:]",r=function(F){return F&&F.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",l=(`
|
|
198
198
|
(?:
|
|
199
199
|
(?:`+i+":){7}(?:"+i+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|