szld-libs 0.3.49 → 0.3.50

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.`,kt(cr)||"Unknown"));var Y=qs(_,M);Y.payload={ele
193
193
  root.render(<App />);`),a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.transitionCallbacks!==void 0&&a.transitionCallbacks);var M=oF(n,fx,null,u,h,y,_);ax(M.current,n);var j=n.nodeType===fr?n.parentNode:n;return cm(j),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.");TF(n),a===void 0&&c("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var h=u??null,y=u!=null&&u.hydratedSources||null,_=!1,M=!1,j="",Y=kF;u!=null&&(u.unstable_strictMode===!0&&(_=!0),u.identifierPrefix!==void 0&&(j=u.identifierPrefix),u.onRecoverableError!==void 0&&(Y=u.onRecoverableError));var ne=lF(a,null,n,fx,h,_,M,j,Y);if(ax(ne.current,n),cm(n),y)for(var oe=0;oe<y.length;oe++){var he=y[oe];Zq(ne,he)}return new mb(ne)}function gb(n){return!!(n&&(n.nodeType===ka||n.nodeType===Hi||n.nodeType===hs||!ee))}function rg(n){return!!(n&&(n.nodeType===ka||n.nodeType===Hi||n.nodeType===hs||n.nodeType===fr&&n.nodeValue===" react-mount-point-unstable "))}function TF(n){n.nodeType===ka&&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,AF;AF=function(n){if(n._reactRootContainer&&n.nodeType!==fr){var a=uF(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,h=M4(n),y=!!(h&&ec(h));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===ka&&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 OF(){}function YW(n,a,u,h,y){if(y){if(typeof h=="function"){var _=h;h=function(){var fe=vb(M);_.call(fe)}}var M=lF(a,h,n,nc,null,!1,!1,"",OF);n._reactRootContainer=M,ax(M.current,n);var j=n.nodeType===fr?n.parentNode:n;return cm(j),Qs(),M}else{for(var Y;Y=n.lastChild;)n.removeChild(Y);if(typeof h=="function"){var ne=h;h=function(){var fe=vb(oe);ne.call(fe)}}var oe=oF(n,nc,null,!1,!1,"",OF);n._reactRootContainer=oe,ax(oe.current,n);var he=n.nodeType===fr?n.parentNode:n;return cm(he),Qs(function(){ng(a,oe,u,h)}),oe}}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,h,y){AF(u),qW(y===void 0?null:y,"render");var _=u._reactRootContainer,M;if(!_)M=YW(u,a,n,y,h);else{if(M=_,typeof y=="function"){var j=y;y=function(){var Y=vb(M);j.call(Y)}}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.",kn(a.type)||"A component"),a.stateNode._warnedAboutRefsInRender=!0}}return n==null?null:n.nodeType===ka?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 h=Cm(a)&&a._reactRootContainer===void 0;h&&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 h=Cm(a)&&a._reactRootContainer===void 0;h&&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,h){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,h)}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),h=u&&!ec(u);h&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Qs(function(){yb(null,null,n,!1,function(){n._reactRootContainer=null,DA(n)})}),!0}else{{var y=M4(n),_=!!(y&&ec(y)),M=n.nodeType===ka&&rg(n.parentNode)&&!!n.parentNode._reactRootContainer;_&&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}}et(FW),D1(NW),Df(MW),qv(bi),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,Qs);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,h){return QW(n,a,u,h)}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 UR()&&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."),Qs(n)}var rQ=jW({findFiberByHostInstance:Bf,bundleType:1,version:T4,rendererPackageName:"react-dom"});if(!rQ&&lt&&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)}ai.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P4,ai.createPortal=XW,ai.createRoot=eQ,ai.findDOMNode=GW,ai.flushSync=nQ,ai.hydrate=KW,ai.hydrateRoot=tQ,ai.render=WW,ai.unmountComponentAtNode=ZW,ai.unstable_batchedUpdates=f4,ai.unstable_renderSubtreeIntoContainer=JW,ai.version=T4,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ai}(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=d9()):e.exports=h9()})(eu);const fg=MF(eu.exports),p9=NF({__proto__:null,default:fg},[eu.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 v9=Object.freeze(Object.defineProperty({__proto__:null,FileType:Lb,FileTypeMap:zb,FileSuffix:ed},Symbol.toStringTag,{value:"Module"})),m9=e=>{if(!Js.isObject(e))return e;const r=e;return Js.pick(r,Js.keys(r).filter(t=>!Js.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())},g9=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},y9=e=>{localStorage.removeItem(e)},x9=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;sessionStorage.setItem(e,t)},b9=e=>{let t=sessionStorage.getItem(e);return typeof t=="string"&&(t=jb(t)),t||null},C9=e=>{sessionStorage.removeItem(e)},w9=(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 _9(){var e=URL.createObjectURL(new Blob),r=e.toString();return URL.revokeObjectURL(e),r.substr(r.lastIndexOf("/")+1)}const E9=Object.freeze(Object.defineProperty({__proto__:null,filterObject:m9,getBase64:M8,getFileSuffix:dg,getFileType:g9,setLocalStorage:P8,getLocalStorage:Ub,removeLocalStorage:y9,setSessionStorage:x9,getSessionStorage:b9,removeSessionStorage:C9,arrayDeduplication:w9,JSONParse:jb,uuid:_9,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 S9=4,B8=0,L8=1,D9=2;function td(e){let r=e.length;for(;--r>=0;)e[r]=0}const k9=0,z8=1,T9=2,A9=3,O9=258,Ib=29,kh=256,Th=kh+1+Ib,nd=30,Hb=19,U8=2*Th+1,gc=15,Vb=16,R9=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]),hg=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]),F9=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]),N9=512,ns=new Array((Th+2)*2);td(ns);const Ah=new Array(nd*2);td(Ah);const Oh=new Array(N9);td(Oh);const Rh=new Array(O9-A9+1);td(Rh);const qb=new Array(Ib);td(qb);const pg=new Array(nd);td(pg);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?Oh[e]:Oh[256+(e>>>7)],Fh=(e,r)=>{e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255},ii=(e,r,t)=>{e.bi_valid>Vb-t?(e.bi_buf|=r<<e.bi_valid&65535,Fh(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)},al=(e,r,t)=>{ii(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},M9=e=>{e.bi_valid===16?(Fh(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)},P9=(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,p=r.stat_desc.extra_base,g=r.stat_desc.max_length;let d,m,C,b,x,E,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++)m=e.heap[d],b=t[t[m*2+1]*2+1]+1,b>g&&(b=g,k++),t[m*2+1]=b,!(m>i)&&(e.bl_count[b]++,x=0,m>=p&&(x=c[m-p]),E=t[m*2],e.opt_len+=E*(b+x),f&&(e.static_len+=E*(l[m*2+1]+x)));if(k!==0){do{for(b=g-1;e.bl_count[b]===0;)b--;e.bl_count[b]--,e.bl_count[b+1]+=2,e.bl_count[g]--,k-=2}while(k>0);for(b=g;b!==0;b--)for(m=e.bl_count[b];m!==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),m--)}},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 p=e[c*2+1];p!==0&&(e[c*2]=K8(i[p]++,p))}},B9=()=>{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++)Rh[t++]=i;for(Rh[t-1]=i,l=0,i=0;i<16;i++)for(pg[i]=l,e=0;e<1<<hg[i];e++)Oh[l++]=i;for(l>>=7;i<nd;i++)for(pg[i]=l<<7,e=0;e<1<<hg[i]-7;e++)Oh[256+l++]=i;for(r=0;r<=gc;r++)f[r]=0;for(e=0;e<=143;)ns[e*2+1]=8,e++,f[8]++;for(;e<=255;)ns[e*2+1]=9,e++,f[9]++;for(;e<=279;)ns[e*2+1]=7,e++,f[7]++;for(;e<=287;)ns[e*2+1]=8,e++,f[8]++;for(W8(ns,Th+1,f),e=0;e<nd;e++)Ah[e*2+1]=5,Ah[e*2]=K8(e,5);$8=new Gb(ns,Yb,kh+1,Th,gc),Y8=new Gb(Ah,hg,0,nd,gc),q8=new Gb(new Array(0),F9,0,Hb,R9)},Q8=e=>{let r;for(r=0;r<Th;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?Fh(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,p;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?al(e,l,r):(c=Rh[l],al(e,c+kh+1,r),p=Yb[c],p!==0&&(l-=qb[c],ii(e,l,p)),i--,c=G8(i),al(e,c,t),p=hg[c],p!==0&&(i-=pg[c],ii(e,i,p)));while(f<e.sym_next);al(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,p,g=-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]=g=c,e.depth[c]=0):t[c*2+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=g<2?++g:0,t[d*2]=1,e.depth[d]=0,e.opt_len--,l&&(e.static_len-=i[d*2+1]);for(r.max_code=g,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),p=e.heap[1],e.heap[--e.heap_max]=c,e.heap[--e.heap_max]=p,t[d*2]=t[c*2]+t[p*2],e.depth[d]=(e.depth[c]>=e.depth[p]?e.depth[c]:e.depth[p])+1,t[c*2+1]=t[p*2+1]=d,e.heap[1]=d++,Wb(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],P9(e,r),W8(t,g,e.bl_count)},e5=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],p=0,g=7,d=4;for(c===0&&(g=138,d=3),r[(t+1)*2+1]=65535,i=0;i<=t;i++)f=c,c=r[(i+1)*2+1],!(++p<g&&f===c)&&(p<d?e.bl_tree[f*2]+=p:f!==0?(f!==l&&e.bl_tree[f*2]++,e.bl_tree[j8*2]++):p<=10?e.bl_tree[I8*2]++:e.bl_tree[H8*2]++,p=0,l=f,c===0?(g=138,d=3):f===c?(g=6,d=3):(g=7,d=4))},t5=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],p=0,g=7,d=4;for(c===0&&(g=138,d=3),i=0;i<=t;i++)if(f=c,c=r[(i+1)*2+1],!(++p<g&&f===c)){if(p<d)do al(e,f,e.bl_tree);while(--p!==0);else f!==0?(f!==l&&(al(e,f,e.bl_tree),p--),al(e,j8,e.bl_tree),ii(e,p-3,2)):p<=10?(al(e,I8,e.bl_tree),ii(e,p-3,3)):(al(e,H8,e.bl_tree),ii(e,p-11,7));p=0,l=f,c===0?(g=138,d=3):f===c?(g=6,d=3):(g=7,d=4)}},L9=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},z9=(e,r,t,i)=>{let l;for(ii(e,r-257,5),ii(e,t-1,5),ii(e,i-4,4),l=0;l<i;l++)ii(e,e.bl_tree[V8[l]*2+1],3);t5(e,e.dyn_ltree,r-1),t5(e,e.dyn_dtree,t-1)},U9=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<kh;t++)if(e.dyn_ltree[t*2]!==0)return L8;return B8};let n5=!1;const j9=e=>{n5||(B9(),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)=>{ii(e,(k9<<1)+(i?1:0),3),Z8(e),Fh(e,t),Fh(e,~t),t&&e.pending_buf.set(e.window.subarray(r,r+t),e.pending),e.pending+=t},I9=e=>{ii(e,z8<<1,3),al(e,$b,ns),M9(e)},H9=(e,r,t,i)=>{let l,f,c=0;e.level>0?(e.strm.data_type===D9&&(e.strm.data_type=U9(e)),Qb(e,e.l_desc),Qb(e,e.d_desc),c=L9(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===S9||f===l?(ii(e,(z8<<1)+(i?1:0),3),J8(e,ns,Ah)):(ii(e,(T9<<1)+(i?1:0),3),z9(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)},V9=(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[(Rh[t]+kh+1)*2]++,e.dyn_dtree[G8(r)*2]++),e.sym_next===e.sym_end);var $9=j9,Y9=r5,q9=H9,G9=V9,K9=I9,W9={_tr_init:$9,_tr_stored_block:Y9,_tr_flush_block:q9,_tr_tally:G9,_tr_align:K9},Nh=(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 Q9=()=>{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},Z9=new Uint32Array(Q9());var Zr=(e,r,t,i)=>{const l=Z9,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:X9,_tr_stored_block:Zb,_tr_flush_block:J9,_tr_tally:tu,_tr_align:eN}=W9,{Z_NO_FLUSH:nu,Z_PARTIAL_FLUSH:tN,Z_FULL_FLUSH:nN,Z_FINISH:Zi,Z_BLOCK:a5,Z_OK:fa,Z_STREAM_END:i5,Z_STREAM_ERROR:il,Z_DATA_ERROR:rN,Z_BUF_ERROR:Xb,Z_DEFAULT_COMPRESSION:aN,Z_FILTERED:iN,Z_HUFFMAN_ONLY:vg,Z_RLE:oN,Z_FIXED:lN,Z_DEFAULT_STRATEGY:sN,Z_UNKNOWN:uN,Z_DEFLATED:mg}=xc,cN=9,fN=15,dN=8,hN=29,Jb=256+1+hN,pN=30,vN=19,mN=2*Jb+1,gN=15,qt=3,ru=258,ol=ru+qt+1,yN=32,rd=42,e2=57,t2=69,n2=73,r2=91,a2=103,bc=113,Mh=666,Ia=1,ad=2,Cc=3,id=4,xN=3,wc=(e,r)=>(e.msg=yc[r],r),o5=e=>e*2-(e>4?9:0),au=e=>{let r=e.length;for(;--r>=0;)e[r]=0},bN=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 iu=(e,r,t)=>(r<<e.hash_shift^t)&e.hash_mask;const Ai=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))},Oi=(e,r)=>{J9(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Ai(e.strm)},sn=(e,r)=>{e.pending_buf[e.pending++]=r},Ph=(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=Nh(e.adler,r,l,t):e.state.wrap===2&&(e.adler=Zr(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,p=e.nice_match;const g=e.strstart>e.w_size-ol?e.strstart-(e.w_size-ol):0,d=e.window,m=e.w_mask,C=e.prev,b=e.strstart+ru;let x=d[i+c-1],E=d[i+c];e.prev_length>=e.good_match&&(t>>=2),p>e.lookahead&&(p=e.lookahead);do if(l=r,!(d[l+c]!==E||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=ru-(b-i),i=b-ru,f>c){if(e.match_start=r,c=f,f>=p)break;x=d[i+c-1],E=d[i+c]}}while((r=C[r&m])>g&&--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-ol)&&(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),bN(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>=qt)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=iu(e,e.ins_h,e.window[l+1]);e.insert&&(e.ins_h=iu(e,e.ins_h,e.window[l+qt-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<qt)););}while(e.lookahead<ol&&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,p=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===nu||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,Ai(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 p-=e.strm.avail_in,p&&(p>=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<=p&&(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-p,e.strm.next_in),e.strstart),e.strstart+=p,e.insert+=p>e.w_size-e.insert?e.w_size-e.insert:p),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),c?id:r!==nu&&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!==nu&&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,Ai(e.strm)),c?Cc:Ia)},o2=(e,r)=>{let t,i;for(;;){if(e.lookahead<ol){if(od(e),e.lookahead<ol&&r===nu)return Ia;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-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-ol&&(e.match_length=l5(e,t)),e.match_length>=qt)if(i=tu(e,e.strstart-e.match_start,e.match_length-qt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=qt){e.match_length--;do e.strstart++,e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-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=iu(e,e.ins_h,e.window[e.strstart+1]);else i=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=e.strstart<qt-1?e.strstart:qt-1,r===Zi?(Oi(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:ad},ld=(e,r)=>{let t,i,l;for(;;){if(e.lookahead<ol){if(od(e),e.lookahead<ol&&r===nu)return Ia;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-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=qt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-ol&&(e.match_length=l5(e,t),e.match_length<=5&&(e.strategy===iN||e.match_length===qt&&e.strstart-e.match_start>4096)&&(e.match_length=qt-1)),e.prev_length>=qt&&e.match_length<=e.prev_length){l=e.strstart+e.lookahead-qt,i=tu(e,e.strstart-1-e.prev_match,e.prev_length-qt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=l&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-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=qt-1,e.strstart++,i&&(Oi(e,!1),e.strm.avail_out===0))return Ia}else if(e.match_available){if(i=tu(e,0,e.window[e.strstart-1]),i&&Oi(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ia}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=tu(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<qt-1?e.strstart:qt-1,r===Zi?(Oi(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:ad},CN=(e,r)=>{let t,i,l,f;const c=e.window;for(;;){if(e.lookahead<=ru){if(od(e),e.lookahead<=ru&&r===nu)return Ia;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=qt&&e.strstart>0&&(l=e.strstart-1,i=c[l],i===c[++l]&&i===c[++l]&&i===c[++l])){f=e.strstart+ru;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=ru-(f-l),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=qt?(t=tu(e,1,e.match_length-qt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=0,r===Zi?(Oi(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:ad},wN=(e,r)=>{let t;for(;;){if(e.lookahead===0&&(od(e),e.lookahead===0)){if(r===nu)return Ia;break}if(e.match_length=0,t=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=0,r===Zi?(Oi(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:ad};function ll(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 Bh=[new ll(0,0,0,0,s5),new ll(4,4,8,4,o2),new ll(4,5,16,8,o2),new ll(4,6,32,32,o2),new ll(4,4,16,16,ld),new ll(8,16,32,32,ld),new ll(8,16,128,128,ld),new ll(8,32,128,256,ld),new ll(32,128,258,1024,ld),new ll(32,258,258,4096,ld)],_N=e=>{e.window_size=2*e.w_size,au(e.head),e.max_lazy_match=Bh[e.level].max_lazy,e.good_match=Bh[e.level].good_length,e.nice_match=Bh[e.level].nice_length,e.max_chain_length=Bh[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=qt-1,e.match_available=0,e.ins_h=0};function EN(){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(mN*2),this.dyn_dtree=new Uint16Array((2*pN+1)*2),this.bl_tree=new Uint16Array((2*vN+1)*2),au(this.dyn_ltree),au(this.dyn_dtree),au(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(gN+1),this.heap=new Uint16Array(2*Jb+1),au(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Jb+1),au(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 Lh=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!==Mh?1:0},u5=e=>{if(Lh(e))return wc(e,il);e.total_in=e.total_out=0,e.data_type=uN;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,X9(r),fa},c5=e=>{const r=u5(e);return r===fa&&_N(e.state),r},SN=(e,r)=>Lh(e)||e.state.wrap!==2?il:(e.state.gzhead=r,fa),f5=(e,r,t,i,l,f)=>{if(!e)return il;let c=1;if(r===aN&&(r=6),i<0?(c=0,i=-i):i>15&&(c=2,i-=16),l<1||l>cN||t!==mg||i<8||i>15||r<0||r>9||f<0||f>lN||i===8&&c!==1)return wc(e,il);i===8&&(i=9);const p=new EN;return e.state=p,p.strm=e,p.status=rd,p.wrap=c,p.gzhead=null,p.w_bits=i,p.w_size=1<<p.w_bits,p.w_mask=p.w_size-1,p.hash_bits=l+7,p.hash_size=1<<p.hash_bits,p.hash_mask=p.hash_size-1,p.hash_shift=~~((p.hash_bits+qt-1)/qt),p.window=new Uint8Array(p.w_size*2),p.head=new Uint16Array(p.hash_size),p.prev=new Uint16Array(p.w_size),p.lit_bufsize=1<<l+6,p.pending_buf_size=p.lit_bufsize*4,p.pending_buf=new Uint8Array(p.pending_buf_size),p.sym_buf=p.lit_bufsize,p.sym_end=(p.lit_bufsize-1)*3,p.level=r,p.strategy=f,p.method=t,c5(e)},DN=(e,r)=>f5(e,r,mg,fN,dN,sN),kN=(e,r)=>{if(Lh(e)||r>a5||r<0)return e?wc(e,il):il;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===Mh&&r!==Zi)return wc(e,e.avail_out===0?Xb:il);const i=t.last_flush;if(t.last_flush=r,t.pending!==0){if(Ai(e),e.avail_out===0)return t.last_flush=-1,fa}else if(e.avail_in===0&&o5(r)<=o5(i)&&r!==Zi)return wc(e,Xb);if(t.status===Mh&&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|=yN),l+=31-l%31,Ph(t,l),t.strstart!==0&&(Ph(t,e.adler>>>16),Ph(t,e.adler&65535)),e.adler=1,t.status=bc,Ai(e),t.pending!==0)return t.last_flush=-1,fa}if(t.status===e2){if(e.adler=0,sn(t,31),sn(t,139),sn(t,8),t.gzhead)sn(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)),sn(t,t.gzhead.time&255),sn(t,t.gzhead.time>>8&255),sn(t,t.gzhead.time>>16&255),sn(t,t.gzhead.time>>24&255),sn(t,t.level===9?2:t.strategy>=vg||t.level<2?4:0),sn(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(sn(t,t.gzhead.extra.length&255),sn(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=Zr(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=t2;else if(sn(t,0),sn(t,0),sn(t,0),sn(t,0),sn(t,0),sn(t,t.level===9?2:t.strategy>=vg||t.level<2?4:0),sn(t,xN),t.status=bc,Ai(e),t.pending!==0)return t.last_flush=-1,fa}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 p=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+p),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>l&&(e.adler=Zr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex+=p,Ai(e),t.pending!==0)return t.last_flush=-1,fa;l=0,f-=p}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=Zr(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=Zr(e.adler,t.pending_buf,t.pending-l,l)),Ai(e),t.pending!==0)return t.last_flush=-1,fa;l=0}t.gzindex<t.gzhead.name.length?f=t.gzhead.name.charCodeAt(t.gzindex++)&255:f=0,sn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Zr(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=Zr(e.adler,t.pending_buf,t.pending-l,l)),Ai(e),t.pending!==0)return t.last_flush=-1,fa;l=0}t.gzindex<t.gzhead.comment.length?f=t.gzhead.comment.charCodeAt(t.gzindex++)&255:f=0,sn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Zr(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&&(Ai(e),t.pending!==0))return t.last_flush=-1,fa;sn(t,e.adler&255),sn(t,e.adler>>8&255),e.adler=0}if(t.status=bc,Ai(e),t.pending!==0)return t.last_flush=-1,fa}if(e.avail_in!==0||t.lookahead!==0||r!==nu&&t.status!==Mh){let l=t.level===0?s5(t,r):t.strategy===vg?wN(t,r):t.strategy===oN?CN(t,r):Bh[t.level].func(t,r);if((l===Cc||l===id)&&(t.status=Mh),l===Ia||l===Cc)return e.avail_out===0&&(t.last_flush=-1),fa;if(l===ad&&(r===tN?eN(t):r!==a5&&(Zb(t,0,0,!1),r===nN&&(au(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),Ai(e),e.avail_out===0))return t.last_flush=-1,fa}return r!==Zi?fa:t.wrap<=0?i5:(t.wrap===2?(sn(t,e.adler&255),sn(t,e.adler>>8&255),sn(t,e.adler>>16&255),sn(t,e.adler>>24&255),sn(t,e.total_in&255),sn(t,e.total_in>>8&255),sn(t,e.total_in>>16&255),sn(t,e.total_in>>24&255)):(Ph(t,e.adler>>>16),Ph(t,e.adler&65535)),Ai(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?fa:i5)},TN=e=>{if(Lh(e))return il;const r=e.state.status;return e.state=null,r===bc?wc(e,rN):fa},AN=(e,r)=>{let t=r.length;if(Lh(e))return il;const i=e.state,l=i.wrap;if(l===2||l===1&&i.status!==rd||i.lookahead)return il;if(l===1&&(e.adler=Nh(e.adler,r,t,0)),i.wrap=0,t>=i.w_size){l===0&&(au(i.head),i.strstart=0,i.block_start=0,i.insert=0);let g=new Uint8Array(i.w_size);g.set(r.subarray(t-i.w_size,t),0),r=g,t=i.w_size}const f=e.avail_in,c=e.next_in,p=e.input;for(e.avail_in=t,e.next_in=0,e.input=r,od(i);i.lookahead>=qt;){let g=i.strstart,d=i.lookahead-(qt-1);do i.ins_h=iu(i,i.ins_h,i.window[g+qt-1]),i.prev[g&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=g,g++;while(--d);i.strstart=g,i.lookahead=qt-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=qt-1,i.match_available=0,e.next_in=c,e.input=p,e.avail_in=f,i.wrap=l,fa};var ON=DN,RN=f5,FN=c5,NN=u5,MN=SN,PN=kN,BN=TN,LN=AN,zN="pako deflate (from Nodeca project)",zh={deflateInit:ON,deflateInit2:RN,deflateReset:FN,deflateResetKeep:NN,deflateSetHeader:MN,deflate:PN,deflateEnd:BN,deflateSetDictionary:LN,deflateInfo:zN};const UN=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var jN=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)UN(t,i)&&(e[i]=t[i])}}return e},IN=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:jN,flattenChunks:IN};let d5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{d5=!1}const Uh=new Uint8Array(256);for(let e=0;e<256;e++)Uh[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Uh[254]=Uh[254]=1;var HN=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let r,t,i,l,f,c=e.length,p=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++)),p+=t<128?1:t<2048?2:t<65536?3:4;for(r=new Uint8Array(p),f=0,l=0;f<p;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 VN=(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 $N=(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 p=Uh[c];if(p>4){f[l++]=65533,i+=p-1;continue}for(c&=p===2?31:p===3?15:7;p>1&&i<t;)c=c<<6|e[i++]&63,p--;if(p>1){f[l++]=65533;continue}c<65536?f[l++]=c:(c-=65536,f[l++]=55296|c>>10&1023,f[l++]=56320|c&1023)}return VN(f,l)},YN=(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+Uh[e[t]]>r?t:r},jh={string2buf:HN,buf2string:$N,utf8border:YN};function qN(){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 h5=qN;const p5=Object.prototype.toString,{Z_NO_FLUSH:GN,Z_SYNC_FLUSH:KN,Z_FULL_FLUSH:WN,Z_FINISH:QN,Z_OK:yg,Z_STREAM_END:ZN,Z_DEFAULT_COMPRESSION:XN,Z_DEFAULT_STRATEGY:JN,Z_DEFLATED:eM}=xc;function Ih(e){this.options=gg.assign({level:XN,method:eM,chunkSize:16384,windowBits:15,memLevel:8,strategy:JN},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 h5,this.strm.avail_out=0;let t=zh.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==yg)throw new Error(yc[t]);if(r.header&&zh.deflateSetHeader(this.strm,r.header),r.dictionary){let i;if(typeof r.dictionary=="string"?i=jh.string2buf(r.dictionary):p5.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,t=zh.deflateSetDictionary(this.strm,i),t!==yg)throw new Error(yc[t]);this._dict_set=!0}}Ih.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?QN:GN,typeof e=="string"?t.input=jh.string2buf(e):p5.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===KN||f===WN)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(l=zh.deflate(t,f),l===ZN)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),l=zh.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},Ih.prototype.onData=function(e){this.chunks.push(e)},Ih.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 Ih(r);if(t.push(e,!0),t.err)throw t.msg||yc[t.err];return t.result}function tM(e,r){return r=r||{},r.raw=!0,l2(e,r)}function nM(e,r){return r=r||{},r.gzip=!0,l2(e,r)}var rM=Ih,aM=l2,iM=tM,oM=nM,lM=xc,sM={Deflate:rM,deflate:aM,deflateRaw:iM,gzip:oM,constants:lM};const xg=16209,uM=16191;var cM=function(r,t){let i,l,f,c,p,g,d,m,C,b,x,E,k,D,T,A,S,O,P,z,N,U,$,F;const L=r.state;i=r.next_in,$=r.input,l=i+(r.avail_in-5),f=r.next_out,F=r.output,c=f-(t-r.avail_out),p=f+(r.avail_out-257),g=L.dmax,d=L.wsize,m=L.whave,C=L.wnext,b=L.window,x=L.hold,E=L.bits,k=L.lencode,D=L.distcode,T=(1<<L.lenbits)-1,A=(1<<L.distbits)-1;e:do{E<15&&(x+=$[i++]<<E,E+=8,x+=$[i++]<<E,E+=8),S=k[x&T];t:for(;;){if(O=S>>>24,x>>>=O,E-=O,O=S>>>16&255,O===0)F[f++]=S&65535;else if(O&16){P=S&65535,O&=15,O&&(E<O&&(x+=$[i++]<<E,E+=8),P+=x&(1<<O)-1,x>>>=O,E-=O),E<15&&(x+=$[i++]<<E,E+=8,x+=$[i++]<<E,E+=8),S=D[x&A];n:for(;;){if(O=S>>>24,x>>>=O,E-=O,O=S>>>16&255,O&16){if(z=S&65535,O&=15,E<O&&(x+=$[i++]<<E,E+=8,E<O&&(x+=$[i++]<<E,E+=8)),z+=x&(1<<O)-1,z>g){r.msg="invalid distance too far back",L.mode=xg;break e}if(x>>>=O,E-=O,O=f-c,z>O){if(O=z-O,O>m&&L.sane){r.msg="invalid distance too far back",L.mode=xg;break e}if(N=0,U=b,C===0){if(N+=d-O,O<P){P-=O;do F[f++]=b[N++];while(--O);N=f-z,U=F}}else if(C<O){if(N+=d+C-O,O-=C,O<P){P-=O;do F[f++]=b[N++];while(--O);if(N=0,C<P){O=C,P-=O;do F[f++]=b[N++];while(--O);N=f-z,U=F}}}else if(N+=C-O,O<P){P-=O;do F[f++]=b[N++];while(--O);N=f-z,U=F}for(;P>2;)F[f++]=U[N++],F[f++]=U[N++],F[f++]=U[N++],P-=3;P&&(F[f++]=U[N++],P>1&&(F[f++]=U[N++]))}else{N=f-z;do F[f++]=F[N++],F[f++]=F[N++],F[f++]=F[N++],P-=3;while(P>2);P&&(F[f++]=F[N++],P>1&&(F[f++]=F[N++]))}}else if(O&64){r.msg="invalid distance code",L.mode=xg;break e}else{S=D[(S&65535)+(x&(1<<O)-1)];continue n}break}}else if(O&64)if(O&32){L.mode=uM;break e}else{r.msg="invalid literal/length code",L.mode=xg;break e}else{S=k[(S&65535)+(x&(1<<O)-1)];continue t}break}}while(i<l&&f<p);P=E>>3,i-=P,E-=P<<3,x&=(1<<E)-1,r.next_in=i,r.next_out=f,r.avail_in=i<l?5+(l-i):5-(i-l),r.avail_out=f<p?257+(p-f):257-(f-p),L.hold=x,L.bits=E};const sd=15,v5=852,m5=592,g5=0,s2=1,y5=2,fM=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]),dM=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]),pM=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 Hh=(e,r,t,i,l,f,c,p)=>{const g=p.bits;let d=0,m=0,C=0,b=0,x=0,E=0,k=0,D=0,T=0,A=0,S,O,P,z,N,U=null,$;const F=new Uint16Array(sd+1),L=new Uint16Array(sd+1);let I=null,H,W,Z;for(d=0;d<=sd;d++)F[d]=0;for(m=0;m<i;m++)F[r[t+m]]++;for(x=g,b=sd;b>=1&&F[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,p.bits=1,0;for(C=1;C<b&&F[C]===0;C++);for(x<C&&(x=C),D=1,d=1;d<=sd;d++)if(D<<=1,D-=F[d],D<0)return-1;if(D>0&&(e===g5||b!==1))return-1;for(L[1]=0,d=1;d<sd;d++)L[d+1]=L[d]+F[d];for(m=0;m<i;m++)r[t+m]!==0&&(c[L[r[t+m]]++]=m);if(e===g5?(U=I=c,$=20):e===s2?(U=fM,I=dM,$=257):(U=hM,I=pM,$=0),A=0,m=0,d=C,N=f,E=x,k=0,P=-1,T=1<<x,z=T-1,e===s2&&T>v5||e===y5&&T>m5)return 1;for(;;){H=d-k,c[m]+1<$?(W=0,Z=c[m]):c[m]>=$?(W=I[c[m]-$],Z=U[c[m]-$]):(W=32+64,Z=0),S=1<<d-k,O=1<<E,C=O;do O-=S,l[N+(A>>k)+O]=H<<24|W<<16|Z|0;while(O!==0);for(S=1<<d-1;A&S;)S>>=1;if(S!==0?(A&=S-1,A+=S):A=0,m++,--F[d]===0){if(d===b)break;d=r[t+c[m]]}if(d>x&&(A&z)!==P){for(k===0&&(k=x),N+=C,E=d-k,D=1<<E;E+k<b&&(D-=F[E+k],!(D<=0));)E++,D<<=1;if(T+=1<<E,e===s2&&T>v5||e===y5&&T>m5)return 1;P=A&z,l[P]=x<<24|E<<16|N-f|0}}return A!==0&&(l[N+A]=d-k<<24|64<<16|0),p.bits=x,0};const vM=0,x5=1,b5=2,{Z_FINISH:C5,Z_BLOCK:mM,Z_TREES:bg,Z_OK:_c,Z_STREAM_END:gM,Z_NEED_DICT:yM,Z_STREAM_ERROR:Xi,Z_DATA_ERROR:w5,Z_MEM_ERROR:_5,Z_BUF_ERROR:xM,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,rs=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,Qn=16209,q5=16210,G5=16211,bM=852,CM=592,wM=15,K5=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function _M(){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(bM),r.distcode=r.distdyn=new Int32Array(CM),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 _M;e.state=t,t.strm=e,t.window=null,t.mode=Cg;const i=Z5(e,r);return i!==_c&&(e.state=null),i},EM=e=>X5(e,wM);let J5=!0,d2,h2;const SM=e=>{if(J5){d2=new Int32Array(512),h2=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(Hh(x5,e.lens,0,288,d2,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Hh(b5,e.lens,0,32,h2,0,e.work,{bits:5}),J5=!1}e.lencode=d2,e.lenbits=9,e.distcode=h2,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},DM=(e,r)=>{let t,i,l,f,c,p,g,d,m,C,b,x,E,k,D=0,T,A,S,O,P,z,N,U;const $=new Uint8Array(4);let F,L;const I=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===rs&&(t.mode=u2),c=e.next_out,l=e.output,g=e.avail_out,f=e.next_in,i=e.input,p=e.avail_in,d=t.hold,m=t.bits,C=p,b=g,U=_c;e:for(;;)switch(t.mode){case Cg:if(t.wrap===0){t.mode=u2;break}for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=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=Zr(t.check,$,2,0),d=0,m=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=Qn;break}if((d&15)!==E5){e.msg="unknown compression method",t.mode=Qn;break}if(d>>>=4,m-=4,N=(d&15)+8,t.wbits===0&&(t.wbits=N),N>15||N>t.wbits){e.msg="invalid window size",t.mode=Qn;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=d&512?N5:rs,d=0,m=0;break;case S5:for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.flags=d,(t.flags&255)!==E5){e.msg="unknown compression method",t.mode=Qn;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=Qn;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&t.wrap&4&&($[0]=d&255,$[1]=d>>>8&255,t.check=Zr(t.check,$,2,0)),d=0,m=0,t.mode=D5;case D5:for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=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=Zr(t.check,$,4,0)),d=0,m=0,t.mode=k5;case k5:for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=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=Zr(t.check,$,2,0)),d=0,m=0,t.mode=T5;case T5:if(t.flags&1024){for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=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=Zr(t.check,$,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=A5;case A5:if(t.flags&1024&&(x=t.length,x>p&&(x=p),x&&(t.head&&(N=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),N)),t.flags&512&&t.wrap&4&&(t.check=Zr(t.check,i,x,f)),p-=x,f+=x,t.length-=x),t.length))break e;t.length=0,t.mode=O5;case O5:if(t.flags&2048){if(p===0)break e;x=0;do N=i[f+x++],t.head&&N&&t.length<65536&&(t.head.name+=String.fromCharCode(N));while(N&&x<p);if(t.flags&512&&t.wrap&4&&(t.check=Zr(t.check,i,x,f)),p-=x,f+=x,N)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=R5;case R5:if(t.flags&4096){if(p===0)break e;x=0;do N=i[f+x++],t.head&&N&&t.length<65536&&(t.head.comment+=String.fromCharCode(N));while(N&&x<p);if(t.flags&512&&t.wrap&4&&(t.check=Zr(t.check,i,x,f)),p-=x,f+=x,N)break e}else t.head&&(t.head.comment=null);t.mode=F5;case F5:if(t.flags&512){for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&4&&d!==(t.check&65535)){e.msg="header crc mismatch",t.mode=Qn;break}d=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=rs;break;case N5:for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}e.adler=t.check=K5(d),d=0,m=0,t.mode=wg;case wg:if(t.havedict===0)return e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,yM;e.adler=t.check=1,t.mode=rs;case rs:if(r===mM||r===bg)break e;case u2:if(t.last){d>>>=m&7,m-=m&7,t.mode=f2;break}for(;m<3;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}switch(t.last=d&1,d>>>=1,m-=1,d&3){case 0:t.mode=M5;break;case 1:if(SM(t),t.mode=_g,r===bg){d>>>=2,m-=2;break e}break;case 2:t.mode=B5;break;case 3:e.msg="invalid block type",t.mode=Qn}d>>>=2,m-=2;break;case M5:for(d>>>=m&7,m-=m&7;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if((d&65535)!==(d>>>16^65535)){e.msg="invalid stored block lengths",t.mode=Qn;break}if(t.length=d&65535,d=0,m=0,t.mode=c2,r===bg)break e;case c2:t.mode=P5;case P5:if(x=t.length,x){if(x>p&&(x=p),x>g&&(x=g),x===0)break e;l.set(i.subarray(f,f+x),c),p-=x,f+=x,g-=x,c+=x,t.length-=x;break}t.mode=rs;break;case B5:for(;m<14;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.nlen=(d&31)+257,d>>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=Qn;break}t.have=0,t.mode=L5;case L5:for(;t.have<t.ncode;){for(;m<3;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.lens[I[t.have++]]=d&7,d>>>=3,m-=3}for(;t.have<19;)t.lens[I[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,F={bits:t.lenbits},U=Hh(vM,t.lens,0,19,t.lencode,0,t.work,F),t.lenbits=F.bits,U){e.msg="invalid code lengths set",t.mode=Qn;break}t.have=0,t.mode=z5;case z5:for(;t.have<t.nlen+t.ndist;){for(;D=t.lencode[d&(1<<t.lenbits)-1],T=D>>>24,A=D>>>16&255,S=D&65535,!(T<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(S<16)d>>>=T,m-=T,t.lens[t.have++]=S;else{if(S===16){for(L=T+2;m<L;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(d>>>=T,m-=T,t.have===0){e.msg="invalid bit length repeat",t.mode=Qn;break}N=t.lens[t.have-1],x=3+(d&3),d>>>=2,m-=2}else if(S===17){for(L=T+3;m<L;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=T,m-=T,N=0,x=3+(d&7),d>>>=3,m-=3}else{for(L=T+7;m<L;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=T,m-=T,N=0,x=11+(d&127),d>>>=7,m-=7}if(t.have+x>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=Qn;break}for(;x--;)t.lens[t.have++]=N}}if(t.mode===Qn)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=Qn;break}if(t.lenbits=9,F={bits:t.lenbits},U=Hh(x5,t.lens,0,t.nlen,t.lencode,0,t.work,F),t.lenbits=F.bits,U){e.msg="invalid literal/lengths set",t.mode=Qn;break}if(t.distbits=6,t.distcode=t.distdyn,F={bits:t.distbits},U=Hh(b5,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,F),t.distbits=F.bits,U){e.msg="invalid distances set",t.mode=Qn;break}if(t.mode=_g,r===bg)break e;case _g:t.mode=Eg;case Eg:if(p>=6&&g>=258){e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,cM(e,b),c=e.next_out,l=e.output,g=e.avail_out,f=e.next_in,i=e.input,p=e.avail_in,d=t.hold,m=t.bits,t.mode===rs&&(t.back=-1);break}for(t.back=0;D=t.lencode[d&(1<<t.lenbits)-1],T=D>>>24,A=D>>>16&255,S=D&65535,!(T<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(A&&!(A&240)){for(O=T,P=A,z=S;D=t.lencode[z+((d&(1<<O+P)-1)>>O)],T=D>>>24,A=D>>>16&255,S=D&65535,!(O+T<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=O,m-=O,t.back+=O}if(d>>>=T,m-=T,t.back+=T,t.length=S,A===0){t.mode=V5;break}if(A&32){t.back=-1,t.mode=rs;break}if(A&64){e.msg="invalid literal/length code",t.mode=Qn;break}t.extra=A&15,t.mode=U5;case U5:if(t.extra){for(L=t.extra;m<L;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=j5;case j5:for(;D=t.distcode[d&(1<<t.distbits)-1],T=D>>>24,A=D>>>16&255,S=D&65535,!(T<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(!(A&240)){for(O=T,P=A,z=S;D=t.distcode[z+((d&(1<<O+P)-1)>>O)],T=D>>>24,A=D>>>16&255,S=D&65535,!(O+T<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=O,m-=O,t.back+=O}if(d>>>=T,m-=T,t.back+=T,A&64){e.msg="invalid distance code",t.mode=Qn;break}t.offset=S,t.extra=A&15,t.mode=I5;case I5:if(t.extra){for(L=t.extra;m<L;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=Qn;break}t.mode=H5;case H5:if(g===0)break e;if(x=b-g,t.offset>x){if(x=t.offset-x,x>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=Qn;break}x>t.wnext?(x-=t.wnext,E=t.wsize-x):E=t.wnext-x,x>t.length&&(x=t.length),k=t.window}else k=l,E=c-t.offset,x=t.length;x>g&&(x=g),g-=x,t.length-=x;do l[c++]=k[E++];while(--x);t.length===0&&(t.mode=Eg);break;case V5:if(g===0)break e;l[c++]=t.length,g--,t.mode=Eg;break;case f2:if(t.wrap){for(;m<32;){if(p===0)break e;p--,d|=i[f++]<<m,m+=8}if(b-=g,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Zr(t.check,l,b,c-b):Nh(t.check,l,b,c-b)),b=g,t.wrap&4&&(t.flags?d:K5(d))!==t.check){e.msg="incorrect data check",t.mode=Qn;break}d=0,m=0}t.mode=$5;case $5:if(t.wrap&&t.flags){for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&4&&d!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=Qn;break}d=0,m=0}t.mode=Y5;case Y5:U=gM;break e;case Qn:U=w5;break e;case q5:return _5;case G5:default:return Xi}return e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,(t.wsize||b!==e.avail_out&&t.mode<Qn&&(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?Zr(t.check,l,b,e.next_out-b):Nh(t.check,l,b,e.next_out-b)),e.data_type=t.bits+(t.last?64:0)+(t.mode===rs?128:0)+(t.mode===_g||t.mode===c2?256:0),(C===0&&b===0||r===C5)&&U===_c&&(U=xM),U},kM=e=>{if(Ec(e))return Xi;let r=e.state;return r.window&&(r.window=null),e.state=null,_c},TM=(e,r)=>{if(Ec(e))return Xi;const t=e.state;return t.wrap&2?(t.head=r,r.done=!1,_c):Xi},AM=(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=Nh(l,r,t,0),l!==i.check)?w5:(f=e6(e,r,t,t),f?(i.mode=q5,_5):(i.havedict=1,_c))};var OM=Q5,RM=Z5,FM=W5,NM=EM,MM=X5,PM=DM,BM=kM,LM=TM,zM=AM,UM="pako inflate (from Nodeca project)",as={inflateReset:OM,inflateReset2:RM,inflateResetKeep:FM,inflateInit:NM,inflateInit2:MM,inflate:PM,inflateEnd:BM,inflateGetHeader:LM,inflateSetDictionary:zM,inflateInfo:UM};function jM(){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 IM=jM;const t6=Object.prototype.toString,{Z_NO_FLUSH:HM,Z_FINISH:VM,Z_OK:Vh,Z_STREAM_END:p2,Z_NEED_DICT:v2,Z_STREAM_ERROR:$M,Z_DATA_ERROR:n6,Z_MEM_ERROR:YM}=xc;function $h(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 h5,this.strm.avail_out=0;let t=as.inflateInit2(this.strm,r.windowBits);if(t!==Vh)throw new Error(yc[t]);if(this.header=new IM,as.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=jh.string2buf(r.dictionary):t6.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=as.inflateSetDictionary(this.strm,r.dictionary),t!==Vh)))throw new Error(yc[t])}$h.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize,l=this.options.dictionary;let f,c,p;if(this.ended)return!1;for(r===~~r?c=r:c=r===!0?VM:HM,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=as.inflate(t,c),f===v2&&l&&(f=as.inflateSetDictionary(t,l),f===Vh?f=as.inflate(t,c):f===n6&&(f=v2));t.avail_in>0&&f===p2&&t.state.wrap>0&&e[t.next_in]!==0;)as.inflateReset(t),f=as.inflate(t,c);switch(f){case $M:case n6:case v2:case YM:return this.onEnd(f),this.ended=!0,!1}if(p=t.avail_out,t.next_out&&(t.avail_out===0||f===p2))if(this.options.to==="string"){let g=jh.utf8border(t.output,t.next_out),d=t.next_out-g,m=jh.buf2string(t.output,g);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(g,g+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(f===Vh&&p===0)){if(f===p2)return f=as.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,!0;if(t.avail_in===0)break}}return!0},$h.prototype.onData=function(e){this.chunks.push(e)},$h.prototype.onEnd=function(e){e===Vh&&(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 $h(r);if(t.push(e),t.err)throw t.msg||yc[t.err];return t.result}function qM(e,r){return r=r||{},r.raw=!0,m2(e,r)}var GM=$h,KM=m2,WM=qM,QM=m2,ZM=xc,XM={Inflate:GM,inflate:KM,inflateRaw:WM,ungzip:QM,constants:ZM};const{Deflate:JM,deflate:eP,deflateRaw:tP,gzip:nP}=sM,{Inflate:rP,inflate:aP,inflateRaw:iP,ungzip:oP}=XM;var lP=JM,sP=eP,uP=tP,cP=nP,fP=rP,dP=aP,hP=iP,pP=oP,vP=xc,mP={Deflate:lP,deflate:sP,deflateRaw:uP,gzip:cP,Inflate:fP,inflate:dP,inflateRaw:hP,ungzip:pP,constants:vP},Be={};Be.toRGBA8=function(e){var r=e.width,t=e.height;if(e.tabs.acTL==null)return[Be.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),p=new Uint8Array(l),g=0;g<e.frames.length;g++){var d=e.frames[g],m=d.rect.x,C=d.rect.y,b=d.rect.width,x=d.rect.height,E=Be.toRGBA8.decodeImage(d.data,b,x,e);if(g!=0)for(var k=0;k<l;k++)p[k]=f[k];if(d.blend==0?Be._copyTile(E,b,x,f,r,t,m,C,0):d.blend==1&&Be._copyTile(E,b,x,f,r,t,m,C,1),i.push(f.buffer.slice(0)),d.dispose!=0){if(d.dispose==1)Be._copyTile(c,b,x,f,r,t,m,C,0);else if(d.dispose==2)for(var k=0;k<l;k++)f[k]=p[k]}}return i},Be.toRGBA8.decodeImage=function(e,r,t,i){var l=r*t,f=Be.decode._getBPP(i),c=Math.ceil(r*f/8),p=new Uint8Array(l*4),g=new Uint32Array(p.buffer),d=i.ctype,m=i.depth,C=Be._bin.readUshort;if(d==6){var b=l<<2;if(m==8)for(var x=0;x<b;x+=4)p[x]=e[x],p[x+1]=e[x+1],p[x+2]=e[x+2],p[x+3]=e[x+3];if(m==16)for(var x=0;x<b;x++)p[x]=e[x<<1]}else if(d==2){var E=i.tabs.tRNS;if(E==null){if(m==8)for(var x=0;x<l;x++){var k=x*3;g[x]=255<<24|e[k+2]<<16|e[k+1]<<8|e[k]}if(m==16)for(var x=0;x<l;x++){var k=x*6;g[x]=255<<24|e[k+4]<<16|e[k+2]<<8|e[k]}}else{var D=E[0],T=E[1],A=E[2];if(m==8)for(var x=0;x<l;x++){var S=x<<2,k=x*3;g[x]=255<<24|e[k+2]<<16|e[k+1]<<8|e[k],e[k]==D&&e[k+1]==T&&e[k+2]==A&&(p[S+3]=0)}if(m==16)for(var x=0;x<l;x++){var S=x<<2,k=x*6;g[x]=255<<24|e[k+4]<<16|e[k+2]<<8|e[k],C(e,k)==D&&C(e,k+2)==T&&C(e,k+4)==A&&(p[S+3]=0)}}}else if(d==3){var O=i.tabs.PLTE,P=i.tabs.tRNS,z=P?P.length:0;if(m==1)for(var N=0;N<t;N++)for(var U=N*c,$=N*r,x=0;x<r;x++){var S=$+x<<2,F=e[U+(x>>3)]>>7-((x&7)<<0)&1,L=3*F;p[S]=O[L],p[S+1]=O[L+1],p[S+2]=O[L+2],p[S+3]=F<z?P[F]:255}if(m==2)for(var N=0;N<t;N++)for(var U=N*c,$=N*r,x=0;x<r;x++){var S=$+x<<2,F=e[U+(x>>2)]>>6-((x&3)<<1)&3,L=3*F;p[S]=O[L],p[S+1]=O[L+1],p[S+2]=O[L+2],p[S+3]=F<z?P[F]:255}if(m==4)for(var N=0;N<t;N++)for(var U=N*c,$=N*r,x=0;x<r;x++){var S=$+x<<2,F=e[U+(x>>1)]>>4-((x&1)<<2)&15,L=3*F;p[S]=O[L],p[S+1]=O[L+1],p[S+2]=O[L+2],p[S+3]=F<z?P[F]:255}if(m==8)for(var x=0;x<l;x++){var S=x<<2,F=e[x],L=3*F;p[S]=O[L],p[S+1]=O[L+1],p[S+2]=O[L+2],p[S+3]=F<z?P[F]:255}}else if(d==4){if(m==8)for(var x=0;x<l;x++){var S=x<<2,I=x<<1,H=e[I];p[S]=H,p[S+1]=H,p[S+2]=H,p[S+3]=e[I+1]}if(m==16)for(var x=0;x<l;x++){var S=x<<2,I=x<<2,H=e[I];p[S]=H,p[S+1]=H,p[S+2]=H,p[S+3]=e[I+2]}}else if(d==0)for(var D=i.tabs.tRNS?i.tabs.tRNS:-1,N=0;N<t;N++){var W=N*c,Z=N*r;if(m==1)for(var X=0;X<r;X++){var H=255*(e[W+(X>>>3)]>>>7-(X&7)&1),re=H==D*255?0:255;g[Z+X]=re<<24|H<<16|H<<8|H}else if(m==2)for(var X=0;X<r;X++){var H=85*(e[W+(X>>>2)]>>>6-((X&3)<<1)&3),re=H==D*85?0:255;g[Z+X]=re<<24|H<<16|H<<8|H}else if(m==4)for(var X=0;X<r;X++){var H=17*(e[W+(X>>>1)]>>>4-((X&1)<<2)&15),re=H==D*17?0:255;g[Z+X]=re<<24|H<<16|H<<8|H}else if(m==8)for(var X=0;X<r;X++){var H=e[W+X],re=H==D?0:255;g[Z+X]=re<<24|H<<16|H<<8|H}else if(m==16)for(var X=0;X<r;X++){var H=e[W+(X<<1)],re=C(e,W+(X<<x))==D?0:255;g[Z+X]=re<<24|H<<16|H<<8|H}}return p},Be.decode=function(e){for(var r=new Uint8Array(e),t=8,i=Be._bin,l=i.readUshort,f=i.readUint,c={tabs:{},frames:[]},p=new Uint8Array(r.length),g=0,d,m=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 E=i.readASCII(r,t,4);if(t+=4,E=="IHDR")Be.decode._IHDR(r,t,c);else if(E=="CgBI")c.tabs[E]=r.slice(t,t+4);else if(E=="IDAT"){for(var b=0;b<x;b++)p[g+b]=r[t+b];g+=x}else if(E=="acTL")c.tabs[E]={num_frames:f(r,t),num_plays:f(r,t+4)},d=new Uint8Array(r.length);else if(E=="fcTL"){if(m!=0){var k=c.frames[c.frames.length-1];k.data=Be.decode._decompress(c,d.slice(0,m),k.rect.width,k.rect.height),m=0}var D={x:f(r,t+12),y:f(r,t+16),width:f(r,t+4),height:f(r,t+8)},T=l(r,t+22);T=l(r,t+20)/(T==0?100:T);var A={rect:D,delay:Math.round(T*1e3),dispose:r[t+24],blend:r[t+25]};c.frames.push(A)}else if(E=="fdAT"){for(var b=0;b<x-4;b++)d[m+b]=r[t+b+4];m+=x-4}else if(E=="pHYs")c.tabs[E]=[i.readUint(r,t),i.readUint(r,t+4),r[t+8]];else if(E=="cHRM"){c.tabs[E]=[];for(var b=0;b<8;b++)c.tabs[E].push(i.readUint(r,t+b*4))}else if(E=="tEXt"||E=="zTXt"){c.tabs[E]==null&&(c.tabs[E]={});var S=i.nextZero(r,t),O=i.readASCII(r,t,S-t),P,z=t+x-S-1;if(E=="tEXt")P=i.readASCII(r,S+1,z);else{var N=Be.decode._inflate(r.slice(S+2,S+2+z));P=i.readUTF8(N,0,N.length)}c.tabs[E][O]=P}else if(E=="iTXt"){c.tabs[E]==null&&(c.tabs[E]={});var S=0,U=t;S=i.nextZero(r,U);var O=i.readASCII(r,U,S-U);U=S+1;var $=r[U];r[U+1],U+=2,S=i.nextZero(r,U),i.readASCII(r,U,S-U),U=S+1,S=i.nextZero(r,U),i.readUTF8(r,U,S-U),U=S+1;var P,z=x-(U-t);if($==0)P=i.readUTF8(r,U,z);else{var N=Be.decode._inflate(r.slice(U,U+z));P=i.readUTF8(N,0,N.length)}c.tabs[E][O]=P}else if(E=="PLTE")c.tabs[E]=i.readBytes(r,t,x);else if(E=="hIST"){var F=c.tabs.PLTE.length/3;c.tabs[E]=[];for(var b=0;b<F;b++)c.tabs[E].push(l(r,t+b*2))}else if(E=="tRNS")c.ctype==3?c.tabs[E]=i.readBytes(r,t,x):c.ctype==0?c.tabs[E]=l(r,t):c.ctype==2&&(c.tabs[E]=[l(r,t),l(r,t+2),l(r,t+4)]);else if(E=="gAMA")c.tabs[E]=i.readUint(r,t)/1e5;else if(E=="sRGB")c.tabs[E]=r[t];else if(E=="bKGD")c.ctype==0||c.ctype==4?c.tabs[E]=[l(r,t)]:c.ctype==2||c.ctype==6?c.tabs[E]=[l(r,t),l(r,t+2),l(r,t+4)]:c.ctype==3&&(c.tabs[E]=r[t]);else if(E=="IEND")break;t+=x,i.readUint(r,t),t+=4}if(m!=0){var k=c.frames[c.frames.length-1];k.data=Be.decode._decompress(c,d.slice(0,m),k.rect.width,k.rect.height),m=0}return c.data=Be.decode._decompress(c,p,c.width,c.height),delete c.compress,delete c.interlace,delete c.filter,c},Be.decode._decompress=function(e,r,t,i){var l=Be.decode._getBPP(e),f=Math.ceil(t*l/8),c=new Uint8Array((f+1+e.interlace)*i);return e.tabs.CgBI?r=Be.inflateRaw(r,c):r=Be.decode._inflate(r,c),e.interlace==0?r=Be.decode._filterZero(r,e,0,t,i):e.interlace==1&&(r=Be.decode._readInterlace(r,e)),r},Be.decode._inflate=function(e,r){var t=Be.inflateRaw(new Uint8Array(e.buffer,2,e.length-6),r);return t},Be.inflateRaw=function(){var e={};return e.H={},e.H.N=function(r,t){var i=Uint8Array,l=0,f=0,c=0,p=0,g=0,d=0,m=0,C=0,b=0,x,E;if(r[0]==3&&r[1]==0)return t||new i(0);var k=e.H,D=k.b,T=k.e,A=k.R,S=k.n,O=k.A,P=k.Z,z=k.m,N=t==null;for(N&&(t=new i(r.length>>>2<<3));l==0;){if(l=D(r,b,1),f=D(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;N&&(t=e.H.W(t,C+$)),t.set(new i(r.buffer,r.byteOffset+U,$),C),b=U+$<<3,C+=$;continue}if(N&&(t=e.H.W(t,C+(1<<17))),f==1&&(x=z.J,E=z.h,d=(1<<9)-1,m=(1<<5)-1),f==2){c=T(r,b,5)+257,p=T(r,b+5,5)+1,g=T(r,b+10,4)+4,b+=14;for(var F=1,L=0;L<38;L+=2)z.Q[L]=0,z.Q[L+1]=0;for(var L=0;L<g;L++){var I=T(r,b+L*3,3);z.Q[(z.X[L]<<1)+1]=I,I>F&&(F=I)}b+=3*g,S(z.Q,F),O(z.Q,F,z.u),x=z.w,E=z.d,b=A(z.u,(1<<F)-1,c+p,r,b,z.v);var H=k.V(z.v,0,c,z.C);d=(1<<H)-1;var W=k.V(z.v,c,p,z.D);m=(1<<W)-1,S(z.C,H),O(z.C,H,x),S(z.D,W),O(z.D,W,E)}for(;;){var Z=x[P(r,b)&d];b+=Z&15;var X=Z>>>4;if(!(X>>>8))t[C++]=X;else{if(X==256)break;var re=C+X-254;if(X>264){var K=z.q[X-257];re=C+(K>>>3)+T(r,b,K&7),b+=K&7}var te=E[P(r,b)&m];b+=te&15;var G=te>>>4,V=z.c[G],ee=(V>>>4)+D(r,b,V&15);for(b+=V&15;C<re;)t[C]=t[C++-ee],t[C]=t[C++-ee],t[C]=t[C++-ee],t[C]=t[C++-ee];C=re}}}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 p=e.H.e,g=e.H.Z,d=0;d<i;){var m=r[g(l,f)&t];f+=m&15;var C=m>>>4;if(C<=15)c[d]=C,d++;else{var b=0,x=0;C==16?(x=3+p(l,f,2),f+=2,b=c[d-1]):C==17?(x=3+p(l,f,3),f+=3):C==18&&(x=11+p(l,f,7),f+=7);for(var E=d+x;d<E;)c[d]=b,d++}}return f},e.H.V=function(r,t,i,l){for(var f=0,c=0,p=l.length>>>1;c<i;){var g=r[c+t];l[c<<1]=0,l[(c<<1)+1]=g,g>f&&(f=g),c++}for(;c<p;)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,p,g,d,m=i.j,g=0;g<=t;g++)m[g]=0;for(g=1;g<l;g+=2)m[r[g]]++;var C=i.K;for(f=0,m[0]=0,c=1;c<=t;c++)f=f+m[c-1]<<1,C[c]=f;for(p=0;p<l;p+=2)d=r[p+1],d!=0&&(r[p]=C[d],C[d]++)},e.H.A=function(r,t,i){for(var l=r.length,f=e.H.m,c=f.r,p=0;p<l;p+=2)if(r[p+1]!=0)for(var g=p>>1,d=r[p+1],m=g<<4|d,C=t-d,b=r[p]<<C,x=b+(1<<C);b!=x;){var E=c[b]>>>15-t;i[E]=m,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,p,g){for(;p--!=0;)c.push(0,g)}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}(),Be.decode._readInterlace=function(e,r){for(var t=r.width,i=r.height,l=Be.decode._getBPP(r),f=l>>3,c=Math.ceil(t*l/8),p=new Uint8Array(i*c),g=0,d=[0,0,4,0,2,0,1],m=[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 E=C[x],k=b[x],D=0,T=0,A=d[x];A<i;)A+=E,T++;for(var S=m[x];S<t;)S+=k,D++;var O=Math.ceil(D*l/8);Be.decode._filterZero(e,r,g,D,T);for(var P=0,z=d[x];z<i;){for(var N=m[x],U=g+P*O<<3;N<t;){if(l==1){var $=e[U>>3];$=$>>7-(U&7)&1,p[z*c+(N>>3)]|=$<<7-((N&7)<<0)}if(l==2){var $=e[U>>3];$=$>>6-(U&7)&3,p[z*c+(N>>2)]|=$<<6-((N&3)<<1)}if(l==4){var $=e[U>>3];$=$>>4-(U&7)&15,p[z*c+(N>>1)]|=$<<4-((N&1)<<2)}if(l>=8)for(var F=z*c+N*f,L=0;L<f;L++)p[F+L]=e[(U>>3)+L];U+=l,N+=k}P++,z+=E}D*T!=0&&(g+=T*(1+O)),x=x+1}return p},Be.decode._getBPP=function(e){var r=[1,null,3,1,2,null,4][e.ctype];return r*e.depth},Be.decode._filterZero=function(e,r,t,i,l){var f=Be.decode._getBPP(r),c=Math.ceil(i*f/8),p=Be.decode._paeth;f=Math.ceil(f/8);var g=0,d=1,m=e[t],C=0;if(m>1&&(e[t]=[0,0,1][m-2]),m==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(g=t+b*c,d=g+b+1,m=e[d-1],C=0,m==0)for(;C<c;C++)e[g+C]=e[d+C];else if(m==1){for(;C<f;C++)e[g+C]=e[d+C];for(;C<c;C++)e[g+C]=e[d+C]+e[g+C-f]}else if(m==2)for(;C<c;C++)e[g+C]=e[d+C]+e[g+C-c];else if(m==3){for(;C<f;C++)e[g+C]=e[d+C]+(e[g+C-c]>>>1);for(;C<c;C++)e[g+C]=e[d+C]+(e[g+C-c]+e[g+C-f]>>>1)}else{for(;C<f;C++)e[g+C]=e[d+C]+p(0,e[g+C-c],0);for(;C<c;C++)e[g+C]=e[d+C]+p(e[g+C-f],e[g+C-c],e[g+C-f-c])}return e},Be.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},Be.decode._IHDR=function(e,r,t){var i=Be._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++},Be._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+="%"+Be._bin.pad(e[r+f].toString(16));try{l=decodeURIComponent(i)}catch{return Be._bin.readASCII(e,r,t)}return l}},Be._copyTile=function(e,r,t,i,l,f,c,p,g){for(var d=Math.min(r,l),m=Math.min(t,f),C=0,b=0,x=0;x<m;x++)for(var E=0;E<d;E++)if(c>=0&&p>=0?(C=x*r+E<<2,b=(p+x)*l+c+E<<2):(C=(-p+x)*r-c+E<<2,b=x*l+E<<2),g==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(g==1){var k=e[C+3]*.00392156862745098,D=e[C]*k,T=e[C+1]*k,A=e[C+2]*k,S=i[b+3]*(1/255),O=i[b]*S,P=i[b+1]*S,z=i[b+2]*S,N=1-k,U=k+S*N,$=U==0?0:1/U;i[b+3]=255*U,i[b+0]=(D+O*N)*$,i[b+1]=(T+P*N)*$,i[b+2]=(A+z*N)*$}else if(g==2){var k=e[C+3],D=e[C],T=e[C+1],A=e[C+2],S=i[b+3],O=i[b],P=i[b+1],z=i[b+2];k==S&&D==O&&T==P&&A==z?(i[b]=0,i[b+1]=0,i[b+2]=0,i[b+3]=0):(i[b]=D,i[b+1]=T,i[b+2]=A,i[b+3]=k)}else if(g==3){var k=e[C+3],D=e[C],T=e[C+1],A=e[C+2],S=i[b+3],O=i[b],P=i[b+1],z=i[b+2];if(k==S&&D==O&&T==P&&A==z)continue;if(k<220&&S>20)return!1}return!0},Be.encode=function(e,r,t,i,l,f,c){i==null&&(i=0),c==null&&(c=!1);var p=Be.encode.compress(e,r,t,i,[!1,!1,!1,0,c]);return Be.encode.compressPNG(p,-1),Be.encode._main(p,r,t,l,f)},Be.encodeLL=function(e,r,t,i,l,f,c,p){for(var g={ctype:0+(i==1?0:2)+(l==0?0:4),depth:f,frames:[]},d=(i+l)*f,m=d*r,C=0;C<e.length;C++)g.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(m/8)});Be.encode.compressPNG(g,0,!0);var b=Be.encode._main(g,r,t,c,p);return b},Be.encode._main=function(e,r,t,i,l){l==null&&(l={});var f=Be.crc.crc,c=Be._bin.writeUint,p=Be._bin.writeUshort,g=Be._bin.writeASCII,d=8,m=e.frames.length>1,C=!1,b=8+(16+5+4)+(m?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,E=0;E<x;E++)e.plte[E]>>>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 D=e.frames[k];m&&(b+=38),b+=D.cimg.length+12,k!=0&&(b+=4)}b+=12;for(var T=new Uint8Array(b),A=[137,80,78,71,13,10,26,10],E=0;E<8;E++)T[E]=A[E];if(c(T,d,13),d+=4,g(T,d,"IHDR"),d+=4,c(T,d,r),d+=4,c(T,d,t),d+=4,T[d]=e.depth,d++,T[d]=e.ctype,d++,T[d]=0,d++,T[d]=0,d++,T[d]=0,d++,c(T,d,f(T,d-17,17)),d+=4,l.sRGB!=null&&(c(T,d,1),d+=4,g(T,d,"sRGB"),d+=4,T[d]=l.sRGB,d++,c(T,d,f(T,d-5,5)),d+=4),l.pHYs!=null&&(c(T,d,9),d+=4,g(T,d,"pHYs"),d+=4,c(T,d,l.pHYs[0]),d+=4,c(T,d,l.pHYs[1]),d+=4,T[d]=l.pHYs[2],d++,c(T,d,f(T,d-13,13)),d+=4),m&&(c(T,d,8),d+=4,g(T,d,"acTL"),d+=4,c(T,d,e.frames.length),d+=4,c(T,d,l.loop!=null?l.loop:0),d+=4,c(T,d,f(T,d-12,12)),d+=4),e.ctype==3){var x=e.plte.length;c(T,d,x*3),d+=4,g(T,d,"PLTE"),d+=4;for(var E=0;E<x;E++){var S=E*3,O=e.plte[E],P=O&255,z=O>>>8&255,N=O>>>16&255;T[d+S+0]=P,T[d+S+1]=z,T[d+S+2]=N}if(d+=x*3,c(T,d,f(T,d-x*3-4,x*3+4)),d+=4,C){c(T,d,x),d+=4,g(T,d,"tRNS"),d+=4;for(var E=0;E<x;E++)T[d+E]=e.plte[E]>>>24&255;d+=x,c(T,d,f(T,d-x-4,x+4)),d+=4}}for(var U=0,k=0;k<e.frames.length;k++){var D=e.frames[k];m&&(c(T,d,26),d+=4,g(T,d,"fcTL"),d+=4,c(T,d,U++),d+=4,c(T,d,D.rect.width),d+=4,c(T,d,D.rect.height),d+=4,c(T,d,D.rect.x),d+=4,c(T,d,D.rect.y),d+=4,p(T,d,i[k]),d+=2,p(T,d,1e3),d+=2,T[d]=D.dispose,d++,T[d]=D.blend,d++,c(T,d,f(T,d-30,30)),d+=4);var $=D.cimg,x=$.length;c(T,d,x+(k==0?0:4)),d+=4;var F=d;g(T,d,k==0?"IDAT":"fdAT"),d+=4,k!=0&&(c(T,d,U++),d+=4),T.set($,d),d+=x,c(T,d,f(T,F,d-F)),d+=4}return c(T,d,0),d+=4,g(T,d,"IEND"),d+=4,c(T,d,f(T,d-4,4)),d+=4,T.buffer},Be.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=Be.encode._filterZero(l.img,f,l.bpp,l.bpl,c,r,t)}},Be.encode.compress=function(e,r,t,i,l){for(var f=l[0],c=l[1],p=l[2],g=l[3],d=l[4],m=6,C=8,b=255,x=0;x<e.length;x++)for(var E=new Uint8Array(e[x]),k=E.length,D=0;D<k;D+=4)b&=E[D+3];var T=b!=255,A=Be.encode.framize(e,r,t,f,c,p),S={},O=[],P=[];if(i!=0){for(var z=[],D=0;D<A.length;D++)z.push(A[D].img.buffer);for(var N=Be.encode.concatRGBA(z),U=Be.quantize(N,i),$=0,F=new Uint8Array(U.abuf),D=0;D<A.length;D++){var L=A[D].img,I=L.length;P.push(new Uint8Array(U.inds.buffer,$>>2,I>>2));for(var x=0;x<I;x+=4)L[x]=F[$+x],L[x+1]=F[$+x+1],L[x+2]=F[$+x+2],L[x+3]=F[$+x+3];$+=I}for(var D=0;D<U.plte.length;D++)O.push(U.plte[D].est.rgba)}else for(var x=0;x<A.length;x++){var H=A[x],W=new Uint32Array(H.img.buffer),Z=H.rect.width,k=W.length,X=new Uint8Array(k);P.push(X);for(var D=0;D<k;D++){var re=W[D];if(D!=0&&re==W[D-1])X[D]=X[D-1];else if(D>Z&&re==W[D-Z])X[D]=X[D-Z];else{var K=S[re];if(K==null&&(S[re]=K=O.length,O.push(re),O.length>=300))break;X[D]=K}}}var te=O.length;te<=256&&d==!1&&(te<=2?C=1:te<=4?C=2:te<=16?C=4:C=8,C=Math.max(C,g));for(var x=0;x<A.length;x++){var H=A[x];H.rect.x,H.rect.y;var Z=H.rect.width,G=H.rect.height,V=H.img;new Uint32Array(V.buffer);var ee=4*Z,ie=4;if(te<=256&&d==!1){ee=Math.ceil(C*Z/8);for(var ae=new Uint8Array(ee*G),pe=P[x],xe=0;xe<G;xe++){var D=xe*ee,Ee=xe*Z;if(C==8)for(var se=0;se<Z;se++)ae[D+se]=pe[Ee+se];else if(C==4)for(var se=0;se<Z;se++)ae[D+(se>>1)]|=pe[Ee+se]<<4-(se&1)*4;else if(C==2)for(var se=0;se<Z;se++)ae[D+(se>>2)]|=pe[Ee+se]<<6-(se&3)*2;else if(C==1)for(var se=0;se<Z;se++)ae[D+(se>>3)]|=pe[Ee+se]<<7-(se&7)*1}V=ae,m=3,ie=1}else if(T==!1&&A.length==1){for(var ae=new Uint8Array(Z*G*3),Ne=Z*G,D=0;D<Ne;D++){var L=D*3,Te=D*4;ae[L]=V[Te],ae[L+1]=V[Te+1],ae[L+2]=V[Te+2]}V=ae,m=2,ie=3,ee=3*Z}H.img=V,H.bpl=ee,H.bpp=ie}return{ctype:m,depth:C,plte:O,frames:A}},Be.encode.framize=function(e,r,t,i,l,f){for(var c=[],p=0;p<e.length;p++){var g=new Uint8Array(e[p]),d=new Uint32Array(g.buffer),m,C=0,b=0,x=r,E=t,k=i?1:0;if(p!=0){for(var D=f||i||p==1||c[p-2].dispose!=0?1:2,T=0,A=1e9,S=0;S<D;S++){for(var H=new Uint8Array(e[p-1-S]),O=new Uint32Array(e[p-1-S]),P=r,z=t,N=-1,U=-1,$=0;$<t;$++)for(var F=0;F<r;F++){var L=$*r+F;d[L]!=O[L]&&(F<P&&(P=F),F>N&&(N=F),$<z&&(z=$),$>U&&(U=$))}N==-1&&(P=z=N=U=0),l&&((P&1)==1&&P--,(z&1)==1&&z--);var I=(N-P+1)*(U-z+1);I<A&&(A=I,T=S,C=P,b=z,x=N-P+1,E=U-z+1)}var H=new Uint8Array(e[p-1-T]);T==1&&(c[p-1].dispose=2),m=new Uint8Array(x*E*4),Be._copyTile(H,r,t,m,x,E,-C,-b,0),k=Be._copyTile(g,r,t,m,x,E,-C,-b,3)?1:0,k==1?Be.encode._prepareDiff(g,r,t,m,{x:C,y:b,width:x,height:E}):Be._copyTile(g,r,t,m,x,E,-C,-b,0)}else m=g.slice(0);c.push({rect:{x:C,y:b,width:x,height:E},img:m,blend:k,dispose:0})}if(i)for(var p=0;p<c.length;p++){var W=c[p];if(W.blend!=1){var Z=W.rect,X=c[p-1].rect,re=Math.min(Z.x,X.x),K=Math.min(Z.y,X.y),te=Math.max(Z.x+Z.width,X.x+X.width),G=Math.max(Z.y+Z.height,X.y+X.height),V={x:re,y:K,width:te-re,height:G-K};c[p-1].dispose=1,p-1!=0&&Be.encode._updateFrame(e,r,t,c,p-1,V,l),Be.encode._updateFrame(e,r,t,c,p,V,l)}}var ee=0;if(e.length!=1)for(var L=0;L<c.length;L++){var W=c[L];ee+=W.rect.width*W.rect.height}return c},Be.encode._updateFrame=function(e,r,t,i,l,f,c){for(var p=Uint8Array,g=Uint32Array,d=new p(e[l-1]),m=new g(e[l-1]),C=l+1<e.length?new p(e[l+1]):null,b=new p(e[l]),x=new g(b.buffer),E=r,k=t,D=-1,T=-1,A=0;A<f.height;A++)for(var S=0;S<f.width;S++){var O=f.x+S,P=f.y+A,z=P*r+O,N=x[z];N==0||i[l-1].dispose==0&&m[z]==N&&(C==null||C[z*4+3]!=0)||(O<E&&(E=O),O>D&&(D=O),P<k&&(k=P),P>T&&(T=P))}D==-1&&(E=k=D=T=0),c&&((E&1)==1&&E--,(k&1)==1&&k--),f={x:E,y:k,width:D-E+1,height:T-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?(Be._copyTile(d,r,t,U.img,f.width,f.height,-f.x,-f.y,0),Be.encode._prepareDiff(b,r,t,U.img,f)):Be._copyTile(b,r,t,U.img,f.width,f.height,-f.x,-f.y,0)},Be.encode._prepareDiff=function(e,r,t,i,l){Be._copyTile(e,r,t,i,l.width,l.height,-l.x,-l.y,2)},Be.encode._filterZero=function(e,r,t,i,l,f,c){var p=[],g=[0,1,2,3,4];f!=-1?g=[f]:(r*i>5e5||t==1)&&(g=[0]);var d;c&&(d={level:0});for(var m=l.length>1e7&&UZIP!=null?UZIP:mP,C=0;C<g.length;C++){for(var b=0;b<r;b++)Be.encode._filterLine(l,e,b,i,t,g[C]);p.push(m.deflate(l,d))}for(var x,E=1e9,C=0;C<p.length;C++)p[C].length<E&&(x=C,E=p[C].length);return p[x]},Be.encode._filterLine=function(e,r,t,i,l,f){var c=t*i,p=c+t,g=Be.decode._paeth;if(e[p]=f,p++,f==0)if(i<500)for(var d=0;d<i;d++)e[p+d]=r[c+d];else e.set(new Uint8Array(r.buffer,c,i),p);else if(f==1){for(var d=0;d<l;d++)e[p+d]=r[c+d];for(var d=l;d<i;d++)e[p+d]=r[c+d]-r[c+d-l]+256&255}else if(t==0){for(var d=0;d<l;d++)e[p+d]=r[c+d];if(f==2)for(var d=l;d<i;d++)e[p+d]=r[c+d];if(f==3)for(var d=l;d<i;d++)e[p+d]=r[c+d]-(r[c+d-l]>>1)+256&255;if(f==4)for(var d=l;d<i;d++)e[p+d]=r[c+d]-g(r[c+d-l],0,0)+256&255}else{if(f==2)for(var d=0;d<i;d++)e[p+d]=r[c+d]+256-r[c+d-i]&255;if(f==3){for(var d=0;d<l;d++)e[p+d]=r[c+d]+256-(r[c+d-i]>>1)&255;for(var d=l;d<i;d++)e[p+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[p+d]=r[c+d]+256-g(0,r[c+d-i],0)&255;for(var d=l;d<i;d++)e[p+d]=r[c+d]+256-g(r[c+d-l],r[c+d-i],r[c+d-l-i])&255}}},Be.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=Be.crc.table[(e^r[t+l])&255]^e>>>8;return e},crc:function(e,r,t){return Be.crc.update(4294967295,e,r,t)^4294967295}},Be.quantize=function(e,r){var t=new Uint8Array(e),i=t.slice(0),l=new Uint32Array(i.buffer),f=Be.quantize.getKDtree(i,r),c=f[0],p=f[1],g=Be.quantize.planeDst,d=t,m=l,C=d.length,b=new Uint8Array(t.length>>2),x;if(t.length<2e7)for(var E=0;E<C;E+=4){var k=d[E]*.00392156862745098,D=d[E+1]*(1/255),T=d[E+2]*(1/255),A=d[E+3]*(1/255);x=Be.quantize.getNearest(c,k,D,T,A),b[E>>2]=x.ind,m[E>>2]=x.est.rgba}else for(var E=0;E<C;E+=4){var k=d[E]*.00392156862745098,D=d[E+1]*(1/255),T=d[E+2]*(1/255),A=d[E+3]*(1/255);for(x=c;x.left;)x=g(x.est,k,D,T,A)<=0?x.left:x.right;b[E>>2]=x.ind,m[E>>2]=x.est.rgba}return{abuf:i.buffer,inds:b,plte:p}},Be.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=Be.quantize.stats(e,l.i0,l.i1),l.est=Be.quantize.estats(l.bst);for(var f=[l];f.length<r;){for(var c=0,p=0,g=0;g<f.length;g++)f[g].est.L>c&&(c=f[g].est.L,p=g);if(c<t)break;var d=f[p],m=Be.quantize.splitPixels(e,i,d.i0,d.i1,d.est.e,d.est.eMq255),C=d.i0>=m||d.i1<=m;if(C){d.est.L=0;continue}var b={i0:d.i0,i1:m,bst:null,est:null,tdst:0,left:null,right:null};b.bst=Be.quantize.stats(e,b.i0,b.i1),b.est=Be.quantize.estats(b.bst);var x={i0:m,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 g=0;g<16;g++)x.bst.R[g]=d.bst.R[g]-b.bst.R[g];for(var g=0;g<4;g++)x.bst.m[g]=d.bst.m[g]-b.bst.m[g];x.est=Be.quantize.estats(x.bst),d.left=b,d.right=x,f[p]=b,f.push(x)}f.sort(function(E,k){return k.bst.N-E.bst.N});for(var g=0;g<f.length;g++)f[g].ind=g;return[l,f]},Be.quantize.getNearest=function(e,r,t,i,l){if(e.left==null)return e.tdst=Be.quantize.dist(e.est.q,r,t,i,l),e;var f=Be.quantize.planeDst(e.est,r,t,i,l),c=e.left,p=e.right;f>0&&(c=e.right,p=e.left);var g=Be.quantize.getNearest(c,r,t,i,l);if(g.tdst<=f*f)return g;var d=Be.quantize.getNearest(p,r,t,i,l);return d.tdst<g.tdst?d:g},Be.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},Be.quantize.dist=function(e,r,t,i,l){var f=r-e[0],c=t-e[1],p=i-e[2],g=l-e[3];return f*f+c*c+p*p+g*g},Be.quantize.splitPixels=function(e,r,t,i,l,f){var c=Be.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 p=r[t>>2];r[t>>2]=r[i>>2],r[i>>2]=p,t+=4,i-=4}for(;c(e,t,l)>f;)t-=4;return t+4},Be.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]},Be.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 p=e[c]*.00392156862745098,g=e[c+1]*(1/255),d=e[c+2]*(1/255),m=e[c+3]*(1/255);l[0]+=p,l[1]+=g,l[2]+=d,l[3]+=m,i[0]+=p*p,i[1]+=p*g,i[2]+=p*d,i[3]+=p*m,i[5]+=g*g,i[6]+=g*d,i[7]+=g*m,i[10]+=d*d,i[11]+=d*m,i[15]+=m*m}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}},Be.quantize.estats=function(e){var r=e.R,t=e.m,i=e.N,l=t[0],f=t[1],c=t[2],p=t[3],g=i==0?0:1/i,d=[r[0]-l*l*g,r[1]-l*f*g,r[2]-l*c*g,r[3]-l*p*g,r[4]-f*l*g,r[5]-f*f*g,r[6]-f*c*g,r[7]-f*p*g,r[8]-c*l*g,r[9]-c*f*g,r[10]-c*c*g,r[11]-c*p*g,r[12]-p*l*g,r[13]-p*f*g,r[14]-p*c*g,r[15]-p*p*g],m=d,C=Be.M4,b=[Math.random(),Math.random(),Math.random(),Math.random()],x=0,E=0;if(i!=0)for(var k=0;k<16&&(b=C.multVec(m,b),E=Math.sqrt(C.dot(b,b)),b=C.sml(1/E,b),!(k!=0&&Math.abs(E-x)<1e-9));k++)x=E;var D=[l*g,f*g,c*g,p*g],T=C.dot(C.sml(255,D),b);return{Cov:d,q:D,e:b,L:x,eMq255:T,eMq:C.dot(b,D),rgba:(Math.round(255*D[3])<<24|Math.round(255*D[2])<<16|Math.round(255*D[1])<<8|Math.round(255*D[0])<<0)>>>0}},Be.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]]}},Be.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,p=0;p<c;p+=4){var g=f[p],d=f[p+1],m=f[p+2],C=f[p+3];C==0&&(g=d=m=0),i[l+p]=g,i[l+p+1]=d,i[l+p+2]=m,i[l+p+3]=C}l+=c}return i.buffer};const gP=e=>new Promise((r,t)=>{const i=new FileReader;i.onloadend=l=>r(l.target.result),i.onerror=l=>t(l),i.readAsDataURL(e)}),yP=e=>new Promise((r,t)=>{const i=new Image;i.onload=()=>r(i),i.onerror=l=>t(l),i.src=e}),xP=(e,r,t)=>new Promise(i=>e.toBlob(l=>i(l),r,t)),bP=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}},CP=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 gP(e),p=await yP(c),g=bP(p);if(l.width=g.width,l.height=g.height,f.clearRect(0,0,g.width,g.height),f.drawImage(p,0,0,g.width,g.height),["image/jpeg","image/jpg"].includes(e.type)){const d=await xP(l,e.type,r);return new File([d],i,{type:e.type})}else{const d=f.getImageData(0,0,g.width,g.height).data,m=CP(r),C=Be.encode([d.buffer],g.width,g.height,m);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:p=null,compression:g}=e,[d,m]=q.useState(!1),[C,b]=q.useState(""),x=()=>t!=="text"?Me("div",{style:{position:"relative"},children:[Me("div",{children:[Q(Fb,{}),Q("div",{style:{marginTop:8},children:c})]}),p]}):Me(nn,{children:[Q(ve.Button,{icon:Q(Nb,{}),children:c}),p]}),E=A=>new Promise(async(O,P)=>{const z=f.split(","),N=dg(A.name)||"";if(f&&!z.includes(N)&&(ve.message.error(`只允许上传 ${f} 文件`),P(!1)),!(A.size/1024/1024<l)&&!g&&(ve.message.error(`文件必须小于${l}MB`),P(!1)),g){let $=0;async function F(I){if(!g)return;const H=await r6(I,g.quality,g.limit);if($++,$>=5)return H;if(H.size/1024/1024>l)await F(H);else return H}const L=await F(A);O(L)}O(A)}).catch(O=>ve.Upload.LIST_IGNORE),k=A=>{e.onChange&&e.onChange(A)},D=A=>{e.onPreview?e.onPreview(A):T(A)},T=async A=>{let S=dg(A.name)||"";if(S||(S=dg(A.name||A.url)||""),S===ed.pdf)return ve.Modal.info({title:"PDF",width:"60%",content:Q("iframe",{title:"PDF预览",src:A.url||A.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});a6.includes(S)&&(!A.url&&!A.thumbUrl&&!A.preview&&(A.preview=await M8(A.originFileObj)),b(A.url||A.thumbUrl||A.preview),m(!0))};return Me(nn,{children:[Q(ve.Upload,{beforeUpload:E,onChange:k,listType:t,...e,onPreview:D,children:i.length>=r?null:x()}),Q(ve.Image,{style:{display:"none"},preview:{visible:d,src:C,onVisibleChange:()=>{m(!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"},wP={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,p=(m,C)=>{var b,x;if(C.btnType==="submit"){(b=i==null?void 0:i.form)==null||b.validateFields().then(E=>{C.onClick&&C.onClick(E)});return}if(C.btnType==="reset"){(x=i==null?void 0:i.form)==null||x.resetFields(),C.onClick&&C.onClick(m);return}C.btnType==="cancel"&&C.onClick&&C.onClick(m)},g=m=>Array.isArray(m)?m:m&&m.fileList,d=m=>{var b;const C=i==null?void 0:i.initialValues;return m.dataIndex?((b=m.render)==null?void 0:b.call(m,C==null?void 0:C[m.dataIndex],C))||m.value||(C==null?void 0:C[m.dataIndex]):""};return Q(ve.Form,{layout:"horizontal",form:i==null?void 0:i.form,...wP,...i||{},children:Q(ve.Row,{gutter:16,...t,children:r.filter(m=>!m.hidden).map((m,C)=>Q(ve.Col,{...m.colProps||{span:24},children:Q(ve.Form.Item,{...m.valueType==="upload"?{getValueFromEvent:g}:{},label:f?"":m.title,name:m.valueType==="btns"?void 0:m.dataIndex,...m.formItemProps,children:m.readonly?Q("div",{children:d(m)}):m.readonly===void 0&&l?Q("div",{children:d(m)}):Q(l6,{onChange:b=>{var x;return(x=m==null?void 0:m.onChange)==null?void 0:x.call(m,b)},valueType:m.valueType,onBtnClick:p,valueProps:m.valueProps,formItemProps:m.formItemProps,langId:c})})},m.dataIndex||C))})})},l6=e=>{const{valueType:r,valueProps:t,value:i,onChange:l,onBtnClick:f,inputRef:c,formItemProps:p,langId:g}=e,d=q.useMemo(()=>{let m=Q(ve.Input,{placeholder:g==="10001"?"请输入":"Please input",allowClear:!0,...t});switch(r){case"rate":m=Q(ve.Rate,{...t});break;case"password":m=Q(ve.Input.Password,{...t});break;case"modal":m=Q(_P,{...t});break;case"checkbox":m=Q(ve.Checkbox.Group,{...t});break;case"select":m=Q(ve.Select,{placeholder:g==="10001"?"请选择":"Please select",allowClear:!0,...t});break;case"inputNumber":m=Q(ve.InputNumber,{style:{width:"100%"},placeholder:g==="10001"?"请输入":"Please input",...t});break;case"textarea":m=Q(ve.Input.TextArea,{placeholder:g==="10001"?"请输入":"Please input",allowClear:!0,...t});break;case"radio":m=Q(ve.Radio.Group,{...t});break;case"switch":m=Q(ve.Switch,{...t});break;case"datePicker":m=Q(ve.DatePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"rangePicker":m=Q(ve.DatePicker.RangePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"timePicker":m=Q(ve.TimePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"cascader":m=Q(ve.Cascader,{allowClear:!0,...t});break;case"upload":m=Q(i6,{...t});break;case"btns":m=Q(ve.Space,{children:t==null?void 0:t.map(C=>q.createElement(ve.Button,{type:C.btnType==="submit"?"primary":"default",...Js.omit(C,["btnType"]),key:C.key||C.btnType,onClick:b=>{f==null||f(b,C)}},C.title||C.children))});break}return m},[r,t,l,i]);if(r==="custom"){const m=t;return q.cloneElement(m.children,{[(p==null?void 0:p.valuePropName)||o6(r||"input")]:i,onChange:l,ref:c})}return q.cloneElement(d,{[o6(r||"input")]:i,onChange:l,ref:c})},_P=e=>{const{placeholder:r,labelKey:t,onToggle:i,value:l,onClear:f,className:c,style:p}=e;return Me("div",{className:[Sg.fieldModal,c].filter(g=>g).join(" "),style:p,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(E7,{})})]})};var y2={exports:{}},Yh={},Dg={exports:{}},s6={},bt={exports:{}},x2={exports:{}},mn={};var u6;function EP(){if(u6)return mn;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,p=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=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=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function S(P){if(typeof P=="object"&&P!==null){var z=P.$$typeof;switch(z){case r:switch(P=P.type,P){case g:case d:case i:case f:case l:case C:return P;default:switch(P=P&&P.$$typeof,P){case p:case m:case E:case x:case c:return P;default:return z}}case t:return z}}}function O(P){return S(P)===d}return mn.AsyncMode=g,mn.ConcurrentMode=d,mn.ContextConsumer=p,mn.ContextProvider=c,mn.Element=r,mn.ForwardRef=m,mn.Fragment=i,mn.Lazy=E,mn.Memo=x,mn.Portal=t,mn.Profiler=f,mn.StrictMode=l,mn.Suspense=C,mn.isAsyncMode=function(P){return O(P)||S(P)===g},mn.isConcurrentMode=O,mn.isContextConsumer=function(P){return S(P)===p},mn.isContextProvider=function(P){return S(P)===c},mn.isElement=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===r},mn.isForwardRef=function(P){return S(P)===m},mn.isFragment=function(P){return S(P)===i},mn.isLazy=function(P){return S(P)===E},mn.isMemo=function(P){return S(P)===x},mn.isPortal=function(P){return S(P)===t},mn.isProfiler=function(P){return S(P)===f},mn.isStrictMode=function(P){return S(P)===l},mn.isSuspense=function(P){return S(P)===C},mn.isValidElementType=function(P){return typeof P=="string"||typeof P=="function"||P===i||P===d||P===f||P===l||P===C||P===b||typeof P=="object"&&P!==null&&(P.$$typeof===E||P.$$typeof===x||P.$$typeof===c||P.$$typeof===p||P.$$typeof===m||P.$$typeof===D||P.$$typeof===T||P.$$typeof===A||P.$$typeof===k)},mn.typeOf=S,mn}var gn={};var c6;function SP(){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,p=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=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=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function S(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===E||Se.$$typeof===x||Se.$$typeof===c||Se.$$typeof===p||Se.$$typeof===m||Se.$$typeof===D||Se.$$typeof===T||Se.$$typeof===A||Se.$$typeof===k)}function O(Se){if(typeof Se=="object"&&Se!==null){var lt=Se.$$typeof;switch(lt){case r:var je=Se.type;switch(je){case g:case d:case i:case f:case l:case C:return je;default:var Pt=je&&je.$$typeof;switch(Pt){case p:case m:case E:case x:case c:return Pt;default:return lt}}case t:return lt}}}var P=g,z=d,N=p,U=c,$=r,F=m,L=i,I=E,H=x,W=t,Z=f,X=l,re=C,K=!1;function te(Se){return K||(K=!0),G(Se)||O(Se)===g}function G(Se){return O(Se)===d}function V(Se){return O(Se)===p}function ee(Se){return O(Se)===c}function ie(Se){return typeof Se=="object"&&Se!==null&&Se.$$typeof===r}function ae(Se){return O(Se)===m}function pe(Se){return O(Se)===i}function xe(Se){return O(Se)===E}function Ee(Se){return O(Se)===x}function se(Se){return O(Se)===t}function Ne(Se){return O(Se)===f}function Te(Se){return O(Se)===l}function tt(Se){return O(Se)===C}gn.AsyncMode=P,gn.ConcurrentMode=z,gn.ContextConsumer=N,gn.ContextProvider=U,gn.Element=$,gn.ForwardRef=F,gn.Fragment=L,gn.Lazy=I,gn.Memo=H,gn.Portal=W,gn.Profiler=Z,gn.StrictMode=X,gn.Suspense=re,gn.isAsyncMode=te,gn.isConcurrentMode=G,gn.isContextConsumer=V,gn.isContextProvider=ee,gn.isElement=ie,gn.isForwardRef=ae,gn.isFragment=pe,gn.isLazy=xe,gn.isMemo=Ee,gn.isPortal=se,gn.isProfiler=Ne,gn.isStrictMode=Te,gn.isSuspense=tt,gn.isValidElementType=S,gn.typeOf=O}()),gn}var f6;function d6(){return f6||(f6=1,function(e){process.env.NODE_ENV==="production"?e.exports=EP():e.exports=SP()}(x2)),x2.exports}var b2,h6;function DP(){if(h6)return b2;h6=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={},p=0;p<10;p++)c["_"+String.fromCharCode(p)]=p;var g=Object.getOwnPropertyNames(c).map(function(m){return c[m]});if(g.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(m){d[m]=m}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return b2=l()?Object.assign:function(f,c){for(var p,g=i(f),d,m=1;m<arguments.length;m++){p=Object(arguments[m]);for(var C in p)r.call(p,C)&&(g[C]=p[C]);if(e){d=e(p);for(var b=0;b<d.length;b++)t.call(p,d[b])&&(g[d[b]]=p[d[b]])}}return g},b2}var C2,p6;function w2(){if(p6)return C2;p6=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 kP(){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,p,g,d){if(process.env.NODE_ENV!=="production"){for(var m in f)if(i(f,m)){var C;try{if(typeof f[m]!="function"){var b=Error((g||"React class")+": "+p+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}C=f[m](c,m,g,p,null,r)}catch(E){C=E}if(C&&!(C instanceof Error)&&e((g||"React class")+": type specification of "+p+" `"+m+"` 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 "+p+" type: "+C.message+(x??""))}}}}return l.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},E2=l,E2}var S2,y6;function TP(){if(y6)return S2;y6=1;var e=d6(),r=DP(),t=w2(),i=m6(),l=kP(),f=function(){};process.env.NODE_ENV!=="production"&&(f=function(p){var g="Warning: "+p;try{throw new Error(g)}catch{}});function c(){return null}return S2=function(p,g){var d=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function C(G){var V=G&&(d&&G[d]||G[m]);if(typeof V=="function")return V}var b="<<anonymous>>",x={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:A(),arrayOf:S,element:O(),elementType:P(),instanceOf:z,node:F(),objectOf:U,oneOf:N,oneOfType:$,shape:I,exact:H};function E(G,V){return G===V?G!==0||1/G===1/V:G!==G&&V!==V}function k(G,V){this.message=G,this.data=V&&typeof V=="object"?V:{},this.stack=""}k.prototype=Error.prototype;function D(G){if(process.env.NODE_ENV!=="production")var V={},ee=0;function ie(pe,xe,Ee,se,Ne,Te,tt){if(se=se||b,Te=Te||Ee,tt!==t){if(g){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 lt=se+":"+Ee;!V[lt]&&ee<3&&(f("You are manually calling a React.PropTypes validation function for the `"+Te+"` 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[lt]=!0,ee++)}}return xe[Ee]==null?pe?xe[Ee]===null?new k("The "+Ne+" `"+Te+"` is marked as required "+("in `"+se+"`, but its value is `null`.")):new k("The "+Ne+" `"+Te+"` is marked as required in "+("`"+se+"`, but its value is `undefined`.")):null:G(xe,Ee,se,Ne,Te)}var ae=ie.bind(null,!1);return ae.isRequired=ie.bind(null,!0),ae}function T(G){function V(ee,ie,ae,pe,xe,Ee){var se=ee[ie],Ne=X(se);if(Ne!==G){var Te=re(se);return new k("Invalid "+pe+" `"+xe+"` of type "+("`"+Te+"` supplied to `"+ae+"`, expected ")+("`"+G+"`."),{expectedType:G})}return null}return D(V)}function A(){return D(c)}function S(G){function V(ee,ie,ae,pe,xe){if(typeof G!="function")return new k("Property `"+xe+"` of component `"+ae+"` has invalid PropType notation inside arrayOf.");var Ee=ee[ie];if(!Array.isArray(Ee)){var se=X(Ee);return new k("Invalid "+pe+" `"+xe+"` of type "+("`"+se+"` supplied to `"+ae+"`, expected an array."))}for(var Ne=0;Ne<Ee.length;Ne++){var Te=G(Ee,Ne,ae,pe,xe+"["+Ne+"]",t);if(Te instanceof Error)return Te}return null}return D(V)}function O(){function G(V,ee,ie,ae,pe){var xe=V[ee];if(!p(xe)){var Ee=X(xe);return new k("Invalid "+ae+" `"+pe+"` of type "+("`"+Ee+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return D(G)}function P(){function G(V,ee,ie,ae,pe){var xe=V[ee];if(!e.isValidElementType(xe)){var Ee=X(xe);return new k("Invalid "+ae+" `"+pe+"` of type "+("`"+Ee+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return D(G)}function z(G){function V(ee,ie,ae,pe,xe){if(!(ee[ie]instanceof G)){var Ee=G.name||b,se=te(ee[ie]);return new k("Invalid "+pe+" `"+xe+"` of type "+("`"+se+"` supplied to `"+ae+"`, expected ")+("instance of `"+Ee+"`."))}return null}return D(V)}function N(G){if(!Array.isArray(G))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(ee,ie,ae,pe,xe){for(var Ee=ee[ie],se=0;se<G.length;se++)if(E(Ee,G[se]))return null;var Ne=JSON.stringify(G,function(tt,Se){var lt=re(Se);return lt==="symbol"?String(Se):Se});return new k("Invalid "+pe+" `"+xe+"` of value `"+String(Ee)+"` "+("supplied to `"+ae+"`, expected one of "+Ne+"."))}return D(V)}function U(G){function V(ee,ie,ae,pe,xe){if(typeof G!="function")return new k("Property `"+xe+"` of component `"+ae+"` has invalid PropType notation inside objectOf.");var Ee=ee[ie],se=X(Ee);if(se!=="object")return new k("Invalid "+pe+" `"+xe+"` of type "+("`"+se+"` supplied to `"+ae+"`, expected an object."));for(var Ne in Ee)if(i(Ee,Ne)){var Te=G(Ee,Ne,ae,pe,xe+"."+Ne,t);if(Te instanceof Error)return Te}return null}return D(V)}function $(G){if(!Array.isArray(G))return process.env.NODE_ENV!=="production"&&f("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var V=0;V<G.length;V++){var ee=G[V];if(typeof ee!="function")return f("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+K(ee)+" at index "+V+"."),c}function ie(ae,pe,xe,Ee,se){for(var Ne=[],Te=0;Te<G.length;Te++){var tt=G[Te],Se=tt(ae,pe,xe,Ee,se,t);if(Se==null)return null;Se.data&&i(Se.data,"expectedType")&&Ne.push(Se.data.expectedType)}var lt=Ne.length>0?", expected one of type ["+Ne.join(", ")+"]":"";return new k("Invalid "+Ee+" `"+se+"` supplied to "+("`"+xe+"`"+lt+"."))}return D(ie)}function F(){function G(V,ee,ie,ae,pe){return W(V[ee])?null:new k("Invalid "+ae+" `"+pe+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return D(G)}function L(G,V,ee,ie,ae){return new k((G||"React class")+": "+V+" type `"+ee+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ae+"`.")}function I(G){function V(ee,ie,ae,pe,xe){var Ee=ee[ie],se=X(Ee);if(se!=="object")return new k("Invalid "+pe+" `"+xe+"` of type `"+se+"` "+("supplied to `"+ae+"`, expected `object`."));for(var Ne in G){var Te=G[Ne];if(typeof Te!="function")return L(ae,pe,xe,Ne,re(Te));var tt=Te(Ee,Ne,ae,pe,xe+"."+Ne,t);if(tt)return tt}return null}return D(V)}function H(G){function V(ee,ie,ae,pe,xe){var Ee=ee[ie],se=X(Ee);if(se!=="object")return new k("Invalid "+pe+" `"+xe+"` of type `"+se+"` "+("supplied to `"+ae+"`, expected `object`."));var Ne=r({},ee[ie],G);for(var Te in Ne){var tt=G[Te];if(i(G,Te)&&typeof tt!="function")return L(ae,pe,xe,Te,re(tt));if(!tt)return new k("Invalid "+pe+" `"+xe+"` key `"+Te+"` supplied to `"+ae+"`.\nBad object: "+JSON.stringify(ee[ie],null," ")+`
194
194
  Valid keys: `+JSON.stringify(Object.keys(G),null," "));var Se=tt(Ee,Te,ae,pe,xe+"."+Te,t);if(Se)return Se}return null}return D(V)}function W(G){switch(typeof G){case"number":case"string":case"undefined":return!0;case"boolean":return!G;case"object":if(Array.isArray(G))return G.every(W);if(G===null||p(G))return!0;var V=C(G);if(V){var ee=V.call(G),ie;if(V!==G.entries){for(;!(ie=ee.next()).done;)if(!W(ie.value))return!1}else for(;!(ie=ee.next()).done;){var ae=ie.value;if(ae&&!W(ae[1]))return!1}}else return!1;return!0;default:return!1}}function Z(G,V){return G==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function X(G){var V=typeof G;return Array.isArray(G)?"array":G instanceof RegExp?"object":Z(V,G)?"symbol":V}function re(G){if(typeof G>"u"||G===null)return""+G;var V=X(G);if(V==="object"){if(G instanceof Date)return"date";if(G instanceof RegExp)return"regexp"}return V}function K(G){var V=re(G);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function te(G){return!G.constructor||!G.constructor.name?b:G.constructor.name}return x.checkPropTypes=l,x.resetWarningCache=l.resetWarningCache,x.PropTypes=x,x},S2}var D2,x6;function AP(){if(x6)return D2;x6=1;var e=w2();function r(){}function t(){}return t.resetWarningCache=r,D2=function(){function i(c,p,g,d,m,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 OP=d6(),RP=!0;bt.exports=TP()(OP.isElement,RP)}else bt.exports=AP()();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 Oe(){for(var e,r,t=0,i="";t<arguments.length;)(e=arguments[t++])&&(r=b6(e))&&(i&&(i+=" "),i+=r);return i}const FP=B4(Object.freeze(Object.defineProperty({__proto__:null,clsx:Oe,default:Oe},Symbol.toStringTag,{value:"Module"})));var lr={},sl={};Object.defineProperty(sl,"__esModule",{value:!0}),sl.dontSetMe=LP,sl.findInArray=NP,sl.int=BP,sl.isFunction=MP,sl.isNum=PP;function NP(e,r){for(let t=0,i=e.length;t<i;t++)if(r.apply(r,[e[t],t,e]))return e[t]}function MP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function PP(e){return typeof e=="number"&&!isNaN(e)}function BP(e){return parseInt(e,10)}function LP(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=zP,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(UP(e)):e}function zP(e,r){return r?"-".concat(r.toLowerCase(),"-").concat(e):e}function UP(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(lr,"__esModule",{value:!0}),lr.addClassName=D6,lr.addEvent=HP,lr.addUserSelectStyles=JP,lr.createCSSTransform=WP,lr.createSVGTransform=QP,lr.getTouch=ZP,lr.getTouchIdentifier=XP,lr.getTranslation=T2,lr.innerHeight=qP,lr.innerWidth=GP,lr.matchesSelector=S6,lr.matchesSelectorAndParentsTo=IP,lr.offsetXYFromParent=KP,lr.outerHeight=$P,lr.outerWidth=YP,lr.removeClassName=k6,lr.removeEvent=VP,lr.removeUserSelectStyles=eB;var Ri=sl,_6=jP(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 jP(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,Ri.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,Ri.isFunction)(e[t])})),(0,Ri.isFunction)(e[kg])?e[kg](r):!1}function IP(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 HP(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 VP(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 $P(e){let r=e.clientHeight;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r+=(0,Ri.int)(t.borderTopWidth),r+=(0,Ri.int)(t.borderBottomWidth),r}function YP(e){let r=e.clientWidth;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r+=(0,Ri.int)(t.borderLeftWidth),r+=(0,Ri.int)(t.borderRightWidth),r}function qP(e){let r=e.clientHeight;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r-=(0,Ri.int)(t.paddingTop),r-=(0,Ri.int)(t.paddingBottom),r}function GP(e){let r=e.clientWidth;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r-=(0,Ri.int)(t.paddingLeft),r-=(0,Ri.int)(t.paddingRight),r}function KP(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 WP(e,r){const t=T2(e,r,"px");return{[(0,_6.browserPrefixToKey)("transform",_6.default)]:t}}function QP(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),p="".concat(typeof r.y=="string"?r.y:r.y+t);f="translate(".concat(c,", ").concat(p,")")+f}return f}function ZP(e,r){return e.targetTouches&&(0,Ri.findInArray)(e.targetTouches,t=>r===t.identifier)||e.changedTouches&&(0,Ri.findInArray)(e.changedTouches,t=>r===t.identifier)}function XP(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function JP(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 eB(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 ul={};Object.defineProperty(ul,"__esModule",{value:!0}),ul.canDragX=rB,ul.canDragY=aB,ul.createCoreData=oB,ul.createDraggableData=lB,ul.getBoundPosition=tB,ul.getControlPosition=iB,ul.snapToGrid=nB;var Fi=sl,ud=lr;function tB(e,r,t){if(!e.props.bounds)return[r,t];let{bounds:i}=e.props;i=typeof i=="string"?i:sB(i);const l=A2(e);if(typeof i=="string"){const{ownerDocument:f}=l,c=f.defaultView;let p;if(i==="parent"?p=l.parentNode:p=f.querySelector(i),!(p instanceof c.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');const g=p,d=c.getComputedStyle(l),m=c.getComputedStyle(g);i={left:-l.offsetLeft+(0,Fi.int)(m.paddingLeft)+(0,Fi.int)(d.marginLeft),top:-l.offsetTop+(0,Fi.int)(m.paddingTop)+(0,Fi.int)(d.marginTop),right:(0,ud.innerWidth)(g)-(0,ud.outerWidth)(l)-l.offsetLeft+(0,Fi.int)(m.paddingRight)-(0,Fi.int)(d.marginRight),bottom:(0,ud.innerHeight)(g)-(0,ud.outerHeight)(l)-l.offsetTop+(0,Fi.int)(m.paddingBottom)-(0,Fi.int)(d.marginBottom)}}return(0,Fi.isNum)(i.right)&&(r=Math.min(r,i.right)),(0,Fi.isNum)(i.bottom)&&(t=Math.min(t,i.bottom)),(0,Fi.isNum)(i.left)&&(r=Math.max(r,i.left)),(0,Fi.isNum)(i.top)&&(t=Math.max(t,i.top)),[r,t]}function nB(e,r,t){const i=Math.round(r/e[0])*e[0],l=Math.round(t/e[1])*e[1];return[i,l]}function rB(e){return e.props.axis==="both"||e.props.axis==="x"}function aB(e){return e.props.axis==="both"||e.props.axis==="y"}function iB(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 oB(e,r,t){const i=!(0,Fi.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 lB(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 sB(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=uB;function uB(){}Object.defineProperty(Tg,"__esModule",{value:!0}),Tg.default=void 0;var O2=fB(q),oi=F2(bt.exports),cB=F2(eu.exports),_a=lr,ou=ul,R2=sl,qh=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 fB(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 Ha(e,r,t){return r=dB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function dB(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 xo={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let lu=xo.mouse,Og=class extends O2.Component{constructor(){super(...arguments),Ha(this,"dragging",!1),Ha(this,"lastX",NaN),Ha(this,"lastY",NaN),Ha(this,"touchIdentifier",null),Ha(this,"mounted",!1),Ha(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,_a.matchesSelectorAndParentsTo)(r.target,this.props.handle,t)||this.props.cancel&&(0,_a.matchesSelectorAndParentsTo)(r.target,this.props.cancel,t))return;r.type==="touchstart"&&r.preventDefault();const l=(0,_a.getTouchIdentifier)(r);this.touchIdentifier=l;const f=(0,ou.getControlPosition)(r,l,this);if(f==null)return;const{x:c,y:p}=f,g=(0,ou.createCoreData)(this,c,p);(0,qh.default)("DraggableCore: handleDragStart: %j",g),(0,qh.default)("calling",this.props.onStart),!(this.props.onStart(r,g)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,_a.addUserSelectStyles)(i),this.dragging=!0,this.lastX=c,this.lastY=p,(0,_a.addEvent)(i,lu.move,this.handleDrag),(0,_a.addEvent)(i,lu.stop,this.handleDragStop))}),Ha(this,"handleDrag",r=>{const t=(0,ou.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let p=i-this.lastX,g=l-this.lastY;if([p,g]=(0,ou.snapToGrid)(this.props.grid,p,g),!p&&!g)return;i=this.lastX+p,l=this.lastY+g}const f=(0,ou.createCoreData)(this,i,l);if((0,qh.default)("DraggableCore: handleDrag: %j",f),this.props.onDrag(r,f)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const g=document.createEvent("MouseEvents");g.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(g)}return}this.lastX=i,this.lastY=l}),Ha(this,"handleDragStop",r=>{if(!this.dragging)return;const t=(0,ou.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let g=i-this.lastX||0,d=l-this.lastY||0;[g,d]=(0,ou.snapToGrid)(this.props.grid,g,d),i=this.lastX+g,l=this.lastY+d}const f=(0,ou.createCoreData)(this,i,l);if(this.props.onStop(r,f)===!1||this.mounted===!1)return!1;const p=this.findDOMNode();p&&this.props.enableUserSelectHack&&(0,_a.removeUserSelectStyles)(p.ownerDocument),(0,qh.default)("DraggableCore: handleDragStop: %j",f),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,p&&((0,qh.default)("DraggableCore: Removing handlers"),(0,_a.removeEvent)(p.ownerDocument,lu.move,this.handleDrag),(0,_a.removeEvent)(p.ownerDocument,lu.stop,this.handleDragStop))}),Ha(this,"onMouseDown",r=>(lu=xo.mouse,this.handleDragStart(r))),Ha(this,"onMouseUp",r=>(lu=xo.mouse,this.handleDragStop(r))),Ha(this,"onTouchStart",r=>(lu=xo.touch,this.handleDragStart(r))),Ha(this,"onTouchEnd",r=>(lu=xo.touch,this.handleDragStop(r)))}componentDidMount(){this.mounted=!0;const r=this.findDOMNode();r&&(0,_a.addEvent)(r,xo.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const r=this.findDOMNode();if(r){const{ownerDocument:t}=r;(0,_a.removeEvent)(t,xo.mouse.move,this.handleDrag),(0,_a.removeEvent)(t,xo.touch.move,this.handleDrag),(0,_a.removeEvent)(t,xo.mouse.stop,this.handleDragStop),(0,_a.removeEvent)(t,xo.touch.stop,this.handleDragStop),(0,_a.removeEvent)(r,xo.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,_a.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:cB.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,Ha(Og,"displayName","DraggableCore"),Ha(Og,"propTypes",{allowAnyClick:oi.default.bool,children:oi.default.node.isRequired,disabled:oi.default.bool,enableUserSelectHack:oi.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:oi.default.arrayOf(oi.default.number),handle:oi.default.string,cancel:oi.default.string,nodeRef:oi.default.object,onStart:oi.default.func,onDrag:oi.default.func,onStop:oi.default.func,onMouseDown:oi.default.func,scale:oi.default.number,className:R2.dontSetMe,style:R2.dontSetMe,transform:R2.dontSetMe}),Ha(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 g.default}}),e.default=void 0;var r=b(q),t=m(bt.exports),i=m(eu.exports),l=m(FP),f=lr,c=ul,p=sl,g=m(Tg),d=m(Ag);function m(A){return A&&A.__esModule?A:{default:A}}function C(A){if(typeof WeakMap!="function")return null;var S=new WeakMap,O=new WeakMap;return(C=function(P){return P?O:S})(A)}function b(A,S){if(!S&&A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var O=C(S);if(O&&O.has(A))return O.get(A);var P={},z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in A)if(N!=="default"&&Object.prototype.hasOwnProperty.call(A,N)){var U=z?Object.getOwnPropertyDescriptor(A,N):null;U&&(U.get||U.set)?Object.defineProperty(P,N,U):P[N]=A[N]}return P.default=A,O&&O.set(A,P),P}function x(){return x=Object.assign?Object.assign.bind():function(A){for(var S=1;S<arguments.length;S++){var O=arguments[S];for(var P in O)Object.prototype.hasOwnProperty.call(O,P)&&(A[P]=O[P])}return A},x.apply(this,arguments)}function E(A,S,O){return S=k(S),S in A?Object.defineProperty(A,S,{value:O,enumerable:!0,configurable:!0,writable:!0}):A[S]=O,A}function k(A){var S=D(A,"string");return typeof S=="symbol"?S:String(S)}function D(A,S){if(typeof A!="object"||A===null)return A;var O=A[Symbol.toPrimitive];if(O!==void 0){var P=O.call(A,S||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(A)}class T extends r.Component{static getDerivedStateFromProps(S,O){let{position:P}=S,{prevPropsPosition:z}=O;return P&&(!z||P.x!==z.x||P.y!==z.y)?((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:P,prevPropsPosition:z}),{x:P.x,y:P.y,prevPropsPosition:{...P}}):null}constructor(S){super(S),E(this,"onDragStart",(O,P)=>{if((0,d.default)("Draggable: onDragStart: %j",P),this.props.onStart(O,(0,c.createDraggableData)(this,P))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),E(this,"onDrag",(O,P)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",P);const z=(0,c.createDraggableData)(this,P),N={x:z.x,y:z.y,slackX:0,slackY:0};if(this.props.bounds){const{x:$,y:F}=N;N.x+=this.state.slackX,N.y+=this.state.slackY;const[L,I]=(0,c.getBoundPosition)(this,N.x,N.y);N.x=L,N.y=I,N.slackX=this.state.slackX+($-N.x),N.slackY=this.state.slackY+(F-N.y),z.x=N.x,z.y=N.y,z.deltaX=N.x-this.state.x,z.deltaY=N.y-this.state.y}if(this.props.onDrag(O,z)===!1)return!1;this.setState(N)}),E(this,"onDragStop",(O,P)=>{if(!this.state.dragging||this.props.onStop(O,(0,c.createDraggableData)(this,P))===!1)return!1;(0,d.default)("Draggable: onDragStop: %j",P);const N={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:$,y:F}=this.props.position;N.x=$,N.y=F}this.setState(N)}),this.state={dragging:!1,dragged:!1,x:S.position?S.position.x:S.defaultPosition.x,y:S.position?S.position.y:S.defaultPosition.y,prevPropsPosition:{...S.position},slackX:0,slackY:0,isElementSVG:!1},S.position&&(S.onDrag||S.onStop)}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var S,O;return(S=(O=this.props)===null||O===void 0||(O=O.nodeRef)===null||O===void 0?void 0:O.current)!==null&&S!==void 0?S:i.default.findDOMNode(this)}render(){const{axis:S,bounds:O,children:P,defaultPosition:z,defaultClassName:N,defaultClassNameDragging:U,defaultClassNameDragged:$,position:F,positionOffset:L,scale:I,...H}=this.props;let W={},Z=null;const re=!Boolean(F)||this.state.dragging,K=F||z,te={x:(0,c.canDragX)(this)&&re?this.state.x:K.x,y:(0,c.canDragY)(this)&&re?this.state.y:K.y};this.state.isElementSVG?Z=(0,f.createSVGTransform)(te,L):W=(0,f.createCSSTransform)(te,L);const G=(0,l.default)(P.props.className||"",N,{[U]:this.state.dragging,[$]:this.state.dragged});return r.createElement(g.default,x({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(P),{className:G,style:{...P.props.style,...W},transform:Z}))}}e.default=T,E(T,"displayName","Draggable"),E(T,"propTypes",{...g.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:p.dontSetMe,style:p.dontSetMe,transform:p.dontSetMe}),E(T,"defaultProps",{...g.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:pB}=s6;Dg.exports=A6,Dg.exports.default=A6,Dg.exports.DraggableCore=pB;var N2={};N2.__esModule=!0,N2.cloneElement=bB;var vB=mB(q);function mB(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){gB(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 gB(e,r,t){return r=yB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function yB(e){var r=xB(e,"string");return typeof r=="symbol"?r:String(r)}function xB(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 bB(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),vB.default.cloneElement(e,r)}var Gh={};Gh.__esModule=!0,Gh.resizableProps=void 0;var Lt=CB(bt.exports);function CB(e){return e&&e.__esModule?e:{default:e}}var wB={axis:Lt.default.oneOf(["both","x","y","none"]),className:Lt.default.string,children:Lt.default.element.isRequired,draggableOpts:Lt.default.shape({allowAnyClick:Lt.default.bool,cancel:Lt.default.string,children:Lt.default.node,disabled:Lt.default.bool,enableUserSelectHack:Lt.default.bool,offsetParent:Lt.default.node,grid:Lt.default.arrayOf(Lt.default.number),handle:Lt.default.string,nodeRef:Lt.default.object,onStart:Lt.default.func,onDrag:Lt.default.func,onStop:Lt.default.func,onMouseDown:Lt.default.func,scale:Lt.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=Lt.default.number).isRequired.apply(f,t)}return Lt.default.number.apply(Lt.default,t)},handle:Lt.default.oneOfType([Lt.default.node,Lt.default.func]),handleSize:Lt.default.arrayOf(Lt.default.number),lockAspectRatio:Lt.default.bool,maxConstraints:Lt.default.arrayOf(Lt.default.number),minConstraints:Lt.default.arrayOf(Lt.default.number),onResizeStop:Lt.default.func,onResizeStart:Lt.default.func,onResize:Lt.default.func,resizeHandles:Lt.default.arrayOf(Lt.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Lt.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=Lt.default.number).isRequired.apply(f,t)}return Lt.default.number.apply(Lt.default,t)}};Gh.resizableProps=wB,Yh.__esModule=!0,Yh.default=void 0;var Kh=kB(q),_B=Dg.exports,EB=N2,SB=Gh,DB=["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 kB(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 TB(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){AB(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 AB(e,r,t){return r=OB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function OB(e){var r=RB(e,"string");return typeof r=="symbol"?r:String(r)}function RB(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 FB(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){FB(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,p=c.minConstraints,g=c.maxConstraints,d=c.lockAspectRatio;if(!p&&!g&&!d)return[l,f];if(d){var m=this.props.width/this.props.height,C=l-this.props.width,b=f-this.props.height;Math.abs(C)>Math.abs(b*m)?f=l/m:l=f*m}var x=l,E=f,k=this.slack||[0,0],D=k[0],T=k[1];return l+=D,f+=T,p&&(l=Math.max(p[0],l),f=Math.max(p[1],f)),g&&(l=Math.min(g[0],l),f=Math.min(g[1],f)),this.slack=[D+(x-l),T+(E-f)],[l,f]},t.resizeHandler=function(l,f){var c=this;return function(p,g){var d=g.node,m=g.deltaX,C=g.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 E=f[0],k=f[f.length-1],D=d.getBoundingClientRect();if(c.lastHandleRect!=null){if(k==="w"){var T=D.left-c.lastHandleRect.left;m+=T}if(E==="n"){var A=D.top-c.lastHandleRect.top;C+=A}}c.lastHandleRect=D,k==="w"&&(m=-m),E==="n"&&(C=-C);var S=c.props.width+(b?m/c.props.transformScale:0),O=c.props.height+(x?C/c.props.transformScale:0),P=c.runConstraints(S,O);S=P[0],O=P[1];var z=S!==c.props.width||O!==c.props.height,N=typeof c.props[l]=="function"?c.props[l]:null,U=l==="onResize"&&!z;N&&!U&&(p.persist==null||p.persist(),N(p,{node:d,size:{width:S,height:O},handle:f})),l==="onResizeStop"&&c.resetData()}}},t.renderResizeHandle=function(l,f){var c=this.props.handle;if(!c)return Kh.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:f});if(typeof c=="function")return c(l,f);var p=typeof c.type=="string",g=P2({ref:f},p?{}:{handleAxis:l});return Kh.cloneElement(c,g)},t.render=function(){var l=this,f=this.props,c=f.children,p=f.className,g=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 m=TB(f,DB);return(0,EB.cloneElement)(c,P2(P2({},m),{},{className:(p?p+" ":"")+"react-resizable",children:[].concat(c.props.children,d.map(function(C){var b,x=(b=l.handleRefs[C])!=null?b:l.handleRefs[C]=Kh.createRef();return Kh.createElement(_B.DraggableCore,M2({},g,{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}(Kh.Component);Yh.default=L2,L2.propTypes=SB.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=LB(q),NB=M6(bt.exports),MB=M6(Yh),PB=Gh,BB=["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 LB(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){zB(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 zB(e,r,t){return r=UB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function UB(e){var r=jB(e,"string");return typeof r=="symbol"?r:String(r)}function jB(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 IB(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 HB(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){HB(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(p,g){var d=g.size;i.props.onResize?(p.persist==null||p.persist(),i.setState(d,function(){return i.props.onResize&&i.props.onResize(p,g)})):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 p=l.onResizeStart,g=l.onResizeStop,d=l.draggableOpts,m=l.minConstraints,C=l.maxConstraints,b=l.lockAspectRatio,x=l.axis;l.width,l.height;var E=l.resizeHandles,k=l.style,D=l.transformScale,T=IB(l,BB);return z2.createElement(MB.default,{axis:x,draggableOpts:d,handle:f,handleSize:c,height:this.state.height,lockAspectRatio:b,maxConstraints:C,minConstraints:m,onResizeStart:p,onResize:this.onResize,onResizeStop:g,resizeHandles:E,transformScale:D,width:this.state.width},z2.createElement("div",U2({},T,{style:Fg(Fg({},k),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(z2.Component);Rg.default=L6,L6.propTypes=Fg(Fg({},PB.resizableProps),{},{children:NB.default.element}),y2.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var VB=y2.exports.Resizable=Yh.default;y2.exports.ResizableBox=Rg.default;const $B={search:"search-table-module_search_17add",table:"search-table-module_table_5f652"},YB=e=>{const{onResize:r,width:t,resizeable:i,...l}=e;return!t||!i?Q("th",{...l}):Q(VB,{width:t||200,height:0,onResize:r,draggableOpts:{enableUserSelectHack:!1},children:Q("th",{...l})})};function qB(e){const{tableProps:r={},searchProps:t,langId:i}=e,{minColumnWidth:l=200,resizeable:f=!1,tableId:c,storageKey:p="szld_table_cell_width",emptyText:g,...d}=r,[m,C]=q.useState(r.columns||[]),b=D=>{var A,S;let T=D.width||l;if(D.dataIndex&&c){const O=Array.isArray(D.dataIndex)?D.dataIndex.join("-"):String(D.dataIndex),P=(S=(A=Ub(p))==null?void 0:A[c])==null?void 0:S[O];P&&(T=P)}return T};q.useEffect(()=>{const D=r.columns||[];if(D.length===0||!f){C(D);return}const T=D==null?void 0:D.filter(A=>!A.hidden).map(A=>A.dataIndex?{...A,width:b(A),onHeaderCell:S=>({width:S.width,resizeable:f,onResize:(O,{size:P})=>x(S,P)})}:A);T.length>0&&(T[T.length-1].minWidth=T[T.length-1].width,T[T.length-1].width=void 0),C(T)},[r.columns,c,l,f]);const x=(D,T)=>{C(A=>{const S=A==null?void 0:A.map(O=>O.dataIndex===D.dataIndex?{...O,width:T.width}:O);if(c){const O=Ub(p)||{};O[c]=O[c]||{},S==null||S.forEach(P=>{if(P.dataIndex){const z=Array.isArray(P.dataIndex)?P.dataIndex.join("-"):String(P.dataIndex);O[c][z]=P.width}}),localStorage.setItem(p,JSON.stringify(O))}return S})},E={header:{cell:YB},...d==null?void 0:d.components},k=q.useMemo(()=>{var T;const D=A=>{let S=A.width||A.minWidth;return(!S||typeof S=="string")&&(S=l),S};return(T=m==null?void 0:m.map(A=>D(A)))==null?void 0:T.reduce((A,S)=>A+S,0)},[m,l]);return Me(nn,{children:[t&&Q(g2,{hiddenTitle:!0,...t,items:t.items}),Q(ve.Table,{scroll:{x:k},...d,components:E,columns:m,className:ts($B.table,r==null?void 0:r.className),locale:{emptyText:Q(ve.Empty,{image:ve.Empty.PRESENTED_IMAGE_SIMPLE,description:g})},pagination:typeof(r==null?void 0:r.pagination)=="boolean"?r.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:D=>i==="10001"?`共 ${D} 条`:`Total ${D} items`,...r==null?void 0:r.pagination}})]})}const GB={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},z6=q.createContext(null),KB=({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 WB(e){const{title:r,editable:t,children:i,dataIndex:l,record:f,rules:c,onChange:p,type:g="input",valueProps:d,initialValue:m,...C}=e,b=q.useRef(null),x=q.useContext(z6),E=async()=>{try{const T=await x.validateFields();p({...f,...T})}catch{}},k=()=>Q(l6,{valueType:g,valueProps:{...d,onBlur:E,onPressEnter:E},inputRef:b});let D=i;return t&&(D=Q(ve.Form.Item,{style:{margin:0},initialValue:m||Js.get(f,l),name:l,rules:c,children:k()})),Q("td",{...C,children:D})}function QB(e){const{columns:r,onChange:t,...i}=e,l={body:{row:KB,cell:WB}},f=r==null?void 0:r.map(c=>c.editable?{...c,onCell:p=>({...c,record:p,onChange:t})}:c);return Q(ve.Table,{...i,components:l,rowClassName:()=>GB.editableRow,columns:f})}const U6=e=>{const{auth:r=!0,...t}=e;return r?Q(ve.Button,{...t}):null},ZB=e=>{const{PId:r,auths:t,...i}=e,l=q.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})},Wh={wrapper:"LoopSlide-module_wrapper_dde90",container:"LoopSlide-module_container_be123",scrollContent:"LoopSlide-module_scrollContent_36ed7",content:"LoopSlide-module_content_f392a"},XB=({speed:e=10,delay:r=1,timingFunction:t="linear",className:i="",style:l,children:f,height:c="100vh",mouseControl:p=!1,classes:g})=>{const d=q.useRef(null),m=q.useRef(null),C=q.useRef(null),b=q.useRef(null),x=q.useRef(0),E=q.useRef(),k=q.useRef(0),D=q.useMemo(()=>{if(!m.current||!C.current)return;const N=m.current,U=C.current,$=parseFloat(U.scrollHeight.toString());return $*2-N.clientHeight<$},[]),T=()=>{if(!m.current||!C.current)return;const N=m.current,U=C.current,$=parseFloat(U.scrollHeight.toString());if($*2<=N.clientHeight){N.style.animation="none";return}const F=$/N.clientHeight;N.style.setProperty("--content-height",`${$}px`),N.style.animationDuration=`${e*F}s`,N.style.animationDelay=`${r}s`,N.style.animationTimingFunction=t};q.useEffect(()=>(T(),m.current&&(b.current=new ResizeObserver(T),b.current.observe(m.current)),()=>{b.current&&m.current&&b.current.unobserve(m.current)}),[e,r]);const A=()=>{p&&m.current&&(m.current.style.animationPlayState="paused")},S=()=>{p&&m.current&&(z(),m.current.style.animationPlayState="running")},O=()=>{if(!m.current||!p)return;const U=m.current.getAnimations()[0];if(U)if(Math.abs(x.current)>.1){const $=performance.now(),F=$-k.current;k.current=$;const L=.95;x.current*=Math.pow(L,F/16);const I=U.currentTime||0;U.currentTime=I+x.current,E.current=requestAnimationFrame(O)}else x.current=0,z()},P=N=>{if(!p||!m.current)return;N.preventDefault();const U=N.deltaY,$=.25;x.current+=U*$;const F=50;x.current=Math.max(-F,Math.min(F,x.current)),E.current||(k.current=performance.now(),E.current=requestAnimationFrame(O))},z=()=>{E.current&&(cancelAnimationFrame(E.current),E.current=void 0)};return q.useEffect(()=>()=>{z()},[]),q.useEffect(()=>{const N=d.current;if(N)return p&&N.addEventListener("wheel",P,{passive:!1}),()=>{N.removeEventListener("wheel",P)}},[p]),Q("div",{ref:d,className:`${Wh.wrapper} ${i}`,style:{height:c,...l},onMouseEnter:A,onMouseLeave:S,children:Me("div",{ref:m,className:ts(Wh.container,g==null?void 0:g.container),children:[Q("div",{ref:C,className:ts(Wh.content,g==null?void 0:g.content),children:f}),Q("div",{className:ts(Wh.content,g==null?void 0:g.content),children:f}),D&&Q("div",{className:ts(Wh.content,g==null?void 0:g.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]=q.useState(!1),p=q.useMemo(()=>e.currentIndex!==void 0?e.currentIndex:!t||r.length===0?0:r.findIndex(C=>C.PNId===t),[t,r]),g=q.useMemo(()=>p>1?f?0:p-1:0,[p,f]),d=()=>{c(!0)};return Me("ul",{className:Pr.main,children:[p>1&&!f&&Me("li",{className:ts(Pr.item,Pr.itemDone),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Q("div",{className:Pr.content,children:Me("div",{className:Pr.collpase,children:[Me("div",{children:["已收起",Q("span",{children:p-1}),"个节点"]}),Me("a",{className:Pr.btn,onClick:d,children:["展开节点",Q(R7,{})]})]})})]}),r.slice(g).map((m,C)=>Me("li",{className:ts(Pr.item,p===C+g?Pr.itemActive:p>C+g?Pr.itemDone:Pr.itemUnDo),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Me("div",{className:Pr.content,children:[l?l(m,C,f?p:p-g):Me(nn,{children:[Q("div",{className:Pr.title,children:m.PNName}),Me("div",{className:Pr.dateWrapper,children:[m.PlanFinishDate&&Me("span",{children:["预计完成时间: ",m.PlanFinishDate]}),m.UpdateTime&&Me("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",m.UpdateTime]})]}),m.Remark&&Q("div",{className:Pr.remark,children:m.Remark})]}),f&&p-1===C&&Me("a",{className:Pr.btn,onClick:()=>c(!1),children:["收起节点 ",Q(Z7,{})]})]})]},typeof i=="string"?m[i]:i(m)))]})},JB=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 eL(e){const{totalText:r="共",unitText:t="条",jumpText:i="跳至",pageText:l="页",paginationProps:f}=e,[c,p]=q.useState(""),g=(f==null?void 0:f.pageSize)||10,d=b=>{p(b.target.value)},m=b=>{var x;p(""),!Number.isNaN(Number(b.target.value))&&((x=f==null?void 0:f.onChange)==null||x.call(f,Number(b.target.value),g))},C=b=>{var x;if(b.key==="Enter"){if(p(""),Number.isNaN(Number(c)))return;(x=f==null?void 0:f.onChange)==null||x.call(f,Number(c),g)}};return Me("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}),Me("div",{className:I6.jumpBtns,children:[i,Q(ve.Input,{style:{width:"50px",margin:"0 8px"},value:c,onChange:d,onBlur:b=>m(b),onKeyDown:b=>C(b)}),l]})]})}var H6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Bt,function(){var t=1e3,i=6e4,l=36e5,f="millisecond",c="second",p="minute",g="hour",d="day",m="week",C="month",b="quarter",x="year",E="date",k="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,A={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(W){var Z=["th","st","nd","rd"],X=W%100;return"["+W+(Z[(X-20)%10]||Z[X]||Z[0])+"]"}},S=function(W,Z,X){var re=String(W);return!re||re.length>=Z?W:""+Array(Z+1-re.length).join(X)+W},O={s:S,z:function(W){var Z=-W.utcOffset(),X=Math.abs(Z),re=Math.floor(X/60),K=X%60;return(Z<=0?"+":"-")+S(re,2,"0")+":"+S(K,2,"0")},m:function W(Z,X){if(Z.date()<X.date())return-W(X,Z);var re=12*(X.year()-Z.year())+(X.month()-Z.month()),K=Z.clone().add(re,C),te=X-K<0,G=Z.clone().add(re+(te?-1:1),C);return+(-(re+(X-K)/(te?K-G:G-K))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:C,y:x,w:m,d,D:E,h:g,m:p,s:c,ms:f,Q:b}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},P="en",z={};z[P]=A;var N="$isDayjsObject",U=function(W){return W instanceof I||!(!W||!W[N])},$=function W(Z,X,re){var K;if(!Z)return P;if(typeof Z=="string"){var te=Z.toLowerCase();z[te]&&(K=te),X&&(z[te]=X,K=te);var G=Z.split("-");if(!K&&G.length>1)return W(G[0])}else{var V=Z.name;z[V]=Z,K=V}return!re&&K&&(P=K),K||!re&&P},F=function(W,Z){if(U(W))return W.clone();var X=typeof Z=="object"?Z:{};return X.date=W,X.args=arguments,new I(X)},L=O;L.l=$,L.i=U,L.w=function(W,Z){return F(W,{locale:Z.$L,utc:Z.$u,x:Z.$x,$offset:Z.$offset})};var I=function(){function W(X){this.$L=$(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[N]=!0}var Z=W.prototype;return Z.parse=function(X){this.$d=function(re){var K=re.date,te=re.utc;if(K===null)return new Date(NaN);if(L.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var G=K.match(D);if(G){var V=G[2]-1||0,ee=(G[7]||"0").substring(0,3);return te?new Date(Date.UTC(G[1],V,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ee)):new Date(G[1],V,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ee)}}return new Date(K)}(X),this.init()},Z.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()},Z.$utils=function(){return L},Z.isValid=function(){return this.$d.toString()!==k},Z.isSame=function(X,re){var K=F(X);return this.startOf(re)<=K&&K<=this.endOf(re)},Z.isAfter=function(X,re){return F(X)<this.startOf(re)},Z.isBefore=function(X,re){return this.endOf(re)<F(X)},Z.$g=function(X,re,K){return L.u(X)?this[re]:this.set(K,X)},Z.unix=function(){return Math.floor(this.valueOf()/1e3)},Z.valueOf=function(){return this.$d.getTime()},Z.startOf=function(X,re){var K=this,te=!!L.u(re)||re,G=L.p(X),V=function(Ne,Te){var tt=L.w(K.$u?Date.UTC(K.$y,Te,Ne):new Date(K.$y,Te,Ne),K);return te?tt:tt.endOf(d)},ee=function(Ne,Te){return L.w(K.toDate()[Ne].apply(K.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(Te)),K)},ie=this.$W,ae=this.$M,pe=this.$D,xe="set"+(this.$u?"UTC":"");switch(G){case x:return te?V(1,0):V(31,11);case C:return te?V(1,ae):V(0,ae+1);case m:var Ee=this.$locale().weekStart||0,se=(ie<Ee?ie+7:ie)-Ee;return V(te?pe-se:pe+(6-se),ae);case d:case E:return ee(xe+"Hours",0);case g:return ee(xe+"Minutes",1);case p:return ee(xe+"Seconds",2);case c:return ee(xe+"Milliseconds",3);default:return this.clone()}},Z.endOf=function(X){return this.startOf(X,!1)},Z.$set=function(X,re){var K,te=L.p(X),G="set"+(this.$u?"UTC":""),V=(K={},K[d]=G+"Date",K[E]=G+"Date",K[C]=G+"Month",K[x]=G+"FullYear",K[g]=G+"Hours",K[p]=G+"Minutes",K[c]=G+"Seconds",K[f]=G+"Milliseconds",K)[te],ee=te===d?this.$D+(re-this.$W):re;if(te===C||te===x){var ie=this.clone().set(E,1);ie.$d[V](ee),ie.init(),this.$d=ie.set(E,Math.min(this.$D,ie.daysInMonth())).$d}else V&&this.$d[V](ee);return this.init(),this},Z.set=function(X,re){return this.clone().$set(X,re)},Z.get=function(X){return this[L.p(X)]()},Z.add=function(X,re){var K,te=this;X=Number(X);var G=L.p(re),V=function(ae){var pe=F(te);return L.w(pe.date(pe.date()+Math.round(ae*X)),te)};if(G===C)return this.set(C,this.$M+X);if(G===x)return this.set(x,this.$y+X);if(G===d)return V(1);if(G===m)return V(7);var ee=(K={},K[p]=i,K[g]=l,K[c]=t,K)[G]||1,ie=this.$d.getTime()+X*ee;return L.w(ie,this)},Z.subtract=function(X,re){return this.add(-1*X,re)},Z.format=function(X){var re=this,K=this.$locale();if(!this.isValid())return K.invalidDate||k;var te=X||"YYYY-MM-DDTHH:mm:ssZ",G=L.z(this),V=this.$H,ee=this.$m,ie=this.$M,ae=K.weekdays,pe=K.months,xe=K.meridiem,Ee=function(Te,tt,Se,lt){return Te&&(Te[tt]||Te(re,te))||Se[tt].slice(0,lt)},se=function(Te){return L.s(V%12||12,Te,"0")},Ne=xe||function(Te,tt,Se){var lt=Te<12?"AM":"PM";return Se?lt.toLowerCase():lt};return te.replace(T,function(Te,tt){return tt||function(Se){switch(Se){case"YY":return String(re.$y).slice(-2);case"YYYY":return L.s(re.$y,4,"0");case"M":return ie+1;case"MM":return L.s(ie+1,2,"0");case"MMM":return Ee(K.monthsShort,ie,pe,3);case"MMMM":return Ee(pe,ie);case"D":return re.$D;case"DD":return L.s(re.$D,2,"0");case"d":return String(re.$W);case"dd":return Ee(K.weekdaysMin,re.$W,ae,2);case"ddd":return Ee(K.weekdaysShort,re.$W,ae,3);case"dddd":return ae[re.$W];case"H":return String(V);case"HH":return L.s(V,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return Ne(V,ee,!0);case"A":return Ne(V,ee,!1);case"m":return String(ee);case"mm":return L.s(ee,2,"0");case"s":return String(re.$s);case"ss":return L.s(re.$s,2,"0");case"SSS":return L.s(re.$ms,3,"0");case"Z":return G}return null}(Te)||G.replace(":","")})},Z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Z.diff=function(X,re,K){var te,G=this,V=L.p(re),ee=F(X),ie=(ee.utcOffset()-this.utcOffset())*i,ae=this-ee,pe=function(){return L.m(G,ee)};switch(V){case x:te=pe()/12;break;case C:te=pe();break;case b:te=pe()/3;break;case m:te=(ae-ie)/6048e5;break;case d:te=(ae-ie)/864e5;break;case g:te=ae/l;break;case p:te=ae/i;break;case c:te=ae/t;break;default:te=ae}return K?te:L.a(te)},Z.daysInMonth=function(){return this.endOf(C).$D},Z.$locale=function(){return z[this.$L]},Z.locale=function(X,re){if(!X)return this.$L;var K=this.clone(),te=$(X,re,!0);return te&&(K.$L=te),K},Z.clone=function(){return L.w(this.$d,this)},Z.toDate=function(){return new Date(this.valueOf())},Z.toJSON=function(){return this.isValid()?this.toISOString():null},Z.toISOString=function(){return this.$d.toISOString()},Z.toString=function(){return this.$d.toUTCString()},W}(),H=I.prototype;return F.prototype=H,[["$ms",f],["$s",c],["$m",p],["$H",g],["$W",d],["$M",C],["$y",x],["$D",E]].forEach(function(W){H[W[1]]=function(Z){return this.$g(Z,W[0],W[1])}}),F.extend=function(W,Z){return W.$i||(W(Z,I,F),W.$i=!0),F},F.locale=$,F.isDayjs=U,F.unix=function(W){return F(1e3*W)},F.en=z[P],F.Ls=z,F.p={},F})})(H6);const yn=H6.exports,Qh=(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(p=>p)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>yn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).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(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=tL(e.children||[])),t||null},V6=e=>e&&e<yn().startOf("day"),$6=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},tL=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)},su=(e,r)=>{const t=e.find(i=>(i==null?void 0:i.dataid)===r);return(t==null?void 0:t.content)??r},I2=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:p})=>{var C;let g=[];const d=async b=>{var E;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(E=k==null?void 0:k.data)!=null&&E.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(D=>({label:`${D.dicid||""}-${D.info||""}`,value:`${D.dicid||""}-${D.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},m=async()=>{var b,x;try{const E=((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)||"",D=c==null?void 0:c["field-names"];if(!E.length){ve.message.error("请配置key-field");return}const T=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(T!=null&&T.data){const A=T==null?void 0:T.data,S=(A==null?void 0:A.list)||[];let O=[];Array.isArray(A)&&(O=A),Array.isArray(S)&&(O=S),D?g=O:g=O.map(P=>({label:$6(P,k,E),value:$6(P,k,E)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(g=((C=c.data)==null?void 0:C.map(b=>({label:su(p||[],b),value:b})))||[],c.options&&Array.isArray(c.options)&&(g=c.options)):c.inputType==="dictionary"?g=await d(t):c.inputType==="system-dictionary"&&(g=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await m(),g};function uu(e){try{return JSON.parse(e)}catch{return{}}}function Zh(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 nL=(e,r)=>{var C;let t=Js.cloneDeep(e);const{attr_list:i=[]}=t,{isMobile:l=!1,guid:f,isListToObj:c=!1,isAutoFill:p=!0}=e;let g=[];p&&((C=t==null?void 0:t.attr_list)==null||C.forEach(b=>{var x,E,k,D,T,A;(x=b==null?void 0:b.json)!=null&&x["auto-generate"]&&((E=b==null?void 0:b.json)!=null&&E["auto-generate-type"])&&(((k=b==null?void 0:b.json)==null?void 0:k["auto-generate-type"])==="currenttime"&&(b.attrvalue=yn().format("YYYY-MM-DD HH:mm:ss")),((D=b==null?void 0:b.json)==null?void 0:D["auto-generate-type"])==="guid"&&(b.attrvalue=f||"")),(T=b==null?void 0:b.json)!=null&&T.default&&(b.attrvalue=(A=b==null?void 0:b.json)==null?void 0:A.default)}));const d=(b,x)=>{try{const E=new Map(b.map((k,D)=>[k.attrid,D]));for(const[k,D]of Object.entries(x)){const T=E.get(k);if(T===void 0)continue;let A=b[T];if(!D&&D!==0){A.attrvalue="";continue}A=m(A,D,l)}b.forEach(k=>{k.children&&Array.isArray(k.children)&&k.children.length>0&&!Array.isArray(k.children[0])&&x[k.attrid]&&d(k.children,x[k.attrid]),k.children&&Array.isArray(k.children)&&k.children.length>0&&Array.isArray(k.children[0])&&k.children.forEach((D,T)=>{var A,S;D&&Array.isArray(D)&&((A=x==null?void 0:x[k.attrid])!=null&&A[T])&&d(D,(S=x==null?void 0:x[k.attrid])==null?void 0:S[T])})})}catch{}},m=(b,x,E)=>{var T,A,S,O;const k=(T=b.json)==null?void 0:T.input,D=(A=b.json)==null?void 0:A.format;switch(k){case"image":case"file":case"video":case"audio":const P=typeof x=="string"?JSON.parse(x):x;if(!Array.isArray(P)){b.attrvalue=JSON.stringify([]);return}const z=P.filter($=>$.FileId),N=P.filter($=>{var F;return $.status==="done"&&((F=$.response)==null?void 0:F.data)}).map($=>$.response.data),U=[...z,...N];g=[...g,...N],b.attrvalue=JSON.stringify(U);break;case"cascader":if(Array.isArray(x)&&x.length>0){const $=((S=b.json)==null?void 0:S["cascader-delimiter"])||"/";b.attrvalue=x.join($)}else b.attrvalue="";break;case"range-picker":E?Array.isArray(x)&&x.length>0?b.attrvalue=x==null?void 0:x.map($=>yn($).format(D||"YYYY-MM-DD")).join("~"):b.attrvalue="":Array.isArray(x)&&x.length>0?b.attrvalue=x.join("~"):b.attrvalue="";break;case"multiple-date-picker":E?Array.isArray(x)&&x.length>0?b.attrvalue=x==null?void 0:x.map($=>yn($).format(D||"YYYY-MM-DD")).join(","):b.attrvalue=x:Array.isArray(x)&&x.length>0?b.attrvalue=x.join(","):b.attrvalue=x;break;case"checkbox":case"mult-select":Array.isArray(x)&&x.length>0?b.attrvalue=x.join(","):b.attrvalue=x;break;case"date-picker":x?b.attrvalue=yn(x).format(D||"YYYY-MM-DD"):b.attrvalue="";break;case"time-picker":x?b.attrvalue=yn(x).format(D||"YYYY-MM-DD HH:mm:ss"):b.attrvalue="";break;default:(O=b==null?void 0:b.json)!=null&&O["properties-multiple"]||(b.attrvalue=x);break}return b};return t.attr_list&&Array.isArray(t.attr_list)&&d(i,r),{updatedData:c?W6(t.attr_list||[]):t,uploadedFiles:g}},H2=(e,r)=>e.map(t=>{var f,c,p;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 g=(p=i==null?void 0:i.children)==null?void 0:p.map(d=>d==null?void 0:d.map(m=>q6(m)));i.children=g}return i}),q6=(e,r)=>{if(!e.json&&e.info)try{const t=e.info_base64===1?Zh(e.info):e.info,i=uu(t);return{...e,json:i,...r}}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 p;return(p=c.json)==null?void 0:p.combination}).reduce((c,p)=>{const g=p.json["combination-id"];return g&&(c[g]||(c[g]=[]),c[g].push(p)),c},{}),l=new Set;Object.values(i).forEach(c=>{(c==null?void 0:c.length)!==0&&c.slice(1).forEach(p=>l.add(p.attrid))});const f=c=>c.filter(p=>!l.has(p.attrid)).map(p=>{var m;const g=(m=p.json)==null?void 0:m["combination-id"];if(g&&i[g]){const C={...p,json:{...p.json,combinations:i[g]}},{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}=p;return d&&Array.isArray(d==null?void 0:d[0])&&(d!=null&&d.length)&&(p.children=d==null?void 0:d.map(C=>f(C))),p});return f(t)},rL=async({number:e,key:r,sourceNumber:t,guidInterfaceName:i,SelPCParamInterfaceName:l,servicerAttrListInterfaceName:f,accepterAttrListInterfaceName:c,defaultAttrListInterfaceName:p,commonRequest:g,guidParams:d,pcParam:m,attrReqKey:C="asid",attrListExtraParams:b={}})=>new Promise(async(x,E)=>{var P,z,N,U;let k="",D=[],T={},A={};const S=await g(i||"FWDXGLCreateGUID",d||{"source-number":t});(S==null?void 0:S.ReturnValue)===1&&((P=S==null?void 0:S.data)!=null&&P.GUID)?k=S.data.GUID:E("获取GUID失败");const O=await g(l||"FWDXGLSelPCParam",m||{"source-number":t});if((O==null?void 0:O.ReturnValue)===1){const $=(z=O.data[e])==null?void 0:z[r],F=(N=O.data[e])==null?void 0:N["properties-type"],L={server:f||"",accepter:c||""};A=O.data;const I=await g(L[F]||p,{[C]:$,"source-number":t,...b});if((I==null?void 0:I.ReturnValue)===1&&I.data){const H=((U=I.data)==null?void 0:U.attr_list)||[];D=K6(H),T={...I.data,attr_list:D},x({baseData:T,newGUID:k,attrListConfigs:D,selPCParam:A})}else E("请配置属性集")}else E("获取配置失败")}),aL=async(e,r,t)=>await t(e,r);function iL(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(p=>{var d,m,C,b;const g=`${p.attrid}_${p.attrtype}`;if(p.attrtype===1&&p.children.length>0&&!Array.isArray(p.children))c[g]={asid:((m=(d=p.children)==null?void 0:d[0])==null?void 0:m.asid)||"",data_list:[r(p.children)]};else if(p.attrtype===1&&p.children.length>0&&Array.isArray(p.children)){let{children:x=[],attrvalue:E}=p||{};E&&(E!=null&&E.length)&&Array.isArray(E)?x=E.map(k=>{var A,S,O,P;const D=(A=Object.values(k))==null?void 0:A.findIndex(z=>Array.isArray(z)),T=((S=Object.keys(k))==null?void 0:S[D])||"";if(T){const z=((O=x==null?void 0:x[0])==null?void 0:O.find(U=>U.attrid===T))||{},{input:N}=(z==null?void 0:z.json)||{};if(["file","image","video","audio"].includes(N)){const U=((P=Object.values(k))==null?void 0:P[D])||[],$=U.filter(I=>I.FileId),F=U.filter(I=>{var H;return I.status==="done"&&((H=I.response)==null?void 0:H.data)}).map(I=>I.response.data),L=[...$,...F];k[T]=L}}return X6((x==null?void 0:x[0])||[],k)}):x=[],x!=null&&x.length&&Array.isArray(x==null?void 0:x[0])&&(c[g]={asid:((b=(C=x==null?void 0:x[0])==null?void 0:C[0])==null?void 0:b.asid)||"",data_list:x.map(k=>r(k))})}else c[g]=p.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 p;const l=await i("YLFWLRDataDetails",r),f=((p=l==null?void 0:l.data)==null?void 0:p.list)||[];return f.length?await Promise.all(f.map(async g=>await Promise.all((e==null?void 0:e.map(async m=>{const C={...m,...t};if(C.attrvalue=(g==null?void 0:g[m.attrid])||"",m.attrtype===1&&Array.isArray(m.children)&&m.children.length>0){const b=(g==null?void 0:g[m.attrid])||{};C.children=await Q6({attrList:m.children,params:b,extra:t,commonRequest:i})}return C}))||[])))||[]:e.map(g=>({...g,...t,attrvalue:"",children:[]}))},kc=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},oL=(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:p})=>{var C;let g=[];const d=async b=>{var E;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(E=k==null?void 0:k.data)!=null&&E.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(D=>({label:`${D.dicid||""}-${D.info||""}`,value:`${D.dicid||""}-${D.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},m=async()=>{var b,x;try{const E=((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)||"",D=c==null?void 0:c["field-names"];if(!E.length){ve.message.error("请配置key-field");return}const T=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(T!=null&&T.data){const A=T==null?void 0:T.data,S=(A==null?void 0:A.list)||[];let O=[];Array.isArray(A)&&(O=A),Array.isArray(S)&&(O=S),D?g=O:g=O.map(P=>({label:kc(P,k,E),value:kc(P,k,E)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(g=((C=c.data)==null?void 0:C.map(b=>({label:b,value:b})))||[],c.options&&Array.isArray(c.options)&&(g=c.options)):c.inputType==="dictionary"?g=await d(t):c.inputType==="system-dictionary"&&(g=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await m(),g},X6=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),lL=Object.freeze(Object.defineProperty({__proto__:null,getJson:uu,base64ToString:Zh,isBase64:Y6,handleSubmitForm:nL,handleBaseAttrList:G6,handleAttrList:K6,handleFormConfig:rL,handleOperationFile:aL,handleKebabToCamel:iL,handleAttrListToObj:W6,handleAttrListToObjDetail:Q6,handleUrlOptions:kc,getTitle:oL,handleSelectOptions:Z6,handleObjDetailToSignleAttrList:X6},Symbol.toStringTag,{value:"Module"}));function sL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,attrid:c,form:p,langId:g}=e,d=ve.Form.useWatch(c,p),{message:m}=ve.App.useApp(),C=r.input,[b,x]=q.useState(e.value),[E,k]=q.useState(!1),[D,T]=q.useState([]),[A,S]=q.useState([]),[O,P]=q.useState(!1),[z,N]=q.useState({PageNum:1,PageSize:6}),[U,$]=q.useState([]),[F,L]=q.useState(0),I=K();q.useEffect(()=>{E&&W()},[E,z]);const H=(G,V)=>{T(G),S(V)},W=async()=>{var G;if(r.inputType==="url"&&(r!=null&&r["action-url"])){P(!0);try{const V=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...z,...(r==null?void 0:r["action-url-extra-params"])||{}});if((V==null?void 0:V.ReturnValue)===0){m.error(V.msg),P(!1);return}const ee=V==null?void 0:V.data,ie=(G=ee==null?void 0:ee.list)==null?void 0:G.map((pe,xe)=>{const Ee=(z.PageNum-1)*z.PageSize+xe;return{...pe,_rowKey:Ee}}),ae=(ie==null?void 0:ie.filter(pe=>D.includes(pe._rowKey)))||[];S(ae),$([...ie||[]]),L((ee==null?void 0:ee.number)||0),P(!1)}catch{P(!1)}return}m.error(g==="10001"?"参数配置错误":"Parameter configuration error")},Z=()=>{var G;if(!t){if(b){const V=r==null?void 0:r["key-field"],ee=V==null?void 0:V[c],{delimiter:ie="-",list:ae=[]}=ee||{};if(!V){m.error(g==="10001"?"请配置key-field":"Please configure key-field");return}switch(C){case"mul-field-modal-select":const pe=(G=b==null?void 0:b.split(ie))==null?void 0:G[0],xe=U==null?void 0:U.findIndex(Ne=>Object.values(Ne).includes(pe));T([xe]);break;case"modal-mult-select":const Ee=b==null?void 0:b.split(","),se=Ee==null?void 0:Ee.map(Ne=>{var tt;const Te=(tt=Ne.split(ie))==null?void 0:tt[0];return U==null?void 0:U.findIndex(Se=>Te.includes((Se==null?void 0:Se.typeid)||(Se==null?void 0:Se.instanceid)))});T(se);break}}k(!0)}},X=async()=>{try{const G=await uL(A,r,g);x((G==null?void 0:G[c])||""),e.onSure(G),k(!1)}catch(G){m.error(G.msg||"参数错误")}},re=()=>{N({...z,PageNum:1}),k(!1)};function K(){const G=r["modal-field-list"];let V=[];for(let ee in G){let ie=G[ee];const ae={dataIndex:ee,title:ie};V=[...V,ae]}return V}const te=G=>{N({...z,PageNum:G})};return Me(nn,{children:[Q(ve.Select,{placeholder:Qh({json:r}),onClick:Z,open:!1,value:d,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:E,onOk:X,onCancel:re,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:I,loading:O,dataSource:U,rowKey:G=>G._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:H},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:te}})})||Q(ve.Modal,{title:r["modal-caption"],open:E,onOk:X,onCancel:re,width:r["modal-width"]??600,okButtonProps:{disabled:D.length===0},children:Q(ve.Table,{columns:I,loading:O,dataSource:U,rowKey:G=>G._rowKey,rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:H},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:te}})})]})}function uL(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(p=>{for(let[g,d]of Object.entries(f)){const m=(d==null?void 0:d.list)??[],C=(d==null?void 0:d.delimiter)??"-",b=m.map(x=>p==null?void 0:p[x]);c[g]=b.join(C)}}),i(c)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}var J6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Bt,function(){var t="day";return function(i,l,f){var c=function(d){return d.add(4-d.isoWeekday(),t)},p=l.prototype;p.isoWeekYear=function(){return c(this).year()},p.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),t);var m,C,b,x,E=c(this),k=(m=this.isoWeekYear(),C=this.$u,b=(C?f.utc:f)().year(m).startOf("year"),x=4-b.isoWeekday(),b.isoWeekday()>4&&(x+=7),b.add(x,t));return E.diff(k,"week")+1},p.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var g=p.startOf;p.startOf=function(d,m){var C=this.$utils(),b=!!C.u(m)||m;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"):g.bind(this)(d,m)}}})})(J6);const eD=J6.exports;function cL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=ve.App.useApp(),g=r.input,[d,m]=q.useState(e.value),[C,b]=q.useState(!1),[x,E]=q.useState([]),[k,D]=q.useState([]),[T,A]=q.useState(!1),[S,O]=q.useState({PageNum:1,PageSize:6}),[P,z]=q.useState([]),[N,U]=q.useState(0),$=Z();q.useEffect(()=>{C&&L()},[C,S]);const F=(re,K)=>{E(re),D(K)},L=async()=>{var re;if(r.inputType==="url"&&(r!=null&&r["action-url"])){A(!0);try{const K=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...S});if((K==null?void 0:K.ReturnValue)===0){p.error(K.msg),A(!1);return}const te=K==null?void 0:K.data,G=(re=te==null?void 0:te.list)==null?void 0:re.map((ee,ie)=>{const ae=(S.PageNum-1)*S.PageSize+ie;return{...ee,_rowKey:ae}}),V=(G==null?void 0:G.filter(ee=>x.includes(ee._rowKey)))||[];D(V),z([...G||[]]),U((te==null?void 0:te.number)||0),A(!1)}catch(K){A(!1),p.error(K.msg||"参数错误")}return}p.error("请配置action-url")},I=()=>{var re,K;if(!t){if(d){const te=((re=r==null?void 0:r["key-field"])==null?void 0:re.list)??[],G=((K=r==null?void 0:r["key-field"])==null?void 0:K.delimiter)??"-";if(!te.length){p.error("请配置key-field");return}switch(g){case"modal-select":const V=d==null?void 0:d.split("-"),ee=P==null?void 0:P.findIndex(pe=>V.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));E([ee]);break;case"modal-mult-select":const ie=d==null?void 0:d.split(","),ae=ie==null?void 0:ie.map(pe=>{var Ee;const xe=(Ee=pe.split(G))==null?void 0:Ee[0];return P==null?void 0:P.findIndex(se=>xe.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)))});E(ae);break}}b(!0)}},H=async()=>{try{const re=await fL(k,r,c);m(re),e.onSure(re),b(!1)}catch(re){p.error(re.msg||"参数错误")}},W=()=>{O({...S,PageNum:1}),b(!1)};function Z(){const re=r["modal-field-list"];let K=[];for(let te in re){let G=re[te];const V={dataIndex:te,title:G};K=[...K,V]}return K}const X=re=>{O({...S,PageNum:re})};return Me(nn,{children:[Q(ve.Select,{placeholder:Qh({json:r},c),onClick:I,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:W,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:$,loading:T,dataSource:P,rowKey:re=>re._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:N,current:S.PageNum,pageSize:S.PageSize,onChange:X}})})||Q(ve.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:W,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(ve.Table,{columns:$,loading:T,dataSource:P,rowKey:re=>re._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:N,current:S.PageNum,pageSize:S.PageSize,onChange:X}})})]})}function fL(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 p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}const dL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langConfig:E}=e,[k,D]=q.useState([]),[T,A]=q.useState(d||[]);q.useEffect(()=>{S()},[r.inputType,r.classify,r.data,r.options]);const S=async()=>{const O=await I2({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,item:r,langConfig:E||[]});D(O)};return Q(ve.Checkbox.Group,{...l,options:k,value:T,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:O=>{A(O),t==null||t(O)},disabled:i})},hL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C="10001"})=>{const[b,x]=q.useState([]),[E,k]=q.useState(!1),{message:D}=ve.App.useApp();q.useEffect(()=>{T()},[e.inputType,e.classify,e.data,e.options]);const T=async()=>{if(e.inputType==="local"){let N=[];e.data&&Array.isArray(e.data)?N=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(N=e.options),x(N)}else if(e.inputType==="dictionary")await A(g);else if(e.inputType==="system-dictionary")A(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const N=await O();N&&Array.isArray(N)&&x(N)}else{let N=[];e.data&&Array.isArray(e.data)?N=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(N=e.options),x(N)}},A=async N=>{var U;if(e.classify){k(!0);try{const $=await c(N,{asctypeid:e.classify});if((U=$==null?void 0:$.data)!=null&&U.list&&Array.isArray($.data.list)){const F=$.data.list.map(L=>({label:`${L.dicid||""}-${L.info||""}`,value:`${L.dicid||""}-${L.info||""}`}));x(F)}}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},S=(N,U)=>{i&&i(N)},O=async N=>new Promise(async(U,$)=>{var W,Z,X;const F=((W=e==null?void 0:e["key-field"])==null?void 0:W.list)||[],L=(e==null?void 0:e["search-field"])||[],I=((Z=e==null?void 0:e["key-field"])==null?void 0:Z.delimiter)||"-";if(!F.length){D.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...m};N&&(L.forEach(re=>{H[re]=N[re]||""}),H.level=Number(N.level||0)+1||""),k(!0);try{const re=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((X=re==null?void 0:re.data)!=null&&X.list&&Array.isArray(re.data.list)){const K=re.data.list.map(te=>({...te,label:`${te[F[0]]||""}${I}${te[F[1]]||""}`,value:`${te[F[0]]||""}${I}${te[F[1]]||""}`,children:[],isLeaf:(te==null?void 0:te.subcount)===0}));U(K)}$([])}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options"),$([])}finally{$([]),k(!1)}}),P=async N=>{const U=N[N.length-1],$=await O(U)||[];return U.children=$,x([...b]),$},z=(N,U)=>U.some($=>$.label.toLowerCase().includes(N.toLowerCase()));return Q(ve.Cascader,{showSearch:{filter:z},loading:E,placeholder:"请选择",loadData:P,disabled:r,onChange:S,style:{...l},options:b,value:t,onOpenChange:async N=>{var U;if(N&&(t!=null&&t.length)){const $=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],F=(e==null?void 0:e["search-field"])||[];if(!$.length||!F.length){D.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const L=$.findIndex(W=>W===F[0]);if(L===-1){D.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const I=t.map(W=>W.split("-")[L]||"").filter(Boolean);let H=b;for(const[W,Z]of I.entries()){if(W===I.length-1)break;const X=H.filter(te=>te[F[0]]===Z);if(X.length===0)break;const re=X[0];if(re.children&&re.children.length>0){H=re.children;continue}H=await P(X)}}}})},pL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,langId:c})=>{const[p,g]=q.useState([]),[d,m]=q.useState(!1);q.useEffect(()=>{(async()=>{var S;if(e.inputType==="url"&&e["action-url"]){m(!0);try{const O=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(S=O==null?void 0:O.data)!=null&&S.list&&Array.isArray(O.data.list)?g(O.data.list):O!=null&&O.data&&Array.isArray(O.data)?g(O.data):Array.isArray(O==null?void 0:O.list)?g(O.list):(O==null?void 0:O.ReturnValue)===1&&(O!=null&&O.data)&&(Array.isArray(O.data)?g(O.data):g([O.data]))}catch{}finally{m(!1)}}else e.data&&Array.isArray(e.data)&&g(e.data)})()},[e.inputType,e["action-url"],e.data]);const C=A=>JSON.stringify(A),b=A=>{const S=C(A);return t===S},x=A=>{if(r)return;const S=C(A);i&&i(S)},E=e["card-image-width"]||200,k=e["card-image-height"]||100,D=e["card-image-field"],T=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:p.map((A,S)=>{const O=b(A);return Me("div",{onClick:()=>x(A),style:{flex:"1 1 auto",width:`${E}px`,padding:"12px 0",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[A[D]&&Q("img",{src:A.picurl,alt:A[T]||"",style:{width:`${E}px`,height:`${k}px`,objectFit:"cover",borderRadius:"8px",marginBottom:"8px"},onError:P=>{P.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Me(ve.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:O?"none":"1px solid #d9d9d9",backgroundColor:O?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:O&&Q(f8,{style:{fontSize:"12px",color:"#fff"}})}),A[T]||""]})})]},S)})})})},vL=({item:e,readonly:r,style:t,commonRequestWidthParams:i,commonRequest:l,value:f,onChange:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C,langConfig:b})=>{const[x,E]=q.useState([]),[k,D]=q.useState(!1);q.useEffect(()=>{T()},[e.inputType,e.classify,e.data,e.options]);const T=async()=>{D(!0);const A=await I2({commonRequestWidthParams:i,commonRequest:l,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,item:e,langConfig:b||[]});E(A),D(!1)};return Q(ve.Select,{placeholder:Qh({json:e},C),mode:e.input==="mult-select"?"multiple":void 0,disabled:r,loading:k,showSearch:!0,value:f,filterOption:(A,S)=>{var O;return((O=S==null?void 0:S.label)==null?void 0:O.toLowerCase().indexOf(A.toLowerCase()))>=0},options:x,style:{...t},allowClear:!0,onChange:A=>{c(A)}})},mL={customUpload:"myUpload-module_customUpload_7c7d3"},gL=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),yL=e=>{const{langId:r="10001"}=e,{action:t,item:i,onChange:l,readonly:f=!1,relatedid:c,uploadText:p=r==="10001"?"上传文件":"Upload File",onRemove:g,list:d=[],uploadType:m,relatedidKey:C}=e,{message:b}=ve.App.useApp(),x=(i==null?void 0:i["upload-accept"])||"*",E=i==null?void 0:i.input,k=i==null?void 0:i["upload-size"],D=(i==null?void 0:i["upload-max-count"])||1,[T,A]=q.useState(E==="image"?"picture-card":"text"),[S,O]=q.useState([]),[P,z]=q.useState(!1),[N,U]=q.useState("");q.useEffect(()=>{d&&d.length&&O(d)},[d]);const $=async H=>{m==="image"&&(!H.url&&!H.preview&&(H.preview=await gL(H.originFileObj)),U(H.url||H.preview),z(!0))},F=({fileList:H})=>{O(H),l&&l(H)},L=H=>{if(!k)return!0;const W=H.size/1024/1024<Number(k);return W||b.error(r==="10001"?`请上传不超过${k}MB的文件`:`Please upload files smaller than ${k}MB`),W},I=E==="image"?Me("button",{style:{border:0,background:"none"},type:"button",children:[Q(Fb,{}),Q("div",{style:{marginTop:8},children:"Upload"})]}):Q(nn,{children:Q(ve.Button,{style:{fontSize:14},icon:Q(Nb,{}),children:p})});return Me(nn,{children:[Q(ve.Upload,{action:t,beforeUpload:L,listType:T,accept:x,fileList:S,onPreview:$,data:{[C]:c},maxCount:D,onChange:F,onRemove:g,disabled:f,className:mL.customUpload,children:S.length>=D?null:I}),N&&Q(ve.Image,{wrapperStyle:{display:"none"},preview:{visible:P,onVisibleChange:H=>z(H),afterOpenChange:H=>!H&&U("")},src:N})]})},xL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,value:g,interfaceTypeDict:d,interfaceTypeSysDict:m,actionUrlKey:C,actionUrlExtraParams:b,langConfig:x}=e,[E,k]=q.useState([]);q.useEffect(()=>{D()},[r.inputType,r.classify,r.data,r.options]);const D=async()=>{const T=await I2({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:d,interfaceTypeSysDict:m,actionUrlKey:C,actionUrlExtraParams:b,item:r,langConfig:x});k(T)};return Q(ve.Radio.Group,{...l,options:E,onChange:t,disabled:i,value:g,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"}})};yn.extend(eD);function bL(e){const{commonRequestWidthParams:r,uploadAction:t,commonRequest:i,formConfig:l,updateDelFileList:f,interfaceTypeDict:c,interfaceTypeSysDict:p,relatedidKey:g,actionUrlKey:d,actionUrlExtraParams:m,CustomModalComponent:C,isEdit:b,formShowType:x="form",langId:E,langConfig:k=[]}=e,D=q.useRef([]),{message:T}=ve.App.useApp();q.useEffect(()=>{l&&(D.current=l)},[l]);const A=q.useCallback(I=>Array.isArray(I)?I:(I==null?void 0:I.fileList)??[],[]),S=I=>{f(I)},O=q.useCallback(I=>{var X,re;const H=(X=I.json)==null?void 0:X.input,W=(re=I.json)==null?void 0:re.format,Z={};switch(H){case"image":case"file":case"video":case"audio":Z.getValueFromEvent=A;break;case"date-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY-MM-DD"),Z.getValueProps=K=>({value:K?yn(K):null});break;case"time-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY-MM-DD HH:mm:ss"),Z.getValueProps=K=>({value:K?yn(K):null});break;case"week-picker":Z.getValueFromEvent=K=>`${K==null?void 0:K.year()}-${yn(K).isoWeek()}周`,Z.getValueProps=K=>{if(!K)return{value:null};const[te,G]=K.split("-"),V=Number(te),ee=Number(G.replace("周",""));return{value:yn().year(V).isoWeek(ee)}};break;case"month-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY-MM"),Z.getValueProps=K=>({value:K?yn(K):null});break;case"quarter-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY年第Q季度"),Z.getValueProps=K=>({value:K?yn(K,W||"YYYY年第Q季度"):null});break;case"year-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY"),Z.getValueProps=K=>({value:K?yn(K):null});break;case"second-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"HH:mm:ss"),Z.getValueProps=K=>({value:K?yn(K,W||"HH:mm:ss"):null});break;case"range-picker":Z.getValueFromEvent=K=>K==null?void 0:K.map(te=>te==null?void 0:te.format(W||"YYYY-MM-DD")),Z.getValueProps=K=>({value:(K==null?void 0:K.map(te=>yn(te)))||null});break;case"multiple-date-picker":Z.getValueFromEvent=K=>K==null?void 0:K.map(te=>te==null?void 0:te.format(W||"YYYY-MM-DD")),Z.getValueProps=K=>({value:(K==null?void 0:K.map(te=>yn(te)))||null});break}return Z},[A]),P=q.useCallback(({isActive:I})=>I?Q(x8,{style:{fontSize:18,color:"#999"}}):Q(w8,{style:{fontSize:18,color:"#999"}}),[]),z=(I,H)=>{var W,Z,X,re,K;return Me(ve.Flex,{gap:10,vertical:H==="flex",align:"center",children:[Q("span",{children:I.attrname}),((W=I==null?void 0:I.json)==null?void 0:W.instruction)&&H==="icon"&&Q(ve.Tooltip,{title:su(k,(Z=I==null?void 0:I.json)==null?void 0:Z.instruction),children:Q(g8,{style:{color:((X=I==null?void 0:I.json)==null?void 0:X["instruction-color"])??"#888888",fontSize:16,cursor:"pointer"}})})||Q("span",{style:{color:((re=I==null?void 0:I.json)==null?void 0:re["instruction-color"])??"red"},children:su(k,(K=I==null?void 0:I.json)==null?void 0:K.instruction)})]})},N=q.useCallback(({itemWithJson:I,colNum:H=1,readonly:W=!1,instructionShowMode:Z="icon",radioAlign:X="horizontal",formItemStyle:re,relatedid:K,form:te,defaultWidth:G=358,parentFormListField:V,isShowLabel:ee=!0})=>{const ie=Dc(I);let ae=I.children||[];Array.isArray(ae==null?void 0:ae[0])&&ae.length&&(ae=ae[0]);const pe=xe=>{const Ee=(V==null?void 0:V.parentName)||(V==null?void 0:V.name);return Ee?Array.isArray(Ee)?[...Ee,I.attrid,xe.name]:[Ee,I.attrid,xe.name]:[I.attrid,xe.name]};return Q(ve.Col,{span:24/H,children:Q(ve.Collapse,{bordered:!1,style:{backgroundColor:"transparent"},expandIcon:({isActive:xe})=>P({isActive:xe}),items:[{key:I.attrid,label:I.attrname,styles:{header:{paddingLeft:0}},children:Q(ve.Form.List,{name:V?Array.isArray(V.name)?[...V.name,I.attrid]:[V.name,I.attrid]:I.attrid,initialValue:ie,children:(xe,{add:Ee,remove:se})=>Me("div",{style:{display:"flex",rowGap:16,flexDirection:"column"},children:[xe.map(Ne=>{const Te={...Ne,parentName:pe(Ne)};return Q(ve.Card,{style:{width:G+100},size:"small",title:`${I.attrname} ${Ne.name+1}`,extra:!b&&Q(p8,{onClick:()=>{xe.length>1?se(Ne.name):T.warning("至少需要保留一个!")}}),children:(ae||[]).map((tt,Se)=>Q(q.Fragment,{children:L({item:tt,readonly:W,colNum:H,instructionShowMode:Z,relatedid:K,form:te,defaultWidth:G,formItemStyle:re,radioAlign:X,isFormListItem:!0,formListField:Te,isShowLabel:!0})},tt.attrid||`child-${Se}`))},Ne.key)}),!b&&Q(ve.Flex,{style:{width:200},children:Me(ve.Button,{type:"dashed",onClick:()=>Ee(),block:!0,children:["+ ",E==="10001"?"新增":"Add"]})})]})})}]},I.attrid)})},[P,Dc]),U=q.useCallback(({itemWithJson:I,colNum:H=1,readonly:W=!1,instructionShowMode:Z="icon",radioAlign:X="horizontal",formItemStyle:re,relatedid:K,form:te,defaultWidth:G=358,isFormListItem:V=!1,formListField:ee,isShowLabel:ie=!0})=>{var ae,pe,xe,Ee,se,Ne,Te;if(((ae=I.json)==null?void 0:ae.hide)===!0)return Q(nn,{});if(I.attrtype===1)return N({itemWithJson:I,colNum:H,readonly:W,instructionShowMode:Z,radioAlign:X,formItemStyle:re,relatedid:K,form:te,defaultWidth:G,parentFormListField:ee,isShowLabel:ie});if(I.attrtype===2)return Q(nn,{children:"实例信息"});if(I.attrtype===0){const tt=Dc(I),Se=su(k,(pe=I.json)==null?void 0:pe["default-prompt"]),lt=Qh(I,E),{combinations:je=[]}=I.json||{};if(je!=null&&je.length)return Q(ve.Col,{span:24/H,children:Q(ve.Form.Item,{label:su(k,(xe=I==null?void 0:I.json)==null?void 0:xe["combination-name"]),required:(Ee=I.json)==null?void 0:Ee.must,children:Q(ve.Space.Compact,{children:je.map((_t,gt)=>{var rr,Zn,$n,cn;let bn=Dc(_t),Ln=G;const nr={},Dn=_t.json.input||"text",Zt=re==null?void 0:re.find(sr=>sr.type===Dn);if(Zt){const{width:sr}=(Zt==null?void 0:Zt.style)||{};sr&&(nr.width=sr)}const Cn=(rr=_t==null?void 0:_t.json)==null?void 0:rr["combination-width-ratio"];return Cn&&(Ln=G*Cn),Q(ve.Form.Item,{name:ee?Array.isArray(ee.name)?[...ee.name,_t.attrid]:[ee.name,_t.attrid]:_t.attrid,noStyle:!0,initialValue:bn,rules:[...(Zn=_t.json)!=null&&Zn.must?[{required:!0,message:Se||`${lt}${_t.attrname}`}]:[],...($n=I.json)!=null&&$n.regexp?[{pattern:new RegExp(I.json.regexp.replace(/^\/|\/$/g,"")),message:su(k,(cn=I.json)==null?void 0:cn["regexp-message"])||`${I.attrname}${E==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...O(_t),children:F({item:_t,readonly:W,formItemStyle:re,radioAlign:X,relatedid:K,form:te,defaultWidth:Ln,customWidth:nr})},gt)})})},`${I.attrid}+1`)});const Pt=V&&ee?Array.isArray(ee.name)?[...ee.name,I.attrid]:[ee.name,I.attrid]:I.attrid;return Q(ve.Col,{span:24/H,children:Q(ve.Form.Item,{name:Pt,label:ie&&z(I,Z)||null,initialValue:tt,rules:[...(se=I.json)!=null&&se.must?[{required:!0,message:`${lt}${I.attrname}`}]:[],...(Ne=I.json)!=null&&Ne.regexp?[{pattern:new RegExp(I.json.regexp.replace(/^\/|\/$/g,"")),message:su(k,(Te=I.json)==null?void 0:Te["regexp-message"])||`${I.attrname}${E==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...O(I),children:F({item:I,readonly:W,formItemStyle:re,radioAlign:X,relatedid:K,form:te,defaultWidth:G})},I.attrid)})}return null},[z,Dc,O,N]),$=async I=>{var H;try{const W=(H=I==null?void 0:I.response)==null?void 0:H.data;if(W){if(!r)return;const Z=await r({Controlname:"DelFile",PageName:"initializationfile"},W);if((Z==null?void 0:Z.ReturnValue)!==1)return T.error(Z==null?void 0:Z.msg),!1}else S(I);return!0}catch{return!1}},F=({item:I,readonly:H=!1,formItemStyle:W=[],radioAlign:Z="horizontal",relatedid:X,form:re,defaultWidth:K=358,customWidth:te={}})=>{var tt,Se,lt,je,Pt,_t;const G=I.json.input||"text",V=((tt=I.json)==null?void 0:tt.format)||"",ee=I.attrid,ie=Dc(I),ae=su(k,(Se=I.json)==null?void 0:Se["default-prompt"])||"",pe=((lt=I.json)==null?void 0:lt["disable-date-goover"])||!1,xe=Qh(I,E),Ee=I.json.length&&{maxLength:I.json.length}||{},se=W.find(gt=>gt.type===G);let Ne=(je=I.json)==null?void 0:je["input-width"];Ne&&(Ne=x==="table"?Number(Ne)-32:Ne);const Te=Ne||K;switch(G){case"label":return Q(ve.Input,{disabled:!0,value:((Pt=I.json)==null?void 0:Pt["label-value"])||I.attrvalue||((_t=I.json)==null?void 0:_t.default)||"-",style:{width:Te,...se==null?void 0:se.style,...te}});case"text":return Q(ve.Input,{placeholder:ae||xe,...Ee,disabled:H,allowClear:!0,style:{width:Te,...se==null?void 0:se.style,...te}});case"password":return Q(ve.Input.Password,{placeholder:ae||xe,...Ee,disabled:H,allowClear:!0,style:{width:Te,...se==null?void 0:se.style,...te}});case"textarea":return Q(ve.Input.TextArea,{allowClear:!0,placeholder:ae||xe,rows:5,...Ee,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}});case"number":return Q(ve.InputNumber,{controls:!1,placeholder:ae||xe,...Ee,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}});case"select":case"mult-select":return Q(vL,{item:I.json,readonly:H,style:{width:Te,...se==null?void 0:se.style,...te},commonRequestWidthParams:r,commonRequest:i,value:ie,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:E,langConfig:k,onChange:gt=>{re.setFieldValue(I.attrid,gt)}});case"modal-mult-select":case"modal-select":return Q(cL,{style:{width:Te,...se==null?void 0:se.style,...te},item:I.json,value:I.attrvalue||I.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async gt=>{re.setFieldValue(I.attrid,gt)},disabled:H,langId:E,CustomModalComponent:C});case"mul-field-modal-select":return Q(sL,{style:{width:Te,...se==null?void 0:se.style,...te},item:I.json,form:re,attrid:ee,value:I.attrvalue||I.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async gt=>{re.setFieldsValue(gt)},disabled:H,CustomModalComponent:C,langId:E});case"date-picker":case"time-picker":case"week-picker":case"month-picker":case"quarter-picker":case"year-picker":case"second-picker":{const gt={"date-picker":"date","time-picker":"date","week-picker":"week","month-picker":"month","quarter-picker":"quarter","year-picker":"year","second-picker":"time"};let bn;return G==="date-picker"&&(bn=pe?V6:void 0),Q(ve.DatePicker,{showTime:G==="time-picker",format:V||void 0,picker:gt[G]||"date",disabled:H,disabledDate:bn,placement:"bottomLeft",style:{width:Te,...se==null?void 0:se.style,...te}})}case"range-picker":return Q(ve.DatePicker.RangePicker,{disabledDate:pe?V6:void 0,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}});case"multiple-date-picker":return Q(ve.DatePicker,{multiple:!0,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}});case"radio":return Q(xL,{radioAlign:Z,commonRequest:i,commonRequestWidthParams:r,item:I.json,readonly:H,options:Ee,handleUrlOptions:kc,value:ie,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langConfig:k,onChange:gt=>{re.setFieldValue(I.attrid,gt.target.value)}});case"checkbox":return Q(dL,{radioAlign:Z,commonRequest:i,commonRequestWidthParams:r,item:I.json,readonly:H,options:Ee,value:ie,handleUrlOptions:kc,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,onChange:gt=>{re.setFieldValue(I.attrid,gt.join(","))}});case"audio":case"file":case"image":case"video":return Q(yL,{action:t&&t("initializationfile"),item:I.json,uploadType:G,langId:E,list:ie,readonly:H,relatedid:X,relatedidKey:g,onRemove:gt=>$(gt)});case"cascader":return Q(hL,{commonRequestWidthParams:r,commonRequest:i,item:I.json,value:I.attrvalue,style:{width:Te,...se==null?void 0:se.style,...te},interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:E});case"radio-card":return Q(pL,{item:I.json,readonly:H,onChange:gt=>{re.setFieldValue(I.attrid,gt)},langId:E,commonRequestWidthParams:r});default:return Q(ve.Input,{placeholder:ae||xe,...Ee,showCount:!0,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}})}},L=({item:I,readonly:H=!1,colNum:W=1,instructionShowMode:Z="icon",relatedid:X,form:re,defaultWidth:K=358,formItemStyle:te,radioAlign:G="horizontal",isFormListItem:V=!1,formListField:ee,isShowLabel:ie=!0})=>{var xe;const ae=I.info_base64===1?uu(Zh(I.info)):uu(I.info),pe={...I,json:{...I==null?void 0:I.json,...ae}};return((xe=pe.json)==null?void 0:xe.hide)===!0?null:Q(q.Fragment,{children:U({itemWithJson:pe,readonly:H,colNum:W,instructionShowMode:Z,relatedid:X,form:re,defaultWidth:K,formItemStyle:te,radioAlign:G,isFormListItem:V,formListField:ee,isShowLabel:ie})},pe.attrid)};return{handleRenderItem:L,handleSetFormItemInitialValue:Dc}}const CL=q.forwardRef((e,r)=>{const{formConfig:t,form:i,readonly:l=!1,relatedid:f,colNum:c=1,colSpace:p=[0,0],instructionShowMode:g="flex",defaultWidth:d=358,commonRequestWidthParams:m,uploadAction:C,commonRequest:b,formItemStyle:x=[],radioAlign:E="horizontal",interfaceTypeChildren:k="YLLRDetailAttrlist",interfaceTypeDict:D="YLZDDictList",interfaceTypeSysDict:T="YLZDSysConfigList",relatedidKey:A="relatedid",actionUrlKey:S="action-url",actionUrlExtraParams:O={},CustomModalComponent:P,formShowType:z="form",headerWidth:N,formListItemWidth:U,formListItemName:$,isEdit:F=!1,langId:L="10001",langConfig:I=[]}=e,H=q.useRef([]),W=X=>{H.current.push(X)},{handleRenderItem:Z}=bL({commonRequestWidthParams:m,uploadAction:C,commonRequest:b,updateDelFileList:W,formConfig:t,interfaceTypeChildren:k,interfaceTypeDict:D,interfaceTypeSysDict:T,relatedidKey:A,actionUrlKey:S,actionUrlExtraParams:O,CustomModalComponent:P,isEdit:F,formShowType:z,langId:L,langConfig:I});return q.useImperativeHandle(r,()=>({getDelFileList:()=>H.current})),Q(nn,{children:z==="table"?Q(ve.Form.List,{name:$||"customFormList",initialValue:[{}],children:(X,{add:re,remove:K})=>Q(ve.Flex,{className:"custom-form-body",children:Me("div",{className:"custom-form-list",children:[Me(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((te,G)=>{var ee,ie;const V=((ee=te==null?void 0:te.json)==null?void 0:ee["input-width"])&&Number((ie=te==null?void 0:te.json)==null?void 0:ie["input-width"])||d;return Me(ve.Flex,{style:{width:V,flexShrink:0},align:"center",children:[G!==0&&Q("div",{className:"line"}),Q("div",{className:"custom-form-list-header-item",children:te.attrname})]},G)})}),Q("a",{className:"custom-form-list-add-btn",onClick:()=>re(),children:L==="10001"?"新增":"Add"})]}),X.map(te=>Me(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((G,V)=>{var ie,ae;const ee=((ie=G==null?void 0:G.json)==null?void 0:ie["input-width"])&&Number((ae=G==null?void 0:G.json)==null?void 0:ae["input-width"])||d;return Q(ve.Flex,{align:"center",className:"custom-form-list-item-content",justify:"center",style:{width:ee,flexShrink:0},children:Z({item:G,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:(U==null?void 0:U[V])||d,formItemStyle:x,isFormListItem:!0,formListField:te,isShowLabel:!1})},G.attrid||`child-${V}`)})}),Q("a",{className:"custom-form-list-del-btn",onClick:()=>K(te.key),children:L==="10001"?"删除":"Delete"})]},te.key))]})})}):Q(ve.Row,{gutter:p,children:t.map((X,re)=>Q(q.Fragment,{children:Z({item:X,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:d,formItemStyle:x,radioAlign:E})},X.attrid||`form-item-${re}`))})})}),tD=(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(p=>p)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>yn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).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(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=wL(e.children||[])),t||void 0},nD=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},wL=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)},_L=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:p})=>{var C;let g=[];const d=async b=>{var E;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(E=k==null?void 0:k.data)!=null&&E.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(D=>({label:`${D.dicid||""}-${D.info||""}`,value:`${D.dicid||""}-${D.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},m=async()=>{var b,x;try{const E=((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)||"",D=c==null?void 0:c["field-names"];if(!E.length){ve.message.error("请配置key-field");return}const T=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(T!=null&&T.data){const A=T==null?void 0:T.data,S=(A==null?void 0:A.list)||[];let O=[];Array.isArray(A)&&(O=A),Array.isArray(S)&&(O=S),D?g=O:g=O.map(P=>({label:nD(P,k,E),value:nD(P,k,E)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(g=((C=c.data)==null?void 0:C.map(b=>({label:b,value:b})))||[],c.options&&Array.isArray(c.options)&&(g=c.options)):c.inputType==="dictionary"?g=await d(t):c.inputType==="system-dictionary"&&(g=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await m(),g};function EL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,attrid:c,form:p,langId:g}=e,d=ve.Form.useWatch(c,p),{message:m}=ve.App.useApp(),C=r.input,[b,x]=q.useState(e.value),[E,k]=q.useState(!1),[D,T]=q.useState([]),[A,S]=q.useState([]),[O,P]=q.useState(!1),[z,N]=q.useState({PageNum:1,PageSize:6}),[U,$]=q.useState([]),[F,L]=q.useState(0),I=K();q.useEffect(()=>{E&&W()},[E,z]);const H=(G,V)=>{T(G),S(V)},W=async()=>{var G;if(r.inputType==="url"&&(r!=null&&r["action-url"])){P(!0);try{const V=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...z,...(r==null?void 0:r["action-url-extra-params"])||{}});if((V==null?void 0:V.ReturnValue)===0){m.error(V.msg),P(!1);return}const ee=V==null?void 0:V.data,ie=(G=ee==null?void 0:ee.list)==null?void 0:G.map((pe,xe)=>{const Ee=(z.PageNum-1)*z.PageSize+xe;return{...pe,_rowKey:Ee}}),ae=(ie==null?void 0:ie.filter(pe=>D.includes(pe._rowKey)))||[];S(ae),$([...ie||[]]),L((ee==null?void 0:ee.number)||0),P(!1)}catch(V){P(!1),m.error(g==="10001"?V.msg||"参数错误":"Failed to load data")}return}m.error(g==="10001"?"请配置action-url":"Please configure action-url")},Z=()=>{var G;if(!t){if(b){const V=r==null?void 0:r["key-field"],ee=V==null?void 0:V[c],{delimiter:ie="-",list:ae=[]}=ee||{};if(!V){m.error(g==="10001"?"请配置key-field":"Please configure key-field");return}switch(C){case"mul-field-modal-select":const pe=(G=b==null?void 0:b.split(ie))==null?void 0:G[0],xe=U==null?void 0:U.findIndex(Ne=>Object.values(Ne).includes(pe));T([xe]);break;case"modal-mult-select":const Ee=b==null?void 0:b.split(","),se=Ee==null?void 0:Ee.map(Ne=>{var tt;const Te=(tt=Ne.split(ie))==null?void 0:tt[0];return U==null?void 0:U.findIndex(Se=>Te.includes((Se==null?void 0:Se.typeid)||(Se==null?void 0:Se.instanceid)))});T(se);break}}k(!0)}},X=async()=>{try{const G=await SL(A,r);x((G==null?void 0:G[c])||""),e.onSure(G),k(!1)}catch(G){m.error(g==="10001"?G.msg||"参数错误":"Failed to load data")}},re=()=>{N({...z,PageNum:1}),k(!1)};function K(){const G=r["modal-field-list"];let V=[];for(let ee in G){let ie=G[ee];const ae={dataIndex:ee,title:ie};V=[...V,ae]}return V}const te=G=>{N({...z,PageNum:G})};return Me(nn,{children:[Q(ve.Select,{placeholder:g==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:Z,open:!1,value:d,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:E,onOk:X,onCancel:re,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:I,loading:O,dataSource:U,rowKey:G=>G._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:H},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:te}})})||Q(ve.Modal,{title:r["modal-caption"],open:E,onOk:X,onCancel:re,width:r["modal-width"]??600,okButtonProps:{disabled:D.length===0},children:Q(ve.Table,{columns:I,loading:O,dataSource:U,rowKey:G=>G._rowKey,rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:H},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:te}})})]})}function SL(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[p,g]of Object.entries(l)){const d=(g==null?void 0:g.list)??[],m=(g==null?void 0:g.delimiter)??"-",C=d.map(b=>c==null?void 0:c[b]);f[p]=C.join(m)}}),t(f)}catch{i({msg:"key-field参数配置错误"})}})}function DL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=ve.App.useApp(),g=r.input,[d,m]=q.useState(e.value),[C,b]=q.useState(!1),[x,E]=q.useState([]),[k,D]=q.useState([]),[T,A]=q.useState(!1),[S,O]=q.useState({PageNum:1,PageSize:6}),[P,z]=q.useState([]),[N,U]=q.useState(0),$=Z();q.useEffect(()=>{C&&L()},[C,S]);const F=(re,K)=>{E(re),D(K)},L=async()=>{var re;if(r.inputType==="url"&&(r!=null&&r["action-url"])){A(!0);try{const K=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...S});if((K==null?void 0:K.ReturnValue)===0){p.error(K.msg),A(!1);return}const te=K==null?void 0:K.data,G=(re=te==null?void 0:te.list)==null?void 0:re.map((ee,ie)=>{const ae=(S.PageNum-1)*S.PageSize+ie;return{...ee,_rowKey:ae}}),V=(G==null?void 0:G.filter(ee=>x.includes(ee._rowKey)))||[];D(V),z([...G||[]]),U((te==null?void 0:te.number)||0),A(!1)}catch(K){A(!1),p.error(c==="10001"?K.msg||"参数错误":"Failed to load data")}return}p.error(c==="10001"?"请配置action-url":"Please configure action-url")},I=()=>{var re,K;if(!t){if(d){const te=((re=r==null?void 0:r["key-field"])==null?void 0:re.list)??[],G=((K=r==null?void 0:r["key-field"])==null?void 0:K.delimiter)??"-";if(!te.length){p.error(c==="10001"?"请配置key-field":"Please configure key-field");return}switch(g){case"modal-select":const V=d==null?void 0:d.split("-"),ee=P==null?void 0:P.findIndex(pe=>V.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));E([ee]);break;case"modal-mult-select":const ie=d==null?void 0:d.split(","),ae=ie==null?void 0:ie.map(pe=>{var Ee;const xe=(Ee=pe.split(G))==null?void 0:Ee[0];return P==null?void 0:P.findIndex(se=>xe.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)))});E(ae);break}}b(!0)}},H=async()=>{try{const re=await kL(k,r,c);m(re),e.onSure(re),b(!1)}catch(re){p.error(c==="10001"?re.msg||"参数错误":"Failed to build value")}},W=()=>{O({...S,PageNum:1}),b(!1)};function Z(){const re=r["modal-field-list"];let K=[];for(let te in re){let G=re[te];const V={dataIndex:te,title:G};K=[...K,V]}return K}const X=re=>{O({...S,PageNum:re})};return Me(nn,{children:[Q(ve.Select,{placeholder:c==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:I,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:W,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:$,loading:T,dataSource:P,rowKey:re=>re._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:N,current:S.PageNum,pageSize:S.PageSize,onChange:X}})})||Q(ve.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:W,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(ve.Table,{columns:$,loading:T,dataSource:P,rowKey:re=>re._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:N,current:S.PageNum,pageSize:S.PageSize,onChange:X}})})]})}function kL(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 p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"Failed to build value"})}})}const TL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:E}=e,{message:k}=ve.App.useApp(),[D,T]=q.useState([]),[A,S]=q.useState(d||[]);q.useEffect(()=>{if((r==null?void 0:r.inputType)==="local"){const z=(r==null?void 0:r.data)||[];T(z.map(N=>({value:N,label:N})))}else(r==null?void 0:r.inputType)==="dictionary"?O(r.classify,m):(r==null?void 0:r.inputType)==="system-dictionary"?O(r.classify,C):(r==null?void 0:r.inputType)==="url"&&P()},[r==null?void 0:r.inputType]);const O=async(z,N)=>{var $;if(!z)return;const U=await p(N,{asctypeid:z});if((U==null?void 0:U.ReturnValue)===1){const F=(($=U==null?void 0:U.data)==null?void 0:$.list)||[];T(F.map(L=>{const I=L.dicid+"-"+L.info;return{value:I,label:I}}))}},P=async()=>{var z,N;try{const U=((z=r==null?void 0:r["key-field"])==null?void 0:z.list)||[],$=((N=r==null?void 0:r["key-field"])==null?void 0:N.delimiter)||"";if(!U.length){k.error(E==="10001"?"请配置key-field":"Please configure key-field");return}const F=await c({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[b]:r==null?void 0:r["action-url"],...x});if(F!=null&&F.data){const L=F==null?void 0:F.data,I=L==null?void 0:L.list;let H=[];Array.isArray(L)&&(H=L),Array.isArray(I)&&(H=I);const W=H.map(Z=>({label:g(Z,$,U),value:g(Z,$,U)}));T([...W])}}catch{k.error(E==="10001"?"加载选项失败":"Failed to load options")}finally{}};return Q(ve.Checkbox.Group,{...l,options:D,value:A,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:z=>{S(z),t==null||t(z)},disabled:i})},AL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C})=>{const[b,x]=q.useState([]),[E,k]=q.useState(!1),{message:D}=ve.App.useApp();q.useEffect(()=>{T()},[e.inputType,e.classify,e.data,e.options]);const T=async()=>{if(e.inputType==="local"){let N=[];e.data&&Array.isArray(e.data)?N=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(N=e.options),x(N)}else if(e.inputType==="dictionary")await A(g);else if(e.inputType==="system-dictionary")A(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const N=await O();N&&Array.isArray(N)&&x(N)}else{let N=[];e.data&&Array.isArray(e.data)?N=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(N=e.options),x(N)}},A=async N=>{var U;if(e.classify){k(!0);try{const $=await c(N,{asctypeid:e.classify});if((U=$==null?void 0:$.data)!=null&&U.list&&Array.isArray($.data.list)){const F=$.data.list.map(L=>({label:`${L.dicid||""}-${L.info||""}`,value:`${L.dicid||""}-${L.info||""}`}));x(F)}}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},S=(N,U)=>{i&&i(N)},O=async N=>new Promise(async(U,$)=>{var W,Z,X;const F=((W=e==null?void 0:e["key-field"])==null?void 0:W.list)||[],L=(e==null?void 0:e["search-field"])||[],I=((Z=e==null?void 0:e["key-field"])==null?void 0:Z.delimiter)||"-";if(!F.length){D.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...m};N&&(L.forEach(re=>{H[re]=N[re]||""}),H.level=Number(N.level||0)+1||""),k(!0);try{const re=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((X=re==null?void 0:re.data)!=null&&X.list&&Array.isArray(re.data.list)){const K=re.data.list.map(te=>({...te,label:`${te[F[0]]||""}${I}${te[F[1]]||""}`,value:`${te[F[0]]||""}${I}${te[F[1]]||""}`,children:[],isLeaf:(te==null?void 0:te.subcount)===0}));U(K)}$([])}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options"),$([])}finally{$([]),k(!1)}}),P=async N=>{const U=N[N.length-1],$=await O(U)||[];return U.children=$,x([...b]),$},z=(N,U)=>U.some($=>$.label.toLowerCase().includes(N.toLowerCase()));return Q(ve.Cascader,{showSearch:{filter:z},loading:E,placeholder:C==="10001"?"请选择":"Please select",loadData:P,disabled:r,onChange:S,style:{...l},options:b,value:t,onOpenChange:async N=>{var U;if(N&&(t!=null&&t.length)){const $=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],F=(e==null?void 0:e["search-field"])||[];if(!$.length||!F.length){D.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const L=$.findIndex(W=>W===F[0]);if(L===-1){D.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const I=t.map(W=>W.split("-")[L]||"").filter(Boolean);let H=b;for(const[W,Z]of I.entries()){if(W===I.length-1)break;const X=H.filter(te=>te[F[0]]===Z);if(X.length===0)break;const re=X[0];if(re.children&&re.children.length>0){H=re.children;continue}H=await P(X)}}}})},OL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f})=>{const[c,p]=q.useState([]),[g,d]=q.useState(!1);q.useEffect(()=>{(async()=>{var A;if(e.inputType==="url"&&e["action-url"]){d(!0);try{const S=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(A=S==null?void 0:S.data)!=null&&A.list&&Array.isArray(S.data.list)?p(S.data.list):S!=null&&S.data&&Array.isArray(S.data)?p(S.data):Array.isArray(S==null?void 0:S.list)?p(S.list):(S==null?void 0:S.ReturnValue)===1&&(S!=null&&S.data)&&(Array.isArray(S.data)?p(S.data):p([S.data]))}catch{}finally{d(!1)}}else e.data&&Array.isArray(e.data)&&p(e.data)})()},[e.inputType,e["action-url"],e.data]);const m=T=>JSON.stringify(T),C=T=>{const A=m(T);return t===A},b=T=>{if(r)return;const A=m(T);i&&i(A)},x=e["card-image-width"]||200,E=e["card-image-height"]||100,k=e["card-image-field"],D=e["card-info-field"];return Q("div",{style:{...l},children:g?Q("div",{style:{textAlign:"center",padding:"20px"},children:"加载中..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"0px"},children:c.map((T,A)=>{const S=C(T);return Me("div",{onClick:()=>b(T),style:{flex:"1 1 auto",width:`${x}px`,padding:"12px",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[T[k]&&Q("img",{src:T.picurl,alt:T[D]||"",style:{width:`${x}px`,height:`${E}px`,objectFit:"cover",borderRadius:"4px",marginBottom:"8px"},onError:O=>{O.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Me(ve.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:S?"none":"1px solid #d9d9d9",backgroundColor:S?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:S&&Q(f8,{style:{fontSize:"12px",color:"#fff"}})}),T[D]||""]})})]},A)})})})},WQ="";function Xh(e,r){if(!e)return r;let t;return typeof e=="function"?t=e():"current"in e?t=e.current:t=e,t}function Ni(){}const Jh=Object.assign,Ac=typeof window<"u";function Xr(e){return e!=null}function Oc(e){return typeof e=="function"}function RL(e){return cd(e)&&Oc(e.then)&&Oc(e.catch)}function cd(e){return e!==null&&typeof e=="object"}function rD(e,r,t){return r.reduce((i,l)=>((!t||e[l]!==void 0)&&(i[l]=e[l]),i),{})}function V2(e,r){return r?typeof r=="string"?` ${e}--${r}`:Array.isArray(r)?r.reduce((t,i)=>t+V2(e,i),""):Object.keys(r).reduce((t,i)=>t+(r[i]?V2(e,i):""),""):""}function FL(e){return(r,t)=>(r&&typeof r!="string"&&(t=r,r=""),r=r?`${e}__${r}`:e,`${r}${V2(r,t)}`)}function xn(e,r){return e=`${r||"rv"}-${e}`,[FL(e),e]}function NL(e){e.stopPropagation()}function $2(e,r){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),r&&NL(e)}const ML={click:"onClick"};function aD(e,r){const t=Object.assign({},r.props);for(const i of e){const l=ML[i];t[l]=function(f){var c,p;f.stopPropagation(),(p=(c=r.props)[l])===null||p===void 0||p.call(c,f)}}return q.cloneElement(r,t)}const fd=Ac?window:global;let iD=Date.now();function PL(e){const r=Date.now(),t=Math.max(0,16-(r-iD)),i=setTimeout(e,t);return iD=r+t,i}function Y2(e){return(fd.requestAnimationFrame||PL).call(fd,e)}function BL(){return Ac?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1}function LL(e){const r="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(r,0)}function zL(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function UL(e){oD(window,e)}function oD(e,r){"scrollTop"in e?e.scrollTop=r:e.scrollTo(e.scrollX,r)}const jL=BL();function lD(){jL&&UL(zL())}function sD(e){return/^\d+(\.\d+)?$/.test(e)}function uD(e){return Number.isNaN?Number.isNaN(e):e!==e}function cl(e){if(Xr(e))return e=String(e),sD(e)?`${e}px`:e}function IL(e){if(Xr(e)){const r=cl(e);return{width:r,height:r}}return{}}let q2;function HL(){if(!q2){const e=document.documentElement,r=e.style.fontSize||window.getComputedStyle(e).fontSize;q2=parseFloat(r)}return q2}function VL(e){return e=e.replace(/rem/g,""),+e*HL()}function $L(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function YL(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function cD(e){if(typeof e=="number")return e;if(Ac){if(e.indexOf("rem")!==-1)return VL(e);if(e.indexOf("vw")!==-1)return $L(e);if(e.indexOf("vh")!==-1)return YL(e)}return parseFloat(e)}function ep(e,r,t){return Math.min(Math.max(e,r),t)}function fD(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 qL(e,r=!0,t=!0){r?e=fD(e,".",/\./g):e=e.split(".")[0],t?e=fD(e,"-",/-/g):e=e.replace(/-/,"");const i=r?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(i,"")}function fl(e,r=2){let t=`${e}`;for(;t.length<r;)t=`0${t}`;return t}let dD=!1;if(Ac)try{const e={};Object.defineProperty(e,"passive",{get(){dD=!0}}),window.addEventListener("test-passive",null,e)}catch{}function G2(e,r,t={}){if(!Ac)return;const{target:i=window,passive:l=!1,capture:f=!1,depends:c=[]}=t;let p;const g=()=>{const m=Xh(i);m&&!p&&(m.addEventListener(e,r,dD?{capture:f,passive:l}:f),p=!0)},d=()=>{const m=Xh(i);m&&p&&(m.removeEventListener(e,r,f),p=!1)};q.useEffect(()=>(g(),()=>d()),[i,...c])}function K2(e){const[r,t]=q.useState(e),i=q.useRef(r),l=q.useCallback(f=>{t(c=>i.current=Oc(f)?f(c):f)},[r]);return[r,l,i]}const GL=()=>{const e=q.useRef(!1);return q.useEffect(()=>(e.current=!1,()=>{e.current=!0}),[]),e},hD=(e={})=>{const r=GL(),[t,i,l]=K2(e),f=q.useCallback(c=>{r.current||i(p=>Object.assign(Object.assign({},p),Oc(c)?c(p):c))},[]);return[t,f,l]},Rc=(e,r)=>{const t=q.useRef(!1);q.useEffect(()=>{if(!t.current)t.current=!0;else return e()},r)};function pD(e){const r=q.useRef(e);return r.current=e,r}const KL=process.env.NODE_ENV==="development";function JQ(e,r){}const vD=e=>{process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=pD(e);q.useEffect(()=>()=>{r.current()},[])};function mD(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 WL=(e=>(t,i,l)=>{const f=q.useRef(!1),c=q.useRef([]),p=q.useRef([]),g=q.useRef();e(()=>{var d;const C=(Array.isArray(l)?l:[l]).map(b=>Xh(b));if(!f.current){f.current=!0,c.current=C,p.current=i,g.current=t();return}(C.length!==c.current.length||!mD(C,c.current)||!mD(i,p.current))&&((d=g.current)===null||d===void 0||d.call(g),c.current=C,p.current=i,g.current=t())}),vD(()=>{var d;(d=g.current)===null||d===void 0||d.call(g),f.current=!1})})(q.useEffect);function QL(e,r){const[t,i]=q.useState(),[l,f]=q.useState();return WL(()=>{const c=Xh(e);if(!c)return;const p=new IntersectionObserver(g=>{for(const d of g)f(d.intersectionRatio),i(d.isIntersecting)},Object.assign(Object.assign({},r),{root:Xh(r==null?void 0:r.root)}));return p.observe(c),()=>{p.disconnect()}},[],e),[t,l]}const gD=10;function ZL(e,r){return e>r&&e>gD?"horizontal":r>e&&r>gD?"vertical":""}function yD(){const e=q.useRef(0),r=q.useRef(0),t=q.useRef(0),i=q.useRef(0),l=q.useRef(0),f=q.useRef(0),c=q.useRef(""),p=q.useRef(null),g=()=>c.current==="vertical",d=()=>c.current==="horizontal",m=()=>{t.current=0,i.current=0,l.current=0,f.current=0,c.current="",p.current=null};return{move:x=>{const E=x.touches[0];t.current=E.clientX<0?0:E.clientX-e.current,i.current=E.clientY-r.current,l.current=Math.abs(t.current),f.current=Math.abs(i.current),p.current===null?p.current=!0:p.current=!1,c.current||(c.current=ZL(l.current,f.current))},start:x=>{m(),e.current=x.touches[0].clientX,r.current=x.touches[0].clientY},reset:m,startX:e,startY:r,deltaX:t,deltaY:i,offsetX:l,offsetY:f,direction:c,isVertical:g,isHorizontal:d,firstMove:p}}const xD=/scroll|auto/i,XL=Ac?window:void 0;function JL(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function ez(e,r=XL){r===void 0&&(r=window);let t=e;for(;t&&t!==r&&JL(t);){const{overflowY:i}=window.getComputedStyle(t);if(xD.test(i)){if(t.tagName!=="BODY")return t;const l=window.getComputedStyle(t.parentNode).overflowY;if(xD.test(l))return t}t=t.parentNode}return r}const tz=e=>(r,t)=>{const i=q.useRef(!1);e(()=>()=>{i.current=!1},[]),e(()=>{if(!i.current)i.current=!0;else return r()},t)},tp=Ac?q.useLayoutEffect:q.useEffect,nz=tz(tp),bD=()=>{const[,e]=q.useState({});return q.useCallback(()=>e({}),[])};function CD(e){process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=q.useRef(e);r.current=q.useMemo(()=>e,[e]);const t=q.useRef();return t.current||(t.current=function(...i){return r.current.apply(this,i)}),t.current}function np(e){const{value:r,defaultValue:t,onChange:i}=e,l=bD(),f=q.useRef(r!==void 0?r:t);r!==void 0&&(f.current=r);const c=CD((p,g)=>{const d=typeof p=="function"?p(f.current):p;!g&&d===f.current||(f.current=d,l(),i==null||i(d))});return[f.current,c]}const aZ="";function Va(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 W2(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 p(m){try{d(i.next(m))}catch(C){c(C)}}function g(m){try{d(i.throw(m))}catch(C){c(C)}}function d(m){m.done?f(m.value):l(m.value).then(p,g)}d((i=i.apply(e,r||[])).next())})}const iZ="",rz=({bem:e})=>Q(nn,{children:Array(12).fill(null).map((r,t)=>Q("i",{className:Oe(e("line",String(t+1)))},t))}),az=({bem:e})=>Q("svg",Object.assign({className:Oe(e("circular")),viewBox:"25 25 50 50"},{children:Q("circle",{cx:"50",cy:"50",r:"20",fill:"none"})})),iz=({bem:e})=>Me("div",Object.assign({className:Oe(e("ball"))},{children:[Q("div",{}),Q("div",{}),Q("div",{})]})),oz=e=>({spinner:Q(rz,{bem:e}),circular:Q(az,{bem:e}),ball:Q(iz,{bem:e})}),[Ng]=xn("loading"),Q2=e=>{const{className:r,type:t="circular",vertical:i,color:l,size:f,textColor:c,children:p,textSize:g}=e,d=q.useMemo(()=>Object.assign({color:l},IL(f)),[l,f]),m=()=>p?Q("span",Object.assign({className:Oe(Ng("text")),style:{fontSize:cl(g),color:c??l}},{children:p})):null;return Me("div",Object.assign({className:Oe(r,Ng([t,{vertical:i}])),style:e.style},{children:[Q("span",Object.assign({className:Oe(Ng("spinner",t)),style:d},{children:oz(Ng)[t]})),m()]}))},lz="#fff",rp="rv-hairline",sz=`${rp}--top`,uz=`${rp}--left`,cz=`${rp}--surround`,fz=`${rp}--top-bottom`,dz=`${rp}-unset--top-bottom`,wD="rv-shadow",hz="__REACT_VANT_COMPONENT",_D=q.createContext({}),[ap]=xn("button"),pz=e=>{const{color:r,loading:t,className:i,hairline:l,loadingText:f,round:c,square:p,plain:g,block:d,loadingType:m,nativeType:C,iconPosition:b}=e,x=Va(e,["color","loading","className","hairline","loadingText","round","square","plain","block","loadingType","nativeType","iconPosition"]),{parent:E}=q.useContext(_D),k=q.useMemo(()=>e.size||(E==null?void 0:E.size)||"normal",[E==null?void 0:E.size,e.size]),D=q.useMemo(()=>e.type||(E==null?void 0:E.type)||"default",[E==null?void 0:E.type,e.type]),T=q.useMemo(()=>g??(E==null?void 0:E.plain),[E==null?void 0:E.plain,g]),A=q.useMemo(()=>d??(E==null?void 0:E.block),[E==null?void 0:E.block,d]),S=q.useMemo(()=>b||(E==null?void 0:E.iconPosition)||"left",[E==null?void 0:E.iconPosition,b]),O=q.useMemo(()=>{var Z;return(Z=e.disabled)!==null&&Z!==void 0?Z:E==null?void 0:E.disabled},[E==null?void 0:E.disabled,e.disabled]),P=q.useMemo(()=>C||(E==null?void 0:E.nativeType)||"button",[E==null?void 0:E.nativeType,C]),N=q.useMemo(()=>e.tag||(E==null?void 0:E.tag)||"button",[E==null?void 0:E.tag,e.tag]),U=Oe(i,ap([D,k,{plain:T,loading:t,disabled:O,hairline:l,block:A,round:c,square:p}]),{[cz]:l},e.shadow&&`${wD}--${+e.shadow}`),$=Object.assign({},e.style);r&&($.color=T?r:lz,T||($.background=r),r.indexOf("gradient")!==-1?$.border=0:$.borderColor=r);const F=Z=>{!t&&!O&&e.onClick&&e.onClick(Z)},L=()=>{if(t){const{loadingSize:Z="20px"}=e;return Q(Q2,{className:Oe(ap("loading")),size:Z,type:m,color:D==="default"?void 0:""})}return null},I=()=>e.loading?L():e.icon?q.cloneElement(e.icon,{className:Oe(ap("icon"))}):null,H=()=>{let Z;return t?Z=f:Z=e.children||e.text,Z?Q("span",Object.assign({className:Oe(ap("text"))},{children:Z}),"text"):null};return Q(N,Object.assign({},x,{disabled:O,className:U,style:$,type:P,onClick:F},{children:(()=>Me("div",Object.assign({className:Oe(ap("content"))},{children:[S==="left"&&I(),H(),S==="right"&&I()]})))()}))},[vz]=xn("button-group"),ip=Object.assign(pz,{Group:e=>{var{className:r,style:t,children:i,onClick:l}=e,f=Va(e,["className","style","children","onClick"]);return Q("div",Object.assign({onClick:p=>{f.disabled||l==null||l(p)},style:t,className:Oe(r,vz([f.type,{round:f.round,plain:f.plain,disabled:f.disabled}]),f.shadow&&`${wD}--${+f.shadow}`)},{children:Q(_D.Provider,Object.assign({value:{parent:f}},{children:i}))}))}}),fZ="";function Jr(...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[ED]=xn("badge"),mz=e=>{const r=Jr(e,{tag:"div",showZero:!0}),{content:t,max:i,dot:l,showZero:f,tag:c="div"}=r,p=c,g=()=>r.content?!0:Xr(t)&&t!==""&&(f||+t!=0),d=()=>!l&&g()?Xr(i)&&sD(t==null?void 0:t.toString())&&+t>i?`${i}+`:t:null,m=()=>{if(g()||r.dot){let C={background:r.color};if(r.offset){const[b,x]=r.offset;r.children?(C.top=cl(x),C.right=cl(b)):(C.marginTop=cl(x),C.marginLeft=cl(b))}return r.children||(C=Object.assign(Object.assign({},r.style),C)),Q("div",Object.assign({className:Oe({[r.className]:r.className&&!r.children},ED({dot:r.dot,fixed:!!r.children})),style:C},{children:d()}))}return null};return r.children?Me(p,Object.assign({className:Oe(ED("wrapper"),r.className),style:r.style,onClick:r.onClick,onTouchStart:r.onTouchStart},{children:[r.children,m()]})):m()},hZ="";var gz=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 yz(e){return e.substring(3).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}const is=q.forwardRef((e,r)=>{const{name:t="",className:i,style:l,spin:f,rotate:c,tabIndex:p,onClick:g,children:d}=e,m=gz(e,["name","className","style","spin","rotate","tabIndex","onClick","children"]),C={};c&&(C.msTransform=`rotate(${c}deg)`,C.transform=`rotate(${c}deg)`);const b=t?yz(t):void 0;let x=p;x===void 0&&g&&(x=-1);const E=Object.assign({role:"img","aria-label":b,focusable:"false","data-icon":b,"aria-hidden":"true",preserveAspectRatio:"xMidYMid meet",ref:r,tabIndex:x,onClick:g,className:["rv-icon",b?`rv-icon-${b}`:"",f?"rv-icon--spin":"",i].join(" ").trim(),style:Object.assign(Object.assign({},l),C)},m);return q.cloneElement(d,E)}),xz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),bz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowDown"},e,{ref:r}),Fe.createElement(xz,null))),Cz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),wz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowLeft"},e,{ref:r}),Fe.createElement(Cz,null))),_z=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Ez=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowUp"},e,{ref:r}),Fe.createElement(_z,null))),Sz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Dz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrow"},e,{ref:r}),Fe.createElement(Sz,null))),kz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgClear"},e,{ref:r}),Fe.createElement(kz,null))),Tz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Z2=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgCross"},e,{ref:r}),Fe.createElement(Tz,null))),Az=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Oz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgPlus"},e,{ref:r}),Fe.createElement(Az,null))),Rz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Fz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgQuestionO"},e,{ref:r}),Fe.createElement(Rz,null))),Nz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),SD=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgSuccess"},e,{ref:r}),Fe.createElement(Nz,null))),EZ="",[DD]=xn("cell-group"),Mz=e=>{const r=Jr(e,{border:!0}),{title:t,border:i,inset:l,card:f}=r,c=f||l,p=()=>Q("div",Object.assign({className:Oe(DD({inset:c}),{[fz]:!c&&i})},{children:r.children})),g=()=>t?Q("div",Object.assign({className:Oe(DD("title"))},{children:t})):null;return Me("div",Object.assign({className:r.className,style:r.style},{children:[g(),p()]}))},[dd]=xn("cell"),X2=Object.assign(e=>{const r=()=>Xr(e.label)?Q("div",Object.assign({className:Oe(dd("label"),e.labelClass)},{children:e.label})):null,t=()=>Xr(e.title)?Me("div",Object.assign({className:Oe(dd("title"),e.titleClass),style:e.titleStyle},{children:[e.title,r()]})):null,i=()=>{const D=Xr(e.title);return Xr(e.children)||Xr(e.value)?Q("div",Object.assign({className:Oe(dd("value",{alone:!D}),e.valueClass)},{children:Xr(e.children)?e.children:Q("span",{children:e.value})})):null},l=()=>e.icon?q.cloneElement(e.icon,{className:Oe(dd("left-icon"))}):null,f=()=>{if(e.rightIcon)return e.rightIcon;if(e.isLink){const D=Oe(dd("right-icon"));return e.arrowDirection==="left"?Q(wz,{className:D}):e.arrowDirection==="up"?Q(Ez,{className:D}):e.arrowDirection==="down"?Q(bz,{className:D}):Q(Dz,{className:D})}return null},{className:c,style:p,size:g,center:d,border:m=!0,isLink:C,required:b,onClick:x}=e,E=C||e.clickable,k={center:d,required:b,clickable:E,borderless:!m};return g&&(k[g]=!!g),Me("div",Object.assign({style:p,className:Oe(dd(k),c),role:E?"button":void 0,onClick:x},{children:[l(),t(),i(),f(),e.extra]}))},{Group:Mz}),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 kD(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Pg(e,r)}function Pz(e,r){return e.classList?!!r&&e.classList.contains(r):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+r+" ")!==-1}function Bz(e,r){e.classList?e.classList.add(r):Pz(e,r)||(typeof e.className=="string"?e.className=e.className+" "+r:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+r))}function TD(e,r){return e.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Lz(e,r){e.classList?e.classList.remove(r):typeof e.className=="string"?e.className=TD(e.className,r):e.setAttribute("class",TD(e.className&&e.className.baseVal||"",r))}const AD={disabled:!1};var zz=process.env.NODE_ENV!=="production"?bt.exports.oneOfType([bt.exports.number,bt.exports.shape({enter:bt.exports.number,exit:bt.exports.number,appear:bt.exports.number}).isRequired]):null,Uz=process.env.NODE_ENV!=="production"?bt.exports.oneOfType([bt.exports.string,bt.exports.shape({enter:bt.exports.string,exit:bt.exports.string,active:bt.exports.string}),bt.exports.shape({enter:bt.exports.string,enterDone:bt.exports.string,enterActive:bt.exports.string,exit:bt.exports.string,exitDone:bt.exports.string,exitActive:bt.exports.string})]):null;const OD=q.createContext(null);var op="unmounted",Fc="exited",Nc="entering",hd="entered",J2="exiting",os=function(e){kD(r,e);function r(i,l){var f;f=e.call(this,i,l)||this;var c=l,p=c&&!c.isMounting?i.enter:i.appear,g;return f.appearStatus=null,i.in?p?(g=Fc,f.appearStatus=Nc):g=hd:i.unmountOnExit||i.mountOnEnter?g=op:g=Fc,f.state={status:g},f.nextCallback=null,f}r.getDerivedStateFromProps=function(l,f){var c=l.in;return c&&f.status===op?{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!==hd&&(f=Nc):(c===Nc||c===hd)&&(f=J2)}this.updateStatus(!1,f)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var l=this.props.timeout,f,c,p;return f=c=p=l,l!=null&&typeof l!="number"&&(f=l.exit,c=l.enter,p=l.appear!==void 0?l.appear:c),{exit:f,enter:c,appear:p}},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:op})},t.performEnter=function(l){var f=this,c=this.props.enter,p=this.context?this.context.isMounting:l,g=this.props.nodeRef?[p]:[fg.findDOMNode(this),p],d=g[0],m=g[1],C=this.getTimeouts(),b=p?C.appear:C.enter;if(!l&&!c||AD.disabled){this.safeSetState({status:hd},function(){f.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:Nc},function(){f.props.onEntering(d,m),f.onTransitionEnd(b,function(){f.safeSetState({status:hd},function(){f.props.onEntered(d,m)})})})},t.performExit=function(){var l=this,f=this.props.exit,c=this.getTimeouts(),p=this.props.nodeRef?void 0:fg.findDOMNode(this);if(!f||AD.disabled){this.safeSetState({status:Fc},function(){l.props.onExited(p)});return}this.props.onExit(p),this.safeSetState({status:J2},function(){l.props.onExiting(p),l.onTransitionEnd(c.exit,function(){l.safeSetState({status:Fc},function(){l.props.onExited(p)})})})},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(p){c&&(c=!1,f.nextCallback=null,l(p))},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),p=l==null&&!this.props.addEndListener;if(!c||p){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var g=this.props.nodeRef?[this.nextCallback]:[c,this.nextCallback],d=g[0],m=g[1];this.props.addEndListener(d,m)}l!=null&&setTimeout(this.nextCallback,l)},t.render=function(){var l=this.state.status;if(l===op)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 p=wb(f,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return q.createElement(OD.Provider,{value:null},typeof c=="function"?c(l,p):q.cloneElement(q.Children.only(c),p))},r}(q.Component);os.contextType=OD,os.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:bt.exports.shape({current:typeof Element>"u"?bt.exports.any:function(e,r,t,i,l,f){var c=e[r];return bt.exports.instanceOf(c&&"ownerDocument"in c?c.ownerDocument.defaultView.Element:Element)(e,r,t,i,l,f)}}),children:bt.exports.oneOfType([bt.exports.func.isRequired,bt.exports.element.isRequired]).isRequired,in:bt.exports.bool,mountOnEnter:bt.exports.bool,unmountOnExit:bt.exports.bool,appear:bt.exports.bool,enter:bt.exports.bool,exit:bt.exports.bool,timeout:function(r){var t=zz;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:bt.exports.func,onEnter:bt.exports.func,onEntering:bt.exports.func,onEntered:bt.exports.func,onExit:bt.exports.func,onExiting:bt.exports.func,onExited:bt.exports.func}:{};function pd(){}os.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pd,onEntering:pd,onEntered:pd,onExit:pd,onExiting:pd,onExited:pd},os.UNMOUNTED=op,os.EXITED=Fc,os.ENTERING=Nc,os.ENTERED=hd,os.EXITING=J2;const RD=os;var jz=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Bz(r,i)})},eC=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Lz(r,i)})},tC=function(e){kD(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(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1];i.removeClasses(m,"exit"),i.addClass(m,C?"appear":"enter","base"),i.props.onEnter&&i.props.onEnter(p,g)},i.onEntering=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.addClass(m,b,"active"),i.props.onEntering&&i.props.onEntering(p,g)},i.onEntered=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.removeClasses(m,b),i.addClass(m,b,"done"),i.props.onEntered&&i.props.onEntered(p,g)},i.onExit=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"appear"),i.removeClasses(d,"enter"),i.addClass(d,"exit","base"),i.props.onExit&&i.props.onExit(p)},i.onExiting=function(p){var g=i.resolveArguments(p),d=g[0];i.addClass(d,"exit","active"),i.props.onExiting&&i.props.onExiting(p)},i.onExited=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"exit"),i.addClass(d,"exit","done"),i.props.onExited&&i.props.onExited(p)},i.resolveArguments=function(p,g){return i.props.nodeRef?[i.props.nodeRef.current,p]:[p,g]},i.getClassNames=function(p){var g=i.props.classNames,d=typeof g=="string",m=d&&g?g+"-":"",C=d?""+m+p:g[p],b=d?C+"-active":g[p+"Active"],x=d?C+"-done":g[p+"Done"];return{baseClassName:C,activeClassName:b,doneClassName:x}},i}var t=r.prototype;return t.addClass=function(l,f,c){var p=this.getClassNames(f)[c+"ClassName"],g=this.getClassNames("enter"),d=g.doneClassName;f==="appear"&&c==="done"&&d&&(p+=" "+d),c==="active"&&l&&l.scrollTop,p&&(this.appliedClasses[f][c]=p,jz(l,p))},t.removeClasses=function(l,f){var c=this.appliedClasses[f],p=c.base,g=c.active,d=c.done;this.appliedClasses[f]={},p&&eC(l,p),g&&eC(l,g),d&&eC(l,d)},t.render=function(){var l=this.props;l.classNames;var f=wb(l,["classNames"]);return q.createElement(RD,Nr({},f,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(q.Component);tC.defaultProps={classNames:""},tC.propTypes=process.env.NODE_ENV!=="production"?Nr({},RD.propTypes,{classNames:Uz,onEnter:bt.exports.func,onEntering:bt.exports.func,onEntered:bt.exports.func,onExit:bt.exports.func,onExiting:bt.exports.func,onExited:bt.exports.func}):{};const FD=tC;function un(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const OZ="",[Iz]=xn("overlay"),Hz=e=>{const r=q.useRef(null),t=Jr(e,{stopPropagation:["click"],lockScroll:!0,duration:300}),{visible:i,duration:l}=t,f=p=>{t.lockScroll&&$2(p,!0)},c=()=>{const p=Object.assign(Object.assign({zIndex:t.zIndex!==void 0?+t.zIndex:void 0,touchAction:t.lockScroll&&"none"},t.style),t.customStyle);return Xr(l)&&(p.animationDuration=`${l}ms`),aD(t.stopPropagation,Q("div",Object.assign({ref:r,style:p,onClick:g=>{var d;g.target===g.currentTarget&&((d=t.onClick)===null||d===void 0||d.call(t,g))},className:Oe(Iz(),t.className)},{children:t.children})))};return G2("touchmove",f,{target:r}),Q(FD,Object.assign({nodeRef:r,mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:l,classNames:"rv-fade"},{children:c()}))};function Vz(e){const{interceptor:r,args:t,done:i,canceled:l}=e;if(r){const f=r.apply(null,t||[]);RL(f)?f.then(c=>{c?i():l&&l()}).catch(Ni):f?i():l&&l()}else i()}function nC(e){return(typeof e=="function"?e():e)||document.body}function Bg(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function $z(e,r){if(Bg()&&e){const t=nC(e);return eu.exports.createPortal(r,t)}return r}const Yz=q.createContext({});let ND=!1;if(Bg())try{const e={};Object.defineProperty(e,"passive",{get(){ND=!0}}),window.addEventListener("test-passive",null,e)}catch{}let lp=0;const MD="rv-overflow-hidden";function qz(e,r){const t=yD(),i=c=>{t.move(c);const p=t.deltaY.current>0?"10":"01",g=ez(c.target,e.current);if(!g)return;const{scrollHeight:d,offsetHeight:m,scrollTop:C}=g;let b="11";C===0?b=m>=d?"00":"01":C+m>=d&&(b="10"),b!=="11"&&t.isVertical()&&!(parseInt(b,2)&parseInt(p,2))&&c.cancelable&&c.preventDefault()},l=()=>{document.addEventListener("touchstart",t.start),document.addEventListener("touchmove",i,ND?{passive:!1}:!1),lp||document.body.classList.add(MD),lp++},f=()=>{lp&&(document.removeEventListener("touchstart",t.start),document.removeEventListener("touchmove",i),lp--,lp||document.body.classList.remove(MD))};q.useEffect(()=>{if(r)return l(),()=>{f()}},[r])}let PD=2e3;const[Lg]=xn("popup"),sp=q.forwardRef((e,r)=>{var t;const i=Jr(e,{duration:300,overlay:!0,lockScroll:!0,position:"center",closeIcon:Q(Z2,{}),closeIconPosition:"top-right",closeOnClickOverlay:!0,stopPropagation:["click"],teleport:()=>document.body}),{round:l,closeable:f,title:c,description:p,children:g,duration:d,closeIcon:m,position:C}=i,b=q.useRef(!1),x=q.useRef((t=i.zIndex)!==null&&t!==void 0?t:PD),E=q.useRef(),[k,D]=q.useState(i.visible),[T,A]=q.useState(k),S=q.useMemo(()=>{const W=Object.assign({zIndex:x.current},i.style);if(Xr(i.duration)){const Z=i.position==="center"?"animationDuration":"transitionDuration";W[Z]=`${i.duration}ms`}return W},[x.current,i.position,i.style,i.duration]),O=()=>{var W;i.zIndex!==void 0?x.current=+i.zIndex:x.current=PD++,b.current=!0,(W=i.onOpen)===null||W===void 0||W.call(i)},P=()=>{Vz({interceptor:i.beforeClose,args:["close"],done:()=>{var W;b.current=!1,(W=i.onClose)===null||W===void 0||W.call(i)}})},z=W=>{var Z;(Z=i.onClickOverlay)===null||Z===void 0||Z.call(i,W),i.closeOnClickOverlay&&P()},N=()=>i.overlay?Q(Hz,{visible:k,className:i.overlayClass,customStyle:i.overlayStyle,zIndex:x.current,duration:d,onClick:z}):null,U=W=>{i.onClickCloseIcon&&i.onClickCloseIcon(W),P()},$=()=>{if(f){const{closeIconPosition:W}=i;return m?Q("div",Object.assign({className:Oe(Lg("close-icon",W)),onClick:U},{children:m})):null}return null},F=()=>c?Q("div",Object.assign({className:Oe(Lg("title"))},{children:c})):null,L=()=>p?Q("div",Object.assign({className:Oe(Lg("description"))},{children:p})):null,I=()=>{const{safeAreaInsetBottom:W}=i;return aD(i.stopPropagation,Me("div",Object.assign({ref:E,style:Object.assign(Object.assign({},S),{display:!k&&!T?"none":void 0}),className:Oe(Lg({round:l,[C]:C}),{"rv-safe-area-bottom":W},i.className),onClick:i.onClick},{children:[F(),L(),g,$()]})))},H=()=>{const{transition:W,destroyOnClose:Z,forceRender:X}=i,re=C==="center"?"rv-fade":`rv-popup-slide-${C}`;return Q(FD,Object.assign({in:k,nodeRef:E,timeout:d,classNames:W||re,mountOnEnter:!X,unmountOnExit:Z,onEnter:O,onEntered:i.onOpened,onExited:()=>{var K;A(!1),(K=i.onClosed)===null||K===void 0||K.call(i)}},{children:I()}))};return G2("popstate",()=>{i.closeOnPopstate&&P()}),tp(()=>{k&&A(!0)},[k]),tp(()=>{D(i.visible)},[i.visible]),qz(E,k&&i.lockScroll),q.useImperativeHandle(r,()=>({popupRef:E})),$z(i.teleport,Me(Yz.Provider,Object.assign({value:{visible:k}},{children:[N(),H()]})))}),MZ="",BD=q.createContext({}),[Gz]=xn("action-bar"),Kz=e=>{const r=Jr(e,{safeAreaInsetBottom:!0}),t=q.useMemo(()=>q.Children.toArray(r.children),[r.children]);return Q(BD.Provider,Object.assign({value:{parent:{children:t}}},{children:Q("div",Object.assign({className:Oe(r.className,Gz(),{"rv-safe-area-bottom":r.safeAreaInsetBottom}),style:r.style},{children:q.Children.toArray(r.children).filter(Boolean).map((i,l)=>q.cloneElement(i,{index:l}))}))}))},[LD]=xn("action-bar-icon"),Wz=e=>{const r=()=>{const{badge:t,icon:i}=e;return i?Q(mz,Object.assign({},t,{className:Oe(LD("icon"))},{children:i})):null};return Me("div",Object.assign({role:"button",className:Oe(e.className,LD()),style:e.style,tabIndex:0,onClick:e.onClick},{children:[r(),e.children||e.text]}))},[Qz]=xn("action-bar-button"),Zz=Object.assign(e=>{const{type:r,icon:t,text:i,color:l,loading:f,disabled:c,index:p}=e,{parent:g}=q.useContext(BD),d=q.useMemo(()=>{if(g){const C=g.children[p-1];return!(C&&"isButton"in C.type)}return!1},[p,g]),m=q.useMemo(()=>{if(g){const C=g.children[p+1];return!(C&&"isButton"in C.type)}return!1},[p,g]);return Q(ip,Object.assign({className:Oe(e.className,Qz([r,{last:m,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}),rC=Object.assign(Kz,{Icon:Wz,Button:Zz});function Xz(e,r,t){const i=r[t];Xr(i)&&(!Object.prototype.hasOwnProperty.call(e,t)||!cd(i)?e[t]=i:e[t]=zD(Object(e[t]),r[t]))}function zD(e,r){return Object.keys(r).forEach(t=>{Xz(e,r,t)}),e}const Jz={locale:zD({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=q.createContext(Jz),[bo]=xn("dialog"),UD=e=>{const{locale:r}=q.useContext(vd),t=Jr(e,{transition:"rv-dialog-bounce",showConfirmButton:!0,closeOnPopstate:!0}),{width:i,title:l,theme:f,visible:c,message:p,className:g,messageAlign:d,closeOnClickOverlay:m,onClickCloseIcon:C}=t,b=Va(t,["width","title","theme","visible","message","className","messageAlign","closeOnClickOverlay","onClickCloseIcon"]),x=()=>t.title?Q("div",Object.assign({className:Oe(bo("header",{isolated:!t.message&&!t.children}))},{children:l})):null,E=()=>t.children?Q("div",Object.assign({className:Oe(bo("content"))},{children:t.children})):p?Q("div",Object.assign({className:Oe(bo("content",{isolated:!l}))},{children:Q("div",Object.assign({className:Oe(bo("message",{"has-title":l,[d]:d}))},{children:p}))})):null,k=()=>{var A,S,O,P,z,N;return Me("div",Object.assign({className:Oe(sz,bo("footer"))},{children:[t.showCancelButton&&Q(ip,{size:"large",text:t.cancelButtonText||r.cancel,className:Oe(bo("cancel")),style:{color:t.cancelButtonColor},loading:(A=t.cancelProps)===null||A===void 0?void 0:A.loading,disabled:(S=t.cancelProps)===null||S===void 0?void 0:S.disabled,onClick:!((O=t.cancelProps)===null||O===void 0)&&O.loading?Ni:t.onCancel}),t.showConfirmButton&&Q(ip,{size:"large",text:t.confirmButtonText||r.confirm,className:Oe(bo("confirm"),{[uz]:t.showCancelButton}),round:f==="round-button"||void 0,style:{color:t.confirmButtonColor},loading:(P=t.confirmProps)===null||P===void 0?void 0:P.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((N=t.confirmProps)===null||N===void 0)&&N.loading?Ni:t.onConfirm})]}))},D=()=>{var A,S,O,P,z,N;return Me(rC,Object.assign({className:Oe(bo("footer"))},{children:[t.showCancelButton&&Q(rC.Button,{type:"warning",text:t.cancelButtonText||r.cancel,className:Oe(bo("cancel")),color:t.cancelButtonColor,loading:(A=t.cancelProps)===null||A===void 0?void 0:A.loading,disabled:(S=t.cancelProps)===null||S===void 0?void 0:S.disabled,onClick:!((O=t.cancelProps)===null||O===void 0)&&O.loading?Ni:t.onCancel}),t.showConfirmButton&&Q(rC.Button,{type:"danger",text:t.confirmButtonText||r.confirm,className:Oe(bo("confirm")),color:t.confirmButtonColor,loading:(P=t.confirmProps)===null||P===void 0?void 0:P.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((N=t.confirmProps)===null||N===void 0)&&N.loading?Ni:t.onConfirm})]}))},T=()=>t.footer?t.footer:t.theme==="round-button"?D():k();return Me(sp,Object.assign({},b,{visible:c,className:Oe(bo([f]),g),style:{width:cl(i)},"aria-labelledby":l||p,closeOnClickOverlay:m,onClickCloseIcon:C,onClose:t.onClose,onClosed:t.onClosed},{children:[x(),E(),T()]}))};Number((q.version||"").split(".")[0]);const eU=Number((eu.exports.version||"").split(".")[0]),zg=Object.assign({},p9),{render:tU,unmountComponentAtNode:nU}=zg;let Ug;try{eU>=18&&zg.createRoot&&(Ug=zg.createRoot)}catch{}function jD(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 rU(e,r){tU(e,r)}function aU(e,r){jD(!0);const t=r[jg]||Ug(r);jD(!1),t.render(e),r[jg]=t}function ID(e,r){if(Ug){aU(e,r);return}rU(e,r)}function iU(e){return nU(e)}function oU(e){return W2(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 HD(e){return Ug?oU(e):iU(e)}const md=UD;md.show=e=>{if(!Bg())return null;const r={overlay:!0,closeable:!1,closeIcon:Q(Z2,{}),lockScroll:!0,transition:"rv-dialog-bounce",showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1},{onClosed:t,onCancel:i=Ni,onConfirm:l=Ni,onClose:f=Ni,cancelProps:c,confirmProps:p}=e,g=Va(e,["onClosed","onCancel","onConfirm","onClose","cancelProps","confirmProps"]),d=nC(e.teleport),m=document.createElement("div");d.appendChild(m);let C=Ni;return ID(Q(()=>{const[x,E]=q.useState(!1),[k,D]=q.useState(!1),[T,A]=q.useState(!1);q.useEffect(()=>{E(!0)},[]),C=()=>{E(!1),f&&f()};const S=()=>{t&&t(),HD(m)&&m.parentNode&&m.parentNode.removeChild(m)},O=z=>W2(void 0,void 0,void 0,function*(){const N=setTimeout(()=>A(!0));(yield l(z))!==!1?(clearTimeout(N),C()):(clearTimeout(N),A(!1))}),P=(z,N)=>W2(void 0,void 0,void 0,function*(){if(N){C();return}const U=setTimeout(()=>D(!0));(yield i(z))!==!1?(clearTimeout(U),C()):(clearTimeout(U),D(!1))});return Q(UD,Object.assign({},r,g,{visible:x,teleport:()=>m,cancelProps:Object.assign({loading:k},c),confirmProps:Object.assign({loading:T},p),onClose:C,onCancel:P,onConfirm:O,onClosed:S}))},{}),m),C},md.alert=e=>{const{onConfirm:r=Ni}=e;return new Promise(t=>{md.show(Object.assign(Object.assign({},e),{onConfirm:i=>{r(i),t(i)}}))})},md.confirm=e=>{const{onCancel:r=Ni,onConfirm:t=Ni}=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 lU=md,[up]=xn("input"),sU=q.forwardRef((e,r)=>{const t=Jr(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),i=q.useRef(),[l,f]=q.useState(!1),c=q.useRef(!1),[p,g]=np(t),{className:d,style:m,align:C,type:b,name:x,placeholder:E,disabled:k,readOnly:D,maxLength:T,autoFocus:A}=t,S=()=>{i!=null&&i.current&&i.current.focus()},O=()=>{i!=null&&i.current&&i.current.blur()};q.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:S,blur:O,get nativeElement(){return i.current}}));const P=q.useMemo(()=>{if(t.clearable&&!D){const I=p!=="",H=t.clearTrigger==="always"||t.clearTrigger==="focus"&&l;return I&&H}return!1},[p,t.clearTrigger,l]),z=I=>{var H;let W=I;if(!c.current&&(Xr(T)&&W.length>+T&&(W=W.slice(0,T),(H=t.onOverlimit)===null||H===void 0||H.call(t)),b==="number"||b==="digit")){const Z=b==="number";W=qL(W,Z,Z)}g(W)},N=I=>{var H;f(!0),(H=t.onFocus)===null||H===void 0||H.call(t,I),D&&O()},U=I=>{var H;f(!1),(H=t.onBlur)===null||H===void 0||H.call(t,I),lD()},$=I=>{var H;(I.key==="Enter"||+I.charCode==13)&&($2(I),t.type==="search"&&O()),(H=t.onKeyPress)===null||H===void 0||H.call(t,I)},F=()=>{let I=b,H;return b==="number"&&(I="text",H="decimal"),b==="digit"&&(I="tel",H="numeric"),Q("input",{value:p,type:I,inputMode:H,ref:i,name:x,className:Oe(up("control")),disabled:k,autoFocus:A,readOnly:D,placeholder:E||"",onBlur:U,onFocus:N,onChange:W=>{var Z;return z((Z=W==null?void 0:W.currentTarget)===null||Z===void 0?void 0:Z.value)},onKeyPress:$,autoCapitalize:t.autoCapitalize,autoCorrect:t.autoCorrect,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onCompositionStart:W=>{var Z;c.current=!0,(Z=t.onCompositionStart)===null||Z===void 0||Z.call(t,W)},onCompositionEnd:W=>{var Z,X;c.current=!1,(Z=t.onCompositionEnd)===null||Z===void 0||Z.call(t,W),z((X=W==null?void 0:W.currentTarget)===null||X===void 0?void 0:X.value)},onClick:t.onClick})},L=I=>{var H;g(""),(H=t.onClear)===null||H===void 0||H.call(t,I)};return Me("div",Object.assign({className:Oe(up([C]),d),style:m},{children:[t.prefix&&Q("div",Object.assign({className:Oe(up("prefix"))},{children:t.prefix})),F(),P&&q.cloneElement(t.clearIcon||Q(Mg,{}),{className:Oe(up("clear")),onTouchStart:L}),t.suffix&&Q("div",Object.assign({className:Oe(up("suffix"))},{children:t.suffix}))]}))}),[cp]=xn("textarea"),uU=q.forwardRef((e,r)=>{const t=Jr(e,{rows:2,clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),[i,l]=q.useState(!1),f=q.useRef(),c=q.useRef(!1),[p,g]=np(t),{className:d,style:m,name:C,rows:b,placeholder:x,disabled:E,readOnly:k,maxLength:D,showWordLimit:T,autoFocus:A}=t,S=()=>{f!=null&&f.current&&f.current.focus()},O=()=>{f!=null&&f.current&&f.current.blur()};q.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:S,blur:O,get nativeElement(){return f.current}}));const P=()=>{const H=f.current;if(!H)return;H.style.height="auto";let W=H.scrollHeight;if(cd(t.autoSize)){const{maxHeight:Z,minHeight:X}=t.autoSize;Z&&(W=Math.min(W,Z)),X&&(W=Math.max(W,X))}W&&(H.style.height=`${W}px`)};q.useEffect(()=>{P()},[p]);const z=q.useMemo(()=>cp("control",[{"min-height":!t.autoSize,clear:t.clearable}]),[t.autoSize]),N=H=>{var W;let Z=H;c.current||Xr(D)&&Z.length>+D&&(Z=Z.slice(0,D),(W=t.onOverlimit)===null||W===void 0||W.call(t)),g(Z)},U=H=>{var W;l(!0),(W=t.onFocus)===null||W===void 0||W.call(t,H),k&&O()},$=H=>{var W;l(!1),(W=t.onBlur)===null||W===void 0||W.call(t,H),lD()},F=()=>{if(T){const H=(p?`${p}`:"").length;return Q("div",Object.assign({className:Oe(cp("word-limit"))},{children:typeof T=="function"?T({currentCount:H,maxLength:D}):Me(nn,{children:[Q("span",Object.assign({className:Oe(cp("word-num"))},{children:H})),D?`/${D}`:!1]})}))}return null},L=H=>{var W;g(""),(W=t.onClear)===null||W===void 0||W.call(t,H)},I=q.useMemo(()=>{if(t.clearable&&!k){const H=p!=="",W=t.clearTrigger==="always"||t.clearTrigger==="focus"&&i;return H&&W}return!1},[p,t.clearTrigger,i]);return Me("div",Object.assign({className:Oe(cp(),d),style:m},{children:[Q("textarea",{ref:f,name:C,rows:b,className:Oe(z),value:p,disabled:E,autoFocus:A,readOnly:k,placeholder:x||"",onBlur:$,onFocus:U,onChange:H=>{var W;return N((W=H==null?void 0:H.currentTarget)===null||W===void 0?void 0:W.value)},onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,autoComplete:t.autoComplete,onCompositionStart:H=>{var W;c.current=!0,(W=t.onCompositionStart)===null||W===void 0||W.call(t,H)},onCompositionEnd:H=>{var W,Z;c.current=!1,(W=t.onCompositionEnd)===null||W===void 0||W.call(t,H),N((Z=H==null?void 0:H.currentTarget)===null||Z===void 0?void 0:Z.value)},onClick:t.onClick}),I&&q.cloneElement(t.clearIcon,{className:Oe(cp("clear")),onTouchStart:L}),F()]}))}),KZ="",WZ="",cu=Object.assign(sU,{TextArea:uU}),[Mi]=xn("field"),cU=q.forwardRef((e,r)=>{var t;const i=Jr(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",formatTrigger:"onChange",defaultValue:""}),l=q.useRef(null),f=q.useRef(null),c=i.type==="textarea"?f:l,p=()=>{c.current&&c.current.focus()},g=()=>{c.current&&c.current.blur()},d=()=>{c.current&&c.current.clear()};q.useImperativeHandle(r,()=>({focus:p,blur:g,clear:d,get nativeElement(){return c.current.nativeElement}}));const m=V=>Xr(i[V])?i[V]:null,C=()=>{const V=m("labelWidth");return V?{width:cl(V)}:{}},b=(V,ee="onChange")=>{const{formatTrigger:ie,formatter:ae}=i;return ae&&ee===ie?ae(V):V},x=V=>{var ee;(ee=i.onChange)===null||ee===void 0||ee.call(i,b(V))},E=()=>{const{value:V,defaultValue:ee,align:ie,type:ae,placeholder:pe,name:xe,maxLength:Ee,disabled:se,readOnly:Ne,clearable:Te,clearIcon:tt,clearTrigger:Se,autoFocus:lt,onClear:je,onBlur:Pt,onFocus:_t,onKeyPress:gt,onOverlimit:bn}=i;if(Xr(i.children))return Q("div",Object.assign({className:Oe(Mi("children"))},{children:i.children}));const Ln={value:V,onChange:x,placeholder:pe,name:xe,defaultValue:ee,disabled:se,clearable:Te,clearIcon:tt,clearTrigger:Se,onClear:je,onBlur:Pt,onFocus:_t,onKeyPress:gt,onOverlimit:bn,autoFocus:lt,readOnly:Ne,maxLength:Ee,onClick:i.onClickInput};return ae==="textarea"?Q(cu.TextArea,Object.assign({ref:f,autoSize:i.autoSize,showWordLimit:i.showWordLimit,rows:i.rows},Ln)):Q(cu,Object.assign({ref:l,type:ae,align:ie},Ln))},k=()=>{const{leftIcon:V,onClickLeftIcon:ee}=i;return V?Q("div",Object.assign({className:Oe(Mi("left-icon")),onClick:ee},{children:V})):null},D=()=>{const{rightIcon:V,onClickRightIcon:ee}=i;return V?Q("div",Object.assign({className:Oe(Mi("right-icon")),onClick:ee},{children:V})):null},T=()=>{const V=i.errorMessage;return V?Q("div",Object.assign({className:Oe(Mi("error-message"))},{children:V})):null},A=()=>i.intro?Q("div",Object.assign({className:Oe(Mi("intro"))},{children:i.intro})):null,S=()=>{const{tooltip:V}=i;if(V){let ee=Q(Fz,{}),ie={message:V};if(!(q.isValidElement(V)||typeof V=="string")){const ae=V,{icon:pe}=ae,xe=Va(ae,["icon"]);ee=pe||ee,ie=xe}return Q("div",Object.assign({className:Oe(Mi("tooltip")),onClick:()=>lU.show(ie)},{children:ee}))}return null},O=()=>{const{label:V,colon:ee}=i;return V?Me(nn,{children:[V,!!ee&&":",S()]}):null},{size:P,center:z,border:N,isLink:U,required:$,clickable:F,labelAlign:L,className:I,labelClass:H,valueClass:W,controlAlign:Z,arrowDirection:X,disabled:re,titleStyle:K,error:te}=i,G=(t=i.suffix)!==null&&t!==void 0?t:i.button;return Me(X2,Object.assign({title:O(),size:P,icon:k(),center:z,border:N,isLink:U,required:$,clickable:F,extra:i.extra,titleStyle:Object.assign(Object.assign({},C()),K),valueClass:Oe(Mi("value",[Z]),W),titleClass:Oe(Mi("label",L),H),arrowDirection:X,onClick:i.onClick,style:i.style,className:Oe(Mi({error:te,disabled:re,[`label-${L}`]:L}),I)},{children:[Me("div",Object.assign({className:Oe(Mi("body"))},{children:[i.prefix&&Q("div",Object.assign({className:Oe(Mi("prefix"))},{children:i.prefix})),Q("div",Object.assign({className:Oe(Mi("control-wrapper"))},{children:E()})),D(),G&&Q("div",Object.assign({className:Oe(Mi("suffix"))},{children:G}))]})),T(),A()]}))}),fU=Symbol("field"),aC=Object.assign(cU,{[hz]:fU});function dU(e,r,t){return Math.max(r,Math.min(e,t))}const Ea={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 VD(e,r,t){return r===0||Math.abs(r)===1/0?Math.pow(e,t*5):e*r*t/(r+t*e)}function $D(e,r,t,i=.15){return i===0?dU(e,r,t):e<r?-VD(r-e,t-r,i)+r:e>t?+VD(e-t,t-r,i)+t:e}function hU(e,[r,t],[i,l]){const[[f,c],[p,g]]=e;return[$D(r,f,c,i),$D(t,p,g,l)]}function li(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function YD(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 tr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?YD(Object(t),!0).forEach(function(i){li(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):YD(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}const qD={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 GD(e){return e?e[0].toUpperCase()+e.slice(1):""}const pU=["enter","leave"];function vU(e=!1,r){return e&&!pU.includes(r)}function mU(e,r="",t=!1){const i=qD[e],l=i&&i[r]||r;return"on"+GD(e)+GD(l)+(vU(t,l)?"Capture":"")}const gU=["gotpointercapture","lostpointercapture"];function yU(e){let r=e.substring(2).toLowerCase();const t=!!~r.indexOf("passive");t&&(r=r.replace("passive",""));const i=gU.includes(r)?"capturecapture":"capture",l=!!~r.indexOf(i);return l&&(r=r.replace("capture","")),{device:r,capture:l,passive:t}}function xU(e,r=""){const t=qD[e],i=t&&t[r]||r;return e+i}function Ig(e){return"touches"in e}function KD(e){return Ig(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function bU(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 CU(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function WD(e){return Ig(e)?CU(e)[0]:e}function wU(e){return bU(e).map(r=>r.identifier)}function iC(e){const r=WD(e);return Ig(e)?r.identifier:r.pointerId}function QD(e){const r=WD(e);return[r.clientX,r.clientY]}function _U(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 EU(){}function SU(...e){return e.length===0?EU:e.length===1?e[0]:function(){let r;for(const t of e)r=t.apply(this,arguments)||r;return r}}function ZD(e,r){return Object.assign({},r,e||{})}const DU=32;class kU{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,_U(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 z=t._delta.map(Math.abs);Ea.addTo(t._distance,z)}this.axisIntent&&this.axisIntent(r);const[c,p]=t._movement,[g,d]=i.threshold,{_step:m,values:C}=t;if(i.hasCustomTransform?(m[0]===!1&&(m[0]=Math.abs(c)>=g&&C[0]),m[1]===!1&&(m[1]=Math.abs(p)>=d&&C[1])):(m[0]===!1&&(m[0]=Math.abs(c)>=g&&Math.sign(c)*g),m[1]===!1&&(m[1]=Math.abs(p)>=d&&Math.sign(p)*d)),t.intentional=m[0]!==!1||m[1]!==!1,!t.intentional)return;const b=[0,0];if(i.hasCustomTransform){const[z,N]=C;b[0]=m[0]!==!1?z-m[0]:0,b[1]=m[1]!==!1?N-m[1]:0}else b[0]=m[0]!==!1?c-m[0]:0,b[1]=m[1]!==!1?p-m[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(b);const x=t.offset,E=t._active&&!t._blocked||t.active;E&&(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,D]=t.offset,[[T,A],[S,O]]=t._bounds;t.overflow=[k<T?-1:k>A?1:0,D<S?-1:D>O?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 P=t._active?i.rubberband||[0,0]:[0,0];if(t.offset=hU(t._bounds,t.offset,P),t.delta=Ea.sub(t.offset,x),this.computeMovement(),E&&(!t.last||f>DU)){t.delta=Ea.sub(t.offset,x);const z=t.delta.map(Math.abs);Ea.addTo(t.distance,z),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&f>0&&(t.velocity=[z[0]/f,z[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(tr(tr(tr({},t),r),{},{[this.aliasKey]:r.values}));l!==void 0&&(r.memo=l)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function TU([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 AU extends kU{constructor(...r){super(...r),li(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=Ea.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Ea.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[KD(r)]:i.axisThreshold;t.axis=TU(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 XD=e=>e,JD=.15,oC={enabled(e=!0){return e},eventOptions(e,r,t){return tr(tr({},t.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[JD,JD];case!1:return[0,0];default:return Ea.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Ea.toVector(e)},transform(e,r,t){const i=e||t.shared.transform;if(this.hasCustomTransform=!!i,process.env.NODE_ENV==="development"){const l=i||XD;return f=>{const c=l(f);return!isFinite(c[0])||isFinite(c[1]),c}}return i||XD},threshold(e){return Ea.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(oC,{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 OU=0,fp=tr(tr({},oC),{},{axis(e,r,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(e=OU){return e},bounds(e={}){if(typeof e=="function")return f=>fp.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,ek={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 RU extends AU{constructor(...r){super(...r),li(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=fp.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=iC(r),i._pointerActive=!0,this.computeValues(QD(r)),this.computeInitial(),t.preventScrollAxis&&KD(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=iC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;const f=QD(r);if(document.pointerLockElement===r.target?t._delta=[r.movementX,r.movementY]:(t._delta=Ea.sub(f,t._values),this.computeValues(f)),Ea.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=iC(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[p,g]=t.direction,[d,m]=t.velocity,[C,b]=t.movement,[x,E]=i.swipe.velocity,[k,D]=i.swipe.distance,T=i.swipe.duration;t.elapsedTime<T&&(Math.abs(d)>x&&Math.abs(C)>k&&(t.swipe[0]=p),Math.abs(m)>E&&Math.abs(b)>D&&(t.swipe[1]=g))}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,FU(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=ek[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,Ea.addTo(i._movement,i._delta),this.compute(r),this.emit()}}keyUp(r){r.key in ek&&(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 FU(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const dp=typeof window<"u"&&window.document&&window.document.createElement;function NU(){return dp&&"ontouchstart"in window}function tk(){return NU()||dp&&window.navigator.maxTouchPoints>1}function MU(){return dp&&"onpointerdown"in window}function PU(){return dp&&"exitPointerLock"in window.document}function BU(){try{return"constructor"in GestureEvent}catch{return!1}}const Ji={isBrowser:dp,gesture:BU(),touch:tk(),touchscreen:tk(),pointer:MU(),pointerLock:PU()},LU=250,zU=180,UU=.5,jU=50,IU=250,nk={mouse:0,touch:0,pen:8},rk=tr(tr({},fp),{},{device(e,r,{pointer:{touch:t=!1,lock:i=!1,mouse:l=!1}={}}){return this.pointerLock=i&&Ji.pointerLock,Ji.touch&&t?"touch":this.pointerLock?"mouse":Ji.pointer&&!l?"pointer":Ji.touch?"touch":"mouse"},preventScrollAxis(e,r,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&e?LU:void 0,!(!Ji.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=Ea.toVector(e,t?i:l?1:0);return this.filterTaps=t,this.tapsThreshold=i,f},swipe({velocity:e=UU,distance:r=jU,duration:t=IU}={}){return{velocity:this.transform(Ea.toVector(e)),distance:this.transform(Ea.toVector(r)),duration:t}},delay(e=0){switch(e){case!0:return zU;case!1:return 0;default:return e}},axisThreshold(e){return e?tr(tr({},nk),e):nk}});process.env.NODE_ENV==="development"&&Object.assign(rk,{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}}),tr(tr({},oC),{},{device(e,r,{shared:t,pointer:{touch:i=!1}={}}){if(t.target&&!Ji.touch&&Ji.gesture)return"gesture";if(Ji.touch&&i)return"touch";if(Ji.touchscreen){if(Ji.pointer)return"pointer";if(Ji.touch)return"touch"}},bounds(e,r,{scaleBounds:t={},angleBounds:i={}}){const l=c=>{const p=ZD(Hg(t,c),{min:-1/0,max:1/0});return[p.min,p.max]},f=c=>{const p=ZD(Hg(i,c),{min:-1/0,max:1/0});return[p.min,p.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",Ea.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e}}),tr(tr({},fp),{},{mouseOnly:(e=!0)=>e}),tr(tr({},fp),{},{mouseOnly:(e=!0)=>e});const ak=new Map,lC=new Map;function HU(e){ak.set(e.key,e.engine),lC.set(e.key,e.resolver)}const VU={key:"drag",engine:RU,resolver:rk};function $U(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 YU(e,r){if(e==null)return{};var t=$U(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 qU={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=Ji.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:r=!1}={}){return{passive:e,capture:r}},transform(e){return e}},GU=["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 KU(e,r){const t=e,{target:i,eventOptions:l,window:f,enabled:c,transform:p}=t,g=YU(t,GU),d={shared:$g({target:i,eventOptions:l,window:f,enabled:c,transform:p},qU)};if(r){const m=lC.get(r);d[r]=$g(tr({shared:d.shared},g),m)}else for(const m in g){const C=lC.get(m);if(C)d[m]=$g(tr({shared:d.shared},g[m]),C);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(m)&&m==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.")}return d}class ik{constructor(r,t){li(this,"_listeners",new Set),this._ctrl=r,this._gestureKey=t}add(r,t,i,l,f){const c=this._listeners,p=xU(t,i),g=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},d=tr(tr({},g),f);r.addEventListener(p,l,d);const m=()=>{r.removeEventListener(p,l,d),c.delete(m)};return c.add(m),m}clean(){this._listeners.forEach(r=>r()),this._listeners.clear()}}class WU{constructor(){li(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 QU=class{constructor(r){li(this,"gestures",new Set),li(this,"_targetEventStore",new ik(this)),li(this,"gestureEventStores",{}),li(this,"gestureTimeoutStores",{}),li(this,"handlers",{}),li(this,"config",{}),li(this,"pointerIds",new Set),li(this,"touchIds",new Set),li(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),ZU(this,r)}setEventIds(r){if(Ig(r))return this.touchIds=new Set(wU(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=KU(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 p=this.config[c],g=ok(i,p.eventOptions,!!l);if(p.enabled){const d=ak.get(c);new d(this,r,c).bind(g)}}const f=ok(i,t.eventOptions,!!l);for(const c in this.nativeHandlers)f(c,"",p=>this.nativeHandlers[c](tr(tr({},this.state.shared),{},{event:p,args:r})),void 0,!0)}for(const f in i)i[f]=SU(...i[f]);if(!l)return i;for(const f in i){const{device:c,capture:p,passive:g}=yU(f);this._targetEventStore.add(l,c,"",i[f],{capture:p,passive:g})}}}};function gd(e,r){e.gestures.add(r),e.gestureEventStores[r]=new ik(e,r),e.gestureTimeoutStores[r]=new WU}function ZU(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 ok=(e,r,t)=>(i,l,f,c={},p=!1)=>{var g,d;const m=(g=c.capture)!==null&&g!==void 0?g:r.capture,C=(d=c.passive)!==null&&d!==void 0?d:r.passive;let b=p?i:mU(i,l,m);t&&C&&(b+="Passive"),e[b]=e[b]||[],e[b].push(f)};function XU(e,r={},t,i){const l=q.useMemo(()=>new QU(e),[]);if(l.applyHandlers(e,i),l.applyConfig(r,t),q.useEffect(l.effect.bind(l)),q.useEffect(()=>l.clean.bind(l),[]),r.target===void 0)return l.bind.bind(l)}function JU(e,r){return HU(VU),XU({drag:e},r||{},"drag")}var sC=pp(),Ft=e=>hp(e,sC),uC=pp();Ft.write=e=>hp(e,uC);var Yg=pp();Ft.onStart=e=>hp(e,Yg);var cC=pp();Ft.onFrame=e=>hp(e,cC);var fC=pp();Ft.onFinish=e=>hp(e,fC);var yd=[];Ft.setTimeout=(e,r)=>{const t=Ft.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(lk(t),0,l),du+=1,sk(),l};var lk=e=>~(~yd.findIndex(r=>r.time>e)||~yd.length);Ft.cancel=e=>{Yg.delete(e),cC.delete(e),fC.delete(e),sC.delete(e),uC.delete(e)},Ft.sync=e=>{hC=!0,Ft.batchedUpdates(e),hC=!1},Ft.throttle=e=>{let r;function t(){try{e(...r)}finally{r=null}}function i(...l){r=l,Ft.onStart(t)}return i.handler=e,i.cancel=()=>{Yg.delete(t),r=null},i};var dC=typeof window<"u"?window.requestAnimationFrame:()=>{};Ft.use=e=>dC=e,Ft.now=typeof performance<"u"?()=>performance.now():Date.now,Ft.batchedUpdates=e=>e(),Ft.catch=console.error,Ft.frameLoop="always",Ft.advance=()=>{Ft.frameLoop!=="demand"||ck()};var fu=-1,du=0,hC=!1;function hp(e,r){hC?(r.delete(e),e(0)):(r.add(e),sk())}function sk(){fu<0&&(fu=0,Ft.frameLoop!=="demand"&&dC(uk))}function ej(){fu=-1}function uk(){~fu&&(dC(uk),Ft.batchedUpdates(ck))}function ck(){const e=fu;fu=Ft.now();const r=lk(fu);if(r&&(fk(yd.splice(0,r),t=>t.handler()),du-=r),!du){ej();return}Yg.flush(),sC.flush(e?Math.min(64,fu-e):16.667),cC.flush(),uC.flush(),fC.flush()}function pp(){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,fk(r,i=>i(t)&&e.add(i)),du+=e.size,r=e)}}}function fk(e,r){e.forEach(t=>{try{r(t)}catch(i){Ft.catch(i)}})}var tj=Object.defineProperty,nj=(e,r)=>{for(var t in r)tj(e,t,{get:r[t],enumerable:!0})},Co={};nj(Co,{assign:()=>aj,colors:()=>hu,createStringInterpolator:()=>mC,skipAnimation:()=>hk,to:()=>dk,willAdvance:()=>gC});function pC(){}var rj=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),$e={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 ls(e,r){if($e.arr(e)){if(!$e.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 Gt=(e,r)=>e.forEach(r);function dl(e,r,t){if($e.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 Pi=e=>$e.und(e)?[]:$e.arr(e)?e:[e];function vp(e,r){if(e.size){const t=Array.from(e);e.clear(),Gt(t,r)}}var mp=(e,...r)=>vp(e,t=>t(...r)),vC=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),mC,dk,hu=null,hk=!1,gC=pC,aj=e=>{e.to&&(dk=e.to),e.now&&(Ft.now=e.now),e.colors!==void 0&&(hu=e.colors),e.skipAnimation!=null&&(hk=e.skipAnimation),e.createStringInterpolator&&(mC=e.createStringInterpolator),e.requestAnimationFrame&&Ft.use(e.requestAnimationFrame),e.batchedUpdates&&(Ft.batchedUpdates=e.batchedUpdates),e.willAdvance&&(gC=e.willAdvance),e.frameLoop&&(Ft.frameLoop=e.frameLoop)},gp=new Set,eo=[],yC=[],qg=0,Gg={get idle(){return!gp.size&&!eo.length},start(e){qg>e.priority?(gp.add(e),Ft.onStart(ij)):(pk(e),Ft(xC))},advance:xC,sort(e){if(qg)Ft.onFrame(()=>Gg.sort(e));else{const r=eo.indexOf(e);~r&&(eo.splice(r,1),vk(e))}},clear(){eo=[],gp.clear()}};function ij(){gp.forEach(pk),gp.clear(),Ft(xC)}function pk(e){eo.includes(e)||vk(e)}function vk(e){eo.splice(oj(eo,r=>r.priority>e.priority),0,e)}function xC(e){const r=yC;for(let t=0;t<eo.length;t++){const i=eo[t];qg=i.priority,i.idle||(gC(i),i.advance(e),i.idle||r.push(i))}return qg=0,yC=eo,yC.length=0,eo=r,eo.length>0}function oj(e,r){const t=e.findIndex(r);return t<0?e.length:t}var lj=(e,r,t)=>Math.min(Math.max(t,e),r),sj={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},wo="[-+]?\\d*\\.?\\d+",Kg=wo+"%";function Wg(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var uj=new RegExp("rgb"+Wg(wo,wo,wo)),cj=new RegExp("rgba"+Wg(wo,wo,wo,wo)),fj=new RegExp("hsl"+Wg(wo,Kg,Kg)),dj=new RegExp("hsla"+Wg(wo,Kg,Kg,wo)),hj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,pj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,vj=/^#([0-9a-fA-F]{6})$/,mj=/^#([0-9a-fA-F]{8})$/;function gj(e){let r;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(r=vj.exec(e))?parseInt(r[1]+"ff",16)>>>0:hu&&hu[e]!==void 0?hu[e]:(r=uj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|255)>>>0:(r=cj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|yk(r[4]))>>>0:(r=hj.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=mj.exec(e))?parseInt(r[1],16)>>>0:(r=pj.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=fj.exec(e))?(mk(gk(r[1]),Qg(r[2]),Qg(r[3]))|255)>>>0:(r=dj.exec(e))?(mk(gk(r[1]),Qg(r[2]),Qg(r[3]))|yk(r[4]))>>>0:null}function bC(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 mk(e,r,t){const i=t<.5?t*(1+r):t+r-t*r,l=2*t-i,f=bC(l,i,e+1/3),c=bC(l,i,e),p=bC(l,i,e-1/3);return Math.round(f*255)<<24|Math.round(c*255)<<16|Math.round(p*255)<<8}function xd(e){const r=parseInt(e,10);return r<0?0:r>255?255:r}function gk(e){return(parseFloat(e)%360+360)%360/360}function yk(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 xk(e){let r=gj(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 yp=(e,r,t)=>{if($e.fun(e))return e;if($e.arr(e))return yp({range:e,output:r,extrapolate:t});if($e.str(e.output[0]))return mC(e);const i=e,l=i.output,f=i.range||[0,1],c=i.extrapolateLeft||i.extrapolate||"extend",p=i.extrapolateRight||i.extrapolate||"extend",g=i.easing||(d=>d);return d=>{const m=xj(d,f);return yj(d,f[m],f[m+1],l[m],l[m+1],g,c,p,i.map)}};function yj(e,r,t,i,l,f,c,p,g){let d=g?g(e):e;if(d<r){if(c==="identity")return d;c==="clamp"&&(d=r)}if(d>t){if(p==="identity")return d;p==="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 xj(e,r){for(var t=1;t<r.length-1&&!(r[t]>=e);++t);return t-1}var bj=(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 lj(0,1,l/e)},Zg=1.70158,Xg=Zg*1.525,bk=Zg+1,Ck=2*Math.PI/3,wk=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,Cj={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=>bk*e*e*e-Zg*e*e,easeOutBack:e=>1+bk*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)*Ck),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Ck)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*wk))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*wk)/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:bj},xp=Symbol.for("FluidValue.get"),bd=Symbol.for("FluidValue.observers"),to=e=>Boolean(e&&e[xp]),si=e=>e&&e[xp]?e[xp]():e,_k=e=>e[bd]||null;function wj(e,r){e.eventObserved?e.eventObserved(r):e(r)}function bp(e,r){const t=e[bd];t&&t.forEach(i=>{wj(i,r)})}var Ek=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");_j(this,e)}},_j=(e,r)=>Sk(e,xp,r);function Cd(e,r){if(e[xp]){let t=e[bd];t||Sk(e,bd,t=new Set),t.has(r)||(t.add(r),e.observerAdded&&e.observerAdded(t.size,r))}return r}function Cp(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 Sk=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),ey=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ej=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Dk=new RegExp(`(${ey.source})(%|[a-z]+)`,"i"),Sj=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ty=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,kk=e=>{const[r,t]=Dj(e);if(!r||vC())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 kk(t);if(t)return t}return e},Dj=e=>{const r=ty.exec(e);if(!r)return[,];const[,t,i]=r;return[t,i]},CC,kj=(e,r,t,i,l)=>`rgba(${Math.round(r)}, ${Math.round(t)}, ${Math.round(i)}, ${l})`,Tk=e=>{CC||(CC=hu?new RegExp(`(${Object.keys(hu).join("|")})(?!\\w)`,"g"):/^\b$/);const r=e.output.map(f=>si(f).replace(ty,kk).replace(Ej,xk).replace(CC,xk)),t=r.map(f=>f.match(ey).map(Number)),l=t[0].map((f,c)=>t.map(p=>{if(!(c in p))throw Error('The arity of each "output" value must be equal');return p[c]})).map(f=>yp({...e,output:f}));return f=>{var g;const c=!Dk.test(r[0])&&((g=r.find(d=>Dk.test(d)))==null?void 0:g.replace(ey,""));let p=0;return r[0].replace(ey,()=>`${l[p++](f)}${c||""}`).replace(Sj,kj)}},wC="react-spring: ",Ak=e=>{const r=e;let t=!1;if(typeof r!="function")throw new TypeError(`${wC}once requires a function parameter`);return(...i)=>{t||(r(...i),t=!0)}},Tj=Ak(console.warn);function Aj(){Tj(`${wC}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Oj=Ak(console.warn);function Rj(){Oj(`${wC}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 $e.str(e)&&(e[0]=="#"||/\d/.test(e)||!vC()&&ty.test(e)||e in(hu||{}))}var _C=vC()?q.useEffect:q.useLayoutEffect,Fj=()=>{const e=q.useRef(!1);return _C(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ok(){const e=q.useState()[1],r=Fj();return()=>{r.current&&e(Math.random())}}function Nj(e,r){const[t]=q.useState(()=>({inputs:r,result:e()})),i=q.useRef(),l=i.current;let f=l;return f?Boolean(r&&f.inputs&&Mj(r,f.inputs))||(f={inputs:r,result:e()}):f=t,q.useEffect(()=>{i.current=f,l==t&&(t.inputs=t.result=void 0)},[f]),f.result}function Mj(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 Rk=e=>q.useEffect(e,Pj),Pj=[];function Fk(e){const r=q.useRef();return q.useEffect(()=>{r.current=e}),r.current}var wp=Symbol.for("Animated:node"),Bj=e=>!!e&&e[wp]===e,hl=e=>e&&e[wp],EC=(e,r)=>rj(e,wp,r),ry=e=>e&&e[wp]&&e[wp].getPayload(),Nk=class{constructor(){EC(this,this)}getPayload(){return this.payload||[]}},_p=class extends Nk{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,$e.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new _p(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,r){return $e.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,$e.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ep=class extends _p{constructor(e){super(0),this._string=null,this._toString=yp({output:[e,e]})}static create(e){return new Ep(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if($e.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=yp({output:[this.getValue(),e]})),this._value=0,super.reset()}},ay={dependencies:null},iy=class extends Nk{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const r={};return dl(this.source,(t,i)=>{Bj(t)?r[i]=t.getValue(e):to(t)?r[i]=si(t):e||(r[i]=t)}),r}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Gt(this.payload,e=>e.reset())}_makePayload(e){if(e){const r=new Set;return dl(e,this._addToPayload,r),Array.from(r)}}_addToPayload(e){ay.dependencies&&to(e)&&ay.dependencies.add(e);const r=ry(e);r&&Gt(r,t=>this.add(t))}},Mk=class extends iy{constructor(e){super(e)}static create(e){return new Mk(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(Lj)),!0)}};function Lj(e){return(ny(e)?Ep:_p).create(e)}function SC(e){const r=hl(e);return r?r.constructor:$e.arr(e)?Mk:ny(e)?Ep:_p}var Pk=(e,r)=>{const t=!$e.fun(e)||e.prototype&&e.prototype.isReactComponent;return q.forwardRef((i,l)=>{const f=q.useRef(null),c=t&&q.useCallback(E=>{f.current=jj(l,E)},[l]),[p,g]=Uj(i,r),d=Ok(),m=()=>{const E=f.current;if(t&&!E)return;(E?r.applyAnimatedValues(E,p.getValue(!0)):!1)===!1&&d()},C=new zj(m,g),b=q.useRef();_C(()=>(b.current=C,Gt(g,E=>Cd(E,C)),()=>{b.current&&(Gt(b.current.deps,E=>Cp(E,b.current)),Ft.cancel(b.current.update))})),q.useEffect(m,[]),Rk(()=>()=>{const E=b.current;Gt(E.deps,k=>Cp(k,E))});const x=r.getComponentProps(p.getValue());return Fe.createElement(e,{...x,ref:c})})},zj=class{constructor(e,r){this.update=e,this.deps=r}eventObserved(e){e.type=="change"&&Ft.write(this.update)}};function Uj(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 jj(e,r){return e&&($e.fun(e)?e(r):e.current=r),r}var Bk=Symbol.for("AnimatedComponent"),Ij=(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 p=Lk(c)||"Anonymous";return $e.str(c)?c=f[c]||(f[c]=Pk(c,l)):c=c[Bk]||(c[Bk]=Pk(c,l)),c.displayName=`Animated(${p})`,c};return dl(e,(c,p)=>{$e.arr(e)&&(p=Lk(c)),f[p]=f(c)}),{animated:f}},Lk=e=>$e.str(e)?e:e&&$e.str(e.displayName)?e.displayName:$e.fun(e)&&e.name||null;function Mc(e,...r){return $e.fun(e)?e(...r):e}var Sp=(e,r)=>e===!0||!!(r&&e&&($e.fun(e)?e(r):Pi(e).includes(r))),zk=(e,r)=>$e.obj(e)?r&&e[r]:e,Uk=(e,r)=>e.default===!0?e[r]:e.default?e.default[r]:void 0,Hj=e=>e,DC=(e,r=Hj)=>{let t=Vj;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);$e.und(f)||(i[l]=f)}return i},Vj=["config","onProps","onStart","onChange","onPause","onResume","onRest"],$j={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 Yj(e){const r={};let t=0;if(dl(e,(i,l)=>{$j[l]||(r[l]=i,t++)}),t)return r}function jk(e){const r=Yj(e);if(r){const t={to:r};return dl(e,(i,l)=>l in r||(t[l]=i)),t}return{...e}}function Dp(e){return e=si(e),$e.arr(e)?e.map(Dp):ny(e)?Co.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function qj(e){for(const r in e)return!0;return!1}function kC(e){return $e.fun(e)||$e.arr(e)&&$e.obj(e[0])}function Gj(e,r){var t;(t=e.ref)==null||t.delete(e),r==null||r.delete(e)}function Kj(e,r){var t;r&&e.ref!==r&&((t=e.ref)==null||t.delete(e),r.add(e),e.ref=r)}var Wj={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}},TC={...Wj.default,mass:1,damping:1,easing:Cj.linear,clamp:!1},Qj=class{constructor(){this.velocity=0,Object.assign(this,TC)}};function Zj(e,r,t){t&&(t={...t},Ik(t,r),r={...t,...r}),Ik(e,r),Object.assign(e,r);for(const c in TC)e[c]==null&&(e[c]=TC[c]);let{frequency:i,damping:l}=e;const{mass:f}=e;return $e.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 Ik(e,r){if(!$e.und(r.decay))e.duration=void 0;else{const t=!$e.und(r.tension)||!$e.und(r.friction);(t||!$e.und(r.frequency)||!$e.und(r.damping)||!$e.und(r.mass))&&(e.duration=void 0,e.decay=void 0),t&&(e.frequency=void 0)}}var Hk=[],Xj=class{constructor(){this.changed=!1,this.values=Hk,this.toValues=null,this.fromValues=Hk,this.config=new Qj,this.immediate=!1}};function Vk(e,{key:r,props:t,defaultProps:i,state:l,actions:f}){return new Promise((c,p)=>{let g,d,m=Sp(t.cancel??(i==null?void 0:i.cancel),r);if(m)x();else{$e.und(t.pause)||(l.paused=Sp(t.pause,r));let E=i==null?void 0:i.pause;E!==!0&&(E=l.paused||Sp(E,r)),g=Mc(t.delay||0,r),E?(l.resumeQueue.add(b),f.pause()):(f.resume(),b())}function C(){l.resumeQueue.add(b),l.timeouts.delete(d),d.cancel(),g=d.time-Ft.now()}function b(){g>0&&!Co.skipAnimation?(l.delayed=!0,d=Ft.setTimeout(x,g),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)&&(m=!0);try{f.start({...t,callId:e,cancel:m},c)}catch(E){p(E)}}})}var AC=(e,r)=>r.length==1?r[0]:r.some(t=>t.cancelled)?wd(e.get()):r.every(t=>t.noop)?$k(e.get()):_o(e.get(),r.every(t=>t.finished)),$k=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),_o=(e,r,t=!1)=>({value:e,finished:r,cancelled:t}),wd=e=>({value:e,cancelled:!0,finished:!1});function Yk(e,r,t,i){const{callId:l,parentId:f,onRest:c}=r,{asyncTo:p,promise:g}=t;return!f&&e===p&&!r.reset?g:t.promise=(async()=>{t.asyncId=l,t.asyncTo=e;const d=DC(r,(D,T)=>T==="onRest"?void 0:D);let m,C;const b=new Promise((D,T)=>(m=D,C=T)),x=D=>{const T=l<=(t.cancelId||0)&&wd(i)||l!==t.asyncId&&_o(i,!1);if(T)throw D.result=T,C(D),D},E=(D,T)=>{const A=new qk,S=new Gk;return(async()=>{if(Co.skipAnimation)throw kp(t),S.result=_o(i,!1),C(S),S;x(A);const O=$e.obj(D)?{...D}:{...T,to:D};O.parentId=l,dl(d,(z,N)=>{$e.und(O[N])&&(O[N]=z)});const P=await i.start(O);return x(A),t.paused&&await new Promise(z=>{t.resumeQueue.add(z)}),P})()};let k;if(Co.skipAnimation)return kp(t),_o(i,!1);try{let D;$e.arr(e)?D=(async T=>{for(const A of T)await E(A)})(e):D=Promise.resolve(e(E,i.stop.bind(i))),await Promise.all([D.then(m),b]),k=_o(i.get(),!0,!1)}catch(D){if(D instanceof qk)k=D.result;else if(D instanceof Gk)k=D.result;else throw D}finally{l==t.asyncId&&(t.asyncId=f,t.asyncTo=f?p:void 0,t.promise=f?g:void 0)}return $e.fun(c)&&Ft.batchedUpdates(()=>{c(k,i,i.item)}),k})()}function kp(e,r){vp(e.timeouts,t=>t.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,r&&(e.cancelId=r)}var qk=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.")}},Gk=class extends Error{constructor(){super("SkipAnimationSignal")}},OC=e=>e instanceof RC,Jj=1,RC=class extends Ek{constructor(){super(...arguments),this.id=Jj++,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 Co.to(this,e)}interpolate(...e){return Aj(),Co.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){bp(this,{type:"change",parent:this,value:e,idle:r})}_onPriorityChange(e){this.idle||Gg.sort(this),bp(this,{type:"priority",parent:this,priority:e})}},Pc=Symbol.for("SpringPhase"),Kk=1,FC=2,NC=4,MC=e=>(e[Pc]&Kk)>0,pu=e=>(e[Pc]&FC)>0,Tp=e=>(e[Pc]&NC)>0,Wk=(e,r)=>r?e[Pc]|=FC|Kk:e[Pc]&=~FC,Qk=(e,r)=>r?e[Pc]|=NC:e[Pc]&=~NC,eI=class extends RC{constructor(e,r){if(super(),this.animation=new Xj,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,!$e.und(e)||!$e.und(r)){const t=$e.obj(e)?{...e}:{...r,from:e};$e.und(t.default)&&(t.default=!0),this.start(t)}}get idle(){return!(pu(this)||this._state.asyncTo)||Tp(this)}get goal(){return si(this.animation.to)}get velocity(){const e=hl(this);return e instanceof _p?e.lastVelocity||0:e.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return MC(this)}get isAnimating(){return pu(this)}get isPaused(){return Tp(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&&to(i.to)&&(l=Pi(si(i.to))),i.values.forEach((d,m)=>{if(d.done)return;const C=d.constructor==Ep?1:c?c[m].lastPosition:l[m];let b=i.immediate,x=C;if(!b){if(x=d.lastPosition,f.tension<=0){d.done=!0;return}let E=d.elapsedTime+=e;const k=i.fromValues[m],D=d.v0!=null?d.v0:d.v0=$e.arr(f.velocity)?f.velocity[m]:f.velocity;let T;const A=f.precision||(k==C?.005:Math.min(1,Math.abs(C-k)*.001));if($e.und(f.duration))if(f.decay){const S=f.decay===!0?.998:f.decay,O=Math.exp(-(1-S)*E);x=k+D/(1-S)*(1-O),b=Math.abs(d.lastPosition-x)<=A,T=D*O}else{T=d.lastVelocity==null?D:d.lastVelocity;const S=f.restVelocity||A/10,O=f.clamp?0:f.bounce,P=!$e.und(O),z=k==C?d.v0>0:k<C;let N,U=!1;const $=1,F=Math.ceil(e/$);for(let L=0;L<F&&(N=Math.abs(T)>S,!(!N&&(b=Math.abs(C-x)<=A,b)));++L){P&&(U=x==C||x>C==z,U&&(T=-T*O,x=C));const I=-f.tension*1e-6*(x-C),H=-f.friction*.001*T,W=(I+H)/f.mass;T=T+W*$,x=x+T*$}}else{let S=1;f.duration>0&&(this._memoizedDuration!==f.duration&&(this._memoizedDuration=f.duration,d.durationProgress>0&&(d.elapsedTime=f.duration*d.durationProgress,E=d.elapsedTime+=e)),S=(f.progress||0)+E/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),x=k+f.easing(S)*(C-k),T=(x-d.lastPosition)/e,b=S==1}d.lastVelocity=T,Number.isNaN(x)&&(b=!0)}c&&!c[m].done&&(b=!1),b?d.done=!0:r=!1,d.setValue(x,f.round)&&(t=!0)});const p=hl(this),g=p.getValue();if(r){const d=si(i.to);(g!==d||t)&&!f.decay?(p.setValue(d),this._onChange(d)):t&&f.decay&&this._onChange(g),this._stop()}else t&&this._onChange(g)}set(e){return Ft.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(pu(this)){const{to:e,config:r}=this.animation;Ft.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 $e.und(e)?(t=this.queue||[],this.queue=[]):t=[$e.obj(e)?e:{...r,to:e}],Promise.all(t.map(i=>this._update(i))).then(i=>AC(this,i))}stop(e){const{to:r}=this.animation;return this._focus(this.get()),kp(this._state,e&&this._lastCallId),Ft.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=$e.obj(t)?t[r]:t,(t==null||kC(t))&&(t=void 0),i=$e.obj(i)?i[r]:i,i==null&&(i=void 0);const l={to:t,from:i};return MC(this)||(e.reverse&&([t,i]=[i,t]),i=si(i),$e.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,DC(e,(c,p)=>/^on/.test(p)?zk(c,t):c)),Jk(this,e,"onProps"),Rp(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 Vk(++this._lastCallId,{key:t,props:e,defaultProps:i,state:f,actions:{pause:()=>{Tp(this)||(Qk(this,!0),mp(f.pauseQueue),Rp(this,"onPause",_o(this,Ap(this,this.animation.to)),this))},resume:()=>{Tp(this)&&(Qk(this,!1),pu(this)&&this._resume(),mp(f.resumeQueue),Rp(this,"onResume",_o(this,Ap(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then(c=>{if(e.loop&&c.finished&&!(r&&c.noop)){const p=Zk(e);if(p)return this._update(p,!0)}return c})}_merge(e,r,t){if(r.cancel)return this.stop(!0),t(wd(this));const i=!$e.und(e.to),l=!$e.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:p}=this,{to:g,from:d}=p;let{to:m=g,from:C=d}=e;l&&!i&&(!r.default||$e.und(m))&&(m=C),r.reverse&&([m,C]=[C,m]);const b=!ls(C,d);b&&(p.from=C),C=si(C);const x=!ls(m,g);x&&this._focus(m);const E=kC(r.to),{config:k}=p,{decay:D,velocity:T}=k;(i||l)&&(k.velocity=0),r.config&&!E&&Zj(k,Mc(r.config,f),r.config!==c.config?Mc(c.config,f):void 0);let A=hl(this);if(!A||$e.und(m))return t(_o(this,!0));const S=$e.und(r.reset)?l&&!r.default:!$e.und(C)&&Sp(r.reset,f),O=S?C:this.get(),P=Dp(m),z=$e.num(P)||$e.arr(P)||ny(P),N=!E&&(!z||Sp(c.immediate||r.immediate,f));if(x){const L=SC(m);if(L!==A.constructor)if(N)A=this._set(P);else throw Error(`Cannot animate between ${A.constructor.name} and ${L.name}, as the "to" prop suggests`)}const U=A.constructor;let $=to(m),F=!1;if(!$){const L=S||!MC(this)&&b;(x||L)&&(F=ls(Dp(O),P),$=!F),(!ls(p.immediate,N)&&!N||!ls(k.decay,D)||!ls(k.velocity,T))&&($=!0)}if(F&&pu(this)&&(p.changed&&!S?$=!0:$||this._stop(g)),!E&&(($||to(g))&&(p.values=A.getPayload(),p.toValues=to(m)?null:U==Ep?[1]:Pi(P)),p.immediate!=N&&(p.immediate=N,!N&&!S&&this._set(g)),$)){const{onRest:L}=p;Gt(nI,H=>Jk(this,r,H));const I=_o(this,Ap(this,g));mp(this._pendingCalls,I),this._pendingCalls.add(t),p.changed&&Ft.batchedUpdates(()=>{var H;p.changed=!S,L==null||L(I,this),S?Mc(c.onRest,I):(H=p.onStart)==null||H.call(p,I,this)})}S&&this._set(O),E?t(Yk(r.to,r,this._state,this)):$?this._start():pu(this)&&!x?this._pendingCalls.add(t):t($k(O))}_focus(e){const r=this.animation;e!==r.to&&(_k(this)&&this._detach(),r.to=e,_k(this)&&this._attach())}_attach(){let e=0;const{to:r}=this.animation;to(r)&&(Cd(r,this),OC(r)&&(e=r.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;to(e)&&Cp(e,this)}_set(e,r=!0){const t=si(e);if(!$e.und(t)){const i=hl(this);if(!i||!ls(t,i.getValue())){const l=SC(t);!i||i.constructor!=l?EC(this,l.create(t)):i.setValue(t),i&&Ft.batchedUpdates(()=>{this._onChange(t,r)})}}return hl(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Rp(this,"onStart",_o(this,Ap(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(si(e.to)),e.immediate||(e.fromValues=e.values.map(r=>r.lastPosition)),pu(this)||(Wk(this,!0),Tp(this)||this._resume())}_resume(){Co.skipAnimation?this.finish():Gg.start(this)}_stop(e,r){if(pu(this)){Wk(this,!1);const t=this.animation;Gt(t.values,l=>{l.done=!0}),t.toValues&&(t.onChange=t.onPause=t.onResume=void 0),bp(this,{type:"idle",parent:this});const i=r?wd(this.get()):_o(this.get(),Ap(this,e??t.to));mp(this._pendingCalls,i),t.changed&&(t.changed=!1,Rp(this,"onRest",i,this))}}};function Ap(e,r){const t=Dp(r),i=Dp(e.get());return ls(i,t)}function Zk(e,r=e.loop,t=e.to){const i=Mc(r);if(i){const l=i!==!0&&jk(i),f=(l||e).reverse,c=!l||l.reset;return Op({...e,loop:r,default:!1,pause:void 0,to:!f||kC(t)?t:void 0,from:c?e.from:void 0,reset:c,...l})}}function Op(e){const{to:r,from:t}=e=jk(e),i=new Set;return $e.obj(r)&&Xk(r,i),$e.obj(t)&&Xk(t,i),e.keys=i.size?Array.from(i):null,e}function tI(e){const r=Op(e);return $e.und(r.default)&&(r.default=DC(r)),r}function Xk(e,r){dl(e,(t,i)=>t!=null&&r.add(i))}var nI=["onStart","onRest","onChange","onPause","onResume"];function Jk(e,r,t){e.animation[t]=r[t]!==Uk(r,t)?zk(r[t],e.key):void 0}function Rp(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 rI=["onStart","onChange","onRest"],aI=1,iI=class{constructor(e,r){this.id=aI++,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];$e.und(t)||this.springs[r].set(t)}}update(e){return e&&this.queue.push(Op(e)),this}start(e){let{queue:r}=this;return e?r=Pi(e).map(Op):this.queue=[],this._flush?this._flush(this,r):(iT(this,r),PC(this,r))}stop(e,r){if(e!==!!e&&(r=e),r){const t=this.springs;Gt(Pi(r),i=>t[i].stop(!!e))}else kp(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if($e.und(e))this.start({pause:!0});else{const r=this.springs;Gt(Pi(e),t=>r[t].pause())}return this}resume(e){if($e.und(e))this.start({pause:!1});else{const r=this.springs;Gt(Pi(e),t=>r[t].resume())}return this}each(e){dl(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,vp(e,([p,g])=>{g.value=this.get(),p(g,this,this._item)}));const f=!i&&this._started,c=l||f&&t.size?this.get():null;l&&r.size&&vp(r,([p,g])=>{g.value=c,p(g,this,this._item)}),f&&(this._started=!1,vp(t,([p,g])=>{g.value=c,p(g,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;Ft.onFrame(this._onFrame)}};function PC(e,r){return Promise.all(r.map(t=>eT(e,t))).then(t=>AC(e,t))}async function eT(e,r,t){const{keys:i,to:l,from:f,loop:c,onRest:p,onResolve:g}=r,d=$e.obj(r.default)&&r.default;c&&(r.loop=!1),l===!1&&(r.to=null),f===!1&&(r.from=null);const m=$e.arr(l)||$e.fun(l)?l:void 0;m?(r.to=void 0,r.onRest=void 0,d&&(d.onRest=void 0)):Gt(rI,k=>{const D=r[k];if($e.fun(D)){const T=e._events[k];r[k]=({finished:A,cancelled:S})=>{const O=T.get(D);O?(A||(O.finished=!1),S&&(O.cancelled=!0)):T.set(D,{value:null,finished:A||!1,cancelled:S||!1})},d&&(d[k]=r[k])}});const C=e._state;r.pause===!C.paused?(C.paused=r.pause,mp(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||Uk(r,"cancel")===!0;(m||x&&C.asyncId)&&b.push(Vk(++e._lastAsyncId,{props:r,state:C,actions:{pause:pC,resume:pC,start(k,D){x?(kp(C,e._lastAsyncId),D(wd(e))):(k.onRest=p,D(Yk(m,k,C,e)))}}})),C.paused&&await new Promise(k=>{C.resumeQueue.add(k)});const E=AC(e,await Promise.all(b));if(c&&E.finished&&!(t&&E.noop)){const k=Zk(r,c,l);if(k)return iT(e,[k]),eT(e,k,!0)}return g&&Ft.batchedUpdates(()=>g(E,e,e.item)),E}function tT(e,r){const t={...e.springs};return r&&Gt(Pi(r),i=>{$e.und(i.keys)&&(i=Op(i)),$e.obj(i.to)||(i={...i,to:void 0}),aT(t,i,l=>rT(l))}),nT(e,t),t}function nT(e,r){dl(r,(t,i)=>{e.springs[i]||(e.springs[i]=t,Cd(t,e))})}function rT(e,r){const t=new eI;return t.key=e,r&&Cd(t,r),t}function aT(e,r,t){r.keys&&Gt(r.keys,i=>{(e[i]||(e[i]=t(i)))._prepareNode(r)})}function iT(e,r){Gt(r,t=>{aT(e.springs,t,i=>rT(i,e))})}var oy=({children:e,...r})=>{const t=q.useContext(ly),i=r.pause||!!t.pause,l=r.immediate||!!t.immediate;r=Nj(()=>({pause:i,immediate:l}),[i,l]);const{Provider:f}=ly;return Fe.createElement(f,{value:r},e)},ly=oI(oy,{});oy.Provider=ly.Provider,oy.Consumer=ly.Consumer;function oI(e,r){return Object.assign(e,Fe.createContext(r)),e.Provider._context=e,e.Consumer._context=e,e}var lI=()=>{const e=[],r=function(i){Rj();const l=[];return Gt(e,(f,c)=>{if($e.und(i))l.push(f.start());else{const p=t(i,f,c);p&&l.push(f.start(p))}}),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 Gt(e,i=>i.pause(...arguments)),this},r.resume=function(){return Gt(e,i=>i.resume(...arguments)),this},r.set=function(i){Gt(e,(l,f)=>{const c=$e.fun(i)?i(f,l):i;c&&l.set(c)})},r.start=function(i){const l=[];return Gt(e,(f,c)=>{if($e.und(i))l.push(f.start());else{const p=this._getProps(i,f,c);p&&l.push(f.start(p))}}),l},r.stop=function(){return Gt(e,i=>i.stop(...arguments)),this},r.update=function(i){return Gt(e,(l,f)=>l.update(this._getProps(i,l,f))),this};const t=function(i,l,f){return $e.fun(i)?i(f,l):i};return r._getProps=t,r};function sI(e,r,t){const i=$e.fun(r)&&r;i&&!t&&(t=[]);const l=q.useMemo(()=>i||arguments.length==3?lI():void 0,[]),f=q.useRef(0),c=Ok(),p=q.useMemo(()=>({ctrls:[],queue:[],flush(T,A){const S=tT(T,A);return f.current>0&&!p.queue.length&&!Object.keys(S).some(P=>!T.springs[P])?PC(T,A):new Promise(P=>{nT(T,S),p.queue.push(()=>{P(PC(T,A))}),c()})}}),[]),g=q.useRef([...p.ctrls]),d=[],m=Fk(e)||0;q.useMemo(()=>{Gt(g.current.slice(e,m),T=>{Gj(T,l),T.stop(!0)}),g.current.length=e,C(m,e)},[e]),q.useMemo(()=>{C(0,Math.min(m,e))},t);function C(T,A){for(let S=T;S<A;S++){const O=g.current[S]||(g.current[S]=new iI(null,p.flush)),P=i?i(S,O):r[S];P&&(d[S]=tI(P))}}const b=g.current.map((T,A)=>tT(T,d[A])),x=q.useContext(oy),E=Fk(x),k=x!==E&&qj(x);_C(()=>{f.current++,p.ctrls=g.current;const{queue:T}=p;T.length&&(p.queue=[],Gt(T,A=>A())),Gt(g.current,(A,S)=>{l==null||l.add(A),k&&A.start({default:x});const O=d[S];O&&(Kj(A,O.ref),A.ref?A.queue.push(O):A.start(O))})}),Rk(()=>()=>{Gt(p.ctrls,T=>T.stop(!0))});const D=b.map(T=>({...T}));return l?[D,l]:D}function uI(e,r){const t=$e.fun(e),[[i],l]=sI(1,t?e:[e],t?r||[]:r);return t||arguments.length==2?[i,l]:i}var cI=class extends RC{constructor(e,r){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=yp(...r);const t=this._get(),i=SC(t);EC(this,i.create(t))}advance(e){const r=this._get(),t=this.get();ls(r,t)||(hl(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&oT(this._active)&&BC(this)}_get(){const e=$e.arr(this.source)?this.source.map(si):Pi(si(this.source));return this.calc(...e)}_start(){this.idle&&!oT(this._active)&&(this.idle=!1,Gt(ry(this),e=>{e.done=!1}),Co.skipAnimation?(Ft.batchedUpdates(()=>this.advance()),BC(this)):Gg.start(this))}_attach(){let e=1;Gt(Pi(this.source),r=>{to(r)&&Cd(r,this),OC(r)&&(r.idle||this._active.add(r),e=Math.max(e,r.priority+1))}),this.priority=e,this._start()}_detach(){Gt(Pi(this.source),e=>{to(e)&&Cp(e,this)}),this._active.clear(),BC(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=Pi(this.source).reduce((r,t)=>Math.max(r,(OC(t)?t.priority:0)+1),0))}};function fI(e){return e.idle!==!1}function oT(e){return!e.size||Array.from(e).every(fI)}function BC(e){e.idle||(e.idle=!0,Gt(ry(e),r=>{r.done=!0}),bp(e,{type:"idle",parent:e}))}Co.assign({createStringInterpolator:Tk,to:(e,r)=>new cI(e,r)});var lT=/^--/;function dI(e,r){return r==null||typeof r=="boolean"||r===""?"":typeof r=="number"&&r!==0&&!lT.test(e)&&!(Fp.hasOwnProperty(e)&&Fp[e])?r+"px":(""+r).trim()}var sT={};function hI(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:p,viewBox:g,...d}=r,m=Object.values(d),C=Object.keys(d).map(b=>t||e.hasAttribute(b)?b:sT[b]||(sT[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=dI(b,l[b]);lT.test(b)?e.style.setProperty(b,x):e.style[b]=x}C.forEach((b,x)=>{e.setAttribute(b,m[x])}),i!==void 0&&(e.className=i),c!==void 0&&(e.scrollTop=c),p!==void 0&&(e.scrollLeft=p),g!==void 0&&e.setAttribute("viewBox",g)}var Fp={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},pI=(e,r)=>e+r.charAt(0).toUpperCase()+r.substring(1),vI=["Webkit","Ms","Moz","O"];Fp=Object.keys(Fp).reduce((e,r)=>(vI.forEach(t=>e[pI(t,r)]=e[r]),e),Fp);var mI=/^(matrix|translate|scale|rotate|skew)/,gI=/^(translate)/,yI=/^(rotate|skew)/,LC=(e,r)=>$e.num(e)&&e!==0?e+r:e,sy=(e,r)=>$e.arr(e)?e.every(t=>sy(t,r)):$e.num(e)?e===r:parseFloat(e)===r,xI=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(p=>LC(p,"px")).join(",")})`,sy(c,0)])),dl(i,(c,p)=>{if(p==="transform")l.push([c||""]),f.push(g=>[g,g===""]);else if(mI.test(p)){if(delete i[p],$e.und(c))return;const g=gI.test(p)?"px":yI.test(p)?"deg":"";l.push(Pi(c)),f.push(p==="rotate3d"?([d,m,C,b])=>[`rotate3d(${d},${m},${C},${LC(b,g)})`,sy(b,0)]:d=>[`${p}(${d.map(m=>LC(m,g)).join(",")})`,sy(d,p.startsWith("scale")?1:0)])}}),l.length&&(i.transform=new bI(l,f)),super(i)}},bI=class extends Ek{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 Gt(this.inputs,(t,i)=>{const l=si(t[0]),[f,c]=this.transforms[i]($e.arr(l)?l:t.map(si));e+=" "+f,r=r&&c}),r?"none":e}observerAdded(e){e==1&&Gt(this.inputs,r=>Gt(r,t=>to(t)&&Cd(t,this)))}observerRemoved(e){e==0&&Gt(this.inputs,r=>Gt(r,t=>to(t)&&Cp(t,this)))}eventObserved(e){e.type=="change"&&(this._value=null),bp(this,e)}},CI=["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"];Co.assign({batchedUpdates:eu.exports.unstable_batchedUpdates,createStringInterpolator:Tk,colors:sj});var wI=Ij(CI,{applyAnimatedValues:hI,createAnimatedStyle:e=>new xI(e),getComponentProps:({scrollTop:e,scrollLeft:r,...t})=>t}),uT=wI.animated;function cT(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[fT]=xn("indicator"),_I=q.memo(e=>{var{vertical:r}=e,t=Va(e,["vertical"]);const i=[];for(let l=0;l<t.total;l++)i.push(Q("div",{className:Oe(fT("dot",{active:t.current===l}))},l));return Q("div",Object.assign({className:Oe(t.className,fT({vertical:r})),style:t.style},{children:i}))});let Np=0;function zC(e){e?(Np||document.body.classList.add("rv-toast--unclickable"),Np+=1):Np&&(Np-=1,Np||document.body.classList.remove("rv-toast--unclickable"))}function EI(e){return e===window}const dT=e=>{const r=e;if(EI(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 SI(e,r,t){let i,l,f,c,p,g,d=0,m=!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)&&(m=!!t.leading,C="maxWait"in t,f=C?Math.max(+t.maxWait||0,r):f,b="trailing"in t?!!t.trailing:b);function E(F){const L=i,I=l;return i=l=void 0,d=F,c=e.apply(I,L),c}function k(F,L){return x?(fd.cancelAnimationFrame(p),fd.requestAnimationFrame(F)):setTimeout(()=>F(),L)}function D(F){if(x)return fd.cancelAnimationFrame(F);clearTimeout(F)}function T(F){return d=F,p=k(O,r),m?E(F):c}function A(F){const L=F-g,I=F-d,H=r-L;return C?Math.min(H,f-I):H}function S(F){const L=F-g,I=F-d;return g===void 0||L>=r||L<0||C&&I>=f}function O(){const F=Date.now();if(S(F))return P(F);p=k(O,A(F))}function P(F){return p=void 0,b&&i?E(F):(i=l=void 0,c)}function z(){p!==void 0&&D(p),d=0,i=g=l=p=void 0}function N(){return p===void 0?c:P(Date.now())}function U(){return p!==void 0}function $(...F){const L=Date.now(),I=S(L);if(i=F,l=this,g=L,I){if(p===void 0)return T(g);if(C)return p=k(O,r),E(g)}return p===void 0&&(p=k(O,r)),c}return $.cancel=z,$.flush=N,$.pending=U,$}const XZ="",[uy]=xn("toast"),DI=e=>{const r=Jr(e,{type:"info",duration:2e3,position:"middle",transition:"rv-fade",loadingType:"circular",overlay:!1}),t=()=>{r.closeOnClick&&r.onClose()};q.useEffect(()=>{if(!r.visible){zC(!1);return}let f=!1;const c=r.visible&&r.forbidClick;f!==c&&(f=c,zC(f))},[r.visible,r.forbidClick]);const i=()=>{const{icon:f,type:c,iconSize:p,loadingType:g}=r;if(f||c==="success"||c==="fail"){const m=c==="fail"?Q(Z2,{}):Q(SD,{});return q.cloneElement(f||m,{className:Oe(uy("icon")),fontSize:p})}return c==="loading"?Q(Q2,{className:Oe(uy("loading")),type:g}):null},l=()=>{const{message:f}=r;return Xr(f)&&f!==""?Q("div",Object.assign({className:Oe(uy("info"))},{children:f})):null};return Me(sp,Object.assign({className:Oe([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()]}))},UC={message:"",className:"",type:"info",position:"middle",forbidClick:!1,duration:2e3,teleport:()=>document.body},jC=[];let hT=!1,IC=Jh({},UC);const cy=new Map;function pT(){let e=jC.pop();for(;e;)e(),e=jC.pop()}function kI(){setTimeout(pT)}const Bc=e=>{if(!Bg())return null;const r=vT(e),t={config:()=>{},clear:()=>null};let i=0;const{onClose:l,teleport:f}=r,c=document.createElement("div");return nC(f).appendChild(c),ID(Q(()=>{const d=Object.assign({duration:2e3},r),[m,C]=q.useState(!1),[b,x]=q.useState(Object.assign({},d)),E=q.useCallback(()=>{b.forbidClick&&zC(!1),C(!1),window.setTimeout(()=>{HD(c)&&c.parentNode&&c.parentNode.removeChild(c)},+b.duration||+UC.duration)},[c]),k=q.useCallback(()=>{C(!1),l&&l()},[]);return t.clear=E,t.config=q.useCallback(D=>{x(T=>typeof D=="function"?Object.assign(Object.assign({},T),D(T)):Object.assign(Object.assign({},T),D))},[x]),q.useEffect(()=>(C(!0),hT||pT(),jC.push(E),b.duration!==0&&"duration"in b&&(i=window.setTimeout(k,+b.duration)),()=>{i!==0&&window.clearTimeout(i)}),[]),Q(DI,Object.assign({},b,{visible:m,teleport:()=>c,onClose:k,onClosed:E}))},{}),c),t};function vT(e){return cd(e)?e:{message:e}}const TI=e=>r=>Bc(Object.assign(Object.assign(Object.assign(Object.assign({},IC),cy.get(e)),vT(r)),{type:e}));["info","loading","success","fail"].forEach(e=>{Bc[e]=TI(e)}),Bc.allowMultiple=(e=!0)=>{hT=e},Bc.clear=kI;function AI(e,r){typeof e=="string"?cy.set(e,r):Jh(IC,e)}Bc.setDefaultOptions=AI,Bc.resetDefaultOptions=e=>{typeof e=="string"?cy.delete(e):(IC=Jh({},UC),cy.clear())};const mT=Bc;function fy(){const e=q.useRef([]),r=q.useCallback(i=>l=>{l&&(e.current[i]=l)},[]),t=q.useCallback(()=>{e.current=[]},[]);return[e.current,r,t]}const gT=e=>{const{defaultValue:r,value:t}=e||{},[i,l]=q.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(p){l(p)}return[f,c]},nX="",[OI]=xn("swiper-item"),yT=q.forwardRef((e,r)=>{const t=q.useRef(null);q.useImperativeHandle(r,()=>({self:t.current}));const[i]=QL(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:Oe(e.className,OI({hidden:e.autoHeight&&i===!1})),onClick:e.onClick,style:e.style},{children:e.children}))}),[Lc]=xn("swiper"),RI=q.forwardRef((e,r)=>{const t=Jr(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:p}=t,g=f?"y":"x",d=t.slideSize/100,m=t.trackOffset/100,{validChildren:C,count:b}=q.useMemo(()=>{let te=0;return{validChildren:q.Children.map(t.children,V=>q.isValidElement(V)?V.type!==yT?null:(te++,V):null),count:te}},[t.children]),x=q.useRef(null),[E,k]=fy(),[D,T]=q.useState(()=>t.enabled),[A,S]=q.useState(t.initialSwipe),[O,P,z]=K2(!1),N=q.useMemo(()=>Object.assign({["--rv-swipe-slide-size"]:`${t.slideSize}%`,["--rv-swipe-track-offset"]:`${t.trackOffset}%`},t.style),[t.slideSize,t.trackOffset,t.style]),U=q.useMemo(()=>d*(b-1)<1?!1:i,[b,i,d]),$=()=>{const te=x.current;return te?(f?te.offsetHeight:te.offsetWidth)*t.slideSize/100:0},F=te=>{let G=0,V=b-1;return t.stuckAtBoundary&&(G+=(1-d-m)/d,V-=(1-d-m)/d),cT(te,G,V)},[{position:L},I]=uI(()=>({position:F(A)*100,config:{tension:200,friction:30,duration:c},onRest:()=>{if(z.current||!U)return;const te=L.get(),G=100*b,V=HC(te,G);V!==te&&I.start({position:V,immediate:!0})}}),[b]),H=JU(te=>{var G;const V=$();if(!V||!t.preventScroll&&xT(te.target,(G=E[A])===null||G===void 0?void 0:G.self))return;const ee=f?1:0,ie=te.offset[ee],ae=te.direction[ee],pe=te.velocity[ee];if(P(!0),!te.last)I.start({position:ie*100/V,immediate:!0});else{const xe=Math.round((ie+Math.min(pe*2e3,V)*ae)/V);Z(xe),window.setTimeout(()=>{P(!1)})}},{enabled:D,transform:([te,G])=>[-te,-G],from:()=>{const te=$();return[L.get()/100*te,L.get()/100*te]},bounds:()=>{if(U)return{};const te=$(),G=F(0)*te,V=F(b-1)*te;return f?{top:G,bottom:V}:{left:G,right:V}},rubberband:t.rubberband,axis:g,preventScroll:g==="x"?t.preventScroll:!1,pointer:{touch:!0}}),W=()=>t.indicator===void 0||t.indicator===!0?Q("div",Object.assign({className:Oe(Lc("indicator",{vertical:f}))},{children:Q(_I,Object.assign({},t.indicatorProps,{vertical:f,total:b,current:A}))})):typeof t.indicator=="function"?t.indicator(b,A):null;function Z(te,G=!1){const V=Math.round(te),ee=U?HC(V,b):cT(V,0,b-1);S(ee),I.start({position:(U?V:F(V))*100,immediate:G})}const X=()=>{Z(Math.round(L.get()/100)+1)},re=()=>{Z(Math.round(L.get()/100)-1)};q.useImperativeHandle(r,()=>({activeIndex:A,swipeTo:Z,swipeNext:X,swipePrev:re,enable:()=>{T(!0)},disable:()=>{T(!1)}})),tp(()=>{const te=C.length-1;A>te&&Z(te,!0)}),Rc(()=>{var te;(te=t.onChange)===null||te===void 0||te.call(t,A)},[A]),q.useEffect(()=>{if(!l||O)return Ni;const te=typeof l=="boolean"?5e3:l,G=window.setInterval(()=>{X()},te);return()=>{window.clearInterval(G)}},[l,O]);const K=()=>U?Q("div",Object.assign({className:Oe(Lc("track-inner",{vertical:f}))},{children:q.Children.map(C,(te,G)=>Q(uT.div,Object.assign({className:Oe(Lc("slide")),style:{[g]:L.to(V=>{let ee=-V+G*100;const ie=b*100,ae=ie/2;return ee=HC(ee+ae,ie)-ae,`${ee}%`}),[f?"top":"left"]:`-${G*100}%`}},{children:q.cloneElement(te,{ref:k(G),autoHeight:p,trackRef:x})})))})):Q(uT.div,Object.assign({className:Oe(Lc("track-inner")),style:{[g]:L.to(te=>`${-te}%`)}},{children:q.Children.map(C,(te,G)=>Q("div",Object.assign({className:Oe(Lc("slide"))},{children:q.cloneElement(te,{ref:k(G),autoHeight:p})})))}));return b===0&&void 0,Me("div",Object.assign({className:Oe(t.className,Lc({vertical:f})),style:N},{children:[Q("div",Object.assign({ref:x,className:Oe(Lc("track",{"allow-touch-move":t.touchable})),onClickCapture:te=>{z.current&&te.stopPropagation()}},t.touchable?H():{},{children:K()})),W()]}))});function HC(e,r){const t=e%r;return t<0?t+r:t}function xT(e,r){return r?e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?!0:e.parentElement&&e.parentElement!==r?xT(e.parentElement,r):!1:!1}const bT=Object.assign(RI,{Item:yT}),FI=e=>{const r=Jr(e,{shape:"round",bindGroup:!0}),t=q.useRef(null),i=m=>r.parent&&r.bindGroup?r.parent.props[m]:null,l=q.useMemo(()=>i("disabled")||r.disabled,[r.parent,r.disabled]),f=q.useMemo(()=>i("direction")||null,[r.parent]),c=q.useMemo(()=>{const m=r.checkedColor||i("checkedColor");return m&&r.checked&&!l?{borderColor:m,backgroundColor:m}:{}},[r.checkedColor,r.checked,l]),p=m=>{const{target:C}=m,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(m)},g=()=>{const{bem:m,shape:C,checked:b}=r,x=r.iconSize||i("iconSize");return Q("div",Object.assign({ref:t,className:Oe(m("icon",[C,{disabled:l,checked:b}])),style:{fontSize:cl(x)}},{children:r.iconRender?r.iconRender({checked:b,disabled:l}):Q(SD,{style:c})}))},d=()=>r.children?Q("span",Object.assign({className:r.bem("label",[r.labelPosition,{disabled:l}])},{children:r.children})):null;return Me("div",Object.assign({role:r.role,className:Oe(r.bem([{disabled:l,"label-disabled":r.labelDisabled},f]),r.className),style:r.style,tabIndex:l?-1:0,"aria-checked":r.checked,onClick:p},{children:[r.labelPosition==="left"&&d(),g(),r.labelPosition!=="left"&&d()]}))},lX="";function NI(e){return[e.getFullYear(),e.getMonth()+1]}function VC(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 pl(e,r){const t=VC(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),CT=e=>Array.isArray(e)?e.map(dy):dy(e);function $C(e,r){const t=dy(e);return t.setDate(t.getDate()+r),t}const wT=e=>$C(e,-1),_T=e=>$C(e,1),YC=()=>{const e=new Date;return e.setHours(0,0,0,0),e};function MI(e){const r=e[0].getTime();return(e[1].getTime()-r)/(1e3*60*60*24)+1}function ET(e,r){let t=-1;const i=Array(e);for(;++t<e;)i[t]=r(t);return i}function PI(e){if(!e)return 0;for(;uD(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function qC(e,r){return 32-new Date(e,r-1,32).getDate()}const[Mp]=xn("calendar"),BI=e=>{const r=Jr(e,{offset:0}),t=q.useMemo(()=>{const{item:d,index:m,color:C,offset:b,rowHeight:x}=r,E={height:x};if(d.type==="placeholder")return E.width="100%",E;if(m===0&&(E.marginLeft=`${100*b/7}%`),C)switch(d.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":E.background=C;break;case"middle":E.color=C;break}return E},[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:Oe(Mp("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:Oe(Mp("bottom-info"))},{children:r.bottomInfoRender?r.bottomInfoRender(r.item):d})):null},c=()=>{const{item:d,color:m,rowHeight:C}=r,{type:b,text:x}=d,E=Me(nn,{children:[l(),x,f()]});return b==="selected"?Q("div",Object.assign({className:Oe(Mp("selected-day")),style:{width:C,height:C,background:m}},{children:E})):E},{type:p,className:g}=r.item;return p==="placeholder"?Q("div",{className:Oe(Mp("day")),style:t}):Q("div",Object.assign({role:"gridcell",style:t,className:Oe(Mp("day",p),g),tabIndex:p==="disabled"?void 0:-1,onClick:i},{children:c()}))},[hy]=xn("calendar"),LI=q.forwardRef((e,r)=>{const[t,i]=q.useState(),l=q.useRef(),[f,c]=q.useState(),p=q.useRef(0),{locale:g}=q.useContext(vd);q.useEffect(()=>{f&&(p.current=dT(f).height)},[f]);const d=q.useMemo(()=>e.formatMonthTitle?e.formatMonthTitle(e.date):g.vanCalendar.monthTitle(...NI(e.date)),[e.date,e.formatMonthTitle]),m=q.useMemo(()=>cl(e.rowHeight),[e.rowHeight]),C=q.useMemo(()=>{const F=e.date.getDay();return e.firstDayOfWeek?(F+7-e.firstDayOfWeek)%7:F},[e.date,e.firstDayOfWeek]),b=q.useMemo(()=>qC(e.date.getFullYear(),e.date.getMonth()+1),[e.date]),x=q.useMemo(()=>t||!e.lazyRender,[t]),E=()=>d,k=F=>{const L=e.showSubtitle?l.current:f,I=(L==null?void 0:L.getBoundingClientRect().top)-F.getBoundingClientRect().top+F.scrollTop;oD(F,I)},D=F=>{const L=I=>e.currentDate.some(H=>pl(H,I)===0);if(L(F)){const I=wT(F),H=_T(F),W=L(I),Z=L(H);return W&&Z?"multiple-middle":W?"end":Z?"start":"multiple-selected"}return""},T=F=>{const[L,I]=e.currentDate;if(!L)return"";const H=pl(F,L);if(!I)return H===0?"start":"";const W=pl(F,I);return e.allowSameDay&&H===0&&W===0?"start-end":H===0?"start":W===0?"end":H>0&&W<0?"middle":""},A=F=>{const{type:L,minDate:I,maxDate:H,currentDate:W}=e;if(pl(F,I)<0||pl(F,H)>0)return"disabled";if(W===null)return"";if(Array.isArray(W)){if(L==="multiple")return D(F);if(L==="range")return T(F)}else if(L==="single")return pl(F,W)===0?"selected":"";return""},S=F=>{if(e.type==="range"){if(F==="start")return g.vanCalendar.start;if(F==="end")return g.vanCalendar.end;if(F==="start-end")return g.vanCalendar.startEnd}return null},O=()=>e.showMonthTitle?Q("div",Object.assign({className:Oe(hy("month-title"))},{children:d})):null,P=()=>e.showMark&&x?Q("div",Object.assign({className:Oe(hy("month-mark"))},{children:e.date.getMonth()+1})):null,z=q.useMemo(()=>{const F=Math.ceil((b+C)/7);return Array(F).fill({type:"placeholder"})},[b,C]),N=q.useMemo(()=>{const F=[],L=e.date.getFullYear(),I=e.date.getMonth();for(let H=1;H<=b;H++){const W=new Date(L,I,H),Z=A(W);let X={date:W,type:Z,text:H,bottomInfo:S(Z)};e.formatter&&(X=e.formatter(X)),F.push(X)}return F},[A,e.date,e.formatter]),U=(F,L)=>Q(BI,{item:F,index:L,color:e.color,offset:C,rowHeight:m,onClick:e.onClick,topInfoRender:e.topInfoRender,bottomInfoRender:e.bottomInfoRender},L),$=()=>Me("div",Object.assign({ref:l,role:"grid",className:Oe(hy("days"))},{children:[P(),(x?N:z).map(U)]}));return q.useImperativeHandle(r,()=>({getTitle:E,getHeight:()=>p.current,setVisible:i,scrollIntoView:k})),Me("div",Object.assign({className:Oe(hy("month")),ref:c},{children:[O(),$()]}))}),[Pp]=xn("calendar"),zI=e=>{const{locale:r}=q.useContext(vd),t=()=>{if(e.showTitle){const c=e.title||r.vanCalendar.title;return Q("div",Object.assign({className:Oe(Pp("header-title"))},{children:c}))}return null},i=c=>{var p;(p=e.onClickSubtitle)===null||p===void 0||p.call(e,c)},l=()=>e.showSubtitle?Q("div",Object.assign({className:Oe(Pp("header-subtitle")),onClick:i},{children:e.subtitle})):null,f=()=>{const{weekdays:c,firstDayOfWeek:p}=e,g=r.vanCalendar.weekdays,d=c?g.map((C,b)=>c[b]||C):g,m=[...d.slice(p,7),...d.slice(0,p)];return Q("div",Object.assign({className:Oe(Pp("weekdays"))},{children:m.map((C,b)=>Q("span",Object.assign({className:Oe(Pp("weekday"))},{children:C}),b))}))};return Me("div",Object.assign({className:Oe(Pp("header"))},{children:[t(),l(),f()]}))},[_d]=xn("calendar"),UI=YC(),jI=(()=>{const e=YC();return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())})(),ST=q.forwardRef((e,r)=>{var t,{className:i,style:l}=e,f=Va(e,["className","style"]);const c=Jr(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:UI,maxDate:jI,firstDayOfWeek:0,showRangePrompt:!0}),{locale:p}=q.useContext(vd),[g,d]=np({value:c.visible,defaultValue:!1,onChange:V=>{var ee;V===!1&&((ee=c.onClose)===null||ee===void 0||ee.call(c))}}),m=(V,ee=c.minDate,ie=c.maxDate)=>pl(V,ee)===-1?ee:pl(V,ie)===1?ie:V,C=(V=c.defaultValue)=>{const{type:ee,minDate:ie,maxDate:ae}=c;if(V===null)return V;const pe=YC();if(ee==="range"){Array.isArray(V)||(V=[]);const xe=m(V[0]||pe,ie,wT(ae)),Ee=m(V[1]||pe,_T(ie));return[xe,Ee]}return ee==="multiple"?Array.isArray(V)?V.map(xe=>m(xe)):[m(pe)]:((!V||Array.isArray(V))&&(V=pe),m(V))},b=q.useRef(),x=q.useRef(0),[E,k]=q.useState(C(c.value===void 0?c.defaultValue:c.value)),[D,T]=hD({subtitle:"",currentDate:E});Rc(()=>{c.value!==void 0&&JSON.stringify(E)!==JSON.stringify(c.value)&&k(c.value)},[c.value]),q.useEffect(()=>{JSON.stringify(D.currentDate)!==JSON.stringify(E)&&T({currentDate:E})},[E]);const[A,S]=fy(),O=q.useMemo(()=>c.firstDayOfWeek?+c.firstDayOfWeek%7:0,[c.firstDayOfWeek,c.firstDayOfWeek]),P=q.useMemo(()=>{const V=[],ee=new Date(c.minDate);ee.setDate(1);do V.push(new Date(ee)),ee.setMonth(ee.getMonth()+1);while(VC(ee,c.maxDate)!==1);return V},[c.minDate,c.maxDate]),z=q.useMemo(()=>{const{currentDate:V}=D;if(V){if(c.type==="range")return!V[0]||!V[1];if(c.type==="multiple")return!V.length}return!V},[c.type,D.currentDate]),N=()=>{var V;const ee=LL(b.current),ie=ee+x.current,ae=P.map((Ne,Te)=>A[Te].getHeight()),pe=ae.reduce((Ne,Te)=>Ne+Te,0);if(ie>pe&&ee>0)return;let xe=0,Ee;const se=[-1,-1];for(let Ne=0;Ne<P.length;Ne++){const Te=A[Ne];xe<=ie&&xe+ae[Ne]>=ee&&(se[1]=Ne,Ee||(Ee=Te,se[0]=Ne),A[Ne].showed||(A[Ne].showed=!0,(V=c.onMonthShow)===null||V===void 0||V.call(c,{date:Te.date,title:Te.getTitle()}))),xe+=ae[Ne]}P.forEach((Ne,Te)=>{const tt=Te>=se[0]-1&&Te<=se[1]+1;A[Te].setVisible(tt)}),Ee&&Ee.getTitle()!==D.subtitle&&!c.horizontal&&T({subtitle:Ee.getTitle()})},U=V=>{Y2(()=>{P.some((ee,ie)=>VC(ee,V)===0?(b.current&&A[ie].scrollIntoView(b.current),!0):!1),N()})},$=()=>{if(c.poppable&&!g)return;const{currentDate:V}=D;if(V){const ee=c.type==="single"?V:V[0];U(ee)}else Y2(N)},F=()=>{Y2(()=>{x.current=Math.floor(dT(b.current).height),$()})},L=(V=C())=>{T({currentDate:V}),$()},I=V=>{var ee;const{maxRange:ie,rangePrompt:ae,showRangePrompt:pe}=c;return ie&&MI(V)>ie?(pe&&mT.info(ae||p.vanCalendar.rangePrompt(+ie)),(ee=c.onOverRange)===null||ee===void 0||ee.call(c),!1):!0},H=()=>{var V;const ee=CT(D.currentDate);c.poppable&&k(ee),(V=c.onConfirm)===null||V===void 0||V.call(c,ee),G.close()},W=(V,ee)=>{const ie=ae=>{var pe;D.currentDate=ae,T({currentDate:ae}),(pe=c.onSelect)===null||pe===void 0||pe.call(c,CT(D.currentDate))};if(ee&&c.type==="range"&&!I(V)){c.showConfirm?ie([V[0],$C(V[0],+c.maxRange-1)]):ie(V);return}ie(V),ee&&!c.showConfirm&&H()},Z=V=>{var ee;if(c.readOnly||!V.date)return;const{date:ie}=V,{type:ae}=c,{currentDate:pe}=D;if(ae==="range"){if(!pe){W([ie]);return}const[xe,Ee]=pe;if(xe&&!Ee){const se=pl(ie,xe);se===1?W([xe,ie],!0):se===-1?W([ie]):c.allowSameDay&&W([ie,ie],!0)}else W([ie])}else if(ae==="multiple"){if(!pe){W([ie]);return}let xe;if(D.currentDate.some((se,Ne)=>{const Te=pl(se,ie)===0;return Te&&(xe=Ne),Te})){const[se]=pe.splice(xe,1);(ee=c.onUnselect)===null||ee===void 0||ee.call(c,dy(se)),W([...pe])}else c.maxRange&&pe.length>=c.maxRange?mT(c.rangePrompt||`选择天数不能超过 ${c.maxRange} 天`):W([...pe,ie])}else W(ie,!0)},X=(V,ee)=>{const ie=!c.horizontal&&(ee!==0||!c.showSubtitle);return Q(LI,Object.assign({ref:S(ee),date:V,currentDate:D.currentDate,showMonthTitle:ie,firstDayOfWeek:O},rD(c,["type","color","minDate","maxDate","showMark","formatter","rowHeight","showSubtitle","lazyRender","allowSameDay","topInfoRender","bottomInfoRender","formatMonthTitle"]),{onClick:Z}),ee)},re=()=>{if(c.footer)return c.footer;if(c.showConfirm){const V=z?c.confirmDisabledText:c.confirmText;return Q(ip,Object.assign({round:!0,block:!0,type:"danger",color:c.color,className:Oe(_d("confirm")),disabled:z,nativeType:"button",onClick:H},{children:V||p.vanCalendar.confirm}))}return null},K=()=>Q("div",Object.assign({className:Oe(_d("footer"),{"rv-safe-area-bottom":c.safeAreaInsetBottom})},{children:re()})),te=()=>Me("div",Object.assign({className:Oe(i,_d()),style:l},{children:[Q(zI,{weekdays:c.weekdays,title:c.title,subtitle:c.subtitle||D.subtitle,showTitle:c.showTitle,showSubtitle:c.showSubtitle,firstDayOfWeek:O,onClickSubtitle:V=>{var ee;(ee=c.onClickSubtitle)===null||ee===void 0||ee.call(c,V)}}),c.horizontal?Q("div",Object.assign({ref:b,className:Oe(_d("horizontal-body"))},{children:Q(bT,Object.assign({indicator:()=>null,onChange:V=>{T({subtitle:A[V].getTitle()})}},{children:P.map((V,ee)=>Q(bT.Item,{children:X(V,ee)},V))}))})):Q("div",Object.assign({ref:b,className:Oe(_d("body")),onScroll:N},{children:P.map(X)})),K()]})),G={toggle:()=>{c.poppable&&d(V=>!V)},open:()=>{c.poppable&&d(!0)},close:()=>{c.poppable&&d(!1)}};return q.useEffect(()=>{c.poppable||F()},[]),q.useEffect(()=>{c.poppable&&g&&F()},[g]),Rc(()=>{L(C(D.currentDate))},[c.type,c.minDate,c.maxDate]),q.useImperativeHandle(r,()=>Object.assign({reset:L,scrollToDate:U},G)),c.poppable?Me(nn,{children:[Q(sp,Object.assign({visible:g,className:Oe(_d("popup")),round:c.round,position:c.position,closeable:c.showTitle||c.showSubtitle,closeOnPopstate:c.closeOnPopstate,closeOnClickOverlay:c.closeOnClickOverlay,onClose:G.close,onClosed:()=>{var V;c.poppable&&JSON.stringify(D.currentDate)!==JSON.stringify(E)&&T({currentDate:E}),(V=c.onClosed)===null||V===void 0||V.call(c)}},{children:te()})),(t=c.children)===null||t===void 0?void 0:t.call(c,E,G)]}):te()});function II(e,r){var t;process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const i=pD(e),l=(t=r==null?void 0:r.wait)!==null&&t!==void 0?t:1e3,f=q.useMemo(()=>SI((...c)=>i.current(...c),l,r),[]);return vD(()=>{f.cancel()}),{run:f,cancel:f.cancel,flush:f.flush}}function HI(e,r,t){const[i,l]=q.useState({}),{run:f}=II(()=>{l({})},t);q.useEffect(()=>f(),r),Rc(e,[i])}const dX="",DT=q.createContext({}),[VI]=xn("checkbox-group"),$I=q.forwardRef((e,r)=>{const[t,i]=fy(),[l,f]=gT({value:e.value,defaultValue:e.defaultValue}),c=(g={})=>{typeof g=="boolean"&&(g={checked:g});const{checked:d,skipDisabled:m}=g,b=t.filter(x=>x.props.bindGroup?x.props.disabled&&m?x.checked:d??!x.checked:!1).map(x=>x.props.name);f(b),e.onChange(b)},p=g=>{var d;f(g),(d=e.onChange)===null||d===void 0||d.call(e,g)};return q.useImperativeHandle(r,()=>({toggleAll:c})),Q(DT.Provider,Object.assign({value:{parent:{props:e},toggle:p,checked:l||[]}},{children:Q("div",Object.assign({className:Oe(e.className,VI([e.direction]))},{children:q.Children.toArray(e.children).filter(Boolean).map((g,d)=>{var m;return((m=g.type)===null||m===void 0?void 0:m.displayName)!=="Checkbox"?g:q.cloneElement(g,{ref:i(d)})})}))}))}),[YI]=xn("checkbox"),kT=q.forwardRef((e,r)=>{const t=Jr(e,{bindGroup:!0}),i=q.useContext(DT),{parent:l}=i,f=Va(i,["parent"]),[c,p]=gT({value:t.checked,defaultValue:t.defaultChecked}),g=C=>{const{name:b}=t,{max:x}=l.props,E=f.checked.slice();if(C)!(x&&E.length>=x)&&E.indexOf(b)===-1&&(E.push(b),t.bindGroup&&f.toggle(E));else{const k=E.indexOf(b);k!==-1&&(E.splice(k,1),t.bindGroup&&f.toggle(E))}},d=q.useMemo(()=>l&&t.bindGroup?f.checked.indexOf(t.name)!==-1:c,[f.checked,c]),m=(C=!d)=>{var b;l&&t.bindGroup?g(C):(p(C),(b=t.onChange)===null||b===void 0||b.call(t,C))};return q.useImperativeHandle(r,()=>({toggle:m,checked:d,props:t})),Q(FI,Object.assign({},t,{bem:YI,role:"checkbox",parent:l,checked:d,className:t.className,bindGroup:t.bindGroup,onToggle:m}))});kT.displayName="Checkbox";const TT=Object.assign(kT,{Group:$I}),mX="",AT=200,OT=300,qI=15;function GI(e){const r=window.getComputedStyle(e),t=r.transform||r.webkitTransform,i=t.slice(7,t.length-1).split(", ")[5];return Number(i)}const[GC]=xn("picker-column"),KI=q.memo(q.forwardRef((e,r)=>{const{locale:t}=q.useContext(vd),{valueKey:i,textKey:l,itemHeight:f,visibleItemCount:c,placeholder:p,value:g}=e,d=q.useMemo(()=>cD(f),[f]),m=q.useMemo(()=>Array.isArray(e.options)&&!e.options.length?[]:p?[{[i]:void 0,[l]:p===!0?t.vanPicker.select:p},...e.options]:e.options,[e.options]),C=q.useRef(null),b=q.useRef(!1),x=q.useRef(0),E=q.useRef(null),k=q.useRef(0),D=q.useRef(0),[T,A,S]=hD({offset:0,duration:0}),O=yD(),P=q.useMemo(()=>d*(+c-1)/2,[d,c]),z=K=>{var te,G;K=ep(K,0,m.length);for(let V=K;V<m.length;V+=1)if(!(!((te=m[V])===null||te===void 0)&&te.disabled))return V;for(let V=K-1;V>=0;V-=1)if(!(!((G=m[V])===null||G===void 0)&&G.disabled))return V;return null},N=K=>{e.onSelect(K,e.index)},U=K=>{K=z(K)||0;const te=-K*d,G=()=>{var V;((V=m[K])===null||V===void 0?void 0:V[i])!==g&&N(m[K])};b.current&&te!==S.current.offset?E.current=G:G(),A({offset:te})},$=K=>{K=z(K)||0;const te=-K*d;A({offset:te})};tp(()=>{if(m.length===0)g!==void 0&&N(void 0);else{let K=m.findIndex(te=>te[i]===g);K<0&&(K=0,N(m[0])),$(K)}},[g,JSON.stringify(m)]);const F=K=>{b.current||e.readOnly||(E.current=null,A({duration:AT}),U(K))},L=K=>ep(Math.round(-K/d),0,m.length-1),I=(K,te)=>{const G=Math.abs(K/te);K=S.current.offset+G/.003*(K<0?-1:1);const V=L(K);A({duration:+e.swipeDuration}),U(V)},H=()=>{b.current=!1,A({duration:0}),E.current&&(E.current(),E.current=null)},W=K=>{if(e.readOnly)return;O.start(K);let{offset:te}=T;if(b.current){const G=GI(C.current);te=Math.min(0,G-P),x.current=te}else x.current=te;A({duration:0,offset:te}),k.current=Date.now(),D.current=x.current,E.current=null},Z=K=>{if(e.readOnly)return;O.move(K),O.isVertical()&&(b.current=!0);const te=ep(x.current+O.deltaY.current,-(m.length*d),d);A({offset:te});const G=Date.now();G-k.current>OT&&(k.current=G,D.current=te)},X=()=>{if(e.readOnly||!b.current)return;const K=S.current.offset-D.current,te=Date.now()-k.current;if(te<OT&&Math.abs(K)>qI){I(K,te);return}const V=L(S.current.offset);A({duration:AT}),U(V),setTimeout(()=>{b.current=!1},0)},re=()=>{const K={height:`${e.itemHeight}px`};return m.map((te,G)=>{const{disabled:V}=te,ee={role:"button",style:K,tabIndex:V?-1:0,className:Oe(GC("item",{disabled:V,selected:te[i]===g})),onClick:()=>{F(G)}},ie={className:"rv-ellipsis",children:te[l]};return q.createElement("li",Object.assign({},ee,{key:G}),e.optionRender?e.optionRender(te):Q("div",Object.assign({},ie)))})};return q.useImperativeHandle(r,()=>({stopMomentum:H})),Q("div",Object.assign({className:Oe(GC(),e.className),onTouchStart:W,onTouchMove:Z,onTouchEnd:X,onTouchCancel:X},{children:Q("ul",Object.assign({ref:C,style:{transform:`translate3d(0, ${T.offset+P}px, 0)`,transitionDuration:`${T.duration}ms`,transitionProperty:T.duration?"all":"none"},className:Oe(GC("wrapper")),onTransitionEnd:H},{children:re()}))}))}),(e,r)=>!(e.index!==r.index||e.value!==r.value||e.onSelect!==r.onSelect||JSON.stringify(e.options)!==JSON.stringify(r.options)));function WI(e,r){const{textKey:t,valueKey:i,childrenKey:l}=r,f=q.useMemo(()=>{if(e.some(d=>typeof d=="object"&&l in d))return"cascade";const g=e[0]||{};return typeof g=="object"?l in g?"cascade":"object":"plain"},[e,l]),c=q.useMemo(()=>{let p=0;function g(d,m){m>p&&(p=m);const C=m+1;d.forEach(b=>{b[l]&&g(b[l],C)})}return g(e,1),p},[e,l]);return f!=="cascade"?e:p=>{const g=[];let d=e,m=0;for(;;){g.push(d.map(x=>{var E;return{[t]:x[t],[i]:(E=x[i])!==null&&E!==void 0?E:x[t]}}));const C=p[m],b=d.find(x=>{var E;return((E=x[i])!==null&&E!==void 0?E:x[t])===C});if(!b||!b[l])break;d=b[l],m++}for(;m<c-1;)g.push([]),m++;return g}}function KC(e){let r=null;return()=>(r===null&&(r=e()),r)}function QI(e,r,t){const{textKey:i,valueKey:l}=r,f=KC(()=>{let d=typeof e=="function"?e(t):e;return Array.isArray(d[0])||(d=[d]),d.map(m=>m.map(C=>typeof C=="string"?{[i]:C,[l]:C}:(l in C||(C[l]=C[i]),C)))}),c=KC(()=>t.map((d,m)=>{var C;const b=f()[m];return b?(C=b.find(x=>x[l]===d))!==null&&C!==void 0?C:void 0:null})),p=KC(()=>t.map((d,m)=>{var C;const b=f()[m];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 p()}}}function RT(e,r,t){const i=WI(e,r);return q.useMemo(()=>QI(i,r,t),[e,r,t])}const[ss]=xn("picker");function ZI(e){const{locale:r}=q.useContext(vd),t=q.useRef(null),[i,l]=fy(),{text:f,value:c,children:p}=Jh({text:"text",value:"value",children:"children"},e.columnsFieldNames),[g,d]=q.useState(e.value);q.useEffect(()=>{e.value!==void 0&&JSON.stringify(g)!==JSON.stringify(e.value)&&d(e.value)},[e.value]);const m=RT(e.columns,{textKey:f,valueKey:c,childrenKey:p},g),{columns:C,items:b,indexes:x}=m;HI(()=>{var U;JSON.stringify(e.value)!==JSON.stringify(g)&&((U=e.onChange)===null||U===void 0||U.call(e,g,b,x))},[g],{wait:100,leading:!1,trailing:!0});const E=q.useMemo(()=>cD(e.itemHeight),[e.itemHeight]),k=(U,$)=>{d(F=>{const L=[...F];return L[$]=U==null?void 0:U[c],L})},D=()=>{var U;i.forEach($=>$.stopMomentum()),(U=e.onConfirm)===null||U===void 0||U.call(e,g,b,x)},T=()=>{var U;(U=e.onCancel)===null||U===void 0||U.call(e)},A=()=>e.title?Q("div",Object.assign({className:Oe(ss("title"),"rv-ellipsis")},{children:e.title})):null,S=()=>{const U=e.cancelButtonText||r.cancel;return Q("button",Object.assign({type:"button",className:Oe(ss("cancel")),onClick:T},{children:U}))},O=()=>{const U=e.confirmButtonText||r.confirm;return Q("button",Object.assign({type:"button",className:Oe(ss("confirm")),onClick:D},{children:U}))},P=()=>e.showToolbar?Q("div",Object.assign({className:Oe(ss("toolbar"))},{children:e.toolbar||Me(nn,{children:[S(),A(),O()]})})):null,z=()=>C.map((U,$)=>{const F=Array.isArray(e.placeholder)?e.placeholder[$]:e.placeholder;return Q(KI,{textKey:f,valueKey:c,ref:l($),placeholder:F,optionRender:e.optionRender,readOnly:e.readOnly,value:g[$],itemHeight:E,index:$,swipeDuration:e.swipeDuration,visibleItemCount:e.visibleItemCount,options:U,onSelect:k},$)}),N=()=>{const U=E*e.visibleItemCount,$={height:`${E}px`},F={height:`${U}px`},L={backgroundSize:`100% ${(U-E)/2}px`};return Me("div",Object.assign({ref:t,className:Oe(ss("columns")),style:F},{children:[z(),Q("div",{className:Oe(ss("mask")),style:L}),Q("div",{className:Oe(dz,ss("frame")),style:$})]}))};return G2("touchmove",$2,{target:t.current}),Me("div",Object.assign({className:Oe(ss(),e.className)},{children:[e.toolbarPosition==="top"?P():null,e.loading?Q(Q2,{className:Oe(ss("loading"))}):null,e.columnsTop,N(),e.columnsBottom,e.toolbarPosition==="bottom"?P():null]}))}function XI(e,r){const t=Jr(e,{columns:[],itemHeight:44,visibleItemCount:5,swipeDuration:300,showToolbar:!0,placeholder:!0,toolbarPosition:"top"}),{visible:i,popup:l,children:f,defaultValue:c=[]}=t,p=Va(t,["visible","popup","children","defaultValue"]),[g,d]=np({value:i,defaultValue:!1,onChange:I=>{var H;I===!1&&((H=t.onClose)===null||H===void 0||H.call(t))}}),m={toggle:()=>{l&&d(I=>!I)},open:()=>{l&&d(!0)},close:()=>{l&&d(!1)}};q.useImperativeHandle(r,()=>m);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:E,children:k}=Jh({text:"text",value:"value",children:"children"},t.columnsFieldNames),D=q.useMemo(()=>{const I=t.columns[0]||{};return!(Array.isArray(I)||typeof I=="object"&&k in I)},[t.columns,k]),T=I=>D?I==null?void 0:I[0]:I,[A,S]=np({value:C,defaultValue:b}),O=RT(t.columns,{textKey:x,valueKey:E,childrenKey:k},A),[P,z]=q.useState(A);q.useEffect(()=>{l&&JSON.stringify(P)!==JSON.stringify(A)&&z(A)},[g]),q.useEffect(()=>{!l&&JSON.stringify(P)!==JSON.stringify(A)&&z(A)},[A]);const N=(I,H,W)=>{var Z;S(P,!0),(Z=t.onConfirm)===null||Z===void 0||Z.call(t,T(I),T(H),T(W)),l&&m.close()},U=()=>{var I;(I=t.onCancel)===null||I===void 0||I.call(t),l&&m.close()},$=CD((I,H,W)=>{var Z,X;z(I),l?g&&((Z=t.onChange)===null||Z===void 0||Z.call(t,T(I),T(H),T(W))):(X=t.onChange)===null||X===void 0||X.call(t,T(I),T(H),T(W))}),F=cd(l)?Object.assign({closeOnClickOverlay:!0},l):{closeOnClickOverlay:!0},L=Q(ZI,Object.assign({},p,{value:P,onCancel:U,onConfirm:N,onChange:$}));return l?Me(nn,{children:[Q(sp,Object.assign({round:!0,position:"bottom",visible:g,closeOnClickOverlay:!0,onClickOverlay:()=>{F!=null&&F.closeOnClickOverlay&&d(!1)}},F,{children:L})),f==null?void 0:f(T(A),T(O.items),m)]}):L}const WC=q.forwardRef(XI);function JI(e){return Object.prototype.toString.call(e)==="[object Date]"&&!uD(e.getTime())}const eH=q.forwardRef((e,r)=>{const t=Jr(e,{type:"datetime",placeholder:!1,minDate:tH,maxDate:nH,formatter:(N,U)=>U}),{value:i,defaultValue:l,formatter:f,columnsOrder:c,type:p,filter:g,minDate:d,maxDate:m}=t,C=Va(t,["value","defaultValue","formatter","columnsOrder","type","filter","minDate","maxDate"]),b=N=>(JI(N)||(N=new Date),N=Math.max(N,d.getTime()),N=Math.min(N,m.getTime()),new Date(N)),[x,E,k]=K2(()=>b(i||l)),D=(N,U)=>{const $=t[`${N}Date`],F=$.getFullYear();let L=1,I=1,H=0,W=0;return N==="max"&&(L=12,I=qC(U.getFullYear(),U.getMonth()+1),H=23,W=59),U.getFullYear()===F&&(L=$.getMonth()+1,U.getMonth()+1===L&&(I=$.getDate(),U.getDate()===I&&(H=$.getHours(),U.getHours()===H&&(W=$.getMinutes())))),{[`${N}Year`]:F,[`${N}Month`]:L,[`${N}Date`]:I,[`${N}Hour`]:H,[`${N}Minute`]:W}},T=q.useMemo(()=>{const{maxYear:N,maxDate:U,maxMonth:$,maxHour:F,maxMinute:L}=D("max",k.current),{minYear:I,minDate:H,minMonth:W,minHour:Z,minMinute:X}=D("min",k.current);let re=[{type:"year",range:[I,N]},{type:"month",range:[W,$]},{type:"day",range:[H,U]},{type:"hour",range:[Z,F]},{type:"minute",range:[X,L]}];switch(p){case"date":re=re.slice(0,3);break;case"year-month":re=re.slice(0,2);break;case"month-day":re=re.slice(1,3);break;case"datehour":re=re.slice(0,4);break}if(c){const K=c.concat(re.map(te=>te.type));re.sort((te,G)=>K.indexOf(te.type)-K.indexOf(G.type))}return re.map(({type:K,range:te})=>{let G=ET(te[1]-te[0]+1,V=>fl(te[0]+V));return g&&(G=g(K,G)),{type:K,values:G}})},[c,k.current,d,m]),A=q.useMemo(()=>T.map(N=>N.values.map(U=>f(N.type,U))),[T,f]),S=q.useMemo(()=>{const N=t.popup?b(k.current):k.current;return T.map($=>{switch($.type){case"year":return f("year",`${N.getFullYear()}`);case"month":return f("month",fl(N.getMonth()+1));case"day":return f("day",fl(N.getDate()));case"hour":return f("hour",fl(N.getHours()));case"minute":return f("minute",fl(N.getMinutes()));default:return""}})},[t.value,k.current,b]),O=N=>{const{type:U}=t,$=X=>{let re=0;T.forEach((te,G)=>{X===te.type&&(re=G)});const{values:K}=T[re];return PI(K[N[re]])};let F=null,L=null,I=null;U==="month-day"?(F=(x||d).getFullYear(),L=$("month"),I=$("day")):(F=$("year"),L=$("month"),I=U==="year-month"?1:$("day"));const H=qC(F,L);I=I>H?H:I;let W=0,Z=0;return U==="datehour"&&(W=+$("hour")),U==="datetime"&&(W=+$("hour"),Z=+$("minute")),b(new Date(F,L-1,I,W,Z))},P=(N,U,$)=>{var F;const L=O($);E(L),(F=t.onChange)===null||F===void 0||F.call(t,L)},z=()=>{var N;(N=t.onConfirm)===null||N===void 0||N.call(t,x)};return Rc(()=>{const N=b(i);N&&N.valueOf()!==(x==null?void 0:x.valueOf())&&E(N)},[i,g,d,m]),Q(WC,Object.assign({},C,{value:S,ref:r,columns:A,onChange:P,onConfirm:z,onCancel:t.onCancel},{children:(N,U,$)=>{var F;return(F=t.children)===null||F===void 0?void 0:F.call(t,i||l,U,$)}}))}),FT=new Date().getFullYear(),tH=new Date(FT-10,0,1),nH=new Date(FT+10,11,31),rH=eH,aH=q.forwardRef((e,r)=>{const t=Jr(e,{minHour:0,maxHour:23,minMinute:0,maxMinute:59,placeholder:!1,defaultValue:"",formatter:(z,N)=>N}),{value:i,defaultValue:l,formatter:f,filter:c,minHour:p,maxHour:g,minMinute:d,maxMinute:m}=t,C=Va(t,["value","defaultValue","formatter","filter","minHour","maxHour","minMinute","maxMinute"]),b=z=>{z||(z=`${fl(p)}:${fl(d)}`);let[N,U]=z.split(":");return N=fl(ep(N,+p,+g)),U=fl(ep(U,+d,+m)),`${N}:${U}`},[x,E]=q.useState(()=>b(i===void 0?l:i)),k=q.useMemo(()=>[{type:"hour",range:[+p,+g]},{type:"minute",range:[+d,+m]}],[p,g,d,m]),D=q.useMemo(()=>k.map(({type:z,range:N})=>{let U=ET(N[1]-N[0]+1,$=>fl(N[0]+$));return c&&(U=c(z,U)),{type:z,values:U}}),[k]),T=q.useMemo(()=>D.map(z=>z.values.map(N=>f(z.type,N))),[D]),A=q.useMemo(()=>{const z=(t.popup?b(t.value):x).split(":");return[f("hour",z[0]),f("minute",z[1])]},[t.value,x,b]),S=()=>{var z;(z=t.onConfirm)===null||z===void 0||z.call(t,x)},O=()=>{var z;(z=t.onCancel)===null||z===void 0||z.call(t)},P=z=>{var N;const U=b(z.join(":"));E(U),(N=t.onChange)===null||N===void 0||N.call(t,U)};return Rc(()=>{const z=b(x);E(z)},[c,p,g,d,m]),Rc(()=>{const z=b(i);z!==x&&E(z)},[i]),Q(WC,Object.assign({},C,{ref:r,columns:T,value:A,onChange:P,onConfirm:S,onCancel:O},{children:(z,N,U)=>{var $;return($=t.children)===null||$===void 0?void 0:$.call(t,i,N,U)}}))}),[NT]=xn("datetime-picker"),QC=q.forwardRef((e,r)=>e.type==="time"?Q(aH,Object.assign({ref:r,className:Oe(NT())},e)):Q(rH,Object.assign({ref:r,className:Oe(NT())},e)));function ZC(e){return Array.isArray(e)?e:[e]}const CX="";function MT(e,r){this.v=e,this.k=r}function Sa(e,r,t,i){var l=Object.defineProperty;try{l({},"",{})}catch{l=0}Sa=function(c,p,g,d){function m(C,b){Sa(c,C,function(x){return this._invoke(C,b,x)})}p?l?l(c,p,{value:g,enumerable:!d,configurable:!d,writable:!d}):c[p]=g:(m("next",0),m("throw",1),m("return",2))},Sa(e,r,t,i)}function XC(){var e,r,t=typeof Symbol=="function"?Symbol:{},i=t.iterator||"@@iterator",l=t.toStringTag||"@@toStringTag";function f(x,E,k,D){var T=E&&E.prototype instanceof p?E:p,A=Object.create(T.prototype);return Sa(A,"_invoke",function(S,O,P){var z,N,U,$=0,F=P||[],L=!1,I={p:0,n:0,v:e,a:H,f:H.bind(e,4),d:function(Z,X){return z=Z,N=0,U=e,I.n=X,c}};function H(W,Z){for(N=W,U=Z,r=0;!L&&$&&!X&&r<F.length;r++){var X,re=F[r],K=I.p,te=re[2];W>3?(X=te===Z)&&(U=re[(N=re[4])?5:(N=3,3)],re[4]=re[5]=e):re[0]<=K&&((X=W<2&&K<re[1])?(N=0,I.v=Z,I.n=re[1]):K<te&&(X=W<3||re[0]>Z||Z>te)&&(re[4]=W,re[5]=Z,I.n=te,N=0))}if(X||W>1)return c;throw L=!0,Z}return function(W,Z,X){if($>1)throw TypeError("Generator is already running");for(L&&Z===1&&H(Z,X),N=Z,U=X;(r=N<2?e:U)||!L;){z||(N?N<3?(N>1&&(I.n=-1),H(N,U)):I.n=U:I.v=U);try{if($=2,z){if(N||(W="next"),r=z[W]){if(!(r=r.call(z,U)))throw TypeError("iterator result is not an object");if(!r.done)return r;U=r.value,N<2&&(N=0)}else N===1&&(r=z.return)&&r.call(z),N<2&&(U=TypeError("The iterator does not provide a '"+W+"' method"),N=1);z=e}else if((r=(L=I.n<0)?U:S.call(O,I))!==c)break}catch(re){z=e,N=1,U=re}finally{$=1}}return{value:r,done:L}}}(x,k,D),!0),A}var c={};function p(){}function g(){}function d(){}r=Object.getPrototypeOf;var m=[][i]?r(r([][i]())):(Sa(r={},i,function(){return this}),r),C=d.prototype=p.prototype=Object.create(m);function b(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,d):(x.__proto__=d,Sa(x,l,"GeneratorFunction")),x.prototype=Object.create(C),x}return g.prototype=d,Sa(C,"constructor",d),Sa(d,"constructor",g),g.displayName="GeneratorFunction",Sa(d,l,"GeneratorFunction"),Sa(C),Sa(C,l,"Generator"),Sa(C,i,function(){return this}),Sa(C,"toString",function(){return"[object Generator]"}),(XC=function(){return{w:f,m:b}})()}function py(e,r){function t(l,f,c,p){try{var g=e[l](f),d=g.value;return d instanceof MT?r.resolve(d.v).then(function(m){t("next",m,c,p)},function(m){t("throw",m,c,p)}):r.resolve(d).then(function(m){g.value=m,c(g)},function(m){return t("throw",m,c,p)})}catch(m){p(m)}}var i;this.next||(Sa(py.prototype),Sa(py.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Sa(this,"_invoke",function(l,f,c){function p(){return new r(function(g,d){t(l,c,g,d)})}return i=i?i.then(p,p):p()},!0)}function PT(e,r,t,i,l){return new py(XC().w(e,r,t,i),l||Promise)}function iH(e,r,t,i,l){var f=PT(e,r,t,i,l);return f.next().then(function(c){return c.done?c.value:f.next()})}function oH(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 BT(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 no(){var e=XC(),r=e.m(no),t=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function i(c){var p=typeof c=="function"&&c.constructor;return!!p&&(p===t||(p.displayName||p.name)==="GeneratorFunction")}var l={throw:1,return:2,break:3,continue:3};function f(c){var p,g;return function(d){p||(p={stop:function(){return g(d.a,2)},catch:function(){return d.v},abrupt:function(C,b){return g(d.a,l[C],b)},delegateYield:function(C,b,x){return p.resultName=b,g(d.d,BT(C),x)},finish:function(C){return g(d.f,C)}},g=function(C,b,x){d.p=p.prev,d.n=p.next;try{return C(b,x)}finally{p.next=d.n}}),p.resultName&&(p[p.resultName]=d.v,p.resultName=void 0),p.sent=d.v,p.next=d.n;try{return c.call(this,p)}finally{d.p=p.prev,d.n=p.next}}}return(no=function(){return{wrap:function(g,d,m,C){return e.w(f(g),d,m,C&&C.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(g,d){return new MT(g,d)},AsyncIterator:py,async:function(g,d,m,C,b){return(i(d)?PT:iH)(f(g),d,m,C,b)},keys:oH,values:BT}})()}function LT(e,r,t,i,l,f,c){try{var p=e[f](c),g=p.value}catch(d){return void t(d)}p.done?r(g):Promise.resolve(g).then(i,l)}function Bp(e){return function(){var r=this,t=arguments;return new Promise(function(i,l){var f=e.apply(r,t);function c(g){LT(f,i,l,c,p,"next",g)}function p(g){LT(f,i,l,c,p,"throw",g)}c(void 0)})}}function lH(e){if(Array.isArray(e))return bb(e)}function zT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sH(){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 eB(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 ul={};Object.defineProperty(ul,"__esModule",{value:!0}),ul.canDragX=rB,ul.canDragY=aB,ul.createCoreData=oB,ul.createDraggableData=lB,ul.getBoundPosition=tB,ul.getControlPosition=iB,ul.snapToGrid=nB;var Fi=sl,ud=lr;function tB(e,r,t){if(!e.props.bounds)return[r,t];let{bounds:i}=e.props;i=typeof i=="string"?i:sB(i);const l=A2(e);if(typeof i=="string"){const{ownerDocument:f}=l,c=f.defaultView;let p;if(i==="parent"?p=l.parentNode:p=f.querySelector(i),!(p instanceof c.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');const g=p,d=c.getComputedStyle(l),m=c.getComputedStyle(g);i={left:-l.offsetLeft+(0,Fi.int)(m.paddingLeft)+(0,Fi.int)(d.marginLeft),top:-l.offsetTop+(0,Fi.int)(m.paddingTop)+(0,Fi.int)(d.marginTop),right:(0,ud.innerWidth)(g)-(0,ud.outerWidth)(l)-l.offsetLeft+(0,Fi.int)(m.paddingRight)-(0,Fi.int)(d.marginRight),bottom:(0,ud.innerHeight)(g)-(0,ud.outerHeight)(l)-l.offsetTop+(0,Fi.int)(m.paddingBottom)-(0,Fi.int)(d.marginBottom)}}return(0,Fi.isNum)(i.right)&&(r=Math.min(r,i.right)),(0,Fi.isNum)(i.bottom)&&(t=Math.min(t,i.bottom)),(0,Fi.isNum)(i.left)&&(r=Math.max(r,i.left)),(0,Fi.isNum)(i.top)&&(t=Math.max(t,i.top)),[r,t]}function nB(e,r,t){const i=Math.round(r/e[0])*e[0],l=Math.round(t/e[1])*e[1];return[i,l]}function rB(e){return e.props.axis==="both"||e.props.axis==="x"}function aB(e){return e.props.axis==="both"||e.props.axis==="y"}function iB(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 oB(e,r,t){const i=!(0,Fi.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 lB(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 sB(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=uB;function uB(){}Object.defineProperty(Tg,"__esModule",{value:!0}),Tg.default=void 0;var O2=fB(q),oi=F2(bt.exports),cB=F2(eu.exports),_a=lr,ou=ul,R2=sl,qh=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 fB(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 Ha(e,r,t){return r=dB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function dB(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 xo={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let lu=xo.mouse,Og=class extends O2.Component{constructor(){super(...arguments),Ha(this,"dragging",!1),Ha(this,"lastX",NaN),Ha(this,"lastY",NaN),Ha(this,"touchIdentifier",null),Ha(this,"mounted",!1),Ha(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,_a.matchesSelectorAndParentsTo)(r.target,this.props.handle,t)||this.props.cancel&&(0,_a.matchesSelectorAndParentsTo)(r.target,this.props.cancel,t))return;r.type==="touchstart"&&r.preventDefault();const l=(0,_a.getTouchIdentifier)(r);this.touchIdentifier=l;const f=(0,ou.getControlPosition)(r,l,this);if(f==null)return;const{x:c,y:p}=f,g=(0,ou.createCoreData)(this,c,p);(0,qh.default)("DraggableCore: handleDragStart: %j",g),(0,qh.default)("calling",this.props.onStart),!(this.props.onStart(r,g)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,_a.addUserSelectStyles)(i),this.dragging=!0,this.lastX=c,this.lastY=p,(0,_a.addEvent)(i,lu.move,this.handleDrag),(0,_a.addEvent)(i,lu.stop,this.handleDragStop))}),Ha(this,"handleDrag",r=>{const t=(0,ou.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let p=i-this.lastX,g=l-this.lastY;if([p,g]=(0,ou.snapToGrid)(this.props.grid,p,g),!p&&!g)return;i=this.lastX+p,l=this.lastY+g}const f=(0,ou.createCoreData)(this,i,l);if((0,qh.default)("DraggableCore: handleDrag: %j",f),this.props.onDrag(r,f)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const g=document.createEvent("MouseEvents");g.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(g)}return}this.lastX=i,this.lastY=l}),Ha(this,"handleDragStop",r=>{if(!this.dragging)return;const t=(0,ou.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let g=i-this.lastX||0,d=l-this.lastY||0;[g,d]=(0,ou.snapToGrid)(this.props.grid,g,d),i=this.lastX+g,l=this.lastY+d}const f=(0,ou.createCoreData)(this,i,l);if(this.props.onStop(r,f)===!1||this.mounted===!1)return!1;const p=this.findDOMNode();p&&this.props.enableUserSelectHack&&(0,_a.removeUserSelectStyles)(p.ownerDocument),(0,qh.default)("DraggableCore: handleDragStop: %j",f),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,p&&((0,qh.default)("DraggableCore: Removing handlers"),(0,_a.removeEvent)(p.ownerDocument,lu.move,this.handleDrag),(0,_a.removeEvent)(p.ownerDocument,lu.stop,this.handleDragStop))}),Ha(this,"onMouseDown",r=>(lu=xo.mouse,this.handleDragStart(r))),Ha(this,"onMouseUp",r=>(lu=xo.mouse,this.handleDragStop(r))),Ha(this,"onTouchStart",r=>(lu=xo.touch,this.handleDragStart(r))),Ha(this,"onTouchEnd",r=>(lu=xo.touch,this.handleDragStop(r)))}componentDidMount(){this.mounted=!0;const r=this.findDOMNode();r&&(0,_a.addEvent)(r,xo.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const r=this.findDOMNode();if(r){const{ownerDocument:t}=r;(0,_a.removeEvent)(t,xo.mouse.move,this.handleDrag),(0,_a.removeEvent)(t,xo.touch.move,this.handleDrag),(0,_a.removeEvent)(t,xo.mouse.stop,this.handleDragStop),(0,_a.removeEvent)(t,xo.touch.stop,this.handleDragStop),(0,_a.removeEvent)(r,xo.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,_a.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:cB.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,Ha(Og,"displayName","DraggableCore"),Ha(Og,"propTypes",{allowAnyClick:oi.default.bool,children:oi.default.node.isRequired,disabled:oi.default.bool,enableUserSelectHack:oi.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:oi.default.arrayOf(oi.default.number),handle:oi.default.string,cancel:oi.default.string,nodeRef:oi.default.object,onStart:oi.default.func,onDrag:oi.default.func,onStop:oi.default.func,onMouseDown:oi.default.func,scale:oi.default.number,className:R2.dontSetMe,style:R2.dontSetMe,transform:R2.dontSetMe}),Ha(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 g.default}}),e.default=void 0;var r=b(q),t=m(bt.exports),i=m(eu.exports),l=m(FP),f=lr,c=ul,p=sl,g=m(Tg),d=m(Ag);function m(A){return A&&A.__esModule?A:{default:A}}function C(A){if(typeof WeakMap!="function")return null;var S=new WeakMap,O=new WeakMap;return(C=function(P){return P?O:S})(A)}function b(A,S){if(!S&&A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var O=C(S);if(O&&O.has(A))return O.get(A);var P={},z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in A)if(N!=="default"&&Object.prototype.hasOwnProperty.call(A,N)){var U=z?Object.getOwnPropertyDescriptor(A,N):null;U&&(U.get||U.set)?Object.defineProperty(P,N,U):P[N]=A[N]}return P.default=A,O&&O.set(A,P),P}function x(){return x=Object.assign?Object.assign.bind():function(A){for(var S=1;S<arguments.length;S++){var O=arguments[S];for(var P in O)Object.prototype.hasOwnProperty.call(O,P)&&(A[P]=O[P])}return A},x.apply(this,arguments)}function E(A,S,O){return S=k(S),S in A?Object.defineProperty(A,S,{value:O,enumerable:!0,configurable:!0,writable:!0}):A[S]=O,A}function k(A){var S=D(A,"string");return typeof S=="symbol"?S:String(S)}function D(A,S){if(typeof A!="object"||A===null)return A;var O=A[Symbol.toPrimitive];if(O!==void 0){var P=O.call(A,S||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(A)}class T extends r.Component{static getDerivedStateFromProps(S,O){let{position:P}=S,{prevPropsPosition:z}=O;return P&&(!z||P.x!==z.x||P.y!==z.y)?((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:P,prevPropsPosition:z}),{x:P.x,y:P.y,prevPropsPosition:{...P}}):null}constructor(S){super(S),E(this,"onDragStart",(O,P)=>{if((0,d.default)("Draggable: onDragStart: %j",P),this.props.onStart(O,(0,c.createDraggableData)(this,P))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),E(this,"onDrag",(O,P)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",P);const z=(0,c.createDraggableData)(this,P),N={x:z.x,y:z.y,slackX:0,slackY:0};if(this.props.bounds){const{x:$,y:F}=N;N.x+=this.state.slackX,N.y+=this.state.slackY;const[L,I]=(0,c.getBoundPosition)(this,N.x,N.y);N.x=L,N.y=I,N.slackX=this.state.slackX+($-N.x),N.slackY=this.state.slackY+(F-N.y),z.x=N.x,z.y=N.y,z.deltaX=N.x-this.state.x,z.deltaY=N.y-this.state.y}if(this.props.onDrag(O,z)===!1)return!1;this.setState(N)}),E(this,"onDragStop",(O,P)=>{if(!this.state.dragging||this.props.onStop(O,(0,c.createDraggableData)(this,P))===!1)return!1;(0,d.default)("Draggable: onDragStop: %j",P);const N={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:$,y:F}=this.props.position;N.x=$,N.y=F}this.setState(N)}),this.state={dragging:!1,dragged:!1,x:S.position?S.position.x:S.defaultPosition.x,y:S.position?S.position.y:S.defaultPosition.y,prevPropsPosition:{...S.position},slackX:0,slackY:0,isElementSVG:!1},S.position&&(S.onDrag||S.onStop)}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var S,O;return(S=(O=this.props)===null||O===void 0||(O=O.nodeRef)===null||O===void 0?void 0:O.current)!==null&&S!==void 0?S:i.default.findDOMNode(this)}render(){const{axis:S,bounds:O,children:P,defaultPosition:z,defaultClassName:N,defaultClassNameDragging:U,defaultClassNameDragged:$,position:F,positionOffset:L,scale:I,...H}=this.props;let W={},Z=null;const re=!Boolean(F)||this.state.dragging,K=F||z,te={x:(0,c.canDragX)(this)&&re?this.state.x:K.x,y:(0,c.canDragY)(this)&&re?this.state.y:K.y};this.state.isElementSVG?Z=(0,f.createSVGTransform)(te,L):W=(0,f.createCSSTransform)(te,L);const G=(0,l.default)(P.props.className||"",N,{[U]:this.state.dragging,[$]:this.state.dragged});return r.createElement(g.default,x({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(P),{className:G,style:{...P.props.style,...W},transform:Z}))}}e.default=T,E(T,"displayName","Draggable"),E(T,"propTypes",{...g.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:p.dontSetMe,style:p.dontSetMe,transform:p.dontSetMe}),E(T,"defaultProps",{...g.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:pB}=s6;Dg.exports=A6,Dg.exports.default=A6,Dg.exports.DraggableCore=pB;var N2={};N2.__esModule=!0,N2.cloneElement=bB;var vB=mB(q);function mB(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){gB(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 gB(e,r,t){return r=yB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function yB(e){var r=xB(e,"string");return typeof r=="symbol"?r:String(r)}function xB(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 bB(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),vB.default.cloneElement(e,r)}var Gh={};Gh.__esModule=!0,Gh.resizableProps=void 0;var Lt=CB(bt.exports);function CB(e){return e&&e.__esModule?e:{default:e}}var wB={axis:Lt.default.oneOf(["both","x","y","none"]),className:Lt.default.string,children:Lt.default.element.isRequired,draggableOpts:Lt.default.shape({allowAnyClick:Lt.default.bool,cancel:Lt.default.string,children:Lt.default.node,disabled:Lt.default.bool,enableUserSelectHack:Lt.default.bool,offsetParent:Lt.default.node,grid:Lt.default.arrayOf(Lt.default.number),handle:Lt.default.string,nodeRef:Lt.default.object,onStart:Lt.default.func,onDrag:Lt.default.func,onStop:Lt.default.func,onMouseDown:Lt.default.func,scale:Lt.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=Lt.default.number).isRequired.apply(f,t)}return Lt.default.number.apply(Lt.default,t)},handle:Lt.default.oneOfType([Lt.default.node,Lt.default.func]),handleSize:Lt.default.arrayOf(Lt.default.number),lockAspectRatio:Lt.default.bool,maxConstraints:Lt.default.arrayOf(Lt.default.number),minConstraints:Lt.default.arrayOf(Lt.default.number),onResizeStop:Lt.default.func,onResizeStart:Lt.default.func,onResize:Lt.default.func,resizeHandles:Lt.default.arrayOf(Lt.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Lt.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=Lt.default.number).isRequired.apply(f,t)}return Lt.default.number.apply(Lt.default,t)}};Gh.resizableProps=wB,Yh.__esModule=!0,Yh.default=void 0;var Kh=kB(q),_B=Dg.exports,EB=N2,SB=Gh,DB=["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 kB(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 TB(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){AB(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 AB(e,r,t){return r=OB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function OB(e){var r=RB(e,"string");return typeof r=="symbol"?r:String(r)}function RB(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 FB(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){FB(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,p=c.minConstraints,g=c.maxConstraints,d=c.lockAspectRatio;if(!p&&!g&&!d)return[l,f];if(d){var m=this.props.width/this.props.height,C=l-this.props.width,b=f-this.props.height;Math.abs(C)>Math.abs(b*m)?f=l/m:l=f*m}var x=l,E=f,k=this.slack||[0,0],D=k[0],T=k[1];return l+=D,f+=T,p&&(l=Math.max(p[0],l),f=Math.max(p[1],f)),g&&(l=Math.min(g[0],l),f=Math.min(g[1],f)),this.slack=[D+(x-l),T+(E-f)],[l,f]},t.resizeHandler=function(l,f){var c=this;return function(p,g){var d=g.node,m=g.deltaX,C=g.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 E=f[0],k=f[f.length-1],D=d.getBoundingClientRect();if(c.lastHandleRect!=null){if(k==="w"){var T=D.left-c.lastHandleRect.left;m+=T}if(E==="n"){var A=D.top-c.lastHandleRect.top;C+=A}}c.lastHandleRect=D,k==="w"&&(m=-m),E==="n"&&(C=-C);var S=c.props.width+(b?m/c.props.transformScale:0),O=c.props.height+(x?C/c.props.transformScale:0),P=c.runConstraints(S,O);S=P[0],O=P[1];var z=S!==c.props.width||O!==c.props.height,N=typeof c.props[l]=="function"?c.props[l]:null,U=l==="onResize"&&!z;N&&!U&&(p.persist==null||p.persist(),N(p,{node:d,size:{width:S,height:O},handle:f})),l==="onResizeStop"&&c.resetData()}}},t.renderResizeHandle=function(l,f){var c=this.props.handle;if(!c)return Kh.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:f});if(typeof c=="function")return c(l,f);var p=typeof c.type=="string",g=P2({ref:f},p?{}:{handleAxis:l});return Kh.cloneElement(c,g)},t.render=function(){var l=this,f=this.props,c=f.children,p=f.className,g=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 m=TB(f,DB);return(0,EB.cloneElement)(c,P2(P2({},m),{},{className:(p?p+" ":"")+"react-resizable",children:[].concat(c.props.children,d.map(function(C){var b,x=(b=l.handleRefs[C])!=null?b:l.handleRefs[C]=Kh.createRef();return Kh.createElement(_B.DraggableCore,M2({},g,{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}(Kh.Component);Yh.default=L2,L2.propTypes=SB.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=LB(q),NB=M6(bt.exports),MB=M6(Yh),PB=Gh,BB=["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 LB(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){zB(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 zB(e,r,t){return r=UB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function UB(e){var r=jB(e,"string");return typeof r=="symbol"?r:String(r)}function jB(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 IB(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 HB(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){HB(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(p,g){var d=g.size;i.props.onResize?(p.persist==null||p.persist(),i.setState(d,function(){return i.props.onResize&&i.props.onResize(p,g)})):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 p=l.onResizeStart,g=l.onResizeStop,d=l.draggableOpts,m=l.minConstraints,C=l.maxConstraints,b=l.lockAspectRatio,x=l.axis;l.width,l.height;var E=l.resizeHandles,k=l.style,D=l.transformScale,T=IB(l,BB);return z2.createElement(MB.default,{axis:x,draggableOpts:d,handle:f,handleSize:c,height:this.state.height,lockAspectRatio:b,maxConstraints:C,minConstraints:m,onResizeStart:p,onResize:this.onResize,onResizeStop:g,resizeHandles:E,transformScale:D,width:this.state.width},z2.createElement("div",U2({},T,{style:Fg(Fg({},k),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(z2.Component);Rg.default=L6,L6.propTypes=Fg(Fg({},PB.resizableProps),{},{children:NB.default.element}),y2.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var VB=y2.exports.Resizable=Yh.default;y2.exports.ResizableBox=Rg.default;const $B={search:"search-table-module_search_17add",table:"search-table-module_table_5f652"},YB=e=>{const{onResize:r,width:t,resizeable:i,...l}=e;return!t||!i?Q("th",{...l}):Q(VB,{width:t||200,height:0,onResize:r,draggableOpts:{enableUserSelectHack:!1},children:Q("th",{...l})})};function qB(e){const{tableProps:r={},searchProps:t,langId:i}=e,{minColumnWidth:l=200,resizeable:f=!1,tableId:c,storageKey:p="szld_table_cell_width",emptyText:g,...d}=r,[m,C]=q.useState(r.columns||[]),b=D=>{var A,S;let T=D.width||l;if(D.dataIndex&&c){const O=Array.isArray(D.dataIndex)?D.dataIndex.join("-"):String(D.dataIndex),P=(S=(A=Ub(p))==null?void 0:A[c])==null?void 0:S[O];P&&(T=P)}return T};q.useEffect(()=>{const D=r.columns||[];if(D.length===0||!f){C(D);return}const T=D==null?void 0:D.filter(A=>!A.hidden).map(A=>A.dataIndex?{...A,width:b(A),onHeaderCell:S=>({width:S.width,resizeable:f,onResize:(O,{size:P})=>x(S,P)})}:A);T.length>0&&(T[T.length-1].minWidth=T[T.length-1].width,T[T.length-1].width=void 0),C(T)},[r.columns,c,l,f]);const x=(D,T)=>{C(A=>{const S=A==null?void 0:A.map(O=>O.dataIndex===D.dataIndex?{...O,width:T.width}:O);if(c){const O=Ub(p)||{};O[c]=O[c]||{},S==null||S.forEach(P=>{if(P.dataIndex){const z=Array.isArray(P.dataIndex)?P.dataIndex.join("-"):String(P.dataIndex);O[c][z]=P.width}}),localStorage.setItem(p,JSON.stringify(O))}return S})},E={header:{cell:YB},...d==null?void 0:d.components},k=q.useMemo(()=>{var T;const D=A=>{let S=A.width||A.minWidth;return(!S||typeof S=="string")&&(S=l),S};return(T=m==null?void 0:m.map(A=>D(A)))==null?void 0:T.reduce((A,S)=>A+S,0)},[m,l]);return Me(nn,{children:[t&&Q(g2,{hiddenTitle:!0,...t,items:t.items}),Q(ve.Table,{scroll:{x:k},...d,components:E,columns:m,className:ts($B.table,r==null?void 0:r.className),locale:{emptyText:Q(ve.Empty,{image:ve.Empty.PRESENTED_IMAGE_SIMPLE,description:g})},pagination:typeof(r==null?void 0:r.pagination)=="boolean"?r.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:D=>i==="10001"?`共 ${D} 条`:`Total ${D} items`,...r==null?void 0:r.pagination}})]})}const GB={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},z6=q.createContext(null),KB=({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 WB(e){const{title:r,editable:t,children:i,dataIndex:l,record:f,rules:c,onChange:p,type:g="input",valueProps:d,initialValue:m,...C}=e,b=q.useRef(null),x=q.useContext(z6),E=async()=>{try{const T=await x.validateFields();p({...f,...T})}catch{}},k=()=>Q(l6,{valueType:g,valueProps:{...d,onBlur:E,onPressEnter:E},inputRef:b});let D=i;return t&&(D=Q(ve.Form.Item,{style:{margin:0},initialValue:m||Js.get(f,l),name:l,rules:c,children:k()})),Q("td",{...C,children:D})}function QB(e){const{columns:r,onChange:t,...i}=e,l={body:{row:KB,cell:WB}},f=r==null?void 0:r.map(c=>c.editable?{...c,onCell:p=>({...c,record:p,onChange:t})}:c);return Q(ve.Table,{...i,components:l,rowClassName:()=>GB.editableRow,columns:f})}const U6=e=>{const{auth:r=!0,...t}=e;return r?Q(ve.Button,{...t}):null},ZB=e=>{const{PId:r,auths:t,...i}=e,l=q.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})},Wh={wrapper:"LoopSlide-module_wrapper_dde90",container:"LoopSlide-module_container_be123",scrollContent:"LoopSlide-module_scrollContent_36ed7",content:"LoopSlide-module_content_f392a"},XB=({speed:e=10,delay:r=1,timingFunction:t="linear",className:i="",style:l,children:f,height:c="100vh",mouseControl:p=!1,classes:g})=>{const d=q.useRef(null),m=q.useRef(null),C=q.useRef(null),b=q.useRef(null),x=q.useRef(0),E=q.useRef(),k=q.useRef(0),D=q.useMemo(()=>{if(!m.current||!C.current)return;const N=m.current,U=C.current,$=parseFloat(U.scrollHeight.toString());return $*2-N.clientHeight<$},[]),T=()=>{if(!m.current||!C.current)return;const N=m.current,U=C.current,$=parseFloat(U.scrollHeight.toString());if($*2<=N.clientHeight){N.style.animation="none";return}const F=$/N.clientHeight;N.style.setProperty("--content-height",`${$}px`),N.style.animationDuration=`${e*F}s`,N.style.animationDelay=`${r}s`,N.style.animationTimingFunction=t};q.useEffect(()=>(T(),m.current&&(b.current=new ResizeObserver(T),b.current.observe(m.current)),()=>{b.current&&m.current&&b.current.unobserve(m.current)}),[e,r]);const A=()=>{p&&m.current&&(m.current.style.animationPlayState="paused")},S=()=>{p&&m.current&&(z(),m.current.style.animationPlayState="running")},O=()=>{if(!m.current||!p)return;const U=m.current.getAnimations()[0];if(U)if(Math.abs(x.current)>.1){const $=performance.now(),F=$-k.current;k.current=$;const L=.95;x.current*=Math.pow(L,F/16);const I=U.currentTime||0;U.currentTime=I+x.current,E.current=requestAnimationFrame(O)}else x.current=0,z()},P=N=>{if(!p||!m.current)return;N.preventDefault();const U=N.deltaY,$=.25;x.current+=U*$;const F=50;x.current=Math.max(-F,Math.min(F,x.current)),E.current||(k.current=performance.now(),E.current=requestAnimationFrame(O))},z=()=>{E.current&&(cancelAnimationFrame(E.current),E.current=void 0)};return q.useEffect(()=>()=>{z()},[]),q.useEffect(()=>{const N=d.current;if(N)return p&&N.addEventListener("wheel",P,{passive:!1}),()=>{N.removeEventListener("wheel",P)}},[p]),Q("div",{ref:d,className:`${Wh.wrapper} ${i}`,style:{height:c,...l},onMouseEnter:A,onMouseLeave:S,children:Me("div",{ref:m,className:ts(Wh.container,g==null?void 0:g.container),children:[Q("div",{ref:C,className:ts(Wh.content,g==null?void 0:g.content),children:f}),Q("div",{className:ts(Wh.content,g==null?void 0:g.content),children:f}),D&&Q("div",{className:ts(Wh.content,g==null?void 0:g.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]=q.useState(!1),p=q.useMemo(()=>e.currentIndex!==void 0?e.currentIndex:!t||r.length===0?0:r.findIndex(C=>C.PNId===t),[t,r]),g=q.useMemo(()=>p>1?f?0:p-1:0,[p,f]),d=()=>{c(!0)};return Me("ul",{className:Pr.main,children:[p>1&&!f&&Me("li",{className:ts(Pr.item,Pr.itemDone),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Q("div",{className:Pr.content,children:Me("div",{className:Pr.collpase,children:[Me("div",{children:["已收起",Q("span",{children:p-1}),"个节点"]}),Me("a",{className:Pr.btn,onClick:d,children:["展开节点",Q(R7,{})]})]})})]}),r.slice(g).map((m,C)=>Me("li",{className:ts(Pr.item,p===C+g?Pr.itemActive:p>C+g?Pr.itemDone:Pr.itemUnDo),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Me("div",{className:Pr.content,children:[l?l(m,C,f?p:p-g):Me(nn,{children:[Q("div",{className:Pr.title,children:m.PNName}),Me("div",{className:Pr.dateWrapper,children:[m.PlanFinishDate&&Me("span",{children:["预计完成时间: ",m.PlanFinishDate]}),m.UpdateTime&&Me("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",m.UpdateTime]})]}),m.Remark&&Q("div",{className:Pr.remark,children:m.Remark})]}),f&&p-1===C&&Me("a",{className:Pr.btn,onClick:()=>c(!1),children:["收起节点 ",Q(Z7,{})]})]})]},typeof i=="string"?m[i]:i(m)))]})},JB=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 eL(e){const{totalText:r="共",unitText:t="条",jumpText:i="跳至",pageText:l="页",paginationProps:f}=e,[c,p]=q.useState(""),g=(f==null?void 0:f.pageSize)||10,d=b=>{p(b.target.value)},m=b=>{var x;p(""),!Number.isNaN(Number(b.target.value))&&((x=f==null?void 0:f.onChange)==null||x.call(f,Number(b.target.value),g))},C=b=>{var x;if(b.key==="Enter"){if(p(""),Number.isNaN(Number(c)))return;(x=f==null?void 0:f.onChange)==null||x.call(f,Number(c),g)}};return Me("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}),Me("div",{className:I6.jumpBtns,children:[i,Q(ve.Input,{style:{width:"50px",margin:"0 8px"},value:c,onChange:d,onBlur:b=>m(b),onKeyDown:b=>C(b)}),l]})]})}var H6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Bt,function(){var t=1e3,i=6e4,l=36e5,f="millisecond",c="second",p="minute",g="hour",d="day",m="week",C="month",b="quarter",x="year",E="date",k="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,A={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(W){var Z=["th","st","nd","rd"],X=W%100;return"["+W+(Z[(X-20)%10]||Z[X]||Z[0])+"]"}},S=function(W,Z,X){var re=String(W);return!re||re.length>=Z?W:""+Array(Z+1-re.length).join(X)+W},O={s:S,z:function(W){var Z=-W.utcOffset(),X=Math.abs(Z),re=Math.floor(X/60),K=X%60;return(Z<=0?"+":"-")+S(re,2,"0")+":"+S(K,2,"0")},m:function W(Z,X){if(Z.date()<X.date())return-W(X,Z);var re=12*(X.year()-Z.year())+(X.month()-Z.month()),K=Z.clone().add(re,C),te=X-K<0,G=Z.clone().add(re+(te?-1:1),C);return+(-(re+(X-K)/(te?K-G:G-K))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:C,y:x,w:m,d,D:E,h:g,m:p,s:c,ms:f,Q:b}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},P="en",z={};z[P]=A;var N="$isDayjsObject",U=function(W){return W instanceof I||!(!W||!W[N])},$=function W(Z,X,re){var K;if(!Z)return P;if(typeof Z=="string"){var te=Z.toLowerCase();z[te]&&(K=te),X&&(z[te]=X,K=te);var G=Z.split("-");if(!K&&G.length>1)return W(G[0])}else{var V=Z.name;z[V]=Z,K=V}return!re&&K&&(P=K),K||!re&&P},F=function(W,Z){if(U(W))return W.clone();var X=typeof Z=="object"?Z:{};return X.date=W,X.args=arguments,new I(X)},L=O;L.l=$,L.i=U,L.w=function(W,Z){return F(W,{locale:Z.$L,utc:Z.$u,x:Z.$x,$offset:Z.$offset})};var I=function(){function W(X){this.$L=$(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[N]=!0}var Z=W.prototype;return Z.parse=function(X){this.$d=function(re){var K=re.date,te=re.utc;if(K===null)return new Date(NaN);if(L.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var G=K.match(D);if(G){var V=G[2]-1||0,ee=(G[7]||"0").substring(0,3);return te?new Date(Date.UTC(G[1],V,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ee)):new Date(G[1],V,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ee)}}return new Date(K)}(X),this.init()},Z.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()},Z.$utils=function(){return L},Z.isValid=function(){return this.$d.toString()!==k},Z.isSame=function(X,re){var K=F(X);return this.startOf(re)<=K&&K<=this.endOf(re)},Z.isAfter=function(X,re){return F(X)<this.startOf(re)},Z.isBefore=function(X,re){return this.endOf(re)<F(X)},Z.$g=function(X,re,K){return L.u(X)?this[re]:this.set(K,X)},Z.unix=function(){return Math.floor(this.valueOf()/1e3)},Z.valueOf=function(){return this.$d.getTime()},Z.startOf=function(X,re){var K=this,te=!!L.u(re)||re,G=L.p(X),V=function(Ne,Te){var tt=L.w(K.$u?Date.UTC(K.$y,Te,Ne):new Date(K.$y,Te,Ne),K);return te?tt:tt.endOf(d)},ee=function(Ne,Te){return L.w(K.toDate()[Ne].apply(K.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(Te)),K)},ie=this.$W,ae=this.$M,pe=this.$D,xe="set"+(this.$u?"UTC":"");switch(G){case x:return te?V(1,0):V(31,11);case C:return te?V(1,ae):V(0,ae+1);case m:var Ee=this.$locale().weekStart||0,se=(ie<Ee?ie+7:ie)-Ee;return V(te?pe-se:pe+(6-se),ae);case d:case E:return ee(xe+"Hours",0);case g:return ee(xe+"Minutes",1);case p:return ee(xe+"Seconds",2);case c:return ee(xe+"Milliseconds",3);default:return this.clone()}},Z.endOf=function(X){return this.startOf(X,!1)},Z.$set=function(X,re){var K,te=L.p(X),G="set"+(this.$u?"UTC":""),V=(K={},K[d]=G+"Date",K[E]=G+"Date",K[C]=G+"Month",K[x]=G+"FullYear",K[g]=G+"Hours",K[p]=G+"Minutes",K[c]=G+"Seconds",K[f]=G+"Milliseconds",K)[te],ee=te===d?this.$D+(re-this.$W):re;if(te===C||te===x){var ie=this.clone().set(E,1);ie.$d[V](ee),ie.init(),this.$d=ie.set(E,Math.min(this.$D,ie.daysInMonth())).$d}else V&&this.$d[V](ee);return this.init(),this},Z.set=function(X,re){return this.clone().$set(X,re)},Z.get=function(X){return this[L.p(X)]()},Z.add=function(X,re){var K,te=this;X=Number(X);var G=L.p(re),V=function(ae){var pe=F(te);return L.w(pe.date(pe.date()+Math.round(ae*X)),te)};if(G===C)return this.set(C,this.$M+X);if(G===x)return this.set(x,this.$y+X);if(G===d)return V(1);if(G===m)return V(7);var ee=(K={},K[p]=i,K[g]=l,K[c]=t,K)[G]||1,ie=this.$d.getTime()+X*ee;return L.w(ie,this)},Z.subtract=function(X,re){return this.add(-1*X,re)},Z.format=function(X){var re=this,K=this.$locale();if(!this.isValid())return K.invalidDate||k;var te=X||"YYYY-MM-DDTHH:mm:ssZ",G=L.z(this),V=this.$H,ee=this.$m,ie=this.$M,ae=K.weekdays,pe=K.months,xe=K.meridiem,Ee=function(Te,tt,Se,lt){return Te&&(Te[tt]||Te(re,te))||Se[tt].slice(0,lt)},se=function(Te){return L.s(V%12||12,Te,"0")},Ne=xe||function(Te,tt,Se){var lt=Te<12?"AM":"PM";return Se?lt.toLowerCase():lt};return te.replace(T,function(Te,tt){return tt||function(Se){switch(Se){case"YY":return String(re.$y).slice(-2);case"YYYY":return L.s(re.$y,4,"0");case"M":return ie+1;case"MM":return L.s(ie+1,2,"0");case"MMM":return Ee(K.monthsShort,ie,pe,3);case"MMMM":return Ee(pe,ie);case"D":return re.$D;case"DD":return L.s(re.$D,2,"0");case"d":return String(re.$W);case"dd":return Ee(K.weekdaysMin,re.$W,ae,2);case"ddd":return Ee(K.weekdaysShort,re.$W,ae,3);case"dddd":return ae[re.$W];case"H":return String(V);case"HH":return L.s(V,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return Ne(V,ee,!0);case"A":return Ne(V,ee,!1);case"m":return String(ee);case"mm":return L.s(ee,2,"0");case"s":return String(re.$s);case"ss":return L.s(re.$s,2,"0");case"SSS":return L.s(re.$ms,3,"0");case"Z":return G}return null}(Te)||G.replace(":","")})},Z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Z.diff=function(X,re,K){var te,G=this,V=L.p(re),ee=F(X),ie=(ee.utcOffset()-this.utcOffset())*i,ae=this-ee,pe=function(){return L.m(G,ee)};switch(V){case x:te=pe()/12;break;case C:te=pe();break;case b:te=pe()/3;break;case m:te=(ae-ie)/6048e5;break;case d:te=(ae-ie)/864e5;break;case g:te=ae/l;break;case p:te=ae/i;break;case c:te=ae/t;break;default:te=ae}return K?te:L.a(te)},Z.daysInMonth=function(){return this.endOf(C).$D},Z.$locale=function(){return z[this.$L]},Z.locale=function(X,re){if(!X)return this.$L;var K=this.clone(),te=$(X,re,!0);return te&&(K.$L=te),K},Z.clone=function(){return L.w(this.$d,this)},Z.toDate=function(){return new Date(this.valueOf())},Z.toJSON=function(){return this.isValid()?this.toISOString():null},Z.toISOString=function(){return this.$d.toISOString()},Z.toString=function(){return this.$d.toUTCString()},W}(),H=I.prototype;return F.prototype=H,[["$ms",f],["$s",c],["$m",p],["$H",g],["$W",d],["$M",C],["$y",x],["$D",E]].forEach(function(W){H[W[1]]=function(Z){return this.$g(Z,W[0],W[1])}}),F.extend=function(W,Z){return W.$i||(W(Z,I,F),W.$i=!0),F},F.locale=$,F.isDayjs=U,F.unix=function(W){return F(1e3*W)},F.en=z[P],F.Ls=z,F.p={},F})})(H6);const yn=H6.exports,Qh=(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(p=>p)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>yn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).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(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=tL(e.children||[])),t||null},V6=e=>e&&e<yn().startOf("day"),$6=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},tL=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)},su=(e,r)=>{const t=e.find(i=>(i==null?void 0:i.dataid)===r);return(t==null?void 0:t.content)??r},I2=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:p})=>{var C;let g=[];const d=async b=>{var E;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(E=k==null?void 0:k.data)!=null&&E.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(D=>({label:`${D.dicid||""}-${D.info||""}`,value:`${D.dicid||""}-${D.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},m=async()=>{var b,x;try{const E=((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)||"",D=c==null?void 0:c["field-names"];if(!E.length){ve.message.error("请配置key-field");return}const T=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(T!=null&&T.data){const A=T==null?void 0:T.data,S=(A==null?void 0:A.list)||[];let O=[];Array.isArray(A)&&(O=A),Array.isArray(S)&&(O=S),D?g=O:g=O.map(P=>({label:$6(P,k,E),value:$6(P,k,E)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(g=((C=c.data)==null?void 0:C.map(b=>({label:su(p||[],b),value:b})))||[],c.options&&Array.isArray(c.options)&&(g=c.options)):c.inputType==="dictionary"?g=await d(t):c.inputType==="system-dictionary"&&(g=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await m(),g};function uu(e){try{return JSON.parse(e)}catch{return{}}}function Zh(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 nL=(e,r)=>{var C;let t=Js.cloneDeep(e);const{attr_list:i=[]}=t,{isMobile:l=!1,guid:f,isListToObj:c=!1,isAutoFill:p=!0}=e;let g=[];p&&((C=t==null?void 0:t.attr_list)==null||C.forEach(b=>{var x,E,k,D,T,A;(x=b==null?void 0:b.json)!=null&&x["auto-generate"]&&((E=b==null?void 0:b.json)!=null&&E["auto-generate-type"])&&(((k=b==null?void 0:b.json)==null?void 0:k["auto-generate-type"])==="currenttime"&&(b.attrvalue=yn().format("YYYY-MM-DD HH:mm:ss")),((D=b==null?void 0:b.json)==null?void 0:D["auto-generate-type"])==="guid"&&(b.attrvalue=f||"")),(T=b==null?void 0:b.json)!=null&&T.default&&(b.attrvalue=(A=b==null?void 0:b.json)==null?void 0:A.default)}));const d=(b,x)=>{try{const E=new Map(b.map((k,D)=>[k.attrid,D]));for(const[k,D]of Object.entries(x)){const T=E.get(k);if(T===void 0)continue;let A=b[T];if(!D&&D!==0){A.attrvalue="";continue}A=m(A,D,l)}b.forEach(k=>{k.children&&Array.isArray(k.children)&&k.children.length>0&&!Array.isArray(k.children[0])&&x[k.attrid]&&d(k.children,x[k.attrid]),k.children&&Array.isArray(k.children)&&k.children.length>0&&Array.isArray(k.children[0])&&k.children.forEach((D,T)=>{var A,S;D&&Array.isArray(D)&&((A=x==null?void 0:x[k.attrid])!=null&&A[T])&&d(D,(S=x==null?void 0:x[k.attrid])==null?void 0:S[T])})})}catch{}},m=(b,x,E)=>{var T,A,S,O;const k=(T=b.json)==null?void 0:T.input,D=(A=b.json)==null?void 0:A.format;switch(k){case"image":case"file":case"video":case"audio":const P=typeof x=="string"?JSON.parse(x):x;if(!Array.isArray(P)){b.attrvalue=JSON.stringify([]);return}const z=P.filter($=>$.FileId),N=P.filter($=>{var F;return $.status==="done"&&((F=$.response)==null?void 0:F.data)}).map($=>$.response.data),U=[...z,...N];g=[...g,...N],b.attrvalue=JSON.stringify(U);break;case"cascader":if(Array.isArray(x)&&x.length>0){const $=((S=b.json)==null?void 0:S["cascader-delimiter"])||"/";b.attrvalue=x.join($)}else b.attrvalue="";break;case"range-picker":E?Array.isArray(x)&&x.length>0?b.attrvalue=x==null?void 0:x.map($=>yn($).format(D||"YYYY-MM-DD")).join("~"):b.attrvalue="":Array.isArray(x)&&x.length>0?b.attrvalue=x.join("~"):b.attrvalue="";break;case"multiple-date-picker":E?Array.isArray(x)&&x.length>0?b.attrvalue=x==null?void 0:x.map($=>yn($).format(D||"YYYY-MM-DD")).join(","):b.attrvalue=x:Array.isArray(x)&&x.length>0?b.attrvalue=x.join(","):b.attrvalue=x;break;case"checkbox":case"mult-select":Array.isArray(x)&&x.length>0?b.attrvalue=x.join(","):b.attrvalue=x;break;case"date-picker":x?b.attrvalue=yn(x).format(D||"YYYY-MM-DD"):b.attrvalue="";break;case"time-picker":x?b.attrvalue=yn(x).format(D||"YYYY-MM-DD HH:mm:ss"):b.attrvalue="";break;default:(O=b==null?void 0:b.json)!=null&&O["properties-multiple"]||(b.attrvalue=x);break}return b};return t.attr_list&&Array.isArray(t.attr_list)&&d(i,r),{updatedData:c?W6(t.attr_list||[]):t,uploadedFiles:g}},H2=(e,r)=>e.map(t=>{var f,c,p;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 g=(p=i==null?void 0:i.children)==null?void 0:p.map(d=>d==null?void 0:d.map(m=>q6(m)));i.children=g}return i}),q6=(e,r)=>{if(!e.json&&e.info)try{const t=e.info_base64===1?Zh(e.info):e.info,i=uu(t);return{...e,json:i,...r}}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 p;return(p=c.json)==null?void 0:p.combination}).reduce((c,p)=>{const g=p.json["combination-id"];return g&&(c[g]||(c[g]=[]),c[g].push(p)),c},{}),l=new Set;Object.values(i).forEach(c=>{(c==null?void 0:c.length)!==0&&c.slice(1).forEach(p=>l.add(p.attrid))});const f=c=>c.filter(p=>!l.has(p.attrid)).map(p=>{var m;const g=(m=p.json)==null?void 0:m["combination-id"];if(g&&i[g]){const C={...p,json:{...p.json,combinations:i[g]}},{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}=p;return d&&Array.isArray(d==null?void 0:d[0])&&(d!=null&&d.length)&&(p.children=d==null?void 0:d.map(C=>f(C))),p});return f(t)},rL=async({number:e,key:r,sourceNumber:t,guidInterfaceName:i,SelPCParamInterfaceName:l,servicerAttrListInterfaceName:f,accepterAttrListInterfaceName:c,defaultAttrListInterfaceName:p,commonRequest:g,guidParams:d,pcParam:m,attrReqKey:C="asid",attrListExtraParams:b={}})=>new Promise(async(x,E)=>{var P,z,N,U;let k="",D=[],T={},A={};const S=await g(i||"FWDXGLCreateGUID",d||{"source-number":t});(S==null?void 0:S.ReturnValue)===1&&((P=S==null?void 0:S.data)!=null&&P.GUID)?k=S.data.GUID:E("获取GUID失败");const O=await g(l||"FWDXGLSelPCParam",m||{"source-number":t});if((O==null?void 0:O.ReturnValue)===1){const $=(z=O.data[e])==null?void 0:z[r],F=(N=O.data[e])==null?void 0:N["properties-type"],L={server:f||"",accepter:c||""};A=O.data;const I=await g(L[F]||p,{[C]:$,"source-number":t,...b});if((I==null?void 0:I.ReturnValue)===1&&I.data){const H=((U=I.data)==null?void 0:U.attr_list)||[];D=K6(H),T={...I.data,attr_list:D},x({baseData:T,newGUID:k,attrListConfigs:D,selPCParam:A})}else E("请配置属性集")}else E("获取配置失败")}),aL=async(e,r,t)=>await t(e,r);function iL(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(p=>{var d,m,C,b;const g=`${p.attrid}_${p.attrtype}`;if(p.attrtype===1&&p.children.length>0&&!Array.isArray(p.children))c[g]={asid:((m=(d=p.children)==null?void 0:d[0])==null?void 0:m.asid)||"",data_list:[r(p.children)]};else if(p.attrtype===1&&p.children.length>0&&Array.isArray(p.children)){let{children:x=[],attrvalue:E}=p||{};E&&(E!=null&&E.length)&&Array.isArray(E)?x=E.map(k=>{var A,S,O,P;const D=(A=Object.values(k))==null?void 0:A.findIndex(z=>Array.isArray(z)),T=((S=Object.keys(k))==null?void 0:S[D])||"";if(T){const z=((O=x==null?void 0:x[0])==null?void 0:O.find(U=>U.attrid===T))||{},{input:N}=(z==null?void 0:z.json)||{};if(["file","image","video","audio"].includes(N)){const U=((P=Object.values(k))==null?void 0:P[D])||[],$=U.filter(I=>I.FileId),F=U.filter(I=>{var H;return I.status==="done"&&((H=I.response)==null?void 0:H.data)}).map(I=>I.response.data),L=[...$,...F];k[T]=L}}return X6((x==null?void 0:x[0])||[],k)}):x=[],x!=null&&x.length&&Array.isArray(x==null?void 0:x[0])&&(c[g]={asid:((b=(C=x==null?void 0:x[0])==null?void 0:C[0])==null?void 0:b.asid)||"",data_list:x.map(k=>r(k))})}else c[g]=p.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 p;const l=await i("YLFWLRDataDetails",r),f=((p=l==null?void 0:l.data)==null?void 0:p.list)||[];return f.length?await Promise.all(f.map(async g=>await Promise.all((e==null?void 0:e.map(async m=>{const C={...m,...t};if(C.attrvalue=(g==null?void 0:g[m.attrid])||"",m.attrtype===1&&Array.isArray(m.children)&&m.children.length>0){const b=(g==null?void 0:g[m.attrid])||{};C.children=await Q6({attrList:m.children,params:b,extra:t,commonRequest:i})}return C}))||[])))||[]:e.map(g=>({...g,...t,attrvalue:"",children:[]}))},kc=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},oL=(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:p})=>{var C;let g=[];const d=async b=>{var E;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(E=k==null?void 0:k.data)!=null&&E.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(D=>({label:`${D.dicid||""}-${D.info||""}`,value:`${D.dicid||""}-${D.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},m=async()=>{var b,x;try{const E=((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)||"",D=c==null?void 0:c["field-names"];if(!E.length){ve.message.error("请配置key-field");return}const T=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(T!=null&&T.data){const A=T==null?void 0:T.data,S=(A==null?void 0:A.list)||[];let O=[];Array.isArray(A)&&(O=A),Array.isArray(S)&&(O=S),D?g=O:g=O.map(P=>({label:kc(P,k,E),value:kc(P,k,E)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(g=((C=c.data)==null?void 0:C.map(b=>({label:b,value:b})))||[],c.options&&Array.isArray(c.options)&&(g=c.options)):c.inputType==="dictionary"?g=await d(t):c.inputType==="system-dictionary"&&(g=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await m(),g},X6=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),lL=Object.freeze(Object.defineProperty({__proto__:null,getJson:uu,base64ToString:Zh,isBase64:Y6,handleSubmitForm:nL,handleBaseAttrList:G6,handleAttrList:K6,handleFormConfig:rL,handleOperationFile:aL,handleKebabToCamel:iL,handleAttrListToObj:W6,handleAttrListToObjDetail:Q6,handleUrlOptions:kc,getTitle:oL,handleSelectOptions:Z6,handleObjDetailToSignleAttrList:X6},Symbol.toStringTag,{value:"Module"}));function sL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,attrid:c,form:p,langId:g}=e,d=ve.Form.useWatch(c,p),{message:m}=ve.App.useApp(),C=r.input,[b,x]=q.useState(e.value),[E,k]=q.useState(!1),[D,T]=q.useState([]),[A,S]=q.useState([]),[O,P]=q.useState(!1),[z,N]=q.useState({PageNum:1,PageSize:6}),[U,$]=q.useState([]),[F,L]=q.useState(0),I=K();q.useEffect(()=>{E&&W()},[E,z]);const H=(G,V)=>{T(G),S(V)},W=async()=>{var G;if(r.inputType==="url"&&(r!=null&&r["action-url"])){P(!0);try{const V=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...z,...(r==null?void 0:r["action-url-extra-params"])||{}});if((V==null?void 0:V.ReturnValue)===0){m.error(V.msg),P(!1);return}const ee=V==null?void 0:V.data,ie=(G=ee==null?void 0:ee.list)==null?void 0:G.map((pe,xe)=>{const Ee=(z.PageNum-1)*z.PageSize+xe;return{...pe,_rowKey:Ee}}),ae=(ie==null?void 0:ie.filter(pe=>D.includes(pe._rowKey)))||[];S(ae),$([...ie||[]]),L((ee==null?void 0:ee.number)||0),P(!1)}catch{P(!1)}return}m.error(g==="10001"?"参数配置错误":"Parameter configuration error")},Z=()=>{var G;if(!t){if(b){const V=r==null?void 0:r["key-field"],ee=V==null?void 0:V[c],{delimiter:ie="-",list:ae=[]}=ee||{};if(!V){m.error(g==="10001"?"请配置key-field":"Please configure key-field");return}switch(C){case"mul-field-modal-select":const pe=(G=b==null?void 0:b.split(ie))==null?void 0:G[0],xe=U==null?void 0:U.findIndex(Ne=>Object.values(Ne).includes(pe));T([xe]);break;case"modal-mult-select":const Ee=b==null?void 0:b.split(","),se=Ee==null?void 0:Ee.map(Ne=>{var tt;const Te=(tt=Ne.split(ie))==null?void 0:tt[0];return U==null?void 0:U.findIndex(Se=>Te.includes((Se==null?void 0:Se.typeid)||(Se==null?void 0:Se.instanceid)))});T(se);break}}k(!0)}},X=async()=>{try{const G=await uL(A,r,g);x((G==null?void 0:G[c])||""),e.onSure(G),k(!1)}catch(G){m.error(G.msg||"参数错误")}},re=()=>{N({...z,PageNum:1}),k(!1)};function K(){const G=r["modal-field-list"];let V=[];for(let ee in G){let ie=G[ee];const ae={dataIndex:ee,title:ie};V=[...V,ae]}return V}const te=G=>{N({...z,PageNum:G})};return Me(nn,{children:[Q(ve.Select,{placeholder:Qh({json:r}),onClick:Z,open:!1,value:d,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:E,onOk:X,onCancel:re,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:I,loading:O,dataSource:U,rowKey:G=>G._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:H},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:te}})})||Q(ve.Modal,{title:r["modal-caption"],open:E,onOk:X,onCancel:re,width:r["modal-width"]??600,okButtonProps:{disabled:D.length===0},children:Q(ve.Table,{columns:I,loading:O,dataSource:U,rowKey:G=>G._rowKey,rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:H},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:te}})})]})}function uL(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(p=>{for(let[g,d]of Object.entries(f)){const m=(d==null?void 0:d.list)??[],C=(d==null?void 0:d.delimiter)??"-",b=m.map(x=>p==null?void 0:p[x]);c[g]=b.join(C)}}),i(c)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}var J6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Bt,function(){var t="day";return function(i,l,f){var c=function(d){return d.add(4-d.isoWeekday(),t)},p=l.prototype;p.isoWeekYear=function(){return c(this).year()},p.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),t);var m,C,b,x,E=c(this),k=(m=this.isoWeekYear(),C=this.$u,b=(C?f.utc:f)().year(m).startOf("year"),x=4-b.isoWeekday(),b.isoWeekday()>4&&(x+=7),b.add(x,t));return E.diff(k,"week")+1},p.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var g=p.startOf;p.startOf=function(d,m){var C=this.$utils(),b=!!C.u(m)||m;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"):g.bind(this)(d,m)}}})})(J6);const eD=J6.exports;function cL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=ve.App.useApp(),g=r.input,[d,m]=q.useState(e.value),[C,b]=q.useState(!1),[x,E]=q.useState([]),[k,D]=q.useState([]),[T,A]=q.useState(!1),[S,O]=q.useState({PageNum:1,PageSize:6}),[P,z]=q.useState([]),[N,U]=q.useState(0),$=Z();q.useEffect(()=>{C&&L()},[C,S]);const F=(re,K)=>{E(re),D(K)},L=async()=>{var re;if(r.inputType==="url"&&(r!=null&&r["action-url"])){A(!0);try{const K=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...S});if((K==null?void 0:K.ReturnValue)===0){p.error(K.msg),A(!1);return}const te=K==null?void 0:K.data,G=(re=te==null?void 0:te.list)==null?void 0:re.map((ee,ie)=>{const ae=(S.PageNum-1)*S.PageSize+ie;return{...ee,_rowKey:ae}}),V=(G==null?void 0:G.filter(ee=>x.includes(ee._rowKey)))||[];D(V),z([...G||[]]),U((te==null?void 0:te.number)||0),A(!1)}catch(K){A(!1),p.error(K.msg||"参数错误")}return}p.error("请配置action-url")},I=()=>{var re,K;if(!t){if(d){const te=((re=r==null?void 0:r["key-field"])==null?void 0:re.list)??[],G=((K=r==null?void 0:r["key-field"])==null?void 0:K.delimiter)??"-";if(!te.length){p.error("请配置key-field");return}switch(g){case"modal-select":const V=d==null?void 0:d.split("-"),ee=P==null?void 0:P.findIndex(pe=>V.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));E([ee]);break;case"modal-mult-select":const ie=d==null?void 0:d.split(","),ae=ie==null?void 0:ie.map(pe=>{var Ee;const xe=(Ee=pe.split(G))==null?void 0:Ee[0];return P==null?void 0:P.findIndex(se=>xe.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)))});E(ae);break}}b(!0)}},H=async()=>{try{const re=await fL(k,r,c);m(re),e.onSure(re),b(!1)}catch(re){p.error(re.msg||"参数错误")}},W=()=>{O({...S,PageNum:1}),b(!1)};function Z(){const re=r["modal-field-list"];let K=[];for(let te in re){let G=re[te];const V={dataIndex:te,title:G};K=[...K,V]}return K}const X=re=>{O({...S,PageNum:re})};return Me(nn,{children:[Q(ve.Select,{placeholder:Qh({json:r},c),onClick:I,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:W,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:$,loading:T,dataSource:P,rowKey:re=>re._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:N,current:S.PageNum,pageSize:S.PageSize,onChange:X}})})||Q(ve.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:W,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(ve.Table,{columns:$,loading:T,dataSource:P,rowKey:re=>re._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:N,current:S.PageNum,pageSize:S.PageSize,onChange:X}})})]})}function fL(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 p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}const dL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langConfig:E}=e,[k,D]=q.useState([]),[T,A]=q.useState(d||[]);q.useEffect(()=>{S()},[r.inputType,r.classify,r.data,r.options,E]);const S=async()=>{const O=await I2({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,item:r,langConfig:E||[]});D(O)};return Q(ve.Checkbox.Group,{...l,options:k,value:T,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:O=>{A(O),t==null||t(O)},disabled:i})},hL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C="10001"})=>{const[b,x]=q.useState([]),[E,k]=q.useState(!1),{message:D}=ve.App.useApp();q.useEffect(()=>{T()},[e.inputType,e.classify,e.data,e.options]);const T=async()=>{if(e.inputType==="local"){let N=[];e.data&&Array.isArray(e.data)?N=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(N=e.options),x(N)}else if(e.inputType==="dictionary")await A(g);else if(e.inputType==="system-dictionary")A(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const N=await O();N&&Array.isArray(N)&&x(N)}else{let N=[];e.data&&Array.isArray(e.data)?N=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(N=e.options),x(N)}},A=async N=>{var U;if(e.classify){k(!0);try{const $=await c(N,{asctypeid:e.classify});if((U=$==null?void 0:$.data)!=null&&U.list&&Array.isArray($.data.list)){const F=$.data.list.map(L=>({label:`${L.dicid||""}-${L.info||""}`,value:`${L.dicid||""}-${L.info||""}`}));x(F)}}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},S=(N,U)=>{i&&i(N)},O=async N=>new Promise(async(U,$)=>{var W,Z,X;const F=((W=e==null?void 0:e["key-field"])==null?void 0:W.list)||[],L=(e==null?void 0:e["search-field"])||[],I=((Z=e==null?void 0:e["key-field"])==null?void 0:Z.delimiter)||"-";if(!F.length){D.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...m};N&&(L.forEach(re=>{H[re]=N[re]||""}),H.level=Number(N.level||0)+1||""),k(!0);try{const re=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((X=re==null?void 0:re.data)!=null&&X.list&&Array.isArray(re.data.list)){const K=re.data.list.map(te=>({...te,label:`${te[F[0]]||""}${I}${te[F[1]]||""}`,value:`${te[F[0]]||""}${I}${te[F[1]]||""}`,children:[],isLeaf:(te==null?void 0:te.subcount)===0}));U(K)}$([])}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options"),$([])}finally{$([]),k(!1)}}),P=async N=>{const U=N[N.length-1],$=await O(U)||[];return U.children=$,x([...b]),$},z=(N,U)=>U.some($=>$.label.toLowerCase().includes(N.toLowerCase()));return Q(ve.Cascader,{showSearch:{filter:z},loading:E,placeholder:"请选择",loadData:P,disabled:r,onChange:S,style:{...l},options:b,value:t,onOpenChange:async N=>{var U;if(N&&(t!=null&&t.length)){const $=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],F=(e==null?void 0:e["search-field"])||[];if(!$.length||!F.length){D.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const L=$.findIndex(W=>W===F[0]);if(L===-1){D.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const I=t.map(W=>W.split("-")[L]||"").filter(Boolean);let H=b;for(const[W,Z]of I.entries()){if(W===I.length-1)break;const X=H.filter(te=>te[F[0]]===Z);if(X.length===0)break;const re=X[0];if(re.children&&re.children.length>0){H=re.children;continue}H=await P(X)}}}})},pL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,langId:c})=>{const[p,g]=q.useState([]),[d,m]=q.useState(!1);q.useEffect(()=>{(async()=>{var S;if(e.inputType==="url"&&e["action-url"]){m(!0);try{const O=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(S=O==null?void 0:O.data)!=null&&S.list&&Array.isArray(O.data.list)?g(O.data.list):O!=null&&O.data&&Array.isArray(O.data)?g(O.data):Array.isArray(O==null?void 0:O.list)?g(O.list):(O==null?void 0:O.ReturnValue)===1&&(O!=null&&O.data)&&(Array.isArray(O.data)?g(O.data):g([O.data]))}catch{}finally{m(!1)}}else e.data&&Array.isArray(e.data)&&g(e.data)})()},[e.inputType,e["action-url"],e.data]);const C=A=>JSON.stringify(A),b=A=>{const S=C(A);return t===S},x=A=>{if(r)return;const S=C(A);i&&i(S)},E=e["card-image-width"]||200,k=e["card-image-height"]||100,D=e["card-image-field"],T=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:p.map((A,S)=>{const O=b(A);return Me("div",{onClick:()=>x(A),style:{flex:"1 1 auto",width:`${E}px`,padding:"12px 0",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[A[D]&&Q("img",{src:A.picurl,alt:A[T]||"",style:{width:`${E}px`,height:`${k}px`,objectFit:"cover",borderRadius:"8px",marginBottom:"8px"},onError:P=>{P.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Me(ve.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:O?"none":"1px solid #d9d9d9",backgroundColor:O?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:O&&Q(f8,{style:{fontSize:"12px",color:"#fff"}})}),A[T]||""]})})]},S)})})})},vL=({item:e,readonly:r,style:t,commonRequestWidthParams:i,commonRequest:l,value:f,onChange:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C,langConfig:b})=>{const[x,E]=q.useState([]),[k,D]=q.useState(!1);q.useEffect(()=>{T()},[e.inputType,e.classify,e.data,e.options,b]);const T=async()=>{D(!0);const A=await I2({commonRequestWidthParams:i,commonRequest:l,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,item:e,langConfig:b||[]});E(A),D(!1)};return Q(ve.Select,{placeholder:Qh({json:e},C),mode:e.input==="mult-select"?"multiple":void 0,disabled:r,loading:k,showSearch:!0,value:f,filterOption:(A,S)=>{var O;return((O=S==null?void 0:S.label)==null?void 0:O.toLowerCase().indexOf(A.toLowerCase()))>=0},options:x,style:{...t},allowClear:!0,onChange:A=>{c(A)}})},mL={customUpload:"myUpload-module_customUpload_7c7d3"},gL=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),yL=e=>{const{langId:r="10001"}=e,{action:t,item:i,onChange:l,readonly:f=!1,relatedid:c,uploadText:p=r==="10001"?"上传文件":"Upload File",onRemove:g,list:d=[],uploadType:m,relatedidKey:C}=e,{message:b}=ve.App.useApp(),x=(i==null?void 0:i["upload-accept"])||"*",E=i==null?void 0:i.input,k=i==null?void 0:i["upload-size"],D=(i==null?void 0:i["upload-max-count"])||1,[T,A]=q.useState(E==="image"?"picture-card":"text"),[S,O]=q.useState([]),[P,z]=q.useState(!1),[N,U]=q.useState("");q.useEffect(()=>{d&&d.length&&O(d)},[d]);const $=async H=>{m==="image"&&(!H.url&&!H.preview&&(H.preview=await gL(H.originFileObj)),U(H.url||H.preview),z(!0))},F=({fileList:H})=>{O(H),l&&l(H)},L=H=>{if(!k)return!0;const W=H.size/1024/1024<Number(k);return W||b.error(r==="10001"?`请上传不超过${k}MB的文件`:`Please upload files smaller than ${k}MB`),W},I=E==="image"?Me("button",{style:{border:0,background:"none"},type:"button",children:[Q(Fb,{}),Q("div",{style:{marginTop:8},children:"Upload"})]}):Q(nn,{children:Q(ve.Button,{style:{fontSize:14},icon:Q(Nb,{}),children:p})});return Me(nn,{children:[Q(ve.Upload,{action:t,beforeUpload:L,listType:T,accept:x,fileList:S,onPreview:$,data:{[C]:c},maxCount:D,onChange:F,onRemove:g,disabled:f,className:mL.customUpload,children:S.length>=D?null:I}),N&&Q(ve.Image,{wrapperStyle:{display:"none"},preview:{visible:P,onVisibleChange:H=>z(H),afterOpenChange:H=>!H&&U("")},src:N})]})},xL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,value:g,interfaceTypeDict:d,interfaceTypeSysDict:m,actionUrlKey:C,actionUrlExtraParams:b,langConfig:x}=e,[E,k]=q.useState([]);q.useEffect(()=>{D()},[r.inputType,r.classify,r.data,r.options,x]);const D=async()=>{const T=await I2({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:d,interfaceTypeSysDict:m,actionUrlKey:C,actionUrlExtraParams:b,item:r,langConfig:x});k(T)};return Q(ve.Radio.Group,{...l,options:E,onChange:t,disabled:i,value:g,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"}})};yn.extend(eD);function bL(e){const{commonRequestWidthParams:r,uploadAction:t,commonRequest:i,formConfig:l,updateDelFileList:f,interfaceTypeDict:c,interfaceTypeSysDict:p,relatedidKey:g,actionUrlKey:d,actionUrlExtraParams:m,CustomModalComponent:C,isEdit:b,formShowType:x="form",langId:E,langConfig:k=[]}=e,D=q.useRef([]),{message:T}=ve.App.useApp();q.useEffect(()=>{l&&(D.current=l)},[l]);const A=q.useCallback(I=>Array.isArray(I)?I:(I==null?void 0:I.fileList)??[],[]),S=I=>{f(I)},O=q.useCallback(I=>{var X,re;const H=(X=I.json)==null?void 0:X.input,W=(re=I.json)==null?void 0:re.format,Z={};switch(H){case"image":case"file":case"video":case"audio":Z.getValueFromEvent=A;break;case"date-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY-MM-DD"),Z.getValueProps=K=>({value:K?yn(K):null});break;case"time-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY-MM-DD HH:mm:ss"),Z.getValueProps=K=>({value:K?yn(K):null});break;case"week-picker":Z.getValueFromEvent=K=>`${K==null?void 0:K.year()}-${yn(K).isoWeek()}周`,Z.getValueProps=K=>{if(!K)return{value:null};const[te,G]=K.split("-"),V=Number(te),ee=Number(G.replace("周",""));return{value:yn().year(V).isoWeek(ee)}};break;case"month-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY-MM"),Z.getValueProps=K=>({value:K?yn(K):null});break;case"quarter-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY年第Q季度"),Z.getValueProps=K=>({value:K?yn(K,W||"YYYY年第Q季度"):null});break;case"year-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"YYYY"),Z.getValueProps=K=>({value:K?yn(K):null});break;case"second-picker":Z.getValueFromEvent=K=>K==null?void 0:K.format(W||"HH:mm:ss"),Z.getValueProps=K=>({value:K?yn(K,W||"HH:mm:ss"):null});break;case"range-picker":Z.getValueFromEvent=K=>K==null?void 0:K.map(te=>te==null?void 0:te.format(W||"YYYY-MM-DD")),Z.getValueProps=K=>({value:(K==null?void 0:K.map(te=>yn(te)))||null});break;case"multiple-date-picker":Z.getValueFromEvent=K=>K==null?void 0:K.map(te=>te==null?void 0:te.format(W||"YYYY-MM-DD")),Z.getValueProps=K=>({value:(K==null?void 0:K.map(te=>yn(te)))||null});break}return Z},[A]),P=q.useCallback(({isActive:I})=>I?Q(x8,{style:{fontSize:18,color:"#999"}}):Q(w8,{style:{fontSize:18,color:"#999"}}),[]),z=(I,H)=>{var W,Z,X,re,K;return Me(ve.Flex,{gap:10,vertical:H==="flex",align:"center",children:[Q("span",{children:I.attrname}),((W=I==null?void 0:I.json)==null?void 0:W.instruction)&&H==="icon"&&Q(ve.Tooltip,{title:su(k,(Z=I==null?void 0:I.json)==null?void 0:Z.instruction),children:Q(g8,{style:{color:((X=I==null?void 0:I.json)==null?void 0:X["instruction-color"])??"#888888",fontSize:16,cursor:"pointer"}})})||Q("span",{style:{color:((re=I==null?void 0:I.json)==null?void 0:re["instruction-color"])??"red"},children:su(k,(K=I==null?void 0:I.json)==null?void 0:K.instruction)})]})},N=q.useCallback(({itemWithJson:I,colNum:H=1,readonly:W=!1,instructionShowMode:Z="icon",radioAlign:X="horizontal",formItemStyle:re,relatedid:K,form:te,defaultWidth:G=358,parentFormListField:V,isShowLabel:ee=!0})=>{const ie=Dc(I);let ae=I.children||[];Array.isArray(ae==null?void 0:ae[0])&&ae.length&&(ae=ae[0]);const pe=xe=>{const Ee=(V==null?void 0:V.parentName)||(V==null?void 0:V.name);return Ee?Array.isArray(Ee)?[...Ee,I.attrid,xe.name]:[Ee,I.attrid,xe.name]:[I.attrid,xe.name]};return Q(ve.Col,{span:24/H,children:Q(ve.Collapse,{bordered:!1,style:{backgroundColor:"transparent"},expandIcon:({isActive:xe})=>P({isActive:xe}),items:[{key:I.attrid,label:I.attrname,styles:{header:{paddingLeft:0}},children:Q(ve.Form.List,{name:V?Array.isArray(V.name)?[...V.name,I.attrid]:[V.name,I.attrid]:I.attrid,initialValue:ie,children:(xe,{add:Ee,remove:se})=>Me("div",{style:{display:"flex",rowGap:16,flexDirection:"column"},children:[xe.map(Ne=>{const Te={...Ne,parentName:pe(Ne)};return Q(ve.Card,{style:{width:G+100},size:"small",title:`${I.attrname} ${Ne.name+1}`,extra:!b&&Q(p8,{onClick:()=>{xe.length>1?se(Ne.name):T.warning("至少需要保留一个!")}}),children:(ae||[]).map((tt,Se)=>Q(q.Fragment,{children:L({item:tt,readonly:W,colNum:H,instructionShowMode:Z,relatedid:K,form:te,defaultWidth:G,formItemStyle:re,radioAlign:X,isFormListItem:!0,formListField:Te,isShowLabel:!0})},tt.attrid||`child-${Se}`))},Ne.key)}),!b&&Q(ve.Flex,{style:{width:200},children:Me(ve.Button,{type:"dashed",onClick:()=>Ee(),block:!0,children:["+ ",E==="10001"?"新增":"Add"]})})]})})}]},I.attrid)})},[P,Dc]),U=q.useCallback(({itemWithJson:I,colNum:H=1,readonly:W=!1,instructionShowMode:Z="icon",radioAlign:X="horizontal",formItemStyle:re,relatedid:K,form:te,defaultWidth:G=358,isFormListItem:V=!1,formListField:ee,isShowLabel:ie=!0})=>{var ae,pe,xe,Ee,se,Ne,Te;if(((ae=I.json)==null?void 0:ae.hide)===!0)return Q(nn,{});if(I.attrtype===1)return N({itemWithJson:I,colNum:H,readonly:W,instructionShowMode:Z,radioAlign:X,formItemStyle:re,relatedid:K,form:te,defaultWidth:G,parentFormListField:ee,isShowLabel:ie});if(I.attrtype===2)return Q(nn,{children:"实例信息"});if(I.attrtype===0){const tt=Dc(I),Se=su(k,(pe=I.json)==null?void 0:pe["default-prompt"]),lt=Qh(I,E),{combinations:je=[]}=I.json||{};if(je!=null&&je.length)return Q(ve.Col,{span:24/H,children:Q(ve.Form.Item,{label:su(k,(xe=I==null?void 0:I.json)==null?void 0:xe["combination-name"]),required:(Ee=I.json)==null?void 0:Ee.must,children:Q(ve.Space.Compact,{children:je.map((_t,gt)=>{var rr,Zn,$n,cn;let bn=Dc(_t),Ln=G;const nr={},Dn=_t.json.input||"text",Zt=re==null?void 0:re.find(sr=>sr.type===Dn);if(Zt){const{width:sr}=(Zt==null?void 0:Zt.style)||{};sr&&(nr.width=sr)}const Cn=(rr=_t==null?void 0:_t.json)==null?void 0:rr["combination-width-ratio"];return Cn&&(Ln=G*Cn),Q(ve.Form.Item,{name:ee?Array.isArray(ee.name)?[...ee.name,_t.attrid]:[ee.name,_t.attrid]:_t.attrid,noStyle:!0,initialValue:bn,rules:[...(Zn=_t.json)!=null&&Zn.must?[{required:!0,message:Se||`${lt}${_t.attrname}`}]:[],...($n=I.json)!=null&&$n.regexp?[{pattern:new RegExp(I.json.regexp.replace(/^\/|\/$/g,"")),message:su(k,(cn=I.json)==null?void 0:cn["regexp-message"])||`${I.attrname}${E==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...O(_t),children:F({item:_t,readonly:W,formItemStyle:re,radioAlign:X,relatedid:K,form:te,defaultWidth:Ln,customWidth:nr})},gt)})})},`${I.attrid}+1`)});const Pt=V&&ee?Array.isArray(ee.name)?[...ee.name,I.attrid]:[ee.name,I.attrid]:I.attrid;return Q(ve.Col,{span:24/H,children:Q(ve.Form.Item,{name:Pt,label:ie&&z(I,Z)||null,initialValue:tt,rules:[...(se=I.json)!=null&&se.must?[{required:!0,message:`${lt}${I.attrname}`}]:[],...(Ne=I.json)!=null&&Ne.regexp?[{pattern:new RegExp(I.json.regexp.replace(/^\/|\/$/g,"")),message:su(k,(Te=I.json)==null?void 0:Te["regexp-message"])||`${I.attrname}${E==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...O(I),children:F({item:I,readonly:W,formItemStyle:re,radioAlign:X,relatedid:K,form:te,defaultWidth:G})},I.attrid)})}return null},[z,Dc,O,N,k]),$=async I=>{var H;try{const W=(H=I==null?void 0:I.response)==null?void 0:H.data;if(W){if(!r)return;const Z=await r({Controlname:"DelFile",PageName:"initializationfile"},W);if((Z==null?void 0:Z.ReturnValue)!==1)return T.error(Z==null?void 0:Z.msg),!1}else S(I);return!0}catch{return!1}},F=({item:I,readonly:H=!1,formItemStyle:W=[],radioAlign:Z="horizontal",relatedid:X,form:re,defaultWidth:K=358,customWidth:te={}})=>{var tt,Se,lt,je,Pt,_t;const G=I.json.input||"text",V=((tt=I.json)==null?void 0:tt.format)||"",ee=I.attrid,ie=Dc(I),ae=su(k,(Se=I.json)==null?void 0:Se["default-prompt"])||"",pe=((lt=I.json)==null?void 0:lt["disable-date-goover"])||!1,xe=Qh(I,E),Ee=I.json.length&&{maxLength:I.json.length}||{},se=W.find(gt=>gt.type===G);let Ne=(je=I.json)==null?void 0:je["input-width"];Ne&&(Ne=x==="table"?Number(Ne)-32:Ne);const Te=Ne||K;switch(G){case"label":return Q(ve.Input,{disabled:!0,value:((Pt=I.json)==null?void 0:Pt["label-value"])||I.attrvalue||((_t=I.json)==null?void 0:_t.default)||"-",style:{width:Te,...se==null?void 0:se.style,...te}});case"text":return Q(ve.Input,{placeholder:ae||xe,...Ee,disabled:H,allowClear:!0,style:{width:Te,...se==null?void 0:se.style,...te}});case"password":return Q(ve.Input.Password,{placeholder:ae||xe,...Ee,disabled:H,allowClear:!0,style:{width:Te,...se==null?void 0:se.style,...te}});case"textarea":return Q(ve.Input.TextArea,{allowClear:!0,placeholder:ae||xe,rows:5,...Ee,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}});case"number":return Q(ve.InputNumber,{controls:!1,placeholder:ae||xe,...Ee,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}});case"select":case"mult-select":return Q(vL,{item:I.json,readonly:H,style:{width:Te,...se==null?void 0:se.style,...te},commonRequestWidthParams:r,commonRequest:i,value:ie,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:E,langConfig:k,onChange:gt=>{re.setFieldValue(I.attrid,gt)}});case"modal-mult-select":case"modal-select":return Q(cL,{style:{width:Te,...se==null?void 0:se.style,...te},item:I.json,value:I.attrvalue||I.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async gt=>{re.setFieldValue(I.attrid,gt)},disabled:H,langId:E,CustomModalComponent:C});case"mul-field-modal-select":return Q(sL,{style:{width:Te,...se==null?void 0:se.style,...te},item:I.json,form:re,attrid:ee,value:I.attrvalue||I.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async gt=>{re.setFieldsValue(gt)},disabled:H,CustomModalComponent:C,langId:E});case"date-picker":case"time-picker":case"week-picker":case"month-picker":case"quarter-picker":case"year-picker":case"second-picker":{const gt={"date-picker":"date","time-picker":"date","week-picker":"week","month-picker":"month","quarter-picker":"quarter","year-picker":"year","second-picker":"time"};let bn;return G==="date-picker"&&(bn=pe?V6:void 0),Q(ve.DatePicker,{showTime:G==="time-picker",format:V||void 0,picker:gt[G]||"date",disabled:H,disabledDate:bn,placement:"bottomLeft",style:{width:Te,...se==null?void 0:se.style,...te}})}case"range-picker":return Q(ve.DatePicker.RangePicker,{disabledDate:pe?V6:void 0,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}});case"multiple-date-picker":return Q(ve.DatePicker,{multiple:!0,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}});case"radio":return Q(xL,{radioAlign:Z,commonRequest:i,commonRequestWidthParams:r,item:I.json,readonly:H,options:Ee,handleUrlOptions:kc,value:ie,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langConfig:k,onChange:gt=>{re.setFieldValue(I.attrid,gt.target.value)}});case"checkbox":return Q(dL,{radioAlign:Z,commonRequest:i,commonRequestWidthParams:r,item:I.json,readonly:H,options:Ee,value:ie,handleUrlOptions:kc,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,onChange:gt=>{re.setFieldValue(I.attrid,gt.join(","))}});case"audio":case"file":case"image":case"video":return Q(yL,{action:t&&t("initializationfile"),item:I.json,uploadType:G,langId:E,list:ie,readonly:H,relatedid:X,relatedidKey:g,onRemove:gt=>$(gt)});case"cascader":return Q(hL,{commonRequestWidthParams:r,commonRequest:i,item:I.json,value:I.attrvalue,style:{width:Te,...se==null?void 0:se.style,...te},interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:E});case"radio-card":return Q(pL,{item:I.json,readonly:H,onChange:gt=>{re.setFieldValue(I.attrid,gt)},langId:E,commonRequestWidthParams:r});default:return Q(ve.Input,{placeholder:ae||xe,...Ee,showCount:!0,disabled:H,style:{width:Te,...se==null?void 0:se.style,...te}})}},L=({item:I,readonly:H=!1,colNum:W=1,instructionShowMode:Z="icon",relatedid:X,form:re,defaultWidth:K=358,formItemStyle:te,radioAlign:G="horizontal",isFormListItem:V=!1,formListField:ee,isShowLabel:ie=!0})=>{var xe;const ae=I.info_base64===1?uu(Zh(I.info)):uu(I.info),pe={...I,json:{...I==null?void 0:I.json,...ae}};return((xe=pe.json)==null?void 0:xe.hide)===!0?null:Q(q.Fragment,{children:U({itemWithJson:pe,readonly:H,colNum:W,instructionShowMode:Z,relatedid:X,form:re,defaultWidth:K,formItemStyle:te,radioAlign:G,isFormListItem:V,formListField:ee,isShowLabel:ie})},pe.attrid)};return{handleRenderItem:L,handleSetFormItemInitialValue:Dc}}const CL=q.forwardRef((e,r)=>{const{formConfig:t,form:i,readonly:l=!1,relatedid:f,colNum:c=1,colSpace:p=[0,0],instructionShowMode:g="flex",defaultWidth:d=358,commonRequestWidthParams:m,uploadAction:C,commonRequest:b,formItemStyle:x=[],radioAlign:E="horizontal",interfaceTypeChildren:k="YLLRDetailAttrlist",interfaceTypeDict:D="YLZDDictList",interfaceTypeSysDict:T="YLZDSysConfigList",relatedidKey:A="relatedid",actionUrlKey:S="action-url",actionUrlExtraParams:O={},CustomModalComponent:P,formShowType:z="form",headerWidth:N,formListItemWidth:U,formListItemName:$,isEdit:F=!1,langId:L="10001",langConfig:I=[]}=e,H=q.useRef([]),W=X=>{H.current.push(X)},{handleRenderItem:Z}=bL({commonRequestWidthParams:m,uploadAction:C,commonRequest:b,updateDelFileList:W,formConfig:t,interfaceTypeChildren:k,interfaceTypeDict:D,interfaceTypeSysDict:T,relatedidKey:A,actionUrlKey:S,actionUrlExtraParams:O,CustomModalComponent:P,isEdit:F,formShowType:z,langId:L,langConfig:I});return q.useImperativeHandle(r,()=>({getDelFileList:()=>H.current})),Q(nn,{children:z==="table"?Q(ve.Form.List,{name:$||"customFormList",initialValue:[{}],children:(X,{add:re,remove:K})=>Q(ve.Flex,{className:"custom-form-body",children:Me("div",{className:"custom-form-list",children:[Me(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((te,G)=>{var ee,ie;const V=((ee=te==null?void 0:te.json)==null?void 0:ee["input-width"])&&Number((ie=te==null?void 0:te.json)==null?void 0:ie["input-width"])||d;return Me(ve.Flex,{style:{width:V,flexShrink:0},align:"center",children:[G!==0&&Q("div",{className:"line"}),Q("div",{className:"custom-form-list-header-item",children:te.attrname})]},G)})}),Q("a",{className:"custom-form-list-add-btn",onClick:()=>re(),children:L==="10001"?"新增":"Add"})]}),X.map(te=>Me(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((G,V)=>{var ie,ae;const ee=((ie=G==null?void 0:G.json)==null?void 0:ie["input-width"])&&Number((ae=G==null?void 0:G.json)==null?void 0:ae["input-width"])||d;return Q(ve.Flex,{align:"center",className:"custom-form-list-item-content",justify:"center",style:{width:ee,flexShrink:0},children:Z({item:G,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:(U==null?void 0:U[V])||d,formItemStyle:x,isFormListItem:!0,formListField:te,isShowLabel:!1})},G.attrid||`child-${V}`)})}),Q("a",{className:"custom-form-list-del-btn",onClick:()=>K(te.key),children:L==="10001"?"删除":"Delete"})]},te.key))]})})}):Q(ve.Row,{gutter:p,children:t.map((X,re)=>Q(q.Fragment,{children:Z({item:X,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:d,formItemStyle:x,radioAlign:E})},X.attrid||`form-item-${re}`))})})}),tD=(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(p=>p)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>yn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).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(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=wL(e.children||[])),t||void 0},nD=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},wL=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)},_L=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:p})=>{var C;let g=[];const d=async b=>{var E;let x=[];if(c.classify)try{const k=await r(b,{asctypeid:c.classify});(E=k==null?void 0:k.data)!=null&&E.list&&Array.isArray(k.data.list)&&(x=k.data.list.map(D=>({label:`${D.dicid||""}-${D.info||""}`,value:`${D.dicid||""}-${D.info||""}`})))}catch{ve.message.error("加载选项失败")}return x},m=async()=>{var b,x;try{const E=((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)||"",D=c==null?void 0:c["field-names"];if(!E.length){ve.message.error("请配置key-field");return}const T=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(T!=null&&T.data){const A=T==null?void 0:T.data,S=(A==null?void 0:A.list)||[];let O=[];Array.isArray(A)&&(O=A),Array.isArray(S)&&(O=S),D?g=O:g=O.map(P=>({label:nD(P,k,E),value:nD(P,k,E)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(g=((C=c.data)==null?void 0:C.map(b=>({label:b,value:b})))||[],c.options&&Array.isArray(c.options)&&(g=c.options)):c.inputType==="dictionary"?g=await d(t):c.inputType==="system-dictionary"&&(g=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await m(),g};function EL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,attrid:c,form:p,langId:g}=e,d=ve.Form.useWatch(c,p),{message:m}=ve.App.useApp(),C=r.input,[b,x]=q.useState(e.value),[E,k]=q.useState(!1),[D,T]=q.useState([]),[A,S]=q.useState([]),[O,P]=q.useState(!1),[z,N]=q.useState({PageNum:1,PageSize:6}),[U,$]=q.useState([]),[F,L]=q.useState(0),I=K();q.useEffect(()=>{E&&W()},[E,z]);const H=(G,V)=>{T(G),S(V)},W=async()=>{var G;if(r.inputType==="url"&&(r!=null&&r["action-url"])){P(!0);try{const V=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...z,...(r==null?void 0:r["action-url-extra-params"])||{}});if((V==null?void 0:V.ReturnValue)===0){m.error(V.msg),P(!1);return}const ee=V==null?void 0:V.data,ie=(G=ee==null?void 0:ee.list)==null?void 0:G.map((pe,xe)=>{const Ee=(z.PageNum-1)*z.PageSize+xe;return{...pe,_rowKey:Ee}}),ae=(ie==null?void 0:ie.filter(pe=>D.includes(pe._rowKey)))||[];S(ae),$([...ie||[]]),L((ee==null?void 0:ee.number)||0),P(!1)}catch(V){P(!1),m.error(g==="10001"?V.msg||"参数错误":"Failed to load data")}return}m.error(g==="10001"?"请配置action-url":"Please configure action-url")},Z=()=>{var G;if(!t){if(b){const V=r==null?void 0:r["key-field"],ee=V==null?void 0:V[c],{delimiter:ie="-",list:ae=[]}=ee||{};if(!V){m.error(g==="10001"?"请配置key-field":"Please configure key-field");return}switch(C){case"mul-field-modal-select":const pe=(G=b==null?void 0:b.split(ie))==null?void 0:G[0],xe=U==null?void 0:U.findIndex(Ne=>Object.values(Ne).includes(pe));T([xe]);break;case"modal-mult-select":const Ee=b==null?void 0:b.split(","),se=Ee==null?void 0:Ee.map(Ne=>{var tt;const Te=(tt=Ne.split(ie))==null?void 0:tt[0];return U==null?void 0:U.findIndex(Se=>Te.includes((Se==null?void 0:Se.typeid)||(Se==null?void 0:Se.instanceid)))});T(se);break}}k(!0)}},X=async()=>{try{const G=await SL(A,r);x((G==null?void 0:G[c])||""),e.onSure(G),k(!1)}catch(G){m.error(g==="10001"?G.msg||"参数错误":"Failed to load data")}},re=()=>{N({...z,PageNum:1}),k(!1)};function K(){const G=r["modal-field-list"];let V=[];for(let ee in G){let ie=G[ee];const ae={dataIndex:ee,title:ie};V=[...V,ae]}return V}const te=G=>{N({...z,PageNum:G})};return Me(nn,{children:[Q(ve.Select,{placeholder:g==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:Z,open:!1,value:d,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:E,onOk:X,onCancel:re,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:I,loading:O,dataSource:U,rowKey:G=>G._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:H},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:te}})})||Q(ve.Modal,{title:r["modal-caption"],open:E,onOk:X,onCancel:re,width:r["modal-width"]??600,okButtonProps:{disabled:D.length===0},children:Q(ve.Table,{columns:I,loading:O,dataSource:U,rowKey:G=>G._rowKey,rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:H},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:te}})})]})}function SL(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[p,g]of Object.entries(l)){const d=(g==null?void 0:g.list)??[],m=(g==null?void 0:g.delimiter)??"-",C=d.map(b=>c==null?void 0:c[b]);f[p]=C.join(m)}}),t(f)}catch{i({msg:"key-field参数配置错误"})}})}function DL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=ve.App.useApp(),g=r.input,[d,m]=q.useState(e.value),[C,b]=q.useState(!1),[x,E]=q.useState([]),[k,D]=q.useState([]),[T,A]=q.useState(!1),[S,O]=q.useState({PageNum:1,PageSize:6}),[P,z]=q.useState([]),[N,U]=q.useState(0),$=Z();q.useEffect(()=>{C&&L()},[C,S]);const F=(re,K)=>{E(re),D(K)},L=async()=>{var re;if(r.inputType==="url"&&(r!=null&&r["action-url"])){A(!0);try{const K=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...S});if((K==null?void 0:K.ReturnValue)===0){p.error(K.msg),A(!1);return}const te=K==null?void 0:K.data,G=(re=te==null?void 0:te.list)==null?void 0:re.map((ee,ie)=>{const ae=(S.PageNum-1)*S.PageSize+ie;return{...ee,_rowKey:ae}}),V=(G==null?void 0:G.filter(ee=>x.includes(ee._rowKey)))||[];D(V),z([...G||[]]),U((te==null?void 0:te.number)||0),A(!1)}catch(K){A(!1),p.error(c==="10001"?K.msg||"参数错误":"Failed to load data")}return}p.error(c==="10001"?"请配置action-url":"Please configure action-url")},I=()=>{var re,K;if(!t){if(d){const te=((re=r==null?void 0:r["key-field"])==null?void 0:re.list)??[],G=((K=r==null?void 0:r["key-field"])==null?void 0:K.delimiter)??"-";if(!te.length){p.error(c==="10001"?"请配置key-field":"Please configure key-field");return}switch(g){case"modal-select":const V=d==null?void 0:d.split("-"),ee=P==null?void 0:P.findIndex(pe=>V.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));E([ee]);break;case"modal-mult-select":const ie=d==null?void 0:d.split(","),ae=ie==null?void 0:ie.map(pe=>{var Ee;const xe=(Ee=pe.split(G))==null?void 0:Ee[0];return P==null?void 0:P.findIndex(se=>xe.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)))});E(ae);break}}b(!0)}},H=async()=>{try{const re=await kL(k,r,c);m(re),e.onSure(re),b(!1)}catch(re){p.error(c==="10001"?re.msg||"参数错误":"Failed to build value")}},W=()=>{O({...S,PageNum:1}),b(!1)};function Z(){const re=r["modal-field-list"];let K=[];for(let te in re){let G=re[te];const V={dataIndex:te,title:G};K=[...K,V]}return K}const X=re=>{O({...S,PageNum:re})};return Me(nn,{children:[Q(ve.Select,{placeholder:c==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:I,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:W,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(ve.Table,{columns:$,loading:T,dataSource:P,rowKey:re=>re._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:N,current:S.PageNum,pageSize:S.PageSize,onChange:X}})})||Q(ve.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:W,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(ve.Table,{columns:$,loading:T,dataSource:P,rowKey:re=>re._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:N,current:S.PageNum,pageSize:S.PageSize,onChange:X}})})]})}function kL(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 p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"Failed to build value"})}})}const TL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:E}=e,{message:k}=ve.App.useApp(),[D,T]=q.useState([]),[A,S]=q.useState(d||[]);q.useEffect(()=>{if((r==null?void 0:r.inputType)==="local"){const z=(r==null?void 0:r.data)||[];T(z.map(N=>({value:N,label:N})))}else(r==null?void 0:r.inputType)==="dictionary"?O(r.classify,m):(r==null?void 0:r.inputType)==="system-dictionary"?O(r.classify,C):(r==null?void 0:r.inputType)==="url"&&P()},[r==null?void 0:r.inputType]);const O=async(z,N)=>{var $;if(!z)return;const U=await p(N,{asctypeid:z});if((U==null?void 0:U.ReturnValue)===1){const F=(($=U==null?void 0:U.data)==null?void 0:$.list)||[];T(F.map(L=>{const I=L.dicid+"-"+L.info;return{value:I,label:I}}))}},P=async()=>{var z,N;try{const U=((z=r==null?void 0:r["key-field"])==null?void 0:z.list)||[],$=((N=r==null?void 0:r["key-field"])==null?void 0:N.delimiter)||"";if(!U.length){k.error(E==="10001"?"请配置key-field":"Please configure key-field");return}const F=await c({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[b]:r==null?void 0:r["action-url"],...x});if(F!=null&&F.data){const L=F==null?void 0:F.data,I=L==null?void 0:L.list;let H=[];Array.isArray(L)&&(H=L),Array.isArray(I)&&(H=I);const W=H.map(Z=>({label:g(Z,$,U),value:g(Z,$,U)}));T([...W])}}catch{k.error(E==="10001"?"加载选项失败":"Failed to load options")}finally{}};return Q(ve.Checkbox.Group,{...l,options:D,value:A,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:z=>{S(z),t==null||t(z)},disabled:i})},AL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C})=>{const[b,x]=q.useState([]),[E,k]=q.useState(!1),{message:D}=ve.App.useApp();q.useEffect(()=>{T()},[e.inputType,e.classify,e.data,e.options]);const T=async()=>{if(e.inputType==="local"){let N=[];e.data&&Array.isArray(e.data)?N=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(N=e.options),x(N)}else if(e.inputType==="dictionary")await A(g);else if(e.inputType==="system-dictionary")A(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const N=await O();N&&Array.isArray(N)&&x(N)}else{let N=[];e.data&&Array.isArray(e.data)?N=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(N=e.options),x(N)}},A=async N=>{var U;if(e.classify){k(!0);try{const $=await c(N,{asctypeid:e.classify});if((U=$==null?void 0:$.data)!=null&&U.list&&Array.isArray($.data.list)){const F=$.data.list.map(L=>({label:`${L.dicid||""}-${L.info||""}`,value:`${L.dicid||""}-${L.info||""}`}));x(F)}}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},S=(N,U)=>{i&&i(N)},O=async N=>new Promise(async(U,$)=>{var W,Z,X;const F=((W=e==null?void 0:e["key-field"])==null?void 0:W.list)||[],L=(e==null?void 0:e["search-field"])||[],I=((Z=e==null?void 0:e["key-field"])==null?void 0:Z.delimiter)||"-";if(!F.length){D.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...m};N&&(L.forEach(re=>{H[re]=N[re]||""}),H.level=Number(N.level||0)+1||""),k(!0);try{const re=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((X=re==null?void 0:re.data)!=null&&X.list&&Array.isArray(re.data.list)){const K=re.data.list.map(te=>({...te,label:`${te[F[0]]||""}${I}${te[F[1]]||""}`,value:`${te[F[0]]||""}${I}${te[F[1]]||""}`,children:[],isLeaf:(te==null?void 0:te.subcount)===0}));U(K)}$([])}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options"),$([])}finally{$([]),k(!1)}}),P=async N=>{const U=N[N.length-1],$=await O(U)||[];return U.children=$,x([...b]),$},z=(N,U)=>U.some($=>$.label.toLowerCase().includes(N.toLowerCase()));return Q(ve.Cascader,{showSearch:{filter:z},loading:E,placeholder:C==="10001"?"请选择":"Please select",loadData:P,disabled:r,onChange:S,style:{...l},options:b,value:t,onOpenChange:async N=>{var U;if(N&&(t!=null&&t.length)){const $=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],F=(e==null?void 0:e["search-field"])||[];if(!$.length||!F.length){D.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const L=$.findIndex(W=>W===F[0]);if(L===-1){D.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const I=t.map(W=>W.split("-")[L]||"").filter(Boolean);let H=b;for(const[W,Z]of I.entries()){if(W===I.length-1)break;const X=H.filter(te=>te[F[0]]===Z);if(X.length===0)break;const re=X[0];if(re.children&&re.children.length>0){H=re.children;continue}H=await P(X)}}}})},OL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f})=>{const[c,p]=q.useState([]),[g,d]=q.useState(!1);q.useEffect(()=>{(async()=>{var A;if(e.inputType==="url"&&e["action-url"]){d(!0);try{const S=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(A=S==null?void 0:S.data)!=null&&A.list&&Array.isArray(S.data.list)?p(S.data.list):S!=null&&S.data&&Array.isArray(S.data)?p(S.data):Array.isArray(S==null?void 0:S.list)?p(S.list):(S==null?void 0:S.ReturnValue)===1&&(S!=null&&S.data)&&(Array.isArray(S.data)?p(S.data):p([S.data]))}catch{}finally{d(!1)}}else e.data&&Array.isArray(e.data)&&p(e.data)})()},[e.inputType,e["action-url"],e.data]);const m=T=>JSON.stringify(T),C=T=>{const A=m(T);return t===A},b=T=>{if(r)return;const A=m(T);i&&i(A)},x=e["card-image-width"]||200,E=e["card-image-height"]||100,k=e["card-image-field"],D=e["card-info-field"];return Q("div",{style:{...l},children:g?Q("div",{style:{textAlign:"center",padding:"20px"},children:"加载中..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"0px"},children:c.map((T,A)=>{const S=C(T);return Me("div",{onClick:()=>b(T),style:{flex:"1 1 auto",width:`${x}px`,padding:"12px",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[T[k]&&Q("img",{src:T.picurl,alt:T[D]||"",style:{width:`${x}px`,height:`${E}px`,objectFit:"cover",borderRadius:"4px",marginBottom:"8px"},onError:O=>{O.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Me(ve.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:S?"none":"1px solid #d9d9d9",backgroundColor:S?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:S&&Q(f8,{style:{fontSize:"12px",color:"#fff"}})}),T[D]||""]})})]},A)})})})},WQ="";function Xh(e,r){if(!e)return r;let t;return typeof e=="function"?t=e():"current"in e?t=e.current:t=e,t}function Ni(){}const Jh=Object.assign,Ac=typeof window<"u";function Xr(e){return e!=null}function Oc(e){return typeof e=="function"}function RL(e){return cd(e)&&Oc(e.then)&&Oc(e.catch)}function cd(e){return e!==null&&typeof e=="object"}function rD(e,r,t){return r.reduce((i,l)=>((!t||e[l]!==void 0)&&(i[l]=e[l]),i),{})}function V2(e,r){return r?typeof r=="string"?` ${e}--${r}`:Array.isArray(r)?r.reduce((t,i)=>t+V2(e,i),""):Object.keys(r).reduce((t,i)=>t+(r[i]?V2(e,i):""),""):""}function FL(e){return(r,t)=>(r&&typeof r!="string"&&(t=r,r=""),r=r?`${e}__${r}`:e,`${r}${V2(r,t)}`)}function xn(e,r){return e=`${r||"rv"}-${e}`,[FL(e),e]}function NL(e){e.stopPropagation()}function $2(e,r){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),r&&NL(e)}const ML={click:"onClick"};function aD(e,r){const t=Object.assign({},r.props);for(const i of e){const l=ML[i];t[l]=function(f){var c,p;f.stopPropagation(),(p=(c=r.props)[l])===null||p===void 0||p.call(c,f)}}return q.cloneElement(r,t)}const fd=Ac?window:global;let iD=Date.now();function PL(e){const r=Date.now(),t=Math.max(0,16-(r-iD)),i=setTimeout(e,t);return iD=r+t,i}function Y2(e){return(fd.requestAnimationFrame||PL).call(fd,e)}function BL(){return Ac?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1}function LL(e){const r="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(r,0)}function zL(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function UL(e){oD(window,e)}function oD(e,r){"scrollTop"in e?e.scrollTop=r:e.scrollTo(e.scrollX,r)}const jL=BL();function lD(){jL&&UL(zL())}function sD(e){return/^\d+(\.\d+)?$/.test(e)}function uD(e){return Number.isNaN?Number.isNaN(e):e!==e}function cl(e){if(Xr(e))return e=String(e),sD(e)?`${e}px`:e}function IL(e){if(Xr(e)){const r=cl(e);return{width:r,height:r}}return{}}let q2;function HL(){if(!q2){const e=document.documentElement,r=e.style.fontSize||window.getComputedStyle(e).fontSize;q2=parseFloat(r)}return q2}function VL(e){return e=e.replace(/rem/g,""),+e*HL()}function $L(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function YL(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function cD(e){if(typeof e=="number")return e;if(Ac){if(e.indexOf("rem")!==-1)return VL(e);if(e.indexOf("vw")!==-1)return $L(e);if(e.indexOf("vh")!==-1)return YL(e)}return parseFloat(e)}function ep(e,r,t){return Math.min(Math.max(e,r),t)}function fD(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 qL(e,r=!0,t=!0){r?e=fD(e,".",/\./g):e=e.split(".")[0],t?e=fD(e,"-",/-/g):e=e.replace(/-/,"");const i=r?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(i,"")}function fl(e,r=2){let t=`${e}`;for(;t.length<r;)t=`0${t}`;return t}let dD=!1;if(Ac)try{const e={};Object.defineProperty(e,"passive",{get(){dD=!0}}),window.addEventListener("test-passive",null,e)}catch{}function G2(e,r,t={}){if(!Ac)return;const{target:i=window,passive:l=!1,capture:f=!1,depends:c=[]}=t;let p;const g=()=>{const m=Xh(i);m&&!p&&(m.addEventListener(e,r,dD?{capture:f,passive:l}:f),p=!0)},d=()=>{const m=Xh(i);m&&p&&(m.removeEventListener(e,r,f),p=!1)};q.useEffect(()=>(g(),()=>d()),[i,...c])}function K2(e){const[r,t]=q.useState(e),i=q.useRef(r),l=q.useCallback(f=>{t(c=>i.current=Oc(f)?f(c):f)},[r]);return[r,l,i]}const GL=()=>{const e=q.useRef(!1);return q.useEffect(()=>(e.current=!1,()=>{e.current=!0}),[]),e},hD=(e={})=>{const r=GL(),[t,i,l]=K2(e),f=q.useCallback(c=>{r.current||i(p=>Object.assign(Object.assign({},p),Oc(c)?c(p):c))},[]);return[t,f,l]},Rc=(e,r)=>{const t=q.useRef(!1);q.useEffect(()=>{if(!t.current)t.current=!0;else return e()},r)};function pD(e){const r=q.useRef(e);return r.current=e,r}const KL=process.env.NODE_ENV==="development";function JQ(e,r){}const vD=e=>{process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=pD(e);q.useEffect(()=>()=>{r.current()},[])};function mD(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 WL=(e=>(t,i,l)=>{const f=q.useRef(!1),c=q.useRef([]),p=q.useRef([]),g=q.useRef();e(()=>{var d;const C=(Array.isArray(l)?l:[l]).map(b=>Xh(b));if(!f.current){f.current=!0,c.current=C,p.current=i,g.current=t();return}(C.length!==c.current.length||!mD(C,c.current)||!mD(i,p.current))&&((d=g.current)===null||d===void 0||d.call(g),c.current=C,p.current=i,g.current=t())}),vD(()=>{var d;(d=g.current)===null||d===void 0||d.call(g),f.current=!1})})(q.useEffect);function QL(e,r){const[t,i]=q.useState(),[l,f]=q.useState();return WL(()=>{const c=Xh(e);if(!c)return;const p=new IntersectionObserver(g=>{for(const d of g)f(d.intersectionRatio),i(d.isIntersecting)},Object.assign(Object.assign({},r),{root:Xh(r==null?void 0:r.root)}));return p.observe(c),()=>{p.disconnect()}},[],e),[t,l]}const gD=10;function ZL(e,r){return e>r&&e>gD?"horizontal":r>e&&r>gD?"vertical":""}function yD(){const e=q.useRef(0),r=q.useRef(0),t=q.useRef(0),i=q.useRef(0),l=q.useRef(0),f=q.useRef(0),c=q.useRef(""),p=q.useRef(null),g=()=>c.current==="vertical",d=()=>c.current==="horizontal",m=()=>{t.current=0,i.current=0,l.current=0,f.current=0,c.current="",p.current=null};return{move:x=>{const E=x.touches[0];t.current=E.clientX<0?0:E.clientX-e.current,i.current=E.clientY-r.current,l.current=Math.abs(t.current),f.current=Math.abs(i.current),p.current===null?p.current=!0:p.current=!1,c.current||(c.current=ZL(l.current,f.current))},start:x=>{m(),e.current=x.touches[0].clientX,r.current=x.touches[0].clientY},reset:m,startX:e,startY:r,deltaX:t,deltaY:i,offsetX:l,offsetY:f,direction:c,isVertical:g,isHorizontal:d,firstMove:p}}const xD=/scroll|auto/i,XL=Ac?window:void 0;function JL(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function ez(e,r=XL){r===void 0&&(r=window);let t=e;for(;t&&t!==r&&JL(t);){const{overflowY:i}=window.getComputedStyle(t);if(xD.test(i)){if(t.tagName!=="BODY")return t;const l=window.getComputedStyle(t.parentNode).overflowY;if(xD.test(l))return t}t=t.parentNode}return r}const tz=e=>(r,t)=>{const i=q.useRef(!1);e(()=>()=>{i.current=!1},[]),e(()=>{if(!i.current)i.current=!0;else return r()},t)},tp=Ac?q.useLayoutEffect:q.useEffect,nz=tz(tp),bD=()=>{const[,e]=q.useState({});return q.useCallback(()=>e({}),[])};function CD(e){process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=q.useRef(e);r.current=q.useMemo(()=>e,[e]);const t=q.useRef();return t.current||(t.current=function(...i){return r.current.apply(this,i)}),t.current}function np(e){const{value:r,defaultValue:t,onChange:i}=e,l=bD(),f=q.useRef(r!==void 0?r:t);r!==void 0&&(f.current=r);const c=CD((p,g)=>{const d=typeof p=="function"?p(f.current):p;!g&&d===f.current||(f.current=d,l(),i==null||i(d))});return[f.current,c]}const aZ="";function Va(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 W2(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 p(m){try{d(i.next(m))}catch(C){c(C)}}function g(m){try{d(i.throw(m))}catch(C){c(C)}}function d(m){m.done?f(m.value):l(m.value).then(p,g)}d((i=i.apply(e,r||[])).next())})}const iZ="",rz=({bem:e})=>Q(nn,{children:Array(12).fill(null).map((r,t)=>Q("i",{className:Oe(e("line",String(t+1)))},t))}),az=({bem:e})=>Q("svg",Object.assign({className:Oe(e("circular")),viewBox:"25 25 50 50"},{children:Q("circle",{cx:"50",cy:"50",r:"20",fill:"none"})})),iz=({bem:e})=>Me("div",Object.assign({className:Oe(e("ball"))},{children:[Q("div",{}),Q("div",{}),Q("div",{})]})),oz=e=>({spinner:Q(rz,{bem:e}),circular:Q(az,{bem:e}),ball:Q(iz,{bem:e})}),[Ng]=xn("loading"),Q2=e=>{const{className:r,type:t="circular",vertical:i,color:l,size:f,textColor:c,children:p,textSize:g}=e,d=q.useMemo(()=>Object.assign({color:l},IL(f)),[l,f]),m=()=>p?Q("span",Object.assign({className:Oe(Ng("text")),style:{fontSize:cl(g),color:c??l}},{children:p})):null;return Me("div",Object.assign({className:Oe(r,Ng([t,{vertical:i}])),style:e.style},{children:[Q("span",Object.assign({className:Oe(Ng("spinner",t)),style:d},{children:oz(Ng)[t]})),m()]}))},lz="#fff",rp="rv-hairline",sz=`${rp}--top`,uz=`${rp}--left`,cz=`${rp}--surround`,fz=`${rp}--top-bottom`,dz=`${rp}-unset--top-bottom`,wD="rv-shadow",hz="__REACT_VANT_COMPONENT",_D=q.createContext({}),[ap]=xn("button"),pz=e=>{const{color:r,loading:t,className:i,hairline:l,loadingText:f,round:c,square:p,plain:g,block:d,loadingType:m,nativeType:C,iconPosition:b}=e,x=Va(e,["color","loading","className","hairline","loadingText","round","square","plain","block","loadingType","nativeType","iconPosition"]),{parent:E}=q.useContext(_D),k=q.useMemo(()=>e.size||(E==null?void 0:E.size)||"normal",[E==null?void 0:E.size,e.size]),D=q.useMemo(()=>e.type||(E==null?void 0:E.type)||"default",[E==null?void 0:E.type,e.type]),T=q.useMemo(()=>g??(E==null?void 0:E.plain),[E==null?void 0:E.plain,g]),A=q.useMemo(()=>d??(E==null?void 0:E.block),[E==null?void 0:E.block,d]),S=q.useMemo(()=>b||(E==null?void 0:E.iconPosition)||"left",[E==null?void 0:E.iconPosition,b]),O=q.useMemo(()=>{var Z;return(Z=e.disabled)!==null&&Z!==void 0?Z:E==null?void 0:E.disabled},[E==null?void 0:E.disabled,e.disabled]),P=q.useMemo(()=>C||(E==null?void 0:E.nativeType)||"button",[E==null?void 0:E.nativeType,C]),N=q.useMemo(()=>e.tag||(E==null?void 0:E.tag)||"button",[E==null?void 0:E.tag,e.tag]),U=Oe(i,ap([D,k,{plain:T,loading:t,disabled:O,hairline:l,block:A,round:c,square:p}]),{[cz]:l},e.shadow&&`${wD}--${+e.shadow}`),$=Object.assign({},e.style);r&&($.color=T?r:lz,T||($.background=r),r.indexOf("gradient")!==-1?$.border=0:$.borderColor=r);const F=Z=>{!t&&!O&&e.onClick&&e.onClick(Z)},L=()=>{if(t){const{loadingSize:Z="20px"}=e;return Q(Q2,{className:Oe(ap("loading")),size:Z,type:m,color:D==="default"?void 0:""})}return null},I=()=>e.loading?L():e.icon?q.cloneElement(e.icon,{className:Oe(ap("icon"))}):null,H=()=>{let Z;return t?Z=f:Z=e.children||e.text,Z?Q("span",Object.assign({className:Oe(ap("text"))},{children:Z}),"text"):null};return Q(N,Object.assign({},x,{disabled:O,className:U,style:$,type:P,onClick:F},{children:(()=>Me("div",Object.assign({className:Oe(ap("content"))},{children:[S==="left"&&I(),H(),S==="right"&&I()]})))()}))},[vz]=xn("button-group"),ip=Object.assign(pz,{Group:e=>{var{className:r,style:t,children:i,onClick:l}=e,f=Va(e,["className","style","children","onClick"]);return Q("div",Object.assign({onClick:p=>{f.disabled||l==null||l(p)},style:t,className:Oe(r,vz([f.type,{round:f.round,plain:f.plain,disabled:f.disabled}]),f.shadow&&`${wD}--${+f.shadow}`)},{children:Q(_D.Provider,Object.assign({value:{parent:f}},{children:i}))}))}}),fZ="";function Jr(...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[ED]=xn("badge"),mz=e=>{const r=Jr(e,{tag:"div",showZero:!0}),{content:t,max:i,dot:l,showZero:f,tag:c="div"}=r,p=c,g=()=>r.content?!0:Xr(t)&&t!==""&&(f||+t!=0),d=()=>!l&&g()?Xr(i)&&sD(t==null?void 0:t.toString())&&+t>i?`${i}+`:t:null,m=()=>{if(g()||r.dot){let C={background:r.color};if(r.offset){const[b,x]=r.offset;r.children?(C.top=cl(x),C.right=cl(b)):(C.marginTop=cl(x),C.marginLeft=cl(b))}return r.children||(C=Object.assign(Object.assign({},r.style),C)),Q("div",Object.assign({className:Oe({[r.className]:r.className&&!r.children},ED({dot:r.dot,fixed:!!r.children})),style:C},{children:d()}))}return null};return r.children?Me(p,Object.assign({className:Oe(ED("wrapper"),r.className),style:r.style,onClick:r.onClick,onTouchStart:r.onTouchStart},{children:[r.children,m()]})):m()},hZ="";var gz=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 yz(e){return e.substring(3).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}const is=q.forwardRef((e,r)=>{const{name:t="",className:i,style:l,spin:f,rotate:c,tabIndex:p,onClick:g,children:d}=e,m=gz(e,["name","className","style","spin","rotate","tabIndex","onClick","children"]),C={};c&&(C.msTransform=`rotate(${c}deg)`,C.transform=`rotate(${c}deg)`);const b=t?yz(t):void 0;let x=p;x===void 0&&g&&(x=-1);const E=Object.assign({role:"img","aria-label":b,focusable:"false","data-icon":b,"aria-hidden":"true",preserveAspectRatio:"xMidYMid meet",ref:r,tabIndex:x,onClick:g,className:["rv-icon",b?`rv-icon-${b}`:"",f?"rv-icon--spin":"",i].join(" ").trim(),style:Object.assign(Object.assign({},l),C)},m);return q.cloneElement(d,E)}),xz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),bz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowDown"},e,{ref:r}),Fe.createElement(xz,null))),Cz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),wz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowLeft"},e,{ref:r}),Fe.createElement(Cz,null))),_z=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Ez=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowUp"},e,{ref:r}),Fe.createElement(_z,null))),Sz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Dz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrow"},e,{ref:r}),Fe.createElement(Sz,null))),kz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgClear"},e,{ref:r}),Fe.createElement(kz,null))),Tz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Z2=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgCross"},e,{ref:r}),Fe.createElement(Tz,null))),Az=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Oz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgPlus"},e,{ref:r}),Fe.createElement(Az,null))),Rz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),Fz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgQuestionO"},e,{ref:r}),Fe.createElement(Rz,null))),Nz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.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"})),SD=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgSuccess"},e,{ref:r}),Fe.createElement(Nz,null))),EZ="",[DD]=xn("cell-group"),Mz=e=>{const r=Jr(e,{border:!0}),{title:t,border:i,inset:l,card:f}=r,c=f||l,p=()=>Q("div",Object.assign({className:Oe(DD({inset:c}),{[fz]:!c&&i})},{children:r.children})),g=()=>t?Q("div",Object.assign({className:Oe(DD("title"))},{children:t})):null;return Me("div",Object.assign({className:r.className,style:r.style},{children:[g(),p()]}))},[dd]=xn("cell"),X2=Object.assign(e=>{const r=()=>Xr(e.label)?Q("div",Object.assign({className:Oe(dd("label"),e.labelClass)},{children:e.label})):null,t=()=>Xr(e.title)?Me("div",Object.assign({className:Oe(dd("title"),e.titleClass),style:e.titleStyle},{children:[e.title,r()]})):null,i=()=>{const D=Xr(e.title);return Xr(e.children)||Xr(e.value)?Q("div",Object.assign({className:Oe(dd("value",{alone:!D}),e.valueClass)},{children:Xr(e.children)?e.children:Q("span",{children:e.value})})):null},l=()=>e.icon?q.cloneElement(e.icon,{className:Oe(dd("left-icon"))}):null,f=()=>{if(e.rightIcon)return e.rightIcon;if(e.isLink){const D=Oe(dd("right-icon"));return e.arrowDirection==="left"?Q(wz,{className:D}):e.arrowDirection==="up"?Q(Ez,{className:D}):e.arrowDirection==="down"?Q(bz,{className:D}):Q(Dz,{className:D})}return null},{className:c,style:p,size:g,center:d,border:m=!0,isLink:C,required:b,onClick:x}=e,E=C||e.clickable,k={center:d,required:b,clickable:E,borderless:!m};return g&&(k[g]=!!g),Me("div",Object.assign({style:p,className:Oe(dd(k),c),role:E?"button":void 0,onClick:x},{children:[l(),t(),i(),f(),e.extra]}))},{Group:Mz}),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 kD(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Pg(e,r)}function Pz(e,r){return e.classList?!!r&&e.classList.contains(r):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+r+" ")!==-1}function Bz(e,r){e.classList?e.classList.add(r):Pz(e,r)||(typeof e.className=="string"?e.className=e.className+" "+r:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+r))}function TD(e,r){return e.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Lz(e,r){e.classList?e.classList.remove(r):typeof e.className=="string"?e.className=TD(e.className,r):e.setAttribute("class",TD(e.className&&e.className.baseVal||"",r))}const AD={disabled:!1};var zz=process.env.NODE_ENV!=="production"?bt.exports.oneOfType([bt.exports.number,bt.exports.shape({enter:bt.exports.number,exit:bt.exports.number,appear:bt.exports.number}).isRequired]):null,Uz=process.env.NODE_ENV!=="production"?bt.exports.oneOfType([bt.exports.string,bt.exports.shape({enter:bt.exports.string,exit:bt.exports.string,active:bt.exports.string}),bt.exports.shape({enter:bt.exports.string,enterDone:bt.exports.string,enterActive:bt.exports.string,exit:bt.exports.string,exitDone:bt.exports.string,exitActive:bt.exports.string})]):null;const OD=q.createContext(null);var op="unmounted",Fc="exited",Nc="entering",hd="entered",J2="exiting",os=function(e){kD(r,e);function r(i,l){var f;f=e.call(this,i,l)||this;var c=l,p=c&&!c.isMounting?i.enter:i.appear,g;return f.appearStatus=null,i.in?p?(g=Fc,f.appearStatus=Nc):g=hd:i.unmountOnExit||i.mountOnEnter?g=op:g=Fc,f.state={status:g},f.nextCallback=null,f}r.getDerivedStateFromProps=function(l,f){var c=l.in;return c&&f.status===op?{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!==hd&&(f=Nc):(c===Nc||c===hd)&&(f=J2)}this.updateStatus(!1,f)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var l=this.props.timeout,f,c,p;return f=c=p=l,l!=null&&typeof l!="number"&&(f=l.exit,c=l.enter,p=l.appear!==void 0?l.appear:c),{exit:f,enter:c,appear:p}},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:op})},t.performEnter=function(l){var f=this,c=this.props.enter,p=this.context?this.context.isMounting:l,g=this.props.nodeRef?[p]:[fg.findDOMNode(this),p],d=g[0],m=g[1],C=this.getTimeouts(),b=p?C.appear:C.enter;if(!l&&!c||AD.disabled){this.safeSetState({status:hd},function(){f.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:Nc},function(){f.props.onEntering(d,m),f.onTransitionEnd(b,function(){f.safeSetState({status:hd},function(){f.props.onEntered(d,m)})})})},t.performExit=function(){var l=this,f=this.props.exit,c=this.getTimeouts(),p=this.props.nodeRef?void 0:fg.findDOMNode(this);if(!f||AD.disabled){this.safeSetState({status:Fc},function(){l.props.onExited(p)});return}this.props.onExit(p),this.safeSetState({status:J2},function(){l.props.onExiting(p),l.onTransitionEnd(c.exit,function(){l.safeSetState({status:Fc},function(){l.props.onExited(p)})})})},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(p){c&&(c=!1,f.nextCallback=null,l(p))},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),p=l==null&&!this.props.addEndListener;if(!c||p){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var g=this.props.nodeRef?[this.nextCallback]:[c,this.nextCallback],d=g[0],m=g[1];this.props.addEndListener(d,m)}l!=null&&setTimeout(this.nextCallback,l)},t.render=function(){var l=this.state.status;if(l===op)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 p=wb(f,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return q.createElement(OD.Provider,{value:null},typeof c=="function"?c(l,p):q.cloneElement(q.Children.only(c),p))},r}(q.Component);os.contextType=OD,os.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:bt.exports.shape({current:typeof Element>"u"?bt.exports.any:function(e,r,t,i,l,f){var c=e[r];return bt.exports.instanceOf(c&&"ownerDocument"in c?c.ownerDocument.defaultView.Element:Element)(e,r,t,i,l,f)}}),children:bt.exports.oneOfType([bt.exports.func.isRequired,bt.exports.element.isRequired]).isRequired,in:bt.exports.bool,mountOnEnter:bt.exports.bool,unmountOnExit:bt.exports.bool,appear:bt.exports.bool,enter:bt.exports.bool,exit:bt.exports.bool,timeout:function(r){var t=zz;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:bt.exports.func,onEnter:bt.exports.func,onEntering:bt.exports.func,onEntered:bt.exports.func,onExit:bt.exports.func,onExiting:bt.exports.func,onExited:bt.exports.func}:{};function pd(){}os.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pd,onEntering:pd,onEntered:pd,onExit:pd,onExiting:pd,onExited:pd},os.UNMOUNTED=op,os.EXITED=Fc,os.ENTERING=Nc,os.ENTERED=hd,os.EXITING=J2;const RD=os;var jz=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Bz(r,i)})},eC=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Lz(r,i)})},tC=function(e){kD(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(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1];i.removeClasses(m,"exit"),i.addClass(m,C?"appear":"enter","base"),i.props.onEnter&&i.props.onEnter(p,g)},i.onEntering=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.addClass(m,b,"active"),i.props.onEntering&&i.props.onEntering(p,g)},i.onEntered=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.removeClasses(m,b),i.addClass(m,b,"done"),i.props.onEntered&&i.props.onEntered(p,g)},i.onExit=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"appear"),i.removeClasses(d,"enter"),i.addClass(d,"exit","base"),i.props.onExit&&i.props.onExit(p)},i.onExiting=function(p){var g=i.resolveArguments(p),d=g[0];i.addClass(d,"exit","active"),i.props.onExiting&&i.props.onExiting(p)},i.onExited=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"exit"),i.addClass(d,"exit","done"),i.props.onExited&&i.props.onExited(p)},i.resolveArguments=function(p,g){return i.props.nodeRef?[i.props.nodeRef.current,p]:[p,g]},i.getClassNames=function(p){var g=i.props.classNames,d=typeof g=="string",m=d&&g?g+"-":"",C=d?""+m+p:g[p],b=d?C+"-active":g[p+"Active"],x=d?C+"-done":g[p+"Done"];return{baseClassName:C,activeClassName:b,doneClassName:x}},i}var t=r.prototype;return t.addClass=function(l,f,c){var p=this.getClassNames(f)[c+"ClassName"],g=this.getClassNames("enter"),d=g.doneClassName;f==="appear"&&c==="done"&&d&&(p+=" "+d),c==="active"&&l&&l.scrollTop,p&&(this.appliedClasses[f][c]=p,jz(l,p))},t.removeClasses=function(l,f){var c=this.appliedClasses[f],p=c.base,g=c.active,d=c.done;this.appliedClasses[f]={},p&&eC(l,p),g&&eC(l,g),d&&eC(l,d)},t.render=function(){var l=this.props;l.classNames;var f=wb(l,["classNames"]);return q.createElement(RD,Nr({},f,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(q.Component);tC.defaultProps={classNames:""},tC.propTypes=process.env.NODE_ENV!=="production"?Nr({},RD.propTypes,{classNames:Uz,onEnter:bt.exports.func,onEntering:bt.exports.func,onEntered:bt.exports.func,onExit:bt.exports.func,onExiting:bt.exports.func,onExited:bt.exports.func}):{};const FD=tC;function un(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const OZ="",[Iz]=xn("overlay"),Hz=e=>{const r=q.useRef(null),t=Jr(e,{stopPropagation:["click"],lockScroll:!0,duration:300}),{visible:i,duration:l}=t,f=p=>{t.lockScroll&&$2(p,!0)},c=()=>{const p=Object.assign(Object.assign({zIndex:t.zIndex!==void 0?+t.zIndex:void 0,touchAction:t.lockScroll&&"none"},t.style),t.customStyle);return Xr(l)&&(p.animationDuration=`${l}ms`),aD(t.stopPropagation,Q("div",Object.assign({ref:r,style:p,onClick:g=>{var d;g.target===g.currentTarget&&((d=t.onClick)===null||d===void 0||d.call(t,g))},className:Oe(Iz(),t.className)},{children:t.children})))};return G2("touchmove",f,{target:r}),Q(FD,Object.assign({nodeRef:r,mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:l,classNames:"rv-fade"},{children:c()}))};function Vz(e){const{interceptor:r,args:t,done:i,canceled:l}=e;if(r){const f=r.apply(null,t||[]);RL(f)?f.then(c=>{c?i():l&&l()}).catch(Ni):f?i():l&&l()}else i()}function nC(e){return(typeof e=="function"?e():e)||document.body}function Bg(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function $z(e,r){if(Bg()&&e){const t=nC(e);return eu.exports.createPortal(r,t)}return r}const Yz=q.createContext({});let ND=!1;if(Bg())try{const e={};Object.defineProperty(e,"passive",{get(){ND=!0}}),window.addEventListener("test-passive",null,e)}catch{}let lp=0;const MD="rv-overflow-hidden";function qz(e,r){const t=yD(),i=c=>{t.move(c);const p=t.deltaY.current>0?"10":"01",g=ez(c.target,e.current);if(!g)return;const{scrollHeight:d,offsetHeight:m,scrollTop:C}=g;let b="11";C===0?b=m>=d?"00":"01":C+m>=d&&(b="10"),b!=="11"&&t.isVertical()&&!(parseInt(b,2)&parseInt(p,2))&&c.cancelable&&c.preventDefault()},l=()=>{document.addEventListener("touchstart",t.start),document.addEventListener("touchmove",i,ND?{passive:!1}:!1),lp||document.body.classList.add(MD),lp++},f=()=>{lp&&(document.removeEventListener("touchstart",t.start),document.removeEventListener("touchmove",i),lp--,lp||document.body.classList.remove(MD))};q.useEffect(()=>{if(r)return l(),()=>{f()}},[r])}let PD=2e3;const[Lg]=xn("popup"),sp=q.forwardRef((e,r)=>{var t;const i=Jr(e,{duration:300,overlay:!0,lockScroll:!0,position:"center",closeIcon:Q(Z2,{}),closeIconPosition:"top-right",closeOnClickOverlay:!0,stopPropagation:["click"],teleport:()=>document.body}),{round:l,closeable:f,title:c,description:p,children:g,duration:d,closeIcon:m,position:C}=i,b=q.useRef(!1),x=q.useRef((t=i.zIndex)!==null&&t!==void 0?t:PD),E=q.useRef(),[k,D]=q.useState(i.visible),[T,A]=q.useState(k),S=q.useMemo(()=>{const W=Object.assign({zIndex:x.current},i.style);if(Xr(i.duration)){const Z=i.position==="center"?"animationDuration":"transitionDuration";W[Z]=`${i.duration}ms`}return W},[x.current,i.position,i.style,i.duration]),O=()=>{var W;i.zIndex!==void 0?x.current=+i.zIndex:x.current=PD++,b.current=!0,(W=i.onOpen)===null||W===void 0||W.call(i)},P=()=>{Vz({interceptor:i.beforeClose,args:["close"],done:()=>{var W;b.current=!1,(W=i.onClose)===null||W===void 0||W.call(i)}})},z=W=>{var Z;(Z=i.onClickOverlay)===null||Z===void 0||Z.call(i,W),i.closeOnClickOverlay&&P()},N=()=>i.overlay?Q(Hz,{visible:k,className:i.overlayClass,customStyle:i.overlayStyle,zIndex:x.current,duration:d,onClick:z}):null,U=W=>{i.onClickCloseIcon&&i.onClickCloseIcon(W),P()},$=()=>{if(f){const{closeIconPosition:W}=i;return m?Q("div",Object.assign({className:Oe(Lg("close-icon",W)),onClick:U},{children:m})):null}return null},F=()=>c?Q("div",Object.assign({className:Oe(Lg("title"))},{children:c})):null,L=()=>p?Q("div",Object.assign({className:Oe(Lg("description"))},{children:p})):null,I=()=>{const{safeAreaInsetBottom:W}=i;return aD(i.stopPropagation,Me("div",Object.assign({ref:E,style:Object.assign(Object.assign({},S),{display:!k&&!T?"none":void 0}),className:Oe(Lg({round:l,[C]:C}),{"rv-safe-area-bottom":W},i.className),onClick:i.onClick},{children:[F(),L(),g,$()]})))},H=()=>{const{transition:W,destroyOnClose:Z,forceRender:X}=i,re=C==="center"?"rv-fade":`rv-popup-slide-${C}`;return Q(FD,Object.assign({in:k,nodeRef:E,timeout:d,classNames:W||re,mountOnEnter:!X,unmountOnExit:Z,onEnter:O,onEntered:i.onOpened,onExited:()=>{var K;A(!1),(K=i.onClosed)===null||K===void 0||K.call(i)}},{children:I()}))};return G2("popstate",()=>{i.closeOnPopstate&&P()}),tp(()=>{k&&A(!0)},[k]),tp(()=>{D(i.visible)},[i.visible]),qz(E,k&&i.lockScroll),q.useImperativeHandle(r,()=>({popupRef:E})),$z(i.teleport,Me(Yz.Provider,Object.assign({value:{visible:k}},{children:[N(),H()]})))}),MZ="",BD=q.createContext({}),[Gz]=xn("action-bar"),Kz=e=>{const r=Jr(e,{safeAreaInsetBottom:!0}),t=q.useMemo(()=>q.Children.toArray(r.children),[r.children]);return Q(BD.Provider,Object.assign({value:{parent:{children:t}}},{children:Q("div",Object.assign({className:Oe(r.className,Gz(),{"rv-safe-area-bottom":r.safeAreaInsetBottom}),style:r.style},{children:q.Children.toArray(r.children).filter(Boolean).map((i,l)=>q.cloneElement(i,{index:l}))}))}))},[LD]=xn("action-bar-icon"),Wz=e=>{const r=()=>{const{badge:t,icon:i}=e;return i?Q(mz,Object.assign({},t,{className:Oe(LD("icon"))},{children:i})):null};return Me("div",Object.assign({role:"button",className:Oe(e.className,LD()),style:e.style,tabIndex:0,onClick:e.onClick},{children:[r(),e.children||e.text]}))},[Qz]=xn("action-bar-button"),Zz=Object.assign(e=>{const{type:r,icon:t,text:i,color:l,loading:f,disabled:c,index:p}=e,{parent:g}=q.useContext(BD),d=q.useMemo(()=>{if(g){const C=g.children[p-1];return!(C&&"isButton"in C.type)}return!1},[p,g]),m=q.useMemo(()=>{if(g){const C=g.children[p+1];return!(C&&"isButton"in C.type)}return!1},[p,g]);return Q(ip,Object.assign({className:Oe(e.className,Qz([r,{last:m,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}),rC=Object.assign(Kz,{Icon:Wz,Button:Zz});function Xz(e,r,t){const i=r[t];Xr(i)&&(!Object.prototype.hasOwnProperty.call(e,t)||!cd(i)?e[t]=i:e[t]=zD(Object(e[t]),r[t]))}function zD(e,r){return Object.keys(r).forEach(t=>{Xz(e,r,t)}),e}const Jz={locale:zD({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=q.createContext(Jz),[bo]=xn("dialog"),UD=e=>{const{locale:r}=q.useContext(vd),t=Jr(e,{transition:"rv-dialog-bounce",showConfirmButton:!0,closeOnPopstate:!0}),{width:i,title:l,theme:f,visible:c,message:p,className:g,messageAlign:d,closeOnClickOverlay:m,onClickCloseIcon:C}=t,b=Va(t,["width","title","theme","visible","message","className","messageAlign","closeOnClickOverlay","onClickCloseIcon"]),x=()=>t.title?Q("div",Object.assign({className:Oe(bo("header",{isolated:!t.message&&!t.children}))},{children:l})):null,E=()=>t.children?Q("div",Object.assign({className:Oe(bo("content"))},{children:t.children})):p?Q("div",Object.assign({className:Oe(bo("content",{isolated:!l}))},{children:Q("div",Object.assign({className:Oe(bo("message",{"has-title":l,[d]:d}))},{children:p}))})):null,k=()=>{var A,S,O,P,z,N;return Me("div",Object.assign({className:Oe(sz,bo("footer"))},{children:[t.showCancelButton&&Q(ip,{size:"large",text:t.cancelButtonText||r.cancel,className:Oe(bo("cancel")),style:{color:t.cancelButtonColor},loading:(A=t.cancelProps)===null||A===void 0?void 0:A.loading,disabled:(S=t.cancelProps)===null||S===void 0?void 0:S.disabled,onClick:!((O=t.cancelProps)===null||O===void 0)&&O.loading?Ni:t.onCancel}),t.showConfirmButton&&Q(ip,{size:"large",text:t.confirmButtonText||r.confirm,className:Oe(bo("confirm"),{[uz]:t.showCancelButton}),round:f==="round-button"||void 0,style:{color:t.confirmButtonColor},loading:(P=t.confirmProps)===null||P===void 0?void 0:P.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((N=t.confirmProps)===null||N===void 0)&&N.loading?Ni:t.onConfirm})]}))},D=()=>{var A,S,O,P,z,N;return Me(rC,Object.assign({className:Oe(bo("footer"))},{children:[t.showCancelButton&&Q(rC.Button,{type:"warning",text:t.cancelButtonText||r.cancel,className:Oe(bo("cancel")),color:t.cancelButtonColor,loading:(A=t.cancelProps)===null||A===void 0?void 0:A.loading,disabled:(S=t.cancelProps)===null||S===void 0?void 0:S.disabled,onClick:!((O=t.cancelProps)===null||O===void 0)&&O.loading?Ni:t.onCancel}),t.showConfirmButton&&Q(rC.Button,{type:"danger",text:t.confirmButtonText||r.confirm,className:Oe(bo("confirm")),color:t.confirmButtonColor,loading:(P=t.confirmProps)===null||P===void 0?void 0:P.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((N=t.confirmProps)===null||N===void 0)&&N.loading?Ni:t.onConfirm})]}))},T=()=>t.footer?t.footer:t.theme==="round-button"?D():k();return Me(sp,Object.assign({},b,{visible:c,className:Oe(bo([f]),g),style:{width:cl(i)},"aria-labelledby":l||p,closeOnClickOverlay:m,onClickCloseIcon:C,onClose:t.onClose,onClosed:t.onClosed},{children:[x(),E(),T()]}))};Number((q.version||"").split(".")[0]);const eU=Number((eu.exports.version||"").split(".")[0]),zg=Object.assign({},p9),{render:tU,unmountComponentAtNode:nU}=zg;let Ug;try{eU>=18&&zg.createRoot&&(Ug=zg.createRoot)}catch{}function jD(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 rU(e,r){tU(e,r)}function aU(e,r){jD(!0);const t=r[jg]||Ug(r);jD(!1),t.render(e),r[jg]=t}function ID(e,r){if(Ug){aU(e,r);return}rU(e,r)}function iU(e){return nU(e)}function oU(e){return W2(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 HD(e){return Ug?oU(e):iU(e)}const md=UD;md.show=e=>{if(!Bg())return null;const r={overlay:!0,closeable:!1,closeIcon:Q(Z2,{}),lockScroll:!0,transition:"rv-dialog-bounce",showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1},{onClosed:t,onCancel:i=Ni,onConfirm:l=Ni,onClose:f=Ni,cancelProps:c,confirmProps:p}=e,g=Va(e,["onClosed","onCancel","onConfirm","onClose","cancelProps","confirmProps"]),d=nC(e.teleport),m=document.createElement("div");d.appendChild(m);let C=Ni;return ID(Q(()=>{const[x,E]=q.useState(!1),[k,D]=q.useState(!1),[T,A]=q.useState(!1);q.useEffect(()=>{E(!0)},[]),C=()=>{E(!1),f&&f()};const S=()=>{t&&t(),HD(m)&&m.parentNode&&m.parentNode.removeChild(m)},O=z=>W2(void 0,void 0,void 0,function*(){const N=setTimeout(()=>A(!0));(yield l(z))!==!1?(clearTimeout(N),C()):(clearTimeout(N),A(!1))}),P=(z,N)=>W2(void 0,void 0,void 0,function*(){if(N){C();return}const U=setTimeout(()=>D(!0));(yield i(z))!==!1?(clearTimeout(U),C()):(clearTimeout(U),D(!1))});return Q(UD,Object.assign({},r,g,{visible:x,teleport:()=>m,cancelProps:Object.assign({loading:k},c),confirmProps:Object.assign({loading:T},p),onClose:C,onCancel:P,onConfirm:O,onClosed:S}))},{}),m),C},md.alert=e=>{const{onConfirm:r=Ni}=e;return new Promise(t=>{md.show(Object.assign(Object.assign({},e),{onConfirm:i=>{r(i),t(i)}}))})},md.confirm=e=>{const{onCancel:r=Ni,onConfirm:t=Ni}=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 lU=md,[up]=xn("input"),sU=q.forwardRef((e,r)=>{const t=Jr(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),i=q.useRef(),[l,f]=q.useState(!1),c=q.useRef(!1),[p,g]=np(t),{className:d,style:m,align:C,type:b,name:x,placeholder:E,disabled:k,readOnly:D,maxLength:T,autoFocus:A}=t,S=()=>{i!=null&&i.current&&i.current.focus()},O=()=>{i!=null&&i.current&&i.current.blur()};q.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:S,blur:O,get nativeElement(){return i.current}}));const P=q.useMemo(()=>{if(t.clearable&&!D){const I=p!=="",H=t.clearTrigger==="always"||t.clearTrigger==="focus"&&l;return I&&H}return!1},[p,t.clearTrigger,l]),z=I=>{var H;let W=I;if(!c.current&&(Xr(T)&&W.length>+T&&(W=W.slice(0,T),(H=t.onOverlimit)===null||H===void 0||H.call(t)),b==="number"||b==="digit")){const Z=b==="number";W=qL(W,Z,Z)}g(W)},N=I=>{var H;f(!0),(H=t.onFocus)===null||H===void 0||H.call(t,I),D&&O()},U=I=>{var H;f(!1),(H=t.onBlur)===null||H===void 0||H.call(t,I),lD()},$=I=>{var H;(I.key==="Enter"||+I.charCode==13)&&($2(I),t.type==="search"&&O()),(H=t.onKeyPress)===null||H===void 0||H.call(t,I)},F=()=>{let I=b,H;return b==="number"&&(I="text",H="decimal"),b==="digit"&&(I="tel",H="numeric"),Q("input",{value:p,type:I,inputMode:H,ref:i,name:x,className:Oe(up("control")),disabled:k,autoFocus:A,readOnly:D,placeholder:E||"",onBlur:U,onFocus:N,onChange:W=>{var Z;return z((Z=W==null?void 0:W.currentTarget)===null||Z===void 0?void 0:Z.value)},onKeyPress:$,autoCapitalize:t.autoCapitalize,autoCorrect:t.autoCorrect,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onCompositionStart:W=>{var Z;c.current=!0,(Z=t.onCompositionStart)===null||Z===void 0||Z.call(t,W)},onCompositionEnd:W=>{var Z,X;c.current=!1,(Z=t.onCompositionEnd)===null||Z===void 0||Z.call(t,W),z((X=W==null?void 0:W.currentTarget)===null||X===void 0?void 0:X.value)},onClick:t.onClick})},L=I=>{var H;g(""),(H=t.onClear)===null||H===void 0||H.call(t,I)};return Me("div",Object.assign({className:Oe(up([C]),d),style:m},{children:[t.prefix&&Q("div",Object.assign({className:Oe(up("prefix"))},{children:t.prefix})),F(),P&&q.cloneElement(t.clearIcon||Q(Mg,{}),{className:Oe(up("clear")),onTouchStart:L}),t.suffix&&Q("div",Object.assign({className:Oe(up("suffix"))},{children:t.suffix}))]}))}),[cp]=xn("textarea"),uU=q.forwardRef((e,r)=>{const t=Jr(e,{rows:2,clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),[i,l]=q.useState(!1),f=q.useRef(),c=q.useRef(!1),[p,g]=np(t),{className:d,style:m,name:C,rows:b,placeholder:x,disabled:E,readOnly:k,maxLength:D,showWordLimit:T,autoFocus:A}=t,S=()=>{f!=null&&f.current&&f.current.focus()},O=()=>{f!=null&&f.current&&f.current.blur()};q.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:S,blur:O,get nativeElement(){return f.current}}));const P=()=>{const H=f.current;if(!H)return;H.style.height="auto";let W=H.scrollHeight;if(cd(t.autoSize)){const{maxHeight:Z,minHeight:X}=t.autoSize;Z&&(W=Math.min(W,Z)),X&&(W=Math.max(W,X))}W&&(H.style.height=`${W}px`)};q.useEffect(()=>{P()},[p]);const z=q.useMemo(()=>cp("control",[{"min-height":!t.autoSize,clear:t.clearable}]),[t.autoSize]),N=H=>{var W;let Z=H;c.current||Xr(D)&&Z.length>+D&&(Z=Z.slice(0,D),(W=t.onOverlimit)===null||W===void 0||W.call(t)),g(Z)},U=H=>{var W;l(!0),(W=t.onFocus)===null||W===void 0||W.call(t,H),k&&O()},$=H=>{var W;l(!1),(W=t.onBlur)===null||W===void 0||W.call(t,H),lD()},F=()=>{if(T){const H=(p?`${p}`:"").length;return Q("div",Object.assign({className:Oe(cp("word-limit"))},{children:typeof T=="function"?T({currentCount:H,maxLength:D}):Me(nn,{children:[Q("span",Object.assign({className:Oe(cp("word-num"))},{children:H})),D?`/${D}`:!1]})}))}return null},L=H=>{var W;g(""),(W=t.onClear)===null||W===void 0||W.call(t,H)},I=q.useMemo(()=>{if(t.clearable&&!k){const H=p!=="",W=t.clearTrigger==="always"||t.clearTrigger==="focus"&&i;return H&&W}return!1},[p,t.clearTrigger,i]);return Me("div",Object.assign({className:Oe(cp(),d),style:m},{children:[Q("textarea",{ref:f,name:C,rows:b,className:Oe(z),value:p,disabled:E,autoFocus:A,readOnly:k,placeholder:x||"",onBlur:$,onFocus:U,onChange:H=>{var W;return N((W=H==null?void 0:H.currentTarget)===null||W===void 0?void 0:W.value)},onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,autoComplete:t.autoComplete,onCompositionStart:H=>{var W;c.current=!0,(W=t.onCompositionStart)===null||W===void 0||W.call(t,H)},onCompositionEnd:H=>{var W,Z;c.current=!1,(W=t.onCompositionEnd)===null||W===void 0||W.call(t,H),N((Z=H==null?void 0:H.currentTarget)===null||Z===void 0?void 0:Z.value)},onClick:t.onClick}),I&&q.cloneElement(t.clearIcon,{className:Oe(cp("clear")),onTouchStart:L}),F()]}))}),KZ="",WZ="",cu=Object.assign(sU,{TextArea:uU}),[Mi]=xn("field"),cU=q.forwardRef((e,r)=>{var t;const i=Jr(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",formatTrigger:"onChange",defaultValue:""}),l=q.useRef(null),f=q.useRef(null),c=i.type==="textarea"?f:l,p=()=>{c.current&&c.current.focus()},g=()=>{c.current&&c.current.blur()},d=()=>{c.current&&c.current.clear()};q.useImperativeHandle(r,()=>({focus:p,blur:g,clear:d,get nativeElement(){return c.current.nativeElement}}));const m=V=>Xr(i[V])?i[V]:null,C=()=>{const V=m("labelWidth");return V?{width:cl(V)}:{}},b=(V,ee="onChange")=>{const{formatTrigger:ie,formatter:ae}=i;return ae&&ee===ie?ae(V):V},x=V=>{var ee;(ee=i.onChange)===null||ee===void 0||ee.call(i,b(V))},E=()=>{const{value:V,defaultValue:ee,align:ie,type:ae,placeholder:pe,name:xe,maxLength:Ee,disabled:se,readOnly:Ne,clearable:Te,clearIcon:tt,clearTrigger:Se,autoFocus:lt,onClear:je,onBlur:Pt,onFocus:_t,onKeyPress:gt,onOverlimit:bn}=i;if(Xr(i.children))return Q("div",Object.assign({className:Oe(Mi("children"))},{children:i.children}));const Ln={value:V,onChange:x,placeholder:pe,name:xe,defaultValue:ee,disabled:se,clearable:Te,clearIcon:tt,clearTrigger:Se,onClear:je,onBlur:Pt,onFocus:_t,onKeyPress:gt,onOverlimit:bn,autoFocus:lt,readOnly:Ne,maxLength:Ee,onClick:i.onClickInput};return ae==="textarea"?Q(cu.TextArea,Object.assign({ref:f,autoSize:i.autoSize,showWordLimit:i.showWordLimit,rows:i.rows},Ln)):Q(cu,Object.assign({ref:l,type:ae,align:ie},Ln))},k=()=>{const{leftIcon:V,onClickLeftIcon:ee}=i;return V?Q("div",Object.assign({className:Oe(Mi("left-icon")),onClick:ee},{children:V})):null},D=()=>{const{rightIcon:V,onClickRightIcon:ee}=i;return V?Q("div",Object.assign({className:Oe(Mi("right-icon")),onClick:ee},{children:V})):null},T=()=>{const V=i.errorMessage;return V?Q("div",Object.assign({className:Oe(Mi("error-message"))},{children:V})):null},A=()=>i.intro?Q("div",Object.assign({className:Oe(Mi("intro"))},{children:i.intro})):null,S=()=>{const{tooltip:V}=i;if(V){let ee=Q(Fz,{}),ie={message:V};if(!(q.isValidElement(V)||typeof V=="string")){const ae=V,{icon:pe}=ae,xe=Va(ae,["icon"]);ee=pe||ee,ie=xe}return Q("div",Object.assign({className:Oe(Mi("tooltip")),onClick:()=>lU.show(ie)},{children:ee}))}return null},O=()=>{const{label:V,colon:ee}=i;return V?Me(nn,{children:[V,!!ee&&":",S()]}):null},{size:P,center:z,border:N,isLink:U,required:$,clickable:F,labelAlign:L,className:I,labelClass:H,valueClass:W,controlAlign:Z,arrowDirection:X,disabled:re,titleStyle:K,error:te}=i,G=(t=i.suffix)!==null&&t!==void 0?t:i.button;return Me(X2,Object.assign({title:O(),size:P,icon:k(),center:z,border:N,isLink:U,required:$,clickable:F,extra:i.extra,titleStyle:Object.assign(Object.assign({},C()),K),valueClass:Oe(Mi("value",[Z]),W),titleClass:Oe(Mi("label",L),H),arrowDirection:X,onClick:i.onClick,style:i.style,className:Oe(Mi({error:te,disabled:re,[`label-${L}`]:L}),I)},{children:[Me("div",Object.assign({className:Oe(Mi("body"))},{children:[i.prefix&&Q("div",Object.assign({className:Oe(Mi("prefix"))},{children:i.prefix})),Q("div",Object.assign({className:Oe(Mi("control-wrapper"))},{children:E()})),D(),G&&Q("div",Object.assign({className:Oe(Mi("suffix"))},{children:G}))]})),T(),A()]}))}),fU=Symbol("field"),aC=Object.assign(cU,{[hz]:fU});function dU(e,r,t){return Math.max(r,Math.min(e,t))}const Ea={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 VD(e,r,t){return r===0||Math.abs(r)===1/0?Math.pow(e,t*5):e*r*t/(r+t*e)}function $D(e,r,t,i=.15){return i===0?dU(e,r,t):e<r?-VD(r-e,t-r,i)+r:e>t?+VD(e-t,t-r,i)+t:e}function hU(e,[r,t],[i,l]){const[[f,c],[p,g]]=e;return[$D(r,f,c,i),$D(t,p,g,l)]}function li(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function YD(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 tr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?YD(Object(t),!0).forEach(function(i){li(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):YD(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}const qD={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 GD(e){return e?e[0].toUpperCase()+e.slice(1):""}const pU=["enter","leave"];function vU(e=!1,r){return e&&!pU.includes(r)}function mU(e,r="",t=!1){const i=qD[e],l=i&&i[r]||r;return"on"+GD(e)+GD(l)+(vU(t,l)?"Capture":"")}const gU=["gotpointercapture","lostpointercapture"];function yU(e){let r=e.substring(2).toLowerCase();const t=!!~r.indexOf("passive");t&&(r=r.replace("passive",""));const i=gU.includes(r)?"capturecapture":"capture",l=!!~r.indexOf(i);return l&&(r=r.replace("capture","")),{device:r,capture:l,passive:t}}function xU(e,r=""){const t=qD[e],i=t&&t[r]||r;return e+i}function Ig(e){return"touches"in e}function KD(e){return Ig(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function bU(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 CU(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function WD(e){return Ig(e)?CU(e)[0]:e}function wU(e){return bU(e).map(r=>r.identifier)}function iC(e){const r=WD(e);return Ig(e)?r.identifier:r.pointerId}function QD(e){const r=WD(e);return[r.clientX,r.clientY]}function _U(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 EU(){}function SU(...e){return e.length===0?EU:e.length===1?e[0]:function(){let r;for(const t of e)r=t.apply(this,arguments)||r;return r}}function ZD(e,r){return Object.assign({},r,e||{})}const DU=32;class kU{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,_U(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 z=t._delta.map(Math.abs);Ea.addTo(t._distance,z)}this.axisIntent&&this.axisIntent(r);const[c,p]=t._movement,[g,d]=i.threshold,{_step:m,values:C}=t;if(i.hasCustomTransform?(m[0]===!1&&(m[0]=Math.abs(c)>=g&&C[0]),m[1]===!1&&(m[1]=Math.abs(p)>=d&&C[1])):(m[0]===!1&&(m[0]=Math.abs(c)>=g&&Math.sign(c)*g),m[1]===!1&&(m[1]=Math.abs(p)>=d&&Math.sign(p)*d)),t.intentional=m[0]!==!1||m[1]!==!1,!t.intentional)return;const b=[0,0];if(i.hasCustomTransform){const[z,N]=C;b[0]=m[0]!==!1?z-m[0]:0,b[1]=m[1]!==!1?N-m[1]:0}else b[0]=m[0]!==!1?c-m[0]:0,b[1]=m[1]!==!1?p-m[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(b);const x=t.offset,E=t._active&&!t._blocked||t.active;E&&(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,D]=t.offset,[[T,A],[S,O]]=t._bounds;t.overflow=[k<T?-1:k>A?1:0,D<S?-1:D>O?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 P=t._active?i.rubberband||[0,0]:[0,0];if(t.offset=hU(t._bounds,t.offset,P),t.delta=Ea.sub(t.offset,x),this.computeMovement(),E&&(!t.last||f>DU)){t.delta=Ea.sub(t.offset,x);const z=t.delta.map(Math.abs);Ea.addTo(t.distance,z),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&f>0&&(t.velocity=[z[0]/f,z[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(tr(tr(tr({},t),r),{},{[this.aliasKey]:r.values}));l!==void 0&&(r.memo=l)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function TU([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 AU extends kU{constructor(...r){super(...r),li(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=Ea.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Ea.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[KD(r)]:i.axisThreshold;t.axis=TU(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 XD=e=>e,JD=.15,oC={enabled(e=!0){return e},eventOptions(e,r,t){return tr(tr({},t.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[JD,JD];case!1:return[0,0];default:return Ea.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Ea.toVector(e)},transform(e,r,t){const i=e||t.shared.transform;if(this.hasCustomTransform=!!i,process.env.NODE_ENV==="development"){const l=i||XD;return f=>{const c=l(f);return!isFinite(c[0])||isFinite(c[1]),c}}return i||XD},threshold(e){return Ea.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(oC,{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 OU=0,fp=tr(tr({},oC),{},{axis(e,r,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(e=OU){return e},bounds(e={}){if(typeof e=="function")return f=>fp.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,ek={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 RU extends AU{constructor(...r){super(...r),li(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=fp.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=iC(r),i._pointerActive=!0,this.computeValues(QD(r)),this.computeInitial(),t.preventScrollAxis&&KD(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=iC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;const f=QD(r);if(document.pointerLockElement===r.target?t._delta=[r.movementX,r.movementY]:(t._delta=Ea.sub(f,t._values),this.computeValues(f)),Ea.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=iC(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[p,g]=t.direction,[d,m]=t.velocity,[C,b]=t.movement,[x,E]=i.swipe.velocity,[k,D]=i.swipe.distance,T=i.swipe.duration;t.elapsedTime<T&&(Math.abs(d)>x&&Math.abs(C)>k&&(t.swipe[0]=p),Math.abs(m)>E&&Math.abs(b)>D&&(t.swipe[1]=g))}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,FU(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=ek[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,Ea.addTo(i._movement,i._delta),this.compute(r),this.emit()}}keyUp(r){r.key in ek&&(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 FU(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const dp=typeof window<"u"&&window.document&&window.document.createElement;function NU(){return dp&&"ontouchstart"in window}function tk(){return NU()||dp&&window.navigator.maxTouchPoints>1}function MU(){return dp&&"onpointerdown"in window}function PU(){return dp&&"exitPointerLock"in window.document}function BU(){try{return"constructor"in GestureEvent}catch{return!1}}const Ji={isBrowser:dp,gesture:BU(),touch:tk(),touchscreen:tk(),pointer:MU(),pointerLock:PU()},LU=250,zU=180,UU=.5,jU=50,IU=250,nk={mouse:0,touch:0,pen:8},rk=tr(tr({},fp),{},{device(e,r,{pointer:{touch:t=!1,lock:i=!1,mouse:l=!1}={}}){return this.pointerLock=i&&Ji.pointerLock,Ji.touch&&t?"touch":this.pointerLock?"mouse":Ji.pointer&&!l?"pointer":Ji.touch?"touch":"mouse"},preventScrollAxis(e,r,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&e?LU:void 0,!(!Ji.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=Ea.toVector(e,t?i:l?1:0);return this.filterTaps=t,this.tapsThreshold=i,f},swipe({velocity:e=UU,distance:r=jU,duration:t=IU}={}){return{velocity:this.transform(Ea.toVector(e)),distance:this.transform(Ea.toVector(r)),duration:t}},delay(e=0){switch(e){case!0:return zU;case!1:return 0;default:return e}},axisThreshold(e){return e?tr(tr({},nk),e):nk}});process.env.NODE_ENV==="development"&&Object.assign(rk,{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}}),tr(tr({},oC),{},{device(e,r,{shared:t,pointer:{touch:i=!1}={}}){if(t.target&&!Ji.touch&&Ji.gesture)return"gesture";if(Ji.touch&&i)return"touch";if(Ji.touchscreen){if(Ji.pointer)return"pointer";if(Ji.touch)return"touch"}},bounds(e,r,{scaleBounds:t={},angleBounds:i={}}){const l=c=>{const p=ZD(Hg(t,c),{min:-1/0,max:1/0});return[p.min,p.max]},f=c=>{const p=ZD(Hg(i,c),{min:-1/0,max:1/0});return[p.min,p.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",Ea.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e}}),tr(tr({},fp),{},{mouseOnly:(e=!0)=>e}),tr(tr({},fp),{},{mouseOnly:(e=!0)=>e});const ak=new Map,lC=new Map;function HU(e){ak.set(e.key,e.engine),lC.set(e.key,e.resolver)}const VU={key:"drag",engine:RU,resolver:rk};function $U(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 YU(e,r){if(e==null)return{};var t=$U(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 qU={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=Ji.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:r=!1}={}){return{passive:e,capture:r}},transform(e){return e}},GU=["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 KU(e,r){const t=e,{target:i,eventOptions:l,window:f,enabled:c,transform:p}=t,g=YU(t,GU),d={shared:$g({target:i,eventOptions:l,window:f,enabled:c,transform:p},qU)};if(r){const m=lC.get(r);d[r]=$g(tr({shared:d.shared},g),m)}else for(const m in g){const C=lC.get(m);if(C)d[m]=$g(tr({shared:d.shared},g[m]),C);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(m)&&m==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.")}return d}class ik{constructor(r,t){li(this,"_listeners",new Set),this._ctrl=r,this._gestureKey=t}add(r,t,i,l,f){const c=this._listeners,p=xU(t,i),g=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},d=tr(tr({},g),f);r.addEventListener(p,l,d);const m=()=>{r.removeEventListener(p,l,d),c.delete(m)};return c.add(m),m}clean(){this._listeners.forEach(r=>r()),this._listeners.clear()}}class WU{constructor(){li(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 QU=class{constructor(r){li(this,"gestures",new Set),li(this,"_targetEventStore",new ik(this)),li(this,"gestureEventStores",{}),li(this,"gestureTimeoutStores",{}),li(this,"handlers",{}),li(this,"config",{}),li(this,"pointerIds",new Set),li(this,"touchIds",new Set),li(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),ZU(this,r)}setEventIds(r){if(Ig(r))return this.touchIds=new Set(wU(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=KU(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 p=this.config[c],g=ok(i,p.eventOptions,!!l);if(p.enabled){const d=ak.get(c);new d(this,r,c).bind(g)}}const f=ok(i,t.eventOptions,!!l);for(const c in this.nativeHandlers)f(c,"",p=>this.nativeHandlers[c](tr(tr({},this.state.shared),{},{event:p,args:r})),void 0,!0)}for(const f in i)i[f]=SU(...i[f]);if(!l)return i;for(const f in i){const{device:c,capture:p,passive:g}=yU(f);this._targetEventStore.add(l,c,"",i[f],{capture:p,passive:g})}}}};function gd(e,r){e.gestures.add(r),e.gestureEventStores[r]=new ik(e,r),e.gestureTimeoutStores[r]=new WU}function ZU(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 ok=(e,r,t)=>(i,l,f,c={},p=!1)=>{var g,d;const m=(g=c.capture)!==null&&g!==void 0?g:r.capture,C=(d=c.passive)!==null&&d!==void 0?d:r.passive;let b=p?i:mU(i,l,m);t&&C&&(b+="Passive"),e[b]=e[b]||[],e[b].push(f)};function XU(e,r={},t,i){const l=q.useMemo(()=>new QU(e),[]);if(l.applyHandlers(e,i),l.applyConfig(r,t),q.useEffect(l.effect.bind(l)),q.useEffect(()=>l.clean.bind(l),[]),r.target===void 0)return l.bind.bind(l)}function JU(e,r){return HU(VU),XU({drag:e},r||{},"drag")}var sC=pp(),Ft=e=>hp(e,sC),uC=pp();Ft.write=e=>hp(e,uC);var Yg=pp();Ft.onStart=e=>hp(e,Yg);var cC=pp();Ft.onFrame=e=>hp(e,cC);var fC=pp();Ft.onFinish=e=>hp(e,fC);var yd=[];Ft.setTimeout=(e,r)=>{const t=Ft.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(lk(t),0,l),du+=1,sk(),l};var lk=e=>~(~yd.findIndex(r=>r.time>e)||~yd.length);Ft.cancel=e=>{Yg.delete(e),cC.delete(e),fC.delete(e),sC.delete(e),uC.delete(e)},Ft.sync=e=>{hC=!0,Ft.batchedUpdates(e),hC=!1},Ft.throttle=e=>{let r;function t(){try{e(...r)}finally{r=null}}function i(...l){r=l,Ft.onStart(t)}return i.handler=e,i.cancel=()=>{Yg.delete(t),r=null},i};var dC=typeof window<"u"?window.requestAnimationFrame:()=>{};Ft.use=e=>dC=e,Ft.now=typeof performance<"u"?()=>performance.now():Date.now,Ft.batchedUpdates=e=>e(),Ft.catch=console.error,Ft.frameLoop="always",Ft.advance=()=>{Ft.frameLoop!=="demand"||ck()};var fu=-1,du=0,hC=!1;function hp(e,r){hC?(r.delete(e),e(0)):(r.add(e),sk())}function sk(){fu<0&&(fu=0,Ft.frameLoop!=="demand"&&dC(uk))}function ej(){fu=-1}function uk(){~fu&&(dC(uk),Ft.batchedUpdates(ck))}function ck(){const e=fu;fu=Ft.now();const r=lk(fu);if(r&&(fk(yd.splice(0,r),t=>t.handler()),du-=r),!du){ej();return}Yg.flush(),sC.flush(e?Math.min(64,fu-e):16.667),cC.flush(),uC.flush(),fC.flush()}function pp(){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,fk(r,i=>i(t)&&e.add(i)),du+=e.size,r=e)}}}function fk(e,r){e.forEach(t=>{try{r(t)}catch(i){Ft.catch(i)}})}var tj=Object.defineProperty,nj=(e,r)=>{for(var t in r)tj(e,t,{get:r[t],enumerable:!0})},Co={};nj(Co,{assign:()=>aj,colors:()=>hu,createStringInterpolator:()=>mC,skipAnimation:()=>hk,to:()=>dk,willAdvance:()=>gC});function pC(){}var rj=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),$e={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 ls(e,r){if($e.arr(e)){if(!$e.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 Gt=(e,r)=>e.forEach(r);function dl(e,r,t){if($e.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 Pi=e=>$e.und(e)?[]:$e.arr(e)?e:[e];function vp(e,r){if(e.size){const t=Array.from(e);e.clear(),Gt(t,r)}}var mp=(e,...r)=>vp(e,t=>t(...r)),vC=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),mC,dk,hu=null,hk=!1,gC=pC,aj=e=>{e.to&&(dk=e.to),e.now&&(Ft.now=e.now),e.colors!==void 0&&(hu=e.colors),e.skipAnimation!=null&&(hk=e.skipAnimation),e.createStringInterpolator&&(mC=e.createStringInterpolator),e.requestAnimationFrame&&Ft.use(e.requestAnimationFrame),e.batchedUpdates&&(Ft.batchedUpdates=e.batchedUpdates),e.willAdvance&&(gC=e.willAdvance),e.frameLoop&&(Ft.frameLoop=e.frameLoop)},gp=new Set,eo=[],yC=[],qg=0,Gg={get idle(){return!gp.size&&!eo.length},start(e){qg>e.priority?(gp.add(e),Ft.onStart(ij)):(pk(e),Ft(xC))},advance:xC,sort(e){if(qg)Ft.onFrame(()=>Gg.sort(e));else{const r=eo.indexOf(e);~r&&(eo.splice(r,1),vk(e))}},clear(){eo=[],gp.clear()}};function ij(){gp.forEach(pk),gp.clear(),Ft(xC)}function pk(e){eo.includes(e)||vk(e)}function vk(e){eo.splice(oj(eo,r=>r.priority>e.priority),0,e)}function xC(e){const r=yC;for(let t=0;t<eo.length;t++){const i=eo[t];qg=i.priority,i.idle||(gC(i),i.advance(e),i.idle||r.push(i))}return qg=0,yC=eo,yC.length=0,eo=r,eo.length>0}function oj(e,r){const t=e.findIndex(r);return t<0?e.length:t}var lj=(e,r,t)=>Math.min(Math.max(t,e),r),sj={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},wo="[-+]?\\d*\\.?\\d+",Kg=wo+"%";function Wg(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var uj=new RegExp("rgb"+Wg(wo,wo,wo)),cj=new RegExp("rgba"+Wg(wo,wo,wo,wo)),fj=new RegExp("hsl"+Wg(wo,Kg,Kg)),dj=new RegExp("hsla"+Wg(wo,Kg,Kg,wo)),hj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,pj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,vj=/^#([0-9a-fA-F]{6})$/,mj=/^#([0-9a-fA-F]{8})$/;function gj(e){let r;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(r=vj.exec(e))?parseInt(r[1]+"ff",16)>>>0:hu&&hu[e]!==void 0?hu[e]:(r=uj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|255)>>>0:(r=cj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|yk(r[4]))>>>0:(r=hj.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=mj.exec(e))?parseInt(r[1],16)>>>0:(r=pj.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=fj.exec(e))?(mk(gk(r[1]),Qg(r[2]),Qg(r[3]))|255)>>>0:(r=dj.exec(e))?(mk(gk(r[1]),Qg(r[2]),Qg(r[3]))|yk(r[4]))>>>0:null}function bC(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 mk(e,r,t){const i=t<.5?t*(1+r):t+r-t*r,l=2*t-i,f=bC(l,i,e+1/3),c=bC(l,i,e),p=bC(l,i,e-1/3);return Math.round(f*255)<<24|Math.round(c*255)<<16|Math.round(p*255)<<8}function xd(e){const r=parseInt(e,10);return r<0?0:r>255?255:r}function gk(e){return(parseFloat(e)%360+360)%360/360}function yk(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 xk(e){let r=gj(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 yp=(e,r,t)=>{if($e.fun(e))return e;if($e.arr(e))return yp({range:e,output:r,extrapolate:t});if($e.str(e.output[0]))return mC(e);const i=e,l=i.output,f=i.range||[0,1],c=i.extrapolateLeft||i.extrapolate||"extend",p=i.extrapolateRight||i.extrapolate||"extend",g=i.easing||(d=>d);return d=>{const m=xj(d,f);return yj(d,f[m],f[m+1],l[m],l[m+1],g,c,p,i.map)}};function yj(e,r,t,i,l,f,c,p,g){let d=g?g(e):e;if(d<r){if(c==="identity")return d;c==="clamp"&&(d=r)}if(d>t){if(p==="identity")return d;p==="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 xj(e,r){for(var t=1;t<r.length-1&&!(r[t]>=e);++t);return t-1}var bj=(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 lj(0,1,l/e)},Zg=1.70158,Xg=Zg*1.525,bk=Zg+1,Ck=2*Math.PI/3,wk=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,Cj={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=>bk*e*e*e-Zg*e*e,easeOutBack:e=>1+bk*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)*Ck),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Ck)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*wk))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*wk)/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:bj},xp=Symbol.for("FluidValue.get"),bd=Symbol.for("FluidValue.observers"),to=e=>Boolean(e&&e[xp]),si=e=>e&&e[xp]?e[xp]():e,_k=e=>e[bd]||null;function wj(e,r){e.eventObserved?e.eventObserved(r):e(r)}function bp(e,r){const t=e[bd];t&&t.forEach(i=>{wj(i,r)})}var Ek=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");_j(this,e)}},_j=(e,r)=>Sk(e,xp,r);function Cd(e,r){if(e[xp]){let t=e[bd];t||Sk(e,bd,t=new Set),t.has(r)||(t.add(r),e.observerAdded&&e.observerAdded(t.size,r))}return r}function Cp(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 Sk=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),ey=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ej=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Dk=new RegExp(`(${ey.source})(%|[a-z]+)`,"i"),Sj=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ty=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,kk=e=>{const[r,t]=Dj(e);if(!r||vC())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 kk(t);if(t)return t}return e},Dj=e=>{const r=ty.exec(e);if(!r)return[,];const[,t,i]=r;return[t,i]},CC,kj=(e,r,t,i,l)=>`rgba(${Math.round(r)}, ${Math.round(t)}, ${Math.round(i)}, ${l})`,Tk=e=>{CC||(CC=hu?new RegExp(`(${Object.keys(hu).join("|")})(?!\\w)`,"g"):/^\b$/);const r=e.output.map(f=>si(f).replace(ty,kk).replace(Ej,xk).replace(CC,xk)),t=r.map(f=>f.match(ey).map(Number)),l=t[0].map((f,c)=>t.map(p=>{if(!(c in p))throw Error('The arity of each "output" value must be equal');return p[c]})).map(f=>yp({...e,output:f}));return f=>{var g;const c=!Dk.test(r[0])&&((g=r.find(d=>Dk.test(d)))==null?void 0:g.replace(ey,""));let p=0;return r[0].replace(ey,()=>`${l[p++](f)}${c||""}`).replace(Sj,kj)}},wC="react-spring: ",Ak=e=>{const r=e;let t=!1;if(typeof r!="function")throw new TypeError(`${wC}once requires a function parameter`);return(...i)=>{t||(r(...i),t=!0)}},Tj=Ak(console.warn);function Aj(){Tj(`${wC}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Oj=Ak(console.warn);function Rj(){Oj(`${wC}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 $e.str(e)&&(e[0]=="#"||/\d/.test(e)||!vC()&&ty.test(e)||e in(hu||{}))}var _C=vC()?q.useEffect:q.useLayoutEffect,Fj=()=>{const e=q.useRef(!1);return _C(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ok(){const e=q.useState()[1],r=Fj();return()=>{r.current&&e(Math.random())}}function Nj(e,r){const[t]=q.useState(()=>({inputs:r,result:e()})),i=q.useRef(),l=i.current;let f=l;return f?Boolean(r&&f.inputs&&Mj(r,f.inputs))||(f={inputs:r,result:e()}):f=t,q.useEffect(()=>{i.current=f,l==t&&(t.inputs=t.result=void 0)},[f]),f.result}function Mj(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 Rk=e=>q.useEffect(e,Pj),Pj=[];function Fk(e){const r=q.useRef();return q.useEffect(()=>{r.current=e}),r.current}var wp=Symbol.for("Animated:node"),Bj=e=>!!e&&e[wp]===e,hl=e=>e&&e[wp],EC=(e,r)=>rj(e,wp,r),ry=e=>e&&e[wp]&&e[wp].getPayload(),Nk=class{constructor(){EC(this,this)}getPayload(){return this.payload||[]}},_p=class extends Nk{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,$e.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new _p(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,r){return $e.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,$e.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ep=class extends _p{constructor(e){super(0),this._string=null,this._toString=yp({output:[e,e]})}static create(e){return new Ep(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if($e.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=yp({output:[this.getValue(),e]})),this._value=0,super.reset()}},ay={dependencies:null},iy=class extends Nk{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const r={};return dl(this.source,(t,i)=>{Bj(t)?r[i]=t.getValue(e):to(t)?r[i]=si(t):e||(r[i]=t)}),r}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Gt(this.payload,e=>e.reset())}_makePayload(e){if(e){const r=new Set;return dl(e,this._addToPayload,r),Array.from(r)}}_addToPayload(e){ay.dependencies&&to(e)&&ay.dependencies.add(e);const r=ry(e);r&&Gt(r,t=>this.add(t))}},Mk=class extends iy{constructor(e){super(e)}static create(e){return new Mk(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(Lj)),!0)}};function Lj(e){return(ny(e)?Ep:_p).create(e)}function SC(e){const r=hl(e);return r?r.constructor:$e.arr(e)?Mk:ny(e)?Ep:_p}var Pk=(e,r)=>{const t=!$e.fun(e)||e.prototype&&e.prototype.isReactComponent;return q.forwardRef((i,l)=>{const f=q.useRef(null),c=t&&q.useCallback(E=>{f.current=jj(l,E)},[l]),[p,g]=Uj(i,r),d=Ok(),m=()=>{const E=f.current;if(t&&!E)return;(E?r.applyAnimatedValues(E,p.getValue(!0)):!1)===!1&&d()},C=new zj(m,g),b=q.useRef();_C(()=>(b.current=C,Gt(g,E=>Cd(E,C)),()=>{b.current&&(Gt(b.current.deps,E=>Cp(E,b.current)),Ft.cancel(b.current.update))})),q.useEffect(m,[]),Rk(()=>()=>{const E=b.current;Gt(E.deps,k=>Cp(k,E))});const x=r.getComponentProps(p.getValue());return Fe.createElement(e,{...x,ref:c})})},zj=class{constructor(e,r){this.update=e,this.deps=r}eventObserved(e){e.type=="change"&&Ft.write(this.update)}};function Uj(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 jj(e,r){return e&&($e.fun(e)?e(r):e.current=r),r}var Bk=Symbol.for("AnimatedComponent"),Ij=(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 p=Lk(c)||"Anonymous";return $e.str(c)?c=f[c]||(f[c]=Pk(c,l)):c=c[Bk]||(c[Bk]=Pk(c,l)),c.displayName=`Animated(${p})`,c};return dl(e,(c,p)=>{$e.arr(e)&&(p=Lk(c)),f[p]=f(c)}),{animated:f}},Lk=e=>$e.str(e)?e:e&&$e.str(e.displayName)?e.displayName:$e.fun(e)&&e.name||null;function Mc(e,...r){return $e.fun(e)?e(...r):e}var Sp=(e,r)=>e===!0||!!(r&&e&&($e.fun(e)?e(r):Pi(e).includes(r))),zk=(e,r)=>$e.obj(e)?r&&e[r]:e,Uk=(e,r)=>e.default===!0?e[r]:e.default?e.default[r]:void 0,Hj=e=>e,DC=(e,r=Hj)=>{let t=Vj;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);$e.und(f)||(i[l]=f)}return i},Vj=["config","onProps","onStart","onChange","onPause","onResume","onRest"],$j={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 Yj(e){const r={};let t=0;if(dl(e,(i,l)=>{$j[l]||(r[l]=i,t++)}),t)return r}function jk(e){const r=Yj(e);if(r){const t={to:r};return dl(e,(i,l)=>l in r||(t[l]=i)),t}return{...e}}function Dp(e){return e=si(e),$e.arr(e)?e.map(Dp):ny(e)?Co.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function qj(e){for(const r in e)return!0;return!1}function kC(e){return $e.fun(e)||$e.arr(e)&&$e.obj(e[0])}function Gj(e,r){var t;(t=e.ref)==null||t.delete(e),r==null||r.delete(e)}function Kj(e,r){var t;r&&e.ref!==r&&((t=e.ref)==null||t.delete(e),r.add(e),e.ref=r)}var Wj={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}},TC={...Wj.default,mass:1,damping:1,easing:Cj.linear,clamp:!1},Qj=class{constructor(){this.velocity=0,Object.assign(this,TC)}};function Zj(e,r,t){t&&(t={...t},Ik(t,r),r={...t,...r}),Ik(e,r),Object.assign(e,r);for(const c in TC)e[c]==null&&(e[c]=TC[c]);let{frequency:i,damping:l}=e;const{mass:f}=e;return $e.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 Ik(e,r){if(!$e.und(r.decay))e.duration=void 0;else{const t=!$e.und(r.tension)||!$e.und(r.friction);(t||!$e.und(r.frequency)||!$e.und(r.damping)||!$e.und(r.mass))&&(e.duration=void 0,e.decay=void 0),t&&(e.frequency=void 0)}}var Hk=[],Xj=class{constructor(){this.changed=!1,this.values=Hk,this.toValues=null,this.fromValues=Hk,this.config=new Qj,this.immediate=!1}};function Vk(e,{key:r,props:t,defaultProps:i,state:l,actions:f}){return new Promise((c,p)=>{let g,d,m=Sp(t.cancel??(i==null?void 0:i.cancel),r);if(m)x();else{$e.und(t.pause)||(l.paused=Sp(t.pause,r));let E=i==null?void 0:i.pause;E!==!0&&(E=l.paused||Sp(E,r)),g=Mc(t.delay||0,r),E?(l.resumeQueue.add(b),f.pause()):(f.resume(),b())}function C(){l.resumeQueue.add(b),l.timeouts.delete(d),d.cancel(),g=d.time-Ft.now()}function b(){g>0&&!Co.skipAnimation?(l.delayed=!0,d=Ft.setTimeout(x,g),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)&&(m=!0);try{f.start({...t,callId:e,cancel:m},c)}catch(E){p(E)}}})}var AC=(e,r)=>r.length==1?r[0]:r.some(t=>t.cancelled)?wd(e.get()):r.every(t=>t.noop)?$k(e.get()):_o(e.get(),r.every(t=>t.finished)),$k=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),_o=(e,r,t=!1)=>({value:e,finished:r,cancelled:t}),wd=e=>({value:e,cancelled:!0,finished:!1});function Yk(e,r,t,i){const{callId:l,parentId:f,onRest:c}=r,{asyncTo:p,promise:g}=t;return!f&&e===p&&!r.reset?g:t.promise=(async()=>{t.asyncId=l,t.asyncTo=e;const d=DC(r,(D,T)=>T==="onRest"?void 0:D);let m,C;const b=new Promise((D,T)=>(m=D,C=T)),x=D=>{const T=l<=(t.cancelId||0)&&wd(i)||l!==t.asyncId&&_o(i,!1);if(T)throw D.result=T,C(D),D},E=(D,T)=>{const A=new qk,S=new Gk;return(async()=>{if(Co.skipAnimation)throw kp(t),S.result=_o(i,!1),C(S),S;x(A);const O=$e.obj(D)?{...D}:{...T,to:D};O.parentId=l,dl(d,(z,N)=>{$e.und(O[N])&&(O[N]=z)});const P=await i.start(O);return x(A),t.paused&&await new Promise(z=>{t.resumeQueue.add(z)}),P})()};let k;if(Co.skipAnimation)return kp(t),_o(i,!1);try{let D;$e.arr(e)?D=(async T=>{for(const A of T)await E(A)})(e):D=Promise.resolve(e(E,i.stop.bind(i))),await Promise.all([D.then(m),b]),k=_o(i.get(),!0,!1)}catch(D){if(D instanceof qk)k=D.result;else if(D instanceof Gk)k=D.result;else throw D}finally{l==t.asyncId&&(t.asyncId=f,t.asyncTo=f?p:void 0,t.promise=f?g:void 0)}return $e.fun(c)&&Ft.batchedUpdates(()=>{c(k,i,i.item)}),k})()}function kp(e,r){vp(e.timeouts,t=>t.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,r&&(e.cancelId=r)}var qk=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.")}},Gk=class extends Error{constructor(){super("SkipAnimationSignal")}},OC=e=>e instanceof RC,Jj=1,RC=class extends Ek{constructor(){super(...arguments),this.id=Jj++,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 Co.to(this,e)}interpolate(...e){return Aj(),Co.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){bp(this,{type:"change",parent:this,value:e,idle:r})}_onPriorityChange(e){this.idle||Gg.sort(this),bp(this,{type:"priority",parent:this,priority:e})}},Pc=Symbol.for("SpringPhase"),Kk=1,FC=2,NC=4,MC=e=>(e[Pc]&Kk)>0,pu=e=>(e[Pc]&FC)>0,Tp=e=>(e[Pc]&NC)>0,Wk=(e,r)=>r?e[Pc]|=FC|Kk:e[Pc]&=~FC,Qk=(e,r)=>r?e[Pc]|=NC:e[Pc]&=~NC,eI=class extends RC{constructor(e,r){if(super(),this.animation=new Xj,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,!$e.und(e)||!$e.und(r)){const t=$e.obj(e)?{...e}:{...r,from:e};$e.und(t.default)&&(t.default=!0),this.start(t)}}get idle(){return!(pu(this)||this._state.asyncTo)||Tp(this)}get goal(){return si(this.animation.to)}get velocity(){const e=hl(this);return e instanceof _p?e.lastVelocity||0:e.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return MC(this)}get isAnimating(){return pu(this)}get isPaused(){return Tp(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&&to(i.to)&&(l=Pi(si(i.to))),i.values.forEach((d,m)=>{if(d.done)return;const C=d.constructor==Ep?1:c?c[m].lastPosition:l[m];let b=i.immediate,x=C;if(!b){if(x=d.lastPosition,f.tension<=0){d.done=!0;return}let E=d.elapsedTime+=e;const k=i.fromValues[m],D=d.v0!=null?d.v0:d.v0=$e.arr(f.velocity)?f.velocity[m]:f.velocity;let T;const A=f.precision||(k==C?.005:Math.min(1,Math.abs(C-k)*.001));if($e.und(f.duration))if(f.decay){const S=f.decay===!0?.998:f.decay,O=Math.exp(-(1-S)*E);x=k+D/(1-S)*(1-O),b=Math.abs(d.lastPosition-x)<=A,T=D*O}else{T=d.lastVelocity==null?D:d.lastVelocity;const S=f.restVelocity||A/10,O=f.clamp?0:f.bounce,P=!$e.und(O),z=k==C?d.v0>0:k<C;let N,U=!1;const $=1,F=Math.ceil(e/$);for(let L=0;L<F&&(N=Math.abs(T)>S,!(!N&&(b=Math.abs(C-x)<=A,b)));++L){P&&(U=x==C||x>C==z,U&&(T=-T*O,x=C));const I=-f.tension*1e-6*(x-C),H=-f.friction*.001*T,W=(I+H)/f.mass;T=T+W*$,x=x+T*$}}else{let S=1;f.duration>0&&(this._memoizedDuration!==f.duration&&(this._memoizedDuration=f.duration,d.durationProgress>0&&(d.elapsedTime=f.duration*d.durationProgress,E=d.elapsedTime+=e)),S=(f.progress||0)+E/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),x=k+f.easing(S)*(C-k),T=(x-d.lastPosition)/e,b=S==1}d.lastVelocity=T,Number.isNaN(x)&&(b=!0)}c&&!c[m].done&&(b=!1),b?d.done=!0:r=!1,d.setValue(x,f.round)&&(t=!0)});const p=hl(this),g=p.getValue();if(r){const d=si(i.to);(g!==d||t)&&!f.decay?(p.setValue(d),this._onChange(d)):t&&f.decay&&this._onChange(g),this._stop()}else t&&this._onChange(g)}set(e){return Ft.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(pu(this)){const{to:e,config:r}=this.animation;Ft.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 $e.und(e)?(t=this.queue||[],this.queue=[]):t=[$e.obj(e)?e:{...r,to:e}],Promise.all(t.map(i=>this._update(i))).then(i=>AC(this,i))}stop(e){const{to:r}=this.animation;return this._focus(this.get()),kp(this._state,e&&this._lastCallId),Ft.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=$e.obj(t)?t[r]:t,(t==null||kC(t))&&(t=void 0),i=$e.obj(i)?i[r]:i,i==null&&(i=void 0);const l={to:t,from:i};return MC(this)||(e.reverse&&([t,i]=[i,t]),i=si(i),$e.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,DC(e,(c,p)=>/^on/.test(p)?zk(c,t):c)),Jk(this,e,"onProps"),Rp(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 Vk(++this._lastCallId,{key:t,props:e,defaultProps:i,state:f,actions:{pause:()=>{Tp(this)||(Qk(this,!0),mp(f.pauseQueue),Rp(this,"onPause",_o(this,Ap(this,this.animation.to)),this))},resume:()=>{Tp(this)&&(Qk(this,!1),pu(this)&&this._resume(),mp(f.resumeQueue),Rp(this,"onResume",_o(this,Ap(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then(c=>{if(e.loop&&c.finished&&!(r&&c.noop)){const p=Zk(e);if(p)return this._update(p,!0)}return c})}_merge(e,r,t){if(r.cancel)return this.stop(!0),t(wd(this));const i=!$e.und(e.to),l=!$e.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:p}=this,{to:g,from:d}=p;let{to:m=g,from:C=d}=e;l&&!i&&(!r.default||$e.und(m))&&(m=C),r.reverse&&([m,C]=[C,m]);const b=!ls(C,d);b&&(p.from=C),C=si(C);const x=!ls(m,g);x&&this._focus(m);const E=kC(r.to),{config:k}=p,{decay:D,velocity:T}=k;(i||l)&&(k.velocity=0),r.config&&!E&&Zj(k,Mc(r.config,f),r.config!==c.config?Mc(c.config,f):void 0);let A=hl(this);if(!A||$e.und(m))return t(_o(this,!0));const S=$e.und(r.reset)?l&&!r.default:!$e.und(C)&&Sp(r.reset,f),O=S?C:this.get(),P=Dp(m),z=$e.num(P)||$e.arr(P)||ny(P),N=!E&&(!z||Sp(c.immediate||r.immediate,f));if(x){const L=SC(m);if(L!==A.constructor)if(N)A=this._set(P);else throw Error(`Cannot animate between ${A.constructor.name} and ${L.name}, as the "to" prop suggests`)}const U=A.constructor;let $=to(m),F=!1;if(!$){const L=S||!MC(this)&&b;(x||L)&&(F=ls(Dp(O),P),$=!F),(!ls(p.immediate,N)&&!N||!ls(k.decay,D)||!ls(k.velocity,T))&&($=!0)}if(F&&pu(this)&&(p.changed&&!S?$=!0:$||this._stop(g)),!E&&(($||to(g))&&(p.values=A.getPayload(),p.toValues=to(m)?null:U==Ep?[1]:Pi(P)),p.immediate!=N&&(p.immediate=N,!N&&!S&&this._set(g)),$)){const{onRest:L}=p;Gt(nI,H=>Jk(this,r,H));const I=_o(this,Ap(this,g));mp(this._pendingCalls,I),this._pendingCalls.add(t),p.changed&&Ft.batchedUpdates(()=>{var H;p.changed=!S,L==null||L(I,this),S?Mc(c.onRest,I):(H=p.onStart)==null||H.call(p,I,this)})}S&&this._set(O),E?t(Yk(r.to,r,this._state,this)):$?this._start():pu(this)&&!x?this._pendingCalls.add(t):t($k(O))}_focus(e){const r=this.animation;e!==r.to&&(_k(this)&&this._detach(),r.to=e,_k(this)&&this._attach())}_attach(){let e=0;const{to:r}=this.animation;to(r)&&(Cd(r,this),OC(r)&&(e=r.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;to(e)&&Cp(e,this)}_set(e,r=!0){const t=si(e);if(!$e.und(t)){const i=hl(this);if(!i||!ls(t,i.getValue())){const l=SC(t);!i||i.constructor!=l?EC(this,l.create(t)):i.setValue(t),i&&Ft.batchedUpdates(()=>{this._onChange(t,r)})}}return hl(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Rp(this,"onStart",_o(this,Ap(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(si(e.to)),e.immediate||(e.fromValues=e.values.map(r=>r.lastPosition)),pu(this)||(Wk(this,!0),Tp(this)||this._resume())}_resume(){Co.skipAnimation?this.finish():Gg.start(this)}_stop(e,r){if(pu(this)){Wk(this,!1);const t=this.animation;Gt(t.values,l=>{l.done=!0}),t.toValues&&(t.onChange=t.onPause=t.onResume=void 0),bp(this,{type:"idle",parent:this});const i=r?wd(this.get()):_o(this.get(),Ap(this,e??t.to));mp(this._pendingCalls,i),t.changed&&(t.changed=!1,Rp(this,"onRest",i,this))}}};function Ap(e,r){const t=Dp(r),i=Dp(e.get());return ls(i,t)}function Zk(e,r=e.loop,t=e.to){const i=Mc(r);if(i){const l=i!==!0&&jk(i),f=(l||e).reverse,c=!l||l.reset;return Op({...e,loop:r,default:!1,pause:void 0,to:!f||kC(t)?t:void 0,from:c?e.from:void 0,reset:c,...l})}}function Op(e){const{to:r,from:t}=e=jk(e),i=new Set;return $e.obj(r)&&Xk(r,i),$e.obj(t)&&Xk(t,i),e.keys=i.size?Array.from(i):null,e}function tI(e){const r=Op(e);return $e.und(r.default)&&(r.default=DC(r)),r}function Xk(e,r){dl(e,(t,i)=>t!=null&&r.add(i))}var nI=["onStart","onRest","onChange","onPause","onResume"];function Jk(e,r,t){e.animation[t]=r[t]!==Uk(r,t)?zk(r[t],e.key):void 0}function Rp(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 rI=["onStart","onChange","onRest"],aI=1,iI=class{constructor(e,r){this.id=aI++,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];$e.und(t)||this.springs[r].set(t)}}update(e){return e&&this.queue.push(Op(e)),this}start(e){let{queue:r}=this;return e?r=Pi(e).map(Op):this.queue=[],this._flush?this._flush(this,r):(iT(this,r),PC(this,r))}stop(e,r){if(e!==!!e&&(r=e),r){const t=this.springs;Gt(Pi(r),i=>t[i].stop(!!e))}else kp(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if($e.und(e))this.start({pause:!0});else{const r=this.springs;Gt(Pi(e),t=>r[t].pause())}return this}resume(e){if($e.und(e))this.start({pause:!1});else{const r=this.springs;Gt(Pi(e),t=>r[t].resume())}return this}each(e){dl(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,vp(e,([p,g])=>{g.value=this.get(),p(g,this,this._item)}));const f=!i&&this._started,c=l||f&&t.size?this.get():null;l&&r.size&&vp(r,([p,g])=>{g.value=c,p(g,this,this._item)}),f&&(this._started=!1,vp(t,([p,g])=>{g.value=c,p(g,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;Ft.onFrame(this._onFrame)}};function PC(e,r){return Promise.all(r.map(t=>eT(e,t))).then(t=>AC(e,t))}async function eT(e,r,t){const{keys:i,to:l,from:f,loop:c,onRest:p,onResolve:g}=r,d=$e.obj(r.default)&&r.default;c&&(r.loop=!1),l===!1&&(r.to=null),f===!1&&(r.from=null);const m=$e.arr(l)||$e.fun(l)?l:void 0;m?(r.to=void 0,r.onRest=void 0,d&&(d.onRest=void 0)):Gt(rI,k=>{const D=r[k];if($e.fun(D)){const T=e._events[k];r[k]=({finished:A,cancelled:S})=>{const O=T.get(D);O?(A||(O.finished=!1),S&&(O.cancelled=!0)):T.set(D,{value:null,finished:A||!1,cancelled:S||!1})},d&&(d[k]=r[k])}});const C=e._state;r.pause===!C.paused?(C.paused=r.pause,mp(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||Uk(r,"cancel")===!0;(m||x&&C.asyncId)&&b.push(Vk(++e._lastAsyncId,{props:r,state:C,actions:{pause:pC,resume:pC,start(k,D){x?(kp(C,e._lastAsyncId),D(wd(e))):(k.onRest=p,D(Yk(m,k,C,e)))}}})),C.paused&&await new Promise(k=>{C.resumeQueue.add(k)});const E=AC(e,await Promise.all(b));if(c&&E.finished&&!(t&&E.noop)){const k=Zk(r,c,l);if(k)return iT(e,[k]),eT(e,k,!0)}return g&&Ft.batchedUpdates(()=>g(E,e,e.item)),E}function tT(e,r){const t={...e.springs};return r&&Gt(Pi(r),i=>{$e.und(i.keys)&&(i=Op(i)),$e.obj(i.to)||(i={...i,to:void 0}),aT(t,i,l=>rT(l))}),nT(e,t),t}function nT(e,r){dl(r,(t,i)=>{e.springs[i]||(e.springs[i]=t,Cd(t,e))})}function rT(e,r){const t=new eI;return t.key=e,r&&Cd(t,r),t}function aT(e,r,t){r.keys&&Gt(r.keys,i=>{(e[i]||(e[i]=t(i)))._prepareNode(r)})}function iT(e,r){Gt(r,t=>{aT(e.springs,t,i=>rT(i,e))})}var oy=({children:e,...r})=>{const t=q.useContext(ly),i=r.pause||!!t.pause,l=r.immediate||!!t.immediate;r=Nj(()=>({pause:i,immediate:l}),[i,l]);const{Provider:f}=ly;return Fe.createElement(f,{value:r},e)},ly=oI(oy,{});oy.Provider=ly.Provider,oy.Consumer=ly.Consumer;function oI(e,r){return Object.assign(e,Fe.createContext(r)),e.Provider._context=e,e.Consumer._context=e,e}var lI=()=>{const e=[],r=function(i){Rj();const l=[];return Gt(e,(f,c)=>{if($e.und(i))l.push(f.start());else{const p=t(i,f,c);p&&l.push(f.start(p))}}),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 Gt(e,i=>i.pause(...arguments)),this},r.resume=function(){return Gt(e,i=>i.resume(...arguments)),this},r.set=function(i){Gt(e,(l,f)=>{const c=$e.fun(i)?i(f,l):i;c&&l.set(c)})},r.start=function(i){const l=[];return Gt(e,(f,c)=>{if($e.und(i))l.push(f.start());else{const p=this._getProps(i,f,c);p&&l.push(f.start(p))}}),l},r.stop=function(){return Gt(e,i=>i.stop(...arguments)),this},r.update=function(i){return Gt(e,(l,f)=>l.update(this._getProps(i,l,f))),this};const t=function(i,l,f){return $e.fun(i)?i(f,l):i};return r._getProps=t,r};function sI(e,r,t){const i=$e.fun(r)&&r;i&&!t&&(t=[]);const l=q.useMemo(()=>i||arguments.length==3?lI():void 0,[]),f=q.useRef(0),c=Ok(),p=q.useMemo(()=>({ctrls:[],queue:[],flush(T,A){const S=tT(T,A);return f.current>0&&!p.queue.length&&!Object.keys(S).some(P=>!T.springs[P])?PC(T,A):new Promise(P=>{nT(T,S),p.queue.push(()=>{P(PC(T,A))}),c()})}}),[]),g=q.useRef([...p.ctrls]),d=[],m=Fk(e)||0;q.useMemo(()=>{Gt(g.current.slice(e,m),T=>{Gj(T,l),T.stop(!0)}),g.current.length=e,C(m,e)},[e]),q.useMemo(()=>{C(0,Math.min(m,e))},t);function C(T,A){for(let S=T;S<A;S++){const O=g.current[S]||(g.current[S]=new iI(null,p.flush)),P=i?i(S,O):r[S];P&&(d[S]=tI(P))}}const b=g.current.map((T,A)=>tT(T,d[A])),x=q.useContext(oy),E=Fk(x),k=x!==E&&qj(x);_C(()=>{f.current++,p.ctrls=g.current;const{queue:T}=p;T.length&&(p.queue=[],Gt(T,A=>A())),Gt(g.current,(A,S)=>{l==null||l.add(A),k&&A.start({default:x});const O=d[S];O&&(Kj(A,O.ref),A.ref?A.queue.push(O):A.start(O))})}),Rk(()=>()=>{Gt(p.ctrls,T=>T.stop(!0))});const D=b.map(T=>({...T}));return l?[D,l]:D}function uI(e,r){const t=$e.fun(e),[[i],l]=sI(1,t?e:[e],t?r||[]:r);return t||arguments.length==2?[i,l]:i}var cI=class extends RC{constructor(e,r){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=yp(...r);const t=this._get(),i=SC(t);EC(this,i.create(t))}advance(e){const r=this._get(),t=this.get();ls(r,t)||(hl(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&oT(this._active)&&BC(this)}_get(){const e=$e.arr(this.source)?this.source.map(si):Pi(si(this.source));return this.calc(...e)}_start(){this.idle&&!oT(this._active)&&(this.idle=!1,Gt(ry(this),e=>{e.done=!1}),Co.skipAnimation?(Ft.batchedUpdates(()=>this.advance()),BC(this)):Gg.start(this))}_attach(){let e=1;Gt(Pi(this.source),r=>{to(r)&&Cd(r,this),OC(r)&&(r.idle||this._active.add(r),e=Math.max(e,r.priority+1))}),this.priority=e,this._start()}_detach(){Gt(Pi(this.source),e=>{to(e)&&Cp(e,this)}),this._active.clear(),BC(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=Pi(this.source).reduce((r,t)=>Math.max(r,(OC(t)?t.priority:0)+1),0))}};function fI(e){return e.idle!==!1}function oT(e){return!e.size||Array.from(e).every(fI)}function BC(e){e.idle||(e.idle=!0,Gt(ry(e),r=>{r.done=!0}),bp(e,{type:"idle",parent:e}))}Co.assign({createStringInterpolator:Tk,to:(e,r)=>new cI(e,r)});var lT=/^--/;function dI(e,r){return r==null||typeof r=="boolean"||r===""?"":typeof r=="number"&&r!==0&&!lT.test(e)&&!(Fp.hasOwnProperty(e)&&Fp[e])?r+"px":(""+r).trim()}var sT={};function hI(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:p,viewBox:g,...d}=r,m=Object.values(d),C=Object.keys(d).map(b=>t||e.hasAttribute(b)?b:sT[b]||(sT[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=dI(b,l[b]);lT.test(b)?e.style.setProperty(b,x):e.style[b]=x}C.forEach((b,x)=>{e.setAttribute(b,m[x])}),i!==void 0&&(e.className=i),c!==void 0&&(e.scrollTop=c),p!==void 0&&(e.scrollLeft=p),g!==void 0&&e.setAttribute("viewBox",g)}var Fp={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},pI=(e,r)=>e+r.charAt(0).toUpperCase()+r.substring(1),vI=["Webkit","Ms","Moz","O"];Fp=Object.keys(Fp).reduce((e,r)=>(vI.forEach(t=>e[pI(t,r)]=e[r]),e),Fp);var mI=/^(matrix|translate|scale|rotate|skew)/,gI=/^(translate)/,yI=/^(rotate|skew)/,LC=(e,r)=>$e.num(e)&&e!==0?e+r:e,sy=(e,r)=>$e.arr(e)?e.every(t=>sy(t,r)):$e.num(e)?e===r:parseFloat(e)===r,xI=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(p=>LC(p,"px")).join(",")})`,sy(c,0)])),dl(i,(c,p)=>{if(p==="transform")l.push([c||""]),f.push(g=>[g,g===""]);else if(mI.test(p)){if(delete i[p],$e.und(c))return;const g=gI.test(p)?"px":yI.test(p)?"deg":"";l.push(Pi(c)),f.push(p==="rotate3d"?([d,m,C,b])=>[`rotate3d(${d},${m},${C},${LC(b,g)})`,sy(b,0)]:d=>[`${p}(${d.map(m=>LC(m,g)).join(",")})`,sy(d,p.startsWith("scale")?1:0)])}}),l.length&&(i.transform=new bI(l,f)),super(i)}},bI=class extends Ek{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 Gt(this.inputs,(t,i)=>{const l=si(t[0]),[f,c]=this.transforms[i]($e.arr(l)?l:t.map(si));e+=" "+f,r=r&&c}),r?"none":e}observerAdded(e){e==1&&Gt(this.inputs,r=>Gt(r,t=>to(t)&&Cd(t,this)))}observerRemoved(e){e==0&&Gt(this.inputs,r=>Gt(r,t=>to(t)&&Cp(t,this)))}eventObserved(e){e.type=="change"&&(this._value=null),bp(this,e)}},CI=["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"];Co.assign({batchedUpdates:eu.exports.unstable_batchedUpdates,createStringInterpolator:Tk,colors:sj});var wI=Ij(CI,{applyAnimatedValues:hI,createAnimatedStyle:e=>new xI(e),getComponentProps:({scrollTop:e,scrollLeft:r,...t})=>t}),uT=wI.animated;function cT(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[fT]=xn("indicator"),_I=q.memo(e=>{var{vertical:r}=e,t=Va(e,["vertical"]);const i=[];for(let l=0;l<t.total;l++)i.push(Q("div",{className:Oe(fT("dot",{active:t.current===l}))},l));return Q("div",Object.assign({className:Oe(t.className,fT({vertical:r})),style:t.style},{children:i}))});let Np=0;function zC(e){e?(Np||document.body.classList.add("rv-toast--unclickable"),Np+=1):Np&&(Np-=1,Np||document.body.classList.remove("rv-toast--unclickable"))}function EI(e){return e===window}const dT=e=>{const r=e;if(EI(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 SI(e,r,t){let i,l,f,c,p,g,d=0,m=!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)&&(m=!!t.leading,C="maxWait"in t,f=C?Math.max(+t.maxWait||0,r):f,b="trailing"in t?!!t.trailing:b);function E(F){const L=i,I=l;return i=l=void 0,d=F,c=e.apply(I,L),c}function k(F,L){return x?(fd.cancelAnimationFrame(p),fd.requestAnimationFrame(F)):setTimeout(()=>F(),L)}function D(F){if(x)return fd.cancelAnimationFrame(F);clearTimeout(F)}function T(F){return d=F,p=k(O,r),m?E(F):c}function A(F){const L=F-g,I=F-d,H=r-L;return C?Math.min(H,f-I):H}function S(F){const L=F-g,I=F-d;return g===void 0||L>=r||L<0||C&&I>=f}function O(){const F=Date.now();if(S(F))return P(F);p=k(O,A(F))}function P(F){return p=void 0,b&&i?E(F):(i=l=void 0,c)}function z(){p!==void 0&&D(p),d=0,i=g=l=p=void 0}function N(){return p===void 0?c:P(Date.now())}function U(){return p!==void 0}function $(...F){const L=Date.now(),I=S(L);if(i=F,l=this,g=L,I){if(p===void 0)return T(g);if(C)return p=k(O,r),E(g)}return p===void 0&&(p=k(O,r)),c}return $.cancel=z,$.flush=N,$.pending=U,$}const XZ="",[uy]=xn("toast"),DI=e=>{const r=Jr(e,{type:"info",duration:2e3,position:"middle",transition:"rv-fade",loadingType:"circular",overlay:!1}),t=()=>{r.closeOnClick&&r.onClose()};q.useEffect(()=>{if(!r.visible){zC(!1);return}let f=!1;const c=r.visible&&r.forbidClick;f!==c&&(f=c,zC(f))},[r.visible,r.forbidClick]);const i=()=>{const{icon:f,type:c,iconSize:p,loadingType:g}=r;if(f||c==="success"||c==="fail"){const m=c==="fail"?Q(Z2,{}):Q(SD,{});return q.cloneElement(f||m,{className:Oe(uy("icon")),fontSize:p})}return c==="loading"?Q(Q2,{className:Oe(uy("loading")),type:g}):null},l=()=>{const{message:f}=r;return Xr(f)&&f!==""?Q("div",Object.assign({className:Oe(uy("info"))},{children:f})):null};return Me(sp,Object.assign({className:Oe([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()]}))},UC={message:"",className:"",type:"info",position:"middle",forbidClick:!1,duration:2e3,teleport:()=>document.body},jC=[];let hT=!1,IC=Jh({},UC);const cy=new Map;function pT(){let e=jC.pop();for(;e;)e(),e=jC.pop()}function kI(){setTimeout(pT)}const Bc=e=>{if(!Bg())return null;const r=vT(e),t={config:()=>{},clear:()=>null};let i=0;const{onClose:l,teleport:f}=r,c=document.createElement("div");return nC(f).appendChild(c),ID(Q(()=>{const d=Object.assign({duration:2e3},r),[m,C]=q.useState(!1),[b,x]=q.useState(Object.assign({},d)),E=q.useCallback(()=>{b.forbidClick&&zC(!1),C(!1),window.setTimeout(()=>{HD(c)&&c.parentNode&&c.parentNode.removeChild(c)},+b.duration||+UC.duration)},[c]),k=q.useCallback(()=>{C(!1),l&&l()},[]);return t.clear=E,t.config=q.useCallback(D=>{x(T=>typeof D=="function"?Object.assign(Object.assign({},T),D(T)):Object.assign(Object.assign({},T),D))},[x]),q.useEffect(()=>(C(!0),hT||pT(),jC.push(E),b.duration!==0&&"duration"in b&&(i=window.setTimeout(k,+b.duration)),()=>{i!==0&&window.clearTimeout(i)}),[]),Q(DI,Object.assign({},b,{visible:m,teleport:()=>c,onClose:k,onClosed:E}))},{}),c),t};function vT(e){return cd(e)?e:{message:e}}const TI=e=>r=>Bc(Object.assign(Object.assign(Object.assign(Object.assign({},IC),cy.get(e)),vT(r)),{type:e}));["info","loading","success","fail"].forEach(e=>{Bc[e]=TI(e)}),Bc.allowMultiple=(e=!0)=>{hT=e},Bc.clear=kI;function AI(e,r){typeof e=="string"?cy.set(e,r):Jh(IC,e)}Bc.setDefaultOptions=AI,Bc.resetDefaultOptions=e=>{typeof e=="string"?cy.delete(e):(IC=Jh({},UC),cy.clear())};const mT=Bc;function fy(){const e=q.useRef([]),r=q.useCallback(i=>l=>{l&&(e.current[i]=l)},[]),t=q.useCallback(()=>{e.current=[]},[]);return[e.current,r,t]}const gT=e=>{const{defaultValue:r,value:t}=e||{},[i,l]=q.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(p){l(p)}return[f,c]},nX="",[OI]=xn("swiper-item"),yT=q.forwardRef((e,r)=>{const t=q.useRef(null);q.useImperativeHandle(r,()=>({self:t.current}));const[i]=QL(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:Oe(e.className,OI({hidden:e.autoHeight&&i===!1})),onClick:e.onClick,style:e.style},{children:e.children}))}),[Lc]=xn("swiper"),RI=q.forwardRef((e,r)=>{const t=Jr(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:p}=t,g=f?"y":"x",d=t.slideSize/100,m=t.trackOffset/100,{validChildren:C,count:b}=q.useMemo(()=>{let te=0;return{validChildren:q.Children.map(t.children,V=>q.isValidElement(V)?V.type!==yT?null:(te++,V):null),count:te}},[t.children]),x=q.useRef(null),[E,k]=fy(),[D,T]=q.useState(()=>t.enabled),[A,S]=q.useState(t.initialSwipe),[O,P,z]=K2(!1),N=q.useMemo(()=>Object.assign({["--rv-swipe-slide-size"]:`${t.slideSize}%`,["--rv-swipe-track-offset"]:`${t.trackOffset}%`},t.style),[t.slideSize,t.trackOffset,t.style]),U=q.useMemo(()=>d*(b-1)<1?!1:i,[b,i,d]),$=()=>{const te=x.current;return te?(f?te.offsetHeight:te.offsetWidth)*t.slideSize/100:0},F=te=>{let G=0,V=b-1;return t.stuckAtBoundary&&(G+=(1-d-m)/d,V-=(1-d-m)/d),cT(te,G,V)},[{position:L},I]=uI(()=>({position:F(A)*100,config:{tension:200,friction:30,duration:c},onRest:()=>{if(z.current||!U)return;const te=L.get(),G=100*b,V=HC(te,G);V!==te&&I.start({position:V,immediate:!0})}}),[b]),H=JU(te=>{var G;const V=$();if(!V||!t.preventScroll&&xT(te.target,(G=E[A])===null||G===void 0?void 0:G.self))return;const ee=f?1:0,ie=te.offset[ee],ae=te.direction[ee],pe=te.velocity[ee];if(P(!0),!te.last)I.start({position:ie*100/V,immediate:!0});else{const xe=Math.round((ie+Math.min(pe*2e3,V)*ae)/V);Z(xe),window.setTimeout(()=>{P(!1)})}},{enabled:D,transform:([te,G])=>[-te,-G],from:()=>{const te=$();return[L.get()/100*te,L.get()/100*te]},bounds:()=>{if(U)return{};const te=$(),G=F(0)*te,V=F(b-1)*te;return f?{top:G,bottom:V}:{left:G,right:V}},rubberband:t.rubberband,axis:g,preventScroll:g==="x"?t.preventScroll:!1,pointer:{touch:!0}}),W=()=>t.indicator===void 0||t.indicator===!0?Q("div",Object.assign({className:Oe(Lc("indicator",{vertical:f}))},{children:Q(_I,Object.assign({},t.indicatorProps,{vertical:f,total:b,current:A}))})):typeof t.indicator=="function"?t.indicator(b,A):null;function Z(te,G=!1){const V=Math.round(te),ee=U?HC(V,b):cT(V,0,b-1);S(ee),I.start({position:(U?V:F(V))*100,immediate:G})}const X=()=>{Z(Math.round(L.get()/100)+1)},re=()=>{Z(Math.round(L.get()/100)-1)};q.useImperativeHandle(r,()=>({activeIndex:A,swipeTo:Z,swipeNext:X,swipePrev:re,enable:()=>{T(!0)},disable:()=>{T(!1)}})),tp(()=>{const te=C.length-1;A>te&&Z(te,!0)}),Rc(()=>{var te;(te=t.onChange)===null||te===void 0||te.call(t,A)},[A]),q.useEffect(()=>{if(!l||O)return Ni;const te=typeof l=="boolean"?5e3:l,G=window.setInterval(()=>{X()},te);return()=>{window.clearInterval(G)}},[l,O]);const K=()=>U?Q("div",Object.assign({className:Oe(Lc("track-inner",{vertical:f}))},{children:q.Children.map(C,(te,G)=>Q(uT.div,Object.assign({className:Oe(Lc("slide")),style:{[g]:L.to(V=>{let ee=-V+G*100;const ie=b*100,ae=ie/2;return ee=HC(ee+ae,ie)-ae,`${ee}%`}),[f?"top":"left"]:`-${G*100}%`}},{children:q.cloneElement(te,{ref:k(G),autoHeight:p,trackRef:x})})))})):Q(uT.div,Object.assign({className:Oe(Lc("track-inner")),style:{[g]:L.to(te=>`${-te}%`)}},{children:q.Children.map(C,(te,G)=>Q("div",Object.assign({className:Oe(Lc("slide"))},{children:q.cloneElement(te,{ref:k(G),autoHeight:p})})))}));return b===0&&void 0,Me("div",Object.assign({className:Oe(t.className,Lc({vertical:f})),style:N},{children:[Q("div",Object.assign({ref:x,className:Oe(Lc("track",{"allow-touch-move":t.touchable})),onClickCapture:te=>{z.current&&te.stopPropagation()}},t.touchable?H():{},{children:K()})),W()]}))});function HC(e,r){const t=e%r;return t<0?t+r:t}function xT(e,r){return r?e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?!0:e.parentElement&&e.parentElement!==r?xT(e.parentElement,r):!1:!1}const bT=Object.assign(RI,{Item:yT}),FI=e=>{const r=Jr(e,{shape:"round",bindGroup:!0}),t=q.useRef(null),i=m=>r.parent&&r.bindGroup?r.parent.props[m]:null,l=q.useMemo(()=>i("disabled")||r.disabled,[r.parent,r.disabled]),f=q.useMemo(()=>i("direction")||null,[r.parent]),c=q.useMemo(()=>{const m=r.checkedColor||i("checkedColor");return m&&r.checked&&!l?{borderColor:m,backgroundColor:m}:{}},[r.checkedColor,r.checked,l]),p=m=>{const{target:C}=m,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(m)},g=()=>{const{bem:m,shape:C,checked:b}=r,x=r.iconSize||i("iconSize");return Q("div",Object.assign({ref:t,className:Oe(m("icon",[C,{disabled:l,checked:b}])),style:{fontSize:cl(x)}},{children:r.iconRender?r.iconRender({checked:b,disabled:l}):Q(SD,{style:c})}))},d=()=>r.children?Q("span",Object.assign({className:r.bem("label",[r.labelPosition,{disabled:l}])},{children:r.children})):null;return Me("div",Object.assign({role:r.role,className:Oe(r.bem([{disabled:l,"label-disabled":r.labelDisabled},f]),r.className),style:r.style,tabIndex:l?-1:0,"aria-checked":r.checked,onClick:p},{children:[r.labelPosition==="left"&&d(),g(),r.labelPosition!=="left"&&d()]}))},lX="";function NI(e){return[e.getFullYear(),e.getMonth()+1]}function VC(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 pl(e,r){const t=VC(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),CT=e=>Array.isArray(e)?e.map(dy):dy(e);function $C(e,r){const t=dy(e);return t.setDate(t.getDate()+r),t}const wT=e=>$C(e,-1),_T=e=>$C(e,1),YC=()=>{const e=new Date;return e.setHours(0,0,0,0),e};function MI(e){const r=e[0].getTime();return(e[1].getTime()-r)/(1e3*60*60*24)+1}function ET(e,r){let t=-1;const i=Array(e);for(;++t<e;)i[t]=r(t);return i}function PI(e){if(!e)return 0;for(;uD(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function qC(e,r){return 32-new Date(e,r-1,32).getDate()}const[Mp]=xn("calendar"),BI=e=>{const r=Jr(e,{offset:0}),t=q.useMemo(()=>{const{item:d,index:m,color:C,offset:b,rowHeight:x}=r,E={height:x};if(d.type==="placeholder")return E.width="100%",E;if(m===0&&(E.marginLeft=`${100*b/7}%`),C)switch(d.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":E.background=C;break;case"middle":E.color=C;break}return E},[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:Oe(Mp("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:Oe(Mp("bottom-info"))},{children:r.bottomInfoRender?r.bottomInfoRender(r.item):d})):null},c=()=>{const{item:d,color:m,rowHeight:C}=r,{type:b,text:x}=d,E=Me(nn,{children:[l(),x,f()]});return b==="selected"?Q("div",Object.assign({className:Oe(Mp("selected-day")),style:{width:C,height:C,background:m}},{children:E})):E},{type:p,className:g}=r.item;return p==="placeholder"?Q("div",{className:Oe(Mp("day")),style:t}):Q("div",Object.assign({role:"gridcell",style:t,className:Oe(Mp("day",p),g),tabIndex:p==="disabled"?void 0:-1,onClick:i},{children:c()}))},[hy]=xn("calendar"),LI=q.forwardRef((e,r)=>{const[t,i]=q.useState(),l=q.useRef(),[f,c]=q.useState(),p=q.useRef(0),{locale:g}=q.useContext(vd);q.useEffect(()=>{f&&(p.current=dT(f).height)},[f]);const d=q.useMemo(()=>e.formatMonthTitle?e.formatMonthTitle(e.date):g.vanCalendar.monthTitle(...NI(e.date)),[e.date,e.formatMonthTitle]),m=q.useMemo(()=>cl(e.rowHeight),[e.rowHeight]),C=q.useMemo(()=>{const F=e.date.getDay();return e.firstDayOfWeek?(F+7-e.firstDayOfWeek)%7:F},[e.date,e.firstDayOfWeek]),b=q.useMemo(()=>qC(e.date.getFullYear(),e.date.getMonth()+1),[e.date]),x=q.useMemo(()=>t||!e.lazyRender,[t]),E=()=>d,k=F=>{const L=e.showSubtitle?l.current:f,I=(L==null?void 0:L.getBoundingClientRect().top)-F.getBoundingClientRect().top+F.scrollTop;oD(F,I)},D=F=>{const L=I=>e.currentDate.some(H=>pl(H,I)===0);if(L(F)){const I=wT(F),H=_T(F),W=L(I),Z=L(H);return W&&Z?"multiple-middle":W?"end":Z?"start":"multiple-selected"}return""},T=F=>{const[L,I]=e.currentDate;if(!L)return"";const H=pl(F,L);if(!I)return H===0?"start":"";const W=pl(F,I);return e.allowSameDay&&H===0&&W===0?"start-end":H===0?"start":W===0?"end":H>0&&W<0?"middle":""},A=F=>{const{type:L,minDate:I,maxDate:H,currentDate:W}=e;if(pl(F,I)<0||pl(F,H)>0)return"disabled";if(W===null)return"";if(Array.isArray(W)){if(L==="multiple")return D(F);if(L==="range")return T(F)}else if(L==="single")return pl(F,W)===0?"selected":"";return""},S=F=>{if(e.type==="range"){if(F==="start")return g.vanCalendar.start;if(F==="end")return g.vanCalendar.end;if(F==="start-end")return g.vanCalendar.startEnd}return null},O=()=>e.showMonthTitle?Q("div",Object.assign({className:Oe(hy("month-title"))},{children:d})):null,P=()=>e.showMark&&x?Q("div",Object.assign({className:Oe(hy("month-mark"))},{children:e.date.getMonth()+1})):null,z=q.useMemo(()=>{const F=Math.ceil((b+C)/7);return Array(F).fill({type:"placeholder"})},[b,C]),N=q.useMemo(()=>{const F=[],L=e.date.getFullYear(),I=e.date.getMonth();for(let H=1;H<=b;H++){const W=new Date(L,I,H),Z=A(W);let X={date:W,type:Z,text:H,bottomInfo:S(Z)};e.formatter&&(X=e.formatter(X)),F.push(X)}return F},[A,e.date,e.formatter]),U=(F,L)=>Q(BI,{item:F,index:L,color:e.color,offset:C,rowHeight:m,onClick:e.onClick,topInfoRender:e.topInfoRender,bottomInfoRender:e.bottomInfoRender},L),$=()=>Me("div",Object.assign({ref:l,role:"grid",className:Oe(hy("days"))},{children:[P(),(x?N:z).map(U)]}));return q.useImperativeHandle(r,()=>({getTitle:E,getHeight:()=>p.current,setVisible:i,scrollIntoView:k})),Me("div",Object.assign({className:Oe(hy("month")),ref:c},{children:[O(),$()]}))}),[Pp]=xn("calendar"),zI=e=>{const{locale:r}=q.useContext(vd),t=()=>{if(e.showTitle){const c=e.title||r.vanCalendar.title;return Q("div",Object.assign({className:Oe(Pp("header-title"))},{children:c}))}return null},i=c=>{var p;(p=e.onClickSubtitle)===null||p===void 0||p.call(e,c)},l=()=>e.showSubtitle?Q("div",Object.assign({className:Oe(Pp("header-subtitle")),onClick:i},{children:e.subtitle})):null,f=()=>{const{weekdays:c,firstDayOfWeek:p}=e,g=r.vanCalendar.weekdays,d=c?g.map((C,b)=>c[b]||C):g,m=[...d.slice(p,7),...d.slice(0,p)];return Q("div",Object.assign({className:Oe(Pp("weekdays"))},{children:m.map((C,b)=>Q("span",Object.assign({className:Oe(Pp("weekday"))},{children:C}),b))}))};return Me("div",Object.assign({className:Oe(Pp("header"))},{children:[t(),l(),f()]}))},[_d]=xn("calendar"),UI=YC(),jI=(()=>{const e=YC();return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())})(),ST=q.forwardRef((e,r)=>{var t,{className:i,style:l}=e,f=Va(e,["className","style"]);const c=Jr(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:UI,maxDate:jI,firstDayOfWeek:0,showRangePrompt:!0}),{locale:p}=q.useContext(vd),[g,d]=np({value:c.visible,defaultValue:!1,onChange:V=>{var ee;V===!1&&((ee=c.onClose)===null||ee===void 0||ee.call(c))}}),m=(V,ee=c.minDate,ie=c.maxDate)=>pl(V,ee)===-1?ee:pl(V,ie)===1?ie:V,C=(V=c.defaultValue)=>{const{type:ee,minDate:ie,maxDate:ae}=c;if(V===null)return V;const pe=YC();if(ee==="range"){Array.isArray(V)||(V=[]);const xe=m(V[0]||pe,ie,wT(ae)),Ee=m(V[1]||pe,_T(ie));return[xe,Ee]}return ee==="multiple"?Array.isArray(V)?V.map(xe=>m(xe)):[m(pe)]:((!V||Array.isArray(V))&&(V=pe),m(V))},b=q.useRef(),x=q.useRef(0),[E,k]=q.useState(C(c.value===void 0?c.defaultValue:c.value)),[D,T]=hD({subtitle:"",currentDate:E});Rc(()=>{c.value!==void 0&&JSON.stringify(E)!==JSON.stringify(c.value)&&k(c.value)},[c.value]),q.useEffect(()=>{JSON.stringify(D.currentDate)!==JSON.stringify(E)&&T({currentDate:E})},[E]);const[A,S]=fy(),O=q.useMemo(()=>c.firstDayOfWeek?+c.firstDayOfWeek%7:0,[c.firstDayOfWeek,c.firstDayOfWeek]),P=q.useMemo(()=>{const V=[],ee=new Date(c.minDate);ee.setDate(1);do V.push(new Date(ee)),ee.setMonth(ee.getMonth()+1);while(VC(ee,c.maxDate)!==1);return V},[c.minDate,c.maxDate]),z=q.useMemo(()=>{const{currentDate:V}=D;if(V){if(c.type==="range")return!V[0]||!V[1];if(c.type==="multiple")return!V.length}return!V},[c.type,D.currentDate]),N=()=>{var V;const ee=LL(b.current),ie=ee+x.current,ae=P.map((Ne,Te)=>A[Te].getHeight()),pe=ae.reduce((Ne,Te)=>Ne+Te,0);if(ie>pe&&ee>0)return;let xe=0,Ee;const se=[-1,-1];for(let Ne=0;Ne<P.length;Ne++){const Te=A[Ne];xe<=ie&&xe+ae[Ne]>=ee&&(se[1]=Ne,Ee||(Ee=Te,se[0]=Ne),A[Ne].showed||(A[Ne].showed=!0,(V=c.onMonthShow)===null||V===void 0||V.call(c,{date:Te.date,title:Te.getTitle()}))),xe+=ae[Ne]}P.forEach((Ne,Te)=>{const tt=Te>=se[0]-1&&Te<=se[1]+1;A[Te].setVisible(tt)}),Ee&&Ee.getTitle()!==D.subtitle&&!c.horizontal&&T({subtitle:Ee.getTitle()})},U=V=>{Y2(()=>{P.some((ee,ie)=>VC(ee,V)===0?(b.current&&A[ie].scrollIntoView(b.current),!0):!1),N()})},$=()=>{if(c.poppable&&!g)return;const{currentDate:V}=D;if(V){const ee=c.type==="single"?V:V[0];U(ee)}else Y2(N)},F=()=>{Y2(()=>{x.current=Math.floor(dT(b.current).height),$()})},L=(V=C())=>{T({currentDate:V}),$()},I=V=>{var ee;const{maxRange:ie,rangePrompt:ae,showRangePrompt:pe}=c;return ie&&MI(V)>ie?(pe&&mT.info(ae||p.vanCalendar.rangePrompt(+ie)),(ee=c.onOverRange)===null||ee===void 0||ee.call(c),!1):!0},H=()=>{var V;const ee=CT(D.currentDate);c.poppable&&k(ee),(V=c.onConfirm)===null||V===void 0||V.call(c,ee),G.close()},W=(V,ee)=>{const ie=ae=>{var pe;D.currentDate=ae,T({currentDate:ae}),(pe=c.onSelect)===null||pe===void 0||pe.call(c,CT(D.currentDate))};if(ee&&c.type==="range"&&!I(V)){c.showConfirm?ie([V[0],$C(V[0],+c.maxRange-1)]):ie(V);return}ie(V),ee&&!c.showConfirm&&H()},Z=V=>{var ee;if(c.readOnly||!V.date)return;const{date:ie}=V,{type:ae}=c,{currentDate:pe}=D;if(ae==="range"){if(!pe){W([ie]);return}const[xe,Ee]=pe;if(xe&&!Ee){const se=pl(ie,xe);se===1?W([xe,ie],!0):se===-1?W([ie]):c.allowSameDay&&W([ie,ie],!0)}else W([ie])}else if(ae==="multiple"){if(!pe){W([ie]);return}let xe;if(D.currentDate.some((se,Ne)=>{const Te=pl(se,ie)===0;return Te&&(xe=Ne),Te})){const[se]=pe.splice(xe,1);(ee=c.onUnselect)===null||ee===void 0||ee.call(c,dy(se)),W([...pe])}else c.maxRange&&pe.length>=c.maxRange?mT(c.rangePrompt||`选择天数不能超过 ${c.maxRange} 天`):W([...pe,ie])}else W(ie,!0)},X=(V,ee)=>{const ie=!c.horizontal&&(ee!==0||!c.showSubtitle);return Q(LI,Object.assign({ref:S(ee),date:V,currentDate:D.currentDate,showMonthTitle:ie,firstDayOfWeek:O},rD(c,["type","color","minDate","maxDate","showMark","formatter","rowHeight","showSubtitle","lazyRender","allowSameDay","topInfoRender","bottomInfoRender","formatMonthTitle"]),{onClick:Z}),ee)},re=()=>{if(c.footer)return c.footer;if(c.showConfirm){const V=z?c.confirmDisabledText:c.confirmText;return Q(ip,Object.assign({round:!0,block:!0,type:"danger",color:c.color,className:Oe(_d("confirm")),disabled:z,nativeType:"button",onClick:H},{children:V||p.vanCalendar.confirm}))}return null},K=()=>Q("div",Object.assign({className:Oe(_d("footer"),{"rv-safe-area-bottom":c.safeAreaInsetBottom})},{children:re()})),te=()=>Me("div",Object.assign({className:Oe(i,_d()),style:l},{children:[Q(zI,{weekdays:c.weekdays,title:c.title,subtitle:c.subtitle||D.subtitle,showTitle:c.showTitle,showSubtitle:c.showSubtitle,firstDayOfWeek:O,onClickSubtitle:V=>{var ee;(ee=c.onClickSubtitle)===null||ee===void 0||ee.call(c,V)}}),c.horizontal?Q("div",Object.assign({ref:b,className:Oe(_d("horizontal-body"))},{children:Q(bT,Object.assign({indicator:()=>null,onChange:V=>{T({subtitle:A[V].getTitle()})}},{children:P.map((V,ee)=>Q(bT.Item,{children:X(V,ee)},V))}))})):Q("div",Object.assign({ref:b,className:Oe(_d("body")),onScroll:N},{children:P.map(X)})),K()]})),G={toggle:()=>{c.poppable&&d(V=>!V)},open:()=>{c.poppable&&d(!0)},close:()=>{c.poppable&&d(!1)}};return q.useEffect(()=>{c.poppable||F()},[]),q.useEffect(()=>{c.poppable&&g&&F()},[g]),Rc(()=>{L(C(D.currentDate))},[c.type,c.minDate,c.maxDate]),q.useImperativeHandle(r,()=>Object.assign({reset:L,scrollToDate:U},G)),c.poppable?Me(nn,{children:[Q(sp,Object.assign({visible:g,className:Oe(_d("popup")),round:c.round,position:c.position,closeable:c.showTitle||c.showSubtitle,closeOnPopstate:c.closeOnPopstate,closeOnClickOverlay:c.closeOnClickOverlay,onClose:G.close,onClosed:()=>{var V;c.poppable&&JSON.stringify(D.currentDate)!==JSON.stringify(E)&&T({currentDate:E}),(V=c.onClosed)===null||V===void 0||V.call(c)}},{children:te()})),(t=c.children)===null||t===void 0?void 0:t.call(c,E,G)]}):te()});function II(e,r){var t;process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const i=pD(e),l=(t=r==null?void 0:r.wait)!==null&&t!==void 0?t:1e3,f=q.useMemo(()=>SI((...c)=>i.current(...c),l,r),[]);return vD(()=>{f.cancel()}),{run:f,cancel:f.cancel,flush:f.flush}}function HI(e,r,t){const[i,l]=q.useState({}),{run:f}=II(()=>{l({})},t);q.useEffect(()=>f(),r),Rc(e,[i])}const dX="",DT=q.createContext({}),[VI]=xn("checkbox-group"),$I=q.forwardRef((e,r)=>{const[t,i]=fy(),[l,f]=gT({value:e.value,defaultValue:e.defaultValue}),c=(g={})=>{typeof g=="boolean"&&(g={checked:g});const{checked:d,skipDisabled:m}=g,b=t.filter(x=>x.props.bindGroup?x.props.disabled&&m?x.checked:d??!x.checked:!1).map(x=>x.props.name);f(b),e.onChange(b)},p=g=>{var d;f(g),(d=e.onChange)===null||d===void 0||d.call(e,g)};return q.useImperativeHandle(r,()=>({toggleAll:c})),Q(DT.Provider,Object.assign({value:{parent:{props:e},toggle:p,checked:l||[]}},{children:Q("div",Object.assign({className:Oe(e.className,VI([e.direction]))},{children:q.Children.toArray(e.children).filter(Boolean).map((g,d)=>{var m;return((m=g.type)===null||m===void 0?void 0:m.displayName)!=="Checkbox"?g:q.cloneElement(g,{ref:i(d)})})}))}))}),[YI]=xn("checkbox"),kT=q.forwardRef((e,r)=>{const t=Jr(e,{bindGroup:!0}),i=q.useContext(DT),{parent:l}=i,f=Va(i,["parent"]),[c,p]=gT({value:t.checked,defaultValue:t.defaultChecked}),g=C=>{const{name:b}=t,{max:x}=l.props,E=f.checked.slice();if(C)!(x&&E.length>=x)&&E.indexOf(b)===-1&&(E.push(b),t.bindGroup&&f.toggle(E));else{const k=E.indexOf(b);k!==-1&&(E.splice(k,1),t.bindGroup&&f.toggle(E))}},d=q.useMemo(()=>l&&t.bindGroup?f.checked.indexOf(t.name)!==-1:c,[f.checked,c]),m=(C=!d)=>{var b;l&&t.bindGroup?g(C):(p(C),(b=t.onChange)===null||b===void 0||b.call(t,C))};return q.useImperativeHandle(r,()=>({toggle:m,checked:d,props:t})),Q(FI,Object.assign({},t,{bem:YI,role:"checkbox",parent:l,checked:d,className:t.className,bindGroup:t.bindGroup,onToggle:m}))});kT.displayName="Checkbox";const TT=Object.assign(kT,{Group:$I}),mX="",AT=200,OT=300,qI=15;function GI(e){const r=window.getComputedStyle(e),t=r.transform||r.webkitTransform,i=t.slice(7,t.length-1).split(", ")[5];return Number(i)}const[GC]=xn("picker-column"),KI=q.memo(q.forwardRef((e,r)=>{const{locale:t}=q.useContext(vd),{valueKey:i,textKey:l,itemHeight:f,visibleItemCount:c,placeholder:p,value:g}=e,d=q.useMemo(()=>cD(f),[f]),m=q.useMemo(()=>Array.isArray(e.options)&&!e.options.length?[]:p?[{[i]:void 0,[l]:p===!0?t.vanPicker.select:p},...e.options]:e.options,[e.options]),C=q.useRef(null),b=q.useRef(!1),x=q.useRef(0),E=q.useRef(null),k=q.useRef(0),D=q.useRef(0),[T,A,S]=hD({offset:0,duration:0}),O=yD(),P=q.useMemo(()=>d*(+c-1)/2,[d,c]),z=K=>{var te,G;K=ep(K,0,m.length);for(let V=K;V<m.length;V+=1)if(!(!((te=m[V])===null||te===void 0)&&te.disabled))return V;for(let V=K-1;V>=0;V-=1)if(!(!((G=m[V])===null||G===void 0)&&G.disabled))return V;return null},N=K=>{e.onSelect(K,e.index)},U=K=>{K=z(K)||0;const te=-K*d,G=()=>{var V;((V=m[K])===null||V===void 0?void 0:V[i])!==g&&N(m[K])};b.current&&te!==S.current.offset?E.current=G:G(),A({offset:te})},$=K=>{K=z(K)||0;const te=-K*d;A({offset:te})};tp(()=>{if(m.length===0)g!==void 0&&N(void 0);else{let K=m.findIndex(te=>te[i]===g);K<0&&(K=0,N(m[0])),$(K)}},[g,JSON.stringify(m)]);const F=K=>{b.current||e.readOnly||(E.current=null,A({duration:AT}),U(K))},L=K=>ep(Math.round(-K/d),0,m.length-1),I=(K,te)=>{const G=Math.abs(K/te);K=S.current.offset+G/.003*(K<0?-1:1);const V=L(K);A({duration:+e.swipeDuration}),U(V)},H=()=>{b.current=!1,A({duration:0}),E.current&&(E.current(),E.current=null)},W=K=>{if(e.readOnly)return;O.start(K);let{offset:te}=T;if(b.current){const G=GI(C.current);te=Math.min(0,G-P),x.current=te}else x.current=te;A({duration:0,offset:te}),k.current=Date.now(),D.current=x.current,E.current=null},Z=K=>{if(e.readOnly)return;O.move(K),O.isVertical()&&(b.current=!0);const te=ep(x.current+O.deltaY.current,-(m.length*d),d);A({offset:te});const G=Date.now();G-k.current>OT&&(k.current=G,D.current=te)},X=()=>{if(e.readOnly||!b.current)return;const K=S.current.offset-D.current,te=Date.now()-k.current;if(te<OT&&Math.abs(K)>qI){I(K,te);return}const V=L(S.current.offset);A({duration:AT}),U(V),setTimeout(()=>{b.current=!1},0)},re=()=>{const K={height:`${e.itemHeight}px`};return m.map((te,G)=>{const{disabled:V}=te,ee={role:"button",style:K,tabIndex:V?-1:0,className:Oe(GC("item",{disabled:V,selected:te[i]===g})),onClick:()=>{F(G)}},ie={className:"rv-ellipsis",children:te[l]};return q.createElement("li",Object.assign({},ee,{key:G}),e.optionRender?e.optionRender(te):Q("div",Object.assign({},ie)))})};return q.useImperativeHandle(r,()=>({stopMomentum:H})),Q("div",Object.assign({className:Oe(GC(),e.className),onTouchStart:W,onTouchMove:Z,onTouchEnd:X,onTouchCancel:X},{children:Q("ul",Object.assign({ref:C,style:{transform:`translate3d(0, ${T.offset+P}px, 0)`,transitionDuration:`${T.duration}ms`,transitionProperty:T.duration?"all":"none"},className:Oe(GC("wrapper")),onTransitionEnd:H},{children:re()}))}))}),(e,r)=>!(e.index!==r.index||e.value!==r.value||e.onSelect!==r.onSelect||JSON.stringify(e.options)!==JSON.stringify(r.options)));function WI(e,r){const{textKey:t,valueKey:i,childrenKey:l}=r,f=q.useMemo(()=>{if(e.some(d=>typeof d=="object"&&l in d))return"cascade";const g=e[0]||{};return typeof g=="object"?l in g?"cascade":"object":"plain"},[e,l]),c=q.useMemo(()=>{let p=0;function g(d,m){m>p&&(p=m);const C=m+1;d.forEach(b=>{b[l]&&g(b[l],C)})}return g(e,1),p},[e,l]);return f!=="cascade"?e:p=>{const g=[];let d=e,m=0;for(;;){g.push(d.map(x=>{var E;return{[t]:x[t],[i]:(E=x[i])!==null&&E!==void 0?E:x[t]}}));const C=p[m],b=d.find(x=>{var E;return((E=x[i])!==null&&E!==void 0?E:x[t])===C});if(!b||!b[l])break;d=b[l],m++}for(;m<c-1;)g.push([]),m++;return g}}function KC(e){let r=null;return()=>(r===null&&(r=e()),r)}function QI(e,r,t){const{textKey:i,valueKey:l}=r,f=KC(()=>{let d=typeof e=="function"?e(t):e;return Array.isArray(d[0])||(d=[d]),d.map(m=>m.map(C=>typeof C=="string"?{[i]:C,[l]:C}:(l in C||(C[l]=C[i]),C)))}),c=KC(()=>t.map((d,m)=>{var C;const b=f()[m];return b?(C=b.find(x=>x[l]===d))!==null&&C!==void 0?C:void 0:null})),p=KC(()=>t.map((d,m)=>{var C;const b=f()[m];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 p()}}}function RT(e,r,t){const i=WI(e,r);return q.useMemo(()=>QI(i,r,t),[e,r,t])}const[ss]=xn("picker");function ZI(e){const{locale:r}=q.useContext(vd),t=q.useRef(null),[i,l]=fy(),{text:f,value:c,children:p}=Jh({text:"text",value:"value",children:"children"},e.columnsFieldNames),[g,d]=q.useState(e.value);q.useEffect(()=>{e.value!==void 0&&JSON.stringify(g)!==JSON.stringify(e.value)&&d(e.value)},[e.value]);const m=RT(e.columns,{textKey:f,valueKey:c,childrenKey:p},g),{columns:C,items:b,indexes:x}=m;HI(()=>{var U;JSON.stringify(e.value)!==JSON.stringify(g)&&((U=e.onChange)===null||U===void 0||U.call(e,g,b,x))},[g],{wait:100,leading:!1,trailing:!0});const E=q.useMemo(()=>cD(e.itemHeight),[e.itemHeight]),k=(U,$)=>{d(F=>{const L=[...F];return L[$]=U==null?void 0:U[c],L})},D=()=>{var U;i.forEach($=>$.stopMomentum()),(U=e.onConfirm)===null||U===void 0||U.call(e,g,b,x)},T=()=>{var U;(U=e.onCancel)===null||U===void 0||U.call(e)},A=()=>e.title?Q("div",Object.assign({className:Oe(ss("title"),"rv-ellipsis")},{children:e.title})):null,S=()=>{const U=e.cancelButtonText||r.cancel;return Q("button",Object.assign({type:"button",className:Oe(ss("cancel")),onClick:T},{children:U}))},O=()=>{const U=e.confirmButtonText||r.confirm;return Q("button",Object.assign({type:"button",className:Oe(ss("confirm")),onClick:D},{children:U}))},P=()=>e.showToolbar?Q("div",Object.assign({className:Oe(ss("toolbar"))},{children:e.toolbar||Me(nn,{children:[S(),A(),O()]})})):null,z=()=>C.map((U,$)=>{const F=Array.isArray(e.placeholder)?e.placeholder[$]:e.placeholder;return Q(KI,{textKey:f,valueKey:c,ref:l($),placeholder:F,optionRender:e.optionRender,readOnly:e.readOnly,value:g[$],itemHeight:E,index:$,swipeDuration:e.swipeDuration,visibleItemCount:e.visibleItemCount,options:U,onSelect:k},$)}),N=()=>{const U=E*e.visibleItemCount,$={height:`${E}px`},F={height:`${U}px`},L={backgroundSize:`100% ${(U-E)/2}px`};return Me("div",Object.assign({ref:t,className:Oe(ss("columns")),style:F},{children:[z(),Q("div",{className:Oe(ss("mask")),style:L}),Q("div",{className:Oe(dz,ss("frame")),style:$})]}))};return G2("touchmove",$2,{target:t.current}),Me("div",Object.assign({className:Oe(ss(),e.className)},{children:[e.toolbarPosition==="top"?P():null,e.loading?Q(Q2,{className:Oe(ss("loading"))}):null,e.columnsTop,N(),e.columnsBottom,e.toolbarPosition==="bottom"?P():null]}))}function XI(e,r){const t=Jr(e,{columns:[],itemHeight:44,visibleItemCount:5,swipeDuration:300,showToolbar:!0,placeholder:!0,toolbarPosition:"top"}),{visible:i,popup:l,children:f,defaultValue:c=[]}=t,p=Va(t,["visible","popup","children","defaultValue"]),[g,d]=np({value:i,defaultValue:!1,onChange:I=>{var H;I===!1&&((H=t.onClose)===null||H===void 0||H.call(t))}}),m={toggle:()=>{l&&d(I=>!I)},open:()=>{l&&d(!0)},close:()=>{l&&d(!1)}};q.useImperativeHandle(r,()=>m);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:E,children:k}=Jh({text:"text",value:"value",children:"children"},t.columnsFieldNames),D=q.useMemo(()=>{const I=t.columns[0]||{};return!(Array.isArray(I)||typeof I=="object"&&k in I)},[t.columns,k]),T=I=>D?I==null?void 0:I[0]:I,[A,S]=np({value:C,defaultValue:b}),O=RT(t.columns,{textKey:x,valueKey:E,childrenKey:k},A),[P,z]=q.useState(A);q.useEffect(()=>{l&&JSON.stringify(P)!==JSON.stringify(A)&&z(A)},[g]),q.useEffect(()=>{!l&&JSON.stringify(P)!==JSON.stringify(A)&&z(A)},[A]);const N=(I,H,W)=>{var Z;S(P,!0),(Z=t.onConfirm)===null||Z===void 0||Z.call(t,T(I),T(H),T(W)),l&&m.close()},U=()=>{var I;(I=t.onCancel)===null||I===void 0||I.call(t),l&&m.close()},$=CD((I,H,W)=>{var Z,X;z(I),l?g&&((Z=t.onChange)===null||Z===void 0||Z.call(t,T(I),T(H),T(W))):(X=t.onChange)===null||X===void 0||X.call(t,T(I),T(H),T(W))}),F=cd(l)?Object.assign({closeOnClickOverlay:!0},l):{closeOnClickOverlay:!0},L=Q(ZI,Object.assign({},p,{value:P,onCancel:U,onConfirm:N,onChange:$}));return l?Me(nn,{children:[Q(sp,Object.assign({round:!0,position:"bottom",visible:g,closeOnClickOverlay:!0,onClickOverlay:()=>{F!=null&&F.closeOnClickOverlay&&d(!1)}},F,{children:L})),f==null?void 0:f(T(A),T(O.items),m)]}):L}const WC=q.forwardRef(XI);function JI(e){return Object.prototype.toString.call(e)==="[object Date]"&&!uD(e.getTime())}const eH=q.forwardRef((e,r)=>{const t=Jr(e,{type:"datetime",placeholder:!1,minDate:tH,maxDate:nH,formatter:(N,U)=>U}),{value:i,defaultValue:l,formatter:f,columnsOrder:c,type:p,filter:g,minDate:d,maxDate:m}=t,C=Va(t,["value","defaultValue","formatter","columnsOrder","type","filter","minDate","maxDate"]),b=N=>(JI(N)||(N=new Date),N=Math.max(N,d.getTime()),N=Math.min(N,m.getTime()),new Date(N)),[x,E,k]=K2(()=>b(i||l)),D=(N,U)=>{const $=t[`${N}Date`],F=$.getFullYear();let L=1,I=1,H=0,W=0;return N==="max"&&(L=12,I=qC(U.getFullYear(),U.getMonth()+1),H=23,W=59),U.getFullYear()===F&&(L=$.getMonth()+1,U.getMonth()+1===L&&(I=$.getDate(),U.getDate()===I&&(H=$.getHours(),U.getHours()===H&&(W=$.getMinutes())))),{[`${N}Year`]:F,[`${N}Month`]:L,[`${N}Date`]:I,[`${N}Hour`]:H,[`${N}Minute`]:W}},T=q.useMemo(()=>{const{maxYear:N,maxDate:U,maxMonth:$,maxHour:F,maxMinute:L}=D("max",k.current),{minYear:I,minDate:H,minMonth:W,minHour:Z,minMinute:X}=D("min",k.current);let re=[{type:"year",range:[I,N]},{type:"month",range:[W,$]},{type:"day",range:[H,U]},{type:"hour",range:[Z,F]},{type:"minute",range:[X,L]}];switch(p){case"date":re=re.slice(0,3);break;case"year-month":re=re.slice(0,2);break;case"month-day":re=re.slice(1,3);break;case"datehour":re=re.slice(0,4);break}if(c){const K=c.concat(re.map(te=>te.type));re.sort((te,G)=>K.indexOf(te.type)-K.indexOf(G.type))}return re.map(({type:K,range:te})=>{let G=ET(te[1]-te[0]+1,V=>fl(te[0]+V));return g&&(G=g(K,G)),{type:K,values:G}})},[c,k.current,d,m]),A=q.useMemo(()=>T.map(N=>N.values.map(U=>f(N.type,U))),[T,f]),S=q.useMemo(()=>{const N=t.popup?b(k.current):k.current;return T.map($=>{switch($.type){case"year":return f("year",`${N.getFullYear()}`);case"month":return f("month",fl(N.getMonth()+1));case"day":return f("day",fl(N.getDate()));case"hour":return f("hour",fl(N.getHours()));case"minute":return f("minute",fl(N.getMinutes()));default:return""}})},[t.value,k.current,b]),O=N=>{const{type:U}=t,$=X=>{let re=0;T.forEach((te,G)=>{X===te.type&&(re=G)});const{values:K}=T[re];return PI(K[N[re]])};let F=null,L=null,I=null;U==="month-day"?(F=(x||d).getFullYear(),L=$("month"),I=$("day")):(F=$("year"),L=$("month"),I=U==="year-month"?1:$("day"));const H=qC(F,L);I=I>H?H:I;let W=0,Z=0;return U==="datehour"&&(W=+$("hour")),U==="datetime"&&(W=+$("hour"),Z=+$("minute")),b(new Date(F,L-1,I,W,Z))},P=(N,U,$)=>{var F;const L=O($);E(L),(F=t.onChange)===null||F===void 0||F.call(t,L)},z=()=>{var N;(N=t.onConfirm)===null||N===void 0||N.call(t,x)};return Rc(()=>{const N=b(i);N&&N.valueOf()!==(x==null?void 0:x.valueOf())&&E(N)},[i,g,d,m]),Q(WC,Object.assign({},C,{value:S,ref:r,columns:A,onChange:P,onConfirm:z,onCancel:t.onCancel},{children:(N,U,$)=>{var F;return(F=t.children)===null||F===void 0?void 0:F.call(t,i||l,U,$)}}))}),FT=new Date().getFullYear(),tH=new Date(FT-10,0,1),nH=new Date(FT+10,11,31),rH=eH,aH=q.forwardRef((e,r)=>{const t=Jr(e,{minHour:0,maxHour:23,minMinute:0,maxMinute:59,placeholder:!1,defaultValue:"",formatter:(z,N)=>N}),{value:i,defaultValue:l,formatter:f,filter:c,minHour:p,maxHour:g,minMinute:d,maxMinute:m}=t,C=Va(t,["value","defaultValue","formatter","filter","minHour","maxHour","minMinute","maxMinute"]),b=z=>{z||(z=`${fl(p)}:${fl(d)}`);let[N,U]=z.split(":");return N=fl(ep(N,+p,+g)),U=fl(ep(U,+d,+m)),`${N}:${U}`},[x,E]=q.useState(()=>b(i===void 0?l:i)),k=q.useMemo(()=>[{type:"hour",range:[+p,+g]},{type:"minute",range:[+d,+m]}],[p,g,d,m]),D=q.useMemo(()=>k.map(({type:z,range:N})=>{let U=ET(N[1]-N[0]+1,$=>fl(N[0]+$));return c&&(U=c(z,U)),{type:z,values:U}}),[k]),T=q.useMemo(()=>D.map(z=>z.values.map(N=>f(z.type,N))),[D]),A=q.useMemo(()=>{const z=(t.popup?b(t.value):x).split(":");return[f("hour",z[0]),f("minute",z[1])]},[t.value,x,b]),S=()=>{var z;(z=t.onConfirm)===null||z===void 0||z.call(t,x)},O=()=>{var z;(z=t.onCancel)===null||z===void 0||z.call(t)},P=z=>{var N;const U=b(z.join(":"));E(U),(N=t.onChange)===null||N===void 0||N.call(t,U)};return Rc(()=>{const z=b(x);E(z)},[c,p,g,d,m]),Rc(()=>{const z=b(i);z!==x&&E(z)},[i]),Q(WC,Object.assign({},C,{ref:r,columns:T,value:A,onChange:P,onConfirm:S,onCancel:O},{children:(z,N,U)=>{var $;return($=t.children)===null||$===void 0?void 0:$.call(t,i,N,U)}}))}),[NT]=xn("datetime-picker"),QC=q.forwardRef((e,r)=>e.type==="time"?Q(aH,Object.assign({ref:r,className:Oe(NT())},e)):Q(rH,Object.assign({ref:r,className:Oe(NT())},e)));function ZC(e){return Array.isArray(e)?e:[e]}const CX="";function MT(e,r){this.v=e,this.k=r}function Sa(e,r,t,i){var l=Object.defineProperty;try{l({},"",{})}catch{l=0}Sa=function(c,p,g,d){function m(C,b){Sa(c,C,function(x){return this._invoke(C,b,x)})}p?l?l(c,p,{value:g,enumerable:!d,configurable:!d,writable:!d}):c[p]=g:(m("next",0),m("throw",1),m("return",2))},Sa(e,r,t,i)}function XC(){var e,r,t=typeof Symbol=="function"?Symbol:{},i=t.iterator||"@@iterator",l=t.toStringTag||"@@toStringTag";function f(x,E,k,D){var T=E&&E.prototype instanceof p?E:p,A=Object.create(T.prototype);return Sa(A,"_invoke",function(S,O,P){var z,N,U,$=0,F=P||[],L=!1,I={p:0,n:0,v:e,a:H,f:H.bind(e,4),d:function(Z,X){return z=Z,N=0,U=e,I.n=X,c}};function H(W,Z){for(N=W,U=Z,r=0;!L&&$&&!X&&r<F.length;r++){var X,re=F[r],K=I.p,te=re[2];W>3?(X=te===Z)&&(U=re[(N=re[4])?5:(N=3,3)],re[4]=re[5]=e):re[0]<=K&&((X=W<2&&K<re[1])?(N=0,I.v=Z,I.n=re[1]):K<te&&(X=W<3||re[0]>Z||Z>te)&&(re[4]=W,re[5]=Z,I.n=te,N=0))}if(X||W>1)return c;throw L=!0,Z}return function(W,Z,X){if($>1)throw TypeError("Generator is already running");for(L&&Z===1&&H(Z,X),N=Z,U=X;(r=N<2?e:U)||!L;){z||(N?N<3?(N>1&&(I.n=-1),H(N,U)):I.n=U:I.v=U);try{if($=2,z){if(N||(W="next"),r=z[W]){if(!(r=r.call(z,U)))throw TypeError("iterator result is not an object");if(!r.done)return r;U=r.value,N<2&&(N=0)}else N===1&&(r=z.return)&&r.call(z),N<2&&(U=TypeError("The iterator does not provide a '"+W+"' method"),N=1);z=e}else if((r=(L=I.n<0)?U:S.call(O,I))!==c)break}catch(re){z=e,N=1,U=re}finally{$=1}}return{value:r,done:L}}}(x,k,D),!0),A}var c={};function p(){}function g(){}function d(){}r=Object.getPrototypeOf;var m=[][i]?r(r([][i]())):(Sa(r={},i,function(){return this}),r),C=d.prototype=p.prototype=Object.create(m);function b(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,d):(x.__proto__=d,Sa(x,l,"GeneratorFunction")),x.prototype=Object.create(C),x}return g.prototype=d,Sa(C,"constructor",d),Sa(d,"constructor",g),g.displayName="GeneratorFunction",Sa(d,l,"GeneratorFunction"),Sa(C),Sa(C,l,"Generator"),Sa(C,i,function(){return this}),Sa(C,"toString",function(){return"[object Generator]"}),(XC=function(){return{w:f,m:b}})()}function py(e,r){function t(l,f,c,p){try{var g=e[l](f),d=g.value;return d instanceof MT?r.resolve(d.v).then(function(m){t("next",m,c,p)},function(m){t("throw",m,c,p)}):r.resolve(d).then(function(m){g.value=m,c(g)},function(m){return t("throw",m,c,p)})}catch(m){p(m)}}var i;this.next||(Sa(py.prototype),Sa(py.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Sa(this,"_invoke",function(l,f,c){function p(){return new r(function(g,d){t(l,c,g,d)})}return i=i?i.then(p,p):p()},!0)}function PT(e,r,t,i,l){return new py(XC().w(e,r,t,i),l||Promise)}function iH(e,r,t,i,l){var f=PT(e,r,t,i,l);return f.next().then(function(c){return c.done?c.value:f.next()})}function oH(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 BT(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 no(){var e=XC(),r=e.m(no),t=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function i(c){var p=typeof c=="function"&&c.constructor;return!!p&&(p===t||(p.displayName||p.name)==="GeneratorFunction")}var l={throw:1,return:2,break:3,continue:3};function f(c){var p,g;return function(d){p||(p={stop:function(){return g(d.a,2)},catch:function(){return d.v},abrupt:function(C,b){return g(d.a,l[C],b)},delegateYield:function(C,b,x){return p.resultName=b,g(d.d,BT(C),x)},finish:function(C){return g(d.f,C)}},g=function(C,b,x){d.p=p.prev,d.n=p.next;try{return C(b,x)}finally{p.next=d.n}}),p.resultName&&(p[p.resultName]=d.v,p.resultName=void 0),p.sent=d.v,p.next=d.n;try{return c.call(this,p)}finally{d.p=p.prev,d.n=p.next}}}return(no=function(){return{wrap:function(g,d,m,C){return e.w(f(g),d,m,C&&C.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(g,d){return new MT(g,d)},AsyncIterator:py,async:function(g,d,m,C,b){return(i(d)?PT:iH)(f(g),d,m,C,b)},keys:oH,values:BT}})()}function LT(e,r,t,i,l,f,c){try{var p=e[f](c),g=p.value}catch(d){return void t(d)}p.done?r(g):Promise.resolve(g).then(i,l)}function Bp(e){return function(){var r=this,t=arguments;return new Promise(function(i,l){var f=e.apply(r,t);function c(g){LT(f,i,l,c,p,"next",g)}function p(g){LT(f,i,l,c,p,"throw",g)}c(void 0)})}}function lH(e){if(Array.isArray(e))return bb(e)}function zT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sH(){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 rn(e){return lH(e)||zT(e)||Cb(e)||sH()}function JC(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function UT(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 ew(e,r,t){return r&&UT(e.prototype,r),t&&UT(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uH(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 jT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jT=function(){return!!e})()}function cH(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 un(e)}function fH(e){var r=jT();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 cH(this,t)}}function tw(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[];return q.Children.forEach(e,function(i){i==null&&!r.keepEmpty||(Array.isArray(i)?t=t.concat(tw(i)):o9(i)&&i.props?t=t.concat(tw(i.props.children,r)):t.push(i))}),t}function IT(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=new Set;function l(f,c){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=i.has(f);if(_r(!g,"Warning: There may be circular references"),g)return!1;if(f===c)return!0;if(t&&p>1)return!1;i.add(f);var d=p+1;if(Array.isArray(f)){if(!Array.isArray(c)||f.length!==c.length)return!1;for(var m=0;m<f.length;m++)if(!l(f[m],c[m],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",On=function(){_r(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},vu=Fe.createContext({getFieldValue:On,getFieldsValue:On,getFieldError:On,getFieldWarning:On,getFieldsError:On,isFieldsTouched:On,isFieldTouched:On,isFieldValidating:On,isFieldsValidating:On,resetFields:On,setFields:On,setFieldValue:On,setFieldsValue:On,validateFields:On,submit:On,getInternalHooks:function(){return On(),{dispatch:On,initEntityValue:On,registerField:On,useSubscribe:On,setInitialValues:On,destroyForm:On,setCallbacks:On,registerWatch:On,getFields:On,setValidateMessages:On,setPreserve:On,getInitialValue:On}}}),my=Fe.createContext(null);function nw(e){return e==null?[]:Array.isArray(e)?e:[e]}function dH(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 hH(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Lp(e,r)}function rw(e){return rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rw(e)}function Lp(e,r){return Lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},Lp(e,r)}function pH(){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 pH()?gy=Reflect.construct.bind():gy=function(l,f,c){var p=[null];p.push.apply(p,f);var g=Function.bind.apply(l,p),d=new g;return c&&Lp(d,c.prototype),d},gy.apply(null,arguments)}function vH(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function aw(e){var r=typeof Map=="function"?new Map:void 0;return aw=function(i){if(i===null||!vH(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,rw(this).constructor)}return l.prototype=Object.create(i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),Lp(l,i)},aw(e)}var mH=/%[sdj%]/g,HT=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(HT=function(r,t){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&t.every(function(i){return typeof i=="string"})});function iw(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 Bi(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(mH,function(p){if(p==="%%")return"%";if(l>=f)return p;switch(p){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 p}});return c}return e}function gH(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||gH(r)&&typeof e=="string"&&!e)}function yH(e,r,t){var i=[],l=0,f=e.length;function c(p){i.push.apply(i,p||[]),l++,l===f&&t(i)}e.forEach(function(p){r(p,c)})}function VT(e,r,t){var i=0,l=e.length;function f(c){if(c&&c.length){t(c);return}var p=i;i=i+1,p<l?r(e[p],f):t([])}f([])}function xH(e){var r=[];return Object.keys(e).forEach(function(t){r.push.apply(r,e[t]||[])}),r}var $T=function(e){hH(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}(aw(Error));function bH(e,r,t,i,l){if(r.first){var f=new Promise(function(b,x){var E=function(T){return i(T),T.length?x(new $T(T,iw(T))):b(l)},k=xH(e);VT(k,t,E)});return f.catch(function(b){return b}),f}var c=r.firstFields===!0?Object.keys(e):r.firstFields||[],p=Object.keys(e),g=p.length,d=0,m=[],C=new Promise(function(b,x){var E=function(D){if(m.push.apply(m,D),d++,d===g)return i(m),m.length?x(new $T(m,iw(m))):b(l)};p.length||(i(m),b(l)),p.forEach(function(k){var D=e[k];c.indexOf(k)!==-1?VT(D,t,E):yH(D,t,E)})});return C.catch(function(b){return b}),C}function CH(e){return!!(e&&e.message!==void 0)}function wH(e,r){for(var t=e,i=0;i<r.length;i++){if(t==null)return t;t=t[r[i]]}return t}function YT(e,r){return function(t){var i;return e.fullFields?i=wH(r,e.fullFields):i=r[t.field||e.fullField],CH(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 qT(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 GT=function(r,t,i,l,f,c){r.required&&(!i.hasOwnProperty(r.field)||Br(t,c||r.type))&&l.push(Bi(f.messages.required,r.fullField))},_H=function(r,t,i,l,f){(/^\s+$/.test(t)||t==="")&&l.push(Bi(f.messages.whitespace,r.fullField))},yy,EH=function(){if(yy)return yy;var e="[a-fA-F\\d:]",r=function(O){return O&&O.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