@cardanvil/frame-kit 0.5.0 → 0.6.0

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.
Files changed (46) hide show
  1. package/README.md +45 -0
  2. package/dist/cli/main.js +16 -0
  3. package/dist/cli/sourceWatcher.d.ts +40 -0
  4. package/dist/cli/sourceWatcher.js +100 -0
  5. package/dist/cli/studio/boxSets.d.ts +33 -0
  6. package/dist/cli/studio/boxSets.js +87 -0
  7. package/dist/cli/studio/edit/applyEdits.d.ts +71 -0
  8. package/dist/cli/studio/edit/applyEdits.js +177 -0
  9. package/dist/cli/studio/edit/impact.d.ts +53 -0
  10. package/dist/cli/studio/edit/impact.js +87 -0
  11. package/dist/cli/studio/edit/resolveModule.d.ts +10 -0
  12. package/dist/cli/studio/edit/resolveModule.js +55 -0
  13. package/dist/cli/studio/edit/resolvePath.d.ts +53 -0
  14. package/dist/cli/studio/edit/resolvePath.js +606 -0
  15. package/dist/cli/studio/edit/sourceIndex.d.ts +29 -0
  16. package/dist/cli/studio/edit/sourceIndex.js +73 -0
  17. package/dist/cli/studio/edit/ts.d.ts +14 -0
  18. package/dist/cli/studio/edit/ts.js +34 -0
  19. package/dist/cli/studio/serve.d.ts +23 -0
  20. package/dist/cli/studio/serve.js +513 -0
  21. package/dist/cli/studio/session.d.ts +73 -0
  22. package/dist/cli/studio/session.js +154 -0
  23. package/dist/cli/watch.d.ts +3 -0
  24. package/dist/cli/watch.js +20 -89
  25. package/dist/layout/assetPlacement.d.ts +71 -0
  26. package/dist/layout/assetPlacement.js +104 -0
  27. package/dist/layout/decorations.d.ts +78 -0
  28. package/dist/layout/decorations.js +108 -0
  29. package/dist/layout/frameLayers.d.ts +136 -0
  30. package/dist/layout/frameLayers.js +291 -0
  31. package/dist/layout/index.d.ts +16 -0
  32. package/dist/layout/index.js +16 -0
  33. package/dist/layout/resolveFrameAsset.d.ts +31 -0
  34. package/dist/layout/resolveFrameAsset.js +58 -0
  35. package/dist/manifest/contract.d.ts +359 -1
  36. package/dist/manifest/contract.js +3 -1
  37. package/dist/schema/frame.d.ts +907 -0
  38. package/dist/schema/frame.js +16 -0
  39. package/dist/schema/frameAssets.d.ts +3 -1
  40. package/dist/schema/frameAssets.js +23 -1
  41. package/dist/studio/assets/PlantinMTProRgIt-D0FB51kb.woff2 +0 -0
  42. package/dist/studio/assets/beleren-b-B3lFvodX.ttf +0 -0
  43. package/dist/studio/assets/beleren-bsc-yvL6mU7X.ttf +0 -0
  44. package/dist/studio/assets/index-CNzyV22G.js +76 -0
  45. package/dist/studio/index.html +12 -0
  46. package/package.json +12 -3
@@ -0,0 +1,76 @@
1
+ function E7(e,t){for(var i=0;i<t.length;i++){const r=t[i];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(r,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function i(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(a){if(a.ep)return;a.ep=!0;const l=i(a);fetch(a.href,l)}})();function T7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fm={exports:{}},oc={};var $x;function k7(){if($x)return oc;$x=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(r,a,l){var c=null;if(l!==void 0&&(c=""+l),a.key!==void 0&&(c=""+a.key),"key"in a){l={};for(var d in a)d!=="key"&&(l[d]=a[d])}else l=a;return a=l.ref,{$$typeof:e,type:r,key:c,ref:a!==void 0?a:null,props:l}}return oc.Fragment=t,oc.jsx=i,oc.jsxs=i,oc}var Ux;function z7(){return Ux||(Ux=1,fm.exports=k7()),fm.exports}var N=z7();function a4(e){var t=Object.create(null);return function(i){return t[i]===void 0&&(t[i]=e(i)),t[i]}}var R7=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,A7=a4(function(e){return R7.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),hm={exports:{}},Pe={};var Wx;function O7(){if(Wx)return Pe;Wx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),y=Symbol.iterator;function x(G){return G===null||typeof G!="object"?null:(G=y&&G[y]||G["@@iterator"],typeof G=="function"?G:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,C={};function R(G,ne,ye){this.props=G,this.context=ne,this.refs=C,this.updater=ye||_}R.prototype.isReactComponent={},R.prototype.setState=function(G,ne){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,ne,"setState")},R.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function z(){}z.prototype=R.prototype;function D(G,ne,ye){this.props=G,this.context=ne,this.refs=C,this.updater=ye||_}var T=D.prototype=new z;T.constructor=D,w(T,R.prototype),T.isPureReactComponent=!0;var k=Array.isArray;function A(){}var L={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function V(G,ne,ye){var _e=ye.ref;return{$$typeof:e,type:G,key:ne,ref:_e!==void 0?_e:null,props:ye}}function M(G,ne){return V(G.type,ne,G.props)}function I(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function U(G){var ne={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(ye){return ne[ye]})}var X=/\/+/g;function K(G,ne){return typeof G=="object"&&G!==null&&G.key!=null?U(""+G.key):ne.toString(36)}function P(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(A,A):(G.status="pending",G.then(function(ne){G.status==="pending"&&(G.status="fulfilled",G.value=ne)},function(ne){G.status==="pending"&&(G.status="rejected",G.reason=ne)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function ee(G,ne,ye,_e,ie){var re=typeof G;(re==="undefined"||re==="boolean")&&(G=null);var be=!1;if(G===null)be=!0;else switch(re){case"bigint":case"string":case"number":be=!0;break;case"object":switch(G.$$typeof){case e:case t:be=!0;break;case m:return be=G._init,ee(be(G._payload),ne,ye,_e,ie)}}if(be)return ie=ie(G),be=_e===""?"."+K(G,0):_e,k(ie)?(ye="",be!=null&&(ye=be.replace(X,"$&/")+"/"),ee(ie,ne,ye,"",function(Xe){return Xe})):ie!=null&&(I(ie)&&(ie=M(ie,ye+(ie.key==null||G&&G.key===ie.key?"":(""+ie.key).replace(X,"$&/")+"/")+be)),ne.push(ie)),1;be=0;var le=_e===""?".":_e+":";if(k(G))for(var xe=0;xe<G.length;xe++)_e=G[xe],re=le+K(_e,xe),be+=ee(_e,ne,ye,re,ie);else if(xe=x(G),typeof xe=="function")for(G=xe.call(G),xe=0;!(_e=G.next()).done;)_e=_e.value,re=le+K(_e,xe++),be+=ee(_e,ne,ye,re,ie);else if(re==="object"){if(typeof G.then=="function")return ee(P(G),ne,ye,_e,ie);throw ne=String(G),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.")}return be}function te(G,ne,ye){if(G==null)return G;var _e=[],ie=0;return ee(G,_e,"","",function(re){return ne.call(ye,re,ie++)}),_e}function de(G){if(G._status===-1){var ne=G._result,ye=ne();ye.then(function(_e){(G._status===0||G._status===-1)&&(G._status=1,G._result=_e,ye.status===void 0&&(ye.status="fulfilled",ye.value=_e))},function(_e){(G._status===0||G._status===-1)&&(G._status=2,G._result=_e,ye.status===void 0&&(ye.status="rejected",ye.reason=_e))}),G._status===-1&&(G._status=0,G._result=ye)}if(G._status===1)return G._result.default;throw G._result}var ce=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ne=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(ne))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)};function Ce(G){var ne=L.T,ye={};ye.types=ne!==null?ne.types:null,L.T=ye;try{var _e=G(),ie=L.S;ie!==null&&ie(ye,_e),typeof _e=="object"&&_e!==null&&typeof _e.then=="function"&&_e.then(A,ce)}catch(re){ce(re)}finally{ne!==null&&ye.types!==null&&(ne.types=ye.types),L.T=ne}}function Ae(G){var ne=L.T;if(ne!==null){var ye=ne.types;ye===null?ne.types=[G]:ye.indexOf(G)===-1&&ye.push(G)}else Ce(Ae.bind(null,G))}var ge={map:te,forEach:function(G,ne,ye){te(G,function(){ne.apply(this,arguments)},ye)},count:function(G){var ne=0;return te(G,function(){ne++}),ne},toArray:function(G){return te(G,function(ne){return ne})||[]},only:function(G){if(!I(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return Pe.Activity=v,Pe.Children=ge,Pe.Component=R,Pe.Fragment=i,Pe.Profiler=a,Pe.PureComponent=D,Pe.StrictMode=r,Pe.Suspense=h,Pe.ViewTransition=b,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(G){return L.H.useMemoCache(G)}},Pe.addTransitionType=Ae,Pe.cache=function(G){return function(){return G.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(G,ne,ye){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var _e=w({},G.props),ie=G.key;if(ne!=null)for(re in ne.key!==void 0&&(ie=""+ne.key),ne)!W.call(ne,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&ne.ref===void 0||(_e[re]=ne[re]);var re=arguments.length-2;if(re===1)_e.children=ye;else if(1<re){for(var be=Array(re),le=0;le<re;le++)be[le]=arguments[le+2];_e.children=be}return V(G.type,ie,_e)},Pe.createContext=function(G){return G={$$typeof:c,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:l,_context:G},G},Pe.createElement=function(G,ne,ye){var _e,ie={},re=null;if(ne!=null)for(_e in ne.key!==void 0&&(re=""+ne.key),ne)W.call(ne,_e)&&_e!=="key"&&_e!=="__self"&&_e!=="__source"&&(ie[_e]=ne[_e]);var be=arguments.length-2;if(be===1)ie.children=ye;else if(1<be){for(var le=Array(be),xe=0;xe<be;xe++)le[xe]=arguments[xe+2];ie.children=le}if(G&&G.defaultProps)for(_e in be=G.defaultProps,be)ie[_e]===void 0&&(ie[_e]=be[_e]);return V(G,re,ie)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(G){return{$$typeof:d,render:G}},Pe.isValidElement=I,Pe.lazy=function(G){return{$$typeof:m,_payload:{_status:-1,_result:G},_init:de}},Pe.memo=function(G,ne){return{$$typeof:p,type:G,compare:ne===void 0?null:ne}},Pe.startTransition=Ce,Pe.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Pe.use=function(G){return L.H.use(G)},Pe.useActionState=function(G,ne,ye){return L.H.useActionState(G,ne,ye)},Pe.useCallback=function(G,ne){return L.H.useCallback(G,ne)},Pe.useContext=function(G){return L.H.useContext(G)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(G,ne){return L.H.useDeferredValue(G,ne)},Pe.useEffect=function(G,ne){return L.H.useEffect(G,ne)},Pe.useEffectEvent=function(G){return L.H.useEffectEvent(G)},Pe.useId=function(){return L.H.useId()},Pe.useImperativeHandle=function(G,ne,ye){return L.H.useImperativeHandle(G,ne,ye)},Pe.useInsertionEffect=function(G,ne){return L.H.useInsertionEffect(G,ne)},Pe.useLayoutEffect=function(G,ne){return L.H.useLayoutEffect(G,ne)},Pe.useMemo=function(G,ne){return L.H.useMemo(G,ne)},Pe.useOptimistic=function(G,ne){return L.H.useOptimistic(G,ne)},Pe.useReducer=function(G,ne,ye){return L.H.useReducer(G,ne,ye)},Pe.useRef=function(G){return L.H.useRef(G)},Pe.useState=function(G){return L.H.useState(G)},Pe.useSyncExternalStore=function(G,ne,ye){return L.H.useSyncExternalStore(G,ne,ye)},Pe.useTransition=function(){return L.H.useTransition()},Pe.version="19.3.0",Pe}var Yx;function fv(){return Yx||(Yx=1,hm.exports=O7()),hm.exports}var O=fv();const Io=T7(O),d0=E7({__proto__:null,default:Io},[O]);function N7(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function I7(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var P7=(function(){function e(i){var r=this;this._insertTag=function(a){var l;r.tags.length===0?r.insertionPoint?l=r.insertionPoint.nextSibling:r.prepend?l=r.container.firstChild:l=r.before:l=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,l),r.tags.push(a)},this.isSpeedy=i.speedy===void 0?!0:i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(I7(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var l=N7(a);try{l.insertRule(r,l.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var a;return(a=r.parentNode)==null?void 0:a.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Sn="-ms-",Af="-moz-",tt="-webkit-",s4="comm",hv="rule",gv="decl",M7="@import",l4="@keyframes",D7="@layer",L7=Math.abs,th=String.fromCharCode,j7=Object.assign;function B7(e,t){return bn(e,0)^45?(((t<<2^bn(e,0))<<2^bn(e,1))<<2^bn(e,2))<<2^bn(e,3):0}function c4(e){return e.trim()}function G7(e,t){return(e=t.exec(e))?e[0]:e}function nt(e,t,i){return e.replace(t,i)}function f0(e,t){return e.indexOf(t)}function bn(e,t){return e.charCodeAt(t)|0}function Yc(e,t,i){return e.slice(t,i)}function ir(e){return e.length}function pv(e){return e.length}function Fd(e,t){return t.push(e),e}function V7(e,t){return e.map(t).join("")}var nh=1,Xs=1,u4=0,Un=0,Ht=0,il="";function ih(e,t,i,r,a,l,c){return{value:e,root:t,parent:i,type:r,props:a,children:l,line:nh,column:Xs,length:c,return:""}}function ac(e,t){return j7(ih("",null,null,"",null,null,0),e,{length:-e.length},t)}function H7(){return Ht}function F7(){return Ht=Un>0?bn(il,--Un):0,Xs--,Ht===10&&(Xs=1,nh--),Ht}function ci(){return Ht=Un<u4?bn(il,Un++):0,Xs++,Ht===10&&(Xs=1,nh++),Ht}function lr(){return bn(il,Un)}function pf(){return Un}function au(e,t){return Yc(il,e,t)}function qc(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function d4(e){return nh=Xs=1,u4=ir(il=e),Un=0,[]}function f4(e){return il="",e}function mf(e){return c4(au(Un-1,h0(e===91?e+2:e===40?e+1:e)))}function $7(e){for(;(Ht=lr())&&Ht<33;)ci();return qc(e)>2||qc(Ht)>3?"":" "}function U7(e,t){for(;--t&&ci()&&!(Ht<48||Ht>102||Ht>57&&Ht<65||Ht>70&&Ht<97););return au(e,pf()+(t<6&&lr()==32&&ci()==32))}function h0(e){for(;ci();)switch(Ht){case e:return Un;case 34:case 39:e!==34&&e!==39&&h0(Ht);break;case 40:e===41&&h0(e);break;case 92:ci();break}return Un}function W7(e,t){for(;ci()&&e+Ht!==57;)if(e+Ht===84&&lr()===47)break;return"/*"+au(t,Un-1)+"*"+th(e===47?e:ci())}function Y7(e){for(;!qc(lr());)ci();return au(e,Un)}function q7(e){return f4(vf("",null,null,null,[""],e=d4(e),0,[0],e))}function vf(e,t,i,r,a,l,c,d,h){for(var p=0,m=0,v=c,b=0,y=0,x=0,_=1,w=1,C=1,R=0,z="",D=a,T=l,k=r,A=z;w;)switch(x=R,R=ci()){case 40:if(x!=108&&bn(A,v-1)==58){f0(A+=nt(mf(R),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:A+=mf(R);break;case 9:case 10:case 13:case 32:A+=$7(x);break;case 92:A+=U7(pf()-1,7);continue;case 47:switch(lr()){case 42:case 47:Fd(X7(W7(ci(),pf()),t,i),h);break;default:A+="/"}break;case 123*_:d[p++]=ir(A)*C;case 125*_:case 59:case 0:switch(R){case 0:case 125:w=0;case 59+m:C==-1&&(A=nt(A,/\f/g,"")),y>0&&ir(A)-v&&Fd(y>32?Xx(A+";",r,i,v-1):Xx(nt(A," ","")+";",r,i,v-2),h);break;case 59:A+=";";default:if(Fd(k=qx(A,t,i,p,m,a,d,z,D=[],T=[],v),l),R===123)if(m===0)vf(A,t,k,k,D,l,v,d,T);else switch(b===99&&bn(A,3)===110?100:b){case 100:case 108:case 109:case 115:vf(e,k,k,r&&Fd(qx(e,k,k,0,0,a,d,z,a,D=[],v),T),a,T,v,d,r?D:T);break;default:vf(A,k,k,k,[""],T,0,d,T)}}p=m=y=0,_=C=1,z=A="",v=c;break;case 58:v=1+ir(A),y=x;default:if(_<1){if(R==123)--_;else if(R==125&&_++==0&&F7()==125)continue}switch(A+=th(R),R*_){case 38:C=m>0?1:(A+="\f",-1);break;case 44:d[p++]=(ir(A)-1)*C,C=1;break;case 64:lr()===45&&(A+=mf(ci())),b=lr(),m=v=ir(z=A+=Y7(pf())),R++;break;case 45:x===45&&ir(A)==2&&(_=0)}}return l}function qx(e,t,i,r,a,l,c,d,h,p,m){for(var v=a-1,b=a===0?l:[""],y=pv(b),x=0,_=0,w=0;x<r;++x)for(var C=0,R=Yc(e,v+1,v=L7(_=c[x])),z=e;C<y;++C)(z=c4(_>0?b[C]+" "+R:nt(R,/&\f/g,b[C])))&&(h[w++]=z);return ih(e,t,i,a===0?hv:d,h,p,m)}function X7(e,t,i){return ih(e,t,i,s4,th(H7()),Yc(e,2,-2),0)}function Xx(e,t,i,r){return ih(e,t,i,gv,Yc(e,0,r),Yc(e,r+1,-1),r)}function $s(e,t){for(var i="",r=pv(e),a=0;a<r;a++)i+=t(e[a],a,e,t)||"";return i}function Z7(e,t,i,r){switch(e.type){case D7:if(e.children.length)break;case M7:case gv:return e.return=e.return||e.value;case s4:return"";case l4:return e.return=e.value+"{"+$s(e.children,r)+"}";case hv:e.value=e.props.join(",")}return ir(i=$s(e.children,r))?e.return=e.value+"{"+i+"}":""}function K7(e){var t=pv(e);return function(i,r,a,l){for(var c="",d=0;d<t;d++)c+=e[d](i,r,a,l)||"";return c}}function Q7(e){return function(t){t.root||(t=t.return)&&e(t)}}var J7=function(t,i,r){for(var a=0,l=0;a=l,l=lr(),a===38&&l===12&&(i[r]=1),!qc(l);)ci();return au(t,Un)},eT=function(t,i){var r=-1,a=44;do switch(qc(a)){case 0:a===38&&lr()===12&&(i[r]=1),t[r]+=J7(Un-1,i,r);break;case 2:t[r]+=mf(a);break;case 4:if(a===44){t[++r]=lr()===58?"&\f":"",i[r]=t[r].length;break}default:t[r]+=th(a)}while(a=ci());return t},tT=function(t,i){return f4(eT(d4(t),i))},Zx=new WeakMap,nT=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var i=t.value,r=t.parent,a=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&i.charCodeAt(0)!==58&&!Zx.get(r))&&!a){Zx.set(t,!0);for(var l=[],c=tT(i,l),d=r.props,h=0,p=0;h<c.length;h++)for(var m=0;m<d.length;m++,p++)t.props[p]=l[h]?c[h].replace(/&\f/g,d[m]):d[m]+" "+c[h]}}},iT=function(t){if(t.type==="decl"){var i=t.value;i.charCodeAt(0)===108&&i.charCodeAt(2)===98&&(t.return="",t.value="")}};function h4(e,t){switch(B7(e,t)){case 5103:return tt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return tt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return tt+e+Af+e+Sn+e+e;case 6828:case 4268:return tt+e+Sn+e+e;case 6165:return tt+e+Sn+"flex-"+e+e;case 5187:return tt+e+nt(e,/(\w+).+(:[^]+)/,tt+"box-$1$2"+Sn+"flex-$1$2")+e;case 5443:return tt+e+Sn+"flex-item-"+nt(e,/flex-|-self/,"")+e;case 4675:return tt+e+Sn+"flex-line-pack"+nt(e,/align-content|flex-|-self/,"")+e;case 5548:return tt+e+Sn+nt(e,"shrink","negative")+e;case 5292:return tt+e+Sn+nt(e,"basis","preferred-size")+e;case 6060:return tt+"box-"+nt(e,"-grow","")+tt+e+Sn+nt(e,"grow","positive")+e;case 4554:return tt+nt(e,/([^-])(transform)/g,"$1"+tt+"$2")+e;case 6187:return nt(nt(nt(e,/(zoom-|grab)/,tt+"$1"),/(image-set)/,tt+"$1"),e,"")+e;case 5495:case 3959:return nt(e,/(image-set\([^]*)/,tt+"$1$`$1");case 4968:return nt(nt(e,/(.+:)(flex-)?(.*)/,tt+"box-pack:$3"+Sn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+tt+e+e;case 4095:case 3583:case 4068:case 2532:return nt(e,/(.+)-inline(.+)/,tt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ir(e)-1-t>6)switch(bn(e,t+1)){case 109:if(bn(e,t+4)!==45)break;case 102:return nt(e,/(.+:)(.+)-([^]+)/,"$1"+tt+"$2-$3$1"+Af+(bn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~f0(e,"stretch")?h4(nt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(bn(e,t+1)!==115)break;case 6444:switch(bn(e,ir(e)-3-(~f0(e,"!important")&&10))){case 107:return nt(e,":",":"+tt)+e;case 101:return nt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+tt+(bn(e,14)===45?"inline-":"")+"box$3$1"+tt+"$2$3$1"+Sn+"$2box$3")+e}break;case 5936:switch(bn(e,t+11)){case 114:return tt+e+Sn+nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return tt+e+Sn+nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return tt+e+Sn+nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return tt+e+Sn+e+e}return e}var rT=function(t,i,r,a){if(t.length>-1&&!t.return)switch(t.type){case gv:t.return=h4(t.value,t.length);break;case l4:return $s([ac(t,{value:nt(t.value,"@","@"+tt)})],a);case hv:if(t.length)return V7(t.props,function(l){switch(G7(l,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $s([ac(t,{props:[nt(l,/:(read-\w+)/,":"+Af+"$1")]})],a);case"::placeholder":return $s([ac(t,{props:[nt(l,/:(plac\w+)/,":"+tt+"input-$1")]}),ac(t,{props:[nt(l,/:(plac\w+)/,":"+Af+"$1")]}),ac(t,{props:[nt(l,/:(plac\w+)/,Sn+"input-$1")]})],a)}return""})}},oT=[rT],aT=function(t){var i=t.key;if(i==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(_){var w=_.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(_),_.setAttribute("data-s",""))})}var a=t.stylisPlugins||oT,l={},c,d=[];c=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+i+' "]'),function(_){for(var w=_.getAttribute("data-emotion").split(" "),C=1;C<w.length;C++)l[w[C]]=!0;d.push(_)});var h,p=[nT,iT];{var m,v=[Z7,Q7(function(_){m.insert(_)})],b=K7(p.concat(a,v)),y=function(w){return $s(q7(w),b)};h=function(w,C,R,z){m=R,y(w?w+"{"+C.styles+"}":C.styles),z&&(x.inserted[C.name]=!0)}}var x={key:i,sheet:new P7({key:i,container:c,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:l,registered:{},insert:h};return x.sheet.hydrate(d),x},gm={exports:{}},rt={};var Kx;function sT(){if(Kx)return rt;Kx=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,d=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,_=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function z(T){if(typeof T=="object"&&T!==null){var k=T.$$typeof;switch(k){case t:switch(T=T.type,T){case h:case p:case r:case l:case a:case v:return T;default:switch(T=T&&T.$$typeof,T){case d:case m:case x:case y:case c:return T;default:return k}}case i:return k}}}function D(T){return z(T)===p}return rt.AsyncMode=h,rt.ConcurrentMode=p,rt.ContextConsumer=d,rt.ContextProvider=c,rt.Element=t,rt.ForwardRef=m,rt.Fragment=r,rt.Lazy=x,rt.Memo=y,rt.Portal=i,rt.Profiler=l,rt.StrictMode=a,rt.Suspense=v,rt.isAsyncMode=function(T){return D(T)||z(T)===h},rt.isConcurrentMode=D,rt.isContextConsumer=function(T){return z(T)===d},rt.isContextProvider=function(T){return z(T)===c},rt.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},rt.isForwardRef=function(T){return z(T)===m},rt.isFragment=function(T){return z(T)===r},rt.isLazy=function(T){return z(T)===x},rt.isMemo=function(T){return z(T)===y},rt.isPortal=function(T){return z(T)===i},rt.isProfiler=function(T){return z(T)===l},rt.isStrictMode=function(T){return z(T)===a},rt.isSuspense=function(T){return z(T)===v},rt.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===p||T===l||T===a||T===v||T===b||typeof T=="object"&&T!==null&&(T.$$typeof===x||T.$$typeof===y||T.$$typeof===c||T.$$typeof===d||T.$$typeof===m||T.$$typeof===w||T.$$typeof===C||T.$$typeof===R||T.$$typeof===_)},rt.typeOf=z,rt}var Qx;function lT(){return Qx||(Qx=1,gm.exports=sT()),gm.exports}var pm,Jx;function cT(){if(Jx)return pm;Jx=1;var e=lT(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[e.ForwardRef]=r,l[e.Memo]=a;function c(x){return e.isMemo(x)?a:l[x.$$typeof]||t}var d=Object.defineProperty,h=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,v=Object.getPrototypeOf,b=Object.prototype;function y(x,_,w){if(typeof _!="string"){if(b){var C=v(_);C&&C!==b&&y(x,C,w)}var R=h(_);p&&(R=R.concat(p(_)));for(var z=c(x),D=c(_),T=0;T<R.length;++T){var k=R[T];if(!i[k]&&!(w&&w[k])&&!(D&&D[k])&&!(z&&z[k])){var A=m(_,k);try{d(x,k,A)}catch{}}}}return x}return pm=y,pm}cT();var uT=!0;function g4(e,t,i){var r="";return i.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(r+=a+" ")}),r}var mv=function(t,i,r){var a=t.key+"-"+i.name;(r===!1||uT===!1)&&t.registered[a]===void 0&&(t.registered[a]=i.styles)},vv=function(t,i,r){mv(t,i,r);var a=t.key+"-"+i.name;if(t.inserted[i.name]===void 0){var l=i;do t.insert(i===l?"."+a:"",l,t.sheet,!0),l=l.next;while(l!==void 0)}};function dT(e){for(var t=0,i,r=0,a=e.length;a>=4;++r,a-=4)i=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,i=(i&65535)*1540483477+((i>>>16)*59797<<16),i^=i>>>24,t=(i&65535)*1540483477+((i>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var fT={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hT=/[A-Z]|^ms/g,gT=/_EMO_([^_]+?)_([^]*?)_EMO_/g,p4=function(t){return t.charCodeAt(1)===45},eS=function(t){return t!=null&&typeof t!="boolean"},mm=a4(function(e){return p4(e)?e:e.replace(hT,"-$&").toLowerCase()}),tS=function(t,i){switch(t){case"animation":case"animationName":if(typeof i=="string")return i.replace(gT,function(r,a,l){return rr={name:a,styles:l,next:rr},a})}return fT[t]!==1&&!p4(t)&&typeof i=="number"&&i!==0?i+"px":i};function Xc(e,t,i){if(i==null)return"";var r=i;if(r.__emotion_styles!==void 0)return r;switch(typeof i){case"boolean":return"";case"object":{var a=i;if(a.anim===1)return rr={name:a.name,styles:a.styles,next:rr},a.name;var l=i;if(l.styles!==void 0){var c=l.next;if(c!==void 0)for(;c!==void 0;)rr={name:c.name,styles:c.styles,next:rr},c=c.next;var d=l.styles+";";return d}return pT(e,t,i)}case"function":{if(e!==void 0){var h=rr,p=i(e);return rr=h,Xc(e,t,p)}break}}var m=i;if(t==null)return m;var v=t[m];return v!==void 0?v:m}function pT(e,t,i){var r="";if(Array.isArray(i))for(var a=0;a<i.length;a++)r+=Xc(e,t,i[a])+";";else for(var l in i){var c=i[l];if(typeof c!="object"){var d=c;t!=null&&t[d]!==void 0?r+=l+"{"+t[d]+"}":eS(d)&&(r+=mm(l)+":"+tS(l,d)+";")}else if(Array.isArray(c)&&typeof c[0]=="string"&&(t==null||t[c[0]]===void 0))for(var h=0;h<c.length;h++)eS(c[h])&&(r+=mm(l)+":"+tS(l,c[h])+";");else{var p=Xc(e,t,c);switch(l){case"animation":case"animationName":{r+=mm(l)+":"+p+";";break}default:r+=l+"{"+p+"}"}}}return r}var nS=/label:\s*([^\s;{]+)\s*(;|$)/g,rr;function bv(e,t,i){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,a="";rr=void 0;var l=e[0];if(l==null||l.raw===void 0)r=!1,a+=Xc(i,t,l);else{var c=l;a+=c[0]}for(var d=1;d<e.length;d++)if(a+=Xc(i,t,e[d]),r){var h=l;a+=h[d]}nS.lastIndex=0;for(var p="",m;(m=nS.exec(a))!==null;)p+="-"+m[1];var v=dT(a)+p;return{name:v,styles:a,next:rr}}var mT=function(t){return t()},m4=d0.useInsertionEffect?d0.useInsertionEffect:!1,v4=m4||mT,iS=m4||O.useLayoutEffect,b4=O.createContext(typeof HTMLElement<"u"?aT({key:"css"}):null);b4.Provider;var yv=function(t){return O.forwardRef(function(i,r){var a=O.useContext(b4);return t(i,a,r)})},xv=O.createContext({}),Sv={}.hasOwnProperty,g0="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",vT=function(t,i){var r={};for(var a in i)Sv.call(i,a)&&(r[a]=i[a]);return r[g0]=t,r},bT=function(t){var i=t.cache,r=t.serialized,a=t.isStringTag;return mv(i,r,a),v4(function(){return vv(i,r,a)}),null},yT=yv(function(e,t,i){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var a=e[g0],l=[r],c="";typeof e.className=="string"?c=g4(t.registered,l,e.className):e.className!=null&&(c=e.className+" ");var d=bv(l,void 0,O.useContext(xv));c+=t.key+"-"+d.name;var h={};for(var p in e)Sv.call(e,p)&&p!=="css"&&p!==g0&&(h[p]=e[p]);return h.className=c,i&&(h.ref=i),O.createElement(O.Fragment,null,O.createElement(bT,{cache:t,serialized:d,isStringTag:typeof a=="string"}),O.createElement(a,h))}),xT=yT,rS=function(t,i){var r=arguments;if(i==null||!Sv.call(i,"css"))return O.createElement.apply(void 0,r);var a=r.length,l=new Array(a);l[0]=xT,l[1]=vT(t,i);for(var c=2;c<a;c++)l[c]=r[c];return O.createElement.apply(null,l)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(rS||(rS={}));var oS=yv(function(e,t){var i=e.styles,r=bv([i],void 0,O.useContext(xv)),a=O.useRef();return iS(function(){var l=t.key+"-global",c=new t.sheet.constructor({key:l,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),d=!1,h=document.querySelector('style[data-emotion="'+l+" "+r.name+'"]');return t.sheet.tags.length&&(c.before=t.sheet.tags[0]),h!==null&&(d=!0,h.setAttribute("data-emotion",l),c.hydrate([h])),a.current=[c,d],function(){c.flush()}},[t]),iS(function(){var l=a.current,c=l[0],d=l[1];if(d){l[1]=!1;return}if(r.next!==void 0&&vv(t,r.next,!0),c.tags.length){var h=c.tags[c.tags.length-1].nextElementSibling;c.before=h,c.flush()}t.insert("",r,c,!1)},[t,r.name]),null});function ST(...e){return function(...i){e.forEach(r=>r?.(...i))}}const _T=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),wT=/^on[A-Z]/;function Zc(...e){let t={};for(let i of e){for(let r in t){if(wT.test(r)&&typeof t[r]=="function"&&typeof i[r]=="function"){t[r]=ST(t[r],i[r]);continue}if(r==="className"||r==="class"){t[r]=_T(t[r],i[r]);continue}if(r==="style"){t[r]=Object.assign({},t[r]??{},i[r]??{});continue}t[r]=i[r]!==void 0?i[r]:t[r]}for(let r in i)t[r]===void 0&&(t[r]=i[r])}return t}const CT=parseInt(O.version.split(".")[0],10),ET=CT>=19;function vm(e,t){if(e!=null){if(typeof e=="function")return e(t);try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function TT(...e){const t=e.filter(i=>i!=null);if(ET){const i=new Map;return r=>(t.forEach(a=>{const l=vm(a,r);l&&i.set(a,l)}),()=>{t.forEach(a=>{const l=i.get(a);l&&typeof l=="function"?l():vm(a,null)}),i.clear()})}else return i=>{t.forEach(r=>{vm(r,i)})}}function su(e){const t=Object.assign({},e);for(let i in t)t[i]===void 0&&delete t[i];return t}const Fn=e=>e!=null&&typeof e=="object"&&!Array.isArray(e),ji=e=>typeof e=="string",_v=e=>typeof e=="function",Di=(...e)=>{const t=[];for(let i=0;i<e.length;i++){const r=e[i];if(!ji(r))continue;const a=r.trim();a&&t.push(a)}return t.join(" ")};function kT(e){return e.default||e}function zT(e){const t=O.version;return!ji(t)||t.startsWith("18.")?e?.ref:e?.props?.ref}const wv=(...e)=>{const t=e.reduce((i,r)=>(r?.forEach(a=>i.add(a)),i),new Set([]));return Array.from(t)};function RT(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function jc(e={}){const{name:t,strict:i=!0,hookName:r="useContext",providerName:a="Provider",errorMessage:l,defaultValue:c}=e,d=O.createContext(c);d.displayName=t;function h(){const p=O.useContext(d);if(!p&&i){const m=new Error(l??RT(r,a));throw m.name="ContextError",Error.captureStackTrace?.(m,h),m}return p}return[d.Provider,h,d]}const[AT,rh]=jc({name:"ChakraContext",strict:!0,providerName:"<ChakraProvider />"});function OT(e){const{value:t,children:i}=e;return N.jsxs(AT,{value:t,children:[!t._config.disableLayers&&N.jsx(oS,{styles:t.layers.atRule}),N.jsx(oS,{styles:t._global}),i]})}const NT=(e,t)=>{const i={},r={},a=Object.keys(e);for(const l of a)t(l)?r[l]=e[l]:i[l]=e[l];return[r,i]},Us=(e,t)=>{const i=_v(t)?t:r=>t.includes(r);return NT(e,i)},IT=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function PT(e){return typeof e=="string"&&IT.has(e)}function MT(e,t,i){const{css:r,isValidProperty:a}=rh(),{children:l,...c}=e,d=O.useMemo(()=>{const[b,y]=Us(c,R=>i(R,t.variantKeys)),[x,_]=Us(y,t.variantKeys),[w,C]=Us(_,a);return{forwardedProps:b,variantProps:x,styleProps:w,elementProps:C}},[t.variantKeys,i,c,a]),{css:h,...p}=d.styleProps,m=O.useMemo(()=>{const b={...d.variantProps},y=t.variantKeys.includes("colorPalette"),x=t.variantKeys.includes("orientation");return y||(b.colorPalette=c.colorPalette),x||(b.orientation=c.orientation),t(b)},[t,d.variantProps,c.colorPalette,c.orientation]);return{styles:O.useMemo(()=>r(m,...DT(h),p),[r,m,h,p]),props:{...d.forwardedProps,...d.elementProps,children:l}}}const DT=e=>(Array.isArray(e)?e:[e]).filter(Boolean).flat(),LT=kT(A7),jT=LT,BT=e=>e!=="theme",GT=(e,t,i)=>{let r;if(t){const a=t.shouldForwardProp;r=e.__emotion_forwardProp&&a?l=>e.__emotion_forwardProp(l)&&a(l):a}return typeof r!="function"&&i&&(r=e.__emotion_forwardProp),r};let VT=typeof document<"u";const aS=({cache:e,serialized:t,isStringTag:i})=>{mv(e,t,i);const r=v4(()=>vv(e,t,i));if(!VT&&r!==void 0){let a=t.name,l=t.next;for(;l!==void 0;)a=Di(a,l.name),l=l.next;return N.jsx("style",{"data-emotion":Di(e.key,a),dangerouslySetInnerHTML:{__html:r},nonce:e.sheet.nonce})}return null},sS={path:["d"],text:["x","y"],circle:["cx","cy","r"],rect:["width","height","x","y","rx","ry"],ellipse:["cx","cy","rx","ry"],g:["transform"],stop:["offset","stopOpacity"]},HT=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),FT=(e,t={},i={})=>{if(HT(sS,e)){i.forwardProps||(i.forwardProps=[]);const p=sS[e];i.forwardProps=wv([...i.forwardProps,...p])}const r=e.__emotion_real===e,a=r&&e.__emotion_base||e;let l,c;i!==void 0&&(l=i.label,c=i.target);let d=[];const h=yv((p,m,v)=>{const{cva:b,isValidProperty:y}=rh(),x=t.__cva__?t:b(t),_=e.__emotion_cva&&!e.__emotion_cva.__cva__?b(e.__emotion_cva):e.__emotion_cva,w=UT(_,x),C=P=>(ee,te)=>P.includes(ee)?!0:!te?.includes(ee)&&!y(ee);!i.shouldForwardProp&&i.forwardProps&&(i.shouldForwardProp=C(i.forwardProps));const R=(P,ee)=>{const te=typeof e=="string"&&e.charCodeAt(0)>96?jT:BT,de=!ee?.includes(P)&&!y(P);return te(P)&&de},z=GT(e,i,r)||R,D=O.useMemo(()=>Object.assign({},i.defaultProps,su(p)),[p]),{props:T,styles:k}=MT(D,w,z);let A="",L=[k],W=T;if(T.theme==null){W={};for(let P in T)W[P]=T[P];W.theme=O.useContext(xv)}typeof T.className=="string"?A=g4(m.registered,L,T.className):T.className!=null&&(A=Di(A,T.className));const V=bv(d.concat(L),m.registered,W);V.styles&&(A=Di(A,`${m.key}-${V.name}`)),c!==void 0&&(A=Di(A,c));const M=!z("as");let I=M&&T.as||a,U={};for(let P in T)if(!(M&&P==="as")){if(PT(P)){const ee=P.replace("html","").toLowerCase();U[ee]=T[P];continue}z(P)&&(U[P]=T[P])}let X=A.trim();X?U.className=X:Reflect.deleteProperty(U,"className"),U.ref=v;const K=i.forwardAsChild||i.forwardProps?.includes("asChild");if(T.asChild&&!K){const P=O.isValidElement(T.children)?O.Children.only(T.children):O.Children.toArray(T.children).find(O.isValidElement);if(!P)throw new Error("[chakra-ui > factory] No valid child found");I=P.type,U.children=null,Reflect.deleteProperty(U,"asChild"),U=Zc(U,P.props),U.ref=TT(v,zT(P))}return U.as&&K?(U.as=void 0,N.jsxs(O.Fragment,{children:[N.jsx(aS,{cache:m,serialized:V,isStringTag:typeof I=="string"}),N.jsx(I,{asChild:!0,...U,children:N.jsx(T.as,{children:U.children})})]})):N.jsxs(O.Fragment,{children:[N.jsx(aS,{cache:m,serialized:V,isStringTag:typeof I=="string"}),N.jsx(I,{...U})]})});return h.displayName=l!==void 0?l:`chakra(${typeof a=="string"?a:a.displayName||a.name||"Component"})`,h.__emotion_real=h,h.__emotion_base=a,h.__emotion_forwardProp=i.shouldForwardProp,h.__emotion_cva=t,Object.defineProperty(h,"toString",{value(){return`.${c}`}}),h},bm=FT.bind(),ym=new Map,$T=new Proxy(bm,{apply(e,t,i){return bm(...i)},get(e,t){return ym.has(t)||ym.set(t,bm(t)),ym.get(t)}}),di=$T,UT=(e,t)=>e&&!t?e:!e&&t?t:e.merge(t),Ci=di("div");Ci.displayName="Box";const y4=O.forwardRef(function(t,i){const{size:r,...a}=t;return N.jsx(Ci,{...a,ref:i,boxSize:r,css:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexGrow:0,...t.css}})});y4.displayName="Square";const x4=O.forwardRef(function(t,i){const{size:r,...a}=t;return N.jsx(y4,{size:r,ref:i,borderRadius:"9999px",...a})});x4.displayName="Circle";function bf(e){if(typeof e!="string")return e.displayName||e.name}function oh(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function lS(e,t){return e+oh(t)}function WT(e,t){if(t)return e+oh(t)}const YT=Object.freeze({}),qT=Object.freeze({});function XT(e){const{key:t,recipe:i}=e,r=rh();return O.useMemo(()=>i?r.cva(i):t!=null?r.getRecipeFn(t):r.cva({}),[t,i,r])}function rl(e){const{key:t,recipe:i}=e,r=oh(t||i.className||"Component"),[a,l]=jc({strict:!1,name:`${r}PropsContext`,providerName:`${r}PropsContext`});function c(p){const{unstyled:m,...v}=p,b=XT({key:t,recipe:v.recipe||i}),[y,x]=O.useMemo(()=>b.splitVariantProps(v),[b,v]);return{styles:m?YT:b(y),className:b.className,props:x}}const d=(p,m)=>{const{displayName:v,...b}=m??{},y=di(p,{},b),x=O.forwardRef((_,w)=>{const C=l(),R=O.useMemo(()=>Zc(C,_),[_,C]),{styles:z,className:D,props:T}=c(R);return N.jsx(y,{...T,ref:w,css:[z,R.css],className:Di(D,R.className)})});return x.displayName=v??r??bf(p),x};function h(){return a}return{withContext:d,PropsProvider:a,withPropsProvider:h,usePropsContext:l,useRecipeResult:c}}const Kc=O.forwardRef(function(t,i){const{templateAreas:r,column:a,row:l,autoFlow:c,autoRows:d,templateRows:h,autoColumns:p,templateColumns:m,inline:v,...b}=t;return N.jsx(di.div,{...b,ref:i,css:[{display:v?"inline-grid":"grid",gridTemplateAreas:r,gridAutoColumns:p,gridColumn:a,gridRow:l,gridAutoFlow:c,gridAutoRows:d,gridTemplateRows:h,gridTemplateColumns:m},t.css]})});Kc.displayName="Grid";function ZT(e){return e==null?[]:Array.isArray(e)?e:[e]}var KT=(e,t)=>e.indexOf(t)!==-1,QT=(e,...t)=>e.concat(t),JT=(e,...t)=>e.filter(i=>!t.includes(i)),cS=(e,t)=>KT(e,t)?JT(e,t):QT(e,t),uS=e=>e?.constructor.name==="Array",ek=(e,t)=>{if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!ol(e[i],t[i]))return!1;return!0},ol=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(uS(e)&&uS(t))return ek(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const i=Object.keys(t??Object.create(null)),r=i.length;for(let a=0;a<r;a++)if(!Reflect.has(e,i[a]))return!1;for(let a=0;a<r;a++){const l=i[a];if(!ol(e[l],t[l]))return!1}return!0},tk=e=>Array.isArray(e),S4=e=>e!=null&&typeof e=="object",xm=e=>S4(e)&&!tk(e),yf=e=>typeof e=="string",Ta=e=>typeof e=="function",nk=e=>e==null,Oa=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ik=e=>Object.prototype.toString.call(e),_4=Function.prototype.toString,rk=_4.call(Object),ok=e=>{if(!S4(e)||ik(e)!="[object Object]"||lk(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const i=Oa(t,"constructor")&&t.constructor;return typeof i=="function"&&i instanceof i&&_4.call(i)==rk},ak=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,sk=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,lk=e=>ak(e)||sk(e),ck=e=>e(),w4=()=>{},Qc=(...e)=>(...t)=>{e.forEach(function(i){i?.(...t)})};function Jc(e){if(!ok(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),i={};for(const r of t){const a=e[r];a!==void 0&&(i[r]=Jc(a))}return i}function uk(e,t){if(!t)return e;const i={...e},r=t;for(const a in r){const l=r[a];l!==void 0&&(i[a]=l)}return i}function xf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function dS(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function lu(e,t){if(e==null)throw new Error(t())}function dk(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Nn(e={}){const{name:t,strict:i=!0,hookName:r="useContext",providerName:a="Provider",errorMessage:l,defaultValue:c}=e,d=O.createContext(c);d.displayName=t;function h(){const p=O.useContext(d);if(!p&&i){const m=new Error(l??dk(r,a));throw m.name="ContextError",Oa(Error,"captureStackTrace")&&Ta(Error.captureStackTrace)&&Error.captureStackTrace(m,h),m}return p}return[d.Provider,h,d]}var[rq,cu]=Nn({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}});function fk(...e){return t=>{const i=[];let r=!1;for(const a of e)if(typeof a=="function"){const l=a(t);typeof l=="function"?(r=!0,i.push(l)):i.push(()=>a(null))}else a&&(a.current=t,i.push(()=>{a.current=null}));if(r)return()=>{for(const a of i)a()}}}function al(...e){return O.useCallback(fk(...e),e)}var C4=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),hk=(...e)=>Array.from(new Set(C4(...e).split(/\s+/).filter(Boolean))).join(" "),gk=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,fS=e=>{const t={};let i;for(;i=gk.exec(e);)t[i[1]]=i[2];return t},pk=(e,t)=>{if(yf(e)){if(yf(t))return`${e};${t}`;e=fS(e)}else yf(t)&&(t=fS(t));return Object.assign({},e??{},t??{})};function Ie(...e){let t={};for(let i of e){if(!i)continue;for(let a in t){if(a.startsWith("on")&&typeof t[a]=="function"&&typeof i[a]=="function"){t[a]=Qc(i[a],t[a]);continue}if(a==="className"||a==="class"){t[a]=C4(t[a],i[a]);continue}if(a==="style"){t[a]=pk(t[a],i[a]);continue}if(a==="data-ownedby"){t[a]=hk(t[a],i[a]);continue}t[a]=i[a]!==void 0?i[a]:t[a]}for(let a in i)t[a]===void 0&&(t[a]=i[a]);const r=Object.getOwnPropertySymbols(i);for(let a of r)t[a]=i[a]}return t}var Vo=".",E4="#",hS=new WeakMap,T4=new WeakMap;function p0(e){return e.join(Vo)}function mk(e){return e.includes(Vo)}function k4(e){return e.startsWith(E4)}function vk(e){return e.startsWith(Vo)}function bk(e){return k4(e)?e.slice(E4.length):e}function m0(e,t){return e?`${e}${Vo}${t}`:t}function yk(e){const t=new Map,i=new Map,r=(a,l)=>{t.set(a,l);const c=l.id;c&&(i.has(c)&&dS(`[zag-js] Duplicate state id: "${c}"`),i.set(c,a));const d=l.states;if(d){lu(l.initial,()=>`[zag-js] Compound state "${a}" has child states but no "initial" property`),l.initial in d||dS(`[zag-js] Compound state "${a}" has initial "${String(l.initial)}" which is not a child state`);for(const[h,p]of Object.entries(d)){if(!p)continue;const m=m0(a,h);r(m,p)}}};for(const[a,l]of Object.entries(e.states))l&&r(a,l);return{index:t,idIndex:i}}function uu(e){const t=hS.get(e);if(t)return t;const{index:i,idIndex:r}=yk(e);return hS.set(e,i),T4.set(e,r),i}function xk(e,t){return uu(e),T4.get(e)?.get(t)}function Cv(e){return e?String(e).split(Vo).filter(Boolean):[]}function Of(e,t){if(!t)return[];const i=uu(e),r=Cv(t),a=[],l=[];for(const c of r){l.push(c);const d=p0(l),h=i.get(d);if(!h)break;a.push({path:d,state:h})}return a}function sc(e,t){const i=uu(e),r=Cv(t);if(!r.length)return t;const a=[];for(const d of r){a.push(d);const h=p0(a);if(!i.has(h))return t}let l=p0(a),c=i.get(l);for(;c?.initial;){const d=`${l}${Vo}${c.initial}`,h=i.get(d);if(!h)break;l=d,c=h}return l}function gS(e,t){return uu(e).has(t)}function pS(e,t,i){const r=String(t);if(k4(r)){const a=bk(r),l=xk(e,a);return lu(l,()=>`[zag-js] Unknown state id: "${a}"`),sc(e,l)}if(vk(r)&&i){const a=m0(i,r.slice(1));return sc(e,a)}if(!mk(r)&&i){const a=Cv(i);for(let l=a.length-1;l>=1;l--){const c=a.slice(0,l).join(Vo),d=m0(c,r);if(gS(e,d))return sc(e,d)}if(gS(e,r))return sc(e,r)}return sc(e,r)}function Sk(e,t,i){const r=Of(e,t);for(let l=r.length-1;l>=0;l--){const d=r[l]?.state.on?.[i];if(d)return{transitions:d,source:r[l]?.path}}return{transitions:e.on?.[i],source:void 0}}function _k(e,t,i,r){const a=t?Of(e,t):[],l=Of(e,i);let c=0;for(;c<a.length&&c<l.length&&a[c]?.path===l[c]?.path;)c+=1;let d=a.slice(c).reverse(),h=l.slice(c);const p=a[a.length-1]?.path===l[l.length-1]?.path;return r&&p&&(d=a.slice().reverse(),h=l),{exiting:d,entering:h}}function wk(e,t){return e?e===t||e.startsWith(`${t}${Vo}`):!1}function Ck(e,t,i){return Of(e,t).some(r=>r.state.tags?.includes(i))}function z4(){return{and:(...e)=>function(i){return e.every(r=>i.guard(r))},or:(...e)=>function(i){return e.some(r=>i.guard(r))},not:e=>function(i){return!i.guard(e)}}}function ah(e){return uu(e),e}function Ek(){return{guards:z4(),createMachine:e=>ah(e),choose:e=>function({choose:i}){return i(e)?.actions}}}var Ea=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ea||{}),$d="__init__",Tk=Object.defineProperty,kk=(e,t,i)=>t in e?Tk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Sm=(e,t,i)=>kk(e,typeof t!="symbol"?t+"":t,i),zk=(e,t)=>e.map((i,r)=>e[(Math.max(t,0)+r)%e.length]),Nf=()=>{},sh=e=>typeof e=="object"&&e!==null,Ne=e=>e?"":void 0,Ev=e=>e?"true":void 0,Rk=/\\/g,Ak=/"/g,Ok=e=>globalThis.CSS?.escape?.(e)??e.replace(Rk,"\\\\").replace(Ak,'\\"'),Nk=e=>`[data-ownedby~="${Ok(String(e))}"]`,Ik=1,Pk=9,Mk=11,Yt=e=>sh(e)&&e.nodeType===Ik&&typeof e.nodeName=="string",lh=e=>sh(e)&&e.nodeType===Pk,Dk=e=>sh(e)&&e===e.window,R4=e=>Yt(e)?e.localName||"":"#document";function Lk(e){return["html","body","#document"].includes(R4(e))}var A4=e=>sh(e)&&e.nodeType!==void 0,Ia=e=>A4(e)&&e.nodeType===Mk&&"host"in e,O4=e=>Yt(e)&&e.localName==="input",jk=e=>Yt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function v0(e){if(!e)return!1;const t=e.getRootNode();return Oo(t)===e}var Bk=/(textarea|select)/;function Bc(e){if(e==null||!Yt(e))return!1;try{return O4(e)&&e.selectionStart!=null||Bk.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Do(e,t){if(!e||!t||!Yt(e)||!A4(t))return!1;if(Yt(t)&&e===t||e.contains(t))return!0;const i=t.getRootNode?.();if(i&&Ia(i)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function In(e){return lh(e)?e:Dk(e)?e.document:e?.ownerDocument??document}function Gk(e){return In(e).documentElement}function On(e){return Ia(e)?On(e.host):lh(e)?e.defaultView??window:Yt(e)?e.ownerDocument?.defaultView??window:window}function Oo(e){let t=e.activeElement;for(;t?.shadowRoot;){const i=t.shadowRoot.activeElement;if(!i||i===t)break;t=i}return t}function Vk(e){if(R4(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ia(e)&&e.host||Gk(e);return Ia(t)?t.host:t}function Tv(e){let t;try{if(t=e.getRootNode({composed:!0}),lh(t)||Ia(t))return t}catch{}return e.ownerDocument??document}var _m=new WeakMap;function Zs(e){return _m.has(e)||_m.set(e,On(e).getComputedStyle(e)),_m.get(e)}var kv=new Set(["menu","listbox","dialog","grid","tree","region","application"]),Hk=e=>kv.has(e),N4=e=>e.getAttribute("aria-controls")?.split(" ")||[];function I4(e,t){const i=new Set,r=Tv(e),a=l=>{const c=l.querySelectorAll("[aria-controls]");for(const d of c){if(d.getAttribute("aria-expanded")!=="true")continue;const h=N4(d);for(const p of h){if(!p||i.has(p))continue;i.add(p);const m=r.getElementById(p);if(m){const v=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";if(v&&Hk(v)&&!b&&(m===t||m.contains(t)||a(m)))return!0}}}return!1};return a(e)}function P4(e,t){const i=Tv(e),r=new Set,a=l=>{const c=l.querySelectorAll("[aria-controls]");for(const d of c){if(d.getAttribute("aria-expanded")!=="true")continue;const h=N4(d);for(const p of h){if(!p||r.has(p))continue;r.add(p);const m=i.getElementById(p);if(m){const v=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";v&&kv.has(v)&&!b&&(t(m),a(m))}}}};a(e)}function Fk(e){const t=new Set;return P4(e,i=>{e.contains(i)||t.add(i)}),Array.from(t)}function $k(e){const t=e.getAttribute("role");return!!(t&&kv.has(t))}function Uk(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function Wk(e){return Uk(e)?!0:!!e.querySelector?.('[aria-controls][aria-expanded="true"]')}function Yk(e){if(!e.id)return!1;const t=Tv(e),i=CSS.escape(e.id),r=`[aria-controls~="${i}"][aria-expanded="true"], [aria-controls="${i}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&$k(e))}var zv=()=>typeof document<"u";function qk(){return navigator.userAgentData?.platform??navigator.platform}function Xk(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:i})=>`${t}/${i}`).join(" "):navigator.userAgent}var Rv=e=>zv()&&e.test(qk()),Zk=e=>zv()&&e.test(Xk()),Kk=/^iPhone/i,Qk=/^iPad/i,Jk=/^Mac/i,ez=/Android/i,mS=()=>zv()&&!!navigator.maxTouchPoints,tz=()=>Rv(Kk),nz=()=>Rv(Qk)||ch()&&navigator.maxTouchPoints>1,iz=()=>tz()||nz(),ch=()=>Rv(Jk),rz=()=>Zk(ez);function oz(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function nn(e){return oz(e)?.[0]??e.target}function az(e){const t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const r=e.button===1,a=b0(e);return r||a}function sz(e){const t=e.currentTarget;if(!t)return!1;const i=t.localName;return e.altKey?i==="a"||i==="button"&&t.type==="submit"||i==="input"&&t.type==="submit":!1}function lz(e){return Av(e).isComposing||e.keyCode===229}function b0(e){return ch()?e.metaKey:e.ctrlKey}function cz(e){return e.pointerType===""&&e.isTrusted?!0:rz()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var M4=e=>e.button===2||ch()&&e.ctrlKey&&e.button===0,uz={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},vS={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function y0(e,t={}){const{dir:i="ltr",orientation:r="horizontal"}=t;let a=e.key;return a=uz[a]??a,i==="rtl"&&r==="horizontal"&&a in vS&&(a=vS[a]),a}function Av(e){return e.nativeEvent??e}var or=(e,t,i,r)=>{const a=typeof e=="function"?e():e;return a?.addEventListener(t,i,r),()=>{a?.removeEventListener(t,i,r)}};function dz(e){return e.matches("textarea, input, select, button")}function fz(e,t){if(!e)return;const i=dz(e)?e.form:e.closest("form"),r=a=>{a.defaultPrevented||t()};return i?.addEventListener("reset",r,{passive:!0}),()=>i?.removeEventListener("reset",r)}function hz(e,t){const i=e?.closest("fieldset");if(!i)return;t(i.disabled);const r=On(i),a=new r.MutationObserver(()=>t(i.disabled));return a.observe(i,{attributes:!0,attributeFilter:["disabled"]}),()=>a.disconnect()}function gz(e,t){if(!e)return;const{onFieldsetDisabledChange:i,onFormReset:r}=t,a=[fz(e,r),hz(e,i)];return()=>a.forEach(l=>l?.())}var D4=Symbol.for("zag.changeEvent");function L4(e){return Object.prototype.hasOwnProperty.call(e,D4)}function pz(e){return L4(e)||Object.defineProperty(e,D4,{value:!0}),e}var j4=e=>Yt(e)&&e.tagName==="IFRAME",mz=/^(audio|video|details)$/;function B4(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var vz=e=>!Number.isNaN(B4(e)),bz=e=>B4(e)<0;function yz(e){return O4(e)&&e.type==="radio"}function xz(e){if(!yz(e)||!e.name||e.checked)return!0;const t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,i=e.form??e.ownerDocument,r=Array.from(i.querySelectorAll(t)).filter(l=>l.form===e.form&&cr(l)),a=r.find(l=>l.checked);return a?a===e:r[0]===e}function Sz(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const i=t(e);return(i===!0?e.shadowRoot:i)||null}function G4(e,t,i){const r=[...e],a=[...e],l=new Set,c=new Map;e.forEach((h,p)=>c.set(h,p));let d=0;for(;d<a.length;){const h=a[d++];if(!h||l.has(h))continue;l.add(h);const p=Sz(h,t);if(p){const m=Array.from(p.querySelectorAll(uh)).filter(i),v=c.get(h);if(v!==void 0){const b=v+1;r.splice(b,0,...m),m.forEach((y,x)=>{c.set(y,b+x)});for(let y=b+m.length;y<r.length;y++)c.set(r[y],y)}else{const b=r.length;r.push(...m),m.forEach((y,x)=>{c.set(y,b+x)})}a.push(...m)}}return r}var uh="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",V4=(e,t={})=>{if(!e)return[];const{includeContainer:i=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(uh));(i==!0||i=="if-empty"&&a.length===0)&&Yt(e)&&cr(e)&&a.unshift(e);const c=[];for(const d of a)if(cr(d)){if(j4(d)&&d.contentDocument){const h=d.contentDocument.body;c.push(...V4(h,{getShadowRoot:r}));continue}c.push(d)}return r?G4(c,r,cr):c};function cr(e){return!Yt(e)||e.closest("[inert]")?!1:e.matches(uh)&&jk(e)}function dh(e,t={}){if(!e)return[];const{includeContainer:i,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(uh));i&&ka(e)&&a.unshift(e);const l=[];for(const c of a)if(ka(c)){if(j4(c)&&c.contentDocument){const d=c.contentDocument.body;l.push(...dh(d,{getShadowRoot:r}));continue}l.push(c)}if(r){const c=G4(l,r,ka);return!c.length&&i?a:c}return!l.length&&i?a:l}function ka(e){return Yt(e)&&e.tabIndex>0?!0:!cr(e)||bz(e)?!1:xz(e)}function _z(e,t={}){const i=dh(e,t),r=i[0]||null,a=i[i.length-1]||null;return[r,a]}function lc(e){return e.tabIndex<0&&(mz.test(e.localName)||Bc(e))&&!vz(e)?0:e.tabIndex}function x0(e){const{root:t,getInitialEl:i,filter:r,enabled:a=!0}=e;if(!a)return;let l=typeof i=="function"?i():i;return l||(l=t?.querySelector("[data-autofocus],[autofocus]")),l||(l=dh(t).filter(d=>r?r(d):!0).find(d=>!d.hasAttribute("data-no-autofocus"))),l||t||void 0}function wz(e){const t=e.currentTarget;if(!t)return!1;const[i,r]=_z(t);return!(v0(i)&&e.shiftKey||v0(r)&&!e.shiftKey||!i&&!r)}var Cz=class H4{constructor(){Sm(this,"id",null),Sm(this,"fn_cleanup"),Sm(this,"cleanup",()=>{this.cancel()})}static create(){return new H4}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function _n(e){const t=Cz.create();return t.request(e),t.cleanup}function F4(e){const t=new Set;function i(r){const a=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(a))}return i(()=>i(e)),function(){t.forEach(a=>a())}}function Ez(e,t){if(!e)return;const{attributes:i,callback:r}=t,a=e.ownerDocument.defaultView||window,l=new a.MutationObserver(c=>{for(const d of c)d.type==="attributes"&&d.attributeName&&i.includes(d.attributeName)&&r(d)});return l.observe(e,{attributes:!0,attributeFilter:i}),()=>l.disconnect()}function $4(e,t){const{defer:i}=t,r=i?_n:l=>l(),a=[];return a.push(r(()=>{const l=typeof e=="function"?e():e;a.push(Ez(l,t))})),()=>{a.forEach(l=>l?.())}}function S0(e){const t=Vk(e);return Lk(t)?In(t).body:Yt(t)&&Ov(t)?t:S0(t)}var Tz=/auto|scroll|overlay|hidden|clip/,kz=new Set(["inline","contents"]);function Ov(e){const t=On(e),{overflow:i,overflowX:r,overflowY:a,display:l}=t.getComputedStyle(e);return Tz.test(i+a+r)&&!kz.has(l)}function zz(e,t){return Array.from(e?.querySelectorAll(t)??[])}var Nv=e=>e.id;function Rz(e,t,i=Nv){return e.find(r=>i(r)===t)}function Az(e,t,i=Nv){const r=Rz(e,t,i);return r?e.indexOf(r):-1}function Oz(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function U4(e,t){const{rootEl:i,...r}=t||{};!e||!i||!Ov(i)||!Oz(i)||e.scrollIntoView(r)}var Nz=e=>e.split("").map(t=>{const i=t.charCodeAt(0);return i>0&&i<128?t:i>=128&&i<=255?`/x${i.toString(16)}`.replace("/","\\"):""}).join("").trim(),Iz=e=>Nz(e.dataset?.valuetext??e.textContent??""),Pz=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function Mz(e,t,i,r=Nv){const a=i?Az(e,i,r):-1;let l=i?zk(e,a):e;return t.length===1&&(l=l.filter(d=>r(d)!==i)),l.find(d=>Pz(Iz(d),t))}function If(e,t){if(!e)return Nf;const i=Object.keys(t).reduce((r,a)=>(r[a]=e.style.getPropertyValue(a),r),{});return Lz(i,t)?Nf:(Object.assign(e.style,t),()=>{Object.assign(e.style,i),e.style.length===0&&e.removeAttribute("style")})}function Dz(e,t,i){if(!e)return Nf;const r=e.style.getPropertyValue(t);return r===i?Nf:(e.style.setProperty(t,i),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")})}function Lz(e,t){return Object.keys(e).every(i=>e[i]===t[i])}function jz(e,t){const{state:i,activeId:r,key:a,timeout:l=350,itemToId:c}=t,d=i.keysSoFar+a,p=d.length>1&&Array.from(d).every(x=>x===d[0])?d[0]:d;let m=e.slice();const v=Mz(m,p,r,c);function b(){clearTimeout(i.timer),i.timer=-1}function y(x){i.keysSoFar=x,b(),x!==""&&(i.timer=+setTimeout(()=>{y(""),b()},l))}return y(d),v}var eu=Object.assign(jz,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:Bz});function Bz(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Gz={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function Vz(e,t,i){const{signal:r}=t;return[new Promise((c,d)=>{const h=setTimeout(()=>{d(new Error(`Timeout of ${i}ms exceeded`))},i);r.addEventListener("abort",()=>{clearTimeout(h),d(new DOMException("Promise aborted","AbortError"))}),e.then(p=>{r.aborted||(clearTimeout(h),c(p))}).catch(p=>{r.aborted||(clearTimeout(h),d(p))})}),()=>t.abort()]}function Hz(e,t){const{timeout:i,rootNode:r}=t,a=On(r),l=In(r),c=new a.AbortController;return Vz(new Promise(d=>{const h=e();if(h){d(h);return}const p=new a.MutationObserver(()=>{const m=e();m&&m.isConnected&&(p.disconnect(),d(m))});p.observe(l.body,{childList:!0,subtree:!0})}),c,i)}function Fz(e,t,i={}){const{defer:r,onMissing:a}=i,l=()=>typeof e=="function"?e():e,c=[],d=p=>{if(!p)return a?.();c.push(t(p))},h=l();if(!r||h)d(h);else{let p=!1;c.push(()=>{p=!0}),queueMicrotask(()=>{if(p)return;const m=l();if(m){d(m);return}c.push(_n(()=>{p||d(l())}))})}return()=>{c.forEach(p=>p?.())}}function $z(e){const t=()=>e.getRootNode?.()??document,i=()=>In(t());return{...e,getRootNode:t,getDoc:i,getWin:()=>i().defaultView??window,getActiveElement:()=>Oo(t()),isActiveElement:v0,getById:c=>t().getElementById(c)}}function Uz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,i=t&&"isReactWarning"in t&&t.isReactWarning;return i?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,i=t&&"isReactWarning"in t&&t.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var Wz=Symbol.for("react.lazy");function Yz(e){return typeof e=="object"&&e!==null&&"$$typeof"in e&&e.$$typeof===Wz}function qz(e){if(O.isValidElement(e))return e;if(Yz(e))return O.Children.toArray(e).find(O.isValidElement)}var wm=e=>{const t=O.memo(O.forwardRef((i,r)=>{const{asChild:a,children:l,...c}=i,d=a?qz(l):void 0,h=d?Uz(d):void 0,p=al(r,h);return a?d?O.cloneElement(d,{...Ie(c,d.props),ref:r?p:h}):null:O.createElement(e,{...c,ref:r},l)}));return t.displayName=e.displayName||e.name,t},Xz=()=>{const e=new Map;return new Proxy(wm,{apply(t,i,r){return wm(r[0])},get(t,i){const r=i;return e.has(r)||e.set(r,wm(r)),e.get(r)}})},Me=Xz(),[oq,Iv]=Nn({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),bS=Object.defineProperty,fh=(e,t)=>{let i={};for(var r in e)bS(i,r,{get:e[r],enumerable:!0});return bS(i,Symbol.toStringTag,{value:"Module"}),i},Yn=()=>(e,t)=>t.reduce((i,r)=>{const[a,l]=i,c=r;return l[c]!==void 0&&(a[c]=l[c]),delete l[c],[a,l]},[{},{...e}]),hh=e=>Yn()(e,["hideMode","immediate","lazyMount","onEnterComplete","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]),Zz=e=>Reflect.get(e,"Activity"),_0=Zz(d0),Kz=_0!==void 0;function yS(e,t={}){const{sync:i=!1}=t,r=Qz(e);return O.useCallback((...a)=>i?queueMicrotask(()=>r.current?.(...a)):r.current?.(...a),[i,r])}function Qz(e){const t=O.useRef(e);return t.current=e,t}var Cm={exports:{}},gn={};var xS;function Jz(){if(xS)return gn;xS=1;var e=fv();function t(m){var v="https://react.dev/errors/"+m;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)v+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+m+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},a=Symbol.for("react.portal"),l=Symbol.for("react.recoverable"),c=Symbol.for("react.optimistic_key");function d(m,v,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:y===c?c:""+y,children:m,containerInfo:v,implementation:b}}var h=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,v){if(m==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,gn.browser=function(m){return{$$typeof:l,_reason:m}},gn.createPortal=function(m,v){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(t(299));return d(m,v,null,b)},gn.flushSync=function(m){var v=h.T,b=r.p;try{if(h.T=null,r.p=2,m)return m()}finally{h.T=v,r.p=b,r.d.f()}},gn.preconnect=function(m,v){typeof m=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(m,v))},gn.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},gn.preinit=function(m,v){if(typeof m=="string"&&v&&typeof v.as=="string"){var b=v.as,y=p(b,v.crossOrigin),x=typeof v.integrity=="string"?v.integrity:void 0,_=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;b==="style"?r.d.S(m,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:_}):b==="script"&&r.d.X(m,{crossOrigin:y,integrity:x,fetchPriority:_,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},gn.preinitModule=function(m,v){if(typeof m=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var b=p(v.as,v.crossOrigin);r.d.M(m,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}}else v==null&&r.d.M(m)},gn.preload=function(m,v){if(typeof m=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var b=v.as,y=p(b,v.crossOrigin);r.d.L(m,b,{crossOrigin:y,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},gn.preloadModule=function(m,v){if(typeof m=="string")if(v){var b=p(v.as,v.crossOrigin);r.d.m(m,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}else r.d.m(m)},gn.requestFormReset=function(m){r.d.r(m)},gn.unstable_batchedUpdates=function(m,v){return m(v)},gn.useFormState=function(m,v,b){return h.H.useFormState(m,v,b)},gn.useFormStatus=function(){return h.H.useHostTransitionStatus()},gn.version="19.3.0",gn}var SS;function W4(){if(SS)return Cm.exports;SS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Cm.exports=Jz(),Cm.exports}var gh=W4(),Y4=typeof globalThis.document<"u"?O.useLayoutEffect:O.useEffect;function Pf(e){const t=e().value??e().defaultValue,i=e().isEqual??Object.is,[r]=O.useState(t),[a,l]=O.useState(r),c=e().value!==void 0,d=O.useRef(a);d.current=c?e().value:a;const h=O.useRef(d.current);Y4(()=>{h.current=d.current},[a,e().value]);const p=v=>{const b=h.current,y=Ta(v)?v(b):v;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:y,prev:b}),c||l(y),i(y,b)||e().onChange?.(y,b)};function m(){return c?e().value:a}return{initial:r,ref:d,get:m,set(v){(e().sync?gh.flushSync:ck)(()=>p(v))},invoke(v,b){e().onChange?.(v,b)},hash(v){return e().hash?.(v)??String(v)}}}Pf.cleanup=e=>{O.useEffect(()=>e,[])};Pf.ref=e=>{const t=O.useRef(e);return{get:()=>t.current,set:i=>{t.current=i}}};function q4(e){const t=O.useRef(void 0);return t.current===void 0&&(t.current=e()),t.current}function Sf(e){const t=O.useRef(e);return t.current=e,O.useMemo(()=>((...i)=>t.current(...i)),[])}function eR(e){const t=O.useRef(e);return q4(()=>({get(i){return t.current[i]},set(i,r){t.current[i]=r}}))}var tR=(e,t)=>{const i=O.useRef(!1),r=O.useRef(!1);O.useEffect(()=>{if(i.current&&r.current)return t();r.current=!0},[...(e??[]).map(a=>typeof a=="function"?a():a)]),O.useEffect(()=>(i.current=!0,()=>{i.current=!1}),[])};function ph(e,t={}){const i=O.useMemo(()=>{const{id:I,ids:U,getRootNode:X}=t;return $z({id:I,ids:U,getRootNode:X})},[t]),r=(...I)=>{e.debug&&console.log(...I)},a=e.props?.({props:Jc(t),scope:i})??t,l=nR(a),c=e.context?.({prop:l,bindable:Pf,scope:i,flush:_S,getContext(){return h},getComputed(){return C},getRefs(){return _},getEvent(){return y()}}),d=X4(c),h=q4(()=>({get(I){return d.current?.[I].ref.current},set(I,U){d.current?.[I].set(U)},initial(I){return d.current?.[I].initial},hash(I){const U=d.current?.[I].get();return d.current?.[I].hash(U)}})),p=O.useRef(new Map),m=O.useRef(null),v=O.useRef(null),b=O.useRef({type:""}),y=()=>({...b.current,current(){return b.current},previous(){return v.current}}),x=()=>({...A,matches(...I){return I.some(U=>wk(A.ref.current,U))},hasTag(I){return Ck(e,A.ref.current,I)}}),_=eR(e.refs?.({prop:l,context:h})??{}),w=Sf(I=>{queueMicrotask(()=>{if(W.current!==Ea.Started)return;v.current=b.current,b.current=I;const U=M(),{transitions:X,source:K}=Sk(e,U,I.type),P=k(X);if(!P)return;m.current=P;const ee=pS(e,P.target??U,K);r("transition",I.type,P.target||U,`(${P.actions})`),ee!==U?gh.flushSync(()=>A.set(ee)):P.reenter?A.invoke(U,U):z(P.actions??[])})}),C=Sf(I=>{lu(e.computed,()=>"[zag-js] No computed object found on machine");const U=e.computed[I];return U({context:h,event:y(),prop:l,refs:_,scope:i,computed:C})}),R=()=>({state:x(),context:h,event:y(),prop:l,send:w,action:z,guard:D,track:tR,refs:_,computed:C,flush:_S,scope:i,choose:k}),z=I=>{const U=Ta(I)?I(R()):I;if(!U)return;const X=U.map(K=>{const P=e.implementations?.actions?.[K];return P||xf(`[zag-js] No implementation found for action "${JSON.stringify(K)}"`),P});for(const K of X)K?.(R())},D=I=>{if(Ta(I))return I(R());const U=e.implementations?.guards?.[I];return U||xf(`[zag-js] No implementation found for guard "${JSON.stringify(I)}"`),U?.(R())},T=I=>{const U=Ta(I)?I(R()):I;if(!U)return;const X=U.map(P=>{const ee=e.implementations?.effects?.[P];return ee||xf(`[zag-js] No implementation found for effect "${JSON.stringify(P)}"`),ee}),K=[];for(const P of X){const ee=P?.(R());ee&&K.push(ee)}return()=>K.forEach(P=>P?.())},k=I=>ZT(I).find(U=>{let X=!U.guard;return yf(U.guard)?X=!!D(U.guard):Ta(U.guard)&&(X=U.guard(R())),X}),A=Pf(()=>({defaultValue:pS(e,e.initialState({prop:l})),onChange(I,U){const{exiting:X,entering:K}=_k(e,U,I,m.current?.reenter);if(X.forEach(P=>{p.current.get(P.path)?.(),p.current.delete(P.path)}),X.forEach(P=>{z(P.state?.exit)}),z(m.current?.actions),K.forEach(P=>{const ee=T(P.state?.effects);if(ee){const te=p.current.get(P.path);p.current.set(P.path,te?Qc(te,ee):ee)}}),U===$d){z(e.entry);const P=T(e.effects);if(P){const ee=p.current.get($d);p.current.set($d,ee?Qc(ee,P):P)}}K.forEach(P=>{z(P.state?.entry)})}})),L=O.useRef(void 0),W=O.useRef(Ea.NotStarted),V=Sf(()=>W.current);Y4(()=>{queueMicrotask(()=>{const U=W.current===Ea.Started;W.current=Ea.Started,r(U?"rehydrating...":"initializing...");const X=L.current??A.initial;A.invoke(X,U?A.get():$d)});const I=p.current;return()=>{const U=M();r("unmounting..."),L.current=U,W.current=Ea.Stopped,I.forEach(X=>X?.()),p.current=new Map,m.current=null,queueMicrotask(()=>{z(e.exit),W.current=Ea.Stopped})}},[]);const M=()=>"ref"in A?A.ref.current:A.get();return e.watch?.(R()),{state:x(),send:w,context:h,prop:l,scope:i,refs:_,computed:C,event:y(),getStatus:V}}function X4(e){const t=O.useRef(e);return t.current=e,t}function nR(e){const t=X4(e);return Sf(function(r){return t.current[r]})}function _S(e){queueMicrotask(()=>{gh.flushSync(()=>e())})}function iR(e){return new Proxy({},{get(t,i){return i==="style"?r=>e({style:r}).style:e}})}var Pv=iR(e=>e);function rR(e,t){const{state:i,send:r,context:a}=e,l=i.matches("mounted","unmountSuspended");return{skip:!a.get("initial"),present:l,setNode(c){c&&r({type:"NODE.SET",node:c})},unmount(){r({type:"UNMOUNT"})}}}var oR=ah({props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["cleanupNode"],watch({track:e,prop:t,send:i}){e([()=>t("present")],()=>{i({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{effects:["trackEnterAnimation"],on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackExitAnimation"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},invokeOnExitComplete:({prop:e,refs:t})=>{e("onExitComplete")?.();const i=t.get("node");if(!i)return;const r=On(i),a=new r.CustomEvent("exitcomplete",{bubbles:!1});i.dispatchEvent(a)},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Zs(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:i,prop:r})=>{const a=r("present");if(a)return i({type:"MOUNT",src:"presence.changed"});const l=t.get("node");if(!a&&l?.ownerDocument.visibilityState==="hidden")return i({type:"UNMOUNT",src:"visibilitychange"});_n(()=>{if(r("present"))return;const c=cc(t.get("styles"));e.set("unmountAnimationName",c),c==="none"||c===e.get("prevAnimationName")||t.get("styles")?.display==="none"||t.get("styles")?.animationDuration==="0s"?i({type:"UNMOUNT",src:"presence.changed"}):i({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{_n(()=>{e.set("prevAnimationName",cc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackEnterAnimation:({context:e,refs:t,prop:i})=>{if(!i("onEnterComplete")||!e.get("initial"))return;let r;const a=()=>{r=_n(()=>{const l=t.get("node");if(!l||!l.isConnected){a();return}const c=Zs(l);if(cc(c)==="none"||c.display==="none"||c.animationDuration==="0s"){i("onEnterComplete")?.();return}const h=p=>{nn(p)!==l||!i("present")||(l.removeEventListener("animationend",h),i("onEnterComplete")?.())};return l.addEventListener("animationend",h),()=>{l.removeEventListener("animationend",h)}})};return a(),()=>r?.()},trackExitAnimation:({context:e,refs:t,send:i,prop:r})=>{const a=t.get("node");if(!a)return;const l=p=>{(p.composedPath?.()?.[0]??p.target)===a&&e.set("prevAnimationName",cc(t.get("styles")))},c=p=>{const m=cc(t.get("styles"));nn(p)===a&&m===e.get("unmountAnimationName")&&!r("present")&&i({type:"UNMOUNT",src:"animationend"})},d=p=>{nn(p)===a&&!r("present")&&i({type:"UNMOUNT",src:"animationcancel"})};a.addEventListener("animationstart",l),a.addEventListener("animationcancel",d),a.addEventListener("animationend",c);const h=If(a,{animationFillMode:"forwards"});return()=>{a.removeEventListener("animationstart",l),a.removeEventListener("animationcancel",d),a.removeEventListener("animationend",c),F4(()=>h())}}}}});function cc(e){return e?.animationName||"none"}var du=(e={})=>{const{lazyMount:t,unmountOnExit:i,hideMode:r="display-none",present:a,skipAnimationOnMount:l=!1,...c}=e,d=O.useRef(!1),h={...c,present:a,onEnterComplete:yS(e.onEnterComplete),onExitComplete:yS(e.onExitComplete)},p=ph(oR,h),m=rR(p);m.present&&(d.current=!0);const v=!m.present&&!d.current&&t||i&&!m.present&&d.current,b=r==="activity"&&Kz?"activity":"display-none",y=()=>({"data-state":m.skip&&l?void 0:a?"open":"closed",hidden:b==="activity"?!1:!m.present});return{ref:m.setNode,getPresenceProps:y,present:m.present,unmounted:v,hideMode:b}},Mv=e=>{const{presence:t,children:i}=e;return t.unmounted?null:t.hideMode==="activity"&&_0?N.jsx(_0,{mode:t.present?"visible":"hidden",children:i}):i},[mh,fu]=Nn({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"});const za=di("span");za.displayName="Span";var Te=(e,t=[])=>({parts:(...i)=>{if(aR(t))return Te(e,i);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...i)=>Te(e,[...t,...i]),omit:(...i)=>Te(e,t.filter(r=>!i.includes(r))),rename:i=>Te(i,t),keys:()=>t,build:()=>[...new Set(t)].reduce((i,r)=>Object.assign(i,{[r]:{selector:[`&[data-scope="${Os(e)}"][data-part="${Os(r)}"]`,`& [data-scope="${Os(e)}"][data-part="${Os(r)}"]`].join(", "),attrs:{"data-scope":Os(e),"data-part":Os(r)}}}),{})}),Os=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),aR=e=>e.length===0,[Z4,sR]=Nn({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),K4=e=>Yn()(e,["lazyMount","unmountOnExit","hideMode"]);function lR(e){const{key:t,recipe:i}=e,r=rh();return O.useMemo(()=>i?r.sva(i):t!=null?r.getSlotRecipeFn(t):r.sva({slots:[]}),[t,i,r])}const Dv=e=>{const{key:t,recipe:i}=e,r=oh(t||i.className||"Component"),[a,l]=jc({name:`${r}StylesContext`,errorMessage:`use${r}Styles returned is 'undefined'. Seems you forgot to wrap the components in "<${r}.Root />" `}),[c,d]=jc({name:`${r}ClassNameContext`,errorMessage:`use${r}ClassNames returned is 'undefined'. Seems you forgot to wrap the components in "<${r}.Root />" `,strict:!1}),[h,p]=jc({strict:!1,name:`${r}PropsContext`,providerName:`${r}PropsContext`,defaultValue:{}});function m(x){const{unstyled:_,...w}=x,C=lR({key:t,recipe:w.recipe||i}),[R,z]=O.useMemo(()=>C.splitVariantProps(w),[w,C]);return{styles:O.useMemo(()=>_?qT:C(R),[_,R,C]),classNames:C.classNameMap,props:z}}function v(x,_={}){const{defaultProps:w,displayName:C}=_,R=bf(x),z=WT(r,R),D=T=>{const k=p(),A=O.useMemo(()=>Zc(w,k,T),[k,T]),{styles:L,classNames:W,props:V}=m(A);return N.jsx(a,{value:L,children:N.jsx(c,{value:W,children:N.jsx(x,{...V})})})};return D.displayName=C??z??R,D}return{StylesProvider:a,ClassNamesProvider:c,PropsProvider:h,usePropsContext:p,useRecipeResult:m,withProvider:(x,_,w)=>{const{defaultProps:C,displayName:R,wrapElement:z,...D}=w??{},T=lS(r,String(_)),k=di(x,{},D),A=O.forwardRef((L,W)=>{const V=p(),M=O.useMemo(()=>Zc(C??{},V,L),[V,L]),{styles:I,props:U,classNames:X}=m(M),K=X[_],P=N.jsx(a,{value:I,children:N.jsx(c,{value:X,children:N.jsx(k,{ref:W,...U,css:[I[_],M.css],className:Di(M.className,K)})})});return z?.(P,M)??P});return A.displayName=R??T??bf(x),A},withContext:(x,_,w)=>{const{displayName:C,...R}=w??{},z=_!=null&&_!==""?lS(r,String(_)):r,D=di(x,{},R),T=O.forwardRef((k,A)=>{const{unstyled:L,...W}=k,V=l(),I=d()?.[_];return N.jsx(D,{...W,css:[!L&&_?V[_]:void 0,k.css],ref:A,className:Di(k.className,I)})});return T.displayName=C??z??bf(x),T},withRootProvider:v,useStyles:l,useClassNames:d}},{withContext:cR}=rl({key:"text"}),St=cR("p");var Q4=Te("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator");Q4.build();var J4=Te("avatar").parts("root","image","fallback");J4.build();var Ns=new WeakMap,Ud=new WeakMap,Wd={},Em=0,e_=e=>e&&(e.host||e_(e.parentNode)),uR=(e,t)=>t.map(i=>{if(e.contains(i))return i;const r=e_(i);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",i,"in not contained inside",e,". Doing nothing"),null)}).filter(i=>!!i),dR=new Set(["script","output","status","next-route-announcer"]),fR=e=>dR.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),hR=(e,t)=>{const{parentNode:i,markerName:r,controlAttribute:a,explicitBooleanValue:l,followControlledElements:c=!0}=t,d=uR(i,Array.isArray(e)?e:[e]);Wd[r]||(Wd[r]=new WeakMap);const h=Wd[r],p=[],m=new Set,v=new Set(d),b=x=>{!x||m.has(x)||(m.add(x),b(x.parentNode))};d.forEach(x=>{b(x),c&&Yt(x)&&P4(x,_=>{b(_)})});const y=x=>{!x||v.has(x)||Array.prototype.forEach.call(x.children,_=>{if(m.has(_))y(_);else try{if(fR(_))return;const w=_.getAttribute(a),C=l?w==="true":w!==null&&w!=="false",R=(Ns.get(_)||0)+1,z=(h.get(_)||0)+1;Ns.set(_,R),h.set(_,z),p.push(_),R===1&&C&&Ud.set(_,!0),z===1&&_.setAttribute(r,""),C||_.setAttribute(a,l?"true":"")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return y(i),m.clear(),Em++,()=>{p.forEach(x=>{const _=Ns.get(x)-1,w=h.get(x)-1;Ns.set(x,_),h.set(x,w),_||(Ud.has(x)||x.removeAttribute(a),Ud.delete(x)),w||x.removeAttribute(r)}),Em--,Em||(Ns=new WeakMap,Ns=new WeakMap,Ud=new WeakMap,Wd={})}},gR=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,pR=(e,t=gR(e),i="data-aria-hidden",r=!0)=>{if(t)return hR(e,{parentNode:t,markerName:i,controlAttribute:"aria-hidden",explicitBooleanValue:!0,followControlledElements:r})},mR=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function vR(e,t={}){const{defer:i=!0}=t,r=i?mR:l=>l(),a=[];return a.push(r(()=>{const c=(typeof e=="function"?e():e).filter(Boolean);c.length!==0&&a.push(pR(c))})),()=>{a.forEach(l=>l?.())}}function bR(e){const t={each(i){for(let r=0;r<e.frames?.length;r+=1){const a=e.frames[r];a&&i(a)}},addEventListener(i,r,a){return t.each(l=>{try{l.document.addEventListener(i,r,a)}catch{}}),()=>{try{t.removeEventListener(i,r,a)}catch{}}},removeEventListener(i,r,a){t.each(l=>{try{l.document.removeEventListener(i,r,a)}catch{}})}};return t}function yR(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(i,r,a)=>{try{t?.addEventListener(i,r,a)}catch{}return()=>{try{t?.removeEventListener(i,r,a)}catch{}}},removeEventListener:(i,r,a)=>{try{t?.removeEventListener(i,r,a)}catch{}}}}var wS="pointerdown.outside",CS="focus.outside";function xR(e){for(const t of e)if(Yt(t)&&cr(t))return!0;return!1}var t_=e=>"clientY"in e;function SR(e,t){if(!t_(t)||!e)return!1;const i=e.getBoundingClientRect();return i.width===0||i.height===0?!1:i.top<=t.clientY&&t.clientY<=i.top+i.height&&i.left<=t.clientX&&t.clientX<=i.left+i.width}function _R(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ES(e,t){if(!t||!t_(e))return!1;const i=t.scrollHeight>t.clientHeight,r=i&&e.clientX>t.offsetLeft+t.clientWidth,a=t.scrollWidth>t.clientWidth,l=a&&e.clientY>t.offsetTop+t.clientHeight,c={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(i?16:0),height:t.clientHeight+(a?16:0)},d={x:e.clientX,y:e.clientY};return _R(c,d)?r||l:!1}function wR(e,t){const{exclude:i,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:l,defer:c,followControlledElements:d=!0}=t;if(!e)return;const h=In(e),p=On(e),m=bR(p),v=yR(p);function b(D,T){if(!Yt(T)||!T.isConnected||Do(e,T)||SR(e,D)||d&&I4(e,T))return!1;const k=h.querySelector(`[aria-controls="${e.id}"]`);if(k){const L=S0(k);if(ES(D,L))return!1}const A=S0(e);return ES(D,A)?!1:!i?.(T)}const y=new Set,x=Ia(e?.getRootNode());let _=!1;function w(D){_=!0;const T=()=>{_=!1};h.addEventListener("pointerup",T,{once:!0}),p.addEventListener("pointerup",T,{once:!0});function k(A){const L=c&&!mS()?_n:M=>M(),W=A??D,V=W?.composedPath?.()??[W?.target];L(()=>{const M=x?V[0]:nn(D);if(!(!e||!b(D,M))){if(a||l){const I=Qc(a,l);e.addEventListener(wS,I,{once:!0})}TS(e,wS,{bubbles:!1,cancelable:!0,detail:{originalEvent:W,contextmenu:M4(W),focusable:xR(V),target:M}})}})}D.pointerType==="touch"?(y.forEach(A=>A()),y.add(or(h,"click",k,{once:!0})),y.add(v.addEventListener("click",k,{once:!0})),y.add(m.addEventListener("click",k,{once:!0}))):k()}const C=new Set,R=setTimeout(()=>{C.add(or(h,"pointerdown",w,!0)),C.add(v.addEventListener("pointerdown",w,!0)),C.add(m.addEventListener("pointerdown",w,!0))},0);function z(D){if(_)return;(c?_n:k=>k())(()=>{const k=D?.composedPath?.()??[D?.target],A=x?k[0]:nn(D);if(!(!e||!b(D,A))){if(r||l){const L=Qc(r,l);e.addEventListener(CS,L,{once:!0})}TS(e,CS,{bubbles:!1,cancelable:!0,detail:{originalEvent:D,contextmenu:!1,focusable:cr(A),target:A}})}})}return mS()||(C.add(or(h,"focusin",z,!0)),C.add(v.addEventListener("focusin",z,!0)),C.add(m.addEventListener("focusin",z,!0))),()=>{clearTimeout(R),y.forEach(D=>D()),C.forEach(D=>D())}}function CR(e,t){const{defer:i}=t,r=i?_n:l=>l(),a=[];return a.push(r(()=>{const l=typeof e=="function"?e():e;a.push(wR(l,t))})),()=>{a.forEach(l=>l?.())}}function TS(e,t,i){const r=e.ownerDocument.defaultView||window,a=new r.CustomEvent(t,i);return e.dispatchEvent(a)}function ER(e,t){const i=r=>{r.key==="Escape"&&(r.isComposing||t?.(r))};return or(In(e),"keydown",i,{capture:!0})}var kS="layer:request-dismiss",Hn={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){const t=this.indexOf(e),i=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return t<i},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const i=this.indexOf(e);return i===-1?[]:this.layers.slice(i+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const i=this.indexOf(e);if(!(i<=0))return this.layers.slice(0,i).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(r=>Do(r.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>Do(t,e))},add(e){const t=this.indexOf(e.node);t!==-1&&this.layers.splice(t,1),this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);if(t<0)return;this.layers[t].styleTargets?.forEach(r=>{const a=r();a&&TR(a)}),this.recentlyRemoved.add(e),F4(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(a=>Hn.dismiss(a.node,e)),this.layers.splice(t,1),this.syncLayers()},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{zS(e,t,e.node),e.styleTargets?.forEach(i=>{const r=i();if(!r||r===e.node)return;zS(e,t,r);const{zIndex:a}=Zs(e.node);r.style.setProperty("--z-index",a)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const i=this.indexOf(e);if(i===-1)return;const r=this.layers[i];zR(e,kS,a=>{r.requestDismiss?.(a),a.defaultPrevented||r?.dismiss()}),kR(e,kS,{originalLayer:e,targetLayer:t,originalIndex:i,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function zS(e,t,i){i.style.setProperty("--layer-index",`${t}`),i.removeAttribute("data-nested"),i.removeAttribute("data-has-nested"),Hn.getParentLayerOfType(e.node,e.type)&&i.setAttribute("data-nested",e.type);const a=Hn.countNestedLayersOfType(e.node,e.type);a>0&&i.setAttribute("data-has-nested",e.type),i.style.setProperty("--nested-layer-count",`${a}`)}function TR(e){e.style.removeProperty("--layer-index"),e.style.removeProperty("--nested-layer-count"),e.style.removeProperty("--z-index"),e.removeAttribute("data-nested"),e.removeAttribute("data-has-nested")}function kR(e,t,i){const r=e.ownerDocument.defaultView||window,a=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:i});return e.dispatchEvent(a)}function zR(e,t,i){e.addEventListener(t,i,{once:!0})}var Tm=new WeakMap,Gc=new WeakMap;function RR(e){return Hn.isBelowPointerBlockingLayer(e)?"none":"auto"}function n_(e){const t=RR(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function AR(e){if(Gc.has(e))return;const t=On(e);if(typeof t.MutationObserver>"u")return;const i=new t.MutationObserver(()=>{Gc.has(e)&&n_(e)});i.observe(e,{attributes:!0,attributeFilter:["style"]}),Gc.set(e,i)}function RS(){Hn.layers.forEach(({node:e})=>{n_(e),AR(e)})}function OR(e){const t=Gc.get(e);t&&(t.disconnect(),Gc.delete(e)),e.style.pointerEvents=""}function NR(e,t){const i=In(e),r=[];return Hn.hasPointerBlockingLayer()&&!i.body.hasAttribute("data-inert")&&(Tm.set(i.body,i.body.style.pointerEvents),queueMicrotask(()=>{const a=i.body;a&&(a.style.pointerEvents="none",a.setAttribute("data-inert",""))})),t?.forEach(a=>{const[l,c]=Hz(()=>{const d=a();return Yt(d)?d:null},{timeout:1e3});l.then(d=>r.push(If(d,{pointerEvents:"auto"}))),r.push(c)}),()=>{Hn.hasPointerBlockingLayer()||(queueMicrotask(()=>{const a=i.body;if(!a)return;const l=Tm.get(a);l!==void 0&&(a.style.pointerEvents=l,Tm.delete(a)),a.removeAttribute("data-inert"),a.style.length===0&&a.removeAttribute("style")}),r.forEach(a=>a()))}}function IR(e,t){const{onDismiss:i,onRequestDismiss:r,pointerBlocking:a,exclude:l,debug:c,type:d="dialog",layerStyleTargets:h}=t,p={dismiss:i,node:e,type:d,pointerBlocking:a,requestDismiss:r,styleTargets:h};Hn.add(p),RS();function m(_){const w=nn(_.detail.originalEvent);Hn.isBelowPointerBlockingLayer(e)||Hn.isInBranch(w)||(t.onPointerDownOutside?.(_),t.onInteractOutside?.(_),!_.defaultPrevented&&(c&&console.log("onPointerDownOutside:",_.detail.originalEvent),i?.()))}function v(_){const w=nn(_.detail.originalEvent);Hn.isInBranch(w)||(t.onFocusOutside?.(_),t.onInteractOutside?.(_),!_.defaultPrevented&&(c&&console.log("onFocusOutside:",_.detail.originalEvent),i?.()))}function b(_){Hn.isTopMost(e)&&(t.onEscapeKeyDown?.(_),!_.defaultPrevented&&i&&(_.preventDefault(),i()))}function y(_){const w=typeof l=="function"?l():l,C=Array.isArray(w)?w:[w],R=t.persistentElements?.map(z=>z()).filter(Yt);return R&&C.push(...R),C.some(z=>Do(z,_))||Hn.isInNestedLayer(e,_)}const x=[a?NR(e,t.persistentElements):void 0,ER(e,b),CR(e,{exclude:y,onFocusOutside:v,onPointerDownOutside:m,defer:t.defer})];return()=>{Hn.remove(e),RS(),OR(e),x.forEach(_=>_?.())}}function i_(e,t){const{warnOnMissingNode:i=!0}=t;return Fz(e,r=>IR(r,t),{defer:t.defer,onMissing:i?()=>xf("[@zag-js/dismissable] node is `null` or `undefined`"):void 0})}var PR=Object.defineProperty,MR=(e,t,i)=>t in e?PR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,xt=(e,t,i)=>MR(e,typeof t!="symbol"?t+"":t,i),AS={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const i=e.indexOf(t);i===-1||e.splice(i,1),e.push(t)},deactivateTrap(e,t){const i=e.indexOf(t);i!==-1&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}},DR=[],LR=class{constructor(e,t){xt(this,"trapStack"),xt(this,"config"),xt(this,"doc"),xt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),xt(this,"lastInteractionType","keyboard"),xt(this,"portalContainers",new Set),xt(this,"listenerCleanups",[]),xt(this,"handleFocus",r=>{const a=nn(r),l=this.findContainerIndex(a,r)>=0;if(l||lh(a))l&&(this.state.mostRecentlyFocusedNode=a);else{r.stopImmediatePropagation();let c,d=!0;if(this.state.mostRecentlyFocusedNode)if(lc(this.state.mostRecentlyFocusedNode)>0){const h=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:p}=this.state.containerGroups[h];if(p.length>0){const m=p.findIndex(v=>v===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<p.length&&(c=p[m+1],d=!1):m-1>=0&&(c=p[m-1],d=!1))}}else this.state.containerGroups.some(h=>h.tabbableNodes.some(p=>lc(p)>0))||(d=!1);else d=!1;d&&(c=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),c?this.tryFocus(c):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),xt(this,"handlePointerDown",r=>{this.lastInteractionType="pointer";const a=nn(r);if(!(this.findContainerIndex(a,r)>=0)){if(uc(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}uc(this.config.allowOutsideClick,r)||r.preventDefault()}}),xt(this,"handleClick",r=>{const a=nn(r);this.findContainerIndex(a,r)>=0||uc(this.config.clickOutsideDeactivates,r)||uc(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),xt(this,"handleTabKey",r=>{if(this.lastInteractionType="keyboard",this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const a=this.config.isKeyBackward(r),l=this.findNextNavNode({event:r,isBackward:a});if(!l)return;km(r)&&r.preventDefault(),this.tryFocus(l)}}),xt(this,"handleEscapeKey",r=>{GR(r)&&uc(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),xt(this,"_mutationObserver"),xt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(a=>{a.some(d=>Array.from(d.removedNodes).some(p=>p===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),a.some(d=>d.type==="attributes"&&(d.attributeName==="aria-controls"||d.attributeName==="aria-expanded")?!0:d.type==="childList"&&d.addedNodes.length>0?Array.from(d.addedNodes).some(h=>{if(h.nodeType!==Node.ELEMENT_NODE)return!1;const p=h;return Wk(p)?!0:p.id&&!this.state.containers.some(m=>m.contains(p))?Yk(p):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),xt(this,"updateObservedNodes",()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(r=>{this._mutationObserver?.observe(r,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(r=>{this.observePortalContainer(r)}))}),xt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!cr(r)){const a=Oo(this.doc);if(a&&this.findContainerIndex(a)>=0)r=a;else{const l=this.state.tabbableGroups[0];r=l&&l.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");if(r.isConnected||(r=this.getNodeForOption("fallbackFocus")),!r||!r.isConnected)throw new Error("Your focus-trap needs to have at least one focusable element");return r}),xt(this,"tryFocus",(r,a)=>{if(r!==!1&&r!==Oo(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll,...a}),this.state.mostRecentlyFocusedNode=r,VR(r)&&r.select()}}),xt(this,"deactivate",r=>{if(!this.state.active)return this;const a={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...r};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),AS.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const l=this.getOption(a,"onDeactivate"),c=this.getOption(a,"onPostDeactivate"),d=this.getOption(a,"checkCanReturnFocus"),h=this.getOption(a,"returnFocus","returnFocusOnDeactivate");l?.();const p=()=>{OS(()=>{if(h&&this.isSafeToOverrideFocus()){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation),v=this.lastInteractionType==="keyboard"?{focusVisible:!0}:void 0;this.tryFocus(m,v)}c?.()})};if(h&&d){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return d(m).then(p,p),this}return p(),this}),xt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const a=this.getOption(r,"onPause"),l=this.getOption(r,"onPostPause");return this.state.paused=!0,a?.(),this.removeListeners(),this.updateObservedNodes(),l?.(),this}),xt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const a=this.getOption(r,"onUnpause"),l=this.getOption(r,"onPostUnpause");this.state.paused=!1,a?.();try{this.updateTabbableNodes()}catch{}this.attachListeners();try{this.commitInitialFocus()}catch{}return this.updateObservedNodes(),l?.(),this}),xt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),xt(this,"getReturnFocusNode",r=>{const a=this.getNodeForOption("setReturnFocus",{params:[r]});return a||(a===!1?!1:r)}),xt(this,"getOption",(r,a,l)=>r&&r[a]!==void 0?r[a]:this.config[l||a]),xt(this,"getNodeForOption",(r,{hasFallback:a=!1,params:l=[]}={})=>{let c=this.config[r];if(typeof c=="function"&&(c=c(...l)),c===!0&&(c=void 0),!c){if(c===void 0||c===!1)return c;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let d=c;if(typeof c=="string"){try{d=this.doc.querySelector(c)}catch(h){throw new Error(`\`${r}\` appears to be an invalid selector; error="${h.message}"`)}if(!d&&!a)throw new Error(`\`${r}\` as selector refers to no known node`)}return d}),xt(this,"findNextNavNode",r=>{const{event:a,isBackward:l=!1}=r,c=r.target||nn(a);this.updateTabbableNodes();let d=null;if(this.state.tabbableGroups.length>0){const h=this.findContainerIndex(c,a),p=h>=0?this.state.containerGroups[h]:void 0;if(h<0)l?d=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:d=this.state.tabbableGroups[0].firstTabbableNode;else if(l){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:v})=>c===v);if(m<0&&(p?.container===c||cr(c)&&!ka(c)&&!p?.nextTabbableNode(c,!1))&&(m=h),m>=0){const v=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[v];d=lc(c)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else km(a)||(d=p?.nextTabbableNode(c,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:v})=>c===v);if(m<0&&(p?.container===c||cr(c)&&!ka(c)&&!p?.nextTabbableNode(c))&&(m=h),m>=0){const v=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[v];d=lc(c)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else km(a)||(d=p?.nextTabbableNode(c))}}else d=this.getNodeForOption("fallbackFocus");return d}),this.trapStack=t.trapStack||DR;const i={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:jR,isKeyBackward:BR,...t};this.doc=i.document||In(Array.isArray(e)?e[0]:e),this.config=i,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Fk(e).forEach(i=>{this.addPortalContainer(i)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const i=typeof t?.composedPath=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:a})=>r.contains(e)||i?.includes(r)||a.find(l=>l===e)||this.isControlledElement(r,e)||this.isPersistentElement(e,t))}isControlledElement(e,t){return this.config.followControlledElements?I4(e,t):!1}isPersistentElement(e,t){const i=this.config.persistentElements;if(!i||i.length===0)return!1;const r=typeof t?.composedPath=="function"?t.composedPath():void 0;return i.some(a=>{const l=a();return Do(l,e)||l!=null&&r?.includes(l)})}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=dh(e,{getShadowRoot:this.config.getShadowRoot}),i=V4(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],a=t[t.length-1],l=r,c=a;let d=!1;for(let p=0;p<t.length;p++)if(lc(t[p])>0){d=!0;break}function h(p,m=!0){const v=t.indexOf(p);if(v>=0)return t[v+(m?1:-1)];const b=i.indexOf(p);if(!(b<0)){if(m){for(let y=b+1;y<i.length;y++)if(ka(i[y]))return i[y]}else for(let y=b-1;y>=0;y--)if(ka(i[y]))return i[y]}}return{container:e,tabbableNodes:t,focusableNodes:i,posTabIndexesFound:d,firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:l,lastDomTabbableNode:c,nextTabbableNode:h}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}attachListeners(){if(this.state.active)return AS.activateTrap(this.trapStack,this),this.listenerCleanups.push(or(this.doc,"focusin",this.handleFocus,!0),or(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),or(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),or(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),or(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),or(this.doc,"keydown",this.handleEscapeKey)),this}commitInitialFocus(){return this.state.delayInitialFocusTimer=this.config.delayInitialFocus?OS(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this}addListeners(){if(this.state.active)return this.attachListeners(),this.commitInitialFocus(),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}containsElement(e){return this.state.containers.some(t=>Do(t,e))}isSafeToOverrideFocus(){const e=Oo(this.doc);return!e||e===this.doc.body||this.containsElement(e)?!0:this.trapStack.some(t=>t!==this&&t.containsElement(e))}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),i=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Oo(this.doc),t?.();const a=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),i?.()};return r?(r(this.state.containers.concat()).then(a,a),this):(a(),this)}},Lv=e=>e?.type==="keydown",km=e=>Lv(e)&&e?.key==="Tab",jR=e=>Lv(e)&&e.key==="Tab"&&!e?.shiftKey,BR=e=>Lv(e)&&e.key==="Tab"&&e?.shiftKey,uc=(e,...t)=>typeof e=="function"?e(...t):e,GR=e=>!e.isComposing&&e.key==="Escape",OS=e=>setTimeout(e,0),VR=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function HR(e,t={}){let i;const r=_n(()=>{const l=(Array.isArray(e)?e:[e]).map(d=>typeof d=="function"?d():d).filter(d=>d!=null);if(l.length===0)return;const c=l[0];i=new LR(l,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:c,...t,document:In(c)});try{i.activate()}catch{}});return function(){i?.deactivate(),r()}}var NS="data-scroll-lock",zm=new WeakMap;function FR(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function IS(e){const i=Zs(e)?.scrollbarGutter;return i==="stable"||i?.startsWith("stable ")===!0}function $R(e){const{documentElement:t,body:i}=e;return Ov(t)?t:i}function UR(e){const t=e.defaultView??window,{documentElement:i,body:r}=e,a=$R(e),l=IS(i)||IS(r),c=t.innerWidth-i.clientWidth;r.setAttribute(NS,"");const d=()=>Dz(i,"--scrollbar-width",`${c}px`),h=FR(i),p=()=>{const b={overflow:"hidden"};return!l&&c>0&&(b[h]=`${c}px`),If(a,b)},m=()=>{const{scrollX:b,scrollY:y,visualViewport:x}=t,_=x?.offsetLeft??0,w=x?.offsetTop??0,C={position:"fixed",overflow:"hidden",top:`${-(y-Math.floor(w))}px`,left:`${-(b-Math.floor(_))}px`,right:"0"};!l&&c>0&&(C[h]=`${c}px`);const R=If(r,C);return()=>{R?.(),t.scrollTo({left:b,top:y,behavior:"instant"})}},v=[d(),iz()?m():p()];return()=>{v.forEach(b=>b?.()),r.removeAttribute(NS)}}function WR(e){const t=e??document;let i=zm.get(t);i||(i={count:0,cleanup:UR(t)},zm.set(t,i)),i.count++;const r=i;let a=!1;return()=>{a||(a=!0,r.count--,r.count===0&&(r.cleanup(),zm.delete(t)))}}var r_=Te("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger","progressText");r_.build();var YR=r_.extendWith("progressText","autoplayIndicator"),o_=Te("checkbox").parts("root","label","control","indicator");o_.build();function qR(e){return!(e.metaKey||!ch()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var XR=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),ZR=["a[href]","audio[controls]","button","details","embed","iframe","img[controls]","img[usemap]","input","select","textarea","video[controls]"].join(",");function KR(e,t,i){const r=i?nn(i):null,a=In(r),l=On(r),c=Oo(a);return e=e||c instanceof l.HTMLInputElement&&!XR.has(c?.type)||c instanceof l.HTMLTextAreaElement||c instanceof l.HTMLElement&&c.isContentEditable,!(e&&t==="keyboard"&&i instanceof l.KeyboardEvent&&!Reflect.has(JR,i.key))}var Ur=null,w0=new Set,Mf=new Map,Pa=!1,Po=null,C0=!1,Rm=null,QR=!1,JR={Tab:!0,Escape:!0};function vh(e,t){for(let i of w0)i(e,t)}function Df(e){Po=null,Pa=!0,qR(e)&&(Ur="keyboard",vh("keyboard",e))}function _i(e){(e.type==="pointermove"||e.type==="mousemove")&&Rm?.x===e.clientX&&Rm?.y===e.clientY||(Rm={x:e.clientX,y:e.clientY},Ur="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Po=null,Pa=!0,vh("pointer",e)))}function a_(e){if(cz(e)){Po=null,Pa=!0,Ur="virtual";return}Po=null;const t=nn(e),i=t?.closest("label"),r=i?.control;if(!i||!r||r.matches(":disabled"))return;const a=t?.closest(ZR);a&&i.contains(a)&&a!==r||r!==Oo(i.ownerDocument)&&(Po=r)}function s_(e){const t=nn(e),i=t===Po;t===On(t)||t===In(t)||QR||!e.isTrusted||(!Pa&&!i&&!C0&&(Ur="virtual",vh("virtual",e)),Pa=!1,Po=null,C0=!1)}function l_(){Pa=!1,Po=null,C0=!0}function eA(e){if(typeof window>"u"||Mf.get(On(e)))return;const t=On(e),i=In(e);let r=t.HTMLElement.prototype.focus;function a(){Pa=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:a})}catch{}i.addEventListener("keydown",Df,!0),i.addEventListener("keyup",Df,!0),i.addEventListener("click",a_,!0),t.addEventListener("focus",s_,!0),t.addEventListener("blur",l_,!1),typeof t.PointerEvent<"u"?(i.addEventListener("pointerdown",_i,!0),i.addEventListener("pointermove",_i,!0),i.addEventListener("pointerup",_i,!0)):(i.addEventListener("mousedown",_i,!0),i.addEventListener("mousemove",_i,!0),i.addEventListener("mouseup",_i,!0)),t.addEventListener("beforeunload",()=>{tA(e)},{once:!0}),Mf.set(t,{focus:r})}var tA=(e,t)=>{const i=On(e),r=In(e),a=Mf.get(i);if(a){try{Object.defineProperty(i.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",Df,!0),r.removeEventListener("keyup",Df,!0),r.removeEventListener("click",a_,!0),i.removeEventListener("focus",s_,!0),i.removeEventListener("blur",l_,!1),typeof i.PointerEvent<"u"?(r.removeEventListener("pointerdown",_i,!0),r.removeEventListener("pointermove",_i,!0),r.removeEventListener("pointerup",_i,!0)):(r.removeEventListener("mousedown",_i,!0),r.removeEventListener("mousemove",_i,!0),r.removeEventListener("mouseup",_i,!0)),Mf.delete(i)}};function tu(){return Ur}function c_(e){Ur=e,vh(e,null)}function PS(){return Ur==="keyboard"||Ur==="virtual"}function u_(e={}){const{isTextInput:t,autoFocus:i,onChange:r,root:a}=e;eA(a),r?.({isFocusVisible:i||PS(),modality:Ur});const l=(c,d)=>{KR(!!t,c,d)&&r?.({isFocusVisible:PS(),modality:c})};return w0.add(l),()=>{w0.delete(l)}}var nA=o_.extendWith("group"),d_=Te("clipboard").parts("root","control","trigger","indicator","input","label");d_.build();var f_=Te("collapsible").parts("root","trigger","content","indicator");f_.build();var h_=Te("color-picker",["root","label","control","trigger","positioner","content","area","areaThumb","valueText","areaBackground","channelSlider","channelSliderLabel","channelSliderTrack","channelSliderThumb","channelSliderValueText","channelInput","transparencyGrid","swatchGroup","swatchTrigger","swatchIndicator","swatch","eyeDropperTrigger","formatTrigger","formatSelect"]);h_.build();const iA=["top","right","bottom","left"],Lo=Math.min,Hr=Math.max,Lf=Math.round,Yd=Math.floor,Fr=e=>({x:e,y:e}),rA={left:"right",right:"left",bottom:"top",top:"bottom"};function g_(e,t,i){return Hr(e,Lo(t,i))}function Wr(e,t){return typeof e=="function"?e(t):e}function jo(e){return e.split("-")[0]}function sl(e){return e.split("-")[1]}function jv(e){return e==="x"?"y":"x"}function Bv(e){return e==="y"?"height":"width"}function sr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Gv(e){return jv(sr(e))}function oA(e,t,i){i===void 0&&(i=!1);const r=sl(e),a=Gv(e),l=Bv(a);let c=a==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=jf(c)),[c,jf(c)]}function aA(e){const t=jf(e);return[E0(e),t,E0(t)]}function E0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const MS=["left","right"],DS=["right","left"],sA=["top","bottom"],lA=["bottom","top"];function cA(e,t,i){switch(e){case"top":case"bottom":return i?t?DS:MS:t?MS:DS;case"left":case"right":return t?sA:lA;default:return[]}}function uA(e,t,i,r){const a=sl(e);let l=cA(jo(e),i==="start",r);return a&&(l=l.map(c=>c+"-"+a),t&&(l=l.concat(l.map(E0)))),l}function jf(e){const t=jo(e);return rA[t]+e.slice(t.length)}function dA(e){var t,i,r,a;return{top:(t=e.top)!=null?t:0,right:(i=e.right)!=null?i:0,bottom:(r=e.bottom)!=null?r:0,left:(a=e.left)!=null?a:0}}function p_(e){return typeof e!="number"?dA(e):{top:e,right:e,bottom:e,left:e}}function Bf(e){const{x:t,y:i,width:r,height:a}=e;return{width:r,height:a,top:i,left:t,right:t+r,bottom:i+a,x:t,y:i}}function LS(e,t,i){let{reference:r,floating:a}=e;const l=sr(t),c=Gv(t),d=Bv(c),h=jo(t),p=l==="y",m=r.x+r.width/2-a.width/2,v=r.y+r.height/2-a.height/2,b=r[d]/2-a[d]/2;let y;switch(h){case"top":y={x:m,y:r.y-a.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:v};break;case"left":y={x:r.x-a.width,y:v};break;default:y={x:r.x,y:r.y}}const x=sl(t);return x&&(y[c]+=b*(x==="end"?1:-1)*(i&&p?-1:1)),y}async function fA(e,t){var i;t===void 0&&(t={});const{x:r,y:a,platform:l,rects:c,elements:d,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:v="floating",altBoundary:b=!1,padding:y=0}=Wr(t,e),x=p_(y),w=d[b?v==="floating"?"reference":"floating":v],C=Bf(await l.getClippingRect({element:(i=await(l.isElement==null?void 0:l.isElement(w)))==null||i?w:w.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:h})),R=v==="floating"?{x:r,y:a,width:c.floating.width,height:c.floating.height}:c.reference,z=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),D=await(l.isElement==null?void 0:l.isElement(z))&&await(l.getScale==null?void 0:l.getScale(z))||{x:1,y:1},T=Bf(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:R,offsetParent:z,strategy:h}):R);return{top:(C.top-T.top+x.top)/D.y,bottom:(T.bottom-C.bottom+x.bottom)/D.y,left:(C.left-T.left+x.left)/D.x,right:(T.right-C.right+x.right)/D.x}}const hA=50,gA=async(e,t,i)=>{const{placement:r="bottom",strategy:a="absolute",middleware:l=[],platform:c}=i,d=c.detectOverflow?c:{...c,detectOverflow:fA},h=await(c.isRTL==null?void 0:c.isRTL(t));let p=await c.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:v}=LS(p,r,h),b=r,y=0;const x={};for(let _=0;_<l.length;_++){const w=l[_];if(!w)continue;const{name:C,fn:R}=w,{x:z,y:D,data:T,reset:k}=await R({x:m,y:v,initialPlacement:r,placement:b,strategy:a,middlewareData:x,rects:p,platform:d,elements:{reference:e,floating:t}});m=z??m,v=D??v,x[C]={...x[C],...T},k&&y<hA&&(y++,typeof k=="object"&&(k.placement&&(b=k.placement),k.rects&&(p=k.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:a}):k.rects),{x:m,y:v}=LS(p,b,h)),_=-1)}return{x:m,y:v,placement:b,strategy:a,middlewareData:x}},pA=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:r,placement:a,rects:l,platform:c,elements:d,middlewareData:h}=t,{element:p,padding:m=0}=Wr(e,t)||{};if(p==null)return{};const v=p_(m),b={x:i,y:r},y=Gv(a),x=Bv(y),_=await c.getDimensions(p),w=y==="y",C=w?"top":"left",R=w?"bottom":"right",z=w?"clientHeight":"clientWidth",D=l.reference[x]+l.reference[y]-b[y]-l.floating[x],T=b[y]-l.reference[y],k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(p));let A=k?k[z]:0;(!A||!await(c.isElement==null?void 0:c.isElement(k)))&&(A=d.floating[z]||l.floating[x]);const L=D/2-T/2,W=A/2-_[x]/2-1,V=Lo(v[C],W),M=Lo(v[R],W),I=A-_[x]-M,U=A/2-_[x]/2+L,X=g_(V,U,I),K=!h.arrow&&sl(a)!=null&&U!==X&&l.reference[x]/2-(U<V?V:M)-_[x]/2<0,P=K?U<V?U-V:U-I:0;return{[y]:b[y]+P,data:{[y]:X,centerOffset:U-X-P,...K&&{alignmentOffset:P}},reset:K}}}),mA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var i,r;const{placement:a,middlewareData:l,rects:c,initialPlacement:d,platform:h,elements:p}=t,{mainAxis:m=!0,crossAxis:v=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:_=!0,...w}=Wr(e,t);if((i=l.arrow)!=null&&i.alignmentOffset)return{};const C=jo(a),R=sr(d),z=jo(d)===d,D=await(h.isRTL==null?void 0:h.isRTL(p.floating)),T=b||(z||!_?[jf(d)]:aA(d)),k=x!=="none";!b&&k&&T.push(...uA(d,_,x,D));const A=[d,...T],L=await h.detectOverflow(t,w),W=[];let V=((r=l.flip)==null?void 0:r.overflows)||[];if(m&&W.push(L[C]),v){const X=oA(a,c,D);W.push(L[X[0]],L[X[1]])}if(V=[...V,{placement:a,overflows:W}],!W.every(X=>X<=0)){var M,I;const X=(((M=l.flip)==null?void 0:M.index)||0)+1,K=A[X];if(K&&(!(v==="alignment"?R!==sr(K):!1)||V.every(te=>sr(te.placement)===R?te.overflows[0]>0:!0)))return{data:{index:X,overflows:V},reset:{placement:K}};let P=(I=V.filter(ee=>ee.overflows[0]<=0).sort((ee,te)=>ee.overflows[1]-te.overflows[1])[0])==null?void 0:I.placement;if(!P)switch(y){case"bestFit":{var U;const ee=(U=V.filter(te=>{if(k){const de=sr(te.placement);return de===R||de==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(de=>de>0).reduce((de,ce)=>de+ce,0)]).sort((te,de)=>te[1]-de[1])[0])==null?void 0:U[0];ee&&(P=ee);break}case"initialPlacement":P=d;break}if(a!==P)return{reset:{placement:P}}}return{}}}};function jS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BS(e){return iA.some(t=>e[t]>=0)}const vA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i,platform:r}=t,{strategy:a="referenceHidden",...l}=Wr(e,t);switch(a){case"referenceHidden":{const c=await r.detectOverflow(t,{...l,elementContext:"reference"}),d=jS(c,i.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:BS(d)}}}case"escaped":{const c=await r.detectOverflow(t,{...l,altBoundary:!0}),d=jS(c,i.floating);return{data:{escapedOffsets:d,escaped:BS(d)}}}default:return{}}}}},m_=new Set(["left","top"]);async function bA(e,t){const{placement:i,platform:r,elements:a}=e,l=await(r.isRTL==null?void 0:r.isRTL(a.floating)),c=jo(i),d=sl(i),h=sr(i)==="y",p=m_.has(c)?-1:1,m=l&&h?-1:1,v=Wr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return d&&typeof x=="number"&&(y=d==="end"?x*-1:x),h?{x:y*m,y:b*p}:{x:b*p,y:y*m}}const yA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,r;const{x:a,y:l,placement:c,middlewareData:d}=t,h=await bA(t,e);return c===((i=d.offset)==null?void 0:i.placement)&&(r=d.arrow)!=null&&r.alignmentOffset?{}:{x:a+h.x,y:l+h.y,data:{...h,placement:c}}}}},xA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:r,placement:a,platform:l}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:h={fn:R=>{let{x:z,y:D}=R;return{x:z,y:D}}},...p}=Wr(e,t),m={x:i,y:r},v=await l.detectOverflow(t,p),b=sr(a),y=jv(b);let x=m[y],_=m[b];const w=(R,z)=>g_(z+v[R==="y"?"top":"left"],z,z-v[R==="y"?"bottom":"right"]);c&&(x=w(y,x)),d&&(_=w(b,_));const C=h.fn({...t,[y]:x,[b]:_});return{...C,data:{x:C.x-i,y:C.y-r,enabled:{[y]:c,[b]:d}}}}}},SA=function(e){return e===void 0&&(e={}),{options:e,fn(t){var i,r;const{x:a,y:l,placement:c,rects:d,middlewareData:h}=t,{offset:p=0,mainAxis:m=!0,crossAxis:v=!0}=Wr(e,t),b={x:a,y:l},y=sr(c),x=jv(y);let _=b[x],w=b[y];const C=Wr(p,t),R=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(i=C.mainAxis)!=null?i:0,crossAxis:(r=C.crossAxis)!=null?r:0};if(m){const T=x==="y"?"height":"width",k=d.reference[x]-d.floating[T]+R.mainAxis,A=d.reference[x]+d.reference[T]-R.mainAxis;_<k?_=k:_>A&&(_=A)}if(v){var z,D;const T=x==="y"?"width":"height",k=m_.has(jo(c)),A=d.reference[y]-d.floating[T]+(k&&((z=h.offset)==null?void 0:z[y])||0)+(k?0:R.crossAxis),L=d.reference[y]+d.reference[T]+(k?0:((D=h.offset)==null?void 0:D[y])||0)-(k?R.crossAxis:0);w<A?w=A:w>L&&(w=L)}return{[x]:_,[y]:w}}}},_A=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:i,rects:r,platform:a,elements:l}=t,{apply:c=()=>{},...d}=Wr(e,t),h=await a.detectOverflow(t,d),p=jo(i),m=sl(i),v=sr(i)==="y",{width:b,height:y}=r.floating;let x,_;p==="top"||p==="bottom"?(x=p,_=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(_=p,x=m==="end"?"top":"bottom");const w=y-h.top-h.bottom,C=b-h.left-h.right,R=Lo(y-h[x],w),z=Lo(b-h[_],C),D=t.middlewareData.shift,T=!D;let k=R,A=z;D!=null&&D.enabled.x&&(A=C),D!=null&&D.enabled.y&&(k=w),T&&!m&&(v?A=b-2*Hr(h.left,h.right):k=y-2*Hr(h.top,h.bottom)),await c({...t,availableWidth:A,availableHeight:k});const L=await a.getDimensions(l.floating);return b!==L.width||y!==L.height?{reset:{rects:!0}}:{}}}};function bh(){return typeof window<"u"}function ll(e){return v_(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qr(e){var t;return(t=(v_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function v_(e){return bh()?e instanceof Node||e instanceof $n(e).Node:!1}function ur(e){return bh()?e instanceof Element||e instanceof $n(e).Element:!1}function Ho(e){return bh()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function GS(e){return!bh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function yh(e){const{overflow:t,overflowX:i,overflowY:r,display:a}=dr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+i)&&a!=="inline"&&a!=="contents"}function wA(e){return/^(table|td|th)$/.test(ll(e))}function xh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const CA=/transform|translate|scale|rotate|perspective|filter/,EA=/paint|layout|strict|content/,ya=e=>!!e&&e!=="none";let Am;function Vv(e){const t=ur(e)?dr(e):e;return ya(t.transform)||ya(t.translate)||ya(t.scale)||ya(t.rotate)||ya(t.perspective)||!Hv()&&(ya(t.backdropFilter)||ya(t.filter))||CA.test(t.willChange||"")||EA.test(t.contain||"")}function TA(e){let t=Ma(e);for(;Ho(t)&&!nu(t);){if(Vv(t))return t;if(xh(t))return null;t=Ma(t)}return null}function Hv(){return Am==null&&(Am=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Am}function nu(e){return/^(html|body|#document)$/.test(ll(e))}function dr(e){return $n(e).getComputedStyle(e)}function Sh(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ma(e){if(ll(e)==="html")return e;const t=e.assignedSlot||e.parentNode||GS(e)&&e.host||qr(e);return GS(t)?t.host:t}function b_(e){const t=Ma(e);return nu(t)?(e.ownerDocument||e).body:Ho(t)&&yh(t)?t:b_(t)}function iu(e,t,i){var r;t===void 0&&(t=[]),i===void 0&&(i=!0);const a=b_(e),l=a===((r=e.ownerDocument)==null?void 0:r.body),c=$n(a);if(l){const d=T0(c);return t.concat(c,c.visualViewport||[],yh(a)?a:[],d&&i?iu(d):[])}else return t.concat(a,iu(a,[],i))}function T0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function y_(e){const t=dr(e);let i=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Ho(e),l=a?e.offsetWidth:i,c=a?e.offsetHeight:r,d=Lf(i)!==l||Lf(r)!==c;return d&&(i=l,r=c),{width:i,height:r,$:d}}function Fv(e){return ur(e)?e:e.contextElement}function Ws(e){const t=Fv(e);if(!Ho(t))return Fr(1);const i=t.getBoundingClientRect(),{width:r,height:a,$:l}=y_(t);let c=(l?Lf(i.width):i.width)/r,d=(l?Lf(i.height):i.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const kA=Fr(0);function x_(e){const t=$n(e);return!Hv()||!t.visualViewport?kA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zA(e,t,i){return t===void 0&&(t=!1),!!i&&t&&i===$n(e)}function Da(e,t,i,r){t===void 0&&(t=!1),i===void 0&&(i=!1);const a=e.getBoundingClientRect(),l=Fv(e);let c=Fr(1);t&&(r?ur(r)&&(c=Ws(r)):c=Ws(e));const d=zA(l,i,r)?x_(l):Fr(0);let h=(a.left+d.x)/c.x,p=(a.top+d.y)/c.y,m=a.width/c.x,v=a.height/c.y;if(l&&r){const b=$n(l),y=ur(r)?$n(r):r;let x=b,_=T0(x);for(;_&&y!==x;){const w=Ws(_),C=_.getBoundingClientRect(),R=dr(_),z=C.left+(_.clientLeft+parseFloat(R.paddingLeft))*w.x,D=C.top+(_.clientTop+parseFloat(R.paddingTop))*w.y;h*=w.x,p*=w.y,m*=w.x,v*=w.y,h+=z,p+=D,x=$n(_),_=T0(x)}}return Bf({width:m,height:v,x:h,y:p})}function _h(e,t){const i=Sh(e).scrollLeft;return t?t.left+i:Da(qr(e)).left+i}function S_(e,t){const i=e.getBoundingClientRect(),r=i.left+t.scrollLeft-_h(e,i),a=i.top+t.scrollTop;return{x:r,y:a}}function RA(e){let{elements:t,rect:i,offsetParent:r,strategy:a}=e;const l=a==="fixed",c=qr(r),d=t?xh(t.floating):!1;if(r===c||d&&l)return i;let h={scrollLeft:0,scrollTop:0},p=Fr(1);const m=Fr(0),v=Ho(r);if((v||!l)&&((ll(r)!=="body"||yh(c))&&(h=Sh(r)),v)){const y=Da(r);p=Ws(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const b=c&&!v&&!l?S_(c,h):Fr(0);return{width:i.width*p.x,height:i.height*p.y,x:i.x*p.x-h.scrollLeft*p.x+m.x+b.x,y:i.y*p.y-h.scrollTop*p.y+m.y+b.y}}function AA(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function OA(e){const t=Sh(e),i=e.ownerDocument.body,r=Hr(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),a=Hr(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let l=-t.scrollLeft+_h(e);const c=-t.scrollTop;return dr(i).direction==="rtl"&&(l+=Hr(e.clientWidth,i.clientWidth)-r),{width:r,height:a,x:l,y:c}}const NA=25;function IA(e,t,i){i===void 0&&(i="viewport");const r=i==="layoutViewport",a=$n(e),l=qr(e),c=a.visualViewport;let d=l.clientWidth,h=l.clientHeight,p=0,m=0;if(c){const b=!Hv()||t==="fixed";r?b||(p=-c.offsetLeft,m=-c.offsetTop):(d=c.width,h=c.height,b&&(p=c.offsetLeft,m=c.offsetTop))}if(_h(l)<=0){const b=l.ownerDocument,y=b.body,x=getComputedStyle(y),_=b.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(l.clientWidth-y.clientWidth-_),C=getComputedStyle(l).scrollbarGutter==="stable both-edges"?w/2:w;C<=NA&&(d-=C)}return{width:d,height:h,x:p,y:m}}function PA(e,t){const i=Da(e,!0,t==="fixed"),r=i.top+e.clientTop,a=i.left+e.clientLeft,l=Ws(e),c=e.clientWidth*l.x,d=e.clientHeight*l.y,h=a*l.x,p=r*l.y;return{width:c,height:d,x:h,y:p}}function VS(e,t,i){let r;if(t==="viewport"||t==="layoutViewport")r=IA(e,i,t);else if(t==="document")r=OA(qr(e));else if(ur(t))r=PA(t,i);else{const a=x_(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Bf(r)}function MA(e,t){const i=t.get(e);if(i)return i;let r=iu(e,[],!1).filter(d=>ur(d)&&ll(d)!=="body"),a=null;const l=dr(e).position==="fixed";let c=l?Ma(e):e;for(;ur(c)&&!nu(c);){const d=dr(c),h=Vv(c),p=a?a.position:l?"fixed":"";!h&&(p==="fixed"||p==="absolute"&&d.position==="static")?r=r.filter(v=>v!==c):a=d,c=Ma(c)}return t.set(e,r),r}function DA(e){let{element:t,boundary:i,rootBoundary:r,strategy:a}=e;const c=[...i==="clippingAncestors"?xh(t)?[]:MA(t,this._c):[].concat(i),r],d=VS(t,c[0],a);let h=d.top,p=d.right,m=d.bottom,v=d.left;for(let b=1;b<c.length;b++){const y=VS(t,c[b],a);h=Hr(y.top,h),p=Lo(y.right,p),m=Lo(y.bottom,m),v=Hr(y.left,v)}return{width:p-v,height:m-h,x:v,y:h}}function LA(e){const{width:t,height:i}=y_(e);return{width:t,height:i}}function jA(e,t,i){const r=Ho(t),a=qr(t),l=i==="fixed",c=Da(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const h=Fr(0);if((r||!l)&&((ll(t)!=="body"||yh(a))&&(d=Sh(t)),r)){const b=Da(t,!0,l,t);h.x=b.x+t.clientLeft,h.y=b.y+t.clientTop}!r&&a&&(h.x=_h(a));const p=a&&!r&&!l?S_(a,d):Fr(0),m=c.left+d.scrollLeft-h.x-p.x,v=c.top+d.scrollTop-h.y-p.y;return{x:m,y:v,width:c.width,height:c.height}}function Om(e){return dr(e).position==="static"}function HS(e,t){if(!Ho(e)||dr(e).position==="fixed")return null;if(t)return t(e);let i=e.offsetParent;return qr(e)===i&&(i=i.ownerDocument.body),i}function __(e,t){const i=$n(e);if(xh(e))return i;if(!Ho(e)){let a=Ma(e);for(;a&&!nu(a);){if(ur(a)&&!Om(a))return a;a=Ma(a)}return i}let r=HS(e,t);for(;r&&wA(r)&&Om(r);)r=HS(r,t);return r&&nu(r)&&Om(r)&&!Vv(r)?i:r||TA(e)||i}const BA=async function(e){const t=this.getOffsetParent||__,i=this.getDimensions,r=await i(e.floating);return{reference:jA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function GA(e){return dr(e).direction==="rtl"}const VA={convertOffsetParentRelativeRectToViewportRelativeRect:RA,getDocumentElement:qr,getClippingRect:DA,getOffsetParent:__,getElementRects:BA,getClientRects:AA,getDimensions:LA,getScale:Ws,isElement:ur,isRTL:GA};function w_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HA(e,t,i){let r=null,a;const l=qr(e);function c(){var m;clearTimeout(a),(m=r)==null||m.disconnect(),r=null}function d(m,v){m===void 0&&(m=!1),v===void 0&&(v=1),c();const b=e.getBoundingClientRect(),{left:y,top:x,width:_,height:w}=b;if(m||t(),!_||!w)return;const C=Yd(x),R=Yd(l.clientWidth-(y+_)),z=Yd(l.clientHeight-(x+w)),D=Yd(y),k={rootMargin:-C+"px "+-R+"px "+-z+"px "+-D+"px",threshold:Hr(0,Lo(1,v))||1};let A=!0;function L(W){const V=W[0].intersectionRatio;if(!w_(b,e.getBoundingClientRect()))return d();if(V!==v){if(!A)return d();V?d(!1,V):a=setTimeout(()=>{d(!1,1e-7)},1e3)}A=!1}try{r=new IntersectionObserver(L,{...k,root:l.ownerDocument})}catch{r=new IntersectionObserver(L,k)}r.observe(e)}const h=$n(e),p=()=>d(i);return h.addEventListener("resize",p),d(!0),()=>{h.removeEventListener("resize",p),c()}}function FA(e,t,i,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,p=Fv(e),m=a||l?[...p?iu(p):[],...t?iu(t):[]]:[];m.forEach(C=>{a&&C.addEventListener("scroll",i),l&&C.addEventListener("resize",i)});const v=p&&d?HA(p,i,l):null;let b=-1,y=null;c&&(y=new ResizeObserver(C=>{let[R]=C;R&&R.target===p&&y&&t&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var z;(z=y)==null||z.observe(t)})),i()}),p&&!h&&y.observe(p),t&&y.observe(t));let x,_=h?Da(e):null;h&&w();function w(){const C=Da(e);_&&!w_(_,C)&&i(),_=C,x=requestAnimationFrame(w)}return i(),()=>{var C;m.forEach(R=>{a&&R.removeEventListener("scroll",i),l&&R.removeEventListener("resize",i)}),v?.(),(C=y)==null||C.disconnect(),y=null,h&&cancelAnimationFrame(x)}}const $A=yA,UA=xA,WA=mA,YA=_A,qA=vA,XA=pA,ZA=SA,KA=(e,t,i)=>{const r=new Map,a=i??{},l={...VA,...a.platform,_c:r};return gA(e,t,{...a,platform:l})};function FS(e=0,t=0,i=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,i,r);const a={x:e,y:t,width:i,height:r,top:t,right:e+i,bottom:t+r,left:e};return{...a,toJSON:()=>a}}function QA(e){if(!e)return FS();const{x:t,y:i,width:r,height:a}=e;return FS(t,i,r,a)}function JA(e,t){return{contextElement:Yt(e)?e:e?.contextElement,getBoundingClientRect:()=>{const i=e,r=t?.(i);return r||!i?QA(r):i.getBoundingClientRect()}}}var dc=e=>({variable:e,reference:`var(${e})`}),Gr={arrowSize:dc("--arrow-size"),arrowSizeHalf:dc("--arrow-size-half"),arrowBg:dc("--arrow-background"),transformOrigin:dc("--transform-origin"),arrowOffset:dc("--arrow-offset")},eO=e=>e==="top"||e==="bottom"?"y":"x";function tO(e,t){return{name:"transformOrigin",fn(i){const{elements:r,middlewareData:a,placement:l,rects:c,y:d}=i,h=l.split("-")[0],p=eO(h),m=a.arrow?.x||0,v=a.arrow?.y||0,b=t?.clientWidth||0,y=t?.clientHeight||0,x=m+b/2,_=v+y/2,w=Math.abs(a.shift?.y||0),C=c.reference.height/2,R=y/2,z=e.offset?.mainAxis??e.gutter,D=typeof z=="number"?z+R:z??R,T=w>D,k={top:`${x}px calc(100% + ${D}px)`,bottom:`${x}px ${-D}px`,left:`calc(100% + ${D}px) ${_}px`,right:`${-D}px ${_}px`}[h],A=`${x}px ${c.reference.y+C-d}px`,L=!!e.overlap&&p==="y"&&T;return r.floating.style.setProperty(Gr.transformOrigin.variable,L?A:k),{data:{transformOrigin:L?A:k}}}}}var nO={name:"rects",fn({rects:e}){return{data:e}}},iO=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:i}){if(!i.arrow)return{};const{x:r,y:a}=i.arrow,l=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:a!=null?`${a}px`:"",[l]:`calc(100% + ${Gr.arrowOffset.reference})`}),{}}}};function rO(e){const[t,i]=e.split("-");return{side:t,align:i,hasAlign:i!=null}}function oO(e){return e.split("-")[0]}var aO={strategy:"absolute",placement:"bottom",listeners:!0,restoreStyles:!1,applyStyles:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function $S(e,t){const i=e.devicePixelRatio||1;return Math.round(t*i)/i}function Ds(e,t){return e!=null&&Math.abs(e-t)<.5}function wh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function sO(e,t,i){const r=e||t.createElement("div");return XA({element:r,padding:i.arrowPadding})}function lO(e,t){if(!nk(t.offset??t.gutter))return $A(({placement:i})=>{const r=(e?.clientHeight||0)/2,a=t.offset?.mainAxis??t.gutter,l=typeof a=="number"?a+r:a??r,{hasAlign:c}=rO(i),d=c?void 0:t.shift,h=t.offset?.crossAxis??d;return Jc({crossAxis:h,mainAxis:l,alignmentAxis:t.shift})})}function cO(e){if(e.flip)return WA(()=>{const t=wh(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function uO(e){if(!(!e.slide&&!e.overlap))return UA(()=>{const t=wh(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:ZA()}})}function dO(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,i,r,a;return YA(()=>{const l=wh(e.boundary);return{padding:e.overflowPadding,...l?{boundary:l}:void 0,apply({elements:c,rects:d,availableHeight:h,availableWidth:p}){const m=c.floating,v=Math.round(d.reference.width),b=Math.round(d.reference.height);p=Math.floor(p),h=Math.floor(h),Ds(t,v)||(m.style.setProperty("--reference-width",`${v}px`),t=v),Ds(i,b)||(m.style.setProperty("--reference-height",`${b}px`),i=b),Ds(r,p)||(m.style.setProperty("--available-width",`${p}px`),r=p),Ds(a,h)||(m.style.setProperty("--available-height",`${h}px`),a=h)}}})}function fO(e){if(e.hideWhenDetached)return qA(()=>({strategy:"referenceHidden",boundary:wh(e.boundary)??"clippingAncestors"}))}function hO(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var gO=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],pO=["top","right","bottom","left"];function US(e,t){if(!e)return w4;const i=new Map(t.map(r=>[r,e.style.getPropertyValue(r)]));return()=>{i.forEach((r,a)=>{r?e.style.setProperty(a,r):e.style.removeProperty(a)}),e.style.length===0&&e.removeAttribute("style")}}function WS(e){return e==null?null:Yt(e)?e:typeof e=="object"&&e&&"contextElement"in e&&e.contextElement?e.contextElement:e}function mO(e,t,i={}){const r=()=>(typeof t=="function"?t():t)??null,a=()=>{const V=typeof e=="function"?e():e;return i.getAnchorElement?.()??V},l=()=>{const V=a();return!V&&!i.getAnchorRect?null:JA(V,i.getAnchorRect)},c=Object.assign({},aO,i);let d=[],h=null,p,m;function v(V){p?.(),m?.(),h=V,p=c.restoreStyles?US(V,gO):void 0;const M=V.querySelector("[data-part=arrow]");m=c.restoreStyles?US(M,pO):void 0,d=[lO(M,c),cO(c),uO(c),sO(M,V.ownerDocument,c),iO(M),tO({gutter:c.gutter,offset:c.offset,overlap:c.overlap},M),dO(c),fO(c),nO]}const{placement:b,strategy:y,onComplete:x,onPositioned:_}=c;let w,C,R=!1,z,D,T=w4;const k=hO(c.listeners);function A(){if(!c.listeners)return;const V=a(),M=l(),I=r();if(!M||!I)return;(WS(V)!==WS(z)||I!==D)&&(T(),z=V,D=I,T=FA(M,I,W,k))}async function L(){A();const V=r();if(!V)return;V!==h&&(v(V),R=!1);const M=l();if(!M)return;const I=await KA(M,V,{placement:b,middleware:d,strategy:y}),U=On(V),X=$S(U,I.x),K=$S(U,I.y);if(x?.({...I,x:X,y:K}),c.applyStyles!==!1&&(Ds(w,X)||(V.style.setProperty("--x",`${X}px`),w=X),Ds(C,K)||(V.style.setProperty("--y",`${K}px`),C=K),c.hideWhenDetached&&(I.middlewareData.hide?.referenceHidden?(V.style.setProperty("visibility","hidden"),V.style.setProperty("pointer-events","none")):(V.style.removeProperty("visibility"),V.style.removeProperty("pointer-events"))),!R)){const P=V.firstElementChild;P&&(V.style.setProperty("--z-index",Zs(P).zIndex),R=!0)}}async function W(){i.updatePosition?(await i.updatePosition({updatePosition:L,floatingElement:r()}),_?.({placed:!0})):await L()}return W(),()=>{T(),m?.(),p?.(),_?.({placed:!1})}}function YS(e,t,i={}){const{defer:r,...a}=i,l=r?_n:d=>d(),c=[];return c.push(l(()=>{c.push(mO(e,t,a))})),()=>{c.forEach(d=>d?.())}}var vO={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function bO(e={}){const{placement:t,sameWidth:i,fitViewport:r,strategy:a="absolute"}=e;return{arrow:{position:"absolute",width:Gr.arrowSize.reference,height:Gr.arrowSize.reference,[Gr.arrowSizeHalf.variable]:`calc(${Gr.arrowSize.reference} / 2)`,[Gr.arrowOffset.variable]:`calc(${Gr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?vO[t.split("-")[0]]:void 0,background:Gr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:a,isolation:"isolate",minWidth:i?void 0:"max-content",width:i?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var yO=h_.extendWith("view"),C_=Te("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger");C_.build();var xO=Object.defineProperty,SO=(e,t,i)=>t in e?xO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Ee=(e,t,i)=>SO(e,typeof t!="symbol"?t+"":t,i),_f={itemToValue(e){return typeof e=="string"?e:xm(e)&&Oa(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:xm(e)&&Oa(e,"label")?e.label:_f.itemToValue(e)},isItemDisabled(e){return xm(e)&&Oa(e,"disabled")?!!e.disabled:!1}},hu=class E_{constructor(t){Ee(this,"options",t),Ee(this,"items"),Ee(this,"indexMap",null),Ee(this,"copy",i=>new E_({...this.options,items:i??[...this.items]})),Ee(this,"isEqual",i=>ol(this.items,i.items)),Ee(this,"setItems",i=>this.copy(i)),Ee(this,"getValues",(i=this.items)=>{const r=[];for(const a of i){const l=this.getItemValue(a);l!=null&&r.push(l)}return r}),Ee(this,"find",i=>{if(i==null)return null;const r=this.indexOf(i);return r!==-1?this.at(r):null}),Ee(this,"findMany",i=>{const r=[];for(const a of i){const l=this.find(a);l!=null&&r.push(l)}return r}),Ee(this,"at",i=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[i]??null;let r=0;const a=this.group();for(const[,l]of a)for(const c of l){if(r===i)return c;r++}return null}),Ee(this,"sortFn",(i,r)=>{const a=this.indexOf(i),l=this.indexOf(r);return(a??0)-(l??0)}),Ee(this,"sort",i=>[...i].sort(this.sortFn.bind(this))),Ee(this,"getItemValue",i=>i==null?null:this.options.itemToValue?.(i)??_f.itemToValue(i)),Ee(this,"getItemDisabled",i=>i==null?!1:this.options.isItemDisabled?.(i)??_f.isItemDisabled(i)),Ee(this,"stringifyItem",i=>i==null?null:this.options.itemToString?.(i)??_f.itemToString(i)),Ee(this,"stringify",i=>i==null?null:this.stringifyItem(this.find(i))),Ee(this,"stringifyItems",(i,r=", ")=>{const a=[];for(const l of i){const c=this.stringifyItem(l);c!=null&&a.push(c)}return a.join(r)}),Ee(this,"stringifyMany",(i,r)=>this.stringifyItems(this.findMany(i),r)),Ee(this,"has",i=>this.indexOf(i)!==-1),Ee(this,"hasItem",i=>i==null?!1:this.has(this.getItemValue(i))),Ee(this,"group",()=>{const{groupBy:i,groupSort:r}=this.options;if(!i)return[["",[...this.items]]];const a=new Map;this.items.forEach((c,d)=>{const h=i(c,d);a.has(h)||a.set(h,[]),a.get(h).push(c)});let l=Array.from(a.entries());return r&&l.sort(([c],[d])=>{if(typeof r=="function")return r(c,d);if(Array.isArray(r)){const h=r.indexOf(c),p=r.indexOf(d);return h===-1?1:p===-1?-1:h-p}return r==="asc"?c.localeCompare(d):r==="desc"?d.localeCompare(c):0}),l}),Ee(this,"getNextValue",(i,r=1,a=!1)=>{let l=this.indexOf(i);if(l===-1)return null;for(l=a?Math.min(l+r,this.size-1):l+r;l<=this.size&&this.getItemDisabled(this.at(l));)l++;return this.getItemValue(this.at(l))}),Ee(this,"getPreviousValue",(i,r=1,a=!1)=>{let l=this.indexOf(i);if(l===-1)return null;for(l=a?Math.max(l-r,0):l-r;l>=0&&this.getItemDisabled(this.at(l));)l--;return this.getItemValue(this.at(l))}),Ee(this,"indexOf",i=>{if(i==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(r=>this.getItemValue(r)===i);if(!this.indexMap){this.indexMap=new Map;let r=0;const a=this.group();for(const[,l]of a)for(const c of l){const d=this.getItemValue(c);d!=null&&this.indexMap.set(d,r),r++}}return this.indexMap.get(i)??-1}),Ee(this,"getByText",(i,r)=>{const a=r!=null?this.indexOf(r):-1,l=i.length===1;for(let c=0;c<this.items.length;c++){const d=this.items[(a+c+1)%this.items.length];if(!(l&&this.getItemValue(d)===r)&&!this.getItemDisabled(d)&&_O(this.stringifyItem(d),i))return d}}),Ee(this,"search",(i,r)=>{const{state:a,currentValue:l,timeout:c=350}=r,d=a.keysSoFar+i,p=d.length>1&&Array.from(d).every(x=>x===d[0])?d[0]:d,m=this.getByText(p,l),v=this.getItemValue(m);function b(){clearTimeout(a.timer),a.timer=-1}function y(x){a.keysSoFar=x,b(),x!==""&&(a.timer=+setTimeout(()=>{y(""),b()},c))}return y(d),v}),Ee(this,"update",(i,r)=>{let a=this.indexOf(i);return a===-1?this:this.copy([...this.items.slice(0,a),r,...this.items.slice(a+1)])}),Ee(this,"upsert",(i,r,a="append")=>{let l=this.indexOf(i);return l===-1?(a==="append"?this.append:this.prepend)(r):this.copy([...this.items.slice(0,l),r,...this.items.slice(l+1)])}),Ee(this,"insert",(i,...r)=>this.copy(fc(this.items,i,...r))),Ee(this,"insertBefore",(i,...r)=>{let a=this.indexOf(i);if(a===-1)if(this.items.length===0)a=0;else return this;return this.copy(fc(this.items,a,...r))}),Ee(this,"insertAfter",(i,...r)=>{let a=this.indexOf(i);if(a===-1)if(this.items.length===0)a=0;else return this;return this.copy(fc(this.items,a+1,...r))}),Ee(this,"prepend",(...i)=>this.copy(fc(this.items,0,...i))),Ee(this,"append",(...i)=>this.copy(fc(this.items,this.items.length,...i))),Ee(this,"filter",i=>{const r=this.items.filter((a,l)=>i(this.stringifyItem(a),l,a));return this.copy(r)}),Ee(this,"remove",(...i)=>{const r=i.map(a=>typeof a=="string"?a:this.getItemValue(a));return this.copy(this.items.filter(a=>{const l=this.getItemValue(a);return l==null?!1:!r.includes(l)}))}),Ee(this,"move",(i,r)=>{const a=this.indexOf(i);return a===-1?this:this.copy(qd(this.items,[a],r))}),Ee(this,"moveBefore",(i,...r)=>{let a=this.items.findIndex(c=>this.getItemValue(c)===i);if(a===-1)return this;let l=r.map(c=>this.items.findIndex(d=>this.getItemValue(d)===c)).sort((c,d)=>c-d);return this.copy(qd(this.items,l,a))}),Ee(this,"moveAfter",(i,...r)=>{let a=this.items.findIndex(c=>this.getItemValue(c)===i);if(a===-1)return this;let l=r.map(c=>this.items.findIndex(d=>this.getItemValue(d)===c)).sort((c,d)=>c-d);return this.copy(qd(this.items,l,a+1))}),Ee(this,"reorder",(i,r)=>this.copy(qd(this.items,[i],r))),Ee(this,"compareValue",(i,r)=>{const a=this.indexOf(i),l=this.indexOf(r);return a<l?-1:a>l?1:0}),Ee(this,"range",(i,r)=>{let a=[],l=i;for(;l!=null;){if(this.find(l)&&a.push(l),l===r)return a;l=this.getNextValue(l)}return[]}),Ee(this,"getValueRange",(i,r)=>i&&r?this.compareValue(i,r)<=0?this.range(i,r):this.range(r,i):[]),Ee(this,"toString",()=>{let i="";for(const r of this.items){const a=this.getItemValue(r),l=this.stringifyItem(r),c=this.getItemDisabled(r),d=[a,l,c].filter(Boolean).join(":");i+=d+","}return i}),Ee(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*this.items}},_O=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function fc(e,t,...i){return[...e.slice(0,t),...i,...e.slice(t)]}function qd(e,t,i){t=[...t].sort((a,l)=>a-l);const r=t.map(a=>e[a]);for(let a=t.length-1;a>=0;a--)e=[...e.slice(0,t[a]),...e.slice(t[a]+1)];return i=Math.max(0,i-t.filter(a=>a<i).length),[...e.slice(0,i),...r,...e.slice(i)]}function Vr(e){return Oa(e,"columnCount")&&Oa(e,"getRows")}function $v({values:e,collection:t,selectedItemMap:i}){const r=[];for(const a of e){const l=t.find(a)??i.get(a);l!=null&&r.push(l)}return r}function T_({selectedItemMap:e,values:t,selectedItems:i,collection:r}){const a=new Map(e);for(const c of i){const d=r.getItemValue(c);d!=null&&a.set(d,c)}const l=new Set(t);for(const c of a.keys())l.has(c)||a.delete(c);return a}function Ra({values:e,collection:t,selectedItemMap:i}){const r=$v({values:e,collection:t,selectedItemMap:i}),a=T_({selectedItemMap:i,values:e,selectedItems:r,collection:t});return{selectedItems:r,nextSelectedItemMap:a}}function k_({selectedItems:e,collection:t}){return T_({selectedItemMap:new Map,values:e.map(i=>t.getItemValue(i)).filter(Boolean),selectedItems:e,collection:t})}var wO=class wf extends Set{constructor(t=[]){super(t),Ee(this,"selectionMode","single"),Ee(this,"deselectable",!0),Ee(this,"copy",()=>{const i=new wf([...this]);return this.sync(i)}),Ee(this,"sync",i=>(i.selectionMode=this.selectionMode,i.deselectable=this.deselectable,i)),Ee(this,"isEmpty",()=>this.size===0),Ee(this,"isSelected",i=>this.selectionMode==="none"||i==null?!1:this.has(i)),Ee(this,"canSelect",(i,r)=>this.selectionMode!=="none"||!i.getItemDisabled(i.find(r))),Ee(this,"firstSelectedValue",i=>{let r=null;for(let a of this)(!r||i.compareValue(a,r)<0)&&(r=a);return r}),Ee(this,"lastSelectedValue",i=>{let r=null;for(let a of this)(!r||i.compareValue(a,r)>0)&&(r=a);return r}),Ee(this,"extendSelection",(i,r,a)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single")return this.replaceSelection(i,a);const l=this.copy(),c=Array.from(this).pop();for(let d of i.getValueRange(r,c??a))l.delete(d);for(let d of i.getValueRange(a,r))this.canSelect(i,d)&&l.add(d);return l}),Ee(this,"toggleSelection",(i,r)=>{if(this.selectionMode==="none")return this;if(this.selectionMode==="single"&&!this.isSelected(r))return this.replaceSelection(i,r);const a=this.copy();return a.has(r)?a.delete(r):a.canSelect(i,r)&&a.add(r),a}),Ee(this,"replaceSelection",(i,r)=>{if(this.selectionMode==="none")return this;if(r==null)return this;if(!this.canSelect(i,r))return this;const a=new wf([r]);return this.sync(a)}),Ee(this,"setSelection",i=>{if(this.selectionMode==="none")return this;let r=new wf;for(let a of i)if(a!=null&&(r.add(a),this.selectionMode==="single"))break;return this.sync(r)}),Ee(this,"clearSelection",()=>{const i=this.copy();return i.deselectable&&i.size>0&&i.clear(),i}),Ee(this,"select",(i,r,a)=>this.selectionMode==="none"?this:this.selectionMode==="single"?this.isSelected(r)&&this.deselectable?this.toggleSelection(i,r):this.replaceSelection(i,r):this.selectionMode==="multiple"||a?this.toggleSelection(i,r):this.replaceSelection(i,r)),Ee(this,"deselect",i=>{const r=this.copy();return r.delete(i),r}),Ee(this,"isEqual",i=>ol(Array.from(this),Array.from(i)))}},CO=C_.extendWith("empty"),z_=Te("date-input").parts("root","label","control","segmentGroup","segment","hiddenInput");z_.build();var R_=Te("date-picker").parts("clearTrigger","content","control","input","label","monthSelect","nextTrigger","positioner","presetTrigger","prevTrigger","rangeText","root","table","tableBody","tableCell","tableCellTrigger","tableHead","tableHeader","tableRow","trigger","view","viewControl","viewTrigger","yearSelect");R_.build();var EO=R_.extendWith("view","valueText"),Uv=Te("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),xa=Uv.build(),A_=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,O_=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,k0=e=>e.ids?.content??`dialog:${e.id}:content`,Wv=(e,t)=>{const i=e.ids?.trigger;return i!=null?Ta(i)?i(t):i:t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`},z0=e=>e.ids?.title??`dialog:${e.id}:title`,R0=e=>e.ids?.description??`dialog:${e.id}:description`,N_=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,hc=e=>e.getById(k0(e)),TO=e=>e.getById(A_(e)),kO=e=>e.getById(O_(e)),I_=e=>e.getById(Wv(e)),zO=e=>e.getById(z0(e)),RO=e=>e.getById(R0(e)),AO=e=>e.getById(N_(e)),A0=e=>zz(e.getRootNode(),`[data-scope="dialog"][data-part="trigger"]${Nk(e.id)}`),qS=(e,t)=>t==null?I_(e)??A0(e)[0]:e.getById(Wv(e,t));function OO(e,t){const{state:i,send:r,context:a,prop:l,scope:c}=e,d=l("aria-label"),h=i.matches("open"),p=a.get("triggerValue");return{open:h,setOpen(m){i.matches("open")!==m&&r({type:m?"OPEN":"CLOSE"})},triggerValue:p,setTriggerValue(m){r({type:"TRIGGER_VALUE.SET",value:m})},getTriggerProps(m={}){const{value:v}=m,b=v==null?!1:p===v;return t.button({...xa.trigger.attrs,dir:l("dir"),id:Wv(c,v),"data-ownedby":c.id,"data-value":v,"aria-haspopup":"dialog",type:"button","aria-expanded":v==null?h:h&&b,"data-state":h?"open":"closed","aria-controls":k0(c),"data-current":Ne(b),onClick(y){if(y.defaultPrevented)return;const x=h&&v!=null&&!b;r({type:x?"TRIGGER_VALUE.SET":"TOGGLE",value:v})}})},getBackdropProps(){return t.element({...xa.backdrop.attrs,dir:l("dir"),hidden:!h,id:O_(c),"data-state":h?"open":"closed"})},getPositionerProps(){return t.element({...xa.positioner.attrs,dir:l("dir"),id:A_(c),style:Jc({pointerEvents:!h||!l("modal")?"none":void 0})})},getContentProps(){const m=a.get("rendered");return t.element({...xa.content.attrs,dir:l("dir"),role:l("role"),hidden:!h,id:k0(c),tabIndex:-1,"data-state":h?"open":"closed","aria-modal":l("modal"),"aria-label":d||void 0,"aria-labelledby":d||!m.title?void 0:z0(c),"aria-describedby":m.description?R0(c):void 0,style:Jc({pointerEvents:l("modal")?void 0:"auto"})})},getTitleProps(){return t.element({...xa.title.attrs,dir:l("dir"),id:z0(c)})},getDescriptionProps(){return t.element({...xa.description.attrs,dir:l("dir"),id:R0(c)})},getCloseTriggerProps(){return t.button({...xa.closeTrigger.attrs,dir:l("dir"),id:N_(c),type:"button",onClick(m){m.defaultPrevented||(m.stopPropagation(),r({type:"CLOSE"}))}})}}}var NO=ah({props({props:e,scope:t}){const i=e.role==="alertdialog",r=i?()=>AO(t):void 0,a=typeof e.modal=="boolean"?e.modal:!0;return{role:"dialog",modal:a,trapFocus:a,preventScroll:a,closeOnInteractOutside:a&&!i,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e,prop:t,scope:i}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t("defaultTriggerValue")??null,value:t("triggerValue"),onChange(r){const a=t("onTriggerValueChange");if(!a)return;const l=qS(i,r);a({value:r,triggerElement:l})}}))}},watch({track:e,action:t,prop:i}){e([()=>i("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","setInitialFocus"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"TRIGGER_VALUE.SET":{actions:["setTriggerValue"]}}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen","setTriggerValue"]},{target:"open",actions:["invokeOnOpen","setTriggerValue"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen","setTriggerValue"]},{target:"open",actions:["invokeOnOpen","setTriggerValue"]}],"TRIGGER_VALUE.SET":{actions:["setTriggerValue"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:i}){return i_(()=>hc(e),{type:"dialog",defer:!0,pointerBlocking:i("modal"),layerStyleTargets:[()=>kO(e),()=>TO(e)],exclude:[I_(e),...A0(e)].filter(Boolean),onInteractOutside(a){i("onInteractOutside")?.(a),i("closeOnInteractOutside")||a.preventDefault()},persistentElements:i("persistentElements"),onFocusOutside:i("onFocusOutside"),onPointerDownOutside:i("onPointerDownOutside"),onRequestDismiss:i("onRequestDismiss"),onEscapeKeyDown(a){i("onEscapeKeyDown")?.(a),i("closeOnEscape")||a.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return WR(e.getDoc())},trapFocus({scope:e,prop:t,context:i}){return t("trapFocus")?HR(()=>hc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:()=>x0({root:hc(e),getInitialEl:t("initialFocusEl")}),setReturnFocus:a=>{const l=t("finalFocusEl")?.();if(l)return l;const c=i.get("triggerValue");if(c){const h=qS(e,c);if(h)return h}const d=A0(e)[0];return d||a},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?vR(()=>[hc(e)],{defer:!0}):void 0}},actions:{setInitialFocus({prop:e,scope:t}){e("trapFocus")||_n(()=>{x0({root:hc(t),getInitialEl:e("initialFocusEl")})?.focus({preventScroll:!0})})},checkRenderedElements({context:e,scope:t}){_n(()=>{e.set("rendered",{title:!!zO(t),description:!!RO(t)})})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set("triggerValue",t.value)},toggleVisibility({prop:e,send:t,event:i}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:i})}}}}),P_=Te("editable").parts("root","area","label","preview","input","editTrigger","submitTrigger","cancelTrigger","control");P_.build();var M_=Te("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator"),Mi=M_.build(),D_=Te("fieldset").parts("root","errorText","helperText","legend");D_.build();var L_=Te("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger");L_.build();var j_=Te("floating-panel").parts("trigger","positioner","content","header","body","title","resizeTrigger","dragTrigger","stageTrigger","closeTrigger","control");j_.build();var B_=Te("hoverCard").parts("arrow","arrowTip","trigger","positioner","content");B_.build();var G_=Te("listbox").parts("label","input","item","itemText","itemIndicator","itemGroup","itemGroupLabel","content","root","valueText"),nr=G_.build(),V_=e=>new hu(e);V_.empty=()=>new hu({items:[]});var IO=e=>e.ids?.root??`listbox:${e.id}`,O0=e=>e.ids?.content??`listbox:${e.id}:content`,XS=e=>e.ids?.label??`listbox:${e.id}:label`,N0=(e,t)=>e.ids?.item?.(t)??`listbox:${e.id}:item:${t}`,PO=(e,t)=>e.ids?.itemGroup?.(t)??`listbox:${e.id}:item-group:${t}`,ZS=(e,t)=>e.ids?.itemGroupLabel?.(t)??`listbox:${e.id}:item-group-label:${t}`,Gf=e=>e.getById(O0(e)),KS=(e,t)=>e.getById(N0(e,t));function MO(e,t){const{context:i,prop:r,scope:a,computed:l,send:c,refs:d}=e,h=r("disabled"),p=r("collection"),m=Vr(p)?"grid":"list",v=i.get("focused"),b=d.get("focusVisible")&&v,y=d.get("inputState"),x=i.get("value"),_=l("selectedItems"),w=i.get("highlightedValue"),C=i.get("highlightedItem"),R=l("isTypingAhead"),z=l("isInteractive"),D=w?N0(a,w):void 0;function T(k){const A=p.getItemDisabled(k.item),L=p.getItemValue(k.item);lu(L,()=>`[zag-js] No value found for item ${JSON.stringify(k.item)}`);const W=w===L;return{value:L,disabled:!!(h||A),focused:W&&v,focusVisible:W&&b,highlighted:W&&(y.focused?v:b),selected:i.get("value").includes(L)}}return{empty:x.length===0,highlightedItem:C,highlightedValue:w,clearHighlightedValue(){c({type:"HIGHLIGHTED_VALUE.SET",value:null})},selectedItems:_,hasSelectedItems:l("hasSelectedItems"),value:x,valueAsString:l("valueAsString"),collection:p,disabled:!!h,selectValue(k){c({type:"ITEM.SELECT",value:k})},setValue(k){c({type:"VALUE.SET",value:k})},selectAll(){if(!l("multiple"))throw new Error("[zag-js] Cannot select all items in a single-select listbox");c({type:"VALUE.SET",value:p.getValues()})},highlightValue(k){c({type:"HIGHLIGHTED_VALUE.SET",value:k})},highlightFirst(){c({type:"HIGHLIGHT.FIRST"})},highlightLast(){c({type:"HIGHLIGHT.LAST"})},highlightNext(){c({type:"HIGHLIGHT.NEXT"})},highlightPrevious(){c({type:"HIGHLIGHT.PREV"})},clearValue(k){c(k?{type:"ITEM.CLEAR",value:k}:{type:"VALUE.CLEAR"})},getItemState:T,getRootProps(){return t.element({...nr.root.attrs,dir:r("dir"),id:IO(a),"data-orientation":r("orientation"),"data-disabled":Ne(h)})},getInputProps(k={}){const A=k.keyboardPriority??"caret";return t.input({...nr.input.attrs,dir:r("dir"),disabled:h,"data-disabled":Ne(h),autoComplete:"off",autoCorrect:"off","aria-haspopup":"listbox","aria-controls":O0(a),"aria-autocomplete":"list","aria-activedescendant":D,spellCheck:!1,enterKeyHint:"go",onFocus(){queueMicrotask(()=>{c({type:"INPUT.FOCUS",autoHighlight:!!k?.autoHighlight})})},onBlur(){c({type:"CONTENT.BLUR",src:"input"})},onInput(L){k?.autoHighlight&&(L.currentTarget.value.trim()||queueMicrotask(()=>{c({type:"HIGHLIGHTED_VALUE.SET",value:null})}))},onKeyDown(L){if(L.defaultPrevented||lz(L))return;const W=Av(L),V=()=>{L.preventDefault();const M=a.getWin(),I=new M.KeyboardEvent(W.type,W);Gf(a)?.dispatchEvent(I)};switch(W.key){case"ArrowLeft":case"ArrowRight":{if(!Vr(p)||L.ctrlKey||A!=="navigate")return;V();break}case"Home":case"End":{if(A!=="navigate"||w==null&&L.shiftKey)return;V();break}case"ArrowDown":case"ArrowUp":{V();break}case"Enter":w!=null&&(L.preventDefault(),c({type:"ITEM.CLICK",value:w}));break}}})},getLabelProps(){return t.element({dir:r("dir"),id:XS(a),...nr.label.attrs,"data-disabled":Ne(h)})},getValueTextProps(){return t.element({...nr.valueText.attrs,dir:r("dir"),"data-disabled":Ne(h)})},getItemProps(k){const A=T(k);return t.element({id:N0(a,A.value),role:"option",...nr.item.attrs,dir:r("dir"),"data-value":A.value,"aria-selected":A.selected,"data-selected":Ne(A.selected),"data-layout":m,"data-state":A.selected?"checked":"unchecked","data-orientation":r("orientation"),"data-highlighted":Ne(A.highlighted),"data-disabled":Ne(A.disabled),"aria-disabled":Ev(A.disabled),onPointerMove(L){k.highlightOnHover&&(A.disabled||L.pointerType!=="mouse"||tu()==="pointer"&&(A.highlighted||c({type:"ITEM.POINTER_MOVE",value:A.value})))},onMouseDown(L){L.preventDefault(),Gf(a)?.focus()},onClick(L){L.defaultPrevented||sz(L)||az(L)||M4(L)||A.disabled||c({type:"ITEM.CLICK",value:A.value,shiftKey:L.shiftKey,anchorValue:w,metaKey:b0(L)})}})},getItemTextProps(k){const A=T(k);return t.element({...nr.itemText.attrs,"data-state":A.selected?"checked":"unchecked","data-disabled":Ne(A.disabled),"data-highlighted":Ne(A.highlighted)})},getItemIndicatorProps(k){const A=T(k);return t.element({...nr.itemIndicator.attrs,"aria-hidden":!0,"data-state":A.selected?"checked":"unchecked",hidden:!A.selected})},getItemGroupLabelProps(k){const{htmlFor:A}=k;return t.element({...nr.itemGroupLabel.attrs,id:ZS(a,A),dir:r("dir"),role:"presentation"})},getItemGroupProps(k){const{id:A}=k;return t.element({...nr.itemGroup.attrs,"data-disabled":Ne(h),"data-orientation":r("orientation"),"data-empty":Ne(p.size===0),id:PO(a,A),"aria-labelledby":ZS(a,A),role:"group",dir:r("dir")})},getContentProps(){return t.element({dir:r("dir"),id:O0(a),role:"listbox",...nr.content.attrs,"data-activedescendant":D,"aria-activedescendant":D,"data-orientation":r("orientation"),"aria-multiselectable":l("multiple")?!0:void 0,"aria-labelledby":XS(a),tabIndex:0,"data-layout":m,"data-empty":Ne(p.size===0),style:{"--column-count":Vr(p)?p.columnCount:1},onFocus(){c({type:"CONTENT.FOCUS"})},onBlur(){c({type:"CONTENT.BLUR"})},onKeyDown(k){if(!z)return;const A=nn(k);if(!Do(k.currentTarget,nn(k)))return;const L=k.shiftKey,W={ArrowUp(M){let I=null;Vr(p)&&w?I=p.getPreviousRowValue(w):w&&(I=p.getPreviousValue(w)),!I&&(r("loopFocus")||!w)&&(I=p.lastValue),I&&(M.preventDefault(),c({type:"NAVIGATE",value:I,shiftKey:L,anchorValue:w}))},ArrowDown(M){let I=null;Vr(p)&&w?I=p.getNextRowValue(w):w&&(I=p.getNextValue(w)),!I&&(r("loopFocus")||!w)&&(I=p.firstValue),I&&(M.preventDefault(),c({type:"NAVIGATE",value:I,shiftKey:L,anchorValue:w}))},ArrowLeft(){if(!Vr(p)&&r("orientation")==="vertical")return;let M=w?p.getPreviousValue(w):null;!M&&r("loopFocus")&&(M=p.lastValue),M&&(k.preventDefault(),c({type:"NAVIGATE",value:M,shiftKey:L,anchorValue:w}))},ArrowRight(){if(!Vr(p)&&r("orientation")==="vertical")return;let M=w?p.getNextValue(w):null;!M&&r("loopFocus")&&(M=p.firstValue),M&&(k.preventDefault(),c({type:"NAVIGATE",value:M,shiftKey:L,anchorValue:w}))},Home(M){if(Bc(A))return;M.preventDefault();let I=p.firstValue;c({type:"NAVIGATE",value:I,shiftKey:L,anchorValue:w})},End(M){if(Bc(A))return;M.preventDefault();let I=p.lastValue;c({type:"NAVIGATE",value:I,shiftKey:L,anchorValue:w})},Enter(){c({type:"ITEM.CLICK",value:w})},a(M){b0(M)&&l("multiple")&&!r("disallowSelectAll")&&(M.preventDefault(),c({type:"VALUE.SET",value:p.getValues()}))},Space(M){R&&r("typeahead")?c({type:"CONTENT.TYPEAHEAD",key:M.key}):W.Enter?.(M)},Escape(M){r("deselectable")&&x.length>0&&(M.preventDefault(),M.stopPropagation(),c({type:"VALUE.CLEAR"}))}},V=W[y0(k)];if(V){V(k);return}Bc(A)||eu.isValidEvent(k)&&r("typeahead")&&(c({type:"CONTENT.TYPEAHEAD",key:k.key}),k.preventDefault())}})}}}var{guards:DO,createMachine:LO}=Ek(),{or:jO}=DO,BO=LO({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:V_.empty(),orientation:"vertical",selectionMode:"single",...e}},context({prop:e,bindable:t,getContext:i}){const r=e("value")??e("defaultValue")??[],a=e("collection").findMany(r);return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:ol,onChange(l){const c=i(),d=e("collection"),h=c.get("selectedItemMap"),p=Ra({values:l,collection:d,selectedItemMap:h}),m=e("value")??l,v=m===l?p:Ra({values:m,collection:d,selectedItemMap:p.nextSelectedItemMap});return c.set("selectedItemMap",v.nextSelectedItemMap),e("onValueChange")?.({value:l,items:p.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),sync:!0,onChange(l){e("onHighlightChange")?.({highlightedValue:l,highlightedItem:e("collection").find(l),highlightedIndex:e("collection").indexOf(l)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:k_({selectedItems:a,collection:e("collection")})})),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:{...eu.defaultOptions},focusVisible:!1,inputState:{autoHighlight:!1,focused:!1}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isInteractive:({prop:e})=>!e("disabled"),selection:({context:e,prop:t})=>{const i=new wO(e.get("value"));return i.selectionMode=t("selectionMode"),i.deselectable=!!t("deselectable"),i},multiple:({prop:e})=>e("selectionMode")==="multiple"||e("selectionMode")==="extended",selectedItems:({context:e,prop:t})=>$v({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems"))},initialState(){return"idle"},watch({context:e,prop:t,track:i,action:r}){i([()=>e.get("value").toString()],()=>{r(["syncSelectedItems"])}),i([()=>e.get("highlightedValue")],()=>{r(["syncHighlightedItem"])}),i([()=>t("collection").toString()],()=>{r(["syncHighlightedValue"])})},effects:["trackFocusVisible"],on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"HIGHLIGHT.FIRST":{actions:["highlightFirstValue"]},"HIGHLIGHT.LAST":{actions:["highlightLastValue"]},"HIGHLIGHT.NEXT":{actions:["highlightNextValue"]},"HIGHLIGHT.PREV":{actions:["highlightPreviousValue"]}},states:{idle:{effects:["scrollToHighlightedItem"],on:{"INPUT.FOCUS":{actions:["setFocused","setInputState"]},"CONTENT.FOCUS":[{guard:jO("hasSelectedValue","hasHighlightedValue"),actions:["setFocused"]},{actions:["setFocused","setDefaultHighlightedValue"]}],"CONTENT.BLUR":{actions:["clearFocused","clearInputState"]},"ITEM.CLICK":{actions:["setHighlightedItem","selectHighlightedItem"]},"CONTENT.TYPEAHEAD":{actions:["setFocused","highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},NAVIGATE:{actions:["setFocused","setHighlightedItem","selectWithKeyboard"]}}}},implementations:{guards:{hasSelectedValue:({context:e})=>e.get("value").length>0,hasHighlightedValue:({context:e})=>e.get("highlightedValue")!=null},effects:{trackFocusVisible:({scope:e,refs:t})=>u_({root:e.getRootNode?.(),onChange(i){t.set("focusVisible",i.isFocusVisible)}}),scrollToHighlightedItem({context:e,prop:t,scope:i}){const r=l=>{const c=e.get("highlightedValue");if(c==null||tu()==="pointer")return;const h=Gf(i),p=t("scrollToIndexFn");if(p){const v=t("collection").indexOf(c);p?.({index:v,immediate:l,getElement(){return KS(i,c)}});return}const m=KS(i,c);U4(m,{rootEl:h,block:"nearest"})};return _n(()=>{c_("virtual"),r(!0)}),$4(()=>Gf(i),{defer:!0,attributes:["data-activedescendant"],callback(){r(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:i,computed:r}){const a=i.value??e.get("highlightedValue"),l=t("collection");if(a==null||!l.has(a))return;const c=r("selection");if(i.shiftKey&&r("multiple")&&i.anchorValue){const d=c.extendSelection(l,i.anchorValue,a);gc(c,d,t("onSelect")),e.set("value",Array.from(d))}else{const d=c.select(l,a,i.metaKey);gc(c,d,t("onSelect")),e.set("value",Array.from(d))}},selectWithKeyboard({context:e,prop:t,event:i,computed:r}){const a=r("selection"),l=t("collection");if(i.shiftKey&&r("multiple")&&i.anchorValue){const c=a.extendSelection(l,i.anchorValue,i.value);gc(a,c,t("onSelect")),e.set("value",Array.from(c));return}if(t("selectOnHighlight")){const c=a.replaceSelection(l,i.value);gc(a,c,t("onSelect")),e.set("value",Array.from(c))}},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:i,refs:r}){const a=t("collection").search(i.key,{state:r.get("typeahead"),currentValue:e.get("highlightedValue")});a!=null&&e.set("highlightedValue",a)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightFirstValue({context:e,prop:t}){e.set("highlightedValue",t("collection").firstValue??null)},highlightLastValue({context:e,prop:t}){e.set("highlightedValue",t("collection").lastValue??null)},highlightNextValue({context:e,prop:t}){const i=t("collection"),r=e.get("highlightedValue");let a=null;Vr(i)&&r?a=i.getNextRowValue(r):r&&(a=i.getNextValue(r)),!a&&(t("loopFocus")||!r)&&(a=i.firstValue),a&&e.set("highlightedValue",a)},highlightPreviousValue({context:e,prop:t}){const i=t("collection"),r=e.get("highlightedValue");let a=null;Vr(i)&&r?a=i.getPreviousRowValue(r):r&&(a=i.getPreviousValue(r)),!a&&(t("loopFocus")||!r)&&(a=i.lastValue),a&&e.set("highlightedValue",a)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:i,computed:r}){const a=t("collection"),l=r("selection"),c=l.select(a,i.value);gc(l,c,t("onSelect")),e.set("value",Array.from(c))},clearItem({context:e,event:t,computed:i}){const a=i("selection").deselect(t.value);e.set("value",Array.from(a))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},syncSelectedItems({context:e,prop:t}){const i=Ra({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")});e.set("selectedItemMap",i.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){const i=t("collection"),r=e.get("highlightedValue"),a=r?i.find(r):null;e.set("highlightedItem",a)},syncHighlightedValue({context:e,prop:t,refs:i}){const r=t("collection"),a=e.get("highlightedValue"),{autoHighlight:l}=i.get("inputState");if(l){queueMicrotask(()=>{e.set("highlightedValue",t("collection").firstValue??null)});return}a!=null&&!r.has(a)&&queueMicrotask(()=>{e.set("highlightedValue",null)})},setFocused({context:e}){e.set("focused",!0)},setDefaultHighlightedValue({context:e,prop:t}){const r=t("collection").firstValue;r!=null&&e.set("highlightedValue",r)},clearFocused({context:e}){e.set("focused",!1)},setInputState({refs:e,event:t}){e.set("inputState",{autoHighlight:!!t.autoHighlight,focused:!0})},clearInputState({refs:e}){e.set("inputState",{autoHighlight:!1,focused:!1})}}}}),GO=(e,t)=>{const i=new Set(e);for(const r of t)i.delete(r);return i};function gc(e,t,i){const r=GO(t,e);for(const a of r)i?.({value:a})}var H_=G_.extendWith("empty"),F_=Te("marquee").parts("root","viewport","content","edge","item");F_.build();var $_=Te("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem");$_.build();var U_=Te("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber");U_.build();var W_=Te("pinInput").parts("root","label","input","control");W_.build();var Y_=Te("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger");Y_.build();var Yv=Te("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange");Yv.build();var q_=Te("qr-code").parts("root","frame","pattern","overlay","downloadTrigger");q_.build();var qv=Te("radio-group").parts("root","label","item","itemText","itemControl","indicator");qv.build();var X_=Te("rating-group").parts("root","label","item","control");X_.build();var Z_=Te("scroll-area").parts("root","viewport","content","scrollbar","thumb","corner");Z_.build();var K_=qv.rename("segment-group");K_.build();var Q_=Te("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),zn=Q_.build(),J_=e=>new hu(e);J_.empty=()=>new hu({items:[]});var VO=e=>e.ids?.root??`select:${e.id}`,I0=e=>e.ids?.content??`select:${e.id}:content`,P0=e=>e.ids?.trigger??`select:${e.id}:trigger`,ew=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,Xd=e=>e.ids?.label??`select:${e.id}:label`,HO=e=>e.ids?.control??`select:${e.id}:control`,M0=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,D0=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,tw=e=>e.ids?.positioner??`select:${e.id}:positioner`,FO=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,QS=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,Nm=e=>e.getById(D0(e)),pc=e=>e.getById(I0(e)),Aa=e=>e.getById(P0(e)),$O=e=>e.getById(ew(e)),JS=e=>e.getById(tw(e)),Im=(e,t)=>t==null?null:e.getById(M0(e,t)),UO={clearTriggerLabel:"Clear value"};function WO(e,t){const{context:i,prop:r,scope:a,state:l,computed:c,send:d}=e,h=uk(UO,r("translations")),p=r("disabled")||i.get("fieldsetDisabled"),m=!!r("invalid"),v=!!r("required"),b=!!r("readOnly"),y=r("composite"),x=r("collection"),_=l.hasTag("open"),w=l.matches("focused"),C=i.get("highlightedValue"),R=i.get("highlightedItem"),z=c("selectedItems"),D=i.get("currentPlacement"),T=D?oO(D):void 0,k=c("isTypingAhead"),A=c("isInteractive"),L=C?M0(a,C):void 0;function W(M){const I=x.getItemDisabled(M.item),U=x.getItemValue(M.item);return lu(U,()=>`[zag-js] No value found for item ${JSON.stringify(M.item)}`),{value:U,disabled:!!(p||I),highlighted:C===U,selected:i.get("value").includes(U)}}const V=bO({...r("positioning"),placement:D});return{open:_,focused:w,empty:i.get("value").length===0,highlightedItem:R,highlightedValue:C,selectedItems:z,hasSelectedItems:c("hasSelectedItems"),value:i.get("value"),valueAsString:c("valueAsString"),collection:x,multiple:!!r("multiple"),disabled:!!p,reposition(M={}){d({type:"POSITIONING.SET",options:M})},focus(){Aa(a)?.focus({preventScroll:!0})},setOpen(M){l.hasTag("open")!==M&&d({type:M?"OPEN":"CLOSE"})},selectValue(M){d({type:"ITEM.SELECT",value:M})},setValue(M){d({type:"VALUE.SET",value:M})},selectAll(){d({type:"VALUE.SET",value:x.getValues()})},setHighlightValue(M){d({type:"HIGHLIGHTED_VALUE.SET",value:M})},clearHighlightValue(){d({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(M){d(M?{type:"ITEM.CLEAR",value:M}:{type:"VALUE.CLEAR"})},getItemState:W,getRootProps(){return t.element({...zn.root.attrs,dir:r("dir"),id:VO(a),"data-invalid":Ne(m),"data-readonly":Ne(b)})},getLabelProps(){return t.label({dir:r("dir"),id:Xd(a),...zn.label.attrs,"data-disabled":Ne(p),"data-invalid":Ne(m),"data-readonly":Ne(b),"data-required":Ne(v),htmlFor:D0(a),onClick(M){M.defaultPrevented||p||Aa(a)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...zn.control.attrs,dir:r("dir"),id:HO(a),"data-state":_?"open":"closed","data-focus":Ne(w),"data-disabled":Ne(p),"data-invalid":Ne(m)})},getValueTextProps(){return t.element({...zn.valueText.attrs,dir:r("dir"),"data-disabled":Ne(p),"data-invalid":Ne(m),"data-focus":Ne(w)})},getTriggerProps(){return t.button({id:P0(a),disabled:p,dir:r("dir"),type:"button",role:"combobox","aria-controls":I0(a),"aria-expanded":_,"aria-haspopup":"listbox","data-state":_?"open":"closed","aria-invalid":m,"aria-required":v,"aria-labelledby":Xd(a),...zn.trigger.attrs,"data-disabled":Ne(p),"data-invalid":Ne(m),"data-readonly":Ne(b),"data-placement":D,"data-side":T,"data-placeholder-shown":Ne(!c("hasSelectedItems")),onClick(M){A&&(M.defaultPrevented||d({type:"TRIGGER.CLICK"}))},onFocus(){d({type:"TRIGGER.FOCUS"})},onBlur(){d({type:"TRIGGER.BLUR"})},onKeyDown(M){if(M.defaultPrevented||!A)return;const U={ArrowUp(){d({type:"TRIGGER.ARROW_UP"})},ArrowDown(X){d({type:X.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){d({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){d({type:"TRIGGER.ARROW_RIGHT"})},Home(){d({type:"TRIGGER.HOME"})},End(){d({type:"TRIGGER.END"})},Enter(){d({type:"TRIGGER.ENTER"})},Space(X){d(k?{type:"TRIGGER.TYPEAHEAD",key:X.key}:{type:"TRIGGER.ENTER"})}}[y0(M,{dir:r("dir"),orientation:"vertical"})];if(U){U(M),M.preventDefault();return}eu.isValidEvent(M)&&(d({type:"TRIGGER.TYPEAHEAD",key:M.key}),M.preventDefault())}})},getIndicatorProps(){return t.element({...zn.indicator.attrs,dir:r("dir"),"aria-hidden":!0,"data-state":_?"open":"closed","data-disabled":Ne(p),"data-invalid":Ne(m),"data-readonly":Ne(b)})},getItemProps(M){const I=W(M);return t.element({id:M0(a,I.value),role:"option",...zn.item.attrs,dir:r("dir"),"data-value":I.value,"aria-selected":I.selected,"data-state":I.selected?"checked":"unchecked","data-highlighted":Ne(I.highlighted),"data-disabled":Ne(I.disabled),"aria-disabled":Ev(I.disabled),onPointerMove(U){I.disabled||U.pointerType!=="mouse"||tu()==="pointer"&&I.value!==C&&d({type:"ITEM.POINTER_MOVE",value:I.value})},onClick(U){U.defaultPrevented||I.disabled||d({type:"ITEM.CLICK",src:"pointerup",value:I.value})},onPointerLeave(U){I.disabled||M.persistFocus||U.pointerType==="mouse"&&tu()==="pointer"&&d({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(M){const I=W(M);return t.element({...zn.itemText.attrs,"data-state":I.selected?"checked":"unchecked","data-disabled":Ne(I.disabled),"data-highlighted":Ne(I.highlighted)})},getItemIndicatorProps(M){const I=W(M);return t.element({"aria-hidden":!0,...zn.itemIndicator.attrs,"data-state":I.selected?"checked":"unchecked",hidden:!I.selected})},getItemGroupLabelProps(M){const{htmlFor:I}=M;return t.element({...zn.itemGroupLabel.attrs,id:QS(a,I),dir:r("dir"),role:"presentation"})},getItemGroupProps(M){const{id:I}=M;return t.element({...zn.itemGroup.attrs,"data-disabled":Ne(p),id:FO(a,I),"aria-labelledby":QS(a,I),role:"group",dir:r("dir")})},getClearTriggerProps(){return t.button({...zn.clearTrigger.attrs,id:ew(a),type:"button","aria-label":h.clearTriggerLabel,"data-invalid":Ne(m),disabled:p,hidden:!c("hasSelectedItems"),dir:r("dir"),onClick(M){M.defaultPrevented||d({type:"CLEAR.CLICK"})}})},getHiddenSelectProps(){const M=i.get("value"),I=r("multiple")?M:M?.[0],U=X=>{const K=Av(X);L4(K)||d({type:"VALUE.SET",value:YO(X.currentTarget)})};return t.select({name:r("name"),form:r("form"),disabled:p,multiple:r("multiple"),required:r("required"),"aria-hidden":!0,id:D0(a),defaultValue:I,style:Gz,tabIndex:-1,autoComplete:r("autoComplete"),onChange:U,onInput:U,onFocus(){Aa(a)?.focus({preventScroll:!0})},"aria-labelledby":Xd(a)})},getPositionerProps(){return t.element({...zn.positioner.attrs,dir:r("dir"),id:tw(a),style:V.floating})},getContentProps(){return t.element({hidden:!_,dir:r("dir"),id:I0(a),role:y?"listbox":"dialog",...zn.content.attrs,"data-state":_?"open":"closed","data-placement":D,"data-side":T,"data-activedescendant":L,"aria-activedescendant":y?L:void 0,"aria-multiselectable":r("multiple")&&y?!0:void 0,"aria-labelledby":Xd(a),tabIndex:0,onKeyDown(M){if(!A||!Do(M.currentTarget,nn(M)))return;if(M.key==="Tab"&&!wz(M)){M.preventDefault();return}const I={ArrowUp(){d({type:"CONTENT.ARROW_UP"})},ArrowDown(){d({type:"CONTENT.ARROW_DOWN"})},Home(){d({type:"CONTENT.HOME"})},End(){d({type:"CONTENT.END"})},Enter(){d({type:"ITEM.CLICK",src:"keydown.enter"})},Space(K){k?d({type:"CONTENT.TYPEAHEAD",key:K.key}):I.Enter?.(K)}},U=I[y0(M)];if(U){U(M),M.preventDefault();return}const X=nn(M);Bc(X)||eu.isValidEvent(M)&&(d({type:"CONTENT.TYPEAHEAD",key:M.key}),M.preventDefault())}})},getListProps(){return t.element({...zn.list.attrs,tabIndex:0,role:y?void 0:"listbox","aria-labelledby":P0(a),"aria-activedescendant":y?void 0:L,"aria-multiselectable":!y&&r("multiple")?!0:void 0})}}}var YO=e=>e.multiple?Array.from(e.selectedOptions,t=>t.value):e.value?[e.value]:[],{and:mc,not:Sa,or:qO}=z4(),XO=ah({props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??J_.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},context({prop:e,bindable:t,getContext:i}){const r=e("value")??e("defaultValue")??[],a=e("collection").findMany(r);return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:ol,onChange(l){const c=i(),d=e("collection"),h=c.get("selectedItemMap"),p=Ra({values:l,collection:d,selectedItemMap:h}),m=e("value")??l,v=m===l?p:Ra({values:m,collection:d,selectedItemMap:p.nextSelectedItemMap});return c.set("selectedItemMap",v.nextSelectedItemMap),e("onValueChange")?.({value:l,items:p.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(l){e("onHighlightChange")?.({highlightedValue:l,highlightedItem:e("collection").find(l),highlightedIndex:e("collection").indexOf(l)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:k_({selectedItems:a,collection:e("collection")})}))}},refs(){return{typeahead:{...eu.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),selectedItems:({context:e,prop:t})=>$v({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:i,action:r}){i([()=>e.get("value").toString()],()=>{r(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),i([()=>t("open")],()=>{r(["toggleVisibility"])}),i([()=>e.get("highlightedValue")],()=>{r(["syncHighlightedItem"])}),i([()=>t("collection").toString()],()=>{r(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:qO("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:mc(Sa("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:Sa("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:mc(Sa("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:Sa("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:Sa("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:Sa("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:Sa("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","trackFocusVisible","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:mc("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:mc("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:mc("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>e5(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.CLICK",isTriggerEnterEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ENTER",isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_UP",isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_DOWN"},effects:{trackFocusVisible({scope:e}){return u_({root:e.getRootNode?.()})},trackFormControlState({context:e,scope:t}){return gz(Nm(t),{onFieldsetDisabledChange(i){e.set("fieldsetDisabled",i)},onFormReset(){const i=e.initial("value");e.set("value",i)}})},trackDismissableElement({scope:e,send:t,prop:i}){const r=()=>pc(e);let a=!0;return i_(r,{type:"listbox",defer:!0,exclude:[Aa(e),$O(e)],onFocusOutside:i("onFocusOutside"),onPointerDownOutside:i("onPointerDownOutside"),onInteractOutside(l){i("onInteractOutside")?.(l),a=!(l.detail.focusable||l.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:a})}})},computePlacement({context:e,prop:t,scope:i}){const r=t("positioning");return e.set("currentPlacement",r.placement),YS(()=>Aa(i),()=>JS(i),{defer:!0,...r,onComplete(c){e.set("currentPlacement",c.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:i}){const r=l=>{const c=e.get("highlightedValue");if(c==null||tu()==="pointer")return;const h=pc(i),p=t("scrollToIndexFn");if(p){const v=t("collection").indexOf(c);p?.({index:v,immediate:l,getElement:()=>Im(i,c)});return}const m=Im(i,c);U4(m,{rootEl:h,block:"nearest"})};return _n(()=>{c_("virtual"),r(!0)}),$4(()=>pc(i),{defer:!0,attributes:["data-activedescendant"],callback(){r(!1)}})}},actions:{reposition({context:e,prop:t,scope:i,event:r}){const a=()=>JS(i);YS(Aa(i),a,{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(l){e.set("currentPlacement",l.placement)}})},toggleVisibility({send:e,prop:t,event:i}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:i})},highlightPreviousItem({context:e,prop:t}){const i=e.get("highlightedValue");if(i==null)return;const r=t("collection").getPreviousValue(i,1,t("loopFocus"));r!=null&&e.set("highlightedValue",r)},highlightNextItem({context:e,prop:t}){const i=e.get("highlightedValue");if(i==null)return;const r=t("collection").getNextValue(i,1,t("loopFocus"));r!=null&&e.set("highlightedValue",r)},highlightFirstItem({context:e,prop:t}){const i=t("collection").firstValue;e.set("highlightedValue",i)},highlightLastItem({context:e,prop:t}){const i=t("collection").lastValue;e.set("highlightedValue",i)},setInitialFocus({scope:e}){_n(()=>{x0({root:pc(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){e5(e)&&_n(()=>{Aa(t)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:i}){let r=i.value??e.get("highlightedValue");if(r==null||!t("collection").has(r))return;t("onSelect")?.({value:r}),r=t("deselectable")&&!t("multiple")&&e.get("value").includes(r)?null:r,e.set("value",l=>r==null?[]:t("multiple")?cS(l,r):[r])},highlightComputedFirstItem({context:e,prop:t,computed:i}){const r=t("collection"),a=i("hasSelectedItems")?r.sort(e.get("value"))[0]:r.firstValue;e.set("highlightedValue",a)},highlightComputedLastItem({context:e,prop:t,computed:i}){const r=t("collection"),a=i("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue;e.set("highlightedValue",a)},highlightFirstSelectedItem({context:e,prop:t,computed:i}){if(!i("hasSelectedItems"))return;const r=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",r)},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:i,refs:r}){const a=t("collection").search(i.key,{state:r.get("typeahead"),currentValue:e.get("highlightedValue")});a!=null&&e.set("highlightedValue",a)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:i}){t("onSelect")?.({value:i.value});const a=t("deselectable")&&!t("multiple")&&e.get("value").includes(i.value)?null:i.value;e.set("value",l=>a==null?[]:t("multiple")?cS(l,a):[a])},clearItem({context:e,event:t}){e.set("value",i=>i.filter(r=>r!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){const[i]=e.get("value"),r=t("collection").getPreviousValue(i);r&&e.set("value",[r])},selectNextItem({context:e,prop:t}){const[i]=e.get("value"),r=t("collection").getNextValue(i);r&&e.set("value",[r])},selectFirstItem({context:e,prop:t}){const i=t("collection").firstValue;i&&e.set("value",[i])},selectLastItem({context:e,prop:t}){const i=t("collection").lastValue;i&&e.set("value",[i])},selectMatchingItem({context:e,prop:t,event:i,refs:r}){const a=t("collection").search(i.key,{state:r.get("typeahead"),currentValue:e.get("value")[0]});a!=null&&e.set("value",[a])},scrollContentToTop({prop:e,scope:t}){if(e("scrollToIndexFn")){const i=e("collection").firstValue;e("scrollToIndexFn")?.({index:0,immediate:!0,getElement:()=>Im(t,i)})}else pc(t)?.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){e("onOpenChange")?.({open:!0,value:t.get("value")})},invokeOnClose({prop:e,context:t}){e("onOpenChange")?.({open:!1,value:t.get("value")})},syncSelectElement({context:e,prop:t,scope:i}){const r=Nm(i);if(r){if(e.get("value").length===0&&!t("multiple")){r.selectedIndex=-1;return}for(const a of r.options)a.selected=e.get("value").includes(a.value)}},syncCollection({context:e,prop:t}){const i=t("collection"),r=i.find(e.get("highlightedValue"));r&&e.set("highlightedItem",r);const a=Ra({values:e.get("value"),collection:i,selectedItemMap:e.get("selectedItemMap")});e.set("selectedItemMap",a.nextSelectedItemMap)},syncSelectedItems({context:e,prop:t}){const i=Ra({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")});e.set("selectedItemMap",i.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){const i=t("collection"),r=e.get("highlightedValue"),a=r?i.find(r):null;e.set("highlightedItem",a)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{const t=Nm(e);if(!t)return;const i=e.getWin(),r=new i.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(pz(r))})}}}});function e5(e){const t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}var nw=Te("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator");nw.build();var iw=Te("splitter").parts("root","panel","resizeTrigger","resizeTriggerIndicator");iw.build();var rw=Te("switch").parts("root","label","control","thumb");rw.build();var ow=Te("tagsInput").parts("root","label","control","input","clearTrigger","item","itemPreview","itemInput","itemText","itemDeleteTrigger");ow.build();var ZO=e=>{if(!e)return;const t=Zs(e),i=On(e),r=In(e),a=()=>{requestAnimationFrame(()=>{e.style.height="auto";let p;t.boxSizing==="content-box"?p=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):p=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&p>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),p=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${p}px`})};e.addEventListener("input",a),e.form?.addEventListener("reset",a);const l=Object.getOwnPropertyDescriptor(e,"value"),c=l?.set?l:Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value");c?.set&&Object.defineProperty(e,"value",{...c,set(p){c.set?.call(this,p),a()}});const d=new i.ResizeObserver(()=>{requestAnimationFrame(()=>a())});d.observe(e);const h=new i.MutationObserver(()=>a());return h.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),r.fonts?.addEventListener("loadingdone",a),()=>{e.removeEventListener("input",a),e.form?.removeEventListener("reset",a),r.fonts?.removeEventListener("loadingdone",a),d.disconnect(),h.disconnect()}},aw=Te("tooltip").parts("trigger","arrow","arrowTip","positioner","content");aw.build();var sw=Te("tree-view").parts("branch","branchContent","branchControl","branchIndentGuide","branchIndicator","branchText","branchTrigger","item","itemIndicator","itemText","label","nodeCheckbox","nodeRenameInput","root","tree");sw.build();var KO=typeof window<"u"?O.useLayoutEffect:O.useEffect,[aq,QO]=Nn({name:"FieldsetContext",hookName:"useFieldsetContext",providerName:"<FieldsetProvider />",strict:!1}),[Xv,Gi]=Nn({name:"FieldContext",hookName:"useFieldContext",providerName:"<FieldProvider />",strict:!1}),JO=e=>e.children(Gi()),lw=O.forwardRef((e,t)=>{const i=Gi(),r=Ie(i.getErrorTextProps(),e);return i?.invalid?N.jsx(Me.span,{...r,ref:t}):null});lw.displayName="FieldErrorText";var cw=O.forwardRef((e,t)=>{const i=Gi(),r=Ie(i?.getHelperTextProps(),e);return N.jsx(Me.span,{...r,ref:t})});cw.displayName="FieldHelperText";var uw=O.forwardRef((e,t)=>{const i=Gi(),r=Ie(i?.getInputProps(),e);return N.jsx(Me.input,{...r,ref:t})});uw.displayName="FieldInput";var dw=e=>{const{value:t,children:i}=e,r=Gi(),a=O.useMemo(()=>{if(!r)throw new Error("Field.Item must be used within Field.Root");const l=`field::${r.ids.control}::item::${t}`,c=`${l}::label`,d=()=>({...r.getInputProps(),id:l});return{...r,ids:{...r.ids,control:l,label:c},getLabelProps:()=>({...r.getLabelProps(),id:c,htmlFor:l}),getInputProps:()=>({...d(),...Mi.input.attrs}),getSelectProps:()=>({...d(),...Mi.select.attrs}),getTextareaProps:()=>({...d(),...Mi.textarea.attrs})}},[r,t]);return N.jsx(Xv,{value:a,children:i})};dw.displayName="FieldItem";var fw=O.forwardRef((e,t)=>{const i=Gi(),r=Ie(i?.getLabelProps(),e);return N.jsx(Me.label,{...r,ref:t})});fw.displayName="FieldLabel";var hw=O.forwardRef(({fallback:e,...t},i)=>{const r=Gi();if(!r.required)return e;const a=Ie(r.getRequiredIndicatorProps(),t);return N.jsx(Me.span,{...a,ref:i,children:t.children??"*"})});hw.displayName="FieldRequiredIndicator";var eN=(e={})=>{const t=QO(),i=cu(),{ids:r,target:a,disabled:l=!!t?.disabled,invalid:c=!1,readOnly:d=!1,required:h=!1}=e,[p,m]=O.useState(!1),[v,b]=O.useState(!1),y=O.useId(),x=e.id??y,_=O.useRef(null),w=r?.control??`field::${x}`,C=r?.errorText??`field::${x}::error-text`,R=r?.helperText??`field::${x}::helper-text`,z=r?.label??`field::${x}::label`;KO(()=>{const K=_.current;if(!K)return;const P=()=>{const te=i.getRootNode();m(!!te.getElementById(C)),b(!!te.getElementById(R))};P();const ee=new(i.getWindow()).MutationObserver(P);return ee.observe(K,{childList:!0,subtree:!0}),()=>ee.disconnect()},[i,C,R]);const D=O.useMemo(()=>()=>({...Mi.root.attrs,id:w,ref:_,role:"group","data-disabled":Ne(l),"data-invalid":Ne(c),"data-readonly":Ne(d)}),[l,c,d,w]),T=a?`field::${x}::item::${a}`:void 0,k=O.useMemo(()=>()=>({...Mi.label.attrs,id:z,"data-disabled":Ne(l),"data-invalid":Ne(c),"data-readonly":Ne(d),"data-required":Ne(h),htmlFor:T??x}),[l,c,d,h,x,z,T]),A=p&&c?C:void 0,L=O.useMemo(()=>()=>({"aria-describedby":v?R:void 0,"aria-errormessage":A,"aria-invalid":Ev(c),"data-invalid":Ne(c),"data-required":Ne(h),"data-readonly":Ne(d),id:x,required:h,disabled:l,readOnly:d}),[v,R,c,h,d,x,A,l]),W=O.useMemo(()=>()=>({...L(),...Mi.input.attrs}),[L]),V=O.useMemo(()=>()=>({...L(),...Mi.textarea.attrs}),[L]),M=O.useMemo(()=>()=>({...L(),...Mi.select.attrs}),[L]),I=O.useMemo(()=>()=>({id:R,...Mi.helperText.attrs,"data-disabled":Ne(l)}),[l,R]),U=O.useMemo(()=>()=>({id:C,...Mi.errorText.attrs,"aria-live":"polite"}),[C]),X=O.useMemo(()=>()=>({"aria-hidden":!0,...Mi.requiredIndicator.attrs}),[]);return{ariaDescribedby:v?R:void 0,ids:{root:w,control:x,label:z,errorText:C,helperText:R},refs:{rootRef:_},disabled:l,invalid:c,readOnly:d,required:h,getLabelProps:k,getRootProps:D,getInputProps:W,getTextareaProps:V,getSelectProps:M,getHelperTextProps:I,getErrorTextProps:U,getRequiredIndicatorProps:X}},tN=Yn(),gw=O.forwardRef((e,t)=>{const[i,r]=tN(e,["id","ids","disabled","invalid","readOnly","required","target"]),a=eN(i),l=Ie(a.getRootProps(),r),c=al(t,a.refs.rootRef);return N.jsx(Xv,{value:a,children:N.jsx(Me.div,{...l,ref:c})})});gw.displayName="FieldRoot";var nN=Yn(),pw=O.forwardRef((e,t)=>{const[{value:i},r]=nN(e,["value"]),a=Ie(i.getRootProps(),r);return N.jsx(Xv,{value:i,children:N.jsx(Me.div,{...a,ref:t})})});pw.displayName="FieldRootProvider";var mw=O.forwardRef((e,t)=>{const i=Gi(),r=Ie(i?.getSelectProps(),e);return N.jsx(Me.select,{...r,ref:t})});mw.displayName="FieldSelect";var vw=O.forwardRef((e,t)=>{const{autoresize:i,...r}=e,a=O.useRef(null),l=Gi(),c=Ie(l?.getTextareaProps(),{style:{resize:i?"none":void 0}},r),d=al(t,a);return O.useEffect(()=>{if(i)return ZO(a.current)},[i]),N.jsx(Me.textarea,{...c,ref:d})});vw.displayName="FieldTextarea";var iN=fh({Context:()=>JO,ErrorText:()=>lw,HelperText:()=>cw,Input:()=>uw,Item:()=>dw,Label:()=>fw,RequiredIndicator:()=>hw,Root:()=>gw,RootProvider:()=>pw,Select:()=>mw,Textarea:()=>vw}),bw=e=>new hu(e),[yw,Xr]=Nn({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),xw=O.forwardRef((e,t)=>{const i=Xr(),r=sR(),a=du({...r,present:i.open}),l=Ie(i.getBackdropProps(),a.getPresenceProps(),e),c=al(a.ref,t);return N.jsx(Mv,{presence:a,children:N.jsx(Me.div,{...l,ref:c})})});xw.displayName="DialogBackdrop";var Sw=O.forwardRef((e,t)=>{const i=Xr(),r=Ie(i.getCloseTriggerProps(),e);return N.jsx(Me.button,{...r,ref:t})});Sw.displayName="DialogCloseTrigger";var _w=O.forwardRef((e,t)=>{const i=Xr(),r=fu(),a=Ie(i.getContentProps(),r.getPresenceProps(),e),l=al(r.ref,t);return N.jsx(Mv,{presence:r,children:N.jsx(Me.div,{...a,ref:l})})});_w.displayName="DialogContent";var rN=e=>e.children(Xr()),ww=O.forwardRef((e,t)=>{const i=Xr(),r=Ie(i.getDescriptionProps(),e);return N.jsx(Me.div,{...r,ref:t})});ww.displayName="DialogDescription";var Cw=O.forwardRef((e,t)=>{const i=Xr(),r=Ie(i.getPositionerProps(),e);return fu().unmounted?null:N.jsx(Me.div,{...r,ref:t})});Cw.displayName="DialogPositioner";var oN=e=>{const t=O.useId(),{getRootNode:i}=cu(),{dir:r}=Iv(),a={id:t,getRootNode:i,dir:r,...e},l=ph(NO,a);return OO(l,Pv)},aN=e=>{const[t,{children:i,...r}]=hh(e),[a]=K4(t),l=oN(r),c=du(Ie({present:l.open},t));return N.jsx(yw,{value:l,children:N.jsx(Z4,{value:a,children:N.jsx(mh,{value:c,children:i})})})},sN=e=>{const[t,{value:i,children:r}]=hh(e),[a]=K4(t),l=du(Ie({present:i.open},t));return N.jsx(yw,{value:i,children:N.jsx(Z4,{value:a,children:N.jsx(mh,{value:l,children:r})})})},Ew=O.forwardRef((e,t)=>{const i=Xr(),r=Ie(i.getTitleProps(),e);return N.jsx(Me.h2,{...r,ref:t})});Ew.displayName="DialogTitle";var lN=Yn(),Tw=O.forwardRef((e,t)=>{const[i,r]=lN(e,["value"]),a=Xr(),l=fu(),c=a.getTriggerProps(i),d=Ie({...c,"aria-controls":l.unmounted?void 0:c["aria-controls"]},r);return N.jsx(Me.button,{...d,ref:t})});Tw.displayName="DialogTrigger";var gr=fh({Backdrop:()=>xw,CloseTrigger:()=>Sw,Content:()=>_w,Context:()=>rN,Description:()=>ww,Positioner:()=>Cw,Root:()=>aN,RootProvider:()=>sN,Title:()=>Ew,Trigger:()=>Tw}),[kw,Vi]=Nn({name:"ListboxContext",hookName:"useListboxContext",providerName:"<ListboxProvider />"}),zw=O.forwardRef((e,t)=>{const i=Vi(),r=Ie(i.getContentProps(),e);return N.jsx(Me.div,{...r,ref:t})});zw.displayName="ListboxContent";var cN=e=>e.children(Vi()),uN=H_.build(),Rw=O.forwardRef((e,t)=>Vi().collection.size!==0?null:N.jsx(Me.div,{...uN.empty.attrs,...e,role:"presentation",ref:t}));Rw.displayName="ListboxEmpty";var dN=Yn(),Aw=O.forwardRef((e,t)=>{const[i,r]=dN(e,["autoHighlight","keyboardPriority"]),a=Vi(),l=Ie(a.getInputProps(i),r);return N.jsx(Me.input,{...l,ref:t})});Aw.displayName="ListboxInput";var[fN,hN]=Nn({name:"ListboxItemContext",hookName:"useListboxItemContext",providerName:"<ListboxItemProvider />"}),[gN,Ow]=Nn({name:"ListboxItemPropsContext",hookName:"useListboxItemPropsContext",providerName:"<ListboxItemPropsProvider />"}),pN=Yn(),Nw=O.forwardRef((e,t)=>{const[i,r]=pN(e,["item","highlightOnHover"]),a=Vi(),l=Ie(a.getItemProps(i),r),c=a.getItemState(i);return N.jsx(gN,{value:i,children:N.jsx(fN,{value:c,children:N.jsx(Me.div,{...l,ref:t})})})});Nw.displayName="ListboxItem";var mN=e=>e.children(hN()),[vN,bN]=Nn({name:"ListboxItemGroupPropsContext",hookName:"useListboxItemGroupPropsContext",providerName:"<ListboxItemGroupPropsProvider />"}),yN=Yn(),Iw=O.forwardRef((e,t)=>{const i=O.useId(),[r,a]=yN(e,["id"]),l={id:i,...r},c=Vi(),d=Ie(c.getItemGroupProps(l),a);return N.jsx(vN,{value:l,children:N.jsx(Me.div,{...d,ref:t})})});Iw.displayName="ListboxItemGroup";var Pw=O.forwardRef((e,t)=>{const i=Vi(),r=bN(),a=Ie(i.getItemGroupLabelProps({htmlFor:r.id}),e);return N.jsx(Me.div,{...a,ref:t})});Pw.displayName="ListboxItemGroupLabel";var Mw=O.forwardRef((e,t)=>{const i=Vi(),r=Ow(),a=Ie(i.getItemIndicatorProps(r),e);return N.jsx(Me.div,{...a,ref:t})});Mw.displayName="ListboxItemIndicator";var Dw=O.forwardRef((e,t)=>{const i=Vi(),r=Ow(),a=Ie(i.getItemTextProps(r),e);return N.jsx(Me.div,{...a,ref:t})});Dw.displayName="ListboxItemText";var Lw=O.forwardRef((e,t)=>{const i=Vi(),r=Ie(i.getLabelProps(),e);return N.jsx(Me.span,{...r,ref:t})});Lw.displayName="ListboxLabel";var xN=e=>{const t=O.useId(),{dir:i}=Iv(),{getRootNode:r}=cu(),a={id:t,dir:i,getRootNode:r,...e},l=ph(BO,a);return MO(l,Pv)},SN=(e,t)=>{const[i,r]=Yn()(e,["collection","defaultHighlightedValue","defaultValue","deselectable","disabled","disallowSelectAll","highlightedValue","id","ids","loopFocus","onHighlightChange","onSelect","onValueChange","orientation","scrollToIndexFn","selectionMode","selectOnHighlight","typeahead","value"]),a=xN(i),l=Ie(a.getRootProps(),r);return N.jsx(kw,{value:a,children:N.jsx(Me.div,{...l,ref:t})})},_N=O.forwardRef(SN),wN=(e,t)=>{const[{value:i},r]=Yn()(e,["value"]),a=Ie(i.getRootProps(),r);return N.jsx(kw,{value:i,children:N.jsx(Me.div,{...a,ref:t})})},CN=O.forwardRef(wN),jw=O.forwardRef((e,t)=>{const{children:i,placeholder:r,...a}=e,l=Vi(),c=Ie(l.getValueTextProps(),a);return N.jsx(Me.span,{...c,ref:t,children:i||l.valueAsString||r})});jw.displayName="ListboxValueText";var qn=fh({Content:()=>zw,Context:()=>cN,Empty:()=>Rw,Input:()=>Aw,Item:()=>Nw,ItemContext:()=>mN,ItemGroup:()=>Iw,ItemGroupLabel:()=>Pw,ItemIndicator:()=>Mw,ItemText:()=>Dw,Label:()=>Lw,Root:()=>_N,RootProvider:()=>CN,ValueText:()=>jw}),Bw=e=>{const{children:t,disabled:i}=e,[r,a]=O.useState(e.container?.current),l=O.useSyncExternalStore(TN,()=>!1,()=>!0),{getRootNode:c}=cu();if(O.useEffect(()=>{a(()=>e.container?.current)},[e.container]),l||i)return N.jsx(N.Fragment,{children:t});const d=r??EN(c);return N.jsx(N.Fragment,{children:O.Children.map(t,h=>gh.createPortal(h,d))})},EN=e=>{const t=e?.(),i=t.getRootNode();return Ia(i)?i:In(t).body},TN=()=>()=>{},[Gw,wn]=Nn({name:"SelectContext",hookName:"useSelectContext",providerName:"<SelectProvider />"}),Vw=O.forwardRef((e,t)=>{const i=wn(),r=Ie(i.getClearTriggerProps(),e);return N.jsx(Me.button,{...r,ref:t})});Vw.displayName="SelectClearTrigger";var Hw=O.forwardRef((e,t)=>{const i=wn(),r=fu(),a=Ie(i.getContentProps(),r.getPresenceProps(),e),l=al(r.ref,t);return N.jsx(Mv,{presence:r,children:N.jsx(Me.div,{...a,ref:l})})});Hw.displayName="SelectContent";var kN=e=>e.children(wn()),Fw=O.forwardRef((e,t)=>{const i=wn(),r=Ie(i.getControlProps(),e);return N.jsx(Me.div,{...r,ref:t})});Fw.displayName="SelectControl";var $w=O.forwardRef((e,t)=>{const i=wn(),r=Ie(i.getHiddenSelectProps(),e),a=i.value.length===0,l=Gi();return N.jsxs(Me.select,{"aria-describedby":l?.ariaDescribedby,...r,ref:t,children:[a&&N.jsx("option",{value:""}),i.collection.items.map((c,d)=>N.jsx("option",{value:i.collection.getItemValue(c)??"",disabled:i.collection.getItemDisabled(c),children:i.collection.stringifyItem(c)},d))]})});$w.displayName="SelectHiddenSelect";var Uw=O.forwardRef((e,t)=>{const i=wn(),r=Ie(i.getIndicatorProps(),e);return N.jsx(Me.div,{...r,ref:t})});Uw.displayName="SelectIndicator";var[zN,RN]=Nn({name:"SelectItemContext",hookName:"useSelectItemContext",providerName:"<SelectItemProvider />"}),[AN,Ww]=Nn({name:"SelectItemPropsContext",hookName:"useSelectItemPropsContext",providerName:"<SelectItemPropsProvider />"}),ON=Yn(),Yw=O.forwardRef((e,t)=>{const[i,r]=ON(e,["item","persistFocus"]),a=wn(),l=Ie(a.getItemProps(i),r),c=a.getItemState(i);return N.jsx(AN,{value:i,children:N.jsx(zN,{value:c,children:N.jsx(Me.div,{...l,ref:t})})})});Yw.displayName="SelectItem";var NN=e=>e.children(RN()),[IN,PN]=Nn({name:"SelectItemGroupPropsContext",hookName:"useSelectItemGroupPropsContext",providerName:"<SelectItemGroupPropsProvider />"}),MN=Yn(),qw=O.forwardRef((e,t)=>{const i=O.useId(),[r,a]=MN(e,["id"]),l={id:i,...r},c=wn(),d=Ie(c.getItemGroupProps(l),a);return N.jsx(IN,{value:l,children:N.jsx(Me.div,{...d,ref:t})})});qw.displayName="SelectItemGroup";var Xw=O.forwardRef((e,t)=>{const i=wn(),r=PN(),a=Ie(i.getItemGroupLabelProps({htmlFor:r.id}),e);return N.jsx(Me.div,{...a,ref:t})});Xw.displayName="SelectItemGroupLabel";var Zw=O.forwardRef((e,t)=>{const i=wn(),r=Ww(),a=Ie(i.getItemIndicatorProps(r),e);return N.jsx(Me.div,{...a,ref:t})});Zw.displayName="SelectItemIndicator";var Kw=O.forwardRef((e,t)=>{const i=wn(),r=Ww(),a=Ie(i.getItemTextProps(r),e);return N.jsx(Me.span,{...a,ref:t})});Kw.displayName="SelectItemText";var Qw=O.forwardRef((e,t)=>{const i=wn(),r=Ie(i.getLabelProps(),e);return N.jsx(Me.label,{...r,ref:t})});Qw.displayName="SelectLabel";var Jw=O.forwardRef((e,t)=>{const i=wn(),r=Ie(i.getListProps(),e);return N.jsx(Me.div,{...r,ref:t})});Jw.displayName="SelectList";var e6=O.forwardRef((e,t)=>{const i=wn(),r=Ie(i.getPositionerProps(),e);return fu().unmounted?null:N.jsx(Me.div,{...r,ref:t})});e6.displayName="SelectPositioner";var DN=e=>{const t=O.useId(),{dir:i}=Iv(),{getRootNode:r}=cu(),a=Gi(),l={id:t,ids:{label:a?.ids.label,hiddenSelect:a?.ids.control},disabled:a?.disabled,readOnly:a?.readOnly,invalid:a?.invalid,required:a?.required,dir:i,getRootNode:r,...e},c=ph(XO,l);return WO(c,Pv)},LN=(e,t)=>{const[i,r]=hh(e),[a,l]=Yn()(r,["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","disabled","form","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","translations","autoComplete","value"]),c=DN(a),d=du(Ie({present:c.open},i)),h=Ie(c.getRootProps(),l);return N.jsx(Gw,{value:c,children:N.jsx(mh,{value:d,children:N.jsx(Me.div,{...h,ref:t})})})},jN=O.forwardRef(LN),BN=(e,t)=>{const[i,r]=hh(e),[{value:a},l]=Yn()(r,["value"]),c=du(Ie({present:a.open},i)),d=Ie(a.getRootProps(),l);return N.jsx(Gw,{value:a,children:N.jsx(mh,{value:c,children:N.jsx(Me.div,{...d,ref:t})})})},GN=O.forwardRef(BN),t6=O.forwardRef((e,t)=>{const i=wn(),r=Ie(i.getTriggerProps(),e);return N.jsx(Me.button,{...r,ref:t})});t6.displayName="SelectTrigger";var n6=O.forwardRef((e,t)=>{const{children:i,placeholder:r,...a}=e,l=wn(),c=Ie(l.getValueTextProps(),a);return N.jsx(Me.span,{...c,ref:t,children:i||l.valueAsString||r})});n6.displayName="SelectValueText";var qt=fh({ClearTrigger:()=>Vw,Content:()=>Hw,Context:()=>kN,Control:()=>Fw,HiddenSelect:()=>$w,Indicator:()=>Uw,Item:()=>Yw,ItemContext:()=>NN,ItemGroup:()=>qw,ItemGroupLabel:()=>Xw,ItemIndicator:()=>Zw,ItemText:()=>Kw,Label:()=>Qw,List:()=>Jw,Positioner:()=>e6,Root:()=>jN,RootProvider:()=>GN,Trigger:()=>t6,ValueText:()=>n6});function i6(e,t=[]){const i=Object.assign({},e);for(const r of t)r in i&&delete i[r];return i}const VN=(e,t)=>{if(!e||typeof e!="string")return{invalid:!0,value:e};const[i,r]=e.split("/");if(!i||!r||i==="currentBg")return{invalid:!0,value:i};const a=t(`colors.${i}`),l=t.raw(`opacity.${r}`)?.value;if(!l&&isNaN(Number(r)))return{invalid:!0,value:i};const c=l?Number(l)*100+"%":`${r}%`,d=a??i;return{invalid:!1,color:d,value:`color-mix(in srgb, ${d} ${c}, transparent)`}},gt=e=>(t,i)=>{const r=i.utils.colorMix(t);if(r.invalid)return{[e]:t};const a="--mix-"+e;return{[a]:r.value,[e]:`var(${a}, ${r.color})`}};function L0(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(i=>L0(i));const t=Object.create(Object.getPrototypeOf(e));for(const i of Object.keys(e))t[i]=L0(e[i]);return t}function j0(e,t){if(t==null)return e;for(const i of Object.keys(t))if(!(t[i]===void 0||i==="__proto__"))if(!Fn(e[i])&&Fn(t[i]))Object.assign(e,{[i]:t[i]});else if(e[i]&&Fn(t[i]))j0(e[i],t[i]);else if(Array.isArray(t[i])&&Array.isArray(e[i])){let r=0;for(;r<t[i].length;r++)Fn(e[i][r])&&Fn(t[i][r])?j0(e[i][r],t[i][r]):e[i][r]=t[i][r]}else Object.assign(e,{[i]:t[i]});return e}function Mo(e,...t){for(const i of t)j0(e,i);return e}const B0=e=>e!=null;function fr(e,t,i={}){const{stop:r,getKey:a}=i;function l(c,d=[]){if(Fn(c)||Array.isArray(c)){const h={};for(const[p,m]of Object.entries(c)){const v=a?.(p,m)??p,b=[...d,v];if(r?.(c,b))return t(c,d);const y=l(m,b);B0(y)&&(h[v]=y)}return h}return t(c,d)}return l(e)}function r6(e,t){return Array.isArray(e)?e.map(i=>B0(i)?t(i):i):Fn(e)?fr(e,i=>t(i)):B0(e)?t(e):e}const Zd=["value","type","description"],HN=e=>e&&typeof e=="object"&&!Array.isArray(e),o6=(...e)=>{const t=Mo({},...e.map(L0));return t.theme?.tokens&&fr(t.theme.tokens,i=>{const l=Object.keys(i).filter(d=>!Zd.includes(d)).length>0,c=Zd.some(d=>i[d]!=null);return l&&c&&(i.DEFAULT||(i.DEFAULT={}),Zd.forEach(d=>{var h;i[d]!=null&&((h=i.DEFAULT)[d]||(h[d]=i[d]),delete i[d])})),i},{stop(i){return HN(i)&&Zd.some(r=>i[r]!=null)}}),t},FN=e=>e,Xt=e=>e,Re=e=>e,$N=e=>e,UN=e=>e,Fo=e=>e,WN=e=>e,YN=e=>e,qN=e=>e;function a6(){const e=t=>t;return new Proxy(e,{get(){return e}})}const $t=a6(),Zv=a6(),s6=e=>e,XN=/[^a-zA-Z0-9_\u0081-\uffff-]/g;function ZN(e){return`${e}`.replace(XN,t=>`\\${t}`)}const KN=/[A-Z]/g;function QN(e){return e.replace(KN,t=>`-${t.toLowerCase()}`)}function l6(e,t={}){const{fallback:i="",prefix:r=""}=t,a=QN(["-",r,ZN(e)].filter(Boolean).join("-"));return{var:a,ref:`var(${a}${i?`, ${i}`:""})`}}const JN=e=>/^var\(--.+\)$/.test(e),tn=(e,t)=>t!=null?`${e}(${t})`:t,_a=e=>{if(JN(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},t5=e=>({values:["outside","inside","mixed","none"],transform(t,{token:i}){const r=i("colors.colorPalette.focusRing");return{inside:{"--focus-ring-color":r,[e]:{outlineOffset:"0px",outlineWidth:"var(--focus-ring-width, 1px)",outlineColor:"var(--focus-ring-color)",outlineStyle:"var(--focus-ring-style, solid)",borderColor:"var(--focus-ring-color)"}},outside:{"--focus-ring-color":r,[e]:{outlineWidth:"var(--focus-ring-width, 2px)",outlineOffset:"var(--focus-ring-offset, 2px)",outlineStyle:"var(--focus-ring-style, solid)",outlineColor:"var(--focus-ring-color)"}},mixed:{"--focus-ring-color":r,[e]:{outlineWidth:"var(--focus-ring-width, 3px)",outlineStyle:"var(--focus-ring-style, solid)",outlineColor:"color-mix(in srgb, var(--focus-ring-color), transparent 60%)",borderColor:"var(--focus-ring-color)"}},none:{"--focus-ring-color":r,[e]:{outline:"none"}}}[t]??{}}}),eI=gt("borderColor"),Dr=e=>({transition:e,transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"}),tI=FN({hover:["@media (hover: hover)","&:is(:hover, [data-hover]):not(:disabled, [data-disabled])"],active:"&:is(:active, [data-active]):not(:disabled, [data-disabled], [data-state=open])",focus:"&:is(:focus, [data-focus])",focusWithin:"&:is(:focus-within, [data-focus-within])",focusVisible:"&:is(:focus-visible, [data-focus-visible])",disabled:"&:is(:disabled, [disabled], [data-disabled], [aria-disabled=true])",visited:"&:visited",target:"&:target",readOnly:"&:is([data-readonly], [aria-readonly=true], [readonly])",readWrite:"&:read-write",empty:"&:is(:empty, [data-empty])",checked:"&:is(:checked, [data-checked], [aria-checked=true], [data-state=checked])",enabled:"&:enabled",expanded:"&:is([aria-expanded=true], [data-expanded], [data-state=expanded])",highlighted:"&[data-highlighted]",complete:"&[data-complete]",incomplete:"&[data-incomplete]",dragging:"&[data-dragging]",before:"&::before",after:"&::after",firstLetter:"&::first-letter",firstLine:"&::first-line",marker:"&::marker",selection:"&::selection",file:"&::file-selector-button",backdrop:"&::backdrop",first:"&:first-of-type",last:"&:last-of-type",notFirst:"&:not(:first-of-type)",notLast:"&:not(:last-of-type)",only:"&:only-child",even:"&:nth-of-type(even)",odd:"&:nth-of-type(odd)",peerFocus:".peer:is(:focus, [data-focus]) ~ &",peerHover:".peer:is(:hover, [data-hover]):not(:disabled, [data-disabled]) ~ &",peerActive:".peer:is(:active, [data-active]):not(:disabled, [data-disabled]) ~ &",peerFocusWithin:".peer:focus-within ~ &",peerFocusVisible:".peer:is(:focus-visible, [data-focus-visible]) ~ &",peerDisabled:".peer:is(:disabled, [disabled], [data-disabled]) ~ &",peerChecked:".peer:is(:checked, [data-checked], [aria-checked=true], [data-state=checked]) ~ &",peerInvalid:".peer:is(:invalid, [data-invalid], [aria-invalid=true]) ~ &",peerExpanded:".peer:is([aria-expanded=true], [data-expanded], [data-state=expanded]) ~ &",peerPlaceholderShown:".peer:placeholder-shown ~ &",groupFocus:".group:is(:focus, [data-focus]) &",groupHover:".group:is(:hover, [data-hover]):not(:disabled, [data-disabled]) &",groupActive:".group:is(:active, [data-active]):not(:disabled, [data-disabled]) &",groupFocusWithin:".group:focus-within &",groupFocusVisible:".group:is(:focus-visible, [data-focus-visible]) &",groupDisabled:".group:is(:disabled, [disabled], [data-disabled]) &",groupChecked:".group:is(:checked, [data-checked], [aria-checked=true], [data-state=checked]) &",groupExpanded:".group:is([aria-expanded=true], [data-expanded], [data-state=expanded]) &",groupInvalid:".group:invalid &",indeterminate:"&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate])",required:"&:is([data-required], [aria-required=true])",valid:"&:is([data-valid], [data-state=valid])",invalid:"&:is([data-invalid], [aria-invalid=true], [data-state=invalid])",autofill:"&:autofill",inRange:"&:is(:in-range, [data-in-range])",outOfRange:"&:is(:out-of-range, [data-outside-range])",placeholder:"&::placeholder, &[data-placeholder]",placeholderShown:"&:is(:placeholder-shown, [data-placeholder-shown])",pressed:"&:is([aria-pressed=true], [data-pressed])",selected:"&:is([aria-selected=true], [data-selected])",grabbed:"&:is([aria-grabbed=true], [data-grabbed])",underValue:"&[data-state=under-value]",overValue:"&[data-state=over-value]",atValue:"&[data-state=at-value]",default:"&:default",optional:"&:optional",open:"&:is([open], [data-open], [data-state=open])",closed:"&:is([closed], [data-closed], [data-state=closed])",fullscreen:"&:is(:fullscreen, [data-fullscreen])",loading:"&:is([data-loading], [aria-busy=true])",hidden:"&:is([hidden], [data-hidden])",current:"&[data-current]",currentPage:"&[aria-current=page]",currentStep:"&[aria-current=step]",today:"&[data-today]",unavailable:"&[data-unavailable]",rangeStart:"&[data-range-start]",rangeEnd:"&[data-range-end]",now:"&[data-now]",topmost:"&[data-topmost]",motionReduce:"@media (prefers-reduced-motion: reduce)",motionSafe:"@media (prefers-reduced-motion: no-preference)",print:"@media print",landscape:"@media (orientation: landscape)",portrait:"@media (orientation: portrait)",dark:".dark &, .dark .chakra-theme:not(.light) &",light:":root &, .light &",osDark:"@media (prefers-color-scheme: dark)",osLight:"@media (prefers-color-scheme: light)",highContrast:"@media (forced-colors: active)",lessContrast:"@media (prefers-contrast: less)",moreContrast:"@media (prefers-contrast: more)",ltr:"[dir=ltr] &",rtl:"[dir=rtl] &",scrollbar:"&::-webkit-scrollbar",scrollbarThumb:"&::-webkit-scrollbar-thumb",scrollbarTrack:"&::-webkit-scrollbar-track",horizontal:"&[data-orientation=horizontal]",vertical:"&[data-orientation=vertical]",icon:"& :where(svg)",starting:"@starting-style"}),Ls=l6("bg-currentcolor"),n5=e=>e===Ls.ref||e==="currentBg",ht=e=>({...e("colors"),currentBg:Ls}),nI=s6({conditions:tI,utilities:{background:{values:ht,shorthand:["bg"],transform(e,t){if(n5(t.raw))return{background:Ls.ref};const i=gt("background")(e,t);return{...i,[Ls.var]:i?.background}}},backgroundColor:{values:ht,shorthand:["bgColor"],transform(e,t){if(n5(t.raw))return{backgroundColor:Ls.ref};const i=gt("backgroundColor")(e,t);return{...i,[Ls.var]:i?.backgroundColor}}},backgroundSize:{shorthand:["bgSize"]},backgroundPosition:{shorthand:["bgPos"]},backgroundRepeat:{shorthand:["bgRepeat"]},backgroundAttachment:{shorthand:["bgAttachment"]},backgroundClip:{shorthand:["bgClip"],values:["text"],transform(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}}},backgroundGradient:{shorthand:["bgGradient"],values(e){return{...e("gradients"),"to-t":"linear-gradient(to top, var(--gradient))","to-tr":"linear-gradient(to top right, var(--gradient))","to-r":"linear-gradient(to right, var(--gradient))","to-br":"linear-gradient(to bottom right, var(--gradient))","to-b":"linear-gradient(to bottom, var(--gradient))","to-bl":"linear-gradient(to bottom left, var(--gradient))","to-l":"linear-gradient(to left, var(--gradient))","to-tl":"linear-gradient(to top left, var(--gradient))"}},transform(e){return{"--gradient-stops":"var(--gradient-from), var(--gradient-to)","--gradient":"var(--gradient-via-stops, var(--gradient-stops))",backgroundImage:e}}},gradientFrom:{values:ht,transform:gt("--gradient-from")},gradientTo:{values:ht,transform:gt("--gradient-to")},gradientVia:{values:ht,transform(e,t){return{...gt("--gradient-via")(e,t),"--gradient-via-stops":"var(--gradient-from), var(--gradient-via), var(--gradient-to)"}}},backgroundImage:{values(e){return{...e("gradients"),...e("assets")}},shorthand:["bgImg","bgImage"]},border:{values:"borders"},borderTop:{values:"borders"},borderLeft:{values:"borders"},borderBlockStart:{values:"borders"},borderRight:{values:"borders"},borderBottom:{values:"borders"},borderBlockEnd:{values:"borders"},borderInlineStart:{values:"borders",shorthand:["borderStart"]},borderInlineEnd:{values:"borders",shorthand:["borderEnd"]},borderInline:{values:"borders",shorthand:["borderX"]},borderBlock:{values:"borders",shorthand:["borderY"]},borderColor:{values:ht,transform:gt("borderColor")},borderTopColor:{values:ht,transform:gt("borderTopColor")},borderBlockStartColor:{values:ht,transform:gt("borderBlockStartColor")},borderBottomColor:{values:ht,transform:gt("borderBottomColor")},borderBlockEndColor:{values:ht,transform:gt("borderBlockEndColor")},borderLeftColor:{values:ht,transform:gt("borderLeftColor")},borderInlineStartColor:{values:ht,shorthand:["borderStartColor"],transform:gt("borderInlineStartColor")},borderRightColor:{values:ht,transform:gt("borderRightColor")},borderInlineEndColor:{values:ht,shorthand:["borderEndColor"],transform:gt("borderInlineEndColor")},borderStyle:{values:"borderStyles"},borderTopStyle:{values:"borderStyles"},borderBlockStartStyle:{values:"borderStyles"},borderBottomStyle:{values:"borderStyles"},borderBlockEndStyle:{values:"borderStyles"},borderInlineStartStyle:{values:"borderStyles",shorthand:["borderStartStyle"]},borderInlineEndStyle:{values:"borderStyles",shorthand:["borderEndStyle"]},borderLeftStyle:{values:"borderStyles"},borderRightStyle:{values:"borderStyles"},borderRadius:{values:"radii",shorthand:["rounded"]},borderTopLeftRadius:{values:"radii",shorthand:["roundedTopLeft"]},borderStartStartRadius:{values:"radii",shorthand:["roundedStartStart","borderTopStartRadius"]},borderEndStartRadius:{values:"radii",shorthand:["roundedEndStart","borderBottomStartRadius"]},borderTopRightRadius:{values:"radii",shorthand:["roundedTopRight"]},borderStartEndRadius:{values:"radii",shorthand:["roundedStartEnd","borderTopEndRadius"]},borderEndEndRadius:{values:"radii",shorthand:["roundedEndEnd","borderBottomEndRadius"]},borderBottomLeftRadius:{values:"radii",shorthand:["roundedBottomLeft"]},borderBottomRightRadius:{values:"radii",shorthand:["roundedBottomRight"]},borderInlineStartRadius:{values:"radii",property:"borderRadius",shorthand:["roundedStart","borderStartRadius"],transform:e=>({borderStartStartRadius:e,borderEndStartRadius:e})},borderInlineEndRadius:{values:"radii",property:"borderRadius",shorthand:["roundedEnd","borderEndRadius"],transform:e=>({borderStartEndRadius:e,borderEndEndRadius:e})},borderTopRadius:{values:"radii",property:"borderRadius",shorthand:["roundedTop"],transform:e=>({borderTopLeftRadius:e,borderTopRightRadius:e})},borderBottomRadius:{values:"radii",property:"borderRadius",shorthand:["roundedBottom"],transform:e=>({borderBottomLeftRadius:e,borderBottomRightRadius:e})},borderLeftRadius:{values:"radii",property:"borderRadius",shorthand:["roundedLeft"],transform:e=>({borderTopLeftRadius:e,borderBottomLeftRadius:e})},borderRightRadius:{values:"radii",property:"borderRadius",shorthand:["roundedRight"],transform:e=>({borderTopRightRadius:e,borderBottomRightRadius:e})},borderWidth:{values:"borderWidths"},borderBlockStartWidth:{values:"borderWidths"},borderTopWidth:{values:"borderWidths"},borderBottomWidth:{values:"borderWidths"},borderBlockEndWidth:{values:"borderWidths"},borderRightWidth:{values:"borderWidths"},borderInlineWidth:{values:"borderWidths",shorthand:["borderXWidth"]},borderInlineStartWidth:{values:"borderWidths",shorthand:["borderStartWidth"]},borderInlineEndWidth:{values:"borderWidths",shorthand:["borderEndWidth"]},borderLeftWidth:{values:"borderWidths"},borderBlockWidth:{values:"borderWidths",shorthand:["borderYWidth"]},color:{values:ht,transform:gt("color")},fill:{values:ht,transform:gt("fill")},stroke:{values:ht,transform:gt("stroke")},accentColor:{values:ht,transform:gt("accentColor")},divideX:{values:{type:"string"},transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderInlineStartWidth:e,borderInlineEndWidth:"0px"}}}},divideY:{values:{type:"string"},transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderTopWidth:e,borderBottomWidth:"0px"}}}},divideColor:{values:ht,transform(e,t){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":eI(e,t)}}},divideStyle:{property:"borderStyle",transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderStyle:e}}}},boxShadow:{values:"shadows",shorthand:["shadow"]},boxShadowColor:{values:ht,transform:gt("--shadow-color"),shorthand:["shadowColor"]},mixBlendMode:{shorthand:["blendMode"]},backgroundBlendMode:{shorthand:["bgBlendMode"]},opacity:{values:"opacity"},filter:{transform(e){return e!=="auto"?{filter:e}:{filter:"var(--blur) var(--brightness) var(--contrast) var(--grayscale) var(--hue-rotate) var(--invert) var(--saturate) var(--sepia) var(--drop-shadow)"}}},blur:{values:"blurs",transform:e=>({"--blur":tn("blur",e)})},brightness:{transform:e=>({"--brightness":tn("brightness",e)})},contrast:{transform:e=>({"--contrast":tn("contrast",e)})},grayscale:{transform:e=>({"--grayscale":tn("grayscale",e)})},hueRotate:{transform:e=>({"--hue-rotate":tn("hue-rotate",_a(e))})},invert:{transform:e=>({"--invert":tn("invert",e)})},saturate:{transform:e=>({"--saturate":tn("saturate",e)})},sepia:{transform:e=>({"--sepia":tn("sepia",e)})},dropShadow:{transform:e=>({"--drop-shadow":tn("drop-shadow",e)})},backdropFilter:{transform(e){return e!=="auto"?{backdropFilter:e}:{backdropFilter:"var(--backdrop-blur) var(--backdrop-brightness) var(--backdrop-contrast) var(--backdrop-grayscale) var(--backdrop-hue-rotate) var(--backdrop-invert) var(--backdrop-opacity) var(--backdrop-saturate) var(--backdrop-sepia)"}}},backdropBlur:{values:"blurs",transform:e=>({"--backdrop-blur":tn("blur",e)})},backdropBrightness:{transform:e=>({"--backdrop-brightness":tn("brightness",e)})},backdropContrast:{transform:e=>({"--backdrop-contrast":tn("contrast",e)})},backdropGrayscale:{transform:e=>({"--backdrop-grayscale":tn("grayscale",e)})},backdropHueRotate:{transform:e=>({"--backdrop-hue-rotate":tn("hue-rotate",_a(e))})},backdropInvert:{transform:e=>({"--backdrop-invert":tn("invert",e)})},backdropOpacity:{transform:e=>({"--backdrop-opacity":tn("opacity",e)})},backdropSaturate:{transform:e=>({"--backdrop-saturate":tn("saturate",e)})},backdropSepia:{transform:e=>({"--backdrop-sepia":tn("sepia",e)})},flexBasis:{values:"sizes"},gap:{values:"spacing"},rowGap:{values:"spacing",shorthand:["gapY"]},columnGap:{values:"spacing",shorthand:["gapX"]},flexDirection:{shorthand:["flexDir"]},gridGap:{values:"spacing"},gridColumnGap:{values:"spacing"},gridRowGap:{values:"spacing"},outlineColor:{values:ht,transform:gt("outlineColor")},focusRing:t5("&:is(:focus, [data-focus])"),focusVisibleRing:t5("&:is(:focus-visible, [data-focus-visible])"),focusRingColor:{values:ht,transform:gt("--focus-ring-color")},focusRingOffset:{values:"spacing",transform:e=>({"--focus-ring-offset":e})},focusRingWidth:{values:"borderWidths",property:"outlineWidth",transform:e=>({"--focus-ring-width":e})},focusRingStyle:{values:"borderStyles",property:"outlineStyle",transform:e=>({"--focus-ring-style":e})},aspectRatio:{values:"aspectRatios"},width:{values:"sizes",shorthand:["w"]},inlineSize:{values:"sizes"},height:{values:"sizes",shorthand:["h"]},blockSize:{values:"sizes"},boxSize:{values:"sizes",property:"width",transform:e=>({width:e,height:e})},minWidth:{values:"sizes",shorthand:["minW"]},minInlineSize:{values:"sizes"},minHeight:{values:"sizes",shorthand:["minH"]},minBlockSize:{values:"sizes"},maxWidth:{values:"sizes",shorthand:["maxW"]},maxInlineSize:{values:"sizes"},maxHeight:{values:"sizes",shorthand:["maxH"]},maxBlockSize:{values:"sizes"},hideFrom:{values:"breakpoints",transform:(e,{raw:t,token:i})=>({[i.raw(`breakpoints.${t}`)?`@breakpoint ${t}`:`@media screen and (min-width: ${e})`]:{display:"none"}})},hideBelow:{values:"breakpoints",transform(e,{raw:t,token:i}){return{[i.raw(`breakpoints.${t}`)?`@breakpoint ${t}Down`:`@media screen and (max-width: ${e})`]:{display:"none"}}}},overscrollBehavior:{shorthand:["overscroll"]},overscrollBehaviorX:{shorthand:["overscrollX"]},overscrollBehaviorY:{shorthand:["overscrollY"]},scrollbar:{values:["visible","hidden"],transform(e){switch(e){case"visible":return{msOverflowStyle:"auto",scrollbarWidth:"auto","&::-webkit-scrollbar":{display:"block"}};case"hidden":return{msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}};default:return{}}}},scrollbarColor:{values:ht,transform:gt("scrollbarColor")},scrollbarGutter:{values:"spacing"},scrollbarWidth:{values:"sizes"},scrollMargin:{values:"spacing"},scrollMarginTop:{values:"spacing"},scrollMarginBottom:{values:"spacing"},scrollMarginLeft:{values:"spacing"},scrollMarginRight:{values:"spacing"},scrollMarginX:{values:"spacing",transform:e=>({scrollMarginLeft:e,scrollMarginRight:e})},scrollMarginY:{values:"spacing",transform:e=>({scrollMarginTop:e,scrollMarginBottom:e})},scrollPadding:{values:"spacing"},scrollPaddingTop:{values:"spacing"},scrollPaddingBottom:{values:"spacing"},scrollPaddingLeft:{values:"spacing"},scrollPaddingRight:{values:"spacing"},scrollPaddingInline:{values:"spacing",shorthand:["scrollPaddingX"]},scrollPaddingBlock:{values:"spacing",shorthand:["scrollPaddingY"]},scrollSnapType:{values:{none:"none",x:"x var(--scroll-snap-strictness)",y:"y var(--scroll-snap-strictness)",both:"both var(--scroll-snap-strictness)"}},scrollSnapStrictness:{values:["mandatory","proximity"],transform:e=>({"--scroll-snap-strictness":e})},scrollSnapMargin:{values:"spacing"},scrollSnapMarginTop:{values:"spacing"},scrollSnapMarginBottom:{values:"spacing"},scrollSnapMarginLeft:{values:"spacing"},scrollSnapMarginRight:{values:"spacing"},listStylePosition:{shorthand:["listStylePos"]},listStyleImage:{values:"assets",shorthand:["listStyleImg"]},position:{shorthand:["pos"]},zIndex:{values:"zIndex"},inset:{values:"spacing"},insetInline:{values:"spacing",shorthand:["insetX"]},insetBlock:{values:"spacing",shorthand:["insetY"]},top:{values:"spacing"},insetBlockStart:{values:"spacing"},bottom:{values:"spacing"},insetBlockEnd:{values:"spacing"},left:{values:"spacing"},right:{values:"spacing"},insetInlineStart:{values:"spacing",shorthand:["insetStart"]},insetInlineEnd:{values:"spacing",shorthand:["insetEnd"]},ring:{transform(e){return{"--ring-offset-shadow":"var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color)","--ring-shadow":"var(--ring-inset) 0 0 0 calc(var(--ring-width) + var(--ring-offset-width)) var(--ring-color)","--ring-width":e,boxShadow:"var(--ring-offset-shadow), var(--ring-shadow), var(--shadow, 0 0 #0000)"}}},ringColor:{values:ht,transform:gt("--ring-color")},ringOffset:{transform:e=>({"--ring-offset-width":e})},ringOffsetColor:{values:ht,transform:gt("--ring-offset-color")},ringInset:{transform:e=>({"--ring-inset":e})},margin:{values:"spacing",shorthand:["m"]},marginTop:{values:"spacing",shorthand:["mt"]},marginBlockStart:{values:"spacing"},marginRight:{values:"spacing",shorthand:["mr"]},marginBottom:{values:"spacing",shorthand:["mb"]},marginBlockEnd:{values:"spacing"},marginLeft:{values:"spacing",shorthand:["ml"]},marginInlineStart:{values:"spacing",shorthand:["ms","marginStart"]},marginInlineEnd:{values:"spacing",shorthand:["me","marginEnd"]},marginInline:{values:"spacing",shorthand:["mx","marginX"]},marginBlock:{values:"spacing",shorthand:["my","marginY"]},padding:{values:"spacing",shorthand:["p"]},paddingTop:{values:"spacing",shorthand:["pt"]},paddingRight:{values:"spacing",shorthand:["pr"]},paddingBottom:{values:"spacing",shorthand:["pb"]},paddingBlockStart:{values:"spacing"},paddingBlockEnd:{values:"spacing"},paddingLeft:{values:"spacing",shorthand:["pl"]},paddingInlineStart:{values:"spacing",shorthand:["ps","paddingStart"]},paddingInlineEnd:{values:"spacing",shorthand:["pe","paddingEnd"]},paddingInline:{values:"spacing",shorthand:["px","paddingX"]},paddingBlock:{values:"spacing",shorthand:["py","paddingY"]},textDecoration:{shorthand:["textDecor"]},textDecorationColor:{values:ht,transform:gt("textDecorationColor")},textShadow:{values:"shadows"},transform:{transform:e=>{let t=e;return e==="auto"&&(t="translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) rotate(var(--rotate, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0))"),e==="auto-gpu"&&(t="translate3d(var(--translate-x, 0), var(--translate-y, 0), 0) rotate(var(--rotate, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0))"),{transform:t}}},skewX:{transform:e=>({"--skew-x":_a(e)})},skewY:{transform:e=>({"--skew-y":_a(e)})},scaleX:{transform:e=>({"--scale-x":e})},scaleY:{transform:e=>({"--scale-y":e})},scale:{transform(e){return e!=="auto"?{scale:e}:{scale:"var(--scale-x, 1) var(--scale-y, 1)"}}},spaceXReverse:{values:{type:"boolean"},transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-x-reverse":e?"1":void 0}}}},spaceX:{property:"marginInlineStart",values:"spacing",transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-x-reverse":"0",marginInlineStart:`calc(${e} * calc(1 - var(--space-x-reverse)))`,marginInlineEnd:`calc(${e} * var(--space-x-reverse))`}})},spaceYReverse:{values:{type:"boolean"},transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-y-reverse":e?"1":void 0}}}},spaceY:{property:"marginTop",values:"spacing",transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-y-reverse":"0",marginTop:`calc(${e} * calc(1 - var(--space-y-reverse)))`,marginBottom:`calc(${e} * var(--space-y-reverse))`}})},rotate:{transform(e){return e!=="auto"?{rotate:_a(e)}:{rotate:"var(--rotate-x, 0) var(--rotate-y, 0) var(--rotate-z, 0)"}}},rotateX:{transform(e){return{"--rotate-x":_a(e)}}},rotateY:{transform(e){return{"--rotate-y":_a(e)}}},translate:{transform(e){return e!=="auto"?{translate:e}:{translate:"var(--translate-x) var(--translate-y)"}}},translateX:{values:"spacing",transform:e=>({"--translate-x":e})},translateY:{values:"spacing",transform:e=>({"--translate-y":e})},transition:{values:["all","common","colors","opacity","position","backgrounds","size","shadow","transform"],transform(e){switch(e){case"all":return Dr("all");case"position":return Dr("left, right, top, bottom, inset-inline, inset-block");case"colors":return Dr("color, background-color, border-color, text-decoration-color, fill, stroke");case"opacity":return Dr("opacity");case"shadow":return Dr("box-shadow");case"transform":return Dr("transform");case"size":return Dr("width, height");case"backgrounds":return Dr("background, background-color, background-image, background-position");case"common":return Dr("color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter");default:return{transition:e}}}},transitionDuration:{values:"durations"},transitionProperty:{values:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, translate, transform",colors:"background-color, border-color, color, fill, stroke",size:"width, height",position:"left, right, top, bottom, inset-inline, inset-block",background:"background, background-color, background-image, background-position"}},transitionTimingFunction:{values:"easings"},animation:{values:"animations"},animationDuration:{values:"durations"},animationDelay:{values:"durations"},animationTimingFunction:{values:"easings"},fontFamily:{values:"fonts"},fontSize:{values:"fontSizes"},fontWeight:{values:"fontWeights"},lineHeight:{values:"lineHeights"},letterSpacing:{values:"letterSpacings"},textIndent:{values:"spacing"},truncate:{values:{type:"boolean"},transform(e){return e===!0?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{}}},lineClamp:{transform(e){return e==="none"?{WebkitLineClamp:"unset"}:{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",textWrap:"wrap"}}},borderSpacing:{values:e=>({...e("spacing"),auto:"var(--border-spacing-x, 0) var(--border-spacing-y, 0)"})},borderSpacingX:{values:"spacing",transform(e){return{"--border-spacing-x":e}}},borderSpacingY:{values:"spacing",transform(e){return{"--border-spacing-y":e}}},srOnly:{values:{type:"boolean"},transform(e){return iI[e]||{}}},debug:{values:{type:"boolean"},transform(e){return e?{outline:"1px solid blue !important","& > *":{outline:"1px solid red !important"}}:{}}},caretColor:{values:ht,transform:gt("caretColor")},cursor:{values:"cursor"}}}),iI={true:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},false:{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",clip:"auto",whiteSpace:"normal"}};var rI="",oI=rI.split(","),aI="WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,cornerShape,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical",sI=aI.split(",").concat(oI),lI=new Map(sI.map(e=>[e,!0]));function cI(e){const t=Object.create(null);return i=>(t[i]===void 0&&(t[i]=e(i)),t[i])}var uI=/&|@/,dI=cI(e=>lI.has(e)||e.startsWith("--")||uI.test(e));function Li(e,t){const i={};for(const r in e){const a=t(r,e[r]);i[a[0]]=a[1]}return i}function c6(e,t){const i={};return fr(e,(r,a)=>{r&&(i[a.join(".")]=r.value)},{stop:t}),i}var fI=Object.defineProperty,hI=(e,t,i)=>t in e?fI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,i5=(e,t,i)=>hI(e,typeof t!="symbol"?t+"":t,i);function Vf(e){if(e===null)return"null";if(e===void 0)return"undefined";const t=typeof e;return t==="string"?`s:${e}`:t==="number"?`n:${e}`:t==="boolean"?`b:${e}`:t==="function"?`f:${e.name||"anonymous"}`:Array.isArray(e)?`a:[${e.map(Vf).join(",")}]`:t==="object"?`o:{${Object.keys(e).sort().map(r=>`${r}:${Vf(e[r])}`).join(",")}}`:String(e)}class gI{constructor(t=500){i5(this,"cache",new Map),i5(this,"maxSize"),this.maxSize=t}get(t){const i=this.cache.get(t);return i!==void 0&&(this.cache.delete(t),this.cache.set(t,i)),i}set(t,i){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(t,i)}clear(){this.cache.clear()}}const rn=e=>{const t=new gI;function i(...r){const a=r.length===1?Vf(r[0]):r.map(Vf).join("|");let l=t.get(a);return l===void 0&&(l=e.apply(this,r),t.set(a,l)),l}return i},u6=16,Hf="px",Kv="em",Vc="rem";function d6(e=""){const t=new RegExp(String.raw`-?\d+(?:\.\d+|\d*)`),i=new RegExp(`${Hf}|${Kv}|${Vc}`);return e.match(new RegExp(`${t.source}(${i.source})`))?.[1]}function f6(e=""){if(typeof e=="number")return`${e}px`;const t=d6(e);if(!t||t===Hf)return e;if(t===Kv||t===Vc)return`${parseFloat(e)*u6}${Hf}`}function h6(e=""){const t=d6(e);if(!t||t===Vc)return e;if(t===Kv)return`${parseFloat(e)}${Vc}`;if(t===Hf)return`${parseFloat(e)/u6}${Vc}`}const pI=e=>e.charAt(0).toUpperCase()+e.slice(1);function mI(e){const t=vI(e),i=Object.fromEntries(t);function r(b){return i[b]}function a(b){return Is(r(b))}function l(){const b=Object.keys(i),y=bI(b),x=b.flatMap(_=>{const w=r(_),C=[`${_}Down`,Is({max:Cf(w.min)})],R=[_,Is({min:w.min})],z=[`${_}Only`,a(_)];return[R,z,C]}).filter(([,_])=>_!=="").concat(y.map(([_,w])=>{const C=r(_),R=r(w);return[`${_}To${pI(w)}`,Is({min:C.min,max:Cf(R.min)})]}));return Object.fromEntries(x)}function c(){const b=l();return Object.fromEntries(Object.entries(b))}const d=c(),h=b=>d[b];function p(){return wv(["base",...Object.keys(i)])}function m(b){return Is({min:r(b).min})}function v(b){return Is({max:Cf(r(b).min)})}return{values:Object.values(i),only:a,keys:p,conditions:d,getCondition:h,up:m,down:v}}function Cf(e){const t=parseFloat(f6(e)??"")-.04;return h6(`${t}px`)}function vI(e){return Object.entries(e).sort(([,i],[,r])=>parseInt(i,10)<parseInt(r,10)?-1:1).map(([i,r],a,l)=>{let c=null;return a<=l.length-1&&(c=l[a+1]?.[1]),c!=null&&(c=Cf(c)),[i,{name:i,min:h6(r),max:c}]})}function bI(e){const t=[];return e.forEach((i,r)=>{let a=r;a++;let l=e[a];for(;l;)t.push([i,l]),a++,l=e[a]}),t}function Is({min:e,max:t}){return e==null&&t==null?"":["@media screen",e&&`(min-width: ${e})`,t&&`(max-width: ${t})`].filter(Boolean).join(" and ")}const yI=/^@|&|&$/,xI=e=>{const{breakpoints:t,conditions:i={}}=e,r=Li(i,(m,v)=>[`_${m}`,v]),a=Object.assign({},r,t.conditions);function l(){return Object.keys(a)}function c(m){return l().includes(m)||yI.test(m)||m.startsWith("_")}const d=rn(m=>m.filter(v=>v!=="base").sort((v,b)=>{const y=c(v),x=c(b);return y&&!x?1:!y&&x?-1:0}));function h(m){return m.startsWith("@breakpoint")?t.getCondition(m.replace("@breakpoint ","")):m}function p(m){return Reflect.get(a,m)||m}return{keys:l,sort:d,has:c,resolve:p,breakpoints:t.keys(),expandAtRule:h}},ct=Object.freeze(Object.create(null)),SI=Object.freeze([]);function Ch(){return Object.create(null)}const g6=e=>({minMax:new RegExp(`(!?\\(\\s*min(-device-)?-${e})(.|
2
+ )+\\(\\s*max(-device)?-${e}`,"i"),min:new RegExp(`\\(\\s*min(-device)?-${e}`,"i"),maxMin:new RegExp(`(!?\\(\\s*max(-device)?-${e})(.|
3
+ )+\\(\\s*min(-device)?-${e}`,"i"),max:new RegExp(`\\(\\s*max(-device)?-${e}`,"i")}),_I=g6("width"),wI=g6("height"),p6=e=>({isMin:c5(e.minMax,e.maxMin,e.min),isMax:c5(e.maxMin,e.minMax,e.max)}),{isMin:G0,isMax:r5}=p6(_I),{isMin:V0,isMax:o5}=p6(wI),a5=/print/i,s5=/^print$/i,CI=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/,EI=/(\d)/,Rc=Number.MAX_VALUE,TI={ch:8.8984375,em:16,rem:16,ex:8.296875,px:1};function l5(e){const t=CI.exec(e)||(G0(e)||V0(e)?EI.exec(e):null);if(!t)return Rc;if(t[0]==="0")return 0;const i=parseFloat(t[1]),r=t[2];return i*(TI[r]||1)}function c5(e,t,i){return r=>e.test(r)||!t.test(r)&&i.test(r)}function kI(e,t){const i=a5.test(e),r=s5.test(e),a=a5.test(t),l=s5.test(t);return i&&a?!r&&l?1:r&&!l?-1:e.localeCompare(t):i?1:a?-1:null}const zI=rn((e,t)=>{const i=kI(e,t);if(i!==null)return i;const r=G0(e)||V0(e),a=r5(e)||o5(e),l=G0(t)||V0(t),c=r5(t)||o5(t);if(r&&c)return-1;if(a&&l)return 1;const d=l5(e),h=l5(t);return d===Rc&&h===Rc?e.localeCompare(t):d===Rc?1:h===Rc?-1:d!==h?d>h?a?-1:1:a?1:-1:e.localeCompare(t)});function u5(e){return e.sort(([t],[i])=>zI(t,i))}function m6(e){const t=[],i=[],r={};for(const[c,d]of Object.entries(e))c.startsWith("@media")?t.push([c,d]):c.startsWith("@container")?i.push([c,d]):Fn(d)?r[c]=m6(d):r[c]=d;const a=u5(t),l=u5(i);return{...r,...Object.fromEntries(a),...Object.fromEntries(l)}}const v6=/\s*!(important)?/i,RI=rn(e=>ji(e)?v6.test(e):!1),AI=rn(e=>ji(e)?e.replace(v6,"").trim():e);function b6(e){const{transform:t,conditions:i,normalize:r}=e,a=II(e);return rn(function(...c){const d=a(...c),h=r(d),p=Ch();return fr(h,(m,v)=>{if(m==null)return;const[b,...y]=i.sort(v).map(i.resolve),x=RI(m);x&&(m=AI(m));let _=t(b,m)??ct;_=fr(_,w=>ji(w)&&x?`${w} !important`:w,{getKey:w=>i.expandAtRule(w)}),OI(p,y.flat(),_)}),m6(p)})}function OI(e,t,i){let r=e;for(const a of t)a&&(r[a]||(r[a]=Ch()),r=r[a]);Mo(r,i)}function NI(...e){return e.filter(t=>{if(!Fn(t))return!1;const i=su(t);return Object.keys(i).length>0})}function II(e){function t(i){const r=NI(...i);return r.length===1?r:r.map(a=>e.normalize(a))}return rn(function(...r){return Mo({},...t(r))})}const H0=e=>({base:ct,variants:ct,defaultVariants:ct,compoundVariants:[],...e});function PI(e){const{css:t,conditions:i,normalize:r,layers:a}=e;function l(d={}){const h=H0(d),{base:p,defaultVariants:m,compoundVariants:v}=h,b=Li(h.variants,(z,D)=>[z,Li(D,(T,k)=>[T,r(k)])]),y=b6({conditions:i,normalize:r,transform(z,D){return b[z]?.[D]}}),x=rn(function(D={}){const T=r({...m,...su(D)});let k={...r(p)};Mo(k,y(T));const A=c(v,T);return a.wrap("recipes",t(k,A))}),_=Object.keys(b),w=z=>{const D=i6(z,["recipe"]),[T,k]=Us(D,_),A=_.includes("colorPalette"),L=_.includes("orientation");return A||(T.colorPalette=z.colorPalette||m.colorPalette),L&&(k.orientation=z.orientation),[T,k]},C=Li(b,(z,D)=>[z,Object.keys(D)]),R=rn(function(D){return t(x(D))});return Object.assign(R,{className:d.className,__cva__:!0,variantMap:C,variantKeys:_,raw:x,config:d,splitVariantProps:w,merge(z){return l(MI(this,z))}})}function c(d,h){let p=ct;return d.forEach(m=>{Object.entries(m).every(([b,y])=>b==="css"?!0:(Array.isArray(y)?y:[y]).some(_=>h[b]===_))&&(p=t(p,m.css))}),p}return l}const d5=e=>(e?.__cva__?e.config:e)??ct;function MI(e,t){const i=H0(d5(e)),r=H0(d5(t)),a=wv(Object.keys(i.variants),Object.keys(r.variants)),l=Mo({},i.base,r.base),c=Object.fromEntries(a.map(m=>[m,Mo({},i.variants[m],r.variants[m])])),d=Mo({},i.defaultVariants,r.defaultVariants),h=[...i.compoundVariants,...r.compoundVariants];return{className:Di(i.className,r.className),base:l,variants:c,defaultVariants:d,compoundVariants:h}}const DI={reset:"reset",base:"base",tokens:"tokens",recipes:"recipes"},f5={reset:0,base:1,tokens:2,recipes:3};function LI(e){const t=e.layers??DI,r=Object.values(t).sort((a,l)=>f5[a]-f5[l]);return{names:r,atRule:`@layer ${r.join(", ")};`,wrap(a,l){return e.disableLayers?l:{[`@layer ${t[a]}`]:l}}}}function jI(e){const{utility:t,normalize:i}=e,{hasShorthand:r,resolveShorthand:a}=t;return function(l){return fr(l,i,{stop:c=>Array.isArray(c),getKey:r?a:void 0})}}function BI(e){const{preflight:t}=e;if(!t)return{};const{scope:i="",level:r="parent"}=Fn(t)?t:{};let a="";i&&r==="parent"?a=`${i} `:i&&r==="element"&&(a=`&${i}`);const l={"*":{margin:"0px",padding:"0px",font:"inherit",wordWrap:"break-word",WebkitTapHighlightColor:"transparent"},"*, *::before, *::after, *::backdrop":{boxSizing:"border-box",borderWidth:"0px",borderStyle:"solid",borderColor:"var(--global-color-border, currentColor)"},hr:{height:"0px",color:"inherit",borderTopWidth:"1px"},body:{minHeight:"100dvh",position:"relative"},img:{borderStyle:"none"},"img, svg, video, canvas, audio, iframe, embed, object":{display:"block",verticalAlign:"middle"},iframe:{border:"none"},"img, video":{maxWidth:"100%",height:"auto"},"p, h1, h2, h3, h4, h5, h6":{overflowWrap:"break-word"},"ol, ul":{listStyle:"none"},"code, kbd, pre, samp":{fontSize:"1em"},"button, [type='button'], [type='reset'], [type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},"button, input, optgroup, select, textarea":{color:"inherit"},"button, select":{textTransform:"none"},table:{textIndent:"0px",borderColor:"inherit",borderCollapse:"collapse"},"*::placeholder":{opacity:"unset",color:"#9ca3af",userSelect:"none"},textarea:{resize:"vertical"},summary:{display:"list-item"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},dialog:{padding:"0px"},a:{color:"inherit",textDecoration:"inherit"},"abbr:where([title])":{textDecoration:"underline dotted"},"b, strong":{fontWeight:"bolder"},"i, em":{fontStyle:"italic"},"code, kbd, samp, pre":{fontSize:"1em","--font-mono-fallback":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New'",fontFamily:"var(--global-font-mono, var(--font-mono-fallback))"},'input[type="text"], input[type="email"], input[type="search"], input[type="password"]':{WebkitAppearance:"none",MozAppearance:"none"},"input[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration, ::-webkit-search-cancel-button":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},'input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button':{height:"auto"},"input[type='number']":{MozAppearance:"textfield"},":-moz-ui-invalid":{boxShadow:"none"},":-moz-focusring":{outline:"auto"},"[hidden]:where(:not([hidden='until-found']))":{display:"none !important"}},c={[i||"html"]:{lineHeight:1.5,"--font-fallback":"ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",WebkitTextSizeAdjust:"100%",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",textRendering:"optimizeLegibility",touchAction:"manipulation",MozTabSize:"4",tabSize:"4",fontFamily:"var(--global-font-body, var(--font-fallback))"}};if(r==="element"){const d=Object.entries(l).reduce((h,[p,m])=>(h[p]={[a]:m},h),{});Object.assign(c,d)}else a?c[a]=l:Object.assign(c,l);return c}function GI(e){const{conditions:t,isValidProperty:i}=e,r=rn((a,l)=>i(a)?!l.split(",").every(c=>c==="base"||t.has(c)):!0);return function(l){return fr(l,c=>c,{stop:c=>Array.isArray(c),getKey:(c,d)=>!Fn(d)||t.has(c)?c:r(c,Object.keys(d).join(","))?HI(c).map(h=>{const p=h.startsWith("&")?h.slice(1):h;return VI(p)?`${p} &`:`&${p}`}).join(", "):c})}}function VI(e){const t=e.toLowerCase();return t.startsWith(":host-context")||t.startsWith(":host")||t.startsWith("::slotted")}function HI(e){const t=[];let i=0,r="",a=!1;for(let l=0;l<e.length;l++){const c=e[l];if(c==="\\"&&!a){a=!0,r+=c;continue}if(a){a=!1,r+=c;continue}c==="("?i++:c===")"&&i--,c===","&&i===0?(t.push(r.trim()),r=""):r+=c}return r&&t.push(r.trim()),t}const FI=(e=ct)=>{const t=a=>({base:e.base?.[a]??ct,variants:Ch(),defaultVariants:e.defaultVariants??ct,compoundVariants:e.compoundVariants?$I(e.compoundVariants,a):SI}),r=(e.slots??[]).map(a=>[a,t(a)]);for(const[a,l]of Object.entries(e.variants??{}))for(const[c,d]of Object.entries(l))r.forEach(([h,p])=>{var m;(m=p.variants)[a]??(m[a]={}),p.variants[a][c]=d[h]??ct});return Object.fromEntries(r)},$I=(e,t)=>e.filter(i=>i.css[t]).map(i=>({...i,css:i.css[t]}));function UI(e){const{cva:t}=e;return function(r=ct){const a=Object.entries(FI(r)).map(([v,b])=>[v,t(b)]),l=rn(function(b){const y=a.map(([x,_])=>[x,_(b)]);return Object.fromEntries(y)}),c=r.variants??ct,d=Object.keys(c);function h(v){const b=i6(v,["recipe"]),[y,x]=Us(b,d),_=d.includes("colorPalette"),w=d.includes("orientation");return _||(y.colorPalette=v.colorPalette||r.defaultVariants?.colorPalette),w&&(x.orientation=v.orientation),[y,x]}const p=Li(c,(v,b)=>[v,Object.keys(b)]);let m={};return r.className&&(m=Object.fromEntries(r.slots.map(v=>[v,`${r.className}__${v}`]))),Object.assign(l,{variantMap:p,variantKeys:d,splitVariantProps:h,classNameMap:m})}}const WI=()=>e=>Array.from(new Set(e)),YI=/([\0-\x1f\x7f]|^-?\d)|^-$|^-|[^\x80-\uFFFF\w-]/g,qI=function(e,t){return t?e==="\0"?"�":e==="-"&&e.length===1?"\\-":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16):"\\"+e},y6=e=>(e+"").replace(YI,qI),x6=(e,t)=>{let i="",r=0,a="char",l="",c="";const d=[];for(;r<e.length;){const h=e[r];if(h==="{"){const m=e.indexOf("}",r);if(m===-1)break;const v=e.slice(r+1,m),b=t(v);i+=b??v,r=m+1;continue}if(a==="token"&&h===","){e[r]===""&&r++,a="fallback",d.push(a);const m=t(l);m?.endsWith(")")&&(i+=m.slice(0,-1)),l="",c="";continue}if(a==="fallback"&&c+h===", var("){const b=XI(e.slice(r+1))+r+1,y=e.slice(r+1,b);if(b===-1)break;i+=", var("+y+")",r=b+1,a=d.pop()??a,c="";continue}if(a==="token"||a==="fallback"){if(r++,h===")"){a=d.pop()??a??"char",c+=h;const m=l&&(t(l)??y6(l));if(c){if(c=c.slice(1).trim(),!c.startsWith("token(")&&c.endsWith(")")&&(c=c.slice(0,-1)),c.includes("token(")){const b=x6(c,t);b&&(c=b.slice(0,-1))}else if(c){const b=t(c);b&&(c=b)}}const v=i.at(-1);c?v?.trim()?i+=m.slice(0,-1)+(", "+c+")"):i+=c:i+=m||")",l="",c="",a="char";continue}a==="token"&&(l+=h),a==="fallback"&&(c+=h);continue}const p=e.indexOf("token(",r);if(p!==-1){const m=p+6;i+=e.slice(r,p),r=m,a="token",d.push(a);continue}i+=h,r++}return i},XI=e=>{let t=0;const i=["("];for(;t<e.length;){const r=e[t];if(r==="(")i.push(r);else if(r===")"&&(i.pop(),i.length===0))return t;t++}return t};function S6(e){const t={};return e.forEach((i,r)=>{i instanceof Map?t[r]=Object.fromEntries(i):t[r]=i}),t}const _6=/({([^}]*)})/g,ZI=/[{}]/g,KI=/\w+\.\w+/,w6=e=>{if(!ji(e))return[];const t=e.match(_6);return t?t.map(i=>i.replace(ZI,"").trim()):[]},QI=e=>_6.test(e);function C6(e){if(!e.extensions?.references)return e.extensions?.cssVar?.ref??e.value;const t=e.extensions.references??{};let i=e.value;const r=Object.keys(t);for(let a=0;a<r.length;a++){const l=r[a],c=t[l];if(c.extensions.conditions)continue;const d=C6(c);i=i.replace(`{${l}}`,d)}return e.value=i,delete e.extensions.references,e.value}function E6(e,t){if(t==null||!Array.isArray(t))return t;switch(e){case"easings":return`cubic-bezier(${t.join(", ")})`;case"animations":case"fonts":case"gradients":case"shadows":return t.join(", ");default:return t}}function JI(e,t){const i={};for(const r in t)i[r]=E6(e,t[r]);return i}const eP=/calc/g;function T6(e){return Fn(e)&&e.reference?e.reference:String(e)}const Eh=(e,...t)=>t.map(T6).join(` ${e} `).replace(eP,""),h5=(...e)=>`calc(${Eh("+",...e)})`,g5=(...e)=>`calc(${Eh("-",...e)})`,F0=(...e)=>`calc(${Eh("*",...e)})`,p5=(...e)=>`calc(${Eh("/",...e)})`,m5=e=>{const t=T6(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:F0(t,-1)},Ms=Object.assign(e=>({add:(...t)=>Ms(h5(e,...t)),subtract:(...t)=>Ms(g5(e,...t)),multiply:(...t)=>Ms(F0(e,...t)),divide:(...t)=>Ms(p5(e,...t)),negate:()=>Ms(m5(e)),toString:()=>e.toString()}),{add:h5,subtract:g5,multiply:F0,divide:p5,negate:m5}),tP={enforce:"pre",transform(e){const{prefix:t,allTokens:i,formatCssVar:r,formatTokenName:a,registerToken:l}=e;i.filter(({extensions:d})=>d.category==="spacing").forEach(d=>{const h=d.path.slice(),p=r(h,t);if(ji(d.value)&&d.value==="0rem")return;const m=[...d.path],v=m[m.length-1];v!=null&&(m[m.length-1]=`-${v}`);const b={...d,value:Ms.negate(p.ref),name:a(m),path:m,extensions:{...d.extensions,negative:!0,prop:`-${d.extensions.prop}`,originalPath:h}};l(b)})}},nP=new Set(["spacing","sizes","borderWidths","fontSizes","radii"]),iP={enforce:"post",transform(e){e.allTokens.filter(i=>nP.has(i.extensions.category)&&!i.extensions.negative).forEach(i=>{Object.assign(i.extensions,{pixelValue:f6(i.value)})})}},rP={enforce:"post",transform(e){const{allTokens:t,registerToken:i,formatTokenName:r}=e,a=t.filter(({extensions:d})=>d.category==="colors"),l=new Map,c=new Map;a.forEach(d=>{const{colorPalette:h}=d.extensions;h&&(h.keys.forEach(p=>{l.set(r(p),p)}),h.roots.forEach(p=>{const m=r(p),v=c.get(m)||[];if(v.push(d),c.set(m,v),d.extensions.default&&p.length===1){const b=h.keys[0]?.filter(Boolean);if(!b.length)return;const y=p.concat(b);l.set(r(y),[])}}))}),l.forEach(d=>{const h=["colors","colorPalette",...d].filter(Boolean),p=r(h),m=r(h.slice(1));i({name:p,value:p,originalValue:p,path:h,extensions:{condition:"base",originalPath:h,category:"colors",prop:m,virtual:!0}},"pre")})}},oP={enforce:"post",transform(e){const t=[],i=[];e.allTokens.forEach(r=>{r.value===""?t.push(r):i.push(r)}),e.allTokens.splice(0,e.allTokens.length,...i),t.forEach(r=>{if(e.tokenMap.get(r.name)!==r)return;const a=e.allTokens.find(l=>l.name===r.name);if(!a){e.tokenMap.delete(r.name);return}r.extensions.conditions&&!a.extensions.conditions&&(a.extensions.conditions=r.extensions.conditions),e.tokenMap.set(r.name,a)})}},aP=[tP,rP,iP,oP],sP={type:"extensions",enforce:"pre",name:"tokens/css-var",transform(e,t){const{prefix:i,formatCssVar:r}=t,{negative:a,originalPath:l}=e.extensions,c=a?l:e.path;return{cssVar:r(c.filter(Boolean),i)}}},lP={enforce:"post",type:"value",name:"tokens/conditionals",transform(e,t){const{prefix:i,formatCssVar:r,getByName:a}=t,l=w6(e.value);return l.length&&l.forEach(c=>{if(!a(c))return;const d=r(c.split("."),i);e.value=e.value.replaceAll(`{${c}}`,d.ref)}),e.value}},cP={type:"extensions",enforce:"pre",name:"tokens/colors/colorPalette",match(e){return e.extensions.category==="colors"&&!e.extensions.virtual},transform(e,t){let i=e.path.slice();if(i.pop(),i.shift(),i.length===0){const d=[...e.path];d.shift(),i=d}if(i.length===0)return{};const r=i.reduce((d,h,p,m)=>{const v=m.slice(0,p+1);return d.push(v),d},[]),a=i[0],l=t.formatTokenName(i),c=e.path.slice(e.path.indexOf(a)+1).reduce((d,h,p,m)=>(d.push(m.slice(p)),d),[]);return c.length===0&&c.push([""]),{colorPalette:{value:l,roots:r,keys:c}}}},uP=[sP,lP,cP],v5=e=>Fn(e)&&Object.prototype.hasOwnProperty.call(e,"value");function dP(e){return e?{breakpoints:r6(e,t=>({value:t})),sizes:Li(e,(t,i)=>[`breakpoint-${t}`,{value:i}])}:{breakpoints:{},sizes:{}}}function fP(e){const{prefix:t="",tokens:i={},semanticTokens:r={},breakpoints:a={}}=e,l=ie=>ie.join("."),c=(ie,re)=>l6(ie.join("-"),{prefix:re}),d=[],h=new Map,p=new Map,m=new Map,v=new Map,b=new Map,y=new Map,x=new Map,_=new Map,w=[];function C(ie,re){d.push(ie),(ie.extensions.condition==="base"||!h.has(ie.name))&&h.set(ie.name,ie),re&&_.forEach(be=>{be.enforce===re&&ce(be,ie)})}const R=dP(a),z=su({...i,breakpoints:R.breakpoints,sizes:{...i.sizes,...R.sizes}});function D(){fr(z,(ie,re)=>{const be=re.includes("DEFAULT");re=b5(re);const le=re[0],xe=l(re),Xe=ji(ie)?{value:ie}:ie,yt=E6(le,Xe.value),Qe={value:yt,originalValue:yt,name:xe,path:re,extensions:{condition:"base",originalPath:re,category:le,prop:l(re.slice(1))}};be&&(Qe.extensions.default=!0),C(Qe)},{stop:v5}),fr(r,(ie,re)=>{const be=re.includes("DEFAULT");re=k6(b5(re));const le=re[0],xe=l(re),Xe=ji(ie.value)||Array.isArray(ie.value)?{value:{base:ie.value}}:ie,yt=JI(le,Xe.value),Qe={value:yt.base??"",originalValue:yt.base??"",name:xe,path:re,extensions:{originalPath:re,category:le,conditions:yt,condition:"base",prop:l(re.slice(1))}};be&&(Qe.extensions.default=!0),C(Qe)},{stop:v5})}function T(ie){return h.get(ie)}function k(ie){const{condition:re}=ie.extensions;re&&(p.has(re)||p.set(re,new Set),p.get(re).add(ie))}function A(ie){const{category:re,prop:be,condition:le,conditions:xe}=ie.extensions;if(!re)return;x.has(re)||x.set(re,new Map);const Xe=x.get(re),yt=Xe.get(be);if(le==null||le==="base"){Xe.set(be,ie);return}xe&&!yt&&Xe.set(be,ie)}function L(ie){const{condition:re,negative:be,virtual:le,cssVar:xe}=ie.extensions;be||le||!re||!xe||ie.value===""||(m.has(re)||m.set(re,new Map),m.get(re).set(xe.var,ie.value))}function W(ie){const{category:re,prop:be,cssVar:le,negative:xe}=ie.extensions;if(!re)return;y.has(re)||y.set(re,new Map);const Xe=xe?ie.extensions.conditions?ie.originalValue:ie.value:le.ref;y.get(re).set(be,Xe),b.set([re,be].join("."),Xe)}function V(ie){const{colorPalette:re,virtual:be,default:le}=ie.extensions;!re||be||re.roots.forEach(xe=>{const Xe=l(xe);v.has(Xe)||v.set(Xe,new Map);const yt=gP([...ie.path],[...xe]),Qe=l(yt),on=T(Qe);if(!on||!on.extensions.cssVar)return;const{var:_t}=on.extensions.cssVar;if(v.get(Xe).set(_t,ie.extensions.cssVar.ref),le&&xe.length===1){const Je=l(["colors","colorPalette"]),an=T(Je);if(!an)return;const yr=l(ie.path),Zn=T(yr);if(!Zn)return;const fi=re.keys[0]?.filter(Boolean);if(!fi.length)return;const yn=l(xe.concat(fi));v.has(yn)||v.set(yn,new Map),v.get(yn).set(an.extensions.cssVar.var,Zn.extensions.cssVar.ref)}})}let M={};function I(){d.forEach(ie=>{k(ie),A(ie),L(ie),W(ie),V(ie)}),M=S6(y)}const U=(ie,re)=>{if(!ie||typeof ie!="string")return{invalid:!0,value:ie};const[be,le]=ie.split("/");if(!be||!le)return{invalid:!0,value:be};const xe=re(be),Xe=T(`opacity.${le}`)?.value;if(!Xe&&isNaN(Number(le)))return{invalid:!0,value:be};const yt=Xe?Number(Xe)*100+"%":`${le}%`,Qe=xe??be;return{invalid:!1,color:Qe,value:`color-mix(in srgb, ${Qe} ${yt}, transparent)`}},X=rn((ie,re)=>b.get(ie)??re),K=rn(ie=>M[ie]||null),P=rn(ie=>x6(ie,re=>{if(!re)return;if(re.includes("/")){const le=U(re,xe=>X(xe));if(le.invalid)throw new Error("Invalid color mix at "+re+": "+le.value);return le.value}const be=X(re);return be||(KI.test(re)?y6(re):re)})),ee={prefix:t,allTokens:d,tokenMap:h,registerToken:C,getByName:T,formatTokenName:l,formatCssVar:c,flatMap:b,cssVarMap:m,categoryMap:x,colorPaletteMap:v,getVar:X,getCategoryValues:K,expandReferenceInValue:P};function te(...ie){ie.forEach(re=>{_.set(re.name,re)})}function de(...ie){w.push(...ie)}function ce(ie,re){if(re.extensions.references||_v(ie.match)&&!ie.match(re))return;const le=(xe=>ie.transform(xe,ee))(re);switch(!0){case ie.type==="extensions":Object.assign(re.extensions,le);break;case ie.type==="value":re.value=le;break;default:re[ie.type]=le;break}}function Ce(ie){w.forEach(re=>{re.enforce===ie&&re.transform(ee)})}function Ae(ie){_.forEach(re=>{re.enforce===ie&&d.forEach(be=>{ce(re,be)})})}function ge(){d.slice().forEach(ie=>{const re=hP(ie);!re||re.length===0||re.forEach(be=>{C(be)})})}function G(ie){const re=w6(ie),be=[];for(let le=0;le<re.length;le++){const xe=T(re[le]);xe&&be.push(xe)}return be}function ne(){d.forEach(ie=>{if(!QI(ie.value))return;const re=G(ie.value);ie.extensions.references=re.reduce((be,le)=>(be[le.name]=le,be),{})})}function ye(){d.forEach(ie=>{C6(ie)})}function _e(){Ce("pre"),Ae("pre"),ge(),ne(),ye(),Ce("post"),Ae("post"),I()}return D(),te(...uP),de(...aP),_e(),ee}function b5(e){return e[0]==="DEFAULT"?e:e.filter(t=>t!=="DEFAULT")}function k6(e){return e.filter(t=>t!=="base")}function hP(e){if(!e.extensions.conditions)return;const{conditions:t}=e.extensions,i=[];return fr(t,(r,a)=>{const l=k6(a);if(!l.length)return;const c={...e,value:r,extensions:{...e.extensions,condition:l.join(":")}};i.push(c)}),i}function gP(e,t){const i=e.findIndex((r,a)=>t.every((l,c)=>e[a+c]===l));return i===-1||(e.splice(i,t.length),e.splice(i,0,"colorPalette")),e}WI()(["aspectRatios","zIndex","opacity","colors","fonts","fontSizes","fontWeights","lineHeights","letterSpacings","sizes","shadows","spacing","radii","cursor","borders","borderWidths","borderStyles","durations","easings","animations","blurs","gradients","breakpoints","assets"]);function pP(e){return Li(e,(t,i)=>[t,i])}function mP(e){const t=pP(e.config),i=e.tokens,r=new Map,a=new Map;function l(L,W){t[L]=W,c(L,W)}const c=(L,W)=>{const V=_(W);V&&(a.set(L,V),v(L,W))},d=()=>{for(const[L,W]of Object.entries(t))W&&c(L,W)},h=()=>{for(const[L,W]of Object.entries(t)){const{shorthand:V}=W??{};if(!V)continue;(Array.isArray(V)?V:[V]).forEach(I=>r.set(I,L))}},p=()=>{const L=S6(i.colorPaletteMap);l("colorPalette",{values:Object.keys(L),transform:rn(W=>L[W])})},m=new Map,v=(L,W)=>{if(!W)return;const V=_(W,I=>`type:Tokens["${I}"]`);if(typeof V=="object"&&V.type){m.set(L,new Set([`type:${V.type}`]));return}if(V){const I=new Set(Object.keys(V));m.set(L,I)}const M=m.get(L)??new Set;W.property&&m.set(L,M.add(`CssProperties["${W.property}"]`))},b=()=>{for(const[L,W]of Object.entries(t))W&&v(L,W)},y=(L,W)=>{const V=m.get(L)??new Set;m.set(L,new Set([...V,...W]))},x=()=>{const L=new Map;for(const[W,V]of m.entries()){if(V.size===0){L.set(W,["string"]);continue}const M=Array.from(V).map(I=>I.startsWith("CssProperties")?I:I.startsWith("type:")?I.replace("type:",""):JSON.stringify(I));L.set(W,M)}return L},_=(L,W)=>{const{values:V}=L,M=I=>{const U=W?.(I);return U?{[U]:U}:void 0};if(ji(V))return M?.(V)??i.getCategoryValues(V)??ct;if(Array.isArray(V)){const I={};for(let U=0;U<V.length;U++)I[V[U]]=V[U];return I}return _v(V)?V(W?M:i.getCategoryValues):V},w=rn((L,W)=>({[L]:L.startsWith("--")?i.getVar(W,W):W})),C=Object.assign(i.getVar,{raw:L=>i.getByName(L)}),R=rn((L,W)=>{const V=T(L);ji(W)&&!W.includes("_EMO_")&&(W=i.expandReferenceInValue(W));const M=t[V];if(!M)return w(V,W);const I=a.get(V)?.[W];if(!M.transform)return w(L,I??W);const U=X=>VN(X,C);return M.transform(I??W,{raw:W,token:C,utils:{colorMix:U}})});function z(){h(),p(),d(),b()}z();const D=r.size>0,T=rn(L=>r.get(L)??L);return{keys:()=>[...Array.from(r.keys()),...Object.keys(t)],hasShorthand:D,transform:R,shorthands:r,resolveShorthand:T,register:l,getTypes:x,addPropertyType:y}}function vP(...e){const t=o6(...e),{theme:i={},utilities:r={},globalCss:a={},cssVarsRoot:l=":where(:root, :host)",cssVarsPrefix:c="chakra",preflight:d}=t,h=LI(t),p=fP({breakpoints:i.breakpoints,tokens:i.tokens,semanticTokens:i.semanticTokens,prefix:c}),m=mI(i.breakpoints??ct),v=xI({conditions:t.conditions??ct,breakpoints:m}),b=mP({config:r,tokens:p});function y(){const{textStyles:ge,layerStyles:G,animationStyles:ne}=i,ye=su({textStyle:ge,layerStyle:G,animationStyle:ne});for(const[_e,ie]of Object.entries(ye)){const re=c6(ie??ct,z6);b.register(_e,{values:Object.keys(re),transform(be){return z(re[be])}})}}y(),b.addPropertyType("animationName",Object.keys(i.keyframes??ct));const x=new Set(["css",...b.keys(),...v.keys()]),_=rn(ge=>x.has(ge)||dI(ge)),w=ge=>{if(Array.isArray(ge)){const G=Ch();for(let ne=0;ne<ge.length;ne++){const ye=ge[ne];if(ye!=null){const _e=v.breakpoints[ne];G[_e]=ye}}return G}return ge},C=jI({utility:b,normalize:w}),R=GI({conditions:v,isValidProperty:_}),z=b6({transform:b.transform,conditions:v,normalize:C}),D=PI({css:z,conditions:v,normalize:C,layers:h}),T=UI({cva:D});function k(){const ge={};for(const[G,ne]of p.cssVarMap.entries()){const ye=Object.fromEntries(ne);if(Object.keys(ye).length===0)continue;const _e=G==="base"?l:v.resolve(G),ie=_e.startsWith("@"),re=z(R({[_e]:ie?{[l]:ye}:ye}));Mo(ge,re)}return h.wrap("tokens",ge)}function A(){const ge=Li(i.keyframes??ct,(ne,ye)=>[`@keyframes ${ne}`,ye]),G=Object.assign({},ge,z(R(a)));return h.wrap("base",G)}function L(ge){return Us(ge,_)}function W(){const ge=BI({preflight:d});return h.wrap("reset",ge)}const V=bP(p),M=(ge,G)=>V.get(ge)?.value||G;M.var=(ge,G)=>V.get(ge)?.variable||G;function I(ge,G){return i.recipes?.[ge]??G}function U(ge,G){return i.slotRecipes?.[ge]??G}const X=new Map,K=new Map;function P(ge,G){let ne=X.get(ge);return ne||(ne=D(I(ge,G??ct)),X.set(ge,ne)),ne}function ee(ge,G){let ne=K.get(ge);return ne||(ne=T(U(ge,G??ct)),K.set(ge,ne)),ne}function te(ge){return Object.hasOwnProperty.call(i.recipes??ct,ge)}function de(ge){return Object.hasOwnProperty.call(i.slotRecipes??ct,ge)}function ce(ge){return te(ge)||de(ge)}const Ce=[W(),A(),k()],Ae={layerStyles:Pm(i.layerStyles??ct),textStyles:Pm(i.textStyles??ct),animationStyles:Pm(i.animationStyles??ct),tokens:y5(p,Object.keys(i.tokens??ct),(ge,G)=>!ge.extensions.conditions&&!G.includes("colorPalette")),semanticTokens:y5(p,Object.keys(i.semanticTokens??ct),ge=>!!ge.extensions.conditions),keyframes:x5(i.keyframes??ct),breakpoints:x5(i.breakpoints??ct)};return{$$chakra:!0,_config:t,_global:Ce,breakpoints:m,tokens:p,conditions:v,utility:b,token:M,properties:x,layers:h,isValidProperty:_,splitCssProps:L,normalizeValue:w,getTokenCss:k,getGlobalCss:A,getPreflightCss:W,css:z,cva:D,sva:T,getRecipe:I,getSlotRecipe:U,getRecipeFn:P,getSlotRecipeFn:ee,hasRecipe:ce,isRecipe:te,isSlotRecipe:de,query:Ae}}function bP(e){const t=new Map,i=new Set(e.allTokens.map(r=>r.name));for(const r of i){const a=e.getByName(r);if(!a?.extensions.cssVar)continue;const{cssVar:l,virtual:c,conditions:d}=a.extensions,p=!!d||c?l.ref:a.value;t.set(r,{value:p,variable:l.ref})}return t}const z6=e=>Fn(e)&&"value"in e,Pm=e=>({list(){return Object.keys(c6(e,z6))},search(t){return this.list().filter(i=>i.includes(t))}}),y5=(e,t,i)=>({categoryKeys:t,list(r){const a=e.categoryMap.get(r),l=a?[...a.entries()]:[],c=[];for(let d=0;d<l.length;d++){const[h,p]=l[d];i(p,h)&&c.push(h)}return c},search(r,a){return this.list(r).filter(l=>l.includes(a))}}),x5=e=>({list(){return Object.keys(e)},search(t){return this.list().filter(i=>i.includes(t))}}),yP={sm:"480px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},Mm="var(--chakra-empty, )",xP=UN({"*":{fontFeatureSettings:'"cv11"',"--ring-inset":Mm,"--ring-offset-width":"0px","--ring-offset-color":"#fff","--ring-color":"rgba(66, 153, 225, 0.6)","--ring-offset-shadow":"0 0 #0000","--ring-shadow":"0 0 #0000",...Object.fromEntries(["brightness","contrast","grayscale","hue-rotate","invert","saturate","sepia","drop-shadow"].map(e=>[`--${e}`,Mm])),...Object.fromEntries(["blur","brightness","contrast","grayscale","hue-rotate","invert","opacity","saturate","sepia"].map(e=>[`--backdrop-${e}`,Mm])),"--global-font-mono":"fonts.mono","--global-font-body":"fonts.body","--global-color-border":"colors.border"},html:{color:"fg",bg:"bg",lineHeight:"1.5",colorPalette:"gray"},"*::placeholder, *[data-placeholder]":{color:"fg.muted/80"},"*::selection":{bg:"colorPalette.emphasized/80"}}),SP=qN({"fill.muted":{value:{background:"colorPalette.muted",color:"colorPalette.fg"}},"fill.subtle":{value:{background:"colorPalette.subtle",color:"colorPalette.fg"}},"fill.surface":{value:{background:"colorPalette.subtle",color:"colorPalette.fg",boxShadow:"0 0 0px 1px var(--shadow-color)",boxShadowColor:"colorPalette.muted"}},"fill.solid":{value:{background:"colorPalette.solid",color:"colorPalette.contrast"}},"outline.subtle":{value:{color:"colorPalette.fg",boxShadow:"inset 0 0 0px 1px var(--shadow-color)",boxShadowColor:"colorPalette.subtle"}},"outline.solid":{value:{borderWidth:"1px",borderColor:"colorPalette.solid",color:"colorPalette.fg"}},"indicator.bottom":{value:{position:"relative","--indicator-color-fallback":"colors.colorPalette.solid",_before:{content:'""',position:"absolute",bottom:"var(--indicator-offset-y, 0)",insetInline:"var(--indicator-offset-x, 0)",height:"var(--indicator-thickness, 2px)",background:"var(--indicator-color, var(--indicator-color-fallback))"}}},"indicator.top":{value:{position:"relative","--indicator-color-fallback":"colors.colorPalette.solid",_before:{content:'""',position:"absolute",top:"var(--indicator-offset-y, 0)",insetInline:"var(--indicator-offset-x, 0)",height:"var(--indicator-thickness, 2px)",background:"var(--indicator-color, var(--indicator-color-fallback))"}}},"indicator.start":{value:{position:"relative","--indicator-color-fallback":"colors.colorPalette.solid",_before:{content:'""',position:"absolute",insetInlineStart:"var(--indicator-offset-x, 0)",insetBlock:"var(--indicator-offset-y, 0)",width:"var(--indicator-thickness, 2px)",background:"var(--indicator-color, var(--indicator-color-fallback))"}}},"indicator.end":{value:{position:"relative","--indicator-color-fallback":"colors.colorPalette.solid",_before:{content:'""',position:"absolute",insetInlineEnd:"var(--indicator-offset-x, 0)",insetBlock:"var(--indicator-offset-y, 0)",width:"var(--indicator-thickness, 2px)",background:"var(--indicator-color, var(--indicator-color-fallback))"}}},disabled:{value:{opacity:"0.5",cursor:"not-allowed"}},none:{value:{}}}),_P=YN({"slide-fade-in":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-from-bottom, fade-in"},"&[data-placement^=bottom]":{animationName:"slide-from-top, fade-in"},"&[data-placement^=left]":{animationName:"slide-from-right, fade-in"},"&[data-placement^=right]":{animationName:"slide-from-left, fade-in"}}},"slide-fade-out":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-to-bottom, fade-out"},"&[data-placement^=bottom]":{animationName:"slide-to-top, fade-out"},"&[data-placement^=left]":{animationName:"slide-to-right, fade-out"},"&[data-placement^=right]":{animationName:"slide-to-left, fade-out"}}},"scale-fade-in":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-in, fade-in"}},"scale-fade-out":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-out, fade-out"}}}),Qv=Xt({className:"chakra-badge",base:{display:"inline-flex",alignItems:"center",borderRadius:"l2",gap:"1",fontWeight:"medium",fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap",userSelect:"none"},variants:{variant:{solid:{bg:"colorPalette.solid",color:"colorPalette.contrast"},subtle:{bg:"colorPalette.subtle",color:"colorPalette.fg"},outline:{color:"colorPalette.fg","--outline-shadow-legacy":"colors.colorPalette.muted","--outline-shadow":"colors.colorPalette.border",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"var(--outline-shadow, var(--outline-shadow-legacy))"},surface:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},plain:{color:"colorPalette.fg"}},size:{xs:{textStyle:"2xs",px:"1",minH:"4"},sm:{textStyle:"xs",px:"1.5",minH:"5"},md:{textStyle:"sm",px:"2",minH:"6"},lg:{textStyle:"sm",px:"2.5",minH:"7"}}},defaultVariants:{variant:"subtle",size:"sm"}}),wP=Xt({className:"chakra-button",base:{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",borderRadius:"l2",whiteSpace:"nowrap",verticalAlign:"middle",borderWidth:"1px",borderColor:"transparent",cursor:"button",flexShrink:"0",outline:"0",lineHeight:"1.2",isolation:"isolate",fontWeight:"medium",transitionProperty:"common",transitionDuration:"moderate",focusVisibleRing:"outside",_disabled:{layerStyle:"disabled"},_icon:{flexShrink:"0"}},variants:{size:{"2xs":{h:"6",minW:"6",textStyle:"xs",px:"2",gap:"1",_icon:{width:"3.5",height:"3.5"}},xs:{h:"8",minW:"8",textStyle:"xs",px:"2.5",gap:"1",_icon:{width:"4",height:"4"}},sm:{h:"9",minW:"9",px:"3.5",textStyle:"sm",gap:"2",_icon:{width:"4",height:"4"}},md:{h:"10",minW:"10",textStyle:"sm",px:"4",gap:"2",_icon:{width:"5",height:"5"}},lg:{h:"11",minW:"11",textStyle:"md",px:"5",gap:"3",_icon:{width:"5",height:"5"}},xl:{h:"12",minW:"12",textStyle:"md",px:"5",gap:"2.5",_icon:{width:"5",height:"5"}},"2xl":{h:"16",minW:"16",textStyle:"lg",px:"7",gap:"3",_icon:{width:"6",height:"6"}}},variant:{solid:{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"transparent",_hover:{bg:"colorPalette.solid/90"},_expanded:{bg:"colorPalette.solid/90"}},subtle:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderColor:"transparent",_hover:{bg:"colorPalette.muted"},_expanded:{bg:"colorPalette.muted"}},surface:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted",_hover:{bg:"colorPalette.muted"},_expanded:{bg:"colorPalette.muted"}},outline:{borderWidth:"1px","--outline-color-legacy":"colors.colorPalette.muted","--outline-color":"colors.colorPalette.border",borderColor:"var(--outline-color, var(--outline-color-legacy))",color:"colorPalette.fg",_hover:{bg:"colorPalette.subtle"},_expanded:{bg:"colorPalette.subtle"}},ghost:{bg:"transparent",color:"colorPalette.fg",_hover:{bg:"colorPalette.subtle"},_expanded:{bg:"colorPalette.subtle"}},plain:{color:"colorPalette.fg"}}},defaultVariants:{size:"md",variant:"solid"}}),mn=Xt({className:"chakra-checkmark",base:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:"0",color:"white",borderWidth:"1px",borderColor:"transparent",borderRadius:"l1",cursor:"checkbox",focusVisibleRing:"outside",_icon:{boxSize:"full"},_invalid:{colorPalette:"red",borderColor:"border.error"},_disabled:{opacity:"0.5",cursor:"disabled"}},variants:{size:{xs:{boxSize:"3"},sm:{boxSize:"4"},md:{boxSize:"5",p:"0.5"},lg:{boxSize:"6",p:"0.5"}},variant:{solid:{borderColor:"border.emphasized","&:is([data-state=checked], [data-state=indeterminate])":{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"colorPalette.solid"}},outline:{borderColor:"border","&:is([data-state=checked], [data-state=indeterminate])":{color:"colorPalette.fg",borderColor:"colorPalette.solid"}},subtle:{bg:"colorPalette.muted",borderColor:"colorPalette.muted","&:is([data-state=checked], [data-state=indeterminate])":{color:"colorPalette.fg"}},plain:{"&:is([data-state=checked], [data-state=indeterminate])":{color:"colorPalette.fg"}},inverted:{borderColor:"border",color:"colorPalette.fg","&:is([data-state=checked], [data-state=indeterminate])":{borderColor:"colorPalette.solid"}}},filled:{true:{bg:"bg"}}},defaultVariants:{variant:"solid",size:"md"}}),{variants:CP,defaultVariants:EP}=Qv,TP=Xt({className:"chakra-code",base:{fontFamily:"mono",alignItems:"center",display:"inline-flex",borderRadius:"l2"},variants:CP,defaultVariants:EP}),R6=Xt({className:"color-swatch",base:{boxSize:"var(--swatch-size)",shadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.1)","--checker-size":"8px","--checker-bg":"colors.bg","--checker-fg":"colors.bg.emphasized",background:"linear-gradient(var(--color), var(--color)), repeating-conic-gradient(var(--checker-fg) 0%, var(--checker-fg) 25%, var(--checker-bg) 0%, var(--checker-bg) 50%) 0% 50% / var(--checker-size) var(--checker-size) !important",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:"0"},variants:{size:{"2xs":{"--swatch-size":"sizes.3.5"},xs:{"--swatch-size":"sizes.4"},sm:{"--swatch-size":"sizes.4.5"},md:{"--swatch-size":"sizes.5"},lg:{"--swatch-size":"sizes.6"},xl:{"--swatch-size":"sizes.7"},"2xl":{"--swatch-size":"sizes.8"},inherit:{"--swatch-size":"inherit"},full:{"--swatch-size":"100%"}},shape:{square:{borderRadius:"none"},circle:{borderRadius:"full"},rounded:{borderRadius:"l1"}}},defaultVariants:{size:"md",shape:"rounded"}}),kP=Xt({className:"chakra-container",base:{position:"relative",maxWidth:"8xl",w:"100%",mx:"auto",px:{base:"4",md:"6",lg:"8"}},variants:{centerContent:{true:{display:"flex",flexDirection:"column",alignItems:"center"}},fluid:{true:{maxWidth:"full"}}}}),zP=Xt({className:"chakra-heading",base:{fontFamily:"heading",fontWeight:"semibold"},variants:{size:{xs:{textStyle:"xs"},sm:{textStyle:"sm"},md:{textStyle:"md"},lg:{textStyle:"lg"},xl:{textStyle:"xl"},"2xl":{textStyle:"2xl"},"3xl":{textStyle:"3xl"},"4xl":{textStyle:"4xl"},"5xl":{textStyle:"5xl"},"6xl":{textStyle:"6xl"},"7xl":{textStyle:"7xl"}}},defaultVariants:{size:"xl"}}),RP=Xt({className:"chakra-icon",base:{display:"inline-block",lineHeight:"1em",flexShrink:"0",color:"currentcolor",verticalAlign:"middle"},variants:{size:{inherit:{},xs:{boxSize:"3"},sm:{boxSize:"4"},md:{boxSize:"5"},lg:{boxSize:"6"},xl:{boxSize:"7"},"2xl":{boxSize:"8"}}},defaultVariants:{size:"inherit"}}),Vt=Xt({className:"chakra-input",base:{width:"100%",minWidth:"0",outline:"0",position:"relative",appearance:"none",textAlign:"start",borderRadius:"l2",_disabled:{layerStyle:"disabled"},height:"var(--input-height)",minW:"var(--input-height)","--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"}},variants:{size:{"2xs":{textStyle:"xs",px:"2","--input-height":"sizes.7"},xs:{textStyle:"xs",px:"2","--input-height":"sizes.8"},sm:{textStyle:"sm",px:"2.5","--input-height":"sizes.9"},md:{textStyle:"sm",px:"3","--input-height":"sizes.10"},lg:{textStyle:"md",px:"4","--input-height":"sizes.11"},xl:{textStyle:"md",px:"4.5","--input-height":"sizes.12"},"2xl":{textStyle:"lg",px:"5","--input-height":"sizes.16"}},variant:{outline:{bg:"transparent",borderWidth:"1px",borderColor:"border",focusVisibleRing:"inside",focusRingColor:"var(--focus-color)"},subtle:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted",focusVisibleRing:"inside",focusRingColor:"var(--focus-color)"},flushed:{bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",borderRadius:"0",px:"0",_focusVisible:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)",_invalid:{borderColor:"var(--error-color)",boxShadow:"0px 1px 0px 0px var(--error-color)"}}}}},defaultVariants:{size:"md",variant:"outline"}}),AP=Xt({className:"chakra-input-addon",base:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap",alignSelf:"stretch",borderRadius:"l2"},variants:{size:Vt.variants.size,variant:{outline:{borderWidth:"1px",borderColor:"border",bg:"bg.muted"},subtle:{borderWidth:"1px",borderColor:"transparent",bg:"bg.emphasized"},flushed:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}},defaultVariants:{size:"md",variant:"outline"}}),OP=Xt({className:"chakra-kbd",base:{display:"inline-flex",alignItems:"center",fontWeight:"medium",fontFamily:"mono",flexShrink:"0",whiteSpace:"nowrap",wordSpacing:"-0.5em",userSelect:"none",px:"1",borderRadius:"l2"},variants:{variant:{raised:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderWidth:"1px",borderBottomWidth:"2px",borderColor:"colorPalette.muted"},outline:{borderWidth:"1px",color:"colorPalette.fg"},subtle:{bg:"colorPalette.muted",color:"colorPalette.fg"},plain:{color:"colorPalette.fg"}},size:{sm:{textStyle:"xs",height:"4.5"},md:{textStyle:"sm",height:"5"},lg:{textStyle:"md",height:"6"}}},defaultVariants:{size:"md",variant:"raised"}}),NP=Xt({className:"chakra-link",base:{display:"inline-flex",alignItems:"center",outline:"none",gap:"1.5",cursor:"pointer",borderRadius:"l1",focusVisibleRing:"outside"},variants:{variant:{underline:{color:"colorPalette.fg",textDecoration:"underline",textUnderlineOffset:"3px",textDecorationColor:"currentColor/20"},plain:{color:"colorPalette.fg",_hover:{textDecoration:"underline",textUnderlineOffset:"3px",textDecorationColor:"currentColor/20"}}}},defaultVariants:{variant:"plain"}}),IP=Xt({className:"chakra-mark",base:{bg:"transparent",color:"inherit",whiteSpace:"nowrap"},variants:{variant:{subtle:{bg:"colorPalette.subtle",color:"inherit"},solid:{bg:"colorPalette.solid",color:"colorPalette.contrast"},text:{fontWeight:"medium"},plain:{}}}}),vn=Xt({className:"chakra-radiomark",base:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,verticalAlign:"top",color:"white",borderWidth:"1px",borderColor:"transparent",borderRadius:"full",cursor:"radio",_focusVisible:{outline:"2px solid",outlineColor:"colorPalette.focusRing",outlineOffset:"2px"},_invalid:{colorPalette:"red",borderColor:"red.500"},_disabled:{opacity:"0.5",cursor:"disabled"},"& .dot":{height:"100%",width:"100%",borderRadius:"full",bg:"currentColor",scale:"0.4"}},variants:{variant:{solid:{borderWidth:"1px",borderColor:"border.emphasized",_checked:{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"colorPalette.solid"}},subtle:{borderWidth:"1px",bg:"colorPalette.muted",borderColor:"colorPalette.muted",color:"transparent",_checked:{color:"colorPalette.fg"}},outline:{borderWidth:"1px",borderColor:"inherit",_checked:{color:"colorPalette.fg",borderColor:"colorPalette.solid"},"& .dot":{scale:"0.6"}},inverted:{bg:"bg",borderWidth:"1px",borderColor:"inherit",_checked:{color:"colorPalette.solid",borderColor:"currentcolor"}}},size:{xs:{boxSize:"3"},sm:{boxSize:"4"},md:{boxSize:"5"},lg:{boxSize:"6"}},filled:{true:{bg:"bg"}}},defaultVariants:{variant:"solid",size:"md"}}),PP=Xt({className:"chakra-separator",base:{display:"block",borderColor:"border"},variants:{variant:{solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"},dotted:{borderStyle:"dotted"}},orientation:{vertical:{borderInlineStartWidth:"var(--separator-thickness)"},horizontal:{borderTopWidth:"var(--separator-thickness)"}},size:{xs:{"--separator-thickness":"0.5px"},sm:{"--separator-thickness":"1px"},md:{"--separator-thickness":"2px"},lg:{"--separator-thickness":"3px"}}},defaultVariants:{size:"sm",variant:"solid",orientation:"horizontal"}}),MP=Xt({className:"chakra-skeleton",base:{},variants:{loading:{true:{borderRadius:"l2",boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none",flexShrink:"0","&::before, &::after, *":{visibility:"hidden"}},false:{background:"unset",animation:"fade-in var(--fade-duration, 0.1s) ease-out !important"}},variant:{pulse:{background:"bg.emphasized",animation:"pulse",animationDuration:"var(--duration, 1.2s)"},shine:{"--animate-from":"200%","--animate-to":"-200%","--start-color":"colors.bg.muted","--end-color":"colors.bg.emphasized",backgroundImage:"linear-gradient(270deg,var(--start-color),var(--end-color),var(--end-color),var(--start-color))",backgroundSize:"400% 100%",animation:"bg-position var(--duration, 5s) ease-in-out infinite"},none:{animation:"none"}}},defaultVariants:{variant:"pulse",loading:!0}}),DP=Xt({className:"chakra-skip-nav",base:{display:"inline-flex",bg:"bg.panel",padding:"2.5",borderRadius:"l2",fontWeight:"semibold",focusVisibleRing:"outside",textStyle:"sm",userSelect:"none",border:"0",height:"1px",width:"1px",margin:"-1px",outline:"0",overflow:"hidden",position:"absolute",clip:"rect(0 0 0 0)",_focusVisible:{clip:"auto",width:"auto",height:"auto",position:"fixed",top:"6",insetStart:"6"}}}),LP=Xt({className:"chakra-spinner",base:{display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderWidth:"2px",borderRadius:"full",width:"var(--spinner-size)",height:"var(--spinner-size)",animation:"spin",animationDuration:"slowest","--spinner-track-color":"transparent",borderBottomColor:"var(--spinner-track-color)",borderInlineStartColor:"var(--spinner-track-color)"},variants:{size:{inherit:{"--spinner-size":"1em"},xs:{"--spinner-size":"sizes.3"},sm:{"--spinner-size":"sizes.4"},md:{"--spinner-size":"sizes.5"},lg:{"--spinner-size":"sizes.8"},xl:{"--spinner-size":"sizes.10"}}},defaultVariants:{size:"md"}}),jP=Xt({className:"chakra-textarea",base:{width:"100%",minWidth:"0",outline:"0",position:"relative",appearance:"none",textAlign:"start",borderRadius:"l2",_disabled:{layerStyle:"disabled"},"--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"}},variants:{size:{xs:{textStyle:"xs",px:"2",py:"1.5",scrollPaddingBottom:"1.5"},sm:{textStyle:"sm",px:"2.5",py:"2",scrollPaddingBottom:"2"},md:{textStyle:"sm",px:"3",py:"2",scrollPaddingBottom:"2"},lg:{textStyle:"md",px:"4",py:"3",scrollPaddingBottom:"3"},xl:{textStyle:"md",px:"4.5",py:"3.5",scrollPaddingBottom:"3.5"}},variant:{outline:{bg:"transparent",borderWidth:"1px",borderColor:"border",focusVisibleRing:"inside"},subtle:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted",focusVisibleRing:"inside"},flushed:{bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",borderRadius:"0",px:"0",_focusVisible:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)"}}}},defaultVariants:{size:"md",variant:"outline"}}),BP={badge:Qv,button:wP,code:TP,container:kP,heading:zP,input:Vt,inputAddon:AP,kbd:OP,link:NP,mark:IP,separator:PP,skeleton:MP,skipNavLink:DP,spinner:LP,textarea:jP,icon:RP,checkmark:mn,radiomark:vn,colorSwatch:R6},GP=Zv.colors({bg:{DEFAULT:{value:{_light:"{colors.white}",_dark:"{colors.black}"}},subtle:{value:{_light:"{colors.gray.50}",_dark:"{colors.gray.950}"}},muted:{value:{_light:"{colors.gray.100}",_dark:"{colors.gray.900}"}},emphasized:{value:{_light:"{colors.gray.200}",_dark:"{colors.gray.800}"}},inverted:{value:{_light:"{colors.black}",_dark:"{colors.white}"}},panel:{value:{_light:"{colors.white}",_dark:"{colors.gray.950}"}},error:{value:{_light:"{colors.red.50}",_dark:"{colors.red.950}"}},warning:{value:{_light:"{colors.orange.50}",_dark:"{colors.orange.950}"}},success:{value:{_light:"{colors.green.50}",_dark:"{colors.green.950}"}},info:{value:{_light:"{colors.blue.50}",_dark:"{colors.blue.950}"}}},fg:{DEFAULT:{value:{_light:"{colors.black}",_dark:"{colors.gray.50}"}},muted:{value:{_light:"{colors.gray.600}",_dark:"{colors.gray.400}"}},subtle:{value:{_light:"{colors.gray.400}",_dark:"{colors.gray.500}"}},inverted:{value:{_light:"{colors.gray.50}",_dark:"{colors.black}"}},error:{value:{_light:"{colors.red.500}",_dark:"{colors.red.400}"}},warning:{value:{_light:"{colors.orange.600}",_dark:"{colors.orange.300}"}},success:{value:{_light:"{colors.green.600}",_dark:"{colors.green.300}"}},info:{value:{_light:"{colors.blue.600}",_dark:"{colors.blue.300}"}}},border:{DEFAULT:{value:{_light:"{colors.gray.200}",_dark:"{colors.gray.800}"}},muted:{value:{_light:"{colors.gray.100}",_dark:"{colors.gray.900}"}},subtle:{value:{_light:"{colors.gray.50}",_dark:"{colors.gray.950}"}},emphasized:{value:{_light:"{colors.gray.300}",_dark:"{colors.gray.700}"}},inverted:{value:{_light:"{colors.gray.800}",_dark:"{colors.gray.200}"}},error:{value:{_light:"{colors.red.500}",_dark:"{colors.red.400}"}},warning:{value:{_light:"{colors.orange.500}",_dark:"{colors.orange.400}"}},success:{value:{_light:"{colors.green.500}",_dark:"{colors.green.400}"}},info:{value:{_light:"{colors.blue.500}",_dark:"{colors.blue.400}"}}},gray:{contrast:{value:{_light:"{colors.white}",_dark:"{colors.black}"}},fg:{value:{_light:"{colors.gray.800}",_dark:"{colors.gray.200}"}},subtle:{value:{_light:"{colors.gray.100}",_dark:"{colors.gray.900}"}},muted:{value:{_light:"{colors.gray.200}",_dark:"{colors.gray.800}"}},emphasized:{value:{_light:"{colors.gray.300}",_dark:"{colors.gray.700}"}},solid:{value:{_light:"{colors.gray.900}",_dark:"{colors.white}"}},focusRing:{value:{_light:"{colors.gray.400}",_dark:"{colors.gray.400}"}},border:{value:{_light:"{colors.gray.200}",_dark:"{colors.gray.800}"}}},red:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.red.700}",_dark:"{colors.red.300}"}},subtle:{value:{_light:"{colors.red.100}",_dark:"{colors.red.900}"}},muted:{value:{_light:"{colors.red.200}",_dark:"{colors.red.800}"}},emphasized:{value:{_light:"{colors.red.300}",_dark:"{colors.red.700}"}},solid:{value:{_light:"{colors.red.600}",_dark:"{colors.red.600}"}},focusRing:{value:{_light:"{colors.red.500}",_dark:"{colors.red.500}"}},border:{value:{_light:"{colors.red.500}",_dark:"{colors.red.400}"}}},orange:{contrast:{value:{_light:"white",_dark:"black"}},fg:{value:{_light:"{colors.orange.700}",_dark:"{colors.orange.300}"}},subtle:{value:{_light:"{colors.orange.100}",_dark:"{colors.orange.900}"}},muted:{value:{_light:"{colors.orange.200}",_dark:"{colors.orange.800}"}},emphasized:{value:{_light:"{colors.orange.300}",_dark:"{colors.orange.700}"}},solid:{value:{_light:"{colors.orange.600}",_dark:"{colors.orange.500}"}},focusRing:{value:{_light:"{colors.orange.500}",_dark:"{colors.orange.500}"}},border:{value:{_light:"{colors.orange.500}",_dark:"{colors.orange.400}"}}},green:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.green.700}",_dark:"{colors.green.300}"}},subtle:{value:{_light:"{colors.green.100}",_dark:"{colors.green.900}"}},muted:{value:{_light:"{colors.green.200}",_dark:"{colors.green.800}"}},emphasized:{value:{_light:"{colors.green.300}",_dark:"{colors.green.700}"}},solid:{value:{_light:"{colors.green.600}",_dark:"{colors.green.600}"}},focusRing:{value:{_light:"{colors.green.500}",_dark:"{colors.green.500}"}},border:{value:{_light:"{colors.green.500}",_dark:"{colors.green.400}"}}},blue:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.blue.700}",_dark:"{colors.blue.300}"}},subtle:{value:{_light:"{colors.blue.100}",_dark:"{colors.blue.900}"}},muted:{value:{_light:"{colors.blue.200}",_dark:"{colors.blue.800}"}},emphasized:{value:{_light:"{colors.blue.300}",_dark:"{colors.blue.700}"}},solid:{value:{_light:"{colors.blue.600}",_dark:"{colors.blue.600}"}},focusRing:{value:{_light:"{colors.blue.500}",_dark:"{colors.blue.500}"}},border:{value:{_light:"{colors.blue.500}",_dark:"{colors.blue.400}"}}},yellow:{contrast:{value:{_light:"black",_dark:"black"}},fg:{value:{_light:"{colors.yellow.800}",_dark:"{colors.yellow.300}"}},subtle:{value:{_light:"{colors.yellow.100}",_dark:"{colors.yellow.900}"}},muted:{value:{_light:"{colors.yellow.200}",_dark:"{colors.yellow.800}"}},emphasized:{value:{_light:"{colors.yellow.300}",_dark:"{colors.yellow.700}"}},solid:{value:{_light:"{colors.yellow.300}",_dark:"{colors.yellow.300}"}},focusRing:{value:{_light:"{colors.yellow.500}",_dark:"{colors.yellow.500}"}},border:{value:{_light:"{colors.yellow.500}",_dark:"{colors.yellow.500}"}}},teal:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.teal.700}",_dark:"{colors.teal.300}"}},subtle:{value:{_light:"{colors.teal.100}",_dark:"{colors.teal.900}"}},muted:{value:{_light:"{colors.teal.200}",_dark:"{colors.teal.800}"}},emphasized:{value:{_light:"{colors.teal.300}",_dark:"{colors.teal.700}"}},solid:{value:{_light:"{colors.teal.600}",_dark:"{colors.teal.600}"}},focusRing:{value:{_light:"{colors.teal.500}",_dark:"{colors.teal.500}"}},border:{value:{_light:"{colors.teal.500}",_dark:"{colors.teal.400}"}}},purple:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.purple.700}",_dark:"{colors.purple.300}"}},subtle:{value:{_light:"{colors.purple.100}",_dark:"{colors.purple.900}"}},muted:{value:{_light:"{colors.purple.200}",_dark:"{colors.purple.800}"}},emphasized:{value:{_light:"{colors.purple.300}",_dark:"{colors.purple.700}"}},solid:{value:{_light:"{colors.purple.600}",_dark:"{colors.purple.600}"}},focusRing:{value:{_light:"{colors.purple.500}",_dark:"{colors.purple.500}"}},border:{value:{_light:"{colors.purple.500}",_dark:"{colors.purple.400}"}}},pink:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.pink.700}",_dark:"{colors.pink.300}"}},subtle:{value:{_light:"{colors.pink.100}",_dark:"{colors.pink.900}"}},muted:{value:{_light:"{colors.pink.200}",_dark:"{colors.pink.800}"}},emphasized:{value:{_light:"{colors.pink.300}",_dark:"{colors.pink.700}"}},solid:{value:{_light:"{colors.pink.600}",_dark:"{colors.pink.600}"}},focusRing:{value:{_light:"{colors.pink.500}",_dark:"{colors.pink.500}"}},border:{value:{_light:"{colors.pink.500}",_dark:"{colors.pink.400}"}}},cyan:{contrast:{value:{_light:"white",_dark:"white"}},fg:{value:{_light:"{colors.cyan.700}",_dark:"{colors.cyan.300}"}},subtle:{value:{_light:"{colors.cyan.100}",_dark:"{colors.cyan.900}"}},muted:{value:{_light:"{colors.cyan.200}",_dark:"{colors.cyan.800}"}},emphasized:{value:{_light:"{colors.cyan.300}",_dark:"{colors.cyan.700}"}},solid:{value:{_light:"{colors.cyan.600}",_dark:"{colors.cyan.600}"}},focusRing:{value:{_light:"{colors.cyan.500}",_dark:"{colors.cyan.500}"}},border:{value:{_light:"{colors.cyan.500}",_dark:"{colors.cyan.400}"}}}}),VP=Zv.radii({l1:{value:"{radii.xs}"},l2:{value:"{radii.sm}"},l3:{value:"{radii.md}"}}),HP=Zv.shadows({xs:{value:{_light:"0px 1px 2px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/20}",_dark:"0px 1px 1px {black/64}, 0px 0px 1px inset {colors.gray.300/20}"}},sm:{value:{_light:"0px 2px 4px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 2px 4px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},md:{value:{_light:"0px 4px 8px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 4px 8px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},lg:{value:{_light:"0px 8px 16px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 8px 16px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},xl:{value:{_light:"0px 16px 24px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 16px 24px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},"2xl":{value:{_light:"0px 24px 40px {colors.gray.900/16}, 0px 0px 1px {colors.gray.900/30}",_dark:"0px 24px 40px {black/64}, 0px 0px 1px inset {colors.gray.300/30}"}},inner:{value:{_light:"inset 0 2px 4px 0 {black/5}",_dark:"inset 0 2px 4px 0 black"}},inset:{value:{_light:"inset 0 0 0 1px {black/5}",_dark:"inset 0 0 0 1px {colors.gray.300/5}"}}}),FP=Q4.extendWith("itemBody"),$P=Te("action-bar").parts("positioner","content","separator","selectionTrigger","closeTrigger"),UP=Te("alert").parts("title","description","root","indicator","content"),WP=Te("breadcrumb").parts("link","currentLink","item","list","root","ellipsis","separator"),YP=Te("blockquote").parts("root","icon","content","caption"),qP=Te("card").parts("root","header","body","footer","title","description"),XP=Te("checkbox-card",["root","control","label","description","addon","indicator","content"]),ZP=Te("data-list").parts("root","item","itemLabel","itemValue"),KP=EO.extendWith("indicatorGroup"),QP=Uv.extendWith("header","body","footer","backdrop"),JP=Uv.extendWith("header","body","footer","backdrop"),eM=P_.extendWith("textarea"),tM=Te("empty-state",["root","content","indicator","title","description"]),nM=M_.extendWith("requiredIndicator"),iM=D_.extendWith("content"),rM=L_.extendWith("itemContent","dropzoneContent","fileText"),oM=Te("list").parts("root","item","indicator"),aM=$_.extendWith("itemCommand"),sM=Te("select").parts("root","field","indicator"),lM=Y_.extendWith("header","body","footer"),A6=qv.extendWith("itemAddon","itemIndicator"),cM=A6.extendWith("itemContent","itemDescription"),uM=X_.extendWith("itemIndicator"),dM=Q_.extendWith("indicatorGroup"),fM=CO.extendWith("indicatorGroup","empty"),hM=nw.extendWith("markerIndicator","markerLabel"),gM=Te("stat").parts("root","label","helpText","valueText","valueUnit","indicator"),pM=Te("status").parts("root","indicator"),mM=Te("steps",["root","list","item","trigger","indicator","separator","content","title","description","nextTrigger","prevTrigger","progress"]),vM=rw.extendWith("indicator"),bM=Te("table").parts("root","header","body","row","columnHeader","cell","footer","caption"),yM=Te("toast").parts("root","title","description","indicator","closeTrigger","actionTrigger"),xM=Te("tabs").parts("root","trigger","list","content","contentGroup","indicator"),SM=Te("tag").parts("root","label","closeTrigger","startElement","endElement"),_M=Te("timeline").parts("root","item","content","separator","indicator","connector","title","description"),wM=yO.extendWith("channelText"),CM=Te("code-block",["root","content","title","header","footer","control","overlay","code","codeText","copyTrigger","copyIndicator","collapseTrigger","collapseIndicator","collapseText"]),EM=iw.extendWith("resizeTriggerSeparator","resizeTriggerIndicator");d_.extendWith("valueText");const TM=H_,kM=Re({className:"chakra-accordion",slots:FP.keys(),base:{root:{width:"full","--accordion-radius":"radii.l2"},item:{overflowAnchor:"none"},itemTrigger:{display:"flex",alignItems:"center",textAlign:"start",width:"full",outline:"0",gap:"3",fontWeight:"medium",borderRadius:"var(--accordion-radius)",_focusVisible:{outline:"2px solid",outlineColor:"colorPalette.focusRing"},_disabled:{layerStyle:"disabled"}},itemBody:{pt:"var(--accordion-padding-y)",pb:"calc(var(--accordion-padding-y) * 2)"},itemContent:{overflow:"hidden",borderRadius:"var(--accordion-radius)",_open:{animationName:"expand-height, fade-in",animationDuration:"moderate"},_closed:{animationName:"collapse-height, fade-out",animationDuration:"moderate"}},itemIndicator:{transition:"rotate 0.2s",transformOrigin:"center",color:"fg.subtle",_open:{rotate:"180deg"},_icon:{width:"1.2em",height:"1.2em"}}},variants:{variant:{outline:{item:{borderBottomWidth:"1px"}},subtle:{itemTrigger:{px:"var(--accordion-padding-x)"},itemContent:{px:"var(--accordion-padding-x)"},item:{borderRadius:"var(--accordion-radius)",_open:{bg:"colorPalette.subtle"}}},enclosed:{root:{borderWidth:"1px",borderRadius:"var(--accordion-radius)",divideY:"1px",overflow:"hidden"},itemTrigger:{px:"var(--accordion-padding-x)"},itemContent:{px:"var(--accordion-padding-x)"},item:{_open:{bg:"bg.subtle"}}},plain:{}},size:{sm:{root:{"--accordion-padding-x":"spacing.3","--accordion-padding-y":"spacing.2"},itemTrigger:{textStyle:"sm",py:"var(--accordion-padding-y)"}},md:{root:{"--accordion-padding-x":"spacing.4","--accordion-padding-y":"spacing.2"},itemTrigger:{textStyle:"md",py:"var(--accordion-padding-y)"}},lg:{root:{"--accordion-padding-x":"spacing.4.5","--accordion-padding-y":"spacing.2.5"},itemTrigger:{textStyle:"lg",py:"var(--accordion-padding-y)"}}}},defaultVariants:{size:"md",variant:"outline"}}),zM=Re({className:"chakra-action-bar",slots:$P.keys(),base:{positioner:{position:"fixed",display:"flex",pointerEvents:"none",insetInline:"0","--action-bar-offset":"spacing.4"},content:{bg:"bg.panel",shadow:"md",display:"flex",alignItems:"center",gap:"3",borderRadius:"l3",py:"2.5",px:"3",pointerEvents:"auto",translate:"calc(-1 * var(--scrollbar-width) / 2) 0px",_open:{animationName:"slide-from-bottom, fade-in",animationDuration:"moderate"},_closed:{animationName:"slide-to-bottom, fade-out",animationDuration:"faster"}},separator:{width:"1px",height:"5",bg:"border"},selectionTrigger:{display:"inline-flex",alignItems:"center",gap:"2",alignSelf:"stretch",textStyle:"sm",px:"4",py:"1",borderRadius:"l2",borderWidth:"1px",borderStyle:"dashed"}},variants:{placement:{bottom:{positioner:{bottom:"calc(env(safe-area-inset-bottom) + var(--action-bar-offset))",justifyContent:"center"}},"bottom-start":{positioner:{bottom:"calc(env(safe-area-inset-bottom) + var(--action-bar-offset))",justifyContent:"flex-start",ps:"var(--action-bar-offset)"}},"bottom-end":{positioner:{bottom:"calc(env(safe-area-inset-bottom) + var(--action-bar-offset))",justifyContent:"flex-end",pe:"var(--action-bar-offset)"}}}},defaultVariants:{placement:"bottom"}}),RM=Re({slots:UP.keys(),className:"chakra-alert",base:{root:{width:"full",display:"flex",alignItems:"flex-start",position:"relative",borderRadius:"l3"},title:{fontWeight:"medium"},description:{display:"inline"},indicator:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:"0",width:"1em",height:"1em",_icon:{boxSize:"full"}},content:{display:"flex",flex:"1",gap:"1"}},variants:{status:{info:{root:{colorPalette:"blue"}},warning:{root:{colorPalette:"orange"}},success:{root:{colorPalette:"green"}},error:{root:{colorPalette:"red"}},neutral:{root:{colorPalette:"gray"}}},inline:{true:{content:{display:"inline-flex",flexDirection:"row",alignItems:"center"}},false:{content:{display:"flex",flexDirection:"column"}}},variant:{subtle:{root:{bg:"colorPalette.subtle",color:"colorPalette.fg"}},surface:{root:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},indicator:{color:"colorPalette.fg"}},outline:{root:{color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)","--outline-shadow-legacy":"colors.colorPalette.muted","--outline-shadow":"colors.colorPalette.border",shadowColor:"var(--outline-shadow, var(--outline-shadow-legacy))"},indicator:{color:"colorPalette.fg"}},solid:{root:{bg:"colorPalette.solid",color:"colorPalette.contrast"},indicator:{color:"colorPalette.contrast"}}},size:{sm:{root:{gap:"2",px:"3",py:"3",textStyle:"xs"},indicator:{textStyle:"lg"}},md:{root:{gap:"3",px:"4",py:"4",textStyle:"sm"},indicator:{textStyle:"xl"}},lg:{root:{gap:"3",px:"4",py:"4",textStyle:"md"},indicator:{textStyle:"2xl"}}}},defaultVariants:{status:"info",variant:"subtle",size:"md",inline:!1}}),AM=Re({slots:J4.keys(),className:"chakra-avatar",base:{root:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:"medium",position:"relative",verticalAlign:"top",flexShrink:"0",userSelect:"none",width:"var(--avatar-size)",height:"var(--avatar-size)",fontSize:"var(--avatar-font-size)",borderRadius:"var(--avatar-radius)","&[data-group-item]":{borderWidth:"2px",borderColor:"bg"}},image:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"var(--avatar-radius)"},fallback:{lineHeight:"1",textTransform:"uppercase",fontWeight:"medium",fontSize:"var(--avatar-font-size)",borderRadius:"var(--avatar-radius)"}},variants:{size:{full:{root:{"--avatar-size":"100%","--avatar-font-size":"100%"}},"2xs":{root:{"--avatar-font-size":"fontSizes.2xs","--avatar-size":"sizes.6"}},xs:{root:{"--avatar-font-size":"fontSizes.xs","--avatar-size":"sizes.8"}},sm:{root:{"--avatar-font-size":"fontSizes.sm","--avatar-size":"sizes.9"}},md:{root:{"--avatar-font-size":"fontSizes.md","--avatar-size":"sizes.10"}},lg:{root:{"--avatar-font-size":"fontSizes.md","--avatar-size":"sizes.11"}},xl:{root:{"--avatar-font-size":"fontSizes.lg","--avatar-size":"sizes.12"}},"2xl":{root:{"--avatar-font-size":"fontSizes.xl","--avatar-size":"sizes.16"}}},variant:{solid:{root:{bg:"colorPalette.solid",color:"colorPalette.contrast"}},subtle:{root:{bg:"colorPalette.muted",color:"colorPalette.fg"}},outline:{root:{color:"colorPalette.fg",borderWidth:"1px","--outline-shadow-legacy":"colors.colorPalette.muted","--outline-shadow":"colors.colorPalette.border",borderColor:"var(--outline-shadow, var(--outline-shadow-legacy))"}}},shape:{square:{},rounded:{root:{"--avatar-radius":"radii.l3"}},full:{root:{"--avatar-radius":"radii.full"}}},borderless:{true:{root:{"&[data-group-item]":{borderWidth:"0px"}}}}},defaultVariants:{size:"md",shape:"full",variant:"subtle"}}),OM=Re({className:"chakra-blockquote",slots:YP.keys(),base:{root:{position:"relative",display:"flex",flexDirection:"column",gap:"2"},caption:{textStyle:"sm",color:"fg.muted"},icon:{boxSize:"5"}},variants:{justify:{start:{root:{alignItems:"flex-start",textAlign:"start"}},center:{root:{alignItems:"center",textAlign:"center"}},end:{root:{alignItems:"flex-end",textAlign:"end"}}},variant:{subtle:{root:{paddingX:"5",borderStartWidth:"4px",borderStartColor:"colorPalette.muted"},icon:{color:"colorPalette.fg"}},solid:{root:{paddingX:"5",borderStartWidth:"4px",borderStartColor:"colorPalette.solid"},icon:{color:"colorPalette.solid"}},plain:{root:{paddingX:"5"},icon:{color:"colorPalette.solid"}}}},defaultVariants:{variant:"subtle",justify:"start"}}),NM=Re({className:"chakra-breadcrumb",slots:WP.keys(),base:{list:{display:"flex",alignItems:"center",wordBreak:"break-word",color:"fg.muted",listStyle:"none"},link:{outline:"0",textDecoration:"none",borderRadius:"l1",focusRing:"outside",display:"inline-flex",alignItems:"center",gap:"2"},item:{display:"inline-flex",alignItems:"center"},separator:{color:"fg.muted",opacity:"0.8",_icon:{boxSize:"1em"},_rtl:{rotate:"180deg"}},ellipsis:{display:"inline-flex",alignItems:"center",justifyContent:"center",_icon:{boxSize:"1em"}}},variants:{variant:{underline:{link:{color:"colorPalette.fg",textDecoration:"underline",textUnderlineOffset:"0.2em",textDecorationColor:"colorPalette.muted"},currentLink:{color:"colorPalette.fg"}},plain:{link:{color:"fg.muted",_hover:{color:"fg"}},currentLink:{color:"fg"}}},size:{sm:{list:{gap:"1",textStyle:"xs"}},md:{list:{gap:"1.5",textStyle:"sm"}},lg:{list:{gap:"2",textStyle:"md"}}}},defaultVariants:{variant:"plain",size:"md"}}),IM=Re({className:"chakra-card",slots:qP.keys(),base:{root:{display:"flex",flexDirection:"column",position:"relative",minWidth:"0",wordWrap:"break-word",borderRadius:"l3",color:"fg",textAlign:"start"},title:{fontWeight:"semibold"},description:{color:"fg.muted",fontSize:"sm"},header:{paddingInline:"var(--card-padding)",paddingTop:"var(--card-padding)",display:"flex",flexDirection:"column",gap:"1.5"},body:{padding:"var(--card-padding)",flex:"1",display:"flex",flexDirection:"column"},footer:{display:"flex",alignItems:"center",gap:"2",paddingInline:"var(--card-padding)",paddingBottom:"var(--card-padding)"}},variants:{size:{sm:{root:{"--card-padding":"spacing.4"},title:{textStyle:"md"}},md:{root:{"--card-padding":"spacing.6"},title:{textStyle:"lg"}},lg:{root:{"--card-padding":"spacing.7"},title:{textStyle:"xl"}}},variant:{elevated:{root:{bg:"bg.panel",boxShadow:"md"}},outline:{root:{bg:"bg.panel",borderWidth:"1px",borderColor:"border"}},subtle:{root:{bg:"bg.muted"}}}},defaultVariants:{variant:"outline",size:"md"}}),PM=Re({className:"carousel",slots:YR.keys(),base:{root:{position:"relative",display:"flex",gap:"2",_horizontal:{flexDirection:"column"},_vertical:{flexDirection:"row"}},item:{_horizontal:{width:"100%"},_vertical:{height:"100%"}},control:{display:"flex",alignItems:"center",_horizontal:{flexDirection:"row",width:"100%"},_vertical:{flexDirection:"column",height:"100%"}},indicatorGroup:{display:"flex",justifyContent:"center",gap:"3",_horizontal:{flexDirection:"row"},_vertical:{flexDirection:"column"}},indicator:{width:"2.5",height:"2.5",borderRadius:"full",bg:"colorPalette.subtle",cursor:"button",_current:{bg:"colorPalette.solid"}}},defaultVariants:{}}),MM=Re({slots:nA.keys(),className:"chakra-checkbox",base:{root:{display:"inline-flex",gap:"2",alignItems:"center",verticalAlign:"top",position:"relative"},control:mn.base,label:{fontWeight:"medium",userSelect:"none",_disabled:{opacity:"0.5"}}},variants:{size:{xs:{root:{gap:"1.5"},label:{textStyle:"xs"},control:mn.variants?.size?.xs},sm:{root:{gap:"2"},label:{textStyle:"sm"},control:mn.variants?.size?.sm},md:{root:{gap:"2.5"},label:{textStyle:"sm"},control:mn.variants?.size?.md},lg:{root:{gap:"3"},label:{textStyle:"md"},control:mn.variants?.size?.lg}},variant:{outline:{control:mn.variants?.variant?.outline},solid:{control:mn.variants?.variant?.solid},subtle:{control:mn.variants?.variant?.subtle}}},defaultVariants:{variant:"solid",size:"md"}}),DM=Re({slots:XP.keys(),className:"chakra-checkbox-card",base:{root:{display:"flex",flexDirection:"column",userSelect:"none",position:"relative",borderRadius:"l2",flex:"1",focusVisibleRing:"outside",_disabled:{opacity:"0.8"},_invalid:{outline:"2px solid",outlineColor:"border.error"}},control:{display:"inline-flex",flex:"1",position:"relative",borderRadius:"inherit",justifyContent:"var(--checkbox-card-justify)",alignItems:"var(--checkbox-card-align)"},label:{fontWeight:"medium",display:"flex",alignItems:"center",gap:"2",flex:"1",_disabled:{opacity:"0.5"}},description:{opacity:"0.64",textStyle:"sm",_disabled:{opacity:"0.5"}},addon:{_disabled:{opacity:"0.5"}},indicator:mn.base,content:{display:"flex",flexDirection:"column",flex:"1",gap:"1",justifyContent:"var(--checkbox-card-justify)",alignItems:"var(--checkbox-card-align)"}},variants:{size:{sm:{root:{textStyle:"sm"},control:{padding:"3",gap:"1.5"},addon:{px:"3",py:"1.5",borderTopWidth:"1px"},indicator:mn.variants?.size.sm},md:{root:{textStyle:"sm"},control:{padding:"4",gap:"2.5"},addon:{px:"4",py:"2",borderTopWidth:"1px"},indicator:mn.variants?.size.md},lg:{root:{textStyle:"md"},control:{padding:"4",gap:"3.5"},addon:{px:"4",py:"2",borderTopWidth:"1px"},indicator:mn.variants?.size.lg}},variant:{surface:{root:{borderWidth:"1px",borderColor:"border",_checked:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderColor:"colorPalette.muted"},_disabled:{bg:"bg.muted"}},indicator:mn.variants?.variant.solid},subtle:{root:{bg:"bg.muted"},control:{_checked:{bg:"colorPalette.muted",color:"colorPalette.fg"}},indicator:mn.variants?.variant.plain},outline:{root:{borderWidth:"1px",borderColor:"border",_checked:{boxShadow:"inset 0 0 0 1px var(--shadow-color)",boxShadowColor:"colorPalette.solid",borderColor:"colorPalette.solid"}},indicator:mn.variants?.variant.solid},solid:{root:{borderWidth:"1px",_checked:{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"colorPalette.solid"}},indicator:mn.variants?.variant.inverted}},justify:{start:{root:{"--checkbox-card-justify":"flex-start"}},end:{root:{"--checkbox-card-justify":"flex-end"}},center:{root:{"--checkbox-card-justify":"center"}}},align:{start:{root:{"--checkbox-card-align":"flex-start"},content:{textAlign:"start"}},end:{root:{"--checkbox-card-align":"flex-end"},content:{textAlign:"end"}},center:{root:{"--checkbox-card-align":"center"},content:{textAlign:"center"}}},orientation:{vertical:{control:{flexDirection:"column"}},horizontal:{control:{flexDirection:"row"}}}},defaultVariants:{size:"md",variant:"outline",align:"start",orientation:"horizontal"}}),LM=Re({slots:CM.keys(),className:"code-block",base:{root:{colorPalette:"gray",rounded:"var(--code-block-radius)",overflow:"hidden",bg:"bg",color:"fg",borderWidth:"1px","--code-block-max-height":"320px","--code-block-bg":"colors.bg","--code-block-fg":"colors.fg","--code-block-obscured-opacity":"0.5","--code-block-obscured-blur":"1px","--code-block-line-number-width":"sizes.3","--code-block-line-number-margin":"spacing.4","--code-block-highlight-bg":"{colors.teal.focusRing/20}","--code-block-highlight-border":"colors.teal.focusRing","--code-block-highlight-added-bg":"{colors.green.focusRing/20}","--code-block-highlight-added-border":"colors.green.focusRing","--code-block-highlight-removed-bg":"{colors.red.focusRing/20}","--code-block-highlight-removed-border":"colors.red.focusRing"},header:{display:"flex",alignItems:"center",gap:"2",position:"relative",px:"var(--code-block-padding)",minH:"var(--code-block-header-height)",mb:"calc(var(--code-block-padding) / 2 * -1)"},title:{display:"inline-flex",alignItems:"center",gap:"1.5",flex:"1",color:"fg.muted"},control:{gap:"1.5",display:"inline-flex",alignItems:"center"},footer:{display:"flex",alignItems:"center",justifyContent:"center",gap:"2",px:"var(--code-block-padding)",minH:"var(--code-block-header-height)"},content:{position:"relative",colorScheme:"dark",borderBottomRadius:"var(--code-block-radius)",maxHeight:"var(--code-block-max-height)","& ::selection":{bg:"blue.500/40"},_expanded:{maxHeight:"unset"}},overlay:{"--bg":"{colors.black/50}",display:"flex",alignItems:"flex-end",justifyContent:"center",padding:"4",bgImage:"linear-gradient(0deg,var(--bg) 25%,transparent 100%)",color:"white",minH:"5rem",pos:"absolute",bottom:"0",insetInline:"0",zIndex:"1",fontWeight:"medium",_expanded:{display:"none"}},code:{fontFamily:"mono",lineHeight:"tall",whiteSpace:"pre",counterReset:"line 0",overflowX:"auto",overflowY:"hidden"},codeText:{px:"var(--code-block-padding)",py:"var(--code-block-padding)",position:"relative",display:"block",width:"100%","&[data-has-focused]":{"& [data-line]:not([data-focused])":{transitionProperty:"opacity, filter",transitionDuration:"moderate",transitionTimingFunction:"ease-in-out",opacity:"var(--code-block-obscured-opacity)",filter:"blur(var(--code-block-obscured-blur))"},"&:hover":{"--code-block-obscured-opacity":"1","--code-block-obscured-blur":"0px"}},"&[data-has-line-numbers][data-plaintext]":{paddingInlineStart:"calc(var(--code-block-line-number-width) + var(--code-block-line-number-margin) + var(--code-block-padding))"},"& [data-line]":{position:"relative",paddingInlineEnd:"var(--code-block-padding)","--highlight-bg":"var(--code-block-highlight-bg)","--highlight-border":"var(--code-block-highlight-border)","&[data-highlight], &[data-diff]":{display:"inline-block",width:"full","&:after":{content:"''",display:"block",position:"absolute",top:"0",insetStart:"calc(var(--code-block-padding) * -1)",insetEnd:"0px",width:"calc(100% + var(--code-block-padding) * 2)",height:"100%",bg:"var(--highlight-bg)",borderStartWidth:"2px",borderStartColor:"var(--highlight-border)"}},"&[data-diff='added']":{"--highlight-bg":"var(--code-block-highlight-added-bg)","--highlight-border":"var(--code-block-highlight-added-border)"},"&[data-diff='removed']":{"--highlight-bg":"var(--code-block-highlight-removed-bg)","--highlight-border":"var(--code-block-highlight-removed-border)"}},"&[data-word-wrap]":{"&[data-plaintext], & [data-line]":{whiteSpace:"pre-wrap",wordBreak:"break-all"}},"&[data-has-line-numbers]":{"--content":"counter(line)","& [data-line]:before":{content:"var(--content)",counterIncrement:"line",width:"var(--code-block-line-number-width)",marginRight:"var(--code-block-line-number-margin)",display:"inline-block",textAlign:"end",userSelect:"none",whiteSpace:"nowrap",opacity:.4},"& [data-diff='added']:before":{content:"'+'"},"& [data-diff='removed']:before":{content:"'-'"}}}},variants:{size:{sm:{root:{"--code-block-padding":"spacing.4","--code-block-radius":"radii.md","--code-block-header-height":"sizes.8"},title:{textStyle:"xs"},code:{fontSize:"xs"}},md:{root:{"--code-block-padding":"spacing.4","--code-block-radius":"radii.lg","--code-block-header-height":"sizes.10"},title:{textStyle:"xs"},code:{fontSize:"sm"}},lg:{root:{"--code-block-padding":"spacing.5","--code-block-radius":"radii.xl","--code-block-header-height":"sizes.12"},title:{textStyle:"sm"},code:{fontSize:"sm"}}}},defaultVariants:{size:"md"}}),jM=Re({slots:f_.keys(),className:"chakra-collapsible",base:{content:{overflow:"hidden",_open:{animationName:"expand-height, fade-in",animationDuration:"moderate","&[data-has-collapsed-size]":{animationName:"expand-height"}},_closed:{animationName:"collapse-height, fade-out",animationDuration:"moderate","&[data-has-collapsed-size]":{animationName:"collapse-height"}}}}}),BM=Re({className:"colorPicker",slots:wM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5"},label:{color:"fg",fontWeight:"medium",textStyle:"sm",_disabled:{opacity:"0.5"}},valueText:{textAlign:"start"},control:{display:"flex",alignItems:"center",flexDirection:"row",gap:"2",position:"relative"},swatchTrigger:{display:"flex",alignItems:"center",justifyContent:"center"},trigger:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"row",flexShrink:"0",gap:"2",textStyle:"sm",minH:"var(--input-height)",minW:"var(--input-height)",px:"1",rounded:"l2",_disabled:{opacity:"0.5"},"--focus-color":"colors.colorPalette.focusRing","&:focus-visible":{borderColor:"var(--focus-color)",outline:"1px solid var(--focus-color)"},"&[data-fit-content]":{"--input-height":"unset",px:"0",border:"0"}},content:{display:"flex",flexDirection:"column",bg:"bg.panel",borderRadius:"l3",boxShadow:"lg",width:"64",p:"4",gap:"3","--color-picker-z-index":"zIndex.popover",zIndex:"calc(var(--color-picker-z-index) + var(--layer-index, 0))",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"faster"}},area:{height:"180px",borderRadius:"l2",overflow:"hidden"},areaThumb:{borderRadius:"full",height:"var(--thumb-size)",width:"var(--thumb-size)",borderWidth:"2px",borderColor:"white",shadow:"sm",focusVisibleRing:"mixed",focusRingColor:"white"},areaBackground:{height:"full"},channelSlider:{borderRadius:"l2",flex:"1"},channelSliderTrack:{height:"var(--slider-height)",borderRadius:"inherit",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"},channelText:{textStyle:"xs",color:"fg.muted",fontWeight:"medium",textTransform:"capitalize"},swatchGroup:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"2"},swatch:{...R6.base,borderRadius:"l1"},swatchIndicator:{color:"white",rounded:"full"},channelSliderThumb:{borderRadius:"full",height:"var(--thumb-size)",width:"var(--thumb-size)",borderWidth:"2px",borderColor:"white",shadow:"sm",transform:"translate(-50%, -50%)",focusVisibleRing:"outside",focusRingOffset:"1px"},channelInput:{...Vt.base,"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0}},formatSelect:{textStyle:"xs",textTransform:"uppercase",borderWidth:"1px",minH:"6",focusRing:"inside",rounded:"l2"},transparencyGrid:{borderRadius:"l2"},view:{display:"flex",flexDirection:"column",gap:"2"}},variants:{size:{"2xs":{channelInput:Vt.variants?.size?.["2xs"],swatch:{"--swatch-size":"sizes.4.5"},trigger:{"--input-height":"sizes.7"},area:{"--thumb-size":"sizes.3"},channelSlider:{"--slider-height":"sizes.3","--thumb-size":"sizes.3"}},xs:{channelInput:Vt.variants?.size?.xs,swatch:{"--swatch-size":"sizes.5"},trigger:{"--input-height":"sizes.8"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},sm:{channelInput:Vt.variants?.size?.sm,swatch:{"--swatch-size":"sizes.6"},trigger:{"--input-height":"sizes.9"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},md:{channelInput:Vt.variants?.size?.md,swatch:{"--swatch-size":"sizes.7"},trigger:{"--input-height":"sizes.10"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},lg:{channelInput:Vt.variants?.size?.lg,swatch:{"--swatch-size":"sizes.7"},trigger:{"--input-height":"sizes.11"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},xl:{channelInput:Vt.variants?.size?.xl,swatch:{"--swatch-size":"sizes.8"},trigger:{"--input-height":"sizes.12"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}},"2xl":{channelInput:Vt.variants?.size?.["2xl"],swatch:{"--swatch-size":"sizes.10"},trigger:{"--input-height":"sizes.16"},area:{"--thumb-size":"sizes.3.5"},channelSlider:{"--slider-height":"sizes.3.5","--thumb-size":"sizes.3.5"}}},variant:{outline:{channelInput:Vt.variants?.variant?.outline,trigger:{borderWidth:"1px"}},subtle:{channelInput:Vt.variants?.variant?.subtle,trigger:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted"}}}},defaultVariants:{size:"md",variant:"outline"}}),GM=Re({className:"chakra-combobox",slots:fM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full"},label:{fontWeight:"medium",userSelect:"none",textStyle:"sm",_disabled:{layerStyle:"disabled"}},control:{pos:"relative","--padding-factor":"1","--combobox-input-padding-end":"var(--combobox-input-padding-x)","&:has([data-part=trigger]), &:has([data-part=clear-trigger])":{"--combobox-input-padding-end":"calc(var(--combobox-input-height) * var(--padding-factor))"},"&:has([data-part=trigger]):has([data-part=clear-trigger]:not([hidden]))":{"--padding-factor":"1.5"}},input:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"bg.panel",width:"full",minH:"var(--combobox-input-height)",ps:"var(--combobox-input-padding-x)",pe:"var(--combobox-input-padding-end)","--input-height":"var(--combobox-input-height)",borderRadius:"l2",outline:0,userSelect:"none",textAlign:"start",_placeholderShown:{color:"fg.muted"},_disabled:{layerStyle:"disabled"},"--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"}},trigger:{display:"inline-flex",alignItems:"center",justifyContent:"center","--input-height":"var(--combobox-input-height)"},clearTrigger:{color:"fg.muted",pointerEvents:"auto",focusVisibleRing:"inside",focusRingWidth:"2px",rounded:"l1"},indicatorGroup:{display:"flex",alignItems:"center",justifyContent:"center",gap:"1",pos:"absolute",insetEnd:"0",top:"0",bottom:"0",px:"var(--combobox-input-padding-x)",_icon:{boxSize:"var(--combobox-indicator-size)"},"[data-disabled] &":{opacity:.5}},content:{background:"bg.panel",display:"flex",flexDirection:"column","--combobox-z-index":"zIndex.popover",zIndex:"calc(var(--combobox-z-index) + var(--layer-index, 0))",borderRadius:"l2",outline:0,maxH:"96",overflowY:"auto",boxShadow:"md",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"0s"},"&[data-empty]:not(:has([data-scope=combobox][data-part=empty]))":{opacity:0}},item:{position:"relative",userSelect:"none",display:"flex",alignItems:"center",gap:"2",py:"var(--combobox-item-padding-y)",px:"var(--combobox-item-padding-x)",cursor:"option",justifyContent:"space-between",flex:"1",textAlign:"start",borderRadius:"l1",_highlighted:{bg:"bg.emphasized/60"},_disabled:{pointerEvents:"none",opacity:"0.5"},_icon:{boxSize:"var(--combobox-indicator-size)"}},empty:{py:"var(--combobox-item-padding-y)",px:"var(--combobox-item-padding-x)"},itemText:{flex:"1"},itemGroup:{pb:"var(--combobox-item-padding-y)",_last:{pb:"0"}},itemGroupLabel:{fontWeight:"medium",py:"var(--combobox-item-padding-y)",px:"var(--combobox-item-padding-x)"}},variants:{variant:{outline:{input:{bg:"transparent",borderWidth:"1px",borderColor:"border",focusVisibleRing:"inside"}},subtle:{input:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted",focusVisibleRing:"inside"}},flushed:{input:{bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",borderRadius:"0",px:"0",_focusVisible:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)"}},indicatorGroup:{px:"0"}}},size:{xs:{root:{"--combobox-input-height":"sizes.8","--combobox-input-padding-x":"spacing.2","--combobox-indicator-size":"sizes.3.5"},input:{textStyle:"xs"},content:{"--combobox-item-padding-x":"spacing.1.5","--combobox-item-padding-y":"spacing.1","--combobox-indicator-size":"sizes.3.5",p:"1",textStyle:"xs"},trigger:{textStyle:"xs",gap:"1"}},sm:{root:{"--combobox-input-height":"sizes.9","--combobox-input-padding-x":"spacing.2.5","--combobox-indicator-size":"sizes.4"},input:{textStyle:"sm"},content:{"--combobox-item-padding-x":"spacing.2","--combobox-item-padding-y":"spacing.1.5","--combobox-indicator-size":"sizes.4",p:"1",textStyle:"sm"},trigger:{textStyle:"sm",gap:"1"}},md:{root:{"--combobox-input-height":"sizes.10","--combobox-input-padding-x":"spacing.3","--combobox-indicator-size":"sizes.4"},input:{textStyle:"sm"},content:{"--combobox-item-padding-x":"spacing.2","--combobox-item-padding-y":"spacing.1.5","--combobox-indicator-size":"sizes.4",p:"1",textStyle:"sm"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center"},trigger:{textStyle:"sm",gap:"2"}},lg:{root:{"--combobox-input-height":"sizes.12","--combobox-input-padding-x":"spacing.4","--combobox-indicator-size":"sizes.5"},input:{textStyle:"md"},content:{"--combobox-item-padding-y":"spacing.2","--combobox-item-padding-x":"spacing.3","--combobox-indicator-size":"sizes.5",p:"1.5",textStyle:"md"},trigger:{textStyle:"md",py:"3",gap:"2"}}}},defaultVariants:{size:"md",variant:"outline"}}),VM=Re({slots:ZP.keys(),className:"chakra-data-list",base:{itemLabel:{display:"flex",alignItems:"center",gap:"1"},itemValue:{display:"flex",minWidth:"0",flex:"1"}},variants:{orientation:{horizontal:{root:{display:"flex",flexDirection:"column"},item:{display:"inline-flex",alignItems:"center",gap:"4"},itemLabel:{minWidth:"120px"}},vertical:{root:{display:"flex",flexDirection:"column"},item:{display:"flex",flexDirection:"column",gap:"1"}}},size:{sm:{root:{gap:"3"},item:{textStyle:"xs"}},md:{root:{gap:"4"},item:{textStyle:"sm"}},lg:{root:{gap:"5"},item:{textStyle:"md"}}},variant:{subtle:{itemLabel:{color:"fg.muted"}},bold:{itemLabel:{fontWeight:"medium"},itemValue:{color:"fg.muted"}}}},defaultVariants:{size:"md",orientation:"vertical",variant:"subtle"}}),HM=Re({className:"chakra-date-input",slots:z_.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full",_disabled:{opacity:"0.5"}},label:{textStyle:"label"},control:{display:"flex",alignItems:"center",width:"full"},segmentGroup:{flex:"1",outline:"0",position:"relative",appearance:"none",textAlign:"start",borderRadius:"l2",height:"var(--input-height)",minW:"var(--input-height)","--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"},display:"flex",alignItems:"center",gap:"1",cursor:"text"},segment:{borderRadius:"l1",px:"0.5",outline:"none",_placeholderShown:{color:"fg.subtle"},"&[data-type=literal]":{px:"0",color:"fg.subtle"}}},variants:{size:{"2xs":{segmentGroup:{textStyle:"xs",px:"1.5","--input-height":"sizes.7"}},xs:{segmentGroup:{textStyle:"xs",px:"1.5","--input-height":"sizes.8"}},sm:{segmentGroup:{textStyle:"sm",px:"2","--input-height":"sizes.9"}},md:{segmentGroup:{textStyle:"sm",px:"2.5","--input-height":"sizes.10"}},lg:{segmentGroup:{textStyle:"md",px:"3.5","--input-height":"sizes.11"}},xl:{segmentGroup:{textStyle:"md",px:"4","--input-height":"sizes.12"}},"2xl":{segmentGroup:{textStyle:"lg",px:"4.5","--input-height":"sizes.16"}}},variant:{outline:{segmentGroup:{bg:"transparent",borderWidth:"1px",borderColor:"border",focusRing:"inside",focusRingColor:"var(--focus-color)"},segment:{_focus:{bg:"colorPalette.emphasized",color:"fg"}}},subtle:{segmentGroup:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted",focusRing:"inside",focusRingColor:"var(--focus-color)"},segment:{_focus:{bg:"colorPalette.subtle",color:"colorPalette.fg"}}},flushed:{segmentGroup:{bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",borderRadius:"0",px:"0",_focus:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)",_invalid:{borderColor:"var(--error-color)",boxShadow:"0px 1px 0px 0px var(--error-color)"}}},segment:{_focus:{bg:"colorPalette.subtle",color:"colorPalette.fg"}}}}},defaultVariants:{size:"md",variant:"outline"}}),S5=Fo({display:"inline-flex",alignItems:"center",justifyContent:"center",boxSize:"var(--datepicker-nav-trigger-size)",borderRadius:"l2",color:"fg",focusVisibleRing:"inside",focusRingWidth:"2px",_hover:{bg:"colorPalette.subtle"},_focusVisible:{boxShadow:"0 0 0 2px var(--colors-color-palette-focus-ring)"},_disabled:{opacity:.5},_icon:{boxSize:"4"}}),FM=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")`,_5=Fo({height:"var(--datepicker-select-height)",ps:"2",pe:"8",textStyle:"sm",borderWidth:"1px",borderRadius:"l2",outline:"none",focusVisibleRing:"inside",appearance:"none",fieldSizing:"content",backgroundImage:FM,backgroundRepeat:"no-repeat",backgroundPosition:"right 0.375rem center",backgroundSize:"1.25em"}),$M=Re({className:"date-picker",slots:KP.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full","--datepicker-indicators-offset":"sizes.3",_disabled:{opacity:.5}},label:{textStyle:"sm",fontWeight:"medium"},indicatorGroup:{position:"absolute",insetEnd:"var(--datepicker-indicators-offset)",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",gap:"1"},control:{display:"flex",alignItems:"center",gap:"2",width:"full",position:"relative"},input:{flex:"1",minWidth:"0",height:"var(--datepicker-input-height)","--input-height":"var(--datepicker-input-height)",px:"var(--datepicker-input-px)",textStyle:"sm",bg:"transparent",borderRadius:"l2",outline:"0",appearance:"none",color:"fg","--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"}},trigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"6",height:"6",borderRadius:"l1",color:"fg.muted",outline:"none",_hover:{color:"fg"},focusVisibleRing:"inside",focusRingWidth:"2px",_icon:{boxSize:"4"}},content:{display:"flex",flexDirection:"column",gap:"3",p:"3",minW:"18rem",bg:"bg.panel",borderRadius:"l2",boxShadow:"lg",color:"fg","--date-picker-z-index":"zIndex.popover",zIndex:"calc(var(--date-picker-z-index) + var(--layer-index, 0))",outline:"none",_open:{animationStyle:"scale-fade-in",animationDuration:"fast"},_closed:{animationStyle:"scale-fade-out",animationDuration:"faster"}},view:{display:"flex",flexDirection:"column",gap:"3"},viewControl:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"2",height:"var(--datepicker-nav-trigger-size)"},viewTrigger:{display:"inline-flex",flex:"1",alignItems:"center",justifyContent:"center",gap:"1",py:"1.5",px:"2",textStyle:"sm",fontWeight:"semibold",borderRadius:"l2",focusVisibleRing:"inside",focusRingWidth:"2px",_hover:{bg:"colorPalette.subtle"}},prevTrigger:S5,nextTrigger:S5,rangeText:{textStyle:"sm",fontWeight:"semibold"},table:{borderCollapse:"separate",borderSpacing:"0"},tableHeader:{width:"var(--table-cell-size)",py:"2",textStyle:"xs",fontWeight:"medium",color:"fg.muted",textAlign:"center",textTransform:"uppercase","&[data-type='week-number']":{color:"fg.subtle"}},tableCell:{py:"0.5","&[data-type='week-number']":{color:"fg.subtle"}},tableCellTrigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"var(--table-cell-size)",minHeight:"var(--table-cell-size)",textStyle:"sm",borderRadius:"l2",focusVisibleRing:"inside",focusRingWidth:"2px",focusRingOffset:"0px",cursor:"default",position:"relative",_hover:{bg:"colorPalette.subtle"},"[data-view=month] &, [data-view=year] &":{width:"calc(var(--table-cell-size) * 1.75)"},_today:{color:"colorPalette.fg",fontWeight:"semibold",textDecoration:"underline",textUnderlineOffset:"3px",textDecorationThickness:"2px"},"&[data-selected]":{bg:"colorPalette.solid",color:"colorPalette.contrast",_hover:{bg:"colorPalette.solid"}},"&[data-in-range]":{bg:"colorPalette.subtle",color:"colorPalette.fg",borderRadius:"0",_hover:{bg:"colorPalette.subtle"}},"&[data-in-range][data-selected]":{bg:"colorPalette.solid",color:"colorPalette.contrast",borderRadius:"0",_hover:{bg:"colorPalette.solid"},"&[data-range-start][data-range-end]":{borderRadius:"l2"},"&[data-range-start]:not([data-range-end])":{borderStartRadius:"l2",borderEndRadius:"0"},"&[data-range-end]:not([data-range-start])":{borderEndRadius:"l2",borderStartRadius:"0"}},_disabled:{opacity:.4}},monthSelect:_5,yearSelect:_5,clearTrigger:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"6",height:"6",flexShrink:0,textStyle:"xs",borderRadius:"l2",color:"fg.muted",_hover:{color:"fg"},focusVisibleRing:"inside",_icon:{width:"4",height:"4"}}},variants:{size:{xs:{root:{"--datepicker-input-height":"sizes.8","--datepicker-input-px":"sizes.2","--datepicker-indicators-offset":"sizes.2"},view:{"--table-cell-size":"sizes.8","--datepicker-nav-trigger-size":"sizes.7","--datepicker-select-height":"sizes.8"}},sm:{root:{"--datepicker-input-height":"sizes.9","--datepicker-input-px":"sizes.2.5","--datepicker-indicators-offset":"sizes.2.5"},view:{"--table-cell-size":"sizes.9","--datepicker-nav-trigger-size":"sizes.8","--datepicker-select-height":"sizes.9"}},md:{root:{"--datepicker-input-height":"sizes.10","--datepicker-input-px":"sizes.3"},view:{"--table-cell-size":"sizes.10","--datepicker-nav-trigger-size":"sizes.8","--datepicker-select-height":"sizes.10"}},lg:{root:{"--datepicker-input-height":"sizes.11","--datepicker-input-px":"sizes.4"},view:{"--table-cell-size":"sizes.10","--datepicker-nav-trigger-size":"sizes.9","--datepicker-select-height":"sizes.10"}},xl:{root:{"--datepicker-input-height":"sizes.12","--datepicker-input-px":"sizes.4.5"},view:{"--table-cell-size":"sizes.10","--datepicker-nav-trigger-size":"sizes.9","--datepicker-select-height":"sizes.10"}}},hideOutsideDays:{true:{tableCellTrigger:{"&[data-outside-range]":{visibility:"hidden"}}}},variant:{outline:{input:{bg:"transparent",borderWidth:"1px",borderColor:"border",focusVisibleRing:"inside",focusRingColor:"var(--focus-color)"}},subtle:{input:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted",focusVisibleRing:"inside",focusRingColor:"var(--focus-color)"}},flushed:{input:{bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",borderRadius:"0",px:"0",_focusVisible:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)",_invalid:{borderColor:"var(--error-color)",boxShadow:"0px 1px 0px 0px var(--error-color)"}}},indicatorGroup:{insetEnd:"0"}}}},defaultVariants:{size:"md",variant:"outline"}}),UM=Re({slots:QP.keys(),className:"chakra-dialog",base:{backdrop:{bg:"blackAlpha.500",pos:"fixed",left:0,top:0,w:"100dvw",h:"100dvh","--dialog-z-index":"zIndex.popover",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0) - 1)",_open:{animationName:"fade-in",animationDuration:"slow"},_closed:{animationName:"fade-out",animationDuration:"moderate"}},positioner:{display:"flex",width:"100dvw",height:"100dvh",position:"fixed",left:0,top:0,"--dialog-z-index":"zIndex.popover",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",justifyContent:"center",overscrollBehaviorY:"none"},content:{display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,borderRadius:"l3",textStyle:"sm",my:"var(--dialog-margin, var(--dialog-base-margin))","--dialog-z-index":"zIndex.popover",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",bg:"bg.panel",boxShadow:"lg",_open:{animationDuration:"moderate"},_closed:{animationDuration:"faster"}},header:{display:"flex",gap:"2",flex:0,px:"6",pt:"6",pb:"4"},body:{flex:"1",px:"6",pt:"2",pb:"6"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"3",px:"6",pt:"2",pb:"4"},title:{textStyle:"lg",fontWeight:"semibold"},description:{color:"fg.muted"},closeTrigger:{pos:"absolute",top:"2",insetEnd:"2"}},variants:{placement:{center:{positioner:{alignItems:"center"},content:{"--dialog-base-margin":"auto",mx:"auto"}},top:{positioner:{alignItems:"flex-start"},content:{"--dialog-base-margin":"spacing.16",mx:"auto"}},bottom:{positioner:{alignItems:"flex-end"},content:{"--dialog-base-margin":"spacing.16",mx:"auto"}}},scrollBehavior:{inside:{positioner:{overflow:"hidden"},content:{maxH:"calc(100% - 7.5rem)"},body:{overflow:"auto"}},outside:{positioner:{overflow:"auto",pointerEvents:"auto"}}},size:{xs:{content:{maxW:"sm"}},sm:{content:{maxW:"md"}},md:{content:{maxW:"lg"}},lg:{content:{maxW:"2xl"}},xl:{content:{maxW:"4xl"}},cover:{positioner:{padding:"10"},content:{width:"100%",height:"100%","--dialog-margin":"0"}},full:{content:{maxW:"100dvw",minH:"100dvh","--dialog-margin":"0",borderRadius:"0"}}},motionPreset:{scale:{content:{_open:{animationName:"scale-in, fade-in"},_closed:{animationName:"scale-out, fade-out"}}},"slide-in-bottom":{content:{_open:{animationName:"slide-from-bottom, fade-in"},_closed:{animationName:"slide-to-bottom, fade-out"}}},"slide-in-top":{content:{_open:{animationName:"slide-from-top, fade-in"},_closed:{animationName:"slide-to-top, fade-out"}}},"slide-in-left":{content:{_open:{animationName:"slide-from-left, fade-in"},_closed:{animationName:"slide-to-left, fade-out"}}},"slide-in-right":{content:{_open:{animationName:"slide-from-right, fade-in"},_closed:{animationName:"slide-to-right, fade-out"}}},none:{}}},defaultVariants:{size:"md",scrollBehavior:"outside",placement:"top",motionPreset:"scale"}}),WM=Re({slots:JP.keys(),className:"chakra-drawer",base:{backdrop:{bg:"blackAlpha.500",pos:"fixed",insetInlineStart:0,top:0,w:"100vw",h:"100dvh","--drawer-z-index":"zIndex.popover",zIndex:"calc(var(--drawer-z-index) + var(--layer-index, 0) - 1)",_open:{animationName:"fade-in",animationDuration:"slow"},_closed:{animationName:"fade-out",animationDuration:"moderate"}},positioner:{display:"flex",width:"100vw",height:"100dvh",position:"fixed",insetInlineStart:0,top:0,"--drawer-z-index":"zIndex.popover",zIndex:"calc(var(--drawer-z-index) + var(--layer-index, 0))",overscrollBehaviorY:"none"},content:{display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,"--drawer-z-index":"zIndex.popover",zIndex:"calc(var(--drawer-z-index) + var(--layer-index, 0))",textStyle:"sm",maxH:"100dvh",color:"inherit",bg:"bg.panel",boxShadow:"lg",_open:{animationDuration:"slowest",animationTimingFunction:"ease-in-smooth"},_closed:{animationDuration:"slower",animationTimingFunction:"ease-in-smooth"}},header:{display:"flex",alignItems:"center",gap:"2",flex:0,px:"6",pt:"6",pb:"4"},body:{px:"6",py:"2",flex:"1",overflow:"auto"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"3",px:"6",pt:"2",pb:"4"},title:{flex:"1",textStyle:"lg",fontWeight:"semibold"},description:{color:"fg.muted"},closeTrigger:{pos:"absolute",top:"3",insetEnd:"2"}},variants:{size:{xs:{content:{maxW:"xs"}},sm:{content:{maxW:"md"}},md:{content:{maxW:"lg"}},lg:{content:{maxW:"2xl"}},xl:{content:{maxW:"4xl"}},full:{content:{maxW:"100vw",h:"100dvh"}}},placement:{start:{positioner:{justifyContent:"flex-start",alignItems:"stretch"},content:{_open:{animationName:{base:"slide-from-left-full, fade-in",_rtl:"slide-from-right-full, fade-in"}},_closed:{animationName:{base:"slide-to-left-full, fade-out",_rtl:"slide-to-right-full, fade-out"}}}},end:{positioner:{justifyContent:"flex-end",alignItems:"stretch"},content:{_open:{animationName:{base:"slide-from-right-full, fade-in",_rtl:"slide-from-left-full, fade-in"}},_closed:{animationName:{base:"slide-to-right-full, fade-out",_rtl:"slide-to-left-full, fade-out"}}}},top:{positioner:{justifyContent:"stretch",alignItems:"flex-start"},content:{maxW:"100%",_open:{animationName:"slide-from-top-full, fade-in"},_closed:{animationName:"slide-to-top-full, fade-out"}}},bottom:{positioner:{justifyContent:"stretch",alignItems:"flex-end"},content:{maxW:"100%",_open:{animationName:"slide-from-bottom-full, fade-in"},_closed:{animationName:"slide-to-bottom-full, fade-out"}}}},contained:{true:{positioner:{padding:"4"},content:{borderRadius:"l3"}}}},defaultVariants:{size:"xs",placement:"end"}}),w5=Fo({fontSize:"inherit",fontWeight:"inherit",textAlign:"inherit",bg:"transparent",borderRadius:"l2"}),YM=Re({slots:eM.keys(),className:"chakra-editable",base:{root:{display:"inline-flex",alignItems:"center",position:"relative",gap:"1.5",width:"full"},preview:{...w5,py:"1",px:"1",display:"inline-flex",alignItems:"center",transitionProperty:"common",transitionDuration:"moderate",cursor:"text",_hover:{bg:"bg.muted"},_disabled:{userSelect:"none"}},input:{...w5,outline:"0",py:"1",px:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",focusVisibleRing:"inside",focusRingWidth:"2px",_placeholder:{opacity:.6}},control:{display:"inline-flex",alignItems:"center",gap:"1.5"}},variants:{size:{sm:{root:{textStyle:"sm"},preview:{minH:"8"},input:{minH:"8"}},md:{root:{textStyle:"sm"},preview:{minH:"9"},input:{minH:"9"}},lg:{root:{textStyle:"md"},preview:{minH:"10"},input:{minH:"10"}}}},defaultVariants:{size:"md"}}),qM=Re({slots:tM.keys(),className:"chakra-empty-state",base:{root:{width:"full"},content:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},indicator:{display:"flex",alignItems:"center",justifyContent:"center",color:"fg.subtle",_icon:{boxSize:"1em"}},title:{fontWeight:"semibold"},description:{textStyle:"sm",color:"fg.muted"}},variants:{size:{sm:{root:{px:"4",py:"6"},title:{textStyle:"md"},content:{gap:"4"},indicator:{textStyle:"2xl"}},md:{root:{px:"8",py:"12"},title:{textStyle:"lg"},content:{gap:"6"},indicator:{textStyle:"4xl"}},lg:{root:{px:"12",py:"16"},title:{textStyle:"xl"},content:{gap:"8"},indicator:{textStyle:"6xl"}}}},defaultVariants:{size:"md"}}),XM=Re({className:"chakra-field",slots:nM.keys(),base:{requiredIndicator:{color:"fg.error",lineHeight:"1"},root:{display:"flex",width:"100%",position:"relative",gap:"1.5"},label:{display:"flex",alignItems:"center",textAlign:"start",textStyle:"sm",fontWeight:"medium",gap:"1",userSelect:"none",_disabled:{opacity:"0.5"}},errorText:{display:"inline-flex",alignItems:"center",fontWeight:"medium",gap:"1",color:"fg.error",textStyle:"xs"},helperText:{color:"fg.muted",textStyle:"xs"}},variants:{orientation:{vertical:{root:{flexDirection:"column",alignItems:"flex-start"}},horizontal:{root:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},label:{flex:"0 0 var(--field-label-width, 80px)"}}}},defaultVariants:{orientation:"vertical"}}),ZM=Re({className:"fieldset",slots:iM.keys(),base:{root:{display:"flex",flexDirection:"column",width:"full"},content:{display:"flex",flexDirection:"column",width:"full"},legend:{color:"fg",fontWeight:"medium",_disabled:{opacity:"0.5"}},helperText:{color:"fg.muted",textStyle:"sm"},errorText:{display:"inline-flex",alignItems:"center",color:"fg.error",gap:"2",fontWeight:"medium",textStyle:"sm"}},variants:{size:{sm:{root:{spaceY:"2"},content:{gap:"1.5"},legend:{textStyle:"sm"}},md:{root:{spaceY:"4"},content:{gap:"4"},legend:{textStyle:"sm"}},lg:{root:{spaceY:"6"},content:{gap:"4"},legend:{textStyle:"md"}}}},defaultVariants:{size:"md"}}),KM=Re({className:"chakra-file-upload",slots:rM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"4",width:"100%",alignItems:"flex-start"},label:{fontWeight:"medium",textStyle:"sm"},dropzone:{background:"bg",borderRadius:"l3",borderWidth:"2px",borderStyle:"dashed",display:"flex",alignItems:"center",flexDirection:"column",gap:"4",justifyContent:"center",minHeight:"2xs",px:"3",py:"2",transition:"backgrounds",focusVisibleRing:"outside",_hover:{bg:"bg.subtle"},_dragging:{bg:"colorPalette.subtle",borderStyle:"solid",borderColor:"colorPalette.solid"}},dropzoneContent:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:"1",textStyle:"sm"},item:{pos:"relative",textStyle:"sm",animationName:"fade-in",animationDuration:"moderate",background:"bg",borderRadius:"l2",borderWidth:"1px",width:"100%",display:"flex",alignItems:"center",gap:"3",p:"4"},itemGroup:{width:"100%",display:"flex",flexDirection:"column",gap:"3",_empty:{display:"none"}},itemName:{color:"fg",fontWeight:"medium",lineClamp:"1"},itemContent:{display:"flex",flexDirection:"column",gap:"0.5",flex:"1"},itemSizeText:{color:"fg.muted",textStyle:"xs"},itemDeleteTrigger:{display:"flex",alignItems:"center",justifyContent:"center",alignSelf:"flex-start",boxSize:"5",p:"2px",color:"fg.muted",cursor:"button"},itemPreview:{color:"fg.muted",_icon:{boxSize:"4.5"}}},defaultVariants:{}}),QM=Re({slots:j_.keys(),className:"chakra-floating-panel",base:{positioner:{"--floating-panel-z-index":"zIndex.popover",zIndex:"calc(var(--floating-panel-z-index) + var(--layer-index, 0))","&:has([data-topmost])":{"--layer-index":"100"},"&:has([data-behind])":{"--layer-index":"-100"}},content:{display:"flex",flexDirection:"column",bg:"bg.panel",borderRadius:"l2",boxShadow:"lg",overflow:"hidden",outline:0,position:"relative",_open:{animationName:"scale-in, fade-in",animationDuration:"moderate"}},dragTrigger:{flex:"1",display:"flex",alignItems:"center",gap:"2",minW:"0"},header:{display:"flex",alignItems:"center",gap:"2",px:"3",py:"2",borderBottomWidth:"1px",bg:"bg.subtle",flex:"none"},title:{fontWeight:"semibold",textStyle:"sm",flex:"1",truncate:!0},body:{flex:"1",overflow:"auto",p:"3",textStyle:"sm"},resizeTrigger:{zIndex:"1","--size":"sizes.2.5",'&[data-axis="n"], &[data-axis="s"]':{h:"var(--size)"},'&[data-axis="e"], &[data-axis="w"]':{w:"var(--size)"},'&[data-axis]:is([data-axis="ne"], [data-axis="nw"], [data-axis="se"], [data-axis="sw"])':{w:"var(--size)",h:"var(--size)"}}}}),JM=Re({className:"chakra-hover-card",slots:B_.keys(),base:{content:{position:"relative",display:"flex",flexDirection:"column",textStyle:"sm","--hovercard-bg":"colors.bg.panel",bg:"var(--hovercard-bg)",boxShadow:"lg",maxWidth:"80",borderRadius:"l3","--hover-card-z-index":"zIndex.popover",zIndex:"calc(var(--hover-card-z-index) + var(--layer-index, 0))",transformOrigin:"var(--transform-origin)",outline:"0",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"faster"}},arrow:{"--arrow-size":"sizes.3","--arrow-background":"var(--hovercard-bg)"},arrowTip:{borderTopWidth:"0.5px",borderLeftWidth:"0.5px"}},variants:{size:{xs:{content:{padding:"3"}},sm:{content:{padding:"4"}},md:{content:{padding:"5"}},lg:{content:{padding:"6"}}}},defaultVariants:{size:"md"}}),eD=Re({className:"chakra-list",slots:oM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"var(--list-gap)","& :where(ul, ol)":{marginTop:"var(--list-gap)"}},item:{whiteSpace:"normal",display:"list-item"},indicator:{marginEnd:"2",minHeight:"1lh",flexShrink:0,display:"inline-block",verticalAlign:"middle"}},variants:{variant:{marker:{root:{listStyle:"revert"},item:{_marker:{color:"fg.subtle"}}},plain:{item:{alignItems:"flex-start",display:"inline-flex"}}},align:{center:{item:{alignItems:"center"}},start:{item:{alignItems:"flex-start"}},end:{item:{alignItems:"flex-end"}}}},defaultVariants:{variant:"marker"}}),tD=Re({className:"chakra-listbox",slots:TM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full"},content:{display:"flex",maxH:"96",p:"1",gap:"1",textStyle:"sm",outline:"none",scrollPadding:"1",_horizontal:{flexDirection:"row",overflowX:"auto"},_vertical:{flexDirection:"column",overflowY:"auto"},"--listbox-item-padding-x":"spacing.2","--listbox-item-padding-y":"spacing.1.5"},item:{position:"relative",userSelect:"none",display:"flex",alignItems:"center",gap:"2",cursor:"pointer",justifyContent:"space-between",flex:"1",textAlign:"start",borderRadius:"l1",py:"var(--listbox-item-padding-y)",px:"var(--listbox-item-padding-x)",_highlighted:{outline:"2px solid",outlineColor:"border.emphasized"},_disabled:{pointerEvents:"none",opacity:"0.5"}},empty:{py:"var(--listbox-item-padding-y)",px:"var(--listbox-item-padding-x)"},itemText:{flex:"1"},itemGroup:{mt:"1.5",_first:{mt:"0"}},itemGroupLabel:{py:"1.5",px:"2",fontWeight:"medium"},label:{fontWeight:"medium",userSelect:"none",textStyle:"sm",_disabled:{layerStyle:"disabled"}},valueText:{lineClamp:"1",maxW:"80%"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center",_icon:{boxSize:"4"}}},variants:{variant:{subtle:{content:{bg:"bg.panel",borderWidth:"1px",borderRadius:"l2"},item:{_hover:{bg:"bg.emphasized/60"},_selected:{bg:"bg.muted"}}},solid:{content:{bg:"bg.panel",borderWidth:"1px",borderRadius:"l2"},item:{_selected:{bg:"colorPalette.solid",color:"colorPalette.contrast"}}},plain:{}}},defaultVariants:{variant:"subtle"}}),nD=Re({className:"chakra-marquee",slots:F_.keys(),base:{root:{position:"relative",width:"100%","--marquee-edge-color":"colors.bg","--marquee-edge-size":"20%","&[data-paused]":{animationPlayState:"paused !important","& *":{animationPlayState:"paused !important"}}},viewport:{overflow:"hidden",display:"flex",width:"100%",height:"100%"},content:{display:"flex",minWidth:"max-content",animationTimingFunction:"linear",animationFillMode:"forwards",animationDuration:"var(--marquee-duration)",animationDelay:"var(--marquee-delay)",animationIterationCount:"var(--marquee-loop-count)",_motionReduce:{animation:"none !important"},"&[data-side='start'], &[data-side='end']":{animationName:"marqueeX"},"&[data-side='top'], &[data-side='bottom']":{animationName:"marqueeY"},"&[data-reverse]":{animationDirection:"reverse"},"&[data-orientation='horizontal']":{flexDirection:"row"},"&[data-orientation='vertical']":{flexDirection:"column"}},edge:{position:"absolute",zIndex:"1",pointerEvents:"none","&[data-side='start']":{width:"var(--marquee-edge-size)",insetY:"0",insetInlineStart:"0",background:"linear-gradient(to right, var(--marquee-edge-color, white), transparent)",_rtl:{background:"linear-gradient(to left, var(--marquee-edge-color, white), transparent)"}},"&[data-side='end']":{width:"var(--marquee-edge-size)",insetY:"0",insetInlineEnd:"0",background:"linear-gradient(to left, var(--marquee-edge-color, white), transparent)",_rtl:{background:"linear-gradient(to right, var(--marquee-edge-color, white), transparent)"}},"&[data-side='top']":{height:"var(--marquee-edge-size)",insetX:"0",top:"0",background:"linear-gradient(to bottom, var(--marquee-edge-color, white), transparent)"},"&[data-side='bottom']":{height:"var(--marquee-edge-size)",insetX:"0",bottom:"0",background:"linear-gradient(to top, var(--marquee-edge-color, white), transparent)"}}}}),iD=Re({className:"chakra-menu",slots:aM.keys(),base:{content:{outline:0,"--menu-bg":"colors.bg.panel",bg:"var(--menu-bg)",boxShadow:"lg",color:"fg",maxHeight:"var(--available-height)","--menu-z-index":"zIndex.popover",zIndex:"calc(var(--menu-z-index) + var(--layer-index, 0))",borderRadius:"l2",overflow:"hidden",overflowY:"auto",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"faster"}},item:{textDecoration:"none",color:"fg",userSelect:"none",borderRadius:"l1",width:"100%",display:"flex",cursor:"menuitem",alignItems:"center",textAlign:"start",position:"relative",flex:"0 0 auto",outline:0,_disabled:{layerStyle:"disabled"},"&[data-type]":{ps:"8"}},itemText:{flex:"1"},itemIndicator:{position:"absolute",insetStart:"2",transform:"translateY(-50%)",top:"50%"},itemGroupLabel:{px:"2",py:"1.5",fontWeight:"semibold",textStyle:"sm"},indicator:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:"0"},itemCommand:{opacity:"0.6",textStyle:"xs",ms:"auto",ps:"4",letterSpacing:"widest",fontFamily:"inherit"},separator:{height:"1px",bg:"bg.muted",my:"1",mx:"-1"},arrow:{"--arrow-size":"sizes.3","--arrow-background":"var(--menu-bg)"},arrowTip:{borderTopWidth:"1px",borderLeftWidth:"1px"}},variants:{variant:{subtle:{item:{_highlighted:{bg:"bg.emphasized/60"}}},solid:{item:{_highlighted:{bg:"colorPalette.solid",color:"colorPalette.contrast"}}}},size:{sm:{content:{minW:"8rem",padding:"1",scrollPadding:"1"},item:{gap:"1",textStyle:"xs",py:"1",px:"1.5"}},md:{content:{minW:"8rem",padding:"1.5",scrollPadding:"1.5"},item:{gap:"2",textStyle:"sm",py:"1.5",px:"2"}}}},defaultVariants:{size:"md",variant:"subtle"}}),Ac=Re({className:"chakra-select",slots:dM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"full",minH:"var(--select-trigger-height)","--input-height":"var(--select-trigger-height)",px:"var(--select-trigger-padding-x)",borderRadius:"l2",userSelect:"none",textAlign:"start",focusVisibleRing:"inside",_placeholderShown:{color:"fg.muted/80"},_disabled:{layerStyle:"disabled"},_invalid:{borderColor:"border.error"}},indicatorGroup:{display:"flex",alignItems:"center",gap:"1",pos:"absolute",insetEnd:"0",top:"0",bottom:"0",px:"var(--select-trigger-padding-x)",pointerEvents:"none"},indicator:{display:"flex",alignItems:"center",justifyContent:"center",color:{base:"fg.muted",_disabled:"fg.subtle",_invalid:"fg.error"}},content:{background:"bg.panel",display:"flex",flexDirection:"column","--select-z-index":"zIndex.popover",zIndex:"calc(var(--select-z-index) + var(--layer-index, 0))",borderRadius:"l2",outline:0,maxH:"96",overflowY:"auto",boxShadow:"md",_open:{animationStyle:"slide-fade-in",animationDuration:"fast"},_closed:{animationStyle:"slide-fade-out",animationDuration:"fastest"}},item:{position:"relative",userSelect:"none",display:"flex",alignItems:"center",gap:"2",cursor:"option",justifyContent:"space-between",flex:"1",textAlign:"start",borderRadius:"l1",_highlighted:{bg:"bg.emphasized/60"},_disabled:{pointerEvents:"none",opacity:"0.5"},_icon:{width:"4",height:"4"}},control:{pos:"relative"},itemText:{flex:"1"},itemGroup:{_first:{mt:"0"}},itemGroupLabel:{py:"1",fontWeight:"medium"},label:{fontWeight:"medium",userSelect:"none",textStyle:"sm",_disabled:{layerStyle:"disabled"}},valueText:{lineClamp:"1",maxW:"80%"},clearTrigger:{color:"fg.muted",pointerEvents:"auto",focusVisibleRing:"inside",focusRingWidth:"2px",rounded:"l1"}},variants:{variant:{outline:{trigger:{bg:"transparent",borderWidth:"1px",borderColor:"border",_expanded:{borderColor:"border.emphasized"}}},subtle:{trigger:{borderWidth:"1px",borderColor:"transparent",bg:"bg.muted"}},ghost:{trigger:{bg:"transparent",_expanded:{bg:"bg.muted"}}}},size:{xs:{root:{"--select-trigger-height":"sizes.8","--select-trigger-padding-x":"spacing.2"},content:{p:"1",gap:"1",textStyle:"xs"},trigger:{textStyle:"xs",gap:"1"},item:{py:"1",px:"2"},itemGroupLabel:{py:"1",px:"2"},indicator:{_icon:{width:"3.5",height:"3.5"}}},sm:{root:{"--select-trigger-height":"sizes.9","--select-trigger-padding-x":"spacing.2.5"},content:{p:"1",textStyle:"sm"},trigger:{textStyle:"sm",gap:"1"},indicator:{_icon:{width:"4",height:"4"}},item:{py:"1",px:"1.5"},itemGroup:{mt:"1"},itemGroupLabel:{py:"1",px:"1.5"}},md:{root:{"--select-trigger-height":"sizes.10","--select-trigger-padding-x":"spacing.3"},content:{p:"1",textStyle:"sm"},itemGroup:{mt:"1.5"},item:{py:"1.5",px:"2"},itemIndicator:{display:"flex",alignItems:"center",justifyContent:"center"},itemGroupLabel:{py:"1.5",px:"2"},trigger:{textStyle:"sm",gap:"2"},indicator:{_icon:{width:"4",height:"4"}}},lg:{root:{"--select-trigger-height":"sizes.12","--select-trigger-padding-x":"spacing.4"},content:{p:"1.5",textStyle:"md"},itemGroup:{mt:"2"},item:{py:"2",px:"3"},itemGroupLabel:{py:"2",px:"3"},trigger:{textStyle:"md",py:"3",gap:"2"},indicator:{_icon:{width:"5",height:"5"}}}}},defaultVariants:{size:"md",variant:"outline"}}),rD=Re({className:"chakra-native-select",slots:sM.keys(),base:{root:{height:"fit-content",display:"flex",width:"100%",position:"relative"},field:{width:"100%",minWidth:"0",outline:"0",appearance:"none",borderRadius:"l2","--error-color":"colors.border.error","--input-height":"var(--select-field-height)",height:"var(--select-field-height)",_disabled:{layerStyle:"disabled"},_invalid:{focusRingColor:"var(--error-color)",borderColor:"var(--error-color)"},focusVisibleRing:"inside",lineHeight:"normal","& > option, & > optgroup":{bg:"bg"}},indicator:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)",height:"100%",color:"fg.muted",_disabled:{opacity:"0.5"},_invalid:{color:"fg.error"},_icon:{width:"1em",height:"1em"}}},variants:{variant:{outline:{field:Ac.variants?.variant.outline.trigger},subtle:{field:Ac.variants?.variant.subtle.trigger},plain:{field:{bg:"transparent",color:"fg",focusRingWidth:"2px"}},ghost:{field:Ac.variants?.variant.ghost.trigger}},size:{xs:{root:{"--select-field-height":"sizes.8"},field:{textStyle:"xs",ps:"2",pe:"6"},indicator:{textStyle:"sm",insetEnd:"1.5"}},sm:{root:{"--select-field-height":"sizes.9"},field:{textStyle:"sm",ps:"2.5",pe:"8"},indicator:{textStyle:"md",insetEnd:"2"}},md:{root:{"--select-field-height":"sizes.10"},field:{textStyle:"sm",ps:"3",pe:"8"},indicator:{textStyle:"lg",insetEnd:"2"}},lg:{root:{"--select-field-height":"sizes.11"},field:{textStyle:"md",ps:"4",pe:"8"},indicator:{textStyle:"xl",insetEnd:"3"}},xl:{root:{"--select-field-height":"sizes.12"},field:{textStyle:"md",ps:"4.5",pe:"10"},indicator:{textStyle:"xl",insetEnd:"3"}}}},defaultVariants:Ac.defaultVariants}),C5=Fo({display:"flex",justifyContent:"center",alignItems:"center",flex:"1",userSelect:"none",cursor:"button",lineHeight:"1",color:"fg.muted","--stepper-base-radius":"radii.l1","--stepper-radius":"calc(var(--stepper-base-radius) + 1px)",_icon:{boxSize:"1em"},_disabled:{opacity:"0.5"},_hover:{bg:"bg.muted"},_active:{bg:"bg.emphasized"}}),oD=Re({className:"chakra-number-input",slots:U_.keys(),base:{root:{position:"relative",zIndex:"0",isolation:"isolate"},input:{...Vt.base,verticalAlign:"top",pe:"calc(var(--stepper-width) + 0.5rem)"},control:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",width:"var(--stepper-width)",height:"calc(100% - 2px)",zIndex:"1",borderStartWidth:"1px",divideY:"1px"},incrementTrigger:{...C5,borderTopEndRadius:"var(--stepper-radius)"},decrementTrigger:{...C5,borderBottomEndRadius:"var(--stepper-radius)"},valueText:{fontWeight:"medium",fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums"}},variants:{size:{xs:{input:Vt.variants.size.xs,control:{fontSize:"2xs","--stepper-width":"sizes.4"}},sm:{input:Vt.variants.size.sm,control:{fontSize:"xs","--stepper-width":"sizes.5"}},md:{input:Vt.variants.size.md,control:{fontSize:"sm","--stepper-width":"sizes.6"}},lg:{input:Vt.variants.size.lg,control:{fontSize:"sm","--stepper-width":"sizes.6"}}},variant:Li(Vt.variants.variant,(e,t)=>[e,{input:t}])},defaultVariants:{size:"md",variant:"outline"}}),{variants:E5,defaultVariants:aD}=Vt,sD=Re({className:"chakra-pin-input",slots:W_.keys(),base:{input:{...Vt.base,textAlign:"center",width:"var(--input-height)"},control:{display:"inline-flex",gap:"2",isolation:"isolate"}},variants:{size:Li(E5.size,(e,t)=>[e,{input:{...t,px:"1"}}]),variant:Li(E5.variant,(e,t)=>[e,{input:t}]),attached:{true:{control:{gap:"0",spaceX:"-1px"},input:{_notFirst:{borderStartRadius:"0"},_notLast:{borderEndRadius:"0"},_focusVisible:{zIndex:"1"}}}}},defaultVariants:aD}),lD=Re({className:"chakra-popover",slots:lM.keys(),base:{content:{position:"relative",display:"flex",flexDirection:"column",textStyle:"sm","--popover-bg":"colors.bg.panel",bg:"var(--popover-bg)",boxShadow:"lg","--popover-size":"sizes.xs","--popover-mobile-size":"calc(100dvw - 1rem)",width:{base:"min(var(--popover-mobile-size), var(--popover-size))",sm:"var(--popover-size)"},borderRadius:"l3","--popover-z-index":"zIndex.popover",zIndex:"calc(var(--popover-z-index) + var(--layer-index, 0))",outline:"0",transformOrigin:"var(--transform-origin)",maxHeight:"var(--available-height)",_open:{animationStyle:"scale-fade-in",animationDuration:"fast"},_closed:{animationStyle:"scale-fade-out",animationDuration:"faster"}},header:{paddingInline:"var(--popover-padding)",paddingTop:"var(--popover-padding)"},body:{padding:"var(--popover-padding)",flex:"1"},footer:{display:"flex",alignItems:"center",paddingInline:"var(--popover-padding)",paddingBottom:"var(--popover-padding)"},arrow:{"--arrow-size":"sizes.3","--arrow-background":"var(--popover-bg)"},arrowTip:{borderTopWidth:"1px",borderLeftWidth:"1px"}},variants:{size:{xs:{content:{"--popover-padding":"spacing.3"}},sm:{content:{"--popover-padding":"spacing.4"}},md:{content:{"--popover-padding":"spacing.5"}},lg:{content:{"--popover-padding":"spacing.6"}}}},defaultVariants:{size:"md"}}),cD=Re({slots:Yv.keys(),className:"chakra-progress",base:{root:{textStyle:"sm",position:"relative"},track:{overflow:"hidden",position:"relative"},range:{display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"width, height",transitionDuration:"slow",height:"100%",bgColor:"var(--track-color)",_indeterminate:{"--animate-from-x":"-40%","--animate-to-x":"100%",position:"absolute",willChange:"left",minWidth:"50%",animation:"position 1s ease infinite normal none running",backgroundImage:"linear-gradient(to right, transparent 0%, var(--track-color) 50%, transparent 100%)"}},label:{display:"inline-flex",fontWeight:"medium",alignItems:"center",gap:"1"},valueText:{textStyle:"xs",lineHeight:"1",fontWeight:"medium"}},variants:{variant:{outline:{track:{shadow:"inset",bgColor:"bg.muted"},range:{bgColor:"colorPalette.solid"}},subtle:{track:{bgColor:"colorPalette.muted"},range:{bgColor:"colorPalette.solid/72"}}},shape:{square:{},rounded:{track:{borderRadius:"l1"}},full:{track:{borderRadius:"full"}}},striped:{true:{range:{backgroundImage:"linear-gradient(45deg, var(--stripe-color) 25%, transparent 25%, transparent 50%, var(--stripe-color) 50%, var(--stripe-color) 75%, transparent 75%, transparent)",backgroundSize:"var(--stripe-size) var(--stripe-size)","--stripe-size":"1rem","--stripe-color":{_light:"rgba(255, 255, 255, 0.3)",_dark:"rgba(0, 0, 0, 0.3)"}}}},animated:{true:{range:{"--animate-from":"var(--stripe-size)",animation:"bg-position 1s linear infinite"}}},size:{xs:{track:{h:"1.5"}},sm:{track:{h:"2"}},md:{track:{h:"2.5"}},lg:{track:{h:"3"}},xl:{track:{h:"4"}}}},defaultVariants:{variant:"outline",size:"md",shape:"rounded"}}),uD=Re({className:"chakra-progress-circle",slots:Yv.keys(),base:{root:{display:"inline-flex",textStyle:"sm",position:"relative"},circle:{_indeterminate:{animation:"spin 2s linear infinite"}},circleTrack:{"--track-color":"colors.colorPalette.muted",stroke:"var(--track-color)"},circleRange:{stroke:"colorPalette.solid",transitionProperty:"stroke-dashoffset, stroke-dasharray",transitionDuration:"0.6s",_indeterminate:{animation:"circular-progress 1.5s linear infinite"}},label:{display:"inline-flex"},valueText:{lineHeight:"1",fontWeight:"medium",letterSpacing:"tight",fontVariantNumeric:"tabular-nums"}},variants:{size:{xs:{circle:{"--size":"24px","--thickness":"4px"},valueText:{textStyle:"2xs"}},sm:{circle:{"--size":"32px","--thickness":"5px"},valueText:{textStyle:"2xs"}},md:{circle:{"--size":"40px","--thickness":"6px"},valueText:{textStyle:"xs"}},lg:{circle:{"--size":"48px","--thickness":"7px"},valueText:{textStyle:"sm"}},xl:{circle:{"--size":"64px","--thickness":"8px"},valueText:{textStyle:"sm"}}}},defaultVariants:{size:"md"}}),dD=Re({slots:q_.keys(),className:"chakra-qr-code",base:{root:{position:"relative",width:"fit-content","--qr-code-overlay-size":"calc(var(--qr-code-size) / 3)"},frame:{width:"var(--qr-code-size)",height:"var(--qr-code-size)",fill:"currentColor"},overlay:{display:"flex",alignItems:"center",justifyContent:"center",width:"var(--qr-code-overlay-size)",height:"var(--qr-code-overlay-size)",padding:"1",bg:"bg",rounded:"l1"}},variants:{size:{"2xs":{root:{"--qr-code-size":"40px"}},xs:{root:{"--qr-code-size":"64px"}},sm:{root:{"--qr-code-size":"80px"}},md:{root:{"--qr-code-size":"120px"}},lg:{root:{"--qr-code-size":"160px"}},xl:{root:{"--qr-code-size":"200px"}},"2xl":{root:{"--qr-code-size":"240px"}},full:{root:{"--qr-code-size":"100%"}}}},defaultVariants:{size:"md"}}),fD=Re({className:"chakra-radio-card",slots:cM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1.5",isolation:"isolate"},item:{flex:"1",display:"flex",flexDirection:"column",userSelect:"none",position:"relative",borderRadius:"l2",_focus:{bg:"colorPalette.muted/20"},_disabled:{opacity:"0.5"},_checked:{zIndex:"1"}},label:{display:"inline-flex",fontWeight:"medium",textStyle:"sm",_disabled:{opacity:"0.5"}},itemText:{fontWeight:"medium",flex:"1"},itemDescription:{opacity:"0.64",textStyle:"sm"},itemControl:{display:"inline-flex",flex:"1",pos:"relative",rounded:"inherit",justifyContent:"var(--radio-card-justify)",alignItems:"var(--radio-card-align)",_disabled:{bg:"bg.muted"}},itemIndicator:vn.base,itemAddon:{roundedBottom:"inherit",_disabled:{color:"fg.muted"}},itemContent:{display:"flex",flexDirection:"column",flex:"1",gap:"1",justifyContent:"var(--radio-card-justify)",alignItems:"var(--radio-card-align)"}},variants:{size:{sm:{item:{textStyle:"sm"},itemControl:{padding:"3",gap:"1.5"},itemAddon:{px:"3",py:"1.5",borderTopWidth:"1px"},itemIndicator:vn.variants?.size.sm},md:{item:{textStyle:"sm"},itemControl:{padding:"4",gap:"2.5"},itemAddon:{px:"4",py:"2",borderTopWidth:"1px"},itemIndicator:vn.variants?.size.md},lg:{item:{textStyle:"md"},itemControl:{padding:"4",gap:"3.5"},itemAddon:{px:"4",py:"2",borderTopWidth:"1px"},itemIndicator:vn.variants?.size.lg}},variant:{surface:{item:{borderWidth:"1px",_checked:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderColor:"colorPalette.muted"}},itemIndicator:vn.variants?.variant.solid},subtle:{item:{bg:"bg.muted"},itemControl:{_checked:{bg:"colorPalette.muted",color:"colorPalette.fg"}},itemIndicator:vn.variants?.variant.outline},outline:{item:{borderWidth:"1px",_checked:{boxShadow:"inset 0 0 0 1px var(--shadow-color)",boxShadowColor:"colorPalette.solid",borderColor:"colorPalette.solid"}},itemControl:{_disabled:{bg:"unset"}},itemIndicator:vn.variants?.variant.solid},solid:{item:{borderWidth:"1px",_checked:{bg:"colorPalette.solid",color:"colorPalette.contrast",borderColor:"colorPalette.solid"}},itemControl:{_disabled:{bg:"unset"}},itemIndicator:vn.variants?.variant.inverted}},justify:{start:{item:{"--radio-card-justify":"flex-start"}},end:{item:{"--radio-card-justify":"flex-end"}},center:{item:{"--radio-card-justify":"center"}}},align:{start:{item:{"--radio-card-align":"flex-start"},itemControl:{textAlign:"start"}},end:{item:{"--radio-card-align":"flex-end"},itemControl:{textAlign:"end"}},center:{item:{"--radio-card-align":"center"},itemControl:{textAlign:"center"}}},orientation:{vertical:{itemControl:{flexDirection:"column"}},horizontal:{itemControl:{flexDirection:"row"}}}},defaultVariants:{size:"md",variant:"outline",align:"start",orientation:"horizontal"}}),hD=Re({className:"chakra-radio-group",slots:A6.keys(),base:{item:{display:"inline-flex",alignItems:"center",position:"relative",fontWeight:"medium",_disabled:{cursor:"disabled"}},itemControl:vn.base,label:{userSelect:"none",textStyle:"sm",_disabled:{opacity:"0.5"}}},variants:{variant:{outline:{itemControl:vn.variants?.variant?.outline},subtle:{itemControl:vn.variants?.variant?.subtle},solid:{itemControl:vn.variants?.variant?.solid}},size:{xs:{item:{textStyle:"xs",gap:"1.5"},itemControl:vn.variants?.size?.xs},sm:{item:{textStyle:"sm",gap:"2"},itemControl:vn.variants?.size?.sm},md:{item:{textStyle:"sm",gap:"2.5"},itemControl:vn.variants?.size?.md},lg:{item:{textStyle:"md",gap:"3"},itemControl:vn.variants?.size?.lg}}},defaultVariants:{size:"md",variant:"solid"}}),gD=Re({className:"chakra-rating-group",slots:uM.keys(),base:{root:{display:"inline-flex"},control:{display:"inline-flex",alignItems:"center"},item:{display:"inline-flex",alignItems:"center",justifyContent:"center",userSelect:"none"},itemIndicator:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1em",height:"1em",position:"relative","--clip-path":{base:"inset(0 50% 0 0)",_rtl:"inset(0 0 0 50%)"},_icon:{stroke:"currentColor",width:"100%",height:"100%",display:"inline-block",flexShrink:0,position:"absolute",left:0,top:0},"& [data-bg]":{color:"bg.emphasized"},"& [data-fg]":{color:"transparent"},"&[data-highlighted]:not([data-half])":{"& [data-fg]":{color:"colorPalette.solid"}},"&[data-half]":{"& [data-fg]":{color:"colorPalette.solid",clipPath:"var(--clip-path)"}}}},variants:{size:{xs:{item:{textStyle:"sm"}},sm:{item:{textStyle:"md"}},md:{item:{textStyle:"xl"}},lg:{item:{textStyle:"2xl"}}}},defaultVariants:{size:"md"}}),pD=Re({className:"chakra-scroll-area",slots:Z_.keys(),base:{root:{display:"flex",flexDirection:"column",width:"100%",height:"100%",position:"relative",overflow:"hidden","--scrollbar-margin":"2px","--scrollbar-click-area":"calc(var(--scrollbar-size) + calc(var(--scrollbar-margin) * 2))"},viewport:{display:"flex",flexDirection:"column",height:"100%",width:"100%",borderRadius:"inherit",WebkitOverflowScrolling:"touch",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},content:{minWidth:"100%"},scrollbar:{display:"flex",userSelect:"none",touchAction:"none",borderRadius:"full",colorPalette:"gray",transition:"opacity 150ms 300ms",position:"relative",margin:"var(--scrollbar-margin)","&:not([data-overflow-x], [data-overflow-y])":{display:"none"},bg:"{colors.colorPalette.solid/10}","--thumb-bg":"{colors.colorPalette.solid/25}","&:is(:hover, :active)":{"--thumb-bg":"{colors.colorPalette.solid/50}"},_before:{content:'""',position:"absolute"},_vertical:{width:"var(--scrollbar-size)",flexDirection:"column","&::before":{width:"var(--scrollbar-click-area)",height:"100%",insetInlineStart:"calc(var(--scrollbar-margin) * -1)"}},_horizontal:{height:"var(--scrollbar-size)",flexDirection:"row","&::before":{height:"var(--scrollbar-click-area)",width:"100%",top:"calc(var(--scrollbar-margin) * -1)"}}},thumb:{borderRadius:"inherit",bg:"var(--thumb-bg)",transition:"backgrounds",_vertical:{width:"full"},_horizontal:{height:"full"}},corner:{bg:"bg.muted",margin:"var(--scrollbar-margin)",opacity:0,transition:"opacity 150ms 300ms","&[data-hover]":{transitionDelay:"0ms",opacity:1}}},variants:{variant:{hover:{scrollbar:{opacity:"0","&[data-hover], &[data-scrolling]":{opacity:"1",transitionDuration:"faster",transitionDelay:"0ms"}}},always:{scrollbar:{opacity:"1"}}},size:{xs:{root:{"--scrollbar-size":"sizes.1"}},sm:{root:{"--scrollbar-size":"sizes.1.5"}},md:{root:{"--scrollbar-size":"sizes.2"}},lg:{root:{"--scrollbar-size":"sizes.3"}}}},defaultVariants:{size:"md",variant:"hover"}}),mD=Re({className:"chakra-segment-group",slots:K_.keys(),base:{root:{"--segment-radius":"radii.l2","--segment-indicator-bg":{_light:"colors.bg",_dark:"colors.bg.emphasized"},"--segment-indicator-shadow":"shadows.sm",borderRadius:"var(--segment-radius)",display:"inline-flex",boxShadow:"inset",minW:"max-content",textAlign:"center",position:"relative",isolation:"isolate",bg:"bg.muted",_vertical:{flexDirection:"column"}},item:{display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",fontSize:"sm",position:"relative",color:"fg",borderRadius:"var(--segment-radius)",_disabled:{opacity:"0.5"},"&:has(input:focus-visible)":{focusRing:"outside"},_before:{content:'""',position:"absolute",bg:"border",transition:"opacity 0.2s"},_horizontal:{_before:{insetInlineStart:0,insetBlock:"1.5",width:"1px"}},_vertical:{_before:{insetBlockStart:0,insetInline:"1.5",height:"1px"}},"& + &[data-state=checked], &[data-state=checked] + &, &:first-of-type":{_before:{opacity:"0"}},"&[data-state=checked][data-ssr]":{shadow:"sm",bg:"bg",borderRadius:"var(--segment-radius)"}},indicator:{shadow:"var(--segment-indicator-shadow)",pos:"absolute",bg:"var(--segment-indicator-bg)",width:"var(--width)",height:"var(--height)",top:"var(--top)",left:"var(--left)",zIndex:-1,borderRadius:"var(--segment-radius)"}},variants:{size:{xs:{item:{textStyle:"xs",px:"3",gap:"1",height:"6"}},sm:{item:{textStyle:"sm",px:"4",gap:"2",height:"8"}},md:{item:{textStyle:"sm",px:"4",gap:"2",height:"10"}},lg:{item:{textStyle:"md",px:"4.5",gap:"3",height:"11"}}}},defaultVariants:{size:"md"}}),vD=Re({className:"chakra-slider",slots:hM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1",textStyle:"sm",position:"relative",isolation:"isolate",touchAction:"none"},label:{fontWeight:"medium",textStyle:"sm"},control:{display:"inline-flex",alignItems:"center",position:"relative"},track:{overflow:"hidden",borderRadius:"full",flex:"1"},range:{width:"inherit",height:"inherit",_disabled:{bg:"border.emphasized!"}},markerGroup:{position:"absolute!",zIndex:"1"},marker:{"--marker-bg":{base:"white",_underValue:"colors.bg"},display:"flex",alignItems:"center",gap:"calc(var(--slider-thumb-size) / 2)",color:"fg.muted",textStyle:"xs"},markerIndicator:{width:"var(--slider-marker-size)",height:"var(--slider-marker-size)",borderRadius:"full",bg:"var(--marker-bg)"},thumb:{width:"var(--slider-thumb-size)",height:"var(--slider-thumb-size)",display:"flex",alignItems:"center",justifyContent:"center",outline:0,zIndex:"2",borderRadius:"full",transition:"shadow",_focusVisible:{ring:"3px",ringColor:"colorPalette.focusRing/50"}}},variants:{size:{sm:{root:{"--slider-thumb-size":"sizes.4","--slider-track-size":"sizes.1.5","--slider-marker-center":"6px","--slider-marker-size":"sizes.1","--slider-marker-inset":"3px"}},md:{root:{"--slider-thumb-size":"sizes.5","--slider-track-size":"sizes.2","--slider-marker-center":"8px","--slider-marker-size":"sizes.1","--slider-marker-inset":"4px"}},lg:{root:{"--slider-thumb-size":"sizes.6","--slider-track-size":"sizes.2.5","--slider-marker-center":"9px","--slider-marker-size":"sizes.1.5","--slider-marker-inset":"5px"}}},variant:{outline:{track:{shadow:"inset",bg:"bg.emphasized/72"},range:{bg:"colorPalette.solid"},thumb:{borderWidth:"2px",borderColor:"colorPalette.solid",bg:"bg",_disabled:{bg:"border.emphasized",borderColor:"border.emphasized"}}},solid:{track:{bg:"colorPalette.subtle",_disabled:{bg:"bg.muted"}},range:{bg:"colorPalette.solid"},thumb:{bg:"colorPalette.solid",_disabled:{bg:"border.emphasized"}}}},orientation:{vertical:{root:{display:"inline-flex"},control:{flexDirection:"column",height:"100%",minWidth:"var(--slider-thumb-size)","&:has(.chakra-slider__markerLabel)":{marginEnd:"4"}},track:{width:"var(--slider-track-size)"},thumb:{left:"50%",translate:"-50% 0"},markerGroup:{insetStart:"var(--slider-marker-center)",insetBlock:"var(--slider-marker-inset)"},marker:{flexDirection:"row"}},horizontal:{control:{flexDirection:"row",width:"100%",minHeight:"var(--slider-thumb-size)","&:has(.chakra-slider__markerLabel)":{marginBottom:"4"}},track:{height:"var(--slider-track-size)"},thumb:{top:"50%",translate:"0 -50%"},markerGroup:{top:"var(--slider-marker-center)",insetInline:"var(--slider-marker-inset)"},marker:{flexDirection:"column"}}}},defaultVariants:{size:"md",variant:"outline",orientation:"horizontal"}}),bD=Re({slots:EM.keys(),className:"splitter",base:{resizeTrigger:{"--splitter-border-color":"colors.border","--splitter-thumb-color":"colors.bg","--splitter-thumb-size":"sizes.2","--splitter-thumb-inset":"calc(var(--splitter-thumb-size) * -0.5)","--splitter-border-size":"1px","--splitter-handle-size":"sizes.6",outline:"0",display:"grid",placeItems:"center",position:"relative",_focus:{"--splitter-border-color":"colors.border.emphasized","--splitter-thumb-color":"colors.colorPalette.subtle"},_dragging:{"--splitter-thumb-color":"colors.colorPalette.focusRing"},_horizontal:{minWidth:"var(--splitter-thumb-size)",marginInline:"var(--splitter-thumb-inset)"},_vertical:{minHeight:"var(--splitter-thumb-size)",marginBlock:"var(--splitter-thumb-inset)"}},resizeTriggerSeparator:{position:"absolute",bg:"var(--splitter-border-color)","[data-part='resize-trigger'][data-orientation=horizontal] &":{insetInlineEnd:"calc(var(--splitter-thumb-size) * 0.5)",insetBlock:"0",insetInlineStart:"auto",w:"var(--splitter-border-size)"},"[data-part='resize-trigger'][data-orientation=vertical] &":{insetBlockEnd:"calc(var(--splitter-thumb-size) * 0.5)",insetInline:"0",insetBlockStart:"auto",h:"var(--splitter-border-size)"}},resizeTriggerIndicator:{position:"relative",rounded:"full",bg:"var(--splitter-thumb-color)",shadow:"xs",borderWidth:"1px",zIndex:"1","[data-part='resize-trigger'][data-orientation=horizontal] &":{w:"full",h:"var(--splitter-handle-size)"},"[data-part='resize-trigger'][data-orientation=vertical] &":{w:"var(--splitter-handle-size)",h:"full"},"[data-part='resize-trigger'][data-focus]:focus-visible &":{outlineWidth:"2px",outlineColor:"colorPalette.focusRing",outlineStyle:"solid"},"[data-part='resize-trigger'][data-disabled] &":{visibility:"hidden"}}}}),yD=Re({className:"chakra-stat",slots:gM.keys(),base:{root:{display:"flex",flexDirection:"column",gap:"1",position:"relative",flex:"1"},label:{display:"inline-flex",gap:"1.5",alignItems:"center",color:"fg.muted",textStyle:"sm"},helpText:{color:"fg.muted",textStyle:"xs"},valueUnit:{color:"fg.muted",textStyle:"xs",fontWeight:"initial",letterSpacing:"initial"},valueText:{verticalAlign:"baseline",fontWeight:"semibold",letterSpacing:"tight",fontFeatureSettings:"pnum",fontVariantNumeric:"proportional-nums",display:"inline-flex",gap:"1"},indicator:{display:"inline-flex",alignItems:"center",justifyContent:"center",marginEnd:1,"& :where(svg)":{w:"1em",h:"1em"},"&[data-type=up]":{color:"fg.success"},"&[data-type=down]":{color:"fg.error"}}},variants:{size:{sm:{valueText:{textStyle:"xl"}},md:{valueText:{textStyle:"2xl"}},lg:{valueText:{textStyle:"3xl"}}}},defaultVariants:{size:"md"}}),xD=Re({className:"chakra-status",slots:pM.keys(),base:{root:{display:"inline-flex",alignItems:"center",gap:"2"},indicator:{width:"0.64em",height:"0.64em",flexShrink:0,borderRadius:"full",forcedColorAdjust:"none",bg:"colorPalette.solid"}},variants:{size:{sm:{root:{textStyle:"xs"}},md:{root:{textStyle:"sm"}},lg:{root:{textStyle:"md"}}}},defaultVariants:{size:"md"}}),SD=Re({className:"chakra-steps",slots:mM.keys(),base:{root:{display:"flex",width:"full"},list:{display:"flex",justifyContent:"space-between","--steps-gutter":"spacing.3","--steps-thickness":"2px"},title:{fontWeight:"medium",color:"fg"},description:{color:"fg.muted"},separator:{bg:"border",flex:"1"},indicator:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0",borderRadius:"full",fontWeight:"medium",width:"var(--steps-size)",height:"var(--steps-size)",_icon:{flexShrink:"0",width:"var(--steps-icon-size)",height:"var(--steps-icon-size)"}},item:{position:"relative",display:"flex",gap:"3",flex:"1 0 0","&:last-of-type":{flex:"initial","& [data-part=separator]":{display:"none"}}},trigger:{display:"flex",alignItems:"center",gap:"3",textAlign:"start",focusVisibleRing:"outside",borderRadius:"l2"},content:{focusVisibleRing:"outside"}},variants:{orientation:{vertical:{root:{flexDirection:"row",height:"100%"},list:{flexDirection:"column",alignItems:"flex-start"},separator:{position:"absolute",width:"var(--steps-thickness)",height:"100%",maxHeight:"calc(100% - var(--steps-size) - var(--steps-gutter) * 2)",top:"calc(var(--steps-size) + var(--steps-gutter))",insetStart:"calc(var(--steps-size) / 2 - 1px)"},item:{alignItems:"flex-start"}},horizontal:{root:{flexDirection:"column",width:"100%"},list:{flexDirection:"row",alignItems:"center"},separator:{width:"100%",height:"var(--steps-thickness)",marginX:"var(--steps-gutter)"},item:{alignItems:"center"}}},variant:{solid:{indicator:{_incomplete:{borderWidth:"var(--steps-thickness)"},_current:{bg:"colorPalette.muted",borderWidth:"var(--steps-thickness)",borderColor:"colorPalette.solid",color:"colorPalette.fg"},_complete:{bg:"colorPalette.solid",borderColor:"colorPalette.solid",color:"colorPalette.contrast"}},separator:{_complete:{bg:"colorPalette.solid"}}},subtle:{indicator:{_incomplete:{bg:"bg.muted"},_current:{bg:"colorPalette.muted",color:"colorPalette.fg"},_complete:{bg:"colorPalette.emphasized",color:"colorPalette.fg"}},separator:{_complete:{bg:"colorPalette.emphasized"}}}},size:{xs:{root:{gap:"2.5"},list:{"--steps-size":"sizes.6","--steps-icon-size":"sizes.3.5",textStyle:"xs"},title:{textStyle:"sm"}},sm:{root:{gap:"3"},list:{"--steps-size":"sizes.8","--steps-icon-size":"sizes.4",textStyle:"xs"},title:{textStyle:"sm"}},md:{root:{gap:"4"},list:{"--steps-size":"sizes.10","--steps-icon-size":"sizes.4",textStyle:"sm"},title:{textStyle:"sm"}},lg:{root:{gap:"6"},list:{"--steps-size":"sizes.11","--steps-icon-size":"sizes.5",textStyle:"md"},title:{textStyle:"md"}}}},defaultVariants:{size:"md",variant:"solid",orientation:"horizontal"}}),_D=Re({slots:vM.keys(),className:"chakra-switch",base:{root:{display:"inline-flex",gap:"2.5",alignItems:"center",position:"relative",verticalAlign:"middle","--switch-diff":"calc(var(--switch-width) - var(--switch-height))","--switch-x":{base:"var(--switch-diff)",_rtl:"calc(var(--switch-diff) * -1)"}},label:{lineHeight:"1",userSelect:"none",fontSize:"sm",fontWeight:"medium",_disabled:{opacity:"0.5"}},indicator:{position:"absolute",height:"var(--switch-height)",width:"var(--switch-height)",fontSize:"var(--switch-indicator-font-size)",fontWeight:"medium",flexShrink:0,userSelect:"none",display:"grid",placeContent:"center",transition:"inset-inline-start 0.12s ease",insetInlineStart:"calc(var(--switch-x) - 2px)",_checked:{insetInlineStart:"2px"}},control:{display:"inline-flex",gap:"0.5rem",flexShrink:0,justifyContent:"flex-start",cursor:"switch",borderRadius:"full",position:"relative",width:"var(--switch-width)",height:"var(--switch-height)",transition:"backgrounds",_disabled:{opacity:"0.5",cursor:"not-allowed"},_invalid:{outline:"2px solid",outlineColor:"border.error",outlineOffset:"2px"}},thumb:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transitionProperty:"translate",transitionDuration:"fast",borderRadius:"inherit",_checked:{translate:"var(--switch-x) 0"}}},variants:{variant:{solid:{control:{borderRadius:"full",bg:"bg.emphasized",focusVisibleRing:"outside",_checked:{bg:"colorPalette.solid"}},thumb:{bg:"white",width:"var(--switch-height)",height:"var(--switch-height)",scale:"0.8",boxShadow:"sm",_checked:{bg:"colorPalette.contrast"}}},raised:{control:{borderRadius:"full",height:"calc(var(--switch-height) / 2)",bg:"bg.muted",boxShadow:"inset",_checked:{bg:"colorPalette.solid/60"}},thumb:{width:"var(--switch-height)",height:"var(--switch-height)",position:"relative",top:"calc(var(--switch-height) * -0.25)",bg:"white",boxShadow:"xs",focusVisibleRing:"outside",_checked:{bg:"colorPalette.solid"}}}},size:{xs:{root:{"--switch-width":"sizes.6","--switch-height":"sizes.3","--switch-indicator-font-size":"fontSizes.xs"}},sm:{root:{"--switch-width":"sizes.8","--switch-height":"sizes.4","--switch-indicator-font-size":"fontSizes.xs"}},md:{root:{"--switch-width":"sizes.10","--switch-height":"sizes.5","--switch-indicator-font-size":"fontSizes.sm"}},lg:{root:{"--switch-width":"sizes.12","--switch-height":"sizes.6","--switch-indicator-font-size":"fontSizes.md"}}}},defaultVariants:{variant:"solid",size:"md"}}),wD=Re({className:"chakra-table",slots:bM.keys(),base:{root:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full",textAlign:"start",verticalAlign:"top"},row:{_selected:{bg:"colorPalette.subtle"}},cell:{textAlign:"start",alignItems:"center"},columnHeader:{fontWeight:"medium",textAlign:"start",color:"fg"},caption:{fontWeight:"medium",textStyle:"xs"},footer:{fontWeight:"medium"}},variants:{interactive:{true:{body:{"& tr":{_hover:{bg:"colorPalette.subtle"}}}}},stickyHeader:{true:{header:{"& :where(tr)":{top:"var(--table-sticky-offset, 0)",position:"sticky",zIndex:1}}}},striped:{true:{row:{"&:nth-of-type(odd) td":{bg:"bg.muted"}}}},showColumnBorder:{true:{columnHeader:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}},cell:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}}}},variant:{line:{columnHeader:{borderBottomWidth:"1px"},cell:{borderBottomWidth:"1px"},row:{bg:"bg"}},outline:{root:{boxShadow:"0 0 0 1px {colors.border}"},columnHeader:{borderBottomWidth:"1px"},header:{bg:"bg.muted"},row:{"&:not(:last-of-type)":{borderBottomWidth:"1px"}},footer:{borderTopWidth:"1px"}}},size:{sm:{root:{textStyle:"sm"},columnHeader:{px:"2",py:"2"},cell:{px:"2",py:"2"}},md:{root:{textStyle:"sm"},columnHeader:{px:"3",py:"3"},cell:{px:"3",py:"3"}},lg:{root:{textStyle:"md"},columnHeader:{px:"4",py:"3"},cell:{px:"4",py:"3"}}}},defaultVariants:{variant:"line",size:"md"}}),CD=Re({slots:xM.keys(),className:"chakra-tabs",base:{root:{"--tabs-trigger-radius":"radii.l2","--tabs-indicator-shadow":"shadows.xs","--tabs-indicator-bg":"colors.bg",position:"relative",_horizontal:{display:"block"},_vertical:{display:"flex"}},list:{display:"inline-flex",position:"relative",isolation:"isolate",minH:"var(--tabs-height)",_horizontal:{flexDirection:"row"},_vertical:{flexDirection:"column"}},trigger:{outline:"0",minW:"var(--tabs-height)",height:"var(--tabs-height)",display:"flex",alignItems:"center",fontWeight:"medium",position:"relative",cursor:"button",gap:"2",_focusVisible:{zIndex:1,outline:"2px solid",outlineColor:"colorPalette.focusRing"},_disabled:{cursor:"not-allowed",opacity:.5}},content:{focusVisibleRing:"inside",_horizontal:{width:"100%",pt:"var(--tabs-content-padding)"},_vertical:{height:"100%",ps:"var(--tabs-content-padding)"}},indicator:{width:"var(--width)",height:"var(--height)",borderRadius:"var(--tabs-trigger-radius)",bg:"var(--tabs-indicator-bg)",shadow:"var(--tabs-indicator-shadow)",zIndex:-1}},variants:{fitted:{true:{list:{display:"flex"},trigger:{flex:1,textAlign:"center",justifyContent:"center"}}},justify:{start:{list:{justifyContent:"flex-start"}},center:{list:{justifyContent:"center"}},end:{list:{justifyContent:"flex-end"}}},size:{sm:{root:{"--tabs-height":"sizes.9","--tabs-content-padding":"spacing.3"},trigger:{py:"1",px:"3",textStyle:"sm"}},md:{root:{"--tabs-height":"sizes.10","--tabs-content-padding":"spacing.4"},trigger:{py:"2",px:"4",textStyle:"sm"}},lg:{root:{"--tabs-height":"sizes.11","--tabs-content-padding":"spacing.4.5"},trigger:{py:"2",px:"4.5",textStyle:"md"}}},variant:{line:{list:{display:"flex",borderColor:"border",_horizontal:{borderBottomWidth:"1px"},_vertical:{borderEndWidth:"1px"}},trigger:{color:"fg.muted",_disabled:{_active:{bg:"initial"}},_selected:{color:"fg",_horizontal:{layerStyle:"indicator.bottom","--indicator-offset-y":"-1px","--indicator-color":"colors.colorPalette.solid"},_vertical:{layerStyle:"indicator.end","--indicator-offset-x":"-1px"}}}},subtle:{trigger:{borderRadius:"var(--tabs-trigger-radius)",color:"fg.muted",_selected:{bg:"colorPalette.subtle",color:"colorPalette.fg"}}},enclosed:{list:{bg:"bg.muted",padding:"1",borderRadius:"l3",minH:"calc(var(--tabs-height) - 4px)"},trigger:{justifyContent:"center",color:"fg.muted",borderRadius:"var(--tabs-trigger-radius)",_selected:{bg:"bg",color:"colorPalette.fg",shadow:"xs"}}},outline:{list:{"--line-thickness":"1px","--line-offset":"calc(var(--line-thickness) * -1)",borderColor:"border",display:"flex",_horizontal:{_before:{content:'""',position:"absolute",bottom:"0px",width:"100%",borderBottomWidth:"var(--line-thickness)",borderBottomColor:"border"}},_vertical:{_before:{content:'""',position:"absolute",insetInline:"var(--line-offset)",height:"calc(100% - calc(var(--line-thickness) * 2))",borderEndWidth:"var(--line-thickness)",borderEndColor:"border"}}},trigger:{color:"fg.muted",borderWidth:"1px",borderColor:"transparent",_selected:{bg:"currentBg",color:"colorPalette.fg"},_horizontal:{borderTopRadius:"var(--tabs-trigger-radius)",marginBottom:"var(--line-offset)",marginEnd:{_notLast:"var(--line-offset)"},_selected:{borderColor:"border",borderBottomColor:"transparent"}},_vertical:{borderStartRadius:"var(--tabs-trigger-radius)",marginEnd:"var(--line-offset)",marginBottom:{_notLast:"var(--line-offset)"},_selected:{borderColor:"border",borderEndColor:"transparent"}}}},plain:{trigger:{color:"fg.muted",_selected:{color:"colorPalette.fg"},borderRadius:"var(--tabs-trigger-radius)","&[data-selected][data-ssr]":{bg:"var(--tabs-indicator-bg)",shadow:"var(--tabs-indicator-shadow)",borderRadius:"var(--tabs-trigger-radius)"}}}}},defaultVariants:{size:"md",variant:"line"}}),Kd=Qv.variants?.variant,ED=Re({slots:SM.keys(),className:"chakra-tag",base:{root:{display:"inline-flex",alignItems:"center",verticalAlign:"top",maxWidth:"100%",userSelect:"none",borderRadius:"l2",focusVisibleRing:"outside"},label:{lineClamp:"1"},closeTrigger:{display:"flex",alignItems:"center",justifyContent:"center",outline:"0",borderRadius:"l1",color:"currentColor",focusVisibleRing:"inside",focusRingWidth:"2px"},startElement:{flexShrink:0,boxSize:"var(--tag-element-size)",ms:"var(--tag-element-offset)","&:has([data-scope=avatar])":{boxSize:"var(--tag-avatar-size)",ms:"calc(var(--tag-element-offset) * 1.5)"},_icon:{boxSize:"100%"}},endElement:{flexShrink:0,boxSize:"var(--tag-element-size)",me:"var(--tag-element-offset)",_icon:{boxSize:"100%"},"&:has(button)":{ms:"calc(var(--tag-element-offset) * -1)"}}},variants:{size:{sm:{root:{px:"1.5",minH:"4.5",gap:"1","--tag-avatar-size":"spacing.3","--tag-element-size":"spacing.3","--tag-element-offset":"-2px"},label:{textStyle:"xs"}},md:{root:{px:"1.5",minH:"5",gap:"1","--tag-avatar-size":"spacing.3.5","--tag-element-size":"spacing.3.5","--tag-element-offset":"-2px"},label:{textStyle:"xs"}},lg:{root:{px:"2",minH:"6",gap:"1.5","--tag-avatar-size":"spacing.4.5","--tag-element-size":"spacing.4","--tag-element-offset":"-3px"},label:{textStyle:"sm"}},xl:{root:{px:"2.5",minH:"8",gap:"1.5","--tag-avatar-size":"spacing.6","--tag-element-size":"spacing.4.5","--tag-element-offset":"-4px"},label:{textStyle:"sm"}}},variant:{subtle:{root:Kd?.subtle},solid:{root:Kd?.solid},outline:{root:Kd?.outline},surface:{root:Kd?.surface}}},defaultVariants:{size:"md",variant:"surface"}}),TD=Re({slots:ow.keys(),className:"tags-input",base:{root:{display:"flex",flexDirection:"column",gap:"1.5",width:"full"},label:{fontWeight:"medium",textStyle:"sm",_disabled:{opacity:"0.5"}},control:{"--focus-color":"colors.colorPalette.focusRing","--error-color":"colors.border.error",minH:"var(--tags-input-height)","--input-height":"var(--tags-input-height)",px:"var(--tags-input-px)",py:"var(--tags-input-py)",gap:"var(--tags-input-gap)",display:"flex",flexWrap:"wrap",alignItems:"center",borderRadius:"l2",pos:"relative",transitionProperty:"border-color, box-shadow",transitionDuration:"normal",_disabled:{opacity:"0.5"},_invalid:{borderColor:"var(--error-color)"}},input:{flex:"1",minWidth:"20",outline:"none",bg:"transparent",color:"fg",px:"calc(var(--tags-input-item-px) / 1.25)",height:"var(--tags-input-item-height)",_readOnly:{display:"none"}},item:{maxWidth:"100%",minWidth:"0"},itemText:{lineClamp:"1",minWidth:"0"},itemInput:{outline:"none",bg:"transparent",minWidth:"2ch",color:"inherit",px:"var(--tags-input-item-px)",height:"var(--tags-input-item-height)"},itemPreview:{height:"var(--tags-input-item-height)",userSelect:"none",display:"inline-flex",alignItems:"center",gap:"1",rounded:"l1",px:"var(--tags-input-item-px)",maxWidth:"100%"},itemDeleteTrigger:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:"0",boxSize:"calc(var(--tags-input-item-height) / 1.5)",cursor:{base:"button",_disabled:"initial"},me:"-1",opacity:"0.4",_hover:{opacity:"1"},"[data-highlighted] &":{opacity:"1"},_icon:{boxSize:"80%"}},clearTrigger:{display:"flex",alignItems:"center",justifyContent:"center",boxSize:"calc(var(--tags-input-item-height) / 1.5)",cursor:{base:"button",_disabled:"initial"},color:"fg.muted",focusVisibleRing:"inside",focusRingWidth:"2px",rounded:"l1",_icon:{boxSize:"5"}}},variants:{size:{xs:{root:{"--tags-input-height":"sizes.8","--tags-input-px":"spacing.1.5","--tags-input-py":"spacing.1","--tags-input-gap":"spacing.1","--tags-input-item-height":"sizes.6","--tags-input-item-px":"spacing.2",textStyle:"xs"}},sm:{root:{"--tags-input-height":"sizes.9","--tags-input-px":"spacing.1.5","--tags-input-py":"spacing.1","--tags-input-gap":"spacing.1","--tags-input-item-height":"sizes.6","--tags-input-item-px":"spacing.2",textStyle:"sm"}},md:{root:{"--tags-input-height":"sizes.10","--tags-input-px":"spacing.1.5","--tags-input-py":"spacing.1","--tags-input-gap":"spacing.1","--tags-input-item-height":"sizes.7","--tags-input-item-px":"spacing.2",textStyle:"sm"}},lg:{root:{"--tags-input-height":"sizes.11","--tags-input-px":"spacing.1.5","--tags-input-py":"spacing.1","--tags-input-gap":"spacing.1","--tags-input-item-height":"sizes.8","--tags-input-item-px":"spacing.2",textStyle:"md"}}},variant:{outline:{control:{borderWidth:"1px",bg:"bg",_focus:{outlineWidth:"1px",outlineStyle:"solid",outlineColor:"var(--focus-color)",borderColor:"var(--focus-color)",_invalid:{outlineColor:"var(--error-color)",borderColor:"var(--error-color)"}}},itemPreview:{bg:"colorPalette.subtle",_highlighted:{bg:"colorPalette.muted"}}},subtle:{control:{bg:"bg.muted",borderWidth:"1px",borderColor:"transparent",_focus:{outlineWidth:"1px",outlineStyle:"solid",outlineColor:"var(--focus-color)",borderColor:"var(--focus-color)",_invalid:{outlineColor:"var(--error-color)",borderColor:"var(--error-color)"}}},itemPreview:{bg:"bg",borderWidth:"1px",_highlighted:{bg:"colorPalette.subtle",borderColor:"colorPalette.emphasized"}}},flushed:{control:{borderRadius:"0",px:"0",bg:"transparent",borderBottomWidth:"1px",borderBottomColor:"border",_focus:{borderColor:"var(--focus-color)",boxShadow:"0px 1px 0px 0px var(--focus-color)"}},itemPreview:{bg:"colorPalette.subtle",_highlighted:{bg:"colorPalette.muted"}}}}},defaultVariants:{size:"md",variant:"outline"}}),kD=Re({slots:_M.keys(),className:"chakra-timeline",base:{root:{display:"flex",flexDirection:"column",width:"full","--timeline-thickness":"1px","--timeline-gutter":"4px"},item:{"--timeline-content-gap":"spacing.6",display:"flex",position:"relative",alignItems:"flex-start",flexShrink:0,gap:"4",_last:{"--timeline-content-gap":"0"}},separator:{display:"var(--timeline-separator-display)",position:"absolute",borderStartWidth:"var(--timeline-thickness)",ms:"calc(-1 * var(--timeline-thickness) / 2)",insetInlineStart:"calc(var(--timeline-indicator-size) / 2)",insetBlock:"0",borderColor:"border"},indicator:{outline:"2px solid {colors.bg}",position:"relative",flexShrink:"0",boxSize:"var(--timeline-indicator-size)",fontSize:"var(--timeline-font-size)",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"full",fontWeight:"medium"},connector:{alignSelf:"stretch",position:"relative"},content:{pb:"var(--timeline-content-gap)",display:"flex",flexDirection:"column",width:"full",gap:"2"},title:{display:"flex",fontWeight:"medium",flexWrap:"wrap",gap:"1.5",alignItems:"center",mt:"var(--timeline-margin)"},description:{color:"fg.muted",textStyle:"xs"}},variants:{variant:{subtle:{indicator:{bg:"colorPalette.muted"}},solid:{indicator:{bg:"colorPalette.solid",color:"colorPalette.contrast"}},outline:{indicator:{bg:"currentBg",borderWidth:"1px",borderColor:"colorPalette.muted"}},plain:{}},showLastSeparator:{true:{item:{_last:{"--timeline-separator-display":"initial"}}},false:{item:{_last:{"--timeline-separator-display":"none"}}}},size:{sm:{root:{"--timeline-indicator-size":"sizes.4","--timeline-font-size":"fontSizes.2xs"},title:{textStyle:"xs"}},md:{root:{"--timeline-indicator-size":"sizes.5","--timeline-font-size":"fontSizes.xs"},title:{textStyle:"sm"}},lg:{root:{"--timeline-indicator-size":"sizes.6","--timeline-font-size":"fontSizes.xs"},title:{mt:"0.5",textStyle:"sm"}},xl:{root:{"--timeline-indicator-size":"sizes.8","--timeline-font-size":"fontSizes.sm"},title:{mt:"1.5",textStyle:"sm"}}}},defaultVariants:{size:"md",variant:"solid",showLastSeparator:!1}}),zD=Re({slots:yM.keys(),className:"chakra-toast",base:{root:{width:"full",display:"flex",alignItems:"flex-start",position:"relative",gap:"3",py:"4",ps:"4",pe:"6",borderRadius:"l2",translate:"var(--x) var(--y)",scale:"var(--scale)",zIndex:"var(--z-index)",height:"var(--height)",opacity:"var(--opacity)",willChange:"translate, opacity, scale",transition:"translate 400ms, scale 400ms, opacity 400ms, height 400ms, box-shadow 200ms",transitionTimingFunction:"cubic-bezier(0.21, 1.02, 0.73, 1)",_closed:{transition:"translate 400ms, scale 400ms, opacity 200ms",transitionTimingFunction:"cubic-bezier(0.06, 0.71, 0.55, 1)"},bg:"bg.panel",color:"fg",boxShadow:"xl","--toast-trigger-bg":"colors.bg.muted","&[data-type=warning]":{bg:"orange.solid",color:"orange.contrast","--toast-trigger-bg":"{white/10}","--toast-border-color":"{white/40}"},"&[data-type=success]":{bg:"green.solid",color:"green.contrast","--toast-trigger-bg":"{white/10}","--toast-border-color":"{white/40}"},"&[data-type=error]":{bg:"red.solid",color:"red.contrast","--toast-trigger-bg":"{white/10}","--toast-border-color":"{white/40}"}},title:{fontWeight:"medium",textStyle:"sm",marginEnd:"2"},description:{display:"inline",textStyle:"sm",opacity:"0.8"},indicator:{flexShrink:"0",boxSize:"5"},actionTrigger:{textStyle:"sm",fontWeight:"medium",height:"8",px:"3",borderRadius:"l2",alignSelf:"center",borderWidth:"1px",borderColor:"var(--toast-border-color, inherit)",transition:"background 200ms",_hover:{bg:"var(--toast-trigger-bg)"}},closeTrigger:{position:"absolute",top:"1",insetEnd:"1",padding:"1",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"{currentColor/60}",borderRadius:"l2",textStyle:"md",transition:"background 200ms",_icon:{boxSize:"1em"}}}}),RD=Re({slots:aw.keys(),className:"chakra-tooltip",base:{content:{"--tooltip-bg":"colors.bg.inverted",bg:"var(--tooltip-bg)",color:"fg.inverted",px:"2.5",py:"1",borderRadius:"l2",fontWeight:"medium",textStyle:"xs",boxShadow:"md",maxW:"xs",zIndex:"tooltip",transformOrigin:"var(--transform-origin)",_open:{animationStyle:"scale-fade-in",animationDuration:"fast"},_closed:{animationStyle:"scale-fade-out",animationDuration:"fast"}},arrow:{"--arrow-size":"sizes.2","--arrow-background":"var(--tooltip-bg)"},arrowTip:{borderTopWidth:"1px",borderLeftWidth:"1px",borderColor:"var(--tooltip-bg)"}}}),T5=Fo({display:"flex",alignItems:"center",gap:"var(--tree-item-gap)",rounded:"l2",userSelect:"none",position:"relative","--tree-depth":"calc(var(--depth) - 1)","--tree-indentation-offset":"calc(var(--tree-indentation) * var(--tree-depth))","--tree-offset":"calc(var(--tree-padding-inline) + var(--tree-indentation-offset))",ps:"var(--tree-offset)",pe:"var(--tree-padding-inline)",py:"var(--tree-padding-block)",focusVisibleRing:"inside",focusRingColor:"border.emphasized",focusRingWidth:"2px","&:hover, &:focus-visible":{bg:"bg.muted"},_disabled:{layerStyle:"disabled"}}),k5=Fo({flex:"1"}),z5=Fo({_selected:{bg:"colorPalette.subtle",color:"colorPalette.fg"}}),R5=Fo({_selected:{layerStyle:"fill.solid"}}),AD=Re({slots:sw.keys(),className:"chakra-tree-view",base:{root:{width:"full",display:"flex",flexDirection:"column",gap:"2"},tree:{display:"flex",flexDirection:"column","--tree-item-gap":"spacing.2","--tree-indentation":"calc(var(--tree-indent-size) + var(--tree-icon-size) * 0.5)",_icon:{boxSize:"var(--tree-icon-size)"}},label:{fontWeight:"medium",textStyle:"sm"},branch:{position:"relative"},branchContent:{position:"relative"},branchIndentGuide:{height:"100%",width:"1px",bg:"border",position:"absolute","--tree-depth":"calc(var(--depth) - 1)","--tree-indentation-offset":"calc(var(--tree-indentation) * var(--tree-depth))","--tree-offset":"calc(var(--tree-padding-inline) + var(--tree-indentation-offset))",insetInlineStart:"calc(var(--tree-offset) + var(--tree-icon-size) * 0.5)",zIndex:"1"},branchIndicator:{color:"fg.muted",transformOrigin:"center",transitionDuration:"normal",transitionProperty:"transform",transitionTimingFunction:"default",_open:{transform:"rotate(90deg)"}},branchTrigger:{display:"inline-flex",alignItems:"center",justifyContent:"center"},branchControl:T5,item:T5,itemText:k5,branchText:k5,nodeCheckbox:{display:"inline-flex"}},variants:{size:{md:{tree:{textStyle:"sm","--tree-indent-size":"spacing.4","--tree-icon-size":"spacing.4","--tree-padding-inline":"spacing.3","--tree-padding-block":"spacing.1.5"}},sm:{tree:{textStyle:"sm","--tree-indent-size":"spacing.4","--tree-icon-size":"spacing.3","--tree-padding-inline":"spacing.3","--tree-padding-block":"spacing.1"}},xs:{tree:{textStyle:"xs","--tree-indent-size":"spacing.4","--tree-icon-size":"spacing.3","--tree-padding-inline":"spacing.2","--tree-padding-block":"spacing.1"}}},variant:{subtle:{branchControl:z5,item:z5},solid:{branchControl:R5,item:R5}},animateContent:{true:{branchContent:{_open:{animationName:"expand-height, fade-in",animationDuration:"moderate"},_closed:{animationName:"collapse-height, fade-out",animationDuration:"moderate"}}}}},defaultVariants:{size:"md",variant:"subtle"}}),OD={accordion:kM,actionBar:zM,alert:RM,avatar:AM,blockquote:OM,breadcrumb:NM,card:IM,carousel:PM,checkbox:MM,checkboxCard:DM,codeBlock:LM,collapsible:jM,dataList:VM,dateInput:HM,datePicker:$M,dialog:UM,drawer:WM,editable:YM,emptyState:qM,field:XM,fieldset:ZM,fileUpload:KM,hoverCard:JM,list:eD,listbox:tD,menu:iD,nativeSelect:rD,numberInput:oD,pinInput:sD,popover:lD,progress:cD,progressCircle:uD,radioCard:fD,radioGroup:hD,ratingGroup:gD,scrollArea:pD,segmentGroup:mD,select:Ac,combobox:GM,slider:vD,splitter:bD,stat:yD,steps:SD,switch:_D,table:wD,tabs:CD,tag:ED,tagsInput:TD,toast:zD,tooltip:RD,status:xD,timeline:kD,colorPicker:BM,qrCode:dD,treeView:AD,marquee:nD,floatingPanel:QM},ND=WN({"2xs":{value:{fontSize:"2xs",lineHeight:"0.75rem"}},xs:{value:{fontSize:"xs",lineHeight:"1rem"}},sm:{value:{fontSize:"sm",lineHeight:"1.25rem"}},md:{value:{fontSize:"md",lineHeight:"1.5rem"}},lg:{value:{fontSize:"lg",lineHeight:"1.75rem"}},xl:{value:{fontSize:"xl",lineHeight:"1.875rem"}},"2xl":{value:{fontSize:"2xl",lineHeight:"2rem"}},"3xl":{value:{fontSize:"3xl",lineHeight:"2.375rem"}},"4xl":{value:{fontSize:"4xl",lineHeight:"2.75rem",letterSpacing:"-0.025em"}},"5xl":{value:{fontSize:"5xl",lineHeight:"3.75rem",letterSpacing:"-0.025em"}},"6xl":{value:{fontSize:"6xl",lineHeight:"4.5rem",letterSpacing:"-0.025em"}},"7xl":{value:{fontSize:"7xl",lineHeight:"5.75rem",letterSpacing:"-0.025em"}},none:{value:{}},label:{value:{fontSize:"sm",lineHeight:"1.25rem",fontWeight:"medium"}}}),ID=$t.animations({spin:{value:"spin 1s linear infinite"},ping:{value:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite"},pulse:{value:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"},bounce:{value:"bounce 1s infinite"}}),PD=$t.aspectRatios({square:{value:"1 / 1"},landscape:{value:"4 / 3"},portrait:{value:"3 / 4"},wide:{value:"16 / 9"},ultrawide:{value:"18 / 5"},golden:{value:"1.618 / 1"}}),MD=$t.blurs({none:{value:" "},sm:{value:"4px"},md:{value:"8px"},lg:{value:"12px"},xl:{value:"16px"},"2xl":{value:"24px"},"3xl":{value:"40px"},"4xl":{value:"64px"}}),DD=$t.borders({xs:{value:"0.5px solid"},sm:{value:"1px solid"},md:{value:"2px solid"},lg:{value:"4px solid"},xl:{value:"8px solid"}}),LD=$t.colors({transparent:{value:"transparent"},current:{value:"currentColor"},black:{value:"#09090B"},white:{value:"#FFFFFF"},whiteAlpha:{50:{value:"rgba(255, 255, 255, 0.04)"},100:{value:"rgba(255, 255, 255, 0.06)"},200:{value:"rgba(255, 255, 255, 0.08)"},300:{value:"rgba(255, 255, 255, 0.16)"},400:{value:"rgba(255, 255, 255, 0.24)"},500:{value:"rgba(255, 255, 255, 0.36)"},600:{value:"rgba(255, 255, 255, 0.48)"},700:{value:"rgba(255, 255, 255, 0.64)"},800:{value:"rgba(255, 255, 255, 0.80)"},900:{value:"rgba(255, 255, 255, 0.92)"},950:{value:"rgba(255, 255, 255, 0.95)"}},blackAlpha:{50:{value:"rgba(0, 0, 0, 0.04)"},100:{value:"rgba(0, 0, 0, 0.06)"},200:{value:"rgba(0, 0, 0, 0.08)"},300:{value:"rgba(0, 0, 0, 0.16)"},400:{value:"rgba(0, 0, 0, 0.24)"},500:{value:"rgba(0, 0, 0, 0.36)"},600:{value:"rgba(0, 0, 0, 0.48)"},700:{value:"rgba(0, 0, 0, 0.64)"},800:{value:"rgba(0, 0, 0, 0.80)"},900:{value:"rgba(0, 0, 0, 0.92)"},950:{value:"rgba(0, 0, 0, 0.95)"}},gray:{50:{value:"#fafafa"},100:{value:"#f4f4f5"},200:{value:"#e4e4e7"},300:{value:"#d4d4d8"},400:{value:"#a1a1aa"},500:{value:"#71717a"},600:{value:"#52525b"},700:{value:"#3f3f46"},800:{value:"#27272a"},900:{value:"#18181b"},950:{value:"#111111"}},red:{50:{value:"#fef2f2"},100:{value:"#fee2e2"},200:{value:"#fecaca"},300:{value:"#fca5a5"},400:{value:"#f87171"},500:{value:"#ef4444"},600:{value:"#dc2626"},700:{value:"#991919"},800:{value:"#511111"},900:{value:"#300c0c"},950:{value:"#1f0808"}},orange:{50:{value:"#fff7ed"},100:{value:"#ffedd5"},200:{value:"#fed7aa"},300:{value:"#fdba74"},400:{value:"#fb923c"},500:{value:"#f97316"},600:{value:"#ea580c"},700:{value:"#92310a"},800:{value:"#6c2710"},900:{value:"#3b1106"},950:{value:"#220a04"}},yellow:{50:{value:"#fefce8"},100:{value:"#fef9c3"},200:{value:"#fef08a"},300:{value:"#fde047"},400:{value:"#facc15"},500:{value:"#eab308"},600:{value:"#ca8a04"},700:{value:"#845209"},800:{value:"#713f12"},900:{value:"#422006"},950:{value:"#281304"}},green:{50:{value:"#f0fdf4"},100:{value:"#dcfce7"},200:{value:"#bbf7d0"},300:{value:"#86efac"},400:{value:"#4ade80"},500:{value:"#22c55e"},600:{value:"#16a34a"},700:{value:"#116932"},800:{value:"#124a28"},900:{value:"#042713"},950:{value:"#03190c"}},teal:{50:{value:"#f0fdfa"},100:{value:"#ccfbf1"},200:{value:"#99f6e4"},300:{value:"#5eead4"},400:{value:"#2dd4bf"},500:{value:"#14b8a6"},600:{value:"#0d9488"},700:{value:"#0c5d56"},800:{value:"#114240"},900:{value:"#032726"},950:{value:"#021716"}},blue:{50:{value:"#eff6ff"},100:{value:"#dbeafe"},200:{value:"#bfdbfe"},300:{value:"#a3cfff"},400:{value:"#60a5fa"},500:{value:"#3b82f6"},600:{value:"#2563eb"},700:{value:"#173da6"},800:{value:"#1a3478"},900:{value:"#14204a"},950:{value:"#0c142e"}},cyan:{50:{value:"#ecfeff"},100:{value:"#cffafe"},200:{value:"#a5f3fc"},300:{value:"#67e8f9"},400:{value:"#22d3ee"},500:{value:"#06b6d4"},600:{value:"#0891b2"},700:{value:"#0c5c72"},800:{value:"#134152"},900:{value:"#072a38"},950:{value:"#051b24"}},purple:{50:{value:"#faf5ff"},100:{value:"#f3e8ff"},200:{value:"#e9d5ff"},300:{value:"#d8b4fe"},400:{value:"#c084fc"},500:{value:"#a855f7"},600:{value:"#9333ea"},700:{value:"#641ba3"},800:{value:"#4a1772"},900:{value:"#2f0553"},950:{value:"#1a032e"}},pink:{50:{value:"#fdf2f8"},100:{value:"#fce7f3"},200:{value:"#fbcfe8"},300:{value:"#f9a8d4"},400:{value:"#f472b6"},500:{value:"#ec4899"},600:{value:"#db2777"},700:{value:"#a41752"},800:{value:"#6d0e34"},900:{value:"#45061f"},950:{value:"#2c0514"}}}),jD=$t.cursor({button:{value:"pointer"},checkbox:{value:"default"},disabled:{value:"not-allowed"},menuitem:{value:"default"},option:{value:"default"},radio:{value:"default"},slider:{value:"default"},switch:{value:"pointer"}}),BD=$t.durations({fastest:{value:"50ms"},faster:{value:"100ms"},fast:{value:"150ms"},moderate:{value:"200ms"},slow:{value:"300ms"},slower:{value:"400ms"},slowest:{value:"500ms"}}),GD=$t.easings({"ease-in":{value:"cubic-bezier(0.42, 0, 1, 1)"},"ease-out":{value:"cubic-bezier(0, 0, 0.58, 1)"},"ease-in-out":{value:"cubic-bezier(0.42, 0, 0.58, 1)"},"ease-in-smooth":{value:"cubic-bezier(0.32, 0.72, 0, 1)"}}),VD=$t.fontSizes({"2xs":{value:"0.625rem"},xs:{value:"0.75rem"},sm:{value:"0.875rem"},md:{value:"1rem"},lg:{value:"1.125rem"},xl:{value:"1.25rem"},"2xl":{value:"1.5rem"},"3xl":{value:"1.875rem"},"4xl":{value:"2.25rem"},"5xl":{value:"3rem"},"6xl":{value:"3.75rem"},"7xl":{value:"4.5rem"},"8xl":{value:"6rem"},"9xl":{value:"8rem"}}),HD=$t.fontWeights({thin:{value:"100"},extralight:{value:"200"},light:{value:"300"},normal:{value:"400"},medium:{value:"500"},semibold:{value:"600"},bold:{value:"700"},extrabold:{value:"800"},black:{value:"900"}}),A5='-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',FD=$t.fonts({heading:{value:`Inter, ${A5}`},body:{value:`Inter, ${A5}`},mono:{value:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'}}),$D=$N({spin:{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}},pulse:{"50%":{opacity:"0.5"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}},"bg-position":{from:{backgroundPosition:"var(--animate-from, 1rem) 0"},to:{backgroundPosition:"var(--animate-to, 0) 0"}},position:{from:{insetInlineStart:"var(--animate-from-x)",insetBlockStart:"var(--animate-from-y)"},to:{insetInlineStart:"var(--animate-to-x)",insetBlockStart:"var(--animate-to-y)"}},"circular-progress":{"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100%"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260%"}},"expand-height":{from:{height:"var(--collapsed-height, 0)"},to:{height:"var(--height)"}},"collapse-height":{from:{height:"var(--height)"},to:{height:"var(--collapsed-height, 0)"}},"expand-width":{from:{width:"var(--collapsed-width, 0)"},to:{width:"var(--width)"}},"collapse-width":{from:{width:"var(--width)"},to:{width:"var(--collapsed-width, 0)"}},"fade-in":{from:{opacity:0},to:{opacity:1}},"fade-out":{from:{opacity:1},to:{opacity:0}},"slide-from-left-full":{from:{translate:"-100% 0"},to:{translate:"0 0"}},"slide-from-right-full":{from:{translate:"100% 0"},to:{translate:"0 0"}},"slide-from-top-full":{from:{translate:"0 -100%"},to:{translate:"0 0"}},"slide-from-bottom-full":{from:{translate:"0 100%"},to:{translate:"0 0"}},"slide-to-left-full":{from:{translate:"0 0"},to:{translate:"-100% 0"}},"slide-to-right-full":{from:{translate:"0 0"},to:{translate:"100% 0"}},"slide-to-top-full":{from:{translate:"0 0"},to:{translate:"0 -100%"}},"slide-to-bottom-full":{from:{translate:"0 0"},to:{translate:"0 100%"}},"slide-from-top":{"0%":{translate:"0 calc(var(--slide-from-top-distance, 0.5rem) * -1)"},to:{translate:"0"}},"slide-from-bottom":{"0%":{translate:"0 var(--slide-from-bottom-distance, 0.5rem)"},to:{translate:"0"}},"slide-from-left":{"0%":{translate:"calc(var(--slide-from-left-distance, 0.5rem) * -1) 0"},to:{translate:"0"}},"slide-from-right":{"0%":{translate:"var(--slide-from-right-distance, 0.5rem) 0"},to:{translate:"0"}},"slide-to-top":{"0%":{translate:"0"},to:{translate:"0 calc(var(--slide-to-top-distance, 0.5rem) * -1)"}},"slide-to-bottom":{"0%":{translate:"0"},to:{translate:"0 var(--slide-to-bottom-distance, 0.5rem)"}},"slide-to-left":{"0%":{translate:"0"},to:{translate:"calc(var(--slide-to-left-distance, 0.5rem) * -1) 0"}},"slide-to-right":{"0%":{translate:"0"},to:{translate:"var(--slide-to-right-distance, 0.5rem) 0"}},"scale-in":{from:{scale:"0.95"},to:{scale:"1"}},"scale-out":{from:{scale:"1"},to:{scale:"0.95"}},marqueeX:{from:{transform:"translateX(0%)"},to:{transform:"translateX(var(--marquee-translate))"}},marqueeY:{from:{transform:"translateY(0%)"},to:{transform:"translateY(var(--marquee-translate))"}}}),UD=$t.letterSpacings({tighter:{value:"-0.05em"},tight:{value:"-0.025em"},wide:{value:"0.025em"},wider:{value:"0.05em"},widest:{value:"0.1em"}}),WD=$t.lineHeights({shorter:{value:1.25},short:{value:1.375},moderate:{value:1.5},tall:{value:1.625},taller:{value:2}}),YD=$t.radii({none:{value:"0"},"2xs":{value:"0.0625rem"},xs:{value:"0.125rem"},sm:{value:"0.25rem"},md:{value:"0.375rem"},lg:{value:"0.5rem"},xl:{value:"0.75rem"},"2xl":{value:"1rem"},"3xl":{value:"1.5rem"},"4xl":{value:"2rem"},full:{value:"9999px"}}),O6=$t.spacing({.5:{value:"0.125rem"},1:{value:"0.25rem"},1.5:{value:"0.375rem"},2:{value:"0.5rem"},2.5:{value:"0.625rem"},3:{value:"0.75rem"},3.5:{value:"0.875rem"},4:{value:"1rem"},4.5:{value:"1.125rem"},5:{value:"1.25rem"},6:{value:"1.5rem"},7:{value:"1.75rem"},8:{value:"2rem"},9:{value:"2.25rem"},10:{value:"2.5rem"},11:{value:"2.75rem"},12:{value:"3rem"},14:{value:"3.5rem"},16:{value:"4rem"},20:{value:"5rem"},24:{value:"6rem"},28:{value:"7rem"},32:{value:"8rem"},36:{value:"9rem"},40:{value:"10rem"},44:{value:"11rem"},48:{value:"12rem"},52:{value:"13rem"},56:{value:"14rem"},60:{value:"15rem"},64:{value:"16rem"},72:{value:"18rem"},80:{value:"20rem"},96:{value:"24rem"}}),qD=$t.sizes({"3xs":{value:"14rem"},"2xs":{value:"16rem"},xs:{value:"20rem"},sm:{value:"24rem"},md:{value:"28rem"},lg:{value:"32rem"},xl:{value:"36rem"},"2xl":{value:"42rem"},"3xl":{value:"48rem"},"4xl":{value:"56rem"},"5xl":{value:"64rem"},"6xl":{value:"72rem"},"7xl":{value:"80rem"},"8xl":{value:"90rem"}}),XD=$t.sizes({max:{value:"max-content"},min:{value:"min-content"},fit:{value:"fit-content"},prose:{value:"60ch"},full:{value:"100%"},dvh:{value:"100dvh"},svh:{value:"100svh"},lvh:{value:"100lvh"},dvw:{value:"100dvw"},svw:{value:"100svw"},lvw:{value:"100lvw"},vw:{value:"100vw"},vh:{value:"100vh"}}),ZD=$t.sizes({"1/2":{value:"50%"},"1/3":{value:"33.333333%"},"2/3":{value:"66.666667%"},"1/4":{value:"25%"},"3/4":{value:"75%"},"1/5":{value:"20%"},"2/5":{value:"40%"},"3/5":{value:"60%"},"4/5":{value:"80%"},"1/6":{value:"16.666667%"},"2/6":{value:"33.333333%"},"3/6":{value:"50%"},"4/6":{value:"66.666667%"},"5/6":{value:"83.333333%"},"1/12":{value:"8.333333%"},"2/12":{value:"16.666667%"},"3/12":{value:"25%"},"4/12":{value:"33.333333%"},"5/12":{value:"41.666667%"},"6/12":{value:"50%"},"7/12":{value:"58.333333%"},"8/12":{value:"66.666667%"},"9/12":{value:"75%"},"10/12":{value:"83.333333%"},"11/12":{value:"91.666667%"}}),KD=$t.sizes({...qD,...O6,...ZD,...XD}),QD=$t.zIndex({hide:{value:-1},base:{value:0},docked:{value:10},dropdown:{value:1e3},sticky:{value:1100},banner:{value:1200},overlay:{value:1300},modal:{value:1400},popover:{value:1500},skipNav:{value:1600},toast:{value:1700},tooltip:{value:1800},max:{value:2147483647}}),JD={aspectRatios:PD,animations:ID,blurs:MD,borders:DD,colors:LD,durations:BD,easings:GD,fonts:FD,fontSizes:VD,fontWeights:HD,letterSpacings:UD,lineHeights:WD,radii:YD,spacing:O6,sizes:KD,zIndex:QD,cursor:jD},eL={colors:GP,shadows:HP,radii:VP},tL="chakra",nL=":where(html, .chakra-theme)",iL=s6({preflight:!0,cssVarsPrefix:tL,cssVarsRoot:nL,globalCss:xP,theme:{breakpoints:yP,keyframes:$D,tokens:JD,semanticTokens:eL,recipes:BP,slotRecipes:OD,textStyles:ND,layerStyles:SP,animationStyles:_P}}),rL=o6(nI,iL),oL=vP(rL),N6=di("div",{base:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},variants:{axis:{horizontal:{insetStart:"50%",translate:"-50%",_rtl:{translate:"50%"}},vertical:{top:"50%",translate:"0 -50%"},both:{insetStart:"50%",top:"50%",translate:"-50% -50%",_rtl:{translate:"50% -50%"}}}},defaultVariants:{axis:"both"}});N6.displayName="AbsoluteCenter";const I6=e=>N.jsx(di.svg,{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:N.jsx("path",{d:"M20 6 9 17l-5-5"})}),aL=e=>N.jsx(di.svg,{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:N.jsx("path",{d:"m6 9 6 6 6-6"})}),sL=e=>N.jsx(di.svg,{viewBox:"0 0 24 24",fill:"currentColor",...e,children:N.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z"})}),{withContext:lL}=rl({key:"badge"}),Ef=lL("span"),{withContext:cL}=rl({key:"spinner"}),uL=cL("span"),P6=O.forwardRef(function(t,i){const{spinner:r=N.jsx(uL,{size:"inherit",borderWidth:"0.125em",color:"inherit"}),spinnerPlacement:a="start",children:l,text:c,visible:d=!0,...h}=t;return d?c?N.jsxs(za,{ref:i,display:"contents",...h,children:[a==="start"&&r,c,a==="end"&&r]}):r?N.jsxs(za,{ref:i,display:"contents",...h,children:[N.jsx(N6,{display:"inline-flex",children:r}),N.jsx(za,{visibility:"hidden",display:"contents",children:l})]}):N.jsx(za,{ref:i,display:"contents",...h,children:l}):l});P6.displayName="Loader";const{useRecipeResult:dL,usePropsContext:fL}=rl({key:"button"}),ru=O.forwardRef(function(t,i){const r=fL(),a=O.useMemo(()=>Zc(r,t),[r,t]),l=dL(a),{loading:c,loadingText:d,children:h,spinner:p,spinnerPlacement:m,...v}=l.props;return N.jsx(di.button,{type:"button",ref:i,...v,"data-loading":Ne(c),disabled:c||v.disabled,className:Di(l.className,a.className),css:[l.styles,a.css],children:!a.asChild&&c?N.jsx(P6,{spinner:p,text:d,spinnerPlacement:m,children:h}):h})});ru.displayName="Button";function hL(e){const{when:t,fallback:i,children:r}=e;let a;return t?a=typeof r=="function"?r(t):r:a=i,O.isValidElement(a)?a:N.jsx(N.Fragment,{children:a})}const gL=e=>{const{children:t,fallback:i}=e,[r,a]=O.useState(!1);return O.useEffect(()=>{a(!0)},[]),N.jsx(hL,{when:r,fallback:i,children:t})},Jv=O.forwardRef(function(t,i){return N.jsx(ru,{px:"0",py:"0",_icon:{fontSize:"1.2em"},ref:i,...t})});Jv.displayName="IconButton";function pL(e){const{gap:t,direction:i}=e,r={column:{marginY:t,marginX:0,borderInlineStartWidth:0,borderTopWidth:"1px"},"column-reverse":{marginY:t,marginX:0,borderInlineStartWidth:0,borderTopWidth:"1px"},row:{marginX:t,marginY:0,borderInlineStartWidth:"1px",borderTopWidth:0},"row-reverse":{marginX:t,marginY:0,borderInlineStartWidth:"1px",borderTopWidth:0}};return{"&":r6(i,a=>r[a])}}function mL(e){return O.Children.toArray(e).filter(t=>O.isValidElement(t))}const Th=O.forwardRef(function(t,i){const{direction:r="column",align:a,justify:l,gap:c="0.5rem",wrap:d,children:h,separator:p,className:m,...v}=t,b=O.useMemo(()=>pL({gap:c,direction:r}),[c,r]),y=O.useMemo(()=>O.isValidElement(p)?mL(h).map((x,_,w)=>{const C=typeof x.key<"u"?x.key:_,R=p,z=O.cloneElement(R,{css:[b,R.props.css]});return N.jsxs(O.Fragment,{children:[x,_===w.length-1?null:z]},C)}):h,[h,p,b]);return N.jsx(di.div,{ref:i,display:"flex",alignItems:a,justifyContent:l,flexDirection:r,flexWrap:d,gap:p?void 0:c,className:Di("chakra-stack",m),...v,children:y})});Th.displayName="Stack";const{withRootProvider:M6,withContext:pr}=Dv({key:"dialog"});M6(gr.RootProvider,{defaultProps:{unmountOnExit:!0,lazyMount:!0}});const vL=M6(gr.Root,{defaultProps:{unmountOnExit:!0,lazyMount:!0}});pr(gr.Trigger,"trigger",{forwardAsChild:!0});const bL=pr(gr.Positioner,"positioner",{forwardAsChild:!0}),yL=pr(gr.Content,"content",{forwardAsChild:!0}),xL=pr(gr.Description,"description",{forwardAsChild:!0}),SL=pr(gr.Title,"title",{forwardAsChild:!0}),_L=pr(gr.CloseTrigger,"closeTrigger",{forwardAsChild:!0}),wL=O.forwardRef(function(t,i){const r=Xr();return N.jsx(di.button,{type:"button",...t,ref:i,onClick:a=>{t.onClick?.(a),r.setOpen(!1)}})}),CL=pr(gr.Backdrop,"backdrop",{forwardAsChild:!0}),EL=pr("div","body"),TL=pr("div","footer"),kL=pr("div","header");gr.Context;const $r=O.forwardRef(function(t,i){return N.jsx(Th,{align:"center",...t,direction:"row",ref:i})});$r.displayName="HStack";const{withContext:zL}=rl({key:"input"}),Ff=zL(iN.Input),{withProvider:D6,withContext:mr}=Dv({key:"listbox"});D6(qn.RootProvider,"root",{forwardAsChild:!0});const RL=D6(qn.Root,"root",{forwardAsChild:!0});mr(qn.Input,"input",{forwardAsChild:!0});const AL=mr(qn.Content,"content",{forwardAsChild:!0});mr(qn.ValueText,"valueText",{forwardAsChild:!0});mr(qn.ItemGroup,"itemGroup",{forwardAsChild:!0});mr(qn.ItemGroupLabel,"itemGroupLabel",{forwardAsChild:!0});const OL=mr(qn.Item,"item",{forwardAsChild:!0}),NL=mr(qn.ItemText,"itemText",{forwardAsChild:!0});mr(qn.ItemIndicator,"itemIndicator",{forwardAsChild:!0,defaultProps:{children:N.jsx(I6,{})}});const IL=mr(qn.Label,"label",{forwardAsChild:!0}),PL=mr(qn.Empty,"empty",{forwardAsChild:!0});qn.Context;qn.ItemContext;const{withProvider:L6,withContext:Pn}=Dv({key:"select"});L6(qt.RootProvider,"root",{forwardAsChild:!0});const ML=L6(qt.Root,"root",{forwardAsChild:!0,defaultProps:{positioning:{sameWidth:!0}}}),DL=Pn(qt.Trigger,"trigger",{forwardAsChild:!0}),LL=Pn(qt.Positioner,"positioner",{forwardAsChild:!0}),jL=Pn(qt.Content,"content",{forwardAsChild:!0});Pn(qt.List,"list",{forwardAsChild:!0});const BL=Pn(qt.ValueText,"valueText",{forwardAsChild:!0}),GL=Pn(qt.ClearTrigger,"clearTrigger",{forwardAsChild:!0,defaultProps:{children:N.jsx(sL,{boxSize:"1em"})}}),VL=Pn(qt.ItemGroup,"itemGroup",{forwardAsChild:!0}),HL=Pn(qt.ItemGroupLabel,"itemGroupLabel",{forwardAsChild:!0}),FL=Pn(qt.Item,"item",{forwardAsChild:!0});Pn(qt.ItemText,"itemText",{forwardAsChild:!0});const $L=Pn(qt.ItemIndicator,"itemIndicator",{forwardAsChild:!0,defaultProps:{children:N.jsx(I6,{})}}),UL=Pn("div","indicatorGroup"),WL=Pn(qt.Indicator,"indicator",{forwardAsChild:!0,defaultProps:{children:N.jsx(aL,{})}}),YL=Pn(qt.Control,"control",{forwardAsChild:!0});Pn(qt.Label,"label",{forwardAsChild:!0});const qL=qt.Context,XL=qt.HiddenSelect;qt.ItemContext;const{withContext:ZL}=rl({key:"skeleton"}),eb=ZL("div"),KL=O.forwardRef(function(t,i){const{size:r,...a}=t;return N.jsx(x4,{size:r,asChild:!0,ref:i,children:N.jsx(eb,{...a})})});KL.displayName="SkeletonCircle";const QL=O.forwardRef(function(t,i){const{loading:r=!0,noOfLines:a=3,gap:l,rootProps:c,...d}=t;return N.jsx(Th,{gap:l,width:"full",ref:i,...c,children:Array.from({length:r?a:1}).map((h,p)=>N.jsx(eb,{loading:r,height:r?"4":void 0,maxW:r?p===a-1&&a>1?"80%":"100%":void 0,...d},p))})});QL.displayName="SkeletonText";const Ei=O.forwardRef(function(t,i){return N.jsx(Th,{align:"center",...t,direction:"column",ref:i})});Ei.displayName="VStack";var Dm={exports:{}},vc={},Lm={exports:{}},jm={};var O5;function JL(){return O5||(O5=1,(function(e){function t(P,ee){var te=P.length;P.push(ee);e:for(;0<te;){var de=te-1>>>1,ce=P[de];if(0<a(ce,ee))P[de]=ee,P[te]=ce,te=de;else break e}}function i(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var ee=P[0],te=P.pop();if(te!==ee){P[0]=te;e:for(var de=0,ce=P.length,Ce=ce>>>1;de<Ce;){var Ae=2*(de+1)-1,ge=P[Ae],G=Ae+1,ne=P[G];if(0>a(ge,te))G<ce&&0>a(ne,ge)?(P[de]=ne,P[G]=te,de=G):(P[de]=ge,P[Ae]=te,de=Ae);else if(G<ce&&0>a(ne,te))P[de]=ne,P[G]=te,de=G;else break e}}return ee}function a(P,ee){var te=P.sortIndex-ee.sortIndex;return te!==0?te:P.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var h=[],p=[],m=1,v=null,b=3,y=!1,x=!1,_=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function D(P){for(var ee=i(p);ee!==null;){if(ee.callback===null)r(p);else if(ee.startTime<=P)r(p),ee.sortIndex=ee.expirationTime,t(h,ee);else break;ee=i(p)}}function T(P){if(_=!1,D(P),!x)if(i(h)!==null)x=!0,k||(k=!0,I());else{var ee=i(p);ee!==null&&K(T,ee.startTime-P)}}var k=!1,A=-1,L=5,W=-1;function V(){return w?!0:!(e.unstable_now()-W<L)}function M(){if(w=!1,k){var P=e.unstable_now();W=P;var ee=!0;try{e:{x=!1,_&&(_=!1,R(A),A=-1),y=!0;var te=b;try{t:{for(D(P),v=i(h);v!==null&&!(v.expirationTime>P&&V());){var de=v.callback;if(typeof de=="function"){v.callback=null,b=v.priorityLevel;var ce=de(v.expirationTime<=P);if(P=e.unstable_now(),typeof ce=="function"){v.callback=ce,D(P),ee=!0;break t}v===i(h)&&r(h),D(P)}else r(h);v=i(h)}if(v!==null)ee=!0;else{var Ce=i(p);Ce!==null&&K(T,Ce.startTime-P),ee=!1}}break e}finally{v=null,b=te,y=!1}ee=void 0}}finally{ee?I():k=!1}}}var I;if(typeof z=="function")I=function(){z(M)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,X=U.port2;U.port1.onmessage=M,I=function(){X.postMessage(null)}}else I=function(){C(M,0)};function K(P,ee){A=C(function(){P(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(P){switch(b){case 1:case 2:case 3:var ee=3;break;default:ee=b}var te=b;b=ee;try{return P()}finally{b=te}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(P,ee){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var te=b;b=P;try{return ee()}finally{b=te}},e.unstable_scheduleCallback=function(P,ee,te){var de=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?de+te:de):te=de,P){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=te+ce,P={id:m++,callback:ee,priorityLevel:P,startTime:te,expirationTime:ce,sortIndex:-1},te>de?(P.sortIndex=te,t(p,P),i(h)===null&&P===i(p)&&(_?(R(A),A=-1):_=!0,K(T,te-de))):(P.sortIndex=ce,t(h,P),x||y||(x=!0,k||(k=!0,I()))),P},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(P){var ee=b;return function(){var te=b;b=ee;try{return P.apply(this,arguments)}finally{b=te}}}})(jm)),jm}var N5;function ej(){return N5||(N5=1,Lm.exports=JL()),Lm.exports}var I5;function tj(){if(I5)return vc;I5=1;var e=ej(),t=fv(),i=W4();function r(n){var o="https://react.dev/errors/"+n;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)o+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){for(var o=n,s=o;s&&!s.alternate;)o=s,(o.flags&4098)!==0&&(n=o.return),s=o.return;for(;o.return;)o=o.return;return o.tag===3?n:null}function c(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function d(n){if(n.tag===31){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function h(n){if(l(n)!==n)throw Error(r(188))}function p(n){var o=n.alternate;if(!o){if(o=l(n),o===null)throw Error(r(188));return o!==n?null:n}for(var s=n,u=o;;){var f=s.return;if(f===null)break;var g=f.alternate;if(g===null){if(u=f.return,u!==null){s=u;continue}break}if(f.child===g.child){for(g=f.child;g;){if(g===s)return h(f),n;if(g===u)return h(f),o;g=g.sibling}throw Error(r(188))}if(s.return!==u.return)s=f,u=g;else{for(var S=!1,E=f.child;E;){if(E===s){S=!0,s=f,u=g;break}if(E===u){S=!0,u=f,s=g;break}E=E.sibling}if(!S){for(E=g.child;E;){if(E===s){S=!0,s=g,u=f;break}if(E===u){S=!0,u=g,s=f;break}E=E.sibling}if(!S)throw Error(r(189))}}if(s.alternate!==u)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?n:o}function m(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n;for(n=n.child;n!==null;){if(o=m(n),o!==null)return o;n=n.sibling}return null}function v(n,o,s,u,f,g){for(;n!==null;){if((n.tag===5||n.tag===27||n.tag===6)&&s(n,u,f,g)||(n.tag!==22||n.memoizedState===null)&&(o||n.tag!==5&&n.tag!==27)&&v(n.child,o,s,u,f,g))return!0;n=n.sibling}return!1}function b(n){for(n=n.return;n!==null;){if(n.tag===3||n.tag===5||n.tag===27)return n;n=n.return}return null}function y(n){var o=!1;for(n=n.return;n!==null&&(n.tag===4&&(o=!0),!(n.tag===3||n.tag===5||n.tag===27));)n=n.return;return o}function x(n){var o=[null,null],s=b(n);return s===null||_(o,n,s.child,{foundSelf:!1}),o}function _(n,o,s,u){for(;s!==null;){if(s===o)u.foundSelf=!0;else if(s.tag===5||s.tag===27||s.tag===6){if(u.foundSelf)return n[1]=s,!0;n[0]=s}else if((s.tag!==22||s.memoizedState===null)&&_(n,o,s.child,u))return!0;s=s.sibling}return!1}function w(n){switch(n.tag){case 5:case 27:case 6:return n.stateNode;case 3:return n.stateNode.containerInfo;default:throw Error(r(559))}}var C=null,R=null;function z(n,o,s){return n===s?!0:n===o?(C=n,!0):!1}function D(n,o,s){return n===s?(R=n,!1):n===o?(R!==null&&(C=n),!0):!1}function T(n){if(n===null)return null;do n=n===null?null:n.return;while(n&&n.tag!==5&&n.tag!==27&&n.tag!==3);return n||null}function k(n,o,s){for(var u=0,f=n;f;f=s(f))u++;f=0;for(var g=o;g;g=s(g))f++;for(;0<u-f;)n=s(n),u--;for(;0<f-u;)o=s(o),f--;for(;u--;){if(n===o||o!==null&&n===o.alternate)return n;n=s(n),o=s(o)}return null}var A=Object.assign,L=Symbol.for("react.element"),W=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),K=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),de=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),Ce=Symbol.for("react.activity"),Ae=Symbol.for("react.legacy_hidden"),ge=Symbol.for("react.memo_cache_sentinel"),G=Symbol.for("react.view_transition"),ne=Symbol.for("react.recoverable"),ye=Symbol.iterator;function _e(n){return n===null||typeof n!="object"?null:(n=ye&&n[ye]||n["@@iterator"],typeof n=="function"?n:null)}var ie=Symbol.for("react.client.reference");function re(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ie?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case M:return"Fragment";case U:return"Profiler";case I:return"StrictMode";case ee:return"Suspense";case te:return"SuspenseList";case Ce:return"Activity";case G:return"ViewTransition"}if(typeof n=="object")switch(n.$$typeof){case V:return"Portal";case K:return n.displayName||"Context";case X:return(n._context.displayName||"Context")+".Consumer";case P:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case de:return o=n.displayName||null,o!==null?o:re(n.type)||"Memo";case ce:o=n._payload,n=n._init;try{return re(n(o))}catch{}}return null}var be=Array.isArray,le=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xe=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Xe={pending:!1,data:null,method:null,action:null},yt=[],Qe=-1;function on(n){return{current:n}}function _t(n){0>Qe||(n.current=yt[Qe],yt[Qe]=null,Qe--)}function Je(n,o){Qe++,yt[Qe]=n.current,n.current=o}var an=on(null),yr=on(null),Zn=on(null),fi=on(null);function yn(n,o){switch(Je(Zn,o),Je(yr,n),Je(an,null),o.nodeType){case 9:case 11:n=(n=o.documentElement)&&(n=n.namespaceURI)?J2(n):0;break;default:if(n=o.tagName,o=o.namespaceURI)o=J2(o),n=ex(o,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}_t(an),Je(an,n)}function Fi(){_t(an),_t(yr),_t(Zn)}function dl(n){var o=n.memoizedState;o!==null&&(zs._currentValue=o.memoizedState,Je(fi,n)),o=an.current;var s=ex(o,n.type);o!==s&&(Je(yr,n),Je(an,s))}function xr(n){yr.current===n&&(_t(an),_t(yr)),fi.current===n&&(_t(fi),zs._currentValue=Xe)}var ue,Ue;function Ze(n){if(ue===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",Ue=-1<s.stack.indexOf(`
4
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
5
+ `+ue+n+Ue}var Zt=!1;function ki(n,o){if(!n||Zt)return"";Zt=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(o){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(ve){var $=ve}Reflect.construct(n,[],ae)}else{try{ae.call()}catch(ve){$=ve}ae=!1;try{var Q=Object.getOwnPropertyDescriptor(n.prototype,"props");Object.defineProperty(n.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ae=!0,new n}finally{ae&&(Q!==void 0?Object.defineProperty(n.prototype,"props",Q):delete n.prototype.props)}}}else{try{throw Error()}catch(ve){$=ve}(ae=n())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(ve){if(ve&&$&&typeof ve.stack=="string")return[ve.stack,$.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=u.DetermineComponentFrameRoot(),S=g[0],E=g[1];if(S&&E){var j=S.split(`
6
+ `),q=E.split(`
7
+ `);for(f=u=0;u<j.length&&!j[u].includes("DetermineComponentFrameRoot");)u++;for(;f<q.length&&!q[f].includes("DetermineComponentFrameRoot");)f++;if(u===j.length||f===q.length)for(u=j.length-1,f=q.length-1;1<=u&&0<=f&&j[u]!==q[f];)f--;for(;1<=u&&0<=f;u--,f--)if(j[u]!==q[f]){if(u!==1||f!==1)do if(u--,f--,0>f||j[u]!==q[f]){var J=`
8
+ `+j[u].replace(" at new "," at ");return n.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",n.displayName)),J}while(1<=u&&0<=f);break}}}finally{Zt=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?Ze(s):""}function sn(n,o){switch(n.tag){case 26:case 27:case 5:return Ze(n.type);case 16:return Ze("Lazy");case 13:return n.child!==o&&o!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return ki(n.type,!1);case 11:return ki(n.type.render,!1);case 1:return ki(n.type,!0);case 31:return Ze("Activity");case 30:return Ze("ViewTransition");default:return""}}function Jr(n){try{var o="",s=null;do o+=sn(n,s),s=n,n=n.return;while(n);return o}catch(u){return`
9
+ Error generating stack: `+u.message+`
10
+ `+u.stack}}var $i=Object.prototype.hasOwnProperty,Lh=e.unstable_scheduleCallback,jh=e.unstable_cancelCallback,AC=e.unstable_shouldYield,OC=e.unstable_requestPaint,Kn=e.unstable_now,NC=e.unstable_getCurrentPriorityLevel,_b=e.unstable_ImmediatePriority,wb=e.unstable_UserBlockingPriority,mu=e.unstable_NormalPriority,IC=e.unstable_LowPriority,Cb=e.unstable_IdlePriority,PC=e.log,MC=e.unstable_setDisableYieldValue,fl=null,Qn=null;function eo(n){if(typeof PC=="function"&&MC(n),Qn&&typeof Qn.setStrictMode=="function")try{Qn.setStrictMode(fl,n)}catch{}}var Jn=Math.clz32?Math.clz32:jC,DC=Math.log,LC=Math.LN2;function jC(n){return n>>>=0,n===0?32:31-(DC(n)/LC|0)|0}var vu=256,bu=262144,yu=4194304;function Zo(n){var o=n&42;if(o!==0)return o;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&-n;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function xu(n,o,s){var u=n.pendingLanes;if(u===0)return 0;var f=0,g=n.suspendedLanes,S=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~g,u!==0?f=Zo(u):(S&=E,S!==0?f=Zo(S):s||(s=E&~n,s!==0&&(f=Zo(s))))):(E=u&~g,E!==0?f=Zo(E):S!==0?f=Zo(S):s||(s=u&~n,s!==0&&(f=Zo(s)))),f===0?0:o!==0&&o!==f&&(o&g)===0&&(g=f&-f,s=o&-o,g>=s||g===32&&(s&4194048)!==0)?o:f}function hl(n,o){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&o)===0}function Eb(n,o){(o&8)!==0&&(o|=o&32);var s=n.entangledLanes;if(s!==0)for(n=n.entanglements,s&=o;0<s;){var u=31-Jn(s),f=1<<u;o|=n[u],s&=~f}return o}function BC(n,o){switch(n){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tb(){var n=yu;return yu<<=1,(yu&62914560)===0&&(yu=4194304),n}function Bh(n){for(var o=[],s=0;31>s;s++)o.push(n);return o}function gl(n,o){n.pendingLanes|=o,o!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function GC(n,o,s,u,f,g){var S=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var E=n.entanglements,j=n.expirationTimes,q=n.hiddenUpdates;for(s=S&~s;0<s;){var J=31-Jn(s),ae=1<<J;E[J]=0,j[J]=-1;var $=q[J];if($!==null)for(q[J]=null,J=0;J<$.length;J++){var Q=$[J];Q!==null&&(Q.lane&=-536870913)}s&=~ae}u!==0&&kb(n,u,0),g!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=g&~(S&~o))}function kb(n,o,s){n.pendingLanes|=o,n.suspendedLanes&=~o;var u=31-Jn(o);n.entangledLanes|=o,n.entanglements[u]=n.entanglements[u]|1073741824|s&261930}function zb(n,o){var s=n.entangledLanes|=o;for(n=n.entanglements;s;){var u=31-Jn(s),f=1<<u;f&o|n[u]&o&&(n[u]|=o),s&=~f}}function Rb(n,o){var s=o&-o;return s=(s&42)!==0?1:Gh(s),(s&(n.suspendedLanes|o))!==0?0:s}function Gh(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Vh(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Ab(){var n=xe.p;return n!==0?n:(n=window.event,n===void 0?32:Lx(n.type))}function Ob(n,o){var s=xe.p;try{return xe.p=n,o()}finally{xe.p=s}}var Sr=Math.random().toString(36).slice(2),ln="__reactFiber$"+Sr,Mn="__reactProps$"+Sr,Ha="__reactContainer$"+Sr,Nb="__reactEvents$"+Sr,VC="__reactListeners$"+Sr,HC="__reactHandles$"+Sr,Ib="__reactResources$"+Sr,pl="__reactMarker$"+Sr,Su="__reactLoad$"+Sr;function _u(n){delete n[ln],delete n[Mn],delete n[VC],delete n[HC]}function Ko(n){var o;if(o=n[ln])return o;for(var s=n.parentNode;s;){if(o=s[Ha]||s[ln]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(n=vx(n);n!==null;){if(s=n[ln])return s;n=vx(n)}return o}n=s,s=n.parentNode}return null}function Fa(n){if(n=n[ln]||n[Ha]){var o=n.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return n}return null}function ml(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n.stateNode;throw Error(r(33))}function $a(n){var o=n[Ib];return o||(o=n[Ib]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Kt(n){n[pl]=!0}function Pb(n){n[Su]=void 0}var Mb=new Set,Db={};function Qo(n,o){Ua(n,o),Ua(n+"Capture",o)}function Ua(n,o){for(Db[n]=o,n=0;n<o.length;n++)Mb.add(o[n])}var FC=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Lb={},jb={};function $C(n){return $i.call(jb,n)?!0:$i.call(Lb,n)?!1:FC.test(n)?jb[n]=!0:(Lb[n]=!0,!1)}var Ke=!1;function Bb(){var n=Ke;return Ke=!1,n}function wu(n,o,s){if($C(o))if(s===null)n.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(o);return;case"boolean":var u=o.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(o);return}}n.setAttribute(o,s)}}function Cu(n,o,s){if(s===null)n.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttribute(o,s)}}function _r(n,o,s,u){if(u===null)n.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(o,s,u)}}function ei(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Gb(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function UC(n,o,s){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,o);if(!n.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var f=u.get,g=u.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return f.call(this)},set:function(S){s=""+S,g.call(this,S)}}),Object.defineProperty(n,o,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(S){s=""+S},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function Hh(n){if(!n._valueTracker){var o=Gb(n)?"checked":"value";n._valueTracker=UC(n,o,""+n[o])}}function Vb(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var s=o.getValue(),u="";return n&&(u=Gb(n)?n.checked?"true":"false":n.value),n=u,n!==s?(o.setValue(n),!0):!1}var WC=/[\n"\\]/g;function hi(n){return n.replace(WC,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Fh(n,o,s,u,f,g,S,E){n.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.type=S:n.removeAttribute("type"),o!=null?S==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+ei(o)):n.value!==""+ei(o)&&(n.value=""+ei(o)):S!=="submit"&&S!=="reset"||n.removeAttribute("value"),o!=null?S==="number"&&n.value==o?$h(n,ei(n.value)):$h(n,ei(o)):s!=null?$h(n,ei(s)):u!=null&&n.removeAttribute("value"),f==null&&g!=null&&(n.defaultChecked=!!g),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+ei(E):n.removeAttribute("name")}function Hb(n,o,s,u,f,g,S,E){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),o!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||o!=null)){Hh(n);return}s=s!=null?""+ei(s):"",o=o!=null?""+ei(o):s,E||o===n.value||(n.value=o),n.defaultValue=o}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=E?n.checked:!!u,n.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(n.name=S),Hh(n)}function $h(n,o){n.defaultValue!==""+o&&(n.defaultValue=""+o)}function Wa(n,o,s,u){if(n=n.options,o){o={};for(var f=0;f<s.length;f++)o["$"+s[f]]=!0;for(s=0;s<n.length;s++)f=o.hasOwnProperty("$"+n[s].value),n[s].selected!==f&&(n[s].selected=f),f&&u&&(n[s].defaultSelected=!0)}else{for(s=""+ei(s),o=null,f=0;f<n.length;f++){if(n[f].value===s){n[f].selected=!0,u&&(n[f].defaultSelected=!0);return}o!==null||n[f].disabled||(o=n[f])}o!==null&&(o.selected=!0)}}function Fb(n,o,s){if(o!=null&&(o=""+ei(o),o!==n.value&&(n.value=o),s==null)){n.defaultValue!==o&&(n.defaultValue=o);return}n.defaultValue=s!=null?""+ei(s):""}function $b(n,o,s,u){if(o==null){if(u!=null){if(s!=null)throw Error(r(92));if(be(u)){if(1<u.length)throw Error(r(93));u=u[0]}s=u}s==null&&(s=""),o=s}s=ei(o),n.defaultValue=s,u=n.textContent,u===s&&u!==""&&u!==null&&(n.value=u),Hh(n)}function Ya(n,o){if(o){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=o;return}}n.textContent=o}var YC=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ub(n,o,s){var u=o.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="":u?n.setProperty(o,s):typeof s!="number"||s===0||YC.has(o)?o==="float"?n.cssFloat=s:n[o]=(""+s).trim():n[o]=s+"px"}function Wb(n,o,s){if(o!=null&&typeof o!="object")throw Error(r(62));if(n=n.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||o!=null&&o.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="",Ke=!0);for(var f in o)u=o[f],o.hasOwnProperty(f)&&s[f]!==u&&(Ub(n,f,u),Ke=!0)}else for(var g in o)o.hasOwnProperty(g)&&Ub(n,g,o[g])}function Uh(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qC=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),XC=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Eu(n){return XC.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Ui(){}var Wh=null;function Yh(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var qa=null,Xa=null;function Yb(n){var o=Fa(n);if(o&&(n=o.stateNode)){var s=n[Mn]||null;e:switch(n=o.stateNode,o.type){case"input":if(Fh(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),o=s.name,s.type==="radio"&&o!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+hi(""+o)+'"][type="radio"]'),o=0;o<s.length;o++){var u=s[o];if(u!==n&&u.form===n.form){var f=u[Mn]||null;if(!f)throw Error(r(90));Fh(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(o=0;o<s.length;o++)u=s[o],u.form===n.form&&Vb(u)}break e;case"textarea":Fb(n,s.value,s.defaultValue);break e;case"select":o=s.value,o!=null&&Wa(n,!!s.multiple,o,!1)}}}var qh=!1;function qb(n,o,s){if(qh)return n(o,s);qh=!0;try{var u=n(o);return u}finally{if(qh=!1,(qa!==null||Xa!==null)&&(Ed(),qa&&(o=qa,n=Xa,Xa=qa=null,Yb(o),n)))for(o=0;o<n.length;o++)Yb(n[o])}}function vl(n,o){var s=n.stateNode;if(s===null)return null;var u=s[Mn]||null;if(u===null)return null;s=u[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(r(231,o,typeof s));return s}var wr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xh=!1;if(wr)try{var bl={};Object.defineProperty(bl,"passive",{get:function(){Xh=!0}}),window.addEventListener("test",bl,bl),window.removeEventListener("test",bl,bl)}catch{Xh=!1}var to=null,Zh=null,Tu=null;function Xb(){if(Tu)return Tu;var n,o=Zh,s=o.length,u,f="value"in to?to.value:to.textContent,g=f.length;for(n=0;n<s&&o[n]===f[n];n++);var S=s-n;for(u=1;u<=S&&o[s-u]===f[g-u];u++);return Tu=f.slice(n,1<u?1-u:void 0)}function ku(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function zu(){return!0}function Zb(){return!1}function Cn(n){function o(s,u,f,g,S){this._reactName=s,this._targetInst=f,this.type=u,this.nativeEvent=g,this.target=S,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(s=n[E],this[E]=s?s(g):g[E]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?zu:Zb,this.isPropagationStopped=Zb,this}return A(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=zu)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=zu)},persist:function(){},isPersistent:zu}),o}var no={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ru=Cn(no),yl=A({},no,{view:0,detail:0}),ZC=Cn(yl),Kh,Qh,xl,Au=A({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eg,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==xl&&(xl&&n.type==="mousemove"?(Kh=n.screenX-xl.screenX,Qh=n.screenY-xl.screenY):Qh=Kh=0,xl=n),Kh)},movementY:function(n){return"movementY"in n?n.movementY:Qh}}),Kb=Cn(Au),KC=A({},Au,{dataTransfer:0}),QC=Cn(KC),JC=A({},yl,{relatedTarget:0}),Jh=Cn(JC),e9=A({},no,{animationName:0,elapsedTime:0,pseudoElement:0}),t9=Cn(e9),n9=A({},no,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),i9=Cn(n9),r9=A({},no,{data:0}),Qb=Cn(r9),o9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a9={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},s9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l9(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=s9[n])?!!o[n]:!1}function eg(){return l9}var c9=A({},yl,{key:function(n){if(n.key){var o=o9[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=ku(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?a9[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eg,charCode:function(n){return n.type==="keypress"?ku(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ku(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),u9=Cn(c9),d9=A({},Au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jb=Cn(d9),f9=A({},no,{submitter:0}),h9=Cn(f9),g9=A({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eg}),p9=Cn(g9),m9=A({},no,{propertyName:0,elapsedTime:0,pseudoElement:0}),v9=Cn(m9),b9=A({},Au,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),y9=Cn(b9),x9=A({},no,{newState:0,oldState:0,source:0}),S9=Cn(x9),_9=[9,13,27,32],tg=wr&&"CompositionEvent"in window,Sl=null;wr&&"documentMode"in document&&(Sl=document.documentMode);var w9=wr&&"TextEvent"in window&&!Sl,ey=wr&&(!tg||Sl&&8<Sl&&11>=Sl),ty=" ",ny=!1;function iy(n,o){switch(n){case"keyup":return _9.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ry(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Za=!1;function C9(n,o){switch(n){case"compositionend":return ry(o);case"keypress":return o.which!==32?null:(ny=!0,ty);case"textInput":return n=o.data,n===ty&&ny?null:n;default:return null}}function E9(n,o){if(Za)return n==="compositionend"||!tg&&iy(n,o)?(n=Xb(),Tu=Zh=to=null,Za=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return ey&&o.locale!=="ko"?null:o.data;default:return null}}var T9={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oy(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!T9[n.type]:o==="textarea"}function ay(n,o,s,u){qa?Xa?Xa.push(u):Xa=[u]:qa=u,o=Od(o,"onChange"),0<o.length&&(s=new Ru("onChange","change",null,s,u),n.push({event:s,listeners:o}))}var _l=null,wl=null;function k9(n){Y2(n,0)}function Ou(n){var o=ml(n);if(Vb(o))return n}function sy(n,o){if(n==="change")return o}var ly=!1;if(wr){var ng;if(wr){var ig="oninput"in document;if(!ig){var cy=document.createElement("div");cy.setAttribute("oninput","return;"),ig=typeof cy.oninput=="function"}ng=ig}else ng=!1;ly=ng&&(!document.documentMode||9<document.documentMode)}function uy(){_l&&(_l.detachEvent("onpropertychange",dy),wl=_l=null)}function dy(n){if(n.propertyName==="value"&&Ou(wl)){var o=[];ay(o,wl,n,Yh(n)),qb(k9,o)}}function z9(n,o,s){n==="focusin"?(uy(),_l=o,wl=s,_l.attachEvent("onpropertychange",dy)):n==="focusout"&&uy()}function R9(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ou(wl)}function A9(n,o){if(n==="click")return Ou(o)}function O9(n,o){if(n==="input"||n==="change")return Ou(o)}function N9(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var ti=typeof Object.is=="function"?Object.is:N9;function Cl(n,o){if(ti(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var s=Object.keys(n),u=Object.keys(o);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var f=s[u];if(!$i.call(o,f)||!ti(n[f],o[f]))return!1}return!0}function rg(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function fy(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function hy(n,o){var s=fy(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=o&&u>=o)return{node:s,offset:o-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=fy(s)}}function gy(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?gy(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function py(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var o=rg(n.document);o instanceof n.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href=="string"}catch{s=!1}if(s)n=o.contentWindow;else break;o=rg(n.document)}return o}function og(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}var I9=wr&&"documentMode"in document&&11>=document.documentMode,Ka=null,ag=null,El=null,sg=!1;function my(n,o,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;sg||Ka==null||Ka!==rg(u)||(u=Ka,"selectionStart"in u&&og(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),El&&Cl(El,u)||(El=u,u=Od(ag,"onSelect"),0<u.length&&(o=new Ru("onSelect","select",null,o,s),n.push({event:o,listeners:u}),o.target=Ka)))}function Jo(n,o){var s={};return s[n.toLowerCase()]=o.toLowerCase(),s["Webkit"+n]="webkit"+o,s["Moz"+n]="moz"+o,s}var Qa={animationend:Jo("Animation","AnimationEnd"),animationiteration:Jo("Animation","AnimationIteration"),animationstart:Jo("Animation","AnimationStart"),transitionrun:Jo("Transition","TransitionRun"),transitionstart:Jo("Transition","TransitionStart"),transitioncancel:Jo("Transition","TransitionCancel"),transitionend:Jo("Transition","TransitionEnd")},lg={},vy={};wr&&(vy=document.createElement("div").style,"AnimationEvent"in window||(delete Qa.animationend.animation,delete Qa.animationiteration.animation,delete Qa.animationstart.animation),"TransitionEvent"in window||delete Qa.transitionend.transition);function ea(n){if(lg[n])return lg[n];if(!Qa[n])return n;var o=Qa[n],s;for(s in o)if(o.hasOwnProperty(s)&&s in vy)return lg[n]=o[s];return n}var by=ea("animationend"),yy=ea("animationiteration"),xy=ea("animationstart"),P9=ea("transitionrun"),M9=ea("transitionstart"),D9=ea("transitioncancel"),Sy=ea("transitionend"),_y=new Map,cg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");cg.push("scrollEnd");function zi(n,o){_y.set(n,o),Qo(o,[n])}var L9=0;function Cr(n,o){if(n.name!=null&&n.name!=="auto")return n.name;if(o.autoName!==null)return o.autoName;n=Ni.identifierPrefix;var s=L9++;return n="_"+n+"t_"+s.toString(32)+"_",o.autoName=n}function wy(n){if(n==null||typeof n=="string")return n;var o=null,s=bs;if(s!==null)for(var u=0;u<s.length;u++){var f=n[s[u]];if(f!=null){if(f==="none")return"none";o=o==null?f:o+(" "+f)}}return o??n.default}function Er(n,o){return n=wy(n),o=wy(o),o==null?n==="auto"?null:n:o==="auto"?null:o}var Nu=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},gi=[],Ja=0,ug=0;function Iu(){for(var n=Ja,o=ug=Ja=0;o<n;){var s=gi[o];gi[o++]=null;var u=gi[o];gi[o++]=null;var f=gi[o];gi[o++]=null;var g=gi[o];if(gi[o++]=null,u!==null&&f!==null){var S=u.pending;S===null?f.next=f:(f.next=S.next,S.next=f),u.pending=f}g!==0&&Cy(s,f,g)}}function Pu(n,o,s,u){gi[Ja++]=n,gi[Ja++]=o,gi[Ja++]=s,gi[Ja++]=u,ug|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function dg(n,o,s,u){return Pu(n,o,s,u),Mu(n)}function ta(n,o){return Pu(n,null,null,o),Mu(n)}function Cy(n,o,s){n.lanes|=s;var u=n.alternate;u!==null&&(u.lanes|=s);for(var f=!1,g=n.return;g!==null;)g.childLanes|=s,u=g.alternate,u!==null&&(u.childLanes|=s),g.tag===22&&(n=g.stateNode,n===null||n._visibility&1||(f=!0)),n=g,g=g.return;return n.tag===3?(g=n.stateNode,f&&o!==null&&(f=31-Jn(s),n=g.hiddenUpdates,u=n[f],u===null?n[f]=[o]:u.push(o),o.lane=s|536870912),g):null}function Mu(n){if(50<Yl)throw Yl=0,Cd=null,Error(r(185));for(var o=n.return;o!==null;)n=o,o=n.return;return n.tag===3?n.stateNode:null}var es={};function j9(n,o,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(n,o,s,u){return new j9(n,o,s,u)}function fg(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Tr(n,o){var s=n.alternate;return s===null?(s=Dn(n.tag,o,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=o,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&1206910976,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,o=n.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function Ey(n,o){n.flags&=1206910978;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=o,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,o=s.dependencies,n.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),n}function Du(n,o,s,u,f,g){var S=0;if(u=n,typeof u=="function")fg(u)&&(S=1);else if(typeof u=="string")S=f7(n,s,an.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(u){case Ce:return n=Dn(31,s,o,f),n.elementType=Ce,n.lanes=g,n;case M:return na(s.children,f,g,o);case I:S=8,f|=24;break;case U:return n=Dn(12,s,o,f|2),n.elementType=U,n.lanes=g,n;case ee:return n=Dn(13,s,o,f),n.elementType=ee,n.lanes=g,n;case te:return n=Dn(19,s,o,f),n.elementType=te,n.lanes=g,n;case Ae:case G:return n=f|32,n=Dn(30,s,o,n),n.elementType=G,n.lanes=g,n.stateNode={autoName:null,paired:null,clones:null,ref:null},n;default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case K:S=10;break e;case X:S=9;break e;case P:S=11;break e;case de:S=14;break e;case ce:S=16,u=null;break e}S=29,s=Error(r(130,n===null?"null":typeof n,"")),u=null}return o=Dn(S,s,o,f),o.elementType=n,o.type=u,o.lanes=g,o}function na(n,o,s,u){return n=Dn(7,n,u,o),n.lanes=s,n}function hg(n,o,s){return n=Dn(6,n,null,o),n.lanes=s,n}function Ty(n){var o=Dn(18,null,null,0);return o.stateNode=n,o}function gg(n,o,s){return o=Dn(4,n.children!==null?n.children:[],n.key,o),o.lanes=s,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}var ky=new WeakMap;function pi(n,o){if(typeof n=="object"&&n!==null){var s=ky.get(n);return s!==void 0?s:(o={value:n,source:o,stack:Jr(o)},ky.set(n,o),o)}return{value:n,source:o,stack:Jr(o)}}var ts=[],ns=0,Lu=null,Tl=0,mi=[],vi=0,io=null,Wi=1,Yi="";function kr(n,o){ts[ns++]=Tl,ts[ns++]=Lu,Lu=n,Tl=o}function zy(n,o,s){mi[vi++]=Wi,mi[vi++]=Yi,mi[vi++]=io,io=n;var u=Wi;n=Yi;var f=32-Jn(u)-1;u&=~(1<<f),s+=1;var g=32-Jn(o)+f;if(30<g){var S=f-f%5;g=(u&(1<<S)-1).toString(32),u>>=S,f-=S,Wi=1<<32-Jn(o)+f|s<<f|u,Yi=g+n}else Wi=1<<g|s<<f|u,Yi=n}function ju(n){n.return!==null&&(kr(n,1),zy(n,1,0))}function pg(n){for(;n===Lu;)Lu=ts[--ns],ts[ns]=null,Tl=ts[--ns],ts[ns]=null;for(;n===io;)io=mi[--vi],mi[vi]=null,Yi=mi[--vi],mi[vi]=null,Wi=mi[--vi],mi[vi]=null}function Ry(n,o){mi[vi++]=Wi,mi[vi++]=Yi,mi[vi++]=io,Wi=o.id,Yi=o.overflow,io=n}var Qt=null,vt=null,je=!1,ro=null,bi=!1,mg=Error(r(519));function oo(n){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw kl(pi(o,n)),mg}function Ay(n){var o=n.stateNode,s=n.type,u=n.memoizedProps;switch(o[ln]=n,o[Mn]=u,s){case"dialog":Ge("cancel",o),Ge("close",o);break;case"iframe":case"object":case"embed":Ge("load",o);break;case"video":case"audio":for(s=0;s<Xl.length;s++)Ge(Xl[s],o);break;case"source":Ge("error",o);break;case"img":case"image":case"link":Ge("error",o),Ge("load",o);break;case"details":Ge("toggle",o);break;case"input":Ge("invalid",o),Hb(o,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ge("invalid",o);break;case"textarea":Ge("invalid",o),$b(o,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||o.textContent===""+s||u.suppressHydrationWarning===!0||K2(o.textContent,s)?(u.popover!=null&&(Ge("beforetoggle",o),Ge("toggle",o)),u.onScroll!=null&&Ge("scroll",o),u.onScrollEnd!=null&&Ge("scrollend",o),u.onClick!=null&&(o.onclick=Ui),o=!0):o=!1,o||oo(n,!0)}function Bu(n){for(Qt=n.return;Qt;)switch(Qt.tag){case 5:case 31:case 13:bi=!1;return;case 27:case 3:bi=!0;return;default:Qt=Qt.return}}function is(n){if(n!==Qt)return!1;if(!je)return Bu(n),je=!0,!1;var o=n.tag,s;if((s=o!==3&&o!==27)&&((s=o===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||Wp(n.type,n.memoizedProps)),s=!s),s&&vt&&oo(n),Bu(n),o===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));vt=mx(n)}else if(o===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));vt=mx(n)}else o===27?(o=vt,_o(n.type)?(n=tm,tm=null,vt=n):vt=o):vt=Qt?xi(n.stateNode.nextSibling):null;return!0}function ia(){vt=Qt=null,je=!1}function vg(){var n=ro;return n!==null&&(Bn===null?Bn=n:Bn.push.apply(Bn,n),ro=null),n}function kl(n){ro===null?ro=[n]:ro.push(n)}var bg=on(null),ra=null,zr=null;function ao(n,o,s){Je(bg,o._currentValue),o._currentValue=s}function Rr(n){n._currentValue=bg.current,_t(bg)}function Gu(n,o,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,u!==null&&(u.childLanes|=o)):u!==null&&(u.childLanes&o)!==o&&(u.childLanes|=o),n===s)break;n=n.return}}function yg(n,o,s,u){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var g=f.dependencies;if(g!==null){var S=f.child;g=g.firstContext;e:for(;g!==null;){var E=g;g=f;for(var j=0;j<o.length;j++)if(E.context===o[j]){g.lanes|=s,E=g.alternate,E!==null&&(E.lanes|=s),Gu(g.return,s,n),u||(S=null);break e}g=E.next}}else if(f.tag===18){if(S=f.return,S===null)throw Error(r(341));S.lanes|=s,g=S.alternate,g!==null&&(g.lanes|=s),Gu(S,s,n),S=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=s,S=f.alternate,S!==null&&(S.lanes|=s),Gu(f.return,s,n),S=f.child,S=S!==null?S.sibling:null):S=f.child;if(S!==null)S.return=f;else for(S=f;S!==null;){if(S===n){S=null;break}if(f=S.sibling,f!==null){f.return=S.return,S=f;break}S=S.return}f=S}}function oa(n,o,s,u){n=null;for(var f=o,g=!1;f!==null;){if(!g){if((f.flags&524288)!==0)g=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var S=f.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var E=f.type;ti(f.pendingProps.value,S.value)||(n!==null?n.push(E):n=[E])}}else if(f===fi.current){if(S=f.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(zs):n=[zs])}f=f.return}return n!==null&&yg(o,n,s,u),o.flags|=262144,n!==null}function Vu(n){for(n=n.firstContext;n!==null;){if(!ti(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function aa(n){ra=n,zr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function cn(n){return Oy(ra,n)}function Hu(n,o){return ra===null&&aa(n),Oy(n,o)}function Oy(n,o){var s=o._currentValue;if(o={context:o,memoizedValue:s,next:null},zr===null){if(n===null)throw Error(r(308));zr=o,n.dependencies={lanes:0,firstContext:o},n.flags|=524288}else zr=zr.next=o;return s}var B9=typeof AbortController<"u"?AbortController:function(){var n=[],o=this.signal={aborted:!1,addEventListener:function(s,u){n.push(u)}};this.abort=function(){o.aborted=!0,n.forEach(function(s){return s()})}},G9=e.unstable_scheduleCallback,V9=e.unstable_NormalPriority,Lt={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xg(){return{controller:new B9,data:new Map,refCount:0}}function zl(n){n.refCount--,n.refCount===0&&G9(V9,function(){n.controller.abort()})}function Ny(n,o){if((n.pendingLanes&4194048)!==0){var s=n.transitionTypes;for(s===null&&(s=n.transitionTypes=[]),n=0;n<o.length;n++){var u=o[n];s.indexOf(u)===-1&&s.push(u)}}}var Rl=null;function H9(n){var o=n.transitionTypes;return n.transitionTypes=null,o}var Al=null,Sg=0,sa=0,rs=null;function F9(n,o){if(Al===null){var s=Al=[];Sg=0,sa=Lp(),rs={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Sg++,o.then(Iy,Iy),o}function Iy(){if(--Sg===0&&(Rl=null,Al!==null)){rs!==null&&(rs.status="fulfilled");var n=Al;Al=null,sa=0,rs=null;for(var o=0;o<n.length;o++)(0,n[o])()}}function $9(n,o){var s=[],u={status:"pending",value:null,reason:null,then:function(f){s.push(f)}};return n.then(function(){u.status="fulfilled",u.value=o;for(var f=0;f<s.length;f++)(0,s[f])(o)},function(f){for(u.status="rejected",u.reason=f,f=0;f<s.length;f++)(0,s[f])(void 0)}),u}var Py=le.S;le.S=function(n,o){if(T2=Kn(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&F9(n,o),Rl!==null)for(var s=_s;s!==null;)Ny(s,Rl),s=s.next;if(s=n.types,s!==null){for(var u=_s;u!==null;)Ny(u,s),u=u.next;if(sa!==0){u=Rl,u===null&&(u=Rl=[]);for(var f=0;f<s.length;f++){var g=s[f];u.indexOf(g)===-1&&u.push(g)}}}Py!==null&&Py(n,o)};var la=on(null);function _g(){var n=la.current;return n!==null?n:ft.pooledCache}function Fu(n,o){o===null?Je(la,la.current):Je(la,o.pool)}function My(){var n=_g();return n===null?null:{parent:Lt._currentValue,pool:n}}var os=Error(r(460)),wg=Error(r(474)),$u=Error(r(542)),Uu={then:function(){}};function Dy(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ly(n,o,s){switch(s=n[s],s===void 0?n.push(o):s!==o&&(o.then(Ui,Ui),o=s),o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,By(n),n===void 0&&!("reason"in o)?Error(r(600)):n;default:if(typeof o.status=="string")o.then(Ui,Ui);else{if(n=ft,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=o,n.status="pending",n.then(function(u){if(o.status==="pending"){var f=o;f.status="fulfilled",f.value=u}},function(u){if(o.status==="pending"){var f=o;f.status="rejected",f.reason=u}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,By(n),n}throw ua=o,os}}function ca(n){try{var o=n._init;return o(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ua=s,os):s}}var ua=null;function jy(){if(ua===null)throw Error(r(459));var n=ua;return ua=null,n}function By(n){if(n===os||n===$u)throw Error(r(483))}var as=null,Ol=0;function Wu(n){var o=Ol;return Ol+=1,as===null&&(as=[]),Ly(as,n,o)}function so(n,o){o=o.props.ref,n.ref=o!==void 0?o:null}function Yu(n,o){throw o.$$typeof===L?Error(r(525)):(n=Object.prototype.toString.call(o),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n)))}function Gy(n){function o(Y,H){if(n){var Z=Y.deletions;Z===null?(Y.deletions=[H],Y.flags|=16):Z.push(H)}}function s(Y,H){if(!n)return null;for(;H!==null;)o(Y,H),H=H.sibling;return null}function u(Y){for(var H=new Map;Y!==null;)Y.key===null?H.set(Y.index,Y):H.set(Y.key,Y),Y=Y.sibling;return H}function f(Y,H){return Y=Tr(Y,H),Y.index=0,Y.sibling=null,Y}function g(Y,H,Z){return Y.index=Z,n?(Z=Y.alternate,Z!==null?(Z=Z.index,Z<H?(Y.flags|=2,H):Z):(Y.flags|=134217730,H)):(Y.flags|=1048576,H)}function S(Y){return n&&Y.alternate===null&&(Y.flags|=134217730),Y}function E(Y,H,Z,oe){return H===null||H.tag!==6?(H=hg(Z,Y.mode,oe),H.return=Y,H):(H=f(H,Z),H.return=Y,H)}function j(Y,H,Z,oe){var Se=Z.type;return Se===M?(Y=J(Y,H,Z.props.children,oe,Z.key),so(Y,Z),Y):H!==null&&(H.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===ce&&ca(Se)===H.type)?(H=f(H,Z.props),so(H,Z),H.return=Y,H):(H=Du(Z.type,Z.key,Z.props,null,Y.mode,oe),so(H,Z),H.return=Y,H)}function q(Y,H,Z,oe){return H===null||H.tag!==4||H.stateNode.containerInfo!==Z.containerInfo||H.stateNode.implementation!==Z.implementation?(H=gg(Z,Y.mode,oe),H.return=Y,H):(H=f(H,Z.children||[]),H.return=Y,H)}function J(Y,H,Z,oe,Se){return H===null||H.tag!==7?(H=na(Z,Y.mode,oe,Se),H.return=Y,H):(H=f(H,Z),H.return=Y,H)}function ae(Y,H,Z){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=hg(""+H,Y.mode,Z),H.return=Y,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case W:return Z=Du(H.type,H.key,H.props,null,Y.mode,Z),so(Z,H),Z.return=Y,Z;case V:return H=gg(H,Y.mode,Z),H.return=Y,H;case ce:return H=ca(H),ae(Y,H,Z)}if(be(H)||_e(H))return H=na(H,Y.mode,Z,null),H.return=Y,H;if(typeof H.then=="function")return ae(Y,Wu(H),Z);if(H.$$typeof===K)return ae(Y,Hu(Y,H),Z);Yu(Y,H)}return null}function $(Y,H,Z,oe){var Se=H!==null?H.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Se!==null?null:E(Y,H,""+Z,oe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case W:return Z.key===Se?j(Y,H,Z,oe):null;case V:return Z.key===Se?q(Y,H,Z,oe):null;case ce:return Z=ca(Z),$(Y,H,Z,oe)}if(be(Z)||_e(Z))return Se!==null?null:J(Y,H,Z,oe,null);if(typeof Z.then=="function")return $(Y,H,Wu(Z),oe);if(Z.$$typeof===K)return $(Y,H,Hu(Y,Z),oe);Yu(Y,Z)}return null}function Q(Y,H,Z,oe,Se){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Y=Y.get(Z)||null,E(H,Y,""+oe,Se);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case W:return Y=Y.get(oe.key===null?Z:oe.key)||null,j(H,Y,oe,Se);case V:return Y=Y.get(oe.key===null?Z:oe.key)||null,q(H,Y,oe,Se);case ce:return oe=ca(oe),Q(Y,H,Z,oe,Se)}if(be(oe)||_e(oe))return Y=Y.get(Z)||null,J(H,Y,oe,Se,null);if(typeof oe.then=="function")return Q(Y,H,Z,Wu(oe),Se);if(oe.$$typeof===K)return Q(Y,H,Z,Hu(H,oe),Se);Yu(H,oe)}return null}function ve(Y,H,Z,oe){for(var Se=null,He=null,ze=H,Oe=H=0,Gt=null;ze!==null&&Oe<Z.length;Oe++){ze.index>Oe?(Gt=ze,ze=null):Gt=ze.sibling;var We=$(Y,ze,Z[Oe],oe);if(We===null){ze===null&&(ze=Gt);break}n&&ze&&We.alternate===null&&o(Y,ze),H=g(We,H,Oe),He===null?Se=We:He.sibling=We,He=We,ze=Gt}if(Oe===Z.length)return s(Y,ze),je&&kr(Y,Oe),Se;if(ze===null){for(;Oe<Z.length;Oe++)ze=ae(Y,Z[Oe],oe),ze!==null&&(H=g(ze,H,Oe),He===null?Se=ze:He.sibling=ze,He=ze);return je&&kr(Y,Oe),Se}for(ze=u(ze);Oe<Z.length;Oe++)Gt=Q(ze,Y,Oe,Z[Oe],oe),Gt!==null&&(n&&(We=Gt.alternate,We!==null&&ze.delete(We.key===null?Oe:We.key)),H=g(Gt,H,Oe),He===null?Se=Gt:He.sibling=Gt,He=Gt);return n&&ze.forEach(function(ko){return o(Y,ko)}),je&&kr(Y,Oe),Se}function we(Y,H,Z,oe){if(Z==null)throw Error(r(151));for(var Se=null,He=null,ze=H,Oe=H=0,Gt=null,We=Z.next();ze!==null&&!We.done;Oe++,We=Z.next()){ze.index>Oe?(Gt=ze,ze=null):Gt=ze.sibling;var ko=$(Y,ze,We.value,oe);if(ko===null){ze===null&&(ze=Gt);break}n&&ze&&ko.alternate===null&&o(Y,ze),H=g(ko,H,Oe),He===null?Se=ko:He.sibling=ko,He=ko,ze=Gt}if(We.done)return s(Y,ze),je&&kr(Y,Oe),Se;if(ze===null){for(;!We.done;Oe++,We=Z.next())We=ae(Y,We.value,oe),We!==null&&(H=g(We,H,Oe),He===null?Se=We:He.sibling=We,He=We);return je&&kr(Y,Oe),Se}for(ze=u(ze);!We.done;Oe++,We=Z.next())We=Q(ze,Y,Oe,We.value,oe),We!==null&&(n&&(Gt=We.alternate,Gt!==null&&ze.delete(Gt.key===null?Oe:Gt.key)),H=g(We,H,Oe),He===null?Se=We:He.sibling=We,He=We);return n&&ze.forEach(function(C7){return o(Y,C7)}),je&&kr(Y,Oe),Se}function Le(Y,H,Z,oe){if(typeof Z=="object"&&Z!==null&&Z.type===M&&Z.key===null&&Z.props.ref===void 0&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case W:e:{for(var Se=Z.key;H!==null;){if(H.key===Se){if(Se=Z.type,Se===M){if(H.tag===7){s(Y,H.sibling),oe=f(H,Z.props.children),so(oe,Z),oe.return=Y,Y=oe;break e}}else if(H.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===ce&&ca(Se)===H.type){s(Y,H.sibling),oe=f(H,Z.props),so(oe,Z),oe.return=Y,Y=oe;break e}s(Y,H);break}else o(Y,H);H=H.sibling}Z.type===M?(oe=na(Z.props.children,Y.mode,oe,Z.key),so(oe,Z),oe.return=Y,Y=oe):(oe=Du(Z.type,Z.key,Z.props,null,Y.mode,oe),so(oe,Z),oe.return=Y,Y=oe)}return S(Y);case V:e:{for(Se=Z.key;H!==null;){if(H.key===Se)if(H.tag===4&&H.stateNode.containerInfo===Z.containerInfo&&H.stateNode.implementation===Z.implementation){s(Y,H.sibling),oe=f(H,Z.children||[]),oe.return=Y,Y=oe;break e}else{s(Y,H);break}else o(Y,H);H=H.sibling}oe=gg(Z,Y.mode,oe),oe.return=Y,Y=oe}return S(Y);case ce:return Z=ca(Z),Le(Y,H,Z,oe)}if(be(Z))return ve(Y,H,Z,oe);if(_e(Z)){if(Se=_e(Z),typeof Se!="function")throw Error(r(150));return Z=Se.call(Z),we(Y,H,Z,oe)}if(typeof Z.then=="function")return Le(Y,H,Wu(Z),oe);if(Z.$$typeof===K)return Le(Y,H,Hu(Y,Z),oe);Yu(Y,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,H!==null&&H.tag===6?(s(Y,H.sibling),oe=f(H,Z),oe.return=Y,Y=oe):(s(Y,H),oe=hg(Z,Y.mode,oe),oe.return=Y,Y=oe),S(Y)):s(Y,H)}return function(Y,H,Z,oe){try{Ol=0;var Se=Le(Y,H,Z,oe);return as=null,Se}catch(ze){if(ze===os||ze===$u)throw ze;var He=Dn(29,ze,null,Y.mode);return He.lanes=oe,He.return=Y,He}}}var da=Gy(!0),Vy=Gy(!1),lo=!1;function Cg(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eg(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function co(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function uo(n,o,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(et&2)!==0){var f=u.pending;return f===null?o.next=o:(o.next=f.next,f.next=o),u.pending=o,o=Mu(n),Cy(n,null,s),o}return Pu(n,u,o,s),Mu(n)}function Nl(n,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194048)!==0)){var u=o.lanes;u&=n.pendingLanes,s|=u,o.lanes=s,zb(n,s)}}function Tg(n,o){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var f=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var S={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?f=g=S:g=g.next=S,s=s.next}while(s!==null);g===null?f=g=o:g=g.next=o}else f=g=o;s={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:g,shared:u.shared,callbacks:u.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=o:n.next=o,s.lastBaseUpdate=o}var kg=!1;function Il(){if(kg){var n=rs;if(n!==null)throw n}}function Pl(n,o,s,u){kg=!1;var f=n.updateQueue;lo=!1;var g=f.firstBaseUpdate,S=f.lastBaseUpdate,E=f.shared.pending;if(E!==null){f.shared.pending=null;var j=E,q=j.next;j.next=null,S===null?g=q:S.next=q,S=j;var J=n.alternate;J!==null&&(J=J.updateQueue,E=J.lastBaseUpdate,E!==S&&(E===null?J.firstBaseUpdate=q:E.next=q,J.lastBaseUpdate=j))}if(g!==null){var ae=f.baseState;S=0,J=q=j=null,E=g;do{var $=E.lane&-536870913,Q=$!==E.lane;if(Q?(Ve&$)===$:(u&$)===$){$!==0&&$===sa&&(kg=!0),J!==null&&(J=J.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ve=n,we=E;$=o;var Le=s;switch(we.tag){case 1:if(ve=we.payload,typeof ve=="function"){ae=ve.call(Le,ae,$);break e}ae=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=we.payload,$=typeof ve=="function"?ve.call(Le,ae,$):ve,$==null)break e;ae=A({},ae,$);break e;case 2:lo=!0}}$=E.callback,$!==null&&(n.flags|=64,Q&&(n.flags|=8192),Q=f.callbacks,Q===null?f.callbacks=[$]:Q.push($))}else Q={lane:$,tag:E.tag,payload:E.payload,callback:E.callback,next:null},J===null?(q=J=Q,j=ae):J=J.next=Q,S|=$;if(E=E.next,E===null){if(E=f.shared.pending,E===null)break;Q=E,E=Q.next,Q.next=null,f.lastBaseUpdate=Q,f.shared.pending=null}}while(!0);J===null&&(j=ae),f.baseState=j,f.firstBaseUpdate=q,f.lastBaseUpdate=J,g===null&&(f.shared.lanes=0),bo|=S,n.lanes=S,n.memoizedState=ae}}function Hy(n,o){if(typeof n!="function")throw Error(r(191,n));n.call(o)}function Fy(n,o){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)Hy(s[n],o)}var fo=on(null),qu=on(0);function $y(n,o){n=Pr,Je(qu,n),Je(fo,o),Pr=n|o.baseLanes}function zg(){Je(qu,Pr),Je(fo,fo.current)}function Rg(){Pr=qu.current,_t(fo),_t(qu)}var un=on(null),xn=null;function ho(n){var o=n.alternate;Je(dn,dn.current&1),Je(un,n),xn===null&&(o===null||fo.current!==null||o.memoizedState!==null)&&(xn=n)}function Ag(n){Je(dn,dn.current),Je(un,n),xn===null&&(xn=n)}function Uy(n){n.tag===22?(Je(dn,dn.current),Je(un,n),xn===null&&(xn=n)):go()}function go(){Je(dn,dn.current),Je(un,un.current)}function ni(n){_t(un),xn===n&&(xn=null),_t(dn)}var dn=on(0);function Ml(n,o){Je(un,un.current),Je(dn,o)}function Og(n){_t(dn),_t(un),xn===n&&(xn=null)}function Xu(n){for(var o=n;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Jp(s)||em(s)))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!=="independent"){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Ar=0,De=null,ut=null,jt=null,Zu=!1,ss=!1,fa=!1,Ku=0,Dl=0,ls=null,U9=0;function Nt(){throw Error(r(321))}function Ng(n,o){if(o===null)return!1;for(var s=0;s<o.length&&s<n.length;s++)if(!ti(n[s],o[s]))return!1;return!0}function Ig(n,o,s,u,f,g){return Ar=g,De=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,le.H=n===null||n.memoizedState===null?z1:R1,fa=!1,g=s(u,f),fa=!1,ss&&(g=Yy(o,s,u,f)),Wy(n),g}function Wy(n){le.H=rd;var o=ut!==null&&ut.next!==null;if(Ar=0,jt=ut=De=null,Zu=!1,Dl=0,ls=null,o)throw Error(r(300));n===null||Bt||(n=n.dependencies,n!==null&&Vu(n)&&(Bt=!0))}function Yy(n,o,s,u){De=n;var f=0;do{if(ss&&(ls=null),Dl=0,ss=!1,25<=f)throw Error(r(301));if(f+=1,jt=ut=null,n.updateQueue!=null){var g=n.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}le.H=J9,g=o(s,u)}while(ss);return g}function W9(){var n=le.H,o=n.useState()[0];return o=typeof o.then=="function"?Ll(o):o,n=n.useState()[0],(ut!==null?ut.memoizedState:null)!==n&&(De.flags|=1024),o}function Pg(){var n=Ku!==0;return Ku=0,n}function Mg(n,o,s){o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~s}function Dg(n){if(Zu){for(n=n.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}Zu=!1}Ar=0,jt=ut=De=null,ss=!1,Dl=Ku=0,ls=null}function En(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?De.memoizedState=jt=n:jt=jt.next=n,jt}function Dt(){if(ut===null){var n=De.alternate;n=n!==null?n.memoizedState:null}else n=ut.next;var o=jt===null?De.memoizedState:jt.next;if(o!==null)jt=o,ut=n;else{if(n===null)throw De.alternate===null?Error(r(467)):Error(r(310));ut=n,n={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},jt===null?De.memoizedState=jt=n:jt=jt.next=n}return jt}function Qu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ll(n){var o=Dl;return Dl+=1,ls===null&&(ls=[]),n=Ly(ls,n,o),o=De,(jt===null?o.memoizedState:jt.next)===null&&(o=o.alternate,le.H=o===null||o.memoizedState===null?z1:R1),n}function Ju(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ll(n);if(n.$$typeof===ne)return;if(n.$$typeof===K)return cn(n)}throw Error(r(438,String(n)))}function Lg(n){var o=null,s=De.updateQueue;if(s!==null&&(o=s.memoCache),o==null){var u=De.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(o={data:u.data.map(function(f){return f.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),s===null&&(s=Qu(),De.updateQueue=s),s.memoCache=o,s=o.data[o.index],s===void 0)for(s=o.data[o.index]=Array(n),u=0;u<n;u++)s[u]=ge;return o.index++,s}function Or(n,o){return typeof o=="function"?o(n):o}function ed(n){var o=Dt();return jg(o,ut,n)}function jg(n,o,s){var u=n.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=s;var f=n.baseQueue,g=u.pending;if(g!==null){if(f!==null){var S=f.next;f.next=g.next,g.next=S}o.baseQueue=f=g,u.pending=null}if(g=n.baseState,f===null)n.memoizedState=g;else{o=f.next;var E=S=null,j=null,q=o,J=!1;do{var ae=q.lane&-536870913;if(ae!==q.lane?(Ve&ae)===ae:(Ar&ae)===ae){var $=q.revertLane;if($===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ae===sa&&(J=!0);else if((Ar&$)===$){q=q.next,$===sa&&(J=!0);continue}else ae={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},j===null?(E=j=ae,S=g):j=j.next=ae,De.lanes|=$,bo|=$;ae=q.action,fa&&s(g,ae),g=q.hasEagerState?q.eagerState:s(g,ae)}else $={lane:ae,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},j===null?(E=j=$,S=g):j=j.next=$,De.lanes|=ae,bo|=ae;q=q.next}while(q!==null&&q!==o);if(j===null?S=g:j.next=E,!ti(g,n.memoizedState)&&(Bt=!0,J&&(s=rs,s!==null)))throw s;n.memoizedState=g,n.baseState=S,n.baseQueue=j,u.lastRenderedState=g}return f===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Bg(n){var o=Dt(),s=o.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var u=s.dispatch,f=s.pending,g=o.memoizedState;if(f!==null){s.pending=null;var S=f=f.next;do g=n(g,S.action),S=S.next;while(S!==f);ti(g,o.memoizedState)||(Bt=!0),o.memoizedState=g,o.baseQueue===null&&(o.baseState=g),s.lastRenderedState=g}return[g,u]}function qy(n,o,s){var u=De,f=Dt(),g=je;if(g){if(s===void 0)throw Error(r(407));s=s()}else s=o();var S=!ti((ut||f).memoizedState,s);if(S&&(f.memoizedState=s,Bt=!0),f=f.queue,Hg(Ky.bind(null,u,f,n),[n]),n=f.getSnapshot!==o||S||jt!==null&&(jt.memoizedState.tag&1)!==0,cs(n?9:8,{destroy:void 0},Zy.bind(null,u,f,s,o),null),n){if(u.flags|=2048,ft===null)throw Error(r(349));g||(Ar&127)!==0||Xy(u,o,s)}return s}function Xy(n,o,s){n.flags|=16384,n={getSnapshot:o,value:s},o=De.updateQueue,o===null?(o=Qu(),De.updateQueue=o,o.stores=[n]):(s=o.stores,s===null?o.stores=[n]:s.push(n))}function Zy(n,o,s,u){o.value=s,o.getSnapshot=u,Qy(o)&&Jy(n)}function Ky(n,o,s){return s(function(){Qy(o)&&Jy(n)})}function Qy(n){var o=n.getSnapshot;n=n.value;try{var s=o();return!ti(n,s)}catch{return!0}}function Jy(n){var o=ta(n,2);o!==null&&Gn(o,n,2)}function Gg(n){var o=En();if(typeof n=="function"){var s=n;if(n=s(),fa){eo(!0);try{s()}finally{eo(!1)}}}return o.memoizedState=o.baseState=n,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:n},o}function e1(n,o,s,u){return n.baseState=s,jg(n,ut,typeof u=="function"?u:Or)}function Y9(n,o,s,u,f){if(id(n))throw Error(r(485));if(n=o.action,n!==null){var g={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){g.listeners.push(S)}};le.T!==null?s(!0):g.isTransition=!1,u(g),s=o.pending,s===null?(g.next=o.pending=g,t1(o,g)):(g.next=s.next,o.pending=s.next=g)}}function t1(n,o){var s=o.action,u=o.payload,f=n.state;if(o.isTransition){var g=le.T,S={};S.types=g!==null?g.types:null,le.T=S;try{var E=s(f,u),j=le.S;j!==null&&j(S,E),n1(n,o,E)}catch(q){Vg(n,o,q)}finally{g!==null&&S.types!==null&&(g.types=S.types),le.T=g}}else try{g=s(f,u),n1(n,o,g)}catch(q){Vg(n,o,q)}}function n1(n,o,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){i1(n,o,u)},function(u){return Vg(n,o,u)}):i1(n,o,s)}function i1(n,o,s){o.status="fulfilled",o.value=s,r1(o),n.state=s,o=n.pending,o!==null&&(s=o.next,s===o?n.pending=null:(s=s.next,o.next=s,t1(n,s)))}function Vg(n,o,s){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do o.status="rejected",o.reason=s,r1(o),o=o.next;while(o!==u)}n.action=null}function r1(n){n=n.listeners;for(var o=0;o<n.length;o++)(0,n[o])()}function o1(n,o){return o}function a1(n,o){if(je){var s=ft.formState;if(s!==null){e:{var u=De;if(je){if(vt){t:{for(var f=vt,g=bi;f.nodeType!==8;){if(!g){f=null;break t}if(f=xi(f.nextSibling),f===null){f=null;break t}}g=f.data,f=g==="F!"||g==="F"?f:null}if(f){vt=xi(f.nextSibling),u=f.data==="F!";break e}}oo(u)}u=!1}u&&(o=s[0])}}return s=En(),s.memoizedState=s.baseState=o,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o1,lastRenderedState:o},s.queue=u,s=E1.bind(null,De,u),u.dispatch=s,u=Gg(!1),g=Yg.bind(null,De,!1,u.queue),u=En(),f={state:o,dispatch:null,action:n,pending:null},u.queue=f,s=Y9.bind(null,De,f,g,s),f.dispatch=s,u.memoizedState=n,[o,s,!1]}function s1(n){var o=Dt();return l1(o,ut,n)}function l1(n,o,s){if(o=jg(n,o,o1)[0],n=ed(Or)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var u=Ll(o)}catch(S){throw S===os?$u:S}else u=o;o=Dt();var f=o.queue,g=f.dispatch;return s!==o.memoizedState&&(De.flags|=2048,cs(9,{destroy:void 0},q9.bind(null,f,s),null)),[u,g,n]}function q9(n,o){n.action=o}function c1(n){var o=Dt(),s=ut;if(s!==null)return l1(o,s,n);Dt(),o=o.memoizedState,s=Dt();var u=s.queue.dispatch;return s.memoizedState=n,[o,u,!1]}function cs(n,o,s,u){return n={tag:n,create:s,deps:u,inst:o,next:null},o=De.updateQueue,o===null&&(o=Qu(),De.updateQueue=o),s=o.lastEffect,s===null?o.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,o.lastEffect=n),n}function u1(){return Dt().memoizedState}function td(n,o,s,u){var f=En();De.flags|=n,f.memoizedState=cs(1|o,{destroy:void 0},s,u===void 0?null:u)}function nd(n,o,s,u){var f=Dt();u=u===void 0?null:u;var g=f.memoizedState.inst;ut!==null&&u!==null&&Ng(u,ut.memoizedState.deps)?f.memoizedState=cs(o,g,s,u):(De.flags|=n,f.memoizedState=cs(1|o,g,s,u))}function d1(n,o){td(8390656,8,n,o)}function Hg(n,o){nd(2048,8,n,o)}function X9(n){De.flags|=4;var o=De.updateQueue;if(o===null)o=Qu(),De.updateQueue=o,o.events=[n];else{var s=o.events;s===null?o.events=[n]:s.push(n)}}function f1(n){var o=Dt().memoizedState;return X9({ref:o,nextImpl:n}),function(){if((et&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function h1(n,o){return nd(4,2,n,o)}function g1(n,o){return nd(4,4,n,o)}function p1(n,o){if(typeof o=="function"){n=n();var s=o(n);return function(){typeof s=="function"?s():o(null)}}if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function m1(n,o,s){s=s!=null?s.concat([n]):null,nd(4,4,p1.bind(null,o,n),s)}function Fg(){}function v1(n,o){var s=Dt();o=o===void 0?null:o;var u=s.memoizedState;return o!==null&&Ng(o,u[1])?u[0]:(s.memoizedState=[n,o],n)}function b1(n,o){var s=Dt();o=o===void 0?null:o;var u=s.memoizedState;if(o!==null&&Ng(o,u[1]))return u[0];if(u=n(),fa){eo(!0);try{n()}finally{eo(!1)}}return s.memoizedState=[u,o],u}function $g(n,o,s){return s===void 0||(Ar&1073741824)!==0&&(Ve&261930)===0?n.memoizedState=o:(n.memoizedState=s,n=z2(),De.lanes|=n,bo|=n,s)}function y1(n,o,s,u){return ti(s,o)?s:fo.current!==null?(n=$g(n,s,u),ti(n,o)||(Bt=!0),n):(Ar&106)===0||(Ar&1073741824)!==0&&(Ve&261930)===0?(Bt=!0,n.memoizedState=s):(n=z2(),De.lanes|=n,bo|=n,o)}function x1(n,o,s,u,f){var g=xe.p;xe.p=g!==0&&8>g?g:8;var S=le.T,E={};E.types=S!==null?S.types:null,le.T=E,Yg(n,!1,o,s);try{var j=f(),q=le.S;if(q!==null&&q(E,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var J=$9(j,u);jl(n,o,J,ai(n))}else jl(n,o,u,ai(n))}catch(ae){jl(n,o,{then:function(){},status:"rejected",reason:ae},ai())}finally{xe.p=g,S!==null&&E.types!==null&&(S.types=E.types),le.T=S}}function Z9(){}function Ug(n,o,s,u){if(n.tag!==5)throw Error(r(476));var f=S1(n).queue;x1(n,f,o,Xe,s===null?Z9:function(){return _1(n),s(u)})}function S1(n){var o=n.memoizedState;if(o!==null)return o;o={memoizedState:Xe,baseState:Xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:Xe},next:null};var s={};return o.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:s},next:null},n.memoizedState=o,n=n.alternate,n!==null&&(n.memoizedState=o),o}function _1(n){var o=S1(n);o.next===null&&(o=n.alternate.memoizedState),jl(n,o.next.queue,{},ai())}function Wg(){return cn(zs)}function w1(){return Dt().memoizedState}function C1(){return Dt().memoizedState}function K9(n){for(var o=n.return;o!==null;){switch(o.tag){case 24:case 3:var s=ai();n=co(s);var u=uo(o,n,s);u!==null&&(Gn(u,o,s),Nl(u,o,s)),o={cache:xg()},n.payload=o;return}o=o.return}}function Q9(n,o,s){var u=ai();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},id(n)?T1(o,s):(s=dg(n,o,s,u),s!==null&&(Gn(s,n,u),k1(s,o,u)))}function E1(n,o,s){var u=ai();jl(n,o,s,u)}function jl(n,o,s,u){var f={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(id(n))T1(o,f);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null))try{var S=o.lastRenderedState,E=g(S,s);if(f.hasEagerState=!0,f.eagerState=E,ti(E,S))return Pu(n,o,f,0),ft===null&&Iu(),!1}catch{}if(s=dg(n,o,f,u),s!==null)return Gn(s,n,u),k1(s,o,u),!0}return!1}function Yg(n,o,s,u){if(u={lane:2,revertLane:Lp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},id(n)){if(o)throw Error(r(479))}else o=dg(n,s,u,2),o!==null&&Gn(o,n,2)}function id(n){var o=n.alternate;return n===De||o!==null&&o===De}function T1(n,o){ss=Zu=!0;var s=n.pending;s===null?o.next=o:(o.next=s.next,s.next=o),n.pending=o}function k1(n,o,s){if((s&4194048)!==0){var u=o.lanes;u&=n.pendingLanes,s|=u,o.lanes=s,zb(n,s)}}var rd={readContext:cn,use:Ju,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt,useEffectEvent:Nt},z1={readContext:cn,use:Ju,useCallback:function(n,o){return En().memoizedState=[n,o===void 0?null:o],n},useContext:cn,useEffect:d1,useImperativeHandle:function(n,o,s){s=s!=null?s.concat([n]):null,td(4194308,4,p1.bind(null,o,n),s)},useLayoutEffect:function(n,o){return td(4194308,4,n,o)},useInsertionEffect:function(n,o){td(4,2,n,o)},useMemo:function(n,o){var s=En();o=o===void 0?null:o;var u=n();if(fa){eo(!0);try{n()}finally{eo(!1)}}return s.memoizedState=[u,o],u},useReducer:function(n,o,s){var u=En();if(s!==void 0){var f=s(o);if(fa){eo(!0);try{s(o)}finally{eo(!1)}}}else f=o;return u.memoizedState=u.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},u.queue=n,n=n.dispatch=Q9.bind(null,De,n),[u.memoizedState,n]},useRef:function(n){var o=En();return n={current:n},o.memoizedState=n},useState:function(n){n=Gg(n);var o=n.queue,s=E1.bind(null,De,o);return o.dispatch=s,[n.memoizedState,s]},useDebugValue:Fg,useDeferredValue:function(n,o){var s=En();return $g(s,n,o)},useTransition:function(){var n=Gg(!1);return n=x1.bind(null,De,n.queue,!0,!1),En().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,o,s){var u=De,f=En();if(je){if(s===void 0)throw Error(r(407));s=s()}else{if(s=o(),ft===null)throw Error(r(349));(Ve&127)!==0||Xy(u,o,s)}f.memoizedState=s;var g={value:s,getSnapshot:o};return f.queue=g,d1(Ky.bind(null,u,g,n),[n]),u.flags|=2048,cs(9,{destroy:void 0},Zy.bind(null,u,g,s,o),null),s},useId:function(){var n=En(),o=ft.identifierPrefix;if(je){var s=Yi,u=Wi;s=(u&~(1<<32-Jn(u)-1)).toString(32)+s,o="_"+o+"R_"+s,s=Ku++,0<s&&(o+="H"+s.toString(32)),o+="_"}else s=U9++,o="_"+o+"r_"+s.toString(32)+"_";return n.memoizedState=o},useHostTransitionStatus:Wg,useFormState:a1,useActionState:a1,useOptimistic:function(n){var o=En();o.memoizedState=o.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=s,o=Yg.bind(null,De,!0,s),s.dispatch=o,[n,o]},useMemoCache:Lg,useCacheRefresh:function(){return En().memoizedState=K9.bind(null,De)},useEffectEvent:function(n){var o=En(),s={impl:n};return o.memoizedState=s,function(){if((et&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},R1={readContext:cn,use:Ju,useCallback:v1,useContext:cn,useEffect:Hg,useImperativeHandle:m1,useInsertionEffect:h1,useLayoutEffect:g1,useMemo:b1,useReducer:ed,useRef:u1,useState:function(){return ed(Or)},useDebugValue:Fg,useDeferredValue:function(n,o){var s=Dt();return y1(s,ut.memoizedState,n,o)},useTransition:function(){var n=ed(Or)[0],o=Dt().memoizedState;return[typeof n=="boolean"?n:Ll(n),o]},useSyncExternalStore:qy,useId:w1,useHostTransitionStatus:Wg,useFormState:s1,useActionState:s1,useOptimistic:function(n,o){var s=Dt();return e1(s,ut,n,o)},useMemoCache:Lg,useCacheRefresh:C1,useEffectEvent:f1},J9={readContext:cn,use:Ju,useCallback:v1,useContext:cn,useEffect:Hg,useImperativeHandle:m1,useInsertionEffect:h1,useLayoutEffect:g1,useMemo:b1,useReducer:Bg,useRef:u1,useState:function(){return Bg(Or)},useDebugValue:Fg,useDeferredValue:function(n,o){var s=Dt();return ut===null?$g(s,n,o):y1(s,ut.memoizedState,n,o)},useTransition:function(){var n=Bg(Or)[0],o=Dt().memoizedState;return[typeof n=="boolean"?n:Ll(n),o]},useSyncExternalStore:qy,useId:w1,useHostTransitionStatus:Wg,useFormState:c1,useActionState:c1,useOptimistic:function(n,o){var s=Dt();return ut!==null?e1(s,ut,n,o):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:Lg,useCacheRefresh:C1,useEffectEvent:f1};function qg(n,o,s,u){o=n.memoizedState,s=s(u,o),s=s==null?o:A({},o,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var Xg={enqueueSetState:function(n,o,s){n=n._reactInternals;var u=ai(),f=co(u);f.payload=o,s!=null&&(f.callback=s),o=uo(n,f,u),o!==null&&(Gn(o,n,u),Nl(o,n,u))},enqueueReplaceState:function(n,o,s){n=n._reactInternals;var u=ai(),f=co(u);f.tag=1,f.payload=o,s!=null&&(f.callback=s),o=uo(n,f,u),o!==null&&(Gn(o,n,u),Nl(o,n,u))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var s=ai(),u=co(s);u.tag=2,o!=null&&(u.callback=o),o=uo(n,u,s),o!==null&&(Gn(o,n,s),Nl(o,n,s))}};function A1(n,o,s,u,f,g,S){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,g,S):o.prototype&&o.prototype.isPureReactComponent?!Cl(s,u)||!Cl(f,g):!0}function O1(n,o,s,u){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(s,u),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(s,u),o.state!==n&&Xg.enqueueReplaceState(o,o.state,null)}function ha(n,o){var s=o;if("ref"in o){s={};for(var u in o)u!=="ref"&&(s[u]=o[u])}if(n=n.defaultProps){s===o&&(s=A({},s));for(var f in n)s[f]===void 0&&(s[f]=n[f])}return s}function N1(n){Nu(n)}function I1(n){console.error(n)}function P1(n){Nu(n)}function od(n,o){try{var s=n.onUncaughtError;s(o.value,{componentStack:o.stack})}catch(u){setTimeout(function(){throw u})}}function M1(n,o,s){try{var u=n.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Zg(n,o,s){return s=co(s),s.tag=3,s.payload={element:null},s.callback=function(){od(n,o)},s}function D1(n){return n=co(n),n.tag=3,n}function L1(n,o,s,u){var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var g=u.value;n.payload=function(){return f(g)},n.callback=function(){M1(o,s,u)}}var S=s.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(n.callback=function(){M1(o,s,u),typeof f!="function"&&(yo===null?yo=new Set([this]):yo.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function eE(n,o,s,u,f){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(o=s.alternate,o!==null&&oa(o,s,f,!0),s=un.current,s!==null){switch(s.tag){case 31:case 13:case 19:return xn===null?Td():s.alternate===null&&It===0&&(It=3),s.flags&=-257,s.flags|=65536,s.lanes=f,u===Uu?s.flags|=16384:(o=s.updateQueue,o===null?s.updateQueue=new Set([u]):o.add(u),Pp(n,u,f)),!1;case 22:return s.flags|=65536,u===Uu?s.flags|=16384:(o=s.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=o):(s=o.retryQueue,s===null?o.retryQueue=new Set([u]):s.add(u)),Pp(n,u,f)),!1}throw Error(r(435,s.tag))}return Pp(n,u,f),Td(),!1}if(je)return o=un.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=f,u!==mg&&(n=Error(r(422),{cause:u}),kl(pi(n,s)))):(u!==mg&&(o=Error(r(423),{cause:u}),kl(pi(o,s))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,u=pi(u,s),f=Zg(n.stateNode,u,f),Tg(n,f),It!==4&&(It=2)),!1;var g=Error(r(520),{cause:u});if(g=pi(g,s),Wl===null?Wl=[g]:Wl.push(g),It!==4&&(It=2),o===null)return!0;u=pi(u,s),s=o;do{switch(s.tag){case 3:return s.flags|=65536,n=f&-f,s.lanes|=n,n=Zg(s.stateNode,u,n),Tg(s,n),!1;case 1:if(o=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(yo===null||!yo.has(g))))return s.flags|=65536,f&=-f,s.lanes|=f,f=D1(f),L1(f,n,s,u),Tg(s,f),!1;break;case 22:if(s.memoizedState!==null)return s.flags|=65536,!1}s=s.return}while(s!==null);return!1}var Kg=Error(r(461)),Bt=!1;function Ut(n,o,s,u){o.child=n===null?Vy(o,null,s,u):da(o,n.child,s,u)}function j1(n,o,s,u,f){s=s.render;var g=o.ref;if("ref"in u){var S={};for(var E in u)E!=="ref"&&(S[E]=u[E])}else S=u;return aa(o),u=Ig(n,o,s,S,g,f),E=Pg(),n!==null&&!Bt?(Mg(n,o,f),Nr(n,o,f)):(je&&E&&ju(o),o.flags|=1,Ut(n,o,u,f),o.child)}function B1(n,o,s,u,f){if(n===null){var g=s.type;return typeof g=="function"&&!fg(g)&&g.defaultProps===void 0&&s.compare===null?(o.tag=15,o.type=g,G1(n,o,g,u,f)):(n=Du(s.type,null,u,o,o.mode,f),n.ref=o.ref,n.return=o,o.child=n)}if(g=n.child,!op(n,f)){var S=g.memoizedProps;if(s=s.compare,s=s!==null?s:Cl,s(S,u)&&n.ref===o.ref)return Nr(n,o,f)}return o.flags|=1,n=Tr(g,u),n.ref=o.ref,n.return=o,o.child=n}function G1(n,o,s,u,f){if(n!==null){var g=n.memoizedProps;if(Cl(g,u)&&n.ref===o.ref)if(Bt=!1,o.pendingProps=u=g,op(n,f))(n.flags&131072)!==0&&(Bt=!0);else return o.lanes=n.lanes,Nr(n,o,f)}return Qg(n,o,s,u,f)}function V1(n,o,s,u){var f=u.children,g=n!==null?n.memoizedState:null;if(n===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((o.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,n!==null){for(u=o.child=n.child,f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;u=f&~g}else u=0,o.child=null;return H1(n,o,g,s,u)}if((s&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},n!==null&&Fu(o,g!==null?g.cachePool:null),g!==null?$y(o,g):zg(),Uy(o);else return u=o.lanes=536870912,H1(n,o,g!==null?g.baseLanes|s:s,s,u)}else g!==null?(Fu(o,g.cachePool),$y(o,g),go(),o.memoizedState=null):(n!==null&&Fu(o,null),zg(),go());return Ut(n,o,f,s),o.child}function Bl(n,o){return n!==null&&n.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function H1(n,o,s,u,f){var g=_g();return g=g===null?null:{parent:Lt._currentValue,pool:g},o.memoizedState={baseLanes:s,cachePool:g},n!==null&&Fu(o,null),zg(),Uy(o),n!==null&&oa(n,o,u,!0),o.childLanes=f,null}function ad(n,o){return o=sd({mode:o.mode,children:o.children},n.mode),o.ref=n.ref,n.child=o,o.return=n,o}function F1(n,o,s){return da(o,n.child,null,s),n=ad(o,o.pendingProps),n.flags|=2,ni(o),o.memoizedState=null,n}function tE(n,o,s){var u=o.pendingProps,f=(o.flags&128)!==0;if(o.flags&=-129,n===null){if(je){if(u.mode==="hidden")return n=ad(o,u),o.lanes=536870912,n.memoizedState={baseLanes:0,cachePool:null},Bl(null,n);if(Ag(o),(n=vt)?(n=px(n,bi),n=n!==null&&n.data==="&"?n:null,n!==null&&(o.memoizedState={dehydrated:n,treeContext:io!==null?{id:Wi,overflow:Yi}:null,retryLane:536870912,hydrationErrors:null},s=Ty(n),s.return=o,o.child=s,Qt=o,vt=null)):n=null,n===null)throw oo(o);return o.lanes=536870912,null}return ad(o,u)}var g=n.memoizedState;if(g!==null){var S=g.dehydrated;if(Ag(o),f)if(o.flags&256)o.flags&=-257,o=F1(n,o,s);else if(o.memoizedState!==null)o.child=n.child,o.flags|=128,o=null;else throw Error(r(558));else if(Bt||oa(n,o,s,!1),f=(s&n.childLanes)!==0,Bt||f){if(fo.current===null){if(u=ft,u!==null&&(S=Rb(u,s),S!==0&&S!==g.retryLane))throw g.retryLane=S,ta(n,S),Gn(u,n,S),Kg;Td()}o=F1(n,o,s)}else n=g.treeContext,vt=xi(S.nextSibling),Qt=o,je=!0,ro=null,bi=!1,n!==null&&Ry(o,n),o=ad(o,u),o.flags|=134221824;return o}return n=Tr(n.child,{mode:u.mode,children:u.children}),n.ref=o.ref,o.child=n,n.return=o,n}function us(n,o){var s=o.ref;if(s===null)n!==null&&n.ref!==null&&(o.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(n===null||n.ref!==s)&&(o.flags|=4194816)}}function Qg(n,o,s,u,f){return aa(o),s=Ig(n,o,s,u,void 0,f),u=Pg(),n!==null&&!Bt?(Mg(n,o,f),Nr(n,o,f)):(je&&u&&ju(o),o.flags|=1,Ut(n,o,s,f),o.child)}function $1(n,o,s,u,f,g){return aa(o),o.updateQueue=null,s=Yy(o,u,s,f),Wy(n),u=Pg(),n!==null&&!Bt?(Mg(n,o,g),Nr(n,o,g)):(je&&u&&ju(o),o.flags|=1,Ut(n,o,s,g),o.child)}function U1(n,o,s,u,f){if(aa(o),o.stateNode===null){var g=es,S=s.contextType;typeof S=="object"&&S!==null&&(g=cn(S)),g=new s(u,g),o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Xg,o.stateNode=g,g._reactInternals=o,g=o.stateNode,g.props=u,g.state=o.memoizedState,g.refs={},Cg(o),S=s.contextType,g.context=typeof S=="object"&&S!==null?cn(S):es,g.state=o.memoizedState,S=s.getDerivedStateFromProps,typeof S=="function"&&(qg(o,s,S,u),g.state=o.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&Xg.enqueueReplaceState(g,g.state,null),Pl(o,u,g,f),Il(),g.state=o.memoizedState),typeof g.componentDidMount=="function"&&(o.flags|=4194308),u=!0}else if(n===null){g=o.stateNode;var E=o.memoizedProps,j=ha(s,E);g.props=j;var q=g.context,J=s.contextType;S=es,typeof J=="object"&&J!==null&&(S=cn(J));var ae=s.getDerivedStateFromProps;J=typeof ae=="function"||typeof g.getSnapshotBeforeUpdate=="function",E=o.pendingProps!==E,J||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(E||q!==S)&&O1(o,g,u,S),lo=!1;var $=o.memoizedState;g.state=$,Pl(o,u,g,f),Il(),q=o.memoizedState,E||$!==q||lo?(typeof ae=="function"&&(qg(o,s,ae,u),q=o.memoizedState),(j=lo||A1(o,s,j,u,$,q,S))?(J||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(o.flags|=4194308)):(typeof g.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=u,o.memoizedState=q),g.props=u,g.state=q,g.context=S,u=j):(typeof g.componentDidMount=="function"&&(o.flags|=4194308),u=!1)}else{g=o.stateNode,Eg(n,o),S=o.memoizedProps,J=ha(s,S),g.props=J,ae=o.pendingProps,$=g.context,q=s.contextType,j=es,typeof q=="object"&&q!==null&&(j=cn(q)),E=s.getDerivedStateFromProps,(q=typeof E=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==ae||$!==j)&&O1(o,g,u,j),lo=!1,$=o.memoizedState,g.state=$,Pl(o,u,g,f),Il();var Q=o.memoizedState;S!==ae||$!==Q||lo||n!==null&&n.dependencies!==null&&Vu(n.dependencies)?(typeof E=="function"&&(qg(o,s,E,u),Q=o.memoizedState),(J=lo||A1(o,s,J,u,$,Q,j)||n!==null&&n.dependencies!==null&&Vu(n.dependencies))?(q||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(u,Q,j),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(u,Q,j)),typeof g.componentDidUpdate=="function"&&(o.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(o.flags|=1024),o.memoizedProps=u,o.memoizedState=Q),g.props=u,g.state=Q,g.context=j,u=J):(typeof g.componentDidUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(o.flags|=1024),u=!1)}return g=u,us(n,o),u=(o.flags&128)!==0,g||u?(g=o.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:g.render(),o.flags|=1,n!==null&&u?(o.child=da(o,n.child,null,f),o.child=da(o,null,s,f)):Ut(n,o,s,f),o.memoizedState=g.state,n=o.child):n=Nr(n,o,f),n}function W1(n,o,s,u){return ia(),o.flags|=256,Ut(n,o,s,u),o.child}var Jg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ep(n){return{baseLanes:n,cachePool:My()}}function tp(n,o,s){return n=n!==null?n.childLanes&~s:0,o&&(n|=oi),n}function Y1(n,o,s){var u=o.pendingProps,f=!1,g=(o.flags&128)!==0,S;if((S=g)||(S=n!==null&&n.memoizedState===null?!1:(dn.current&2)!==0),S&&(f=!0,o.flags&=-129),S=(o.flags&32)!==0,o.flags&=-33,n===null){if(je){if(f?ho(o):go(),(n=vt)?(n=px(n,bi),n=n!==null&&n.data!=="&"?n:null,n!==null&&(o.memoizedState={dehydrated:n,treeContext:io!==null?{id:Wi,overflow:Yi}:null,retryLane:536870912,hydrationErrors:null},s=Ty(n),s.return=o,o.child=s,Qt=o,vt=null)):n=null,n===null)throw oo(o);return em(n)?o.lanes=32:o.lanes=536870912,null}return g=u.children,u=u.fallback,f?(go(),f=o.mode,g=sd({mode:"hidden",children:g},f),u=na(u,f,s,null),g.return=o,u.return=o,g.sibling=u,o.child=g,u=o.child,u.memoizedState=ep(s),u.childLanes=tp(n,S,s),o.memoizedState=Jg,Bl(null,u)):(ho(o),np(o,g))}var E=n.memoizedState;if(E!==null){var j=E.dehydrated;if(j!==null)return nE(n,o,g,S,u,j,E,s)}return f?(go(),f=u.fallback,g=o.mode,E=n.child,j=E.sibling,u=Tr(E,{mode:"hidden",children:u.children}),u.subtreeFlags=E.subtreeFlags&1206910976,j!==null?f=Tr(j,f):(f=na(f,g,s,null),f.flags|=2),f.return=o,u.return=o,u.sibling=f,o.child=u,Bl(null,u),u=o.child,f=n.child.memoizedState,f===null?f=ep(s):(g=f.cachePool,g!==null?(E=Lt._currentValue,g=g.parent!==E?{parent:E,pool:E}:g):g=My(),f={baseLanes:f.baseLanes|s,cachePool:g}),u.memoizedState=f,u.childLanes=tp(n,S,s),o.memoizedState=Jg,Bl(n.child,u)):(ho(o),s=n.child,n=s.sibling,s=Tr(s,{mode:"visible",children:u.children}),s.return=o,s.sibling=null,n!==null&&(S=o.deletions,S===null?(o.deletions=[n],o.flags|=16):S.push(n)),o.child=s,o.memoizedState=null,s)}function np(n,o){return o=sd({mode:"visible",children:o},n.mode),o.return=n,n.child=o}function sd(n,o){return n=Dn(22,n,null,o),n.lanes=0,n}function ld(n,o,s){return da(o,n.child,null,s),n=np(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function nE(n,o,s,u,f,g,S,E){if(s)return o.flags&256?(ho(o),o.flags&=-257,ld(n,o,E)):o.memoizedState!==null?(go(),o.child=n.child,o.flags|=128,null):(go(),g=f.fallback,S=o.mode,f=sd({mode:"visible",children:f.children},S),g=na(g,S,E,null),g.flags|=2,f.return=o,g.return=o,f.sibling=g,o.child=f,da(o,n.child,null,E),f=o.child,f.memoizedState=ep(E),f.childLanes=tp(n,u,E),o.memoizedState=Jg,Bl(null,f));if(ho(o),em(g)){if(u=g.nextSibling&&g.nextSibling.dataset,u)var j=u.dgst;return u=j,u!==""&&(f=Error(r(419)),f.stack="",f.digest=u,kl({value:f,source:null,stack:null})),ld(n,o,E)}if(Bt||oa(n,o,E,!1),u=(E&n.childLanes)!==0,Bt||u){if(fo.current!==null)return ld(n,o,E);if(u=ft,u!==null&&(f=Rb(u,E),f!==0&&f!==S.retryLane))throw S.retryLane=f,ta(n,f),Gn(u,n,f),Kg;return Jp(g)||Td(),ld(n,o,E)}return Jp(g)?(o.flags|=192,o.child=n.child,null):(n=S.treeContext,vt=xi(g.nextSibling),Qt=o,je=!0,ro=null,bi=!1,n!==null&&Ry(o,n),o=np(o,f.children),o.flags|=134221824,o)}function q1(n,o,s){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o),Gu(n.return,o,s)}function X1(n){for(var o=null;n!==null;){var s=n.alternate;s!==null&&Xu(s)===null&&(o=n),n=n.sibling}return o}function cd(n,o,s,u,f,g){var S=n.memoizedState;S===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:f,treeForkCount:g}:(S.isBackwards=o,S.rendering=null,S.renderingStartTime=0,S.last=u,S.tail=s,S.tailMode=f,S.treeForkCount=g)}function ip(n){var o=n.child;for(n.child=null;o!==null;){var s=o.sibling;o.sibling=n.child,n.child=o,o=s}}function rp(n,o,s){var u=o.pendingProps,f=u.revealOrder,g=u.tail;u=u.children;var S=dn.current;if(o.flags&128)return Ml(o,S),null;var E=(S&2)!==0;if(E?(S=S&1|2,o.flags|=128):S&=1,Ml(o,S),f==="backwards"&&n!==null?(ip(n),Ut(n,o,u,s),ip(n)):Ut(n,o,u,s),u=je?Tl:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&q1(n,s,o);else if(n.tag===19)q1(n,s,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"backwards":s=X1(o.child),s===null?(f=o.child,o.child=null):(f=s.sibling,s.sibling=null,ip(o)),cd(o,!0,f,null,g,u);break;case"unstable_legacy-backwards":for(s=null,f=o.child,o.child=null;f!==null;){if(n=f.alternate,n!==null&&Xu(n)===null){o.child=f;break}n=f.sibling,f.sibling=s,s=f,f=n}cd(o,!0,s,null,g,u);break;case"together":cd(o,!1,null,null,void 0,u);break;case"independent":o.memoizedState=null;break;default:s=X1(o.child),s===null?(f=o.child,o.child=null):(f=s.sibling,s.sibling=null),cd(o,!1,f,s,g,u)}return o.child}function Z1(n,o,s){var u=o.pendingProps;return ao(o,o.type,u.value),Ut(n,o,u.children,s),o.child}function Nr(n,o,s){if(n!==null&&(o.dependencies=n.dependencies),bo|=o.lanes,(s&o.childLanes)===0)if(n!==null){if(oa(n,o,s,!1),(s&o.childLanes)===0)return null}else return null;if(n!==null&&o.child!==n.child)throw Error(r(153));if(o.child!==null){for(n=o.child,s=Tr(n,n.pendingProps),o.child=s,s.return=o;n.sibling!==null;)n=n.sibling,s=s.sibling=Tr(n,n.pendingProps),s.return=o;s.sibling=null}return o.child}function op(n,o){return(n.lanes&o)!==0?!0:(n=n.dependencies,!!(n!==null&&Vu(n)))}function iE(n,o,s){switch(o.tag){case 3:yn(o,o.stateNode.containerInfo),ao(o,Lt,n.memoizedState.cache),ia();break;case 27:case 5:dl(o);break;case 4:yn(o,o.stateNode.containerInfo);break;case 10:ao(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Ag(o),null;break;case 13:var u=o.memoizedState;if(u!==null){if(u.dehydrated!==null)return ho(o),o.flags|=128,null;u=oa(n,o,s,!1);var f=o.child.childLanes;return u||(s&f)!==0?Y1(n,o,s):(ho(o),n=Nr(n,o,s),n!==null?n.sibling:null)}ho(o);break;case 19:if(o.flags&128)return rp(n,o,s);if(f=(n.flags&128)!==0,u=(s&o.childLanes)!==0,u||(oa(n,o,s,!1),u=(s&o.childLanes)!==0),f){if(u)return rp(n,o,s);o.flags|=128}if(f=o.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Ml(o,dn.current),u)break;return null;case 22:return o.lanes=0,V1(n,o,s,o.pendingProps);case 24:ao(o,Lt,n.memoizedState.cache)}return Nr(n,o,s)}function K1(n,o,s){if(n!==null)if(n.memoizedProps!==o.pendingProps)Bt=!0;else{if(!op(n,s)&&(o.flags&128)===0)return Bt=!1,iE(n,o,s);Bt=(n.flags&131072)!==0}else Bt=!1,je&&(o.flags&1048576)!==0&&zy(o,Tl,o.index);switch(o.lanes=0,o.tag){case 16:e:{var u=o.pendingProps;if(n=ca(o.elementType),o.type=n,typeof n=="function")fg(n)?(u=ha(n,u),o.tag=1,o=U1(null,o,n,u,s)):(o.tag=0,o=Qg(null,o,n,u,s));else{if(n!=null){var f=n.$$typeof;if(f===P){o.tag=11,o=j1(null,o,n,u,s);break e}else if(f===de){o.tag=14,o=B1(null,o,n,u,s);break e}else if(f===K){o.tag=10,o.type=n,o=Z1(null,o,s);break e}}throw o=re(n)||n,Error(r(306,o,""))}}return o;case 0:return Qg(n,o,o.type,o.pendingProps,s);case 1:return u=o.type,f=ha(u,o.pendingProps),U1(n,o,u,f,s);case 3:e:{if(yn(o,o.stateNode.containerInfo),n===null)throw Error(r(387));u=o.pendingProps;var g=o.memoizedState;f=g.element,Eg(n,o),Pl(o,u,null,s);var S=o.memoizedState;if(u=S.cache,ao(o,Lt,u),u!==g.cache&&yg(o,[Lt],s,!0),Il(),u=S.element,g.isDehydrated)if(g={element:u,isDehydrated:!1,cache:S.cache},o.updateQueue.baseState=g,o.memoizedState=g,o.flags&256){o=W1(n,o,u,s);break e}else if(u!==f){f=pi(Error(r(424)),o),kl(f),o=W1(n,o,u,s);break e}else for(n=o.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,vt=xi(n.firstChild),Qt=o,je=!0,ro=null,bi=!0,s=Vy(o,null,u,s),o.child=s;s;)s.flags=s.flags&-3|134221824,s=s.sibling;else{if(ia(),u===f){o=Nr(n,o,s);break e}Ut(n,o,u,s)}o=o.child}return o;case 26:return us(n,o),n===null?(s=_x(o.type,null,o.pendingProps,null))?o.memoizedState=s:je||(o.stateNode=tx(o.type,o.pendingProps,Zn.current,o)):o.memoizedState=_x(o.type,n.memoizedProps,o.pendingProps,n.memoizedState),null;case 27:return dl(o),n===null&&je&&(u=o.stateNode=bx(o.type,o.pendingProps,Zn.current),Qt=o,bi=!0,f=vt,_o(o.type)?(tm=f,vt=xi(u.firstChild)):vt=f),Ut(n,o,o.pendingProps.children,s),us(n,o),n===null&&(o.flags|=4194304),o.child;case 5:return n===null&&je&&((f=u=vt)&&(u=KE(u,o.type,o.pendingProps,bi),u!==null?(o.stateNode=u,Qt=o,vt=xi(u.firstChild),bi=!1,f=!0):f=!1),f||oo(o)),dl(o),f=o.type,g=o.pendingProps,S=n!==null?n.memoizedProps:null,u=g.children,Wp(f,g)?u=null:S!==null&&Wp(f,S)&&(o.flags|=32),o.memoizedState!==null&&(f=Ig(n,o,W9,null,null,s),zs._currentValue=f),us(n,o),Ut(n,o,u,s),o.child;case 6:return n===null&&je&&((n=s=vt)&&(s=QE(s,o.pendingProps,bi),s!==null?(o.stateNode=s,Qt=o,vt=null,n=!0):n=!1),n||oo(o)),null;case 13:return Y1(n,o,s);case 4:return yn(o,o.stateNode.containerInfo),u=o.pendingProps,n===null?o.child=da(o,null,u,s):Ut(n,o,u,s),o.child;case 11:return j1(n,o,o.type,o.pendingProps,s);case 7:return u=o.pendingProps,us(n,o),Ut(n,o,u,s),o.child;case 8:return Ut(n,o,o.pendingProps.children,s),o.child;case 12:return Ut(n,o,o.pendingProps.children,s),o.child;case 10:return Z1(n,o,s);case 9:return f=o.type._context,u=o.pendingProps.children,aa(o),f=cn(f),u=u(f),o.flags|=1,Ut(n,o,u,s),o.child;case 14:return B1(n,o,o.type,o.pendingProps,s);case 15:return G1(n,o,o.type,o.pendingProps,s);case 19:return rp(n,o,s);case 31:return tE(n,o,s);case 22:return V1(n,o,s,o.pendingProps);case 24:return aa(o),u=cn(Lt),n===null?(f=_g(),f===null&&(f=ft,g=xg(),f.pooledCache=g,g.refCount++,g!==null&&(f.pooledCacheLanes|=s),f=g),o.memoizedState={parent:u,cache:f},Cg(o),ao(o,Lt,f)):((n.lanes&s)!==0&&(Eg(n,o),Pl(o,null,null,s),Il()),f=n.memoizedState,g=o.memoizedState,f.parent!==u?(f={parent:u,cache:u},o.memoizedState=f,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=f),ao(o,Lt,u)):(u=g.cache,ao(o,Lt,u),u!==f.cache&&yg(o,[Lt],s,!0))),Ut(n,o,o.pendingProps.children,s),o.child;case 30:return o.stateNode===null&&(o.stateNode={autoName:null,paired:null,clones:null,ref:null}),u=o.pendingProps,u.name!=null&&u.name!=="auto"?o.flags|=n===null?18882560:18874368:je&&ju(o),n!==null&&n.memoizedProps.name!==u.name?o.flags|=4194816:us(n,o),Ut(n,o,u.children,s),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function Ir(n){n.flags|=4}function ap(n,o,s,u,f){var g;if((g=(n.mode&32)!==0)&&(g=s===null?Tx(o,u):Tx(o,u)&&(u.src!==s.src||u.srcSet!==s.srcSet)),g){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(N2())n.flags|=8192;else throw ua=Uu,wg}else n.flags&=-16777217}function Q1(n,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!kx(o))if(N2())n.flags|=8192;else throw ua=Uu,wg}function ud(n,o){o!==null&&(n.flags|=4),n.flags&16384&&(o=n.tag!==22?Tb():536870912,n.lanes|=o,ps|=o)}function Gl(n,o){if(!je)switch(n.tailMode){case"visible":break;case"collapsed":for(var s=n.tail,u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null;break;default:for(o=n.tail,s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n.tail=null:s.sibling=null}}function bt(n){var o=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(o)for(var f=n.child;f!==null;)s|=f.lanes|f.childLanes,u|=f.subtreeFlags&1206910976,u|=f.flags&1206910976,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)s|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=u,n.childLanes=s,o}function rE(n,o,s){var u=o.pendingProps;switch(pg(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(o),null;case 1:return bt(o),null;case 3:return s=o.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),Rr(Lt),Fi(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(is(o)?Ir(o):n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,vg())),bt(o),null;case 26:var f=o.type,g=o.memoizedState;return n===null?(Ir(o),g!==null?(bt(o),Q1(o,g)):(bt(o),ap(o,f,null,u,s))):g?g!==n.memoizedState?(Ir(o),bt(o),Q1(o,g)):(bt(o),o.flags&=-16777217):(n=n.memoizedProps,n!==u&&Ir(o),bt(o),ap(o,f,n,u,s)),null;case 27:if(xr(o),s=Zn.current,f=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==u&&Ir(o);else{if(!u){if(o.stateNode===null)throw Error(r(166));return bt(o),o.subtreeFlags&=-33554433,null}n=an.current,is(o)?Ay(o):(n=bx(f,u,s),o.stateNode=n,Ir(o))}return bt(o),o.subtreeFlags&=-33554433,null;case 5:if(xr(o),f=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==u&&Ir(o);else{if(!u){if(o.stateNode===null)throw Error(r(166));return bt(o),o.subtreeFlags&=-33554433,null}if(g=an.current,is(o))Ay(o);else{var S=Kl(Zn.current);switch(g){case 1:g=S.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:g=S.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":g=S.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":g=S.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":g=S.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof u.is=="string"?S.createElement("select",{is:u.is}):S.createElement("select"),u.multiple?g.multiple=!0:u.size&&(g.size=u.size);break;default:g=typeof u.is=="string"?S.createElement(f,{is:u.is}):S.createElement(f)}}g[ln]=o,g[Mn]=u;e:for(S=o.child;S!==null;){if(S.tag===5||S.tag===6)g.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===o)break e;for(;S.sibling===null;){if(S.return===null||S.return===o)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}o.stateNode=g;e:switch(hn(g,f,u),f){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Ir(o)}}return bt(o),o.subtreeFlags&=-33554433,ap(o,o.type,n===null?null:n.memoizedProps,o.pendingProps,s),null;case 6:if(n&&o.stateNode!=null)n.memoizedProps!==u&&Ir(o);else{if(typeof u!="string"&&o.stateNode===null)throw Error(r(166));if(n=Zn.current,is(o)){if(n=o.stateNode,s=o.memoizedProps,u=null,f=Qt,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}n[ln]=o,n=!!(n.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||K2(n.nodeValue,s)),n||oo(o,!0)}else n=Kl(n).createTextNode(u),n[ln]=o,o.stateNode=n}return bt(o),null;case 31:if(s=o.memoizedState,n===null||n.memoizedState!==null){if(u=is(o),s!==null){if(n===null){if(!u)throw Error(r(318));if(n=o.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[ln]=o}else ia(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),n=!1}else s=vg(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return o.flags&256?(ni(o),o):(ni(o),null);if((o.flags&128)!==0)throw Error(r(558))}return bt(o),null;case 13:if(u=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=is(o),u!==null&&u.dehydrated!==null){if(n===null){if(!f)throw Error(r(318));if(f=o.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[ln]=o}else ia(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;bt(o),f=!1}else f=vg(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return o.flags&256?(ni(o),o):(ni(o),null)}return ni(o),(o.flags&128)!==0?(o.lanes=s,o):(s=u!==null,n=n!==null&&n.memoizedState!==null,s&&(u=o.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==f&&(u.flags|=2048)),s!==n&&s&&(o.child.flags|=8192),ud(o,o.updateQueue),bt(o),null);case 4:return Fi(),n===null&&Vp(o.stateNode.containerInfo),o.flags|=67108864,bt(o),null;case 10:return Rr(o.type),bt(o),null;case 19:if(Og(o),u=o.memoizedState,u===null)return bt(o),null;if(f=(o.flags&128)!==0,g=u.rendering,g===null)if(f)Gl(u,!1);else{if(It!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(g=Xu(n),g!==null){for(o.flags|=128,Gl(u,!1),n=g.updateQueue,o.updateQueue=n,ud(o,n),o.subtreeFlags=0,n=s,s=o.child;s!==null;)Ey(s,n),s=s.sibling;return Ml(o,dn.current&1|2),je&&kr(o,u.treeForkCount),o.child}n=n.sibling}u.tail!==null&&Kn()>_d&&(o.flags|=128,f=!0,Gl(u,!1),o.lanes=4194304)}else{if(!f)if(n=Xu(g),n!==null){if(o.flags|=128,f=!0,n=n.updateQueue,o.updateQueue=n,ud(o,n),Gl(u,!0),u.tail===null&&u.tailMode!=="collapsed"&&u.tailMode!=="visible"&&!g.alternate&&!je)return bt(o),null}else 2*Kn()-u.renderingStartTime>_d&&s!==536870912&&(o.flags|=128,f=!0,Gl(u,!1),o.lanes=4194304);u.isBackwards?(g.sibling=o.child,o.child=g):(n=u.last,n!==null?n.sibling=g:o.child=g,u.last=g)}if(u.tail!==null){n=u.tail;e:{for(s=n;s!==null;){if(s.alternate!==null){s=!1;break e}s=s.sibling}s=!0}return u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Kn(),n.sibling=null,g=dn.current,g=f?g&1|2:g&1,u.tailMode==="visible"||u.tailMode==="collapsed"||!s||je?Ml(o,g):(s=g,Je(un,o),Je(dn,s),xn===null&&(xn=o)),je&&kr(o,u.treeForkCount),n}return bt(o),null;case 22:case 23:return ni(o),Rg(),u=o.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(o.flags|=8192):u&&(o.flags|=8192),u?(s&536870912)!==0&&(o.flags&128)===0&&(bt(o),o.subtreeFlags&6&&(o.flags|=8192)):bt(o),s=o.updateQueue,s!==null&&ud(o,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),u=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),u!==s&&(o.flags|=2048),n!==null&&_t(la),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),o.memoizedState.cache!==s&&(o.flags|=2048),Rr(Lt),bt(o),null;case 25:return null;case 30:return o.flags|=33554432,bt(o),null}throw Error(r(156,o.tag))}function oE(n,o){switch(pg(o),o.tag){case 1:return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return Rr(Lt),Fi(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 26:case 27:case 5:return xr(o),null;case 31:if(o.memoizedState!==null){if(ni(o),o.alternate===null)throw Error(r(340));ia()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 13:if(ni(o),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(r(340));ia()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return Og(o),n=o.flags,n&65536?(o.flags=n&-65537|128,n=o.memoizedState,n!==null&&(n.rendering=null,n.tail=null),o.flags|=4,o):null;case 4:return Fi(),null;case 10:return Rr(o.type),null;case 22:case 23:return ni(o),Rg(),n!==null&&_t(la),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 24:return Rr(Lt),null;case 25:return null;default:return null}}function J1(n,o){switch(pg(o),o.tag){case 3:Rr(Lt),Fi();break;case 26:case 27:case 5:xr(o);break;case 4:Fi();break;case 31:o.memoizedState!==null&&ni(o);break;case 13:ni(o);break;case 19:Og(o);break;case 10:Rr(o.type);break;case 22:case 23:ni(o),Rg(),n!==null&&_t(la);break;case 24:Rr(Lt)}}function Vl(n,o){try{var s=o.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var f=u.next;s=f;do{if((s.tag&n)===n){u=void 0;var g=s.create,S=s.inst;u=g(),S.destroy=u}s=s.next}while(s!==f)}}catch(E){at(o,o.return,E)}}function po(n,o,s){try{var u=o.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var g=f.next;u=g;do{if((u.tag&n)===n){var S=u.inst,E=S.destroy;if(E!==void 0){S.destroy=void 0,f=o;var j=s,q=E;try{q()}catch(J){at(f,j,J)}}}u=u.next}while(u!==g)}}catch(J){at(o,o.return,J)}}function e2(n){var o=n.updateQueue;if(o!==null){var s=n.stateNode;try{Fy(o,s)}catch(u){at(n,n.return,u)}}}function t2(n,o,s){s.props=ha(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(u){at(n,o,u)}}function qi(n,o){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:var f=n.stateNode,g=Cr(n.memoizedProps,f);(f.ref===null||f.ref.name!==g)&&(f.ref=lx(g)),u=f.ref;break;case 7:if(n.stateNode===null){var S=new si(n);v(n.child,!1,XE,S,void 0,void 0),n.stateNode=S}u=n.stateNode;break;default:u=n.stateNode}typeof s=="function"?n.refCleanup=s(u):s.current=u}}catch(E){at(n,o,E)}}function fn(n,o){var s=n.ref,u=n.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(f){at(n,o,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(f){at(n,o,f)}else s.current=null}function dd(n,o){if((n.tag===5||n.tag===27||n.tag===6)&&n.alternate===null&&o!==null)for(var s=0;s<o.length;s++)gx(n.stateNode,o[s])}function n2(n){for(var o=n.return;o!==null&&(lp(o)&&gx(n.stateNode,o.stateNode),!sp(o));)o=o.return}function Hl(n){for(var o=n.return;o!==null&&(lp(o)&&ZE(n.stateNode,o.stateNode),!sp(o));)o=o.return}function sp(n){return n.tag===5||n.tag===3||n.tag===27}function lp(n){return n&&n.tag===7&&n.stateNode!==null}function cp(n){var o=n.type,s=n.memoizedProps,u=n.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(f){at(n,n.return,f)}}function up(n,o,s){try{var u=n.stateNode;OE(u,n.type,s,o),u[Mn]=o}catch(f){at(n,n.return,f)}}function i2(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&_o(n.type)||n.tag===4}function dp(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||i2(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&_o(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function fp(n,o,s,u){var f=n.tag;if(f===5||f===6)f=n.stateNode,o?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(f,o):(o=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,o.appendChild(f),s=s._reactRootContainer,s!=null||o.onclick!==null||(o.onclick=Ui)),dd(n,u),Ke=!0;else if(f!==4&&(f===27&&(dd(n,u),u=null,_o(n.type)&&(s=n.stateNode,o=null)),n=n.child,n!==null))for(fp(n,o,s,u),n=n.sibling;n!==null;)fp(n,o,s,u),n=n.sibling}function fd(n,o,s,u){var f=n.tag;if(f===5||f===6)f=n.stateNode,o?s.insertBefore(f,o):s.appendChild(f),dd(n,u),Ke=!0;else if(f!==4&&(f===27&&(dd(n,u),u=null,_o(n.type)&&(s=n.stateNode)),n=n.child,n!==null))for(fd(n,o,s,u),n=n.sibling;n!==null;)fd(n,o,s,u),n=n.sibling}function r2(n){var o=n.stateNode,s=n.memoizedProps;try{for(var u=n.type,f=o.attributes;f.length;)o.removeAttributeNode(f[0]);hn(o,u,s),o[ln]=n,o[Mn]=s}catch(g){at(n,n.return,g)}}var hd=!1,ii=null;function o2(n){(n.tag===30||(n.subtreeFlags&33554432)!==0)&&(hd=!0)}var Xi=null;function a2(){var n=Xi;return Xi=null,n}var Ln=0;function ds(n,o,s,u,f){return Ln=0,s2(n.child,o,s,u,f)}function s2(n,o,s,u,f){for(var g=!1;n!==null;){if(n.tag===5){var S=n.stateNode;if(u!==null){var E=Xp(S);u.push(E),E.view&&(g=!0)}else g||Xp(S).view&&(g=!0);hd=!0,ax(S,Ln===0?o:o+"_"+Ln,s),Ln++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&f||s2(n.child,o,s,u,f)&&(g=!0));n=n.sibling}return g}function Zi(n,o){for(;n!==null;)n.tag===5?sx(n.stateNode,n.memoizedProps):(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&o||Zi(n.child,o)),n=n.sibling}function gd(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if((n.tag!==22||n.memoizedState===null)&&(gd(n),n.tag===30&&(n.flags&18874368)!==0&&n.stateNode.paired)){var o=n.memoizedProps;if(o.name==null||o.name==="auto")throw Error(r(544));var s=o.name;o=Er(o.default,o.share),o!=="none"&&(ds(n,s,o,null,!1)||Zi(n.child,!1))}n=n.sibling}}function hp(n,o){if(n.tag===30){var s=n.stateNode,u=n.memoizedProps,f=Cr(u,s),g=Er(u.default,s.paired?u.share:u.enter);g!=="none"?ds(n,f,g,null,!1)?(gd(n),s.paired||o||ys(n,u.onEnter)):Zi(n.child,!1):gd(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)hp(n,o),n=n.sibling;else gd(n)}function gp(n){if(ii!==null&&ii.size!==0){var o=ii;if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if(n.tag!==22||n.memoizedState===null){if(n.tag===30&&(n.flags&18874368)!==0){var s=n.memoizedProps,u=s.name;if(u!=null&&u!=="auto"){var f=o.get(u);if(f!==void 0){var g=Er(s.default,s.share);if(g!=="none"&&(ds(n,u,g,null,!1)?(g=n.stateNode,f.paired=g,g.paired=f,ys(n,s.onShare)):Zi(n.child,!1)),o.delete(u),o.size===0)break}}}gp(n)}n=n.sibling}}}function pp(n){if(n.tag===30){var o=n.memoizedProps,s=Cr(o,n.stateNode),u=ii!==null?ii.get(s):void 0,f=Er(o.default,u!==void 0?o.share:o.exit);f!=="none"&&(ds(n,s,f,null,!1)?u!==void 0?(f=n.stateNode,u.paired=f,f.paired=u,ii.delete(s),ys(n,o.onShare)):ys(n,o.onExit):Zi(n.child,!1)),ii!==null&&gp(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)pp(n),n=n.sibling;else ii!==null&&gp(n)}function l2(n){for(n=n.child;n!==null;){if(n.tag===30){var o=n.memoizedProps,s=Cr(o,n.stateNode);o=Er(o.default,o.update),n.flags&=-5,o!=="none"&&ds(n,s,o,n.memoizedState=[],!1)}else(n.subtreeFlags&33554432)!==0&&l2(n);n=n.sibling}}function mp(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if(n.tag!==22||n.memoizedState===null){if(n.tag===30&&(n.flags&18874368)!==0){var o=n.stateNode;o.paired!==null&&(o.paired=null,Zi(n.child,!1))}mp(n)}n=n.sibling}}function pd(n){if(n.tag===30)n.stateNode.paired=null,Zi(n.child,!1),mp(n);else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)pd(n),n=n.sibling;else mp(n)}function c2(n){for(n=n.child;n!==null;)n.tag===30?Zi(n.child,!1):(n.subtreeFlags&33554432)!==0&&c2(n),n=n.sibling}function vp(n,o,s,u,f,g,S){for(var E=!1;o!==null;){if(o.tag===5){var j=o.stateNode;if(g!==null&&Ln<g.length){var q=g[Ln],J=Xp(j);(q.view||J.view)&&(E=!0);var ae;if(ae=(n.flags&4)===0)if(J.clip)ae=!0;else{ae=q.rect;var $=J.rect;ae=ae.y!==$.y||ae.x!==$.x||ae.height!==$.height||ae.width!==$.width}ae&&(n.flags|=4),J.abs?J=!q.abs:(q=q.rect,J=J.rect,J=q.height!==J.height||q.width!==J.width),J&&(n.flags|=32)}else n.flags|=32;(n.flags&4)!==0&&ax(j,Ln===0?s:s+"_"+Ln,f),E&&(n.flags&4)!==0||(Xi===null&&(Xi=[]),Xi.push(j,Ln===0?u:u+"_"+Ln,o.memoizedProps)),Ln++}else(o.tag!==22||o.memoizedState===null)&&(o.tag===30&&S?n.flags|=o.flags&32:vp(n,o.child,s,u,f,g,S)&&(E=!0));o=o.sibling}return E}function u2(n,o){for(n=n.child;n!==null;){if(n.tag===30){var s=n.memoizedProps,u=n.stateNode,f=Cr(s,u),g=Er(s.default,s.update),S;S=n.memoizedState,n.memoizedState=null,u=n;var E=n.child;Ln=0,f=vp(u,E,f,f,g,S,!1),(n.flags&4)!==0&&f&&ys(n,s.onUpdate)}else(n.subtreeFlags&33554432)!==0&&u2(n);n=n.sibling}}var Jt=!1,it=!1,Ki=!1,bp=!1,d2=typeof WeakSet=="function"?WeakSet:Set,en=null,Qi=!1,Fl=!1,md=!1,yp=!1;function aE(n,o,s){if(n=n.containerInfo,$p=Rs,n=py(n),og(n)){if("selectionStart"in n)var u={start:n.selectionStart,end:n.selectionEnd};else e:{u=(u=n.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var g=f.anchorOffset,S=f.focusNode;f=f.focusOffset;try{u.nodeType,S.nodeType}catch{u=null;break e}var E=0,j=-1,q=-1,J=0,ae=0,$=n,Q=null;t:for(;;){for(var ve;$!==u||g!==0&&$.nodeType!==3||(j=E+g),$!==S||f!==0&&$.nodeType!==3||(q=E+f),$.nodeType===3&&(E+=$.nodeValue.length),(ve=$.firstChild)!==null;)Q=$,$=ve;for(;;){if($===n)break t;if(Q===u&&++J===g&&(j=E),Q===S&&++ae===f&&(q=E),(ve=$.nextSibling)!==null)break;$=Q,Q=$.parentNode}$=ve}u=j===-1||q===-1?null:{start:j,end:q}}else u=null}u=u||{start:0,end:0}}else u=null;for(Up={focusedElem:n,selectionRange:u},Rs=!1,s=(s&335544064)===s,en=o,o=s?9270:1024;en!==null;){if(n=en,s&&(u=n.deletions,u!==null))for(g=0;g<u.length;g++)s&&pp(u[g]);if(n.alternate===null&&(n.flags&2)!==0)s&&o2(n),vd(s);else{if(n.tag===22){if(u=n.alternate,n.memoizedState!==null){u!==null&&u.memoizedState===null&&s&&pp(u),vd(s);continue}else if(u!==null&&u.memoizedState!==null){s&&o2(n),vd(s);continue}}u=n.child,(n.subtreeFlags&o)!==0&&u!==null?(u.return=n,en=u):(s&&l2(n),vd(s))}}ii=null}function vd(n){for(;en!==null;){var o=en,s=n,u=o.alternate,f=o.flags;switch(o.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&u!==null){s=void 0,f=u.memoizedProps,u=u.memoizedState;var g=o.stateNode;try{var S=ha(o.type,f);s=g.getSnapshotBeforeUpdate(S,u),g.__reactInternalSnapshotBeforeUpdate=s}catch(E){at(o,o.return,E)}}break;case 3:if((f&1024)!==0){if(u=o.stateNode.containerInfo,s=u.nodeType,s===9)Qp(u);else if(s===1)switch(u.nodeName){case"HEAD":case"HTML":case"BODY":Qp(u);break;default:u.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:s&&u!==null&&(s=Cr(u.memoizedProps,u.stateNode),f=o.memoizedProps,f=Er(f.default,f.update),f!=="none"&&ds(u,s,f,u.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(r(163))}if(u=o.sibling,u!==null){u.return=o.return,en=u;break}en=o.return}}function f2(n,o,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:Ji(n,s),u&4&&Vl(5,s);break;case 1:if(Ji(n,s),u&4)if(n=s.stateNode,o===null)try{n.componentDidMount()}catch(S){at(s,s.return,S)}else{var f=ha(s.type,o.memoizedProps);o=o.memoizedState;try{n.componentDidUpdate(f,o,n.__reactInternalSnapshotBeforeUpdate)}catch(S){at(s,s.return,S)}}u&64&&e2(s),u&512&&qi(s,s.return);break;case 3:if(Ji(n,s),u&64&&(n=s.updateQueue,n!==null)){if(o=null,s.child!==null)switch(s.child.tag){case 27:case 5:o=s.child.stateNode;break;case 1:o=s.child.stateNode}try{Fy(n,o)}catch(S){at(s,s.return,S)}}break;case 27:o===null&&u&4&&r2(s);case 26:case 5:Ji(n,s),o===null&&u&4&&cp(s),u&512&&qi(s,s.return);break;case 12:Ji(n,s);break;case 31:Ji(n,s),u&4&&m2(n,s);break;case 13:Ji(n,s),u&4&&v2(n,s),u&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=bE.bind(null,s),JE(n,s))));break;case 22:if(u=s.memoizedState!==null||Jt,!u){var g=o!==null&&o.memoizedState!==null||it;o=Jt,f=it,Jt=u,(it=g)&&!f?(u=2,(s.subtreeFlags&8772)!==0&&(u|=1),Oi(n,s,u)):Ji(n,s),Jt=o,it=f}break;case 30:Ji(n,s),u&512&&qi(s,s.return);break;case 7:u&512&&qi(s,s.return);default:Ji(n,s)}}function xp(n,o){for(n=n.child;n!==null;)h2(n,o),n=n.sibling}function h2(n,o){switch(n.tag){case 5:case 26:try{var s=n.stateNode;if(o){var u=s.style;typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"}else{var f=n.stateNode,g=n.memoizedProps.style,S=g!=null&&g.hasOwnProperty("display")?g.display:null;f.style.display=S==null||typeof S=="boolean"?"":(""+S).trim()}}catch(j){at(n,n.return,j)}Sp(n,o);break;case 6:try{n.stateNode.nodeValue=o?"":n.memoizedProps,Ke=!0}catch(j){at(n,n.return,j)}break;case 18:try{var E=n.stateNode;o?ox(E,!0):ox(n.stateNode,!1)}catch(j){at(n,n.return,j)}break;case 22:case 23:n.memoizedState===null&&xp(n,o);break;default:xp(n,o)}}function Sp(n,o){if(n.subtreeFlags&67108864)for(n=n.child;n!==null;){e:{var s=n,u=o;switch(s.tag){case 4:h2(s,u);break e;case 22:s.memoizedState===null&&Sp(s,u);break e;default:Sp(s,u)}}n=n.sibling}}function g2(n){var o=n.alternate;o!==null&&(n.alternate=null,g2(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&_u(o)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var wt=null,jn=!1;function Ri(n,o,s){for(s=s.child;s!==null;)p2(n,o,s),s=s.sibling}function p2(n,o,s){if(Qn&&typeof Qn.onCommitFiberUnmount=="function")try{Qn.onCommitFiberUnmount(fl,s)}catch{}switch(s.tag){case 26:it||fn(s,o),Ri(n,o,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&!it&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:it||fn(s,o),Hl(s);var u=wt,f=jn;_o(s.type)&&(wt=s.stateNode,jn=!1),Ri(n,o,s),yx(s.stateNode,s.type,s.memoizedProps),wt=u,jn=f;break;case 5:it||fn(s,o),Hl(s);case 6:if(s.tag===6&&Hl(s),u=wt,f=jn,wt=null,Ri(n,o,s),wt=u,jn=f,wt!==null)if(jn)try{(wt.nodeType===9?wt.body:wt.nodeName==="HTML"?wt.ownerDocument.body:wt).removeChild(s.stateNode),Ke=!0}catch(g){at(s,o,g)}else try{wt.removeChild(s.stateNode),Ke=!0}catch(g){at(s,o,g)}break;case 18:wt!==null&&(jn?(n=wt,rx(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),As(n)):rx(wt,s.stateNode));break;case 4:u=wt,f=jn,wt=s.stateNode.containerInfo,jn=!0,Ri(n,o,s),wt=u,jn=f;break;case 0:case 11:case 14:case 15:po(2,s,o),it||po(4,s,o),Ri(n,o,s);break;case 1:it||(fn(s,o),u=s.stateNode,typeof u.componentWillUnmount=="function"&&t2(s,o,u)),Ri(n,o,s);break;case 21:Ri(n,o,s);break;case 22:it=(u=it)||s.memoizedState!==null,Ri(n,o,s),it=u;break;case 30:fn(s,o),Ri(n,o,s);break;case 7:it||fn(s,o),Ri(n,o,s);break;default:Ri(n,o,s)}}function m2(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{As(n)}catch(s){at(o,o.return,s)}}}function v2(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{As(n)}catch(s){at(o,o.return,s)}}function sE(n){switch(n.tag){case 31:case 13:case 19:var o=n.stateNode;return o===null&&(o=n.stateNode=new d2),o;case 22:return n=n.stateNode,o=n._retryCache,o===null&&(o=n._retryCache=new d2),o;default:throw Error(r(435,n.tag))}}function bd(n,o){var s=sE(n);o.forEach(function(u){if(!s.has(u)){s.add(u);var f=yE.bind(null,n,u);u.then(f,f)}})}function Tn(n,o,s){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var g=u[f],S=n,E=o,j=E;e:for(;j!==null;){switch(j.tag){case 27:if(_o(j.type)){wt=j.stateNode,jn=!1;break e}break;case 5:wt=j.stateNode,jn=!1;break e;case 3:case 4:wt=j.stateNode.containerInfo,jn=!0;break e}j=j.return}if(wt===null)throw Error(r(160));p2(S,E,g),wt=null,jn=!1,S=g.alternate,S!==null&&(S.return=null),g.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)b2(o,n,s),o=o.sibling}var Ai=null;function b2(n,o,s){var u=n.alternate,f=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(f&4&&(u=n.updateQueue,u=u!==null?u.events:null,u!==null))for(var g=0;g<u.length;g++){var S=u[g];S.ref.impl=S.nextImpl}Tn(o,n,s),kn(n),f&4&&(po(3,n,n.return),Vl(3,n),po(5,n,n.return));break;case 1:Tn(o,n,s),kn(n),f&512&&(it||u===null||fn(u,u.return)),f&64&&Jt&&(n=n.updateQueue,n!==null&&(o=n.callbacks,o!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:if(g=Ai,Tn(o,n,s),kn(n),f&512&&(it||u===null||fn(u,u.return)),f&4)if(f=u!==null?u.memoizedState:null,s=n.memoizedState,u===null)if(s===null)if(n.stateNode===null)if(Jt)n.stateNode=tx(n.type,n.memoizedProps,o.containerInfo,n);else{e:{o=n.type,s=n.memoizedProps,f=g.ownerDocument||g;t:switch(o){case"title":u=f.getElementsByTagName("title")[0],(!u||u[pl]||u[ln]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=f.createElement(o),f.head.insertBefore(u,f.querySelector("head > title"))),hn(u,o,s),u[ln]=n,Kt(u),o=u;break e;case"link":if(g=Ex("link","href",f).get(o+(s.href||""))){for(S=0;S<g.length;S++)if(u=g[S],u.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&u.getAttribute("rel")===(s.rel==null?null:s.rel)&&u.getAttribute("title")===(s.title==null?null:s.title)&&u.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){g.splice(S,1);break t}}u=f.createElement(o),hn(u,o,s),f.head.appendChild(u);break;case"meta":if(g=Ex("meta","content",f).get(o+(s.content||""))){for(S=0;S<g.length;S++)if(u=g[S],u.getAttribute("content")===(s.content==null?null:""+s.content)&&u.getAttribute("name")===(s.name==null?null:s.name)&&u.getAttribute("property")===(s.property==null?null:s.property)&&u.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&u.getAttribute("charset")===(s.charSet==null?null:s.charSet)){g.splice(S,1);break t}}u=f.createElement(o),hn(u,o,s),f.head.appendChild(u);break;default:throw Error(r(468,o))}u[ln]=n,Kt(u),o=u}n.stateNode=o}else Jt||om(g,n.type,n.stateNode);else n.stateNode=Cx(g,s,n.memoizedProps);else f!==s?(f===null?(o=u.stateNode,o===null||it||o.parentNode.removeChild(o)):f.count--,s===null?Jt||om(g,n.type,n.stateNode):Cx(g,s,n.memoizedProps)):s===null&&n.stateNode!==null&&up(n,n.memoizedProps,u.memoizedProps);break;case 27:Tn(o,n,s),kn(n),f&512&&(it||u===null||fn(u,u.return)),u!==null&&f&4&&up(n,n.memoizedProps,u.memoizedProps);break;case 5:if(g=Ki,Ki=!1,Tn(o,n,s),Ki=g,kn(n),f&512&&(it||u===null||fn(u,u.return)),n.flags&32){o=n.stateNode;try{Ya(o,""),Ke=!0}catch(J){at(n,n.return,J)}}f&4&&n.stateNode!=null&&(o=n.memoizedProps,up(n,o,u!==null?u.memoizedProps:o)),f&1024&&(bp=!0);break;case 6:if(Tn(o,n,s),kn(n),f&4){if(n.stateNode===null)throw Error(r(162));o=n.memoizedProps,s=n.stateNode;try{s.nodeValue=o,Ke=!0}catch(J){at(n,n.return,J)}}break;case 3:if(Ke=!1,Id=null,g=Ai,Ai=Ql(o.containerInfo),Tn(o,n,s),Ai=g,kn(n),f&4&&u!==null&&u.memoizedState.isDehydrated)try{As(o.containerInfo)}catch(J){at(n,n.return,J)}bp&&(bp=!1,y2(n)),Ke=!1;break;case 4:f=Ki,Ki=Jt,u=Bb(),g=Ai,Ai=Ql(n.stateNode.containerInfo),Tn(o,n,s),kn(n),Ai=g,Ke&&Fl&&(md=!0),Ke=u,Ki=f;break;case 12:Tn(o,n,s),kn(n);break;case 31:Tn(o,n,s),kn(n),f&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,bd(n,o)));break;case 13:Tn(o,n,s),kn(n),n.child.flags&8192&&n.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Sd=Kn()),f&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,bd(n,o)));break;case 22:g=n.memoizedState!==null,S=u!==null&&u.memoizedState!==null;var E=Jt,j=it,q=Ki;Jt=E||g,Ki=q||g,it=j||S,Tn(o,n,s),it=j,Ki=q,Jt=E,kn(n),f&8192&&(o=n.stateNode,o._visibility=g?o._visibility&-2:o._visibility|1,!g||u===null||S||Jt||it||(o=S||it,s=Jt,u=it,Jt=g||Jt,it=o,mo(n,2),Jt=s,it=u),!g&&Ki||xp(n,g)),f&4&&(o=n.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,bd(n,s))));break;case 19:Tn(o,n,s),kn(n),f&4&&(o=n.updateQueue,o!==null&&(n.updateQueue=null,bd(n,o)));break;case 30:f&512&&(it||u===null||fn(u,u.return)),f=Bb(),g=Fl,S=(s&335544064)===s,E=n.memoizedProps,Fl=S&&Er(E.default,E.update)!=="none",Tn(o,n,s),kn(n),S&&u!==null&&Ke&&(n.flags|=4),Fl=g,Ke=f;break;case 21:break;case 7:f&512&&(it||u===null||fn(u,u.return)),u&&u.stateNode!==null&&(u.stateNode._fragmentFiber=n);default:Tn(o,n,s),kn(n)}}function kn(n){var o=n.flags;if(o&2){try{for(var s,u=n.return;u!==null;){if(i2(u)){s=u;break}u=u.return}u=null;for(var f=n.return;f!==null;){if(lp(f)){var g=f.stateNode;u===null?u=[g]:u.push(g)}if(sp(f))break;f=f.return}var S=u;if(s==null)throw Error(r(160));switch(s.tag){case 27:var E=s.stateNode,j=dp(n);fd(n,j,E,S);break;case 5:var q=s.stateNode;s.flags&32&&(Ya(q,""),s.flags&=-33);var J=dp(n);fd(n,J,q,S);break;case 3:case 4:var ae=s.stateNode.containerInfo,$=dp(n);fp(n,$,ae,S);break;default:throw Error(r(161))}}catch(Q){at(n,n.return,Q)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function y2(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var o=n;y2(o),o.tag===5&&o.flags&1024&&(o=o.stateNode,Rs=!0,o.reset(),Rs=!1),n=n.sibling}}function fs(n,o){if(o.subtreeFlags&9270)for(o=o.child;o!==null;)x2(o,n),o=o.sibling;else u2(o)}function x2(n,o){var s=n.alternate;if(s===null)hp(n,!1);else switch(n.tag){case 3:if(yp=Qi=!1,a2(),fs(o,n),!Qi&&!md){if(n=Xi,n!==null)for(var u=0;u<n.length;u+=3){s=n[u];var f=n[u+1];sx(s,n[u+2]),s=s.ownerDocument.documentElement,s!==null&&s.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}n=o.containerInfo,n=n.nodeType===9?n.documentElement:n.ownerDocument.documentElement,n!==null&&n.style.viewTransitionName===""&&(n.style.viewTransitionName="none",n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),n.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),yp=!0}Xi=null;break;case 5:fs(o,n);break;case 4:u=Qi,Qi=!1,fs(o,n),Qi&&(md=!0),Qi=u;break;case 22:n.memoizedState===null&&(s.memoizedState!==null?hp(n,!1):fs(o,n));break;case 30:u=Qi,f=a2(),Qi=!1,fs(o,n),Qi&&(n.flags|=4);var g=n.memoizedProps,S=n.stateNode;o=Cr(g,S),S=Cr(s.memoizedProps,S);var E=Er(g.default,g.update);E==="none"?o=!1:(g=s.memoizedState,s.memoizedState=null,s=n.child,Ln=0,o=vp(n,s,o,S,E,g,!0),Ln!==(g===null?0:g.length)&&(n.flags|=32)),(n.flags&4)!==0&&o?(ys(n,n.memoizedProps.onUpdate),Xi=f):f!==null&&(f.push.apply(f,Xi),Xi=f),Qi=(n.flags&32)!==0?!0:u;break;default:fs(o,n)}}function Ji(n,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)f2(n,o.alternate,o),o=o.sibling}function mo(n,o){for(n=n.child;n!==null;){var s=n,u=o;switch(s.tag){case 0:case 11:case 14:case 15:po(4,s,s.return),mo(s,u);break;case 1:fn(s,s.return);var f=s.stateNode;typeof f.componentWillUnmount=="function"&&t2(s,s.return,f),mo(s,u);break;case 27:(u&2)!==0&&yx(s.stateNode,s.type,s.memoizedProps);case 5:fn(s,s.return),s.tag!==5&&s.tag!==27||Hl(s),mo(s,u);break;case 6:Hl(s);break;case 26:fn(s,s.return),f=s.stateNode,s.memoizedState!==null||f===null||it||f.parentNode.removeChild(f),mo(s,u);break;case 22:s.memoizedState===null&&mo(s,u);break;case 30:fn(s,s.return),mo(s,u);break;case 7:fn(s,s.return);default:mo(s,u)}n=n.sibling}}function Oi(n,o,s){for(s=(o.subtreeFlags&8772)!==0?s:s&-2,o=o.child;o!==null;){var u=o.alternate,f=n,g=o,S=g.flags,E=(s&1)!==0;switch(g.tag){case 0:case 11:case 15:Oi(f,g,s),Vl(4,g);break;case 1:if(Oi(f,g,s),u=g,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(J){at(u,u.return,J)}if(u=g,f=u.updateQueue,f!==null){var j=u.stateNode;try{var q=f.shared.hiddenCallbacks;if(q!==null)for(f.shared.hiddenCallbacks=null,f=0;f<q.length;f++)Hy(q[f],j)}catch(J){at(u,u.return,J)}}E&&S&64&&e2(g),qi(g,g.return);break;case 27:(s&2)!==0&&r2(g);case 5:g.tag!==5&&g.tag!==27||n2(g),Oi(f,g,s),E&&u===null&&S&4&&cp(g),qi(g,g.return);break;case 6:n2(g);break;case 26:j=g.stateNode,g.memoizedState!==null||j===null||Jt||om(Ql(j.ownerDocument),g.type,j),Oi(f,g,s),E&&u===null&&S&4&&cp(g),qi(g,g.return);break;case 12:Oi(f,g,s);break;case 31:Oi(f,g,s),E&&S&4&&m2(f,g);break;case 13:Oi(f,g,s),E&&S&4&&v2(f,g);break;case 22:g.memoizedState===null&&Oi(f,g,s),qi(g,g.return);break;case 30:Oi(f,g,s),qi(g,g.return);break;case 7:qi(g,g.return);default:Oi(f,g,s)}o=o.sibling}}function _p(n,o){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(n=o.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&zl(s))}function wp(n,o){n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(o.refCount++,n!=null&&zl(n))}function yi(n,o,s,u){var f=(s&335544064)===s;if(o.subtreeFlags&(f?10262:10256))for(o=o.child;o!==null;)S2(n,o,s,u),o=o.sibling;else f&&c2(o)}function S2(n,o,s,u){var f=(s&335544064)===s;f&&o.alternate===null&&o.return!==null&&o.return.alternate!==null&&pd(o);var g=o.flags;switch(o.tag){case 0:case 11:case 15:yi(n,o,s,u),g&2048&&Vl(9,o);break;case 1:yi(n,o,s,u);break;case 3:yi(n,o,s,u),f&&yp&&(n=n.containerInfo,n=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,n.style.viewTransitionName==="root"&&(n.style.viewTransitionName=""),n=n.ownerDocument.documentElement,n!==null&&n.style.viewTransitionName==="none"&&(n.style.viewTransitionName="")),g&2048&&(g=null,o.alternate!==null&&(g=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==g&&(o.refCount++,g!=null&&zl(g)));break;case 12:if(g&2048){yi(n,o,s,u),g=o.stateNode;try{var S=o.memoizedProps,E=S.id,j=S.onPostCommit;typeof j=="function"&&j(E,o.alternate===null?"mount":"update",g.passiveEffectDuration,-0)}catch(q){at(o,o.return,q)}}else yi(n,o,s,u);break;case 31:yi(n,o,s,u);break;case 13:yi(n,o,s,u);break;case 23:break;case 22:S=o.stateNode,E=o.alternate,o.memoizedState!==null?(f&&E!==null&&E.memoizedState===null&&pd(E),S._visibility&2?yi(n,o,s,u):$l(n,o)):(f&&E!==null&&E.memoizedState!==null&&pd(o),S._visibility&2?yi(n,o,s,u):(S._visibility|=2,hs(n,o,s,u,(o.subtreeFlags&10256)!==0||!1))),g&2048&&_p(E,o);break;case 24:yi(n,o,s,u),g&2048&&wp(o.alternate,o);break;case 30:f&&(g=o.alternate,g!==null&&(Zi(g.child,!0),Zi(o.child,!0))),yi(n,o,s,u);break;default:yi(n,o,s,u)}}function hs(n,o,s,u,f){for(f=f&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var g=n,S=o,E=s,j=u,q=S.flags;switch(S.tag){case 0:case 11:case 15:hs(g,S,E,j,f),Vl(8,S);break;case 23:break;case 22:var J=S.stateNode;S.memoizedState!==null?J._visibility&2?hs(g,S,E,j,f):$l(g,S):(J._visibility|=2,hs(g,S,E,j,f)),f&&q&2048&&_p(S.alternate,S);break;case 24:hs(g,S,E,j,f),f&&q&2048&&wp(S.alternate,S);break;default:hs(g,S,E,j,f)}o=o.sibling}}function $l(n,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var s=n,u=o,f=u.flags;switch(u.tag){case 22:$l(s,u),f&2048&&_p(u.alternate,u);break;case 24:$l(s,u),f&2048&&wp(u.alternate,u);break;default:$l(s,u)}o=o.sibling}}var ga=8192;function pa(n,o,s){if(n.subtreeFlags&ga)for(n=n.child;n!==null;)_2(n,o,s),n=n.sibling}function _2(n,o,s){switch(n.tag){case 26:pa(n,o,s),n.flags&ga&&(n.memoizedState!==null?h7(s,Ai,n.memoizedState,n.memoizedProps):(n=n.stateNode,(o&335544128)===o&&Rx(s,n)));break;case 5:pa(n,o,s),n.flags&ga&&(n=n.stateNode,(o&335544128)===o&&Rx(s,n));break;case 3:case 4:var u=Ai;Ai=Ql(n.stateNode.containerInfo),pa(n,o,s),Ai=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=ga,ga=16777216,pa(n,o,s),ga=u):pa(n,o,s));break;case 30:if((n.flags&ga)!==0&&(u=n.memoizedProps.name,u!=null&&u!=="auto")){var f=n.stateNode;f.paired=null,ii===null&&(ii=new Map),ii.set(u,f)}pa(n,o,s);break;default:pa(n,o,s)}}function w2(n){var o=n.alternate;if(o!==null&&(n=o.child,n!==null)){o.child=null;do o=n.sibling,n.sibling=null,n=o;while(n!==null)}}function Ul(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var u=o[s];en=u,E2(u,n)}w2(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)C2(n),n=n.sibling}function C2(n){switch(n.tag){case 0:case 11:case 15:Ul(n),n.flags&2048&&po(9,n,n.return);break;case 3:Ul(n);break;case 12:Ul(n);break;case 22:var o=n.stateNode;n.memoizedState!==null&&o._visibility&2&&(n.return===null||n.return.tag!==13)?(o._visibility&=-3,yd(n)):Ul(n);break;default:Ul(n)}}function yd(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var u=o[s];en=u,E2(u,n)}w2(n)}for(n=n.child;n!==null;){switch(o=n,o.tag){case 0:case 11:case 15:po(8,o,o.return),yd(o);break;case 22:s=o.stateNode,s._visibility&2&&(s._visibility&=-3,yd(o));break;default:yd(o)}n=n.sibling}}function E2(n,o){for(;en!==null;){var s=en;switch(s.tag){case 0:case 11:case 15:po(8,s,o);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:zl(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,en=u;else e:for(s=n;en!==null;){u=en;var f=u.sibling,g=u.return;if(g2(u),u===s){en=null;break e}if(f!==null){f.return=g,en=f;break e}en=g}}}var lE={getCacheForType:function(n){var o=cn(Lt),s=o.data.get(n);return s===void 0&&(s=n(),o.data.set(n,s)),s},cacheSignal:function(){return cn(Lt).controller.signal}},cE=typeof WeakMap=="function"?WeakMap:Map,et=0,ft=null,Be=null,Ve=0,ot=0,ri=null,vo=!1,gs=!1,Cp=!1,Pr=0,It=0,bo=0,ma=0,xd=0,oi=0,ps=0,Wl=null,Bn=null,Ep=!1,Sd=0,T2=0,_d=1/0,wd=null,yo=null,Tt=0,Ni=null,va=null,er=0,Tp=0,kp=null,k2=null,ms=null,vs=null,bs=null,Yl=0,Cd=null;function ai(){return(et&2)!==0&&Ve!==0?Ve&-Ve:le.T!==null?Lp():Ab()}function z2(){if(oi===0)if((Ve&536870912)===0||je){var n=bu;bu<<=1,(bu&3932160)===0&&(bu=262144),oi=n}else oi=536870912;return n=un.current,n!==null&&(n.flags|=32),oi}function ys(n,o){if(o!=null){var s=n.stateNode,u=s.ref;u===null&&(u=s.ref=lx(Cr(n.memoizedProps,s))),vs===null&&(vs=[]),vs.push(o.bind(null,u))}}function Gn(n,o,s){(n===ft&&(ot===2||ot===9)||n.cancelPendingCommit!==null)&&(xs(n,0),xo(n,Ve,oi,!1)),gl(n,s),((et&2)===0||n!==ft)&&(n===ft&&((et&2)===0&&(ma|=s),It===4&&xo(n,Ve,oi,!1)),tr(n))}function R2(n,o,s){if((et&6)!==0)throw Error(r(327));var u=!s&&(o&127)===0&&(o&n.expiredLanes)===0||hl(n,o),f=u?fE(n,o):Rp(n,o,!0),g=u;do{if(f===0){gs&&!u&&xo(n,o,0,!1);break}else{if(s=n.current.alternate,g&&!uE(s)){f=Rp(n,o,!1),g=!1;continue}if(f===2){if(g=o,n.errorRecoveryDisabledLanes&g)var S=0;else S=n.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){o=S;e:{var E=n;f=Wl;var j=E.current.memoizedState.isDehydrated;if(j&&(xs(E,S).flags|=256),S=Rp(E,S,!1),S!==2&&S!==6){if(Cp&&!j){E.errorRecoveryDisabledLanes|=g,ma|=g,f=4;break e}g=Bn,Bn=f,g!==null&&(Bn===null?Bn=g:Bn.push.apply(Bn,g))}f=S}if(g=!1,f!==2)continue}}if(f===1){xs(n,0),xo(n,o,0,!0);break}e:{switch(u=n,g=f,g){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o&&(o&62914560)!==o)break;case 6:xo(u,o,oi,!vo);break e;case 2:Bn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(f=Sd+300-Kn(),10<f)){if(xo(u,o,oi,!vo),xu(u,0,!0)!==0)break e;er=o,u.timeoutHandle=qp(A2.bind(null,u,s,Bn,wd,Ep,o,oi,ma,ps,vo,g,"Throttled",-0,0),f);break e}A2(u,s,Bn,wd,Ep,o,oi,ma,ps,vo,g,null,-0,0)}}break}while(!0);tr(n)}function A2(n,o,s,u,f,g,S,E,j,q,J,ae,$,Q){n.timeoutHandle=-1;var ve=o.subtreeFlags,we=(g&335544064)===g;if(ae=null,(we||ve&8192||(ve&16785408)===16785408)&&(ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ui},ii=null,_2(o,g,ae),we&&(ve=ae,we=n.containerInfo,we=(we.nodeType===9?we:we.ownerDocument).__reactViewTransition,we!=null&&(ve.count++,ve.waitingForViewTransition=!0,ve=tc.bind(ve),we.finished.then(ve,ve))),ve=(g&62914560)===g?Sd-Kn():(g&4194048)===g?T2-Kn():0,ve=g7(ae,ve),ve!==null)){er=g,n.cancelPendingCommit=ve(j2.bind(null,n,o,g,s,u,f,S,E,j,q,J,ae,null,$,Q)),xo(n,g,S,!q);return}j2(n,o,g,s,u,f,S,E,j,q,J,ae)}function uE(n){for(var o=n;;){var s=o.tag;if((s===0||s===11||s===15)&&o.flags&16384&&(s=o.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var f=s[u],g=f.getSnapshot;f=f.value;try{if(!ti(g(),f))return!1}catch{return!1}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function xo(n,o,s,u){o=Eb(n,o),o&=~xd,o&=~ma,n.suspendedLanes|=o,n.pingedLanes&=~o,u&&(n.warmLanes|=o),u=n.expirationTimes;for(var f=o;0<f;){var g=31-Jn(f),S=1<<g;u[g]=-1,f&=~S}s!==0&&kb(n,s,o)}function Ed(){return(et&6)===0?(ql(0),!1):!0}function zp(){if(Be!==null){if(ot===0)var n=Be.return;else n=Be,zr=ra=null,Dg(n),as=null,Ol=0,n=Be;for(;n!==null;)J1(n.alternate,n),n=n.return;Be=null}}function xs(n,o){var s=n.timeoutHandle;return s!==-1&&(n.timeoutHandle=-1,PE(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),er=0,zp(),ft=n,Be=s=Tr(n.current,null),Ve=o,ot=0,ri=null,vo=!1,gs=hl(n,o),Cp=!1,ps=oi=xd=ma=bo=It=0,Bn=Wl=null,Ep=!1,Pr=Eb(n,o),Iu(),s}function O2(n,o){De=null,le.H=rd,o===os||o===$u?(o=jy(),ot=3):o===wg?(o=jy(),ot=4):ot=o===Kg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,ri=o,Be===null&&(It=1,od(n,pi(o,n.current)))}function N2(){var n=un.current;return n===null?!0:(Ve&4194048)===Ve?xn===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?n===xn:!1}function I2(){var n=le.H;return le.H=rd,n===null?rd:n}function P2(){var n=le.A;return le.A=lE,n}function Td(){It=4,vo||(Ve&4194048)!==Ve&&un.current!==null||(gs=!0),(bo&134217727)===0&&(ma&134217727)===0||ft===null||xo(ft,Ve,oi,!1)}function Rp(n,o,s){var u=et;et|=2;var f=I2(),g=P2();(ft!==n||Ve!==o)&&(wd=null,xs(n,o)),o=!1;var S=It;e:do try{if(ot!==0&&Be!==null){var E=Be,j=ri;switch(ot){case 8:zp(),S=6;break e;case 3:case 2:case 9:case 6:un.current===null&&(o=!0);var q=ot;if(ot=0,ri=null,Ss(n,E,j,q),s&&gs){S=0;break e}break;default:q=ot,ot=0,ri=null,Ss(n,E,j,q)}}dE(),S=It;break}catch(J){O2(n,J)}while(!0);return o&&n.shellSuspendCounter++,zr=ra=null,et=u,le.H=f,le.A=g,Be===null&&(ft=null,Ve=0,Iu()),S}function dE(){for(;Be!==null;)M2(Be)}function fE(n,o){var s=et;et|=2;var u=I2(),f=P2();ft!==n||Ve!==o?(wd=null,_d=Kn()+500,xs(n,o)):gs=hl(n,o);e:do try{if(ot!==0&&Be!==null){o=Be;var g=ri;t:switch(ot){case 1:ot=0,ri=null,Ss(n,o,g,1);break;case 2:case 9:if(Dy(g)){ot=0,ri=null,D2(o);break}o=function(){ot!==2&&ot!==9||ft!==n||(ot=7),tr(n)},g.then(o,o);break e;case 3:ot=7;break e;case 4:ot=5;break e;case 7:Dy(g)?(ot=0,ri=null,D2(o)):(ot=0,ri=null,Ss(n,o,g,7));break;case 5:var S=null;switch(Be.tag){case 26:S=Be.memoizedState;case 5:case 27:var E=Be;if(S?kx(S):E.stateNode.complete){ot=0,ri=null;var j=E.sibling;if(j!==null)Be=j;else{var q=E.return;q!==null?(Be=q,kd(q)):Be=null}break t}}ot=0,ri=null,Ss(n,o,g,5);break;case 6:ot=0,ri=null,Ss(n,o,g,6);break;case 8:zp(),It=6;break e;default:throw Error(r(462))}}hE();break}catch(J){O2(n,J)}while(!0);return zr=ra=null,le.H=u,le.A=f,et=s,Be!==null?0:(ft=null,Ve=0,Iu(),It)}function hE(){for(;Be!==null&&!AC();)M2(Be)}function M2(n){var o=K1(n.alternate,n,Pr);n.memoizedProps=n.pendingProps,o===null?kd(n):Be=o}function D2(n){var o=n,s=o.alternate;switch(o.tag){case 15:case 0:o=$1(s,o,o.pendingProps,o.type,void 0,Ve);break;case 11:o=$1(s,o,o.pendingProps,o.type.render,o.ref,Ve);break;case 5:Dg(o);var u=o;u===Qt&&(je?(Bu(u),u.tag===5&&u.stateNode!=null&&(vt=u.stateNode)):(Bu(u),je=!0));default:J1(s,o),o=Be=Ey(o,Pr),o=K1(s,o,Pr)}n.memoizedProps=n.pendingProps,o===null?kd(n):Be=o}function Ss(n,o,s,u){zr=ra=null,Dg(o),as=null,Ol=0;var f=o.return;try{if(eE(n,f,o,s,Ve)){It=1,od(n,pi(s,n.current)),Be=null;return}}catch(g){if(f!==null)throw Be=f,g;It=1,od(n,pi(s,n.current)),Be=null;return}o.flags&32768?(je||u===1?n=!0:gs||(Ve&536870912)!==0?n=!1:(vo=n=!0,(u===2||u===9||u===3||u===6)&&(u=un.current,u!==null&&u.tag===13&&(u.flags|=16384))),L2(o,n)):kd(o)}function kd(n){var o=n;do{if((o.flags&32768)!==0){L2(o,vo);return}n=o.return;var s=rE(o.alternate,o,Pr);if(s!==null){Be=s;return}if(o=o.sibling,o!==null){Be=o;return}Be=o=n}while(o!==null);It===0&&(It=5)}function L2(n,o){do{var s=oE(n.alternate,n);if(s!==null){s.flags&=32767,Be=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!o&&(n=n.sibling,n!==null)){Be=n;return}Be=n=s}while(n!==null);It=6,Be=null}function j2(n,o,s,u,f,g,S,E,j,q,J,ae){n.cancelPendingCommit=null;do zd();while(Tt!==0);if((et&6)!==0)throw Error(r(327));if(o!==null){if(o===n.current)throw Error(r(177));n===ft&&(Be=ft=null,Ve=0),va=o,Ni=n,er=s,kp=f,k2=u,gE(n,o,s,S,E,j,ae)}}function gE(n,o,s,u,f,g,S){var E=o.lanes|o.childLanes;if(Tp=E,E|=ug,GC(n,s,E,u,f,g),vs=null,(s&335544064)===s?(bs=H9(n),u=10262):(bs=null,u=10256),(o.subtreeFlags&u)!==0||(o.flags&u)!==0?(n.callbackNode=null,n.callbackPriority=0,xE(mu,function(){return Ip(),null})):(n.callbackNode=null,n.callbackPriority=0),hd=!1,u=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||u){u=le.T,le.T=null,f=xe.p,xe.p=2,g=et,et|=4;try{aE(n,o,s)}finally{et=g,xe.p=f,le.T=u}}Tt=1,hd?ms=GE(S,n.containerInfo,bs,Ap,Op,mE,Np,Ip,pE):(Ap(),Op(),Np())}function pE(n){if(Tt!==0){var o=Ni.onRecoverableError;o(n,{componentStack:null})}}function mE(){Tt===3&&(Tt=0,x2(va,Ni),Tt=4)}function Ap(){if(Tt===1){Tt=0;var n=Ni,o=va,s=er,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=le.T,le.T=null;var f=xe.p;xe.p=2;var g=et;et|=4;try{Fl=md=!1,b2(o,n,s),s=Up;var S=py(n.containerInfo),E=s.focusedElem,j=s.selectionRange;if(S!==E&&E&&E.ownerDocument&&gy(E.ownerDocument.documentElement,E)){if(j!==null&&og(E)){var q=j.start,J=j.end;if(J===void 0&&(J=q),"selectionStart"in E)E.selectionStart=q,E.selectionEnd=Math.min(J,E.value.length);else{var ae=E.ownerDocument||document,$=ae&&ae.defaultView||window;if($.getSelection){var Q=$.getSelection(),ve=E.textContent.length,we=Math.min(j.start,ve),Le=j.end===void 0?we:Math.min(j.end,ve);!Q.extend&&we>Le&&(S=Le,Le=we,we=S);var Y=hy(E,we),H=hy(E,Le);if(Y&&H&&(Q.rangeCount!==1||Q.anchorNode!==Y.node||Q.anchorOffset!==Y.offset||Q.focusNode!==H.node||Q.focusOffset!==H.offset)){var Z=ae.createRange();Z.setStart(Y.node,Y.offset),Q.removeAllRanges(),we>Le?(Q.addRange(Z),Q.extend(H.node,H.offset)):(Z.setEnd(H.node,H.offset),Q.addRange(Z))}}}}for(ae=[],Q=E;Q=Q.parentNode;)Q.nodeType===1&&ae.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ae.length;E++){var oe=ae[E];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Rs=!!$p,Up=$p=null}finally{et=g,xe.p=f,le.T=u}}n.current=o,Tt=2}}function Op(){if(Tt===2){Tt=0;var n=Ni,o=va,s=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||s){s=le.T,le.T=null;var u=xe.p;xe.p=2;var f=et;et|=4;try{f2(n,o.alternate,o)}finally{et=f,xe.p=u,le.T=s}}Tt=3}}function Np(){if(Tt===4||Tt===3){Tt=0;var n=ms;ms=null,OC();var o=Ni,s=va,u=er,f=k2,g=(u&335544064)===u?10262:10256;if((s.subtreeFlags&g)!==0||(s.flags&g)!==0?Tt=5:(Tt=0,va=Ni=null,B2(o,o.pendingLanes)),g=o.pendingLanes,g===0&&(yo=null),Vh(u),s=s.stateNode,Qn&&typeof Qn.onCommitFiberRoot=="function")try{Qn.onCommitFiberRoot(fl,s,void 0,(s.current.flags&128)===128)}catch{}if(f!==null){s=le.T,g=xe.p,xe.p=2,le.T=null;try{for(var S=o.onRecoverableError,E=0;E<f.length;E++){var j=f[E];S(j.value,{componentStack:j.stack})}}finally{le.T=s,xe.p=g}}if(f=vs,S=bs,bs=null,f!==null&&(vs=null,S===null&&(S=[]),n!==null))for(j=0;j<f.length;j++)s=(0,f[j])(S),s!==void 0&&n.finished.finally(s);(er&3)!==0&&zd(),tr(o),g=o.pendingLanes,(u&261930)!==0&&(g&42)!==0?o===Cd?Yl++:(Yl=0,Cd=o):(Yl=0,Cd=null),ql(0)}}function B2(n,o){(n.pooledCacheLanes&=o)===0&&(o=n.pooledCache,o!=null&&(n.pooledCache=null,zl(o)))}function zd(){return ms!==null&&(ms.skipTransition(),ms=null),Ap(),Op(),Np(),Ip()}function Ip(){if(Tt!==5)return!1;var n=Ni,o=Tp;Tp=0;var s=Vh(er),u=le.T,f=xe.p;try{xe.p=32>s?32:s,le.T=null,s=kp,kp=null;var g=Ni,S=er;if(Tt=0,va=Ni=null,er=0,(et&6)!==0)throw Error(r(331));var E=et;if(et|=4,C2(g.current),S2(g,g.current,S,s),et=E,ql(0,!1),Qn&&typeof Qn.onPostCommitFiberRoot=="function")try{Qn.onPostCommitFiberRoot(fl,g)}catch{}return!0}finally{xe.p=f,le.T=u,B2(n,o)}}function G2(n,o,s){o=pi(s,o),o=Zg(n.stateNode,o,2),n=uo(n,o,2),n!==null&&(gl(n,2),tr(n))}function at(n,o,s){if(n.tag===3)G2(n,n,s);else for(;o!==null;){if(o.tag===3){G2(o,n,s);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(yo===null||!yo.has(u))){n=pi(s,n),s=D1(2),u=uo(o,s,2),u!==null&&(L1(s,u,o,n),gl(u,2),tr(u));break}}o=o.return}}function Pp(n,o,s){var u=n.pingCache;if(u===null){u=n.pingCache=new cE;var f=new Set;u.set(o,f)}else f=u.get(o),f===void 0&&(f=new Set,u.set(o,f));f.has(s)||(Cp=!0,f.add(s),n=vE.bind(null,n,o,s),o.then(n,n))}function vE(n,o,s){var u=n.pingCache;u!==null&&u.delete(o),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,ft===n&&(Ve&s)===s&&((It===4||It===3&&(Ve&62914560)===Ve&&300>Kn()-Sd)&&(et&2)===0?xs(n,0):xd|=s,ps===Ve&&(ps=0)),tr(n)}function V2(n,o){o===0&&(o=Tb()),n=ta(n,o),n!==null&&(gl(n,o),tr(n))}function bE(n){var o=n.memoizedState,s=0;o!==null&&(s=o.retryLane),V2(n,s)}function yE(n,o){var s=0;switch(n.tag){case 31:case 13:var u=n.stateNode,f=n.memoizedState;f!==null&&(s=f.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(o),V2(n,s)}function xE(n,o){return Lh(n,o)}var _s=null,ws=null,Mp=!1,Rd=!1,Dp=!1,So=0;function tr(n){n!==ws&&n.next===null&&(ws===null?_s=ws=n:ws=ws.next=n),Rd=!0,Mp||(Mp=!0,_E())}function ql(n,o){if(!Dp&&Rd){Dp=!0;do for(var s=!1,u=_s;u!==null;){if(n!==0){var f=u.pendingLanes;if(f===0)var g=0;else{var S=u.suspendedLanes,E=u.pingedLanes;g=(1<<31-Jn(42|n)+1)-1,g&=f&~(S&~E),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,U2(u,g))}else g=Ve,g=xu(u,u===ft?g:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(g&3)===0||hl(u,g)||(s=!0,U2(u,g));u=u.next}while(s);Dp=!1}}function SE(){H2()}function H2(){Rd=Mp=!1;var n=0;So!==0&&IE()&&(n=So);for(var o=Kn(),s=null,u=_s;u!==null;){var f=u.next,g=F2(u,o);g===0?(u.next=null,s===null?_s=f:s.next=f,f===null&&(ws=s)):(s=u,(n!==0||(g&3)!==0)&&(Rd=!0)),u=f}Tt!==0&&Tt!==5||ql(n),So!==0&&(So=0)}function F2(n,o){for(var s=n.suspendedLanes,u=n.pingedLanes,f=n.expirationTimes,g=n.pendingLanes&-62914561;0<g;){var S=31-Jn(g),E=1<<S,j=f[S];j===-1?((E&s)===0||(E&u)!==0)&&(f[S]=BC(E,o)):j<=o&&(n.expiredLanes|=E),g&=~E}if(o=ft,s=Ve,s=xu(n,n===o?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,s===0||n===o&&(ot===2||ot===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&jh(u),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||hl(n,s)){if(o=s&-s,o===n.callbackPriority)return o;switch(u!==null&&jh(u),Vh(s)){case 2:case 8:s=wb;break;case 32:s=mu;break;case 268435456:s=Cb;break;default:s=mu}return u=$2.bind(null,n),s=Lh(s,u),n.callbackPriority=o,n.callbackNode=s,o}return u!==null&&u!==null&&jh(u),n.callbackPriority=2,n.callbackNode=null,2}function $2(n,o){if(Tt!==0&&Tt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(zd()&&n.callbackNode!==s)return null;var u=Ve;return u=xu(n,n===ft?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(R2(n,u,o),F2(n,Kn()),n.callbackNode!=null&&n.callbackNode===s?$2.bind(null,n):null)}function U2(n,o){if(zd())return null;R2(n,o,!0)}function _E(){ME(function(){(et&6)!==0?Lh(_b,SE):H2()})}function Lp(){if(So===0){var n=sa;n===0&&(n=vu,vu<<=1,(vu&261888)===0&&(vu=256)),So=n}return So}function W2(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Eu(n)}function wE(n,o,s,u,f){if(o==="submit"&&s&&s.stateNode===f){var g=W2((f[Mn]||null).action),S=u.submitter;S&&(o=(o=S[Mn]||null)?W2(o.formAction):S.getAttribute("formAction"),o!==null&&(g=o,S=null));var E=new Ru("action","action",null,u,f);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(So!==0){var j=new FormData(f,S);Ug(s,{pending:!0,data:j,method:f.method,action:g},null,j)}}else typeof g=="function"&&(E.preventDefault(),j=new FormData(f,S),Ug(s,{pending:!0,data:j,method:f.method,action:g},g,j))},currentTarget:f}]})}}for(var jp=0;jp<cg.length;jp++){var Bp=cg[jp],CE=Bp.toLowerCase(),EE=Bp[0].toUpperCase()+Bp.slice(1);zi(CE,"on"+EE)}zi(by,"onAnimationEnd"),zi(yy,"onAnimationIteration"),zi(xy,"onAnimationStart"),zi("dblclick","onDoubleClick"),zi("focusin","onFocus"),zi("focusout","onBlur"),zi(P9,"onTransitionRun"),zi(M9,"onTransitionStart"),zi(D9,"onTransitionCancel"),zi(Sy,"onTransitionEnd"),Ua("onMouseEnter",["mouseout","mouseover"]),Ua("onMouseLeave",["mouseout","mouseover"]),Ua("onPointerEnter",["pointerout","pointerover"]),Ua("onPointerLeave",["pointerout","pointerover"]),Qo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xl));function Y2(n,o){o=(o&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],f=u.event;u=u.listeners;e:{var g=void 0;if(o)for(var S=u.length-1;0<=S;S--){var E=u[S],j=E.instance,q=E.currentTarget;if(E=E.listener,j!==g&&f.isPropagationStopped())break e;g=E,f.currentTarget=q;try{g(f)}catch(J){Nu(J)}f.currentTarget=null,g=j}else for(S=0;S<u.length;S++){if(E=u[S],j=E.instance,q=E.currentTarget,E=E.listener,j!==g&&f.isPropagationStopped())break e;g=E,f.currentTarget=q;try{g(f)}catch(J){Nu(J)}f.currentTarget=null,g=j}}}}function Ge(n,o){var s=o[Nb];s===void 0&&(s=o[Nb]=new Set);var u=n+"__bubble";s.has(u)||(q2(o,n,2,!1),s.add(u))}function Gp(n,o,s){var u=0;o&&(u|=4),q2(s,n,u,o)}var Ad="_reactListening"+Math.random().toString(36).slice(2);function Vp(n){if(!n[Ad]){n[Ad]=!0,Mb.forEach(function(s){s!=="selectionchange"&&(TE.has(s)||Gp(s,!1,n),Gp(s,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[Ad]||(o[Ad]=!0,Gp("selectionchange",!1,o))}}function q2(n,o,s,u){switch(Lx(o)){case 2:var f=b7;break;case 8:f=y7;break;default:f=sm}s=f.bind(null,o,s,n),f=void 0,!Xh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(f=!0),u?f!==void 0?n.addEventListener(o,s,{capture:!0,passive:f}):n.addEventListener(o,s,!0):f!==void 0?n.addEventListener(o,s,{passive:f}):n.addEventListener(o,s,!1)}function Hp(n,o,s,u,f){var g=u;if((o&1)===0&&(o&2)===0&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var E=u.stateNode.containerInfo;if(E===f)break;if(S===4)for(S=u.return;S!==null;){var j=S.tag;if((j===3||j===4)&&S.stateNode.containerInfo===f)return;S=S.return}for(;E!==null;){if(S=Ko(E),S===null)return;if(j=S.tag,j===5||j===6||j===26||j===27){u=g=S;continue e}E=E.parentNode}}u=u.return}qb(function(){var q=g,J=Yh(s),ae=[];e:{var $=_y.get(n);if($!==void 0){var Q=Ru,ve=n;switch(n){case"keypress":if(ku(s)===0)break e;case"keydown":case"keyup":Q=u9;break;case"focusin":ve="focus",Q=Jh;break;case"focusout":ve="blur",Q=Jh;break;case"beforeblur":case"afterblur":Q=Jh;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=Kb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=QC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=p9;break;case by:case yy:case xy:Q=t9;break;case Sy:Q=v9;break;case"scroll":case"scrollend":Q=ZC;break;case"wheel":Q=y9;break;case"copy":case"cut":case"paste":Q=i9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=Jb;break;case"submit":Q=h9;break;case"toggle":case"beforetoggle":Q=S9}var we=(o&4)!==0,Le=!we&&(n==="scroll"||n==="scrollend"),Y=we?$!==null?$+"Capture":null:$;we=[];for(var H=q,Z;H!==null;){var oe=H;if(Z=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Z===null||Y===null||(oe=vl(H,Y),oe!=null&&we.push(Zl(H,oe,Z))),Le)break;H=H.return}0<we.length&&($=new Q($,ve,null,s,J),ae.push({event:$,listeners:we}))}}if((o&7)===0){e:{if(Q=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",Q&&s!==Wh&&(ve=s.relatedTarget||s.fromElement)&&(Ko(ve)||ve[Ha]))break e;($||Q)&&(ve=J.window===J?J:(Q=J.ownerDocument)?Q.defaultView||Q.parentWindow:window,$?(Q=s.relatedTarget||s.toElement,$=q,Q=Q?Ko(Q):null,Q!==null&&(Le=l(Q),we=Q.tag,Q!==Le||we!==5&&we!==27&&we!==6)&&(Q=null)):($=null,Q=q),$!==Q&&(we=Kb,oe="onMouseLeave",Y="onMouseEnter",H="mouse",(n==="pointerout"||n==="pointerover")&&(we=Jb,oe="onPointerLeave",Y="onPointerEnter",H="pointer"),Le=$==null?ve:ml($),Z=Q==null?ve:ml(Q),ve=new we(oe,H+"leave",$,s,J),ve.target=Le,ve.relatedTarget=Z,oe=null,Ko(J)===q&&(we=new we(Y,H+"enter",Q,s,J),we.target=Z,we.relatedTarget=Le,oe=we),Le=oe,we=$&&Q?k($,Q,kE):null,$!==null&&X2(ae,ve,$,we,!1),Q!==null&&Le!==null&&X2(ae,Le,Q,we,!0)))}e:{if($=q?ml(q):window,Q=$.nodeName&&$.nodeName.toLowerCase(),Q==="select"||Q==="input"&&$.type==="file")var Se=sy;else if(oy($))if(ly)Se=O9;else{Se=R9;var He=z9}else Q=$.nodeName,!Q||Q.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?q&&Uh(q.elementType)&&(Se=sy):Se=A9;if(Se&&(Se=Se(n,q))){ay(ae,Se,s,J);break e}He&&He(n,$,q)}switch(He=q?ml(q):window,n){case"focusin":(oy(He)||He.contentEditable==="true")&&(Ka=He,ag=q,El=null);break;case"focusout":El=ag=Ka=null;break;case"mousedown":sg=!0;break;case"contextmenu":case"mouseup":case"dragend":sg=!1,my(ae,s,J);break;case"selectionchange":if(I9)break;case"keydown":case"keyup":my(ae,s,J)}var ze;if(tg)e:{switch(n){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Za?iy(n,s)&&(Oe="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Oe="onCompositionStart");Oe&&(ey&&s.locale!=="ko"&&(Za||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Za&&(ze=Xb()):(to=J,Zh="value"in to?to.value:to.textContent,Za=!0)),He=Od(q,Oe),0<He.length&&(Oe=new Qb(Oe,n,null,s,J),ae.push({event:Oe,listeners:He}),ze?Oe.data=ze:(ze=ry(s),ze!==null&&(Oe.data=ze)))),(ze=w9?C9(n,s):E9(n,s))&&(Oe=Od(q,"onBeforeInput"),0<Oe.length&&(He=new Qb("onBeforeInput","beforeinput",null,s,J),ae.push({event:He,listeners:Oe}),He.data=ze)),wE(ae,n,q,s,J)}Y2(ae,o)})}function Zl(n,o,s){return{instance:n,listener:o,currentTarget:s}}function Od(n,o){for(var s=o+"Capture",u=[];n!==null;){var f=n,g=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||g===null||(f=vl(n,s),f!=null&&u.unshift(Zl(n,f,g)),f=vl(n,o),f!=null&&u.push(Zl(n,f,g))),n.tag===3)return u;n=n.return}return[]}function kE(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function X2(n,o,s,u,f){for(var g=o._reactName,S=[];s!==null&&s!==u;){var E=s,j=E.alternate,q=E.stateNode;if(E=E.tag,j!==null&&j===u)break;E!==5&&E!==26&&E!==27||q===null||(j=q,f?(q=vl(s,g),q!=null&&S.unshift(Zl(s,q,j))):f||(q=vl(s,g),q!=null&&S.push(Zl(s,q,j)))),s=s.return}S.length!==0&&n.push({event:o,listeners:S})}var zE=/\r\n?/g,RE=/\u0000|\uFFFD/g;function Z2(n){return(typeof n=="string"?n:""+n).replace(zE,`
11
+ `).replace(RE,"")}function K2(n,o){return o=Z2(o),Z2(n)===o}function st(n,o,s,u,f,g){switch(s){case"children":if(typeof u=="string")o==="body"||o==="textarea"&&u===""||Ya(n,u);else if(typeof u=="number"||typeof u=="bigint")o!=="body"&&Ya(n,""+u);else return;break;case"className":Cu(n,"class",u);break;case"tabIndex":Cu(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Cu(n,s,u);break;case"style":Wb(n,u,g);return;case"data":if(o!=="object"){Cu(n,"data",u);break}case"src":case"href":if(u===""&&(o!=="a"||s!=="href")){n.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Eu(u),n.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(o!=="input"&&st(n,o,"name",f.name,f,null),st(n,o,"formEncType",f.formEncType,f,null),st(n,o,"formMethod",f.formMethod,f,null),st(n,o,"formTarget",f.formTarget,f,null)):(st(n,o,"encType",f.encType,f,null),st(n,o,"method",f.method,f,null),st(n,o,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=Eu(u),n.setAttribute(s,u);break;case"onClick":u!=null&&(n.onclick=Ui);return;case"onScroll":u!=null&&Ge("scroll",n);return;case"onScrollEnd":u!=null&&Ge("scrollend",n);return;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(s=u.__html,s!=null){if(f.children!=null)throw Error(r(60));g?.__html!==s&&(n.innerHTML=s)}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}s=Eu(u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,u):n.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":u===!0?n.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,u):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(s,u):n.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(s):n.setAttribute(s,u);break;case"popover":Ge("beforetoggle",n),Ge("toggle",n),wu(n,"popover",u);break;case"xlinkActuate":_r(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":_r(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":_r(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":_r(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":_r(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":_r(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":_r(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":_r(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":_r(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":wu(n,"is",u);break;case"innerText":case"textContent":return;default:if(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")s=qC.get(s)||s,wu(n,s,u);else return}Ke=!0}function Fp(n,o,s,u,f,g){switch(s){case"style":Wb(n,u,g);return;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(s=u.__html,s!=null){if(f.children!=null)throw Error(r(60));g?.__html!==s&&(n.innerHTML=s)}}break;case"children":if(typeof u=="string")Ya(n,u);else if(typeof u=="number"||typeof u=="bigint")Ya(n,""+u);else return;break;case"onScroll":u!=null&&Ge("scroll",n);return;case"onScrollEnd":u!=null&&Ge("scrollend",n);return;case"onClick":u!=null&&(n.onclick=Ui);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Db.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(f=s.endsWith("Capture"),g=s.slice(2,f?s.length-7:void 0),o=n[Mn]||null,o=o!=null?o[s]:null,typeof o=="function"&&n.removeEventListener(g,o,f),typeof u=="function")){typeof o!="function"&&o!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(g,u,f);break e}Ke=!0,s in n?n[s]=u:u===!0?n.setAttribute(s,""):wu(n,s,u)}return}Ke=!0}function hn(n,o,s){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",n),Ge("load",n);var u=!1,f=!1,g;for(g in s)if(s.hasOwnProperty(g)){var S=s[g];if(S!=null)switch(g){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:st(n,o,g,S,s,null)}}f&&st(n,o,"srcSet",s.srcSet,s,null),u&&st(n,o,"src",s.src,s,null);return;case"input":Ge("invalid",n);var E=g=S=f=null,j=null,q=null;for(u in s)if(s.hasOwnProperty(u)){var J=s[u];if(J!=null)switch(u){case"name":f=J;break;case"type":S=J;break;case"checked":j=J;break;case"defaultChecked":q=J;break;case"value":g=J;break;case"defaultValue":E=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,o));break;default:st(n,o,u,J,s,null)}}Hb(n,g,E,j,q,S,f,!1);return;case"select":Ge("invalid",n),u=S=g=null;for(f in s)if(s.hasOwnProperty(f)&&(E=s[f],E!=null))switch(f){case"value":g=E;break;case"defaultValue":S=E;break;case"multiple":u=E;default:st(n,o,f,E,s,null)}o=g,s=S,n.multiple=!!u,o!=null?Wa(n,!!u,o,!1):s!=null&&Wa(n,!!u,s,!0);return;case"textarea":Ge("invalid",n),g=f=u=null;for(S in s)if(s.hasOwnProperty(S)&&(E=s[S],E!=null))switch(S){case"value":u=E;break;case"defaultValue":f=E;break;case"children":g=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:st(n,o,S,E,s,null)}$b(n,u,f,g);return;case"option":for(j in s)s.hasOwnProperty(j)&&(u=s[j],u!=null)&&(j==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":st(n,o,j,u,s,null));return;case"dialog":Ge("beforetoggle",n),Ge("toggle",n),Ge("cancel",n),Ge("close",n);break;case"iframe":case"object":Ge("load",n);break;case"video":case"audio":for(u=0;u<Xl.length;u++)Ge(Xl[u],n);break;case"image":Ge("error",n),Ge("load",n);break;case"details":Ge("toggle",n);break;case"embed":case"source":case"link":Ge("error",n),Ge("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in s)if(s.hasOwnProperty(q)&&(u=s[q],u!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:st(n,o,q,u,s,null)}return;default:if(Uh(o)){for(J in s)s.hasOwnProperty(J)&&(u=s[J],u!==void 0&&Fp(n,o,J,u,s,void 0));return}}for(E in s)s.hasOwnProperty(E)&&(u=s[E],u!=null&&st(n,o,E,u,s,null))}var AE={};function OE(n,o,s,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,g=null,S=null,E=null,j=null,q=null,J=null;for(Q in s){var ae=s[Q];if(s.hasOwnProperty(Q)&&ae!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":j=ae;default:u.hasOwnProperty(Q)||st(n,o,Q,null,u,ae)}}for(var $ in u){var Q=u[$];if(ae=s[$],u.hasOwnProperty($)&&(Q!=null||ae!=null))switch($){case"type":Q!==ae&&(Ke=!0),g=Q;break;case"name":Q!==ae&&(Ke=!0),f=Q;break;case"checked":Q!==ae&&(Ke=!0),q=Q;break;case"defaultChecked":Q!==ae&&(Ke=!0),J=Q;break;case"value":Q!==ae&&(Ke=!0),S=Q;break;case"defaultValue":Q!==ae&&(Ke=!0),E=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,o));break;default:Q!==ae&&st(n,o,$,Q,u,ae)}}Fh(n,S,E,j,q,J,g,f);return;case"select":Q=S=E=$=null;for(g in s)if(j=s[g],s.hasOwnProperty(g)&&j!=null)switch(g){case"value":break;case"multiple":Q=j;default:u.hasOwnProperty(g)||st(n,o,g,null,u,j)}for(f in u)if(g=u[f],j=s[f],u.hasOwnProperty(f)&&(g!=null||j!=null))switch(f){case"value":g!==j&&(Ke=!0),$=g;break;case"defaultValue":g!==j&&(Ke=!0),E=g;break;case"multiple":g!==j&&(Ke=!0),S=g;default:g!==j&&st(n,o,f,g,u,j)}o=E,s=S,u=Q,$!=null?Wa(n,!!s,$,!1):!!u!=!!s&&(o!=null?Wa(n,!!s,o,!0):Wa(n,!!s,s?[]:"",!1));return;case"textarea":Q=$=null;for(E in s)if(f=s[E],s.hasOwnProperty(E)&&f!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:st(n,o,E,null,u,f)}for(S in u)if(f=u[S],g=s[S],u.hasOwnProperty(S)&&(f!=null||g!=null))switch(S){case"value":f!==g&&(Ke=!0),$=f;break;case"defaultValue":f!==g&&(Ke=!0),Q=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==g&&st(n,o,S,f,u,g)}Fb(n,$,Q);return;case"option":for(var ve in s)$=s[ve],s.hasOwnProperty(ve)&&$!=null&&!u.hasOwnProperty(ve)&&(ve==="selected"?n.selected=!1:st(n,o,ve,null,u,$));for(j in u)$=u[j],Q=s[j],u.hasOwnProperty(j)&&$!==Q&&($!=null||Q!=null)&&(j==="selected"?($!==Q&&(Ke=!0),n.selected=$&&typeof $!="function"&&typeof $!="symbol"):st(n,o,j,$,u,Q));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in s)$=s[we],s.hasOwnProperty(we)&&$!=null&&!u.hasOwnProperty(we)&&st(n,o,we,null,u,$);for(q in u)if($=u[q],Q=s[q],u.hasOwnProperty(q)&&$!==Q&&($!=null||Q!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,o));break;default:st(n,o,q,$,u,Q)}return;default:if(Uh(o)){for(var Le in s)$=s[Le],s.hasOwnProperty(Le)&&$!==void 0&&!u.hasOwnProperty(Le)&&Fp(n,o,Le,void 0,u,$);for(J in u)$=u[J],Q=s[J],!u.hasOwnProperty(J)||$===Q||$===void 0&&Q===void 0||Fp(n,o,J,$,u,Q);return}}for(var Y in s)$=s[Y],s.hasOwnProperty(Y)&&$!=null&&!u.hasOwnProperty(Y)&&st(n,o,Y,null,u,$);for(ae in u)$=u[ae],Q=s[ae],!u.hasOwnProperty(ae)||$===Q||$==null&&Q==null||st(n,o,ae,$,u,Q)}function Q2(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function NE(){if(typeof performance.getEntriesByType=="function"){for(var n=0,o=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var f=s[u],g=f.transferSize,S=f.initiatorType,E=f.duration;if(g&&E&&Q2(S)){for(S=0,E=f.responseEnd,u+=1;u<s.length;u++){var j=s[u],q=j.startTime;if(q>E)break;var J=j.transferSize,ae=j.initiatorType;J&&Q2(ae)&&(j=j.responseEnd,S+=J*(j<E?1:(E-q)/(j-q)))}if(--u,o+=8*(g+S)/(f.duration/1e3),n++,10<n)break}}if(0<n)return o/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var $p=null,Up=null;function Kl(n){return n.nodeType===9?n:n.ownerDocument}function J2(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ex(n,o){if(n===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&o==="foreignObject"?0:n}function tx(n,o,s,u){return s=Kl(s).createElement(n),s[ln]=u,s[Mn]=o,hn(s,n,o),Kt(s),s}function Wp(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Yp=null;function IE(){var n=window.event;return n&&n.type==="popstate"?n===Yp?!1:(Yp=n,!0):(Yp=null,!1)}var qp=typeof setTimeout=="function"?setTimeout:void 0,PE=typeof clearTimeout=="function"?clearTimeout:void 0,nx=typeof Promise=="function"?Promise:void 0,ix=typeof requestAnimationFrame=="function"?requestAnimationFrame:qp,ME=typeof queueMicrotask=="function"?queueMicrotask:typeof nx<"u"?function(n){return nx.resolve(null).then(n).catch(DE)}:qp;function DE(n){setTimeout(function(){throw n})}function _o(n){return n==="head"}function rx(n,o){var s=o,u=0;do{var f=s.nextSibling;if(n.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"||s==="/&"){if(u===0){n.removeChild(f),As(o);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")nm(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,nm(s);for(var g=s.firstChild;g;){var S=g.nextSibling,E=g.nodeName;g[pl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=S}}else s==="body"&&nm(n.ownerDocument.body);s=f}while(s);As(o)}function ox(n,o){var s=n;n=0;do{var u=s.nextSibling;if(s.nodeType===1?o?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(o?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=u}while(s)}function ax(n,o,s){if(o=CSS.escape(o)!==o?"r-"+btoa(o).replace(/=/g,""):o,n.style.viewTransitionName=o,s!=null&&(n.style.viewTransitionClass=s),s=getComputedStyle(n),s.display==="inline"){if(o=n.getClientRects(),o.length===1)var u=1;else for(var f=u=0;f<o.length;f++){var g=o[f];0<g.width&&0<g.height&&u++}u===1&&(n=n.style,n.display=o.length===1?"inline-block":"block",n.marginTop="-"+s.paddingTop,n.marginBottom="-"+s.paddingBottom)}}function sx(n,o){n=n.style,o=o.style;var s=o!=null?o.hasOwnProperty("viewTransitionName")?o.viewTransitionName:o.hasOwnProperty("view-transition-name")?o["view-transition-name"]:null:null;n.viewTransitionName=s==null||typeof s=="boolean"?"":(""+s).trim(),s=o!=null?o.hasOwnProperty("viewTransitionClass")?o.viewTransitionClass:o.hasOwnProperty("view-transition-class")?o["view-transition-class"]:null:null,n.viewTransitionClass=s==null||typeof s=="boolean"?"":(""+s).trim(),n.display==="inline-block"&&(o==null?n.display=n.margin="":(s=o.display,n.display=s==null||typeof s=="boolean"?"":s,s=o.margin,s!=null?n.margin=s:(s=o.hasOwnProperty("marginTop")?o.marginTop:o["margin-top"],n.marginTop=s==null||typeof s=="boolean"?"":s,o=o.hasOwnProperty("marginBottom")?o.marginBottom:o["margin-bottom"],n.marginBottom=o==null||typeof o=="boolean"?"":o)))}function LE(n,o,s){return s=s.ownerDocument.defaultView,{rect:n,abs:o.position==="absolute"||o.position==="fixed",clip:o.clipPath!=="none"||o.overflow!=="visible"||o.filter!=="none"||o.mask!=="none"||o.mask!=="none"||o.borderRadius!=="0px",view:0<=n.bottom&&0<=n.right&&n.top<=s.innerHeight&&n.left<=s.innerWidth}}function Xp(n){var o=n.getBoundingClientRect(),s=getComputedStyle(n);return LE(o,s,n)}function jE(n){return n.documentElement.clientHeight}function BE(n){this.addEventListener("load",n),this.addEventListener("error",n)}function GE(n,o,s,u,f,g,S,E,j){var q=o.nodeType===9?o:o.ownerDocument;try{var J=q.startViewTransition({update:function(){var $=q.defaultView,Q=$.navigation&&$.navigation.transition,ve=q.fonts.status;u();var we=[];if(ve==="loaded"&&(jE(q),q.fonts.status==="loading"&&we.push(q.fonts.ready)),ve=we.length,n!==null)for(var Le=n.suspenseyImages,Y=0,H=0;H<Le.length;H++){var Z=Le[H];if(!Z.complete){var oe=Z.getBoundingClientRect();if(0<oe.bottom&&0<oe.right&&oe.top<$.innerHeight&&oe.left<$.innerWidth){if(Y+=zx(Z),Y>Pd){we.length=ve;break}Z=new Promise(BE.bind(Z)),we.push(Z)}}}if(0<we.length)return $=Promise.race([Promise.all(we),new Promise(function(Se){return setTimeout(Se,500)})]).then(f,f),(Q?Promise.allSettled([Q.finished,$]):$).then(g,g);if(f(),Q)return Q.finished.then(g,g);g()},types:s});q.__reactViewTransition=J;var ae=[];return J.ready.then(function(){for(var $=q.documentElement.getAnimations({subtree:!0}),Q=0;Q<$.length;Q++){var ve=$[Q],we=ve.effect,Le=we.pseudoElement;if(Le!=null&&Le.startsWith("::view-transition")){ae.push(ve),ve=we.getKeyframes();for(var Y=Le=void 0,H=!0,Z=0;Z<ve.length;Z++){var oe=ve[Z],Se=oe.width;if(Le===void 0)Le=Se;else if(Le!==Se){H=!1;break}if(Se=oe.height,Y===void 0)Y=Se;else if(Y!==Se){H=!1;break}delete oe.width,delete oe.height,oe.transform==="none"&&delete oe.transform}H&&Le!==void 0&&Y!==void 0&&(we.setKeyframes(ve),H=getComputedStyle(we.target,we.pseudoElement),H.width!==Le||H.height!==Y)&&(H=ve[0],H.width=Le,H.height=Y,H=ve[ve.length-1],H.width=Le,H.height=Y,we.setKeyframes(ve))}}S()},function($){q.__reactViewTransition===J&&(q.__reactViewTransition=null);try{typeof $=="object"&&$!==null&&$.name==="InvalidStateError"&&($.message==="View transition was skipped because document visibility state is hidden."||$.message==="Skipping view transition because document visibility state has become hidden."||$.message==="Skipping view transition because viewport size changed."||$.message==="Transition was aborted because of invalid state")&&($=null),$!==null&&j($)}finally{u(),f(),S()}}),J.finished.finally(function(){for(var $=0;$<ae.length;$++)ae[$].cancel();q.__reactViewTransition===J&&(q.__reactViewTransition=null),E()}),J}catch{return u(),f(),S(),null}}function ba(n,o){this._scope=document.documentElement,this._selector="::view-transition-"+n+"("+o+")"}ba.prototype.animate=function(n,o){return o=typeof o=="number"?{duration:o}:A({},o),o.pseudoElement=this._selector,this._scope.animate(n,o)},ba.prototype.getAnimations=function(){for(var n=this._scope,o=this._selector,s=n.getAnimations({subtree:!0}),u=[],f=0;f<s.length;f++){var g=s[f].effect;g!==null&&g.target===n&&g.pseudoElement===o&&u.push(s[f])}return u},ba.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function lx(n){return{name:n,group:new ba("group",n),imagePair:new ba("image-pair",n),old:new ba("old",n),new:new ba("new",n)}}function si(n){this._fragmentFiber=n,this._observers=this._eventListeners=null}si.prototype.addEventListener=function(n,o,s){var u=null,f=null;if(!(s!=null&&typeof s!="boolean"&&(u=s.signal||null,u!==null&&u.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var g=this._eventListeners;if(ux(g,n,o,s)===-1){var S=this,E=o;s!=null&&typeof s!="boolean"&&s.once===!0&&(E=function(j){S.removeEventListener(n,o,s),typeof o=="function"?o.call(this,j):o.handleEvent(j)}),u!==null&&(f=S.removeEventListener.bind(S,n,o,s),u.addEventListener("abort",f,{once:!0}),f=u.removeEventListener.bind(u,"abort",f)),u=Cs(s),g.push({type:n,listener:o,optionsOrUseCapture:s,attachedListener:E,cleanup:f}),v(this._fragmentFiber.child,!1,VE,n,E,u)}this._eventListeners=g}};function VE(n,o,s,u){return w(n).addEventListener(o,s,u),!1}si.prototype.removeEventListener=function(n,o,s){var u=this._eventListeners;if(u!==null&&(o=ux(u,n,o,s),o!==-1)){var f=u[o];s=f.attachedListener;var g=f.cleanup;f=Cs(f.optionsOrUseCapture),v(this._fragmentFiber.child,!1,HE,n,s,f),u.splice(o,1),g!==null&&g()}};function HE(n,o,s,u){return w(n).removeEventListener(o,s,u),!1}function Cs(n){return n!=null&&typeof n!="boolean"&&(n.once===!0||n.signal instanceof AbortSignal)?{capture:n.capture,passive:n.passive}:n}function cx(n){return n==null?"c=0":typeof n=="boolean"?"c="+(n?"1":"0"):"c="+(n.capture?"1":"0")}function ux(n,o,s,u){if(n.length===0)return-1;u=cx(u);for(var f=0;f<n.length;f++){var g=n[f];if(g.type===o&&g.listener===s&&cx(g.optionsOrUseCapture)===u)return f}return-1}si.prototype.dispatchEvent=function(n){var o=b(this._fragmentFiber);if(o===null)return!0;o=w(o);var s=this._eventListeners;if(s!==null&&0<s.length||!n.bubbles){var u=o.nodeType===9?o.createComment(""):document.createTextNode("");if(s)for(var f=0;f<s.length;f++){var g=s[f];u.addEventListener(g.type,g.attachedListener,Cs(g.optionsOrUseCapture))}if(o.appendChild(u),n=u.dispatchEvent(n),s)for(f=0;f<s.length;f++)g=s[f],u.removeEventListener(g.type,g.attachedListener,Cs(g.optionsOrUseCapture));return o.removeChild(u),n}return o.dispatchEvent(n)},si.prototype.focus=function(n){v(this._fragmentFiber.child,!0,dx,n,void 0,void 0)};function dx(n,o){return n.tag===6?!1:(n=w(n),e7(n,o))}si.prototype.focusLast=function(n){var o=[];v(this._fragmentFiber.child,!0,Zp,o,void 0,void 0);for(var s=o.length-1;0<=s&&!dx(o[s],n);s--);};function Zp(n,o){return o.push(n),!1}si.prototype.blur=function(){var n=b(this._fragmentFiber);n!==null&&(n=w(n),n=Kl(n).activeElement,n!==null&&v(this._fragmentFiber.child,!1,FE,n,void 0,void 0))};function FE(n,o){return n.tag===6?!1:(n=w(n),n===o||n.contains(o)?(o.blur(),!0):!1)}si.prototype.observeUsing=function(n){this._observers===null&&(this._observers=new Set),this._observers.add(n),v(this._fragmentFiber.child,!1,$E,n,void 0,void 0)};function $E(n,o){return n.tag===6||(n=w(n),o.observe(n)),!1}si.prototype.unobserveUsing=function(n){var o=this._observers;if(o!==null&&o.has(n)){o.delete(n),v(this._fragmentFiber.child,!1,UE,n,void 0,void 0);for(var s=o=0;s<Ii.length;s++){var u=Ii[s];u.fragmentInstance===this&&u.observer===n?n.unobserve(u.instance):Ii[o++]=u}Ii.length=o}};function UE(n,o){return n.tag===6||(n=w(n),o.unobserve(n)),!1}var Ii=[],Kp=!1;function WE(n,o,s){Ii.push({fragmentInstance:n,observer:o,instance:s}),Kp||(Kp=!0,t7(function(){Kp=!1;var u=Ii;Ii=[];for(var f=0;f<u.length;f++){var g=u[f];g.observer.unobserve(g.instance)}}))}si.prototype.getClientRects=function(){var n=[];return v(this._fragmentFiber.child,!1,YE,n,void 0,void 0),n};function YE(n,o){if(n.tag===6){n=n.stateNode;var s=n.ownerDocument.createRange();s.selectNodeContents(n),o.push.apply(o,s.getClientRects())}else n=w(n),o.push.apply(o,n.getClientRects());return!1}si.prototype.getRootNode=function(n){var o=b(this._fragmentFiber);return o===null?this:w(o).getRootNode(n)},si.prototype.compareDocumentPosition=function(n){var o=b(this._fragmentFiber);if(o===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var s=[];v(this._fragmentFiber.child,!1,Zp,s,void 0,void 0);var u=w(o);if(s.length===0){if(s=u,y(this._fragmentFiber)){e:{for(o=this._fragmentFiber.return;o!==null;){if(o.tag===4){o=o.stateNode.containerInfo;break e}if(o.tag===3||o.tag===5||o.tag===27)break;o=o.return}o=null}o!=null&&(s=o)}o=this._fragmentFiber;var f=u=s.compareDocumentPosition(n);return s===n?f=Node.DOCUMENT_POSITION_CONTAINS:u&Node.DOCUMENT_POSITION_CONTAINED_BY&&(s=x(o)[1],s===null?f=Node.DOCUMENT_POSITION_PRECEDING:(n=w(s).compareDocumentPosition(n),f=n===0||n&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}o=w(s[0]),f=w(s[s.length-1]);var g=y(this._fragmentFiber)?o.parentElement:u;if(g==null)return Node.DOCUMENT_POSITION_DISCONNECTED;u=g.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY,g=g.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var S=o.compareDocumentPosition(n),E=f.compareDocumentPosition(n),j=S&Node.DOCUMENT_POSITION_CONTAINED_BY||E&Node.DOCUMENT_POSITION_CONTAINED_BY;return E=u&&g&&S&Node.DOCUMENT_POSITION_FOLLOWING&&E&Node.DOCUMENT_POSITION_PRECEDING,o=u&&o===n||g&&f===n||j||E?Node.DOCUMENT_POSITION_CONTAINED_BY:!u&&o===n||!g&&f===n?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:S,o&Node.DOCUMENT_POSITION_DISCONNECTED||o&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||qE(o,this._fragmentFiber,s[0],s[s.length-1],n)?o:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function qE(n,o,s,u,f){var g=Ko(f);if(n&Node.DOCUMENT_POSITION_CONTAINED_BY){if(s=!!g)e:{for(;g!==null;){if(g.tag===7&&(g===o||g.alternate===o)){s=!0;break e}g=g.return}s=!1}return s}if(n&Node.DOCUMENT_POSITION_CONTAINS){if(g===null)return g=f.ownerDocument,f===g||f===g.documentElement||f===g.body;e:{for(g=o,o=b(o);g!==null;){if(!(g.tag!==5&&g.tag!==3&&g.tag!==27||g!==o&&g.alternate!==o)){g=!0;break e}g=g.return}g=!1}return g}return n&Node.DOCUMENT_POSITION_PRECEDING?((o=!!g)&&!(o=g===s)&&(o=k(s,g,T),o===null?o=!1:(v(o,!0,z,g,s),g=C,C=null,o=g!==null)),o):n&Node.DOCUMENT_POSITION_FOLLOWING?((o=!!g)&&!(o=g===u)&&(o=k(u,g,T),o===null?o=!1:(v(o,!0,D,g,u),g=C,R=C=null,o=g!==null)),o):!1}function fx(n,o){var s=n.ownerDocument.createRange();s.selectNodeContents(n),n=s.getBoundingClientRect(),window.scrollTo(window.scrollX+n.left,o?window.scrollY+n.top:window.scrollY+n.bottom-window.innerHeight)}si.prototype.scrollIntoView=function(n){if(typeof n=="object")throw Error(r(566));var o=[];v(this._fragmentFiber.child,!1,Zp,o,void 0,void 0);var s=n!==!1;if(o.length===0){var u=x(this._fragmentFiber);if(u=s?u[1]||u[0]||b(this._fragmentFiber):u[0]||u[1],u===null)return;if(u.tag===6){n=w(u),fx(n,s);return}if(u=w(u),u.nodeType!==9){if(u.nodeType===11){s="host"in u?u.host:null,s!==null&&s.scrollIntoView(n);return}u.scrollIntoView(n)}}for(u=s?o.length-1:0;u!==(s?-1:o.length);){var f=o[u];f.tag===6?(f=w(f),fx(f,s)):w(f).scrollIntoView(n),u+=s?-1:1}};function XE(n,o){return n=w(n),hx(n,o),!1}function hx(n,o){n.reactFragments==null&&(n.reactFragments=new Set),n.reactFragments.add(o)}function gx(n,o){var s=o._eventListeners;if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];n.addEventListener(f.type,f.attachedListener,Cs(f.optionsOrUseCapture))}n.nodeType!==3&&(s=o._observers,s!==null&&s.forEach(function(g){for(var S=0,E=0;E<Ii.length;E++){var j=Ii[E];(j.fragmentInstance!==o||j.observer!==g||j.instance!==n)&&(Ii[S++]=j)}Ii.length=S,g.observe(n)}),hx(n,o))}function ZE(n,o){var s=o._eventListeners;if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];n.removeEventListener(f.type,f.attachedListener,Cs(f.optionsOrUseCapture))}n.nodeType!==3&&(s=o._observers,s!==null&&s.forEach(function(g){typeof g.rootMargin=="string"?WE(o,g,n):g.unobserve(n)}),n.reactFragments!=null&&n.reactFragments.delete(o))}function Qp(n){var o=n.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var s=o;switch(o=o.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Qp(s),_u(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function KE(n,o,s,u){for(;n.nodeType===1;){var f=s;if(n.nodeName.toLowerCase()!==o.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[pl])switch(o){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(g=n.getAttribute("rel"),g==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(g!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(g=n.getAttribute("src"),(g!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&g&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(o==="input"&&n.type==="hidden"){var g=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===g)return n}else return n;if(n=xi(n.nextSibling),n===null)break}return null}function QE(n,o,s){if(o==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=xi(n.nextSibling),n===null))return null;return n}function px(n,o){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=xi(n.nextSibling),n===null))return null;return n}function Jp(n){return n.data==="$?"||n.data==="$~"}function em(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function JE(n,o){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=o;else if(n.data!=="$?"||s.readyState!=="loading")o();else{var u=function(){o(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function xi(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return n}var tm=null;function mx(n){n=n.nextSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(o===0)return xi(n.nextSibling);o--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||o++}n=n.nextSibling}return null}function vx(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(o===0)return n;o--}else s!=="/$"&&s!=="/&"||o++}n=n.previousSibling}return null}function e7(n,o){function s(){u=!0}if(n.ownerDocument.activeElement===n)return!0;var u=!1;try{n.ownerDocument.addEventListener("focus",s,!0),(n.focus||HTMLElement.prototype.focus).call(n,o)}finally{n.ownerDocument.removeEventListener("focus",s,!0)}return u}function t7(n){ix(function(){ix(function(o){return n(o)})})}function bx(n,o,s){switch(o=Kl(s),n){case"html":if(n=o.documentElement,!n)throw Error(r(452));return n;case"head":if(n=o.head,!n)throw Error(r(453));return n;case"body":if(n=o.body,!n)throw Error(r(454));return n;default:throw Error(r(451))}}function yx(n,o,s){for(var u in s){var f=s[u];s.hasOwnProperty(u)&&f!=null&&st(n,o,u,null,AE,f)}s.dangerouslySetInnerHTML!=null&&(n.textContent=""),n.onclick===Ui&&(n.onclick=null),_u(n)}function nm(n){for(var o=n.attributes;o.length;)n.removeAttributeNode(o[0]);_u(n)}var Si=new Map,xx=new Set;function Ql(n){if(typeof n.getRootNode=="function"){var o=n.getRootNode();if(o.nodeType===9||o.nodeType===11)return o}return n.nodeType===9?n:n.ownerDocument}var Mr=xe.d;xe.d={f:n7,r:i7,D:r7,C:o7,L:a7,m:s7,X:c7,S:l7,M:u7};function n7(){var n=Mr.f(),o=Ed();return n||o}function i7(n){var o=Fa(n);o!==null&&o.tag===5&&o.type==="form"?_1(o):Mr.r(n)}var Es=typeof document>"u"?null:document;function Sx(n,o,s){var u=Es;if(u&&typeof o=="string"&&o){var f=hi(o);f='link[rel="'+n+'"][href="'+f+'"]',typeof s=="string"&&(f+='[crossorigin="'+s+'"]'),xx.has(f)||(xx.add(f),n={rel:n,crossOrigin:s,href:o},u.querySelector(f)===null&&(o=u.createElement("link"),hn(o,"link",n),Kt(o),u.head.appendChild(o)))}}function r7(n){Mr.D(n),Sx("dns-prefetch",n,null)}function o7(n,o){Mr.C(n,o),Sx("preconnect",n,o)}function a7(n,o,s){Mr.L(n,o,s);var u=Es;if(u&&n&&o){var f='link[rel="preload"][as="'+hi(o)+'"]';o==="image"&&s&&s.imageSrcSet?(f+='[imagesrcset="'+hi(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(f+='[imagesizes="'+hi(s.imageSizes)+'"]')):f+='[href="'+hi(n)+'"]';var g=f;switch(o){case"style":g=Ts(n);break;case"script":g=ks(n)}if(!(Si.has(g)||(n=A({rel:"preload",href:o==="image"&&s&&s.imageSrcSet?void 0:n,as:o},s),Si.set(g,n),u.querySelector(f)!==null||o==="style"&&u.querySelector(Jl(g))||o==="script"&&u.querySelector(ec(g))))){var S=u.createElement("link");hn(S,"link",n),o==="style"&&(S[Su]=!0,S.onload=S.onerror=function(){Pb(S)}),Kt(S),u.head.appendChild(S)}}}function s7(n,o){Mr.m(n,o);var s=Es;if(s&&n){var u=o&&typeof o.as=="string"?o.as:"script",f='link[rel="modulepreload"][as="'+hi(u)+'"][href="'+hi(n)+'"]',g=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=ks(n)}if(!Si.has(g)&&(n=A({rel:"modulepreload",href:n},o),Si.set(g,n),s.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(ec(g)))return}u=s.createElement("link"),hn(u,"link",n),Kt(u),s.head.appendChild(u)}}}function l7(n,o,s){Mr.S(n,o,s);var u=Es;if(u&&n){var f=$a(u).hoistableStyles,g=Ts(n);o=o||"default";var S=f.get(g);if(!S){var E={loading:0,preload:null};if(S=u.querySelector(Jl(g)))E.loading=5;else{n=A({rel:"stylesheet",href:n,"data-precedence":o},s),(s=Si.get(g))&&im(n,s);var j=S=u.createElement("link");Kt(j),hn(j,"link",n),j._p=new Promise(function(q,J){j.onload=q,j.onerror=J}),j.addEventListener("load",function(){E.loading|=1}),j.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Nd(S,o,u)}S={type:"stylesheet",instance:S,count:1,state:E},f.set(g,S)}}}function c7(n,o){Mr.X(n,o);var s=Es;if(s&&n){var u=$a(s).hoistableScripts,f=ks(n),g=u.get(f);g||(g=s.querySelector(ec(f)),g||(n=A({src:n,async:!0},o),(o=Si.get(f))&&rm(n,o),g=s.createElement("script"),Kt(g),hn(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(f,g))}}function u7(n,o){Mr.M(n,o);var s=Es;if(s&&n){var u=$a(s).hoistableScripts,f=ks(n),g=u.get(f);g||(g=s.querySelector(ec(f)),g||(n=A({src:n,async:!0,type:"module"},o),(o=Si.get(f))&&rm(n,o),g=s.createElement("script"),Kt(g),hn(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},u.set(f,g))}}function _x(n,o,s,u){var f=(f=Zn.current)?Ql(f):null;if(!f)throw Error(r(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(s=Ts(s.href),o=$a(f).hoistableStyles,u=o.get(s),u||(u={type:"style",instance:null,count:0,state:null},o.set(s,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Ts(s.href);var g=$a(f).hoistableStyles,S=g.get(n);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,S),(g=f.querySelector(Jl(n)))?g._p||(S.instance=g,S.state.loading=5):(g=Si.get(n),g||(g={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Si.set(n,g)),d7(f,n,g,S.state))),o&&u===null)throw Error(r(528,""));return S}if(o&&u!==null)throw Error(r(529,""));return null;case"script":return o=s.async,s=s.src,typeof s=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(s=ks(s),o=$a(f).hoistableScripts,u=o.get(s),u||(u={type:"script",instance:null,count:0,state:null},o.set(s,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function Ts(n){return'href="'+hi(n)+'"'}function Jl(n){return'link[rel="stylesheet"]['+n+"]"}function wx(n){return A({},n,{"data-precedence":n.precedence,precedence:null})}function d7(n,o,s,u){if(o=n.querySelector('link[rel="preload"][as="style"]['+o+"]")){if(o[Su]!==!0){u.loading=1;return}}else o=n.createElement("link"),o[Su]=!0,o.onload=o.onerror=Pb.bind(null,o),hn(o,"link",s),Kt(o),n.head.appendChild(o);u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2})}function ks(n){return'[src="'+hi(n)+'"]'}function ec(n){return"script[async]"+n}function Cx(n,o,s){if(o.count++,o.instance===null)switch(o.type){case"style":var u=n.querySelector('style[data-href~="'+hi(s.href)+'"]');if(u)return o.instance=u,Kt(u),u;var f=A({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Kt(u),hn(u,"style",f),Nd(u,s.precedence,n),o.instance=u;case"stylesheet":f=Ts(s.href);var g=n.querySelector(Jl(f));if(g)return o.state.loading|=4,o.instance=g,Kt(g),g;u=wx(s),(f=Si.get(f))&&im(u,f),g=(n.ownerDocument||n).createElement("link"),Kt(g);var S=g;return S._p=new Promise(function(E,j){S.onload=E,S.onerror=j}),hn(g,"link",u),o.state.loading|=4,Nd(g,s.precedence,n),o.instance=g;case"script":return g=ks(s.src),(f=n.querySelector(ec(g)))?(o.instance=f,Kt(f),f):(u=s,(f=Si.get(g))&&(u=A({},s),rm(u,f)),n=n.ownerDocument||n,f=n.createElement("script"),Kt(f),hn(f,"link",u),n.head.appendChild(f),o.instance=f);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(u=o.instance,o.state.loading|=4,Nd(u,s.precedence,n));return o.instance}function Nd(n,o,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,g=f,S=0;S<u.length;S++){var E=u[S];if(E.dataset.precedence===o)g=E;else if(g!==f)break}g?g.parentNode.insertBefore(n,g.nextSibling):(o=s.nodeType===9?s.head:s,o.insertBefore(n,o.firstChild))}function im(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.title==null&&(n.title=o.title)}function rm(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.integrity==null&&(n.integrity=o.integrity)}var Id=null;function Ex(n,o,s){if(Id===null){var u=new Map,f=Id=new Map;f.set(s,u)}else f=Id,u=f.get(s),u||(u=new Map,f.set(s,u));if(u.has(n))return u;for(u.set(n,null),s=s.getElementsByTagName(n),f=0;f<s.length;f++){var g=s[f];if(!(g[pl]||g[ln]||n==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(o)||"";S=n+S;var E=u.get(S);E?E.push(g):u.set(S,[g])}}return u}function om(n,o,s){n=n.ownerDocument||n,n.head.insertBefore(s,o==="title"?n.querySelector("head > title"):null)}function f7(n,o,s){if(s===1||o.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(n=o.disabled,typeof o.precedence=="string"&&n==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Tx(n,o){return n==="img"&&o.src!=null&&o.src!==""&&o.onLoad==null&&o.loading!=="lazy"}function kx(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function zx(n){return(n.width||100)*(n.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Rx(n,o){typeof o.decode=="function"&&(n.imgCount++,o.complete||(n.imgBytes+=zx(o),n.suspenseyImages.push(o)),n=p7.bind(n),o.decode().then(n,n))}function h7(n,o,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var f=Ts(u.href),g=o.querySelector(Jl(f));if(g){o=g._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(n.count++,n=tc.bind(n),o.then(n,n)),s.state.loading|=4,s.instance=g,Kt(g);return}g=o.ownerDocument||o,u=wx(u),(f=Si.get(f))&&im(u,f),g=g.createElement("link"),Kt(g);var S=g;S._p=new Promise(function(E,j){S.onload=E,S.onerror=j}),hn(g,"link",u),s.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,o),(o=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=tc.bind(n),o.addEventListener("load",s),o.addEventListener("error",s))}}var Pd=0;function g7(n,o){return n.stylesheets&&n.count===0&&Dd(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var u=setTimeout(function(){if(n.stylesheets&&Dd(n,n.stylesheets),n.unsuspend){var g=n.unsuspend;n.unsuspend=null,g()}},6e4+o);0<n.imgBytes&&Pd===0&&(Pd=62500*NE());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Dd(n,n.stylesheets),n.unsuspend)){var g=n.unsuspend;n.unsuspend=null,g()}},(n.imgBytes>Pd?50:800)+o);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function Ax(n){if(n.count===0&&(n.imgCount===0||!n.waitingForImages)){if(n.stylesheets)Dd(n,n.stylesheets);else if(n.unsuspend){var o=n.unsuspend;n.unsuspend=null,o()}}}function tc(){this.count--,Ax(this)}function p7(){this.imgCount--,Ax(this)}var Md=null;function Dd(n,o){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Md=new Map,o.forEach(m7,n),Md=null,tc.call(n))}function m7(n,o){if(!(o.state.loading&4)){var s=Md.get(n);if(s)var u=s.get(null);else{s=new Map,Md.set(n,s);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<f.length;g++){var S=f[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(s.set(S.dataset.precedence,S),u=S)}u&&s.set(null,u)}f=o.instance,S=f.getAttribute("data-precedence"),g=s.get(S)||u,g===u&&s.set(null,f),s.set(S,f),this.count++,u=tc.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),g?g.parentNode.insertBefore(f,g.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),o.state.loading|=4}}var zs={$$typeof:K,Provider:null,Consumer:null,_currentValue:Xe,_currentValue2:Xe,_threadCount:0};function v7(n,o,s,u,f,g,S,E,j){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Bh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bh(0),this.hiddenUpdates=Bh(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.transitionTypes=null,this.incompleteTransitions=new Map}function Ox(n,o,s,u,f,g,S,E,j,q,J,ae){return n=new v7(n,o,s,S,j,q,J,ae,E),o=1,g===!0&&(o|=24),g=Dn(3,null,null,o),n.current=g,g.stateNode=n,o=xg(),o.refCount++,n.pooledCache=o,o.refCount++,g.memoizedState={element:u,isDehydrated:s,cache:o},Cg(g),n}function Nx(n){return n?(n=es,n):es}function Ix(n,o,s,u,f,g){f=Nx(f),u.context===null?u.context=f:u.pendingContext=f,u=co(o),u.payload={element:s},g=g===void 0?null:g,g!==null&&(u.callback=g),s=uo(n,u,o),s!==null&&(Gn(s,n,o),Nl(s,n,o))}function Px(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<o?s:o}}function am(n,o){Px(n,o),(n=n.alternate)&&Px(n,o)}function Mx(n){if(n.tag===13||n.tag===31){var o=ta(n,67108864);o!==null&&Gn(o,n,67108864),am(n,67108864)}}function Dx(n){if(n.tag===13||n.tag===31){var o=ai();o=Gh(o);var s=ta(n,o);s!==null&&Gn(s,n,o),am(n,o)}}var Rs=!0;function b7(n,o,s,u){var f=le.T;le.T=null;var g=xe.p;try{xe.p=2,sm(n,o,s,u)}finally{xe.p=g,le.T=f}}function y7(n,o,s,u){var f=le.T;le.T=null;var g=xe.p;try{xe.p=8,sm(n,o,s,u)}finally{xe.p=g,le.T=f}}function sm(n,o,s,u){if(Rs){var f=lm(u);if(f===null)Hp(n,o,u,Ld,s),jx(n,u);else if(S7(f,n,o,s,u))u.stopPropagation();else if(jx(n,u),o&4&&-1<x7.indexOf(n)){for(;f!==null;){var g=Fa(f);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=Zo(g.pendingLanes);if(S!==0){var E=g;for(E.pendingLanes|=2,E.entangledLanes|=2;S;){var j=1<<31-Jn(S);E.entanglements[1]|=j,S&=~j}tr(g),(et&6)===0&&(_d=Kn()+500,ql(0))}}break;case 31:case 13:E=ta(g,2),E!==null&&Gn(E,g,2),Ed(),am(g,2)}if(g=lm(u),g===null&&Hp(n,o,u,Ld,s),g===f)break;f=g}f!==null&&u.stopPropagation()}else Hp(n,o,u,null,s)}}function lm(n){return n=Yh(n),cm(n)}var Ld=null;function cm(n){if(Ld=null,n=Ko(n),n!==null){var o=l(n);if(o===null)n=null;else{var s=o.tag;if(s===13){if(n=c(o),n!==null)return n;n=null}else if(s===31){if(n=d(o),n!==null)return n;n=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}return Ld=n,null}function Lx(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(NC()){case _b:return 2;case wb:return 8;case mu:case IC:return 32;case Cb:return 268435456;default:return 32}default:return 32}}var um=!1,wo=null,Co=null,Eo=null,nc=new Map,ic=new Map,To=[],x7="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function jx(n,o){switch(n){case"focusin":case"focusout":wo=null;break;case"dragenter":case"dragleave":Co=null;break;case"mouseover":case"mouseout":Eo=null;break;case"pointerover":case"pointerout":nc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ic.delete(o.pointerId)}}function rc(n,o,s,u,f,g){return n===null||n.nativeEvent!==g?(n={blockedOn:o,domEventName:s,eventSystemFlags:u,nativeEvent:g,targetContainers:[f]},o!==null&&(o=Fa(o),o!==null&&Mx(o)),n):(n.eventSystemFlags|=u,o=n.targetContainers,f!==null&&o.indexOf(f)===-1&&o.push(f),n)}function S7(n,o,s,u,f){switch(o){case"focusin":return wo=rc(wo,n,o,s,u,f),!0;case"dragenter":return Co=rc(Co,n,o,s,u,f),!0;case"mouseover":return Eo=rc(Eo,n,o,s,u,f),!0;case"pointerover":var g=f.pointerId;return nc.set(g,rc(nc.get(g)||null,n,o,s,u,f)),!0;case"gotpointercapture":return g=f.pointerId,ic.set(g,rc(ic.get(g)||null,n,o,s,u,f)),!0}return!1}function Bx(n){var o=Ko(n.target);if(o!==null){var s=l(o);if(s!==null){if(o=s.tag,o===13){if(o=c(s),o!==null){n.blockedOn=o,Ob(n.priority,function(){Dx(s)});return}}else if(o===31){if(o=d(s),o!==null){n.blockedOn=o,Ob(n.priority,function(){Dx(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function jd(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var s=lm(n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);Wh=u,s.target.dispatchEvent(u),Wh=null}else return o=Fa(s),o!==null&&Mx(o),n.blockedOn=s,!1;o.shift()}return!0}function Gx(n,o,s){jd(n)&&s.delete(o)}function _7(){um=!1,wo!==null&&jd(wo)&&(wo=null),Co!==null&&jd(Co)&&(Co=null),Eo!==null&&jd(Eo)&&(Eo=null),nc.forEach(Gx),ic.forEach(Gx)}function Bd(n,o){n.blockedOn===o&&(n.blockedOn=null,um||(um=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,_7)))}var Gd=null;function Vx(n){Gd!==n&&(Gd=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Gd===n&&(Gd=null);for(var o=0;o<n.length;o+=3){var s=n[o],u=n[o+1],f=n[o+2];if(typeof u!="function"){if(cm(u||s)===null)continue;break}var g=Fa(s);g!==null&&(n.splice(o,3),o-=3,Ug(g,{pending:!0,data:f,method:s.method,action:u},u,f))}}))}function As(n){function o(j){return Bd(j,n)}wo!==null&&Bd(wo,n),Co!==null&&Bd(Co,n),Eo!==null&&Bd(Eo,n),nc.forEach(o),ic.forEach(o);for(var s=0;s<To.length;s++){var u=To[s];u.blockedOn===n&&(u.blockedOn=null)}for(;0<To.length&&(s=To[0],s.blockedOn===null);)Bx(s),s.blockedOn===null&&To.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var f=s[u],g=s[u+1],S=f[Mn]||null;if(typeof g=="function")S||Vx(s);else if(S){var E=null;if(g&&g.hasAttribute("formAction")){if(f=g,S=g[Mn]||null)E=S.formAction;else if(cm(f)!==null)continue}else E=S.action;typeof E=="function"?s[u+1]=E:(s.splice(u,3),u-=3),Vx(s)}}}function Hx(){function n(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(S){return f=S})},focusReset:"manual",scroll:"manual"})}function o(){f!==null&&(f(),f=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),f!==null&&(f(),f=null)}}}function dm(n){this._internalRoot=n}Vd.prototype.render=dm.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(r(409));var s=o.current,u=ai();Ix(s,u,n,o,null,null)},Vd.prototype.unmount=dm.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;Ix(n.current,2,null,n,null,null),Ed(),o[Ha]=null}};function Vd(n){this._internalRoot=n}Vd.prototype.unstable_scheduleHydration=function(n){if(n){var o=Ab();n={blockedOn:null,target:n,priority:o};for(var s=0;s<To.length&&o!==0&&o<To[s].priority;s++);To.splice(s,0,n),s===0&&Bx(n)}};var Fx=t.version;if(Fx!=="19.3.0")throw Error(r(527,Fx,"19.3.0"));xe.findDOMNode=function(n){var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=p(o),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var w7={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:le,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hd.isDisabled&&Hd.supportsFiber)try{fl=Hd.inject(w7),Qn=Hd}catch{}}return vc.createRoot=function(n,o){if(!a(n))throw Error(r(299));var s=!1,u="",f=N1,g=I1,S=P1;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(u=o.identifierPrefix),o.onUncaughtError!==void 0&&(f=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError)),o=Ox(n,1,!1,null,null,s,u,null,f,g,S,Hx),n[Ha]=o.current,Vp(n),new dm(o)},vc.hydrateRoot=function(n,o,s){if(!a(n))throw Error(r(299));var u=!1,f="",g=N1,S=I1,E=P1,j=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(S=s.onCaughtError),s.onRecoverableError!==void 0&&(E=s.onRecoverableError),s.formState!==void 0&&(j=s.formState)),o=Ox(n,1,!0,o,s??null,u,f,j,g,S,E,Hx),o.context=Nx(null),s=o.current,u=ai(),u=Gh(u),f=co(u),f.callback=null,uo(s,f,u),s=u,o.current.lanes=s,gl(o,s),tr(o),n[Ha]=o.current,Vp(n),new Vd(o)},vc.version="19.3.0",vc}var P5;function nj(){if(P5)return Dm.exports;P5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Dm.exports=tj(),Dm.exports}var ij=nj();async function kh(e){const t=await fetch(e);if(!t.ok)throw new Error(`${e} → ${String(t.status)}`);return await t.json()}const rj=()=>kh("/api/studio"),M5=()=>kh("/api/frames").then(e=>e.frames),oj=e=>kh(`/api/frame?frame=${encodeURIComponent(e)}`),j6=(e,t,i=!1)=>kh(`/api/source?frame=${encodeURIComponent(e)}&path=${encodeURIComponent(t.join("."))}`+(i?"&impact=1":""));async function aj(e,t,i={}){const r=await fetch("/api/edit",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({frame:e,edits:t,...i.confirmShared===!0?{confirmShared:!0}:{}})}),a=await r.json();return r.ok?{ok:!0,...a.revision===void 0?{}:{revision:a.revision}}:a.code==="shared"?{ok:!1,shared:a.shared??[]}:{ok:!1,rejected:a.rejected??[]}}function sj(e){const t=new EventSource("/api/events");return t.onmessage=i=>{try{e(JSON.parse(i.data))}catch{}},()=>{t.close()}}const lj=e=>e*137.508%360,$0=(e,t=1)=>`hsla(${String(lj(e))}, 90%, 55%, ${String(t)})`;function cj(e){const{boxes:t,selected:i,hidden:r,overflow:a,onSelect:l,onToggleHidden:c}=e,d=O.useMemo(()=>bw({items:t.map((h,p)=>({...h,index:p})),itemToString:h=>h.key,itemToValue:h=>h.key}),[t]);return N.jsxs(RL,{collection:d,selectionMode:"single",selectOnHighlight:!0,typeahead:!0,value:i===void 0?[]:[i],onValueChange:h=>{const[p]=h.value;p!==void 0&&l(p)},children:[N.jsx(IL,{fontSize:"xs",textTransform:"uppercase",color:"fg.muted",mb:"1",children:"Boxes"}),N.jsxs(AL,{bg:"transparent",borderWidth:"0",p:"0",gap:"0",maxH:"none",h:"auto",overflow:"visible",children:[d.items.map(h=>{const{key:p,box:m,index:v}=h;return N.jsx(OL,{item:h,px:"2",py:"1",borderRadius:"4px",opacity:r.has(p)?.4:1,children:N.jsxs($r,{gap:"2",flex:"1",minW:"0",children:[N.jsx(Ci,{as:"button","aria-label":`${r.has(p)?"Show":"Hide"} ${p}`,w:"12px",h:"12px",flex:"none",borderRadius:"3px",bg:$0(v),onClick:b=>{b.stopPropagation(),c(p)}}),N.jsxs(Ei,{align:"stretch",gap:"0",flex:"1",minW:"0",children:[N.jsx(NL,{fontWeight:"600",truncate:!0,children:p}),N.jsxs(St,{fontSize:"10px",color:"fg.muted",truncate:!0,children:[m.x,",",m.y," · ",m.width,"×",m.height,m.fontSize===void 0?"":` · ${String(m.fontSize)}pt`]}),a[p]!==void 0&&N.jsxs(St,{fontSize:"10px",color:"fg.error",children:["overflows by ",a[p],"px"]})]})]})},p)}),N.jsx(PL,{fontSize:"xs",color:"fg.muted",children:"No boxes in this set."})]})]})}const uj=Math.PI/180;function dj(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const js=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},pe={_global:js,version:"10.5.0",isBrowser:dj(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return pe.angleDeg?e*uj:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_renderBackend:"web",legacyTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return pe.DD.isDragging},isTransforming(){var e,t;return(t=(e=pe.Transformer)===null||e===void 0?void 0:e.isTransforming())!==null&&t!==void 0?t:!1},isDragReady(){return!!pe.DD.node},releaseCanvasOnDestroy:!0,document:js.document,_injectGlobal(e){typeof js.Konva<"u"&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),js.Konva=e}},zt=e=>{pe[e.prototype.getClassName()]=e};pe._injectGlobal(pe);const fj=`Konva.js unsupported environment.
12
+
13
+ Looks like you are trying to use Konva.js in Node.js environment (or in a Web Worker), because "document" object is undefined.
14
+
15
+ To use Konva.js in Node.js environment, you need to use the "canvas-backend" or "skia-backend" module.
16
+
17
+ bash: npm install canvas
18
+ js: import "konva/canvas-backend";
19
+
20
+ or
21
+
22
+ bash: npm install skia-canvas
23
+ js: import "konva/skia-backend";
24
+ `,D5=()=>{if(typeof document>"u")throw new Error(fj)};class li{constructor(t){this.dirty=!1,this.m=t?t.slice():[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new li(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){const i=this.m;return{x:i[0]*t.x+i[2]*t.y+i[4],y:i[1]*t.x+i[3]*t.y+i[5]}}translate(t,i){return this.m[4]+=this.m[0]*t+this.m[2]*i,this.m[5]+=this.m[1]*t+this.m[3]*i,this}scale(t,i){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=i,this.m[3]*=i,this}rotate(t){const i=Math.cos(t),r=Math.sin(t),a=this.m[0]*i+this.m[2]*r,l=this.m[1]*i+this.m[3]*r,c=this.m[0]*-r+this.m[2]*i,d=this.m[1]*-r+this.m[3]*i;return this.m[0]=a,this.m[1]=l,this.m[2]=c,this.m[3]=d,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,i){const r=this.m[0]+this.m[2]*i,a=this.m[1]+this.m[3]*i,l=this.m[2]+this.m[0]*t,c=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=a,this.m[2]=l,this.m[3]=c,this}multiply(t){const i=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],a=this.m[0]*t.m[2]+this.m[2]*t.m[3],l=this.m[1]*t.m[2]+this.m[3]*t.m[3],c=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],d=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=i,this.m[1]=r,this.m[2]=a,this.m[3]=l,this.m[4]=c,this.m[5]=d,this}isInvertible(){return this.m[0]*this.m[3]-this.m[1]*this.m[2]!==0}invert(){const t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),i=this.m[3]*t,r=-this.m[1]*t,a=-this.m[2]*t,l=this.m[0]*t,c=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),d=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=i,this.m[1]=r,this.m[2]=a,this.m[3]=l,this.m[4]=c,this.m[5]=d,this}getMatrix(){return this.m}decompose(){const t=this.m[0],i=this.m[1],r=this.m[2],a=this.m[3],l=this.m[4],c=this.m[5],d=t*a-i*r,h={x:l,y:c,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||i!=0){const p=Math.sqrt(t*t+i*i);h.rotation=i>0?Math.acos(t/p):-Math.acos(t/p),h.scaleX=p,h.scaleY=d/p,h.skewX=d&&(t*r+i*a)/d,h.skewY=0}else if(r!=0||a!=0){const p=Math.sqrt(r*r+a*a);h.rotation=Math.PI/2-(a>0?Math.acos(-r/p):-Math.acos(r/p)),h.scaleX=d/p,h.scaleY=p,h.skewX=0,h.skewY=d&&(t*r+i*a)/d}return h.rotation=F._getRotation(h.rotation),h}}const hj="[object Array]",gj="[object Number]",pj="[object String]",mj="[object Boolean]",vj=Math.PI/180,B6=180/Math.PI,Bm="#",bj="",yj="0",xj="Konva warning: ",L5="Konva error: ",Sj={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[0,0,0,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};let bc=null;const _j=typeof window<"u"?window:{},Gm=new WeakMap,wj=(e,t)=>{typeof e.requestAnimationFrame=="function"?e.requestAnimationFrame(t):typeof requestAnimationFrame<"u"?requestAnimationFrame(t):setTimeout(t,16)},j5=new Map,G6=Object.getPrototypeOf(Int8Array),B5=e=>{const t=e.trim();return t.indexOf(",")===-1?t.split(/\s*\/\s*|\s+/):t.split(/\s*,\s*/)},V6="[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?",Cj=new RegExp(`^(${V6})(%?)$`,"i"),wa=(e,t)=>{const i=Cj.exec(e);return i?i[2]?Number(i[1])/100*t:Number(i[1]):NaN},Qd=/^#[0-9a-f]+$/i,G5=e=>Math.min(Math.max(e,0),1),Ej=new RegExp(`^(${V6})(deg|grad|rad|turn)?$`,"i"),Tj={deg:1,grad:.9,rad:B6,turn:360};function yc(e,t){return Math.min(Math.max(e||0,0),t)}const F={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===hj},_isNumber(e){return Object.prototype.toString.call(e)===gj&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===pj},_isBoolean(e){return Object.prototype.toString.call(e)===mj},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;const t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e,t){const i=t&&!t.closed&&t||_j;let r=Gm.get(i);r||(r=[],Gm.set(i,r),wj(i,function(){Gm.delete(i),r.forEach(function(a){a()})})),r.push(e)},createCanvasElement(){D5();const e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return D5(),document.createElement("img")},_isInDocument(e){return!!e.isConnected},_urlToImage(e,t){const i=F.createImageElement();i.onload=function(){t(i)},i.src=e},_rgbToHex(e,t,i){return((1<<24)+(e<<16)+(t<<8)+i).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Bm,bj);const t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){let e=(Math.random()*16777215<<0).toString(16);for(;e.length<6;)e=yj+e;return Bm+e},isCanvasFarblingActive(){if(bc!==null)return bc;if(typeof document>"u")return bc=!1,!1;const e=this.createCanvasElement();e.width=10,e.height=10;const t=e.getContext("2d",{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle="#282828",t.fillRect(0,0,10,10);const i=t.getImageData(0,0,10,10).data;let r=!1;for(let a=0;a<100;a++)if(i[a*4]!==40||i[a*4+1]!==40||i[a*4+2]!==40||i[a*4+3]!==255){r=!0;break}return bc=r,this.releaseCanvas(e),bc},getHitColor(){const e=()=>Math.random()*256|0;return this.getHitColorKey(e(),e(),e())},getHitColorKey(e,t,i){const r=this.isCanvasFarblingActive()?5:3,a=l=>Math.round(l/r)*r;return Bm+this._rgbToHex(a(e),a(t),a(i))},getSnappedHexColor(e){const{r:t,g:i,b:r}=this._hexToRgb(e);return this.getHitColorKey(t,i,r)},getRGB(e){var t;const{r:i=0,g:r=0,b:a=0}=(t=F.colorToRGBA(e))!==null&&t!==void 0?t:{};return{r:i,g:r,b:a}},colorToRGBA(e){e=(e||"").trim()||"black";const t=F._namedColorToRBA(e)||F._hex3ColorToRGBA(e)||F._hex4ColorToRGBA(e)||F._hex6ColorToRGBA(e)||F._hex8ColorToRGBA(e)||F._rgbColorToRGBA(e)||F._hslColorToRGBA(e);if(t&&[t.r,t.g,t.b,t.a].every(F._isNumber))return t},_namedColorToRBA(e){const t=Sj[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:t.length>3?t[3]:1}:null},_rgbColorToRGBA(e){const t=/^rgba?\(([^)]*)\)$/i.exec(e);if(!t)return;const i=B5(t[1]);if(!(i.length<3||i.length>4))return{r:wa(i[0],255),g:wa(i[1],255),b:wa(i[2],255),a:i.length>3?wa(i[3],1):1}},_hex8ColorToRGBA(e){if(e.length===9&&Qd.test(e))return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if(e.length===7&&Qd.test(e))return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if(e.length===5&&Qd.test(e))return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if(e.length===4&&Qd.test(e))return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){const t=/^hsla?\(([^)]*)\)$/i.exec(e);if(!t)return;const i=B5(t[1]);if(i.length<3||i.length>4)return;const r=Ej.exec(i[0]);if(!r)return;const a=r[2],l=Number(r[1])*(a?Tj[a.toLowerCase()]:1);if(!isFinite(l))return;const c=(l%360+360)%360/360,d=G5(wa(i[1],100)/100),h=G5(wa(i[2],100)/100),p=i.length>3?wa(i[3],1):1,m=h<.5?h*(1+d):h+d-h*d,v=2*h-m,b=[0,0,0];for(let y=0;y<3;y++){let x=c+.3333333333333333*-(y-1);x<0&&x++,x>1&&x--;let _;6*x<1?_=v+(m-v)*6*x:2*x<1?_=m:3*x<2?_=v+(m-v)*(2/3-x)*6:_=v,b[y]=_*255}return{r:Math.round(b[0]),g:Math.round(b[1]),b:Math.round(b[2]),a:p}},_getPointsRect(e){let t=1/0,i=1/0,r=-1/0,a=-1/0;for(let l=0;l<e.length;l+=2){const c=e[l],d=e[l+1];isNaN(c)||(t=Math.min(t,c),r=Math.max(r,c)),isNaN(d)||(i=Math.min(i,d),a=Math.max(a,d))}return isFinite(t+i)?{x:t,y:i,width:r-t,height:a-i}:{x:0,y:0,width:0,height:0}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){const t={};for(const i in e)t[i]=F._cloneValue(e[i]);return t},_cloneValue(e){return F._isArray(e)?e.some(t=>typeof t=="object")?e.map(F._cloneValue):e.slice():F._isPlainObject(e)?F.cloneObject(e):e instanceof G6?e.slice():e},cloneArray(e){return e.slice(0)},degToRad(e){return e*vj},radToDeg(e){return e*B6},_getRotation(e){return pe.angleDeg?F.radToDeg(e):e},_capitalize(e){const t=j5.get(e);if(t!==void 0)return t;const i=e.charAt(0).toUpperCase()+e.slice(1);return j5.set(e,i),i},throw(e){throw new Error(L5+e)},error(e){console.error(L5+e)},warn(e){pe.showWarnings&&console.warn(xj+e)},_batchEvents(e,t){if(!e)return t();let i=!1,r=!0;try{e(()=>{if(i||!r){F.warn("eventBatchFunc must call its argument exactly once, synchronously.");return}i=!0,t()})}finally{r=!1,i||F.warn("eventBatchFunc must call its argument synchronously.")}},each(e,t){for(const i in e)t(i,e[i])},_inRange(e,t,i){return t<=e&&e<i},_getProjectionToSegment(e,t,i,r,a,l){let c,d,h;const p=(e-i)*(e-i)+(t-r)*(t-r);if(p==0)c=e,d=t,h=(a-i)*(a-i)+(l-r)*(l-r);else{const m=((a-e)*(i-e)+(l-t)*(r-t))/p;m<0?(c=e,d=t,h=(e-a)*(e-a)+(t-l)*(t-l)):m>1?(c=i,d=r,h=(i-a)*(i-a)+(r-l)*(r-l)):(c=e+m*(i-e),d=t+m*(r-t),h=(c-a)*(c-a)+(d-l)*(d-l))}return[c,d,h]},_getProjectionToLine(e,t,i){const r=F.cloneObject(e);let a=Number.MAX_VALUE;return t.forEach(function(l,c){if(!i&&c===t.length-1)return;const d=t[(c+1)%t.length],h=F._getProjectionToSegment(l.x,l.y,d.x,d.y,e.x,e.y),p=h[0],m=h[1],v=h[2];v<a&&(r.x=p,r.y=m,a=v)}),r},_prepareArrayForTween(e,t,i){const r=[],a=[];if(e.length>t.length){const c=t;t=e,e=c}for(let c=0;c<e.length;c+=2)r.push({x:e[c],y:e[c+1]});for(let c=0;c<t.length;c+=2)a.push({x:t[c],y:t[c+1]});const l=[];return a.forEach(function(c){const d=F._getProjectionToLine(c,r,i);l.push(d.x),l.push(d.y)}),l},_prepareToStringify(e,t=new Set){const i=F._isArray(e)?[]:{};t.add(e);for(const r of Object.keys(e)){const a=e[r];F._isElement(a)||t.has(a)||(i[r]=F._isPlainObject(a)||F._isArray(a)?F._prepareToStringify(a,t):a)}return t.delete(e),i},_assign(e,t){for(const i in t)e[i]=t[i];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas(...e){pe.releaseCanvasOnDestroy&&e.forEach(t=>{t.width=0,t.height=0})},_cornerRadii(e,t,i){const r=Math.min(t,i)/2;if(typeof e=="number"){const a=yc(e,r);return[a,a,a,a]}return[yc(e[0],r),yc(e[1],r),yc(e[2],r),yc(e[3],r)]},drawRoundedRectPath(e,t,i,r){let a=t<0?t:0,l=i<0?i:0;t=Math.abs(t),i=Math.abs(i);const[c,d,h,p]=F._cornerRadii(r,t,i);e.moveTo(a+c,l),e.lineTo(a+t-d,l),e.arc(a+t-d,l+d,d,Math.PI*3/2,0,!1),e.lineTo(a+t,l+i-h),e.arc(a+t-h,l+i-h,h,0,Math.PI/2,!1),e.lineTo(a+p,l+i),e.arc(a+p,l+i-p,p,Math.PI/2,Math.PI,!1),e.lineTo(a,l+c),e.arc(a+c,l+c,c,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(e,t,i,r,a){r=Math.abs(r);for(let l=0;l<i;l++){const c=t[(l-1+i)%i],d=t[l],h=t[(l+1)%i],p={x:d.x-c.x,y:d.y-c.y},m={x:h.x-d.x,y:h.y-d.y},v=Math.hypot(p.x,p.y),b=Math.hypot(m.x,m.y);let y;typeof a=="number"?y=a:y=l<a.length?a[l]:0,y=r*Math.cos(Math.PI/i)*Math.min(1,y/r*2);const _={x:p.x/v,y:p.y/v},w={x:m.x/b,y:m.y/b},C={x:d.x-_.x*y,y:d.y-_.y*y},R={x:d.x+w.x*y,y:d.y+w.y*y};l===0?e.moveTo(C.x,C.y):e.lineTo(C.x,C.y),e.arcTo(d.x,d.y,R.x,R.y,y)}}};function kj(e){const t=[],i=e.length,r=F;for(let a=0;a<i;a++){let l=e[a];r._isNumber(l)?l=Math.round(l*1e3)/1e3:r._isString(l)||(l=l+""),t.push(l)}return t}const zj=",",Rj="(",Aj=")",Oj=";",Nj="()",Ij="=",V5=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],Pj=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],Mj=100;let xc=null;function Dj(){if(xc!==null)return xc;try{const e=F.createCanvasElement(),t=e.getContext("2d");xc=!!t&&"filter"in t,F.releaseCanvas(e)}catch{xc=!1}return xc}class zh{constructor(t){this.canvas=t,pe.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,i){let r=this.traceArr,a=r.length,l="",c,d,h,p;for(c=0;c<a;c++)d=r[c],h=d.method,h?(p=d.args,l+=h,t?l+=Nj:(i&&(p=p.map(m=>typeof m=="number"?Math.floor(m):m)),l+=Rj+p.join(zj)+Aj)):(l+=d.property,t||(l+=Ij+d.val)),l+=Oj;return l}clearTrace(){this.traceArr=[]}_trace(t){let i=this.traceArr,r;i.push(t),r=i.length,r>=Mj&&i.shift()}reset(){const t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){const i=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,i.getWidth()/i.pixelRatio,i.getHeight()/i.pixelRatio)}_applyLineCap(t){const i=t.attrs.lineCap;i&&this.setAttr("lineCap",i)}_applyOpacity(t){const i=t.getAbsoluteOpacity();i!==1&&this.setAttr("globalAlpha",i)}_applyLineJoin(t){const i=t.attrs.lineJoin;i&&this.setAttr("lineJoin",i)}_applyMiterLimit(t){const i=t.attrs.miterLimit;i!=null&&this.setAttr("miterLimit",i)}setAttr(t,i){this._context[t]=i}arc(t,i,r,a,l,c){this._context.arc(t,i,r,a,l,c)}arcTo(t,i,r,a,l){this._context.arcTo(t,i,r,a,l)}beginPath(){this._context.beginPath()}bezierCurveTo(t,i,r,a,l,c){this._context.bezierCurveTo(t,i,r,a,l,c)}clearRect(t,i,r,a){this._context.clearRect(t,i,r,a)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,i){const r=arguments;if(r.length===2)return this._context.createImageData(t,i);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,i,r,a){return this._context.createLinearGradient(t,i,r,a)}createPattern(t,i){return this._context.createPattern(t,i)}createRadialGradient(t,i,r,a,l,c){return this._context.createRadialGradient(t,i,r,a,l,c)}drawImage(t,i,r,a,l,c,d,h,p){const m=arguments,v=this._context;m.length===3?v.drawImage(t,i,r):m.length===5?v.drawImage(t,i,r,a,l):m.length===9&&v.drawImage(t,i,r,a,l,c,d,h,p)}ellipse(t,i,r,a,l,c,d,h){this._context.ellipse(t,i,r,a,l,c,d,h)}isPointInPath(t,i,r,a){return r?this._context.isPointInPath(r,t,i,a):this._context.isPointInPath(t,i,a)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,i,r,a){this._context.fillRect(t,i,r,a)}strokeRect(t,i,r,a){this._context.strokeRect(t,i,r,a)}fillText(t,i,r,a){a?this._context.fillText(t,i,r,a):this._context.fillText(t,i,r)}measureText(t){return this._context.measureText(t)}getImageData(t,i,r,a){return this._context.getImageData(t,i,r,a)}lineTo(t,i){this._context.lineTo(t,i)}moveTo(t,i){this._context.moveTo(t,i)}rect(t,i,r,a){this._context.rect(t,i,r,a)}roundRect(t,i,r,a,l){this._context.roundRect(t,i,r,a,l)}putImageData(t,i,r){this._context.putImageData(t,i,r)}quadraticCurveTo(t,i,r,a){this._context.quadraticCurveTo(t,i,r,a)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,i){this._context.scale(t,i)}setLineDash(t){this._context.setLineDash(t)}getLineDash(){return this._context.getLineDash()}setTransform(t,i,r,a,l,c){this._context.setTransform(t,i,r,a,l,c)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,i,r,a){this._context.strokeText(t,i,r,a)}transform(t,i,r,a,l,c){this._context.transform(t,i,r,a,l,c)}translate(t,i){this._context.translate(t,i)}_enableTrace(){let t=this,i=V5.length,r=this.setAttr,a,l;const c=function(d){let h=t[d],p;t[d]=function(){return l=kj(Array.prototype.slice.call(arguments,0)),p=h.apply(t,arguments),t._trace({method:d,args:l}),p}};for(a=0;a<i;a++)c(V5[a]);t.setAttr=function(){r.apply(t,arguments);const d=arguments[0];let h=arguments[1];(d==="shadowOffsetX"||d==="shadowOffsetY"||d==="shadowBlur")&&(h=h/this.canvas.getPixelRatio()),t._trace({property:d,val:h})}}_applyGlobalCompositeOperation(t){const i=t.attrs.globalCompositeOperation;!i||i==="source-over"||this.setAttr("globalCompositeOperation",i)}}Pj.forEach(function(e){Object.defineProperty(zh.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class Lj extends zh{constructor(t,{willReadFrequently:i=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:i})}_fillColor(t){const i=t.fill();this.setAttr("fillStyle",i),t._fillFunc(this)}_fillPattern(t){const i=this._context;"patternQuality"in i&&(i.patternQuality=i.imageSmoothingEnabled?"good":"nearest"),this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){const i=t._getLinearGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fillRadialGradient(t){const i=t._getRadialGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fill(t){const i=t.fill(),r=t.getFillPriority();if(i&&r==="color"){this._fillColor(t);return}const a=t.getFillPatternImage();if(a&&r==="pattern"){this._fillPattern(t);return}const l=t.getFillLinearGradientColorStops();if(l&&r==="linear-gradient"){this._fillLinearGradient(t);return}const c=t.getFillRadialGradientColorStops();if(c&&r==="radial-gradient"){this._fillRadialGradient(t);return}i?this._fillColor(t):a?this._fillPattern(t):l?this._fillLinearGradient(t):c&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const i=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),a=t.getStrokeLinearGradientColorStops(),l=this.createLinearGradient(i.x,i.y,r.x,r.y);if(a){for(let c=0;c<a.length;c+=2)l.addColorStop(a[c],a[c+1]);this.setAttr("strokeStyle",l)}}_stroke(t){const i=t.dash(),r=t.getStrokeScaleEnabled();if(!r){this.save();const l=this.getCanvas().getPixelRatio();this.setTransform(l,0,0,l,0,0)}this._applyLineCap(t),i&&t.dashEnabled()&&(this.setLineDash(i),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}_applyShadow(t){var i;const r=(i=t.getShadowRGBA())!==null&&i!==void 0?i:"black",a=t.getShadowBlur(),l=t.getShadowOffset(),c=t.getAbsoluteScale(),d=this.canvas.getPixelRatio(),h=c.x*d,p=c.y*d;this.setAttr("shadowColor",r),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(p))),this.setAttr("shadowOffsetX",l.x*h),this.setAttr("shadowOffsetY",l.y*p)}}class jj extends zh{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){const i=t.getStrokeScaleEnabled();if(!i){this.save();const l=this.getCanvas().getPixelRatio();this.setTransform(l,0,0,l,0,0)}this._applyLineCap(t);const r=t.hitStrokeWidth(),a=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",a),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}class tb{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this._logicalWidth=0,this._logicalHeight=0,this.isCache=!1,this.x=0,this.y=0;const r=(t||{}).pixelRatio||pe.pixelRatio||pe._global.devicePixelRatio||1;this.pixelRatio=r,this._canvas=F.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){this.pixelRatio=t,this.setSize(this._logicalWidth,this._logicalHeight)}setWidth(t){this.setSize(t,this._logicalHeight)}setHeight(t){this.setSize(this._logicalWidth,t)}getWidth(){return this.width}getHeight(){return this.height}_bitmapSize(t){return Math.floor((t||0)*this.pixelRatio)}setSize(t,i){(!isFinite(t??0)||!isFinite(i??0))&&(F.error(`Canvas size must be finite numbers, got ${t}x${i}. The canvas is left empty.`),t=i=0),t=t||0,i=i||0;const r=this.pixelRatio;this._logicalWidth=t,this._logicalHeight=i,this.width=this._canvas.width=this._bitmapSize(t),this.height=this._canvas.height=this._bitmapSize(i),this._canvas.style.width=t+"px",this._canvas.style.height=i+"px",this.getContext()._context.scale(r,r)}setSizeIfChanged(t,i){(this.width!==this._bitmapSize(t)||this.height!==this._bitmapSize(i))&&this.setSize(t,i)}toDataURL(t,i){try{return this._canvas.toDataURL(t,i)}catch{try{return this._canvas.toDataURL()}catch(a){return F.error("Unable to get data URL. "+a.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class Na extends tb{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new Lj(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}class nb extends tb{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new jj(this),this.setSize(t.width,t.height)}}const Ye={get isDragging(){let e=!1;return Ye._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){let e;return Ye._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_listenToWindow(e){const t=a=>Ye._endDragBefore(a,e),i=a=>Ye._batchEvents(()=>Ye._drag(a,e),e),r=a=>Ye._batchEvents(()=>Ye._endDragAfter(a));e.addEventListener("mouseup",t,!0),e.addEventListener("touchend",t,!0),e.addEventListener("touchcancel",t,!0),e.addEventListener("mousemove",i),e.addEventListener("touchmove",i),e.addEventListener("mouseup",r,!1),e.addEventListener("touchend",r,!1),e.addEventListener("touchcancel",r,!1)},_batchEvents(e,t){if(!Ye._dragElements.size)return;const i=new Set;for(const{node:a}of Ye._dragElements.values()){const l=a.getStage();if(!l||t&&l._getOwnerWindow()!==t)continue;const c=l.eventBatchFunc();c&&i.add(c)}let r=e;for(const a of i){const l=r;r=()=>F._batchEvents(a,l)}r()},_drag(e,t){const i=[],r=new Set;Ye._dragElements.forEach((a,l)=>{const{node:c}=a,d=c.getStage();if(t&&d._getOwnerWindow()!==t)return;r.has(d)||(d.setPointersPositions(e),r.add(d)),a.pointerId===void 0&&(a.pointerId=F._getFirstPointerId(e));const h=d._changedPointerPositions.find(p=>p.id===a.pointerId);if(h){if(a.dragStatus!=="dragging"){const p=c.dragDistance();if(Math.max(Math.abs(h.x-a.startPointerPos.x),Math.abs(h.y-a.startPointerPos.y))<p||(c.startDrag({evt:e}),!c.isDragging()))return}c._setDragPosition(e,a),i.push(c)}}),i.forEach(a=>{a.getStage()&&a.fire("dragmove",{type:"dragmove",target:a,evt:e},!0)})},_endDragBefore(e,t){const i=[],r=new Set;Ye._dragElements.forEach((a,l)=>{const{node:c}=a,d=c.getStage();if(e&&!r.has(d)&&(!t||d._getOwnerWindow()===t)&&(d.setPointersPositions(e),r.add(d)),!!(a.pointerId===void 0||d._changedPointerPositions.some(p=>p.id===a.pointerId)))if(a.dragStatus==="ready")Ye._dragElements.delete(l);else{Ye.justDragged=!0,pe._mouseListenClick=!1,pe._touchListenClick=!1,pe._pointerListenClick=!1,a.dragStatus="stopped";const p=a.node.getLayer()||a.node instanceof pe.Stage&&a.node;p&&i.indexOf(p)===-1&&i.push(p)}}),i.forEach(a=>{a.draw()})},_endDragAfter(e){Ye._dragElements.forEach((t,i)=>{t.dragStatus==="stopped"&&(t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&Ye._dragElements.delete(i))})}},Ks=new Map,H6=pe._global.PointerEvent!==void 0;function Vm(e){return Ks.get(e)}function F6(e){return{evt:e,pointerId:e.pointerId}}function $6(e,t){return Ks.get(e)===t}function U6(e,t){var i;Ys(e);const r=t.getStage();if(r&&(Ks.set(e,t),H6)){try{(i=r.content)===null||i===void 0||i.setPointerCapture(e)}catch{}t._fire("gotpointercapture",F6(new PointerEvent("gotpointercapture")))}}function Bj(e){Ks.forEach((t,i)=>{t===e&&Ys(i)})}function Ys(e,t){var i;const r=Ks.get(e);if(!r||t&&r!==t)return;const a=r.getStage();if(Ks.delete(e),H6){try{(i=a?.content)===null||i===void 0||i.releasePointerCapture(e)}catch{}r._fire("lostpointercapture",F6(new PointerEvent("lostpointercapture")))}}function $o(e){return F._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||F._isBoolean(e)?e:Object.prototype.toString.call(e)}function ib(e){return e>255?255:e<0?0:Math.round(e)}function he(){if(pe.isUnminified)return function(e,t){return F._isNumber(e)||F.warn($o(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function Rh(e){if(pe.isUnminified)return function(t,i){let r=F._isNumber(t),a=F._isArray(t)&&t.length==e;return!r&&!a&&F.warn($o(t)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function rb(){if(pe.isUnminified)return function(e,t){return F._isNumber(e)||e==="auto"||F.warn($o(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function La(){if(pe.isUnminified)return function(e,t){return F._isString(e)||F.warn($o(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function W6(){if(pe.isUnminified)return function(e,t){const i=F._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return i||r||F.warn($o(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function Gj(){if(pe.isUnminified)return function(e,t){return e instanceof G6||(F._isArray(e)?e.forEach(function(i){F._isNumber(i)||F.warn('"'+t+'" attribute has non numeric element '+i+". Make sure that all elements are numbers.")}):F.warn($o(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function vr(){if(pe.isUnminified)return function(e,t){return e===!0||e===!1||F.warn($o(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function Vj(e){if(pe.isUnminified)return function(t,i){return t==null||F.isObject(t)||F.warn($o(t)+' is a not valid value for "'+i+'" attribute. The value should be an object with properties '+e),t}}const Sc="get",_c="set",B={addGetterSetter(e,t,i,r,a){B.addGetter(e,t,i),B.addSetter(e,t,r,a),B.addOverloadedGetterSetter(e,t)},addGetter(e,t,i){const r=Sc+F._capitalize(t);e.prototype[r]=e.prototype[r]||function(){const a=this.attrs[t];return a===void 0?i:a}},addSetter(e,t,i,r){const a=_c+F._capitalize(t);e.prototype[a]||B.overWriteSetter(e,t,i,r)},overWriteSetter(e,t,i,r){const a=_c+F._capitalize(t);e.prototype[a]=function(l){return i&&l!==void 0&&l!==null&&(l=i.call(this,l,t)),this._setAttr(t,l),r&&r.call(this),this}},addComponentsGetterSetter(e,t,i,r,a){const l=i.length,c=F._capitalize,d=Sc+c(t),h=_c+c(t),p=i.map(b=>t+c(b)),m=p.map(b=>Sc+c(b));e.prototype[d]=function(){const b={};for(let y=0;y<l;y++){const x=this[m[y]];b[i[y]]=x?x.call(this):this.attrs[p[y]]}return b};const v=Vj(i);e.prototype[h]=function(b){const y=this.attrs[t];r&&(b=r.call(this,b,t)),v&&v.call(this,b,t);for(const x in b)b.hasOwnProperty(x)&&this._setAttr(t+c(x),b[x]);return b||i.forEach(x=>{this._setAttr(t+c(x),void 0)}),this._fireChangeEvent(t,y,b),a&&a.call(this),this},B.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){const i=F._capitalize(t),r=_c+i,a=Sc+i,l=function(){return arguments.length?(this[r](arguments[0]),this):this[a]()};l._isAttrAccessor=!0,e.prototype[t]=l},backCompat(e,t){F.each(t,function(i,r){const a=e.prototype[r],l=Sc+F._capitalize(i),c=_c+F._capitalize(i);function d(){return F.error('"'+i+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.'),a.apply(this,arguments)}e.prototype[i]=d,e.prototype[l]=d,e.prototype[c]=d})},afterSetFilter(){this._filterUpToDate=!1}};function Hj(e){const t=/(\w+)\(([^)]+)\)/g;let i;for(;(i=t.exec(e))!==null;){const[,r,a]=i;switch(r){case"blur":{const l=parseFloat(a.replace("px",""));return function(c){this.blurRadius(l*.5);const d=pe.Filters;d&&d.Blur&&d.Blur.call(this,c)}}case"brightness":{const l=a.includes("%")?parseFloat(a)/100:parseFloat(a);return function(c){this.brightness(l);const d=pe.Filters;d&&d.Brightness&&d.Brightness.call(this,c)}}case"contrast":{const l=parseFloat(a);return function(c){const d=100*(Math.sqrt(l)-1);this.contrast(d);const h=pe.Filters;h&&h.Contrast&&h.Contrast.call(this,c)}}case"grayscale":return function(l){const c=pe.Filters;c&&c.Grayscale&&c.Grayscale.call(this,l)};case"sepia":return function(l){const c=pe.Filters;c&&c.Sepia&&c.Sepia.call(this,l)};case"invert":return function(l){const c=pe.Filters;c&&c.Invert&&c.Invert.call(this,l)};default:F.warn(`CSS filter "${r}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const Oc="absoluteOpacity",Br="absoluteTransform",Fj="Change",$j="children",Uj="konva",U0="listening",Wj="mouseenter",Yj="mouseleave",qj="pointerenter",Xj="pointerleave",Zj="touchenter",Kj="touchleave",Qj=[Wj,Yj,qj,Xj,Zj,Kj],H5="set",F5="Shape",W0=" ",$5="stage",zo="transform",Jj="Stage",Y0="visible",eB=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(W0);let tB=1;function U5(e,t,i){const r=new Na({width:0,height:0,pixelRatio:e.pixelRatio});return r.x=t,r.y=i,r}let me=class Ro{constructor(t){this._id=tB++,this.eventListeners={},this.attrs={},this.index=0,this.parent=null,this._cache={},this._canvasCache=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===zo||t===Br)&&this._cache[t]?this._cache[t].dirty=!0:t?this._cache[t]=void 0:(this._cache={},this._attrsVersion!==void 0&&this._attrsVersion++)}_releaseCanvasCache(){const t=this._canvasCache;t&&(F.releaseCanvas(t.scene._canvas,t.filter._canvas,...t.hit?[t.hit._canvas]:[]),this._canvasCache=null)}_getCache(t,i){let r=this._cache[t];return(r===void 0||(t===zo||t===Br)&&r.dirty===!0)&&(r=i.call(this),this._cache[t]=r),r}_getCanvasCache(){return this._canvasCache}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Br&&this.fire("absoluteTransformChange")}static _runAfterAbsTransformCascade(t){Ro._absTransformCascadeDepth>0?Ro._pendingAfterCascade.push(t):t()}clearCache(){return this._releaseCanvasCache(),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){const i=t||{};let r={};(i.x===void 0||i.y===void 0||i.width===void 0||i.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let a=Math.ceil(i.width||r.width),l=Math.ceil(i.height||r.height),c=i.pixelRatio,d=i.x===void 0?Math.floor(r.x):i.x,h=i.y===void 0?Math.floor(r.y):i.y,p=i.offset||0,m=i.drawBorder||!1,v=i.hitCanvasPixelRatio||1;if(!a||!l||!isFinite(d+h+a+l))return F.error(`Can not cache the node. Its size is 0 or its bounds are not finite numbers (${d}, ${h}, ${a}x${l}). Caching is skipped.`),this;const b=Math.abs(Math.round(r.x)-d)>.5?1:0,y=Math.abs(Math.round(r.y)-h)>.5?1:0;a+=p*2+b,l+=p*2+y,d-=p,h-=p;const x=new Na({pixelRatio:c,width:a,height:l}),_=new Na({pixelRatio:c,width:0,height:0,willReadFrequently:!0}),w=x.getContext(),C=U5(x,d,h);x.isCache=!0,this._releaseCanvasCache(),this._filterUpToDate=!1,i.imageSmoothingEnabled===!1&&(x.getContext()._context.imageSmoothingEnabled=!1,_.getContext()._context.imageSmoothingEnabled=!1),w.save(),w.translate(-d,-h),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Oc);try{this.drawScene(x,this,C)}catch(R){throw F.releaseCanvas(x._canvas),R}finally{this._isUnderCache=!1,this._clearSelfAndDescendantCache(Oc),w.restore(),F.releaseCanvas(C._canvas)}return m&&(w.save(),w.beginPath(),w.rect(0,0,a,l),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._canvasCache={scene:x,filter:_,hit:null,hitConfig:{pixelRatio:v,width:a,height:l},x:d,y:h},this._requestDraw(),this}_getCachedHitCanvas(t){if(t===this)return null;const i=this._getCanvasCache();if(!i)return null;if(i.hit)return i.hit;const r=new nb(i.hitConfig);r.isCache=!0;const a=r.getContext();return a.save(),a.translate(-i.x,-i.y),this.drawHit(r,this),a.restore(),i.hit=r,r}isCached(){return!!this._canvasCache}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,i){const r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];let a=1/0,l=1/0,c=-1/0,d=-1/0;const h=this.getAbsoluteTransform(i);return r.forEach(function(p){const m=h.point(p);a=Math.min(a,m.x),l=Math.min(l,m.y),c=Math.max(c,m.x),d=Math.max(d,m.y)}),{x:a,y:l,width:c-a,height:d-l}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const i=this._getCanvasCache();t.translate(i.x,i.y);const r=this._getCachedSceneCanvas(),a=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/a,r.height/a),t.restore()}_drawCachedHitCanvas(t,i){const r=this._getCanvasCache();t.save(),t.translate(r.x,r.y),t.drawImage(i._canvas,0,0,i.width/i.pixelRatio,i.height/i.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),i=this._getCanvasCache(),r=i.scene,a=i.filter,l=a.getContext(),c,d,h,p;if(!t||t.length===0)return r;if(this._filterUpToDate)return a;let m=!0;for(let b=0;b<t.length;b++)if(typeof t[b]!="string"||!Dj()){m=!1;break}const v=r.pixelRatio;if(a.setSizeIfChanged(r._logicalWidth,r._logicalHeight),m){const b=t.join(" ");return l.clear(),l.save(),l.setAttr("filter",b),l.drawImage(r._canvas,0,0,r.getWidth()/v,r.getHeight()/v),l.restore(),this._filterUpToDate=!0,a}try{for(c=t.length,l.clear(),l.drawImage(r._canvas,0,0,r.getWidth()/v,r.getHeight()/v),d=l.getImageData(0,0,a.getWidth(),a.getHeight()),h=0;h<c;h++)p=t[h],typeof p=="string"&&(p=Hj(p)),p.call(this,d);l.putImageData(d,0,0)}catch(b){F.error("Unable to apply filter. "+b.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,a}on(...t){this._prepareListeners();const i=t[0],r=t[1];if(t[2],t.length===3)return this._delegate.apply(this,t);const a=i.split(W0);for(let l=0;l<a.length;l++){const d=a[l].split("."),h=d[0],p=d[1]||"";this.eventListeners[h]||(this.eventListeners[h]=[]),this.eventListeners[h].push({name:p,handler:r})}return this}_prepareListeners(){this===this.constructor.prototype&&(this.hasOwnProperty("eventListeners")||(this.eventListeners={}),Ro.protoListenerMap=new WeakMap)}off(t,i){this._prepareListeners();let r=(t||"").split(W0),a=r.length,l,c,d,h,p,m;if(!t)for(c in this.eventListeners)this._off(c);for(l=0;l<a;l++)if(d=r[l],h=d.split("."),p=h[0],m=h[1],p)this.eventListeners[p]&&this._off(p,m,i);else for(c in this.eventListeners)this._off(c,m,i);return this}dispatchEvent(t){const i={target:this,type:t.type,evt:t};return this.fire(t.type,i),this}addEventListener(t,i){return this.on(t,function(r){i.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,i,r){const a=this;return this.on(t,function(l){const c=l.target.findAncestors(i,!0,a);for(let d=0;d<c.length;d++)l=F.cloneObject(l),l.currentTarget=c[d],r.call(c[d],l)}),this}remove(){return this.isDragging()&&this.stopDrag(),Ye._dragElements.delete(this._id),Ye._dragElements.forEach((t,i)=>{this.isAncestorOf(t.node)&&Ye._dragElements.delete(i)}),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Br),this._clearSelfAndDescendantCache(Oc),this._clearSelfAndDescendantCache($5),this._clearSelfAndDescendantCache(Y0),this._clearSelfAndDescendantCache(U0)}_remove(){this._clearCaches();const t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this._fire("destroy",{target:this}),Bj(this),this.remove(),this.clearCache(),this}getAttr(t){const i="get"+F._capitalize(t);return F._isFunction(this[i])?this[i]():this.attrs[t]}getAncestors(){let t=this.getParent(),i=[];for(;t;)i.push(t),t=t.getParent();return i}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let i,r;if(!t)return this;for(i in t)i!==$j&&(r=H5+F._capitalize(i),F._isFunction(this[r])?this[r](t[i]):this._setAttr(i,t[i]))}),this}isListening(){return this._getCache(U0,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(Y0,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t){return t?this._isVisible(t)&&this._isListening(t):this.isListening()&&this.isVisible()}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),i=this,r=0,a,l,c,d;function h(m){for(a=[],l=m.length,c=0;c<l;c++)d=m[c],r++,d.nodeType!==F5&&(a=a.concat(d.children)),d._id===i._id&&(c=l);a.length>0&&a[0].getDepth()<=t&&h(a)}const p=this.getStage();return i.nodeType!==Jj&&p&&h(p.children),r}getDepth(){let t=0,i=this.parent;for(;i;)t++,i=i.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0;try{t()}finally{this._batchingTransformChange=!1,this._needClearTransformCache&&(this._needClearTransformCache=!1,this._clearCache(zo),this._clearSelfAndDescendantCache(Br))}}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;const i=t.getPointerPosition();if(!i)return null;const r=this.getAbsoluteTransform().copy();return r.invert(),r.point(i)}getAbsolutePosition(t){const i=this.getAbsoluteTransform(t).getMatrix(),r=new li,a=this.offset();return r.m=i.slice(),r.translate(a.x,a.y),r.getTranslation()}setAbsolutePosition(t){const{x:i,y:r,...a}=this._clearTransform();this.attrs.x=i,this.attrs.y=r,this._clearCache(zo);const l=this._getAbsoluteTransform().copy(),c=l.isInvertible();l.invert(),l.translate(t.x,t.y);const{x:d,y:h}=l.getTranslation();return this._setTransform(a),c?this.setPosition({x:this.attrs.x+d,y:this.attrs.y+h}):F.warn("Cannot set the absolute position: the absolute transform is not invertible (an ancestor has a zero scale)."),this._clearCache(zo),this._clearSelfAndDescendantCache(Br),this}_setTransform(t){let i;for(i in t)this.attrs[i]=t[i]}_clearTransform(){const t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let i=t.x,r=t.y,a=this.x(),l=this.y();return i!==void 0&&(a+=i),r!==void 0&&(l+=r),this.setPosition({x:a,y:l}),this}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return F.warn("Node has no parent. moveToTop function is ignored."),!1;const t=this.index,i=this.parent.children.length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return F.warn("Node has no parent. moveUp function is ignored."),!1;const t=this.index,i=this.parent.children.length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return F.warn("Node has no parent. moveDown function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return F.warn("Node has no parent. moveToBottom function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return F.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&F.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Oc,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity();const i=this.getParent();return i&&!i._isUnderCache&&(t*=i.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t;let i=this.getAttrs(),r,a,l,c,d;const h={attrs:{},className:this.getClassName()};for(r in i)a=i[r],d=F.isObject(a)&&!F._isPlainObject(a)&&!F._isArray(a),!d&&(l=((t=this[r])===null||t===void 0?void 0:t._isAttrAccessor)&&this[r],delete i[r],c=l?l.call(this):null,i[r]=a,c!==a&&(h.attrs[r]=F.isObject(a)?F._prepareToStringify(a):a));return h}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,i,r){const a=[];i&&this._isMatch(t)&&a.push(this);let l=this.parent;for(;l;){if(l===r)return a;l._isMatch(t)&&a.push(l),l=l.parent}return a}isAncestorOf(t){return!1}findAncestor(t,i,r){return this.findAncestors(t,i,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);let i=t.replace(/ /g,"").split(","),r=i.length,a,l;for(a=0;a<r;a++)if(l=i[a],F.isValidSelector(l)||(F.warn('Selector "'+l+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),F.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),F.warn("Konva is awesome, right?")),l.charAt(0)==="#"){if(this.id()===l.slice(1))return!0}else if(l.charAt(0)==="."){if(this.hasName(l.slice(1)))return!0}else if(this.className===l||this.nodeType===l)return!0;return!1}getLayer(){const t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache($5,this._getStage)}_getStage(){const t=this.getParent();return t?t.getStage():null}fire(t,i,r){return i=i||{},i.target=i.target||this,r?this._fireAndBubble(t,i):this._fire(t,i),this}getAbsoluteTransform(t){return t||this._hasCachedAncestor()?this._getAbsoluteTransform(t):this._getCache(Br,this._getCachedAbsoluteTransform)}_hasCachedAncestor(){let t=this.parent;for(;t;){if(t.isCached())return!0;t=t.parent}return!1}_getAbsoluteTransform(t){const i=new li;return this===t?i:(this.parent&&this.parent!==t&&this.parent.getAbsoluteTransform(t).copyInto(i),this._multiplyOwnTransform(i))}_getCachedAbsoluteTransform(){const t=this._cache[Br]||new li;return this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset(),this._multiplyOwnTransform(t),t.dirty=!1,t}_multiplyOwnTransform(t){const i=this.transformsEnabled();if(i==="all")t.multiply(this.getTransform());else if(i==="position"){const r=this.attrs.x||0,a=this.attrs.y||0,l=this.attrs.offsetX||0,c=this.attrs.offsetY||0;t.translate(r-l,a-c)}return t}getAbsoluteScale(t){let i=this;for(;i;)i._isUnderCache&&(t=i),i=i.getParent();const a=this.getAbsoluteTransform(t).decompose();return{x:a.scaleX,y:a.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(zo,this._getTransform)}_getTransform(){var t,i;const r=this._cache[zo]||new li;r.reset();const a=this.x(),l=this.y(),c=pe.getAngle(this.rotation()),d=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,h=(i=this.attrs.scaleY)!==null&&i!==void 0?i:1,p=this.attrs.skewX||0,m=this.attrs.skewY||0,v=this.attrs.offsetX||0,b=this.attrs.offsetY||0;return(a!==0||l!==0)&&r.translate(a,l),c!==0&&r.rotate(c),(p!==0||m!==0)&&r.skew(p,m),(d!==1||h!==1)&&r.scale(d,h),(v!==0||b!==0)&&r.translate(-1*v,-1*b),r.dirty=!1,r}clone(t){let i=F.cloneObject(this.attrs),r,a,l,c,d;for(r in t)i[r]=t[r];const h=new this.constructor(i);for(r in this.eventListeners)for(a=this.eventListeners[r],l=a.length,c=0;c<l;c++)d=a[c],d.name.indexOf(Uj)<0&&(h.eventListeners[r]||(h.eventListeners[r]=[]),h.eventListeners[r].push(d));return h}_toKonvaCanvas(t){t=t||{};const r=t.x===void 0||t.y===void 0||!t.width||!t.height?this.getClientRect():{x:0,y:0,width:0,height:0};isFinite(r.x+r.y+r.width+r.height)||F.error(`Cannot find the bounds of the node to export, its client rect is ${r.x}, ${r.y}, ${r.width}x${r.height}. Check its position, size and points.`);const a=this.getStage(),l=t.x!==void 0?t.x:Math.floor(r.x),c=t.y!==void 0?t.y:Math.floor(r.y),d=t.pixelRatio||1,h=new Na({width:t.width||Math.ceil(r.width)||(a?a.width():0),height:t.height||Math.ceil(r.height)||(a?a.height():0),pixelRatio:d}),p=h.getContext(),m=U5(h,l,c);return t.imageSmoothingEnabled===!1&&(p._context.imageSmoothingEnabled=!1),p.save(),(l||c)&&p.translate(-1*l,-1*c),this.drawScene(h,void 0,m),p.restore(),F.releaseCanvas(m._canvas),h}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};const i=t.mimeType||null,r=t.quality||null,a=this._toKonvaCanvas(t).toDataURL(i,r);return t.callback&&t.callback(a),a}toImage(t){return new Promise((i,r)=>{try{const a=t?.callback;a&&delete t.callback,F._urlToImage(this.toDataURL(t),function(l){i(l),a?.(l)})}catch(a){r(a)}})}toBlob(t){return new Promise((i,r)=>{try{const a=t?.callback;a&&delete t.callback,this.toCanvas(t).toBlob(l=>{if(!l){r(new Error("Konva: toBlob() failed, the canvas was not encoded"));return}i(l),a?.(l)},t?.mimeType,t?.quality)}catch(a){r(a)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():pe.dragDistance}_off(t,i,r){let a=this.eventListeners[t],l,c,d;for(l=0;l<a.length;l++)if(c=a[l].name,d=a[l].handler,(c!=="konva"||i==="konva")&&(!i||c===i)&&(!r||r===d)){if(a.splice(l,1),a.length===0){delete this.eventListeners[t];break}l--}}_fireChangeEvent(t,i,r){this._fire(t+Fj,{oldVal:i,newVal:r})}addName(t){if(!this.hasName(t)){const i=this.name(),r=i?i+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const i=this.name();return i?(i||"").split(/\s/g).indexOf(t)!==-1:!1}removeName(t){const i=(this.name()||"").split(/\s/g),r=i.indexOf(t);return r!==-1&&(i.splice(r,1),this.name(i.join(" "))),this}setAttr(t,i){const r=this[H5+F._capitalize(t)];return F._isFunction(r)?r.call(this,i):this._setAttr(t,i),this}_requestDraw(){if(pe.autoDrawEnabled){const t=this.getLayer()||this.getStage();t?.batchDraw()}}_setAttr(t,i){const r=this.attrs[t];r===i&&!F.isObject(i)||(i==null?delete this.attrs[t]:this.attrs[t]=i,this._attrsVersion!==void 0&&this._attrsVersion++,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,i),this._requestDraw())}_fireAndBubble(t,i,r){i&&this.nodeType===F5&&(i.target=this);const a=Qj.indexOf(t)!==-1;if(!(a&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r))){this._fire(t,i);const c=a&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(i&&!i.cancelBubble||!i)&&this.parent&&this.parent.isListening()&&!c&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,i,r):this._fireAndBubble.call(this.parent,t,i))}}_getProtoListeners(t){var i,r;const a=Object.getPrototypeOf(this);let l=Ro.protoListenerMap.get(a);l||(l={},Ro.protoListenerMap.set(a,l));let c=l[t];if(c===void 0){c=[];const d=new Set;let h=Object.getPrototypeOf(this);for(;h;){const p=(r=(i=h.eventListeners)===null||i===void 0?void 0:i[t])!==null&&r!==void 0?r:[];for(let m=0;m<p.length;m++){const v=p[m];d.has(v)||(d.add(v),c.push(v))}h=Object.getPrototypeOf(h)}l[t]=c}return c}_fire(t,i){i=i||{},i.currentTarget=this,i.type=t;const r=this._getProtoListeners(t);if(r)for(let l=0;l<r.length;l++)r[l].handler.call(this,i);const a=this.eventListeners[t];if(a){const l=a.slice(),c=l.length;for(let h=0;h<l.length;h++)l[h].handler.call(this,i);const d=this.eventListeners[t];if(d)for(let h=c;h<d.length;h++)d[h].handler.call(this,i)}}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){const i=t?t.pointerId:void 0,r=this.getStage(),a=this.getAbsolutePosition();if(!r)return;const l=r._getPointerById(i)||r._changedPointerPositions[0]||a;Ye._dragElements.set(this._id,{node:this,startPointerPos:l,offset:{x:l.x-a.x,y:l.y-a.y},dragStatus:"ready",pointerId:i,startEvent:t})}startDrag(t,i=!0){Ye._dragElements.has(this._id)||this._createDragElement(t);const r=Ye._dragElements.get(this._id);r&&(r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:r.startEvent&&r.startEvent.evt||t&&t.evt},i))}_setDragPosition(t,i){const r=this.getStage()._getPointerById(i.pointerId);if(!r)return;let a={x:r.x-i.offset.x,y:r.y-i.offset.y};const l=this.dragBoundFunc();if(l!==void 0){const d=l.call(this,a,t);if(!d)F.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.");else if(!F._isNumber(d.x)||!F._isNumber(d.y)){F.warn(`dragBoundFunc returned a position with a non-finite x or y (${d.x}, ${d.y}). The node was not moved.`);return}else a=d}const c=i.lastPos;(!c||c.x!==a.x||c.y!==a.y)&&(this.setAbsolutePosition(a),this._requestDraw()),i.lastPos=a}stopDrag(t){const i=Ye._dragElements.get(this._id);i&&(i.dragStatus="stopped"),Ye._endDragBefore(t),Ye._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Ye._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(!(t.evt.button!==void 0)||pe.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let a=!1;Ye._dragElements.forEach(l=>{this.isAncestorOf(l.node)&&(a=!0)}),a||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const i=Ye._dragElements.get(this._id),r=i&&i.dragStatus==="dragging",a=i&&i.dragStatus==="ready";r?this.stopDrag():a&&Ye._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const i=this.getStage();if(!i)return!1;const r={x:-t.x,y:-t.y,width:i.width()+2*t.x,height:i.height()+2*t.y};return F.haveIntersection(r,this.getClientRect())}static create(t,i){return F._isString(t)&&(t=JSON.parse(t)),this._createNode(t,i)}static _createNode(t,i){let r=Ro.prototype.getClassName.call(t),a=t.children,l,c,d;i&&(t.attrs.container=i),pe[r]||(F.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const h=pe[r];if(l=new h(t.attrs),a)for(c=a.length,d=0;d<c;d++)l.add(Ro._createNode(a[d]));return l}};me._absTransformCascadeDepth=0;me._pendingAfterCascade=[];me.protoListenerMap=new WeakMap;me.prototype.nodeType="Node";me.prototype._attrsAffectingSize=[];me.prototype.on(eB,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(zo),this._clearSelfAndDescendantCache(Br)});me.prototype.on("visibleChange.konva",function(){this._clearSelfAndDescendantCache(Y0)});me.prototype.on("listeningChange.konva",function(){this._clearSelfAndDescendantCache(U0)});me.prototype.on("opacityChange.konva",function(){this._clearSelfAndDescendantCache(Oc)});const mt=B.addGetterSetter;mt(me,"zIndex");mt(me,"absolutePosition");mt(me,"position");mt(me,"x",0,he());mt(me,"y",0,he());mt(me,"globalCompositeOperation","source-over",La());mt(me,"opacity",1,he());mt(me,"name","",La());mt(me,"id","",La());mt(me,"rotation",0,he());B.addComponentsGetterSetter(me,"scale",["x","y"]);mt(me,"scaleX",1,he());mt(me,"scaleY",1,he());B.addComponentsGetterSetter(me,"skew",["x","y"]);mt(me,"skewX",0,he());mt(me,"skewY",0,he());B.addComponentsGetterSetter(me,"offset",["x","y"]);mt(me,"offsetX",0,he());mt(me,"offsetY",0,he());mt(me,"dragDistance",void 0,he());mt(me,"width",0,he());mt(me,"height",0,he());mt(me,"listening",!0,vr());mt(me,"preventDefault",!0,vr());mt(me,"filters",void 0,function(e){return this._filterUpToDate=!1,e});mt(me,"visible",!0,vr());mt(me,"transformsEnabled","all",La());mt(me,"size");mt(me,"dragBoundFunc");mt(me,"draggable",!1,vr());B.backCompat(me,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class ui extends me{constructor(){super(...arguments),this.children=[]}getChildren(t){const i=this.children||[];return t?i.filter(t):i.slice()}hasChildren(){return this.children.length>0}removeChildren(){return this.children.forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.children.forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(let r=0;r<t.length;r++)this.add(t[r]);return this}const i=t[0];return i.getParent()?(i.moveTo(this),this):(this._validateAdd(i),i.index=this.children.length,i.parent=this,i._clearCaches(),this.children.push(i),this._fire("add",{child:i}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){const i=this._generalFind(t,!0);return i.length>0?i[0]:void 0}_generalFind(t,i){const r=[];return this._descendants(a=>{const l=a._isMatch(t);return l&&r.push(a),!!(l&&i)}),r}_descendants(t){let i=!1;for(const r of this.children){if(i=t(r),i)return!0;if(r.hasChildren()&&(i=r._descendants(t),i))return!0}return!1}toObject(){const t=me.prototype.toObject.call(this);return t.children=[],this.children.forEach(i=>{t.children.push(i.toObject())}),t}isAncestorOf(t){let i=t.getParent();for(;i;){if(i._id===this._id)return!0;i=i.getParent()}return!1}clone(t){const i=me.prototype.clone.call(this,t);return this.children.forEach(function(r){i.add(r.clone())}),i}getAllIntersections(t){const i=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&i.push(r)}),i}_clearSelfAndDescendantCache(t){var i;const r=t==="absoluteTransform";r&&me._absTransformCascadeDepth++;try{if(super._clearSelfAndDescendantCache(t),r&&this.isCached())return;(i=this.children)===null||i===void 0||i.forEach(function(a){a._clearSelfAndDescendantCache(t)})}finally{if(r&&--me._absTransformCascadeDepth===0){const a=me._pendingAfterCascade;if(a.length){me._pendingAfterCascade=[];for(let l=0;l<a.length;l++)a[l]()}}}}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(i,r){i.index=r}),this._requestDraw()}drawScene(t,i,r){const a=this.getLayer(),l=t||a&&a.getCanvas(),c=l&&l.getContext(),d=this._getCanvasCache(),h=d&&d.scene,p=l&&l.isCache;if(!this.isVisible()&&!p)return this;if(h){c.save();const m=this.getAbsoluteTransform(i).getMatrix();c.transform(m[0],m[1],m[2],m[3],m[4],m[5]),this._drawCachedSceneCanvas(c),c.restore()}else this._drawChildren("drawScene",l,i,r);return this}drawHit(t,i){if(!this.shouldDrawHit(i))return this;const r=this.getLayer(),a=t||r&&r.hitCanvas,l=a&&a.getContext(),c=this._getCachedHitCanvas(i);if(c){l.save();const d=this.getAbsoluteTransform(i).getMatrix();l.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedHitCanvas(l,c),l.restore()}else this._drawChildren("drawHit",a,i);return this}_drawChildren(t,i,r,a){var l;const c=i&&i.getContext(),d=this.clipWidth(),h=this.clipHeight(),p=this.clipFunc(),m=typeof d=="number"&&typeof h=="number"||p,v=r===this;if(m){c.save();const y=this.getAbsoluteTransform(r);let x=y.getMatrix();c.transform(x[0],x[1],x[2],x[3],x[4],x[5]),c.beginPath();let _;if(p)_=p.call(this,c,this);else{const w=this.clipX(),C=this.clipY();c.rect(w||0,C||0,d,h)}c.clip.apply(c,_),x=y.copy().invert().getMatrix(),c.transform(x[0],x[1],x[2],x[3],x[4],x[5])}const b=!v&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";b&&(c.save(),c._applyGlobalCompositeOperation(this)),(l=this.children)===null||l===void 0||l.forEach(function(y){y[t](i,r,a)}),b&&c.restore(),m&&c.restore()}getClientRect(t={}){var i;const r=t.skipTransform,a=t.relativeTo;let l,c,d,h,p={x:1/0,y:1/0,width:0,height:0};const m=this;return(i=this.children)===null||i===void 0||i.forEach(function(v){if(!v.visible())return;const b=v.getClientRect({relativeTo:m,skipShadow:t.skipShadow,skipStroke:t.skipStroke});b.width===0&&b.height===0||!isFinite(b.x+b.y+b.width+b.height)||(l===void 0?(l=b.x,c=b.y,d=b.x+b.width,h=b.y+b.height):(l=Math.min(l,b.x),c=Math.min(c,b.y),d=Math.max(d,b.x+b.width),h=Math.max(h,b.y+b.height)))}),l!==void 0?p={x:l,y:c,width:d-l,height:h-c}:p={x:0,y:0,width:0,height:0},r?p:this._transformedRect(p,a)}}B.addComponentsGetterSetter(ui,"clip",["x","y","width","height"]);B.addGetterSetter(ui,"clipX",void 0,he());B.addGetterSetter(ui,"clipY",void 0,he());B.addGetterSetter(ui,"clipWidth",void 0,he());B.addGetterSetter(ui,"clipHeight",void 0,he());B.addGetterSetter(ui,"clipFunc");const nB="Stage",iB="string",W5="px",rB="mouseout",Y6="mouseleave",q6="mouseover",X6="mouseenter",Z6="mousemove",K6="mousedown",Q6="mouseup",Nc="pointermove",Ic="pointerdown",Bs="pointerup",Pc="pointercancel",oB="lostpointercapture",Jd="pointerout",Mc="pointerleave",ef="pointerover",tf="pointerenter",q0="contextmenu",J6="touchstart",e8="touchend",t8="touchmove",n8="touchcancel",X0="wheel",aB=5,sB=[[X6,"_pointerenter"],[K6,"_pointerdown"],[Z6,"_pointermove"],[Q6,"_pointerup"],[Y6,"_pointerleave"],[J6,"_pointerdown"],[t8,"_pointermove"],[e8,"_pointerup"],[n8,"_pointercancel"],[q6,"_pointerover"],[X0,"_wheel"],[q0,"_contextmenu"],[Ic,"_pointerdown"],[Nc,"_pointermove"],[Bs,"_pointerup"],[Pc,"_pointercancel"],[Mc,"_pointerleave"],[oB,"_lostpointercapture"]],Hm={mouse:{[Jd]:rB,[Mc]:Y6,[ef]:q6,[tf]:X6,[Nc]:Z6,[Ic]:K6,[Bs]:Q6,[Pc]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Jd]:"touchout",[Mc]:"touchleave",[ef]:"touchover",[tf]:"touchenter",[Nc]:t8,[Ic]:J6,[Bs]:e8,[Pc]:n8,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Jd]:Jd,[Mc]:Mc,[ef]:ef,[tf]:tf,[Nc]:Nc,[Ic]:Ic,[Bs]:Bs,[Pc]:Pc,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Dc=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Ca=e=>{const t=Dc(e);if(t==="pointer")return pe.pointerEventsEnabled&&Hm.pointer;if(t==="touch")return Hm.touch;if(t==="mouse")return Hm.mouse};function Y5(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&F.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const lB="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Hc=[],q5=new WeakSet,X5=e=>{!e||q5.has(e)||(q5.add(e),Ye._listenToWindow(e),e.document.addEventListener("visibilitychange",()=>{Hc.forEach(t=>{t.batchDraw()})}))};class gu extends ui{constructor(t){super(Y5(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Hc.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{Y5(this.attrs)}),this._checkVisibility()}_validateAdd(t){const i=t.getType()==="Layer",r=t.getType()==="FastLayer";i||r||F.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}_getOwnerWindow(){var t;const i=this.content||this.container();return((t=i?.ownerDocument)===null||t===void 0?void 0:t.defaultView)||(pe.isBrowser?window:null)}setContainer(t){if(typeof t===iB){let i;if(t.charAt(0)==="."){const r=t.slice(1);t=document.getElementsByClassName(r)[0]}else t.charAt(0)!=="#"?i=t:i=t.slice(1),t=document.getElementById(i);if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content),X5(this._getOwnerWindow())),this}shouldDrawHit(){return!0}clear(){const t=this.children,i=t.length;for(let r=0;r<i;r++)t[r].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),ui.prototype.clone.call(this,t)}destroy(){super.destroy(),["mouse","touch","pointer"].forEach(r=>{clearTimeout(this["_"+r+"DblTimeout"]),pe["_"+r+"InDblClickWindow"]=!1});const t=this.content;t&&F._isInDocument(t)&&this.container().removeChild(t);const i=Hc.indexOf(this);return i>-1&&Hc.splice(i,1),F.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(F.warn(lB),null)}_getPointerById(t){return this._pointerPositions.find(i=>i.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t={...t},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();const i=new Na({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=i.getContext()._context,a=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),a.forEach(function(l){if(!l.isVisible())return;const c=l._toKonvaCanvas(t);r.drawImage(c._canvas,t.x,t.y,c.getWidth()/c.getPixelRatio(),c.getHeight()/c.getPixelRatio()),F.releaseCanvas(c._canvas)}),i}getIntersection(t){if(!t)return null;const i=this.children,r=i.length,a=r-1;for(let l=a;l>=0;l--){const c=i[l].getIntersection(t);if(c)return c}return null}_resizeDOM(){const t=this.width(),i=this.height();this.content&&(this.content.style.width=t+W5,this.content.style.height=i+W5),this.children.forEach(r=>{r._setSize({width:t,height:i}),r.draw()})}_syncBufferSize(t){return t.setSizeIfChanged(this.width(),this.height()),t}add(t,...i){if(arguments.length>1){for(let a=0;a<arguments.length;a++)this.add(arguments[a]);return this}super.add(t);const r=this.children.length;return r>aB&&F.warn("The stage has "+r+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t._setSize({width:this.width(),height:this.height()}),t.draw(),pe.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return $6(t,this)}setPointerCapture(t){U6(t,this)}releaseCapture(t){Ys(t,this)}getLayers(){return this.getChildren()}_bindContentEvents(){pe.isBrowser&&sB.forEach(([t,i])=>{this.content.addEventListener(t,r=>{this._batchEvents(()=>this[i](r))},{passive:!1})})}_batchEvents(t){F._batchEvents(this.eventBatchFunc(),t)}_pointerenter(t){this.setPointersPositions(t);const i=Ca(t.type);i&&this._fire(i.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const i=Ca(t.type);i&&this._fire(i.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let i=this[t+"targetShape"];return i&&!i.getStage()&&(i=null),i}_pointerleave(t){const i=Ca(t.type),r=Dc(t.type);if(!i)return;this.setPointersPositions(t);const a=this._getTargetShape(r),l=!(pe.isDragging()||pe.isTransforming())||pe.hitOnDragEnabled;a&&l?(a._fireAndBubble(i.pointerout,{evt:t}),a._fireAndBubble(i.pointerleave,{evt:t}),this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):l&&(this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(i.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){const i=Ca(t.type),r=Dc(t.type);if(!i)return;this.setPointersPositions(t);let a=!1;this._changedPointerPositions.forEach(l=>{const c=this.getIntersection(l);if(Ye.justDragged=!1,pe["_"+r+"ListenClick"]=!0,!c||!c.isListening()){this[r+"ClickStartShape"]=void 0;return}pe.capturePointerEventsEnabled&&c.setPointerCapture(l.id),this[r+"ClickStartShape"]=c,c._fireAndBubble(i.pointerdown,{evt:t,pointerId:l.id}),a=!0;const d=t.type.indexOf("touch")>=0;c.preventDefault()&&t.cancelable&&d&&t.preventDefault()}),a||this._fire(i.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){const i=Ca(t.type),r=Dc(t.type);if(!i)return;const a=t.type.indexOf("touch")>=0||t.pointerType==="touch";if(pe.isDragging()&&Ye.node.preventDefault()&&t.cancelable&&a&&t.preventDefault(),this.setPointersPositions(t),!(!(pe.isDragging()||pe.isTransforming())||pe.hitOnDragEnabled))return;const c={};let d=!1;const h=this._getTargetShape(r);this._changedPointerPositions.forEach(p=>{const m=Vm(p.id)||this.getIntersection(p),v=p.id,b={evt:t,pointerId:v},y=h!==m;if(y&&h&&(h._fireAndBubble(i.pointerout,{...b},m),h._fireAndBubble(i.pointerleave,{...b},m)),m){if(c[m._id])return;c[m._id]=!0}m&&m.isListening()?(d=!0,y&&(m._fireAndBubble(i.pointerover,{...b},h),m._fireAndBubble(i.pointerenter,{...b},h),this[r+"targetShape"]=m),m._fireAndBubble(i.pointermove,{...b})):h&&(this._fire(i.pointerover,{evt:t,target:this,currentTarget:this,pointerId:v}),this[r+"targetShape"]=null)}),d||this._fire(i.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const i=Ca(t.type),r=Dc(t.type);if(!i)return;this.setPointersPositions(t);const a=Ye.justDragged||r==="pointer"&&pe.isDragging(),l=pe["_"+r+"ListenClick"]&&!a,c=this[r+"ClickStartShape"],d=this[r+"ClickEndShape"],h={};let p=!1;this._changedPointerPositions.forEach(m=>{const v=Vm(m.id)||this.getIntersection(m);if(v){if(v.releaseCapture(m.id),h[v._id])return;h[v._id]=!0}const b=m.id,y={evt:t,pointerId:b};let x=!1;pe["_"+r+"InDblClickWindow"]?(x=!0,clearTimeout(this["_"+r+"DblTimeout"])):a||(pe["_"+r+"InDblClickWindow"]=!0,clearTimeout(this["_"+r+"DblTimeout"])),this["_"+r+"DblTimeout"]=setTimeout(function(){pe["_"+r+"InDblClickWindow"]=!1},pe.dblClickWindow),v&&v.isListening()?(p=!0,this[r+"ClickEndShape"]=v,v._fireAndBubble(i.pointerup,{...y}),l&&c===v&&(v._fireAndBubble(i.pointerclick,{...y}),x&&d&&d===v&&v._fireAndBubble(i.pointerdblclick,{...y}))):(this[r+"ClickEndShape"]=null,p||(this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),p=!0),l&&this._fire(i.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:b}),x&&this._fire(i.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:b}))}),p||this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),pe["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&r!=="pointer"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(q0,{evt:t}):this._fire(q0,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(X0,{evt:t}):this._fire(X0,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const i=Ca(t.type);this._changedPointerPositions.forEach(r=>{const a=Vm(r.id)||this.getIntersection(r),l={evt:t,pointerId:r.id};a?(i&&a._fireAndBubble(i.pointercancel,{...l}),a._fireAndBubble(Bs,{...l})):i&&this._fire(i.pointercancel,{...l,target:this,currentTarget:this}),Ys(r.id)})}_lostpointercapture(t){Ys(t.pointerId)}setPointersPositions(t){const i=this._getContentPosition();let r=null,a=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,l=>{this._pointerPositions.push({id:l.identifier,x:(l.clientX-i.left)/i.scaleX,y:(l.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,l=>{this._changedPointerPositions.push({id:l.identifier,x:(l.clientX-i.left)/i.scaleX,y:(l.clientY-i.top)/i.scaleY})})):(r=(t.clientX-i.left)/i.scaleX,a=(t.clientY-i.top)/i.scaleY,this.pointerPos={x:r,y:a},this._pointerPositions=[{x:r,y:a,id:F._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:a,id:F._getFirstPointerId(t)}])}_setPointerPosition(t){F.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Na({width:0,height:0}),this.bufferHitCanvas=new nb({pixelRatio:1,width:0,height:0}),!pe.isBrowser)return;const t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=t.ownerDocument.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),X5(this._getOwnerWindow()),this._resizeDOM()}cache(){return F.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){var t;return(t=this.children)===null||t===void 0||t.forEach(function(i){i.batchDraw()}),this}}gu.prototype.nodeType=nB;zt(gu);B.addGetterSetter(gu,"container");B.addGetterSetter(gu,"eventBatchFunc");const i8="hasShadow",r8="hasFill",o8="hasStroke",a8="shadowRGBA",s8="patternImage",l8="linearGradient",c8="radialGradient";let nf;function Fm(){return nf||(nf=F.createCanvasElement().getContext("2d"),nf)}const Fc={};function u8(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()}function d8(e){e.stroke()}function cB(){this._clearCache(i8)}function uB(){this._clearCache(r8)}function dB(){this._clearCache(o8)}function fB(){this._clearCache(a8)}function hB(){this._clearCache(s8)}function gB(){this._clearCache(l8)}function pB(){this._clearCache(c8)}class fe extends me{constructor(t){super(t);let i,r=0;for(;i=F.getHitColor(),!(i&&!(i in Fc));)if(r++,r>=1e4){F.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),i=F.getRandomColor();break}this.colorKey=i,Fc[i]=this}getContext(){return F.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return F.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(i8,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(s8,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const i=Fm().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(i&&i.setTransform){const r=new li;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(pe.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const a=r.getMatrix(),l=typeof DOMMatrix>"u"?{a:a[0],b:a[1],c:a[2],d:a[3],e:a[4],f:a[5]}:new DOMMatrix(a);i.setTransform(l)}return i}}_getLinearGradient(){return this._getCache(l8,this.__getLinearGradient)}__getLinearGradient(){const t=this.fillLinearGradientColorStops();if(t){const i=Fm(),r=this.fillLinearGradientStartPoint(),a=this.fillLinearGradientEndPoint(),l=i.createLinearGradient(r.x,r.y,a.x,a.y);for(let c=0;c<t.length;c+=2)l.addColorStop(t[c],t[c+1]);return l}}_getRadialGradient(){return this._getCache(c8,this.__getRadialGradient)}__getRadialGradient(){const t=this.fillRadialGradientColorStops();if(t){const i=Fm(),r=this.fillRadialGradientStartPoint(),a=this.fillRadialGradientEndPoint(),l=i.createRadialGradient(r.x,r.y,this.fillRadialGradientStartRadius(),a.x,a.y,this.fillRadialGradientEndRadius());for(let c=0;c<t.length;c+=2)l.addColorStop(t[c],t[c+1]);return l}}getShadowRGBA(){return this._getCache(a8,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const t=F.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._getCache(r8,this._hasFill)}_hasFill(){return this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops())}hasStroke(){return this._getCache(o8,this._hasStroke)}_hasStroke(){return this.strokeEnabled()&&!!(this.strokeWidth()&&(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){const i=this.getStage();if(!i)return!1;const r=i._syncBufferSize(i.bufferHitCanvas);return r.getContext().clear(),this.drawHit(r),r.context.getImageData(Math.floor(t.x),Math.floor(t.y),1,1).data[3]>0}destroy(){return me.prototype.destroy.call(this),delete Fc[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var i;if(!((i=this.attrs.perfectDrawEnabled)!==null&&i!==void 0?i:!0))return!1;const a=t||this.hasFill(),l=this.hasStroke(),c=this.getAbsoluteOpacity()!==1;if(a&&l&&c)return!0;const d=this.hasShadow(),h=this.shadowForStrokeEnabled();return!!(a&&l&&d&&h)}setStrokeHitEnabled(t){F.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const i=t.skipTransform,r=t.relativeTo,a=this.getSelfRect(),c=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,d=a.width+c,h=a.height+c,p=!t.skipShadow&&this.hasShadow(),m=p?this.shadowOffsetX():0,v=p?this.shadowOffsetY():0,b=d+Math.abs(m),y=h+Math.abs(v),x=p&&this.shadowBlur()||0,_=b+x*2,w=y+x*2,C={width:_,height:w,x:-(c/2+x)+Math.min(m,0)+a.x,y:-(c/2+x)+Math.min(v,0)+a.y};return i?C:this._transformedRect(C,r)}drawScene(t,i,r){const a=this.getLayer(),l=t||a.getCanvas(),c=l.getContext(),d=this._getCanvasCache(),h=this.getSceneFunc(),p=this.hasShadow();let m;const v=i===this;if(!this.isVisible()&&!v)return this;if(d){c.save();const b=this.getAbsoluteTransform(i).getMatrix();return c.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(c),c.restore(),this}if(!h)return this;if(c.save(),this._useBufferCanvas()){m=this.getStage();const b=r||m._syncBufferSize(m.bufferCanvas),y=b.getContext();r?b.width?(y.save(),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),y.restore()):(b.setSize(l._logicalWidth,l._logicalHeight),y.translate(-b.x,-b.y)):y.clear(),y.save(),y.imageSmoothingEnabled=c.imageSmoothingEnabled,y._applyLineJoin(this),y._applyMiterLimit(this);const x=this.getAbsoluteTransform(i).getMatrix();y.transform(x[0],x[1],x[2],x[3],x[4],x[5]),h.call(this,y,this),y.restore();const _=b.pixelRatio;p&&c._applyShadow(this),v||(c._applyOpacity(this),c._applyGlobalCompositeOperation(this)),c.drawImage(b._canvas,b.x,b.y,b.width/_,b.height/_)}else{if(c._applyLineJoin(this),c._applyMiterLimit(this),!v){const b=this.getAbsoluteTransform(i).getMatrix();c.transform(b[0],b[1],b[2],b[3],b[4],b[5]),c._applyOpacity(this),c._applyGlobalCompositeOperation(this)}p&&c._applyShadow(this),h.call(this,c,this)}return c.restore(),this}drawHit(t,i){if(!this.shouldDrawHit(i))return this;const r=this.getLayer(),a=t||r.hitCanvas,l=a&&a.getContext(),c=this.hitFunc()||this.sceneFunc(),d=this._getCachedHitCanvas(i);if(this.colorKey||F.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),d){l.save();const p=this.getAbsoluteTransform(i).getMatrix();return l.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedHitCanvas(l,d),l.restore(),this}if(!c)return this;if(l.save(),l._applyLineJoin(this),l._applyMiterLimit(this),!(this===i)){const p=this.getAbsoluteTransform(i).getMatrix();l.transform(p[0],p[1],p[2],p[3],p[4],p[5])}return c.call(this,l,this),l.restore(),this}drawHitFromCache(t=0){const i=this._getCachedSceneCanvas(),r=this._getCachedHitCanvas(),a=r.getContext(),l=r.getWidth(),c=r.getHeight();a.clear(),a.drawImage(i._canvas,0,0,l/r.pixelRatio,c/r.pixelRatio);try{const d=a.getImageData(0,0,l,c),h=d.data,p=h.length,m=F._hexToRgb(this.colorKey);for(let v=0;v<p;v+=4)h[v+3]>t?(h[v]=m.r,h[v+1]=m.g,h[v+2]=m.b,h[v+3]=255):h[v+3]=0;a.putImageData(d,0,0)}catch(d){F.error("Unable to draw hit graph from cached scene canvas. "+d.message)}return this}hasPointerCapture(t){return $6(t,this)}setPointerCapture(t){U6(t,this)}releaseCapture(t){Ys(t,this)}}fe.prototype._fillFunc=u8;fe.prototype._strokeFunc=d8;fe.prototype._fillFuncHit=u8;fe.prototype._strokeFuncHit=d8;fe.prototype._centroid=!1;fe.prototype.nodeType="Shape";zt(fe);fe.prototype.on("shadowColorChange.konva shadowBlurChange.konva shadowOffsetXChange.konva shadowOffsetYChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",cB);fe.prototype.on("shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",fB);fe.prototype.on("fillEnabledChange.konva fillChange.konva fillPatternImageChange.konva fillLinearGradientColorStopsChange.konva fillRadialGradientColorStopsChange.konva",uB);fe.prototype.on("strokeEnabledChange.konva strokeWidthChange.konva strokeChange.konva strokeLinearGradientColorStopsChange.konva",dB);fe.prototype.on("fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",hB);fe.prototype.on("fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",gB);fe.prototype.on("fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",pB);B.addGetterSetter(fe,"stroke",void 0,W6());B.addGetterSetter(fe,"strokeWidth",2,he());B.addGetterSetter(fe,"fillAfterStrokeEnabled",!1);B.addGetterSetter(fe,"hitStrokeWidth","auto",rb());B.addGetterSetter(fe,"strokeHitEnabled",!0,vr());B.addGetterSetter(fe,"perfectDrawEnabled",!0,vr());B.addGetterSetter(fe,"shadowForStrokeEnabled",!0,vr());B.addGetterSetter(fe,"lineJoin");B.addGetterSetter(fe,"lineCap");B.addGetterSetter(fe,"miterLimit");B.addGetterSetter(fe,"sceneFunc");B.addGetterSetter(fe,"hitFunc");B.addGetterSetter(fe,"dash");B.addGetterSetter(fe,"dashOffset",0,he());B.addGetterSetter(fe,"shadowColor",void 0,La());B.addGetterSetter(fe,"shadowBlur",0,he());B.addGetterSetter(fe,"shadowOpacity",1,he());B.addComponentsGetterSetter(fe,"shadowOffset",["x","y"]);B.addGetterSetter(fe,"shadowOffsetX",0,he());B.addGetterSetter(fe,"shadowOffsetY",0,he());B.addGetterSetter(fe,"fillPatternImage");B.addGetterSetter(fe,"fill",void 0,W6());B.addGetterSetter(fe,"fillPatternX",0,he());B.addGetterSetter(fe,"fillPatternY",0,he());B.addGetterSetter(fe,"fillLinearGradientColorStops");B.addGetterSetter(fe,"strokeLinearGradientColorStops");B.addGetterSetter(fe,"fillRadialGradientStartRadius",0);B.addGetterSetter(fe,"fillRadialGradientEndRadius",0);B.addGetterSetter(fe,"fillRadialGradientColorStops");B.addGetterSetter(fe,"fillPatternRepeat","repeat");B.addGetterSetter(fe,"fillEnabled",!0);B.addGetterSetter(fe,"strokeEnabled",!0);B.addGetterSetter(fe,"shadowEnabled",!0);B.addGetterSetter(fe,"dashEnabled",!0);B.addGetterSetter(fe,"strokeScaleEnabled",!0);B.addGetterSetter(fe,"fillPriority","color");B.addComponentsGetterSetter(fe,"fillPatternOffset",["x","y"]);B.addGetterSetter(fe,"fillPatternOffsetX",0,he());B.addGetterSetter(fe,"fillPatternOffsetY",0,he());B.addComponentsGetterSetter(fe,"fillPatternScale",["x","y"]);B.addGetterSetter(fe,"fillPatternScaleX",1,he());B.addGetterSetter(fe,"fillPatternScaleY",1,he());B.addComponentsGetterSetter(fe,"fillLinearGradientStartPoint",["x","y"]);B.addComponentsGetterSetter(fe,"strokeLinearGradientStartPoint",["x","y"]);B.addGetterSetter(fe,"fillLinearGradientStartPointX",0);B.addGetterSetter(fe,"strokeLinearGradientStartPointX",0);B.addGetterSetter(fe,"fillLinearGradientStartPointY",0);B.addGetterSetter(fe,"strokeLinearGradientStartPointY",0);B.addComponentsGetterSetter(fe,"fillLinearGradientEndPoint",["x","y"]);B.addComponentsGetterSetter(fe,"strokeLinearGradientEndPoint",["x","y"]);B.addGetterSetter(fe,"fillLinearGradientEndPointX",0);B.addGetterSetter(fe,"strokeLinearGradientEndPointX",0);B.addGetterSetter(fe,"fillLinearGradientEndPointY",0);B.addGetterSetter(fe,"strokeLinearGradientEndPointY",0);B.addComponentsGetterSetter(fe,"fillRadialGradientStartPoint",["x","y"]);B.addGetterSetter(fe,"fillRadialGradientStartPointX",0);B.addGetterSetter(fe,"fillRadialGradientStartPointY",0);B.addComponentsGetterSetter(fe,"fillRadialGradientEndPoint",["x","y"]);B.addGetterSetter(fe,"fillRadialGradientEndPointX",0);B.addGetterSetter(fe,"fillRadialGradientEndPointY",0);B.addGetterSetter(fe,"fillPatternRotation",0);B.addGetterSetter(fe,"fillRule",void 0,La());B.backCompat(fe,{dashArray:"dash",getDashArray:"getDash",setDashArray:"setDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const mB="beforeDraw",vB="draw",bB=10,Z5=256;function K5(e,t){return e[t+3]>=128?Fc[F.getHitColorKey(e[t],e[t+1],e[t+2])]:void 0}class ja extends ui{constructor(t){super(t),this.canvas=new Na,this.hitCanvas=new nb({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);const i=this.getStage();return i&&i.content&&(i.content.removeChild(this.getNativeCanvasElement()),t<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[t+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){me.prototype.moveToTop.call(this);const t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!me.prototype.moveUp.call(this))return!1;const i=this.getStage();return!i||!i.content?!1:(i.content.removeChild(this.getNativeCanvasElement()),this.index<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[this.index+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(me.prototype.moveDown.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(me.prototype.moveToBottom.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const t=this.getNativeCanvasElement();return me.prototype.remove.call(this),t&&t.parentNode&&F._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}_setSize({width:t,height:i}){return this.canvas.setSize(t,i),this._syncHitCanvasSize(),this._setSmoothEnabled(),this}_syncHitCanvasSize(){const t=this.isListening();this.hitCanvas.setSizeIfChanged((t?this.getWidth():0)||0,(t?this.getHeight():0)||0)}_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&F.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t={...t},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),me.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){F.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){F.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){var t;return this._waitingForDraw||(this._waitingForDraw=!0,F.requestAnimFrame(()=>{this._waitingForDraw=!1,this.draw()},(t=this.getStage())===null||t===void 0?void 0:t._getOwnerWindow())),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;const i=this._getIntersection(t);if(i.shape)return i.shape;if(!i.antialiased)return null;const r=this.hitCanvas.pixelRatio,a=Math.floor(t.x*r),l=Math.floor(t.y*r),c=v=>this.hitCanvas.context.getImageData(a-v,l-v,v*2+1,v*2+1).data;let d=bB,h=d*2+1,p=c(d),m=p[(d*h+d)*4+3];for(let v=1;v<=Z5;v++){v>d&&(d=Math.min(Z5,d*2),h=d*2+1,p=c(d));let b=0;for(let y=-v;y<=v;y++){const x=Math.abs(y)===v?1:v*2;for(let _=-v;_<=v;_+=x){const w=((y+d)*h+_+d)*4,C=K5(p,w);if(C)return C;b=Math.max(b,p[w+3])}}if(b<=m&&b!==255)return null;m=b}return null}_getIntersection(t){if(!this.hitCanvas.width||!this.hitCanvas.height)return{};const i=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.floor(t.x*i),Math.floor(t.y*i),1,1).data,a=K5(r,0);return a?{shape:a}:r[3]>0?{antialiased:!0}:{}}drawScene(t,i,r){const a=this.getLayer(),l=t||a&&a.getCanvas();return this._fire(mB,{node:this}),this.clearBeforeDraw()&&l.getContext().clear(),ui.prototype.drawScene.call(this,l,i,r),this._fire(vB,{node:this}),this}shouldDrawHit(t){var i;if(!super.shouldDrawHit(t))return!1;if(t||pe.hitOnDragEnabled)return!0;let r=!1;return Ye._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===this)&&(r=!0)}),!r&&!(!((i=pe.Transformer)===null||i===void 0)&&i._isLayerTransforming(this))}drawHit(t,i){const r=this.getLayer(),a=t||r&&r.hitCanvas;return!t&&r&&(r._syncHitCanvasSize(),r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear()),ui.prototype.drawHit.call(this,a,i),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){F.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return F.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const t=this.parent;!!this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return F.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}ja.prototype.nodeType="Layer";zt(ja);B.addGetterSetter(ja,"imageSmoothingEnabled",!0);B.addGetterSetter(ja,"clearBeforeDraw",!0);B.addOverloadedGetterSetter(ja,"hitGraphEnabled");class ob extends ja{constructor(t){super(t),this.listening(!1),F.warn('Konva.FastLayer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}ob.prototype.nodeType="FastLayer";zt(ob);class Qs extends ui{_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&F.throw("You may only add groups and shapes to groups.")}}Qs.prototype.nodeType="Group";zt(Qs);var $m;const Um=!(($m=js.performance)===null||$m===void 0)&&$m.now?()=>js.performance.now():Date.now;class wi{constructor(t,i){this.id=wi.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Um(),frameRate:0},this.func=t,this.setLayers(i)}setLayers(t){return this.layers=t?[].concat(t):[],this}getLayers(){return this.layers}addLayer(t){const i=this.layers,r=i.length;for(let a=0;a<r;a++)if(i[a]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){return wi.animations.has(this)}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=Um(),wi._addAnimation(this),this}stop(){return wi._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.add(t),this._handleAnimation()}static _removeAnimation(t){this.animations.delete(t)}static _runFrames(){const t=new Set;Array.from(this.animations).forEach(i=>{this.animations.has(i)&&(i._updateFrameObject(Um()),!(i.func&&i.func.call(i,i.frame)===!1)&&i.layers.forEach(r=>r&&t.add(r)))}),t.forEach(i=>i.batchDraw())}static _animationLoop(){const t=wi;t.animations.size?(t._runFrames(),F.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,F.requestAnimFrame(this._animationLoop))}}wi.animations=new Set;wi.animIdCounter=0;wi.animRunning=!1;const yB={node:1,duration:1,easing:1,onFinish:1,onUpdate:1,onReset:1,yoyo:1},xB=1,Q5=2,J5=3,e3=["fill","stroke","shadowColor"];let SB=0;function rf(e){return F.colorToRGBA(e)||F.throw('can not tween the color "'+e+'", because it is not a valid color.')}class _B{constructor(t,i,r,a,l,c,d){this.prop=t,this.propFunc=i,this.begin=a,this._pos=a,this.duration=c,this._change=0,this.prevPos=0,this.yoyo=d,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=r,this._change=l-this.begin,this.pause()}fire(t){const i=this[t];i&&i()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Q5,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=J5,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const t=this.getTimer()-this._startTime;this.state===Q5?this.setTime(t):this.state===J5&&this.setTime(this.duration-t)}pause(){this.state=xB,this.fire("onPause")}getTimer(){return Date.now()}}class Ct{constructor(t){const i=this,r=t.node,a=r._id,l=t.easing||$c.Linear,c=!!t.yoyo;let d,h;typeof t.duration>"u"?d=.3:t.duration===0?d=.001:d=t.duration,this.node=r,this._id=SB++;const p=r.getLayer()||(r instanceof pe.Stage?r.getLayers():null);p||F.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new wi(function(){i.tween.onEnterFrame()},p),this.tween=new _B(h,function(m){i._tweenFunc(m)},l,0,1,d*1e3,c),this._addListeners(),Ct.attrs[a]||(Ct.attrs[a]={}),Ct.attrs[a][this._id]||(Ct.attrs[a][this._id]={}),Ct.tweens[a]||(Ct.tweens[a]={});for(h in t)yB[h]===void 0&&this._addAttr(h,t[h]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,i){if(F._isPlainObject(i)){for(const b in i)this._addAttr(t+F._capitalize(b),i[b]);return}const r=this.node,a=r._id;let l,c,d,h,p;const m=Ct.tweens[a][t];m!==void 0&&delete Ct.attrs[a][m][t];let v=r.getAttr(t);if(F._isArray(i))if(l=[],v=(v||[]).slice(),c=Math.max(i.length,v.length),t==="points"&&i.length!==v.length&&(i.length>v.length?(h=v,v=F._prepareArrayForTween(v,i,r.closed())):(d=i,i=F._prepareArrayForTween(i,v,r.closed()))),t.indexOf("fill")===0)for(let b=0;b<c;b++)if(b%2===0)l.push(i[b]-(v[b]||0));else{const y=rf(v[b]);p=rf(i[b]),v[b]=y,l.push({r:p.r-y.r,g:p.g-y.g,b:p.b-y.b,a:p.a-y.a})}else for(let b=0;b<c;b++)l.push(i[b]-(v[b]||0));else e3.indexOf(t)!==-1?(v=rf(v),p=rf(i),l={r:p.r-v.r,g:p.g-v.g,b:p.b-v.b,a:p.a-v.a}):l=i-v;Ct.attrs[a][this._id][t]={start:v,diff:l,end:i,trueEnd:d,trueStart:h},Ct.tweens[a][t]=this._id}_tweenFunc(t){const i=this.node,r=Ct.attrs[i._id][this._id];let a,l,c,d,h,p,m,v;for(a in r){if(l=r[a],c=l.start,d=l.diff,v=l.end,F._isArray(c))if(h=[],m=Math.max(c.length,v.length),a.indexOf("fill")===0)for(p=0;p<m;p++)p%2===0?h.push((c[p]||0)+d[p]*t):h.push("rgba("+Math.round(c[p].r+d[p].r*t)+","+Math.round(c[p].g+d[p].g*t)+","+Math.round(c[p].b+d[p].b*t)+","+(c[p].a+d[p].a*t)+")");else for(p=0;p<m;p++)h.push((c[p]||0)+d[p]*t);else e3.indexOf(a)!==-1?h="rgba("+Math.round(c.r+d.r*t)+","+Math.round(c.g+d.g*t)+","+Math.round(c.b+d.b*t)+","+(c.a+d.a*t)+")":h=c+d*t;i.setAttr(a,h)}}_addListeners(){const t=`destroy.konva-tween${this._id}`,i=()=>this.destroy(),r=()=>{this.node.off(t).on(t,i),this.anim.start()};this.tween.onPlay=r,this.tween.onReverse=r,this.tween.onPause=()=>{this.node.off(t),this.anim.stop()},this.tween.onFinish=()=>{const a=this.node,l=Ct.attrs[a._id][this._id];l.points&&l.points.trueEnd&&a.setAttr("points",l.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const a=this.node,l=Ct.attrs[a._id][this._id];l.points&&l.points.trueStart&&a.points(l.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t;const i=this.node._id,r=this._id,a=(t=Ct.attrs[i])===null||t===void 0?void 0:t[r],l=Ct.tweens[i];if(this.pause(),this.anim&&this.anim.stop(),a){if(l){for(const c in a)delete l[c];Object.keys(l).length===0&&delete Ct.tweens[i]}delete Ct.attrs[i][r],Object.keys(Ct.attrs[i]).length===0&&delete Ct.attrs[i]}}}Ct.attrs={};Ct.tweens={};me.prototype.to=function(e){const t=e.onFinish,i=new Ct({...e,node:this,onFinish(){i.destroy(),t&&t()}});return i.play(),i};const $c={BackEaseIn(e,t,i,r){return i*(e/=r)*e*((1.70158+1)*e-1.70158)+t},BackEaseOut(e,t,i,r){return i*((e=e/r-1)*e*((1.70158+1)*e+1.70158)+1)+t},BackEaseInOut(e,t,i,r){let a=1.70158;return(e/=r/2)<1?i/2*(e*e*(((a*=1.525)+1)*e-a))+t:i/2*((e-=2)*e*(((a*=1.525)+1)*e+a)+2)+t},ElasticEaseIn(e,t,i,r,a,l){let c=0;return e===0?t:(e/=r)===1?t+i:(l||(l=r*.3),!a||a<Math.abs(i)?(a=i,c=l/4):c=l/(2*Math.PI)*Math.asin(i/a),-(a*Math.pow(2,10*(e-=1))*Math.sin((e*r-c)*(2*Math.PI)/l))+t)},ElasticEaseOut(e,t,i,r,a,l){let c=0;return e===0?t:(e/=r)===1?t+i:(l||(l=r*.3),!a||a<Math.abs(i)?(a=i,c=l/4):c=l/(2*Math.PI)*Math.asin(i/a),a*Math.pow(2,-10*e)*Math.sin((e*r-c)*(2*Math.PI)/l)+i+t)},ElasticEaseInOut(e,t,i,r,a,l){let c=0;return e===0?t:(e/=r/2)===2?t+i:(l||(l=r*(.3*1.5)),!a||a<Math.abs(i)?(a=i,c=l/4):c=l/(2*Math.PI)*Math.asin(i/a),e<1?-.5*(a*Math.pow(2,10*(e-=1))*Math.sin((e*r-c)*(2*Math.PI)/l))+t:a*Math.pow(2,-10*(e-=1))*Math.sin((e*r-c)*(2*Math.PI)/l)*.5+i+t)},BounceEaseOut(e,t,i,r){return(e/=r)<1/2.75?i*(7.5625*e*e)+t:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+t:i*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,i,r){return i-$c.BounceEaseOut(r-e,0,i,r)+t},BounceEaseInOut(e,t,i,r){return e<r/2?$c.BounceEaseIn(e*2,0,i,r)*.5+t:$c.BounceEaseOut(e*2-r,0,i,r)*.5+i*.5+t},EaseIn(e,t,i,r){return i*(e/=r)*e+t},EaseOut(e,t,i,r){return-i*(e/=r)*(e-2)+t},EaseInOut(e,t,i,r){return(e/=r/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,i,r){return i*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,i,r){return i*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,i,r){return(e/=r/2)<1?i/2*e*e*e*e*e+t:i/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,i,r){return i*e/r+t}},t3=F._assign(pe,{Util:F,Transform:li,Node:me,Container:ui,Stage:gu,stages:Hc,Layer:ja,FastLayer:ob,Group:Qs,DD:Ye,Shape:fe,shapes:Fc,Animation:wi,Tween:Ct,Easings:$c,Context:zh,Canvas:tb});class Zr extends fe{_sceneFunc(t){const i=pe.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,Math.abs(this.outerRadius()),0,i,r),t.arc(0,0,Math.abs(this.innerRadius()),i,0,!r),t.closePath(),t.fillStrokeShape(this)}getWidth(){return Math.abs(this.outerRadius())*2}getHeight(){return Math.abs(this.outerRadius())*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=Math.abs(this.innerRadius()),i=Math.abs(this.outerRadius()),r=this.clockwise(),a=pe.getAngle(this.angle());if(a%(Math.PI*2)===0)return a!==0?{x:-i,y:-i,width:i*2,height:i*2}:{x:t,y:0,width:i-t,height:0};const l=pe.getAngle(r?360-this.angle():this.angle()),c=Math.cos(Math.min(l,Math.PI)),d=1,h=Math.sin(Math.min(Math.max(Math.PI,l),3*Math.PI/2)),p=Math.sin(Math.min(l,Math.PI/2)),m=c*(c>0?t:i),v=d*i,b=h*(h>0?t:i),y=p*(p>0?i:t);return{x:m,y:r?-1*y:b,width:v-m,height:y-b}}}Zr.prototype._centroid=!0;Zr.prototype.className="Arc";Zr.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"];zt(Zr);B.addGetterSetter(Zr,"innerRadius",0,he());B.addGetterSetter(Zr,"outerRadius",0,he());B.addGetterSetter(Zr,"angle",0,he());B.addGetterSetter(Zr,"clockwise",!1,vr());const wB=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],CB=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],EB=[[1],[1,1],[1,2,1],[1,3,3,1]],n3=(e,t,i)=>{let r,a;const c=i/2;r=0;for(let d=0;d<20;d++)a=c*wB[20][d]+c,r+=CB[20][d]*TB(e,t,a);return c*r},i3=(e,t,i)=>{i===void 0&&(i=1);const r=e[0]-2*e[1]+e[2],a=t[0]-2*t[1]+t[2],l=2*e[1]-2*e[0],c=2*t[1]-2*t[0],d=4*(r*r+a*a),h=4*(r*l+a*c),p=l*l+c*c;if(d===0)return i*Math.sqrt(Math.pow(e[2]-e[0],2)+Math.pow(t[2]-t[0],2));const m=h/(2*d),v=p/d,b=i+m,y=v-m*m,x=b*b+y>0?Math.sqrt(b*b+y):0,_=m*m+y>0?Math.sqrt(m*m+y):0,w=m+Math.sqrt(m*m+y)!==0?y*Math.log(Math.abs((b+x)/(m+_))):0;return Math.sqrt(d)/2*(b*x-m*_+w)};function TB(e,t,i){const r=Z0(1,i,e),a=Z0(1,i,t),l=r*r+a*a;return Math.sqrt(l)}const Z0=(e,t,i)=>{const r=i.length-1;let a,l;if(r===0)return 0;if(e===0){l=0;for(let c=0;c<=r;c++)l+=EB[r][c]*Math.pow(1-t,r-c)*Math.pow(t,c)*i[c];return l}else{a=new Array(r);for(let c=0;c<r;c++)a[c]=r*(i[c+1]-i[c]);return Z0(e-1,t,a)}},r3=(e,t,i)=>{let r=1,a=e/t,l=(e-i(a))/t,c=0;for(;r>.001;){const d=i(a+l),h=Math.abs(e-d)/t;if(h<r)r=h,a+=l;else{const p=i(a-l),m=Math.abs(e-p)/t;m<r?(r=m,a-=l):l/=2}if(c++,c>500)break}return a},o3=(e,t,i,r)=>{const a=1-r;return a*a*e+2*a*r*t+r*r*i},f8=(e,t,i,r,a,l)=>{const c=[];for(const d of[[e,i,a],[t,r,l]]){const h=(d[0]-d[1])/(d[0]-2*d[1]+d[2]);h>0&&h<1&&c.push(o3(e,i,a,h),o3(t,r,l,h))}return c},a3=(e,t,i,r,a)=>{const l=1-a;return l*l*l*e+3*l*l*a*t+3*l*a*a*i+a*a*a*r},ab=(e,t,i,r,a,l,c,d)=>{const h=[];for(const p of[[e,i,a,c],[t,r,l,d]]){const m=-3*p[0]+9*p[1]-9*p[2]+3*p[3],v=6*p[0]-12*p[1]+6*p[2],b=-3*p[0]+3*p[1],y=v*v-4*m*b;if(y<0)continue;const x=-(v+(v<0?-1:1)*Math.sqrt(y))/2;for(const _ of[x/m,b/x])_>0&&_<1&&h.push(a3(e,i,a,c,_),a3(t,r,l,d,_))}return h};function K0(e,t,i,r,a,l,c){const d=Math.sqrt(Math.pow(i-e,2)+Math.pow(r-t,2)),h=Math.sqrt(Math.pow(a-i,2)+Math.pow(l-r,2)),p=d+h;if(p===0)return[i,r,i,r];const m=c*d/p,v=c*h/p,b=i-m*(a-e),y=r-m*(l-t),x=i+v*(a-e),_=r+v*(l-t);return[b,y,x,_]}function s3(e,t){const i=e.length,r=[];for(let a=2;a<i-2;a+=2){const l=K0(e[a-2],e[a-1],e[a],e[a+1],e[a+2],e[a+3],t);isNaN(l[0])||(r.push(l[0]),r.push(l[1]),r.push(e[a]),r.push(e[a+1]),r.push(l[2]),r.push(l[3]))}return r}function kB(e){const t=[];for(let i=0;i+7<e.length;i+=6)t.push(e[i+6],e[i+7],...ab(e[i],e[i+1],e[i+2],e[i+3],e[i+4],e[i+5],e[i+6],e[i+7]));return t}class Kr extends fe{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_hasTension(){return this.tension()!==0&&this.points().length>4}_eachTensionSegment(t,i){const r=this.points(),a=r.length,l=this.closed(),c=this.getTensionPoints(),d=c.length;let h=r[0],p=r[1],m=l?0:4;for(l||(t(h,p,c[0],c[1],c[2],c[3]),h=c[2],p=c[3]);m<d-2;){const v=c[m++],b=c[m++],y=c[m++],x=c[m++],_=c[m++],w=c[m++];i(h,p,v,b,y,x,_,w),h=_,p=w}l||t(h,p,c[d-2],c[d-1],r[a-2],r[a-1])}_sceneFunc(t){const i=this.points(),r=i.length,a=this.closed(),l=this.bezier();if(!r)return;let c=0;if(t.beginPath(),t.moveTo(i[0],i[1]),this._hasTension())this._eachTensionSegment((d,h,p,m,v,b)=>t.quadraticCurveTo(p,m,v,b),(d,h,p,m,v,b,y,x)=>t.bezierCurveTo(p,m,v,b,y,x));else if(l)for(c=2;c<r;)t.bezierCurveTo(i[c++],i[c++],i[c++],i[c++],i[c++],i[c++]);else for(c=2;c<r;c+=2)t.lineTo(i[c],i[c+1]);a?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():s3(this.points(),this.tension())}_getTensionPointsClosed(){const t=this.points(),i=t.length,r=this.tension(),a=K0(t[i-2],t[i-1],t[0],t[1],t[2],t[3],r),l=K0(t[i-4],t[i-3],t[i-2],t[i-1],t[0],t[1],r),c=s3(t,r);return[a[2],a[3]].concat(c).concat([l[0],l[1],t[i-2],t[i-1],l[2],l[3],a[0],a[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};if(this._hasTension()){const i=[t[0],t[1]];this._eachTensionSegment((r,a,l,c,d,h)=>i.push(d,h,...f8(r,a,l,c,d,h)),(r,a,l,c,d,h,p,m)=>i.push(p,m,...ab(r,a,l,c,d,h,p,m))),t=i}else this.bezier()&&(t=[t[0],t[1],...kB(t)]);return F._getPointsRect(t)}}Kr.prototype.className="Line";Kr.prototype._attrsAffectingSize=["points","bezier","tension"];zt(Kr);B.addGetterSetter(Kr,"closed",!1);B.addGetterSetter(Kr,"bezier",!1);B.addGetterSetter(Kr,"tension",0,he());B.addGetterSetter(Kr,"points",[],Gj());const zB={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0};class kt extends fe{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=kt.parsePathData(this.data()),this.pathLength=kt.getPathLength(this.dataArray)}_sceneFunc(t){const i=this.dataArray;t.beginPath();let r=!1;for(let a=0;a<i.length;a++){const l=i[a].command,c=i[a].points;switch(l){case"L":t.lineTo(c[0],c[1]);break;case"M":t.moveTo(c[0],c[1]);break;case"C":t.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"Q":t.quadraticCurveTo(c[0],c[1],c[2],c[3]);break;case"A":const d=c[0],h=c[1],p=c[2],m=c[3],v=c[4],b=c[5],y=c[6],x=c[7],_=p>m?p:m,w=p>m?1:p/m,C=p>m?m/p:1;t.translate(d,h),t.rotate(y),t.scale(w,C),t.arc(0,0,_,v,v+b,1-x),t.scale(1/w,1/C),t.rotate(-y),t.translate(-d,-h);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=[];return this.dataArray.forEach(function(i){if(i.command==="A"){const r=i.points[4],a=i.points[5],l=i.points[4]+a;let c=Math.PI/180;if(Math.abs(r-l)<c&&(c=Math.abs(r-l)),a<0)for(let d=r-c;d>l;d-=c){const h=kt.getPointOnEllipticalArc(i.points[0],i.points[1],i.points[2],i.points[3],d,i.points[6]);t.push(h.x,h.y)}else for(let d=r+c;d<l;d+=c){const h=kt.getPointOnEllipticalArc(i.points[0],i.points[1],i.points[2],i.points[3],d,i.points[6]);t.push(h.x,h.y)}}else i.command==="C"?t.push(i.start.x,i.start.y,i.points[4],i.points[5],...ab(i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3],i.points[4],i.points[5])):i.command==="Q"?t.push(i.start.x,i.start.y,i.points[2],i.points[3],...f8(i.start.x,i.start.y,i.points[0],i.points[1],i.points[2],i.points[3])):t=t.concat(i.points)}),F._getPointsRect(t)}getLength(){return this.pathLength}getPointAtLength(t){return kt.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,i,r,a){return Math.sqrt((r-t)*(r-t)+(a-i)*(a-i))}static getPathLength(t){let i=0;for(let r=0;r<t.length;++r)i+=t[r].pathLength;return i}static getPointAtLengthOfDataArray(t,i){let r,a=0,l=i.length;if(!l)return null;for(;a<l&&t>i[a].pathLength;)t-=i[a].pathLength,++a;if(a===l){for(a--;a>0&&i[a].points.length<2;)a--;t=i[a].pathLength}if(t<.01)return i[a].command==="M"?(r=i[a].points.slice(0,2),{x:r[0],y:r[1]}):{x:i[a].start.x,y:i[a].start.y};const c=i[a],d=c.points;switch(c.command){case"L":return kt.getPointOnLine(t,c.start.x,c.start.y,d[0],d[1]);case"C":return kt.getPointOnCubicBezier(r3(t,c.pathLength,_=>n3([c.start.x,d[0],d[2],d[4]],[c.start.y,d[1],d[3],d[5]],_)),c.start.x,c.start.y,d[0],d[1],d[2],d[3],d[4],d[5]);case"Q":return kt.getPointOnQuadraticBezier(r3(t,c.pathLength,_=>i3([c.start.x,d[0],d[2]],[c.start.y,d[1],d[3]],_)),c.start.x,c.start.y,d[0],d[1],d[2],d[3]);case"A":const h=d[0],p=d[1],m=d[2],v=d[3],b=d[5],y=d[6];let x=d[4];return x+=b*t/c.pathLength,kt.getPointOnEllipticalArc(h,p,m,v,x,y)}return null}static getPointOnLine(t,i,r,a,l,c,d){c=c??i,d=d??r;const h=this.getLineLength(i,r,a,l);if(h<1e-10)return{x:i,y:r};if(a===i)return{x:c,y:d+(l>r?t:-t)};const p=(l-r)/(a-i),m=Math.sqrt(t*t/(1+p*p))*(a<i?-1:1),v=p*m;if(Math.abs(d-r-p*(c-i))<1e-10)return{x:c+m,y:d+v};const b=((c-i)*(a-i)+(d-r)*(l-r))/(h*h),y=i+b*(a-i),x=r+b*(l-r),_=this.getLineLength(c,d,y,x),w=Math.sqrt(t*t-_*_),C=Math.sqrt(w*w/(1+p*p))*(a<i?-1:1),R=p*C;return{x:y+C,y:x+R}}static getPointOnCubicBezier(t,i,r,a,l,c,d,h,p){function m(w){return w*w*w}function v(w){return 3*w*w*(1-w)}function b(w){return 3*w*(1-w)*(1-w)}function y(w){return(1-w)*(1-w)*(1-w)}const x=h*m(t)+c*v(t)+a*b(t)+i*y(t),_=p*m(t)+d*v(t)+l*b(t)+r*y(t);return{x,y:_}}static getPointOnQuadraticBezier(t,i,r,a,l,c,d){function h(y){return y*y}function p(y){return 2*y*(1-y)}function m(y){return(1-y)*(1-y)}const v=c*h(t)+a*p(t)+i*m(t),b=d*h(t)+l*p(t)+r*m(t);return{x:v,y:b}}static getPointOnEllipticalArc(t,i,r,a,l,c){const d=Math.cos(c),h=Math.sin(c),p={x:r*Math.cos(l),y:a*Math.sin(l)};return{x:t+(p.x*d-p.y*h),y:i+(p.x*h+p.y*d)}}static parsePathData(t){if(!t)return[];let i=t;const r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(new RegExp(" ","g"),",");for(let v=0;v<r.length;v++)i=i.replace(new RegExp(r[v],"g"),"|"+r[v]);const a=i.split("|"),l=[],c=[];let d=0,h=0;const p=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let m;for(let v=1;v<a.length;v++){let b=a[v],y=b.charAt(0);for(b=b.slice(1),c.length=0;m=p.exec(b);)c.push(m[0]);let x=[],_=y==="A"||y==="a"?0:-1;for(let w=0,C=c.length;w<C;w++){let R=c[w];for(;(_===3||_===4)&&R.length>1&&(R[0]==="0"||R[0]==="1");)x.push(+R[0]),_++,R=R.slice(1);const z=parseFloat(R);x.push(isNaN(z)?0:z),_>=0&&(_=(_+1)%7)}for(;x.length>0&&!(x.length<zB[y.toLowerCase()]||y==="z"||y==="Z");){let w="",C=[];const R=d,z=h;let D,T,k,A,L,W,V,M,I,U;switch(y){case"l":d+=x.shift(),h+=x.shift(),w="L",C.push(d,h);break;case"L":d=x.shift(),h=x.shift(),C.push(d,h);break;case"m":const X=x.shift(),K=x.shift();if(d+=X,h+=K,w="M",l.length>2&&l[l.length-1].command==="z"){for(let P=l.length-2;P>=0;P--)if(l[P].command==="M"){d=l[P].points[0]+X,h=l[P].points[1]+K;break}}C.push(d,h),y="l";break;case"M":d=x.shift(),h=x.shift(),w="M",C.push(d,h),y="L";break;case"h":d+=x.shift(),w="L",C.push(d,h);break;case"H":d=x.shift(),w="L",C.push(d,h);break;case"v":h+=x.shift(),w="L",C.push(d,h);break;case"V":h=x.shift(),w="L",C.push(d,h);break;case"C":C.push(x.shift(),x.shift(),x.shift(),x.shift()),d=x.shift(),h=x.shift(),C.push(d,h);break;case"c":C.push(d+x.shift(),h+x.shift(),d+x.shift(),h+x.shift()),d+=x.shift(),h+=x.shift(),w="C",C.push(d,h);break;case"S":T=d,k=h,D=l[l.length-1],D?.command==="C"&&(T=d+(d-D.points[2]),k=h+(h-D.points[3])),C.push(T,k,x.shift(),x.shift()),d=x.shift(),h=x.shift(),w="C",C.push(d,h);break;case"s":T=d,k=h,D=l[l.length-1],D?.command==="C"&&(T=d+(d-D.points[2]),k=h+(h-D.points[3])),C.push(T,k,d+x.shift(),h+x.shift()),d+=x.shift(),h+=x.shift(),w="C",C.push(d,h);break;case"Q":C.push(x.shift(),x.shift()),d=x.shift(),h=x.shift(),C.push(d,h);break;case"q":C.push(d+x.shift(),h+x.shift()),d+=x.shift(),h+=x.shift(),w="Q",C.push(d,h);break;case"T":T=d,k=h,D=l[l.length-1],D?.command==="Q"&&(T=d+(d-D.points[0]),k=h+(h-D.points[1])),d=x.shift(),h=x.shift(),w="Q",C.push(T,k,d,h);break;case"t":T=d,k=h,D=l[l.length-1],D?.command==="Q"&&(T=d+(d-D.points[0]),k=h+(h-D.points[1])),d+=x.shift(),h+=x.shift(),w="Q",C.push(T,k,d,h);break;case"A":case"a":if(A=x.shift(),L=x.shift(),W=x.shift(),V=x.shift(),M=x.shift(),I=d,U=h,y==="a"?(d+=x.shift(),h+=x.shift()):(d=x.shift(),h=x.shift()),w="A",d===I&&h===U)continue;!A||!L?(w="L",C.push(d,h)):C=this.convertEndpointToCenterParameterization(I,U,d,h,V,M,A,L,W);break}l.push({command:w||y,points:C,start:{x:R,y:z},pathLength:this.calcLength(R,z,w||y,C)})}(y==="z"||y==="Z")&&l.push({command:"z",points:[],start:void 0,pathLength:0})}return l}static calcLength(t,i,r,a){let l,c,d,h;const p=kt;switch(r){case"L":return p.getLineLength(t,i,a[0],a[1]);case"C":return n3([t,a[0],a[2],a[4]],[i,a[1],a[3],a[5]],1);case"Q":return i3([t,a[0],a[2]],[i,a[1],a[3]],1);case"A":l=0;const m=a[4],v=a[5],b=a[4]+v;let y=Math.PI/180;if(Math.abs(m-b)<y&&(y=Math.abs(m-b)),c=p.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],m,0),v<0)for(h=m-y;h>b;h-=y)d=p.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],h,0),l+=p.getLineLength(c.x,c.y,d.x,d.y),c=d;else for(h=m+y;h<b;h+=y)d=p.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],h,0),l+=p.getLineLength(c.x,c.y,d.x,d.y),c=d;return d=p.getPointOnEllipticalArc(a[0],a[1],a[2],a[3],b,0),l+=p.getLineLength(c.x,c.y,d.x,d.y),l}return 0}static convertEndpointToCenterParameterization(t,i,r,a,l,c,d,h,p){const m=p*(Math.PI/180),v=Math.cos(m)*(t-r)/2+Math.sin(m)*(i-a)/2,b=-1*Math.sin(m)*(t-r)/2+Math.cos(m)*(i-a)/2,y=v*v/(d*d)+b*b/(h*h);y>1&&(d*=Math.sqrt(y),h*=Math.sqrt(y));let x=Math.sqrt((d*d*(h*h)-d*d*(b*b)-h*h*(v*v))/(d*d*(b*b)+h*h*(v*v)));l===c&&(x*=-1),isNaN(x)&&(x=0);const _=x*d*b/h,w=x*-h*v/d,C=(t+r)/2+Math.cos(m)*_-Math.sin(m)*w,R=(i+a)/2+Math.sin(m)*_+Math.cos(m)*w,z=function(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])},D=function(V,M){return(V[0]*M[0]+V[1]*M[1])/(z(V)*z(M))},T=function(V,M){return(V[0]*M[1]<V[1]*M[0]?-1:1)*Math.acos(D(V,M))},k=T([1,0],[(v-_)/d,(b-w)/h]),A=[(v-_)/d,(b-w)/h],L=[(-1*v-_)/d,(-1*b-w)/h];let W=T(A,L);return D(A,L)<=-1&&(W=Math.PI),D(A,L)>=1&&(W=0),c===0&&W>0&&(W=W-2*Math.PI),c===1&&W<0&&(W=W+2*Math.PI),[C,R,d,h,k,W,m,c]}}kt.prototype.className="Path";kt.prototype._attrsAffectingSize=["data"];zt(kt);B.addGetterSetter(kt,"data");class Ba extends Kr{_sceneFunc(t){super._sceneFunc(t);const i=Math.PI*2,r=this.points();let a=r;const l=this.tension()!==0&&r.length>4;l&&(a=this.getTensionPoints());const c=this.pointerLength(),d=r.length;let h,p;if(l){const b=[a[a.length-4],a[a.length-3],a[a.length-2],a[a.length-1],r[d-2],r[d-1]],y=kt.calcLength(a[a.length-4],a[a.length-3],"C",b),x=kt.getPointOnQuadraticBezier(Math.min(1,1-c/y),b[0],b[1],b[2],b[3],b[4],b[5]);h=r[d-2]-x.x,p=r[d-1]-x.y}else h=r[d-2]-r[d-4],p=r[d-1]-r[d-3];const m=(Math.atan2(p,h)+i)%i,v=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[d-2],r[d-1]),t.rotate(m),t.moveTo(0,0),t.lineTo(-c,v/2),t.lineTo(-c,-v/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),l?(h=(a[0]+a[2])/2-r[0],p=(a[1]+a[3])/2-r[1]):(h=r[2]-r[0],p=r[3]-r[1]),t.rotate((Math.atan2(-p,-h)+i)%i),t.moveTo(0,0),t.lineTo(-c,v/2),t.lineTo(-c,-v/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){const i=this.dashEnabled();i&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),i&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),i=this.pointerWidth()/2;return{x:t.x,y:t.y-i,width:t.width,height:t.height+i*2}}}Ba.prototype.className="Arrow";zt(Ba);B.addGetterSetter(Ba,"pointerLength",10,he());B.addGetterSetter(Ba,"pointerWidth",10,he());B.addGetterSetter(Ba,"pointerAtBeginning",!1);B.addGetterSetter(Ba,"pointerAtEnding",!0);class cl extends fe{_sceneFunc(t){t.beginPath(),t.arc(0,0,Math.abs(this.attrs.radius||0),0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return Math.abs(this.radius())*2}getHeight(){return Math.abs(this.radius())*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}cl.prototype._centroid=!0;cl.prototype.className="Circle";cl.prototype._attrsAffectingSize=["radius"];zt(cl);B.addGetterSetter(cl,"radius",0,he());class Uo extends fe{_sceneFunc(t){const i=Math.abs(this.radiusX()),r=Math.abs(this.radiusY());t.beginPath(),t.ellipse(0,0,i,r,0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return Math.abs(this.radiusX())*2}getHeight(){return Math.abs(this.radiusY())*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Uo.prototype.className="Ellipse";Uo.prototype._centroid=!0;Uo.prototype._attrsAffectingSize=["radiusX","radiusY"];zt(Uo);B.addComponentsGetterSetter(Uo,"radius",["x","y"]);B.addGetterSetter(Uo,"radiusX",0,he());B.addGetterSetter(Uo,"radiusY",0,he());let Hi=class h8 extends fe{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",i=>{this._removeImageLoad(i.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const t=!!this.cornerRadius(),i=this.hasShadow();return t&&i?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const i=this.getWidth(),r=this.getHeight(),a=this.cornerRadius(),l=this.attrs.image;if((this.hasFill()||this.hasStroke()||a)&&(t.beginPath(),a?F.drawRoundedRectPath(t,i,r,a):t.rect(0,0,i,r),t.closePath(),t.fillStrokeShape(this)),l){a&&t.clip();const c=this.attrs.cropWidth,d=this.attrs.cropHeight;c&&d?t.drawImage(l,this.cropX(),this.cropY(),c,d,0,0,i,r):t.drawImage(l,0,0,i,r)}}_hitFunc(t){const i=this.width(),r=this.height(),a=this.cornerRadius();t.beginPath(),a?F.drawRoundedRectPath(t,i,r,a):t.rect(0,0,i,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,i,r;return(r=(t=this.attrs.width)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.width)!==null&&r!==void 0?r:0}getHeight(){var t,i,r;return(r=(t=this.attrs.height)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.height)!==null&&r!==void 0?r:0}static fromURL(t,i,r=null){const a=F.createImageElement();a.onload=function(){const l=new h8({image:a});i(l)},a.onerror=r,a.crossOrigin="Anonymous",a.src=t}};Hi.prototype.className="Image";Hi.prototype._attrsAffectingSize=["image"];zt(Hi);B.addGetterSetter(Hi,"cornerRadius",0,Rh(4));B.addGetterSetter(Hi,"image");B.addComponentsGetterSetter(Hi,"crop",["x","y","width","height"]);B.addGetterSetter(Hi,"cropX",0,he());B.addGetterSetter(Hi,"cropY",0,he());B.addGetterSetter(Hi,"cropWidth",0,he());B.addGetterSetter(Hi,"cropHeight",0,he());const g8=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],RB="Change.konva",AB="none",Q0="up",J0="right",ev="down",tv="left",OB=g8.length;class sb extends Qs{constructor(t){super(t),this.on("add.konva",function(i){this._addListeners(i.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let i=this,r;const a=function(){i._sync()};for(r=0;r<OB;r++)t.on(g8[r]+RB,a)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),i=this.getTag(),r,a,l,c,d,h,p;if(t&&i){switch(r=t.width(),a=t.height(),l=i.pointerDirection(),c=i.pointerWidth(),p=i.pointerHeight(),d=0,h=0,l){case Q0:d=r/2,h=-1*p;break;case J0:d=r+c,h=a/2;break;case ev:d=r/2,h=a+p;break;case tv:d=-1*c,h=a/2;break}i.setAttrs({x:-1*d,y:-1*h,width:r,height:a}),t.setAttrs({x:-1*d,y:-1*h})}}}sb.prototype.className="Label";zt(sb);class Ga extends fe{_sceneFunc(t){const i=this.width(),r=this.height(),a=this.pointerDirection(),l=this.pointerWidth(),c=this.pointerHeight(),d=this.cornerRadius(),[h,p,m,v]=F._cornerRadii(d,i,r);t.beginPath(),t.moveTo(h,0),a===Q0&&(t.lineTo((i-l)/2,0),t.lineTo(i/2,-1*c),t.lineTo((i+l)/2,0)),t.lineTo(i-p,0),t.arc(i-p,p,p,Math.PI*3/2,0,!1),a===J0&&(t.lineTo(i,(r-c)/2),t.lineTo(i+l,r/2),t.lineTo(i,(r+c)/2)),t.lineTo(i,r-m),t.arc(i-m,r-m,m,0,Math.PI/2,!1),a===ev&&(t.lineTo((i+l)/2,r),t.lineTo(i/2,r+c),t.lineTo((i-l)/2,r)),t.lineTo(v,r),t.arc(v,r-v,v,Math.PI/2,Math.PI,!1),a===tv&&(t.lineTo(0,(r+c)/2),t.lineTo(-1*l,r/2),t.lineTo(0,(r-c)/2)),t.lineTo(0,h),t.arc(h,h,h,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,i=0,r=this.pointerWidth(),a=this.pointerHeight(),l=this.pointerDirection(),c=this.width(),d=this.height();return l===Q0?(i-=a,d+=a):l===ev?d+=a:l===tv?(t-=r,c+=r):l===J0&&(c+=r),{x:t,y:i,width:c,height:d}}}Ga.prototype.className="Tag";zt(Ga);B.addGetterSetter(Ga,"pointerDirection",AB);B.addGetterSetter(Ga,"pointerWidth",0,he());B.addGetterSetter(Ga,"pointerHeight",0,he());B.addGetterSetter(Ga,"cornerRadius",0,Rh(4));class pu extends fe{_sceneFunc(t){const i=this.cornerRadius(),r=this.width(),a=this.height();t.beginPath(),i?F.drawRoundedRectPath(t,r,a,i):t.rect(0,0,r,a),t.closePath(),t.fillStrokeShape(this)}}pu.prototype.className="Rect";zt(pu);B.addGetterSetter(pu,"cornerRadius",0,Rh(4));class Wo extends fe{_sceneFunc(t){const i=this._getPoints(),r=this.radius(),a=this.sides(),l=this.cornerRadius();if(i.length){if(t.beginPath(),l)F.drawRoundedPolygonPath(t,i,a,r,l);else{t.moveTo(i[0].x,i[0].y);for(let c=1;c<i.length;c++)t.lineTo(i[c].x,i[c].y)}t.closePath(),t.fillStrokeShape(this)}}_getPoints(){const t=this.attrs.sides,i=this.attrs.radius||0,r=[];for(let a=0;a<t;a++)r.push({x:i*Math.sin(a*2*Math.PI/t),y:-1*i*Math.cos(a*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();if(!t.length)return{x:0,y:0,width:0,height:0};let i=t[0].x,r=t[0].x,a=t[0].y,l=t[0].y;return t.forEach(c=>{i=Math.min(i,c.x),r=Math.max(r,c.x),a=Math.min(a,c.y),l=Math.max(l,c.y)}),{x:i,y:a,width:r-i,height:l-a}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Wo.prototype.className="RegularPolygon";Wo.prototype._centroid=!0;Wo.prototype._attrsAffectingSize=["radius"];zt(Wo);B.addGetterSetter(Wo,"radius",0,he());B.addGetterSetter(Wo,"sides",0,he());B.addGetterSetter(Wo,"cornerRadius",0,Rh(4));const l3=Math.PI*2;class Va extends fe{_sceneFunc(t){const i=Math.abs(this.innerRadius()),r=Math.abs(this.outerRadius());t.beginPath(),t.arc(0,0,i,0,l3,!1),t.moveTo(r,0),t.arc(0,0,r,l3,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return Math.abs(this.outerRadius())*2}getHeight(){return Math.abs(this.outerRadius())*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Va.prototype.className="Ring";Va.prototype._centroid=!0;Va.prototype._attrsAffectingSize=["innerRadius","outerRadius"];zt(Va);B.addGetterSetter(Va,"innerRadius",0,he());B.addGetterSetter(Va,"outerRadius",0,he());class br extends fe{constructor(t){super(t),this._updated=!0,this.anim=new wi(()=>{const i=this._updated;return this._updated=!1,i}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_getFrame(){var t,i;const r=this.animation(),a=(t=this.animations())===null||t===void 0?void 0:t[r],l=this.frameIndex(),c=l*4;if(!a||!Number.isInteger(l)||c<0||c+4>a.length)return;const d=((i=this.frameOffsets())===null||i===void 0?void 0:i[r])||[];return{x:a[c],y:a[c+1],width:a[c+2],height:a[c+3],offsetX:d[l*2]||0,offsetY:d[l*2+1]||0}}_sceneFunc(t){const i=this._getFrame();if(!i)return;const{x:r,y:a,width:l,height:c,offsetX:d,offsetY:h}=i,p=this.image();(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(d,h,l,c),t.closePath(),t.fillStrokeShape(this)),p&&t.drawImage(p,r,a,l,c,d,h,l,c)}_hitFunc(t){const{x:i,y:r,width:a,height:l}=this.getSelfRect();t.beginPath(),t.rect(i,r,a,l),t.closePath(),t.fillShape(this)}getSelfRect(){const t=this._getFrame();return t?{x:t.offsetX,y:t.offsetY,width:t.width,height:t.height}:{x:0,y:0,width:0,height:0}}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}destroy(){return this.stop(),super.destroy()}isRunning(){return this.anim.isRunning()}_updateIndex(){var t;const i=this.frameIndex(),r=(t=this.animations())===null||t===void 0?void 0:t[this.animation()],a=r?r.length/4:0;this.frameIndex(i<a-1?i+1:0)}}br.prototype.className="Sprite";zt(br);B.addGetterSetter(br,"animation");B.addGetterSetter(br,"animations");B.addGetterSetter(br,"frameOffsets");B.addGetterSetter(br,"image");B.addGetterSetter(br,"frameIndex",0,he());B.addGetterSetter(br,"frameRate",17,he());B.backCompat(br,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Yo extends fe{_sceneFunc(t){const i=this.innerRadius(),r=this.outerRadius(),a=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(let l=1;l<a*2;l++){const c=l%2===0?r:i,d=c*Math.sin(l*Math.PI/a),h=-1*c*Math.cos(l*Math.PI/a);t.lineTo(d,h)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Yo.prototype.className="Star";Yo.prototype._centroid=!0;Yo.prototype._attrsAffectingSize=["innerRadius","outerRadius"];zt(Yo);B.addGetterSetter(Yo,"numPoints",5,he());B.addGetterSetter(Yo,"innerRadius",0,he());B.addGetterSetter(Yo,"outerRadius",0,he());const c3=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"grapheme"}):null;function $f(e){return e/15}function Tf(e){return c3?Array.from(c3.segment(e),t=>t.segment):e.match(/\p{RI}\p{RI}|\P{M}(?:\p{M}|\p{Emoji_Modifier}|\uFE0F|\u200D\P{M})*|\p{M}+/gu)||[]}const Ps="auto",NB="center",p8="inherit",wc="justify",IB="Change.konva",m8="2d",PB="-",v8="left",MB="text",DB="Text",LB="top",jB="bottom",u3="middle",b8="normal",BB="px ",Wm=" ",GB="right",d3="rtl",VB="word",HB="char",f3="none",Ym="…",FB=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"];let Cc=null;function $B(){if(Cc!==null)return Cc;Cc=!1;let e;try{e=F.createCanvasElement(),e.width=10,e.height=10;const t=e.getContext(m8);if(t){t.globalAlpha=0,t.shadowColor="black",t.shadowBlur=5,t.shadowOffsetX=5,t.shadowOffsetY=5,t.fillStyle="black",t.font="10px Arial",t.fillText("X",0,10);const i=t.getImageData(0,0,10,10).data;for(let r=3;r<i.length;r+=4)if(i[r]>0){Cc=!0;break}}}catch{}finally{e&&F.releaseCanvas(e)}return Cc}function UB(e){return e.split(",").map(t=>{t=t.trim();const i=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return i&&!r&&(t=`"${t}"`),t}).join(", ")}let of;function kf(){return of||(of=F.createCanvasElement().getContext(m8),of)}function WB(e){this._partialFillStyle&&e.setAttr("fillStyle",this._partialFillStyle),e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function YB(e){e.setAttr("miterLimit",2),this._partialStrokeStyle&&e.setAttr("strokeStyle",this._partialStrokeStyle),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function qB(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class pt extends fe{constructor(t){super(qB(t)),this._partialTextX=0,this._partialTextY=0,this._setTextData()}_sceneFunc(t){var i,r;const a=this.textArr,l=a.length;if(!this.text())return;let c=this.padding(),d=this.fontSize(),h=this.lineHeight()*d,p=this.verticalAlign(),m=this.direction(),v=0,b=this.align(),y=this.getWidth(),x=this.letterSpacing(),_=this.charRenderFunc(),w=this.fill(),C=this.textDecoration(),R=this.underlineOffset(),z=C.indexOf("underline")!==-1,D=C.indexOf("line-through")!==-1,T;m=m===p8?t.direction:m;let k=h/2,A=u3;if(!pe.legacyTextRendering){const M=this.measureSize("M");A="alphabetic";const I=(i=M.fontBoundingBoxAscent)!==null&&i!==void 0?i:M.actualBoundingBoxAscent,U=(r=M.fontBoundingBoxDescent)!==null&&r!==void 0?r:M.actualBoundingBoxDescent;k=(I-U)/2+h/2}m===d3&&t.setAttr("direction",m),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",A),t.setAttr("textAlign",v8),p===u3?v=(this.getHeight()-l*h-c*2)/2:p===jB&&(v=this.getHeight()-l*h-c*2),t.translate(c,v+c);const L=_?t.fillStyle:void 0,W=_?t.strokeStyle:void 0;let V=0;for(T=0;T<l;T++){let M=0,I=0;const U=a[T],X=U.text,K=U.width,P=U.lastInParagraph;if(t.save(),b===GB?M+=y-K-c*2:b===NB&&(M+=(y-K-c*2)/2),z){t.save(),t.beginPath();const te=R??(pe.legacyTextRendering?Math.round(d/2):Math.round(d/4)),de=M,ce=k+I+te;t.moveTo(de,ce);const Ce=b===wc&&!P?y-c*2:K;t.lineTo(de+Math.round(Ce),ce),t.lineWidth=$f(d);const Ae=this._getLinearGradient();t.strokeStyle=Ae||w,t.stroke(),t.restore()}const ee=M;if(m!==d3&&(x!==0||b===wc||_)){const te=X.split(" ").length-1,de=Tf(X);for(let ce=0;ce<de.length;ce++){const Ce=de[ce];Ce===" "&&!P&&b===wc&&(M+=(y-c*2-K)/te),this._partialTextX=M,this._partialTextY=k+I,this._partialText=Ce;const Ae=t.measureText(Ce).width;if(_){t.save(),_({char:Ce,index:V,x:M,y:k+I,lineIndex:T,column:ce,isLastInLine:ce===de.length-1,width:Ae,context:t});const ge=t.fillStyle;ge!==L&&(this._partialFillStyle=ge);const G=t.strokeStyle;G!==W&&(this._partialStrokeStyle=G)}t.fillStrokeShape(this),_&&(this._partialFillStyle=void 0,this._partialStrokeStyle=void 0,t.restore()),M+=Ae+x,V++}}else x!==0&&t.setAttr("letterSpacing",`${x}px`),this._partialTextX=M,this._partialTextY=k+I,this._partialText=X,t.fillStrokeShape(this);if(D){t.save(),t.beginPath();const te=pe.legacyTextRendering?0:-Math.round(d/4),de=ee;t.moveTo(de,k+I+te);const ce=b===wc&&!P?y-c*2:K;t.lineTo(de+Math.round(ce),k+I+te),t.lineWidth=$f(d);const Ce=this._getLinearGradient();t.strokeStyle=Ce||w,t.stroke(),t.restore()}t.restore(),l>1&&(k+=h)}}_hitFunc(t){const i=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,i,r),t.closePath(),t.fillStrokeShape(this)}setText(t){const i=F._isString(t)?t:t==null?"":t+"";return this._setAttr(MB,i),this}getWidth(){return this.attrs.width===Ps||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===Ps||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return F.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var i,r,a,l,c,d,h,p,m,v,b;let y=kf(),x=this.fontSize(),_;y.save(),y.font=this._getContextFont(),_=y.measureText(t),y.restore();const w=x/100;return{actualBoundingBoxAscent:(i=_.actualBoundingBoxAscent)!==null&&i!==void 0?i:71.58203125*w,actualBoundingBoxDescent:(r=_.actualBoundingBoxDescent)!==null&&r!==void 0?r:0,actualBoundingBoxLeft:(a=_.actualBoundingBoxLeft)!==null&&a!==void 0?a:-7.421875*w,actualBoundingBoxRight:(l=_.actualBoundingBoxRight)!==null&&l!==void 0?l:75.732421875*w,alphabeticBaseline:(c=_.alphabeticBaseline)!==null&&c!==void 0?c:0,emHeightAscent:(d=_.emHeightAscent)!==null&&d!==void 0?d:100*w,emHeightDescent:(h=_.emHeightDescent)!==null&&h!==void 0?h:-20*w,fontBoundingBoxAscent:(p=_.fontBoundingBoxAscent)!==null&&p!==void 0?p:91*w,fontBoundingBoxDescent:(m=_.fontBoundingBoxDescent)!==null&&m!==void 0?m:21*w,hangingBaseline:(v=_.hangingBaseline)!==null&&v!==void 0?v:72.80000305175781*w,ideographicBaseline:(b=_.ideographicBaseline)!==null&&b!==void 0?b:-21*w,width:_.width,height:x}}_getContextFont(){return this.fontStyle()+Wm+this.fontVariant()+Wm+(this.fontSize()+BB)+UB(this.fontFamily())}_addTextLine(t){this.align()===wc&&(t=t.trim());const r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t,i){const r=this.letterSpacing(),a=r?r*(i??Tf(t).length):0;return kf().measureText(t).width+a}_setTextData(){let t=this.text().split(`
25
+ `),i=+this.fontSize(),r=0,a=this.lineHeight()*i,l=this.attrs.width,c=this.attrs.height,d=l!==Ps&&l!==void 0,h=c!==Ps&&c!==void 0,p=this.padding(),m=l-p*2,v=c-p*2,b=0,y=this.wrap(),x=y!==f3,_=y!==HB&&x,w=this.ellipsis();this.textArr=[],kf().font=this._getContextFont();const C=w?this._getTextWidth(Ym):0;for(let R=0,z=t.length;R<z;++R){let D=t[R],T=this._getTextWidth(D);if(d&&T>m){const k=Tf(D),A=k.length;let L=0;const W=I=>k.slice(L,I).join(""),V=I=>I===Wm||I===PB,M=Math.max(1,Math.ceil(A*m/T));for(;L<A;){const I=w&&h&&b+a>v?C:0;let U=0;const X=ee=>{const te=this._getTextWidth(W(ee),ee-L);return te+I>m?!1:(U=te,!0)};let K=L,P=Math.min(A,L+M);for(;X(P)&&(K=P,P!==A);)P=Math.min(A,P+(P-L));for(;P-K>1;){const ee=K+P>>>1;X(ee)?K=ee:P=ee}if(K===L)break;if(K===A){this._addTextLine(W(A)),b+=a,r=Math.max(r,U);break}if(_&&!V(k[K])){let ee=K-1;for(;ee>=L&&!V(k[ee]);)ee--;ee>=L&&(K=ee+1,U=this._getTextWidth(W(K),K-L))}if(this._addTextLine(W(K).trimRight()),r=Math.max(r,U),b+=a,this._shouldHandleEllipsis(b)){this._tryToAddEllipsisToLastLine();break}for(L=K;L<A&&!k[L].trim();)L++}}else this._addTextLine(D),b+=a,r=Math.max(r,T),this._shouldHandleEllipsis(b)&&R<z-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),h&&b+a>v)break}this.textHeight=i,this.textWidth=r}_shouldHandleEllipsis(t){const i=+this.fontSize(),r=this.lineHeight()*i,a=this.attrs.height,l=a!==Ps&&a!==void 0,c=this.padding(),d=a-c*2;return!(this.wrap()!==f3)||l&&t+r>d}_tryToAddEllipsisToLastLine(){const t=this.attrs.width,i=t!==Ps&&t!==void 0,r=this.padding(),a=t-r*2,l=this.ellipsis(),c=this.textArr[this.textArr.length-1];!c||!l||(i&&(this._getTextWidth(c.text+Ym)<a||(c.text=c.text.slice(0,c.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(c.text+Ym))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,i=this.hasShadow();return t&&i||i&&this.getAbsoluteOpacity()!==1&&$B()?!0:super._useBufferCanvas()}}pt.prototype._fillFunc=WB;pt.prototype._strokeFunc=YB;pt.prototype.className=DB;pt.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];zt(pt);pt.prototype.on(FB.map(e=>e+IB).join(" "),function(){this._setTextData()});B.overWriteSetter(pt,"width",rb());B.overWriteSetter(pt,"height",rb());B.addGetterSetter(pt,"direction",p8);B.addGetterSetter(pt,"fontFamily","Arial");B.addGetterSetter(pt,"fontSize",12,he());B.addGetterSetter(pt,"fontStyle",b8);B.addGetterSetter(pt,"fontVariant",b8);B.addGetterSetter(pt,"padding",0,he());B.addGetterSetter(pt,"align",v8);B.addGetterSetter(pt,"verticalAlign",LB);B.addGetterSetter(pt,"lineHeight",1,he());B.addGetterSetter(pt,"wrap",VB);B.addGetterSetter(pt,"ellipsis",!1,vr());B.addGetterSetter(pt,"letterSpacing",0,he());B.addGetterSetter(pt,"text","",La());B.addGetterSetter(pt,"textDecoration","");B.addGetterSetter(pt,"underlineOffset",void 0,he());B.addGetterSetter(pt,"charRenderFunc",void 0);const XB="",y8="normal";function x8(e){e.fillText(this.partialText,0,0)}function S8(e){e.strokeText(this.partialText,0,0)}class Mt extends fe{constructor(t){super(t),this.dataArray=[],this._readDataAttribute(),this._setTextData()}_getTextPathLength(){return kt.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const i=this.pathLength;return t>i?null:kt.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=kt.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();const i=this.textDecoration(),r=this.fill(),a=this.fontSize(),l=this.glyphInfo,c=i.indexOf("underline")!==-1,d=i.indexOf("line-through")!==-1;c&&t.beginPath();for(let h=0;h<l.length;h++){t.save();const p=l[h].p0;t.translate(p.x,p.y),t.rotate(l[h].rotation),this.partialText=l[h].text,t.fillStrokeShape(this),c&&(h===0&&t.moveTo(0,a/2+1),t.lineTo(l[h].width,a/2+1)),t.restore()}if(c&&(t.strokeStyle=r,t.lineWidth=$f(a),t.stroke()),d){t.beginPath();for(let h=0;h<l.length;h++){t.save();const p=l[h].p0;t.translate(p.x,p.y),t.rotate(l[h].rotation),h===0&&t.moveTo(0,0),t.lineTo(l[h].width,0),t.restore()}t.strokeStyle=r,t.lineWidth=$f(a),t.stroke()}t.restore()}_hitFunc(t){t.beginPath();const i=this.glyphInfo;if(i.length>=1){const r=i[0].p0;t.moveTo(r.x,r.y)}for(let r=0;r<i.length;r++){const a=i[r].p1;t.lineTo(a.x,a.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return F.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return pt.prototype.setText.call(this,t)}_getContextFont(){return pt.prototype._getContextFont.call(this)}_getTextSize(t){const i=kf();i.save(),i.font=this._getContextFont();const r=i.measureText(t);return i.restore(),{width:r.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const t=Tf(this.text());this.direction()==="rtl"&&t.reverse();const i=[];let r=0;for(let y=0;y<t.length;y++)i.push({char:t[y],width:this._getTextSize(t[y]).width}),r+=i[y].width;const{width:a,height:l}=this._getTextSize(this.attrs.text);if(this.textWidth=r,this.textHeight=l,this.glyphInfo=[],!this.attrs.data)return null;const c=this.letterSpacing(),d=this.align(),h=this.kerningFunc(),p=Math.max(0,r-a),m=Math.max(this.textWidth+(t.length-1)*c,0);let v=0;d==="center"&&(v=Math.max(0,this.pathLength/2-m/2)),d==="right"&&(v=Math.max(0,this.pathLength-m));let b=v;for(let y=0;y<i.length;y++){const x=this._getPointAtLength(b);if(!x)return;const _=i[y].char;let w=i[y].width+c;if(_===" "&&d==="justify"){const A=this.text().split(" ").length-1;w+=(this.pathLength-m)/A}const C=b+w,R=this._getPointAtLength(C>this.pathLength&&C-this.pathLength<=p?this.pathLength:C);if(!R)return;const z=kt.getLineLength(x.x,x.y,R.x,R.y);let D=0;if(h&&y>0)try{D=h(i[y-1].char,_)*this.fontSize()}catch{D=0}x.x+=D,R.x+=D,this.textWidth+=D;const T=kt.getPointOnLine(D+z/2,x.x,x.y,R.x,R.y),k=Math.atan2(R.y-x.y,R.x-x.x);this.glyphInfo.push({transposeX:T.x,transposeY:T.y,text:t[y],rotation:k,p0:x,p1:R,width:z}),b+=w}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const t=[];this.glyphInfo.forEach(function(a){t.push(a.p0.x),t.push(a.p0.y),t.push(a.p1.x),t.push(a.p1.y)});const i=F._getPointsRect(t),r=this.fontSize();return{x:i.x-r/2,y:i.y-r/2,width:i.width+r,height:i.height+r}}}Mt.prototype._fillFunc=x8;Mt.prototype._strokeFunc=S8;Mt.prototype._fillFuncHit=x8;Mt.prototype._strokeFuncHit=S8;Mt.prototype.className="TextPath";Mt.prototype._attrsAffectingSize=["text","fontSize","data"];zt(Mt);Mt.prototype.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()});Mt.prototype.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva fontStyleChange.konva fontVariantChange.konva directionChange.konva",function(){this._setTextData()});B.addGetterSetter(Mt,"data");B.addGetterSetter(Mt,"fontFamily","Arial");B.addGetterSetter(Mt,"fontSize",12,he());B.addGetterSetter(Mt,"fontStyle",y8);B.addGetterSetter(Mt,"align","left");B.addGetterSetter(Mt,"letterSpacing",0,he());B.addGetterSetter(Mt,"textBaseline","middle");B.addGetterSetter(Mt,"fontVariant",y8);B.addGetterSetter(Mt,"text",XB);B.addGetterSetter(Mt,"textDecoration","");B.addGetterSetter(Mt,"kerningFunc",void 0);B.addGetterSetter(Mt,"direction","inherit");const _8="tr-konva",ZB=["resizeEnabledChange","rotateAnchorOffsetChange","rotateAnchorAngleChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange","paddingChange"].map(e=>e+`.${_8}`).join(" "),h3="nodesRect",KB=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],QB={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},JB="ontouchstart"in pe._global;function eG(e,t,i){if(e==="rotater")return i;t+=F.degToRad(QB[e]||0);const r=(F.radToDeg(t)%360+360)%360;return F._inRange(r,315+22.5,360)||F._inRange(r,0,22.5)?"ns-resize":F._inRange(r,45-22.5,45+22.5)?"nesw-resize":F._inRange(r,90-22.5,90+22.5)?"ew-resize":F._inRange(r,135-22.5,135+22.5)?"nwse-resize":F._inRange(r,180-22.5,180+22.5)?"ns-resize":F._inRange(r,225-22.5,225+22.5)?"nesw-resize":F._inRange(r,270-22.5,270+22.5)?"ew-resize":F._inRange(r,315-22.5,315+22.5)?"nwse-resize":(F.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}const Uf=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function tG(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function nG(e,t,i){const r=i.x+(e.x-i.x)*Math.cos(t)-(e.y-i.y)*Math.sin(t),a=i.y+(e.x-i.x)*Math.sin(t)+(e.y-i.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:a}}function iG(e,t){const i=tG(e);return nG(e,t,i)}function rG(e,t,i){let r=t;for(let a=0;a<e.length;a++){const l=pe.getAngle(e[a]),c=Math.abs(l-t)%(Math.PI*2);Math.min(c,Math.PI*2-c)<i&&(r=l)}return r}const zf=new Set;class $e extends Qs{static _isLayerTransforming(t){for(const i of zf)if(i.getLayer()===t||i._nodes.some(r=>r.getLayer()===t))return!0;return!1}constructor(t){super(t),this._movingAnchorName=null,this._anchors={},this._transforming=!1,this._fitting=!1,this._transformWindow=null,this._elementsCreated=!1,this._updateScheduled=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(ZB,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return F.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return _8+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const i=t.filter(r=>r.isAncestorOf(this)?(F.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=t=i,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(r=>{const a=()=>{var l;if(this._fitting){(l=this._nodeRectCache)===null||l===void 0||l.delete(r);return}this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(r),this.isDragging()||this._scheduleUpdate()};if(r._attrsAffectingSize.length){const l=r._attrsAffectingSize.map(c=>c+"Change."+this._getEventNamespace()).join(" ");r.on(l,a)}r.on(KB.map(l=>l+`.${this._getEventNamespace()}`).join(" "),a),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,a),r.on(`destroy.${this._getEventNamespace()}`,()=>{this.setNodes(this._nodes.filter(l=>l!==r))}),this._proxyDrag(r)}),this._resetTransformCache(),this._elementsCreated&&this.update(),this}_proxyDrag(t){let i;t.on(`dragstart.${this._getEventNamespace()}`,r=>{i=t.getAbsolutePosition(),!this.isDragging()&&t!==this._back&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!i)return;const a=t.getAbsolutePosition(),l=a.x-i.x,c=a.y-i.y;this.nodes().forEach(d=>{if(d===t||d.isDragging())return;const h=d.getAbsolutePosition();d.setAbsolutePosition({x:h.x+l,y:h.y+c}),d.startDrag(r)}),i=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(t){var i,r;t?(i=this._nodeRectCache)===null||i===void 0||i.delete(t):(r=this._nodeRectCache)===null||r===void 0||r.clear(),this._clearCache(h3),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(h3,this.__getNodeRect)}__getNodeRect(){var t;if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const r=pe.getAngle(this.rotation()),a=this.ignoreStroke(),l=new li;l.rotate(-r);const c=this._nodeRectCache||(this._nodeRectCache=new Map);let d=1/0,h=1/0,p=-1/0,m=-1/0;for(const b of this.nodes()){const y=b instanceof fe&&b.getSelfRect===fe.prototype.getSelfRect&&!b._hasCachedAncestor(),x=y?b.width():0,_=y?b.height():0;y&&((t=b._attrsVersion)!==null&&t!==void 0||(b._attrsVersion=0));let w=y?c.get(b):void 0;if(!w||w.rotation!==r||w.ignoreStroke!==a||w.version!==b._attrsVersion||w.width!==x||w.height!==_){const C=b.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:a}),R=[{x:C.x,y:C.y},{x:C.x+C.width,y:C.y},{x:C.x+C.width,y:C.y+C.height},{x:C.x,y:C.y+C.height}],z=b.getAbsoluteTransform();w={rotation:r,ignoreStroke:a,width:x,height:_,version:b._attrsVersion||0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};for(const D of R){const T=l.point(z.point(D));w.minX=Math.min(w.minX,T.x),w.minY=Math.min(w.minY,T.y),w.maxX=Math.max(w.maxX,T.x),w.maxY=Math.max(w.maxY,T.y)}y&&c.set(b,w)}d=Math.min(d,w.minX),h=Math.min(h,w.minY),p=Math.max(p,w.maxX),m=Math.max(m,w.maxY)}l.invert();const v=l.point({x:d,y:h});return{x:v.x,y:v.y,width:p-d,height:m-h,rotation:pe.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),Uf.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater"),this._elementsCreated=!0}_createAnchor(t){const i=new pu({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:JB?10:"auto"});this._anchors[t]=i;const r=this;i.on("mousedown touchstart",function(a){r._handleMouseDown(a)}),i.on("dragstart",a=>{i.stopDrag(),a.cancelBubble=!0}),i.on("dragend",a=>{a.cancelBubble=!0}),i.on("mouseenter",()=>{const a=pe.getAngle(this.rotation()),l=this.rotateAnchorCursor(),c=eG(t,a,l);i.getStage().content&&(i.getStage().content.style.cursor=c),this._cursorChange=!0}),i.on("mouseout",()=>{i.getStage().content&&(i.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(i)}_createBack(){const t=new fe({name:"back",width:0,height:0,sceneFunc(i,r){const a=r.getParent(),l=a.padding(),c=r.width(),d=r.height();if(i.beginPath(),i.rect(-l,-l,c+l*2,d+l*2),a.rotateEnabled()&&a.rotateLineVisible()){const h=a.rotateAnchorAngle(),p=a.rotateAnchorOffset(),m=F.degToRad(h),v=Math.sin(m),b=-Math.cos(m),y=c/2,x=d/2;let _=1/0;b<0?_=Math.min(_,-x/b):b>0&&(_=Math.min(_,(d-x)/b)),v<0?_=Math.min(_,-y/v):v>0&&(_=Math.min(_,(c-y)/v));const w=y+v*_,C=x+b*_,R=F._sign(d),z=w+v*p*R,D=C+b*p*R;i.moveTo(w,C),i.lineTo(z,D)}i.fillStrokeShape(r)},hitFunc:(i,r)=>{if(!this.shouldOverdrawWholeArea())return;const a=this.padding();i.beginPath(),i.rect(-a,-a,r.width()+a*2,r.height()+a*2),i.fillStrokeShape(r)}});this._back=t,this.add(t),this._proxyDrag(t),t.on("dragstart",i=>{i.cancelBubble=!0}),t.on("dragmove",i=>{i.cancelBubble=!0}),t.on("dragend",i=>{i.cancelBubble=!0}),this.on("dragmove",i=>{this.update()})}_handleMouseDown(t){var i,r;if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];const a=this._getNodeRect(),l=a.width,c=a.height,d=Math.sqrt(Math.pow(l,2)+Math.pow(c,2));this.sin=Math.abs(c/d),this.cos=Math.abs(l/d);const h=(i=this.getStage())===null||i===void 0?void 0:i._getOwnerWindow();this._transformWindow=h||null,h&&(h.addEventListener("mousemove",this._handleMouseMove),h.addEventListener("touchmove",this._handleMouseMove),h.addEventListener("mouseup",this._handleMouseUp,!0),h.addEventListener("touchend",this._handleMouseUp,!0),h.addEventListener("touchcancel",this._handleMouseUp,!0)),this._transforming=!0,this._pointerId=(r=t.pointerId)!==null&&r!==void 0?r:F._getFirstPointerId(t.evt);const p=t.target.getAbsolutePosition(),m=t.target.getStage()._getPointerById(this._pointerId);this._anchorDragOffset={x:m.x-p.x,y:m.y-p.y},zf.add(this),this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(v=>{v._fire("transformstart",{evt:t.evt,target:v})})}_handleMouseMove(t){var i;(i=this.getStage())===null||i===void 0||i._batchEvents(()=>this._moveTransform(t))}_moveTransform(t){let i,r,a;const l=this._anchors[this._movingAnchorName],c=l.getStage();c.setPointersPositions(t);const d=c._getPointerById(this._pointerId);if(!d)return;let h={x:d.x-this._anchorDragOffset.x,y:d.y-this._anchorDragOffset.y};const p=l.getAbsolutePosition();this.anchorDragBoundFunc()&&(h=this.anchorDragBoundFunc()(p,h,t)),l.setAbsolutePosition(h);const m=l.getAbsolutePosition();if(p.x===m.x&&p.y===m.y)return;if(this._movingAnchorName==="rotater"){const z=this._getNodeRect();i=l.x()-z.width/2,r=-l.y()+z.height/2;const D=pe.getAngle(this.rotateAnchorAngle());let T=Math.atan2(-r,i)+Math.PI/2-D;z.height<0&&(T-=Math.PI);const A=pe.getAngle(this.rotation())+T,L=pe.getAngle(this.rotationSnapTolerance()),V=rG(this.rotationSnaps(),A,L)-z.rotation,M=iG(z,V);this._fitNodesInto(M,t);return}const v=this.shiftBehavior();let b;v==="inverted"?b=this.keepRatio()&&!t.shiftKey:v==="none"?b=this.keepRatio():b=this.keepRatio()||t.shiftKey;let y=this.centeredScaling()||t.altKey,x=!1;if(this._movingAnchorName==="top-left"){if(b){x=!0;const z=y?{x:this.width()/2,y:this.height()/2}:{x:this._anchors["bottom-right"].x(),y:this._anchors["bottom-right"].y()};a=Math.sqrt(Math.pow(z.x-l.x(),2)+Math.pow(z.y-l.y(),2));const D=this._anchors["top-left"].x()>z.x?-1:1,T=this._anchors["top-left"].y()>z.y?-1:1;i=a*this.cos*D,r=a*this.sin*T,this._anchors["top-left"].x(z.x-i),this._anchors["top-left"].y(z.y-r)}}else if(this._movingAnchorName==="top-center")this._anchors["top-left"].y(l.y());else if(this._movingAnchorName==="top-right"){if(b){x=!0;const z=y?{x:this.width()/2,y:this.height()/2}:{x:this._anchors["bottom-left"].x(),y:this._anchors["bottom-left"].y()};a=Math.sqrt(Math.pow(l.x()-z.x,2)+Math.pow(z.y-l.y(),2));const D=this._anchors["top-right"].x()<z.x?-1:1,T=this._anchors["top-right"].y()>z.y?-1:1;i=a*this.cos*D,r=a*this.sin*T,this._anchors["top-right"].x(z.x+i),this._anchors["top-right"].y(z.y-r)}var _=l.position();this._anchors["top-left"].y(_.y),this._anchors["bottom-right"].x(_.x)}else if(this._movingAnchorName==="middle-left")this._anchors["top-left"].x(l.x());else if(this._movingAnchorName==="middle-right")this._anchors["bottom-right"].x(l.x());else if(this._movingAnchorName==="bottom-left"){if(b){x=!0;const z=y?{x:this.width()/2,y:this.height()/2}:{x:this._anchors["top-right"].x(),y:this._anchors["top-right"].y()};a=Math.sqrt(Math.pow(z.x-l.x(),2)+Math.pow(l.y()-z.y,2));const D=z.x<l.x()?-1:1,T=l.y()<z.y?-1:1;i=a*this.cos*D,r=a*this.sin*T,l.x(z.x-i),l.y(z.y+r)}_=l.position(),this._anchors["top-left"].x(_.x),this._anchors["bottom-right"].y(_.y)}else if(this._movingAnchorName==="bottom-center")this._anchors["bottom-right"].y(l.y());else if(this._movingAnchorName==="bottom-right"){if(b){x=!0;const z=y?{x:this.width()/2,y:this.height()/2}:{x:this._anchors["top-left"].x(),y:this._anchors["top-left"].y()};a=Math.sqrt(Math.pow(l.x()-z.x,2)+Math.pow(l.y()-z.y,2));const D=this._anchors["bottom-right"].x()<z.x?-1:1,T=this._anchors["bottom-right"].y()<z.y?-1:1;i=a*this.cos*D,r=a*this.sin*T,this._anchors["bottom-right"].x(z.x+i),this._anchors["bottom-right"].y(z.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(y=this.centeredScaling()||t.altKey,y){const z=this._anchors["top-left"],D=this._anchors["bottom-right"],T=z.x(),k=z.y(),A=this.getWidth()-D.x(),L=this.getHeight()-D.y();D.move({x:-T,y:-k}),z.move({x:A,y:L})}const w=this._anchors["top-left"].getAbsolutePosition();i=w.x,r=w.y;const C=this._anchors["bottom-right"].x()-this._anchors["top-left"].x(),R=this._anchors["bottom-right"].y()-this._anchors["top-left"].y();this._fitNodesInto({x:i,y:r,width:C,height:R,rotation:pe.getAngle(this.rotation())},t,x)}_handleMouseUp(t){const i=this.getStage();i&&(i.setPointersPositions(t),!i._changedPointerPositions.some(r=>r.id===this._pointerId))||(i?i._batchEvents(()=>this._removeEvents(t)):this._removeEvents(t))}getAbsoluteTransform(t){const i=this.getTransform();return t?t.getAbsoluteTransform().copy().invert().multiply(i):i}_removeEvents(t){var i;if(this._transforming){this._transforming=!1;const r=this._transformWindow;this._transformWindow=null,r&&(r.removeEventListener("mousemove",this._handleMouseMove),r.removeEventListener("touchmove",this._handleMouseMove),r.removeEventListener("mouseup",this._handleMouseUp,!0),r.removeEventListener("touchend",this._handleMouseUp,!0),r.removeEventListener("touchcancel",this._handleMouseUp,!0));const a=this.getNode();zf.delete(this),this._fire("transformend",{evt:t,target:a}),(i=this.getLayer())===null||i===void 0||i.batchDraw(),a&&this._nodes.forEach(l=>{var c;l._fire("transformend",{evt:t,target:l}),(c=l.getLayer())===null||c===void 0||c.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,i,r=!1){const a=pe.autoDrawEnabled;pe.autoDrawEnabled=!1,this._fitting=!0;try{return this._doFitNodesInto(t,i,r)}finally{pe.autoDrawEnabled=a,this._fitting=!1}}_doFitNodesInto(t,i,r=!1){const a=this._getNodeRect(),l=1;if(!a.width||!a.height||F._inRange(t.width,-this.padding()*2-l,l)||F._inRange(t.height,-this.padding()*2-l,l)){this.update();return}const c=new li;c.rotate(pe.getAngle(this.rotation()));const d=r?0:this.padding()*2;let h=null,p=null;if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const C=c.point({x:-d,y:0});t.x+=C.x,t.y+=C.y,t.width+=d,h={axis:"width",from:"left",to:"right",offset:C}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const C=c.point({x:d,y:0});t.width+=d,h={axis:"width",from:"right",to:"left",offset:C}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const C=c.point({x:0,y:-d});t.x+=C.x,t.y+=C.y,t.height+=d,p={axis:"height",from:"top",to:"bottom",offset:C}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const C=c.point({x:0,y:d});t.height+=d,p={axis:"height",from:"bottom",to:"top",offset:C}}if(this.boundBoxFunc()){const C=this.boundBoxFunc()(a,t);C?t=C:F.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}for(const C of[h,p])C&&t[C.axis]<0&&this._movingAnchorName&&(this._movingAnchorName=this._movingAnchorName.replace(C.from,C.to),this._anchorDragOffset.x-=C.offset.x,this._anchorDragOffset.y-=C.offset.y);const m=1e7,v=new li;v.translate(a.x,a.y),v.rotate(a.rotation),v.scale(a.width/m,a.height/m);const b=new li,y=t.width/m,x=t.height/m;this.flipEnabled()===!1?(b.translate(t.x,t.y),b.rotate(t.rotation),b.translate(t.width<0?t.width:0,t.height<0?t.height:0),b.scale(Math.abs(y),Math.abs(x))):(b.translate(t.x,t.y),b.rotate(t.rotation),b.scale(y,x));const _=b.multiply(v.invert()),w=new Set;this._nodes.forEach(C=>{if(!C.getStage())return;const R=C.getParent().getAbsoluteTransform(),z=C.getTransform().copy();z.translate(C.offsetX(),C.offsetY());const D=new li;D.multiply(R.copy().invert()).multiply(_).multiply(R).multiply(z);const T=D.decompose();C.setAttrs(T);const k=C.getLayer();k&&w.add(k)}),this.rotation(F._getRotation(t.rotation)),this._nodes.forEach(C=>{this._fire("transform",{evt:i,target:C}),C._fire("transform",{evt:i,target:C})}),this._resetTransformCache(),this.update(),w.add(this.getLayer()),w.forEach(C=>C&&C.batchDraw())}_scheduleUpdate(){this._updateScheduled||(this._updateScheduled=!0,me._runAfterAbsTransformCascade(()=>{var t;this._updateScheduled=!1,!(!(!((t=this._nodes)===null||t===void 0)&&t.length)||this._fitting||this.isDragging())&&this._update()}))}forceUpdate(){this._resetTransformCache(),this.update()}update(){this._lastNodeRect=void 0,this._update()}_update(){var t;const i=this._getNodeRect();this._updateElements(i);const r=this.nodes().some(l=>l.draggable());this._back.draggable()!==r&&this._back.draggable(r);const a=this.anchorStyleFunc();a&&Object.values(this._anchors).forEach(l=>a(l)),(t=this.getLayer())===null||t===void 0||t.batchDraw()}_updateElements(t){const i=this._lastNodeRect;if(i&&!this.anchorStyleFunc()&&t.x===i.x&&t.y===i.y&&t.width===i.width&&t.height===i.height&&t.rotation===i.rotation)return;this._lastNodeRect={...t},this.rotation(F._getRotation(t.rotation));const r=t.width,a=t.height,l=this.enabledAnchors(),c=this.resizeEnabled(),d=this.padding(),h=this.anchorSize();Object.values(this._anchors).forEach(T=>{T.setAttrs({width:h,height:h,offsetX:h/2,offsetY:h/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._anchors["top-left"].setAttrs({x:0,y:0,offsetX:h/2+d,offsetY:h/2+d,visible:c&&l.indexOf("top-left")>=0}),this._anchors["top-center"].setAttrs({x:r/2,y:0,offsetY:h/2+d,visible:c&&l.indexOf("top-center")>=0}),this._anchors["top-right"].setAttrs({x:r,y:0,offsetX:h/2-d,offsetY:h/2+d,visible:c&&l.indexOf("top-right")>=0}),this._anchors["middle-left"].setAttrs({x:0,y:a/2,offsetX:h/2+d,visible:c&&l.indexOf("middle-left")>=0}),this._anchors["middle-right"].setAttrs({x:r,y:a/2,offsetX:h/2-d,visible:c&&l.indexOf("middle-right")>=0}),this._anchors["bottom-left"].setAttrs({x:0,y:a,offsetX:h/2+d,offsetY:h/2-d,visible:c&&l.indexOf("bottom-left")>=0}),this._anchors["bottom-center"].setAttrs({x:r/2,y:a,offsetY:h/2-d,visible:c&&l.indexOf("bottom-center")>=0}),this._anchors["bottom-right"].setAttrs({x:r,y:a,offsetX:h/2-d,offsetY:h/2-d,visible:c&&l.indexOf("bottom-right")>=0});const m=this.rotateAnchorAngle(),v=this.rotateAnchorOffset(),b=F.degToRad(m),y=Math.sin(b),x=-Math.cos(b),_=r/2,w=a/2;let C=1/0;x<0?C=Math.min(C,-w/x):x>0&&(C=Math.min(C,(a-w)/x)),y<0?C=Math.min(C,-_/y):y>0&&(C=Math.min(C,(r-_)/y));const R=_+y*C,z=w+x*C,D=F._sign(a);this._anchors.rotater.setAttrs({x:R+y*v*D,y:z+x*v*D-d*x,visible:this.rotateEnabled()}),this._back.setAttrs({width:r,height:a,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0})}isTransforming(){return this._transforming}stopTransform(){this._transforming&&this._removeEvents()}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Qs.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}add(...t){return this._elementsCreated?(F.error("You cannot add external nodes to the Transformer. Use tr.nodes([node]) instead."),this):super.add(...t)}toObject(){return me.prototype.toObject.call(this)}clone(t){return me.prototype.clone.call(this,t)}getClientRect(t){return this.nodes().length>0?super.getClientRect(t):{x:0,y:0,width:0,height:0}}}$e.isTransforming=()=>zf.size>0;function oG(e){return e instanceof Array||F.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){Uf.indexOf(t)===-1&&F.warn("Unknown anchor name: "+t+". Available names are: "+Uf.join(", "))}),e||[]}$e.prototype.className="Transformer";zt($e);B.addGetterSetter($e,"enabledAnchors",Uf,oG);B.addGetterSetter($e,"flipEnabled",!0,vr());B.addGetterSetter($e,"resizeEnabled",!0);B.addGetterSetter($e,"anchorSize",10,he());B.addGetterSetter($e,"rotateEnabled",!0);B.addGetterSetter($e,"rotateLineVisible",!0);B.addGetterSetter($e,"rotationSnaps",[]);B.addGetterSetter($e,"rotateAnchorOffset",50,he());B.addGetterSetter($e,"rotateAnchorAngle",0,he());B.addGetterSetter($e,"rotateAnchorCursor","crosshair");B.addGetterSetter($e,"rotationSnapTolerance",5,he());B.addGetterSetter($e,"borderEnabled",!0);B.addGetterSetter($e,"anchorStroke","rgb(0, 161, 255)");B.addGetterSetter($e,"anchorStrokeWidth",1,he());B.addGetterSetter($e,"anchorFill","white");B.addGetterSetter($e,"anchorCornerRadius",0,he());B.addGetterSetter($e,"borderStroke","rgb(0, 161, 255)");B.addGetterSetter($e,"borderStrokeWidth",1,he());B.addGetterSetter($e,"borderDash");B.addGetterSetter($e,"keepRatio",!0);B.addGetterSetter($e,"shiftBehavior","default");B.addGetterSetter($e,"centeredScaling",!1);B.addGetterSetter($e,"ignoreStroke",!1);B.addGetterSetter($e,"padding",0,he());B.addGetterSetter($e,"nodes");B.addGetterSetter($e,"node");B.addGetterSetter($e,"boundBoxFunc");B.addGetterSetter($e,"anchorDragBoundFunc");B.addGetterSetter($e,"anchorStyleFunc");B.addGetterSetter($e,"shouldOverdrawWholeArea",!1);B.addGetterSetter($e,"useSingleNodeRotation",!0);B.backCompat($e,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Qr extends fe{_sceneFunc(t){t.beginPath(),t.arc(0,0,Math.abs(this.radius()),0,pe.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return Math.abs(this.radius())*2}getHeight(){return Math.abs(this.radius())*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Qr.prototype.className="Wedge";Qr.prototype._centroid=!0;Qr.prototype._attrsAffectingSize=["radius"];zt(Qr);B.addGetterSetter(Qr,"radius",0,he());B.addGetterSetter(Qr,"angle",0,he());B.addGetterSetter(Qr,"clockwise",!1);B.backCompat(Qr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function g3(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const aG=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],sG=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Lr(e,t){return t===255?e:e*t/255}const lG=180;function cG(e,t){const i=e.data,r=e.width,a=e.height;let l,c,d,h,p,m,v,b,y,x,_,w,C,R,z,D,T,k,A,L;const W=t+t+1,V=r-1,M=a-1,I=t+1,U=I*(I+1)/2,X=new g3,K=aG[t],P=sG[t];let ee=null,te=X,de=null,ce=null;for(let Ce=1;Ce<W;Ce++)te=te.next=new g3,Ce===I&&(ee=te);te.next=X,d=c=0;for(let Ce=0;Ce<a;Ce++){w=C=R=z=h=p=m=v=0,A=i[c+3],D=Lr(i[c],A),T=Lr(i[c+1],A),k=Lr(i[c+2],A),b=I*D,y=I*T,x=I*k,_=I*A,h+=U*D,p+=U*T,m+=U*k,v+=U*A,te=X;for(let Ae=0;Ae<I;Ae++)te.r=D,te.g=T,te.b=k,te.a=A,te=te.next;for(let Ae=1;Ae<I;Ae++)l=c+((V<Ae?V:Ae)<<2),A=i[l+3],h+=(te.r=D=Lr(i[l],A))*(L=I-Ae),p+=(te.g=T=Lr(i[l+1],A))*L,m+=(te.b=k=Lr(i[l+2],A))*L,v+=(te.a=A)*L,w+=D,C+=T,R+=k,z+=A,te=te.next;de=X,ce=ee;for(let Ae=0;Ae<r;Ae++)i[c]=h*K>>P,i[c+1]=p*K>>P,i[c+2]=m*K>>P,i[c+3]=v*K>>P,h-=b,p-=y,m-=x,v-=_,b-=de.r,y-=de.g,x-=de.b,_-=de.a,l=d+((l=Ae+t+1)<V?l:V)<<2,A=i[l+3],w+=de.r=Lr(i[l],A),C+=de.g=Lr(i[l+1],A),R+=de.b=Lr(i[l+2],A),z+=de.a=A,h+=w,p+=C,m+=R,v+=z,de=de.next,b+=D=ce.r,y+=T=ce.g,x+=k=ce.b,_+=A=ce.a,w-=D,C-=T,R-=k,z-=A,ce=ce.next,c+=4;d+=r}for(let Ce=0;Ce<r;Ce++){C=R=z=w=p=m=v=h=0,c=Ce<<2,b=I*(D=i[c]),y=I*(T=i[c+1]),x=I*(k=i[c+2]),_=I*(A=i[c+3]),h+=U*D,p+=U*T,m+=U*k,v+=U*A,te=X;for(let ge=0;ge<I;ge++)te.r=D,te.g=T,te.b=k,te.a=A,te=te.next;let Ae=Math.min(1,M)*r;for(let ge=1;ge<=t;ge++)c=Ae+Ce<<2,h+=(te.r=D=i[c])*(L=I-ge),p+=(te.g=T=i[c+1])*L,m+=(te.b=k=i[c+2])*L,v+=(te.a=A=i[c+3])*L,w+=D,C+=T,R+=k,z+=A,te=te.next,ge<M&&(Ae+=r);c=Ce,de=X,ce=ee;for(let ge=0;ge<a;ge++)l=c<<2,i[l+3]=A=v*K>>P,A>0?(A=255/A,i[l]=(h*K>>P)*A,i[l+1]=(p*K>>P)*A,i[l+2]=(m*K>>P)*A):i[l]=i[l+1]=i[l+2]=0,h-=b,p-=y,m-=x,v-=_,b-=de.r,y-=de.g,x-=de.b,_-=de.a,l=Ce+((l=ge+I)<M?l:M)*r<<2,h+=w+=de.r=i[l],p+=C+=de.g=i[l+1],m+=R+=de.b=i[l+2],v+=z+=de.a=i[l+3],de=de.next,b+=D=ce.r,y+=T=ce.g,x+=k=ce.b,_+=A=ce.a,w-=D,C-=T,R-=k,z-=A,ce=ce.next,c+=r}}const uG=function(t){const i=Math.min(Math.round(this.blurRadius()),lG);i>0&&cG(t,i)};B.addGetterSetter(me,"blurRadius",0,he(),B.afterSetFilter);const dG=function(e){const t=this.brightness()*255,i=e.data,r=i.length;for(let a=0;a<r;a+=4)i[a]+=t,i[a+1]+=t,i[a+2]+=t};B.addGetterSetter(me,"brightness",0,he(),B.afterSetFilter);const fG=function(e){const t=this.brightness(),i=e.data,r=i.length;for(let a=0;a<r;a+=4)i[a]=Math.min(255,i[a]*t),i[a+1]=Math.min(255,i[a+1]*t),i[a+2]=Math.min(255,i[a+2]*t)},hG=function(e){const t=Math.pow((this.contrast()+100)/100,2),i=e.data,r=i.length;let a=150,l=150,c=150;for(let d=0;d<r;d+=4)a=i[d],l=i[d+1],c=i[d+2],a/=255,a-=.5,a*=t,a+=.5,a*=255,l/=255,l-=.5,l*=t,l+=.5,l*=255,c/=255,c-=.5,c*=t,c+=.5,c*=255,a=a<0?0:a>255?255:a,l=l<0?0:l>255?255:l,c=c<0?0:c>255?255:c,i[d]=a,i[d+1]=l,i[d+2]=c};B.addGetterSetter(me,"contrast",0,he(),B.afterSetFilter);const gG=function(e){var t,i,r,a,l,c,d,h,p;const m=e.data,v=e.width,b=e.height,y=Math.min(1,Math.max(0,(i=(t=this.embossStrength)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:.5)),x=Math.min(1,Math.max(0,(a=(r=this.embossWhiteLevel)===null||r===void 0?void 0:r.call(this))!==null&&a!==void 0?a:.5)),w=(d={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(c=(l=this.embossDirection)===null||l===void 0?void 0:l.call(this))!==null&&c!==void 0?c:"top-left"])!==null&&d!==void 0?d:315,C=!!((p=(h=this.embossBlend)===null||h===void 0?void 0:h.call(this))!==null&&p!==void 0&&p),R=y*10,z=x*255,D=w*Math.PI/180,T=Math.cos(D),k=Math.sin(D),A=128/1020*R,L=new Uint8ClampedArray(m),W=new Float32Array(v*b);for(let X=0,K=0;K<m.length;K+=4,X++)W[X]=.2126*L[K]+.7152*L[K+1]+.0722*L[K+2];const V=[-1,0,1,-2,0,2,-1,0,1],M=[-1,-2,-1,0,0,0,1,2,1],I=[-v-1,-v,-v+1,-1,0,1,v-1,v,v+1],U=X=>X<0?0:X>255?255:X;for(let X=1;X<b-1;X++)for(let K=1;K<v-1;K++){const P=X*v+K;let ee=0,te=0;ee+=W[P+I[0]]*V[0],te+=W[P+I[0]]*M[0],ee+=W[P+I[1]]*V[1],te+=W[P+I[1]]*M[1],ee+=W[P+I[2]]*V[2],te+=W[P+I[2]]*M[2],ee+=W[P+I[3]]*V[3],te+=W[P+I[3]]*M[3],ee+=W[P+I[5]]*V[5],te+=W[P+I[5]]*M[5],ee+=W[P+I[6]]*V[6],te+=W[P+I[6]]*M[6],ee+=W[P+I[7]]*V[7],te+=W[P+I[7]]*M[7],ee+=W[P+I[8]]*V[8],te+=W[P+I[8]]*M[8];const de=T*ee+k*te,ce=U(z+de*A),Ce=P*4;if(C){const Ae=ce-z;m[Ce]=U(L[Ce]+Ae),m[Ce+1]=U(L[Ce+1]+Ae),m[Ce+2]=U(L[Ce+2]+Ae),m[Ce+3]=L[Ce+3]}else m[Ce]=m[Ce+1]=m[Ce+2]=ce,m[Ce+3]=L[Ce+3]}for(let X=0;X<v;X++){let K=X*4,P=((b-1)*v+X)*4;m[K]=L[K],m[K+1]=L[K+1],m[K+2]=L[K+2],m[K+3]=L[K+3],m[P]=L[P],m[P+1]=L[P+1],m[P+2]=L[P+2],m[P+3]=L[P+3]}for(let X=1;X<b-1;X++){let K=X*v*4,P=(X*v+(v-1))*4;m[K]=L[K],m[K+1]=L[K+1],m[K+2]=L[K+2],m[K+3]=L[K+3],m[P]=L[P],m[P+1]=L[P+1],m[P+2]=L[P+2],m[P+3]=L[P+3]}return e};B.addGetterSetter(me,"embossStrength",.5,he(),B.afterSetFilter);B.addGetterSetter(me,"embossWhiteLevel",.5,he(),B.afterSetFilter);B.addGetterSetter(me,"embossDirection","top-left",void 0,B.afterSetFilter);B.addGetterSetter(me,"embossBlend",!1,void 0,B.afterSetFilter);function qm(e,t,i,r,a){const l=i-t,c=a-r;if(l===0)return r+c/2;if(c===0)return r;let d=(e-t)/l;return d=c*d+r,d}const pG=function(e){const t=e.data,i=t.length;let r=t[0],a=r,l,c=t[1],d=c,h,p=t[2],m=p,v;const b=this.enhance();if(b===0)return;for(let z=0;z<i;z+=4)l=t[z+0],l<r?r=l:l>a&&(a=l),h=t[z+1],h<c?c=h:h>d&&(d=h),v=t[z+2],v<p?p=v:v>m&&(m=v);a===r&&(a=255,r=0),d===c&&(d=255,c=0),m===p&&(m=255,p=0);let y,x,_,w,C,R;if(b>0)y=a+b*(255-a),x=r-b*(r-0),_=d+b*(255-d),w=c-b*(c-0),C=m+b*(255-m),R=p-b*(p-0);else{const z=(a+r)*.5;y=a+b*(a-z),x=r+b*(r-z);const D=(d+c)*.5;_=d+b*(d-D),w=c+b*(c-D);const T=(m+p)*.5;C=m+b*(m-T),R=p+b*(p-T)}for(let z=0;z<i;z+=4)t[z+0]=qm(t[z+0],r,a,x,y),t[z+1]=qm(t[z+1],c,d,w,_),t[z+2]=qm(t[z+2],p,m,R,C)};B.addGetterSetter(me,"enhance",0,he(),B.afterSetFilter);const mG=function(e){const t=e.data,i=t.length;for(let r=0;r<i;r+=4){const a=.34*t[r]+.5*t[r+1]+.16*t[r+2];t[r]=a,t[r+1]=a,t[r+2]=a}};B.addGetterSetter(me,"hue",0,he(),B.afterSetFilter);B.addGetterSetter(me,"saturation",0,he(),B.afterSetFilter);B.addGetterSetter(me,"luminance",0,he(),B.afterSetFilter);const vG=function(e){const t=e.data,i=t.length,r=1,a=Math.pow(2,this.saturation()),l=(this.hue()%360+360)%360,c=this.luminance()*127,d=r*a*Math.cos(l*Math.PI/180),h=r*a*Math.sin(l*Math.PI/180),p=.299*r+.701*d+.168*h,m=.587*r-.587*d+.33*h,v=.114*r-.114*d-.497*h,b=.299*r-.299*d-.328*h,y=.587*r+.413*d+.035*h,x=.114*r-.114*d+.292*h,_=.299*r-.3*d+1.25*h,w=.587*r-.588*d-1.05*h,C=.114*r+.886*d-.203*h;let R,z,D,T;for(let k=0;k<i;k+=4)R=t[k+0],z=t[k+1],D=t[k+2],T=t[k+3],t[k+0]=p*R+m*z+v*D+c,t[k+1]=b*R+y*z+x*D+c,t[k+2]=_*R+w*z+C*D+c,t[k+3]=T},bG=function(e){const t=e.data,i=t.length,r=Math.pow(2,this.value()),a=Math.pow(2,this.saturation()),l=(this.hue()%360+360)%360,c=r*a*Math.cos(l*Math.PI/180),d=r*a*Math.sin(l*Math.PI/180),h=.299*r+.701*c+.168*d,p=.587*r-.587*c+.33*d,m=.114*r-.114*c-.497*d,v=.299*r-.299*c-.328*d,b=.587*r+.413*c+.035*d,y=.114*r-.114*c+.292*d,x=.299*r-.3*c+1.25*d,_=.587*r-.588*c-1.05*d,w=.114*r+.886*c-.203*d;for(let C=0;C<i;C+=4){const R=t[C+0],z=t[C+1],D=t[C+2],T=t[C+3];t[C+0]=h*R+p*z+m*D,t[C+1]=v*R+b*z+y*D,t[C+2]=x*R+_*z+w*D,t[C+3]=T}};B.addGetterSetter(me,"hue",0,he(),B.afterSetFilter);B.addGetterSetter(me,"saturation",0,he(),B.afterSetFilter);B.addGetterSetter(me,"value",0,he(),B.afterSetFilter);const yG=function(e){const t=e.data,i=t.length;for(let r=0;r<i;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]},xG=function(e,t,i){const r=e.data,a=t.data,l=e.width,c=e.height,d=i.polarCenterX||l/2,h=i.polarCenterY||c/2;let p=Math.sqrt(d*d+h*h),m=l-d,v=c-h;const b=Math.sqrt(m*m+v*v);p=b>p?b:p;const y=c,x=l,_=360/x*Math.PI/180;for(let w=0;w<x;w+=1){const C=Math.sin(w*_),R=Math.cos(w*_);for(let z=0;z<y;z+=1){m=Math.floor(d+p*z/y*R),v=Math.floor(h+p*z/y*C);let D=(v*l+m)*4;const T=r[D+0],k=r[D+1],A=r[D+2],L=r[D+3];D=(w+z*l)*4,a[D+0]=T,a[D+1]=k,a[D+2]=A,a[D+3]=L}}},SG=function(e,t,i){const r=e.data,a=t.data,l=e.width,c=e.height,d=i.polarCenterX||l/2,h=i.polarCenterY||c/2;let p=Math.sqrt(d*d+h*h),m=l-d,v=c-h;const b=Math.sqrt(m*m+v*v);p=b>p?b:p;const y=c,x=l,_=0;let w,C;for(m=0;m<l;m+=1)for(v=0;v<c;v+=1){const R=m-d,z=v-h,D=Math.sqrt(R*R+z*z)*y/p;let T=(Math.atan2(z,R)*180/Math.PI+360+_)%360;T=T*x/360,w=Math.floor(T),C=Math.floor(D);let k=(C*l+w)*4;const A=r[k+0],L=r[k+1],W=r[k+2],V=r[k+3];k=(v*l+m)*4,a[k+0]=A,a[k+1]=L,a[k+2]=W,a[k+3]=V}},_G=function(e){const t=e.width,i=e.height;let r,a,l,c,d,h,p,m,v,b,y=Math.round(this.kaleidoscopePower());const x=Math.round(this.kaleidoscopeAngle()),_=Math.floor(t*(x%360)/360);if(y<1)return;const w=F.createCanvasElement();w.width=t,w.height=i;const C=w.getContext("2d").getImageData(0,0,t,i);F.releaseCanvas(w),xG(e,C,{polarCenterX:t/2,polarCenterY:i/2});let R=t/Math.pow(2,y);for(;R<=8;)R=R*2,y-=1;R=Math.ceil(R);let z=R,D=0,T=z,k=1;for(_+R>t&&(D=z,T=0,k=-1),a=0;a<i;a+=1)for(r=D;r!==T;r+=k)l=Math.round(r+_)%t,v=(t*a+l)*4,d=C.data[v+0],h=C.data[v+1],p=C.data[v+2],m=C.data[v+3],b=(t*a+r)*4,C.data[b+0]=d,C.data[b+1]=h,C.data[b+2]=p,C.data[b+3]=m;for(a=0;a<i;a+=1)for(z=Math.floor(R),c=0;c<y;c+=1){for(r=0;r<z+1;r+=1)v=(t*a+r)*4,d=C.data[v+0],h=C.data[v+1],p=C.data[v+2],m=C.data[v+3],b=(t*a+z*2-r-1)*4,C.data[b+0]=d,C.data[b+1]=h,C.data[b+2]=p,C.data[b+3]=m;z*=2}SG(C,e,{})};B.addGetterSetter(me,"kaleidoscopePower",2,he(),B.afterSetFilter);B.addGetterSetter(me,"kaleidoscopeAngle",0,he(),B.afterSetFilter);function af(e,t,i){let r=(i*e.width+t)*4;const a=[];return a.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),a}function Ec(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function wG(e){const t=[0,0,0];for(let i=0;i<e.length;i++)t[0]+=e[i][0],t[1]+=e[i][1],t[2]+=e[i][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function CG(e,t){const i=af(e,0,0),r=af(e,e.width-1,0),a=af(e,0,e.height-1),l=af(e,e.width-1,e.height-1),c=t||10;if(Ec(i,r)<c&&Ec(r,l)<c&&Ec(l,a)<c&&Ec(a,i)<c){const d=wG([r,i,l,a]),h=[];for(let p=0;p<e.width*e.height;p++){const m=Ec(d,[e.data[p*4],e.data[p*4+1],e.data[p*4+2]]);h[p]=m<c?0:255}return h}}function EG(e,t){for(let i=0;i<e.width*e.height;i++)e.data[4*i+3]=t[i]}function TG(e,t,i){const r=[1,1,1,1,0,1,1,1,1],a=Math.round(Math.sqrt(r.length)),l=Math.floor(a/2),c=[];for(let d=0;d<i;d++)for(let h=0;h<t;h++){const p=d*t+h;let m=0;for(let v=0;v<a;v++)for(let b=0;b<a;b++){const y=d+v-l,x=h+b-l;if(y>=0&&y<i&&x>=0&&x<t){const _=y*t+x,w=r[v*a+b];m+=e[_]*w}}c[p]=m===2040?255:0}return c}function kG(e,t,i){const r=[1,1,1,1,1,1,1,1,1],a=Math.round(Math.sqrt(r.length)),l=Math.floor(a/2),c=[];for(let d=0;d<i;d++)for(let h=0;h<t;h++){const p=d*t+h;let m=0;for(let v=0;v<a;v++)for(let b=0;b<a;b++){const y=d+v-l,x=h+b-l;if(y>=0&&y<i&&x>=0&&x<t){const _=y*t+x,w=r[v*a+b];m+=e[_]*w}}c[p]=m>=1020?255:0}return c}function zG(e,t,i){const r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],a=Math.round(Math.sqrt(r.length)),l=Math.floor(a/2),c=[];for(let d=0;d<i;d++)for(let h=0;h<t;h++){const p=d*t+h;let m=0;for(let v=0;v<a;v++)for(let b=0;b<a;b++){const y=d+v-l,x=h+b-l;if(y>=0&&y<i&&x>=0&&x<t){const _=y*t+x,w=r[v*a+b];m+=e[_]*w}}c[p]=m}return c}const RG=function(e){const t=this.threshold();let i=CG(e,t);return i&&(i=TG(i,e.width,e.height),i=kG(i,e.width,e.height),i=zG(i,e.width,e.height),EG(e,i)),e};B.addGetterSetter(me,"threshold",0,he(),B.afterSetFilter);const AG=function(e){const t=this.noise()*255,i=e.data,r=i.length,a=t/2;for(let l=0;l<r;l+=4)i[l+0]+=a-2*a*Math.random(),i[l+1]+=a-2*a*Math.random(),i[l+2]+=a-2*a*Math.random()};B.addGetterSetter(me,"noise",.2,he(),B.afterSetFilter);const OG=function(e){let t=Math.ceil(this.pixelSize()),i=e.width,r=e.height,a=Math.ceil(i/t),l=Math.ceil(r/t),c=e.data;if(t<=0){F.error("pixelSize value can not be <= 0");return}for(let d=0;d<a;d+=1)for(let h=0;h<l;h+=1){let p=0,m=0,v=0,b=0;const y=d*t,x=y+t,_=h*t,w=_+t;let C=0;for(let R=y;R<x;R+=1)if(!(R>=i))for(let z=_;z<w;z+=1){if(z>=r)continue;const D=(i*z+R)*4;p+=c[D+0],m+=c[D+1],v+=c[D+2],b+=c[D+3],C+=1}p=p/C,m=m/C,v=v/C,b=b/C;for(let R=y;R<x;R+=1)if(!(R>=i))for(let z=_;z<w;z+=1){if(z>=r)continue;const D=(i*z+R)*4;c[D+0]=p,c[D+1]=m,c[D+2]=v,c[D+3]=b}}};B.addGetterSetter(me,"pixelSize",8,he(),B.afterSetFilter);const NG=function(e){const t=Math.round(this.levels()*254)+1,i=e.data,r=i.length,a=255/t;for(let l=0;l<r;l+=1)i[l]=Math.floor(i[l]/a)*a};B.addGetterSetter(me,"levels",.5,he(),B.afterSetFilter);const IG=function(e){const t=e.data,i=t.length,r=this.red(),a=this.green(),l=this.blue();for(let c=0;c<i;c+=4){const d=(.34*t[c]+.5*t[c+1]+.16*t[c+2])/255;t[c]=d*r,t[c+1]=d*a,t[c+2]=d*l,t[c+3]=t[c+3]}};B.addGetterSetter(me,"red",0,ib,B.afterSetFilter);B.addGetterSetter(me,"green",0,ib,B.afterSetFilter);B.addGetterSetter(me,"blue",0,ib,B.afterSetFilter);const PG=function(e){const t=e.data,i=t.length,r=this.red(),a=this.green(),l=this.blue(),c=this.alpha();for(let d=0;d<i;d+=4){const h=1-c;t[d]=r*c+t[d]*h,t[d+1]=a*c+t[d+1]*h,t[d+2]=l*c+t[d+2]*h}};B.addGetterSetter(me,"alpha",1,e=>Math.min(1,Math.max(0,e)),B.afterSetFilter);const MG=function(e){const t=e.data,i=t.length;for(let r=0;r<i;r+=4){const a=t[r+0],l=t[r+1],c=t[r+2];t[r+0]=Math.min(255,a*.393+l*.769+c*.189),t[r+1]=Math.min(255,a*.349+l*.686+c*.168),t[r+2]=Math.min(255,a*.272+l*.534+c*.131)}},DG=function(e){const i=e.data;for(let r=0;r<i.length;r+=4){const a=i[r],l=i[r+1],c=i[r+2];.2126*a+.7152*l+.0722*c>=128&&(i[r]=255-a,i[r+1]=255-l,i[r+2]=255-c)}return e},LG=function(e){const t=this.threshold()*255,i=e.data,r=i.length;for(let a=0;a<r;a+=1)i[a]=i[a]<t?0:255};B.addGetterSetter(me,"threshold",.5,he(),B.afterSetFilter);const Rn=t3.Util._assign(t3,{Arc:Zr,Arrow:Ba,Circle:cl,Ellipse:Uo,Image:Hi,Label:sb,Tag:Ga,Line:Kr,Path:kt,Rect:pu,RegularPolygon:Wo,Ring:Va,Sprite:br,Star:Yo,Text:pt,TextPath:Mt,Transformer:$e,Wedge:Qr,Filters:{Blur:uG,Brightness:fG,Brighten:dG,Contrast:hG,Emboss:gG,Enhance:pG,Grayscale:mG,HSL:vG,HSV:bG,Invert:yG,Kaleidoscope:_G,Mask:RG,Noise:AG,Pixelate:OG,Posterize:NG,RGB:IG,RGBA:PG,Sepia:MG,Solarize:DG,Threshold:LG}});function w8(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function p3(e,t="|"){return e.map(i=>T8(i)).join(t)}function nv(e,t){return typeof t=="bigint"?t.toString():t}function lb(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function jG(e){return e==null}function cb(e){const t=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}function BG(e,t){const i=e/t,r=Math.round(i),a=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-r)<a?0:i-r}function Wn(e,t,i){Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}function qo(...e){const t={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(t,r)}return Object.defineProperties({},t)}function GG(e){return JSON.stringify(e)}function VG(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const C8="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wf(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const HG=lb(()=>{if(Bi.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Js(e){if(Wf(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const i=t.prototype;return!(Wf(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function E8(e){return Js(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const FG=new Set(["string","number","symbol"]);function el(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xo(e,t,i){const r=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(r._zod.parent=e),r}function ke(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function T8(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function $G(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const UG={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function WG(e,t){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=qo(e._zod.def,{get shape(){const c={};for(const d of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(i.shape,d))throw new Error(`Unrecognized key: "${String(d)}"`);t[d]&&Wn(c,d,i.shape[d])}return Wn(this,"shape",c),c},checks:[]});return Xo(e,l)}function YG(e,t){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=qo(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const d of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(i.shape,d))throw new Error(`Unrecognized key: "${String(d)}"`);t[d]&&delete c[d]}return Wn(this,"shape",c),c},checks:[]});return Xo(e,l)}function qG(e,t){if(!Js(t))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const l=e._zod.def.shape;for(const c of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=qo(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return Wn(this,"shape",l),l}});return Xo(e,a)}function XG(e,t){if(!Js(t))throw new Error("Invalid input to safeExtend: expected a plain object");const i=qo(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Wn(this,"shape",r),r}});return Xo(e,i)}function ZG(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const i=qo(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Wn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Xo(e,i)}function m3(e,t,i,r="partial"){const l=t._zod.def.checks;if(l&&l.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const d=qo(t._zod.def,{get shape(){const h=t._zod.def.shape,p={...h};if(i)for(const m of Reflect.ownKeys(i)){if(!Object.prototype.hasOwnProperty.call(h,m))throw new Error(`Unrecognized key: "${String(m)}"`);i[m]&&(p[m]=e?new e({type:"optional",innerType:h[m]}):h[m])}else for(const m of Reflect.ownKeys(h))p[m]=e?new e({type:"optional",innerType:h[m]}):h[m];return Wn(this,"shape",p),p},checks:[]});return Xo(t,d)}function KG(e,t,i){const r=qo(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(i)for(const c of Reflect.ownKeys(i)){if(!Object.prototype.hasOwnProperty.call(l,c))throw new Error(`Unrecognized key: "${String(c)}"`);i[c]&&(l[c]=new e({type:"nonoptional",innerType:a[c]}))}else for(const c of Reflect.ownKeys(a))l[c]=new e({type:"nonoptional",innerType:a[c]});return Wn(this,"shape",l),l}});return Xo(t,r)}function Gs(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function QG(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue===!1)return!0;return!1}function Vs(e,t){return t.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function Tc(e){return typeof e=="string"?e:e?.message}function v3(e,t,i){var r;for(let a=t;a<e.length;a++)(r=e[a]).schema??(r.schema=i)}function Bo(e,t,i){var r;const a=e.inst?._zod?.traits;a?.has("$ZodType")&&(a.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const l=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,c=e.message?e.message:Tc(e.inst?._zod.def?.error?.(e))??Tc(l?.(e))??Tc(t?.error?.(e))??Tc(i.customError?.(e))??Tc(i.localeError?.(e))??"Invalid input",{inst:d,schema:h,continue:p,input:m,...v}=e;return v.path??(v.path=[]),v.message=c,t?.reportInput&&(v.input=m),v}const JG=/[\uD800-\uDBFF]/;function ub(e){const t=e.length;if(!JG.test(e))return t;let i=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(i--,r++);return i}function db(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function eV(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const i=e;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return t}function ou(...e){const[t,i,r]=e;return typeof t=="string"?{message:t,code:"custom",input:i,inst:r}:{...t}}function tV(e,t){for(const i in t){const r=Object.getOwnPropertyDescriptor(t,i);r.get?Object.defineProperty(e,i,{...r,enumerable:!1}):nV(e,i,r.value)}}function tl(e,t,i,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:i}),i}function k8(e,t,i){return tl(e,t,i,!1)}function nV(e,t,i){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?i:tl(this,t,i.bind(this))},set(r){tl(this,t,r)}})}function iV(e,t){const i=Object.getPrototypeOf(e);return t in i?void 0:i}let Xm,Ao=!1;const rV={configurable:!0,get(){Ao=!0}};function dt(e,t,i){const r=Object.getPrototypeOf(e._zod);if(t in r&&Xm!==e._zod){Xm=void 0;return}Xm=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,rV);const a=Ao;Ao=!1;try{const l=i(this);return Ao?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:l}),Ao=Ao||a,l}catch(l){throw delete this[t],Ao=Ao||a,l}},set(a){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:a})}})}function oV(e,t,i,r){const a=iV(e,t);a&&Object.defineProperty(a,t,{configurable:!0,get(){const l={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,l),l.value=i(this),Object.defineProperty(this,t,l),l.value},set(l){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:l})}})}const aV="~constantCatch";function sV(e){const t=()=>e;return t[aV]=!0,t}var b3;const Zm={value:void 0,enumerable:!1};let y3="captureStackTrace"in Error?Error:null;function lV(e){const t=y3;if(t){const i=t.stackTraceLimit;if(typeof i=="number"){try{t.stackTraceLimit=0}catch{return y3=null,new e}try{return new e}finally{t.stackTraceLimit=i}}}return new e}function se(e,t,i,r){const a={};function l(b){this.def=b,this.constr=v,this.traits=new Set}l.prototype=a;const c=i,d=c&&new WeakSet;function h(b,y){if(!b._zod){Zm.value=new l(y);try{Object.defineProperty(b,"_zod",Zm)}finally{Zm.value=void 0}}if(b._zod.traits.has(e))return;if(b._zod.traits.add(e),t(b,y),d){const _=Object.getPrototypeOf(b),w=b._zod.constr.prototype;let C=_;for(;C&&C!==w;)C=Object.getPrototypeOf(C);const R=C??_;d.has(R)||(d.add(R),tV(R,c))}const x=v.prototype;for(const _ in x)Object.prototype.hasOwnProperty.call(x,_)&&(_ in b||(b[_]=x[_].bind(b)))}const p=r?.Parent??Object;class m extends p{}Object.defineProperty(m,"name",{value:e});function v(b){const y=r?.Parent?lV(m):this;h(y,b);const x=y._zod.deferred;if(x){for(const w of x)w();y._zod.deferred=void 0}const _=globalThis.__zod_globalConfig?.postProcessor;return _&&_(y),y}return Object.defineProperty(v,"init",{value:h}),Object.defineProperty(v,Symbol.hasInstance,{value:b=>r?.Parent&&b instanceof r.Parent?!0:b?._zod?.traits?.has(e)}),Object.defineProperty(v,"name",{value:e}),v}class qs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class z8 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(b3=globalThis).__zod_globalConfig??(b3.__zod_globalConfig={});const Bi=globalThis.__zod_globalConfig;function hr(e){return e&&Object.assign(Bi,e),Bi}function cV(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,nv,2)),e.message}function uV(e){this._zod.message=e}const dV={get:cV,set:uV,enumerable:!0,configurable:!0},Km={value:void 0,enumerable:!1},Qm={value:void 0,enumerable:!1},x3=new WeakSet([Object.prototype,Error.prototype]),R8=(e,t)=>{e.name="$ZodError",Km.value=e._zod,Object.defineProperty(e,"_zod",Km),Qm.value=t,Object.defineProperty(e,"issues",Qm),Km.value=void 0,Qm.value=void 0,Object.defineProperty(e,"message",dV);const i=Object.getPrototypeOf(e);x3.has(i)||(x3.add(i),Object.defineProperty(i,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},A8=se("$ZodError",R8),O8=se("$ZodError",R8,void 0,{Parent:Error});function fV(e,t,i){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[t]=i()),e[t]}function hV(e,t=i=>i.message){const i={},r=[];for(const a of e.issues)a.path.length>0?fV(i,a.path[0],()=>[]).push(t(a)):r.push(t(a));return{formErrors:r,fieldErrors:i}}function gV(e,t=i=>i.message){const i={_errors:[]},r=(a,l=[])=>{for(const c of a.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(d=>r({issues:d},[...l,...c.path]));else if(c.code==="invalid_key")r({issues:c.issues},[...l,...c.path]);else if(c.code==="invalid_element")r({issues:c.issues},[...l,...c.path]);else{const d=[...l,...c.path];if(d.length===0)i._errors.push(t(c));else{let h=i,p=0;for(;p<d.length;){const m=d[p],v=p===d.length-1;if(m==="_errors"){v&&h._errors.push(t(c)),p++;continue}Object.prototype.hasOwnProperty.call(h,m)||Object.defineProperty(h,m,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const b=h[m];v&&b._errors.push(t(c)),h=b,p++}}}};return r(e),i}function Ah(e,t){return{callee:t?.callee??e,Err:t?.Err}}const fb=e=>{const t=(i,r,a,l)=>{const c=a?{...a,async:!1}:{async:!1},d=i._zod.run({value:r,issues:[]},c);if(d instanceof Promise)throw new qs;if(d.issues.length){const h=new(l?.Err??e)(d.issues.map(p=>Bo(p,c,hr())));throw C8(h,l?.callee??t),h}return d.value};return t},hb=e=>{const t=async(i,r,a,l)=>{const c=a?{...a,async:!0}:{async:!0};let d=i._zod.run({value:r,issues:[]},c);if(d instanceof Promise&&(d=await d),d.issues.length){const h=new(l?.Err??e)(d.issues.map(p=>Bo(p,c,hr())));throw C8(h,l?.callee??t),h}return d.value};return t},Oh=e=>(t,i,r)=>{const a=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:i,issues:[]},a);if(l instanceof Promise)throw new qs;return l.issues.length?{success:!1,error:new(e??A8)(l.issues.map(c=>Bo(c,a,hr())))}:{success:!0,data:l.value}},pV=Oh(O8),Nh=e=>async(t,i,r)=>{const a=r?{...r,async:!0}:{async:!0};let l=t._zod.run({value:i,issues:[]},a);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(c=>Bo(c,a,hr())))}:{success:!0,data:l.value}},mV=Nh(O8),vV=e=>{const t=fb(e),i=(r,a,l,c)=>{const d=l?{...l,direction:"backward"}:{direction:"backward"};return t(r,a,d,Ah(i,c))};return i},bV=e=>{const t=fb(e),i=(r,a,l,c)=>t(r,a,l,Ah(i,c));return i},yV=e=>{const t=hb(e),i=async(r,a,l,c)=>{const d=l?{...l,direction:"backward"}:{direction:"backward"};return await t(r,a,d,Ah(i,c))};return i},xV=e=>{const t=hb(e),i=async(r,a,l,c)=>await t(r,a,l,Ah(i,c));return i},SV=e=>(t,i,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return Oh(e)(t,i,a)},_V=e=>(t,i,r)=>Oh(e)(t,i,r),wV=e=>async(t,i,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return Nh(e)(t,i,a)},CV=e=>async(t,i,r)=>Nh(e)(t,i,r),EV=/^[cC][0-9a-z]{6,}$/,TV=/^[0-9a-z]+$/,kV=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,zV=/^[0-9a-vA-V]{20}$/,RV=/^[A-Za-z0-9]{27}$/,AV=/^[a-zA-Z0-9_-]{21}$/;function OV(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const NV=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,IV=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,S3=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,PV=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,MV="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function DV(){return new RegExp(MV,"u")}const LV=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jV=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,BV=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,GV=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,VV=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,N8=/^[A-Za-z0-9_-]*$/,HV=/^https?$/,FV=/^\+[1-9]\d{6,14}$/,I8="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function $V(e){return new RegExp(`^${e}$`)}const UV=$V(I8);function iv(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function WV(e){return new RegExp(`^${iv(e)}$`)}function YV(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${iv({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${i}|${iv({precision:e.precision})}`:i;return new RegExp(`^${I8}T(?:${r})$`)}const qV=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},P8=/^-?\d+$/,gb=/^-?\d+(?:\.\d+)?$/,XV=/^(?:true|false)$/i,ZV=/^[^A-Z]*$/,KV=/^[^a-z]*$/,Xn=se("$ZodCheck",(e,t)=>{var i;e._zod??(e._zod={}),e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])}),pb=e=>{const t=e.value;return!jG(t)&&t.length!==void 0},Yf={number:"number",bigint:"bigint",object:"date"},M8=se("$ZodCheckLessThan",(e,t)=>{Xn.init(e,t);const i=Yf[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,l=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Yf[typeof r.value]??i,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),D8=se("$ZodCheckGreaterThan",(e,t)=>{Xn.init(e,t);const i=Yf[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,l=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Yf[typeof r.value]??i,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),QV=se("$ZodCheckMultipleOf",(e,t)=>{Xn.init(e,t),e._zod.onattach.push(i=>{var r;(r=i._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=i=>{if(typeof i.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?t.value!==BigInt(0)&&i.value%t.value===BigInt(0):BG(i.value,t.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:t.value,input:i.value,inst:e,continue:!t.abort})}}),JV=se("$ZodCheckNumberFormat",(e,t)=>{Xn.init(e,t),t.format=t.format||"float64";const i=t.format?.includes("int"),r=i?"int":"number",[a,l]=UG[t.format];e._zod.onattach.push(c=>{const d=c._zod.bag;d.format=t.format,d.minimum=a,d.maximum=l,i&&(d.pattern=P8)}),e._zod.check=c=>{const d=c.value;if(i){if(!Number.isInteger(d)){c.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?c.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):c.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}d<a&&c.issues.push({origin:"number",input:d,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),d>l&&c.issues.push({origin:"number",input:d,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),eH=se("$ZodCheckMaxLength",(e,t)=>{var i;Xn.init(e,t),(i=e._zod.def).when??(i.when=pb),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value,l=a.length;if((typeof a=="string"&&l>t.maximum?ub(a):l)<=t.maximum)return;const d=db(a);r.issues.push({origin:d,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),tH=se("$ZodCheckMinLength",(e,t)=>{var i;Xn.init(e,t),(i=e._zod.def).when??(i.when=pb),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value,l=a.length;if((typeof a=="string"&&l>=t.minimum&&l<t.minimum*2?ub(a):l)>=t.minimum)return;const d=db(a);r.issues.push({origin:d,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),nH=se("$ZodCheckLengthEquals",(e,t)=>{var i;Xn.init(e,t),(i=e._zod.def).when??(i.when=pb),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,l=a.length,c=typeof a=="string"&&l>=t.length&&l<=t.length*2?ub(a):l;if(c===t.length)return;const d=db(a),h=c>t.length;r.issues.push({origin:d,...h?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ih=se("$ZodCheckStringFormat",(e,t)=>{var i,r;Xn.init(e,t),e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(i=e._zod).check??(i.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),iH=se("$ZodCheckRegex",(e,t)=>{Ih.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rH=se("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ZV),Ih.init(e,t)}),oH=se("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=KV),Ih.init(e,t)}),aH=se("$ZodCheckIncludes",(e,t)=>{Xn.init(e,t);const i=el(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${i}`:i);t.pattern=r,e._zod.onattach.push(a=>{const l=a._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),sH=se("$ZodCheckStartsWith",(e,t)=>{Xn.init(e,t);const i=new RegExp(`^${el(t.prefix)}.*`);t.pattern??(t.pattern=i),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),lH=se("$ZodCheckEndsWith",(e,t)=>{Xn.init(e,t);const i=new RegExp(`.*${el(t.suffix)}$`);t.pattern??(t.pattern=i),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),cH=se("$ZodCheckOverwrite",(e,t)=>{Xn.init(e,t),e._zod.check=i=>{i.value=t.tx(i.value)}});class uH{constructor(t=[],i={}){this.content=[],this.indent=0,this.args=t,this.closed=i}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
26
+ `).filter(c=>c),a=Math.min(...r.map(c=>c.length-c.trimStart().length)),l=r.map(c=>c.slice(a)).map(c=>" ".repeat(this.indent*2)+c);for(const c of l)this.content.push(c)}compile(){const t=Function,i=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
27
+ ${i.join(`
28
+ `)}
29
+ };`)(...Object.values(this.closed))}}const dH={major:4,minor:5,patch:4},Rt=se("$ZodType",(e,t)=>{var i;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=dH;const r=e._zod.def.checks,a=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const l of a)for(const c of l._zod.onattach)c(e);if(a.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const l=(d,h,p)=>{if(d.memo)return d;let m=Gs(d),v;for(const b of h){if(b._zod.def.when){if(QG(d)||!b._zod.def.when(d))continue}else if(m)continue;const y=d.issues.length,x=b._zod.check(d);if(x instanceof Promise&&p?.async===!1)throw new qs;if(v||x instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await x,d.issues.length!==y&&(v3(d.issues,y,e),m||(m=Gs(d,y)))});else{if(d.issues.length===y)continue;v3(d.issues,y,e),m||(m=Gs(d,y))}}return v?v.then(()=>d):d},c=(d,h,p)=>{if(Gs(d))return d.aborted=!0,d;const m=l(h,a,p);if(m instanceof Promise){if(p.async===!1)throw new qs;return m.then(v=>e._zod.parse(v,p))}return e._zod.parse(m,p)};e._zod.run=(d,h)=>{if(h.skipChecks)return e._zod.parse(d,h);if(h.direction==="backward"){const m=e._zod.parse({value:d.value,issues:[]},{...h,skipChecks:!0});return m instanceof Promise?m.then(v=>c(v,d,h)):c(m,d,h)}const p=e._zod.parse(d,h);if(p instanceof Promise){if(h.async===!1)throw new qs;return p.then(m=>l(m,a,h))}return l(p,a,h)}}},{get"~standard"(){return k8(this,"~standard",L8(this))},set"~standard"(e){tl(this,"~standard",e)}}),_3=e=>e.success?{value:e.data}:{issues:e.error?.issues};function L8(e){return{validate:t=>{try{return _3(pV(e,t))}catch{return mV(e,t).then(_3)}},vendor:"zod",version:1}}const mb=se("$ZodString",(e,t)=>{Rt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??qV(e._zod.bag),e._zod.parse=(i,r)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),Et=se("$ZodStringFormat",(e,t)=>{Ih.init(e,t),mb.init(e,t)}),fH=se("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=IV),Et.init(e,t)}),hH=se("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=S3(r))}else t.pattern??(t.pattern=S3());Et.init(e,t)}),gH=se("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=PV),Et.init(e,t)}),j8=1,B8=2;function pH(e,t){if(!t.normalize&&t.protocol?.source===HV.source&&!/^https?:\/\//i.test(e))return j8;try{return new URL(e)}catch{return B8}}const mH=/[\t\n\r]/g;function vH(e){return e.replace(mH,"")}function bH(e,t){return t.lastIndex=0,t.test(e.hostname)}function yH(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const xH=se("$ZodURL",(e,t)=>{Et.init(e,t),e._zod.check=i=>{try{const r=i.value.trim(),a=pH(r,t);if(a===j8){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!t.abort});return}if(a===B8){i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort});return}t.hostname&&!bH(a,t.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort}),t.protocol&&!yH(a,t.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort}),i.value=t.normalize?a.href:vH(r);return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}}),SH=se("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=DV()),Et.init(e,t)}),_H=se("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?AV:OV(t.length)),Et.init(e,t)}),wH=se("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=EV),Et.init(e,t)}),CH=se("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=TV),Et.init(e,t)}),EH=se("$ZodULID",(e,t)=>{t.pattern??(t.pattern=kV),Et.init(e,t)}),TH=se("$ZodXID",(e,t)=>{t.pattern??(t.pattern=zV),Et.init(e,t)}),kH=se("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=RV),Et.init(e,t)}),zH=se("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=YV(t)),Et.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(i=>{i._zod.bag.laxFormat=!0}))}),RH=se("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=UV),Et.init(e,t)}),AH=se("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=WV(t)),Et.init(e,t)}),OH=se("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=NV),Et.init(e,t)}),NH=se("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=LV),Et.init(e,t),e._zod.bag.format="ipv4"}),IH=/^[0-9a-fA-F:.]+$/;function G8(e){if(!IH.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}const PH=se("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=jV),Et.init(e,t),e._zod.bag.format="ipv6",e._zod.check=i=>{G8(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}),MH=se("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=BV),Et.init(e,t)});function DH(e){const t=e.split("/");if(t.length!==2)return!1;const[i,r]=t;if(!r)return!1;const a=Number(r);return`${a}`!==r||a<0||a>128?!1:G8(i)}const LH=se("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=GV),Et.init(e,t),e._zod.check=i=>{DH(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!t.abort})}});function V8(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const jH=se("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=VV),Et.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{V8(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!t.abort})}});function BH(e){if(!N8.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=t.padEnd(Math.ceil(t.length/4)*4,"=");return V8(i)}const GH=se("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=N8),Et.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{BH(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!t.abort})}}),VH=se("$ZodE164",(e,t)=>{t.pattern??(t.pattern=FV),Et.init(e,t)});function HH(e,t=null){try{const i=e.split(".");if(i.length!==3)return!1;const[r]=i;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const FH=se("$ZodJWT",(e,t)=>{Et.init(e,t),e._zod.check=i=>{HH(i.value,t.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!t.abort})}}),H8=se("$ZodNumber",(e,t)=>{Rt.init(e,t),e._zod.pattern=e._zod.bag.pattern??gb,e._zod.parse=(i,r)=>{if(t.coerce)try{i.value=Number(i.value)}catch{}const a=i.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return i;const l=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:String(a):void 0;return i.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...l?{received:l}:{}}),i}}),$H=se("$ZodNumberFormat",(e,t)=>{JV.init(e,t),H8.init(e,t)}),UH=se("$ZodBoolean",(e,t)=>{Rt.init(e,t),e._zod.pattern=XV,e._zod.parse=(i,r)=>{if(t.coerce)try{i.value=!!i.value}catch{}const a=i.value;return typeof a=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),i}}),WH=se("$ZodUnknown",(e,t)=>{Rt.init(e,t),e._zod.parse=i=>i}),YH=se("$ZodNever",(e,t)=>{Rt.init(e,t),e._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function w3(e,t,i){e.issues.length&&t.issues.push(...Vs(i,e.issues)),t.value[i]=e.value}const qH=se("$ZodArray",(e,t)=>{Rt.init(e,t);const i=Bi.memoizer;i?.attach(e),e._zod.parse=(r,a)=>{const l=r.value;if(!Array.isArray(l))return r.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),r;r.value=i?i.alloc(e,r,Array(l.length),a):Array(l.length);const c=[];for(let d=0;d<l.length;d++){const h=l[d],p=t.element._zod.run({value:h,issues:[]},a);p instanceof Promise?c.push(p.then(m=>w3(m,r,d))):w3(p,r,d)}return c.length?Promise.all(c).then(()=>r):r}});function qf(e,t,i,r,a,l){const c=i in r,d=l==="optional";if(!(!c&&d&&a==="optional")){if(e.issues.length){if(a!==void 0&&d&&!c)return;t.issues.push(...Vs(i,e.issues))}if(!c&&a===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}e.value===void 0?c&&(t.value[i]=void 0):t.value[i]=e.value}}const XH=[];function F8(e){const t=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),r=i.length?i:XH,a=r.length?[...t,...r]:t;for(const c of a)if(!e.shape?.[c]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(c)}": expected a Zod schema`);const l=$G(e.shape);return{...e,allKeys:a,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(l)}}function $8(e,t,i,r,a,l){const c=[],d=a.keySet,h=a.catchall._zod,p=h.def.type,m=h.optin,v=h.optout;for(const b in t){if(d.has(b))continue;if(b==="__proto__"){p==="never"&&c.push(b);continue}if(p==="never"){c.push(b);continue}const y=h.run({value:t[b],issues:[]},r);y instanceof Promise?e.push(y.then(x=>qf(x,i,b,t,m,v))):qf(y,i,b,t,m,v)}return c.length&&i.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:l,continue:!0}),e.length?Promise.all(e).then(()=>i):i}const C3=new WeakMap,ZH=se("$ZodObject",(e,t)=>{if(Rt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const h=t.shape;C3.set(t,h),Object.defineProperty(t,"shape",{get:()=>{const p={...h};return Object.defineProperty(t,"shape",{value:p}),C3.set(t,p),p}})}const r=lb(()=>F8(t));dt(e,"propValues",h=>{const p=h.def.shape,m={};for(const v in p){const b=p[v]._zod;if(b.values){Object.prototype.hasOwnProperty.call(m,v)||Wn(m,v,new Set);for(const y of b.values)m[v].add(y);b.optin!==void 0&&m[v].add(void 0)}}return m});const a=Wf,l=t.catchall;let c;const d=Bi.memoizer;d?.attach(e),e._zod.parse=(h,p)=>{c??(c=r.value);const m=h.value;if(!a(m))return h.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),h;h.value=d?d.alloc(e,h,{},p):{};const v=[],b=c.shape;for(const y of c.allKeys){if(y==="__proto__")continue;const x=b[y],_=x._zod.optin,w=x._zod.optout,C=x._zod.run({value:m[y],issues:[]},p);C instanceof Promise?v.push(C.then(R=>qf(R,h,y,m,_,w))):qf(C,h,y,m,_,w)}return l?$8(v,m,h,p,r.value,e):v.length?Promise.all(v).then(()=>h):h}}),KH=se("$ZodObjectJIT",(e,t)=>{ZH.init(e,t);const i=e._zod.parse,r=lb(()=>F8(t)),a=Bi.memoizer,l=y=>{const x=r.value,_=x.symbolKeys,w=new uH(["payload","ctx"],{shape:y,inst:e,memo:a,syms:_}),C=T=>`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`,R=(T,k)=>`
30
+ for (let i = 0; i < ${T}.issues.length; i++) {
31
+ const iss = ${T}.issues[i];
32
+ iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
33
+ payload.issues.push(iss);
34
+ }`;w.write("const input = payload.value;");const z=Object.create(null);let D=0;for(const T of x.allKeys)z[T]=`key_${D++}`;w.write(a?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const T of x.allKeys){if(T==="__proto__")continue;const k=z[T],A=typeof T=="symbol"?`syms[${_.indexOf(T)}]`:GG(T),L=`${A} in input`,W=y[T],V=W?._zod?.optin,M=V!==void 0,I=W?._zod?.optout==="optional";if(w.write(`const ${k} = ${C(A)};`),M&&I){const U=V==="optional"?`${k}_present`:`${k}.value !== undefined || ${k}_present`;w.write(`
35
+ const ${k}_present = ${L};
36
+ if (!${k}.issues.length || ${k}_present) {
37
+ if (${k}.issues.length) {${R(k,A)}
38
+ }
39
+
40
+ if (${U}) {
41
+ newResult[${A}] = ${k}.value;
42
+ }
43
+ }
44
+
45
+ `)}else M?w.write(`
46
+ if (${k}.issues.length) {${R(k,A)}
47
+ }
48
+
49
+ if (${k}.value === undefined) {
50
+ if (${L}) {
51
+ newResult[${A}] = undefined;
52
+ }
53
+ } else {
54
+ newResult[${A}] = ${k}.value;
55
+ }
56
+
57
+ `):w.write(`
58
+ const ${k}_present = ${L};
59
+ if (${k}.issues.length) {${R(k,A)}
60
+ }
61
+ if (!${k}_present && !${k}.issues.length) {
62
+ payload.issues.push({
63
+ code: "invalid_type",
64
+ expected: "nonoptional",
65
+ input: undefined,
66
+ path: [${A}]
67
+ });
68
+ }
69
+
70
+ if (${k}_present) {
71
+ newResult[${A}] = ${k}.value;
72
+ }
73
+
74
+ `)}return w.write("payload.value = newResult;"),w.write("return payload;"),w.compile()};let c;const d=Wf,h=!Bi.jitless,m=h&&HG.value,v=t.catchall;let b;e._zod.parse=(y,x)=>{b??(b=r.value);const _=y.value;return d(_)?h&&m&&x?.async===!1&&x.jitless!==!0?(c||(c=l(t.shape)),y=c(y,x),v?$8([],_,y,x,b,e):y):i(y,x):(y.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),y)}});function E3(e,t,i,r){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const a=e.filter(l=>!Gs(l));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(l=>l.issues.map(c=>Bo(c,r,hr())))}),t)}const QH=se("$ZodUnion",(e,t)=>{Rt.init(e,t),dt(e,"optin",r=>r.def.options.some(a=>a._zod.optin==="defaulted")?"defaulted":r.def.options.some(a=>a._zod.optin!==void 0)?"optional":void 0),dt(e,"optout",r=>r.def.options.some(a=>a._zod.optout==="optional")?"optional":void 0),dt(e,"values",r=>{if(r.def.options.every(a=>a._zod.values))return new Set(r.def.options.flatMap(a=>Array.from(a._zod.values)))}),dt(e,"pattern",r=>{if(r.def.options.every(a=>a._zod.pattern)){const a=r.def.options.map(l=>l._zod.pattern);return new RegExp(`^(${a.map(l=>cb(l.source)).join("|")})$`)}});const i=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,a)=>{if(i)return i(r,a);let l=!1;const c=[];for(const d of t.options){const h=d._zod.run({value:r.value,issues:[]},a);if(h instanceof Promise)c.push(h),l=!0;else{if(h.issues.length===0)return h;c.push(h)}}return l?Promise.all(c).then(d=>E3(d,r,e,a)):E3(c,r,e,a)}}),JH=se("$ZodIntersection",(e,t)=>{Rt.init(e,t),e._zod.parse=(i,r)=>{const a=i.value,l=t.left._zod.run({value:a,issues:[]},r),c=t.right._zod.run({value:a,issues:[]},r);return l instanceof Promise||c instanceof Promise?Promise.all([l,c]).then(([h,p])=>T3(i,h,p)):T3(i,l,c)}});function rv(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Js(e)&&Js(t)){const i=Object.keys(t),r=Object.keys(e).filter(l=>i.indexOf(l)!==-1),a={...e,...t};Object.prototype.hasOwnProperty.call(a,"__proto__")&&delete a.__proto__;for(const l of r){if(l==="__proto__")continue;const c=rv(e[l],t[l]);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};a[l]=c.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let r=0;r<e.length;r++){const a=e[r],l=t[r],c=rv(a,l);if(!c.valid)return{valid:!1,mergeErrorPath:[r,...c.mergeErrorPath]};i.push(c.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function T3(e,t,i){const r=new Map;let a;const l=new Map,c=(p,m)=>{let v;if(p.code==="unrecognized_keys"&&!p.path?.length)a??(a=p),v=p.keys;else if(p.code==="invalid_key"&&p.origin==="record"&&p.path?.length===1){const b=String(p.path[0]);l.has(b)||l.set(b,p),v=[b]}else return!1;for(const b of v)r.has(b)||r.set(b,{}),r.get(b)[m]=!0;return!0};for(const p of t.issues)c(p,"l")||e.issues.push(p);for(const p of i.issues)c(p,"r")||e.issues.push(p);const d=[...r].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(d.length){const p=a?d.filter(m=>a.keys.includes(m)):[];p.length&&e.issues.push({...a,keys:p});for(const m of d)!p.includes(m)&&l.has(m)&&e.issues.push(l.get(m))}const h=rv(t.value,i.value);if(!h.valid){if(Gs(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(h.mergeErrorPath)}`)}return e.value=h.data,e}const eF=se("$ZodRecord",(e,t)=>{Rt.init(e,t);const i=Bi.memoizer;i?.attach(e),e._zod.parse=(r,a)=>{const l=r.value;if(!Js(l))return r.issues.push({expected:"record",code:"invalid_type",input:l,inst:e}),r;const c=[],d=t.keyType._zod.values;if(d&&!t.partial){r.value=i?i.alloc(e,r,{},a):{};const h=new Set;for(const m of d)if(typeof m=="string"||typeof m=="number"||typeof m=="symbol"){if(h.add(typeof m=="number"?m.toString():m),m==="__proto__")continue;const v=t.keyType._zod.run({value:m,issues:[]},a);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(v.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(x=>Bo(x,a,hr())),input:m,path:[m],inst:e});continue}const b=v.value;if(b==="__proto__")continue;const y=t.valueType._zod.run({value:l[m],issues:[]},a);y instanceof Promise?c.push(y.then(x=>{x.issues.length&&r.issues.push(...Vs(m,x.issues)),r.value[b]=x.value})):(y.issues.length&&r.issues.push(...Vs(m,y.issues)),r.value[b]=y.value)}let p;for(const m in l)if(!h.has(m))if(t.mode==="loose"){if(m==="__proto__")continue;r.value[m]=l[m]}else p=p??[],p.push(m);p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:p,continue:!0})}else{r.value=i?i.alloc(e,r,{},a):{};let h;for(const p of Reflect.ownKeys(l)){if(p==="__proto__"||!Object.prototype.propertyIsEnumerable.call(l,p))continue;let m=t.keyType._zod.run({value:p,issues:[]},a);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&gb.test(p)&&m.issues.length){const x=t.keyType._zod.run({value:Number(p),issues:[]},a);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(m=x)}if(m.issues.length){t.mode==="loose"?r.value[p]=l[p]:d?(h=h??[],h.push(p)):r.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(x=>Bo(x,a,hr())),input:p,path:[p],inst:e});continue}const b=m.value;if(b==="__proto__")continue;const y=t.valueType._zod.run({value:l[p],issues:[]},a);y instanceof Promise?c.push(y.then(x=>{x.issues.length&&r.issues.push(...Vs(p,x.issues)),r.value[b]=x.value})):(y.issues.length&&r.issues.push(...Vs(p,y.issues)),r.value[b]=y.value)}h&&h.length>0&&r.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:h,continue:!0})}return c.length?Promise.all(c).then(()=>r):r}}),tF=se("$ZodEnum",(e,t)=>{Rt.init(e,t);const i=w8(t.entries),r=new Set(i);e._zod.values=r;const a=i.filter(l=>FG.has(typeof l));e._zod.pattern=new RegExp(a.length?`^(${a.map(l=>el(l.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(l,c)=>{const d=l.value;return r.has(d)||l.issues.push({code:"invalid_value",values:i,input:d,inst:e}),l}}),nF=se("$ZodLiteral",(e,t)=>{Rt.init(e,t);const i=new Set(t.values);e._zod.values=i,e._zod.pattern=new RegExp(t.values.length?`^(${t.values.map(r=>typeof r=="string"?el(r):r?el(r.toString()):String(r)).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(r,a)=>{const l=r.value;return i.has(l)||r.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),r}}),iF=se("$ZodTransform",(e,t)=>{Rt.init(e,t),e._zod.optin="optional",Bi.memoizer?.guard(e),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new z8(e.constructor.name);const a=t.transform(i.value,i);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(c=>(i.value=c,i));if(a instanceof Promise)throw new qs;return i.value=a,i}});function k3(e,t){return e.value=t.issues.length?void 0:t.value,e}const U8=se("$ZodOptional",(e,t)=>{Rt.init(e,t),dt(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",dt(e,"values",i=>{const r=i.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),dt(e,"pattern",i=>{const r=i.def.innerType._zod.pattern;return r?new RegExp(`^(${cb(r.source)})?$`):void 0}),e._zod.parse=(i,r)=>{if(i.value===void 0){if(t.innerType._zod.optin!=="defaulted")return i;const a=t.innerType._zod.run({value:i.value,issues:[]},r);return a instanceof Promise?a.then(l=>k3(i,l)):k3(i,a)}return t.innerType._zod.run(i,r)}}),rF=se("$ZodExactOptional",(e,t)=>{U8.init(e,t),dt(e,"values",i=>i.def.innerType._zod.values),dt(e,"pattern",i=>i.def.innerType._zod.pattern),e._zod.parse=(i,r)=>t.innerType._zod.run(i,r)}),oF=se("$ZodNullable",(e,t)=>{Rt.init(e,t),dt(e,"optin",i=>i.def.innerType._zod.optin),dt(e,"optout",i=>i.def.innerType._zod.optout),dt(e,"pattern",i=>{const r=i.def.innerType._zod.pattern;return r?new RegExp(`^(${cb(r.source)}|null)$`):void 0}),dt(e,"values",i=>i.def.innerType._zod.values?new Set([...i.def.innerType._zod.values,null]):void 0),e._zod.parse=(i,r)=>i.value===null?i:t.innerType._zod.run(i,r)}),aF=se("$ZodDefault",(e,t)=>{Rt.init(e,t),e._zod.optin="defaulted",dt(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return t.innerType._zod.run(i,r);if(i.value===void 0)return i.value=t.defaultValue,i;const a=t.innerType._zod.run(i,r);return a instanceof Promise?a.then(l=>z3(l,t)):z3(a,t)}});function z3(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const sF=se("$ZodPrefault",(e,t)=>{Rt.init(e,t),e._zod.optin="defaulted",dt(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,r)=>(r.direction==="backward"||i.value===void 0&&(i.value=t.defaultValue),t.innerType._zod.run(i,r))}),lF=se("$ZodNonOptional",(e,t)=>{Rt.init(e,t),dt(e,"values",i=>{const r=i.def.innerType._zod.values;return r?new Set([...r].filter(a=>a!==void 0)):void 0}),e._zod.parse=(i,r)=>{const a=t.innerType._zod.run(i,r);return a instanceof Promise?a.then(l=>R3(l,e)):R3(a,e)}});function R3(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function A3(e,t,i,r){return t.issues.length?(e.value=i.catchValue({...t,value:e.value,error:{issues:t.issues.map(a=>Bo(a,r,hr()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const cF=se("$ZodCatch",(e,t)=>{Rt.init(e,t),dt(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),dt(e,"optout",i=>i.def.innerType._zod.optout),dt(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return t.innerType._zod.run(i,r);const a=t.innerType._zod.run({value:i.value,issues:[]},r);return a instanceof Promise?a.then(l=>A3(i,l,t,r)):A3(i,a,t,r)}}),uF=se("$ZodPipe",(e,t)=>{Rt.init(e,t),dt(e,"values",i=>i.def.in._zod.values),dt(e,"optin",i=>i.def.in._zod.optin),dt(e,"optout",i=>i.def.out._zod.optout),dt(e,"propValues",i=>i.def.in._zod.propValues),e._zod.parse=(i,r)=>{if(r.direction==="backward"){const l=t.out._zod.run(i,r);return l instanceof Promise?l.then(c=>sf(c,t.in,r)):sf(l,t.in,r)}const a=t.in._zod.run(i,r);return a instanceof Promise?a.then(l=>sf(l,t.out,r)):sf(a,t.out,r)}});function sf(e,t,i){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},i)}const dF=se("$ZodReadonly",(e,t)=>{Rt.init(e,t),dt(e,"propValues",i=>i.def.innerType._zod.propValues),dt(e,"values",i=>i.def.innerType._zod.values),dt(e,"optin",i=>i.def.innerType?._zod?.optin),dt(e,"optout",i=>i.def.innerType?._zod?.optout),e._zod.parse=(i,r)=>{if(r.direction==="backward")return t.innerType._zod.run(i,r);const a=t.innerType._zod.run(i,r);return a instanceof Promise?a.then(O3):O3(a)}});function O3(e){return e.memo||(e.value=Object.freeze(e.value)),e}const fF=se("$ZodCustom",(e,t)=>{Xn.init(e,t),Rt.init(e,t),e._zod.parse=(i,r)=>i,e._zod.check=i=>{const r=i.value,a=t.fn(r);if(a instanceof Promise)return a.then(l=>N3(l,i,r,e));N3(a,i,r,e)}});function N3(e,t,i,r){if(!e){const a={code:"custom",input:i,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(ou(a))}}class hF extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const ov="~memo",I3=[];function Jm(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const P3=new WeakMap;function W8(e,t){const i=P3.get(e);if(i!==void 0)return i;if(t.has(e))return!0;t.add(e);let r=!1;const a=d=>{!r&&d?._zod&&W8(d,t)&&(r=!0)},l=e._zod.def;switch(l.type){case"object":{for(const d of Reflect.ownKeys(l.shape))a(l.shape[d]);a(l.catchall);break}case"array":a(l.element);break;case"tuple":for(const d of l.items)a(d);a(l.rest);break;case"record":case"map":a(l.keyType),a(l.valueType);break;case"set":a(l.valueType);break;case"union":for(const d of l.options)a(d);break;case"intersection":a(l.left),a(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":a(l.innerType);break;case"pipe":a(l.in),a(l.out);break;case"function":a(l.input),a(l.output);break;case"lazy":a(e._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const d in l){const h=Object.getOwnPropertyDescriptor(l,d);if(!h||h.get)continue;const p=h.value;if(!(!p||typeof p!="object")){if(p._zod)a(p);else if(Array.isArray(p))for(const m of p)a(m)}}}return t.delete(e),P3.set(e,r),r}function gF(e,t){let i=e.buckets.get(t);return i||(i=new Map,e.buckets.set(t,i)),i}let lf;const cf=[],pF={alloc(e,t,i){const r=lf;if(!r)return i;lf=void 0;const a={value:i,issues:null};return r.set(t.value,a),cf.push(a),i},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,r=(a,l)=>{if(l.direction!=="backward"&&vF(l,a.value))throw new hF;return i(a,l)};e._zod.parse=r,e._zod.run===i&&(e._zod.run=r)})},attach(e){var t;let i,r,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const l=e._zod.parse,c=(d,h)=>{if(i===void 0&&(i=W8(e,new Set),!i))return e._zod.parse=l,e._zod.run===c&&(e._zod.run=l),l(d,h);const p=d.value;if(p===null||typeof p!="object")return l(d,h);let m=h[ov];m||(m={buckets:new Map,backEdges:void 0},h[ov]=m);let v;r===h?v=a:(v=gF(m,e),r=h,a=v);const b=v.get(p);if(b)return d.value=b.value,b.issues?b.issues.length&&d.issues.push(...Jm(b.issues)):(d.memo=!0,m.backEdges??(m.backEdges=new Set),m.backEdges.add(b.value)),d;lf=v;const y=cf.length,x=l(d,h);lf=void 0;const _=cf.length>y?cf.pop():void 0;return x instanceof Promise?x.then(w=>(_&&(_.issues=w.issues.length?Jm(w.issues):I3),w)):(_&&(_.issues=x.issues.length?Jm(x.issues):I3),x)};e._zod.parse=c,e._zod.run===l&&(e._zod.run=c)})}};function mF(){return pF}function vF(e,t){const i=e[ov]?.backEdges;return i!==void 0&&t!==null&&typeof t=="object"&&i.has(t)}const bF=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(l){return e[l]??null}const i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function a(l,c){return l==="number"&&typeof c=="number"&&!Number.isFinite(c)?String(c):r[l]??l}return l=>{switch(l.code){case"invalid_type":{const c=a(l.expected),d=eV(l.input),h=a(d,l.input);return`Invalid input: expected ${c}, received ${h}`}case"invalid_value":return l.values.length===1?`Invalid input: expected ${T8(l.values[0])}`:`Invalid option: expected one of ${p3(l.values,"|")}`;case"too_big":{const c=l.exact?"exactly ":l.inclusive?"<=":"<",d=t(l.origin);return d?`Too big: expected ${l.origin??"value"} to have ${c}${l.maximum.toString()} ${d.unit??"elements"}`:`Too big: expected ${l.origin??"value"} to be ${c}${l.maximum.toString()}`}case"too_small":{const c=l.exact?"exactly ":l.inclusive?">=":">",d=t(l.origin);return d?`Too small: expected ${l.origin} to have ${c}${l.minimum.toString()} ${d.unit}`:`Too small: expected ${l.origin} to be ${c}${l.minimum.toString()}`}case"invalid_format":{const c=l;return c.format==="starts_with"?`Invalid string: must start with "${c.prefix}"`:c.format==="ends_with"?`Invalid string: must end with "${c.suffix}"`:c.format==="includes"?`Invalid string: must include "${c.includes}"`:c.format==="regex"?`Invalid string: must match pattern ${c.pattern}`:`Invalid ${i[c.format]??l.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${l.divisor}`;case"unrecognized_keys":return`Unrecognized key${l.keys.length>1?"s":""}: ${p3(l.keys,", ")}`;case"invalid_key":return`Invalid key in ${l.origin}`;case"invalid_union":return l.options&&Array.isArray(l.options)&&l.options.length>0?`Invalid discriminator value. Expected ${l.options.map(d=>`'${d}'`).join(" | ")}`:l.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${l.origin}`;default:return"Invalid input"}}};function yF(){return{localeError:bF()}}var M3;class xF{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...i){const r=i[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const i=this._map.get(t);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(t),this}get(t){const i=t._zod.parent;if(i){const r={...this.get(i)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function SF(){return new xF}(M3=globalThis).__zod_globalRegistry??(M3.__zod_globalRegistry=SF());const Lc=globalThis.__zod_globalRegistry;function _F(e,t){return new e({type:"string",...ke(t)})}function wF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ke(t)})}function CF(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ke(t)})}function EF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ke(t)})}function TF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ke(t)})}function kF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ke(t)})}function zF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ke(t)})}function RF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ke(t)})}function AF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ke(t)})}function OF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ke(t)})}function NF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ke(t)})}function IF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ke(t)})}function PF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ke(t)})}function MF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ke(t)})}function DF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ke(t)})}function LF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ke(t)})}function jF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ke(t)})}function BF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ke(t)})}function GF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ke(t)})}function VF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ke(t)})}function HF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ke(t)})}function FF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ke(t)})}function $F(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ke(t)})}function UF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ke(t)})}function WF(e,t){return new e({type:"string",format:"date",check:"string_format",...ke(t)})}function YF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ke(t)})}function qF(e,t){return new e({type:"string",format:"duration",check:"string_format",...ke(t)})}function XF(e,t){return new e({type:"number",checks:[],...ke(t)})}function ZF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ke(t)})}function KF(e,t){return new e({type:"boolean",...ke(t)})}function QF(e){return new e({type:"unknown"})}function JF(e,t){return new e({type:"never",...ke(t)})}function D3(e,t){return new M8({check:"less_than",...ke(t),value:e,inclusive:!1})}function e0(e,t){return new M8({check:"less_than",...ke(t),value:e,inclusive:!0})}function L3(e,t){return new D8({check:"greater_than",...ke(t),value:e,inclusive:!1})}function t0(e,t){return new D8({check:"greater_than",...ke(t),value:e,inclusive:!0})}function j3(e,t){return new QV({check:"multiple_of",...ke(t),value:e})}function Y8(e,t){return new eH({check:"max_length",...ke(t),maximum:e})}function Xf(e,t){return new tH({check:"min_length",...ke(t),minimum:e})}function q8(e,t){return new nH({check:"length_equals",...ke(t),length:e})}function e$(e,t){return new iH({check:"string_format",format:"regex",...ke(t),pattern:e})}function t$(e){return new rH({check:"string_format",format:"lowercase",...ke(e)})}function n$(e){return new oH({check:"string_format",format:"uppercase",...ke(e)})}function i$(e,t){return new aH({check:"string_format",format:"includes",...ke(t),includes:e})}function r$(e,t){return new sH({check:"string_format",format:"starts_with",...ke(t),prefix:e})}function o$(e,t){return new lH({check:"string_format",format:"ends_with",...ke(t),suffix:e})}function ul(e){return new cH({check:"overwrite",tx:e})}function a$(e){return ul(t=>t.normalize(e))}function s$(){return ul(e=>e.trim())}function l$(){return ul(e=>e.toLowerCase())}function c$(){return ul(e=>e.toUpperCase())}function u$(){return ul(e=>VG(e))}function d$(e,t,i){return new e({type:"array",element:t,...ke(i)})}function f$(e,t,i){return new e({type:"custom",check:"custom",fn:t,...ke(i)})}function h$(e,t){const i=g$(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(ou(a,r.value,i._zod.def));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),"input"in l||(l.input=r.value),l.inst??(l.inst=i),l.continue??(l.continue=!i._zod.def.abort),r.issues.push(ou(l))}},e(r.value,r)),t);return i}function g$(e,t){const i=new Xn({check:"custom",...ke(t)});return i._zod.check=e,i}function Uc(e,...t){for(const i of t)for(const r of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,r)&&Wn(e,r,i[r]);return e}function X8(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Lc,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Go(e,t,i,r,a){const l=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:a}):t.unrepresentable;if(l==="any")return!1;if(l===void 0||l==="throw")throw new Error(a);return Object.assign(i,l),!0}function Ft(e,t,i={path:[],schemaPath:[]}){var r;const a=e._zod.def,l=t.seen.get(e);if(l)return l.count++,i.schemaPath.includes(e)&&(l.cycle=i.path),l.schema;const c={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,c),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const d=e._zod.toJSONSchema?.();if(d)c.schema=d;else{const m={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const b=c.schema,y=t.processors[a.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);y(e,t,b,m)}const v=e._zod.parent;v&&(c.ref||(c.ref=v),Ft(v,t,m),t.seen.get(v).isParent=!0)}const h=t.metadataRegistry.get(e);return h&&Uc(c.schema,h),t.io==="input"&&An(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&"_prefault"in c.schema&&((r=c.schema).default??(r.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function B3(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Z8(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const c of e.seen.entries()){const d=e.metadataRegistry.get(c[0])?.id;if(d){const h=r.get(d);if(h&&h!==c[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,c[0])}}const a=c=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=e.external.registry.get(c[0])?.id,b=e.external.uri??(x=>x);if(v)return{ref:b(v)};const y=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=y,{defId:y,ref:`${b("__shared")}#/${d}/${B3(y)}`}}const h="#",p=`${h}/${d}/`;if(c[1]===i&&!c[1].schema.id)return{ref:h};const m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:p+B3(m)}},l=c=>{if(c[1].schema.$ref)return;const d=c[1],{ref:h,defId:p}=a(c);d.def={...d.schema},p&&(d.defId=p);const m=d.schema;for(const v in m)delete m[v];m.$ref=h};if(e.cycles==="throw")for(const c of e.seen.entries()){const d=c[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
75
+
76
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const d=c[1];if(t===c[0]){l(c);continue}if(e.external){const p=e.external.registry.get(c[0])?.id;if(t!==c[0]&&p){l(c);continue}}if(e.metadataRegistry.get(c[0])?.id){l(c);continue}if(d.cycle){l(c);continue}if(d.count>1&&e.reused==="ref"){l(c);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function K8(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const i=[];for(const r of t){if(!r||typeof r!="object")return;K8(r);const a=Object.keys(r);if(a.length!==1||a[0]!=="type")return;const l=r.type;for(const c of Array.isArray(l)?l:[l]){if(typeof c!="string")return;i.includes(c)||i.push(c)}}delete e.anyOf,e.type=i.length===1?i[0]:i}const Q8=new Set(["type","properties","required","additionalProperties"]),G3=["oneOf","anyOf"];function V3(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function av(e){const t=[];for(const l of e){if(typeof l!="object"||l.type!=="object")return null;for(const c in l)if(!Q8.has(c))return null;t.push(l)}const i={},r=new Set;for(const l of t){for(const c in l.properties){if(Object.prototype.hasOwnProperty.call(i,c))continue;const d=[];for(const p of t){const m=p.properties?.[c]??V3(p);m!=null&&(d.some(v=>JSON.stringify(v)===JSON.stringify(m))||d.push(m))}const h=d.length===1?d[0]:av(d)??{allOf:d};Wn(i,c,h)}for(const c of l.required??[])r.add(c)}const a={type:"object",properties:i};if(r.size&&(a.required=[...r]),t.every(l=>l.additionalProperties===!1))a.additionalProperties=!1;else{const l=[];for(const c of t){const d=V3(c);d&&!l.some(h=>JSON.stringify(h)===JSON.stringify(d))&&l.push(d)}l.length===1?a.additionalProperties=l[0]:l.length>1&&(a.additionalProperties={allOf:l})}return a}function p$(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const a of Q8)if(a in e)return;const i=t.filter(a=>G3.some(l=>Array.isArray(a[l])));let r=null;if(!i.length)r=av(t);else{const a=i[0],l=G3.find(h=>Array.isArray(a[h]));if(Object.keys(a).length!==1)return;const c=t.filter(h=>h!==a),d=a[l].map(h=>av([...c,h]));if(d.some(h=>!h))return;r={[l]:d}}r&&(delete e.allOf,Uc(e,r))}function J8(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const h=e.seen.get(d);if(h.ref===null)return;const p=h.def??h.schema,m={...p},v=h.ref;if(h.ref=null,v){r(v);const y=e.seen.get(v),x=y.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(x)):Uc(p,x),Uc(p,m),d._zod.parent===v)for(const w in p)w==="$ref"||w==="allOf"||w in m||delete p[w];if(x.$ref&&y.def)for(const w in p)w==="$ref"||w==="allOf"||w in y.def&&JSON.stringify(p[w])===JSON.stringify(y.def[w])&&delete p[w]}const b=d._zod.parent;if(b&&b!==v){r(b);const y=e.seen.get(b);if(y?.schema.$ref&&(p.$ref=y.schema.$ref,y.def))for(const x in p)x==="$ref"||x==="allOf"||x in y.def&&JSON.stringify(p[x])===JSON.stringify(y.def[x])&&delete p[x]}e.override({zodSchema:d,jsonSchema:p,path:h.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const d of[...e.seen.entries()].reverse())r(d[0]);if(e.target!=="openapi-3.0")for(const d of e.seen.entries())K8(d[1].def??d[1].schema);for(const d of e.deferred)d();if(e.intersections.length){const d=new Map;for(const h of e.seen.values())for(const p of[h.schema,h.def]){const m=p?.allOf;if(!Array.isArray(m))continue;const v=d.get(m);v?v.push(p):d.set(m,[p])}for(const h of e.intersections)for(const p of d.get(h)??[])p$(p)}}const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const d=e.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(d)}Uc(a,i.defId?i.schema:i.def??i.schema);const l=e.metadataRegistry.get(t)?.id;l!==void 0&&a.id===l&&delete a.id;const c=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const d of e.seen.entries()){const h=d[1];h.def&&h.defId&&(h.def.id===h.defId&&delete h.def.id,Wn(c,h.defId,h.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?a.$defs=c:a.definitions=c);try{const d=JSON.parse(JSON.stringify(a));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:Zf(t,"input",e.processors),output:Zf(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function An(e,t){const i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return An(r.element,i);if(r.type==="set")return An(r.valueType,i);if(r.type==="lazy")return An(r.getter(),i);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return An(r.innerType,i);if(r.type==="intersection")return An(r.left,i)||An(r.right,i);if(r.type==="record"||r.type==="map")return An(r.keyType,i)||An(r.valueType,i);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:An(r.in,i)||An(r.out,i);if(r.type==="object"){for(const a in r.shape)if(An(r.shape[a],i))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(An(a,i))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(An(a,i))return!0;return!!(r.rest&&An(r.rest,i))}return!1}const m$=(e,t={})=>i=>{const r=X8({...i,processors:t});return Ft(e,r),Z8(r,e),J8(r,e)},Zf=(e,t,i={})=>r=>{const{libraryOptions:a,target:l}=r??{},c=X8({...a??{},target:l,io:t,processors:i});return Ft(e,c),Z8(c,e),J8(c,e)},v$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},b$=(e,t,i,r)=>{const a=i;a.type="string";const{minimum:l,maximum:c,format:d,patterns:h,contentEncoding:p,laxFormat:m}=e._zod.bag;if(typeof l=="number"&&(a.minLength=l),typeof c=="number"&&(a.maxLength=c),d&&(a.format=v$[d]??d,a.format===""&&delete a.format,(d==="time"||m)&&delete a.format),p&&(a.contentEncoding=p),h&&h.size>0){const v=[...h];v.length===1?a.pattern=v[0].source:v.length>1&&(a.allOf=[...v.map(b=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:b.source}))])}},y$=(e,t,i,r)=>{const a=i,{minimum:l,maximum:c,format:d,multipleOf:h,exclusiveMaximum:p,exclusiveMinimum:m}=e._zod.bag;typeof d=="string"&&d.includes("int")?a.type="integer":a.type="number";const v=typeof m=="number"&&m>=(l??Number.NEGATIVE_INFINITY),b=typeof p=="number"&&p<=(c??Number.POSITIVE_INFINITY),y=t.target==="draft-04"||t.target==="openapi-3.0";v?y?(a.minimum=m,a.exclusiveMinimum=!0):a.exclusiveMinimum=m:typeof l=="number"&&(a.minimum=l),b?y?(a.maximum=p,a.exclusiveMaximum=!0):a.exclusiveMaximum=p:typeof c=="number"&&(a.maximum=c),typeof h=="number"&&(Number.isFinite(h)&&h!==0?a.multipleOf=Math.abs(h):Go(e,t,a,r,`A multipleOf divisor of ${h} cannot be represented in JSON Schema`))},x$=(e,t,i,r)=>{i.type="boolean"},S$=(e,t,i,r)=>{i.not={}},_$=(e,t,i,r)=>{},w$=(e,t,i,r)=>{const a=e._zod.def,l=w8(a.entries);if(l.length===0){i.not={};return}l.every(c=>typeof c=="number")&&(i.type="number"),l.every(c=>typeof c=="string")&&(i.type="string"),i.enum=l},C$=(e,t,i,r)=>{const a=e._zod.def;if(a.values.length===0){i.not={};return}const l=[];for(const c of a.values)if(c===void 0){if(Go(e,t,i,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof c=="bigint"){if(Go(e,t,i,r,"BigInt literals cannot be represented in JSON Schema"))return;l.push(Number(c))}else l.push(c);if(l.length!==0)if(l.length===1){const c=l[0];i.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?i.enum=[c]:i.const=c}else l.every(c=>typeof c=="number")&&(i.type="number"),l.every(c=>typeof c=="string")&&(i.type="string"),l.every(c=>typeof c=="boolean")&&(i.type="boolean"),l.every(c=>c===null)&&(i.type="null"),i.enum=l},E$=(e,t,i,r)=>{Go(e,t,i,r,"Custom types cannot be represented in JSON Schema")},T$=(e,t,i,r)=>{Go(e,t,i,r,"Transforms cannot be represented in JSON Schema")},k$=(e,t,i,r)=>{const a=i,l=e._zod.def,{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(a.minItems=c),typeof d=="number"&&(a.maxItems=d),a.type="array",a.items=Ft(l.element,t,{...r,path:[...r.path,"items"]})};function Kf(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Kf(t.out):t.type==="catch"?Kf(t.innerType):e._zod.optin}const z$=(e,t,i,r)=>{const a=i,l=e._zod.def,c=l.shape;if(Object.getOwnPropertySymbols(c).length&&Go(e,t,a,r,"Symbol keys cannot be represented in JSON Schema"))return;a.type="object",a.properties={};for(const m in c)Wn(a.properties,m,Ft(c[m],t,{...r,path:[...r.path,"properties",m]}));const h=new Set(Object.keys(c)),p=new Set([...h].filter(m=>{const v=l.shape[m];return t.io==="input"?Kf(v)===void 0:v._zod.optout===void 0}));p.size>0&&(a.required=Array.from(p)),l.catchall?._zod.def.type==="never"?a.additionalProperties=!1:l.catchall?l.catchall&&(a.additionalProperties=Ft(l.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},R$=(e,t,i,r)=>{const a=e._zod.def,l=a.inclusive===!1,c=a.options.map((d,h)=>Ft(d,t,{...r,path:[...r.path,l?"oneOf":"anyOf",h]}));l?i.oneOf=c:i.anyOf=c},A$=(e,t,i,r)=>{const a=e._zod.def,l=Ft(a.left,t,{...r,path:[...r.path,"allOf",0]}),c=Ft(a.right,t,{...r,path:[...r.path,"allOf",1]}),d=p=>"allOf"in p&&Object.keys(p).length===1,h=[...d(l)?l.allOf:[l],...d(c)?c.allOf:[c]];i.allOf=h,t.intersections.push(h)};function sv(e,t,i){if(t.$ref){if(i.has(t))return t;i.add(t);const x=e.get(t)?.def;if(!x)return t;const _=sv(e,x,i);return _===x?t:_}for(const x of["anyOf","oneOf"]){const _=t[x];if(!Array.isArray(_))continue;const w=_.map(C=>sv(e,C,i));w.some((C,R)=>C!==_[R])&&(t={...t,[x]:w})}const r=Array.isArray(t.type)?t.type:[t.type],a=!r.includes("string")&&r.some(x=>x==="number"||x==="integer"),l=t.enum??(t.const!==void 0?[t.const]:void 0);if(!a&&!l?.some(x=>typeof x=="number"))return t;const{minimum:c,maximum:d,exclusiveMinimum:h,exclusiveMaximum:p,multipleOf:m,format:v,id:b,...y}=t;return y.enum?y.enum=y.enum.map(x=>typeof x=="number"?String(x):x):typeof y.const=="number"&&(y.const=String(y.const)),a&&(y.type="string",l||(y.pattern=(r.includes("number")?gb:P8).source)),y}const lv=new WeakMap;function O$(e){const t=new Map;for(const r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);const i=new Map;for(const r of lv.get(e)??[]){const a=e.seen.get(r),l=(a?.def??a?.schema)?.propertyNames;if(!l||l===!0||i.has(l))continue;const c=sv(t,l,new Set);c!==l&&i.set(l,c)}if(i.size)for(const r of e.seen.values())for(const a of[r.schema,r.def]){const l=a&&i.get(a.propertyNames);l&&(a.propertyNames=l)}}const N$=(e,t,i,r)=>{const a=i,l=e._zod.def;a.type="object";const c=l.keyType,h=c._zod.bag?.patterns;if(l.mode==="loose"&&h&&h.size>0){const v=Ft(l.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});a.patternProperties={};for(const b of h)Wn(a.patternProperties,b.source,v)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){a.propertyNames=Ft(l.keyType,t,{...r,path:[...r.path,"propertyNames"]});let v=lv.get(t);v||(v=[],lv.set(t,v),t.deferred.push(()=>O$(t))),v.push(e)}a.additionalProperties=Ft(l.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}const p=c._zod.values,m=t.io==="input"&&Kf(l.valueType)!==void 0;if(p&&!l.partial&&!m){const v=[...p].filter(b=>typeof b=="string"||typeof b=="number");v.length>0&&(a.required=v.map(String))}},I$=(e,t,i,r)=>{const a=e._zod.def,l=Ft(a.innerType,t,r),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=a.innerType,i.nullable=!0):i.anyOf=[l,{type:"null"}]},P$=(e,t,i,r)=>{const a=e._zod.def;Ft(a.innerType,t,r);const l=t.seen.get(e);l.ref=a.innerType},vb=Symbol();function eC(e,t,i,r,a){let l=!1;const c=JSON.stringify(e,(d,h)=>typeof h!="bigint"?h:(l=!0,null));return l?(Go(t,i,r,a,"BigInt defaults cannot be represented in JSON Schema"),vb):JSON.parse(c)}const M$=(e,t,i,r)=>{const a=e._zod.def;Ft(a.innerType,t,r);const l=t.seen.get(e);l.ref=a.innerType;const c=eC(a.defaultValue,e,t,i,r);c!==vb&&(i.default=c)},D$=(e,t,i,r)=>{const a=e._zod.def;Ft(a.innerType,t,r);const l=t.seen.get(e);if(l.ref=a.innerType,t.io!=="input")return;const c=eC(a.defaultValue,e,t,i,r);c!==vb&&(i._prefault=c)},L$=(e,t,i,r)=>{const a=e._zod.def;Ft(a.innerType,t,r);const l=t.seen.get(e);l.ref=a.innerType;let c;try{c=a.catchValue(void 0)}catch{Go(e,t,i,r,"Dynamic catch values are not supported in JSON Schema");return}i.default=c},j$=(e,t,i,r)=>{const a=e._zod.def,l=a.in._zod.traits.has("$ZodTransform"),c=t.io==="input"?l?a.out:a.in:a.out;Ft(c,t,r);const d=t.seen.get(e);d.ref=c},B$=(e,t,i,r)=>{const a=e._zod.def;Ft(a.innerType,t,r);const l=t.seen.get(e);l.ref=a.innerType,i.readOnly=!0},tC=(e,t,i,r)=>{const a=e._zod.def;Ft(a.innerType,t,r);const l=t.seen.get(e);l.ref=a.innerType},H3=new WeakSet([Object.prototype,Error.prototype]);function uf(e,t,i){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=i(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const G$=(e,t)=>{A8.init(e,t),e.name="ZodError";const i=Object.getPrototypeOf(e);H3.has(i)||(H3.add(i),uf(i,"format",r=>a=>gV(r,a)),uf(i,"flatten",r=>a=>hV(r,a)),uf(i,"addIssue",r=>a=>{r.issues.push(a),r.message=JSON.stringify(r.issues,nv,2)}),uf(i,"addIssues",r=>a=>{r.issues.push(...a),r.message=JSON.stringify(r.issues,nv,2)}),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Ti=se("ZodError",G$,void 0,{Parent:Error}),V$=fb(Ti),H$=hb(Ti),F$=Oh(Ti),$$=Nh(Ti),U$=vV(Ti),W$=bV(Ti),Y$=yV(Ti),q$=xV(Ti),X$=SV(Ti),Z$=_V(Ti),K$=wV(Ti),Q$=CV(Ti);function J$(){Bi.localeError||hr(yF())}function Ph(){Bi.memoizer||hr({memoizer:mF()})}const At=se("ZodType",(e,t)=>(J$(),Rt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(qo(t,{checks:[...t.checks??[],...e.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Xo(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(XU(e,t))},superRefine(e,t){return this.check(ZU(e,t))},overwrite(e){return this.check(ul(e))},optional(){return U3(this)},exactOptional(){return DU(this)},nullable(){return W3(this)},nullish(){return U3(W3(this))},nonoptional(e){return HU(this,e)},array(){return Dh(this)},or(e){return rC([this,e])},and(e){return NU(this,e)},transform(e){return Y3(this,MU(e))},default(e){return BU(this,e)},prefault(e){return VU(this,e)},catch(e){return $U(this,e)},pipe(e){return Y3(this,e)},readonly(){return YU(this)},describe(e){const t=this.clone();return Lc.add(t,{description:e}),t},meta(...e){if(e.length===0)return Lc.get(this);const t=this.clone();return Lc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return k8(this,"~standard",{...L8(this),jsonSchema:{input:Zf(this,"input"),output:Zf(this,"output")}})},set"~standard"(e){tl(this,"~standard",e)},parse:function e(t,i){return V$(this,t,i,{callee:e})},parseAsync:async function e(t,i){return await H$(this,t,i,{callee:e})},safeParse(e,t){return F$(this,e,t)},async safeParseAsync(e,t){return $$(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){tl(this,"spa",e)},encode:function e(t,i){return U$(this,t,i,{callee:e})},decode:function e(t,i){return W$(this,t,i,{callee:e})},encodeAsync:async function e(t,i){return await Y$(this,t,i,{callee:e})},decodeAsync:async function e(t,i){return await q$(this,t,i,{callee:e})},safeEncode(e,t){return X$(this,e,t)},safeDecode(e,t){return Z$(this,e,t)},async safeEncodeAsync(e,t){return K$(this,e,t)},async safeDecodeAsync(e,t){return Q$(this,e,t)},toJSONSchema(e){return m$(this,{})(e)},get description(){return Lc.get(this)?.description},get _def(){return this._zod.def}}),nC=se("_ZodString",(e,t)=>{mb.init(e,t),At.init(e,t),e._zod.processJSONSchema=(r,a,l)=>b$(e,r,a);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null},{regex(...e){return this.check(e$(...e))},includes(...e){return this.check(i$(...e))},startsWith(...e){return this.check(r$(...e))},endsWith(...e){return this.check(o$(...e))},min(...e){return this.check(Xf(...e))},max(...e){return this.check(Y8(...e))},length(...e){return this.check(q8(...e))},nonempty(...e){return this.check(Xf(1,...e))},lowercase(e){return this.check(t$(e))},uppercase(e){return this.check(n$(e))},trim(){return this.check(s$())},normalize(...e){return this.check(a$(...e))},toLowerCase(){return this.check(l$())},toUpperCase(){return this.check(c$())},slugify(){return this.check(u$())}}),eU=se("ZodString",(e,t)=>{mb.init(e,t),nC.init(e,t)},{email(e){return this.check(wF(oU,e))},url(e){return this.check(RF(sU,e))},jwt(e){return this.check($F(_U,e))},emoji(e){return this.check(AF(lU,e))},guid(e){return this.check(CF(aU,e))},uuid(e){return this.check(EF(df,e))},uuidv4(e){return this.check(TF(df,e))},uuidv6(e){return this.check(kF(df,e))},uuidv7(e){return this.check(zF(df,e))},nanoid(e){return this.check(OF(cU,e))},cuid(e){return this.check(NF(uU,e))},cuid2(e){return this.check(IF(dU,e))},ulid(e){return this.check(PF(fU,e))},base64(e){return this.check(VF(yU,e))},base64url(e){return this.check(HF(xU,e))},xid(e){return this.check(MF(hU,e))},ksuid(e){return this.check(DF(gU,e))},ipv4(e){return this.check(LF(pU,e))},ipv6(e){return this.check(jF(mU,e))},cidrv4(e){return this.check(BF(vU,e))},cidrv6(e){return this.check(GF(bU,e))},e164(e){return this.check(FF(SU,e))},datetime(e){return this.check(UF(tU,e))},date(e){return this.check(WF(nU,e))},time(e){return this.check(YF(iU,e))},duration(e){return this.check(qF(rU,e))}});function Wt(e){return _F(eU,e)}const Ot=se("ZodStringFormat",(e,t)=>{Et.init(e,t),nC.init(e,t)}),tU=se("ZodISODateTime",(e,t)=>{zH.init(e,t),Ot.init(e,t)}),nU=se("ZodISODate",(e,t)=>{RH.init(e,t),Ot.init(e,t)}),iU=se("ZodISOTime",(e,t)=>{AH.init(e,t),Ot.init(e,t)}),rU=se("ZodISODuration",(e,t)=>{OH.init(e,t),Ot.init(e,t)}),oU=se("ZodEmail",(e,t)=>{gH.init(e,t),Ot.init(e,t)}),aU=se("ZodGUID",(e,t)=>{fH.init(e,t),Ot.init(e,t)}),df=se("ZodUUID",(e,t)=>{hH.init(e,t),Ot.init(e,t)}),sU=se("ZodURL",(e,t)=>{xH.init(e,t),Ot.init(e,t)}),lU=se("ZodEmoji",(e,t)=>{SH.init(e,t),Ot.init(e,t)}),cU=se("ZodNanoID",(e,t)=>{_H.init(e,t),Ot.init(e,t)}),uU=se("ZodCUID",(e,t)=>{wH.init(e,t),Ot.init(e,t)}),dU=se("ZodCUID2",(e,t)=>{CH.init(e,t),Ot.init(e,t)}),fU=se("ZodULID",(e,t)=>{EH.init(e,t),Ot.init(e,t)}),hU=se("ZodXID",(e,t)=>{TH.init(e,t),Ot.init(e,t)}),gU=se("ZodKSUID",(e,t)=>{kH.init(e,t),Ot.init(e,t)}),pU=se("ZodIPv4",(e,t)=>{NH.init(e,t),Ot.init(e,t)}),mU=se("ZodIPv6",(e,t)=>{PH.init(e,t),Ot.init(e,t)}),vU=se("ZodCIDRv4",(e,t)=>{MH.init(e,t),Ot.init(e,t)}),bU=se("ZodCIDRv6",(e,t)=>{LH.init(e,t),Ot.init(e,t)}),yU=se("ZodBase64",(e,t)=>{jH.init(e,t),Ot.init(e,t)}),xU=se("ZodBase64URL",(e,t)=>{GH.init(e,t),Ot.init(e,t)}),SU=se("ZodE164",(e,t)=>{VH.init(e,t),Ot.init(e,t)}),_U=se("ZodJWT",(e,t)=>{FH.init(e,t),Ot.init(e,t)}),iC=se("ZodNumber",(e,t)=>{H8.init(e,t),At.init(e,t),e._zod.processJSONSchema=(r,a,l)=>y$(e,r,a,l);const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null},{gt(e,t){return this.check(L3(e,t))},gte(e,t){return this.check(t0(e,t))},min(e,t){return this.check(t0(e,t))},lt(e,t){return this.check(D3(e,t))},lte(e,t){return this.check(e0(e,t))},max(e,t){return this.check(e0(e,t))},int(e){return this.check(F3(e))},safe(e){return this.check(F3(e))},positive(e){return this.check(L3(0,e))},nonnegative(e){return this.check(t0(0,e))},negative(e){return this.check(D3(0,e))},nonpositive(e){return this.check(e0(0,e))},multipleOf(e,t){return this.check(j3(e,t))},step(e,t){return this.check(j3(e,t))},finite(){return this}});function qe(e){return XF(iC,e)}const wU=se("ZodNumberFormat",(e,t)=>{$H.init(e,t),iC.init(e,t)});function F3(e){return ZF(wU,e)}const CU=se("ZodBoolean",(e,t)=>{UH.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>x$(e,i,r)});function Mh(e){return KF(CU,e)}const EU=se("ZodUnknown",(e,t)=>{WH.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>_$()});function $3(){return QF(EU)}const TU=se("ZodNever",(e,t)=>{YH.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>S$(e,i,r)});function kU(e){return JF(TU,e)}const zU=se("ZodArray",(e,t)=>{Ph(),qH.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>k$(e,i,r,a),e.element=t.element},{min(e,t){return this.check(Xf(e,t))},nonempty(e){return this.check(Xf(1,e))},max(e,t){return this.check(Y8(e,t))},length(e,t){return this.check(q8(e,t))},unwrap(){return this.element}});function Dh(e,t){return d$(zU,e,t)}const RU=se("ZodObject",(e,t)=>{Ph(),KH.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>z$(e,i,r,a),oV(e,"shape",i=>i._zod.def.shape,!1)},{keyof(){return Yr(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:$3()})},loose(){return this.clone({...this._zod.def,catchall:$3()})},strict(){return this.clone({...this._zod.def,catchall:kU()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return qG(this,e)},safeExtend(e){return XG(this,e)},merge(e){return ZG(this,e)},pick(e){return WG(this,e)},omit(e){return YG(this,e)},partial(...e){return m3(aC,this,e[0])},exactPartial(...e){return m3(sC,this,e[0],"exactPartial")},required(...e){return KG(lC,this,e[0])}});function Pt(e,t){const i={type:"object",shape:e??{},...ke(t)};return new RU(i)}const AU=se("ZodUnion",(e,t)=>{QH.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>R$(e,i,r,a),e.options=t.options});function rC(e,t){return new AU({type:"union",options:e,...ke(t)})}const OU=se("ZodIntersection",(e,t)=>{JH.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>A$(e,i,r,a)});function NU(e,t){return new OU({type:"intersection",left:e,right:t})}const cv=se("ZodRecord",(e,t)=>{Ph(),eF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>N$(e,i,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function oC(e,t,i){return!t||!t._zod?new cv({type:"record",keyType:Wt(),valueType:e,...ke(t)}):new cv({type:"record",keyType:e,valueType:t,...ke(i)})}function nl(e,t,i){return new cv({type:"record",keyType:e,valueType:t,...ke(i),partial:!0})}const uv=se("ZodEnum",(e,t)=>{tF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(r,a,l)=>w$(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const i=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const l={};for(const c of r)if(i.has(c))l[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new uv({...t,checks:[],...ke(a),entries:l})},e.exclude=(r,a)=>{const l={...t.entries};for(const c of r)if(i.has(c))delete l[c];else throw new Error(`Key ${c} not found in enum`);return new uv({...t,checks:[],...ke(a),entries:l})}});function Yr(e,t){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new uv({type:"enum",entries:i,...ke(t)})}const IU=se("ZodLiteral",(e,t)=>{nF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>C$(e,i,r,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ff(e,t){return new IU({type:"literal",values:Array.isArray(e)?e:[e],...ke(t)})}const PU=se("ZodTransform",(e,t)=>{Ph(),iF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>T$(e,i,r,a),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new z8(e.constructor.name);i.addIssue=l=>{if(typeof l=="string")i.issues.push(ou(l,i.value,t));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=i.value),c.inst??(c.inst=e),i.issues.push(ou(c))}};const a=t.transform(i.value,i);return a instanceof Promise?a.then(l=>(i.value=l,i)):(i.value=a,i)}});function MU(e){return new PU({type:"transform",transform:e})}const aC=se("ZodOptional",(e,t)=>{U8.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>tC(e,i,r,a),e.unwrap=()=>e._zod.def.innerType});function U3(e){return new aC({type:"optional",innerType:e})}const sC=se("ZodExactOptional",(e,t)=>{rF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>tC(e,i,r,a),e.unwrap=()=>e._zod.def.innerType});function DU(e){return new sC({type:"optional",innerType:e})}const LU=se("ZodNullable",(e,t)=>{oF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>I$(e,i,r,a),e.unwrap=()=>e._zod.def.innerType});function W3(e){return new LU({type:"nullable",innerType:e})}const jU=se("ZodDefault",(e,t)=>{aF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>M$(e,i,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function BU(e,t){return new jU({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():E8(t)}})}const GU=se("ZodPrefault",(e,t)=>{sF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>D$(e,i,r,a),e.unwrap=()=>e._zod.def.innerType});function VU(e,t){return new GU({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():E8(t)}})}const lC=se("ZodNonOptional",(e,t)=>{lF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>P$(e,i,r,a),e.unwrap=()=>e._zod.def.innerType});function HU(e,t){return new lC({type:"nonoptional",innerType:e,...ke(t)})}const FU=se("ZodCatch",(e,t)=>{cF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>L$(e,i,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function $U(e,t){return new FU({type:"catch",innerType:e,catchValue:typeof t=="function"?t:sV(t)})}const UU=se("ZodPipe",(e,t)=>{uF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>j$(e,i,r,a),e.in=t.in,e.out=t.out});function Y3(e,t){return new UU({type:"pipe",in:e,out:t})}const WU=se("ZodReadonly",(e,t)=>{dF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>B$(e,i,r,a),e.unwrap=()=>e._zod.def.innerType});function YU(e){return new WU({type:"readonly",innerType:e})}const qU=se("ZodCustom",(e,t)=>{fF.init(e,t),At.init(e,t),e._zod.processJSONSchema=(i,r,a)=>E$(e,i,r,a)});function XU(e,t={}){return f$(qU,e,t)}function ZU(e,t){return h$(e,t)}const KU="cardAnvilAsset",Fe=Wt().meta({[KU]:!0}),bb=["w","u","b","r","g","m","a","c","l","v"],cC=Yr(bb),pn=nl(cC,Fe),QU=["convertdfc","sunmoondfc","compasslanddfc","originpwdfc","mooneldrazidfc","waxingandwaningmoondfc","fandfc","upsidedowndfc"],JU=Yr(QU),eW=nl(JU,Fe),tW=[...bb,"c2"],nW=Yr(tW),iW=nl(nW,Fe),rW=Pt({base:pn.optional(),ub:pn.optional(),nickname:pn.optional(),nicknameUb:pn.optional(),nyxInsert:pn.optional(),nyxInsertUb:pn.optional()}),q3=Pt({regular:Fe.optional(),tall:Fe.optional()}),oW=Pt({plus:Fe,minus:Fe,zero:Fe,separator:Fe,startingLoyalty:Fe,masks:q3.optional(),colorlessNicknameMasks:q3.optional()}),n0=Pt({right:Fe,stripe:Fe}),aW=Pt({badge:Fe,divider:Fe,banner:pn.optional(),bannerTransform:pn.optional(),bannerMasks:n0.optional(),bannerTransformMasks:n0.optional(),bannerReadAheadMasks:n0.optional()}),kc=Pt({base:iW,tall:pn.optional(),land:pn.optional(),nyx:pn.optional(),creature:pn.optional(),pt:pn.optional(),crown:rW.optional(),nickname:pn.optional(),tokenTitle:pn.optional(),black:Fe.optional(),planeswalker:oW.optional(),saga:aW.optional(),extendedOverlay:Fe.optional(),dfcIcon:Fe.optional(),dfcIconSet:eW.optional(),dfcIconColorSet:pn.optional(),flipside:pn.optional(),lessonIcon:Fe.optional()}),jr=Pt({pinlines:Fe.optional(),titleAndType:Fe.optional(),rules:Fe.optional(),noBorder:Fe.optional(),border:Fe.optional(),borderFull:Fe.optional(),legendary:Fe.optional(),legendaryTransform:Fe.optional(),noBorderTransform:Fe.optional(),rightHalf:Fe.optional(),title:Fe.optional(),type:Fe.optional(),keyword:Fe.optional(),extended:Fe.optional(),topHalf:Fe.optional(),bottomHalf:Fe.optional()}),uC=["normal","split","flip","transform","modal_dfc","meld","leveler","class","saga","adventure","mutate","prototype","battle","planar","scheme","vanguard","token","double_faced_token","emblem","augment","host","art_series","reversible_card"],sW=["planeswalker","case"],lW=uC.flatMap(e=>sW.map(t=>`${e}_${t}`)),cW=["saga_creature","saga_transform","saga_transform_creature"],uW=[...uC,...lW,...cW],X3=Yr(uW),Qf=Pt({x:qe(),y:qe(),width:qe(),height:qe()}),Vn=Qf.extend({fontSize:qe(),color:Wt().optional(),outlineColor:Wt().optional(),outlineWidth:qe().optional(),verticalAlign:Yr(["top","center"]).optional(),textAlign:Yr(["left","center","right"]).optional(),letterSpacing:qe().optional(),fontFamily:Wt().optional(),opacity:qe().min(0).max(1).optional(),shadow:Mh().optional(),mask:Fe.optional()}),Pi=Pt({art:Qf,mana:Vn,title:Vn,type:Vn,setSymbol:Qf,rules:Vn.optional(),abilities:Vn.optional(),pt:Vn.optional(),ptImage:Pt({x:qe(),y:qe()}).optional(),collectorInfo:Vn.optional(),startingLoyalty:Vn.optional(),nicknameTitle:Vn.optional(),keyword:Vn.optional(),flipsidePt:Vn.optional(),flipsideType:Vn.optional(),flipsideManaCost:Vn.optional(),flipsideRules:Vn.optional()}),dW=Pt({abilitySpacing:qe(),separatorHeight:qe(),textPaddingX:qe(),staticTextPaddingX:qe(),textPaddingRight:qe().optional(),topPadding:qe().optional(),bottomPadding:qe().optional(),textFillThreshold:qe().optional()}),fW=Pt({abilitySpacing:qe(),dividerHeight:qe(),textPaddingX:qe(),badgeWidth:qe(),skipReminder:Mh().optional(),badgeOffsetX:qe().optional()}),hW=Pt({x:qe(),y:qe(),nicknameCrownX:qe().optional(),nicknameCrownY:qe().optional(),nyxInsertX:qe().optional(),nyxInsertY:qe().optional(),nyxInsertNicknameY:qe().optional()}),gW={x:192,y:220},pW=Pt({x:qe(),y:qe()}),mW={x:378,y:577},hf=Wt().optional(),vW=rC([Pt({type:ff("boolean"),label:Wt(),helperText:hf,defaultValue:Mh()}),Pt({type:ff("string"),label:Wt(),helperText:hf,defaultValue:Wt()}),Pt({type:ff("number"),label:Wt(),helperText:hf,defaultValue:Wt()}),Pt({type:ff("select"),label:Wt(),helperText:hf,defaultValue:Wt(),options:Dh(Wt())})]),dC=oC(Wt(),vW),Z3=Pt({boxes:Pi,tallBoxes:Pi.optional(),twoAbilityBoxes:Pi.optional(),frameAssets:kc,masks:jr.optional(),planeswalkerConfig:dW.optional(),sagaConfig:fW.optional(),crownConfig:hW.optional(),nicknameConfig:pW.optional(),templateSettings:dC.optional(),colorArtOverrides:nl(cC,Qf).optional(),hybridTitleMask:Yr(["title","titleAndType"]).optional(),backFrameAssets:kc.optional(),backMasks:jr.optional(),backBoxes:Pi.optional(),creatureBoxes:Pi.optional(),backCreatureBoxes:Pi.optional(),creatureMasks:jr.optional(),backCreatureMasks:jr.optional(),flipsidePtBoxes:Pi.optional(),sagaFrontBoxes:Pi.optional(),sagaFrontFrameAssets:kc.optional(),sagaFrontMasks:jr.optional(),sagaFrontCreatureBoxes:Pi.optional(),sagaFrontCreatureMasks:jr.optional(),sagaBackBoxes:Pi.optional(),sagaBackFrameAssets:kc.optional(),sagaBackMasks:jr.optional(),sagaBackCreatureBoxes:Pi.optional(),sagaBackCreatureMasks:jr.optional(),compositeFrameAssets:kc.optional(),compositeMasks:jr.optional()}),bW=Pt({canvas:Pt({width:qe().int().positive(),height:qe().int().positive()}).optional(),layouts:nl(X3,Z3),alternateLayouts:oC(Wt(),nl(X3,Z3)).optional(),disabledFields:Dh(Yr(["setSymbol","collectorInfo"])).optional()});Pt({name:Wt(),description:Wt(),previewImage:Fe,tags:Dh(Wt()),disabled:Mh().optional(),templateSettings:dC.optional(),config:bW});const yW={x:2441,y:3847},i0={x:220,y:200,width:2815},xW=611,SW=e=>e.split(".")[0]??e;function r0(e,t={},i){const r=SW(e),a=e.split(".").slice(1).join(".");switch(r){case"base":case"land":case"nyx":case"tall":case"creature":case"tokenTitle":case"extendedOverlay":return{kind:"center"};case"black":return{kind:"at",at:{x:i0.x,y:i0.y}};case"dfcIcon":case"dfcIconSet":case"dfcIconColorSet":return{kind:"at",at:{x:0,y:0}};case"crown":{const l=t.crownConfig??gW,c=t.hasNickname===!0,d=(c?l.nicknameCrownX:void 0)??l.x,h=(c?l.nicknameCrownY:void 0)??l.y;if(a.startsWith("nyxInsert")){const p=l.nyxInsertX??(i?d+(i0.width-i.width)/2:xW),m=(c?l.nyxInsertNicknameY:void 0)??l.nyxInsertY??h+2;return{kind:"at",at:{x:p,y:m}}}return{kind:"at",at:{x:d,y:h}}}case"nickname":{const l=t.nicknameConfig??mW;return{kind:"at",at:{x:l.x,y:l.y}}}case"pt":{const l=t.ptImage??yW;return{kind:"at",at:{x:l.x,y:l.y}}}case"planeswalker":return{kind:"dynamic",reason:"ability rows are laid out from the card's ability count"};case"saga":return{kind:"dynamic",reason:"chapter badges are laid out from the card's chapter count"};case"flipside":return{kind:"dynamic",reason:"positioned from the other face's power/toughness"};default:return{kind:"center"}}}function _W(e,t,i){switch(e.kind){case"center":return{x:(i.width-t.width)/2,y:(i.height-t.height)/2};case"at":return e.at;default:return}}const lt={WHITE:"W",BLUE:"U",BLACK:"B",RED:"R",GREEN:"G",ARTIFACT:"Artifact",COLORLESS:"Colorless",LAND:"Land",GOLD:"Gold",VEHICLE:"Vehicle"},fC=["W","U","B","R","G"],K3=new Set(fC);function Q3(e,t){return e.family===t.family&&e.color===t.color}function dv(e){switch(e){case lt.WHITE:return"w";case lt.BLUE:return"u";case lt.BLACK:return"b";case lt.RED:return"r";case lt.GREEN:return"g";case lt.ARTIFACT:return"a";case lt.COLORLESS:return"c";case lt.LAND:return"l";case lt.VEHICLE:return"v";case lt.GOLD:return"m";case"":return"c";default:return"m"}}function yb(e){const[t,i]=e;return e.length===2&&t!==void 0&&i!==void 0&&K3.has(t)&&K3.has(i)?[t.toLowerCase(),i.toLowerCase()]:null}function No(e,t){if(t==="normal")return{family:"base",color:e};if(t==="nyx")switch(e){case"w":case"u":case"b":case"r":case"g":case"m":case"a":case"c":case"l":return{family:"nyx",color:e};case"v":return{family:"nyx",color:"a"};default:return{family:"nyx",color:"c"}}switch(e){case"w":case"u":case"b":case"r":case"g":case"m":return{family:"land",color:e};default:return{family:"base",color:"l"}}}function wW(e,t,i){const r=[],a=yb(e.pinlines);if(a){const c=No(a[0],t),d=No(a[1],t);r.push({frame:c,mask:"pinlines",preserveAlpha:!0},{frame:d,mask:"pinlines",secondaryMask:"rightHalf",preserveAlpha:!0},{frame:c,mask:"rules",preserveAlpha:!0},{frame:d,mask:"rules",secondaryMask:"rightHalf",preserveAlpha:!0})}else{const c=No(dv(e.pinlines),t);Q3(c,i)||r.push({frame:c,mask:"pinlines",preserveAlpha:!0},{frame:c,mask:"rules",preserveAlpha:!0})}const l=No(dv(e.twins),t);return Q3(l,i)||r.push({frame:l,mask:"titleAndType",preserveAlpha:!0}),r}function hC(e,t={}){const{family:i="normal",hybridTitleMask:r="titleAndType",hasPinlineMask:a=!0}=t;if(e.isHybrid){const p=yb(e.pinlines);if(p)return{baseFrame:No(p[0],i),overlays:[{frame:No(p[1],i),mask:"rightHalf",preserveAlpha:!0},{frame:No("c2",i),mask:r,preserveAlpha:!0}]}}const l=i!=="land"&&!a&&e.background===lt.ARTIFACT&&e.identity.length>0,c=dv(i==="land"||l?e.identity:e.background),d=No(c,i),h=wW(e,i,d);return{baseFrame:d,...h.length>0?{overlays:h}:{}}}function CW(e){const t=new Set(e.map(i=>i.toUpperCase()));return fC.filter(i=>t.has(i)).join("")}function gC(e){const t=CW(e.colors??[]),i={background:t,pinlines:t,twins:t,identity:t,isColorless:!1,isHybrid:!1};if(e.isLand===!0)return i.background=lt.LAND,t.length===0?(i.pinlines=lt.LAND,i.twins=lt.LAND):t.length>2&&(i.pinlines=lt.GOLD,i.twins=lt.GOLD),i;const r=e.isDevoid===!0&&t.length>0;if(r||e.isColorless===!0||t.length===0&&e.isArtifact!==!0)return r&&t.length>1?(i.twins=lt.GOLD,i.background=lt.GOLD):r||(i.twins=lt.COLORLESS,i.background=lt.COLORLESS,i.pinlines=lt.COLORLESS),i.isColorless=!0,i;const l=e.isHybrid===!0&&t.length===2;return i.isHybrid=l,e.isVehicle===!0?i.background=lt.VEHICLE:e.isArtifact===!0?i.background=lt.ARTIFACT:t.length>=2&&!l&&(i.background=lt.GOLD),t.length===0?i.pinlines=lt.ARTIFACT:t.length>2&&(i.pinlines=lt.GOLD),t.length===0?i.twins=lt.ARTIFACT:l?i.twins=lt.LAND:t.length>=2&&(i.twins=lt.GOLD),i}function pC(e,t=!0){return e.isEnchantment===!0&&t?"nyx":e.isLand===!0?"land":"normal"}function mC(e,t={}){const i=yb(e.identity);return i||(e.identity.length===1?e.identity.toLowerCase():e.identity.length>1?"m":t.isArtifact===!0?"a":"c")}function o0(e,t={}){return mC(e,t)}function EW(e,t={}){return t.isLand===!0&&!e.identity?"l":mC(e,t)}function TW(e,t={}){return t.isVehicle===!0?"v":e.isHybrid?"c":e.identity.length===1?e.identity.toLowerCase():e.identity.length>1?"m":t.isArtifact===!0?"a":"c"}function kW(e,t,i){return(i?e.crown?.nicknameUb?.[t]:void 0)??e.crown?.nickname?.[t]}function a0(e,t,i){if(i.nickname){const r=kW(e,t,i.useUBCrowns);if(r!==void 0)return r}return(i.useUBCrowns?e.crown?.ub?.[t]:void 0)??e.crown?.base?.[t]}function zW(e,t){return e.nickname?.[t]}function RW(e,t){return e.pt?.[t]}function AW(e,t,i=!1){return(i?e.crown?.nyxInsertUb?.[t]:void 0)??e.crown?.nyxInsert?.[t]}function OW(e){const t=e.isLegendary===!0;return{crown:t,crownBlackBar:t,nickname:(e.nickname??"")!=="",ptBox:(e.power??"")!==""&&(e.toughness??"")!==""}}function vC(e,t){switch(t.family){case"base":return t.color==="c2"?e.base.c2??e.base.c:e.base[t.color];case"land":return e.land?.[t.color];case"nyx":return e.nyx?.[t.color];case"tall":return e.tall?.[t.color];case"creature":return e.creature?.[t.color]}}function NW(e,t){const i=vC(e,t);if(i!==void 0)return{ref:t,url:i,usedFallback:!1};const r=l=>l==="c2"?e.base.c2??e.base.c:e.base[l],a=t.color==="l"?[t.color,"c","m","w"]:[t.color,"m","w"];for(const l of a){const c=r(l);if(c!==void 0)return{ref:{family:"base",color:l},url:c,usedFallback:!0}}for(const l of bb){const c=e.base[l];if(c!==void 0)return{ref:{family:"base",color:l},url:c,usedFallback:!0}}}function ar(e,t){let i=e;for(const r of t){if(i===null||typeof i!="object")return;i=i[r]}return i}const IW=e=>typeof e=="object"&&e!==null&&typeof e.x=="number"&&typeof e.width=="number";function Wc(e,t){const i=ar(e.frame,t.path);return i===null||typeof i!="object"?[]:Object.entries(i).filter(([,r])=>IW(r)).map(([r,a])=>({key:r,box:a}))}function PW(e){const t=new Map;for(const i of e.slots){const r=t.get(i.variant)??new Set;r.add(i.layout),t.set(i.variant,r)}return[...t.entries()].sort((i,r)=>(i[0]??"").localeCompare(r[0]??"")).map(([i,r])=>({variant:i,layouts:[...r].sort()}))}function MW(e,t){const i=ar(e.frame,t.path);if(i===null||typeof i!="object")return[];const r=[],a=(l,c)=>{if(typeof l=="string"){l.startsWith("/api/asset")&&r.push({label:c,url:l});return}if(!(l===null||typeof l!="object"))for(const[d,h]of Object.entries(l))a(h,c?`${c}.${d}`:d)};return a(i,""),r}const Hs=144,DW=12;function LW(e,t,i){const r=e==="x"?t.width:t.height,a=[Hs,r-Hs,r/2];for(const l of i){const c=e==="x"?l.x:l.y,d=e==="x"?l.width:l.height;a.push(c,c+d,c+d/2)}return a}function jW(e,t,i){const r=[],a={...e};for(const l of["x","y"]){const c=LW(l,t,i),d=l==="x"?e.x:e.y,h=l==="x"?e.width:e.height;let p;for(const m of[d,d+h,d+h/2])for(const v of c){const b=v-m;Math.abs(b)<=DW&&(!p||Math.abs(b)<Math.abs(p.delta))&&(p={delta:b,at:v})}p&&(r.push({axis:l,at:p.at}),l==="x"?a.x=Math.round(e.x+p.delta):a.y=Math.round(e.y+p.delta))}return{bounds:a,guides:r}}const BW=""+new URL("PlantinMTProRgIt-D0FB51kb.woff2",import.meta.url).href,GW=""+new URL("beleren-b-B3lFvodX.ttf",import.meta.url).href,VW=""+new URL("beleren-bsc-yvL6mU7X.ttf",import.meta.url).href,bC=[{family:"Beleren",url:GW,weight:"bold",style:"normal"},{family:"Beleren Small Caps",url:VW,weight:"bold",style:"normal"},{family:"Plantin MT Pro",url:BW,weight:"normal",style:"italic"}],HW=bC.map(e=>e.family),FW="serif";let J3;function $W(){return J3??=(async()=>{await Promise.all(bC.map(async({family:e,url:t,weight:i,style:r})=>{const a=new FontFace(e,`url(${t})`,{weight:i,style:r});document.fonts.add(await a.load())})),await document.fonts.ready})(),J3}function UW(e){return HW.includes(e)?{family:e,substituted:!1}:{family:FW,substituted:!0}}const WW=96/72,yC=e=>e*WW,YW=["title","type","nicknameTitle","pt"],xC=e=>YW.includes(e),qW={title:{family:"Beleren",fontStyle:"bold",align:"left",honoursFontFamily:!0},type:{family:"Beleren",fontStyle:"bold",align:"left",honoursFontFamily:!1},nicknameTitle:{family:"Plantin MT Pro",fontStyle:"italic",align:"center",honoursFontFamily:!1},pt:{family:"Beleren Small Caps",fontStyle:"bold",align:"center",honoursFontFamily:!1}};function SC(e,t){const i=qW[e],r=i.honoursFontFamily&&t.fontFamily!==void 0?t.fontFamily:i.family,{family:a,substituted:l}=UW(r);return{family:a,fontStyle:i.fontStyle,align:t.textAlign??i.align,substituted:l}}let s0;function XW(){if(!s0){const e=document.createElement("canvas").getContext("2d");if(!e)throw new Error("could not create a 2d context for measuring");s0=e}return s0}function ZW(e,t,i){const{family:r,fontStyle:a}=SC(e,i),l=XW();return l.font=`${a} ${String(yC(i.fontSize??0))}px "${r}"`,l.measureText(t).width}function KW(e,t,i){const{family:r,fontStyle:a,align:l,substituted:c}=SC(e,i),d=i.outlineColor!==void 0&&(i.outlineWidth??0)>0;return{node:new Rn.Text({text:t,x:i.x,y:i.y,width:i.width,height:i.height,align:l,verticalAlign:"middle",fontFamily:r,fontStyle:a,fontSize:yC(i.fontSize??0),fill:i.color??"black",wrap:"none",listening:!1,...d?{stroke:i.outlineColor,strokeWidth:i.outlineWidth,fillAfterStrokeEnabled:!0,lineJoin:"round"}:{},...i.opacity===void 0?{}:{opacity:i.opacity}}),overflow:Math.max(0,Math.round(ZW(e,t,i)-i.width)),substituted:c}}const l0="#4ec9b0",QW="#1e1e1e",e4=e=>typeof e=="object"&&e!==null&&"altKey"in e&&e.altKey===!0,t4=new Map;function gf(e){const t=t4.get(e);return t?Promise.resolve(t):new Promise((i,r)=>{const a=new Image;a.onload=()=>{t4.set(e,a),i(a)},a.onerror=()=>{r(new Error(`could not load ${e}`))},a.src=e})}function JW(e){const{payload:t,boxSlot:i,art:r,cutoutUrls:a,selected:l,hidden:c,showCardFace:d,sampleText:h,ptIsVehicle:p,editable:m,onSelect:v,onCommit:b,onHover:y,onOverflow:x}=e,_=O.useRef(null),w=O.useRef(null),C=O.useRef(null),R=O.useRef(null),z=O.useRef(null),D=O.useRef(null),{width:T,height:k}=t.canvas,A=O.useRef(1),L=O.useCallback(()=>{const V=_.current,M=w.current;if(!V||!M)return;const I={width:V.clientWidth,height:V.clientHeight},U=Math.min((I.width-32)/T,(I.height-32)/k);U>0&&Number.isFinite(U)&&(A.current=U,M.size(I),M.scale({x:U,y:U}),M.position({x:(I.width-T*U)/2,y:(I.height-k*U)/2}),M.batchDraw())},[T,k]),W=O.useCallback((V,M)=>{const I=w.current;if(!I)return;const U=I.scaleX(),X=Math.min(8,Math.max(A.current*.5,U*V));if(X===U)return;const K=M??{x:I.width()/2,y:I.height()/2},P={x:(K.x-I.x())/U,y:(K.y-I.y())/U};I.scale({x:X,y:X}),I.position({x:K.x-P.x*X,y:K.y-P.y*X}),I.batchDraw()},[]);return O.useEffect(()=>{const V=_.current;if(!V)return;const M=new Rn.Stage({container:V,width:V.clientWidth,height:V.clientHeight}),I=new Rn.Layer({listening:!1}),U=new Rn.Layer({listening:!1}),X=new Rn.Layer,K=new Rn.Transformer({rotateEnabled:!1,keepRatio:!1,ignoreStroke:!0,borderStroke:l0,anchorStroke:l0,anchorFill:QW,anchorSize:12,boundBoxFunc:(de,ce)=>({...ce,width:Math.max(8,ce.width),height:Math.max(8,ce.height)})});X.add(K),M.add(I,U,X),M.on("click tap",de=>{de.target===M&&v(void 0)}),M.on("wheel",de=>{de.evt.preventDefault(),W(de.evt.deltaY<0?1.1:1/1.1,M.getPointerPosition())});let P;M.on("mousedown",de=>{const ce=de.evt.button===1;(ce||de.target===M)&&(P={x:de.evt.clientX-M.x(),y:de.evt.clientY-M.y()},ce&&de.evt.preventDefault())}),M.on("mousemove",de=>{P&&(M.position({x:de.evt.clientX-P.x,y:de.evt.clientY-P.y}),M.batchDraw())});const ee=()=>{P=void 0};M.on("mouseup mouseleave",ee),w.current=M,C.current=I,R.current=U,z.current=X,D.current=K,L();const te=new ResizeObserver(L);return te.observe(V),()=>{te.disconnect(),M.destroy(),w.current=null}},[T,k,L,v,W]),O.useEffect(()=>{const V=M=>{if(M.target!==document.body||M.ctrlKey||M.metaKey)return;const I=w.current;I&&(M.key==="0"?L():M.key==="1"?W(1/I.scaleX(),null):M.key==="+"||M.key==="="?W(1.2,null):M.key==="-"&&W(.8333333333333334,null))};return window.addEventListener("keydown",V),()=>{window.removeEventListener("keydown",V)}},[L,W]),O.useEffect(()=>{const V=C.current;if(!V)return;let M=!1;const I={width:T,height:k};return(async()=>{const X=await Promise.all(r.map(async P=>({item:P,image:await gf(P.url),mask:P.maskUrl===void 0?void 0:await gf(P.maskUrl),secondary:P.secondaryMaskUrl===void 0?void 0:await gf(P.secondaryMaskUrl)}))),K=await Promise.all(a.map(gf));return{images:X,cutouts:K}})().then(({images:X,cutouts:K})=>{if(M)return;V.destroyChildren();const P=new Rn.Group({listening:!1});for(const{item:ee,image:te,mask:de,secondary:ce}of X){const Ce={width:te.naturalWidth,height:te.naturalHeight},Ae=_W(ee.placement,Ce,I);if(!Ae)continue;const ge=new Rn.Image({image:te,x:Ae.x,y:Ae.y,listening:!1});if(!de){P.add(ge);continue}const G=new Rn.Group({listening:!1});G.add(ge);for(const ne of[de,ce])ne&&G.add(new Rn.Image({image:ne,x:(T-ne.naturalWidth)/2,y:(k-ne.naturalHeight)/2,globalCompositeOperation:"destination-in",listening:!1}));G.cache(),ee.preserveAlpha===!0&&G.globalCompositeOperation("source-atop"),P.add(G)}for(const ee of K)P.add(new Rn.Image({image:ee,x:(T-ee.naturalWidth)/2,y:(k-ee.naturalHeight)/2,globalCompositeOperation:"destination-in",listening:!1}));K.length>0&&P.cache(),V.add(P),V.batchDraw()}).catch(()=>{}),()=>{M=!0}},[r,a,T,k]),O.useEffect(()=>{const V=R.current;if(!V)return;let M=!1;return $W().then(()=>{if(M)return;V.destroyChildren();const I={};for(const{key:U,box:X}of i?Wc(t,i):[]){const K=U==="pt"?[h.power,h.toughness].every(Boolean)?`${h.power??""}/${h.toughness??""}`:"":h[U];if(!xC(U)||!K||c.has(U))continue;const P=KW(U,K,U==="pt"&&p?{...X,color:"white"}:X);V.add(P.node),P.overflow>0&&(I[U]=P.overflow)}V.batchDraw(),x(I)}),()=>{M=!0}},[t,i,h,p,c,x]),O.useEffect(()=>{const V=z.current,M=D.current;if(!V||!M)return;for(const P of[...V.getChildren()])P!==M&&P.destroy();d&&V.add(new Rn.Rect({x:Hs,y:Hs,width:T-Hs*2,height:k-Hs*2,stroke:"rgba(255,255,255,0.75)",strokeWidth:4,dash:[26,18],listening:!1}));const I=new Rn.Group({listening:!1});V.add(I);const U=P=>{I.destroyChildren();for(const ee of P)I.add(new Rn.Line({points:ee.axis==="x"?[ee.at,0,ee.at,k]:[0,ee.at,T,ee.at],stroke:l0,strokeWidth:2,dash:[12,10],listening:!1}));I.moveToTop(),V.batchDraw()},X=i?Wc(t,i):[];let K;X.forEach(({key:P,box:ee},te)=>{if(c.has(P))return;const de=P===l,ce=new Rn.Rect({x:ee.x,y:ee.y,width:ee.width,height:ee.height,stroke:$0(te),strokeWidth:de?12:5,fill:$0(te,de?.2:.08),draggable:m,name:P}),Ce=Ae=>{const ge={x:Math.round(ce.x()),y:Math.round(ce.y()),width:Math.round(ce.width()*ce.scaleX()),height:Math.round(ce.height()*ce.scaleY())};if(Ae)return ge;const G=X.filter(ye=>ye.key!==P&&!c.has(ye.key)).map(ye=>ye.box),ne=jW(ge,{width:T,height:k},G);return U(ne.guides),ne.bounds};ce.on("mouseenter",()=>{y(P)}),ce.on("mouseleave",()=>{y(void 0)}),ce.on("mousedown touchstart",()=>{v(P)}),ce.on("dragmove",Ae=>{const ge=Ce(e4(Ae.evt));ce.position({x:ge.x,y:ge.y})}),ce.on("dragend",Ae=>{const ge=Ce(e4(Ae.evt));U([]),ce.position({x:ge.x,y:ge.y}),b(P,ge)}),ce.on("transformend",()=>{U([]);const Ae={x:Math.round(ce.x()),y:Math.round(ce.y()),width:Math.round(ce.width()*ce.scaleX()),height:Math.round(ce.height()*ce.scaleY())};ce.scale({x:1,y:1}),ce.size({width:Ae.width,height:Ae.height}),b(P,Ae)}),V.add(ce),de&&(K=ce)}),M.nodes(K&&m?[K]:[]),M.moveToTop(),V.batchDraw()},[t,i,l,c,d,m,T,k,b,y,v]),O.useEffect(()=>{if(!l||!i||!m)return;const V=M=>{const U={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[M.key];if(!U||M.target!==document.body)return;M.preventDefault();const X=M.shiftKey?10:1,K=Wc(t,i).find(({key:ee})=>ee===l);if(!K)return;const P=K.box;b(l,{x:P.x+U[0]*X,y:P.y+U[1]*X,width:P.width,height:P.height})};return window.addEventListener("keydown",V),()=>{window.removeEventListener("keydown",V)}},[l,i,t,m,b]),N.jsx(Ci,{ref:_,flex:"1",minW:"0",display:"grid",placeItems:"center",overflow:"hidden",bg:"bg.muted"})}const eY=[{code:"w",label:"White",swatch:"#f8f6d8"},{code:"u",label:"Blue",swatch:"#c1d7e9"},{code:"b",label:"Black",swatch:"#bab1ab"},{code:"r",label:"Red",swatch:"#e49977"},{code:"g",label:"Green",swatch:"#a3c095"}],tY=[{key:"isArtifact",label:"artifact",hint:"Artifact body, colour in the pinlines"},{key:"isVehicle",label:"vehicle",hint:"Vehicle body; overrides artifact"},{key:"isLand",label:"land",hint:"Draws from the land frames"},{key:"isEnchantment",label:"enchantment",hint:"Draws from the nyx frames when nyx borders are on"},{key:"isHybrid",label:"hybrid",hint:"Two colours paid with hybrid mana: splits the frame down the middle"},{key:"isDevoid",label:"devoid",hint:"Coloured by identity but framed colourless"},{key:"isColorless",label:"colourless",hint:"No colours at all — Eldrazi and friends"},{key:"isLegendary",label:"legendary",hint:"Draws the crown, colour-matched to the card's identity"}],nY=[{key:"nyxInsert",label:"nyx insert",hint:"Draws the nyx insert inside the crown"},{key:"ubCrowns",label:"UB crowns",hint:"Prefers the Universes Beyond crown art where a frame ships it"}];function iY(e){const{shape:t,useNyxBorder:i,useNyxInsert:r,useUBCrowns:a,summary:l,onChange:c,onNyxBorderChange:d,onNyxInsertChange:h,onUBCrownsChange:p}=e,m={nyxInsert:[r,h],ubCrowns:[a,p]},v=t.colors??[],b=y=>{const x=v.includes(y)?v.filter(_=>_!==y):[...v,y];c({...t,colors:x})};return N.jsxs(Ei,{align:"stretch",gap:"2",p:"3",borderBottomWidth:"1px",children:[N.jsx(St,{fontSize:"xs",textTransform:"uppercase",color:"fg.muted",children:"Card"}),N.jsx($r,{gap:"1",children:eY.map(y=>{const x=v.includes(y.code);return N.jsx(Ci,{as:"button",flex:"1",py:"1",borderRadius:"sm",border:"1px solid",borderColor:x?y.swatch:"border",bg:x?y.swatch:"transparent",color:x?"bg":"fg.muted",fontSize:"xs",fontWeight:"bold",title:y.label,onClick:()=>{b(y.code)},children:y.code.toUpperCase()},y.code)})}),N.jsxs($r,{gap:"1",flexWrap:"wrap",children:[tY.map(y=>{const x=t[y.key]===!0;return N.jsx(Ci,{as:"button",px:"2",py:"0.5",borderRadius:"sm",border:"1px solid",borderColor:x?"teal.fg":"border",color:x?"teal.fg":"fg.muted",fontSize:"xs",title:y.hint,onClick:()=>{c({...t,[y.key]:!x})},children:y.label},y.key)}),N.jsx(Ci,{as:"button",px:"2",py:"0.5",borderRadius:"sm",border:"1px solid",borderColor:i?"teal.fg":"border",color:i?"teal.fg":"fg.muted",fontSize:"xs",title:"The app's nyx-border setting, which decides whether enchantments use nyx art",onClick:()=>{d(!i)},children:"nyx borders"}),nY.map(y=>{const[x,_]=m[y.key]??[!1,()=>{}];return N.jsx(Ci,{as:"button",px:"2",py:"0.5",borderRadius:"sm",border:"1px solid",borderColor:x?"teal.fg":"border",color:x?"teal.fg":"fg.muted",fontSize:"xs",title:y.hint,onClick:()=>{_(!x)},children:y.label},y.key)})]}),N.jsx(St,{fontSize:"xs",color:"fg.muted",children:l})]})}const n4=["x","y","width","height","fontSize","color","outlineColor","outlineWidth","opacity","textAlign","verticalAlign","fontFamily","shadow"];function rY({value:e}){if(!e)return null;if(e.editable){const t=e.shared.length,i=`${e.file}:${String(e.line)}`;return N.jsxs(St,{fontSize:"10px",color:t>0?"fg.warning":"fg.success",truncate:!0,title:t>0?`${i} — also read by ${String(t)} other box ${t===1?"set":"sets"}: ${e.shared.map(r=>`${r.layout}.${r.boxSet}`).join(", ")}`:i,children:[e.file.split("/").pop(),":",e.line,t>0?` · shared ×${String(t+1)}`:"",e.sharedDefault?" · default":""]})}return N.jsxs(St,{fontSize:"10px",color:"fg.warning",truncate:!0,title:e.detail,children:["🔒 ",e.reason]})}function oY(e){const{slug:t,boxKey:i,box:r,basePath:a,editable:l,onChange:c}=e,[d,h]=O.useState({});if(O.useEffect(()=>{if(h({}),!i||!r)return;let m=!1;const v=Object.keys(r);return Promise.all(v.map(async b=>{try{return[b,await j6(t,[...a,i,b],!0)]}catch{return}})).then(b=>{m||h(Object.fromEntries(b.filter(y=>y!==void 0)))}),()=>{m=!0}},[t,i,r,a]),!i||!r)return N.jsx(Ci,{p:"3",children:N.jsx(St,{fontSize:"xs",color:"fg.muted",children:"Select a box to edit it."})});const p=n4.filter(m=>m in r).concat(Object.keys(r).filter(m=>!n4.includes(m)));return N.jsxs(Ei,{align:"stretch",gap:"2",p:"3",children:[N.jsxs($r,{children:[N.jsx(St,{fontWeight:"600",children:i}),!l&&N.jsx(Ef,{colorPalette:"yellow",children:"read-only"})]}),p.map(m=>{const v=r[m],b=d[m],y=!l||b!==void 0&&!b.editable;return N.jsxs(Kc,{templateColumns:"90px 1fr",gap:"2",alignItems:"center",children:[N.jsx(St,{fontSize:"xs",color:"fg.muted",truncate:!0,title:m,children:m}),N.jsxs(Ei,{align:"stretch",gap:"0",children:[N.jsx(Ff,{size:"xs",value:typeof v=="string"?v:typeof v=="number"||typeof v=="boolean"?String(v):"",disabled:y,onChange:x=>{const _=typeof v=="number"?Number(x.target.value):typeof v=="boolean"?x.target.value==="true":x.target.value;typeof _=="number"&&Number.isNaN(_)||c(m,_)}}),N.jsx(rY,{value:b})]})]},m)})]})}function aY(e){const{slug:t,payload:i,slots:r,editable:a,onChange:l}=e,[c,d]=O.useState({}),h=O.useMemo(()=>r.flatMap(p=>{const m=ar(i.frame,p.path);return m===null||typeof m!="object"?[]:Object.entries(m).filter(([,v])=>typeof v=="number"||typeof v=="boolean").map(([v,b])=>({slot:p.key,key:v,value:b,path:[...p.path,v]}))}),[r,i]);return O.useEffect(()=>{if(d({}),h.length===0)return;let p=!1;return Promise.all(h.map(async m=>{try{return[m.path.join("."),await j6(t,m.path)]}catch{return}})).then(m=>{p||d(Object.fromEntries(m.filter(v=>v!==void 0)))}),()=>{p=!0}},[t,h]),h.length===0?null:N.jsxs(Ei,{align:"stretch",gap:"2",p:"3",borderTopWidth:"1px",children:[N.jsx(St,{fontSize:"xs",textTransform:"uppercase",color:"fg.muted",children:"Layout knobs"}),h.map(p=>{const m=c[p.path.join(".")],v=!a||m!==void 0&&!m.editable;return N.jsxs(Kc,{templateColumns:"120px 1fr",gap:"2",alignItems:"center",children:[N.jsx(St,{fontSize:"xs",color:"fg.muted",truncate:!0,title:`${p.slot}.${p.key}`,children:r.length>1?`${p.slot.replace(/Config$/,"")}.${p.key}`:p.key}),N.jsxs(Ei,{align:"stretch",gap:"0",children:[N.jsx(Ff,{size:"xs",value:String(p.value),disabled:v,onChange:b=>{if(typeof p.value=="boolean"){l(p.path,b.target.value==="true");return}const y=Number(b.target.value);Number.isNaN(y)||l(p.path,y)}}),m&&!m.editable&&N.jsxs(St,{fontSize:"xs",color:"fg.warning",truncate:!0,title:m.detail,children:["🔒 ",m.reason]}),m?.editable===!0&&N.jsxs(St,{fontSize:"xs",color:"fg.success",truncate:!0,children:[m.file.split("/").pop(),":",m.line]})]})]},p.path.join("."))})]})}function sY(e){const{masks:t,enabled:i,onToggle:r}=e;return N.jsxs(Ei,{align:"stretch",gap:"0",mt:"3",children:[N.jsx(St,{fontSize:"xs",textTransform:"uppercase",color:"fg.muted",mb:"1",children:"Masks"}),t.length===0&&N.jsx(St,{fontSize:"xs",color:"fg.muted",children:"This layout ships no section masks."}),t.map(a=>{const l=i.has(a.id);return N.jsxs($r,{gap:"1",px:"2",py:"0.5",borderRadius:"sm",opacity:l?1:.4,_hover:{bg:"bg.muted"},children:[N.jsx(Ci,{as:"button",fontSize:"xs",color:"fg.muted",title:l?"hide":"show",onClick:()=>{r(a.id)},children:l?"👁":"🚫"}),N.jsx(St,{fontSize:"xs",flex:"1",truncate:!0,title:a.id,children:a.id})]},a.id)}),t.length>0&&N.jsx(St,{fontSize:"xs",color:"fg.muted",mt:"1",children:"A mask cuts the art down to its shape, the way the renderer composites it."})]})}var _C={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i4=Io.createContext&&Io.createContext(_C),lY=["attr","size","title"];function cY(e,t){if(e==null)return{};var i,r,a=uY(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)i=l[r],t.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}function uY(e,t){if(e==null)return{};var i={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;i[r]=e[r]}return i}function Jf(){return Jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},Jf.apply(null,arguments)}function r4(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),i.push.apply(i,r)}return i}function eh(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?r4(Object(i),!0).forEach(function(r){dY(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r4(Object(i)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))})}return e}function dY(e,t,i){return(t=fY(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function fY(e){var t=hY(e,"string");return typeof t=="symbol"?t:t+""}function hY(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var r=i.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wC(e){return e&&e.map((t,i)=>Io.createElement(t.tag,eh({key:i},t.attr),wC(t.child)))}function xb(e){return t=>Io.createElement(gY,Jf({attr:eh({},e.attr)},t),wC(e.child))}function gY(e){var t=i=>{var r=e.attr,a=e.size,l=e.title,c=cY(e,lY),d=a||i.size||"1em",h;return i.className&&(h=i.className),e.className&&(h=(h?h+" ":"")+e.className),Io.createElement("svg",Jf({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,r,c,{className:h,style:eh(eh({color:e.color||i.color},i.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),l&&Io.createElement("title",null,l),e.children)};return i4!==void 0?Io.createElement(i4.Consumer,null,i=>t(i)):t(_C)}function pY(e){return xb({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 6 6 18"},child:[]},{tag:"path",attr:{d:"m6 6 12 12"},child:[]}]})(e)}function mY(e){return xb({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"4"},child:[]},{tag:"path",attr:{d:"M12 2v2"},child:[]},{tag:"path",attr:{d:"M12 20v2"},child:[]},{tag:"path",attr:{d:"m4.93 4.93 1.41 1.41"},child:[]},{tag:"path",attr:{d:"m17.66 17.66 1.41 1.41"},child:[]},{tag:"path",attr:{d:"M2 12h2"},child:[]},{tag:"path",attr:{d:"M20 12h2"},child:[]},{tag:"path",attr:{d:"m6.34 17.66-1.41 1.41"},child:[]},{tag:"path",attr:{d:"m19.07 4.93-1.41 1.41"},child:[]}]})(e)}function vY(e){return xb({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"},child:[]}]})(e)}const CC=O.forwardRef(function(t,i){return N.jsx(Jv,{variant:"ghost","aria-label":"Close",ref:i,...t,children:t.children??N.jsx(pY,{})})}),bY=O.forwardRef(function(t,i){const{children:r,portalled:a=!0,portalRef:l,backdrop:c=!0,...d}=t;return N.jsxs(Bw,{disabled:!a,container:l,children:[c&&N.jsx(CL,{}),N.jsx(bL,{children:N.jsx(yL,{ref:i,...d,asChild:!1,children:r})})]})}),yY=O.forwardRef(function(t,i){return N.jsx(_L,{position:"absolute",top:"2",insetEnd:"2",...t,asChild:!0,children:N.jsx(CC,{size:"sm",ref:i,children:t.children})})}),xY=vL,SY=TL,_Y=kL,wY=EL,CY=SL,EY=xL,TY=wL;function kY(e){const{shared:t,onConfirm:i,onCancel:r}=e,a=t.length!==1;return N.jsx(xY,{open:!0,role:"alertdialog",placement:"center",size:"sm",onOpenChange:l=>{l.open||r()},children:N.jsxs(bY,{children:[N.jsx(_Y,{children:N.jsx(CY,{children:"This value is shared"})}),N.jsx(wY,{children:N.jsxs(Ei,{align:"stretch",gap:"3",children:[N.jsxs(EY,{children:[t.length," other box ",a?"sets read":"set reads"," the same literal. Saving moves ",a?"them all":"it","."]}),N.jsx(Ei,{align:"stretch",gap:"0",overflowY:"auto",p:"2",maxH:"240px",children:t.map(l=>N.jsxs(St,{fontSize:"xs",color:"fg.muted",truncate:!0,children:[l.variant===null?"":`${l.variant} · `,l.layout," · ",l.boxSet]},`${l.variant??"-"}/${l.layout}/${l.boxSet}`))}),N.jsx(St,{fontSize:"xs",color:"fg.muted",children:"To move only one layout, give it its own value in the source first."})]})}),N.jsxs(SY,{children:[N.jsx(TY,{asChild:!0,children:N.jsx(ru,{size:"xs",variant:"outline",children:"Cancel"})}),N.jsxs(ru,{size:"xs",onClick:i,children:["Apply to all ",t.length+1]})]}),N.jsx(yY,{})]})})}const zY=O.forwardRef(function(t,i){const{children:r,clearable:a,...l}=t;return N.jsxs(YL,{...l,children:[N.jsx(DL,{ref:i,children:r}),N.jsxs(UL,{children:[a&&N.jsx(RY,{}),N.jsx(WL,{})]})]})}),RY=O.forwardRef(function(t,i){return N.jsx(GL,{asChild:!0,...t,ref:i,children:N.jsx(CC,{size:"xs",variant:"plain",focusVisibleRing:"inside",focusRingWidth:"2px",pointerEvents:"auto"})})}),AY=O.forwardRef(function(t,i){const{portalled:r=!0,portalRef:a,...l}=t;return N.jsx(Bw,{disabled:!r,container:a,children:N.jsx(LL,{children:N.jsx(jL,{...l,ref:i})})})}),OY=O.forwardRef(function(t,i){const{item:r,children:a,...l}=t;return N.jsxs(FL,{item:r,...l,ref:i,children:[a,N.jsx($L,{})]},r.value)}),NY=O.forwardRef(function(t,i){const{children:r,...a}=t;return N.jsx(BL,{...a,ref:i,children:N.jsx(qL,{children:l=>{const c=l.selectedItems;return c.length===0?t.placeholder:r?r(c):c.length===1?l.collection.stringifyItem(c[0]):`${c.length} selected`}})})}),IY=O.forwardRef(function(t,i){return N.jsx(ML,{...t,ref:i,positioning:{sameWidth:!0,...t.positioning},children:t.asChild?t.children:N.jsxs(N.Fragment,{children:[N.jsx(XL,{}),t.children]})})});O.forwardRef(function(t,i){const{children:r,label:a,...l}=t;return N.jsxs(VL,{...l,ref:i,children:[N.jsx(HL,{children:a}),r]})});function zc(e){const{label:t,value:i,options:r,width:a,placeholder:l,onChange:c}=e,d=O.useMemo(()=>bw({items:[...r],itemToString:h=>h.label,itemToValue:h=>h.value}),[r]);return N.jsxs(IY,{collection:d,size:"xs",width:a,value:r.some(h=>h.value===i)?[i]:[],onValueChange:h=>{const[p]=h.value;p!==void 0&&c(p)},children:[N.jsx(zY,{"aria-label":t,children:N.jsx(NY,{placeholder:l??t})}),N.jsx(AY,{children:d.items.map(h=>N.jsx(OY,{item:h,children:h.label},h.value))})]})}var PY=(e,t,i,r,a,l,c,d)=>{let h=document.documentElement,p=["light","dark"];function m(y){(Array.isArray(e)?e:[e]).forEach(x=>{let _=x==="class",w=_&&l?a.map(C=>l[C]||C):a;_?(h.classList.remove(...w),h.classList.add(l&&l[y]?l[y]:y)):h.setAttribute(x,y)}),v(y)}function v(y){d&&p.includes(y)&&(h.style.colorScheme=y)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let y=localStorage.getItem(t)||i,x=c&&y==="system"?b():y;m(x)}catch{}},o4=["light","dark"],EC="(prefers-color-scheme: dark)",MY=typeof window>"u",Sb=O.createContext(void 0),DY={setTheme:e=>{},themes:[]},LY=()=>{var e;return(e=O.useContext(Sb))!=null?e:DY},jY=e=>O.useContext(Sb)?O.createElement(O.Fragment,null,e.children):O.createElement(GY,{...e}),BY=["light","dark"],GY=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:i=!0,enableColorScheme:r=!0,storageKey:a="theme",themes:l=BY,defaultTheme:c=i?"system":"light",attribute:d="data-theme",value:h,children:p,nonce:m,scriptProps:v})=>{let[b,y]=O.useState(()=>HY(a,c)),[x,_]=O.useState(()=>b==="system"?c0():b),w=h?Object.values(h):l,C=O.useCallback(T=>{let k=T;if(!k)return;T==="system"&&i&&(k=c0());let A=h?h[k]:k,L=t?FY(m):null,W=document.documentElement,V=M=>{M==="class"?(W.classList.remove(...w),A&&W.classList.add(A)):M.startsWith("data-")&&(A?W.setAttribute(M,A):W.removeAttribute(M))};if(Array.isArray(d)?d.forEach(V):V(d),r){let M=o4.includes(c)?c:null,I=o4.includes(k)?k:M;W.style.colorScheme=I}L?.()},[m]),R=O.useCallback(T=>{let k=typeof T=="function"?T(b):T;y(k);try{localStorage.setItem(a,k)}catch{}},[b]),z=O.useCallback(T=>{let k=c0(T);_(k),b==="system"&&i&&!e&&C("system")},[b,e]);O.useEffect(()=>{let T=window.matchMedia(EC);return T.addListener(z),z(T),()=>T.removeListener(z)},[z]),O.useEffect(()=>{let T=k=>{k.key===a&&(k.newValue?y(k.newValue):R(c))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[R]),O.useEffect(()=>{C(e??b)},[e,b]);let D=O.useMemo(()=>({theme:b,setTheme:R,forcedTheme:e,resolvedTheme:b==="system"?x:b,themes:i?[...l,"system"]:l,systemTheme:i?x:void 0}),[b,R,e,x,i,l]);return O.createElement(Sb.Provider,{value:D},O.createElement(VY,{forcedTheme:e,storageKey:a,attribute:d,enableSystem:i,enableColorScheme:r,defaultTheme:c,value:h,themes:l,nonce:m,scriptProps:v}),p)},VY=O.memo(({forcedTheme:e,storageKey:t,attribute:i,enableSystem:r,enableColorScheme:a,defaultTheme:l,value:c,themes:d,nonce:h,scriptProps:p})=>{let m=JSON.stringify([i,t,l,e,d,c,r,a]).slice(1,-1);return O.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?h:"",dangerouslySetInnerHTML:{__html:`(${PY.toString()})(${m})`}})}),HY=(e,t)=>{if(MY)return;let i;try{i=localStorage.getItem(e)||void 0}catch{}return i||t},FY=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},c0=e=>(e||(e=window.matchMedia(EC)),e.matches?"dark":"light");function $Y(e){return N.jsx(jY,{attribute:"class",disableTransitionOnChange:!0,...e})}function TC(){const{resolvedTheme:e,setTheme:t,forcedTheme:i}=LY();return{colorMode:i||e,setColorMode:t,toggleColorMode:()=>{t(e==="dark"?"light":"dark")}}}function UY(){const{colorMode:e}=TC();return e==="dark"?N.jsx(vY,{}):N.jsx(mY,{})}const WY=O.forwardRef(function(t,i){const{toggleColorMode:r}=TC();return N.jsx(gL,{fallback:N.jsx(eb,{boxSize:"9"}),children:N.jsx(Jv,{onClick:r,variant:"ghost","aria-label":"Toggle color mode",size:"sm",ref:i,...t,css:{_icon:{width:"5",height:"5"}},children:N.jsx(UY,{})})})});O.forwardRef(function(t,i){return N.jsx(za,{color:"fg",display:"contents",className:"chakra-theme light",colorPalette:"gray",colorScheme:"light",ref:i,...t})});O.forwardRef(function(t,i){return N.jsx(za,{color:"fg",display:"contents",className:"chakra-theme dark",colorPalette:"gray",colorScheme:"dark",ref:i,...t})});const YY={colors:["w"]};function qY(e,t){const i=pC(e,t),r=gC(e),a=hC(r,{family:i}),l=`${a.baseFrame.family}/${a.baseFrame.color}`,c=a.overlays??[],d=c.length===0?"no section overlays":`${String(c.length)} overlay${c.length===1?"":"s"}: `+[...new Set(c.map(h=>h.mask))].join(", ");return`base ${l} · ${d}`}const Rf=e=>e!==null&&typeof e=="object"?e:void 0,XY=e=>Rf(e);function ZY(e){const{payload:t,assetSlot:i,maskSlot:r,boxSlot:a,shape:l,card:c,useNyxBorder:d,useNyxInsert:h,useUBCrowns:p,inspectMasks:m}=e,v=i?XY(ar(t.frame,i.path)):void 0,b=r?Rf(ar(t.frame,r.path)):void 0;if(!v)return{layers:[],cutoutUrls:[]};const y=X=>{const K=b?.[X];return typeof K=="string"?K:void 0},x=pC(l,d),_=gC(l),w=ar(t.frame,[...a?.path.slice(0,-1)??[],"hybridTitleMask"]),C=hC(_,{family:x,hasPinlineMask:y("pinlines")!==void 0,...w==="title"?{hybridTitleMask:"title"}:{}}),R=[],z=NW(v,C.baseFrame);z&&R.push({id:`${C.baseFrame.family}.${C.baseFrame.color}`,url:z.url,placement:r0(`${z.ref.family}.${z.ref.color}`)});const D=z?.usedFallback===!0;if(!D)for(const X of C.overlays??[]){const K=vC(v,X.frame),P=y(X.mask);K===void 0||P===void 0||R.push({id:`${X.frame.family}.${X.frame.color}/${X.mask}`,url:K,placement:r0(`${X.frame.family}.${X.frame.color}`),maskUrl:P,...X.secondaryMask?{secondaryMaskUrl:y(X.secondaryMask)}:{},...X.preserveAlpha===!0?{preserveAlpha:!0}:{}})}const T=a?.path.slice(0,-1)??[],k=(...X)=>{const K=Rf(ar(t.frame,X));return typeof K?.x=="number"&&typeof K.y=="number"?K:void 0},A=OW({...c,isLegendary:l.isLegendary}),L=A.nickname,W={crownConfig:Rf(ar(t.frame,[...T,"crownConfig"])),nicknameConfig:k(...T,"nicknameConfig"),...a?{ptImage:k(...a.path,"ptImage")}:{},hasNickname:L},V=X=>Array.isArray(X)?X:[X],M=(X,K)=>{K!==void 0&&R.push({id:X,url:K,placement:r0(X,W)})};if(A.crownBlackBar&&typeof v.black=="string"&&M("black",v.black),A.crown){for(const X of V(o0(_,l)))M(`crown.${X}`,a0(v,X,{nickname:L,useUBCrowns:p}));if(h)for(const X of V(o0(_,l)))M(`crown.nyxInsert.${X}`,AW(v,X,p))}const I=A.crown&&V(o0(_,l)).some(X=>a0(v,X,{nickname:!0,useUBCrowns:p})!==a0(v,X,{nickname:!1,useUBCrowns:p}));if(L&&!I)for(const X of V(EW(_,l)))M(`nickname.${X}`,zW(v,X));if(A.ptBox){const X=TW(_,l);M(`pt.${X}`,RW(v,X))}const U=[...m].map(X=>y(X)).filter(X=>X!==void 0);return{layers:R,cutoutUrls:U,...D?{fallbackNote:`no ${C.baseFrame.family} "${C.baseFrame.color}" art — using ${z.ref.family} "${z.ref.color}"; overlays dropped`}:{}}}function KY(e,t){return t?MW(e,t).map(({label:i,url:r})=>({id:i,url:r})):[]}const QY=e=>e.join(".");function JY(e,t){if(t.size===0)return e;const i=structuredClone(e.frame);for(const[r,a]of t){const l=r.split("."),c=ar(i,l.slice(0,-1)),d=l[l.length-1];d!==void 0&&c!==null&&typeof c=="object"&&(c[d]=a)}return{...e,frame:i}}const kC="frame-studio.sampleText",Fs={title:"Serra Angel",type:"Creature — Angel",nicknameTitle:"",keyword:"Flying, vigilance",power:"4",toughness:"4"},zC={typical:Fs,long:{title:"Rona, Sheoldred's Faithful",type:"Legendary Creature — Phyrexian Human Wizard",nicknameTitle:"Herald of the Machine Orthodoxy",keyword:"Flying, first strike, lifelink",power:"10",toughness:"10"},worst:{title:"Ramirez DePietro, Pillager of the Coast",type:"Legendary Artifact Creature — Phyrexian Horror Berserker",nicknameTitle:"Ramirez DePietro, Pillager of the Coast",keyword:"Flying, vigilance, trample, haste, lifelink",power:"13",toughness:"13"}};function eq(){try{const e=localStorage.getItem(kC);if(!e)return Fs;const t=JSON.parse(e);return typeof t=="object"&&t!==null?{...Fs,...t}:Fs}catch{return Fs}}function tq(){const[e,t]=O.useState(eq),i=O.useCallback(r=>{t(r);try{localStorage.setItem(kC,JSON.stringify(r))}catch{}},[]);return{sampleText:e,setField:O.useCallback((r,a)=>{i({...e,[r]:a})},[e,i]),applyPreset:O.useCallback(r=>{i(zC[r]??Fs)},[i])}}const nq=()=>{},u0="__base__";function iq(){const[e,t]=O.useState(),[i,r]=O.useState([]),[a,l]=O.useState(),[c,d]=O.useState(),[h,p]=O.useState(null),[m,v]=O.useState("normal"),[b,y]=O.useState("boxes"),[x,_]=O.useState(YY),[w,C]=O.useState(!0),[R,z]=O.useState(),[D,T]=O.useState(new Set),[k,A]=O.useState(!0),[L,W]=O.useState(""),[V,M]=O.useState({}),{sampleText:I,setField:U,applyPreset:X}=tq(),[K,P]=O.useState(),ee=O.useRef([]),te=O.useRef([]),[de,ce]=O.useState(new Map),Ce=O.useRef(void 0),[Ae,ge]=O.useState("typical"),[G,ne]=O.useState(!1),[ye,_e]=O.useState(!1),[ie,re]=O.useState(new Set);O.useEffect(()=>{rj().then(t),M5().then(ue=>{r(ue),l(Ue=>Ue??ue[0]?.slug)})},[]);const be=O.useCallback(ue=>{oj(ue).then(d).catch(Ue=>{W(Ue instanceof Error?Ue.message:String(Ue))})},[]);O.useEffect(()=>{a&&be(a)},[a,be]),O.useEffect(()=>sj(ue=>{if(ue.type==="frames"){M5().then(r);return}ue.slug!==void 0&&ue.slug===a&&(be(ue.slug),W(ue.cause==="self"?"saved":"reloaded"))}),[a,be]);const le=O.useMemo(()=>c?JY(c,de):void 0,[c,de]),xe=O.useMemo(()=>c?PW(c):[],[c]),Xe=O.useMemo(()=>xe.find(ue=>ue.variant===h)?.layouts??[],[xe,h]),yt=O.useMemo(()=>c?.slots.filter(ue=>ue.variant===h&&ue.layout===m)??[],[c,h,m]),Qe=yt.find(ue=>ue.kind==="boxes"&&ue.key===b),on=yt.find(ue=>ue.kind==="assets"),_t=yt.find(ue=>ue.kind==="masks"),Je=O.useMemo(()=>yt.filter(ue=>ue.kind==="knobs"),[yt]),an=O.useMemo(()=>le&&Qe?Wc(le,Qe):[],[le,Qe]),yr=an.find(ue=>ue.key===R)?.box,Zn=O.useMemo(()=>le?KY(le,_t):[],[le,_t]),fi=O.useMemo(()=>le?ZY({payload:le,assetSlot:on,maskSlot:_t,boxSlot:Qe,shape:x,useNyxBorder:w,card:{nickname:I.nicknameTitle??"",power:I.power??"",toughness:I.toughness??""},useNyxInsert:G,useUBCrowns:ye,inspectMasks:ie}):{layers:[],cutoutUrls:[]},[le,on,_t,Qe,x,I,w,G,ye,ie]);O.useEffect(()=>{re(new Set)},[a,h,m]),O.useEffect(()=>{const ue=Xe[0];ue!==void 0&&!Xe.includes(m)&&v(ue)},[Xe,m]),O.useEffect(()=>{const ue=yt.filter(Ze=>Ze.kind==="boxes"),Ue=ue[0];Ue!==void 0&&!ue.some(Ze=>Ze.key===b)&&y(Ue.key)},[yt,b]);const yn=O.useCallback(async(ue,Ue,Ze={})=>{if(!a)return;W("saving…");const Zt=await aj(a,ue,{...Ze.confirmShared===!0?{confirmShared:!0}:{}});if(Zt.shared){P({edits:ue,shared:Zt.shared}),W("shared — confirm");return}if(!Zt.ok){ce(new Map),Ce.current=void 0;const ki=Zt.rejected?.[0];W(ki?`${ki.reason}: ${ki.detail}`:"refused"),be(a);return}Ce.current=Zt.revision,Ze.track!==!1&&(ee.current=[...ee.current.slice(-49),{edits:ue,inverse:Ue}],te.current=[]),W("saved")},[a,be]),Fi=O.useCallback((ue,Ue)=>{if(!a||!Qe||!c)return;const Ze=Wc(le??c,Qe).find(sn=>sn.key===ue)?.box,Zt=[],ki=[];for(const[sn,Jr]of Object.entries(Ue)){const $i=Ze?.[sn];$i!==Jr&&(Zt.push({path:[...Qe.path,ue,sn],value:Jr}),$i!==void 0&&ki.push({path:[...Qe.path,ue,sn],value:$i}))}Zt.length>0&&(ce(sn=>{const Jr=new Map(sn);for(const $i of Zt)Jr.set(QY($i.path),$i.value);return Jr}),yn(Zt,ki))},[a,Qe,c,le,yn]);O.useEffect(()=>{const ue=Ue=>{if(!Ue.ctrlKey&&!Ue.metaKey)return;const Ze=Ue.key.toLowerCase();if(Ze!=="z"&&Ze!=="y")return;const Zt=Ze==="y"||Ue.shiftKey,sn=(Zt?te.current:ee.current).pop();if(!sn){W(Zt?"nothing to redo":"nothing to undo");return}Ue.preventDefault(),Zt?(ee.current=[...ee.current,sn],yn(sn.edits,sn.inverse,{confirmShared:!0,track:!1})):(te.current=[...te.current,sn],yn(sn.inverse,sn.edits,{confirmShared:!0,track:!1}))};return window.addEventListener("keydown",ue),()=>{window.removeEventListener("keydown",ue)}},[yn]);const dl=O.useCallback((ue,Ue)=>{Fi(ue,{...Ue})},[Fi]),xr=e?.writeEnabled===!0;return N.jsxs(Kc,{templateRows:"auto 1fr",h:"100vh",children:[N.jsxs($r,{gap:"3",px:"3",py:"2",borderBottomWidth:"1px",flexWrap:"wrap",children:[N.jsx(St,{fontWeight:"bold",children:"Frame Studio"}),N.jsx(zc,{label:"Frame",width:"200px",value:a??"",options:i.map(ue=>({value:ue.slug,label:`${ue.name} (${ue.slug})`})),onChange:ue=>{l(ue),z(void 0)}}),N.jsx(zc,{label:"Variant",width:"160px",value:h??u0,options:xe.map(ue=>({value:ue.variant??u0,label:ue.variant??"— base layouts"})),onChange:ue=>{p(ue===u0?null:ue)}}),N.jsx(zc,{label:"Layout",width:"180px",value:m,options:Xe.map(ue=>({value:ue,label:ue})),onChange:v}),N.jsx(zc,{label:"Box set",width:"190px",value:b,options:yt.filter(ue=>ue.kind==="boxes").map(ue=>({value:ue.key,label:ue.key})),onChange:y}),N.jsx(ru,{size:"xs",variant:k?"solid":"outline",onClick:()=>{A(ue=>!ue)},children:"card face"}),N.jsx(zc,{label:"Sample text",width:"130px",value:Ae,options:Object.keys(zC).map(ue=>({value:ue,label:`${ue} text`})),onChange:ue=>{ge(ue),X(ue)}}),N.jsx(WY,{size:"xs"}),!xr&&N.jsx(Ef,{colorPalette:"yellow",children:"read-only"}),fi.fallbackNote!==void 0&&N.jsx(Ef,{colorPalette:"yellow",title:fi.fallbackNote,children:"art fallback"}),c?.stale===!0&&N.jsx(Ef,{colorPalette:"red",children:"source has an error"}),N.jsx(St,{ml:"auto",color:"fg.muted",maxW:"40%",truncate:!0,title:L,children:L})]}),N.jsxs(Kc,{templateColumns:"260px 1fr 300px",minH:"0",children:[N.jsxs(Ei,{align:"stretch",gap:"0",borderRightWidth:"1px",overflowY:"auto",p:"2",children:[N.jsx(cj,{boxes:an,selected:R,hidden:D,overflow:V,onSelect:z,onToggleHidden:ue=>{T(Ue=>{const Ze=new Set(Ue);return Ze.delete(ue)||Ze.add(ue),Ze})}}),N.jsx(sY,{masks:Zn,enabled:ie,onToggle:ue=>{re(Ue=>{const Ze=new Set(Ue);return Ze.delete(ue)||Ze.add(ue),Ze})}})]}),le?N.jsx(JW,{payload:le,boxSlot:Qe,art:fi.layers,cutoutUrls:fi.cutoutUrls,selected:R,hidden:D,showCardFace:k,editable:xr,onSelect:z,onCommit:dl,onHover:nq,sampleText:I,ptIsVehicle:x.isVehicle===!0,onOverflow:M}):N.jsx(Ci,{display:"grid",placeItems:"center",color:"fg.muted",children:"loading…"}),K&&N.jsx(kY,{shared:K.shared,onCancel:()=>{P(void 0),ce(new Map),Ce.current=void 0,W("cancelled"),a&&be(a)},onConfirm:()=>{const{edits:ue}=K;P(void 0),yn(ue,[],{confirmShared:!0})}}),N.jsxs(Ci,{borderLeftWidth:"1px",overflowY:"auto",children:[N.jsx(iY,{shape:x,useNyxBorder:w,summary:qY(x,w),useNyxInsert:G,useUBCrowns:ye,onChange:_,onNyxBorderChange:C,onNyxInsertChange:ne,onUBCrownsChange:_e}),N.jsxs(Ei,{align:"stretch",gap:"1",p:"3",borderBottomWidth:"1px",children:[N.jsx(St,{fontSize:"xs",textTransform:"uppercase",color:"fg.muted",children:"Sample text"}),["power","toughness"].map(ue=>N.jsxs($r,{gap:"2",children:[N.jsx(St,{fontSize:"xs",color:"fg.muted",w:"80px",truncate:!0,children:ue}),N.jsx(Ff,{size:"xs",value:I[ue]??"",onChange:Ue=>{U(ue,Ue.target.value)}})]},ue)),an.filter(({key:ue})=>xC(ue)&&ue!=="pt").map(({key:ue})=>N.jsxs($r,{gap:"2",children:[N.jsx(St,{fontSize:"xs",color:"fg.muted",w:"80px",truncate:!0,children:ue}),N.jsx(Ff,{size:"xs",value:I[ue]??"",onChange:Ue=>{U(ue,Ue.target.value)}})]},ue)),N.jsx(St,{fontSize:"xs",color:"fg.muted",mt:"1",children:"One line, at the size you authored — no wrapping, no mana symbols and no auto-shrink. Card Anvil shrinks the title around the mana cost and the type line around the set symbol, so a box flagged here may still fit there."})]}),a&&le&&Je.length>0&&N.jsx(aY,{slug:a,payload:le,slots:Je,editable:xr,onChange:(ue,Ue)=>{const Ze=ar(le.frame,ue);yn([{path:[...ue],value:Ue}],typeof Ze=="number"||typeof Ze=="boolean"?[{path:[...ue],value:Ze}]:[])}}),a&&Qe&&N.jsx(oY,{slug:a,boxKey:R,box:yr,basePath:Qe.path,editable:xr,onChange:(ue,Ue)=>{R&&Fi(R,{[ue]:Ue})}})]})]})]})}const RC=document.getElementById("root");if(!RC)throw new Error("no #root element");ij.createRoot(RC).render(N.jsx(O.StrictMode,{children:N.jsx(OT,{value:oL,children:N.jsx($Y,{defaultTheme:"dark",children:N.jsx(iq,{})})})}));