@cardanvil/frame-kit 0.6.0 → 0.7.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 (66) hide show
  1. package/README.md +75 -1
  2. package/dist/authoring/collectorInfo.d.ts +17 -0
  3. package/dist/authoring/collectorInfo.js +62 -0
  4. package/dist/authoring/index.d.ts +2 -0
  5. package/dist/authoring/index.js +2 -0
  6. package/dist/authoring/layoutDefaults.d.ts +20 -2
  7. package/dist/authoring/layoutDefaults.js +48 -13
  8. package/dist/authoring/opacityStops.d.ts +8 -0
  9. package/dist/authoring/opacityStops.js +17 -0
  10. package/dist/cli/index.d.ts +1 -0
  11. package/dist/cli/index.js +1 -0
  12. package/dist/cli/loadFrame.js +1 -1
  13. package/dist/cli/main.js +72 -0
  14. package/dist/cli/studio/boxSets.js +11 -8
  15. package/dist/cli/studio/serve.js +4 -1
  16. package/dist/cli/trim.d.ts +62 -0
  17. package/dist/cli/trim.js +251 -0
  18. package/dist/layout/border.d.ts +27 -0
  19. package/dist/layout/border.js +31 -0
  20. package/dist/layout/boxOverrides.d.ts +28 -0
  21. package/dist/layout/boxOverrides.js +95 -0
  22. package/dist/layout/color.d.ts +23 -0
  23. package/dist/layout/color.js +53 -0
  24. package/dist/layout/cutouts.d.ts +28 -0
  25. package/dist/layout/cutouts.js +29 -0
  26. package/dist/layout/decorations.d.ts +1 -6
  27. package/dist/layout/decorations.js +7 -11
  28. package/dist/layout/frameLayers.d.ts +29 -2
  29. package/dist/layout/frameLayers.js +145 -3
  30. package/dist/layout/index.d.ts +17 -6
  31. package/dist/layout/index.js +17 -6
  32. package/dist/layout/paint.d.ts +36 -0
  33. package/dist/layout/paint.js +148 -0
  34. package/dist/layout/powerToughnessRow.d.ts +26 -0
  35. package/dist/layout/powerToughnessRow.js +13 -0
  36. package/dist/layout/resolveFrameAsset.d.ts +6 -0
  37. package/dist/layout/resolveFrameAsset.js +8 -0
  38. package/dist/layout/rulesSlide.d.ts +13 -0
  39. package/dist/layout/rulesSlide.js +33 -0
  40. package/dist/layout/settings.d.ts +26 -0
  41. package/dist/layout/settings.js +62 -0
  42. package/dist/layout/textStyle.d.ts +29 -0
  43. package/dist/layout/textStyle.js +28 -0
  44. package/dist/layout/turn.d.ts +54 -0
  45. package/dist/layout/turn.js +107 -0
  46. package/dist/manifest/contract.d.ts +6074 -9392
  47. package/dist/manifest/contract.js +46 -1
  48. package/dist/manifest/testFrame.js +9 -0
  49. package/dist/schema/collectorInfo.d.ts +95 -0
  50. package/dist/schema/collectorInfo.js +80 -0
  51. package/dist/schema/condition.d.ts +67 -0
  52. package/dist/schema/condition.js +47 -0
  53. package/dist/schema/frame.d.ts +17291 -25435
  54. package/dist/schema/frame.js +402 -14
  55. package/dist/schema/frameAssets.d.ts +53 -33
  56. package/dist/schema/frameAssets.js +77 -5
  57. package/dist/schema/index.d.ts +3 -0
  58. package/dist/schema/index.js +3 -0
  59. package/dist/schema/layout.d.ts +29 -4
  60. package/dist/schema/layout.js +27 -2
  61. package/dist/schema/paint.d.ts +202 -0
  62. package/dist/schema/paint.js +109 -0
  63. package/dist/studio/assets/index-BnhNwm_r.js +74 -0
  64. package/dist/studio/index.html +1 -1
  65. package/package.json +5 -3
  66. package/dist/studio/assets/index-CNzyV22G.js +0 -76
@@ -0,0 +1,74 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),u=o(((e,t)=>{t.exports=l()}));function d(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var f=/^((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)-.*))$/,p=d(function(e){return f.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),m=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return ee(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,k(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+re(a,u),c+=k(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+re(a,u++),c+=k(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return k(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function A(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function se(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else se(ce.bind(null,e))}var le={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=le,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ce,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ee(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),h=o(((e,t)=>{t.exports=m()}));function g(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 _(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 v=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(_(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=g(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),y=`-ms-`,b=`-moz-`,x=`-webkit-`,S=`comm`,C=`rule`,w=`decl`,T=`@import`,E=`@keyframes`,ee=`@layer`,D=Math.abs,O=String.fromCharCode,te=Object.assign;function ne(e,t){return A(e,0)^45?(((t<<2^A(e,0))<<2^A(e,1))<<2^A(e,2))<<2^A(e,3):0}function re(e){return e.trim()}function ie(e,t){return(e=t.exec(e))?e[0]:e}function k(e,t,n){return e.replace(t,n)}function ae(e,t){return e.indexOf(t)}function A(e,t){return e.charCodeAt(t)|0}function oe(e,t,n){return e.slice(t,n)}function se(e){return e.length}function ce(e){return e.length}function le(e,t){return t.push(e),e}function ue(e,t){return e.map(t).join(``)}var de=1,fe=1,pe=0,me=0,he=0,ge=``;function _e(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:de,column:fe,length:o,return:``}}function j(e,t){return te(_e(``,null,null,``,null,null,0),e,{length:-e.length},t)}function ve(){return he}function ye(){return he=me>0?A(ge,--me):0,fe--,he===10&&(fe=1,de--),he}function be(){return he=me<pe?A(ge,me++):0,fe++,he===10&&(fe=1,de++),he}function xe(){return A(ge,me)}function Se(){return me}function M(e,t){return oe(ge,e,t)}function Ce(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 we(e){return de=fe=1,pe=se(ge=e),me=0,[]}function Te(e){return ge=``,e}function Ee(e){return re(M(me-1,ke(e===91?e+2:e===40?e+1:e)))}function De(e){for(;(he=xe())&&he<33;)be();return Ce(e)>2||Ce(he)>3?``:` `}function Oe(e,t){for(;--t&&be()&&!(he<48||he>102||he>57&&he<65||he>70&&he<97););return M(e,Se()+(t<6&&xe()==32&&be()==32))}function ke(e){for(;be();)switch(he){case e:return me;case 34:case 39:e!==34&&e!==39&&ke(he);break;case 40:e===41&&ke(e);break;case 92:be()}return me}function Ae(e,t){for(;be()&&e+he!==57&&(e+he!==84||xe()!==47););return`/*`+M(t,me-1)+`*`+O(e===47?e:be())}function je(e){for(;!Ce(xe());)be();return M(e,me)}function Me(e){return Te(Ne(``,null,null,null,[``],e=we(e),0,[0],e))}function Ne(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=be()){case 40:if(m!=108&&A(C,d-1)==58){ae(C+=k(Ee(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Ee(v);break;case 9:case 10:case 13:case 32:C+=De(m);break;case 92:C+=Oe(Se()-1,7);continue;case 47:switch(xe()){case 42:case 47:le(Fe(Ae(be(),Se()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=se(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=k(C,/\f/g,``)),p>0&&se(C)-d&&le(p>32?Ie(C+`;`,r,n,d-1):Ie(k(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(le(S=Pe(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123){if(u===0)Ne(C,t,S,S,b,a,d,s,x);else switch(f===99&&A(C,3)===110?100:f){case 100:case 108:case 109:case 115:Ne(e,S,S,r&&le(Pe(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:Ne(C,S,S,S,[``],x,0,s,x)}}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+se(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&ye()==125)continue}switch(C+=O(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(se(C)-1)*_,_=1;break;case 64:xe()===45&&(C+=Ee(be())),f=xe(),u=d=se(y=C+=je(Se())),v++;break;case 45:m===45&&se(C)==2&&(h=0)}}return a}function Pe(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=ce(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=oe(e,d+1,d=D(h=o[m])),y=e;_<p;++_)(y=re(h>0?f[_]+` `+v:k(v,/&\f/g,f[_])))&&(c[g++]=y);return _e(e,t,n,i===0?C:s,c,l,u)}function Fe(e,t,n){return _e(e,t,n,S,O(ve()),oe(e,2,-2),0)}function Ie(e,t,n,r){return _e(e,t,n,w,oe(e,0,r),oe(e,r+1,-1),r)}function Le(e,t){for(var n=``,r=ce(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Re(e,t,n,r){switch(e.type){case ee:if(e.children.length)break;case T:case w:return e.return=e.return||e.value;case S:return``;case E:return e.return=e.value+`{`+Le(e.children,r)+`}`;case C:e.value=e.props.join(`,`)}return se(n=Le(e.children,r))?e.return=e.value+`{`+n+`}`:``}function ze(e){var t=ce(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Be(e){return function(t){t.root||(t=t.return)&&e(t)}}var Ve=function(e,t,n){for(var r=0,i=0;r=i,i=xe(),r===38&&i===12&&(t[n]=1),!Ce(i);)be();return M(e,me)},He=function(e,t){var n=-1,r=44;do switch(Ce(r)){case 0:r===38&&xe()===12&&(t[n]=1),e[n]+=Ve(me-1,t,n);break;case 2:e[n]+=Ee(r);break;case 4:if(r===44){e[++n]=xe()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=O(r)}while(r=be());return e},Ue=function(e,t){return Te(He(we(e),t))},We=new WeakMap,Ge=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if((e.props.length!==1||t.charCodeAt(0)===58||We.get(n))&&!r){We.set(e,!0);for(var i=[],a=Ue(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},Ke=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function qe(e,t){switch(ne(e,t)){case 5103:return x+`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 x+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return x+e+b+e+y+e+e;case 6828:case 4268:return x+e+y+e+e;case 6165:return x+e+y+`flex-`+e+e;case 5187:return x+e+k(e,/(\w+).+(:[^]+)/,x+`box-$1$2`+y+`flex-$1$2`)+e;case 5443:return x+e+y+`flex-item-`+k(e,/flex-|-self/,``)+e;case 4675:return x+e+y+`flex-line-pack`+k(e,/align-content|flex-|-self/,``)+e;case 5548:return x+e+y+k(e,`shrink`,`negative`)+e;case 5292:return x+e+y+k(e,`basis`,`preferred-size`)+e;case 6060:return x+`box-`+k(e,`-grow`,``)+x+e+y+k(e,`grow`,`positive`)+e;case 4554:return x+k(e,/([^-])(transform)/g,`$1`+x+`$2`)+e;case 6187:return k(k(k(e,/(zoom-|grab)/,x+`$1`),/(image-set)/,x+`$1`),e,``)+e;case 5495:case 3959:return k(e,/(image-set\([^]*)/,x+"$1$`$1");case 4968:return k(k(e,/(.+:)(flex-)?(.*)/,x+`box-pack:$3`+y+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+x+e+e;case 4095:case 3583:case 4068:case 2532:return k(e,/(.+)-inline(.+)/,x+`$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(se(e)-1-t>6)switch(A(e,t+1)){case 109:if(A(e,t+4)!==45)break;case 102:return k(e,/(.+:)(.+)-([^]+)/,`$1`+x+`$2-$3$1`+b+(A(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~ae(e,`stretch`)?qe(k(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(A(e,t+1)!==115)break;case 6444:switch(A(e,se(e)-3-(~ae(e,`!important`)&&10))){case 107:return k(e,`:`,`:`+x)+e;case 101:return k(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+x+(A(e,14)===45?`inline-`:``)+`box$3$1`+x+`$2$3$1`+y+`$2box$3`)+e}break;case 5936:switch(A(e,t+11)){case 114:return x+e+y+k(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return x+e+y+k(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return x+e+y+k(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return x+e+y+e+e}return e}var Je=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case w:e.return=qe(e.value,e.length);break;case E:return Le([j(e,{value:k(e.value,`@`,`@`+x)})],r);case C:if(e.length)return ue(e.props,function(t){switch(ie(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return Le([j(e,{props:[k(t,/:(read-\w+)/,`:`+b+`$1`)]})],r);case`::placeholder`:return Le([j(e,{props:[k(t,/:(plac\w+)/,`:`+x+`input-$1`)]}),j(e,{props:[k(t,/:(plac\w+)/,`:`+b+`$1`)]}),j(e,{props:[k(t,/:(plac\w+)/,y+`input-$1`)]})],r)}return``})}}],Ye=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||Je,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[Ge,Ke],l,u=[Re,Be(function(e){l.insert(e)})],d=ze(c.concat(r,u)),f=function(e){return Le(Me(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new v({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},Xe=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Ze=o(((e,t)=>{t.exports=Xe()})),Qe=o(((e,t)=>{var n=Ze(),r={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},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function $e(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var et=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},tt=function(e,t,n){et(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function nt(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){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 rt={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},it=/[A-Z]|^ms/g,at=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ot=function(e){return e.charCodeAt(1)===45},st=function(e){return e!=null&&typeof e!=`boolean`},ct=d(function(e){return ot(e)?e:e.replace(it,`-$&`).toLowerCase()}),lt=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(at,function(e,t,n){return pt={name:t,styles:n,next:pt},t})}return rt[e]!==1&&!ot(e)&&typeof t==`number`&&t!==0?t+`px`:t};function ut(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return pt={name:i.name,styles:i.styles,next:pt},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)pt={name:o.name,styles:o.styles,next:pt},o=o.next;return a.styles+`;`}return dt(e,t,n);case`function`:if(e!==void 0){var s=pt,c=n(e);return pt=s,ut(e,t,c)}}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function dt(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=ut(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:st(s)&&(r+=ct(a)+`:`+lt(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)st(o[c])&&(r+=ct(a)+`:`+lt(a,o[c])+`;`);else{var l=ut(e,t,o);switch(a){case`animation`:case`animationName`:r+=ct(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var ft=/label:\s*([^\s;{]+)\s*(;|$)/g,pt;function mt(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;pt=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=ut(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=ut(n,t,e[o]),r&&(i+=a[o]);ft.lastIndex=0;for(var s=``,c;(c=ft.exec(i))!==null;)s+=`-`+c[1];return{name:nt(i)+s,styles:i,next:pt}}var N=c(h()),ht=function(e){return e()},gt=N.useInsertionEffect?N.useInsertionEffect:!1,_t=gt||ht,vt=gt||N.useLayoutEffect,yt=N.createContext(typeof HTMLElement<`u`?Ye({key:`css`}):null);yt.Provider;var bt=function(e){return(0,N.forwardRef)(function(t,n){return e(t,(0,N.useContext)(yt),n)})},xt=N.createContext({}),St={}.hasOwnProperty,Ct=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,wt=function(e,t){var n={};for(var r in t)St.call(t,r)&&(n[r]=t[r]);return n[Ct]=e,n},Tt=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return et(t,n,r),_t(function(){return tt(t,n,r)}),null},Et=bt(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Ct],a=[r],o=``;typeof e.className==`string`?o=$e(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=mt(a,void 0,N.useContext(xt));o+=t.key+`-`+s.name;var c={};for(var l in e)St.call(e,l)&&l!==`css`&&l!==Ct&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),N.createElement(N.Fragment,null,N.createElement(Tt,{cache:t,serialized:s,isStringTag:typeof i==`string`}),N.createElement(i,c))});Qe();var Dt=function(e,t){var n=arguments;if(t==null||!St.call(t,`css`))return N.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=Et,i[1]=wt(e,t);for(var a=2;a<r;a++)i[a]=n[a];return N.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(Dt||={});var Ot=bt(function(e,t){var n=e.styles,r=mt([n],void 0,N.useContext(xt)),i=N.useRef();return vt(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),vt(function(){var e=i.current,n=e[0];e[1]?e[1]=!1:(r.next!==void 0&&tt(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1))},[t,r.name]),null});function kt(...e){return function(...t){e.forEach(e=>e?.(...t))}}var At=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),jt=/^on[A-Z]/;function Mt(...e){let t={};for(let n of e){for(let e in t)t[e]=jt.test(e)&&typeof t[e]==`function`&&typeof n[e]==`function`?kt(t[e],n[e]):e===`className`||e===`class`?At(t[e],n[e]):e===`style`?Object.assign({},t[e]??{},n[e]??{}):n[e]===void 0?t[e]:n[e];for(let e in n)t[e]===void 0&&(t[e]=n[e])}return t}var Nt=parseInt(`19.3.0`.split(`.`)[0],10)>=19;function Pt(e,t){if(e!=null){if(typeof e==`function`)return e(t);try{e.current=t}catch{throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Ft(...e){let t=e.filter(e=>e!=null);if(Nt){let e=new Map;return n=>(t.forEach(t=>{let r=Pt(t,n);r&&e.set(t,r)}),()=>{t.forEach(t=>{let n=e.get(t);n&&typeof n==`function`?n():Pt(t,null)}),e.clear()})}return e=>{t.forEach(t=>{Pt(t,e)})}}function It(e){let t=Object.assign({},e);for(let e in t)t[e]===void 0&&delete t[e];return t}var Lt=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Rt=e=>typeof e==`string`,zt=e=>typeof e==`function`,Bt=(...e)=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(!Rt(r))continue;let i=r.trim();i&&t.push(i)}return t.join(` `)};function Vt(e){return e.default||e}function Ht(e){let t=`19.3.0`;return!Rt(t)||t.startsWith(`18.`)?e?.ref:e?.props?.ref}var Ut=(...e)=>{let t=e.reduce((e,t)=>(t?.forEach(t=>e.add(t)),e),new Set([]));return Array.from(t)};function Wt(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Gt(e={}){let{name:t,strict:n=!0,hookName:r=`useContext`,providerName:i=`Provider`,errorMessage:a,defaultValue:o}=e,s=(0,N.createContext)(o);s.displayName=t;function c(){let e=(0,N.useContext)(s);if(!e&&n){let e=Error(a??Wt(r,i));throw e.name=`ContextError`,Error.captureStackTrace?.(e,c),e}return e}return[s.Provider,c,s]}var P=u(),[Kt,qt]=Gt({name:`ChakraContext`,strict:!0,providerName:`<ChakraProvider />`});function Jt(e){let{value:t,children:n}=e;return(0,P.jsxs)(Kt,{value:t,children:[!t._config.disableLayers&&(0,P.jsx)(Ot,{styles:t.layers.atRule}),(0,P.jsx)(Ot,{styles:t._global}),n]})}var Yt=(e,t)=>{let n={},r={},i=Object.keys(e);for(let a of i)t(a)?r[a]=e[a]:n[a]=e[a];return[r,n]},Xt=(e,t)=>Yt(e,zt(t)?t:e=>t.includes(e)),Zt=new Set([`htmlWidth`,`htmlHeight`,`htmlSize`,`htmlTranslate`]);function Qt(e){return typeof e==`string`&&Zt.has(e)}function $t(e,t,n){let{css:r,isValidProperty:i}=qt(),{children:a,...o}=e,s=(0,N.useMemo)(()=>{let[e,r]=Xt(o,e=>n(e,t.variantKeys)),[a,s]=Xt(r,t.variantKeys),[c,l]=Xt(s,i);return{forwardedProps:e,variantProps:a,styleProps:c,elementProps:l}},[t.variantKeys,n,o,i]),{css:c,...l}=s.styleProps,u=(0,N.useMemo)(()=>{let e={...s.variantProps},n=t.variantKeys.includes(`colorPalette`),r=t.variantKeys.includes(`orientation`);return n||(e.colorPalette=o.colorPalette),r||(e.orientation=o.orientation),t(e)},[t,s.variantProps,o.colorPalette,o.orientation]);return{styles:(0,N.useMemo)(()=>r(u,...en(c),l),[r,u,c,l]),props:{...s.forwardedProps,...s.elementProps,children:a}}}var en=e=>(Array.isArray(e)?e:[e]).filter(Boolean).flat(),tn=Vt(p),nn=e=>e!==`theme`,rn=(e,t,n)=>{let r;if(t){let n=t.shouldForwardProp;r=e.__emotion_forwardProp&&n?t=>e.__emotion_forwardProp(t)&&n(t):n}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},an=typeof document<`u`,on=({cache:e,serialized:t,isStringTag:n})=>{et(e,t,n);let r=_t(()=>tt(e,t,n));if(!an&&r!==void 0){let n=t.name,i=t.next;for(;i!==void 0;)n=Bt(n,i.name),i=i.next;return(0,P.jsx)(`style`,{"data-emotion":Bt(e.key,n),dangerouslySetInnerHTML:{__html:r},nonce:e.sheet.nonce})}return null},sn={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`]},cn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ln=((e,t={},n={})=>{if(cn(sn,e)){n.forwardProps||=[];let t=sn[e];n.forwardProps=Ut([...n.forwardProps,...t])}let r=e.__emotion_real===e,i=r&&e.__emotion_base||e,a,o;n!==void 0&&(a=n.label,o=n.target);let s=[],c=bt((a,c,l)=>{let{cva:u,isValidProperty:d}=qt(),f=t.__cva__?t:u(t),p=fn(e.__emotion_cva&&!e.__emotion_cva.__cva__?u(e.__emotion_cva):e.__emotion_cva,f);!n.shouldForwardProp&&n.forwardProps&&(n.shouldForwardProp=(e=>(t,n)=>e.includes(t)?!0:!n?.includes(t)&&!d(t))(n.forwardProps));let m=rn(e,n,r)||((t,n)=>{let r=typeof e==`string`&&e.charCodeAt(0)>96?tn:nn,i=!n?.includes(t)&&!d(t);return r(t)&&i}),{props:h,styles:g}=$t(N.useMemo(()=>Object.assign({},n.defaultProps,It(a)),[a]),p,m),_=``,v=[g],y=h;if(h.theme==null){y={};for(let e in h)y[e]=h[e];y.theme=N.useContext(xt)}typeof h.className==`string`?_=$e(c.registered,v,h.className):h.className!=null&&(_=Bt(_,h.className));let b=mt(s.concat(v),c.registered,y);b.styles&&(_=Bt(_,`${c.key}-${b.name}`)),o!==void 0&&(_=Bt(_,o));let x=!m(`as`),S=x&&h.as||i,C={};for(let e in h)if(!(x&&e===`as`)){if(Qt(e)){let t=e.replace(`html`,``).toLowerCase();C[t]=h[e]}else m(e)&&(C[e]=h[e])}let w=_.trim();w?C.className=w:Reflect.deleteProperty(C,`className`),C.ref=l;let T=n.forwardAsChild||n.forwardProps?.includes(`asChild`);if(h.asChild&&!T){let e=N.isValidElement(h.children)?N.Children.only(h.children):N.Children.toArray(h.children).find(N.isValidElement);if(!e)throw Error(`[chakra-ui > factory] No valid child found`);S=e.type,C.children=null,Reflect.deleteProperty(C,`asChild`),C=Mt(C,e.props),C.ref=Ft(l,Ht(e))}return C.as&&T?(C.as=void 0,(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(on,{cache:c,serialized:b,isStringTag:typeof S==`string`}),(0,P.jsx)(S,{asChild:!0,...C,children:(0,P.jsx)(h.as,{children:C.children})})]})):(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(on,{cache:c,serialized:b,isStringTag:typeof S==`string`}),(0,P.jsx)(S,{...C})]})});return c.displayName=a===void 0?`chakra(${typeof i==`string`?i:i.displayName||i.name||`Component`})`:a,c.__emotion_real=c,c.__emotion_base=i,c.__emotion_forwardProp=n.shouldForwardProp,c.__emotion_cva=t,Object.defineProperty(c,"toString",{value(){return`.${o}`}}),c}).bind(),un=new Map,dn=new Proxy(ln,{apply(e,t,n){return ln(...n)},get(e,t){return un.has(t)||un.set(t,ln(t)),un.get(t)}}),fn=(e,t)=>e&&!t?e:!e&&t?t:e.merge(t),pn=dn(`div`);pn.displayName=`Box`;var mn=(0,N.forwardRef)(function(e,t){let{size:n,...r}=e;return(0,P.jsx)(pn,{...r,ref:t,boxSize:n,css:{display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,flexGrow:0,...e.css}})});mn.displayName=`Square`;var hn=(0,N.forwardRef)(function(e,t){let{size:n,...r}=e;return(0,P.jsx)(mn,{size:n,ref:t,borderRadius:`9999px`,...r})});hn.displayName=`Circle`;function gn(e){if(typeof e!=`string`)return e.displayName||e.name}function _n(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function vn(e,t){return e+_n(t)}function yn(e,t){if(t)return e+_n(t)}var bn=Object.freeze({}),xn=Object.freeze({});function Sn(e){let{key:t,recipe:n}=e,r=qt();return(0,N.useMemo)(()=>n?r.cva(n):t==null?r.cva({}):r.getRecipeFn(t),[t,n,r])}function Cn(e){let{key:t,recipe:n}=e,r=_n(t||n.className||`Component`),[i,a]=Gt({strict:!1,name:`${r}PropsContext`,providerName:`${r}PropsContext`});function o(e){let{unstyled:r,...i}=e,a=Sn({key:t,recipe:i.recipe||n}),[o,s]=(0,N.useMemo)(()=>a.splitVariantProps(i),[a,i]);return{styles:r?bn:a(o),className:a.className,props:s}}let s=(e,t)=>{let{displayName:n,...i}=t??{},s=dn(e,{},i),c=(0,N.forwardRef)((e,t)=>{let n=a(),r=(0,N.useMemo)(()=>Mt(n,e),[e,n]),{styles:i,className:c,props:l}=o(r);return(0,P.jsx)(s,{...l,ref:t,css:[i,r.css],className:Bt(c,r.className)})});return c.displayName=n??r??gn(e),c};function c(){return i}return{withContext:s,PropsProvider:i,withPropsProvider:c,usePropsContext:a,useRecipeResult:o}}var wn=(0,N.forwardRef)(function(e,t){let{templateAreas:n,column:r,row:i,autoFlow:a,autoRows:o,templateRows:s,autoColumns:c,templateColumns:l,inline:u,...d}=e;return(0,P.jsx)(dn.div,{...d,ref:t,css:[{display:u?`inline-grid`:`grid`,gridTemplateAreas:n,gridAutoColumns:c,gridColumn:r,gridRow:i,gridAutoFlow:a,gridAutoRows:o,gridTemplateRows:s,gridTemplateColumns:l},e.css]})});wn.displayName=`Grid`;function Tn(e){return e==null?[]:Array.isArray(e)?e:[e]}var En=(e,t)=>e.indexOf(t)!==-1,Dn=(e,...t)=>e.concat(t),On=(e,...t)=>e.filter(e=>!t.includes(e)),kn=(e,t)=>En(e,t)?On(e,t):Dn(e,t),An=e=>e?.constructor.name===`Array`,jn=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Mn(e[n],t[n]))return!1;return!0},Mn=(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(An(e)&&An(t))return jn(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!Mn(e[r],t[r]))return!1}return!0},Nn=e=>Array.isArray(e),Pn=e=>typeof e==`object`&&!!e,Fn=e=>Pn(e)&&!Nn(e),In=e=>typeof e==`string`,Ln=e=>typeof e==`function`,Rn=e=>e==null,zn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Bn=e=>Object.prototype.toString.call(e),Vn=Function.prototype.toString,Hn=Vn.call(Object),Un=e=>{if(!Pn(e)||Bn(e)!=`[object Object]`||Kn(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=zn(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Vn.call(n)==Hn},Wn=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,Gn=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,Kn=e=>Wn(e)||Gn(e),qn=e=>e(),Jn=()=>{},Yn=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})};function Xn(e){if(!Un(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=Xn(t))}return n}function Zn(e,t){if(!t)return e;let n={...e},r=t;for(let e in r){let t=r[e];t!==void 0&&(n[e]=t)}return n}function Qn(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function $n(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function er(e,t){if(e==null)throw Error(t())}function tr(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function nr(e={}){let{name:t,strict:n=!0,hookName:r=`useContext`,providerName:i=`Provider`,errorMessage:a,defaultValue:o}=e,s=(0,N.createContext)(o);s.displayName=t;function c(){let e=(0,N.useContext)(s);if(!e&&n){let e=Error(a??tr(r,i));throw e.name=`ContextError`,zn(Error,`captureStackTrace`)&&Ln(Error.captureStackTrace)&&Error.captureStackTrace(e,c),e}return e}return[s.Provider,c,s]}var[rr,ir]=nr({name:`EnvironmentContext`,hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}});function ar(...e){return t=>{let n=[],r=!1;for(let i of e)if(typeof i==`function`){let e=i(t);typeof e==`function`?(r=!0,n.push(e)):n.push(()=>i(null))}else i&&(i.current=t,n.push(()=>{i.current=null}));if(r)return()=>{for(let e of n)e()}}}function or(...e){return(0,N.useCallback)(ar(...e),e)}var sr=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),cr=(...e)=>Array.from(new Set(sr(...e).split(/\s+/).filter(Boolean))).join(` `),lr=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,ur=e=>{let t={},n;for(;n=lr.exec(e);)t[n[1]]=n[2];return t},dr=(e,t)=>{if(In(e)){if(In(t))return`${e};${t}`;e=ur(e)}else In(t)&&(t=ur(t));return Object.assign({},e??{},t??{})};function F(...e){let t={};for(let n of e){if(!n)continue;for(let e in t)t[e]=e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`?Yn(n[e],t[e]):e===`className`||e===`class`?sr(t[e],n[e]):e===`style`?dr(t[e],n[e]):e===`data-ownedby`?cr(t[e],n[e]):n[e]===void 0?t[e]:n[e];for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}var fr=`.`,pr=`#`,mr=new WeakMap,hr=new WeakMap;function gr(e){return e.join(fr)}function _r(e){return e.includes(fr)}function vr(e){return e.startsWith(pr)}function yr(e){return e.startsWith(fr)}function br(e){return vr(e)?e.slice(pr.length):e}function xr(e,t){return e?`${e}${fr}${t}`:t}function Sr(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&$n(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){er(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||$n(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o)){if(!n)continue;let i=xr(e,t);r(i,n)}}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function Cr(e){let t=mr.get(e);if(t)return t;let{index:n,idIndex:r}=Sr(e);return mr.set(e,n),hr.set(e,r),n}function wr(e,t){return Cr(e),hr.get(e)?.get(t)}function Tr(e){return e?String(e).split(fr).filter(Boolean):[]}function Er(e,t){if(!t)return[];let n=Cr(e),r=Tr(t),i=[],a=[];for(let e of r){a.push(e);let t=gr(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function Dr(e,t){let n=Cr(e),r=Tr(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=gr(i);if(!n.has(r))return t}let a=gr(i),o=n.get(a);for(;o?.initial;){let e=`${a}${fr}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function Or(e,t){return Cr(e).has(t)}function kr(e,t,n){let r=String(t);if(vr(r)){let t=br(r),n=wr(e,t);return er(n,()=>`[zag-js] Unknown state id: "${t}"`),Dr(e,n)}if(yr(r)&&n)return Dr(e,xr(n,r.slice(1)));if(!_r(r)&&n){let t=Tr(n);for(let n=t.length-1;n>=1;n--){let i=xr(t.slice(0,n).join(fr),r);if(Or(e,i))return Dr(e,i)}if(Or(e,r))return Dr(e,r)}return Dr(e,r)}function Ar(e,t,n){let r=Er(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function jr(e,t,n,r){let i=t?Er(e,t):[],a=Er(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i[i.length-1]?.path===a[a.length-1]?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function Mr(e,t){return e?e===t||e.startsWith(`${t}${fr}`):!1}function Nr(e,t,n){return Er(e,t).some(e=>e.state.tags?.includes(n))}function Pr(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function Fr(e){return Cr(e),e}function Ir(){return{guards:Pr(),createMachine:e=>Fr(e),choose:e=>function({choose:t}){return t(e)?.actions}}}var Lr=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(Lr||{}),Rr=`__init__`,zr=Object.defineProperty,Br=(e,t,n)=>t in e?zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vr=(e,t,n)=>Br(e,typeof t==`symbol`?t:t+``,n),Hr=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),Ur=()=>void 0,Wr=e=>typeof e==`object`&&!!e,I=e=>e?``:void 0,Gr=e=>e?`true`:void 0,Kr=/\\/g,qr=/"/g,Jr=e=>globalThis.CSS?.escape?.(e)??e.replace(Kr,`\\\\`).replace(qr,`\\"`),Yr=e=>`[data-ownedby~="${Jr(String(e))}"]`,Xr=1,Zr=9,Qr=11,$r=e=>Wr(e)&&e.nodeType===Xr&&typeof e.nodeName==`string`,ei=e=>Wr(e)&&e.nodeType===Zr,ti=e=>Wr(e)&&e===e.window,ni=e=>$r(e)?e.localName||``:`#document`;function ri(e){return[`html`,`body`,`#document`].includes(ni(e))}var ii=e=>Wr(e)&&e.nodeType!==void 0,ai=e=>ii(e)&&e.nodeType===Qr&&`host`in e,oi=e=>$r(e)&&e.localName===`input`,si=e=>$r(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ci(e){return e?hi(e.getRootNode())===e:!1}var li=/(textarea|select)/;function ui(e){if(e==null||!$r(e))return!1;try{return oi(e)&&e.selectionStart!=null||li.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function di(e,t){if(!e||!t||!$r(e)||!ii(t))return!1;if($r(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&ai(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function fi(e){return ei(e)?e:ti(e)?e.document:e?.ownerDocument??document}function pi(e){return fi(e).documentElement}function mi(e){return ai(e)?mi(e.host):ei(e)?e.defaultView??window:$r(e)?e.ownerDocument?.defaultView??window:window}function hi(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function gi(e){if(ni(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ai(e)&&e.host||pi(e);return ai(t)?t.host:t}function _i(e){let t;try{if(t=e.getRootNode({composed:!0}),ei(t)||ai(t))return t}catch{}return e.ownerDocument??document}var vi=new WeakMap;function yi(e){return vi.has(e)||vi.set(e,mi(e).getComputedStyle(e)),vi.get(e)}var bi=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),xi=e=>bi.has(e),Si=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Ci(e,t){let n=new Set,r=_i(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Si(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&xi(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}function wi(e,t){let n=_i(e),r=new Set,i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Si(e);for(let e of a){if(!e||r.has(e))continue;r.add(e);let a=n.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;e&&bi.has(e)&&!n&&(t(a),i(a))}}}};i(e)}function Ti(e){let t=new Set;return wi(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Ei(e){let t=e.getAttribute(`role`);return!!(t&&bi.has(t))}function Di(e){return e.hasAttribute(`aria-controls`)&&e.getAttribute(`aria-expanded`)===`true`}function Oi(e){return Di(e)?!0:!!e.querySelector?.(`[aria-controls][aria-expanded="true"]`)}function ki(e){if(!e.id)return!1;let t=_i(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&Ei(e))}var Ai=()=>typeof document<`u`;function ji(){return navigator.userAgentData?.platform??navigator.platform}function Mi(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var Ni=e=>Ai()&&e.test(ji()),Pi=e=>Ai()&&e.test(Mi()),Fi=/^iPhone/i,Ii=/^iPad/i,Li=/^Mac/i,Ri=/Android/i,zi=()=>Ai()&&!!navigator.maxTouchPoints,Bi=()=>Ni(Fi),Vi=()=>Ni(Ii)||Ui()&&navigator.maxTouchPoints>1,Hi=()=>Bi()||Vi(),Ui=()=>Ni(Li),Wi=()=>Pi(Ri);function Gi(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Ki(e){return Gi(e)?.[0]??e.target}function qi(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=Xi(e);return n||r}function Ji(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function Yi(e){return na(e).isComposing||e.keyCode===229}function Xi(e){return Ui()?e.metaKey:e.ctrlKey}function Zi(e){return e.pointerType===``&&e.isTrusted?!0:Wi()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var Qi=e=>e.button===2||Ui()&&e.ctrlKey&&e.button===0,$i={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},ea={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function ta(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=$i[i]??i,n===`rtl`&&r===`horizontal`&&i in ea&&(i=ea[i]),i}function na(e){return e.nativeEvent??e}var ra=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function ia(e){return e.matches(`textarea, input, select, button`)}function aa(e,t){if(!e)return;let n=ia(e)?e.form:e.closest(`form`),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function L(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(mi(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function oa(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[aa(e,r),L(e,n)];return()=>i.forEach(e=>e?.())}var sa=Symbol.for(`zag.changeEvent`);function ca(e){return Object.prototype.hasOwnProperty.call(e,sa)}function la(e){return ca(e)||Object.defineProperty(e,sa,{value:!0}),e}var ua=e=>$r(e)&&e.tagName===`IFRAME`,da=/^(audio|video|details)$/;function fa(e){let t=e.getAttribute(`tabindex`);return t?parseInt(t,10):NaN}var pa=e=>!Number.isNaN(fa(e)),ma=e=>fa(e)<0;function ha(e){return oi(e)&&e.type===`radio`}function ga(e){if(!ha(e)||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter(t=>t.form===e.form&&xa(t)),i=r.find(e=>e.checked);return i?i===e:r[0]===e}function _a(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function va(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=_a(e,t);if(c){let t=Array.from(c.querySelectorAll(ya)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var ya=`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`,ba=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(ya));(n==1||n==`if-empty`&&i.length===0)&&$r(e)&&xa(e)&&i.unshift(e);let a=[];for(let e of i)if(xa(e)){if(ua(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...ba(t,{getShadowRoot:r}))}else a.push(e)}return r?va(a,r,xa):a};function xa(e){return!$r(e)||e.closest(`[inert]`)?!1:e.matches(ya)&&si(e)}function Sa(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(ya));n&&Ca(e)&&i.unshift(e);let a=[];for(let e of i)if(Ca(e)){if(ua(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Sa(t,{getShadowRoot:r}))}else a.push(e)}if(r){let e=va(a,r,Ca);return!e.length&&n?i:e}return!a.length&&n?i:a}function Ca(e){return $r(e)&&e.tabIndex>0?!0:!xa(e)||ma(e)?!1:ga(e)}function wa(e,t={}){let n=Sa(e,t);return[n[0]||null,n[n.length-1]||null]}function Ta(e){return e.tabIndex<0&&(da.test(e.localName)||ui(e))&&!pa(e)?0:e.tabIndex}function Ea(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let a=typeof n==`function`?n():n;return a||=t?.querySelector(`[data-autofocus],[autofocus]`),a||=Sa(t).filter(e=>!r||r(e)).find(e=>!e.hasAttribute(`data-no-autofocus`)),a||t||void 0}function Da(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=wa(t);return!(ci(n)&&e.shiftKey||ci(r)&&!e.shiftKey||!n&&!r)}var Oa=class e{constructor(){Vr(this,`id`,null),Vr(this,`fn_cleanup`),Vr(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}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 ka(e){let t=Oa.create();return t.request(e),t.cleanup}function Aa(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function ja(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function Ma(e,t){let{defer:n}=t,r=n?ka:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(ja(n,t))})),()=>{i.forEach(e=>e?.())}}function Na(e){let t=gi(e);return ri(t)?fi(t).body:$r(t)&&Ia(t)?t:Na(t)}var Pa=/auto|scroll|overlay|hidden|clip/,Fa=new Set([`inline`,`contents`]);function Ia(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=mi(e).getComputedStyle(e);return Pa.test(t+r+n)&&!Fa.has(i)}function La(e,t){return Array.from(e?.querySelectorAll(t)??[])}var Ra=e=>e.id;function za(e,t,n=Ra){return e.find(e=>n(e)===t)}function Ba(e,t,n=Ra){let r=za(e,t,n);return r?e.indexOf(r):-1}function Va(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Ha(e,t){let{rootEl:n,...r}=t||{};e&&n&&Ia(n)&&Va(n)&&e.scrollIntoView(r)}var Ua=e=>e.split(``).map(e=>{let t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace(`/`,`\\`):``}).join(``).trim(),Wa=e=>Ua(e.dataset?.valuetext??e.textContent??``),Ga=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function Ka(e,t,n,r=Ra){let i=n?Ba(e,n,r):-1,a=n?Hr(e,i):e;return t.length===1&&(a=a.filter(e=>r(e)!==n)),a.find(e=>Ga(Wa(e),t))}function qa(e,t){if(!e)return Ur;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return Ya(n,t)?Ur:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function Ja(e,t,n){if(!e)return Ur;let r=e.style.getPropertyValue(t);return r===n?Ur:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)})}function Ya(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Xa(e,t){let{state:n,activeId:r,key:i,timeout:a=350,itemToId:o}=t,s=n.keysSoFar+i,c=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,l=Ka(e.slice(),c,r,o);function u(){clearTimeout(n.timer),n.timer=-1}function d(e){n.keysSoFar=e,u(),e!==``&&(n.timer=+setTimeout(()=>{d(``),u()},a))}return d(s),l}var Za=Object.assign(Xa,{defaultOptions:{keysSoFar:``,timer:-1},isValidEvent:Qa});function Qa(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var $a={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 eo(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function to(e,t){let{timeout:n,rootNode:r}=t,i=mi(r),a=fi(r),o=new i.AbortController;return eo(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function no(e,t,n={}){let{defer:r,onMissing:i}=n,a=()=>typeof e==`function`?e():e,o=[],s=e=>{if(!e)return i?.();o.push(t(e))},c=a();if(!r||c)s(c);else{let e=!1;o.push(()=>{e=!0}),queueMicrotask(()=>{if(e)return;let t=a();t?s(t):o.push(ka(()=>{e||s(a())}))})}return()=>{o.forEach(e=>e?.())}}function ro(e){let t=()=>e.getRootNode?.()??document,n=()=>fi(t()),r=()=>n().defaultView??window,i=()=>hi(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:ci,getById:a}}function io(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ao=Symbol.for(`react.lazy`);function oo(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ao}function so(e){if((0,N.isValidElement)(e))return e;if(oo(e))return N.Children.toArray(e).find(N.isValidElement)}var co=e=>{let t=(0,N.memo)((0,N.forwardRef)((t,n)=>{let{asChild:r,children:i,...a}=t,o=r?so(i):void 0,s=o?io(o):void 0,c=or(n,s);return r?o?(0,N.cloneElement)(o,{...F(a,o.props),ref:n?c:s}):null:(0,N.createElement)(e,{...a,ref:n},i)}));return t.displayName=e.displayName||e.name,t},R=(()=>{let e=new Map;return new Proxy(co,{apply(e,t,n){return co(n[0])},get(t,n){let r=n;return e.has(r)||e.set(r,co(r)),e.get(r)}})})(),[lo,uo]=nr({name:`LocaleContext`,hookName:`useLocaleContext`,providerName:`<LocaleProvider />`,strict:!1,defaultValue:{dir:`ltr`,locale:`en-US`}}),fo=Object.defineProperty,po=(e,t)=>{let n={};for(var r in e)fo(n,r,{get:e[r],enumerable:!0});return t||fo(n,Symbol.toStringTag,{value:`Module`}),n},mo=()=>(e,t)=>t.reduce((e,t)=>{let[n,r]=e,i=t;return r[i]!==void 0&&(n[i]=r[i]),delete r[i],[n,r]},[{},{...e}]),ho=e=>mo()(e,[`hideMode`,`immediate`,`lazyMount`,`onEnterComplete`,`onExitComplete`,`present`,`skipAnimationOnMount`,`unmountOnExit`]),go=(e=>Reflect.get(e,`Activity`))(N),_o=go!==void 0;function vo(e,t={}){let{sync:n=!1}=t,r=yo(e);return(0,N.useCallback)((...e)=>n?queueMicrotask(()=>r.current?.(...e)):r.current?.(...e),[n,r])}function yo(e){let t=(0,N.useRef)(e);return t.current=e,t}var bo=o((e=>{var t=h();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),xo=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=bo()})),So=globalThis.document===void 0?N.useEffect:N.useLayoutEffect,Co=xo();function wo(e){let t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=(0,N.useState)(t),[i,a]=(0,N.useState)(r),o=e().value!==void 0,s=(0,N.useRef)(i);s.current=o?e().value:i;let c=(0,N.useRef)(s.current);So(()=>{c.current=s.current},[i,e().value]);let l=t=>{let r=c.current,i=Ln(t)?t(r):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:i,prev:r}),o||a(i),n(i,r)||e().onChange?.(i,r)};function u(){return o?e().value:i}return{initial:r,ref:s,get:u,set(t){(e().sync?Co.flushSync:qn)(()=>l(t))},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}wo.cleanup=e=>{(0,N.useEffect)(()=>e,[])},wo.ref=e=>{let t=(0,N.useRef)(e);return{get:()=>t.current,set:e=>{t.current=e}}};function To(e){let t=(0,N.useRef)(void 0);return t.current===void 0&&(t.current=e()),t.current}function Eo(e){let t=(0,N.useRef)(e);return t.current=e,(0,N.useMemo)(()=>((...e)=>t.current(...e)),[])}function Do(e){let t=(0,N.useRef)(e);return To(()=>({get(e){return t.current[e]},set(e,n){t.current[e]=n}}))}var Oo=(e,t)=>{let n=(0,N.useRef)(!1),r=(0,N.useRef)(!1);(0,N.useEffect)(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e??[]).map(e=>typeof e==`function`?e():e)]),(0,N.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[])};function ko(e,t={}){let n=(0,N.useMemo)(()=>{let{id:e,ids:n,getRootNode:r}=t;return ro({id:e,ids:n,getRootNode:r})},[t]),r=(...t)=>{e.debug&&console.log(...t)},i=jo(e.props?.({props:Xn(t),scope:n})??t),a=e.context?.({prop:i,bindable:wo,scope:n,flush:Mo,getContext(){return s},getComputed(){return g},getRefs(){return m},getEvent(){return f()}}),o=Ao(a),s=To(()=>({get(e){return o.current?.[e].ref.current},set(e,t){o.current?.[e].set(t)},initial(e){return o.current?.[e].initial},hash(e){let t=o.current?.[e].get();return o.current?.[e].hash(t)}})),c=(0,N.useRef)(new Map),l=(0,N.useRef)(null),u=(0,N.useRef)(null),d=(0,N.useRef)({type:``}),f=()=>({...d.current,current(){return d.current},previous(){return u.current}}),p=()=>({...S,matches(...e){return e.some(e=>Mr(S.ref.current,e))},hasTag(t){return Nr(e,S.ref.current,t)}}),m=Do(e.refs?.({prop:i,context:s})??{}),h=Eo(t=>{queueMicrotask(()=>{if(w.current!==Lr.Started)return;u.current=d.current,d.current=t;let n=E(),{transitions:i,source:a}=Ar(e,n,t.type),o=x(i);if(!o)return;l.current=o;let s=kr(e,o.target??n,a);r(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?S.invoke(n,n):v(o.actions??[]):(0,Co.flushSync)(()=>S.set(s))})}),g=Eo(t=>{er(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:s,event:f(),prop:i,refs:m,scope:n,computed:g})}),_=()=>({state:p(),context:s,event:f(),prop:i,send:h,action:v,guard:y,track:Oo,refs:m,computed:g,flush:Mo,scope:n,choose:x}),v=t=>{let n=Ln(t)?t(_()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||Qn(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(_())},y=t=>{if(Ln(t))return t(_());let n=e.implementations?.guards?.[t];return n||Qn(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(_())},b=t=>{let n=Ln(t)?t(_()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||Qn(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(_());t&&i.push(t)}return()=>i.forEach(e=>e?.())},x=e=>Tn(e).find(e=>{let t=!e.guard;return In(e.guard)?t=!!y(e.guard):Ln(e.guard)&&(t=e.guard(_())),t}),S=wo(()=>({defaultValue:kr(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=jr(e,n,t,l.current?.reenter);if(r.forEach(e=>{c.current.get(e.path)?.(),c.current.delete(e.path)}),r.forEach(e=>{v(e.state?.exit)}),v(l.current?.actions),i.forEach(e=>{let t=b(e.state?.effects);if(t){let n=c.current.get(e.path);c.current.set(e.path,n?Yn(n,t):t)}}),n===`__init__`){v(e.entry);let t=b(e.effects);if(t){let e=c.current.get(Rr);c.current.set(Rr,e?Yn(e,t):t)}}i.forEach(e=>{v(e.state?.entry)})}})),C=(0,N.useRef)(void 0),w=(0,N.useRef)(Lr.NotStarted),T=Eo(()=>w.current);So(()=>{queueMicrotask(()=>{let e=w.current===Lr.Started;w.current=Lr.Started,r(e?`rehydrating...`:`initializing...`);let t=C.current??S.initial;S.invoke(t,e?S.get():Rr)});let t=c.current;return()=>{let n=E();r(`unmounting...`),C.current=n,w.current=Lr.Stopped,t.forEach(e=>e?.()),c.current=new Map,l.current=null,queueMicrotask(()=>{v(e.exit),w.current=Lr.Stopped})}},[]);let E=()=>`ref`in S?S.ref.current:S.get();return e.watch?.(_()),{state:p(),send:h,context:s,prop:i,scope:n,refs:m,computed:g,event:f(),getStatus:T}}function Ao(e){let t=(0,N.useRef)(e);return t.current=e,t}function jo(e){let t=Ao(e);return Eo(function(e){return t.current[e]})}function Mo(e){queueMicrotask(()=>{(0,Co.flushSync)(()=>e())})}function No(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var Po=No(e=>e);function Fo(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var Io=Fr({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:n}){e([()=>t(`present`)],()=>{n({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`)?.();let n=t.get(`node`);if(!n)return;let r=new(mi(n)).CustomEvent(`exitcomplete`,{bubbles:!1});n.dispatchEvent(r)},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,yi(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});ka(()=>{if(r(`present`))return;let i=Lo(t.get(`styles`));e.set(`unmountAnimationName`,i),i===`none`||i===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{ka(()=>{e.set(`prevAnimationName`,Lo(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackEnterAnimation:({context:e,refs:t,prop:n})=>{if(!n(`onEnterComplete`)||!e.get(`initial`))return;let r,i=()=>{r=ka(()=>{let e=t.get(`node`);if(!e||!e.isConnected){i();return}let r=yi(e);if(Lo(r)===`none`||r.display===`none`||r.animationDuration===`0s`){n(`onEnterComplete`)?.();return}let a=t=>{Ki(t)===e&&n(`present`)&&(e.removeEventListener(`animationend`,a),n(`onEnterComplete`)?.())};return e.addEventListener(`animationend`,a),()=>{e.removeEventListener(`animationend`,a)}})};return i(),()=>r?.()},trackExitAnimation:({context:e,refs:t,send:n,prop:r})=>{let i=t.get(`node`);if(!i)return;let a=n=>{(n.composedPath?.()?.[0]??n.target)===i&&e.set(`prevAnimationName`,Lo(t.get(`styles`)))},o=a=>{let o=Lo(t.get(`styles`));Ki(a)===i&&o===e.get(`unmountAnimationName`)&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationend`})},s=e=>{Ki(e)===i&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationcancel`})};i.addEventListener(`animationstart`,a),i.addEventListener(`animationcancel`,s),i.addEventListener(`animationend`,o);let c=qa(i,{animationFillMode:`forwards`});return()=>{i.removeEventListener(`animationstart`,a),i.removeEventListener(`animationcancel`,s),i.removeEventListener(`animationend`,o),Aa(()=>c())}}}}});function Lo(e){return e?.animationName||`none`}var Ro=(e={})=>{let{lazyMount:t,unmountOnExit:n,hideMode:r=`display-none`,present:i,skipAnimationOnMount:a=!1,...o}=e,s=(0,N.useRef)(!1),c=Fo(ko(Io,{...o,present:i,onEnterComplete:vo(e.onEnterComplete),onExitComplete:vo(e.onExitComplete)}),Po);c.present&&(s.current=!0);let l=!c.present&&!s.current&&t||n&&!c.present&&s.current,u=r===`activity`&&_o?`activity`:`display-none`;return{ref:c.setNode,getPresenceProps:()=>({"data-state":c.skip&&a?void 0:i?`open`:`closed`,hidden:u!==`activity`&&!c.present}),present:c.present,unmounted:l,hideMode:u}},zo=e=>{let{presence:t,children:n}=e;return t.unmounted?null:t.hideMode===`activity`&&go?(0,P.jsx)(go,{mode:t.present?`visible`:`hidden`,children:n}):n},[Bo,Vo]=nr({name:`PresenceContext`,hookName:`usePresenceContext`,providerName:`<PresenceProvider />`}),Ho=dn(`span`);Ho.displayName=`Span`;var z=(e,t=[])=>({parts:(...n)=>{if(Uo(t))return z(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>z(e,[...t,...n]),omit:(...n)=>z(e,t.filter(e=>!n.includes(e))),rename:e=>z(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${B(e)}"][data-part="${B(n)}"]`,`& [data-scope="${B(e)}"][data-part="${B(n)}"]`].join(`, `),attrs:{"data-scope":B(e),"data-part":B(n)}}}),{})}),B=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),Uo=e=>e.length===0,[Wo,Go]=nr({name:`RenderStrategyContext`,hookName:`useRenderStrategyContext`,providerName:`<RenderStrategyPropsProvider />`}),Ko=e=>mo()(e,[`lazyMount`,`unmountOnExit`,`hideMode`]);function qo(e){let{key:t,recipe:n}=e,r=qt();return(0,N.useMemo)(()=>n?r.sva(n):t==null?r.sva({slots:[]}):r.getSlotRecipeFn(t),[t,n,r])}var Jo=e=>{let{key:t,recipe:n}=e,r=_n(t||n.className||`Component`),[i,a]=Gt({name:`${r}StylesContext`,errorMessage:`use${r}Styles returned is 'undefined'. Seems you forgot to wrap the components in "<${r}.Root />" `}),[o,s]=Gt({name:`${r}ClassNameContext`,errorMessage:`use${r}ClassNames returned is 'undefined'. Seems you forgot to wrap the components in "<${r}.Root />" `,strict:!1}),[c,l]=Gt({strict:!1,name:`${r}PropsContext`,providerName:`${r}PropsContext`,defaultValue:{}});function u(e){let{unstyled:r,...i}=e,a=qo({key:t,recipe:i.recipe||n}),[o,s]=(0,N.useMemo)(()=>a.splitVariantProps(i),[i,a]);return{styles:(0,N.useMemo)(()=>r?xn:a(o),[r,o,a]),classNames:a.classNameMap,props:s}}function d(e,t={}){let{defaultProps:n,displayName:a}=t,s=gn(e),c=yn(r,s),d=t=>{let r=l(),{styles:a,classNames:s,props:c}=u((0,N.useMemo)(()=>Mt(n,r,t),[r,t]));return(0,P.jsx)(i,{value:a,children:(0,P.jsx)(o,{value:s,children:(0,P.jsx)(e,{...c})})})};return d.displayName=a??c??s,d}return{StylesProvider:i,ClassNamesProvider:o,PropsProvider:c,usePropsContext:l,useRecipeResult:u,withProvider:(e,t,n)=>{let{defaultProps:a,displayName:s,wrapElement:c,...d}=n??{},f=vn(r,String(t)),p=dn(e,{},d),m=(0,N.forwardRef)((e,n)=>{let r=l(),s=(0,N.useMemo)(()=>Mt(a??{},r,e),[r,e]),{styles:d,props:f,classNames:m}=u(s),h=m[t],g=(0,P.jsx)(i,{value:d,children:(0,P.jsx)(o,{value:m,children:(0,P.jsx)(p,{ref:n,...f,css:[d[t],s.css],className:Bt(s.className,h)})})});return c?.(g,s)??g});return m.displayName=s??f??gn(e),m},withContext:(e,t,n)=>{let{displayName:i,...o}=n??{},c=t!=null&&t!==``?vn(r,String(t)):r,l=dn(e,{},o),u=(0,N.forwardRef)((e,n)=>{let{unstyled:r,...i}=e,o=a(),c=s()?.[t];return(0,P.jsx)(l,{...i,css:[!r&&t?o[t]:void 0,e.css],ref:n,className:Bt(e.className,c)})});return u.displayName=i??c??gn(e),u},withRootProvider:d,useStyles:a,useClassNames:s}},{withContext:Yo,PropsProvider:Xo}=Cn({key:`text`}),Zo=Yo(`p`),Qo=z(`accordion`).parts(`root`,`item`,`itemTrigger`,`itemContent`,`itemIndicator`);Qo.build();var $o=z(`avatar`).parts(`root`,`image`,`fallback`);$o.build();var es=new WeakMap,ts=new WeakMap,ns={},rs=0,is=e=>e&&(e.host||is(e.parentNode)),as=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=is(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),os=new Set([`script`,`output`,`status`,`next-route-announcer`]),ss=e=>os.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),cs=(e,t)=>{let{parentNode:n,markerName:r,controlAttribute:i,explicitBooleanValue:a,followControlledElements:o=!0}=t,s=as(n,Array.isArray(e)?e:[e]);ns[r]||(ns[r]=new WeakMap);let c=ns[r],l=[],u=new Set,d=new Set(s),f=e=>{e&&!u.has(e)&&(u.add(e),f(e.parentNode))};s.forEach(e=>{f(e),o&&$r(e)&&wi(e,e=>{f(e)})});let p=e=>{e&&!d.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(u.has(e))p(e);else try{if(ss(e))return;let t=e.getAttribute(i),n=a?t===`true`:t!==null&&t!==`false`,o=(es.get(e)||0)+1,s=(c.get(e)||0)+1;es.set(e,o),c.set(e,s),l.push(e),o===1&&n&&ts.set(e,!0),s===1&&e.setAttribute(r,``),n||e.setAttribute(i,a?`true`:``)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return p(n),u.clear(),rs++,()=>{l.forEach(e=>{let t=es.get(e)-1,n=c.get(e)-1;es.set(e,t),c.set(e,n),t||(ts.has(e)||e.removeAttribute(i),ts.delete(e)),n||e.removeAttribute(r)}),rs--,rs||(es=new WeakMap,es=new WeakMap,ts=new WeakMap,ns={})}},ls=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,us=(e,t=ls(e),n=`data-aria-hidden`,r=!0)=>{if(t)return cs(e,{parentNode:t,markerName:n,controlAttribute:`aria-hidden`,explicitBooleanValue:!0,followControlledElements:r})},ds=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function fs(e,t={}){let{defer:n=!0}=t,r=n?ds:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(us(t))})),()=>{i.forEach(e=>e?.())}}function ps(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function ms(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var hs=`pointerdown.outside`,gs=`focus.outside`;function _s(e){for(let t of e)if($r(t)&&xa(t))return!0;return!1}var vs=e=>`clientY`in e;function ys(e,t){if(!vs(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function bs(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function xs(e,t){if(!t||!vs(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return bs({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function Ss(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=fi(e),l=mi(e),u=ps(l),d=ms(l);function f(t,r){if(!$r(r)||!r.isConnected||di(e,r)||ys(e,t)||s&&Ci(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&xs(t,Na(i))||xs(t,Na(e))?!1:!n?.(r)}let p=new Set,m=ai(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!zi()?ka:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:Ki(t);if(e&&f(t,n)){if(i||a){let t=Yn(i,a);e.addEventListener(hs,t,{once:!0})}ws(e,hs,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:Qi(s),focusable:_s(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(ra(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(ra(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?ka:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:Ki(t);if(e&&f(t,i)){if(r||a){let t=Yn(r,a);e.addEventListener(gs,t,{once:!0})}ws(e,gs,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:xa(i),target:i}})}})}return zi()||(_.add(ra(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function Cs(e,t){let{defer:n}=t,r=n?ka:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Ss(n,t))})),()=>{i.forEach(e=>e?.())}}function ws(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function Ts(e,t){return ra(fi(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var Es=`layer:request-dismiss`,Ds={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){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},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){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>di(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>di(t,e))},add(e){let 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){let t=this.indexOf(e);t<0||(this.layers[t].styleTargets?.forEach(e=>{let t=e();t&&ks(t)}),this.recentlyRemoved.add(e),Aa(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>Ds.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{Os(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;Os(e,t,r);let{zIndex:i}=yi(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];js(e,Es,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),As(e,Es,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Os(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),Ds.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=Ds.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function ks(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 As(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function js(e,t,n){e.addEventListener(t,n,{once:!0})}var Ms=new WeakMap,Ns=new WeakMap;function Ps(e){return Ds.isBelowPointerBlockingLayer(e)?`none`:`auto`}function Fs(e){let t=Ps(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function Is(e){if(Ns.has(e))return;let t=mi(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{Ns.has(e)&&Fs(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),Ns.set(e,n)}function Ls(){Ds.layers.forEach(({node:e})=>{Fs(e),Is(e)})}function Rs(e){let t=Ns.get(e);t&&(t.disconnect(),Ns.delete(e)),e.style.pointerEvents=``}function zs(e,t){let n=fi(e),r=[];return Ds.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Ms.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))})),t?.forEach(e=>{let[t,n]=to(()=>{let t=e();return $r(t)?t:null},{timeout:1e3});t.then(e=>r.push(qa(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{Ds.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=Ms.get(e);t!==void 0&&(e.style.pointerEvents=t,Ms.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Bs(e,t){let{onDismiss:n,onRequestDismiss:r,pointerBlocking:i,exclude:a,debug:o,type:s=`dialog`,layerStyleTargets:c}=t,l={dismiss:n,node:e,type:s,pointerBlocking:i,requestDismiss:r,styleTargets:c};Ds.add(l),Ls();function u(r){let i=Ki(r.detail.originalEvent);Ds.isBelowPointerBlockingLayer(e)||Ds.isInBranch(i)||(t.onPointerDownOutside?.(r),t.onInteractOutside?.(r),!r.defaultPrevented&&(o&&console.log(`onPointerDownOutside:`,r.detail.originalEvent),n?.()))}function d(e){let r=Ki(e.detail.originalEvent);Ds.isInBranch(r)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(o&&console.log(`onFocusOutside:`,e.detail.originalEvent),n?.()))}function f(r){Ds.isTopMost(e)&&(t.onEscapeKeyDown?.(r),!r.defaultPrevented&&n&&(r.preventDefault(),n()))}function p(n){let r=typeof a==`function`?a():a,i=Array.isArray(r)?r:[r],o=t.persistentElements?.map(e=>e()).filter($r);return o&&i.push(...o),i.some(e=>di(e,n))||Ds.isInNestedLayer(e,n)}let m=[i?zs(e,t.persistentElements):void 0,Ts(e,f),Cs(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{Ds.remove(e),Ls(),Rs(e),m.forEach(e=>e?.())}}function Vs(e,t){let{warnOnMissingNode:n=!0}=t;return no(e,e=>Bs(e,t),{defer:t.defer,onMissing:n?()=>Qn("[@zag-js/dismissable] node is `null` or `undefined`"):void 0})}var Hs=Object.defineProperty,Us=(e,t,n)=>t in e?Hs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ws=(e,t,n)=>Us(e,typeof t==`symbol`?t:t+``,n),Gs={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},Ks=[],qs=class{constructor(e,t){Ws(this,`trapStack`),Ws(this,`config`),Ws(this,`doc`),Ws(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ws(this,`lastInteractionType`,`keyboard`),Ws(this,`portalContainers`,new Set),Ws(this,`listenerCleanups`,[]),Ws(this,`handleFocus`,e=>{let t=Ki(e),n=this.findContainerIndex(t,e)>=0;if(n||ei(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode){if(Ta(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>Ta(e)>0))||(n=!1)}else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ws(this,`handlePointerDown`,e=>{this.lastInteractionType=`pointer`;let t=Ki(e);this.findContainerIndex(t,e)>=0||(Qs(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):Qs(this.config.allowOutsideClick,e)||e.preventDefault())}),Ws(this,`handleClick`,e=>{let t=Ki(e);this.findContainerIndex(t,e)>=0||Qs(this.config.clickOutsideDeactivates,e)||Qs(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),Ws(this,`handleTabKey`,e=>{if(this.lastInteractionType=`keyboard`,this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;Ys(e)&&e.preventDefault(),this.tryFocus(n)}}),Ws(this,`handleEscapeKey`,e=>{$s(e)&&Qs(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),Ws(this,`_mutationObserver`),Ws(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>e.type===`attributes`&&(e.attributeName===`aria-controls`||e.attributeName===`aria-expanded`)||e.type===`childList`&&e.addedNodes.length>0&&Array.from(e.addedNodes).some(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return Oi(t)?!0:t.id&&!this.state.containers.some(e=>e.contains(t))?ki(t):!1}))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ws(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),Ws(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!xa(e)){let t=hi(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e||(e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),!e||!e.isConnected))throw Error(`Your focus-trap needs to have at least one focusable element`);return e}),Ws(this,`tryFocus`,(e,t)=>{e!==!1&&e!==hi(this.doc)&&(!e||!e.focus?this.tryFocus(this.getInitialFocusNode()):(e.focus({preventScroll:!!this.config.preventScroll,...t}),this.state.mostRecentlyFocusedNode=e,tc(e)&&e.select()))}),Ws(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Gs.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{ec(()=>{if(a&&this.isSafeToOverrideFocus()){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation),t=this.lastInteractionType===`keyboard`?{focusVisible:!0}:void 0;this.tryFocus(e,t)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),Ws(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),Ws(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);this.state.paused=!1,t?.();try{this.updateTabbableNodes()}catch{}this.attachListeners();try{this.commitInitialFocus()}catch{}return this.updateObservedNodes(),n?.(),this}),Ws(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ws(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||t!==!1&&e}),Ws(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),Ws(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),Ws(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||Ki(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||xa(r)&&!Ca(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=Ta(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else Ys(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||xa(r)&&!Ca(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=Ta(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else Ys(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||Ks;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:Xs,isKeyBackward:Zs,...t};this.doc=n.document||fi(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let 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=>{Ti(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:i})=>r.contains(e)||n?.includes(r)||i.find(t=>t===e)||this.isControlledElement(r,e)||this.isPersistentElement(e,t))}isControlledElement(e,t){return this.config.followControlledElements?Ci(e,t):!1}isPersistentElement(e,t){let n=this.config.persistentElements;if(!n||n.length===0)return!1;let r=typeof t?.composedPath==`function`?t.composedPath():void 0;return n.some(t=>{let n=t();return di(n,e)||n!=null&&r?.includes(n)})}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=Sa(e,{getShadowRoot:this.config.getShadowRoot}),n=ba(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],a=r,o=i,s=!1;for(let e=0;e<t.length;e++)if(Ta(t[e])>0){s=!0;break}function c(e,r=!0){let i=t.indexOf(e);if(i>=0)return t[i+(r?1:-1)];let a=n.indexOf(e);if(!(a<0)){if(r){for(let e=a+1;e<n.length;e++)if(Ca(n[e]))return n[e]}else for(let e=a-1;e>=0;e--)if(Ca(n[e]))return n[e]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw 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 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 Gs.activateTrap(this.trapStack,this),this.listenerCleanups.push(ra(this.doc,`focusin`,this.handleFocus,!0),ra(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),ra(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),ra(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),ra(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),ra(this.doc,`keydown`,this.handleEscapeKey)),this}commitInitialFocus(){return this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ec(()=>{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=>di(t,e))}isSafeToOverrideFocus(){let e=hi(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;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=hi(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},Js=e=>e?.type===`keydown`,Ys=e=>Js(e)&&e?.key===`Tab`,Xs=e=>Js(e)&&e.key===`Tab`&&!e?.shiftKey,Zs=e=>Js(e)&&e.key===`Tab`&&e?.shiftKey,Qs=(e,...t)=>typeof e==`function`?e(...t):e,$s=e=>!e.isComposing&&e.key===`Escape`,ec=e=>setTimeout(e,0),tc=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function nc(e,t={}){let n,r=ka(()=>{let r=(Array.isArray(e)?e:[e]).map(e=>typeof e==`function`?e():e).filter(e=>e!=null);if(r.length===0)return;let i=r[0];n=new qs(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:fi(i)});try{n.activate()}catch{}});return function(){n?.deactivate(),r()}}var rc=`data-scroll-lock`,ic=new WeakMap;function ac(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function oc(e){let t=yi(e)?.scrollbarGutter;return t===`stable`||t?.startsWith(`stable `)===!0}function sc(e){let{documentElement:t,body:n}=e;return Ia(t)?t:n}function cc(e){let t=e.defaultView??window,{documentElement:n,body:r}=e,i=sc(e),a=oc(n)||oc(r),o=t.innerWidth-n.clientWidth;r.setAttribute(rc,``);let s=()=>Ja(n,`--scrollbar-width`,`${o}px`),c=ac(n),l=[s(),Hi()?(()=>{let{scrollX:e,scrollY:n,visualViewport:i}=t,s=i?.offsetLeft??0,l=i?.offsetTop??0,u={position:`fixed`,overflow:`hidden`,top:`${-(n-Math.floor(l))}px`,left:`${-(e-Math.floor(s))}px`,right:`0`};!a&&o>0&&(u[c]=`${o}px`);let d=qa(r,u);return()=>{d?.(),t.scrollTo({left:e,top:n,behavior:`instant`})}})():(()=>{let e={overflow:`hidden`};return!a&&o>0&&(e[c]=`${o}px`),qa(i,e)})()];return()=>{l.forEach(e=>e?.()),r.removeAttribute(rc)}}function lc(e){let t=e??document,n=ic.get(t);n||(n={count:0,cleanup:cc(t)},ic.set(t,n)),n.count++;let r=n,i=!1;return()=>{i||(i=!0,r.count--,r.count===0&&(r.cleanup(),ic.delete(t)))}}var uc=z(`carousel`).parts(`root`,`itemGroup`,`item`,`control`,`nextTrigger`,`prevTrigger`,`indicatorGroup`,`indicator`,`autoplayTrigger`,`progressText`);uc.build();var dc=uc.extendWith(`progressText`,`autoplayIndicator`),fc=z(`checkbox`).parts(`root`,`label`,`control`,`indicator`);fc.build();function pc(e){return!(e.metaKey||!Ui()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var mc=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),hc=[`a[href]`,`audio[controls]`,`button`,`details`,`embed`,`iframe`,`img[controls]`,`img[usemap]`,`input`,`select`,`textarea`,`video[controls]`].join(`,`);function gc(e,t,n){let r=n?Ki(n):null,i=fi(r),a=mi(r),o=hi(i);return e=e||o instanceof a.HTMLInputElement&&!mc.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(wc,n.key))}var _c=null,vc=new Set,yc=new Map,bc=!1,xc=null,Sc=!1,Cc=null,wc={Tab:!0,Escape:!0};function Tc(e,t){for(let n of vc)n(e,t)}function Ec(e){xc=null,bc=!0,pc(e)&&(_c=`keyboard`,Tc(`keyboard`,e))}function Dc(e){(e.type!==`pointermove`&&e.type!==`mousemove`||Cc?.x!==e.clientX||Cc?.y!==e.clientY)&&(Cc={x:e.clientX,y:e.clientY},_c=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(xc=null,bc=!0,Tc(`pointer`,e)))}function Oc(e){if(Zi(e)){xc=null,bc=!0,_c=`virtual`;return}xc=null;let t=Ki(e),n=t?.closest(`label`),r=n?.control;if(!n||!r||r.matches(`:disabled`))return;let i=t?.closest(hc);i&&n.contains(i)&&i!==r||r!==hi(n.ownerDocument)&&(xc=r)}function kc(e){let t=Ki(e),n=t===xc;t!==mi(t)&&t!==fi(t)&&e.isTrusted&&(!bc&&!n&&!Sc&&(_c=`virtual`,Tc(`virtual`,e)),bc=!1,xc=null,Sc=!1)}function Ac(){bc=!1,xc=null,Sc=!0}function jc(e){if(typeof window>`u`||yc.get(mi(e)))return;let t=mi(e),n=fi(e),r=t.HTMLElement.prototype.focus;function i(){bc=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,Ec,!0),n.addEventListener(`keyup`,Ec,!0),n.addEventListener(`click`,Oc,!0),t.addEventListener(`focus`,kc,!0),t.addEventListener(`blur`,Ac,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,Dc,!0),n.addEventListener(`mousemove`,Dc,!0),n.addEventListener(`mouseup`,Dc,!0)):(n.addEventListener(`pointerdown`,Dc,!0),n.addEventListener(`pointermove`,Dc,!0),n.addEventListener(`pointerup`,Dc,!0)),t.addEventListener(`beforeunload`,()=>{Mc(e)},{once:!0}),yc.set(t,{focus:r})}var Mc=(e,t)=>{let n=mi(e),r=fi(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=yc.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,Ec,!0),r.removeEventListener(`keyup`,Ec,!0),r.removeEventListener(`click`,Oc,!0),n.removeEventListener(`focus`,kc,!0),n.removeEventListener(`blur`,Ac,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,Dc,!0),r.removeEventListener(`mousemove`,Dc,!0),r.removeEventListener(`mouseup`,Dc,!0)):(r.removeEventListener(`pointerdown`,Dc,!0),r.removeEventListener(`pointermove`,Dc,!0),r.removeEventListener(`pointerup`,Dc,!0)),yc.delete(n)}};function Nc(){return _c}function Pc(e){_c=e,Tc(e,null)}function Fc(){return _c===`keyboard`||_c===`virtual`}function Ic(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;jc(i),r?.({isFocusVisible:n||Fc(),modality:_c});let a=(e,n)=>{gc(!!t,e,n)&&r?.({isFocusVisible:Fc(),modality:e})};return vc.add(a),()=>{vc.delete(a)}}var Lc=fc.extendWith(`group`),Rc=z(`clipboard`).parts(`root`,`control`,`trigger`,`indicator`,`input`,`label`);Rc.build();var zc=z(`collapsible`).parts(`root`,`trigger`,`content`,`indicator`);zc.build();var Bc=z(`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`]);Bc.build();var Vc=[`top`,`right`,`bottom`,`left`],Hc=Math.min,Uc=Math.max,Wc=Math.round,Gc=Math.floor,Kc=e=>({x:e,y:e}),qc={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Jc(e,t,n){return Uc(e,Hc(t,n))}function Yc(e,t){return typeof e==`function`?e(t):e}function Xc(e){return e.split(`-`)[0]}function Zc(e){return e.split(`-`)[1]}function Qc(e){return e===`x`?`y`:`x`}function $c(e){return e===`y`?`height`:`width`}function el(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function tl(e){return Qc(el(e))}function nl(e,t,n){n===void 0&&(n=!1);let r=Zc(e),i=tl(e),a=$c(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=dl(o)),[o,dl(o)]}function rl(e){let t=dl(e);return[il(e),t,il(t)]}function il(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var al=[`left`,`right`],ol=[`right`,`left`],sl=[`top`,`bottom`],cl=[`bottom`,`top`];function ll(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ol:al:t?al:ol;case`left`:case`right`:return t?sl:cl;default:return[]}}function ul(e,t,n,r){let i=Zc(e),a=ll(Xc(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(il)))),a}function dl(e){let t=Xc(e);return qc[t]+e.slice(t.length)}function fl(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function pl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:fl(e)}function ml(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function hl(e,t,n){let{reference:r,floating:i}=e,a=el(t),o=tl(t),s=$c(o),c=Xc(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Zc(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function gl(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Yc(t,e),p=pl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ml(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ml(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var _l=50,vl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:gl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=hl(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<_l&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=hl(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},yl=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Yc(e,t)||{};if(l==null)return{};let d=pl(u),f={x:n,y:r},p=tl(i),m=$c(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Hc(d[_],T),ee=Hc(d[v],T),D=C-h[m]-ee,O=C/2-h[m]/2+w,te=Jc(E,O,D),ne=!c.arrow&&Zc(i)!=null&&O!==te&&a.reference[m]/2-(O<E?E:ee)-h[m]/2<0,re=ne?O<E?O-E:O-D:0;return{[p]:f[p]+re,data:{[p]:te,centerOffset:O-te-re,...ne&&{alignmentOffset:re}},reset:ne}}}),bl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Yc(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Xc(r),_=el(o),v=Xc(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[dl(o)]:rl(o)),x=p!==`none`;!d&&x&&b.push(...ul(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=nl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===el(t)||T.every(e=>el(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=el(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function xl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sl(e){return Vc.some(t=>e[t]>=0)}var Cl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Yc(e,t);switch(i){case`referenceHidden`:{let e=xl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Sl(e)}}}case`escaped`:{let e=xl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Sl(e)}}}default:return{}}}}},wl=new Set([`left`,`top`]);async function Tl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Xc(n),s=Zc(n),c=el(n)===`y`,l=wl.has(o)?-1:1,u=a&&c?-1:1,d=Yc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var El=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Tl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Dl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Yc(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=el(i),p=Qc(f),m=u[p],h=u[f],g=(e,t)=>Jc(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ol=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Yc(e,t),u={x:n,y:r},d=el(i),f=Qc(d),p=u[f],m=u[d],h=Yc(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=wl.has(Xc(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},kl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Yc(e,t),c=await i.detectOverflow(t,s),l=Xc(n),u=Zc(n),d=el(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Hc(p-c[m],g),y=Hc(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Uc(c.left,c.right):S=p-2*Uc(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Al(){return typeof window<`u`}function jl(e){return Pl(e)?(e.nodeName||``).toLowerCase():`#document`}function Ml(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nl(e){return((Pl(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Pl(e){return Al()?e instanceof Node||e instanceof Ml(e).Node:!1}function Fl(e){return Al()?e instanceof Element||e instanceof Ml(e).Element:!1}function Il(e){return Al()?e instanceof HTMLElement||e instanceof Ml(e).HTMLElement:!1}function Ll(e){return!Al()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ml(e).ShadowRoot}function Rl(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Yl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function zl(e){return/^(table|td|th)$/.test(jl(e))}function Bl(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Vl=/transform|translate|scale|rotate|perspective|filter/,Hl=/paint|layout|strict|content/,Ul=e=>!!e&&e!==`none`,Wl;function Gl(e){let t=Fl(e)?Yl(e):e;return Ul(t.transform)||Ul(t.translate)||Ul(t.scale)||Ul(t.rotate)||Ul(t.perspective)||!ql()&&(Ul(t.backdropFilter)||Ul(t.filter))||Vl.test(t.willChange||``)||Hl.test(t.contain||``)}function Kl(e){let t=Zl(e);for(;Il(t)&&!Jl(t);){if(Gl(t))return t;if(Bl(t))return null;t=Zl(t)}return null}function ql(){return Wl??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Wl}function Jl(e){return/^(html|body|#document)$/.test(jl(e))}function Yl(e){return Ml(e).getComputedStyle(e)}function Xl(e){return Fl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zl(e){if(jl(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ll(e)&&e.host||Nl(e);return Ll(t)?t.host:t}function Ql(e){let t=Zl(e);return Jl(t)?(e.ownerDocument||e).body:Il(t)&&Rl(t)?t:Ql(t)}function $l(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ql(e),i=r===e.ownerDocument?.body,a=Ml(r);if(i){let e=eu(a);return t.concat(a,a.visualViewport||[],Rl(r)?r:[],e&&n?$l(e):[])}return t.concat(r,$l(r,[],n))}function eu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tu(e){let t=Yl(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Il(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Wc(n)!==a||Wc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function nu(e){return Fl(e)?e:e.contextElement}function ru(e){let t=nu(e);if(!Il(t))return Kc(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=tu(t),o=(a?Wc(n.width):n.width)/r,s=(a?Wc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var iu=Kc(0);function au(e){let t=Ml(e);return!ql()||!t.visualViewport?iu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ou(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ml(e)}function su(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=nu(e),o=Kc(1);t&&(r?Fl(r)&&(o=ru(r)):o=ru(e));let s=ou(a,n,r)?au(a):Kc(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ml(a),t=Fl(r)?Ml(r):r,n=e,i=eu(n);for(;i&&t!==n;){let e=ru(i),t=i.getBoundingClientRect(),r=Yl(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ml(i),i=eu(n)}}return ml({width:u,height:d,x:c,y:l})}function cu(e,t){let n=Xl(e).scrollLeft;return t?t.left+n:su(Nl(e)).left+n}function lu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-cu(e,n),y:n.top+t.scrollTop}}function uu(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Nl(r),s=t?Bl(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Kc(1),u=Kc(0),d=Il(r);if((d||!a)&&((jl(r)!==`body`||Rl(o))&&(c=Xl(r)),d)){let e=su(r);l=ru(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?lu(o,c):Kc(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function du(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function fu(e){let t=Xl(e),n=e.ownerDocument.body,r=Uc(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Uc(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+cu(e),o=-t.scrollTop;return Yl(n).direction===`rtl`&&(a+=Uc(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var pu=25;function mu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ml(e),a=Nl(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ql()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(cu(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=pu&&(s-=o)}return{width:s,height:c,x:l,y:u}}function hu(e,t){let n=su(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ru(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=mu(e,n,t);else if(t===`document`)r=fu(Nl(e));else if(Fl(t))r=hu(t,n);else{let n=au(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ml(r)}function _u(e,t){let n=t.get(e);if(n)return n;let r=$l(e,[],!1).filter(e=>Fl(e)&&jl(e)!==`body`),i=null,a=Yl(e).position===`fixed`,o=a?Zl(e):e;for(;Fl(o)&&!Jl(o);){let e=Yl(o),t=Gl(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Zl(o)}return t.set(e,r),r}function vu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Bl(t)?[]:_u(t,this._c):[].concat(n),r],o=gu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=gu(t,a[e],i);s=Uc(n.top,s),c=Hc(n.right,c),l=Hc(n.bottom,l),u=Uc(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function yu(e){let{width:t,height:n}=tu(e);return{width:t,height:n}}function bu(e,t,n){let r=Il(t),i=Nl(t),a=n===`fixed`,o=su(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Kc(0);if((r||!a)&&((jl(t)!==`body`||Rl(i))&&(s=Xl(t)),r)){let e=su(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=cu(i));let l=i&&!r&&!a?lu(i,s):Kc(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function xu(e){return Yl(e).position===`static`}function Su(e,t){if(!Il(e)||Yl(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Nl(e)===n&&(n=n.ownerDocument.body),n}function Cu(e,t){let n=Ml(e);if(Bl(e))return n;if(!Il(e)){let t=Zl(e);for(;t&&!Jl(t);){if(Fl(t)&&!xu(t))return t;t=Zl(t)}return n}let r=Su(e,t);for(;r&&zl(r)&&xu(r);)r=Su(r,t);return r&&Jl(r)&&xu(r)&&!Gl(r)?n:r||Kl(e)||n}var wu=async function(e){let t=this.getOffsetParent||Cu,n=this.getDimensions,r=await n(e.floating);return{reference:bu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tu(e){return Yl(e).direction===`rtl`}var Eu={convertOffsetParentRelativeRectToViewportRelativeRect:uu,getDocumentElement:Nl,getClippingRect:vu,getOffsetParent:Cu,getElementRects:wu,getClientRects:du,getDimensions:yu,getScale:ru,isElement:Fl,isRTL:Tu};function Du(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ou(e,t,n){let r=null,i,a=Nl(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Gc(d),h=Gc(a.clientWidth-(u+f)),g=Gc(a.clientHeight-(d+p)),_=Gc(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Uc(0,Hc(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Du(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ml(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function ku(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=nu(e),u=i||a?[...l?$l(l):[],...t?$l(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ou(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?su(e):null;c&&g();function g(){let t=su(e);h&&!Du(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Au=El,ju=Dl,Mu=bl,Nu=kl,Pu=Cl,Fu=yl,Iu=Ol,Lu=(e,t,n)=>{let r=new Map,i=n??{},a={...Eu,...i.platform,_c:r};return vl(e,t,{...i,platform:a})};function Ru(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function zu(e){if(!e)return Ru();let{x:t,y:n,width:r,height:i}=e;return Ru(t,n,r,i)}function Bu(e,t){return{contextElement:$r(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?zu(r):n.getBoundingClientRect()}}}var Vu=e=>({variable:e,reference:`var(${e})`}),Hu={arrowSize:Vu(`--arrow-size`),arrowSizeHalf:Vu(`--arrow-size-half`),arrowBg:Vu(`--arrow-background`),transformOrigin:Vu(`--transform-origin`),arrowOffset:Vu(`--arrow-offset`)},Uu=e=>e===`top`||e===`bottom`?`y`:`x`;function Wu(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=Uu(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(Hu.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var Gu={name:`rects`,fn({rects:e}){return{data:e}}},Ku=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${Hu.arrowOffset.reference})`}),{}}}};function qu(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function Ju(e){return e.split(`-`)[0]}var Yu={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 Xu(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Zu(e,t){return e!=null&&Math.abs(e-t)<.5}function Qu(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function $u(e,t,n){return Fu({element:e||t.createElement(`div`),padding:n.arrowPadding})}function ed(e,t){if(!Rn(t.offset??t.gutter))return Au(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=qu(n),s=o?void 0:t.shift;return Xn({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function td(e){if(e.flip)return Mu(()=>{let t=Qu(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function nd(e){if(e.slide||e.overlap)return ju(()=>{let t=Qu(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Iu()}})}function rd(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return Nu(()=>{let a=Qu(e.boundary);return{padding:e.overflowPadding,...a?{boundary:a}:void 0,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),Zu(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),Zu(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),Zu(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),Zu(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}}})}function id(e){if(e.hideWhenDetached)return Pu(()=>({strategy:`referenceHidden`,boundary:Qu(e.boundary)??`clippingAncestors`}))}function ad(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var od=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],sd=[`top`,`right`,`bottom`,`left`];function cd(e,t){if(!e)return Jn;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function ld(e){return e==null?null:$r(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function ud(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:Bu(e,n.getAnchorRect)},o=Object.assign({},Yu,n),s=[],c=null,l,u;function d(e){l?.(),u?.(),c=e,l=o.restoreStyles?cd(e,od):void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?cd(t,sd):void 0,s=[ed(t,o),td(o),nd(o),$u(t,e.ownerDocument,o),Ku(t),Wu({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),rd(o),id(o),Gu]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=Jn,S=ad(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();t&&n&&(ld(e)!==ld(y)||n!==b)&&(x(),y=e,b=n,x=ku(t,n,T,S))}async function w(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await Lu(t,e,{placement:f,middleware:s,strategy:p}),i=mi(e),l=Xu(i,n.x),u=Xu(i,n.y);if(m?.({...n,x:l,y:u}),o.applyStyles!==!1&&(Zu(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),Zu(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v)){let t=e.firstElementChild;t&&(e.style.setProperty(`--z-index`,yi(t).zIndex),v=!0)}}async function T(){n.updatePosition?(await n.updatePosition({updatePosition:w,floatingElement:r()}),h?.({placed:!0})):await w()}return T(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function dd(e,t,n={}){let{defer:r,...i}=n,a=r?ka:e=>e(),o=[];return o.push(a(()=>{o.push(ud(e,t,i))})),()=>{o.forEach(e=>e?.())}}var fd={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function pd(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:Hu.arrowSize.reference,height:Hu.arrowSize.reference,[Hu.arrowSizeHalf.variable]:`calc(${Hu.arrowSize.reference} / 2)`,[Hu.arrowOffset.variable]:`calc(${Hu.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?fd[t.split(`-`)[0]]:void 0,background:Hu.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`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 md=Bc.extendWith(`view`),hd=z(`combobox`).parts(`root`,`clearTrigger`,`content`,`control`,`input`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`label`,`list`,`positioner`,`trigger`);hd.build();var gd=Object.defineProperty,_d=(e,t,n)=>t in e?gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V=(e,t,n)=>_d(e,typeof t==`symbol`?t:t+``,n),vd={itemToValue(e){return typeof e==`string`?e:Fn(e)&&zn(e,`value`)?e.value:``},itemToString(e){return typeof e==`string`?e:Fn(e)&&zn(e,`label`)?e.label:vd.itemToValue(e)},isItemDisabled(e){return Fn(e)&&zn(e,`disabled`)?!!e.disabled:!1}},yd=class e{constructor(t){V(this,`options`,t),V(this,`items`),V(this,`indexMap`,null),V(this,`copy`,t=>new e({...this.options,items:t??[...this.items]})),V(this,`isEqual`,e=>Mn(this.items,e.items)),V(this,`setItems`,e=>this.copy(e)),V(this,`getValues`,(e=this.items)=>{let t=[];for(let n of e){let e=this.getItemValue(n);e!=null&&t.push(e)}return t}),V(this,`find`,e=>{if(e==null)return null;let t=this.indexOf(e);return t===-1?null:this.at(t)}),V(this,`findMany`,e=>{let t=[];for(let n of e){let e=this.find(n);e!=null&&t.push(e)}return t}),V(this,`at`,e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0,n=this.group();for(let[,r]of n)for(let n of r){if(t===e)return n;t++}return null}),V(this,`sortFn`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return(n??0)-(r??0)}),V(this,`sort`,e=>[...e].sort(this.sortFn.bind(this))),V(this,`getItemValue`,e=>e==null?null:this.options.itemToValue?.(e)??vd.itemToValue(e)),V(this,`getItemDisabled`,e=>e==null?!1:this.options.isItemDisabled?.(e)??vd.isItemDisabled(e)),V(this,`stringifyItem`,e=>e==null?null:this.options.itemToString?.(e)??vd.itemToString(e)),V(this,`stringify`,e=>e==null?null:this.stringifyItem(this.find(e))),V(this,`stringifyItems`,(e,t=`, `)=>{let n=[];for(let t of e){let e=this.stringifyItem(t);e!=null&&n.push(e)}return n.join(t)}),V(this,`stringifyMany`,(e,t)=>this.stringifyItems(this.findMany(e),t)),V(this,`has`,e=>this.indexOf(e)!==-1),V(this,`hasItem`,e=>e!=null&&this.has(this.getItemValue(e))),V(this,`group`,()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[[``,[...this.items]]];let n=new Map;this.items.forEach((t,r)=>{let i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)});let r=Array.from(n.entries());return t&&r.sort(([e],[n])=>{if(typeof t==`function`)return t(e,n);if(Array.isArray(t)){let r=t.indexOf(e),i=t.indexOf(n);return r===-1?1:i===-1?-1:r-i}return t===`asc`?e.localeCompare(n):t===`desc`?n.localeCompare(e):0}),r}),V(this,`getNextValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),V(this,`getPreviousValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),V(this,`indexOf`,e=>{if(e==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0,t=this.group();for(let[,n]of t)for(let t of n){let n=this.getItemValue(t);n!=null&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1}),V(this,`getByText`,(e,t)=>{let n=t==null?-1:this.indexOf(t),r=e.length===1;for(let i=0;i<this.items.length;i++){let a=this.items[(n+i+1)%this.items.length];if(!(r&&this.getItemValue(a)===t)&&!this.getItemDisabled(a)&&bd(this.stringifyItem(a),e))return a}}),V(this,`search`,(e,t)=>{let{state:n,currentValue:r,timeout:i=350}=t,a=n.keysSoFar+e,o=a.length>1&&Array.from(a).every(e=>e===a[0])?a[0]:a,s=this.getByText(o,r),c=this.getItemValue(s);function l(){clearTimeout(n.timer),n.timer=-1}function u(e){n.keysSoFar=e,l(),e!==``&&(n.timer=+setTimeout(()=>{u(``),l()},i))}return u(a),c}),V(this,`update`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),V(this,`upsert`,(e,t,n=`append`)=>{let r=this.indexOf(e);return r===-1?(n===`append`?this.append:this.prepend)(t):this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),V(this,`insert`,(e,...t)=>this.copy(xd(this.items,e,...t))),V(this,`insertBefore`,(e,...t)=>{let n=this.indexOf(e);if(n===-1){if(this.items.length===0)n=0;else return this}return this.copy(xd(this.items,n,...t))}),V(this,`insertAfter`,(e,...t)=>{let n=this.indexOf(e);if(n===-1){if(this.items.length===0)n=0;else return this}return this.copy(xd(this.items,n+1,...t))}),V(this,`prepend`,(...e)=>this.copy(xd(this.items,0,...e))),V(this,`append`,(...e)=>this.copy(xd(this.items,this.items.length,...e))),V(this,`filter`,e=>{let t=this.items.filter((t,n)=>e(this.stringifyItem(t),n,t));return this.copy(t)}),V(this,`remove`,(...e)=>{let t=e.map(e=>typeof e==`string`?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let n=this.getItemValue(e);return n!=null&&!t.includes(n)}))}),V(this,`move`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy(Sd(this.items,[n],t))}),V(this,`moveBefore`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(Sd(this.items,r,n))}),V(this,`moveAfter`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(Sd(this.items,r,n+1))}),V(this,`reorder`,(e,t)=>this.copy(Sd(this.items,[e],t))),V(this,`compareValue`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:+(n>r)}),V(this,`range`,(e,t)=>{let n=[],r=e;for(;r!=null;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]}),V(this,`getValueRange`,(e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[]),V(this,`toString`,()=>{let e=``;for(let t of this.items){let n=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(`:`);e+=n+`,`}return e}),V(this,`toJSON`,()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},bd=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function xd(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Sd(e,t,n){t=[...t].sort((e,t)=>e-t);let r=t.map(t=>e[t]);for(let n=t.length-1;n>=0;n--)e=[...e.slice(0,t[n]),...e.slice(t[n]+1)];return n=Math.max(0,n-t.filter(e=>e<n).length),[...e.slice(0,n),...r,...e.slice(n)]}function Cd(e){return zn(e,`columnCount`)&&zn(e,`getRows`)}function wd({values:e,collection:t,selectedItemMap:n}){let r=[];for(let i of e){let e=t.find(i)??n.get(i);e!=null&&r.push(e)}return r}function Td({selectedItemMap:e,values:t,selectedItems:n,collection:r}){let i=new Map(e);for(let e of n){let t=r.getItemValue(e);t!=null&&i.set(t,e)}let a=new Set(t);for(let e of i.keys())a.has(e)||i.delete(e);return i}function Ed({values:e,collection:t,selectedItemMap:n}){let r=wd({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:Td({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function Dd({selectedItems:e,collection:t}){return Td({selectedItemMap:new Map,values:e.map(e=>t.getItemValue(e)).filter(Boolean),selectedItems:e,collection:t})}var Od=class e extends Set{constructor(t=[]){super(t),V(this,`selectionMode`,`single`),V(this,`deselectable`,!0),V(this,`copy`,()=>{let t=new e([...this]);return this.sync(t)}),V(this,`sync`,e=>(e.selectionMode=this.selectionMode,e.deselectable=this.deselectable,e)),V(this,`isEmpty`,()=>this.size===0),V(this,`isSelected`,e=>this.selectionMode===`none`||e==null?!1:this.has(e)),V(this,`canSelect`,(e,t)=>this.selectionMode!==`none`||!e.getItemDisabled(e.find(t))),V(this,`firstSelectedValue`,e=>{let t=null;for(let n of this)(!t||e.compareValue(n,t)<0)&&(t=n);return t}),V(this,`lastSelectedValue`,e=>{let t=null;for(let n of this)(!t||e.compareValue(n,t)>0)&&(t=n);return t}),V(this,`extendSelection`,(e,t,n)=>{if(this.selectionMode===`none`)return this;if(this.selectionMode===`single`)return this.replaceSelection(e,n);let r=this.copy(),i=Array.from(this).pop();for(let a of e.getValueRange(t,i??n))r.delete(a);for(let i of e.getValueRange(n,t))this.canSelect(e,i)&&r.add(i);return r}),V(this,`toggleSelection`,(e,t)=>{if(this.selectionMode===`none`)return this;if(this.selectionMode===`single`&&!this.isSelected(t))return this.replaceSelection(e,t);let n=this.copy();return n.has(t)?n.delete(t):n.canSelect(e,t)&&n.add(t),n}),V(this,`replaceSelection`,(t,n)=>{if(this.selectionMode===`none`||n==null||!this.canSelect(t,n))return this;let r=new e([n]);return this.sync(r)}),V(this,`setSelection`,t=>{if(this.selectionMode===`none`)return this;let n=new e;for(let e of t)if(e!=null&&(n.add(e),this.selectionMode===`single`))break;return this.sync(n)}),V(this,`clearSelection`,()=>{let e=this.copy();return e.deselectable&&e.size>0&&e.clear(),e}),V(this,`select`,(e,t,n)=>this.selectionMode===`none`?this:this.selectionMode===`single`?this.isSelected(t)&&this.deselectable?this.toggleSelection(e,t):this.replaceSelection(e,t):this.selectionMode===`multiple`||n?this.toggleSelection(e,t):this.replaceSelection(e,t)),V(this,`deselect`,e=>{let t=this.copy();return t.delete(e),t}),V(this,`isEqual`,e=>Mn(Array.from(this),Array.from(e)))}},kd=hd.extendWith(`empty`),Ad=z(`date-input`).parts(`root`,`label`,`control`,`segmentGroup`,`segment`,`hiddenInput`);Ad.build();var jd=z(`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`);jd.build();var Md=jd.extendWith(`view`,`valueText`),Nd=z(`dialog`).parts(`trigger`,`backdrop`,`positioner`,`content`,`title`,`description`,`closeTrigger`),Pd=Nd.build(),Fd=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,Id=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,Ld=e=>e.ids?.content??`dialog:${e.id}:content`,Rd=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`:Ln(n)?n(t):n},zd=e=>e.ids?.title??`dialog:${e.id}:title`,Bd=e=>e.ids?.description??`dialog:${e.id}:description`,Vd=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,Hd=e=>e.getById(Ld(e)),Ud=e=>e.getById(Fd(e)),Wd=e=>e.getById(Id(e)),Gd=e=>e.getById(Rd(e)),Kd=e=>e.getById(zd(e)),qd=e=>e.getById(Bd(e)),Jd=e=>e.getById(Vd(e)),Yd=e=>La(e.getRootNode(),`[data-scope="dialog"][data-part="trigger"]${Yr(e.id)}`),Xd=(e,t)=>t==null?Gd(e)??Yd(e)[0]:e.getById(Rd(e,t));function Zd(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`aria-label`),c=n.matches(`open`),l=i.get(`triggerValue`);return{open:c,setOpen(e){n.matches(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},triggerValue:l,setTriggerValue(e){r({type:`TRIGGER_VALUE.SET`,value:e})},getTriggerProps(e={}){let{value:n}=e,i=n!=null&&l===n;return t.button({...Pd.trigger.attrs,dir:a(`dir`),id:Rd(o,n),"data-ownedby":o.id,"data-value":n,"aria-haspopup":`dialog`,type:`button`,"aria-expanded":n==null?c:c&&i,"data-state":c?`open`:`closed`,"aria-controls":Ld(o),"data-current":I(i),onClick(e){e.defaultPrevented||r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})}})},getBackdropProps(){return t.element({...Pd.backdrop.attrs,dir:a(`dir`),hidden:!c,id:Id(o),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...Pd.positioner.attrs,dir:a(`dir`),id:Fd(o),style:Xn({pointerEvents:!c||!a(`modal`)?`none`:void 0})})},getContentProps(){let e=i.get(`rendered`);return t.element({...Pd.content.attrs,dir:a(`dir`),role:a(`role`),hidden:!c,id:Ld(o),tabIndex:-1,"data-state":c?`open`:`closed`,"aria-modal":a(`modal`),"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:zd(o),"aria-describedby":e.description?Bd(o):void 0,style:Xn({pointerEvents:a(`modal`)?void 0:`auto`})})},getTitleProps(){return t.element({...Pd.title.attrs,dir:a(`dir`),id:zd(o)})},getDescriptionProps(){return t.element({...Pd.description.attrs,dir:a(`dir`),id:Bd(o)})},getCloseTriggerProps(){return t.button({...Pd.closeTrigger.attrs,dir:a(`dir`),id:Vd(o),type:`button`,onClick(e){e.defaultPrevented||(e.stopPropagation(),r({type:`CLOSE`}))}})}}}var Qd=Fr({props({props:e,scope:t}){let n=e.role===`alertdialog`,r=n?()=>Jd(t):void 0,i=typeof e.modal!=`boolean`||e.modal;return{role:`dialog`,modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:i&&!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:Xd(n,e)})}}))}},watch({track:e,action:t,prop:n}){e([()=>n(`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:n}){return Vs(()=>Hd(e),{type:`dialog`,defer:!0,pointerBlocking:n(`modal`),layerStyleTargets:[()=>Wd(e),()=>Ud(e)],exclude:[Gd(e),...Yd(e)].filter(Boolean),onInteractOutside(e){n(`onInteractOutside`)?.(e),n(`closeOnInteractOutside`)||e.preventDefault()},persistentElements:n(`persistentElements`),onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onRequestDismiss:n(`onRequestDismiss`),onEscapeKeyDown(e){n(`onEscapeKeyDown`)?.(e),n(`closeOnEscape`)||e.preventDefault()},onDismiss(){t({type:`CLOSE`,src:`interact-outside`})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return lc(e.getDoc())},trapFocus({scope:e,prop:t,context:n}){return t(`trapFocus`)?nc(()=>Hd(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:()=>Ea({root:Hd(e),getInitialEl:t(`initialFocusEl`)}),setReturnFocus:r=>{let i=t(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let t=Xd(e,a);if(t)return t}return Yd(e)[0]||r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?fs(()=>[Hd(e)],{defer:!0}):void 0}},actions:{setInitialFocus({prop:e,scope:t}){e(`trapFocus`)||ka(()=>{Ea({root:Hd(t),getInitialEl:e(`initialFocusEl`)})?.focus({preventScroll:!0})})},checkRenderedElements({context:e,scope:t}){ka(()=>{e.set(`rendered`,{title:!!Kd(t),description:!!qd(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:n}){t({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),$d=z(`editable`).parts(`root`,`area`,`label`,`preview`,`input`,`editTrigger`,`submitTrigger`,`cancelTrigger`,`control`);$d.build();var ef=z(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`),tf=ef.build(),nf=z(`fieldset`).parts(`root`,`errorText`,`helperText`,`legend`);nf.build();var rf=z(`file-upload`).parts(`root`,`dropzone`,`item`,`itemDeleteTrigger`,`itemGroup`,`itemName`,`itemPreview`,`itemPreviewImage`,`itemSizeText`,`label`,`trigger`,`clearTrigger`);rf.build();var af=z(`floating-panel`).parts(`trigger`,`positioner`,`content`,`header`,`body`,`title`,`resizeTrigger`,`dragTrigger`,`stageTrigger`,`closeTrigger`,`control`);af.build();var of=z(`hoverCard`).parts(`arrow`,`arrowTip`,`trigger`,`positioner`,`content`);of.build();var sf=z(`listbox`).parts(`label`,`input`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`content`,`root`,`valueText`),cf=sf.build(),lf=e=>new yd(e);lf.empty=()=>new yd({items:[]});var uf=e=>e.ids?.root??`listbox:${e.id}`,df=e=>e.ids?.content??`listbox:${e.id}:content`,ff=e=>e.ids?.label??`listbox:${e.id}:label`,pf=(e,t)=>e.ids?.item?.(t)??`listbox:${e.id}:item:${t}`,mf=(e,t)=>e.ids?.itemGroup?.(t)??`listbox:${e.id}:item-group:${t}`,hf=(e,t)=>e.ids?.itemGroupLabel?.(t)??`listbox:${e.id}:item-group-label:${t}`,gf=e=>e.getById(df(e)),_f=(e,t)=>e.getById(pf(e,t));function vf(e,t){let{context:n,prop:r,scope:i,computed:a,send:o,refs:s}=e,c=r(`disabled`),l=r(`collection`),u=Cd(l)?`grid`:`list`,d=n.get(`focused`),f=s.get(`focusVisible`)&&d,p=s.get(`inputState`),m=n.get(`value`),h=a(`selectedItems`),g=n.get(`highlightedValue`),_=n.get(`highlightedItem`),v=a(`isTypingAhead`),y=a(`isInteractive`),b=g?pf(i,g):void 0;function x(e){let t=l.getItemDisabled(e.item),r=l.getItemValue(e.item);er(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`);let i=g===r;return{value:r,disabled:!!(c||t),focused:i&&d,focusVisible:i&&f,highlighted:i&&(p.focused?d:f),selected:n.get(`value`).includes(r)}}return{empty:m.length===0,highlightedItem:_,highlightedValue:g,clearHighlightedValue(){o({type:`HIGHLIGHTED_VALUE.SET`,value:null})},selectedItems:h,hasSelectedItems:a(`hasSelectedItems`),value:m,valueAsString:a(`valueAsString`),collection:l,disabled:!!c,selectValue(e){o({type:`ITEM.SELECT`,value:e})},setValue(e){o({type:`VALUE.SET`,value:e})},selectAll(){if(!a(`multiple`))throw Error(`[zag-js] Cannot select all items in a single-select listbox`);o({type:`VALUE.SET`,value:l.getValues()})},highlightValue(e){o({type:`HIGHLIGHTED_VALUE.SET`,value:e})},highlightFirst(){o({type:`HIGHLIGHT.FIRST`})},highlightLast(){o({type:`HIGHLIGHT.LAST`})},highlightNext(){o({type:`HIGHLIGHT.NEXT`})},highlightPrevious(){o({type:`HIGHLIGHT.PREV`})},clearValue(e){o(e?{type:`ITEM.CLEAR`,value:e}:{type:`VALUE.CLEAR`})},getItemState:x,getRootProps(){return t.element({...cf.root.attrs,dir:r(`dir`),id:uf(i),"data-orientation":r(`orientation`),"data-disabled":I(c)})},getInputProps(e={}){let n=e.keyboardPriority??`caret`;return t.input({...cf.input.attrs,dir:r(`dir`),disabled:c,"data-disabled":I(c),autoComplete:`off`,autoCorrect:`off`,"aria-haspopup":`listbox`,"aria-controls":df(i),"aria-autocomplete":`list`,"aria-activedescendant":b,spellCheck:!1,enterKeyHint:`go`,onFocus(){queueMicrotask(()=>{o({type:`INPUT.FOCUS`,autoHighlight:!!e?.autoHighlight})})},onBlur(){o({type:`CONTENT.BLUR`,src:`input`})},onInput(t){e?.autoHighlight&&(t.currentTarget.value.trim()||queueMicrotask(()=>{o({type:`HIGHLIGHTED_VALUE.SET`,value:null})}))},onKeyDown(e){if(e.defaultPrevented||Yi(e))return;let t=na(e),r=()=>{e.preventDefault();let n=new(i.getWin()).KeyboardEvent(t.type,t);gf(i)?.dispatchEvent(n)};switch(t.key){case`ArrowLeft`:case`ArrowRight`:if(!Cd(l)||e.ctrlKey||n!==`navigate`)return;r();break;case`Home`:case`End`:if(n!==`navigate`||g==null&&e.shiftKey)return;r();break;case`ArrowDown`:case`ArrowUp`:r();break;case`Enter`:g!=null&&(e.preventDefault(),o({type:`ITEM.CLICK`,value:g}))}}})},getLabelProps(){return t.element({dir:r(`dir`),id:ff(i),...cf.label.attrs,"data-disabled":I(c)})},getValueTextProps(){return t.element({...cf.valueText.attrs,dir:r(`dir`),"data-disabled":I(c)})},getItemProps(e){let n=x(e);return t.element({id:pf(i,n.value),role:`option`,...cf.item.attrs,dir:r(`dir`),"data-value":n.value,"aria-selected":n.selected,"data-selected":I(n.selected),"data-layout":u,"data-state":n.selected?`checked`:`unchecked`,"data-orientation":r(`orientation`),"data-highlighted":I(n.highlighted),"data-disabled":I(n.disabled),"aria-disabled":Gr(n.disabled),onPointerMove(t){e.highlightOnHover&&(n.disabled||t.pointerType!==`mouse`||Nc()===`pointer`&&(n.highlighted||o({type:`ITEM.POINTER_MOVE`,value:n.value})))},onMouseDown(e){e.preventDefault(),gf(i)?.focus()},onClick(e){e.defaultPrevented||Ji(e)||qi(e)||Qi(e)||n.disabled||o({type:`ITEM.CLICK`,value:n.value,shiftKey:e.shiftKey,anchorValue:g,metaKey:Xi(e)})}})},getItemTextProps(e){let n=x(e);return t.element({...cf.itemText.attrs,"data-state":n.selected?`checked`:`unchecked`,"data-disabled":I(n.disabled),"data-highlighted":I(n.highlighted)})},getItemIndicatorProps(e){let n=x(e);return t.element({...cf.itemIndicator.attrs,"aria-hidden":!0,"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...cf.itemGroupLabel.attrs,id:hf(i,n),dir:r(`dir`),role:`presentation`})},getItemGroupProps(e){let{id:n}=e;return t.element({...cf.itemGroup.attrs,"data-disabled":I(c),"data-orientation":r(`orientation`),"data-empty":I(l.size===0),id:mf(i,n),"aria-labelledby":hf(i,n),role:`group`,dir:r(`dir`)})},getContentProps(){return t.element({dir:r(`dir`),id:df(i),role:`listbox`,...cf.content.attrs,"data-activedescendant":b,"aria-activedescendant":b,"data-orientation":r(`orientation`),"aria-multiselectable":a(`multiple`)?!0:void 0,"aria-labelledby":ff(i),tabIndex:0,"data-layout":u,"data-empty":I(l.size===0),style:{"--column-count":Cd(l)?l.columnCount:1},onFocus(){o({type:`CONTENT.FOCUS`})},onBlur(){o({type:`CONTENT.BLUR`})},onKeyDown(e){if(!y)return;let t=Ki(e);if(!di(e.currentTarget,Ki(e)))return;let n=e.shiftKey,i={ArrowUp(e){let t=null;Cd(l)&&g?t=l.getPreviousRowValue(g):g&&(t=l.getPreviousValue(g)),!t&&(r(`loopFocus`)||!g)&&(t=l.lastValue),t&&(e.preventDefault(),o({type:`NAVIGATE`,value:t,shiftKey:n,anchorValue:g}))},ArrowDown(e){let t=null;Cd(l)&&g?t=l.getNextRowValue(g):g&&(t=l.getNextValue(g)),!t&&(r(`loopFocus`)||!g)&&(t=l.firstValue),t&&(e.preventDefault(),o({type:`NAVIGATE`,value:t,shiftKey:n,anchorValue:g}))},ArrowLeft(){if(!Cd(l)&&r(`orientation`)===`vertical`)return;let t=g?l.getPreviousValue(g):null;!t&&r(`loopFocus`)&&(t=l.lastValue),t&&(e.preventDefault(),o({type:`NAVIGATE`,value:t,shiftKey:n,anchorValue:g}))},ArrowRight(){if(!Cd(l)&&r(`orientation`)===`vertical`)return;let t=g?l.getNextValue(g):null;!t&&r(`loopFocus`)&&(t=l.firstValue),t&&(e.preventDefault(),o({type:`NAVIGATE`,value:t,shiftKey:n,anchorValue:g}))},Home(e){if(ui(t))return;e.preventDefault();let r=l.firstValue;o({type:`NAVIGATE`,value:r,shiftKey:n,anchorValue:g})},End(e){if(ui(t))return;e.preventDefault();let r=l.lastValue;o({type:`NAVIGATE`,value:r,shiftKey:n,anchorValue:g})},Enter(){o({type:`ITEM.CLICK`,value:g})},a(e){Xi(e)&&a(`multiple`)&&!r(`disallowSelectAll`)&&(e.preventDefault(),o({type:`VALUE.SET`,value:l.getValues()}))},Space(e){v&&r(`typeahead`)?o({type:`CONTENT.TYPEAHEAD`,key:e.key}):i.Enter?.(e)},Escape(e){r(`deselectable`)&&m.length>0&&(e.preventDefault(),e.stopPropagation(),o({type:`VALUE.CLEAR`}))}},s=i[ta(e)];s?s(e):ui(t)||Za.isValidEvent(e)&&r(`typeahead`)&&(o({type:`CONTENT.TYPEAHEAD`,key:e.key}),e.preventDefault())}})}}}var{guards:yf,createMachine:bf}=Ir(),{or:xf}=yf,Sf=bf({props({props:e}){return{loopFocus:!1,composite:!0,defaultValue:[],multiple:!1,typeahead:!0,collection:lf.empty(),orientation:`vertical`,selectionMode:`single`,...e}},context({prop:e,bindable:t,getContext:n}){let r=e(`value`)??e(`defaultValue`)??[],i=e(`collection`).findMany(r);return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:Mn,onChange(t){let r=n(),i=e(`collection`),a=Ed({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:Ed({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});return r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),sync:!0,onChange(t){e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:e(`collection`).find(t),highlightedIndex:e(`collection`).indexOf(t)})}})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:Dd({selectedItems:i,collection:e(`collection`)})})),focused:t(()=>({sync:!0,defaultValue:!1}))}},refs(){return{typeahead:{...Za.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})=>{let n=new Od(e.get(`value`));return n.selectionMode=t(`selectionMode`),n.deselectable=!!t(`deselectable`),n},multiple:({prop:e})=>e(`selectionMode`)===`multiple`||e(`selectionMode`)===`extended`,selectedItems:({context:e,prop:t})=>wd({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:n,action:r}){n([()=>e.get(`value`).toString()],()=>{r([`syncSelectedItems`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`])}),n([()=>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:xf(`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})=>Ic({root:e.getRootNode?.(),onChange(e){t.set(`focusVisible`,e.isFocusVisible)}}),scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=r=>{let i=e.get(`highlightedValue`);if(i==null||Nc()===`pointer`)return;let a=gf(n),o=t(`scrollToIndexFn`);if(o){let e=t(`collection`).indexOf(i);o?.({index:e,immediate:r,getElement(){return _f(n,i)}})}else Ha(_f(n,i),{rootEl:a,block:`nearest`})};return ka(()=>{Pc(`virtual`),r(!0)}),Ma(()=>gf(n),{defer:!0,attributes:[`data-activedescendant`],callback(){r(!1)}})}},actions:{selectHighlightedItem({context:e,prop:t,event:n,computed:r}){let i=n.value??e.get(`highlightedValue`),a=t(`collection`);if(i==null||!a.has(i))return;let o=r(`selection`);if(n.shiftKey&&r(`multiple`)&&n.anchorValue){let r=o.extendSelection(a,n.anchorValue,i);wf(o,r,t(`onSelect`)),e.set(`value`,Array.from(r))}else{let r=o.select(a,i,n.metaKey);wf(o,r,t(`onSelect`)),e.set(`value`,Array.from(r))}},selectWithKeyboard({context:e,prop:t,event:n,computed:r}){let i=r(`selection`),a=t(`collection`);if(n.shiftKey&&r(`multiple`)&&n.anchorValue){let r=i.extendSelection(a,n.anchorValue,n.value);wf(i,r,t(`onSelect`)),e.set(`value`,Array.from(r))}else if(t(`selectOnHighlight`)){let r=i.replaceSelection(a,n.value);wf(i,r,t(`onSelect`)),e.set(`value`,Array.from(r))}},highlightItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`highlightedValue`)});i!=null&&e.set(`highlightedValue`,i)},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}){let n=t(`collection`),r=e.get(`highlightedValue`),i=null;Cd(n)&&r?i=n.getNextRowValue(r):r&&(i=n.getNextValue(r)),!i&&(t(`loopFocus`)||!r)&&(i=n.firstValue),i&&e.set(`highlightedValue`,i)},highlightPreviousValue({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=null;Cd(n)&&r?i=n.getPreviousRowValue(r):r&&(i=n.getPreviousValue(r)),!i&&(t(`loopFocus`)||!r)&&(i=n.lastValue),i&&e.set(`highlightedValue`,i)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},selectItem({context:e,prop:t,event:n,computed:r}){let i=t(`collection`),a=r(`selection`),o=a.select(i,n.value);wf(a,o,t(`onSelect`)),e.set(`value`,Array.from(o))},clearItem({context:e,event:t,computed:n}){let r=n(`selection`).deselect(t.value);e.set(`value`,Array.from(r))},setSelectedItems({context:e,event:t}){e.set(`value`,t.value)},clearSelectedItems({context:e}){e.set(`value`,[])},syncSelectedItems({context:e,prop:t}){let n=Ed({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,n.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=r?n.find(r):null;e.set(`highlightedItem`,i)},syncHighlightedValue({context:e,prop:t,refs:n}){let r=t(`collection`),i=e.get(`highlightedValue`),{autoHighlight:a}=n.get(`inputState`);a?queueMicrotask(()=>{e.set(`highlightedValue`,t(`collection`).firstValue??null)}):i!=null&&!r.has(i)&&queueMicrotask(()=>{e.set(`highlightedValue`,null)})},setFocused({context:e}){e.set(`focused`,!0)},setDefaultHighlightedValue({context:e,prop:t}){let n=t(`collection`).firstValue;n!=null&&e.set(`highlightedValue`,n)},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})}}}}),Cf=(e,t)=>{let n=new Set(e);for(let e of t)n.delete(e);return n};function wf(e,t,n){let r=Cf(t,e);for(let e of r)n?.({value:e})}var Tf=sf.extendWith(`empty`),Ef=z(`marquee`).parts(`root`,`viewport`,`content`,`edge`,`item`);Ef.build();var Df=z(`menu`).parts(`arrow`,`arrowTip`,`content`,`contextTrigger`,`indicator`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`positioner`,`separator`,`trigger`,`triggerItem`);Df.build();var Of=z(`numberInput`).parts(`root`,`label`,`input`,`control`,`valueText`,`incrementTrigger`,`decrementTrigger`,`scrubber`);Of.build();var kf=z(`pinInput`).parts(`root`,`label`,`input`,`control`);kf.build();var Af=z(`popover`).parts(`arrow`,`arrowTip`,`anchor`,`trigger`,`indicator`,`positioner`,`content`,`title`,`description`,`closeTrigger`);Af.build();var jf=z(`progress`).parts(`root`,`label`,`track`,`range`,`valueText`,`view`,`circle`,`circleTrack`,`circleRange`);jf.build();var Mf=z(`qr-code`).parts(`root`,`frame`,`pattern`,`overlay`,`downloadTrigger`);Mf.build();var Nf=z(`radio-group`).parts(`root`,`label`,`item`,`itemText`,`itemControl`,`indicator`);Nf.build();var Pf=z(`rating-group`).parts(`root`,`label`,`item`,`control`);Pf.build();var Ff=z(`scroll-area`).parts(`root`,`viewport`,`content`,`scrollbar`,`thumb`,`corner`);Ff.build();var If=Nf.rename(`segment-group`);If.build();var Lf=z(`select`).parts(`label`,`positioner`,`trigger`,`indicator`,`clearTrigger`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`list`,`content`,`root`,`control`,`valueText`),Rf=Lf.build(),zf=e=>new yd(e);zf.empty=()=>new yd({items:[]});var Bf=e=>e.ids?.root??`select:${e.id}`,Vf=e=>e.ids?.content??`select:${e.id}:content`,Hf=e=>e.ids?.trigger??`select:${e.id}:trigger`,Uf=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,Wf=e=>e.ids?.label??`select:${e.id}:label`,Gf=e=>e.ids?.control??`select:${e.id}:control`,Kf=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,qf=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,Jf=e=>e.ids?.positioner??`select:${e.id}:positioner`,Yf=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,Xf=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,H=e=>e.getById(qf(e)),Zf=e=>e.getById(Vf(e)),Qf=e=>e.getById(Hf(e)),$f=e=>e.getById(Uf(e)),ep=e=>e.getById(Jf(e)),tp=(e,t)=>t==null?null:e.getById(Kf(e,t)),np={clearTriggerLabel:`Clear value`};function rp(e,t){let{context:n,prop:r,scope:i,state:a,computed:o,send:s}=e,c=Zn(np,r(`translations`)),l=r(`disabled`)||n.get(`fieldsetDisabled`),u=!!r(`invalid`),d=!!r(`required`),f=!!r(`readOnly`),p=r(`composite`),m=r(`collection`),h=a.hasTag(`open`),g=a.matches(`focused`),_=n.get(`highlightedValue`),v=n.get(`highlightedItem`),y=o(`selectedItems`),b=n.get(`currentPlacement`),x=b?Ju(b):void 0,S=o(`isTypingAhead`),C=o(`isInteractive`),w=_?Kf(i,_):void 0;function T(e){let t=m.getItemDisabled(e.item),r=m.getItemValue(e.item);return er(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(l||t),highlighted:_===r,selected:n.get(`value`).includes(r)}}let E=pd({...r(`positioning`),placement:b});return{open:h,focused:g,empty:n.get(`value`).length===0,highlightedItem:v,highlightedValue:_,selectedItems:y,hasSelectedItems:o(`hasSelectedItems`),value:n.get(`value`),valueAsString:o(`valueAsString`),collection:m,multiple:!!r(`multiple`),disabled:!!l,reposition(e={}){s({type:`POSITIONING.SET`,options:e})},focus(){Qf(i)?.focus({preventScroll:!0})},setOpen(e){a.hasTag(`open`)!==e&&s({type:e?`OPEN`:`CLOSE`})},selectValue(e){s({type:`ITEM.SELECT`,value:e})},setValue(e){s({type:`VALUE.SET`,value:e})},selectAll(){s({type:`VALUE.SET`,value:m.getValues()})},setHighlightValue(e){s({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){s({type:`HIGHLIGHTED_VALUE.CLEAR`})},clearValue(e){s(e?{type:`ITEM.CLEAR`,value:e}:{type:`VALUE.CLEAR`})},getItemState:T,getRootProps(){return t.element({...Rf.root.attrs,dir:r(`dir`),id:Bf(i),"data-invalid":I(u),"data-readonly":I(f)})},getLabelProps(){return t.label({dir:r(`dir`),id:Wf(i),...Rf.label.attrs,"data-disabled":I(l),"data-invalid":I(u),"data-readonly":I(f),"data-required":I(d),htmlFor:qf(i),onClick(e){e.defaultPrevented||l||Qf(i)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...Rf.control.attrs,dir:r(`dir`),id:Gf(i),"data-state":h?`open`:`closed`,"data-focus":I(g),"data-disabled":I(l),"data-invalid":I(u)})},getValueTextProps(){return t.element({...Rf.valueText.attrs,dir:r(`dir`),"data-disabled":I(l),"data-invalid":I(u),"data-focus":I(g)})},getTriggerProps(){return t.button({id:Hf(i),disabled:l,dir:r(`dir`),type:`button`,role:`combobox`,"aria-controls":Vf(i),"aria-expanded":h,"aria-haspopup":`listbox`,"data-state":h?`open`:`closed`,"aria-invalid":u,"aria-required":d,"aria-labelledby":Wf(i),...Rf.trigger.attrs,"data-disabled":I(l),"data-invalid":I(u),"data-readonly":I(f),"data-placement":b,"data-side":x,"data-placeholder-shown":I(!o(`hasSelectedItems`)),onClick(e){C&&(e.defaultPrevented||s({type:`TRIGGER.CLICK`}))},onFocus(){s({type:`TRIGGER.FOCUS`})},onBlur(){s({type:`TRIGGER.BLUR`})},onKeyDown(e){if(e.defaultPrevented||!C)return;let t={ArrowUp(){s({type:`TRIGGER.ARROW_UP`})},ArrowDown(e){s({type:e.altKey?`OPEN`:`TRIGGER.ARROW_DOWN`})},ArrowLeft(){s({type:`TRIGGER.ARROW_LEFT`})},ArrowRight(){s({type:`TRIGGER.ARROW_RIGHT`})},Home(){s({type:`TRIGGER.HOME`})},End(){s({type:`TRIGGER.END`})},Enter(){s({type:`TRIGGER.ENTER`})},Space(e){s(S?{type:`TRIGGER.TYPEAHEAD`,key:e.key}:{type:`TRIGGER.ENTER`})}}[ta(e,{dir:r(`dir`),orientation:`vertical`})];t?(t(e),e.preventDefault()):Za.isValidEvent(e)&&(s({type:`TRIGGER.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getIndicatorProps(){return t.element({...Rf.indicator.attrs,dir:r(`dir`),"aria-hidden":!0,"data-state":h?`open`:`closed`,"data-disabled":I(l),"data-invalid":I(u),"data-readonly":I(f)})},getItemProps(e){let n=T(e);return t.element({id:Kf(i,n.value),role:`option`,...Rf.item.attrs,dir:r(`dir`),"data-value":n.value,"aria-selected":n.selected,"data-state":n.selected?`checked`:`unchecked`,"data-highlighted":I(n.highlighted),"data-disabled":I(n.disabled),"aria-disabled":Gr(n.disabled),onPointerMove(e){n.disabled||e.pointerType!==`mouse`||Nc()===`pointer`&&n.value!==_&&s({type:`ITEM.POINTER_MOVE`,value:n.value})},onClick(e){e.defaultPrevented||n.disabled||s({type:`ITEM.CLICK`,src:`pointerup`,value:n.value})},onPointerLeave(t){n.disabled||e.persistFocus||t.pointerType===`mouse`&&Nc()===`pointer`&&s({type:`ITEM.POINTER_LEAVE`})}})},getItemTextProps(e){let n=T(e);return t.element({...Rf.itemText.attrs,"data-state":n.selected?`checked`:`unchecked`,"data-disabled":I(n.disabled),"data-highlighted":I(n.highlighted)})},getItemIndicatorProps(e){let n=T(e);return t.element({"aria-hidden":!0,...Rf.itemIndicator.attrs,"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...Rf.itemGroupLabel.attrs,id:Xf(i,n),dir:r(`dir`),role:`presentation`})},getItemGroupProps(e){let{id:n}=e;return t.element({...Rf.itemGroup.attrs,"data-disabled":I(l),id:Yf(i,n),"aria-labelledby":Xf(i,n),role:`group`,dir:r(`dir`)})},getClearTriggerProps(){return t.button({...Rf.clearTrigger.attrs,id:Uf(i),type:`button`,"aria-label":c.clearTriggerLabel,"data-invalid":I(u),disabled:l,hidden:!o(`hasSelectedItems`),dir:r(`dir`),onClick(e){e.defaultPrevented||s({type:`CLEAR.CLICK`})}})},getHiddenSelectProps(){let e=n.get(`value`),a=r(`multiple`)?e:e?.[0],o=e=>{ca(na(e))||s({type:`VALUE.SET`,value:ip(e.currentTarget)})};return t.select({name:r(`name`),form:r(`form`),disabled:l,multiple:r(`multiple`),required:r(`required`),"aria-hidden":!0,id:qf(i),defaultValue:a,style:$a,tabIndex:-1,autoComplete:r(`autoComplete`),onChange:o,onInput:o,onFocus(){Qf(i)?.focus({preventScroll:!0})},"aria-labelledby":Wf(i)})},getPositionerProps(){return t.element({...Rf.positioner.attrs,dir:r(`dir`),id:Jf(i),style:E.floating})},getContentProps(){return t.element({hidden:!h,dir:r(`dir`),id:Vf(i),role:p?`listbox`:`dialog`,...Rf.content.attrs,"data-state":h?`open`:`closed`,"data-placement":b,"data-side":x,"data-activedescendant":w,"aria-activedescendant":p?w:void 0,"aria-multiselectable":r(`multiple`)&&p?!0:void 0,"aria-labelledby":Wf(i),tabIndex:0,onKeyDown(e){if(!C||!di(e.currentTarget,Ki(e)))return;if(e.key===`Tab`&&!Da(e)){e.preventDefault();return}let t={ArrowUp(){s({type:`CONTENT.ARROW_UP`})},ArrowDown(){s({type:`CONTENT.ARROW_DOWN`})},Home(){s({type:`CONTENT.HOME`})},End(){s({type:`CONTENT.END`})},Enter(){s({type:`ITEM.CLICK`,src:`keydown.enter`})},Space(e){S?s({type:`CONTENT.TYPEAHEAD`,key:e.key}):t.Enter?.(e)}},n=t[ta(e)];n?(n(e),e.preventDefault()):ui(Ki(e))||Za.isValidEvent(e)&&(s({type:`CONTENT.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getListProps(){return t.element({...Rf.list.attrs,tabIndex:0,role:p?void 0:`listbox`,"aria-labelledby":Hf(i),"aria-activedescendant":p?void 0:w,"aria-multiselectable":!p&&r(`multiple`)?!0:void 0})}}}var ip=e=>e.multiple?Array.from(e.selectedOptions,e=>e.value):e.value?[e.value]:[],{and:ap,not:op,or:sp}=Pr(),cp=Fr({props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??zf.empty(),positioning:{placement:`bottom-start`,gutter:8,...e.positioning}}},context({prop:e,bindable:t,getContext:n}){let r=e(`value`)??e(`defaultValue`)??[],i=e(`collection`).findMany(r);return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:Mn,onChange(t){let r=n(),i=e(`collection`),a=Ed({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:Ed({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});return r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:e(`collection`).find(t),highlightedIndex:e(`collection`).indexOf(t)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:Dd({selectedItems:i,collection:e(`collection`)})}))}},refs(){return{typeahead:{...Za.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})=>wd({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:n,action:r}){n([()=>e.get(`value`).toString()],()=>{r([`syncSelectedItems`,`syncSelectElement`,`dispatchChangeEvent`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`])}),n([()=>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:sp(`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:ap(op(`multiple`),`hasSelectedItems`),actions:[`selectPreviousItem`]},{guard:op(`multiple`),actions:[`selectLastItem`]}],"TRIGGER.ARROW_RIGHT":[{guard:ap(op(`multiple`),`hasSelectedItems`),actions:[`selectNextItem`]},{guard:op(`multiple`),actions:[`selectFirstItem`]}],"TRIGGER.HOME":{guard:op(`multiple`),actions:[`selectFirstItem`]},"TRIGGER.END":{guard:op(`multiple`),actions:[`selectLastItem`]},"TRIGGER.TYPEAHEAD":{guard:op(`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:ap(`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:ap(`hasHighlightedItem`,`loop`,`isLastItemHighlighted`),actions:[`highlightFirstItem`]},{guard:`hasHighlightedItem`,actions:[`highlightNextItem`]},{actions:[`highlightFirstItem`]}],"CONTENT.ARROW_UP":[{guard:ap(`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})=>lp(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 Ic({root:e.getRootNode?.()})},trackFormControlState({context:e,scope:t}){return oa(H(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){let t=e.initial(`value`);e.set(`value`,t)}})},trackDismissableElement({scope:e,send:t,prop:n}){let r=()=>Zf(e),i=!0;return Vs(r,{type:`listbox`,defer:!0,exclude:[Qf(e),$f(e)],onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onInteractOutside(e){n(`onInteractOutside`)?.(e),i=!(e.detail.focusable||e.detail.contextmenu)},onDismiss(){t({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},computePlacement({context:e,prop:t,scope:n}){let r=t(`positioning`);return e.set(`currentPlacement`,r.placement),dd(()=>Qf(n),()=>ep(n),{defer:!0,...r,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=r=>{let i=e.get(`highlightedValue`);if(i==null||Nc()===`pointer`)return;let a=Zf(n),o=t(`scrollToIndexFn`);if(o){let e=t(`collection`).indexOf(i);o?.({index:e,immediate:r,getElement:()=>tp(n,i)})}else Ha(tp(n,i),{rootEl:a,block:`nearest`})};return ka(()=>{Pc(`virtual`),r(!0)}),Ma(()=>Zf(n),{defer:!0,attributes:[`data-activedescendant`],callback(){r(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:r}){dd(Qf(n),()=>ep(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getPreviousValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightNextItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getNextValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;e.set(`highlightedValue`,n)},highlightLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;e.set(`highlightedValue`,n)},setInitialFocus({scope:e}){ka(()=>{Ea({root:Zf(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){lp(e)&&ka(()=>{Qf(t)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){let r=n.value??e.get(`highlightedValue`);r!=null&&t(`collection`).has(r)&&(t(`onSelect`)?.({value:r}),r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(r)?null:r,e.set(`value`,e=>r==null?[]:t(`multiple`)?kn(e,r):[r]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.firstValue;e.set(`highlightedValue`,i)},highlightComputedLastItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue;e.set(`highlightedValue`,i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n(`hasSelectedItems`))return;let 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:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`highlightedValue`)});i!=null&&e.set(`highlightedValue`,i)},setHighlightedItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},selectItem({context:e,prop:t,event:n}){t(`onSelect`)?.({value:n.value});let r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(n.value)?null:n.value;e.set(`value`,e=>r==null?[]:t(`multiple`)?kn(e,r):[r])},clearItem({context:e,event:t}){e.set(`value`,e=>e.filter(e=>e!==t.value))},setSelectedItems({context:e,event:t}){e.set(`value`,t.value)},clearSelectedItems({context:e}){e.set(`value`,[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getPreviousValue(n);r&&e.set(`value`,[r])},selectNextItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getNextValue(n);r&&e.set(`value`,[r])},selectFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;n&&e.set(`value`,[n])},selectLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;n&&e.set(`value`,[n])},selectMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`value`)[0]});i!=null&&e.set(`value`,[i])},scrollContentToTop({prop:e,scope:t}){if(e(`scrollToIndexFn`)){let n=e(`collection`).firstValue;e(`scrollToIndexFn`)?.({index:0,immediate:!0,getElement:()=>tp(t,n)})}else Zf(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:n}){let r=H(n);if(r){if(e.get(`value`).length===0&&!t(`multiple`))r.selectedIndex=-1;else for(let t of r.options)t.selected=e.get(`value`).includes(t.value)}},syncCollection({context:e,prop:t}){let n=t(`collection`),r=n.find(e.get(`highlightedValue`));r&&e.set(`highlightedItem`,r);let i=Ed({values:e.get(`value`),collection:n,selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,i.nextSelectedItemMap)},syncSelectedItems({context:e,prop:t}){let n=Ed({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,n.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=r?n.find(r):null;e.set(`highlightedItem`,i)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=H(e);if(!t)return;let n=new(e.getWin()).Event(`change`,{bubbles:!0,composed:!0});t.dispatchEvent(la(n))})}}}});function lp(e){let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}var up=z(`slider`).parts(`root`,`label`,`thumb`,`valueText`,`track`,`range`,`control`,`markerGroup`,`marker`,`draggingIndicator`);up.build();var dp=z(`splitter`).parts(`root`,`panel`,`resizeTrigger`,`resizeTriggerIndicator`);dp.build();var fp=z(`switch`).parts(`root`,`label`,`control`,`thumb`);fp.build();var pp=z(`tagsInput`).parts(`root`,`label`,`control`,`input`,`clearTrigger`,`item`,`itemPreview`,`itemInput`,`itemText`,`itemDeleteTrigger`);pp.build();var mp=e=>{if(!e)return;let t=yi(e),n=mi(e),r=fi(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(e,`value`),o=a?.set?a:Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);o?.set&&Object.defineProperty(e,"value",{...o,set(e){o.set?.call(this,e),i()}});let s=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});s.observe(e);let c=new n.MutationObserver(()=>i());return c.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),s.disconnect(),c.disconnect()}},hp=z(`tooltip`).parts(`trigger`,`arrow`,`arrowTip`,`positioner`,`content`);hp.build();var gp=z(`tree-view`).parts(`branch`,`branchContent`,`branchControl`,`branchIndentGuide`,`branchIndicator`,`branchText`,`branchTrigger`,`item`,`itemIndicator`,`itemText`,`label`,`nodeCheckbox`,`nodeRenameInput`,`root`,`tree`);gp.build();var _p=typeof window<`u`?N.useLayoutEffect:N.useEffect,[vp,yp]=nr({name:`FieldsetContext`,hookName:`useFieldsetContext`,providerName:`<FieldsetProvider />`,strict:!1}),[bp,xp]=nr({name:`FieldContext`,hookName:`useFieldContext`,providerName:`<FieldProvider />`,strict:!1}),Sp=e=>e.children(xp()),Cp=(0,N.forwardRef)((e,t)=>{let n=xp(),r=F(n.getErrorTextProps(),e);return n?.invalid?(0,P.jsx)(R.span,{...r,ref:t}):null});Cp.displayName=`FieldErrorText`;var wp=(0,N.forwardRef)((e,t)=>{let n=F(xp()?.getHelperTextProps(),e);return(0,P.jsx)(R.span,{...n,ref:t})});wp.displayName=`FieldHelperText`;var Tp=(0,N.forwardRef)((e,t)=>{let n=F(xp()?.getInputProps(),e);return(0,P.jsx)(R.input,{...n,ref:t})});Tp.displayName=`FieldInput`;var Ep=e=>{let{value:t,children:n}=e,r=xp(),i=(0,N.useMemo)(()=>{if(!r)throw Error(`Field.Item must be used within Field.Root`);let e=`field::${r.ids.control}::item::${t}`,n=`${e}::label`,i=()=>({...r.getInputProps(),id:e});return{...r,ids:{...r.ids,control:e,label:n},getLabelProps:()=>({...r.getLabelProps(),id:n,htmlFor:e}),getInputProps:()=>({...i(),...tf.input.attrs}),getSelectProps:()=>({...i(),...tf.select.attrs}),getTextareaProps:()=>({...i(),...tf.textarea.attrs})}},[r,t]);return(0,P.jsx)(bp,{value:i,children:n})};Ep.displayName=`FieldItem`;var Dp=(0,N.forwardRef)((e,t)=>{let n=F(xp()?.getLabelProps(),e);return(0,P.jsx)(R.label,{...n,ref:t})});Dp.displayName=`FieldLabel`;var Op=(0,N.forwardRef)(({fallback:e,...t},n)=>{let r=xp();if(!r.required)return e;let i=F(r.getRequiredIndicatorProps(),t);return(0,P.jsx)(R.span,{...i,ref:n,children:t.children??`*`})});Op.displayName=`FieldRequiredIndicator`;var kp=(e={})=>{let t=yp(),n=ir(),{ids:r,target:i,disabled:a=!!t?.disabled,invalid:o=!1,readOnly:s=!1,required:c=!1}=e,[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(!1),p=(0,N.useId)(),m=e.id??p,h=(0,N.useRef)(null),g=r?.control??`field::${m}`,_=r?.errorText??`field::${m}::error-text`,v=r?.helperText??`field::${m}::helper-text`,y=r?.label??`field::${m}::label`;_p(()=>{let e=h.current;if(!e)return;let t=()=>{let e=n.getRootNode();u(!!e.getElementById(_)),f(!!e.getElementById(v))};t();let r=new(n.getWindow()).MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()},[n,_,v]);let b=(0,N.useMemo)(()=>()=>({...tf.root.attrs,id:g,ref:h,role:`group`,"data-disabled":I(a),"data-invalid":I(o),"data-readonly":I(s)}),[a,o,s,g]),x=i?`field::${m}::item::${i}`:void 0,S=(0,N.useMemo)(()=>()=>({...tf.label.attrs,id:y,"data-disabled":I(a),"data-invalid":I(o),"data-readonly":I(s),"data-required":I(c),htmlFor:x??m}),[a,o,s,c,m,y,x]),C=l&&o?_:void 0,w=(0,N.useMemo)(()=>()=>({"aria-describedby":d?v:void 0,"aria-errormessage":C,"aria-invalid":Gr(o),"data-invalid":I(o),"data-required":I(c),"data-readonly":I(s),id:m,required:c,disabled:a,readOnly:s}),[d,v,o,c,s,m,C,a]),T=(0,N.useMemo)(()=>()=>({...w(),...tf.input.attrs}),[w]),E=(0,N.useMemo)(()=>()=>({...w(),...tf.textarea.attrs}),[w]),ee=(0,N.useMemo)(()=>()=>({...w(),...tf.select.attrs}),[w]),D=(0,N.useMemo)(()=>()=>({id:v,...tf.helperText.attrs,"data-disabled":I(a)}),[a,v]),O=(0,N.useMemo)(()=>()=>({id:_,...tf.errorText.attrs,"aria-live":`polite`}),[_]),te=(0,N.useMemo)(()=>()=>({"aria-hidden":!0,...tf.requiredIndicator.attrs}),[]);return{ariaDescribedby:d?v:void 0,ids:{root:g,control:m,label:y,errorText:_,helperText:v},refs:{rootRef:h},disabled:a,invalid:o,readOnly:s,required:c,getLabelProps:S,getRootProps:b,getInputProps:T,getTextareaProps:E,getSelectProps:ee,getHelperTextProps:D,getErrorTextProps:O,getRequiredIndicatorProps:te}},Ap=mo(),jp=(0,N.forwardRef)((e,t)=>{let[n,r]=Ap(e,[`id`,`ids`,`disabled`,`invalid`,`readOnly`,`required`,`target`]),i=kp(n),a=F(i.getRootProps(),r),o=or(t,i.refs.rootRef);return(0,P.jsx)(bp,{value:i,children:(0,P.jsx)(R.div,{...a,ref:o})})});jp.displayName=`FieldRoot`;var Mp=mo(),Np=(0,N.forwardRef)((e,t)=>{let[{value:n},r]=Mp(e,[`value`]),i=F(n.getRootProps(),r);return(0,P.jsx)(bp,{value:n,children:(0,P.jsx)(R.div,{...i,ref:t})})});Np.displayName=`FieldRootProvider`;var Pp=(0,N.forwardRef)((e,t)=>{let n=F(xp()?.getSelectProps(),e);return(0,P.jsx)(R.select,{...n,ref:t})});Pp.displayName=`FieldSelect`;var Fp=(0,N.forwardRef)((e,t)=>{let{autoresize:n,...r}=e,i=(0,N.useRef)(null),a=F(xp()?.getTextareaProps(),{style:{resize:n?`none`:void 0}},r),o=or(t,i);return(0,N.useEffect)(()=>{if(n)return mp(i.current)},[n]),(0,P.jsx)(R.textarea,{...a,ref:o})});Fp.displayName=`FieldTextarea`;var Ip=po({Context:()=>Sp,ErrorText:()=>Cp,HelperText:()=>wp,Input:()=>Tp,Item:()=>Ep,Label:()=>Dp,RequiredIndicator:()=>Op,Root:()=>jp,RootProvider:()=>Np,Select:()=>Pp,Textarea:()=>Fp}),Lp=e=>new yd(e),[Rp,zp]=nr({name:`DialogContext`,hookName:`useDialogContext`,providerName:`<DialogProvider />`}),Bp=(0,N.forwardRef)((e,t)=>{let n=zp(),r=Ro({...Go(),present:n.open}),i=F(n.getBackdropProps(),r.getPresenceProps(),e),a=or(r.ref,t);return(0,P.jsx)(zo,{presence:r,children:(0,P.jsx)(R.div,{...i,ref:a})})});Bp.displayName=`DialogBackdrop`;var Vp=(0,N.forwardRef)((e,t)=>{let n=F(zp().getCloseTriggerProps(),e);return(0,P.jsx)(R.button,{...n,ref:t})});Vp.displayName=`DialogCloseTrigger`;var Hp=(0,N.forwardRef)((e,t)=>{let n=zp(),r=Vo(),i=F(n.getContentProps(),r.getPresenceProps(),e),a=or(r.ref,t);return(0,P.jsx)(zo,{presence:r,children:(0,P.jsx)(R.div,{...i,ref:a})})});Hp.displayName=`DialogContent`;var Up=e=>e.children(zp()),Wp=(0,N.forwardRef)((e,t)=>{let n=F(zp().getDescriptionProps(),e);return(0,P.jsx)(R.div,{...n,ref:t})});Wp.displayName=`DialogDescription`;var Gp=(0,N.forwardRef)((e,t)=>{let n=F(zp().getPositionerProps(),e);return Vo().unmounted?null:(0,P.jsx)(R.div,{...n,ref:t})});Gp.displayName=`DialogPositioner`;var Kp=e=>{let t=(0,N.useId)(),{getRootNode:n}=ir(),{dir:r}=uo();return Zd(ko(Qd,{id:t,getRootNode:n,dir:r,...e}),Po)},qp=e=>{let[t,{children:n,...r}]=ho(e),[i]=Ko(t),a=Kp(r),o=Ro(F({present:a.open},t));return(0,P.jsx)(Rp,{value:a,children:(0,P.jsx)(Wo,{value:i,children:(0,P.jsx)(Bo,{value:o,children:n})})})},Jp=e=>{let[t,{value:n,children:r}]=ho(e),[i]=Ko(t),a=Ro(F({present:n.open},t));return(0,P.jsx)(Rp,{value:n,children:(0,P.jsx)(Wo,{value:i,children:(0,P.jsx)(Bo,{value:a,children:r})})})},Yp=(0,N.forwardRef)((e,t)=>{let n=F(zp().getTitleProps(),e);return(0,P.jsx)(R.h2,{...n,ref:t})});Yp.displayName=`DialogTitle`;var Xp=mo(),Zp=(0,N.forwardRef)((e,t)=>{let[n,r]=Xp(e,[`value`]),i=zp(),a=Vo(),o=i.getTriggerProps(n),s=F({...o,"aria-controls":a.unmounted?void 0:o[`aria-controls`]},r);return(0,P.jsx)(R.button,{...s,ref:t})});Zp.displayName=`DialogTrigger`;var Qp=po({Backdrop:()=>Bp,CloseTrigger:()=>Vp,Content:()=>Hp,Context:()=>Up,Description:()=>Wp,Positioner:()=>Gp,Root:()=>qp,RootProvider:()=>Jp,Title:()=>Yp,Trigger:()=>Zp}),[$p,em]=nr({name:`ListboxContext`,hookName:`useListboxContext`,providerName:`<ListboxProvider />`}),tm=(0,N.forwardRef)((e,t)=>{let n=F(em().getContentProps(),e);return(0,P.jsx)(R.div,{...n,ref:t})});tm.displayName=`ListboxContent`;var nm=e=>e.children(em()),rm=Tf.build(),im=(0,N.forwardRef)((e,t)=>em().collection.size===0?(0,P.jsx)(R.div,{...rm.empty.attrs,...e,role:`presentation`,ref:t}):null);im.displayName=`ListboxEmpty`;var am=mo(),om=(0,N.forwardRef)((e,t)=>{let[n,r]=am(e,[`autoHighlight`,`keyboardPriority`]),i=F(em().getInputProps(n),r);return(0,P.jsx)(R.input,{...i,ref:t})});om.displayName=`ListboxInput`;var[sm,cm]=nr({name:`ListboxItemContext`,hookName:`useListboxItemContext`,providerName:`<ListboxItemProvider />`}),[lm,um]=nr({name:`ListboxItemPropsContext`,hookName:`useListboxItemPropsContext`,providerName:`<ListboxItemPropsProvider />`}),dm=mo(),fm=(0,N.forwardRef)((e,t)=>{let[n,r]=dm(e,[`item`,`highlightOnHover`]),i=em(),a=F(i.getItemProps(n),r),o=i.getItemState(n);return(0,P.jsx)(lm,{value:n,children:(0,P.jsx)(sm,{value:o,children:(0,P.jsx)(R.div,{...a,ref:t})})})});fm.displayName=`ListboxItem`;var pm=e=>e.children(cm()),[mm,hm]=nr({name:`ListboxItemGroupPropsContext`,hookName:`useListboxItemGroupPropsContext`,providerName:`<ListboxItemGroupPropsProvider />`}),gm=mo(),_m=(0,N.forwardRef)((e,t)=>{let n=(0,N.useId)(),[r,i]=gm(e,[`id`]),a={id:n,...r},o=F(em().getItemGroupProps(a),i);return(0,P.jsx)(mm,{value:a,children:(0,P.jsx)(R.div,{...o,ref:t})})});_m.displayName=`ListboxItemGroup`;var vm=(0,N.forwardRef)((e,t)=>{let n=em(),r=hm(),i=F(n.getItemGroupLabelProps({htmlFor:r.id}),e);return(0,P.jsx)(R.div,{...i,ref:t})});vm.displayName=`ListboxItemGroupLabel`;var ym=(0,N.forwardRef)((e,t)=>{let n=em(),r=um(),i=F(n.getItemIndicatorProps(r),e);return(0,P.jsx)(R.div,{...i,ref:t})});ym.displayName=`ListboxItemIndicator`;var bm=(0,N.forwardRef)((e,t)=>{let n=em(),r=um(),i=F(n.getItemTextProps(r),e);return(0,P.jsx)(R.div,{...i,ref:t})});bm.displayName=`ListboxItemText`;var xm=(0,N.forwardRef)((e,t)=>{let n=F(em().getLabelProps(),e);return(0,P.jsx)(R.span,{...n,ref:t})});xm.displayName=`ListboxLabel`;var Sm=e=>{let t=(0,N.useId)(),{dir:n}=uo(),{getRootNode:r}=ir();return vf(ko(Sf,{id:t,dir:n,getRootNode:r,...e}),Po)},Cm=(0,N.forwardRef)((e,t)=>{let[n,r]=mo()(e,[`collection`,`defaultHighlightedValue`,`defaultValue`,`deselectable`,`disabled`,`disallowSelectAll`,`highlightedValue`,`id`,`ids`,`loopFocus`,`onHighlightChange`,`onSelect`,`onValueChange`,`orientation`,`scrollToIndexFn`,`selectionMode`,`selectOnHighlight`,`typeahead`,`value`]),i=Sm(n),a=F(i.getRootProps(),r);return(0,P.jsx)($p,{value:i,children:(0,P.jsx)(R.div,{...a,ref:t})})}),wm=(0,N.forwardRef)((e,t)=>{let[{value:n},r]=mo()(e,[`value`]),i=F(n.getRootProps(),r);return(0,P.jsx)($p,{value:n,children:(0,P.jsx)(R.div,{...i,ref:t})})}),Tm=(0,N.forwardRef)((e,t)=>{let{children:n,placeholder:r,...i}=e,a=em(),o=F(a.getValueTextProps(),i);return(0,P.jsx)(R.span,{...o,ref:t,children:n||a.valueAsString||r})});Tm.displayName=`ListboxValueText`;var Em=po({Content:()=>tm,Context:()=>nm,Empty:()=>im,Input:()=>om,Item:()=>fm,ItemContext:()=>pm,ItemGroup:()=>_m,ItemGroupLabel:()=>vm,ItemIndicator:()=>ym,ItemText:()=>bm,Label:()=>xm,Root:()=>Cm,RootProvider:()=>wm,ValueText:()=>Tm}),Dm=e=>{let{children:t,disabled:n}=e,[r,i]=(0,N.useState)(e.container?.current),a=(0,N.useSyncExternalStore)(km,()=>!1,()=>!0),{getRootNode:o}=ir();if((0,N.useEffect)(()=>{i(()=>e.container?.current)},[e.container]),a||n)return(0,P.jsx)(P.Fragment,{children:t});let s=r??Om(o);return(0,P.jsx)(P.Fragment,{children:N.Children.map(t,e=>(0,Co.createPortal)(e,s))})},Om=e=>{let t=e?.(),n=t.getRootNode();return ai(n)?n:fi(t).body},km=()=>()=>{},[Am,jm]=nr({name:`SelectContext`,hookName:`useSelectContext`,providerName:`<SelectProvider />`}),Mm=(0,N.forwardRef)((e,t)=>{let n=F(jm().getClearTriggerProps(),e);return(0,P.jsx)(R.button,{...n,ref:t})});Mm.displayName=`SelectClearTrigger`;var Nm=(0,N.forwardRef)((e,t)=>{let n=jm(),r=Vo(),i=F(n.getContentProps(),r.getPresenceProps(),e),a=or(r.ref,t);return(0,P.jsx)(zo,{presence:r,children:(0,P.jsx)(R.div,{...i,ref:a})})});Nm.displayName=`SelectContent`;var Pm=e=>e.children(jm()),Fm=(0,N.forwardRef)((e,t)=>{let n=F(jm().getControlProps(),e);return(0,P.jsx)(R.div,{...n,ref:t})});Fm.displayName=`SelectControl`;var Im=(0,N.forwardRef)((e,t)=>{let n=jm(),r=F(n.getHiddenSelectProps(),e),i=n.value.length===0,a=xp();return(0,P.jsxs)(R.select,{"aria-describedby":a?.ariaDescribedby,...r,ref:t,children:[i&&(0,P.jsx)(`option`,{value:``}),n.collection.items.map((e,t)=>(0,P.jsx)(`option`,{value:n.collection.getItemValue(e)??``,disabled:n.collection.getItemDisabled(e),children:n.collection.stringifyItem(e)},t))]})});Im.displayName=`SelectHiddenSelect`;var Lm=(0,N.forwardRef)((e,t)=>{let n=F(jm().getIndicatorProps(),e);return(0,P.jsx)(R.div,{...n,ref:t})});Lm.displayName=`SelectIndicator`;var[Rm,zm]=nr({name:`SelectItemContext`,hookName:`useSelectItemContext`,providerName:`<SelectItemProvider />`}),[Bm,Vm]=nr({name:`SelectItemPropsContext`,hookName:`useSelectItemPropsContext`,providerName:`<SelectItemPropsProvider />`}),Hm=mo(),Um=(0,N.forwardRef)((e,t)=>{let[n,r]=Hm(e,[`item`,`persistFocus`]),i=jm(),a=F(i.getItemProps(n),r),o=i.getItemState(n);return(0,P.jsx)(Bm,{value:n,children:(0,P.jsx)(Rm,{value:o,children:(0,P.jsx)(R.div,{...a,ref:t})})})});Um.displayName=`SelectItem`;var Wm=e=>e.children(zm()),[Gm,Km]=nr({name:`SelectItemGroupPropsContext`,hookName:`useSelectItemGroupPropsContext`,providerName:`<SelectItemGroupPropsProvider />`}),qm=mo(),Jm=(0,N.forwardRef)((e,t)=>{let n=(0,N.useId)(),[r,i]=qm(e,[`id`]),a={id:n,...r},o=F(jm().getItemGroupProps(a),i);return(0,P.jsx)(Gm,{value:a,children:(0,P.jsx)(R.div,{...o,ref:t})})});Jm.displayName=`SelectItemGroup`;var Ym=(0,N.forwardRef)((e,t)=>{let n=jm(),r=Km(),i=F(n.getItemGroupLabelProps({htmlFor:r.id}),e);return(0,P.jsx)(R.div,{...i,ref:t})});Ym.displayName=`SelectItemGroupLabel`;var Xm=(0,N.forwardRef)((e,t)=>{let n=jm(),r=Vm(),i=F(n.getItemIndicatorProps(r),e);return(0,P.jsx)(R.div,{...i,ref:t})});Xm.displayName=`SelectItemIndicator`;var Zm=(0,N.forwardRef)((e,t)=>{let n=jm(),r=Vm(),i=F(n.getItemTextProps(r),e);return(0,P.jsx)(R.span,{...i,ref:t})});Zm.displayName=`SelectItemText`;var Qm=(0,N.forwardRef)((e,t)=>{let n=F(jm().getLabelProps(),e);return(0,P.jsx)(R.label,{...n,ref:t})});Qm.displayName=`SelectLabel`;var $m=(0,N.forwardRef)((e,t)=>{let n=F(jm().getListProps(),e);return(0,P.jsx)(R.div,{...n,ref:t})});$m.displayName=`SelectList`;var eh=(0,N.forwardRef)((e,t)=>{let n=F(jm().getPositionerProps(),e);return Vo().unmounted?null:(0,P.jsx)(R.div,{...n,ref:t})});eh.displayName=`SelectPositioner`;var th=e=>{let t=(0,N.useId)(),{dir:n}=uo(),{getRootNode:r}=ir(),i=xp();return rp(ko(cp,{id:t,ids:{label:i?.ids.label,hiddenSelect:i?.ids.control},disabled:i?.disabled,readOnly:i?.readOnly,invalid:i?.invalid,required:i?.required,dir:n,getRootNode:r,...e}),Po)},nh=(0,N.forwardRef)((e,t)=>{let[n,r]=ho(e),[i,a]=mo()(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`.split(`.`)),o=th(i),s=Ro(F({present:o.open},n)),c=F(o.getRootProps(),a);return(0,P.jsx)(Am,{value:o,children:(0,P.jsx)(Bo,{value:s,children:(0,P.jsx)(R.div,{...c,ref:t})})})}),rh=(0,N.forwardRef)((e,t)=>{let[n,r]=ho(e),[{value:i},a]=mo()(r,[`value`]),o=Ro(F({present:i.open},n)),s=F(i.getRootProps(),a);return(0,P.jsx)(Am,{value:i,children:(0,P.jsx)(Bo,{value:o,children:(0,P.jsx)(R.div,{...s,ref:t})})})}),ih=(0,N.forwardRef)((e,t)=>{let n=F(jm().getTriggerProps(),e);return(0,P.jsx)(R.button,{...n,ref:t})});ih.displayName=`SelectTrigger`;var ah=(0,N.forwardRef)((e,t)=>{let{children:n,placeholder:r,...i}=e,a=jm(),o=F(a.getValueTextProps(),i);return(0,P.jsx)(R.span,{...o,ref:t,children:n||a.valueAsString||r})});ah.displayName=`SelectValueText`;var oh=po({ClearTrigger:()=>Mm,Content:()=>Nm,Context:()=>Pm,Control:()=>Fm,HiddenSelect:()=>Im,Indicator:()=>Lm,Item:()=>Um,ItemContext:()=>Wm,ItemGroup:()=>Jm,ItemGroupLabel:()=>Ym,ItemIndicator:()=>Xm,ItemText:()=>Zm,Label:()=>Qm,List:()=>$m,Positioner:()=>eh,Root:()=>nh,RootProvider:()=>rh,Trigger:()=>ih,ValueText:()=>ah});function sh(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}var ch=(e,t)=>{if(!e||typeof e!=`string`)return{invalid:!0,value:e};let[n,r]=e.split(`/`);if(!n||!r||n===`currentBg`)return{invalid:!0,value:n};let i=t(`colors.${n}`),a=t.raw(`opacity.${r}`)?.value;if(!a&&isNaN(Number(r)))return{invalid:!0,value:n};let o=a?Number(a)*100+`%`:`${r}%`,s=i??n;return{invalid:!1,color:s,value:`color-mix(in srgb, ${s} ${o}, transparent)`}},lh=e=>(t,n)=>{let r=n.utils.colorMix(t);if(r.invalid)return{[e]:t};let i=`--mix-`+e;return{[i]:r.value,[e]:`var(${i}, ${r.color})`}};function uh(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return e.map(e=>uh(e));let t=Object.create(Object.getPrototypeOf(e));for(let n of Object.keys(e))t[n]=uh(e[n]);return t}function dh(e,t){if(t==null)return e;for(let n of Object.keys(t))if(t[n]!==void 0&&n!==`__proto__`){if(!Lt(e[n])&&Lt(t[n]))Object.assign(e,{[n]:t[n]});else if(e[n]&&Lt(t[n]))dh(e[n],t[n]);else if(Array.isArray(t[n])&&Array.isArray(e[n])){let r=0;for(;r<t[n].length;r++)Lt(e[n][r])&&Lt(t[n][r])?dh(e[n][r],t[n][r]):e[n][r]=t[n][r]}else Object.assign(e,{[n]:t[n]})}return e}function fh(e,...t){for(let n of t)dh(e,n);return e}var ph=e=>e!=null;function mh(e,t,n={}){let{stop:r,getKey:i}=n;function a(e,n=[]){if(Lt(e)||Array.isArray(e)){let o={};for(let[s,c]of Object.entries(e)){let l=i?.(s,c)??s,u=[...n,l];if(r?.(e,u))return t(e,n);let d=a(c,u);ph(d)&&(o[l]=d)}return o}return t(e,n)}return a(e)}function hh(e,t){return Array.isArray(e)?e.map(e=>ph(e)?t(e):e):Lt(e)?mh(e,e=>t(e)):ph(e)?t(e):e}var gh=[`value`,`type`,`description`],_h=e=>e&&typeof e==`object`&&!Array.isArray(e),vh=(...e)=>{let t=fh({},...e.map(uh));return t.theme?.tokens&&mh(t.theme.tokens,e=>{let t=Object.keys(e).filter(e=>!gh.includes(e)).length>0,n=gh.some(t=>e[t]!=null);return t&&n&&(e.DEFAULT||={},gh.forEach(t=>{var n;e[t]!=null&&((n=e.DEFAULT)[t]||(n[t]=e[t]),delete e[t])})),e},{stop(e){return _h(e)&&gh.some(t=>e[t]!=null)}}),t},yh=e=>e,bh=e=>e,U=e=>e,xh=e=>e,Sh=e=>e,Ch=e=>e,wh=e=>e,Th=e=>e,Eh=e=>e;function Dh(){let e=e=>e;return new Proxy(e,{get(){return e}})}var Oh=Dh(),kh=Dh(),Ah=e=>e,jh=/[^a-zA-Z0-9_\u0081-\uffff-]/g;function Mh(e){return`${e}`.replace(jh,e=>`\\${e}`)}var Nh=/[A-Z]/g;function Ph(e){return e.replace(Nh,e=>`-${e.toLowerCase()}`)}function Fh(e,t={}){let{fallback:n=``,prefix:r=``}=t,i=Ph([`-`,r,Mh(e)].filter(Boolean).join(`-`));return{var:i,ref:`var(${i}${n?`, ${n}`:``})`}}var Ih=e=>/^var\(--.+\)$/.test(e),Lh=(e,t)=>t==null?t:`${e}(${t})`,Rh=e=>{if(Ih(e)||e==null)return e;let t=typeof e==`string`&&!e.endsWith(`deg`);return typeof e==`number`||t?`${e}deg`:e},zh=e=>({values:[`outside`,`inside`,`mixed`,`none`],transform(t,{token:n}){let r=n(`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]??{}}}),Bh=lh(`borderColor`),Vh=e=>({transition:e,transitionTimingFunction:`cubic-bezier(0.4, 0, 0.2, 1)`,transitionDuration:`150ms`}),Hh=yh({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`}),Uh=Fh(`bg-currentcolor`),Wh=e=>e===Uh.ref||e===`currentBg`,Gh=e=>({...e(`colors`),currentBg:Uh}),Kh=Ah({conditions:Hh,utilities:{background:{values:Gh,shorthand:[`bg`],transform(e,t){if(Wh(t.raw))return{background:Uh.ref};let n=lh(`background`)(e,t);return{...n,[Uh.var]:n?.background}}},backgroundColor:{values:Gh,shorthand:[`bgColor`],transform(e,t){if(Wh(t.raw))return{backgroundColor:Uh.ref};let n=lh(`backgroundColor`)(e,t);return{...n,[Uh.var]:n?.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:Gh,transform:lh(`--gradient-from`)},gradientTo:{values:Gh,transform:lh(`--gradient-to`)},gradientVia:{values:Gh,transform(e,t){return{...lh(`--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:Gh,transform:lh(`borderColor`)},borderTopColor:{values:Gh,transform:lh(`borderTopColor`)},borderBlockStartColor:{values:Gh,transform:lh(`borderBlockStartColor`)},borderBottomColor:{values:Gh,transform:lh(`borderBottomColor`)},borderBlockEndColor:{values:Gh,transform:lh(`borderBlockEndColor`)},borderLeftColor:{values:Gh,transform:lh(`borderLeftColor`)},borderInlineStartColor:{values:Gh,shorthand:[`borderStartColor`],transform:lh(`borderInlineStartColor`)},borderRightColor:{values:Gh,transform:lh(`borderRightColor`)},borderInlineEndColor:{values:Gh,shorthand:[`borderEndColor`],transform:lh(`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:Gh,transform:lh(`color`)},fill:{values:Gh,transform:lh(`fill`)},stroke:{values:Gh,transform:lh(`stroke`)},accentColor:{values:Gh,transform:lh(`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:Gh,transform(e,t){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":Bh(e,t)}}},divideStyle:{property:`borderStyle`,transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderStyle:e}}}},boxShadow:{values:`shadows`,shorthand:[`shadow`]},boxShadowColor:{values:Gh,transform:lh(`--shadow-color`),shorthand:[`shadowColor`]},mixBlendMode:{shorthand:[`blendMode`]},backgroundBlendMode:{shorthand:[`bgBlendMode`]},opacity:{values:`opacity`},filter:{transform(e){return e===`auto`?{filter:`var(--blur) var(--brightness) var(--contrast) var(--grayscale) var(--hue-rotate) var(--invert) var(--saturate) var(--sepia) var(--drop-shadow)`}:{filter:e}}},blur:{values:`blurs`,transform:e=>({"--blur":Lh(`blur`,e)})},brightness:{transform:e=>({"--brightness":Lh(`brightness`,e)})},contrast:{transform:e=>({"--contrast":Lh(`contrast`,e)})},grayscale:{transform:e=>({"--grayscale":Lh(`grayscale`,e)})},hueRotate:{transform:e=>({"--hue-rotate":Lh(`hue-rotate`,Rh(e))})},invert:{transform:e=>({"--invert":Lh(`invert`,e)})},saturate:{transform:e=>({"--saturate":Lh(`saturate`,e)})},sepia:{transform:e=>({"--sepia":Lh(`sepia`,e)})},dropShadow:{transform:e=>({"--drop-shadow":Lh(`drop-shadow`,e)})},backdropFilter:{transform(e){return e===`auto`?{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)`}:{backdropFilter:e}}},backdropBlur:{values:`blurs`,transform:e=>({"--backdrop-blur":Lh(`blur`,e)})},backdropBrightness:{transform:e=>({"--backdrop-brightness":Lh(`brightness`,e)})},backdropContrast:{transform:e=>({"--backdrop-contrast":Lh(`contrast`,e)})},backdropGrayscale:{transform:e=>({"--backdrop-grayscale":Lh(`grayscale`,e)})},backdropHueRotate:{transform:e=>({"--backdrop-hue-rotate":Lh(`hue-rotate`,Rh(e))})},backdropInvert:{transform:e=>({"--backdrop-invert":Lh(`invert`,e)})},backdropOpacity:{transform:e=>({"--backdrop-opacity":Lh(`opacity`,e)})},backdropSaturate:{transform:e=>({"--backdrop-saturate":Lh(`saturate`,e)})},backdropSepia:{transform:e=>({"--backdrop-sepia":Lh(`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:Gh,transform:lh(`outlineColor`)},focusRing:zh(`&:is(:focus, [data-focus])`),focusVisibleRing:zh(`&:is(:focus-visible, [data-focus-visible])`),focusRingColor:{values:Gh,transform:lh(`--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:n})=>({[n.raw(`breakpoints.${t}`)?`@breakpoint ${t}`:`@media screen and (min-width: ${e})`]:{display:`none`}})},hideBelow:{values:`breakpoints`,transform(e,{raw:t,token:n}){return{[n.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:Gh,transform:lh(`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:Gh,transform:lh(`--ring-color`)},ringOffset:{transform:e=>({"--ring-offset-width":e})},ringOffsetColor:{values:Gh,transform:lh(`--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:Gh,transform:lh(`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":Rh(e)})},skewY:{transform:e=>({"--skew-y":Rh(e)})},scaleX:{transform:e=>({"--scale-x":e})},scaleY:{transform:e=>({"--scale-y":e})},scale:{transform(e){return e===`auto`?{scale:`var(--scale-x, 1) var(--scale-y, 1)`}:{scale:e}}},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:`var(--rotate-x, 0) var(--rotate-y, 0) var(--rotate-z, 0)`}:{rotate:Rh(e)}}},rotateX:{transform(e){return{"--rotate-x":Rh(e)}}},rotateY:{transform(e){return{"--rotate-y":Rh(e)}}},translate:{transform(e){return e===`auto`?{translate:`var(--translate-x) var(--translate-y)`}:{translate:e}}},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 Vh(`all`);case`position`:return Vh(`left, right, top, bottom, inset-inline, inset-block`);case`colors`:return Vh(`color, background-color, border-color, text-decoration-color, fill, stroke`);case`opacity`:return Vh(`opacity`);case`shadow`:return Vh(`box-shadow`);case`transform`:return Vh(`transform`);case`size`:return Vh(`width, height`);case`backgrounds`:return Vh(`background, background-color, background-image, background-position`);case`common`:return Vh(`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 qh[e]||{}}},debug:{values:{type:`boolean`},transform(e){return e?{outline:`1px solid blue !important`,"& > *":{outline:`1px solid red !important`}}:{}}},caretColor:{values:Gh,transform:lh(`caretColor`)},cursor:{values:`cursor`}}}),qh={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`}},Jh=``.split(`,`),Yh=`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`.split(`,`).concat(Jh),Xh=new Map(Yh.map(e=>[e,!0]));function Zh(e){let t=Object.create(null);return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var Qh=/&|@/,$h=Zh(e=>Xh.has(e)||e.startsWith(`--`)||Qh.test(e));function eg(e,t){let n={};for(let r in e){let i=t(r,e[r]);n[i[0]]=i[1]}return n}function tg(e,t){let n={};return mh(e,(e,t)=>{e&&(n[t.join(`.`)]=e.value)},{stop:t}),n}var ng=Object.defineProperty,rg=(e,t,n)=>t in e?ng(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ig=(e,t,n)=>rg(e,typeof t==`symbol`?t:t+``,n);function ag(e){if(e===null)return`null`;if(e===void 0)return`undefined`;let 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(ag).join(`,`)}]`:t===`object`?`o:{${Object.keys(e).sort().map(t=>`${t}:${ag(e[t])}`).join(`,`)}}`:String(e)}var og=class{constructor(e=500){ig(this,`cache`,new Map),ig(this,`maxSize`),this.maxSize=e}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e!==void 0&&this.cache.delete(e)}this.cache.set(e,t)}clear(){this.cache.clear()}},sg=e=>{let t=new og;function n(...n){let r=n.length===1?ag(n[0]):n.map(ag).join(`|`),i=t.get(r);return i===void 0&&(i=e.apply(this,n),t.set(r,i)),i}return n},cg=16,lg=`px`,ug=`em`,dg=`rem`;function fg(e=``){let t=new RegExp(String.raw`-?\d+(?:\.\d+|\d*)`),n=RegExp(`${lg}|${ug}|${dg}`);return e.match(RegExp(`${t.source}(${n.source})`))?.[1]}function pg(e=``){if(typeof e==`number`)return`${e}px`;let t=fg(e);if(!t||t===lg)return e;if(t===ug||t===dg)return`${parseFloat(e)*cg}${lg}`}function mg(e=``){let t=fg(e);if(!t||t===dg)return e;if(t===ug)return`${parseFloat(e)}${dg}`;if(t===lg)return`${parseFloat(e)/cg}${dg}`}var hg=e=>e.charAt(0).toUpperCase()+e.slice(1);function gg(e){let t=vg(e),n=Object.fromEntries(t);function r(e){return n[e]}function i(e){return bg(r(e))}function a(){let e=Object.keys(n),t=yg(e),a=e.flatMap(e=>{let t=r(e),n=[`${e}Down`,bg({max:_g(t.min)})];return[[e,bg({min:t.min})],[`${e}Only`,i(e)],n]}).filter(([,e])=>e!==``).concat(t.map(([e,t])=>{let n=r(e),i=r(t);return[`${e}To${hg(t)}`,bg({min:n.min,max:_g(i.min)})]}));return Object.fromEntries(a)}function o(){let e=a();return Object.fromEntries(Object.entries(e))}let s=o(),c=e=>s[e];function l(){return Ut([`base`,...Object.keys(n)])}function u(e){return bg({min:r(e).min})}function d(e){return bg({max:_g(r(e).min)})}return{values:Object.values(n),only:i,keys:l,conditions:s,getCondition:c,up:u,down:d}}function _g(e){return mg(`${parseFloat(pg(e)??``)-.04}px`)}function vg(e){return Object.entries(e).sort(([,e],[,t])=>parseInt(e,10)<parseInt(t,10)?-1:1).map(([e,t],n,r)=>{let i=null;return n<=r.length-1&&(i=r[n+1]?.[1]),i!=null&&(i=_g(i)),[e,{name:e,min:mg(t),max:i}]})}function yg(e){let t=[];return e.forEach((n,r)=>{let i=r;i++;let a=e[i];for(;a;)t.push([n,a]),i++,a=e[i]}),t}function bg({min:e,max:t}){return e==null&&t==null?``:[`@media screen`,e&&`(min-width: ${e})`,t&&`(max-width: ${t})`].filter(Boolean).join(` and `)}var xg=/^@|&|&$/,Sg=e=>{let{breakpoints:t,conditions:n={}}=e,r=eg(n,(e,t)=>[`_${e}`,t]),i=Object.assign({},r,t.conditions);function a(){return Object.keys(i)}function o(e){return a().includes(e)||xg.test(e)||e.startsWith(`_`)}let s=sg(e=>e.filter(e=>e!==`base`).sort((e,t)=>{let n=o(e),r=o(t);return n&&!r?1:!n&&r?-1:0}));function c(e){return e.startsWith(`@breakpoint`)?t.getCondition(e.replace(`@breakpoint `,``)):e}function l(e){return Reflect.get(i,e)||e}return{keys:a,sort:s,has:o,resolve:l,breakpoints:t.keys(),expandAtRule:c}},Cg=Object.freeze(Object.create(null)),wg=Object.freeze([]);function Tg(){return Object.create(null)}var Eg=e=>({minMax:RegExp(`(!?\\(\\s*min(-device-)?-${e})(.|
2
+ )+\\(\\s*max(-device)?-${e}`,`i`),min:RegExp(`\\(\\s*min(-device)?-${e}`,`i`),maxMin:RegExp(`(!?\\(\\s*max(-device)?-${e})(.|
3
+ )+\\(\\s*min(-device)?-${e}`,`i`),max:RegExp(`\\(\\s*max(-device)?-${e}`,`i`)}),Dg=Eg(`width`),Og=Eg(`height`),kg=e=>({isMin:Vg(e.minMax,e.maxMin,e.min),isMax:Vg(e.maxMin,e.minMax,e.max)}),{isMin:Ag,isMax:jg}=kg(Dg),{isMin:Mg,isMax:Ng}=kg(Og),Pg=/print/i,Fg=/^print$/i,Ig=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/,Lg=/(\d)/,Rg=Number.MAX_VALUE,zg={ch:8.8984375,em:16,rem:16,ex:8.296875,px:1};function Bg(e){let t=Ig.exec(e)||(Ag(e)||Mg(e)?Lg.exec(e):null);return t?t[0]===`0`?0:parseFloat(t[1])*(zg[t[2]]||1):Rg}function Vg(e,t,n){return r=>e.test(r)||!t.test(r)&&n.test(r)}function Hg(e,t){let n=Pg.test(e),r=Fg.test(e),i=Pg.test(t),a=Fg.test(t);return n&&i?!r&&a?1:r&&!a?-1:e.localeCompare(t):n?1:i?-1:null}var Ug=sg((e,t)=>{let n=Hg(e,t);if(n!==null)return n;let r=Ag(e)||Mg(e),i=jg(e)||Ng(e),a=Ag(t)||Mg(t),o=jg(t)||Ng(t);if(r&&o)return-1;if(i&&a)return 1;let s=Bg(e),c=Bg(t);return s===Rg&&c===Rg?e.localeCompare(t):s===Rg?1:c===Rg?-1:s===c?e.localeCompare(t):s>c?i?-1:1:i?1:-1});function Wg(e){return e.sort(([e],[t])=>Ug(e,t))}function Gg(e){let t=[],n=[],r={};for(let[i,a]of Object.entries(e))i.startsWith(`@media`)?t.push([i,a]):i.startsWith(`@container`)?n.push([i,a]):r[i]=Lt(a)?Gg(a):a;let i=Wg(t),a=Wg(n);return{...r,...Object.fromEntries(i),...Object.fromEntries(a)}}var Kg=/\s*!(important)?/i,qg=sg(e=>Rt(e)?Kg.test(e):!1),Jg=sg(e=>Rt(e)?e.replace(Kg,``).trim():e);function Yg(e){let{transform:t,conditions:n,normalize:r}=e,i=Qg(e);return sg(function(...e){let a=i(...e),o=r(a),s=Tg();return mh(o,(e,r)=>{if(e==null)return;let[i,...a]=n.sort(r).map(n.resolve),o=qg(e);o&&(e=Jg(e));let c=t(i,e)??Cg;c=mh(c,e=>Rt(e)&&o?`${e} !important`:e,{getKey:e=>n.expandAtRule(e)}),Xg(s,a.flat(),c)}),Gg(s)})}function Xg(e,t,n){let r=e;for(let e of t)e&&(r[e]||(r[e]=Tg()),r=r[e]);fh(r,n)}function Zg(...e){return e.filter(e=>{if(!Lt(e))return!1;let t=It(e);return Object.keys(t).length>0})}function Qg(e){function t(t){let n=Zg(...t);return n.length===1?n:n.map(t=>e.normalize(t))}return sg(function(...e){return fh({},...t(e))})}var $g=e=>({base:Cg,variants:Cg,defaultVariants:Cg,compoundVariants:[],...e});function e_(e){let{css:t,conditions:n,normalize:r,layers:i}=e;function a(e={}){let s=$g(e),{base:c,defaultVariants:l,compoundVariants:u}=s,d=eg(s.variants,(e,t)=>[e,eg(t,(e,t)=>[e,r(t)])]),f=Yg({conditions:n,normalize:r,transform(e,t){return d[e]?.[t]}}),p=sg(function(e={}){let n=r({...l,...It(e)}),a={...r(c)};fh(a,f(n));let s=o(u,n);return i.wrap(`recipes`,t(a,s))}),m=Object.keys(d),h=e=>{let[t,n]=Xt(sh(e,[`recipe`]),m),r=m.includes(`colorPalette`),i=m.includes(`orientation`);return r||(t.colorPalette=e.colorPalette||l.colorPalette),i&&(n.orientation=e.orientation),[t,n]},g=eg(d,(e,t)=>[e,Object.keys(t)]),_=sg(function(e){return t(p(e))});return Object.assign(_,{className:e.className,__cva__:!0,variantMap:g,variantKeys:m,raw:p,config:e,splitVariantProps:h,merge(e){return a(n_(this,e))}})}function o(e,n){let r=Cg;return e.forEach(e=>{Object.entries(e).every(([e,t])=>e===`css`||(Array.isArray(t)?t:[t]).some(t=>n[e]===t))&&(r=t(r,e.css))}),r}return a}var t_=e=>(e?.__cva__?e.config:e)??Cg;function n_(e,t){let n=$g(t_(e)),r=$g(t_(t)),i=Ut(Object.keys(n.variants),Object.keys(r.variants)),a=fh({},n.base,r.base),o=Object.fromEntries(i.map(e=>[e,fh({},n.variants[e],r.variants[e])])),s=fh({},n.defaultVariants,r.defaultVariants),c=[...n.compoundVariants,...r.compoundVariants];return{className:Bt(n.className,r.className),base:a,variants:o,defaultVariants:s,compoundVariants:c}}var r_={reset:`reset`,base:`base`,tokens:`tokens`,recipes:`recipes`},i_={reset:0,base:1,tokens:2,recipes:3};function a_(e){let t=e.layers??r_,n=Object.values(t).sort((e,t)=>i_[e]-i_[t]);return{names:n,atRule:`@layer ${n.join(`, `)};`,wrap(n,r){return e.disableLayers?r:{[`@layer ${t[n]}`]:r}}}}function o_(e){let{utility:t,normalize:n}=e,{hasShorthand:r,resolveShorthand:i}=t;return function(e){return mh(e,n,{stop:e=>Array.isArray(e),getKey:r?i:void 0})}}function s_(e){let{preflight:t}=e;if(!t)return{};let{scope:n=``,level:r=`parent`}=Lt(t)?t:{},i=``;n&&r===`parent`?i=`${n} `:n&&r===`element`&&(i=`&${n}`);let a={"*":{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`}},o={[n||`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`){let e=Object.entries(a).reduce((e,[t,n])=>(e[t]={[i]:n},e),{});Object.assign(o,e)}else i?o[i]=a:Object.assign(o,a);return o}function c_(e){let{conditions:t,isValidProperty:n}=e,r=sg((e,r)=>!n(e)||!r.split(`,`).every(e=>e===`base`||t.has(e)));return function(e){return mh(e,e=>e,{stop:e=>Array.isArray(e),getKey:(e,n)=>!Lt(n)||t.has(e)?e:r(e,Object.keys(n).join(`,`))?u_(e).map(e=>{let t=e.startsWith(`&`)?e.slice(1):e;return l_(t)?`${t} &`:`&${t}`}).join(`, `):e})}}function l_(e){let t=e.toLowerCase();return t.startsWith(`:host-context`)||t.startsWith(`:host`)||t.startsWith(`::slotted`)}function u_(e){let t=[],n=0,r=``,i=!1;for(let a=0;a<e.length;a++){let o=e[a];o===`\\`&&!i?(i=!0,r+=o):i?(i=!1,r+=o):(o===`(`?n++:o===`)`&&n--,o===`,`&&n===0?(t.push(r.trim()),r=``):r+=o)}return r&&t.push(r.trim()),t}var d_=(e=Cg)=>{let t=t=>({base:e.base?.[t]??Cg,variants:Tg(),defaultVariants:e.defaultVariants??Cg,compoundVariants:e.compoundVariants?f_(e.compoundVariants,t):wg}),n=(e.slots??[]).map(e=>[e,t(e)]);for(let[t,r]of Object.entries(e.variants??{}))for(let[e,i]of Object.entries(r))n.forEach(([n,r])=>{var a;(a=r.variants)[t]??(a[t]={}),r.variants[t][e]=i[n]??Cg});return Object.fromEntries(n)},f_=(e,t)=>e.filter(e=>e.css[t]).map(e=>({...e,css:e.css[t]}));function p_(e){let{cva:t}=e;return function(e=Cg){let n=Object.entries(d_(e)).map(([e,n])=>[e,t(n)]),r=sg(function(e){let t=n.map(([t,n])=>[t,n(e)]);return Object.fromEntries(t)}),i=e.variants??Cg,a=Object.keys(i);function o(t){let[n,r]=Xt(sh(t,[`recipe`]),a),i=a.includes(`colorPalette`),o=a.includes(`orientation`);return i||(n.colorPalette=t.colorPalette||e.defaultVariants?.colorPalette),o&&(r.orientation=t.orientation),[n,r]}let s=eg(i,(e,t)=>[e,Object.keys(t)]),c={};return e.className&&(c=Object.fromEntries(e.slots.map(t=>[t,`${e.className}__${t}`]))),Object.assign(r,{variantMap:s,variantKeys:a,splitVariantProps:o,classNameMap:c})}}var m_=()=>e=>Array.from(new Set(e)),h_=/([\0-\x1f\x7f]|^-?\d)|^-$|^-|[^\x80-\uFFFF\w-]/g,g_=function(e,t){return t?e===`\0`?`�`:e===`-`&&e.length===1?`\\-`:e.slice(0,-1)+`\\`+e.charCodeAt(e.length-1).toString(16):`\\`+e},__=e=>(e+``).replace(h_,g_),v_=(e,t)=>{let n=``,r=0,i=`char`,a=``,o=``,s=[];for(;r<e.length;){let c=e[r];if(c===`{`){let i=e.indexOf(`}`,r);if(i===-1)break;let a=e.slice(r+1,i),o=t(a);n+=o??a,r=i+1;continue}if(i===`token`&&c===`,`){e[r]===``&&r++,i=`fallback`,s.push(i);let c=t(a);c?.endsWith(`)`)&&(n+=c.slice(0,-1)),a=``,o=``;continue}if(i===`fallback`&&o+c===`, var(`){let t=y_(e.slice(r+1))+r+1,a=e.slice(r+1,t);if(t===-1)break;n+=`, var(`+a+`)`,r=t+1,i=s.pop()??i,o=``;continue}if(i===`token`||i===`fallback`){if(r++,c===`)`){i=s.pop()??i??`char`,o+=c;let e=a&&(t(a)??__(a));if(o){if(o=o.slice(1).trim(),!o.startsWith(`token(`)&&o.endsWith(`)`)&&(o=o.slice(0,-1)),o.includes(`token(`)){let e=v_(o,t);e&&(o=e.slice(0,-1))}else if(o){let e=t(o);e&&(o=e)}}let r=n.at(-1);o?r?.trim()?n+=e.slice(0,-1)+(`, `+o+`)`):n+=o:n+=e||`)`,a=``,o=``,i=`char`;continue}i===`token`&&(a+=c),i===`fallback`&&(o+=c);continue}let l=e.indexOf(`token(`,r);if(l!==-1){let t=l+6;n+=e.slice(r,l),r=t,i=`token`,s.push(i)}else n+=c,r++}return n},y_=e=>{let t=0,n=[`(`];for(;t<e.length;){let r=e[t];if(r===`(`)n.push(r);else if(r===`)`&&(n.pop(),n.length===0))return t;t++}return t};function b_(e){let t={};return e.forEach((e,n)=>{e instanceof Map?t[n]=Object.fromEntries(e):t[n]=e}),t}var x_=/({([^}]*)})/g,S_=/[{}]/g,C_=/\w+\.\w+/,w_=e=>{if(!Rt(e))return[];let t=e.match(x_);return t?t.map(e=>e.replace(S_,``).trim()):[]},T_=e=>x_.test(e);function E_(e){if(!e.extensions?.references)return e.extensions?.cssVar?.ref??e.value;let t=e.extensions.references??{},n=e.value,r=Object.keys(t);for(let e=0;e<r.length;e++){let i=r[e],a=t[i];if(a.extensions.conditions)continue;let o=E_(a);n=n.replace(`{${i}}`,o)}return e.value=n,delete e.extensions.references,e.value}function D_(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 O_(e,t){let n={};for(let r in t)n[r]=D_(e,t[r]);return n}var k_=/calc/g;function A_(e){return Lt(e)&&e.reference?e.reference:String(e)}var j_=(e,...t)=>t.map(A_).join(` ${e} `).replace(k_,``),M_=(...e)=>`calc(${j_(`+`,...e)})`,N_=(...e)=>`calc(${j_(`-`,...e)})`,P_=(...e)=>`calc(${j_(`*`,...e)})`,F_=(...e)=>`calc(${j_(`/`,...e)})`,I_=e=>{let t=A_(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith(`-`)?String(t).slice(1):`-${t}`:P_(t,-1)},L_=Object.assign(e=>({add:(...t)=>L_(M_(e,...t)),subtract:(...t)=>L_(N_(e,...t)),multiply:(...t)=>L_(P_(e,...t)),divide:(...t)=>L_(F_(e,...t)),negate:()=>L_(I_(e)),toString:()=>e.toString()}),{add:M_,subtract:N_,multiply:P_,divide:F_,negate:I_}),R_={enforce:`pre`,transform(e){let{prefix:t,allTokens:n,formatCssVar:r,formatTokenName:i,registerToken:a}=e;n.filter(({extensions:e})=>e.category===`spacing`).forEach(e=>{let n=e.path.slice(),o=r(n,t);if(Rt(e.value)&&e.value===`0rem`)return;let s=[...e.path],c=s[s.length-1];c!=null&&(s[s.length-1]=`-${c}`);let l={...e,value:L_.negate(o.ref),name:i(s),path:s,extensions:{...e.extensions,negative:!0,prop:`-${e.extensions.prop}`,originalPath:n}};a(l)})}},z_=new Set([`spacing`,`sizes`,`borderWidths`,`fontSizes`,`radii`]),B_=[R_,{enforce:`post`,transform(e){let{allTokens:t,registerToken:n,formatTokenName:r}=e,i=t.filter(({extensions:e})=>e.category===`colors`),a=new Map,o=new Map;i.forEach(e=>{let{colorPalette:t}=e.extensions;t&&(t.keys.forEach(e=>{a.set(r(e),e)}),t.roots.forEach(n=>{let i=r(n),s=o.get(i)||[];if(s.push(e),o.set(i,s),e.extensions.default&&n.length===1){let e=t.keys[0]?.filter(Boolean);if(!e.length)return;let i=n.concat(e);a.set(r(i),[])}}))}),a.forEach(e=>{let t=[`colors`,`colorPalette`,...e].filter(Boolean),i=r(t),a={name:i,value:i,originalValue:i,path:t,extensions:{condition:`base`,originalPath:t,category:`colors`,prop:r(t.slice(1)),virtual:!0}};n(a,`pre`)})}},{enforce:`post`,transform(e){e.allTokens.filter(e=>z_.has(e.extensions.category)&&!e.extensions.negative).forEach(e=>{Object.assign(e.extensions,{pixelValue:pg(e.value)})})}},{enforce:`post`,transform(e){let t=[],n=[];e.allTokens.forEach(e=>{e.value===``?t.push(e):n.push(e)}),e.allTokens.splice(0,e.allTokens.length,...n),t.forEach(t=>{if(e.tokenMap.get(t.name)!==t)return;let n=e.allTokens.find(e=>e.name===t.name);n?(t.extensions.conditions&&!n.extensions.conditions&&(n.extensions.conditions=t.extensions.conditions),e.tokenMap.set(t.name,n)):e.tokenMap.delete(t.name)})}}],V_=[{type:`extensions`,enforce:`pre`,name:`tokens/css-var`,transform(e,t){let{prefix:n,formatCssVar:r}=t,{negative:i,originalPath:a}=e.extensions;return{cssVar:r((i?a:e.path).filter(Boolean),n)}}},{enforce:`post`,type:`value`,name:`tokens/conditionals`,transform(e,t){let{prefix:n,formatCssVar:r,getByName:i}=t,a=w_(e.value);return a.length&&a.forEach(t=>{if(!i(t))return;let a=r(t.split(`.`),n);e.value=e.value.replaceAll(`{${t}}`,a.ref)}),e.value}},{type:`extensions`,enforce:`pre`,name:`tokens/colors/colorPalette`,match(e){return e.extensions.category===`colors`&&!e.extensions.virtual},transform(e,t){let n=e.path.slice();if(n.pop(),n.shift(),n.length===0){let t=[...e.path];t.shift(),n=t}if(n.length===0)return{};let r=n.reduce((e,t,n,r)=>{let i=r.slice(0,n+1);return e.push(i),e},[]),i=n[0],a=t.formatTokenName(n),o=e.path.slice(e.path.indexOf(i)+1).reduce((e,t,n,r)=>(e.push(r.slice(n)),e),[]);return o.length===0&&o.push([``]),{colorPalette:{value:a,roots:r,keys:o}}}}],H_=e=>Lt(e)&&Object.prototype.hasOwnProperty.call(e,`value`);function U_(e){return e?{breakpoints:hh(e,e=>({value:e})),sizes:eg(e,(e,t)=>[`breakpoint-${e}`,{value:t}])}:{breakpoints:{},sizes:{}}}function W_(e){let{prefix:t=``,tokens:n={},semanticTokens:r={},breakpoints:i={}}=e,a=e=>e.join(`.`),o=(e,t)=>Fh(e.join(`-`),{prefix:t}),s=[],c=new Map,l=new Map,u=new Map,d=new Map,f=new Map,p=new Map,m=new Map,h=new Map,g=[];function _(e,t){s.push(e),(e.extensions.condition===`base`||!c.has(e.name))&&c.set(e.name,e),t&&h.forEach(n=>{n.enforce===t&&k(n,e)})}let v=U_(i),y=It({...n,breakpoints:v.breakpoints,sizes:{...n.sizes,...v.sizes}});function b(){mh(y,(e,t)=>{let n=t.includes(`DEFAULT`);t=G_(t);let r=t[0],i=a(t),o=D_(r,(Rt(e)?{value:e}:e).value),s={value:o,originalValue:o,name:i,path:t,extensions:{condition:`base`,originalPath:t,category:r,prop:a(t.slice(1))}};n&&(s.extensions.default=!0),_(s)},{stop:H_}),mh(r,(e,t)=>{let n=t.includes(`DEFAULT`);t=K_(G_(t));let r=t[0],i=a(t),o=O_(r,(Rt(e.value)||Array.isArray(e.value)?{value:{base:e.value}}:e).value),s={value:o.base??``,originalValue:o.base??``,name:i,path:t,extensions:{originalPath:t,category:r,conditions:o,condition:`base`,prop:a(t.slice(1))}};n&&(s.extensions.default=!0),_(s)},{stop:H_})}function x(e){return c.get(e)}function S(e){let{condition:t}=e.extensions;t&&(l.has(t)||l.set(t,new Set),l.get(t).add(e))}function C(e){let{category:t,prop:n,condition:r,conditions:i}=e.extensions;if(!t)return;m.has(t)||m.set(t,new Map);let a=m.get(t),o=a.get(n);(r==null||r===`base`||i&&!o)&&a.set(n,e)}function w(e){let{condition:t,negative:n,virtual:r,cssVar:i}=e.extensions;!n&&!r&&t&&i&&e.value!==``&&(u.has(t)||u.set(t,new Map),u.get(t).set(i.var,e.value))}function T(e){let{category:t,prop:n,cssVar:r,negative:i}=e.extensions;if(!t)return;p.has(t)||p.set(t,new Map);let a=i?e.extensions.conditions?e.originalValue:e.value:r.ref;p.get(t).set(n,a),f.set([t,n].join(`.`),a)}function E(e){let{colorPalette:t,virtual:n,default:r}=e.extensions;t&&!n&&t.roots.forEach(n=>{let i=a(n);d.has(i)||d.set(i,new Map);let o=J_([...e.path],[...n]),s=x(a(o));if(!s||!s.extensions.cssVar)return;let{var:c}=s.extensions.cssVar;if(d.get(i).set(c,e.extensions.cssVar.ref),r&&n.length===1){let r=x(a([`colors`,`colorPalette`]));if(!r)return;let i=x(a(e.path));if(!i)return;let o=t.keys[0]?.filter(Boolean);if(!o.length)return;let s=a(n.concat(o));d.has(s)||d.set(s,new Map),d.get(s).set(r.extensions.cssVar.var,i.extensions.cssVar.ref)}})}let ee={};function D(){s.forEach(e=>{S(e),C(e),w(e),T(e),E(e)}),ee=b_(p)}let O=(e,t)=>{if(!e||typeof e!=`string`)return{invalid:!0,value:e};let[n,r]=e.split(`/`);if(!n||!r)return{invalid:!0,value:n};let i=t(n),a=x(`opacity.${r}`)?.value;if(!a&&isNaN(Number(r)))return{invalid:!0,value:n};let o=a?Number(a)*100+`%`:`${r}%`,s=i??n;return{invalid:!1,color:s,value:`color-mix(in srgb, ${s} ${o}, transparent)`}},te=sg((e,t)=>f.get(e)??t),ne={prefix:t,allTokens:s,tokenMap:c,registerToken:_,getByName:x,formatTokenName:a,formatCssVar:o,flatMap:f,cssVarMap:u,categoryMap:m,colorPaletteMap:d,getVar:te,getCategoryValues:sg(e=>ee[e]||null),expandReferenceInValue:sg(e=>v_(e,e=>{if(e){if(e.includes(`/`)){let t=O(e,e=>te(e));if(t.invalid)throw Error(`Invalid color mix at `+e+`: `+t.value);return t.value}return te(e)||(C_.test(e)?__(e):e)}}))};function re(...e){e.forEach(e=>{h.set(e.name,e)})}function ie(...e){g.push(...e)}function k(e,t){if(t.extensions.references||zt(e.match)&&!e.match(t))return;let n=(t=>e.transform(t,ne))(t);switch(!0){case e.type===`extensions`:Object.assign(t.extensions,n);break;case e.type===`value`:t.value=n;break;default:t[e.type]=n}}function ae(e){g.forEach(t=>{t.enforce===e&&t.transform(ne)})}function A(e){h.forEach(t=>{t.enforce===e&&s.forEach(e=>{k(t,e)})})}function oe(){s.slice().forEach(e=>{let t=q_(e);t&&t.length!==0&&t.forEach(e=>{_(e)})})}function se(e){let t=w_(e),n=[];for(let e=0;e<t.length;e++){let r=x(t[e]);r&&n.push(r)}return n}function ce(){s.forEach(e=>{if(!T_(e.value))return;let t=se(e.value);e.extensions.references=t.reduce((e,t)=>(e[t.name]=t,e),{})})}function le(){s.forEach(e=>{E_(e)})}function ue(){ae(`pre`),A(`pre`),oe(),ce(),le(),ae(`post`),A(`post`),D()}return b(),re(...V_),ie(...B_),ue(),ne}function G_(e){return e[0]===`DEFAULT`?e:e.filter(e=>e!==`DEFAULT`)}function K_(e){return e.filter(e=>e!==`base`)}function q_(e){if(!e.extensions.conditions)return;let{conditions:t}=e.extensions,n=[];return mh(t,(t,r)=>{let i=K_(r);if(!i.length)return;let a={...e,value:t,extensions:{...e.extensions,condition:i.join(`:`)}};n.push(a)}),n}function J_(e,t){let n=e.findIndex((n,r)=>t.every((t,n)=>e[r+n]===t));return n===-1||(e.splice(n,t.length),e.splice(n,0,`colorPalette`)),e}m_()([`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 Y_(e){return e}function X_(e){return eg(e,(e,t)=>[e,Y_(t)])}function Z_(e){let t=X_(e.config),n=e.tokens,r=new Map,i=new Map;function a(e,n){t[e]=Y_(n),o(e,n)}let o=(e,t)=>{let n=h(t);n&&(i.set(e,n),d(e,t))},s=()=>{for(let[e,n]of Object.entries(t))n&&o(e,n)},c=()=>{for(let[e,n]of Object.entries(t)){let{shorthand:t}=n??{};t&&(Array.isArray(t)?t:[t]).forEach(t=>r.set(t,e))}},l=()=>{let e=b_(n.colorPaletteMap);a(`colorPalette`,{values:Object.keys(e),transform:sg(t=>e[t])})},u=new Map,d=(e,t)=>{if(!t)return;let n=h(t,e=>`type:Tokens["${e}"]`);if(typeof n==`object`&&n.type){u.set(e,new Set([`type:${n.type}`]));return}if(n){let t=new Set(Object.keys(n));u.set(e,t)}let r=u.get(e)??new Set;t.property&&u.set(e,r.add(`CssProperties["${t.property}"]`))},f=()=>{for(let[e,n]of Object.entries(t))n&&d(e,n)},p=(e,t)=>{let n=u.get(e)??new Set;u.set(e,new Set([...n,...t]))},m=()=>{let e=new Map;for(let[t,n]of u.entries()){if(n.size===0){e.set(t,[`string`]);continue}let r=Array.from(n).map(e=>e.startsWith(`CssProperties`)?e:e.startsWith(`type:`)?e.replace(`type:`,``):JSON.stringify(e));e.set(t,r)}return e},h=(e,t)=>{let{values:r}=e,i=e=>{let n=t?.(e);return n?{[n]:n}:void 0};if(Rt(r))return i?.(r)??n.getCategoryValues(r)??Cg;if(Array.isArray(r)){let e={};for(let t=0;t<r.length;t++)e[r[t]]=r[t];return e}return zt(r)?r(t?i:n.getCategoryValues):r},g=sg((e,t)=>({[e]:e.startsWith(`--`)?n.getVar(t,t):t})),_=Object.assign(n.getVar,{raw:e=>n.getByName(e)}),v=sg((e,r)=>{let a=x(e);Rt(r)&&!r.includes(`_EMO_`)&&(r=n.expandReferenceInValue(r));let o=t[a];if(!o)return g(a,r);let s=i.get(a)?.[r];return o.transform?o.transform(s??r,{raw:r,token:_,utils:{colorMix:e=>ch(e,_)}}):g(e,s??r)});function y(){c(),l(),s(),f()}y();let b=r.size>0,x=sg(e=>r.get(e)??e);return{keys:()=>[...Array.from(r.keys()),...Object.keys(t)],hasShorthand:b,transform:v,shorthands:r,resolveShorthand:x,register:a,getTypes:m,addPropertyType:p}}function Q_(...e){let t=vh(...e),{theme:n={},utilities:r={},globalCss:i={},cssVarsRoot:a=`:where(:root, :host)`,cssVarsPrefix:o=`chakra`,preflight:s}=t,c=a_(t),l=W_({breakpoints:n.breakpoints,tokens:n.tokens,semanticTokens:n.semanticTokens,prefix:o}),u=gg(n.breakpoints??Cg),d=Sg({conditions:t.conditions??Cg,breakpoints:u}),f=Z_({config:r,tokens:l});function p(){let{textStyles:e,layerStyles:t,animationStyles:r}=n,i=It({textStyle:e,layerStyle:t,animationStyle:r});for(let[e,t]of Object.entries(i)){let n=tg(t??Cg,ev);f.register(e,{values:Object.keys(n),transform(e){return y(n[e])}})}}p(),f.addPropertyType(`animationName`,Object.keys(n.keyframes??Cg));let m=new Set([`css`,...f.keys(),...d.keys()]),h=sg(e=>m.has(e)||$h(e)),g=e=>{if(Array.isArray(e)){let t=Tg();for(let n=0;n<e.length;n++){let r=e[n];if(r!=null){let e=d.breakpoints[n];t[e]=r}}return t}return e},_=o_({utility:f,normalize:g}),v=c_({conditions:d,isValidProperty:h}),y=Yg({transform:f.transform,conditions:d,normalize:_}),b=e_({css:y,conditions:d,normalize:_,layers:c}),x=p_({cva:b});function S(){let e={};for(let[t,n]of l.cssVarMap.entries()){let r=Object.fromEntries(n);if(Object.keys(r).length===0)continue;let i=t===`base`?a:d.resolve(t),o=i.startsWith(`@`);fh(e,y(v({[i]:o?{[a]:r}:r})))}return c.wrap(`tokens`,e)}function C(){let e=eg(n.keyframes??Cg,(e,t)=>[`@keyframes ${e}`,t]),t=Object.assign({},e,y(v(i)));return c.wrap(`base`,t)}function w(e){return Xt(e,h)}function T(){let e=s_({preflight:s});return c.wrap(`reset`,e)}let E=$_(l),ee=(e,t)=>E.get(e)?.value||t;ee.var=(e,t)=>E.get(e)?.variable||t;function D(e,t){return n.recipes?.[e]??t}function O(e,t){return n.slotRecipes?.[e]??t}let te=new Map,ne=new Map;function re(e,t){let n=te.get(e);return n||(n=b(D(e,t??Cg)),te.set(e,n)),n}function ie(e,t){let n=ne.get(e);return n||(n=x(O(e,t??Cg)),ne.set(e,n)),n}function k(e){return Object.hasOwnProperty.call(n.recipes??Cg,e)}function ae(e){return Object.hasOwnProperty.call(n.slotRecipes??Cg,e)}function A(e){return k(e)||ae(e)}return{$$chakra:!0,_config:t,_global:[T(),C(),S()],breakpoints:u,tokens:l,conditions:d,utility:f,token:ee,properties:m,layers:c,isValidProperty:h,splitCssProps:w,normalizeValue:g,getTokenCss:S,getGlobalCss:C,getPreflightCss:T,css:y,cva:b,sva:x,getRecipe:D,getSlotRecipe:O,getRecipeFn:re,getSlotRecipeFn:ie,hasRecipe:A,isRecipe:k,isSlotRecipe:ae,query:{layerStyles:tv(n.layerStyles??Cg),textStyles:tv(n.textStyles??Cg),animationStyles:tv(n.animationStyles??Cg),tokens:nv(l,Object.keys(n.tokens??Cg),(e,t)=>!e.extensions.conditions&&!t.includes(`colorPalette`)),semanticTokens:nv(l,Object.keys(n.semanticTokens??Cg),e=>!!e.extensions.conditions),keyframes:rv(n.keyframes??Cg),breakpoints:rv(n.breakpoints??Cg)}}}function $_(e){let t=new Map,n=new Set(e.allTokens.map(e=>e.name));for(let r of n){let n=e.getByName(r);if(!n?.extensions.cssVar)continue;let{cssVar:i,virtual:a,conditions:o}=n.extensions,s=o||a?i.ref:n.value;t.set(r,{value:s,variable:i.ref})}return t}var ev=e=>Lt(e)&&`value`in e,tv=e=>({list(){return Object.keys(tg(e,ev))},search(e){return this.list().filter(t=>t.includes(e))}}),nv=(e,t,n)=>({categoryKeys:t,list(t){let r=e.categoryMap.get(t),i=r?[...r.entries()]:[],a=[];for(let e=0;e<i.length;e++){let[t,r]=i[e];n(r,t)&&a.push(t)}return a},search(e,t){return this.list(e).filter(e=>e.includes(t))}}),rv=e=>({list(){return Object.keys(e)},search(e){return this.list().filter(t=>t.includes(e))}}),iv={sm:`480px`,md:`768px`,lg:`1024px`,xl:`1280px`,"2xl":`1536px`},av=`var(--chakra-empty, )`,ov=Sh({"*":{fontFeatureSettings:`"cv11"`,"--ring-inset":av,"--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}`,av])),...Object.fromEntries([`blur`,`brightness`,`contrast`,`grayscale`,`hue-rotate`,`invert`,`opacity`,`saturate`,`sepia`].map(e=>[`--backdrop-${e}`,av])),"--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`}}),sv=Eh({"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:{}}}),cv=Th({"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`}}}),lv=bh({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`}}),uv=bh({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`}}),dv=bh({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:fv,defaultVariants:pv}=lv,mv=bh({className:`chakra-code`,base:{fontFamily:`mono`,alignItems:`center`,display:`inline-flex`,borderRadius:`l2`},variants:fv,defaultVariants:pv}),hv=bh({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`}}),gv=bh({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`}}}}),_v=bh({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`}}),vv=bh({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`}}),yv=bh({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`}}),bv=bh({className:`chakra-input-addon`,base:{flex:`0 0 auto`,width:`auto`,display:`flex`,alignItems:`center`,whiteSpace:`nowrap`,alignSelf:`stretch`,borderRadius:`l2`},variants:{size:yv.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`}}),xv=bh({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`}}),Sv=bh({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`}}),Cv=bh({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:{}}}}),wv=bh({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`}}),Tv={badge:lv,button:uv,code:mv,container:gv,heading:_v,input:yv,inputAddon:bv,kbd:xv,link:Sv,mark:Cv,separator:bh({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`}}),skeleton:bh({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}}),skipNavLink:bh({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`}}}),spinner:bh({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`}}),textarea:bh({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`}}),icon:vv,checkmark:dv,radiomark:wv,colorSwatch:hv},Ev=kh.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}`}}}}),Dv=kh.radii({l1:{value:`{radii.xs}`},l2:{value:`{radii.sm}`},l3:{value:`{radii.md}`}}),Ov=kh.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}`}}}),kv=Qo.extendWith(`itemBody`),Av=z(`action-bar`).parts(`positioner`,`content`,`separator`,`selectionTrigger`,`closeTrigger`),jv=z(`alert`).parts(`title`,`description`,`root`,`indicator`,`content`),Mv=z(`breadcrumb`).parts(`link`,`currentLink`,`item`,`list`,`root`,`ellipsis`,`separator`),Nv=z(`blockquote`).parts(`root`,`icon`,`content`,`caption`),Pv=z(`card`).parts(`root`,`header`,`body`,`footer`,`title`,`description`),Fv=z(`checkbox-card`,[`root`,`control`,`label`,`description`,`addon`,`indicator`,`content`]),Iv=z(`data-list`).parts(`root`,`item`,`itemLabel`,`itemValue`),Lv=Md.extendWith(`indicatorGroup`),Rv=Nd.extendWith(`header`,`body`,`footer`,`backdrop`),zv=Nd.extendWith(`header`,`body`,`footer`,`backdrop`),Bv=$d.extendWith(`textarea`),Vv=z(`empty-state`,[`root`,`content`,`indicator`,`title`,`description`]),Hv=ef.extendWith(`requiredIndicator`),Uv=nf.extendWith(`content`),Wv=rf.extendWith(`itemContent`,`dropzoneContent`,`fileText`),Gv=z(`list`).parts(`root`,`item`,`indicator`),Kv=Df.extendWith(`itemCommand`),qv=z(`select`).parts(`root`,`field`,`indicator`),Jv=Af.extendWith(`header`,`body`,`footer`),Yv=Nf.extendWith(`itemAddon`,`itemIndicator`),Xv=Yv.extendWith(`itemContent`,`itemDescription`),Zv=Pf.extendWith(`itemIndicator`),Qv=Lf.extendWith(`indicatorGroup`),$v=kd.extendWith(`indicatorGroup`,`empty`),ey=up.extendWith(`markerIndicator`,`markerLabel`),ty=z(`stat`).parts(`root`,`label`,`helpText`,`valueText`,`valueUnit`,`indicator`),ny=z(`status`).parts(`root`,`indicator`),ry=z(`steps`,[`root`,`list`,`item`,`trigger`,`indicator`,`separator`,`content`,`title`,`description`,`nextTrigger`,`prevTrigger`,`progress`]),iy=fp.extendWith(`indicator`),ay=z(`table`).parts(`root`,`header`,`body`,`row`,`columnHeader`,`cell`,`footer`,`caption`),oy=z(`toast`).parts(`root`,`title`,`description`,`indicator`,`closeTrigger`,`actionTrigger`),sy=z(`tabs`).parts(`root`,`trigger`,`list`,`content`,`contentGroup`,`indicator`),cy=z(`tag`).parts(`root`,`label`,`closeTrigger`,`startElement`,`endElement`),ly=z(`timeline`).parts(`root`,`item`,`content`,`separator`,`indicator`,`connector`,`title`,`description`),uy=md.extendWith(`channelText`),dy=z(`code-block`,[`root`,`content`,`title`,`header`,`footer`,`control`,`overlay`,`code`,`codeText`,`copyTrigger`,`copyIndicator`,`collapseTrigger`,`collapseIndicator`,`collapseText`]),fy=dp.extendWith(`resizeTriggerSeparator`,`resizeTriggerIndicator`);Rc.extendWith(`valueText`);var py=Tf,my=U({className:`chakra-accordion`,slots:kv.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`}}),hy=U({className:`chakra-action-bar`,slots:Av.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`}}),gy=U({slots:jv.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}}),_y=U({slots:$o.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`}}),vy=U({className:`chakra-blockquote`,slots:Nv.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`}}),yy=U({className:`chakra-breadcrumb`,slots:Mv.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`}}),by=U({className:`chakra-card`,slots:Pv.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`}}),xy=U({className:`carousel`,slots:dc.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:{}}),Sy=U({slots:Lc.keys(),className:`chakra-checkbox`,base:{root:{display:`inline-flex`,gap:`2`,alignItems:`center`,verticalAlign:`top`,position:`relative`},control:dv.base,label:{fontWeight:`medium`,userSelect:`none`,_disabled:{opacity:`0.5`}}},variants:{size:{xs:{root:{gap:`1.5`},label:{textStyle:`xs`},control:dv.variants?.size?.xs},sm:{root:{gap:`2`},label:{textStyle:`sm`},control:dv.variants?.size?.sm},md:{root:{gap:`2.5`},label:{textStyle:`sm`},control:dv.variants?.size?.md},lg:{root:{gap:`3`},label:{textStyle:`md`},control:dv.variants?.size?.lg}},variant:{outline:{control:dv.variants?.variant?.outline},solid:{control:dv.variants?.variant?.solid},subtle:{control:dv.variants?.variant?.subtle}}},defaultVariants:{variant:`solid`,size:`md`}}),Cy=U({slots:Fv.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:dv.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:dv.variants?.size.sm},md:{root:{textStyle:`sm`},control:{padding:`4`,gap:`2.5`},addon:{px:`4`,py:`2`,borderTopWidth:`1px`},indicator:dv.variants?.size.md},lg:{root:{textStyle:`md`},control:{padding:`4`,gap:`3.5`},addon:{px:`4`,py:`2`,borderTopWidth:`1px`},indicator:dv.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:dv.variants?.variant.solid},subtle:{root:{bg:`bg.muted`},control:{_checked:{bg:`colorPalette.muted`,color:`colorPalette.fg`}},indicator:dv.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:dv.variants?.variant.solid},solid:{root:{borderWidth:`1px`,_checked:{bg:`colorPalette.solid`,color:`colorPalette.contrast`,borderColor:`colorPalette.solid`}},indicator:dv.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`}}),wy=U({slots:dy.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`}}),Ty=U({slots:zc.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`}}}}}),Ey=U({className:`colorPicker`,slots:uy.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:{...hv.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:{...yv.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:yv.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:yv.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:yv.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:yv.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:yv.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:yv.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:yv.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:yv.variants?.variant?.outline,trigger:{borderWidth:`1px`}},subtle:{channelInput:yv.variants?.variant?.subtle,trigger:{borderWidth:`1px`,borderColor:`transparent`,bg:`bg.muted`}}}},defaultVariants:{size:`md`,variant:`outline`}}),Dy=U({className:`chakra-combobox`,slots:$v.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`}}),Oy=U({slots:Iv.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`}}),ky=U({className:`chakra-date-input`,slots:Ad.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`}}),Ay=Ch({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`}}),jy=Ch({height:`var(--datepicker-select-height)`,ps:`2`,pe:`8`,textStyle:`sm`,borderWidth:`1px`,borderRadius:`l2`,outline:`none`,focusVisibleRing:`inside`,appearance:`none`,fieldSizing:`content`,backgroundImage:`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")`,backgroundRepeat:`no-repeat`,backgroundPosition:`right 0.375rem center`,backgroundSize:`1.25em`}),My=U({className:`date-picker`,slots:Lv.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:Ay,nextTrigger:Ay,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:jy,yearSelect:jy,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`}}),Ny=U({slots:Rv.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`}}),Py=U({slots:zv.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`}}),Fy=Ch({fontSize:`inherit`,fontWeight:`inherit`,textAlign:`inherit`,bg:`transparent`,borderRadius:`l2`}),Iy=U({slots:Bv.keys(),className:`chakra-editable`,base:{root:{display:`inline-flex`,alignItems:`center`,position:`relative`,gap:`1.5`,width:`full`},preview:{...Fy,py:`1`,px:`1`,display:`inline-flex`,alignItems:`center`,transitionProperty:`common`,transitionDuration:`moderate`,cursor:`text`,_hover:{bg:`bg.muted`},_disabled:{userSelect:`none`}},input:{...Fy,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`}}),Ly=U({slots:Vv.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`}}),Ry=U({className:`chakra-field`,slots:Hv.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`}}),zy=U({className:`fieldset`,slots:Uv.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`}}),By=U({className:`chakra-file-upload`,slots:Wv.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:{}}),Vy=U({slots:af.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)`}}}}),Hy=U({className:`chakra-hover-card`,slots:of.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`}}),Uy=U({className:`chakra-list`,slots:Gv.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`}}),Wy=U({className:`chakra-listbox`,slots:py.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`}}),Gy=U({className:`chakra-marquee`,slots:Ef.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)`}}}}),Ky=U({className:`chakra-menu`,slots:Kv.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`}}),qy=U({className:`chakra-select`,slots:Qv.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`}}),Jy=U({className:`chakra-native-select`,slots:qv.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:qy.variants?.variant.outline.trigger},subtle:{field:qy.variants?.variant.subtle.trigger},plain:{field:{bg:`transparent`,color:`fg`,focusRingWidth:`2px`}},ghost:{field:qy.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:qy.defaultVariants}),Yy=Ch({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`}}),Xy=U({className:`chakra-number-input`,slots:Of.keys(),base:{root:{position:`relative`,zIndex:`0`,isolation:`isolate`},input:{...yv.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:{...Yy,borderTopEndRadius:`var(--stepper-radius)`},decrementTrigger:{...Yy,borderBottomEndRadius:`var(--stepper-radius)`},valueText:{fontWeight:`medium`,fontFeatureSettings:`pnum`,fontVariantNumeric:`proportional-nums`}},variants:{size:{xs:{input:yv.variants.size.xs,control:{fontSize:`2xs`,"--stepper-width":`sizes.4`}},sm:{input:yv.variants.size.sm,control:{fontSize:`xs`,"--stepper-width":`sizes.5`}},md:{input:yv.variants.size.md,control:{fontSize:`sm`,"--stepper-width":`sizes.6`}},lg:{input:yv.variants.size.lg,control:{fontSize:`sm`,"--stepper-width":`sizes.6`}}},variant:eg(yv.variants.variant,(e,t)=>[e,{input:t}])},defaultVariants:{size:`md`,variant:`outline`}}),{variants:Zy,defaultVariants:Qy}=yv,$y=U({className:`chakra-pin-input`,slots:kf.keys(),base:{input:{...yv.base,textAlign:`center`,width:`var(--input-height)`},control:{display:`inline-flex`,gap:`2`,isolation:`isolate`}},variants:{size:eg(Zy.size,(e,t)=>[e,{input:{...t,px:`1`}}]),variant:eg(Zy.variant,(e,t)=>[e,{input:t}]),attached:{true:{control:{gap:`0`,spaceX:`-1px`},input:{_notFirst:{borderStartRadius:`0`},_notLast:{borderEndRadius:`0`},_focusVisible:{zIndex:`1`}}}}},defaultVariants:Qy}),eb=U({className:`chakra-popover`,slots:Jv.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`}}),tb=U({slots:jf.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`}}),nb=U({className:`chakra-progress-circle`,slots:jf.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`}}),rb=U({slots:Mf.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`}}),ib=U({className:`chakra-radio-card`,slots:Xv.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:wv.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:wv.variants?.size.sm},md:{item:{textStyle:`sm`},itemControl:{padding:`4`,gap:`2.5`},itemAddon:{px:`4`,py:`2`,borderTopWidth:`1px`},itemIndicator:wv.variants?.size.md},lg:{item:{textStyle:`md`},itemControl:{padding:`4`,gap:`3.5`},itemAddon:{px:`4`,py:`2`,borderTopWidth:`1px`},itemIndicator:wv.variants?.size.lg}},variant:{surface:{item:{borderWidth:`1px`,_checked:{bg:`colorPalette.subtle`,color:`colorPalette.fg`,borderColor:`colorPalette.muted`}},itemIndicator:wv.variants?.variant.solid},subtle:{item:{bg:`bg.muted`},itemControl:{_checked:{bg:`colorPalette.muted`,color:`colorPalette.fg`}},itemIndicator:wv.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:wv.variants?.variant.solid},solid:{item:{borderWidth:`1px`,_checked:{bg:`colorPalette.solid`,color:`colorPalette.contrast`,borderColor:`colorPalette.solid`}},itemControl:{_disabled:{bg:`unset`}},itemIndicator:wv.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`}}),ab=U({className:`chakra-radio-group`,slots:Yv.keys(),base:{item:{display:`inline-flex`,alignItems:`center`,position:`relative`,fontWeight:`medium`,_disabled:{cursor:`disabled`}},itemControl:wv.base,label:{userSelect:`none`,textStyle:`sm`,_disabled:{opacity:`0.5`}}},variants:{variant:{outline:{itemControl:wv.variants?.variant?.outline},subtle:{itemControl:wv.variants?.variant?.subtle},solid:{itemControl:wv.variants?.variant?.solid}},size:{xs:{item:{textStyle:`xs`,gap:`1.5`},itemControl:wv.variants?.size?.xs},sm:{item:{textStyle:`sm`,gap:`2`},itemControl:wv.variants?.size?.sm},md:{item:{textStyle:`sm`,gap:`2.5`},itemControl:wv.variants?.size?.md},lg:{item:{textStyle:`md`,gap:`3`},itemControl:wv.variants?.size?.lg}}},defaultVariants:{size:`md`,variant:`solid`}}),ob=U({className:`chakra-rating-group`,slots:Zv.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`}}),sb=U({className:`chakra-scroll-area`,slots:Ff.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`}}),cb=U({className:`chakra-segment-group`,slots:If.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`}}),lb=U({className:`chakra-slider`,slots:ey.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`}}),ub=U({slots:fy.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`}}}}),db=U({className:`chakra-stat`,slots:ty.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`}}),fb=U({className:`chakra-status`,slots:ny.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`}}),pb=U({className:`chakra-steps`,slots:ry.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`}}),mb=U({slots:iy.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`}}),hb=U({className:`chakra-table`,slots:ay.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`}}),gb=U({slots:sy.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`}}),_b=lv.variants?.variant,vb=U({slots:cy.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:_b?.subtle},solid:{root:_b?.solid},outline:{root:_b?.outline},surface:{root:_b?.surface}}},defaultVariants:{size:`md`,variant:`surface`}}),yb=U({slots:pp.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`}}),bb=U({slots:ly.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}}),xb=U({slots:oy.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`}}}}),Sb=U({slots:hp.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)`}}}),Cb=Ch({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`}}),wb=Ch({flex:`1`}),Tb=Ch({_selected:{bg:`colorPalette.subtle`,color:`colorPalette.fg`}}),Eb=Ch({_selected:{layerStyle:`fill.solid`}}),Db={accordion:my,actionBar:hy,alert:gy,avatar:_y,blockquote:vy,breadcrumb:yy,card:by,carousel:xy,checkbox:Sy,checkboxCard:Cy,codeBlock:wy,collapsible:Ty,dataList:Oy,dateInput:ky,datePicker:My,dialog:Ny,drawer:Py,editable:Iy,emptyState:Ly,field:Ry,fieldset:zy,fileUpload:By,hoverCard:Hy,list:Uy,listbox:Wy,menu:Ky,nativeSelect:Jy,numberInput:Xy,pinInput:$y,popover:eb,progress:tb,progressCircle:nb,radioCard:ib,radioGroup:ab,ratingGroup:ob,scrollArea:sb,segmentGroup:cb,select:qy,combobox:Dy,slider:lb,splitter:ub,stat:db,steps:pb,switch:mb,table:hb,tabs:gb,tag:vb,tagsInput:yb,toast:xb,tooltip:Sb,status:fb,timeline:bb,colorPicker:Ey,qrCode:rb,treeView:U({slots:gp.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:Cb,item:Cb,itemText:wb,branchText:wb,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:Tb,item:Tb},solid:{branchControl:Eb,item:Eb}},animateContent:{true:{branchContent:{_open:{animationName:`expand-height, fade-in`,animationDuration:`moderate`},_closed:{animationName:`collapse-height, fade-out`,animationDuration:`moderate`}}}}},defaultVariants:{size:`md`,variant:`subtle`}}),marquee:Gy,floatingPanel:Vy},Ob=wh({"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`}}}),kb=Oh.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`}}),Ab=Oh.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`}}),jb=Oh.blurs({none:{value:` `},sm:{value:`4px`},md:{value:`8px`},lg:{value:`12px`},xl:{value:`16px`},"2xl":{value:`24px`},"3xl":{value:`40px`},"4xl":{value:`64px`}}),Mb=Oh.borders({xs:{value:`0.5px solid`},sm:{value:`1px solid`},md:{value:`2px solid`},lg:{value:`4px solid`},xl:{value:`8px solid`}}),Nb=Oh.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`}}}),Pb=Oh.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`}}),Fb=Oh.durations({fastest:{value:`50ms`},faster:{value:`100ms`},fast:{value:`150ms`},moderate:{value:`200ms`},slow:{value:`300ms`},slower:{value:`400ms`},slowest:{value:`500ms`}}),Ib=Oh.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)`}}),Lb=Oh.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`}}),Rb=Oh.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`}}),zb=`-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,Bb=Oh.fonts({heading:{value:`Inter, ${zb}`},body:{value:`Inter, ${zb}`},mono:{value:`SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace`}}),Vb=xh({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))`}}}),Hb=Oh.letterSpacings({tighter:{value:`-0.05em`},tight:{value:`-0.025em`},wide:{value:`0.025em`},wider:{value:`0.05em`},widest:{value:`0.1em`}}),Ub=Oh.lineHeights({shorter:{value:1.25},short:{value:1.375},moderate:{value:1.5},tall:{value:1.625},taller:{value:2}}),Wb=Oh.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`}}),Gb=Oh.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`}}),Kb=Oh.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`}}),qb=Oh.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`}}),Jb=Oh.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%`}}),Yb=Q_(vh(Kh,Ah({preflight:!0,cssVarsPrefix:`chakra`,cssVarsRoot:`:where(html, .chakra-theme)`,globalCss:ov,theme:{breakpoints:iv,keyframes:Vb,tokens:{aspectRatios:Ab,animations:kb,blurs:jb,borders:Mb,colors:Nb,durations:Fb,easings:Ib,fonts:Bb,fontSizes:Lb,fontWeights:Rb,letterSpacings:Hb,lineHeights:Ub,radii:Wb,spacing:Gb,sizes:Oh.sizes({...Kb,...Gb,...Jb,...qb}),zIndex:Oh.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}}),cursor:Pb},semanticTokens:{colors:Ev,shadows:Ov,radii:Dv},recipes:Tv,slotRecipes:Db,textStyles:Ob,layerStyles:sv,animationStyles:cv}}))),Xb=dn(`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`}});Xb.displayName=`AbsoluteCenter`;var Zb=e=>(0,P.jsx)(dn.svg,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:(0,P.jsx)(`path`,{d:`M20 6 9 17l-5-5`})}),Qb=e=>(0,P.jsx)(dn.svg,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:(0,P.jsx)(`path`,{d:`m6 9 6 6 6-6`})}),$b=e=>(0,P.jsx)(dn.svg,{viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,P.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`})}),{PropsProvider:ex,withContext:tx}=Cn({key:`badge`}),nx=tx(`span`),{withContext:rx,PropsProvider:ix}=Cn({key:`spinner`}),ax=rx(`span`),ox=N.forwardRef(function(e,t){let{spinner:n=(0,P.jsx)(ax,{size:`inherit`,borderWidth:`0.125em`,color:`inherit`}),spinnerPlacement:r=`start`,children:i,text:a,visible:o=!0,...s}=e;return o?a?(0,P.jsxs)(Ho,{ref:t,display:`contents`,...s,children:[r===`start`&&n,a,r===`end`&&n]}):n?(0,P.jsxs)(Ho,{ref:t,display:`contents`,...s,children:[(0,P.jsx)(Xb,{display:`inline-flex`,children:n}),(0,P.jsx)(Ho,{visibility:`hidden`,display:`contents`,children:i})]}):(0,P.jsx)(Ho,{ref:t,display:`contents`,...s,children:i}):i});ox.displayName=`Loader`;var{useRecipeResult:sx,PropsProvider:cx,usePropsContext:lx}=Cn({key:`button`}),ux=(0,N.forwardRef)(function(e,t){let n=lx(),r=(0,N.useMemo)(()=>Mt(n,e),[n,e]),i=sx(r),{loading:a,loadingText:o,children:s,spinner:c,spinnerPlacement:l,...u}=i.props;return(0,P.jsx)(dn.button,{type:`button`,ref:t,...u,"data-loading":I(a),disabled:a||u.disabled,className:Bt(i.className,r.className),css:[i.styles,r.css],children:!r.asChild&&a?(0,P.jsx)(ox,{spinner:c,text:o,spinnerPlacement:l,children:s}):s})});ux.displayName=`Button`;function dx(e){let{when:t,fallback:n,children:r}=e,i;return i=t?typeof r==`function`?r(t):r:n,(0,N.isValidElement)(i)?i:(0,P.jsx)(P.Fragment,{children:i})}var fx=e=>{let{children:t,fallback:n}=e,[r,i]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{i(!0)},[]),(0,P.jsx)(dx,{when:r,fallback:n,children:t})},px=(0,N.forwardRef)(function(e,t){return(0,P.jsx)(ux,{px:`0`,py:`0`,_icon:{fontSize:`1.2em`},ref:t,...e})});px.displayName=`IconButton`;function mx(e){let{gap:t,direction:n}=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{"&":hh(n,e=>r[e])}}function hx(e){return N.Children.toArray(e).filter(e=>(0,N.isValidElement)(e))}var gx=(0,N.forwardRef)(function(e,t){let{direction:n=`column`,align:r,justify:i,gap:a=`0.5rem`,wrap:o,children:s,separator:c,className:l,...u}=e,d=(0,N.useMemo)(()=>mx({gap:a,direction:n}),[a,n]),f=(0,N.useMemo)(()=>(0,N.isValidElement)(c)?hx(s).map((e,t,n)=>{let r=e.key===void 0?t:e.key,i=c,a=(0,N.cloneElement)(i,{css:[d,i.props.css]});return(0,P.jsxs)(N.Fragment,{children:[e,t===n.length-1?null:a]},r)}):s,[s,c,d]);return(0,P.jsx)(dn.div,{ref:t,display:`flex`,alignItems:r,justifyContent:i,flexDirection:n,flexWrap:o,gap:c?void 0:a,className:Bt(`chakra-stack`,l),...u,children:f})});gx.displayName=`Stack`;var{withRootProvider:_x,withContext:vx,useStyles:yx,PropsProvider:bx}=Jo({key:`dialog`});_x(Qp.RootProvider,{defaultProps:{unmountOnExit:!0,lazyMount:!0}});var xx=_x(Qp.Root,{defaultProps:{unmountOnExit:!0,lazyMount:!0}});vx(Qp.Trigger,`trigger`,{forwardAsChild:!0});var Sx=vx(Qp.Positioner,`positioner`,{forwardAsChild:!0}),Cx=vx(Qp.Content,`content`,{forwardAsChild:!0}),wx=vx(Qp.Description,`description`,{forwardAsChild:!0}),Tx=vx(Qp.Title,`title`,{forwardAsChild:!0}),Ex=vx(Qp.CloseTrigger,`closeTrigger`,{forwardAsChild:!0}),Dx=(0,N.forwardRef)(function(e,t){let n=zp();return(0,P.jsx)(dn.button,{type:`button`,...e,ref:t,onClick:t=>{e.onClick?.(t),n.setOpen(!1)}})}),Ox=vx(Qp.Backdrop,`backdrop`,{forwardAsChild:!0}),kx=vx(`div`,`body`),Ax=vx(`div`,`footer`),jx=vx(`div`,`header`);Qp.Context;var Mx=(0,N.forwardRef)(function(e,t){return(0,P.jsx)(gx,{align:`center`,...e,direction:`row`,ref:t})});Mx.displayName=`HStack`;var{withContext:Nx,PropsProvider:Px}=Cn({key:`input`}),Fx=Nx(Ip.Input),{withProvider:Ix,withContext:Lx,useStyles:Rx,PropsProvider:zx}=Jo({key:`listbox`});Ix(Em.RootProvider,`root`,{forwardAsChild:!0});var Bx=Ix(Em.Root,`root`,{forwardAsChild:!0});Lx(Em.Input,`input`,{forwardAsChild:!0});var Vx=Lx(Em.Content,`content`,{forwardAsChild:!0});Lx(Em.ValueText,`valueText`,{forwardAsChild:!0}),Lx(Em.ItemGroup,`itemGroup`,{forwardAsChild:!0}),Lx(Em.ItemGroupLabel,`itemGroupLabel`,{forwardAsChild:!0});var Hx=Lx(Em.Item,`item`,{forwardAsChild:!0}),Ux=Lx(Em.ItemText,`itemText`,{forwardAsChild:!0});Lx(Em.ItemIndicator,`itemIndicator`,{forwardAsChild:!0,defaultProps:{children:(0,P.jsx)(Zb,{})}});var Wx=Lx(Em.Label,`label`,{forwardAsChild:!0}),Gx=Lx(Em.Empty,`empty`,{forwardAsChild:!0});Em.Context,Em.ItemContext;var{withProvider:Kx,withContext:qx,useStyles:Jx,PropsProvider:Yx}=Jo({key:`select`});Kx(oh.RootProvider,`root`,{forwardAsChild:!0});var Xx=Kx(oh.Root,`root`,{forwardAsChild:!0,defaultProps:{positioning:{sameWidth:!0}}}),Zx=qx(oh.Trigger,`trigger`,{forwardAsChild:!0}),Qx=qx(oh.Positioner,`positioner`,{forwardAsChild:!0}),$x=qx(oh.Content,`content`,{forwardAsChild:!0});qx(oh.List,`list`,{forwardAsChild:!0});var eS=qx(oh.ValueText,`valueText`,{forwardAsChild:!0}),tS=qx(oh.ClearTrigger,`clearTrigger`,{forwardAsChild:!0,defaultProps:{children:(0,P.jsx)($b,{boxSize:`1em`})}}),nS=qx(oh.ItemGroup,`itemGroup`,{forwardAsChild:!0}),rS=qx(oh.ItemGroupLabel,`itemGroupLabel`,{forwardAsChild:!0}),iS=qx(oh.Item,`item`,{forwardAsChild:!0});qx(oh.ItemText,`itemText`,{forwardAsChild:!0});var aS=qx(oh.ItemIndicator,`itemIndicator`,{forwardAsChild:!0,defaultProps:{children:(0,P.jsx)(Zb,{})}}),oS=qx(`div`,`indicatorGroup`),sS=qx(oh.Indicator,`indicator`,{forwardAsChild:!0,defaultProps:{children:(0,P.jsx)(Qb,{})}}),cS=qx(oh.Control,`control`,{forwardAsChild:!0});qx(oh.Label,`label`,{forwardAsChild:!0});var lS=oh.Context,uS=oh.HiddenSelect;oh.ItemContext;var{withContext:dS,PropsProvider:fS}=Cn({key:`skeleton`}),pS=dS(`div`),mS=N.forwardRef(function(e,t){let{size:n,...r}=e;return(0,P.jsx)(hn,{size:n,asChild:!0,ref:t,children:(0,P.jsx)(pS,{...r})})});mS.displayName=`SkeletonCircle`;var hS=N.forwardRef(function(e,t){let{loading:n=!0,noOfLines:r=3,gap:i,rootProps:a,...o}=e;return(0,P.jsx)(gx,{gap:i,width:`full`,ref:t,...a,children:Array.from({length:n?r:1}).map((e,t)=>(0,P.jsx)(pS,{loading:n,height:n?`4`:void 0,maxW:n?t===r-1&&r>1?`80%`:`100%`:void 0,...o},t))})});hS.displayName=`SkeletonText`;var gS=(0,N.forwardRef)(function(e,t){return(0,P.jsx)(gx,{align:`center`,...e,direction:`column`,ref:t})});gS.displayName=`VStack`;var _S=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,te=O.port2;O.port1.onmessage=ee,D=function(){te.postMessage(null)}}else D=function(){_(ee,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),vS=o(((e,t)=>{t.exports=_S()})),yS=o((e=>{var t=vS(),n=h(),r=xo();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=p(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),ee=Symbol.for(`react.transitional.element`),D=Symbol.for(`react.portal`),O=Symbol.for(`react.fragment`),te=Symbol.for(`react.strict_mode`),ne=Symbol.for(`react.profiler`),re=Symbol.for(`react.consumer`),ie=Symbol.for(`react.context`),k=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),A=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.activity`),le=Symbol.for(`react.legacy_hidden`),ue=Symbol.for(`react.memo_cache_sentinel`),de=Symbol.for(`react.view_transition`),fe=Symbol.for(`react.recoverable`),pe=Symbol.iterator;function me(e){return typeof e!=`object`||!e?null:(e=pe&&e[pe]||e[`@@iterator`],typeof e==`function`?e:null)}var he=Symbol.for(`react.client.reference`);function ge(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case O:return`Fragment`;case ne:return`Profiler`;case te:return`StrictMode`;case ae:return`Suspense`;case A:return`SuspenseList`;case ce:return`Activity`;case de:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case D:return`Portal`;case ie:return e.displayName||`Context`;case re:return(e._context.displayName||`Context`)+`.Consumer`;case k:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?ge(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var _e=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye={pending:!1,data:null,method:null,action:null},be=[],xe=-1;function Se(e){return{current:e}}function M(e){0>xe||(e.current=be[xe],be[xe]=null,xe--)}function Ce(e,t){xe++,be[xe]=e.current,e.current=t}var we=Se(null),Te=Se(null),Ee=Se(null),De=Se(null);function Oe(e,t){switch(Ce(Ee,t),Ce(Te,e),Ce(we,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bp(t),e=xp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}M(we),Ce(we,e)}function ke(){M(we),M(Te),M(Ee)}function Ae(e){var t=e.memoizedState;t!==null&&(_h._currentValue=t.memoizedState,Ce(De,e)),t=we.current;var n=xp(t,e.type);t!==n&&(Ce(Te,e),Ce(we,n))}function je(e){Te.current===e&&(M(we),M(Te)),De.current===e&&(M(De),_h._currentValue=ye)}var Me,Ne;function Pe(e){if(Me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Me=t&&t[1]||``,Ne=-1<e.stack.indexOf(`
4
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
5
+ `+Me+e+Ne}var Fe=!1;function Ie(e,t){if(!e||Fe)return``;Fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
6
+ `),l=s.split(`
7
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
8
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Pe(n):``}function Le(e,t){switch(e.tag){case 26:case 27:case 5:return Pe(e.type);case 16:return Pe(`Lazy`);case 13:return e.child!==t&&t!==null?Pe(`Suspense Fallback`):Pe(`Suspense`);case 19:return Pe(`SuspenseList`);case 0:case 15:return Ie(e.type,!1);case 11:return Ie(e.type.render,!1);case 1:return Ie(e.type,!0);case 31:return Pe(`Activity`);case 30:return Pe(`ViewTransition`);default:return``}}function Re(e){try{var t=``,n=null;do t+=Le(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
9
+ Error generating stack: `+e.message+`
10
+ `+e.stack}}var ze=Object.prototype.hasOwnProperty,Be=t.unstable_scheduleCallback,Ve=t.unstable_cancelCallback,He=t.unstable_shouldYield,Ue=t.unstable_requestPaint,We=t.unstable_now,Ge=t.unstable_getCurrentPriorityLevel,Ke=t.unstable_ImmediatePriority,qe=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,Ye=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,Ze=t.log,Qe=t.unstable_setDisableYieldValue,$e=null,et=null;function tt(e){if(typeof Ze==`function`&&Qe(e),et&&typeof et.setStrictMode==`function`)try{et.setStrictMode($e,e)}catch{}}var nt=Math.clz32?Math.clz32:at,rt=Math.log,it=Math.LN2;function at(e){return e>>>=0,e===0?32:31-(rt(e)/it|0)|0}var ot=256,st=262144,ct=4194304;function lt(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ut(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=lt(n))):i=lt(o):i=lt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=lt(n))):i=lt(o)):i=lt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function dt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ft(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-nt(n),i=1<<r;t|=e[r],n&=~i}return t}function pt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 mt(){var e=ct;return ct<<=1,!(ct&62914560)&&(ct=4194304),e}function N(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ht(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-nt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&_t(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function _t(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-nt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function yt(e,t){var n=t&-t;return n=n&42?1:bt(n),(n&(e.suspendedLanes|t))===0?n:0}function bt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function xt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function St(){var e=ve.p;return e===0?(e=window.event,e===void 0?32:Mh(e.type)):e}function Ct(e,t){var n=ve.p;try{return ve.p=e,t()}finally{ve.p=n}}var wt=Math.random().toString(36).slice(2),Tt=`__reactFiber$`+wt,Et=`__reactProps$`+wt,Dt=`__reactContainer$`+wt,Ot=`__reactEvents$`+wt,kt=`__reactListeners$`+wt,At=`__reactHandles$`+wt,jt=`__reactResources$`+wt,Mt=`__reactMarker$`+wt,Nt=`__reactLoad$`+wt;function Pt(e){delete e[Tt],delete e[Et],delete e[kt],delete e[At]}function Ft(e){var t;if(t=e[Tt])return t;for(var n=e.parentNode;n;){if(t=n[Dt]||n[Tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sm(e);e!==null;){if(n=e[Tt])return n;e=Sm(e)}return t}e=n,n=e.parentNode}return null}function It(e){if(e=e[Tt]||e[Dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Lt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Rt(e){var t=e[jt];return t||=e[jt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function zt(e){e[Mt]=!0}function Bt(e){e[Nt]=void 0}var Vt=new Set,Ht={};function Ut(e,t){Wt(e,t),Wt(e+`Capture`,t)}function Wt(e,t){for(Ht[e]=t,e=0;e<t.length;e++)Vt.add(t[e])}var Gt=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]*$`),P={},Kt={};function qt(e){return ze.call(Kt,e)?!0:ze.call(P,e)?!1:Gt.test(e)?Kt[e]=!0:(P[e]=!0,!1)}var Jt=!1;function Yt(){var e=Jt;return Jt=!1,e}function Xt(e,t,n){if(qt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Zt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Qt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function $t(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function en(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function tn(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nn(e){if(!e._valueTracker){var t=en(e)?`checked`:`value`;e._valueTracker=tn(e,t,``+e[t])}}function rn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=en(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var an=/[\n"\\]/g;function on(e){return e.replace(an,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function sn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+$t(t)):e.value!==``+$t(t)&&(e.value=``+$t(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):ln(e,$t(n)):o===`number`&&e.value==t?ln(e,$t(e.value)):ln(e,$t(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+$t(s):e.removeAttribute(`name`)}function cn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){nn(e);return}n=n==null?``:``+$t(n),t=t==null?n:``+$t(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),nn(e)}function ln(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function un(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+$t(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function dn(e,t,n){t!=null&&(t=``+$t(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+$t(n)}function fn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(_e(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=$t(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),nn(e)}function pn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mn=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 hn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||mn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function gn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Jt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(hn(e,a,r),Jt=!0)}else for(var o in t)t.hasOwnProperty(o)&&hn(e,o,t[o])}function _n(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 vn=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`]]),yn=/^[\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 bn(e){return yn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function xn(){}var Sn=null;function Cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,Tn=null;function En(e){var t=It(e);if(t&&(e=t.stateNode)){var n=e[Et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(sn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+on(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Et]||null;if(!a)throw Error(i(90));sn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&rn(r)}break a;case`textarea`:dn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&un(e,!!n.multiple,t,!1)}}}var Dn=!1;function On(e,t,n){if(Dn)return e(t,n);Dn=!0;try{return e(t)}finally{if(Dn=!1,(wn!==null||Tn!==null)&&(qd(),wn&&(t=wn,e=Tn,Tn=wn=null,En(t),e)))for(t=0;t<e.length;t++)En(e[t])}}function kn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Et]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var An=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,jn=!1;if(An)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){jn=!0}}),window.addEventListener(`test`,Mn,Mn),window.removeEventListener(`test`,Mn,Mn)}catch{jn=!1}var Nn=null,Pn=null,Fn=null;function In(){if(Fn)return Fn;var e,t=Pn,n=t.length,r,i=`value`in Nn?Nn.value:Nn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Fn=i.slice(e,1<r?1-r:void 0)}function Ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rn(){return!0}function zn(){return!1}function Bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Rn:zn,this.isPropagationStopped=zn,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Rn)},persist:function(){},isPersistent:Rn}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hn=Bn(Vn),Un=T({},Vn,{view:0,detail:0}),Wn=Bn(Un),Gn,Kn,qn,Jn=T({},Un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ar,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==qn&&(qn&&e.type===`mousemove`?(Gn=e.screenX-qn.screenX,Kn=e.screenY-qn.screenY):Kn=Gn=0,qn=e),Gn)},movementY:function(e){return`movementY`in e?e.movementY:Kn}}),Yn=Bn(Jn),Xn=Bn(T({},Jn,{dataTransfer:0})),Zn=Bn(T({},Un,{relatedTarget:0})),Qn=Bn(T({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0})),$n=Bn(T({},Vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),er=Bn(T({},Vn,{data:0})),tr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},nr={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`},rr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ir(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rr[e])?!!t[e]:!1}function ar(){return ir}var or=Bn(T({},Un,{key:function(e){if(e.key){var t=tr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?nr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ar,charCode:function(e){return e.type===`keypress`?Ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),sr=Bn(T({},Jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),cr=Bn(T({},Vn,{submitter:0})),lr=Bn(T({},Un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ar})),ur=Bn(T({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),dr=Bn(T({},Jn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),F=Bn(T({},Vn,{newState:0,oldState:0,source:0})),fr=[9,13,27,32],pr=An&&`CompositionEvent`in window,mr=null;An&&`documentMode`in document&&(mr=document.documentMode);var hr=An&&`TextEvent`in window&&!mr,gr=An&&(!pr||mr&&8<mr&&11>=mr),_r=` `,vr=!1;function yr(e,t){switch(e){case`keyup`:return fr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xr=!1;function Sr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(vr=!0,_r):null;case`textInput`:return e=t.data,e===_r&&vr?null:e;default:return null}}function Cr(e,t){if(xr)return e===`compositionend`||!pr&&yr(e,t)?(e=In(),Fn=Pn=Nn=null,xr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return gr&&t.locale!==`ko`?null:t.data;default:return null}}var wr={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 Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){wn?Tn?Tn.push(r):Tn=[r]:wn=r,t=rp(t,`onChange`),0<t.length&&(n=new Hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){Xf(e,0)}function Ar(e){if(rn(Lt(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(An){var Nr;if(An){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Cn(e)),On(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ze.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function I(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kr(e,t){var n=Gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=I(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=I(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Xr=An&&`documentMode`in document&&11>=document.documentMode,Zr=null,Qr=null,$r=null,ei=!1;function ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zr==null||Zr!==I(r)||(r=Zr,`selectionStart`in r&&Yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$r&&Wr($r,r)||($r=r,r=rp(Qr,`onSelect`),0<r.length&&(t=new Hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ri={animationend:ni(`Animation`,`AnimationEnd`),animationiteration:ni(`Animation`,`AnimationIteration`),animationstart:ni(`Animation`,`AnimationStart`),transitionrun:ni(`Transition`,`TransitionRun`),transitionstart:ni(`Transition`,`TransitionStart`),transitioncancel:ni(`Transition`,`TransitionCancel`),transitionend:ni(`Transition`,`TransitionEnd`)},ii={},ai={};An&&(ai=document.createElement(`div`).style,`AnimationEvent`in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),`TransitionEvent`in window||delete ri.transitionend.transition);function oi(e){if(ii[e])return ii[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ai)return ii[e]=t[n];return e}var si=oi(`animationend`),ci=oi(`animationiteration`),li=oi(`animationstart`),ui=oi(`transitionrun`),di=oi(`transitionstart`),fi=oi(`transitioncancel`),pi=oi(`transitionend`),mi=new Map,hi=`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(` `);hi.push(`scrollEnd`);function gi(e,t){mi.set(e,t),Ut(t,[e])}var _i=0;function vi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Od.identifierPrefix;var n=_i++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function yi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Id;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function bi(e,t){return e=yi(e),t=yi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var xi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Si=[],Ci=0,wi=0;function Ti(){for(var e=Ci,t=wi=Ci=0;t<e;){var n=Si[t];Si[t++]=null;var r=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var a=Si[t];if(Si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ki(n,i,a)}}function Ei(e,t,n,r){Si[Ci++]=e,Si[Ci++]=t,Si[Ci++]=n,Si[Ci++]=r,wi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Di(e,t,n,r){return Ei(e,t,n,r),Ai(e)}function Oi(e,t){return Ei(e,null,null,t),Ai(e)}function ki(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-nt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ai(e){if(50<Ld)throw Ld=0,Rd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function Mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ni(e,t,n,r){return new Mi(e,t,n,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var n=e.alternate;return n===null?(n=Ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ii(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Li(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Pi(r)&&(s=1);else if(typeof r==`string`)s=rh(e,n,we.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ce:return e=Ni(31,n,t,a),e.elementType=ce,e.lanes=o,e;case O:return Ri(n.children,a,o,t);case te:s=8,a|=24;break;case ne:return e=Ni(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case ae:return e=Ni(13,n,t,a),e.elementType=ae,e.lanes=o,e;case A:return e=Ni(19,n,t,a),e.elementType=A,e.lanes=o,e;case le:case de:return e=a|32,e=Ni(30,n,t,e),e.elementType=de,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ie:s=10;break a;case re:s=9;break a;case k:s=11;break a;case oe:s=14;break a;case se:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ri(e,t,n,r){return e=Ni(7,e,r,t),e.lanes=n,e}function zi(e,t,n){return e=Ni(6,e,null,t),e.lanes=n,e}function Bi(e){var t=Ni(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return t=Ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hi=new WeakMap;function Ui(e,t){if(typeof e==`object`&&e){var n=Hi.get(e);return n===void 0?(t={value:e,source:t,stack:Re(t)},Hi.set(e,t),t):n}return{value:e,source:t,stack:Re(t)}}var Wi=[],Gi=0,Ki=null,qi=0,Ji=[],Yi=0,Xi=null,Zi=1,Qi=``;function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function ea(e,t,n){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Xi=e;var r=Zi;e=Qi;var i=32-nt(r)-1;r&=~(1<<i),n+=1;var a=32-nt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-nt(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function ta(e){e.return!==null&&($i(e,1),ea(e,1,0))}function na(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Xi;)Xi=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,Zi=Ji[--Yi],Ji[Yi]=null}function ra(e,t){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Zi=t.id,Qi=t.overflow,Xi=e}var ia=null,aa=null,L=!1,oa=null,sa=!1,ca=Error(i(519));function la(e){throw ha(Ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ca}function ua(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Tt]=e,t[Et]=r,n){case`dialog`:H(`cancel`,t),H(`close`,t);break;case`iframe`:case`object`:case`embed`:H(`load`,t);break;case`video`:case`audio`:for(n=0;n<Jf.length;n++)H(Jf[n],t);break;case`source`:H(`error`,t);break;case`img`:case`image`:case`link`:H(`error`,t),H(`load`,t);break;case`details`:H(`toggle`,t);break;case`input`:H(`invalid`,t),cn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:H(`invalid`,t);break;case`textarea`:H(`invalid`,t),fn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||lp(t.textContent,n)?(r.popover!=null&&(H(`beforetoggle`,t),H(`toggle`,t)),r.onScroll!=null&&H(`scroll`,t),r.onScrollEnd!=null&&H(`scrollend`,t),r.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||la(e,!0)}function da(e){for(ia=e.return;ia;)switch(ia.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:ia=ia.return}}function fa(e){if(e!==ia)return!1;if(!L)return da(e),L=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Cp(e.type,e.memoizedProps)),n=!n),n&&aa&&la(e),da(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=xm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=xm(e)}else t===27?(t=aa,Mp(e.type)?(e=bm,bm=null,aa=e):aa=t):aa=ia?ym(e.stateNode.nextSibling):null;return!0}function pa(){aa=ia=null,L=!1}function ma(){var e=oa;return e!==null&&(bd===null?bd=e:bd.push.apply(bd,e),oa=null),e}function ha(e){oa===null?oa=[e]:oa.push(e)}var ga=Se(null),_a=null,va=null;function ya(e,t,n){Ce(ga,t._currentValue),t._currentValue=n}function ba(e){e._currentValue=ga.current,M(ga)}function xa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Sa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),xa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),xa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),xa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ca(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Ur(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===De.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[_h]:e.push(_h))}a=a.return}return e!==null&&Sa(t,e,n,r),t.flags|=262144,e!==null}function wa(e){for(e=e.firstContext;e!==null;){if(!Ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ta(e){_a=e,va=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ea(e){return Oa(_a,e)}function Da(e,t){return _a===null&&Ta(e),Oa(e,t)}function Oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},va===null){if(e===null)throw Error(i(308));va=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else va=va.next=t;return n}var ka=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Aa=t.unstable_scheduleCallback,ja=t.unstable_NormalPriority,Ma={$$typeof:ie,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Na(){return{controller:new ka,data:new Map,refCount:0}}function Pa(e){e.refCount--,e.refCount===0&&Aa(ja,function(){e.controller.abort()})}function Fa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ia=null;function La(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ra=null,za=0,Ba=0,Va=null;function Ha(e,t){if(Ra===null){var n=Ra=[];za=0,Ba=Uf(),Va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return za++,t.then(Ua,Ua),t}function Ua(){if(--za===0&&(Ia=null,Ra!==null)){Va!==null&&(Va.status=`fulfilled`);var e=Ra;Ra=null,Ba=0,Va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ga=j.S;j.S=function(e,t){if(Cd=We(),typeof t==`object`&&t&&typeof t.then==`function`&&Ha(e,t),Ia!==null)for(var n=kf;n!==null;)Fa(n,Ia),n=n.next;if(n=e.types,n!==null){for(var r=kf;r!==null;)Fa(r,n),r=r.next;if(Ba!==0){r=Ia,r===null&&(r=Ia=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ga!==null&&Ga(e,t)};var Ka=Se(null);function qa(){var e=Ka.current;return e===null?ad.pooledCache:e}function Ja(e,t){t===null?Ce(Ka,Ka.current):Ce(Ka,t.pool)}function Ya(){var e=qa();return e===null?null:{parent:Ma._currentValue,pool:e}}var Xa=Error(i(460)),Za=Error(i(474)),Qa=Error(i(542)),$a={then:function(){}};function eo(e){return e=e.status,e===`fulfilled`||e===`rejected`}function to(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(xn,xn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ao(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(xn,xn);else{if(e=ad,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ao(e),e}throw ro=t,Xa}}function no(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ro=e,Xa):e}}var ro=null;function io(){if(ro===null)throw Error(i(459));var e=ro;return ro=null,e}function ao(e){if(e===Xa||e===Qa)throw Error(i(483))}var oo=null,so=0;function co(e){var t=so;return so+=1,oo===null&&(oo=[]),to(oo,e,t)}function R(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function lo(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function uo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=zi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===O?(e=d(e,t,n.props.children,r,n.key),R(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===se&&no(i)===t.type)?(t=a(t,n.props),R(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),R(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ri(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=zi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=Li(t.type,t.key,t.props,null,e.mode,n),R(n,t),n.return=e,n;case D:return t=Vi(t,e.mode,n),t.return=e,t;case se:return t=no(t),f(e,t,n)}if(_e(t)||me(t))return t=Ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,co(t),n);if(t.$$typeof===ie)return f(e,Da(e,t),n);lo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case ee:return n.key===i?l(e,t,n,r):null;case D:return n.key===i?u(e,t,n,r):null;case se:return n=no(n),p(e,t,n,r)}if(_e(n)||me(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,co(n),r);if(n.$$typeof===ie)return p(e,t,Da(e,n),r);lo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case D:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case se:return r=no(r),m(e,t,n,r,i)}if(_e(r)||me(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,co(r),i);if(r.$$typeof===ie)return m(e,t,n,Da(t,r),i);lo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),L&&$i(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return L&&$i(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),L&&$i(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),L&&$i(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return L&&$i(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),L&&$i(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===O&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ee:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===O){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),R(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===se&&no(l)===r.type){n(e,r.sibling),c=a(r,o.props),R(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===O?(c=Ri(o.props.children,e.mode,c,o.key),R(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),R(c,o),c.return=e,e=c)}return s(e);case D:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Vi(o,e.mode,c),c.return=e,e=c}return s(e);case se:return o=no(o),_(e,r,o,c)}if(_e(o))return h(e,r,o,c);if(me(o)){if(l=me(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,co(o),c);if(o.$$typeof===ie)return _(e,r,Da(e,o),c);lo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=zi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{so=0;var i=_(e,t,n,r);return oo=null,i}catch(t){if(t===Xa||t===Qa)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var fo=uo(!0),po=uo(!1),mo=!1;function ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function go(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _o(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,id&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ai(e),ki(e,null,n),t}return Ei(e,r,t,n),Ai(e)}function yo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vt(e,n)}}function bo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var So=!1;function Co(){if(So){var e=Va;if(e!==null)throw e}}function wo(e,t,n,r){So=!1;var i=e.updateQueue;mo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(sd&f)===f:(r&f)===f){f!==0&&f===Ba&&(So=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:mo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),hd|=o,e.lanes=o,e.memoizedState=d}}function To(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)To(n[e],t)}var Do=Se(null),Oo=Se(0);function ko(e,t){e=pd,Ce(Oo,e),Ce(Do,t),pd=e|t.baseLanes}function Ao(){Ce(Oo,pd),Ce(Do,Do.current)}function jo(){pd=Oo.current,M(Do),M(Oo)}var Mo=Se(null),No=null;function Po(e){var t=e.alternate;Ce(zo,zo.current&1),Ce(Mo,e),No===null&&(t===null||Do.current!==null||t.memoizedState!==null)&&(No=e)}function Fo(e){Ce(zo,zo.current),Ce(Mo,e),No===null&&(No=e)}function Io(e){e.tag===22?(Ce(zo,zo.current),Ce(Mo,e),No===null&&(No=e)):Lo()}function Lo(){Ce(zo,zo.current),Ce(Mo,Mo.current)}function Ro(e){M(Mo),No===e&&(No=null),M(zo)}var zo=Se(0);function Bo(e,t){Ce(Mo,Mo.current),Ce(zo,t)}function Vo(e){M(zo),M(Mo),No===e&&(No=null)}function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gm(n)||_m(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var z=0,B=null,Uo=null,Wo=null,Go=!1,Ko=!1,qo=!1,Jo=0,Yo=0,Xo=null,Zo=0;function Qo(){throw Error(i(321))}function $o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function es(e,t,n,r,i,a){return z=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?_c:vc,qo=!1,a=n(r,i),qo=!1,Ko&&(a=ns(t,n,r,i)),ts(e),a}function ts(e){j.H=gc;var t=Uo!==null&&Uo.next!==null;if(z=0,Wo=Uo=B=null,Go=!1,Yo=0,Xo=null,t)throw Error(i(300));e===null||Fc||(e=e.dependencies,e!==null&&wa(e)&&(Fc=!0))}function ns(e,t,n,r){B=e;var a=0;do{if(Ko&&(Xo=null),Yo=0,Ko=!1,25<=a)throw Error(i(301));if(a+=1,Wo=Uo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=yc,o=t(n,r)}while(Ko);return o}function rs(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?us(t):t,e=e.useState()[0],(Uo===null?null:Uo.memoizedState)!==e&&(B.flags|=1024),t}function is(){var e=Jo!==0;return Jo=0,e}function as(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function os(e){if(Go){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Go=!1}z=0,Wo=Uo=B=null,Ko=!1,Yo=Jo=0,Xo=null}function ss(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wo===null?B.memoizedState=Wo=e:Wo=Wo.next=e,Wo}function cs(){if(Uo===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=Uo.next;var t=Wo===null?B.memoizedState:Wo.next;if(t!==null)Wo=t,Uo=e;else{if(e===null)throw B.alternate===null?Error(i(467)):Error(i(310));Uo=e,e={memoizedState:Uo.memoizedState,baseState:Uo.baseState,baseQueue:Uo.baseQueue,queue:Uo.queue,next:null},Wo===null?B.memoizedState=Wo=e:Wo=Wo.next=e}return Wo}function ls(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function us(e){var t=Yo;return Yo+=1,Xo===null&&(Xo=[]),e=to(Xo,e,t),t=B,(Wo===null?t.memoizedState:Wo.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?_c:vc),e}function ds(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return us(e);if(e.$$typeof===fe)return;if(e.$$typeof===ie)return Ea(e)}throw Error(i(438,String(e)))}function fs(e){var t=null,n=B.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=B.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ls(),B.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ue;return t.index++,n}function ps(e,t){return typeof t==`function`?t(e):t}function ms(e){return hs(cs(),Uo,e)}function hs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(z&f)===f:(sd&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ba&&(d=!0);else if((z&p)===p){u=u.next,p===Ba&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,B.lanes|=p,hd|=p;f=u.action,qo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,B.lanes|=f,hd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ur(o,e.memoizedState)&&(Fc=!0,d&&(n=Va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function gs(e){var t=cs(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ur(o,t.memoizedState)||(Fc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function _s(e,t,n){var r=B,a=cs(),o=L;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ur((Uo||a).memoizedState,n);if(s&&(a.memoizedState=n,Fc=!0),a=a.queue,Hs(bs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Wo!==null&&!!(Wo.memoizedState.tag&1),Ls(e?9:8,{destroy:void 0},ys.bind(null,r,a,n,t),null),e){if(r.flags|=2048,ad===null)throw Error(i(349));o||z&127||vs(r,t,n)}return n}function vs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=ls(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ys(e,t,n,r){t.value=n,t.getSnapshot=r,xs(t)&&Ss(e)}function bs(e,t,n){return n(function(){xs(t)&&Ss(e)})}function xs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function Ss(e){var t=Oi(e,2);t!==null&&Hd(t,e,2)}function Cs(e){var t=ss();if(typeof e==`function`){var n=e;if(e=n(),qo){tt(!0);try{n()}finally{tt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:e},t}function ws(e,t,n,r){return e.baseState=n,hs(e,Uo,typeof r==`function`?r:ps)}function Ts(e,t,n,r,a){if(pc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Es(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};o.types=a===null?null:a.types,j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),Ds(e,t,s)}catch(n){ks(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),Ds(e,t,a)}catch(n){ks(e,t,n)}}function Ds(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Os(e,t,n)},function(n){return ks(e,t,n)}):Os(e,t,n)}function Os(e,t,n){t.status=`fulfilled`,t.value=n,As(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Es(e,n)))}function ks(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,As(t),t=t.next;while(t!==r)}e.action=null}function As(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function js(e,t){return t}function Ms(e,t){if(L){var n=ad.formState;if(n!==null){a:{var r=B;if(L){if(aa){b:{for(var i=aa,a=sa;i.nodeType!==8;)if(!a||(i=ym(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){aa=ym(i.nextSibling),r=i.data===`F!`;break a}}la(r)}r=!1}r&&(t=n[0])}}return n=ss(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:js,lastRenderedState:t},n.queue=r,n=uc.bind(null,B,r),r.dispatch=n,r=Cs(!1),a=fc.bind(null,B,!1,r.queue),r=ss(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ts.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ns(e){return Ps(cs(),Uo,e)}function Ps(e,t,n){if(t=hs(e,t,js)[0],e=ms(ps)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=us(t)}catch(e){throw e===Xa?Qa:e}else r=t;t=cs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,Ls(9,{destroy:void 0},Fs.bind(null,i,n),null)),[r,a,e]}function Fs(e,t){e.action=t}function Is(e){var t=cs(),n=Uo;if(n!==null)return Ps(t,n,e);cs(),t=t.memoizedState,n=cs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=ls(),B.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Rs(){return cs().memoizedState}function zs(e,t,n,r){var i=ss();B.flags|=e,i.memoizedState=Ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function Bs(e,t,n,r){var i=cs();r=r===void 0?null:r;var a=i.memoizedState.inst;Uo!==null&&r!==null&&$o(r,Uo.memoizedState.deps)?i.memoizedState=Ls(t,a,n,r):(B.flags|=e,i.memoizedState=Ls(1|t,a,n,r))}function Vs(e,t){zs(8390656,8,e,t)}function Hs(e,t){Bs(2048,8,e,t)}function Us(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=ls(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ws(e){var t=cs().memoizedState;return Us({ref:t,nextImpl:e}),function(){if(id&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Gs(e,t){return Bs(4,2,e,t)}function Ks(e,t){return Bs(4,4,e,t)}function qs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Js(e,t,n){n=n==null?null:n.concat([e]),Bs(4,4,qs.bind(null,t,e),n)}function Ys(){}function Xs(e,t){var n=cs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&$o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zs(e,t){var n=cs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&$o(t,r[1]))return r[0];if(r=e(),qo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r}function Qs(e,t,n){return n===void 0||z&1073741824&&!(sd&261930)?e.memoizedState=t:(e.memoizedState=n,e=Bd(),B.lanes|=e,hd|=e,n)}function $s(e,t,n,r){return Ur(n,t)?n:Do.current===null?!(z&106)||z&1073741824&&!(sd&261930)?(Fc=!0,e.memoizedState=n):(e=Bd(),B.lanes|=e,hd|=e,t):(e=Qs(e,n,r),Ur(e,t)||(Fc=!0),e)}function ec(e,t,n,r,i){var a=ve.p;ve.p=a!==0&&8>a?a:8;var o=j.T,s={};s.types=o===null?null:o.types,j.T=s,fc(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?dc(e,t,Wa(c,r),zd(e)):dc(e,t,r,zd(e))}catch(n){dc(e,t,{then:function(){},status:`rejected`,reason:n},zd())}finally{ve.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function tc(){}function nc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=rc(e).queue;ec(e,a,t,ye,n===null?tc:function(){return ic(e),n(r)})}function rc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:ye},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ic(e){var t=rc(e);t.next===null&&(t=e.alternate.memoizedState),dc(e,t.next.queue,{},zd())}function ac(){return Ea(_h)}function oc(){return cs().memoizedState}function sc(){return cs().memoizedState}function cc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=zd();e=_o(n);var r=vo(t,e,n);r!==null&&(Hd(r,t,n),yo(r,t,n)),t={cache:Na()},e.payload=t;return}t=t.return}}function lc(e,t,n){var r=zd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},pc(e)?mc(t,n):(n=Di(e,t,n,r),n!==null&&(Hd(n,e,r),hc(n,t,r)))}function uc(e,t,n){dc(e,t,n,zd())}function dc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(pc(e))mc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ur(s,o))return Ei(e,t,i,0),ad===null&&Ti(),!1}catch{}if(n=Di(e,t,i,r),n!==null)return Hd(n,e,r),hc(n,t,r),!0}return!1}function fc(e,t,n,r){if(r={lane:2,revertLane:Uf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},pc(e)){if(t)throw Error(i(479))}else t=Di(e,n,r,2),t!==null&&Hd(t,e,2)}function pc(e){var t=e.alternate;return e===B||t!==null&&t===B}function mc(e,t){Ko=Go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vt(e,n)}}var gc={readContext:Ea,use:ds,useCallback:Qo,useContext:Qo,useEffect:Qo,useImperativeHandle:Qo,useLayoutEffect:Qo,useInsertionEffect:Qo,useMemo:Qo,useReducer:Qo,useRef:Qo,useState:Qo,useDebugValue:Qo,useDeferredValue:Qo,useTransition:Qo,useSyncExternalStore:Qo,useId:Qo,useHostTransitionStatus:Qo,useFormState:Qo,useActionState:Qo,useOptimistic:Qo,useMemoCache:Qo,useCacheRefresh:Qo,useEffectEvent:Qo},_c={readContext:Ea,use:ds,useCallback:function(e,t){return ss().memoizedState=[e,t===void 0?null:t],e},useContext:Ea,useEffect:Vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),zs(4194308,4,qs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){zs(4,2,e,t)},useMemo:function(e,t){var n=ss();t=t===void 0?null:t;var r=e();if(qo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ss();if(n!==void 0){var i=n(t);if(qo){tt(!0);try{n(t)}finally{tt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=lc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=ss();return e={current:e},t.memoizedState=e},useState:function(e){e=Cs(e);var t=e.queue,n=uc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){return Qs(ss(),e,t)},useTransition:function(){var e=Cs(!1);return e=ec.bind(null,B,e.queue,!0,!1),ss().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=ss();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ad===null)throw Error(i(349));sd&127||vs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Vs(bs.bind(null,r,o,e),[e]),r.flags|=2048,Ls(9,{destroy:void 0},ys.bind(null,r,o,n,t),null),n},useId:function(){var e=ss(),t=ad.identifierPrefix;if(L){var n=Qi,r=Zi;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Jo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Zo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ac,useFormState:Ms,useActionState:Ms,useOptimistic:function(e){var t=ss();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=fc.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:fs,useCacheRefresh:function(){return ss().memoizedState=cc.bind(null,B)},useEffectEvent:function(e){var t=ss(),n={impl:e};return t.memoizedState=n,function(){if(id&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},vc={readContext:Ea,use:ds,useCallback:Xs,useContext:Ea,useEffect:Hs,useImperativeHandle:Js,useInsertionEffect:Gs,useLayoutEffect:Ks,useMemo:Zs,useReducer:ms,useRef:Rs,useState:function(){return ms(ps)},useDebugValue:Ys,useDeferredValue:function(e,t){return $s(cs(),Uo.memoizedState,e,t)},useTransition:function(){var e=ms(ps)[0],t=cs().memoizedState;return[typeof e==`boolean`?e:us(e),t]},useSyncExternalStore:_s,useId:oc,useHostTransitionStatus:ac,useFormState:Ns,useActionState:Ns,useOptimistic:function(e,t){return ws(cs(),Uo,e,t)},useMemoCache:fs,useCacheRefresh:sc,useEffectEvent:Ws},yc={readContext:Ea,use:ds,useCallback:Xs,useContext:Ea,useEffect:Hs,useImperativeHandle:Js,useInsertionEffect:Gs,useLayoutEffect:Ks,useMemo:Zs,useReducer:gs,useRef:Rs,useState:function(){return gs(ps)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=cs();return Uo===null?Qs(n,e,t):$s(n,Uo.memoizedState,e,t)},useTransition:function(){var e=gs(ps)[0],t=cs().memoizedState;return[typeof e==`boolean`?e:us(e),t]},useSyncExternalStore:_s,useId:oc,useHostTransitionStatus:ac,useFormState:Is,useActionState:Is,useOptimistic:function(e,t){var n=cs();return Uo===null?(n.baseState=e,[e,n.queue.dispatch]):ws(n,Uo,e,t)},useMemoCache:fs,useCacheRefresh:sc,useEffectEvent:Ws};function bc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=zd(),i=_o(r);i.payload=t,n!=null&&(i.callback=n),t=vo(e,i,r),t!==null&&(Hd(t,e,r),yo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=zd(),i=_o(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=vo(e,i,r),t!==null&&(Hd(t,e,r),yo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=zd(),r=_o(n);r.tag=2,t!=null&&(r.callback=t),t=vo(e,r,n),t!==null&&(Hd(t,e,n),yo(t,e,n))}};function Sc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Wr(n,r)||!Wr(i,a):!0}function Cc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xc.enqueueReplaceState(t,t.state,null)}function wc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Tc(e){xi(e)}function Ec(e){console.error(e)}function Dc(e){xi(e)}function Oc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function kc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ac(e,t,n){return n=_o(n),n.tag=3,n.payload={element:null},n.callback=function(){Oc(e,t)},n}function jc(e){return e=_o(e),e.tag=3,e}function Mc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){kc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){kc(t,n,r),typeof i!=`function`&&(Ed===null?Ed=new Set([this]):Ed.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Nc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ca(t,n,a,!0),n=Mo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return No===null?ef():n.alternate===null&&md===0&&(md=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===$a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Cf(e,r,a)),!1;case 22:return n.flags|=65536,r===$a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Cf(e,r,a)),!1}throw Error(i(435,n.tag))}return Cf(e,r,a),ef(),!1}if(L)return t=Mo.current,t===null?(r!==ca&&(t=Error(i(423),{cause:r}),ha(Ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ui(r,n),a=Ac(e.stateNode,r,a),bo(e,a),md!==4&&(md=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ca&&(e=Error(i(422),{cause:r}),ha(Ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ui(o,n),yd===null?yd=[o]:yd.push(o),md!==4&&(md=2),t===null)return!0;r=Ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ac(n.stateNode,r,e),bo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(Ed===null||!Ed.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=jc(a),Mc(a,e,n,r),bo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Pc=Error(i(461)),Fc=!1;function Ic(e,t,n,r){t.child=e===null?po(t,null,n,r):fo(t,e.child,n,r)}function Lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ta(t),r=es(e,t,n,o,a,i),s=is(),e!==null&&!Fc?(as(e,t,i),dl(e,t,i)):(L&&s&&ta(t),t.flags|=1,Ic(e,t,r,i),t.child)}function Rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,zc(e,t,a,r,i)):(e=Li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!fl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return dl(e,t,i)}return t.flags|=1,e=Fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function zc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref){if(Fc=!1,t.pendingProps=r=a,fl(e,i))e.flags&131072&&(Fc=!0);else return t.lanes=e.lanes,dl(e,t,i)}}return qc(e,t,n,r,i)}function Bc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Hc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ja(t,a===null?null:a.cachePool),a===null?Ao():ko(t,a),Io(t);else return r=t.lanes=536870912,Hc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ja(t,null),Ao(),Lo()):(Ja(t,a.cachePool),ko(t,a),Lo(),t.memoizedState=null);return Ic(e,t,i,n),t.child}function Vc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Hc(e,t,n,r,i){var a=qa();return a=a===null?null:{parent:Ma._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ja(t,null),Ao(),Io(t),e!==null&&Ca(e,t,r,!0),t.childLanes=i,null}function Uc(e,t){return t=nl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Wc(e,t,n){return fo(t,e.child,null,n),e=Uc(t,t.pendingProps),e.flags|=2,Ro(t),t.memoizedState=null,e}function Gc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(L){if(r.mode===`hidden`)return e=Uc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Vc(null,e);if(Fo(t),(e=aa)?(e=hm(e,sa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=536870912,null}return Uc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Fo(t),a){if(t.flags&256)t.flags&=-257,t=Wc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Fc||Ca(e,t,n,!1),a=(n&e.childLanes)!==0,Fc||a){if(Do.current===null){if(r=ad,r!==null&&(s=yt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Oi(e,s),Hd(r,e,s),Pc;ef()}t=Wc(e,t,n)}else e=o.treeContext,aa=ym(s.nextSibling),ia=t,L=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=Uc(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Kc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function qc(e,t,n,r,i){return Ta(t),n=es(e,t,n,r,void 0,i),r=is(),e!==null&&!Fc?(as(e,t,i),dl(e,t,i)):(L&&r&&ta(t),t.flags|=1,Ic(e,t,n,i),t.child)}function Jc(e,t,n,r,i,a){return Ta(t),t.updateQueue=null,n=ns(t,r,n,i),ts(e),r=is(),e!==null&&!Fc?(as(e,t,a),dl(e,t,a)):(L&&r&&ta(t),t.flags|=1,Ic(e,t,n,a),t.child)}function Yc(e,t,n,r,i){if(Ta(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=Ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=xc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ho(t),o=n.contextType,a.context=typeof o==`object`&&o?Ea(o):ji,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(bc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&xc.enqueueReplaceState(a,a.state,null),wo(t,r,a,i),Co(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=wc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ji,typeof u==`object`&&u&&(o=Ea(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Cc(t,a,r,o),mo=!1;var f=t.memoizedState;a.state=f,wo(t,r,a,i),Co(),l=t.memoizedState,s||f!==l||mo?(typeof d==`function`&&(bc(t,n,d,r),l=t.memoizedState),(c=mo||Sc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,go(e,t),o=t.memoizedProps,u=wc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ji,typeof l==`object`&&l&&(c=Ea(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Cc(t,a,r,c),mo=!1,f=t.memoizedState,a.state=f,wo(t,r,a,i),Co();var p=t.memoizedState;o!==d||f!==p||mo||e!==null&&e.dependencies!==null&&wa(e.dependencies)?(typeof s==`function`&&(bc(t,n,s,r),p=t.memoizedState),(u=mo||Sc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&wa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Kc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=fo(t,e.child,null,i),t.child=fo(t,null,n,i)):Ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=dl(e,t,i),e}function Xc(e,t,n,r){return pa(),t.flags|=256,Ic(e,t,n,r),t.child}var Zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qc(e){return{baseLanes:e,cachePool:Ya()}}function $c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=V),e}function el(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(zo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(L){if(i?Po(t):Lo(),(e=aa)?(e=hm(e,sa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=_m(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Lo(),i=t.mode,a=nl({mode:`hidden`,children:a},i),r=Ri(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Qc(n),r.childLanes=$c(e,o,n),t.memoizedState=Zc,Vc(null,r)):(Po(t),tl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return il(e,t,a,o,r,c,s,n)}return i?(Lo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Fi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ri(i,a,n,null),i.flags|=2):i=Fi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Vc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Qc(n):(a=i.cachePool,a===null?a=Ya():(s=Ma._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=$c(e,o,n),t.memoizedState=Zc,Vc(e.child,r)):(Po(t),n=e.child,e=n.sibling,n=Fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function tl(e,t){return t=nl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function nl(e,t){return e=Ni(22,e,null,t),e.lanes=0,e}function rl(e,t,n){return fo(t,e.child,null,n),e=tl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function il(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Po(t),t.flags&=-257,rl(e,t,c)):t.memoizedState===null?(Lo(),o=a.fallback,s=t.mode,a=nl({mode:`visible`,children:a.children},s),o=Ri(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,fo(t,e.child,null,c),a=t.child,a.memoizedState=Qc(c),a.childLanes=$c(e,r,c),t.memoizedState=Zc,Vc(null,a)):(Lo(),t.child=e.child,t.flags|=128,null);if(Po(t),_m(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ha({value:a,source:null,stack:null})),rl(e,t,c)}if(Fc||Ca(e,t,c,!1),r=(c&e.childLanes)!==0,Fc||r){if(Do.current!==null)return rl(e,t,c);if(r=ad,r!==null&&(a=yt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Oi(e,a),Hd(r,e,a),Pc;return gm(o)||ef(),rl(e,t,c)}return gm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,aa=ym(o.nextSibling),ia=t,L=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=tl(t,a.children),t.flags|=134221824,t)}function al(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),xa(e.return,t,n)}function ol(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ho(n)===null&&(t=e),e=e.sibling}return t}function sl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function cl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ll(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=zo.current;if(t.flags&128)return Bo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Bo(t,o),i===`backwards`&&e!==null?(cl(e),Ic(e,t,r,n),cl(e)):Ic(e,t,r,n),r=L?qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&al(e,n,t);else if(e.tag===19)al(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=ol(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,cl(t)),sl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}sl(t,!0,n,null,a,r);break;case`together`:sl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=ol(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),sl(t,!1,i,n,a,r)}return t.child}function ul(e,t,n){var r=t.pendingProps;return ya(t,t.type,r.value),Ic(e,t,r.children,n),t.child}function dl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),hd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ca(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function fl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&wa(e)))}function pl(e,t,n){switch(t.tag){case 3:Oe(t,t.stateNode.containerInfo),ya(t,Ma,e.memoizedState.cache),pa();break;case 27:case 5:Ae(t);break;case 4:Oe(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Po(t),t.flags|=128,null;r=Ca(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?el(e,t,n):(Po(t),e=dl(e,t,n),e===null?null:e.sibling)}Po(t);break;case 19:if(t.flags&128)return ll(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ca(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ll(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Bo(t,zo.current),r)break;return null;case 22:return t.lanes=0,Bc(e,t,n,t.pendingProps);case 24:ya(t,Ma,e.memoizedState.cache)}return dl(e,t,n)}function ml(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Fc=!0;else{if(!fl(e,n)&&!(t.flags&128))return Fc=!1,pl(e,t,n);Fc=!!(e.flags&131072)}}else Fc=!1,L&&t.flags&1048576&&ea(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=no(t.elementType),t.type=e,typeof e==`function`)Pi(e)?(r=wc(e,r),t.tag=1,t=Yc(null,t,e,r,n)):(t.tag=0,t=qc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===k){t.tag=11,t=Lc(null,t,e,r,n);break a}if(a===oe){t.tag=14,t=Rc(null,t,e,r,n);break a}if(a===ie){t.tag=10,t.type=e,t=ul(null,t,n);break a}}throw t=ge(e)||e,Error(i(306,t,``))}}return t;case 0:return qc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=wc(r,t.pendingProps),Yc(e,t,r,a,n);case 3:a:{if(Oe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,go(e,t),wo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ya(t,Ma,r),r!==o.cache&&Sa(t,[Ma],n,!0),Co(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Xc(e,t,r,n);break a}if(r!==a){a=Ui(Error(i(424)),t),ha(a),t=Xc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(aa=ym(e.firstChild),ia=t,L=!0,oa=null,sa=!0,n=po(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(pa(),r===a){t=dl(e,t,n);break a}Ic(e,t,r,n)}t=t.child}return t;case 26:return Kc(e,t),e===null?(n=Um(t.type,null,t.pendingProps,null))?t.memoizedState=n:L||(t.stateNode=Sp(t.type,t.pendingProps,Ee.current,t)):t.memoizedState=Um(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ae(t),e===null&&L&&(r=t.stateNode=Tm(t.type,t.pendingProps,Ee.current),ia=t,sa=!0,a=aa,Mp(t.type)?(bm=a,aa=ym(r.firstChild)):aa=a),Ic(e,t,t.pendingProps.children,n),Kc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&L&&((a=r=aa)&&(r=pm(r,t.type,t.pendingProps,sa),r===null?a=!1:(t.stateNode=r,ia=t,aa=ym(r.firstChild),sa=!1,a=!0)),a||la(t)),Ae(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Cp(a,o)?r=null:s!==null&&Cp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=es(e,t,rs,null,null,n),_h._currentValue=a),Kc(e,t),Ic(e,t,r,n),t.child;case 6:return e===null&&L&&((e=n=aa)&&(n=mm(n,t.pendingProps,sa),n===null?e=!1:(t.stateNode=n,ia=t,aa=null,e=!0)),e||la(t)),null;case 13:return el(e,t,n);case 4:return Oe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fo(t,null,r,n):Ic(e,t,r,n),t.child;case 11:return Lc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Kc(e,t),Ic(e,t,r,n),t.child;case 8:return Ic(e,t,t.pendingProps.children,n),t.child;case 12:return Ic(e,t,t.pendingProps.children,n),t.child;case 10:return ul(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ta(t),a=Ea(a),r=r(a),t.flags|=1,Ic(e,t,r,n),t.child;case 14:return Rc(e,t,t.type,t.pendingProps,n);case 15:return zc(e,t,t.type,t.pendingProps,n);case 19:return ll(e,t,n);case 31:return Gc(e,t,n);case 22:return Bc(e,t,n,t.pendingProps);case 24:return Ta(t),r=Ea(Ma),e===null?(a=qa(),a===null&&(a=ad,o=Na(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ho(t),ya(t,Ma,a)):((e.lanes&n)!==0&&(go(e,t),wo(t,null,null,n),Co()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ya(t,Ma,r),r!==a.cache&&Sa(t,[Ma],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ya(t,Ma,r))),Ic(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:L&&ta(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Kc(e,t),Ic(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function hl(e){e.flags|=4}function gl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?ih(t,r):ih(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Zd())e.flags|=8192;else throw ro=$a,Za}}else e.flags&=-16777217}function _l(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ah(t)){if(Zd())e.flags|=8192;else throw ro=$a,Za}}function vl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:mt(),e.lanes|=t,vd|=t)}function yl(e,t){if(!L)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function bl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function xl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bl(t),null;case 1:return bl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ba(Ma),ke(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(fa(t)?hl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ma())),bl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(hl(t),o===null?(bl(t),gl(t,a,null,r,n)):(bl(t),_l(t,o))):o?o===e.memoizedState?(bl(t),t.flags&=-16777217):(hl(t),bl(t),_l(t,o)):(e=e.memoizedProps,e!==r&&hl(t),bl(t),gl(t,a,e,r,n)),null;case 27:if(je(t),n=Ee.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&hl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return bl(t),t.subtreeFlags&=-33554433,null}e=we.current,fa(t)?ua(t,e):(e=Tm(a,r,n),t.stateNode=e,hl(t))}return bl(t),t.subtreeFlags&=-33554433,null;case 5:if(je(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&hl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return bl(t),t.subtreeFlags&=-33554433,null}if(o=we.current,fa(t))ua(t,o);else{var s=yp(Ee.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Tt]=t,o[Et]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(fp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&hl(t)}}return bl(t),t.subtreeFlags&=-33554433,gl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&hl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ee.current,fa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ia,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||lp(e.nodeValue,n)),e||la(t,!0)}else e=yp(e).createTextNode(r),e[Tt]=t,t.stateNode=e}return bl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=fa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Tt]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bl(t),e=!1}else n=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ro(t),t):(Ro(t),null);if(t.flags&128)throw Error(i(558))}return bl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=fa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Tt]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bl(t),a=!1}else a=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ro(t),t):(Ro(t),null)}return Ro(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),vl(t,t.updateQueue),bl(t),null);case 4:return ke(),e===null&&$f(t.stateNode.containerInfo),t.flags|=67108864,bl(t),null;case 10:return ba(t.type),bl(t),null;case 19:if(Vo(t),r=t.memoizedState,r===null)return bl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)yl(r,!1);else{if(md!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,yl(r,!1),e=o.updateQueue,t.updateQueue=e,vl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ii(n,e),n=n.sibling;return Bo(t,zo.current&1|2),L&&$i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&We()>wd&&(t.flags|=128,a=!0,yl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,vl(t,e),yl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!L)return bl(t),null}else 2*We()-r.renderingStartTime>wd&&n!==536870912&&(t.flags|=128,a=!0,yl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=We(),e.sibling=null,o=zo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||L?Bo(t,o):(n=o,Ce(Mo,t),Ce(zo,n),No===null&&(No=t)),L&&$i(t,r.treeForkCount),e}return bl(t),null;case 22:case 23:return Ro(t),jo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(bl(t),t.subtreeFlags&6&&(t.flags|=8192)):bl(t),n=t.updateQueue,n!==null&&vl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&M(Ka),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ba(Ma),bl(t),null;case 25:return null;case 30:return t.flags|=33554432,bl(t),null}throw Error(i(156,t.tag))}function Sl(e,t){switch(na(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ba(Ma),ke(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(Ro(t),t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ro(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ke(),null;case 10:return ba(t.type),null;case 22:case 23:return Ro(t),jo(),e!==null&&M(Ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ba(Ma),null;case 25:return null;default:return null}}function Cl(e,t){switch(na(t),t.tag){case 3:ba(Ma),ke();break;case 26:case 27:case 5:je(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Ro(t);break;case 13:Ro(t);break;case 19:Vo(t);break;case 10:ba(t.type);break;case 22:case 23:Ro(t),jo(),e!==null&&M(Ka);break;case 24:ba(Ma)}}function wl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Sf(t,t.return,e)}}function Tl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Sf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Sf(t,t.return,e)}}function El(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Eo(t,n)}catch(t){Sf(e,e.return,t)}}}function Dl(e,t,n){n.props=wc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Sf(e,t,n)}}function Ol(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=vi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Wp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Gp(e);f(e.child,!1,cm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Sf(e,t,n)}}function kl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Sf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Sf(e,t,n)}else n.current=null}}function Al(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)um(e.stateNode,t[n])}function jl(e){for(var t=e.return;t!==null&&(Pl(t)&&um(e.stateNode,t.stateNode),!Nl(t));)t=t.return}function Ml(e){for(var t=e.return;t!==null&&(Pl(t)&&dm(e.stateNode,t.stateNode),!Nl(t));)t=t.return}function Nl(e){return e.tag===5||e.tag===3||e.tag===27}function Pl(e){return e&&e.tag===7&&e.stateNode!==null}function Fl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Sf(e,e.return,t)}}function Il(e,t,n){try{var r=e.stateNode;mp(r,e.type,n,t),r[Et]=t}catch(t){Sf(e,e.return,t)}}function Ll(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mp(e.type)||e.tag===4}function Rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ll(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Mp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xn)),Al(e,r),Jt=!0;else if(i!==4&&(i===27&&(Al(e,r),r=null,Mp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(zl(e,t,n,r),e=e.sibling;e!==null;)zl(e,t,n,r),e=e.sibling}function Bl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Al(e,r),Jt=!0;else if(i!==4&&(i===27&&(Al(e,r),r=null,Mp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Bl(e,t,n,r),e=e.sibling;e!==null;)Bl(e,t,n,r),e=e.sibling}function Vl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);fp(t,r,n),t[Tt]=e,t[Et]=n}catch(t){Sf(e,e.return,t)}}var Hl=!1,Ul=null;function Wl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Hl=!0)}var Gl=null;function Kl(){var e=Gl;return Gl=null,e}var ql=0;function Jl(e,t,n,r,i){return ql=0,Yl(e.child,t,n,r,i)}function Yl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Rp(o);r.push(s),s.view&&(a=!0)}else a||Rp(o).view&&(a=!0);Hl=!0,Fp(o,ql===0?t:t+`_`+ql,n),ql++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Yl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Xl(e,t){for(;e!==null;)e.tag===5?Ip(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Xl(e.child,t)),e=e.sibling}function Zl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Zl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=bi(t.default,t.share),t!==`none`&&(Jl(e,n,t,null,!1)||Xl(e.child,!1))}e=e.sibling}}function Ql(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=vi(r,n),a=bi(r.default,n.paired?r.share:r.enter);a===`none`?Zl(e):Jl(e,i,a,null,!1)?(Zl(e),n.paired||t||Vd(e,r.onEnter)):Xl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e,t),e=e.sibling;else Zl(e)}function $l(e){if(Ul!==null&&Ul.size!==0){var t=Ul;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=bi(n.default,n.share);if(a!==`none`&&(Jl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Vd(e,n.onShare)):Xl(e.child,!1)),t.delete(r),t.size===0)break}}}$l(e)}e=e.sibling}}}function eu(e){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode),r=Ul===null?void 0:Ul.get(n),i=bi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Jl(e,n,i,null,!1)?r===void 0?Vd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Ul.delete(n),Vd(e,t.onShare)):Xl(e.child,!1)),Ul!==null&&$l(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else Ul!==null&&$l(e)}function tu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode);t=bi(t.default,t.update),e.flags&=-5,t!==`none`&&Jl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&tu(e);e=e.sibling}}function nu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Xl(e.child,!1))}nu(e)}e=e.sibling}}function ru(e){if(e.tag===30)e.stateNode.paired=null,Xl(e.child,!1),nu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ru(e),e=e.sibling;else nu(e)}function iu(e){for(e=e.child;e!==null;)e.tag===30?Xl(e.child,!1):e.subtreeFlags&33554432&&iu(e),e=e.sibling}function au(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&ql<a.length){var l=a[ql],u=Rp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Fp(c,ql===0?n:n+`_`+ql,i),s&&e.flags&4||(Gl===null&&(Gl=[]),Gl.push(c,ql===0?r:r+`_`+ql,t.memoizedProps)),ql++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:au(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ou(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=vi(n,r),a=bi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(zp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;ql=0,i=au(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Vd(e,n.onUpdate))}else e.subtreeFlags&33554432&&ou(e,t);e=e.sibling}}var su=!1,cu=!1,lu=!1,uu=!1,du=typeof WeakSet==`function`?WeakSet:Set,fu=null,pu=!1,mu=!1,hu=!1,gu=!1;function _u(e,t,n){if(e=e.containerInfo,_p=Th,e=Jr(e),Yr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(vp={focusedElem:e,selectionRange:r},Th=!1,n=(n&335544064)===n,fu=t,t=n?9270:1024;fu!==null;){if(e=fu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&eu(r[a]);if(e.alternate===null&&e.flags&2)n&&Wl(e),vu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&eu(r),vu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Wl(e),vu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,fu=r):(n&&tu(e),vu(n))}}Ul=null}function vu(e){for(;fu!==null;){var t=fu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=wc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Sf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)fm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:fm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=vi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=bi(a.default,a.update),a!==`none`&&Jl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,fu=r;break}fu=t.return}}function yu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:zu(e,n),r&4&&wl(5,n);break;case 1:if(zu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Sf(n,n.return,e)}else{var i=wc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Sf(n,n.return,e)}}}r&64&&El(n),r&512&&Ol(n,n.return);break;case 3:if(zu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Eo(e,t)}catch(e){Sf(n,n.return,e)}}break;case 27:t===null&&r&4&&Vl(n);case 26:case 5:zu(e,n),t===null&&r&4&&Fl(n),r&512&&Ol(n,n.return);break;case 12:zu(e,n);break;case 31:zu(e,n),r&4&&Ou(e,n);break;case 13:zu(e,n),r&4&&ku(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ef.bind(null,n),vm(e,n))));break;case 22:if(r=n.memoizedState!==null||su,!r){var a=t!==null&&t.memoizedState!==null||cu;t=su,i=cu,su=r,(cu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Vu(e,n,r)):zu(e,n),su=t,cu=i}break;case 30:zu(e,n),r&512&&Ol(n,n.return);break;case 7:r&512&&Ol(n,n.return);default:zu(e,n)}}function bu(e,t){for(e=e.child;e!==null;)xu(e,t),e=e.sibling}function xu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){Sf(e,e.return,t)}Su(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Jt=!0}catch(t){Sf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Pp(s,!0):Pp(e.stateNode,!1)}catch(t){Sf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&bu(e,t);break;default:bu(e,t)}}function Su(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:xu(n,r);break a;case 22:n.memoizedState===null&&Su(n,r);break a;default:Su(n,r)}}e=e.sibling}}function Cu(e){var t=e.alternate;t!==null&&(e.alternate=null,Cu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var wu=null,Tu=!1;function Eu(e,t,n){for(n=n.child;n!==null;)Du(e,t,n),n=n.sibling}function Du(e,t,n){if(et&&typeof et.onCommitFiberUnmount==`function`)try{et.onCommitFiberUnmount($e,n)}catch{}switch(n.tag){case 26:cu||kl(n,t),Eu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!cu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:cu||kl(n,t),Ml(n);var r=wu,i=Tu;Mp(n.type)&&(wu=n.stateNode,Tu=!1),Eu(e,t,n),Em(n.stateNode,n.type,n.memoizedProps),wu=r,Tu=i;break;case 5:cu||kl(n,t),Ml(n);case 6:if(n.tag===6&&Ml(n),r=wu,i=Tu,wu=null,Eu(e,t,n),wu=r,Tu=i,wu!==null){if(Tu)try{(wu.nodeType===9?wu.body:wu.nodeName===`HTML`?wu.ownerDocument.body:wu).removeChild(n.stateNode),Jt=!0}catch(e){Sf(n,t,e)}else try{wu.removeChild(n.stateNode),Jt=!0}catch(e){Sf(n,t,e)}}break;case 18:wu!==null&&(Tu?(e=wu,Np(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Zh(e)):Np(wu,n.stateNode));break;case 4:r=wu,i=Tu,wu=n.stateNode.containerInfo,Tu=!0,Eu(e,t,n),wu=r,Tu=i;break;case 0:case 11:case 14:case 15:Tl(2,n,t),cu||Tl(4,n,t),Eu(e,t,n);break;case 1:cu||(kl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Dl(n,t,r)),Eu(e,t,n);break;case 21:Eu(e,t,n);break;case 22:cu=(r=cu)||n.memoizedState!==null,Eu(e,t,n),cu=r;break;case 30:kl(n,t),Eu(e,t,n);break;case 7:cu||kl(n,t),Eu(e,t,n);break;default:Eu(e,t,n)}}function Ou(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zh(e)}catch(e){Sf(t,t.return,e)}}}function ku(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zh(e)}catch(e){Sf(t,t.return,e)}}function Au(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new du),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new du),t;default:throw Error(i(435,e.tag))}}function ju(e,t){var n=Au(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Df.bind(null,e,t);t.then(r,r)}})}function Mu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Mp(l.type)){wu=l.stateNode,Tu=!1;break a}break;case 5:wu=l.stateNode,Tu=!1;break a;case 3:case 4:wu=l.stateNode.containerInfo,Tu=!0;break a}l=l.return}if(wu===null)throw Error(i(160));Du(s,c,o),wu=null,Tu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Pu(t,e,n),t=t.sibling}var Nu=null;function Pu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Mu(t,e,n),Fu(e),a&4&&(Tl(3,e,e.return),wl(3,e),Tl(5,e,e.return));break;case 1:Mu(t,e,n),Fu(e),a&512&&(cu||r===null||kl(r,r.return)),a&64&&su&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Nu,Mu(t,e,n),Fu(e),a&512&&(cu||r===null||kl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(su)e.stateNode=Sp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Mt]||r[Tt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),fp(r,t,n),r[Tt]=e,zt(r),t=r;break a;case`link`:if(o=th(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),fp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=th(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),fp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Tt]=e,zt(r),t=r}e.stateNode=t}}else su||nh(o,e.type,e.stateNode)}else e.stateNode=Xm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Il(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||cu||t.parentNode.removeChild(t)):a.count--,n===null?su||nh(o,e.type,e.stateNode):Xm(o,n,e.memoizedProps))}break;case 27:Mu(t,e,n),Fu(e),a&512&&(cu||r===null||kl(r,r.return)),r!==null&&a&4&&Il(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=lu,lu=!1,Mu(t,e,n),lu=o,Fu(e),a&512&&(cu||r===null||kl(r,r.return)),e.flags&32){t=e.stateNode;try{pn(t,``),Jt=!0}catch(t){Sf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Il(e,t,r===null?t:r.memoizedProps)),a&1024&&(uu=!0);break;case 6:if(Mu(t,e,n),Fu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Jt=!0}catch(t){Sf(e,e.return,t)}}break;case 3:if(Jt=!1,eh=null,o=Nu,Nu=Am(t.containerInfo),Mu(t,e,n),Nu=o,Fu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Zh(t.containerInfo)}catch(t){Sf(e,e.return,t)}uu&&(uu=!1,Iu(e)),Jt=!1;break;case 4:a=lu,lu=su,r=Yt(),o=Nu,Nu=Am(e.stateNode.containerInfo),Mu(t,e,n),Fu(e),Nu=o,Jt&&mu&&(hu=!0),Jt=r,lu=a;break;case 12:Mu(t,e,n),Fu(e);break;case 31:Mu(t,e,n),Fu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 13:Mu(t,e,n),Fu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Sd=We()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=su,l=cu,u=lu;su=c||o,lu=u||o,cu=l||s,Mu(t,e,n),cu=l,lu=u,su=c,Fu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||su||cu||(t=s||cu,n=su,r=cu,su=o||su,cu=t,Bu(e,2),su=n,cu=r),!o&&lu||bu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,ju(e,n))));break;case 19:Mu(t,e,n),Fu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ju(e,t)));break;case 30:a&512&&(cu||r===null||kl(r,r.return)),a=Yt(),o=mu,s=(n&335544064)===n,c=e.memoizedProps,mu=s&&bi(c.default,c.update)!==`none`,Mu(t,e,n),Fu(e),s&&r!==null&&Jt&&(e.flags|=4),mu=o,Jt=a;break;case 21:break;case 7:a&512&&(cu||r===null||kl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Mu(t,e,n),Fu(e)}}function Fu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ll(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Pl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Nl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Bl(e,Rl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(pn(l,``),n.flags&=-33),Bl(e,Rl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;zl(e,Rl(e),u,s);break;default:throw Error(i(161))}}catch(t){Sf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Iu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Iu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Th=!0,t.reset(),Th=!1),e=e.sibling}}function Lu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ru(t,e),t=t.sibling;else ou(t,!1)}function Ru(e,t){var n=e.alternate;if(n===null)Ql(e,!1);else switch(e.tag){case 3:if(gu=pu=!1,Kl(),Lu(t,e),!pu&&!hu){if(e=Gl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ip(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),gu=!0}Gl=null;break;case 5:Lu(t,e);break;case 4:r=pu,pu=!1,Lu(t,e),pu&&(hu=!0),pu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Lu(t,e):Ql(e,!1));break;case 30:r=pu,i=Kl(),pu=!1,Lu(t,e),pu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=vi(a,o),o=vi(n.memoizedProps,o);var s=bi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,ql=0,t=au(e,n,t,o,s,a,!0),ql!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Vd(e,e.memoizedProps.onUpdate),Gl=i):i!==null&&(i.push.apply(i,Gl),Gl=i),pu=e.flags&32?!0:r;break;default:Lu(t,e)}}function zu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yu(e,t.alternate,t),t=t.sibling}function Bu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Tl(4,n,n.return),Bu(n,r);break;case 1:kl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Dl(n,n.return,i),Bu(n,r);break;case 27:r&2&&Em(n.stateNode,n.type,n.memoizedProps);case 5:kl(n,n.return),n.tag!==5&&n.tag!==27||Ml(n),Bu(n,r);break;case 6:Ml(n);break;case 26:kl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||cu||i.parentNode.removeChild(i),Bu(n,r);break;case 22:n.memoizedState===null&&Bu(n,r);break;case 30:kl(n,n.return),Bu(n,r);break;case 7:kl(n,n.return);default:Bu(n,r)}e=e.sibling}}function Vu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Vu(i,a,n),wl(4,a);break;case 1:if(Vu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Sf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)To(l[i],c)}catch(e){Sf(r,r.return,e)}}s&&o&64&&El(a),Ol(a,a.return);break;case 27:n&2&&Vl(a);case 5:a.tag!==5&&a.tag!==27||jl(a),Vu(i,a,n),s&&r===null&&o&4&&Fl(a),Ol(a,a.return);break;case 6:jl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||su||nh(Am(c.ownerDocument),a.type,c),Vu(i,a,n),s&&r===null&&o&4&&Fl(a),Ol(a,a.return);break;case 12:Vu(i,a,n);break;case 31:Vu(i,a,n),s&&o&4&&Ou(i,a);break;case 13:Vu(i,a,n),s&&o&4&&ku(i,a);break;case 22:a.memoizedState===null&&Vu(i,a,n),Ol(a,a.return);break;case 30:Vu(i,a,n),Ol(a,a.return);break;case 7:Ol(a,a.return);default:Vu(i,a,n)}t=t.sibling}}function Hu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Pa(n))}function Uu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pa(e))}function Wu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Gu(e,t,n,r),t=t.sibling;else i&&iu(t)}function Gu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&ru(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Wu(e,t,n,r),a&2048&&wl(9,t);break;case 1:Wu(e,t,n,r);break;case 3:Wu(e,t,n,r),i&&gu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Pa(a)));break;case 12:if(a&2048){Wu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){Sf(t,t.return,e)}}else Wu(e,t,n,r);break;case 31:Wu(e,t,n,r);break;case 13:Wu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&ru(t),o._visibility&2?Wu(e,t,n,r):(o._visibility|=2,Ku(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&ru(s),o._visibility&2?Wu(e,t,n,r):qu(e,t)),a&2048&&Hu(s,t);break;case 24:Wu(e,t,n,r),a&2048&&Uu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Xl(a.child,!0),Xl(t.child,!0))),Wu(e,t,n,r);break;default:Wu(e,t,n,r)}}function Ku(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ku(a,o,s,c,i),wl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ku(a,o,s,c,i)):u._visibility&2?Ku(a,o,s,c,i):qu(a,o),i&&l&2048&&Hu(o.alternate,o);break;case 24:Ku(a,o,s,c,i),i&&l&2048&&Uu(o.alternate,o);break;default:Ku(a,o,s,c,i)}t=t.sibling}}function qu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:qu(n,r),i&2048&&Hu(r.alternate,r);break;case 24:qu(n,r),i&2048&&Uu(r.alternate,r);break;default:qu(n,r)}t=t.sibling}}var Ju=8192;function Yu(e,t,n){if(e.subtreeFlags&Ju)for(e=e.child;e!==null;)Xu(e,t,n),e=e.sibling}function Xu(e,t,n){switch(e.tag){case 26:Yu(e,t,n),e.flags&Ju&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&sh(n,e)):ch(n,Nu,e.memoizedState,e.memoizedProps));break;case 5:Yu(e,t,n),e.flags&Ju&&(e=e.stateNode,(t&335544128)===t&&sh(n,e));break;case 3:case 4:var r=Nu;Nu=Am(e.stateNode.containerInfo),Yu(e,t,n),Nu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ju,Ju=16777216,Yu(e,t,n),Ju=r):Yu(e,t,n));break;case 30:if((e.flags&Ju)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ul===null&&(Ul=new Map),Ul.set(r,i)}Yu(e,t,n);break;default:Yu(e,t,n)}}function Zu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,td(r,e)}Zu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)$u(e),e=e.sibling}function $u(e){switch(e.tag){case 0:case 11:case 15:Qu(e),e.flags&2048&&Tl(9,e,e.return);break;case 3:Qu(e);break;case 12:Qu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ed(e)):Qu(e);break;default:Qu(e)}}function ed(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];fu=r,td(r,e)}Zu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tl(8,t,t.return),ed(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ed(t));break;default:ed(t)}e=e.sibling}}function td(e,t){for(;fu!==null;){var n=fu;switch(n.tag){case 0:case 11:case 15:Tl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,fu=r;else a:for(n=e;fu!==null;){r=fu;var i=r.sibling,a=r.return;if(Cu(r),r===n){fu=null;break a}if(i!==null){i.return=a,fu=i;break a}fu=a}}}var nd={getCacheForType:function(e){var t=Ea(Ma),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ea(Ma).controller.signal}},rd=typeof WeakMap==`function`?WeakMap:Map,id=0,ad=null,od=null,sd=0,cd=0,ld=null,ud=!1,dd=!1,fd=!1,pd=0,md=0,hd=0,gd=0,_d=0,V=0,vd=0,yd=null,bd=null,xd=!1,Sd=0,Cd=0,wd=1/0,Td=null,Ed=null,Dd=0,Od=null,kd=null,Ad=0,jd=0,Md=null,Nd=null,Pd=null,Fd=null,Id=null,Ld=0,Rd=null;function zd(){return id&2&&sd!==0?sd&-sd:j.T===null?St():Uf()}function Bd(){if(V===0){if(!(sd&536870912)||L){var e=st;st<<=1,!(st&3932160)&&(st=262144),V=e}else V=536870912}return e=Mo.current,e!==null&&(e.flags|=32),V}function Vd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Wp(vi(e.memoizedProps,n))),Fd===null&&(Fd=[]),Fd.push(t.bind(null,r))}}function Hd(e,t,n){(e===ad&&(cd===2||cd===9)||e.cancelPendingCommit!==null)&&(Yd(e,0),Kd(e,sd,V,!1)),ht(e,n),(!(id&2)||e!==ad)&&(e===ad&&(!(id&2)&&(gd|=n),md===4&&Kd(e,sd,V,!1)),Ff(e))}function Ud(e,t,n){if(id&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||dt(e,t),a=r?rf(e,t):tf(e,t,!0),o=r;do{if(a===0){dd&&!r&&Kd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Gd(n))a=tf(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=yd;var l=c.current.memoizedState.isDehydrated;if(l&&(Yd(c,s).flags|=256),s=tf(c,s,!1),s!==2&&s!==6){if(fd&&!l){c.errorRecoveryDisabledLanes|=o,gd|=o,a=4;break a}o=bd,bd=a,o!==null&&(bd===null?bd=o:bd.push.apply(bd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Yd(e,0),Kd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Kd(r,t,V,!ud);break a;case 2:bd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Sd+300-We(),10<a)){if(Kd(r,t,V,!ud),ut(r,0,!0)!==0)break a;Ad=t,r.timeoutHandle=Ep(Wd.bind(null,r,n,bd,Td,xd,t,V,gd,vd,ud,o,`Throttled`,-0,0),a);break a}Wd(r,n,bd,Td,xd,t,V,gd,vd,ud,o,null,-0,0)}break}}while(1);Ff(e)}function Wd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Ul=null,Xu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=fh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?Sd-We():(a&4194048)===a?Cd-We():0,m=uh(d,m),m!==null)?(Ad=a,e.cancelPendingCommit=m(df.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Kd(e,a,o,!l)):df(e,t,a,n,r,i,o,s,c,l,u,d)}function Gd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kd(e,t,n,r){t=ft(e,t),t&=~_d,t&=~gd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-nt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&_t(e,n,t)}function qd(){return id&6?!0:(If(0,!1),!1)}function Jd(){if(od!==null){if(cd===0)var e=od.return;else e=od,va=_a=null,os(e),oo=null,so=0,e=od;for(;e!==null;)Cl(e.alternate,e),e=e.return;od=null}}function Yd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Dp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ad=0,Jd(),ad=e,od=n=Fi(e.current,null),sd=t,cd=0,ld=null,ud=!1,dd=dt(e,t),fd=!1,vd=V=_d=gd=hd=md=0,bd=yd=null,xd=!1,pd=ft(e,t),Ti(),n}function Xd(e,t){B=null,j.H=gc,t===Xa||t===Qa?(t=io(),cd=3):t===Za?(t=io(),cd=4):cd=t===Pc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ld=t,od===null&&(md=1,Oc(e,Ui(t,e.current)))}function Zd(){var e=Mo.current;return e===null?!0:(sd&4194048)===sd?No===null:(sd&62914560)===sd||sd&536870912?e===No:!1}function Qd(){var e=j.H;return j.H=gc,e===null?gc:e}function $d(){var e=j.A;return j.A=nd,e}function ef(){md=4,ud||(sd&4194048)!==sd&&Mo.current!==null||(dd=!0),!(hd&134217727)&&!(gd&134217727)||ad===null||Kd(ad,sd,V,!1)}function tf(e,t,n){var r=id;id|=2;var i=Qd(),a=$d();(ad!==e||sd!==t)&&(Td=null,Yd(e,t)),t=!1;var o=md;a:do try{if(cd!==0&&od!==null){var s=od,c=ld;switch(cd){case 8:Jd(),o=6;break a;case 3:case 2:case 9:case 6:Mo.current===null&&(t=!0);var l=cd;if(cd=0,ld=null,cf(e,s,c,l),n&&dd){o=0;break a}break;default:l=cd,cd=0,ld=null,cf(e,s,c,l)}}nf(),o=md;break}catch(t){Xd(e,t)}while(1);return t&&e.shellSuspendCounter++,va=_a=null,id=r,j.H=i,j.A=a,od===null&&(ad=null,sd=0,Ti()),o}function nf(){for(;od!==null;)of(od)}function rf(e,t){var n=id;id|=2;var r=Qd(),a=$d();ad!==e||sd!==t?(Td=null,wd=We()+500,Yd(e,t)):dd=dt(e,t);a:do try{if(cd!==0&&od!==null){t=od;var o=ld;b:switch(cd){case 1:cd=0,ld=null,cf(e,t,o,1);break;case 2:case 9:if(eo(o)){cd=0,ld=null,sf(t);break}t=function(){cd!==2&&cd!==9||ad!==e||(cd=7),Ff(e)},o.then(t,t);break a;case 3:cd=7;break a;case 4:cd=5;break a;case 7:eo(o)?(cd=0,ld=null,sf(t)):(cd=0,ld=null,cf(e,t,o,7));break;case 5:var s=null;switch(od.tag){case 26:s=od.memoizedState;case 5:case 27:var c=od;if(s?ah(s):c.stateNode.complete){cd=0,ld=null;var l=c.sibling;if(l!==null)od=l;else{var u=c.return;u===null?od=null:(od=u,lf(u))}break b}}cd=0,ld=null,cf(e,t,o,5);break;case 6:cd=0,ld=null,cf(e,t,o,6);break;case 8:Jd(),md=6;break a;default:throw Error(i(462))}}af();break}catch(t){Xd(e,t)}while(1);return va=_a=null,j.H=r,j.A=a,id=n,od===null?(ad=null,sd=0,Ti(),md):0}function af(){for(;od!==null&&!He();)of(od)}function of(e){var t=ml(e.alternate,e,pd);e.memoizedProps=e.pendingProps,t===null?lf(e):od=t}function sf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Jc(n,t,t.pendingProps,t.type,void 0,sd);break;case 11:t=Jc(n,t,t.pendingProps,t.type.render,t.ref,sd);break;case 5:os(t);var r=t;r===ia&&(L?(da(r),r.tag===5&&r.stateNode!=null&&(aa=r.stateNode)):(da(r),L=!0));default:Cl(n,t),t=od=Ii(t,pd),t=ml(n,t,pd)}e.memoizedProps=e.pendingProps,t===null?lf(e):od=t}function cf(e,t,n,r){va=_a=null,os(t),oo=null,so=0;var i=t.return;try{if(Nc(e,i,t,n,sd)){md=1,Oc(e,Ui(n,e.current)),od=null;return}}catch(t){if(i!==null)throw od=i,t;md=1,Oc(e,Ui(n,e.current)),od=null;return}t.flags&32768?(L||r===1?e=!0:dd||sd&536870912?e=!1:(ud=e=!0,(r===2||r===9||r===3||r===6)&&(r=Mo.current,r!==null&&r.tag===13&&(r.flags|=16384))),uf(t,e)):lf(t)}function lf(e){var t=e;do{if(t.flags&32768){uf(t,ud);return}e=t.return;var n=xl(t.alternate,t,pd);if(n!==null){od=n;return}if(t=t.sibling,t!==null){od=t;return}od=t=e}while(t!==null);md===0&&(md=5)}function uf(e,t){do{var n=Sl(e.alternate,e);if(n!==null){n.flags&=32767,od=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){od=e;return}od=e=n}while(e!==null);md=6,od=null}function df(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do yf();while(Dd!==0);if(id&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===ad&&(od=ad=null,sd=0),kd=t,Od=e,Ad=n,Md=a,Nd=r,ff(e,t,n,s,c,l,f)}}function ff(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(jd=s,s|=wi,gt(e,n,s,r,i,a),Fd=null,(n&335544064)===n?(Id=La(e),r=10262):(Id=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Of(Je,function(){return bf(),null})):(e.callbackNode=null,e.callbackPriority=0),Hl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=j.T,j.T=null,i=ve.p,ve.p=2,a=id,id|=4;try{_u(e,t,n)}finally{id=a,ve.p=i,j.T=r}}Dd=1,Hl?Pd=Hp(o,e.containerInfo,Id,hf,gf,mf,_f,bf,pf,null,null):(hf(),gf(),_f())}function pf(e){if(Dd!==0){var t=Od.onRecoverableError;t(e,{componentStack:null})}}function mf(){Dd===3&&(Dd=0,Ru(kd,Od),Dd=4)}function hf(){if(Dd===1){Dd=0;var e=Od,t=kd,n=Ad,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=j.T,j.T=null;var i=ve.p;ve.p=2;var a=id;id|=4;try{mu=hu=!1,Pu(t,e,n),n=vp;var o=Jr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&qr(s.ownerDocument.documentElement,s)){if(c!==null&&Yr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Kr(s,h),v=Kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Th=!!_p,vp=_p=null}finally{id=a,ve.p=i,j.T=r}}e.current=t,Dd=2}}function gf(){if(Dd===2){Dd=0;var e=Od,t=kd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=ve.p;ve.p=2;var i=id;id|=4;try{yu(e,t.alternate,t)}finally{id=i,ve.p=r,j.T=n}}Dd=3}}function _f(){if(Dd===4||Dd===3){Dd=0;var e=Pd;Pd=null,Ue();var t=Od,n=kd,r=Ad,i=Nd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Dd=5:(Dd=0,kd=Od=null,vf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Ed=null),xt(r),n=n.stateNode,et&&typeof et.onCommitFiberRoot==`function`)try{et.onCommitFiberRoot($e,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=j.T,a=ve.p,ve.p=2,j.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{j.T=n,ve.p=a}}if(i=Fd,o=Id,Id=null,i!==null&&(Fd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Ad&3&&yf(),Ff(t),a=t.pendingLanes,r&261930&&a&42?t===Rd?Ld++:(Ld=0,Rd=t):(Ld=0,Rd=null),If(0,!1)}}function vf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Pa(t)))}function yf(){return Pd!==null&&(Pd.skipTransition(),Pd=null),hf(),gf(),_f(),bf()}function bf(){if(Dd!==5)return!1;var e=Od,t=jd;jd=0;var n=xt(Ad),r=j.T,a=ve.p;try{ve.p=32>n?32:n,j.T=null,n=Md,Md=null;var o=Od,s=Ad;if(Dd=0,kd=Od=null,Ad=0,id&6)throw Error(i(331));var c=id;if(id|=4,$u(o.current),Gu(o,o.current,s,n),id=c,If(0,!1),et&&typeof et.onPostCommitFiberRoot==`function`)try{et.onPostCommitFiberRoot($e,o)}catch{}return!0}finally{ve.p=a,j.T=r,vf(e,t)}}function xf(e,t,n){t=Ui(n,t),t=Ac(e.stateNode,t,2),e=vo(e,t,2),e!==null&&(ht(e,2),Ff(e))}function Sf(e,t,n){if(e.tag===3)xf(e,e,n);else for(;t!==null;){if(t.tag===3){xf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Ed===null||!Ed.has(r))){e=Ui(n,e),n=jc(2),r=vo(t,n,2),r!==null&&(Mc(n,r,t,e),ht(r,2),Ff(r));break}}t=t.return}}function Cf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new rd;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(fd=!0,i.add(n),e=wf.bind(null,e,t,n),t.then(e,e))}function wf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ad===e&&(sd&n)===n&&(md===4||md===3&&(sd&62914560)===sd&&300>We()-Sd?id&2?_d|=n:Yd(e,0):_d|=n,vd===sd&&(vd=0)),Ff(e)}function Tf(e,t){t===0&&(t=mt()),e=Oi(e,t),e!==null&&(ht(e,t),Ff(e))}function Ef(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tf(e,n)}function Df(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Tf(e,n)}function Of(e,t){return Be(e,t)}var kf=null,Af=null,jf=!1,Mf=!1,Nf=!1,Pf=0;function Ff(e){e!==Af&&e.next===null&&(Af===null?kf=Af=e:Af=Af.next=e),Mf=!0,jf||(jf=!0,Hf())}function If(e,t){if(!Nf&&Mf){Nf=!0;do for(var n=!1,r=kf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-nt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Vf(r,a))}else a=sd,a=ut(r,r===ad?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||dt(r,a)||(n=!0,Vf(r,a))}r=r.next}while(n);Nf=!1}}function Lf(){Rf()}function Rf(){Mf=jf=!1;var e=0;Pf!==0&&Tp()&&(e=Pf);for(var t=We(),n=null,r=kf;r!==null;){var i=r.next,a=zf(r,t);a===0?(r.next=null,n===null?kf=i:n.next=i,i===null&&(Af=n)):(n=r,(e!==0||a&3)&&(Mf=!0)),r=i}Dd!==0&&Dd!==5||If(e,!1),Pf!==0&&(Pf=0)}function zf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-nt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=pt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ad,n=sd,n=ut(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(cd===2||cd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ve(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||dt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ve(r),xt(n)){case 2:case 8:n=qe;break;case 32:n=Je;break;case 268435456:n=Xe;break;default:n=Je}return r=Bf.bind(null,e),n=Be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ve(r),e.callbackPriority=2,e.callbackNode=null,2}function Bf(e,t){if(Dd!==0&&Dd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(yf()&&e.callbackNode!==n)return null;var r=sd;return r=ut(e,e===ad?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ud(e,r,t),zf(e,We()),e.callbackNode!=null&&e.callbackNode===n?Bf.bind(null,e):null)}function Vf(e,t){if(yf())return null;Ud(e,t,!0)}function Hf(){Ap(function(){id&6?Be(Ke,Lf):Rf()})}function Uf(){if(Pf===0){var e=Ba;e===0&&(e=ot,ot<<=1,!(ot&261888)&&(ot=256)),Pf=e}return Pf}function Wf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:bn(e)}function Gf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Wf((i[Et]||null).action),o=r.submitter;o&&(t=(t=o[Et]||null)?Wf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Pf!==0){var e=new FormData(i,o);nc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),nc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Kf=0;Kf<hi.length;Kf++){var qf=hi[Kf];gi(qf.toLowerCase(),`on`+(qf[0].toUpperCase()+qf.slice(1)))}gi(si,`onAnimationEnd`),gi(ci,`onAnimationIteration`),gi(li,`onAnimationStart`),gi(`dblclick`,`onDoubleClick`),gi(`focusin`,`onFocus`),gi(`focusout`,`onBlur`),gi(ui,`onTransitionRun`),gi(di,`onTransitionStart`),gi(fi,`onTransitionCancel`),gi(pi,`onTransitionEnd`),Wt(`onMouseEnter`,[`mouseout`,`mouseover`]),Wt(`onMouseLeave`,[`mouseout`,`mouseover`]),Wt(`onPointerEnter`,[`pointerout`,`pointerover`]),Wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ut(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ut(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ut(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ut(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ut(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ut(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Jf=`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(` `),Yf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Jf));function Xf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}}}}function H(e,t){var n=t[Ot];n===void 0&&(n=t[Ot]=new Set);var r=e+`__bubble`;n.has(r)||(ep(t,e,2,!1),n.add(r))}function Zf(e,t,n){var r=0;t&&(r|=4),ep(n,e,r,t)}var Qf=`_reactListening`+Math.random().toString(36).slice(2);function $f(e){if(!e[Qf]){e[Qf]=!0,Vt.forEach(function(t){t!==`selectionchange`&&(Yf.has(t)||Zf(t,!1,e),Zf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qf]||(t[Qf]=!0,Zf(`selectionchange`,!1,t))}}function ep(e,t,n,r){switch(Mh(t)){case 2:var i=Eh;break;case 8:i=Dh;break;default:i=Oh}n=i.bind(null,t,n,e),i=void 0,!jn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function tp(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ft(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}On(function(){var r=a,i=Cn(n),s=[];a:{var c=mi.get(e);if(c!==void 0){var l=Hn,u=e;switch(e){case`keypress`:if(Ln(n)===0)break a;case`keydown`:case`keyup`:l=or;break;case`focusin`:u=`focus`,l=Zn;break;case`focusout`:u=`blur`,l=Zn;break;case`beforeblur`:case`afterblur`:l=Zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Yn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=lr;break;case si:case ci:case li:l=Qn;break;case pi:l=ur;break;case`scroll`:case`scrollend`:l=Wn;break;case`wheel`:l=dr;break;case`copy`:case`cut`:case`paste`:l=$n;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=sr;break;case`submit`:l=cr;break;case`toggle`:case`beforetoggle`:l=F}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=kn(m,p),g!=null&&d.push(np(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==Sn&&(u=n.relatedTarget||n.fromElement)&&(Ft(u)||u[Dt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ft(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Yn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=sr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Lt(c),h=l==null?u:Lt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Ft(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,ip):null,c!==null&&ap(s,u,c,d,!1),l!==null&&f!==null&&ap(s,f,l,d,!0)))}a:{if(c=r?Lt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=jr;else if(Tr(c)){if(Mr)_=Vr;else{_=zr;var v=Rr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&_n(r.elementType)&&(_=jr):_=Br;if(_&&=_(e,r)){Er(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Lt(r):window,e){case`focusin`:(Tr(v)||v.contentEditable===`true`)&&(Zr=v,Qr=r,$r=null);break;case`focusout`:$r=Qr=Zr=null;break;case`mousedown`:ei=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ei=!1,ti(s,n,i);break;case`selectionchange`:if(Xr)break;case`keydown`:case`keyup`:ti(s,n,i)}var y;if(pr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else xr?yr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(gr&&n.locale!==`ko`&&(xr||b!==`onCompositionStart`?b===`onCompositionEnd`&&xr&&(y=In()):(Nn=i,Pn=`value`in Nn?Nn.value:Nn.textContent,xr=!0)),v=rp(r,b),0<v.length&&(b=new er(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=br(n),y!==null&&(b.data=y)))),(y=hr?Sr(e,n):Cr(e,n))&&(b=rp(r,`onBeforeInput`),0<b.length&&(v=new er(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Gf(s,e,r,n,i)}Xf(s,t)})}function np(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rp(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=kn(e,n),i!=null&&r.unshift(np(e,i,a)),i=kn(e,t),i!=null&&r.push(np(e,i,a))),e.tag===3)return r;e=e.return}return[]}function ip(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ap(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=kn(n,a),l!=null&&o.unshift(np(n,l,c))):i||(l=kn(n,a),l!=null&&o.push(np(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var op=/\r\n?/g,sp=/\u0000|\uFFFD/g;function cp(e){return(typeof e==`string`?e:``+e).replace(op,`
11
+ `).replace(sp,``)}function lp(e,t){return t=cp(t),cp(e)===t}function up(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&pn(e,``+r);else return;break;case`className`:Zt(e,`class`,r);break;case`tabIndex`:Zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Zt(e,n,r);break;case`style`:gn(e,r,o);return;case`data`:if(t!==`object`){Zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&up(e,t,`name`,a.name,a,null),up(e,t,`formEncType`,a.formEncType,a,null),up(e,t,`formMethod`,a.formMethod,a,null),up(e,t,`formTarget`,a.formTarget,a,null)):(up(e,t,`encType`,a.encType,a,null),up(e,t,`method`,a.method,a,null),up(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=xn);return;case`onScroll`:r!=null&&H(`scroll`,e);return;case`onScrollEnd`:r!=null&&H(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=bn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:H(`beforetoggle`,e),H(`toggle`,e),Xt(e,`popover`,r);break;case`xlinkActuate`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Xt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=vn.get(n)||n,Xt(e,n,r);else return}Jt=!0}function dp(e,t,n,r,a,o){switch(n){case`style`:gn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)pn(e,``+r);else return;break;case`onScroll`:r!=null&&H(`scroll`,e);return;case`onScrollEnd`:r!=null&&H(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=xn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Et]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Jt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Xt(e,n,r)}return}Jt=!0}function fp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:H(`error`,e),H(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:up(e,t,o,s,n,null)}}a&&up(e,t,`srcSet`,n.srcSet,n,null),r&&up(e,t,`src`,n.src,n,null);return;case`input`:H(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:up(e,t,r,d,n,null)}}cn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in H(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:up(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&un(e,!!r,n,!0):un(e,!!r,t,!1);return;case`textarea`:for(s in H(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:up(e,t,s,c,n,null)}fn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:up(e,t,l,r,n,null)}return;case`dialog`:H(`beforetoggle`,e),H(`toggle`,e),H(`cancel`,e),H(`close`,e);break;case`iframe`:case`object`:H(`load`,e);break;case`video`:case`audio`:for(r=0;r<Jf.length;r++)H(Jf[r],e);break;case`image`:H(`error`,e),H(`load`,e);break;case`details`:H(`toggle`,e);break;case`embed`:case`source`:case`link`:H(`error`,e),H(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:up(e,t,u,r,n,null)}return;default:if(_n(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&dp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&up(e,t,c,r,n,null))}var pp={};function mp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||up(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Jt=!0),o=m;break;case`name`:m!==f&&(Jt=!0),a=m;break;case`checked`:m!==f&&(Jt=!0),u=m;break;case`defaultChecked`:m!==f&&(Jt=!0),d=m;break;case`value`:m!==f&&(Jt=!0),s=m;break;case`defaultValue`:m!==f&&(Jt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&up(e,t,p,m,r,f)}}sn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||up(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Jt=!0),p=o;break;case`defaultValue`:o!==l&&(Jt=!0),c=o;break;case`multiple`:o!==l&&(Jt=!0),s=o;default:o!==l&&up(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?un(e,!!n,n?[]:``,!1):un(e,!!n,t,!0)):un(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:up(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Jt=!0),p=a;break;case`defaultValue`:a!==o&&(Jt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&up(e,t,s,a,r,o)}dn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:up(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Jt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:up(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&up(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:up(e,t,u,p,r,m)}return;default:if(_n(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&dp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||dp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&up(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||up(e,t,f,p,r,m)}function hp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function gp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&hp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&hp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var _p=null,vp=null;function yp(e){return e.nodeType===9?e:e.ownerDocument}function bp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function xp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Sp(e,t,n,r){return n=yp(n).createElement(e),n[Tt]=r,n[Et]=t,fp(n,e,t),zt(n),n}function Cp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wp=null;function Tp(){var e=window.event;return e&&e.type===`popstate`?e!==wp&&(wp=e,!0):(wp=null,!1)}var Ep=typeof setTimeout==`function`?setTimeout:void 0,Dp=typeof clearTimeout==`function`?clearTimeout:void 0,Op=typeof Promise==`function`?Promise:void 0,kp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Ep,Ap=typeof queueMicrotask==`function`?queueMicrotask:Op===void 0?Ep:function(e){return Op.resolve(null).then(e).catch(jp)};function jp(e){setTimeout(function(){throw e})}function Mp(e){return e===`head`}function Np(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Zh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Dm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Dm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Dm(e.ownerDocument.body)}n=i}while(n);Zh(t)}function Pp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Fp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ip(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Lp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Rp(e){return Lp(e.getBoundingClientRect(),getComputedStyle(e),e)}function zp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Lp(t,n,e)}function Bp(e){return e.documentElement.clientHeight}function Vp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Hp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Bp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=oh(f),u>lh){s.length=o;break}f=new Promise(Vp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Up(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Up.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Up.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Up.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Wp(e){return{name:e,group:new Up(`group`,e),imagePair:new Up(`image-pair`,e),old:new Up(`old`,e),new:new Up(`new`,e)}}function Gp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Gp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Xp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Jp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Kp,e,s,r)}this._eventListeners=a}};function Kp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Gp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Xp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Jp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,qp,e,n,i),r.splice(t,1),a!==null&&a()}};function qp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Jp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Yp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Xp(e,t,n,r){if(e.length===0)return-1;r=Yp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Yp(a.optionsOrUseCapture)===r)return i}return-1}Gp.prototype.dispatchEvent=function(e){var t=p(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Jp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Jp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Gp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Zp,e,void 0,void 0)};function Zp(e,t){return e.tag!==6&&(e=v(e),Cm(e,t))}Gp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Qp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Zp(t[n],e);n--);};function Qp(e,t){return t.push(e),!1}Gp.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=v(e),e=yp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,$p,e,void 0,void 0))};function $p(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Gp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,em,e,void 0,void 0)};function em(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Gp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,tm,e,void 0,void 0);for(var n=t=0;n<nm.length;n++){var r=nm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):nm[t++]=r}nm.length=t}};function tm(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var nm=[],rm=!1;function im(e,t,n){nm.push({fragmentInstance:e,observer:t,instance:n}),rm||(rm=!0,wm(function(){rm=!1;var e=nm;nm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Gp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,am,e,void 0,void 0),e};function am(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Gp.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Gp.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Qp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,m(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=m(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||om(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function om(e,t,n,r,i){var a=Ft(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=p(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(f(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(f(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function sm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Gp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Qp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||p(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),sm(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),sm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function cm(e,t){return e=v(e),lm(e,t),!1}function lm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function um(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Jp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<nm.length;i++){var a=nm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(nm[r++]=a)}nm.length=r,n.observe(e)}),lm(e,t))}function dm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Jp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?im(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function fm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:fm(n),Pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=ym(e.nextSibling),e===null)break}return null}function mm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=ym(e.nextSibling),e===null))return null;return e}function hm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=ym(e.nextSibling),e===null))return null;return e}function gm(e){return e.data===`$?`||e.data===`$~`}function _m(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function ym(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var bm=null;function xm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return ym(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Cm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function wm(e){kp(function(){kp(function(t){return e(t)})})}function Tm(e,t,n){switch(t=yp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Em(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&up(e,t,r,null,pp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===xn&&(e.onclick=null),Pt(e)}function Dm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pt(e)}var Om=new Map,km=new Set;function Am(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var jm=ve.d;ve.d={f:Mm,r:Nm,D:Im,C:Lm,L:Rm,m:zm,X:Vm,S:Bm,M:Hm};function Mm(){var e=jm.f(),t=qd();return e||t}function Nm(e){var t=It(e);t!==null&&t.tag===5&&t.type===`form`?ic(t):jm.r(e)}var Pm=typeof document>`u`?null:document;function Fm(e,t,n){var r=Pm;if(r&&typeof t==`string`&&t){var i=on(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),km.has(i)||(km.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),fp(t,`link`,e),zt(t),r.head.appendChild(t)))}}function Im(e){jm.D(e),Fm(`dns-prefetch`,e,null)}function Lm(e,t){jm.C(e,t),Fm(`preconnect`,e,t)}function Rm(e,t,n){jm.L(e,t,n);var r=Pm;if(r&&e&&t){var i=`link[rel="preload"][as="`+on(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+on(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+on(n.imageSizes)+`"]`)):i+=`[href="`+on(e)+`"]`;var a=i;switch(t){case`style`:a=Wm(e);break;case`script`:a=Jm(e)}if(!(Om.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Om.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gm(a))||t===`script`&&r.querySelector(Ym(a))))){var o=r.createElement(`link`);fp(o,`link`,e),t===`style`&&(o[Nt]=!0,o.onload=o.onerror=function(){Bt(o)}),zt(o),r.head.appendChild(o)}}}function zm(e,t){jm.m(e,t);var n=Pm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+on(r)+`"][href="`+on(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jm(e)}if(!Om.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Om.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ym(a)))return}r=n.createElement(`link`),fp(r,`link`,e),zt(r),n.head.appendChild(r)}}}function Bm(e,t,n){jm.S(e,t,n);var r=Pm;if(r&&e){var i=Rt(r).hoistableStyles,a=Wm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Om.get(a))&&Qm(e,n);var c=o=r.createElement(`link`);zt(c),fp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vm(e,t){jm.X(e,t);var n=Pm;if(n&&e){var r=Rt(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0},t),(t=Om.get(i))&&$m(e,t),a=n.createElement(`script`),zt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hm(e,t){jm.M(e,t);var n=Pm;if(n&&e){var r=Rt(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Om.get(i))&&$m(e,t),a=n.createElement(`script`),zt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Um(e,t,n,r){var a=(a=Ee.current)?Am(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Wm(n.href),t=Rt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wm(n.href);var o=Rt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Gm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Om.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Om.set(e,o)),qm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Jm(n),t=Rt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wm(e){return`href="`+on(e)+`"`}function Gm(e){return`link[rel="stylesheet"][`+e+`]`}function Km(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function qm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Nt]){r.loading=1;return}}else t=e.createElement(`link`),t[Nt]=!0,t.onload=t.onerror=Bt.bind(null,t),fp(t,`link`,n),zt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Jm(e){return`[src="`+on(e)+`"]`}function Ym(e){return`script[async]`+e}function Xm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+on(n.href)+`"]`);if(r)return t.instance=r,zt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),zt(r),fp(r,`style`,a),Zm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wm(n.href);var o=e.querySelector(Gm(a));if(o)return t.state.loading|=4,t.instance=o,zt(o),o;r=Km(n),(a=Om.get(a))&&Qm(r,a),o=(e.ownerDocument||e).createElement(`link`),zt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),fp(o,`link`,r),t.state.loading|=4,Zm(o,n.precedence,e),t.instance=o;case`script`:return o=Jm(n.src),(a=e.querySelector(Ym(o)))?(t.instance=a,zt(a),a):(r=n,(a=Om.get(o))&&(r=T({},n),$m(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),zt(a),fp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zm(r,n.precedence,e));return t.instance}function Zm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $m(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var eh=null;function th(e,t,n){if(eh===null){var r=new Map,i=eh=new Map;i.set(n,r)}else i=eh,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Mt]||a[Tt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function nh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rh(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ih(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function ah(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function oh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function sh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=oh(t),e.suspenseyImages.push(t)),e=ph.bind(e),t.decode().then(e,e))}function ch(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wm(r.href),a=t.querySelector(Gm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=fh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,zt(a);return}a=t.ownerDocument||t,r=Km(r),(i=Om.get(i))&&Qm(r,i),a=a.createElement(`link`),zt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),fp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=fh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var lh=0;function uh(e,t){return e.stylesheets&&e.count===0&&hh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&hh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&lh===0&&(lh=62500*gp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>lh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function dh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)hh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function fh(){this.count--,dh(this)}function ph(){this.imgCount--,dh(this)}var mh=null;function hh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mh=new Map,t.forEach(gh,e),mh=null,fh.call(e))}function gh(e,t){if(!(t.state.loading&4)){var n=mh.get(e);if(n)var r=n.get(null);else{n=new Map,mh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=fh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var _h={$$typeof:ie,Provider:null,Consumer:null,_currentValue:ye,_currentValue2:ye,_threadCount:0};function vh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=N(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=N(0),this.hiddenUpdates=N(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function yh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new vh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ni(3,null,null,t),e.current=a,a.stateNode=e,t=Na(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ho(a),e}function bh(e){return e?(e=ji,e):ji}function U(e,t,n,r,i,a){i=bh(i),r.context===null?r.context=i:r.pendingContext=i,r=_o(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=vo(e,r,t),n!==null&&(Hd(n,e,t),yo(n,e,t))}function xh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sh(e,t){xh(e,t),(e=e.alternate)&&xh(e,t)}function Ch(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&Hd(t,e,67108864),Sh(e,67108864)}}function wh(e){if(e.tag===13||e.tag===31){var t=zd();t=bt(t);var n=Oi(e,t);n!==null&&Hd(n,e,t),Sh(e,t)}}var Th=!0;function Eh(e,t,n,r){var i=j.T;j.T=null;var a=ve.p;try{ve.p=2,Oh(e,t,n,r)}finally{ve.p=a,j.T=i}}function Dh(e,t,n,r){var i=j.T;j.T=null;var a=ve.p;try{ve.p=8,Oh(e,t,n,r)}finally{ve.p=a,j.T=i}}function Oh(e,t,n,r){if(Th){var i=kh(r);if(i===null)tp(e,t,r,Ah,n),Vh(e,r);else if(Uh(i,e,t,n,r))r.stopPropagation();else if(Vh(e,r),t&4&&-1<Bh.indexOf(e)){for(;i!==null;){var a=It(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=lt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-nt(o);s.entanglements[1]|=c,o&=~c}Ff(a),!(id&6)&&(wd=We()+500,If(0,!1))}}break;case 31:case 13:s=Oi(a,2),s!==null&&Hd(s,a,2),qd(),Sh(a,2)}if(a=kh(r),a===null&&tp(e,t,r,Ah,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else tp(e,t,r,null,n)}}function kh(e){return e=Cn(e),jh(e)}var Ah=null;function jh(e){if(Ah=null,e=Ft(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ah=e,null}function Mh(e){switch(e){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(Ge()){case Ke:return 2;case qe:return 8;case Je:case Ye:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Nh=!1,Ph=null,Fh=null,Ih=null,Lh=new Map,Rh=new Map,zh=[],Bh=`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 Vh(e,t){switch(e){case`focusin`:case`focusout`:Ph=null;break;case`dragenter`:case`dragleave`:Fh=null;break;case`mouseover`:case`mouseout`:Ih=null;break;case`pointerover`:case`pointerout`:Lh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Rh.delete(t.pointerId)}}function Hh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=It(t),t!==null&&Ch(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Uh(e,t,n,r,i){switch(t){case`focusin`:return Ph=Hh(Ph,e,t,n,r,i),!0;case`dragenter`:return Fh=Hh(Fh,e,t,n,r,i),!0;case`mouseover`:return Ih=Hh(Ih,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Lh.set(a,Hh(Lh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Rh.set(a,Hh(Rh.get(a)||null,e,t,n,r,i)),!0}return!1}function Wh(e){var t=Ft(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ct(e.priority,function(){wh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ct(e.priority,function(){wh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sn=r,n.target.dispatchEvent(r),Sn=null}else return t=It(n),t!==null&&Ch(t),e.blockedOn=n,!1;t.shift()}return!0}function Kh(e,t,n){Gh(e)&&n.delete(t)}function qh(){Nh=!1,Ph!==null&&Gh(Ph)&&(Ph=null),Fh!==null&&Gh(Fh)&&(Fh=null),Ih!==null&&Gh(Ih)&&(Ih=null),Lh.forEach(Kh),Rh.forEach(Kh)}function Jh(e,n){e.blockedOn===n&&(e.blockedOn=null,Nh||(Nh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qh)))}var Yh=null;function Xh(e){Yh!==e&&(Yh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Yh===e&&(Yh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(jh(r||n)===null)continue;break}var a=It(n);a!==null&&(e.splice(t,3),t-=3,nc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Zh(e){function t(t){return Jh(t,e)}Ph!==null&&Jh(Ph,e),Fh!==null&&Jh(Fh,e),Ih!==null&&Jh(Ih,e),Lh.forEach(t),Rh.forEach(t);for(var n=0;n<zh.length;n++){var r=zh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<zh.length&&(n=zh[0],n.blockedOn===null);)Wh(n),n.blockedOn===null&&zh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Et]||null;if(typeof a==`function`)o||Xh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Et]||null)s=o.formAction;else if(jh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Xh(n)}}}function Qh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function $h(e){this._internalRoot=e}eg.prototype.render=$h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;U(n,zd(),e,t,null,null)},eg.prototype.unmount=$h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;U(e.current,2,null,e,null,null),qd(),t[Dt]=null}};function eg(e){this._internalRoot=e}eg.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zh.length&&t!==0&&t<zh[n].priority;n++);zh.splice(n,0,e),n===0&&Wh(e)}};var tg=n.version;if(tg!==`19.3.0`)throw Error(i(527,tg,`19.3.0`));ve.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var ng={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var rg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rg.isDisabled&&rg.supportsFiber)try{$e=rg.inject(ng),et=rg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Tc,s=Ec,c=Dc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=yh(e,1,!1,null,null,n,r,null,o,s,c,Qh),e[Dt]=t.current,$f(e),new $h(t)}})),bS=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=yS()}));function xS(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function SS(e,t=`|`){return e.map(e=>BS(e)).join(t)}function CS(e,t){return typeof t==`bigint`?t.toString():t}function wS(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function TS(e){return e==null}function ES(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function DS(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function OS(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function kS(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function AS(e){return JSON.stringify(e)}function jS(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var MS=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function NS(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var PS=wS(()=>{if(TC.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function FS(e){if(NS(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return NS(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function IS(e){return FS(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var LS=new Set([`string`,`number`,`symbol`]);function RS(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function zS(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function W(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw 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 BS(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function VS(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var HS={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function US(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return zS(e,kS(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&OS(e,r,n.shape[r])}return OS(this,`shape`,e),e},checks:[]}))}function WS(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return zS(e,kS(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return OS(this,`shape`,r),r},checks:[]}))}function GS(e,t){if(!FS(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return zS(e,kS(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return OS(this,`shape`,n),n}}))}function KS(e,t){if(!FS(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return zS(e,kS(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return OS(this,`shape`,n),n}}))}function qS(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return zS(e,kS(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return OS(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function JS(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return zS(t,kS(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return OS(this,`shape`,i),i},checks:[]}))}function YS(e,t,n){return zS(t,kS(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return OS(this,`shape`,i),i}}))}function XS(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ZS(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function QS(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function $S(e){return typeof e==`string`?e:e?.message}function eC(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function tC(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:$S(e.inst?._zod.def?.error?.(e))??$S(a?.(e))??$S(t?.error?.(e))??$S(n.customError?.(e))??$S(n.localeError?.(e))??`Invalid input`,{inst:s,schema:c,continue:l,input:u,...d}=e;return d.path??=[],d.message=o,t?.reportInput&&(d.input=u),d}var nC=/[\uD800-\uDBFF]/;function rC(e){let t=e.length;if(!nC.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function iC(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function aC(e){let 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`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function oC(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function sC(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):uC(e,n,r.value)}}function cC(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function lC(e,t,n){return cC(e,t,n,!1)}function uC(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:cC(this,t,n.bind(this))},set(e){cC(this,t,e)}})}function dC(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var fC,pC=!1,mC={configurable:!0,get(){pC=!0}};function hC(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&fC!==e._zod?fC=void 0:(fC=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,mC);let e=pC;pC=!1;try{let r=n(this);return pC?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),pC||=e,r}catch(n){throw delete this[t],pC||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function gC(e,t,n,r){let i=dC(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var _C=`~constantCatch`;function vC(e){let t=()=>e;return t[_C]=!0,t}var yC,bC={value:void 0,enumerable:!1},xC=`captureStackTrace`in Error?Error:null;function SC(e){let t=xC;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return xC=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function G(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){bC.value=new a(r);try{Object.defineProperty(n,"_zod",bC)}finally{bC.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),sC(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?SC(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var CC=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},wC=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(yC=globalThis).__zod_globalConfig??(yC.__zod_globalConfig={});var TC=globalThis.__zod_globalConfig;function EC(e){return e&&Object.assign(TC,e),TC}function DC(){let e=this._zod;return e.message??=JSON.stringify(e.def,CS,2),e.message}function OC(e){this._zod.message=e}var kC={get:DC,set:OC,enumerable:!0,configurable:!0},AC={value:void 0,enumerable:!1},jC={value:void 0,enumerable:!1},MC=new WeakSet([Object.prototype,Error.prototype]),NC=(e,t)=>{e.name=`$ZodError`,AC.value=e._zod,Object.defineProperty(e,"_zod",AC),jC.value=t,Object.defineProperty(e,"issues",jC),AC.value=void 0,jC.value=void 0,Object.defineProperty(e,"message",kC);let n=Object.getPrototypeOf(e);MC.has(n)||(MC.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},PC=G(`$ZodError`,NC),FC=G(`$ZodError`,NC,void 0,{Parent:Error});function IC(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function LC(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?IC(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function RC(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function zC(e,t){return{callee:t?.callee??e,Err:t?.Err}}var BC=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new CC;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>tC(e,o,EC())));throw MS(n,a?.callee??t),n}return s.value};return t},VC=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>tC(e,o,EC())));throw MS(n,a?.callee??t),n}return s.value};return t},HC=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new CC;return a.issues.length?{success:!1,error:new(e??PC)(a.issues.map(e=>tC(e,i,EC())))}:{success:!0,data:a.value}},UC=HC(FC),WC=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>tC(e,i,EC())))}:{success:!0,data:a.value}},GC=WC(FC),KC=e=>{let t=BC(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,zC(n,a))};return n},qC=e=>{let t=BC(e),n=(e,r,i,a)=>t(e,r,i,zC(n,a));return n},JC=e=>{let t=VC(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,zC(n,a))};return n},YC=e=>{let t=VC(e),n=async(e,r,i,a)=>await t(e,r,i,zC(n,a));return n},XC=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return HC(e)(t,n,i)},ZC=e=>(t,n,r)=>HC(e)(t,n,r),QC=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return WC(e)(t,n,i)},$C=e=>async(t,n,r)=>WC(e)(t,n,r),ew=/^[cC][0-9a-z]{6,}$/,tw=/^[0-9a-z]+$/,nw=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,rw=/^[0-9a-vA-V]{20}$/,iw=/^[A-Za-z0-9]{27}$/,aw=/^[a-zA-Z0-9_-]{21}$/;function ow(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var sw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,cw=/^([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})$/,lw=e=>e?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)$/,uw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,dw=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function fw(){return new RegExp(dw,`u`)}var pw=/^(?:(?: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])$/,mw=/^(([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}|:))$/,hw=/^((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])$/,gw=/^(([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])$/,_w=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vw=/^[A-Za-z0-9_-]*$/,yw=/^https?$/,bw=/^\+[1-9]\d{6,14}$/,xw=`(?:(?:\\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 Sw(e){return RegExp(`^${e}$`)}var Cw=Sw(xw);function ww(e){let 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 Tw(e){return RegExp(`^${ww(e)}$`)}function Ew(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${ww({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${ww({precision:e.precision})}`:n;return RegExp(`^${xw}T(?:${r})$`)}var Dw=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Ow=/^-?\d+$/,kw=/^-?\d+(?:\.\d+)?$/,Aw=/^(?:true|false)$/i,jw=/^[^A-Z]*$/,Mw=/^[^a-z]*$/,Nw=G(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Pw=e=>{let t=e.value;return!TS(t)&&t.length!==void 0},Fw={number:`number`,bigint:`bigint`,object:`date`},Iw=G(`$ZodCheckLessThan`,(e,t)=>{Nw.init(e,t);let n=Fw[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Fw[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lw=G(`$ZodCheckGreaterThan`,(e,t)=>{Nw.init(e,t);let n=Fw[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Fw[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Rw=G(`$ZodCheckMultipleOf`,(e,t)=>{Nw.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):DS(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),zw=G(`$ZodCheckNumberFormat`,(e,t)=>{Nw.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=HS[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Ow)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Bw=G(`$ZodCheckMaxLength`,(e,t)=>{var n;Nw.init(e,t),(n=e._zod.def).when??(n.when=Pw),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?rC(r):i)<=t.maximum)return;let a=iC(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Vw=G(`$ZodCheckMinLength`,(e,t)=>{var n;Nw.init(e,t),(n=e._zod.def).when??(n.when=Pw),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?rC(r):i)>=t.minimum)return;let a=iC(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Hw=G(`$ZodCheckLengthEquals`,(e,t)=>{var n;Nw.init(e,t),(n=e._zod.def).when??(n.when=Pw),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?rC(r):i;if(a===t.length)return;let o=iC(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Uw=G(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Nw.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ww=G(`$ZodCheckRegex`,(e,t)=>{Uw.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Gw=G(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=jw,Uw.init(e,t)}),Kw=G(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Mw,Uw.init(e,t)}),qw=G(`$ZodCheckIncludes`,(e,t)=>{Nw.init(e,t);let n=RS(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Jw=G(`$ZodCheckStartsWith`,(e,t)=>{Nw.init(e,t);let n=RegExp(`^${RS(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Yw=G(`$ZodCheckEndsWith`,(e,t)=>{Nw.init(e,t);let n=RegExp(`.*${RS(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Xw=G(`$ZodCheckOverwrite`,(e,t)=>{Nw.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Zw=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
12
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
13
+ `)}\n};`)(...Object.values(this.closed))}},Qw={major:4,minor:5,patch:4},$w=G(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Qw;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=XS(t),a;for(let o of n){if(o._zod.def.when){if(ZS(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new CC;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(eC(t.issues,n,e),i||=XS(t,n))});else{if(t.issues.length===n)continue;eC(t.issues,n,e),i||=XS(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(XS(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new CC;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new CC;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return lC(this,`~standard`,tT(this))},set"~standard"(e){cC(this,`~standard`,e)}}),eT=e=>e.success?{value:e.data}:{issues:e.error?.issues};function tT(e){return{validate:t=>{try{return eT(UC(e,t))}catch{return GC(e,t).then(eT)}},vendor:`zod`,version:1}}var nT=G(`$ZodString`,(e,t)=>{$w.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Dw(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),rT=G(`$ZodStringFormat`,(e,t)=>{Uw.init(e,t),nT.init(e,t)}),iT=G(`$ZodGUID`,(e,t)=>{t.pattern??=cw,rT.init(e,t)}),aT=G(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=lw(e)}else t.pattern??=lw();rT.init(e,t)}),oT=G(`$ZodEmail`,(e,t)=>{t.pattern??=uw,rT.init(e,t)});function sT(e,t){if(!t.normalize&&t.protocol?.source===yw.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var cT=/[\t\n\r]/g;function lT(e){return e.replace(cT,``)}function uT(e,t){return t.lastIndex=0,t.test(e.hostname)}function dT(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var fT=G(`$ZodURL`,(e,t)=>{rT.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=sT(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!uT(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!dT(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:lT(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),pT=G(`$ZodEmoji`,(e,t)=>{t.pattern??=fw(),rT.init(e,t)}),mT=G(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?aw:ow(t.length),rT.init(e,t)}),hT=G(`$ZodCUID`,(e,t)=>{t.pattern??=ew,rT.init(e,t)}),gT=G(`$ZodCUID2`,(e,t)=>{t.pattern??=tw,rT.init(e,t)}),_T=G(`$ZodULID`,(e,t)=>{t.pattern??=nw,rT.init(e,t)}),vT=G(`$ZodXID`,(e,t)=>{t.pattern??=rw,rT.init(e,t)}),yT=G(`$ZodKSUID`,(e,t)=>{t.pattern??=iw,rT.init(e,t)}),bT=G(`$ZodISODateTime`,(e,t)=>{t.pattern??=Ew(t),rT.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),xT=G(`$ZodISODate`,(e,t)=>{t.pattern??=Cw,rT.init(e,t)}),ST=G(`$ZodISOTime`,(e,t)=>{t.pattern??=Tw(t),rT.init(e,t)}),CT=G(`$ZodISODuration`,(e,t)=>{t.pattern??=sw,rT.init(e,t)}),wT=G(`$ZodIPv4`,(e,t)=>{t.pattern??=pw,rT.init(e,t),e._zod.bag.format=`ipv4`}),TT=/^[0-9a-fA-F:.]+$/;function ET(e){if(!TT.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var DT=G(`$ZodIPv6`,(e,t)=>{t.pattern??=mw,rT.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{ET(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),OT=G(`$ZodCIDRv4`,(e,t)=>{t.pattern??=hw,rT.init(e,t)});function kT(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:ET(n)}var AT=G(`$ZodCIDRv6`,(e,t)=>{t.pattern??=gw,rT.init(e,t),e._zod.check=n=>{kT(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function jT(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var MT=G(`$ZodBase64`,(e,t)=>{t.pattern??=_w,rT.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{jT(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function NT(e){if(!vw.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return jT(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var PT=G(`$ZodBase64URL`,(e,t)=>{t.pattern??=vw,rT.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{NT(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),FT=G(`$ZodE164`,(e,t)=>{t.pattern??=bw,rT.init(e,t)});function IT(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var LT=G(`$ZodJWT`,(e,t)=>{rT.init(e,t),e._zod.check=n=>{IT(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),RT=G(`$ZodNumber`,(e,t)=>{$w.init(e,t),e._zod.pattern=e._zod.bag.pattern??kw,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),zT=G(`$ZodNumberFormat`,(e,t)=>{zw.init(e,t),RT.init(e,t)}),BT=G(`$ZodBoolean`,(e,t)=>{$w.init(e,t),e._zod.pattern=Aw,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),VT=G(`$ZodUnknown`,(e,t)=>{$w.init(e,t),e._zod.parse=e=>e}),HT=G(`$ZodNever`,(e,t)=>{$w.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function UT(e,t,n){e.issues.length&&t.issues.push(...QS(n,e.issues)),t.value[n]=e.value}var WT=G(`$ZodArray`,(e,t)=>{$w.init(e,t);let n=TC.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;e<a.length;e++){let n=a[e],s=t.element._zod.run({value:n,issues:[]},i);s instanceof Promise?o.push(s.then(t=>UT(t,r,e))):UT(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}});function GT(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...QS(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}var KT=[];function qT(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:KT,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=VS(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function JT(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>GT(e,n,i,t,u,d))):GT(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var YT=new WeakMap,XT=G(`$ZodObject`,(e,t)=>{if($w.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;YT.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),YT.set(t,n),n}})}let n=wS(()=>qT(t));hC(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||OS(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=NS,i=t.catchall,a,o=TC.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>GT(n,t,e,c,r,i))):GT(a,t,e,c,r,i)}return i?JT(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),ZT=G(`$ZodObjectJIT`,(e,t)=>{XT.init(e,t);let n=e._zod.parse,r=wS(()=>qT(t)),i=TC.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Zw([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
14
+ for (let i = 0; i < ${e}.issues.length; i++) {
15
+ const iss = ${e}.issues[i];
16
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
17
+ payload.issues.push(iss);
18
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:AS(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
19
+ const ${n}_present = ${i};
20
+ if (!${n}.issues.length || ${n}_present) {
21
+ if (${n}.issues.length) {${c(n,r)}
22
+ }
23
+
24
+ if (${e}) {
25
+ newResult[${r}] = ${n}.value;
26
+ }
27
+ }
28
+
29
+ `)}else f?o.write(`
30
+ if (${n}.issues.length) {${c(n,r)}
31
+ }
32
+
33
+ if (${n}.value === undefined) {
34
+ if (${i}) {
35
+ newResult[${r}] = undefined;
36
+ }
37
+ } else {
38
+ newResult[${r}] = ${n}.value;
39
+ }
40
+
41
+ `):o.write(`
42
+ const ${n}_present = ${i};
43
+ if (${n}.issues.length) {${c(n,r)}
44
+ }
45
+ if (!${n}_present && !${n}.issues.length) {
46
+ payload.issues.push({
47
+ code: "invalid_type",
48
+ expected: "nonoptional",
49
+ input: undefined,
50
+ path: [${r}]
51
+ });
52
+ }
53
+
54
+ if (${n}_present) {
55
+ newResult[${r}] = ${n}.value;
56
+ }
57
+
58
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=NS,c=!TC.jitless,l=c&&PS.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?JT([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function QT(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!XS(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>tC(e,r,EC())))}),t)}var $T=G(`$ZodUnion`,(e,t)=>{$w.init(e,t),hC(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),hC(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),hC(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),hC(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>ES(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>QT(t,r,e,i)):QT(o,r,e,i)}}),eE=G(`$ZodIntersection`,(e,t)=>{$w.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>nE(e,t,n)):nE(e,i,a)}});function tE(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(FS(e)&&FS(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=tE(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=tE(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function nE(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=tE(t.value,n.value);if(!c.valid){if(XS(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var rE=G(`$ZodRecord`,(e,t)=>{$w.init(e,t);let n=TC.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!FS(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>tC(e,i,EC())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...QS(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...QS(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&kw.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>tC(e,i,EC())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...QS(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...QS(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),iE=G(`$ZodEnum`,(e,t)=>{$w.init(e,t);let n=xS(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>LS.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>RS(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),aE=G(`$ZodLiteral`,(e,t)=>{$w.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?RS(e):e?RS(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),oE=G(`$ZodTransform`,(e,t)=>{$w.init(e,t),e._zod.optin=`optional`,TC.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new wC(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new CC;return n.value=i,n}});function sE(e,t){return e.value=t.issues.length?void 0:t.value,e}var cE=G(`$ZodOptional`,(e,t)=>{$w.init(e,t),hC(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,hC(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),hC(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ES(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>sE(e,t)):sE(e,r)}return t.innerType._zod.run(e,n)}}),lE=G(`$ZodExactOptional`,(e,t)=>{cE.init(e,t),hC(e,`values`,e=>e.def.innerType._zod.values),hC(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),uE=G(`$ZodNullable`,(e,t)=>{$w.init(e,t),hC(e,`optin`,e=>e.def.innerType._zod.optin),hC(e,`optout`,e=>e.def.innerType._zod.optout),hC(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ES(t.source)}|null)$`):void 0}),hC(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),dE=G(`$ZodDefault`,(e,t)=>{$w.init(e,t),e._zod.optin=`defaulted`,hC(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>fE(e,t)):fE(r,t)}});function fE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var pE=G(`$ZodPrefault`,(e,t)=>{$w.init(e,t),e._zod.optin=`defaulted`,hC(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),mE=G(`$ZodNonOptional`,(e,t)=>{$w.init(e,t),hC(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>hE(t,e)):hE(i,e)}});function hE(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 gE(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>tC(e,r,EC()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var _E=G(`$ZodCatch`,(e,t)=>{$w.init(e,t),hC(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),hC(e,`optout`,e=>e.def.innerType._zod.optout),hC(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>gE(e,r,t,n)):gE(e,r,t,n)}}),vE=G(`$ZodPipe`,(e,t)=>{$w.init(e,t),hC(e,`values`,e=>e.def.in._zod.values),hC(e,`optin`,e=>e.def.in._zod.optin),hC(e,`optout`,e=>e.def.out._zod.optout),hC(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>yE(e,t.in,n)):yE(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>yE(e,t.out,n)):yE(r,t.out,n)}});function yE(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var bE=G(`$ZodReadonly`,(e,t)=>{$w.init(e,t),hC(e,`propValues`,e=>e.def.innerType._zod.propValues),hC(e,`values`,e=>e.def.innerType._zod.values),hC(e,`optin`,e=>e.def.innerType?._zod?.optin),hC(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(xE):xE(r)}});function xE(e){return e.memo||(e.value=Object.freeze(e.value)),e}var SE=G(`$ZodCustom`,(e,t)=>{Nw.init(e,t),$w.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>CE(t,n,r,e));CE(i,n,r,e)}});function CE(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(oC(e))}}var wE=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},TE=`~memo`,EE=[];function DE(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var OE=new WeakMap;function kE(e,t){let n=OE.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&kE(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(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(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),OE.set(e,r),r}function AE(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}var jE,ME=[],NE={alloc(e,t,n){let r=jE;if(!r)return n;jE=void 0;let i={value:n,issues:null};return r.set(t.value,i),ME.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&FE(n,e.value))throw new wE;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=kE(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[TE];l||(l={buckets:new Map,backEdges:void 0},s[TE]=l);let u;r===s?u=i:(u=AE(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...DE(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;jE=u;let f=ME.length,p=t(o,s);jE=void 0;let m=ME.length>f?ME.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?DE(e.issues):EE),e)):(m&&(m.issues=p.issues.length?DE(p.issues):EE),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}};function PE(){return NE}function FE(e,t){let n=e[TE]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var IE=()=>{let 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(t){return e[t]??null}let n={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 i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(aC(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${BS(e.values[0])}`:`Invalid option: expected one of ${SS(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${SS(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function LE(){return{localeError:IE()}}var RE,zE=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function BE(){return new zE}(RE=globalThis).__zod_globalRegistry??(RE.__zod_globalRegistry=BE());var VE=globalThis.__zod_globalRegistry;function HE(e,t){return new e({type:`string`,...W(t)})}function UE(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...W(t)})}function WE(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...W(t)})}function GE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...W(t)})}function KE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...W(t)})}function qE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...W(t)})}function JE(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...W(t)})}function YE(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...W(t)})}function XE(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...W(t)})}function ZE(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...W(t)})}function QE(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...W(t)})}function $E(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...W(t)})}function eD(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...W(t)})}function tD(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...W(t)})}function nD(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...W(t)})}function rD(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...W(t)})}function iD(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...W(t)})}function aD(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...W(t)})}function oD(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...W(t)})}function sD(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...W(t)})}function cD(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...W(t)})}function lD(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...W(t)})}function uD(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...W(t)})}function dD(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...W(t)})}function fD(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...W(t)})}function pD(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...W(t)})}function mD(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...W(t)})}function hD(e,t){return new e({type:`number`,checks:[],...W(t)})}function gD(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...W(t)})}function _D(e,t){return new e({type:`boolean`,...W(t)})}function vD(e){return new e({type:`unknown`})}function yD(e,t){return new e({type:`never`,...W(t)})}function bD(e,t){return new Iw({check:`less_than`,...W(t),value:e,inclusive:!1})}function xD(e,t){return new Iw({check:`less_than`,...W(t),value:e,inclusive:!0})}function SD(e,t){return new Lw({check:`greater_than`,...W(t),value:e,inclusive:!1})}function CD(e,t){return new Lw({check:`greater_than`,...W(t),value:e,inclusive:!0})}function wD(e,t){return new Rw({check:`multiple_of`,...W(t),value:e})}function TD(e,t){return new Bw({check:`max_length`,...W(t),maximum:e})}function ED(e,t){return new Vw({check:`min_length`,...W(t),minimum:e})}function DD(e,t){return new Hw({check:`length_equals`,...W(t),length:e})}function OD(e,t){return new Ww({check:`string_format`,format:`regex`,...W(t),pattern:e})}function kD(e){return new Gw({check:`string_format`,format:`lowercase`,...W(e)})}function AD(e){return new Kw({check:`string_format`,format:`uppercase`,...W(e)})}function jD(e,t){return new qw({check:`string_format`,format:`includes`,...W(t),includes:e})}function MD(e,t){return new Jw({check:`string_format`,format:`starts_with`,...W(t),prefix:e})}function ND(e,t){return new Yw({check:`string_format`,format:`ends_with`,...W(t),suffix:e})}function PD(e){return new Xw({check:`overwrite`,tx:e})}function FD(e){return PD(t=>t.normalize(e))}function ID(){return PD(e=>e.trim())}function LD(){return PD(e=>e.toLowerCase())}function RD(){return PD(e=>e.toUpperCase())}function zD(){return PD(e=>jS(e))}function BD(e,t,n){return new e({type:`array`,element:t,...W(n)})}function VD(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...W(n)})}function HD(e,t){let n=UD(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(oC(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(oC(r))}},e(t.value,t)),t);return n}function UD(e,t){let n=new Nw({check:`custom`,...W(t)});return n._zod.check=e,n}function WD(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&OS(e,t,n[t]);return e}function GD(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??VE,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 KD(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function qD(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,qD(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&WD(o.schema,c),t.io===`input`&&rO(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function JD(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function YD(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${JD(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+JD(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
59
+
60
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function XD(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;XD(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var ZD=new Set([`type`,`properties`,`required`,`additionalProperties`]),QD=[`oneOf`,`anyOf`];function $D(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function eO(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!ZD.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??$D(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}OS(n,r,e.length===1?e[0]:eO(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=$D(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function tO(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of ZD)if(t in e)return;let n=t.filter(e=>QD.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=eO(t);else{let e=n[0],i=QD.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>eO([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,WD(e,r))}function nO(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):WD(i,s),WD(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())XD(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])tO(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}WD(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,OS(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:aO(t,`input`,e.processors),output:aO(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function rO(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return rO(r.element,n);if(r.type===`set`)return rO(r.valueType,n);if(r.type===`lazy`)return rO(r.getter(),n);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 rO(r.innerType,n);if(r.type===`intersection`)return rO(r.left,n)||rO(r.right,n);if(r.type===`record`||r.type===`map`)return rO(r.keyType,n)||rO(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:rO(r.in,n)||rO(r.out,n);if(r.type===`object`){for(let e in r.shape)if(rO(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(rO(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(rO(e,n))return!0;return!!(r.rest&&rO(r.rest,n))}return!1}var iO=(e,t={})=>n=>{let r=GD({...n,processors:t});return qD(e,r),YD(r,e),nO(r,e)},aO=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=GD({...i??{},target:a,io:t,processors:n});return qD(e,o),YD(o,e),nO(o,e)},oO={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},sO=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=oO[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},cO=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):KD(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},lO=(e,t,n,r)=>{n.type=`boolean`},uO=(e,t,n,r)=>{n.not={}},dO=(e,t,n,r)=>{let i=e._zod.def,a=xS(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},fO=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(KD(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(KD(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},pO=(e,t,n,r)=>{KD(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},mO=(e,t,n,r)=>{KD(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},hO=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=qD(a.element,t,{...r,path:[...r.path,`items`]})};function gO(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?gO(t.out):t.type===`catch`?gO(t.innerType):e._zod.optin}var _O=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&KD(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)OS(i.properties,e,qD(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?gO(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=qD(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},vO=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>qD(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},yO=(e,t,n,r)=>{let i=e._zod.def,a=qD(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=qD(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function bO(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=bO(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>bO(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?kw:Ow).source)),p}var xO=new WeakMap;function SO(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of xO.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=bO(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var CO=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=qD(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)OS(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=qD(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=xO.get(t);n||(n=[],xO.set(t,n),t.deferred.push(()=>SO(t))),n.push(e)}i.additionalProperties=qD(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&gO(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},wO=(e,t,n,r)=>{let i=e._zod.def,a=qD(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},TO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},EO=Symbol();function DO(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(KD(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),EO):JSON.parse(o)}var OO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=DO(i.defaultValue,e,t,n,r);o!==EO&&(n.default=o)},kO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=DO(i.defaultValue,e,t,n,r);o!==EO&&(n._prefault=o)},AO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{KD(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},jO=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;qD(o,t,r);let s=t.seen.get(e);s.ref=o},MO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},NO=(e,t,n,r)=>{let i=e._zod.def;qD(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},PO=new WeakSet([Object.prototype,Error.prototype]);function FO(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var IO=G(`ZodError`,(e,t)=>{PC.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);PO.has(n)||(PO.add(n),FO(n,`format`,e=>t=>RC(e,t)),FO(n,`flatten`,e=>t=>LC(e,t)),FO(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,CS,2)}),FO(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,CS,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),LO=BC(IO),RO=VC(IO),zO=HC(IO),BO=WC(IO),VO=KC(IO),HO=qC(IO),UO=JC(IO),WO=YC(IO),GO=XC(IO),KO=ZC(IO),qO=QC(IO),JO=$C(IO);function YO(){TC.localeError||EC(LE())}function XO(){TC.memoizer||EC({memoizer:PE()})}var ZO=G(`ZodType`,(e,t)=>(YO(),$w.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(kS(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return zS(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(gA(e,t))},superRefine(e,t){return this.check(_A(e,t))},overwrite(e){return this.check(PD(e))},optional(){return Qk(this)},exactOptional(){return eA(this)},nullable(){return nA(this)},nullish(){return Qk(nA(this))},nonoptional(e){return cA(this,e)},array(){return Fk(this)},or(e){return zk([this,e])},and(e){return Vk(this,e)},transform(e){return fA(this,Xk(e))},default(e){return iA(this,e)},prefault(e){return oA(this,e)},catch(e){return uA(this,e)},pipe(e){return fA(this,e)},readonly(){return mA(this)},describe(e){let t=this.clone();return VE.add(t,{description:e}),t},meta(...e){if(e.length===0)return VE.get(this);let t=this.clone();return VE.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 lC(this,`~standard`,{...tT(this),jsonSchema:{input:aO(this,`input`),output:aO(this,`output`)}})},set"~standard"(e){cC(this,`~standard`,e)},parse:function e(t,n){return LO(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await RO(this,t,n,{callee:e})},safeParse(e,t){return zO(this,e,t)},async safeParseAsync(e,t){return BO(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){cC(this,`spa`,e)},encode:function e(t,n){return VO(this,t,n,{callee:e})},decode:function e(t,n){return HO(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await UO(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await WO(this,t,n,{callee:e})},safeEncode(e,t){return GO(this,e,t)},safeDecode(e,t){return KO(this,e,t)},async safeEncodeAsync(e,t){return qO(this,e,t)},async safeDecodeAsync(e,t){return JO(this,e,t)},toJSONSchema(e){return iO(this,{})(e)},get description(){return VE.get(this)?.description},get _def(){return this._zod.def}}),QO=G(`_ZodString`,(e,t)=>{nT.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sO(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(OD(...e))},includes(...e){return this.check(jD(...e))},startsWith(...e){return this.check(MD(...e))},endsWith(...e){return this.check(ND(...e))},min(...e){return this.check(ED(...e))},max(...e){return this.check(TD(...e))},length(...e){return this.check(DD(...e))},nonempty(...e){return this.check(ED(1,...e))},lowercase(e){return this.check(kD(e))},uppercase(e){return this.check(AD(e))},trim(){return this.check(ID())},normalize(...e){return this.check(FD(...e))},toLowerCase(){return this.check(LD())},toUpperCase(){return this.check(RD())},slugify(){return this.check(zD())}}),$O=G(`ZodString`,(e,t)=>{nT.init(e,t),QO.init(e,t)},{email(e){return this.check(UE(ok,e))},url(e){return this.check(YE(lk,e))},jwt(e){return this.check(uD(wk,e))},emoji(e){return this.check(XE(uk,e))},guid(e){return this.check(WE(sk,e))},uuid(e){return this.check(GE(ck,e))},uuidv4(e){return this.check(KE(ck,e))},uuidv6(e){return this.check(qE(ck,e))},uuidv7(e){return this.check(JE(ck,e))},nanoid(e){return this.check(ZE(dk,e))},cuid(e){return this.check(QE(fk,e))},cuid2(e){return this.check($E(pk,e))},ulid(e){return this.check(eD(mk,e))},base64(e){return this.check(sD(xk,e))},base64url(e){return this.check(cD(Sk,e))},xid(e){return this.check(tD(hk,e))},ksuid(e){return this.check(nD(gk,e))},ipv4(e){return this.check(rD(_k,e))},ipv6(e){return this.check(iD(vk,e))},cidrv4(e){return this.check(aD(yk,e))},cidrv6(e){return this.check(oD(bk,e))},e164(e){return this.check(lD(Ck,e))},datetime(e){return this.check(dD(nk,e))},date(e){return this.check(fD(rk,e))},time(e){return this.check(pD(ik,e))},duration(e){return this.check(mD(ak,e))}});function ek(e){return HE($O,e)}var tk=G(`ZodStringFormat`,(e,t)=>{rT.init(e,t),QO.init(e,t)}),nk=G(`ZodISODateTime`,(e,t)=>{bT.init(e,t),tk.init(e,t)}),rk=G(`ZodISODate`,(e,t)=>{xT.init(e,t),tk.init(e,t)}),ik=G(`ZodISOTime`,(e,t)=>{ST.init(e,t),tk.init(e,t)}),ak=G(`ZodISODuration`,(e,t)=>{CT.init(e,t),tk.init(e,t)}),ok=G(`ZodEmail`,(e,t)=>{oT.init(e,t),tk.init(e,t)}),sk=G(`ZodGUID`,(e,t)=>{iT.init(e,t),tk.init(e,t)}),ck=G(`ZodUUID`,(e,t)=>{aT.init(e,t),tk.init(e,t)}),lk=G(`ZodURL`,(e,t)=>{fT.init(e,t),tk.init(e,t)}),uk=G(`ZodEmoji`,(e,t)=>{pT.init(e,t),tk.init(e,t)}),dk=G(`ZodNanoID`,(e,t)=>{mT.init(e,t),tk.init(e,t)}),fk=G(`ZodCUID`,(e,t)=>{hT.init(e,t),tk.init(e,t)}),pk=G(`ZodCUID2`,(e,t)=>{gT.init(e,t),tk.init(e,t)}),mk=G(`ZodULID`,(e,t)=>{_T.init(e,t),tk.init(e,t)}),hk=G(`ZodXID`,(e,t)=>{vT.init(e,t),tk.init(e,t)}),gk=G(`ZodKSUID`,(e,t)=>{yT.init(e,t),tk.init(e,t)}),_k=G(`ZodIPv4`,(e,t)=>{wT.init(e,t),tk.init(e,t)}),vk=G(`ZodIPv6`,(e,t)=>{DT.init(e,t),tk.init(e,t)}),yk=G(`ZodCIDRv4`,(e,t)=>{OT.init(e,t),tk.init(e,t)}),bk=G(`ZodCIDRv6`,(e,t)=>{AT.init(e,t),tk.init(e,t)}),xk=G(`ZodBase64`,(e,t)=>{MT.init(e,t),tk.init(e,t)}),Sk=G(`ZodBase64URL`,(e,t)=>{PT.init(e,t),tk.init(e,t)}),Ck=G(`ZodE164`,(e,t)=>{FT.init(e,t),tk.init(e,t)}),wk=G(`ZodJWT`,(e,t)=>{LT.init(e,t),tk.init(e,t)}),Tk=G(`ZodNumber`,(e,t)=>{RT.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cO(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(SD(e,t))},gte(e,t){return this.check(CD(e,t))},min(e,t){return this.check(CD(e,t))},lt(e,t){return this.check(bD(e,t))},lte(e,t){return this.check(xD(e,t))},max(e,t){return this.check(xD(e,t))},int(e){return this.check(Dk(e))},safe(e){return this.check(Dk(e))},positive(e){return this.check(SD(0,e))},nonnegative(e){return this.check(CD(0,e))},negative(e){return this.check(bD(0,e))},nonpositive(e){return this.check(xD(0,e))},multipleOf(e,t){return this.check(wD(e,t))},step(e,t){return this.check(wD(e,t))},finite(){return this}});function K(e){return hD(Tk,e)}var Ek=G(`ZodNumberFormat`,(e,t)=>{zT.init(e,t),Tk.init(e,t)});function Dk(e){return gD(Ek,e)}var Ok=G(`ZodBoolean`,(e,t)=>{BT.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lO(e,t,n,r)});function kk(e){return _D(Ok,e)}var Ak=G(`ZodUnknown`,(e,t)=>{VT.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function jk(){return vD(Ak)}var Mk=G(`ZodNever`,(e,t)=>{HT.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uO(e,t,n,r)});function Nk(e){return yD(Mk,e)}var Pk=G(`ZodArray`,(e,t)=>{XO(),WT.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hO(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ED(e,t))},nonempty(e){return this.check(ED(1,e))},max(e,t){return this.check(TD(e,t))},length(e,t){return this.check(DD(e,t))},unwrap(){return this.element}});function Fk(e,t){return BD(Pk,e,t)}var Ik=G(`ZodObject`,(e,t)=>{XO(),ZT.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_O(e,t,n,r),gC(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Kk(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:jk()})},loose(){return this.clone({...this._zod.def,catchall:jk()})},strict(){return this.clone({...this._zod.def,catchall:Nk()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return GS(this,e)},safeExtend(e){return KS(this,e)},merge(e){return qS(this,e)},pick(e){return US(this,e)},omit(e){return WS(this,e)},partial(...e){return JS(Zk,this,e[0])},exactPartial(...e){return JS($k,this,e[0],`exactPartial`)},required(...e){return YS(sA,this,e[0])}});function Lk(e,t){return new Ik({type:`object`,shape:e??{},...W(t)})}var Rk=G(`ZodUnion`,(e,t)=>{$T.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vO(e,t,n,r),e.options=t.options});function zk(e,t){return new Rk({type:`union`,options:e,...W(t)})}var Bk=G(`ZodIntersection`,(e,t)=>{eE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yO(e,t,n,r)});function Vk(e,t){return new Bk({type:`intersection`,left:e,right:t})}var Hk=G(`ZodRecord`,(e,t)=>{XO(),rE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CO(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Uk(e,t,n){return!t||!t._zod?new Hk({type:`record`,keyType:ek(),valueType:e,...W(t)}):new Hk({type:`record`,keyType:e,valueType:t,...W(n)})}function Wk(e,t,n){return new Hk({type:`record`,keyType:e,valueType:t,...W(n),partial:!0})}var Gk=G(`ZodEnum`,(e,t)=>{iE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dO(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Gk({...t,checks:[],...W(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Gk({...t,checks:[],...W(r),entries:i})}});function Kk(e,t){return new Gk({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...W(t)})}var qk=G(`ZodLiteral`,(e,t)=>{aE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fO(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Jk(e,t){return new qk({type:`literal`,values:Array.isArray(e)?e:[e],...W(t)})}var Yk=G(`ZodTransform`,(e,t)=>{XO(),oE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mO(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new wC(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(oC(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(oC(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Xk(e){return new Yk({type:`transform`,transform:e})}var Zk=G(`ZodOptional`,(e,t)=>{cE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qk(e){return new Zk({type:`optional`,innerType:e})}var $k=G(`ZodExactOptional`,(e,t)=>{lE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function eA(e){return new $k({type:`optional`,innerType:e})}var tA=G(`ZodNullable`,(e,t)=>{uE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nA(e){return new tA({type:`nullable`,innerType:e})}var rA=G(`ZodDefault`,(e,t)=>{dE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function iA(e,t){return new rA({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():IS(t)}})}var aA=G(`ZodPrefault`,(e,t)=>{pE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oA(e,t){return new aA({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():IS(t)}})}var sA=G(`ZodNonOptional`,(e,t)=>{mE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cA(e,t){return new sA({type:`nonoptional`,innerType:e,...W(t)})}var lA=G(`ZodCatch`,(e,t)=>{_E.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uA(e,t){return new lA({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:vC(t)})}var dA=G(`ZodPipe`,(e,t)=>{vE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jO(e,t,n,r),e.in=t.in,e.out=t.out});function fA(e,t){return new dA({type:`pipe`,in:e,out:t})}var pA=G(`ZodReadonly`,(e,t)=>{bE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mA(e){return new pA({type:`readonly`,innerType:e})}var hA=G(`ZodCustom`,(e,t)=>{SE.init(e,t),ZO.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pO(e,t,n,r)});function gA(e,t={}){return VD(hA,e,t)}function _A(e,t){return HD(e,t)}var q=ek().meta({cardAnvilAsset:!0}),vA=Kk([`rarity`,`cardNumber`,`creatorName`,`setCode`,`separator`,`language`,`artistSymbol`,`artist`]),yA=Lk({elements:Fk(Lk({type:vA,useManaFont:kk().optional(),manaSymbol:ek().optional(),fontSizeMultiplier:K().optional(),fontSizeMultiplierDot:K().optional(),fontSizeMultiplierStar:K().optional(),yOffset:K().optional(),yOffsetDot:K().optional(),yOffsetStar:K().optional(),spacingAfter:K().optional(),letterSpacing:K().optional(),minXFromElement:vA.optional(),prefix:ek().optional()})).readonly(),spacing:K().optional(),align:Kk([`left`,`center`]).optional(),fontSizeMultiplier:K().optional(),fontFamily:ek().optional()}),bA=[`w`,`u`,`b`,`r`,`g`,`m`,`a`,`c`,`l`,`v`],xA=Kk(bA),SA=Wk(xA,q),CA=Wk(Kk([`convertdfc`,`sunmoondfc`,`compasslanddfc`,`originpwdfc`,`mooneldrazidfc`,`waxingandwaningmoondfc`,`fandfc`,`upsidedowndfc`]),q),wA=Wk(Kk([...bA,`c2`]),q),TA=Lk({base:SA.optional(),ub:SA.optional(),nickname:SA.optional(),nicknameUb:SA.optional(),nyxInsert:SA.optional(),nyxInsertUb:SA.optional()}),EA=Lk({regular:q.optional(),tall:q.optional()}),DA=Lk({plus:q,minus:q,zero:q,separator:q.optional(),startingLoyalty:q,masks:EA.optional(),colorlessNicknameMasks:EA.optional()}),OA=Lk({right:q,stripe:q}),kA=Lk({badge:q,divider:q,banner:SA.optional(),bannerTransform:SA.optional(),bannerMasks:OA.optional(),bannerTransformMasks:OA.optional(),bannerOrigin:Lk({x:K(),y:K()}).optional(),bannerReadAheadMasks:OA.optional()}),AA=Lk({base:wA,tall:SA.optional(),land:SA.optional(),nyx:SA.optional(),creature:SA.optional(),pt:SA.optional(),crown:TA.optional(),nickname:SA.optional(),tokenTitle:SA.optional(),black:q.optional(),planeswalker:DA.optional(),saga:kA.optional(),sectionDivider:q.optional(),extendedOverlay:q.optional(),fullBorder:q.optional(),dfcIcon:q.optional(),dfcIconSet:CA.optional(),dfcIconColorSet:SA.optional(),flipside:SA.optional(),lessonIcon:q.optional(),dividerBar:Kk([`old`]).optional(),dividerBarScale:K().optional(),dividerBarGapBefore:K().optional(),dividerBarGapAfter:K().optional()}),jA=Lk({pinlines:q.optional(),titleAndType:q.optional(),rules:q.optional(),noBorder:q.optional(),border:q.optional(),borderFull:q.optional(),legendary:q.optional(),legendaryTransform:q.optional(),noBorderTransform:q.optional(),rightHalf:q.optional(),title:q.optional(),type:q.optional(),keyword:q.optional(),extended:q.optional(),topHalf:q.optional(),bottomHalf:q.optional(),rulesRight:q.optional(),adventureRules:q.optional(),adventureRulesRight:q.optional(),wings:q.optional()}),MA=Kk([`default`,`light`,`dark`,`none`]),NA=Lk({border:zk([MA,Fk(MA).readonly()]).optional(),settings:Uk(ek(),zk([kk(),ek(),K()])).optional(),frameColor:zk([xA,Fk(xA).readonly()]).optional()}),PA=[`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`],FA=[`planeswalker`,`case`],IA=PA.flatMap(e=>FA.map(t=>`${e}_${t}`)),LA=[`saga_creature`,`saga_transform`,`saga_transform_creature`,`omen`,`prepare`,`aftermath`,`case`],RA=Kk([...PA,...IA,...LA]),zA=ek().regex(/^#[0-9a-fA-F]{6}$/,`expected a color written #rrggbb`),BA=Lk({palette:Wk(xA,zA),maxParts:K().int().min(1).max(3).optional()}),VA=Lk({at:K().min(0).max(1),opacity:K().min(0).max(1)}),HA=Kk([`mana`,`title`,`type`,`setSymbol`]),UA=Lk({x:K(),y:K(),width:K(),height:K(),direction:Kk([`vertical`,`horizontal`]).optional(),color:zk([zA,BA.extend({blend:K().nonnegative().optional()})]),opacity:Fk(VA).min(2).readonly(),anchor:HA.optional(),slides:kk().optional(),when:NA.optional()}),WA=Lk({src:q,x:K(),y:K(),width:K().optional(),height:K().optional(),color:zk([zA,BA.extend({part:K().int().min(0).optional()})]),showWith:Jk(`powerToughness`).optional(),ptSlot:Kk([`power`,`toughness`]).optional(),slides:kk().optional(),when:NA.optional()}),GA=Lk({x:K(),y:K(),width:K(),height:K()}),KA=GA.extend({fontSize:K(),color:ek().optional(),outlineColor:ek().optional(),outlineWidth:K().optional(),verticalAlign:Kk([`top`,`center`]).optional(),textAlign:Kk([`left`,`center`,`right`]).optional(),letterSpacing:K().optional(),fontFamily:ek().optional(),opacity:K().min(0).max(1).optional(),shadow:kk().optional(),shadowOffsetX:K().optional(),shadowOffsetY:K().optional(),shadowBlur:K().nonnegative().optional(),mask:q.optional()}),qA=Lk({when:NA,style:KA.pick({color:!0,outlineColor:!0,outlineWidth:!0,shadow:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowBlur:!0,opacity:!0})}),JA=KA.extend({overrides:Fk(qA).readonly().optional()}),YA=JA.extend({lines:Fk(yA).readonly().optional()}),XA=GA.extend({outlineColor:ek().optional(),outlineWidth:K().optional()}),ZA=zk([Jk(90),Jk(180),Jk(270)]),QA=Lk({rotation:ZA.optional(),art:GA,firstArt:GA.optional(),mana:JA,title:JA,type:JA,setSymbol:XA,rules:JA.optional(),abilities:JA.optional(),pt:JA.optional(),ptImage:Lk({x:K(),y:K()}).optional(),power:JA.optional(),toughness:JA.optional(),collectorInfo:YA.optional(),startingLoyalty:JA.optional(),nicknameTitle:JA.optional(),keyword:JA.optional(),flipsidePt:JA.optional(),flipsideType:JA.optional(),flipsideManaCost:JA.optional(),flipsideRules:JA.optional(),insetTitle:JA.optional(),insetMana:JA.optional(),insetType:JA.optional(),insetRules:JA.optional(),defense:JA.optional(),fuse:JA.optional()}),$A=Lk({rotation:ZA.optional(),art:GA.optional(),title:JA,mana:JA.optional(),type:JA,setSymbol:XA.optional(),rules:JA.optional(),pt:JA.optional(),power:JA.optional(),toughness:JA.optional()}),ej=Lk({abilitySpacing:K(),separatorHeight:K(),textPaddingX:K(),staticTextPaddingX:K(),textPaddingRight:K().optional(),topPadding:K().optional(),bottomPadding:K().optional(),textFillThreshold:K().optional(),abilityFill:K().optional(),abilityFillSize:K().optional(),minFontSize:K().optional(),lineHeightRatio:K().optional(),badgeSlotHeight:K().optional(),loyaltyReserve:K().optional(),separatorOffsetY:K().optional(),abilityBacking:kk().optional(),abilityDivider:UA.omit({anchor:!0,slides:!0,when:!0}).optional(),plusBadgeOffsetY:K().optional(),minusBadgeOffsetY:K().optional(),zeroBadgeOffsetY:K().optional(),plusCostOffsetY:K().optional(),minusCostOffsetY:K().optional(),zeroCostOffsetY:K().optional()}),tj=Lk({abilitySpacing:K(),dividerHeight:K(),textPaddingX:K(),badgeWidth:K(),skipReminder:kk().optional(),badgeOffsetX:K().optional()}),nj=Lk({skipReminder:kk().optional()}),rj=Lk({x:K(),y:K(),length:K(),orientation:Kk([`horizontal`,`vertical`]).optional()}),ij=Lk({padding:K().nonnegative(),step:K().positive(),maxSteps:K().int().nonnegative(),boxes:Fk(HA).readonly()}),aj=Lk({right:K(),gap:K(),spacing:K()}),oj=Kk([`W`,`U`,`B`,`R`,`G`,`C`]),sj=Lk({style:Kk([`filled`,`hollow`]).optional(),colors:Wk(oj,zA).optional(),glyphColors:Wk(oj,zA).optional()}),cj=Lk({x:K(),y:K(),nicknameCrownX:K().optional(),nicknameCrownY:K().optional(),nyxInsertX:K().optional(),nyxInsertY:K().optional(),nyxInsertNicknameY:K().optional()}),lj={x:192,y:220},uj=Lk({x:K(),y:K()}),dj={x:378,y:577},fj=ek().optional(),pj=zk([Lk({type:Jk(`boolean`),label:ek(),helperText:fj,defaultValue:kk()}),Lk({type:Jk(`string`),label:ek(),helperText:fj,defaultValue:ek()}),Lk({type:Jk(`number`),label:ek(),helperText:fj,defaultValue:ek()}),Lk({type:Jk(`select`),label:ek(),helperText:fj,defaultValue:ek(),options:Fk(ek())})]),mj=Uk(ek(),pj),hj=Lk({boxes:QA,tallBoxes:QA.optional(),twoAbilityBoxes:QA.optional(),secondFaceBoxes:$A.optional(),frameAssets:AA,masks:jA.optional(),tallMasks:jA.optional(),planeswalkerConfig:ej.optional(),sagaConfig:tj.optional(),sectionConfig:nj.optional(),sectionDividers:Fk(rj).optional(),gradients:Fk(UA).readonly().optional(),tintedImages:Fk(WA).readonly().optional(),rulesSlide:ij.optional(),powerToughnessRow:aj.optional(),manaSymbols:sj.optional(),crownConfig:cj.optional(),nicknameConfig:uj.optional(),templateSettings:mj.optional(),colorArtOverrides:Wk(xA,GA).optional(),hybridTitleMask:Kk([`title`,`titleAndType`]).optional(),backFrameAssets:AA.optional(),backMasks:jA.optional(),backBoxes:QA.optional(),creatureBoxes:QA.optional(),backCreatureBoxes:QA.optional(),creatureMasks:jA.optional(),backCreatureMasks:jA.optional(),flipsidePtBoxes:QA.optional(),sagaFrontBoxes:QA.optional(),sagaFrontFrameAssets:AA.optional(),sagaFrontMasks:jA.optional(),sagaFrontCreatureBoxes:QA.optional(),sagaFrontCreatureMasks:jA.optional(),sagaBackBoxes:QA.optional(),sagaBackFrameAssets:AA.optional(),sagaBackMasks:jA.optional(),sagaBackCreatureBoxes:QA.optional(),sagaBackCreatureMasks:jA.optional(),compositeFrameAssets:AA.optional(),compositeMasks:jA.optional()}),gj=Lk({canvas:Lk({width:K().int().positive(),height:K().int().positive()}).optional(),layouts:Wk(RA,hj),alternateLayouts:Uk(ek(),Wk(RA,hj)).optional(),disabledFields:Fk(Kk([`setSymbol`,`collectorInfo`])).optional()}),_j=Lk({family:ek().min(1),src:q,weight:Kk([`normal`,`bold`]).optional(),style:Kk([`normal`,`italic`]).optional(),postScriptName:ek().optional()});Lk({name:ek(),description:ek(),previewImage:q,tags:Fk(ek()),disabled:kk().optional(),templateSettings:mj.optional(),fonts:Fk(_j).readonly().optional(),config:gj});var vj={x:2441,y:3847},yj={x:220,y:200,width:2815,height:140},bj=e=>e.split(`.`)[0]??e;function xj(e,t={},n){let r=bj(e),i=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:yj.x,y:yj.y}};case`dfcIcon`:case`dfcIconSet`:case`dfcIconColorSet`:return{kind:`at`,at:{x:0,y:0}};case`crown`:{let e=t.crownConfig??lj,r=t.hasNickname===!0,a=(r?e.nicknameCrownX:void 0)??e.x,o=(r?e.nicknameCrownY:void 0)??e.y;return i.startsWith(`nyxInsert`)?{kind:`at`,at:{x:e.nyxInsertX??(n?a+(yj.width-n.width)/2:611),y:(r?e.nyxInsertNicknameY:void 0)??e.nyxInsertY??o+2}}:{kind:`at`,at:{x:a,y:o}}}case`nickname`:{let e=t.nicknameConfig??dj;return{kind:`at`,at:{x:e.x,y:e.y}}}case`pt`:{let e=t.ptImage??vj;return{kind:`at`,at:{x:e.x,y:e.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 Sj(e,t,n){switch(e.kind){case`center`:return{x:(n.width-t.width)/2,y:(n.height-t.height)/2};case`at`:return e.at;default:return}}function Cj(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(e.trim())?.[1];if(t){if(t.length===3){let[e=`0`,n=`0`,r=`0`]=t;return{r:parseInt(e+e,16),g:parseInt(n+n,16),b:parseInt(r+r,16)}}return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}}let[,n,r,i]=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/i.exec(e.trim())??[];if(n&&r&&i)return{r:Number(n),g:Number(r),b:Number(i)}}function wj({r:e,g:t,b:n}){let r=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}function Tj(e){let t=wj(e);return 1.05/(t+.05)>=(t+.05)/.05?`white`:`black`}function Ej(e,t){return t&&e?.borderFull?e.borderFull:e?.border}function Dj({borderColor:e,masks:t,useNoBorder:n,useFullBorder:r}){if(n&&t?.noBorder)return`none`;let i=e&&Ej(t,r)?Cj(e):void 0;return i?Tj(i)===`black`?`light`:`dark`:`default`}var Oj=[`mana`,`title`,`type`,`rules`,`abilities`,`pt`,`power`,`toughness`,`collectorInfo`,`startingLoyalty`,`nicknameTitle`,`keyword`,`flipsidePt`,`flipsideType`,`flipsideManaCost`,`flipsideRules`,`insetTitle`,`insetMana`,`insetType`,`insetRules`,`defense`,`fuse`];function kj(e,t){if(e.border!==void 0&&!(typeof e.border==`string`?[e.border]:e.border).includes(t.border))return!1;if(e.frameColor!==void 0){let n=typeof e.frameColor==`string`?[e.frameColor]:e.frameColor;if(t.frameColor===void 0||!n.includes(t.frameColor))return!1}return Object.entries(e.settings??{}).every(([e,n])=>t.settings[e]===n)}function Aj(e,t){let{overrides:n=[],...r}=e;for(let e of n)kj(e.when,t)&&Object.assign(r,e.style);return r}function jj(e,t){let n={...e};for(let r of Oj){let i=e[r];i?.overrides&&(n[r]=Aj(i,t))}return n}function Mj(e){let{masks:t,frameAssets:n,useNoBorder:r,isLegendary:i,hasNickname:a,frameColor:o,isTallFrame:s}=e,c=n.planeswalker?.colorlessNicknameMasks,l=o===`c`&&a?s?c?.tall:c?.regular:void 0;return[r?t?.noBorder:void 0,i?t?.legendary:void 0,t?.extended,l].filter(e=>!!e)}var Nj={WHITE:`W`,BLUE:`U`,BLACK:`B`,RED:`R`,GREEN:`G`,ARTIFACT:`Artifact`,COLORLESS:`Colorless`,LAND:`Land`,GOLD:`Gold`,VEHICLE:`Vehicle`,HYBRID:`Hybrid`},Pj=[`W`,`U`,`B`,`R`,`G`],Fj=new Set(Pj),Ij=[`WU`,`UB`,`BR`,`RG`,`GW`,`WB`,`BG`,`GU`,`UR`,`RW`,`GWU`,`WUB`,`UBR`,`BRG`,`RGW`,`WBG`,`URW`,`BGU`,`RWB`,`GUR`],Lj=e=>Array.from(e).sort().join(``),Rj=new Map(Ij.map(e=>[Lj(e),e]));function zj(e){return Rj.get(Lj(e))??e}function Bj(e,t){return e.family===t.family&&e.color===t.color}function Vj(e){switch(e){case Nj.WHITE:return`w`;case Nj.BLUE:return`u`;case Nj.BLACK:return`b`;case Nj.RED:return`r`;case Nj.GREEN:return`g`;case Nj.ARTIFACT:return`a`;case Nj.COLORLESS:return`c`;case Nj.LAND:return`l`;case Nj.VEHICLE:return`v`;case Nj.GOLD:return`m`;case``:return`c`;default:return`m`}}function Hj(e){let[t,n]=e;return e.length===2&&t!==void 0&&n!==void 0&&Fj.has(t)&&Fj.has(n)?[t.toLowerCase(),n.toLowerCase()]:null}function Uj(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 Wj(e,t,n){let r=[],i=Hj(e.pinlines);if(i){let e=Uj(i[0],t),n=Uj(i[1],t);r.push({frame:e,mask:`pinlines`,preserveAlpha:!0},{frame:n,mask:`pinlines`,secondaryMask:`rightHalf`,preserveAlpha:!0},{frame:e,mask:`rules`,preserveAlpha:!0},{frame:n,mask:`rules`,secondaryMask:`rightHalf`,preserveAlpha:!0})}else{let i=Uj(Vj(e.pinlines),t);Bj(i,n)||r.push({frame:i,mask:`pinlines`,preserveAlpha:!0},{frame:i,mask:`rules`,preserveAlpha:!0})}let a=Uj(Vj(e.twins),t);return Bj(a,n)||r.push({frame:a,mask:`titleAndType`,preserveAlpha:!0}),r}function Gj(e,t={}){let{family:n=`normal`,hybridTitleMask:r=`titleAndType`,hasPinlineMask:i=!0}=t;if(e.isHybrid){let t=Hj(e.pinlines);if(t)return{baseFrame:Uj(t[0],n),overlays:[{frame:Uj(t[1],n),mask:`rightHalf`,preserveAlpha:!0},{frame:Uj(`c2`,n),mask:r,preserveAlpha:!0}]}}let a=n!==`land`&&!i&&e.background===Nj.ARTIFACT&&e.identity.length>0;if(n!==`land`&&!i&&!e.isColorless&&(e.background===Nj.GOLD||a)){let t=Hj(e.identity);if(t)return{baseFrame:Uj(t[0],n),overlays:[{frame:Uj(t[1],n),mask:`rightHalf`,preserveAlpha:!0}]}}let o=Uj(Vj(n===`land`||a?e.identity:e.background),n),s=Wj(e,n,o);return{baseFrame:o,...s.length>0?{overlays:s}:{}}}function Kj(e,t,n,r,i,a){let o=Hj(e);if(o)return[{frame:Uj(o[0],r),mask:t,preserveAlpha:!0},{frame:Uj(o[1],r),mask:n,preserveAlpha:!0}];let s=Uj(Vj(e),r);return Bj(s,i)&&!a?[]:[{frame:s,mask:t,preserveAlpha:!0}]}function qj(e,t,n={}){let r=n.family??`normal`,i=e.background===Nj.GOLD&&!e.isHybrid&&!e.isColorless?Hj(e.pinlines):null,a=i?{baseFrame:Uj(i[0],r),overlays:[{frame:Uj(i[1],r),mask:`rightHalf`,preserveAlpha:!0},{frame:Uj(Vj(e.twins),r),mask:`titleAndType`,preserveAlpha:!0},{frame:Uj(`m`,r),mask:`wings`,preserveAlpha:!0}]}:Gj(e,{...n,hasPinlineMask:!0}),o=(a.overlays??[]).filter(e=>e.mask!==`rules`&&e.mask!==`pinlines`),s=o.some(e=>e.mask===`rightHalf`),c=[...o,...Kj(e.pinlines,`rules`,`rulesRight`,r,a.baseFrame,s),...Kj(t||e.pinlines,`adventureRules`,`adventureRulesRight`,r,a.baseFrame,s)];return{baseFrame:a.baseFrame,...c.length>0?{overlays:c}:{}}}function Jj(e){let t=new Set(e.map(e=>e.toUpperCase()));return zj(Pj.filter(e=>t.has(e)).join(``))}function Yj(e){let t=Jj(e.colors??[]),n={background:t,pinlines:t,twins:t,identity:t,isColorless:!1,isHybrid:!1};if(e.isLand===!0)return n.background=Nj.LAND,t.length===0?(n.pinlines=Nj.LAND,n.twins=Nj.LAND):t.length>2&&(n.pinlines=Nj.GOLD,n.twins=Nj.GOLD),n;let r=e.isDevoid===!0&&t.length>0;if(r||e.isColorless===!0||t.length===0&&e.isArtifact!==!0)return r&&t.length>1?(n.twins=Nj.GOLD,n.background=Nj.GOLD):r||(n.twins=Nj.COLORLESS,n.background=Nj.COLORLESS,n.pinlines=Nj.COLORLESS),n.isColorless=!0,n;let i=e.isHybrid===!0&&t.length===2;return n.isHybrid=i,e.isVehicle===!0?n.background=Nj.VEHICLE:e.isArtifact===!0?n.background=Nj.ARTIFACT:t.length>=2&&!i&&(n.background=Nj.GOLD),t.length===0?n.pinlines=Nj.ARTIFACT:t.length>2&&(n.pinlines=Nj.GOLD),t.length===0?n.twins=Nj.ARTIFACT:i?n.twins=Nj.LAND:t.length>=2&&(n.twins=Nj.GOLD),n}function Xj(e,t=!0){return e.isEnchantment===!0&&t?`nyx`:e.isLand===!0?`land`:`normal`}function Zj(e,t={}){return Hj(e.identity)||(e.identity.length===1?e.identity.toLowerCase():e.identity.length>1?`m`:t.isLand===!0?`l`:t.isArtifact===!0?`a`:`c`)}function Qj(e,t={}){return Zj(e,t)}function $j(e,t={}){return Zj(e,t)}function eM(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 tM(e,t,n){return(n?e.crown?.nicknameUb?.[t]:void 0)??e.crown?.nickname?.[t]}function nM(e,t,n){if(n.nickname){let r=tM(e,t,n.useUBCrowns);if(r!==void 0)return r}return(n.useUBCrowns?e.crown?.ub?.[t]:void 0)??e.crown?.base?.[t]}function rM(e,t){return e.nickname?.[t]}function iM(e,t){return e.pt?.[t]}function aM(e,t,n=!1){return(n?e.crown?.nyxInsertUb?.[t]:void 0)??e.crown?.nyxInsert?.[t]}function oM(e){let t=e.isLegendary===!0;return{crown:t,crownBlackBar:t,nickname:(e.nickname??``)!==``,ptBox:(e.power??``)!==``&&(e.toughness??``)!==``}}function sM(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 cM(e,t){let n=sM(e,t);if(n!==void 0)return{ref:t,url:n,usedFallback:!1};let r=t=>t===`c2`?e.base.c2??e.base.c:e.base[t],i=t.color===`l`?[t.color,`c`,`m`,`w`]:[t.color,`m`,`w`];for(let e of i){let t=r(e);if(t!==void 0)return{ref:{family:`base`,color:e},url:t,usedFallback:!0}}for(let t of bA){let n=e.base[t];if(n!==void 0)return{ref:{family:`base`,color:t},url:n,usedFallback:!0}}}function lM(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function uM(e){let t={};for(let[n,r]of Object.entries(e.templateSettings??{}))t[n]=r.defaultValue;for(let[n,r]of Object.entries(e.config.layouts)){let e=r.templateSettings;if(!e)continue;let i={};for(let[t,n]of Object.entries(e))i[t]=n.defaultValue;t[n]=i}return t}function dM(e,t){if(!t)return e;if(!e)return t;let n={...e};for(let[e,r]of Object.entries(t)){let t=n[e];n[e]=lM(r)&&lM(t)?{...t,...r}:r}return n}function fM(e,t){let n={};for(let[t,r]of Object.entries(e??{}))lM(r)||(n[t]=r);let r=e?.[t];return lM(r)?{...n,...r}:n}var pM=`#17191b`;function mM(e){return e.outlineColor&&e.outlineWidth?{color:e.outlineColor,width:e.outlineWidth}:void 0}function hM(e){if(e.shadow&&!mM(e))return{color:pM,offsetX:e.shadowOffsetX??-(e.fontSize*.029),offsetY:e.shadowOffsetY??e.fontSize*.075,blur:e.shadowBlur??0}}function gM(e,t){return t===90||t===270?{width:e.height,height:e.width}:{width:e.width,height:e.height}}function _M(e,t){switch(t){case 90:return{x:0,y:e.height,rotation:-90};case 180:return{x:e.width,y:e.height,rotation:180};case 270:return{x:e.width,y:0,rotation:90};default:return{x:0,y:0,rotation:0}}}function vM(e,t){switch(t){case 90:return{x:e.y,y:-e.x};case 180:return{x:-e.x,y:-e.y};case 270:return{x:-e.y,y:e.x};default:return{x:e.x,y:e.y}}}function yM(e,t){switch(t){case 90:return{x:-e.y,y:e.x};case 180:return{x:-e.x,y:-e.y};case 270:return{x:e.y,y:-e.x};default:return{x:e.x,y:e.y}}}var bM=bS();async function xM(e){let t=await fetch(e);if(!t.ok)throw Error(`${e} → ${String(t.status)}`);return await t.json()}var SM=()=>xM(`/api/studio`),CM=()=>xM(`/api/frames`).then(e=>e.frames),wM=e=>xM(`/api/frame?frame=${encodeURIComponent(e)}`),TM=(e,t,n=!1)=>xM(`/api/source?frame=${encodeURIComponent(e)}&path=${encodeURIComponent(t.join(`.`))}`+(n?`&impact=1`:``));async function EM(e,t,n={}){let r=await fetch(`/api/edit`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({frame:e,edits:t,...n.confirmShared===!0?{confirmShared:!0}:{}})}),i=await r.json();return r.ok?{ok:!0,...i.revision===void 0?{}:{revision:i.revision}}:i.code===`shared`?{ok:!1,shared:i.shared??[]}:{ok:!1,rejected:i.rejected??[]}}function DM(e){let t=new EventSource(`/api/events`);return t.onmessage=t=>{try{e(JSON.parse(t.data))}catch{}},()=>{t.close()}}var OM=e=>e*137.508%360,kM=(e,t=1)=>`hsla(${String(OM(e))}, 90%, 55%, ${String(t)})`;function AM(e){let{boxes:t,selected:n,hidden:r,overflow:i,onSelect:a,onToggleHidden:o}=e,s=(0,N.useMemo)(()=>Lp({items:t.map((e,t)=>({...e,index:t})),itemToString:e=>e.key,itemToValue:e=>e.key}),[t]);return(0,P.jsxs)(Bx,{collection:s,selectionMode:`single`,selectOnHighlight:!0,typeahead:!0,value:n===void 0?[]:[n],onValueChange:e=>{let[t]=e.value;t!==void 0&&a(t)},children:[(0,P.jsx)(Wx,{fontSize:`xs`,textTransform:`uppercase`,color:`fg.muted`,mb:`1`,children:`Boxes`}),(0,P.jsxs)(Vx,{bg:`transparent`,borderWidth:`0`,p:`0`,gap:`0`,maxH:`none`,h:`auto`,overflow:`visible`,children:[s.items.map(e=>{let{key:t,box:n,index:a}=e;return(0,P.jsx)(Hx,{item:e,px:`2`,py:`1`,borderRadius:`4px`,opacity:r.has(t)?.4:1,children:(0,P.jsxs)(Mx,{gap:`2`,flex:`1`,minW:`0`,children:[(0,P.jsx)(pn,{as:`button`,"aria-label":`${r.has(t)?`Show`:`Hide`} ${t}`,w:`12px`,h:`12px`,flex:`none`,borderRadius:`3px`,bg:kM(a),onClick:e=>{e.stopPropagation(),o(t)}}),(0,P.jsxs)(gS,{align:`stretch`,gap:`0`,flex:`1`,minW:`0`,children:[(0,P.jsx)(Ux,{fontWeight:`600`,truncate:!0,children:t}),(0,P.jsxs)(Zo,{fontSize:`10px`,color:`fg.muted`,truncate:!0,children:[n.x,`,`,n.y,` · `,n.width,`×`,n.height,n.fontSize===void 0?``:` · ${String(n.fontSize)}pt`]}),i[t]!==void 0&&(0,P.jsxs)(Zo,{fontSize:`10px`,color:`fg.error`,children:[`overflows by `,i[t],`px`]})]})]})},t)}),(0,P.jsx)(Gx,{fontSize:`xs`,color:`fg.muted`,children:`No boxes in this set.`})]})]})}var jM=Math.PI/180;function MM(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var NM=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},J={_global:NM,version:`10.5.0`,isBrowser:MM(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return J.angleDeg?e*jM: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 J.DD.isDragging},isTransforming(){return J.Transformer?.isTransforming()??!1},isDragReady(){return!!J.DD.node},releaseCanvasOnDestroy:!0,document:NM.document,_injectGlobal(e){NM.Konva!==void 0&&console.error(`Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment.`),NM.Konva=e}},PM=e=>{J[e.prototype.getClassName()]=e};J._injectGlobal(J);var FM=`Konva.js unsupported environment.
61
+
62
+ Looks like you are trying to use Konva.js in Node.js environment (or in a Web Worker), because "document" object is undefined.
63
+
64
+ To use Konva.js in Node.js environment, you need to use the "canvas-backend" or "skia-backend" module.
65
+
66
+ bash: npm install canvas
67
+ js: import "konva/canvas-backend";
68
+
69
+ or
70
+
71
+ bash: npm install skia-canvas
72
+ js: import "konva/skia-backend";
73
+ `,IM=()=>{if(typeof document>`u`)throw Error(FM)},LM=class e{constructor(e){this.dirty=!1,this.m=e?e.slice():[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new e(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){let t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){let t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,i=this.m[1]*t+this.m[3]*n,a=this.m[0]*-n+this.m[2]*t,o=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){let n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,i=this.m[2]+this.m[0]*e,a=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this}multiply(e){let t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],i=this.m[1]*e.m[2]+this.m[3]*e.m[3],a=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}isInvertible(){return this.m[0]*this.m[3]-this.m[1]*this.m[2]!==0}invert(){let e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,i=this.m[0]*e,a=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}decompose(){let e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],i=this.m[4],a=this.m[5],o=e*r-t*n,s={x:i,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||t!=0){let i=Math.sqrt(e*e+t*t);s.rotation=t>0?Math.acos(e/i):-Math.acos(e/i),s.scaleX=i,s.scaleY=o/i,s.skewX=o&&(e*n+t*r)/o,s.skewY=0}else if(n!=0||r!=0){let i=Math.sqrt(n*n+r*r);s.rotation=Math.PI/2-(r>0?Math.acos(-n/i):-Math.acos(n/i)),s.scaleX=o/i,s.scaleY=i,s.skewX=0,s.skewY=o&&(e*n+t*r)/o}return s.rotation=Y._getRotation(s.rotation),s}},RM=`[object Array]`,zM=`[object Number]`,BM=`[object String]`,VM=`[object Boolean]`,HM=Math.PI/180,UM=180/Math.PI,WM=`#`,GM=``,KM=`0`,qM=`Konva warning: `,JM=`Konva error: `,YM={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]},XM=null,ZM=typeof window<`u`?window:{},QM=new WeakMap,$M=(e,t)=>{typeof e.requestAnimationFrame==`function`?e.requestAnimationFrame(t):typeof requestAnimationFrame<`u`?requestAnimationFrame(t):setTimeout(t,16)},eN=new Map,tN=Object.getPrototypeOf(Int8Array),nN=e=>{let t=e.trim();return t.indexOf(`,`)===-1?t.split(/\s*\/\s*|\s+/):t.split(/\s*,\s*/)},rN=`[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?`,iN=RegExp(`^(${rN})(%?)$`,`i`),aN=(e,t)=>{let n=iN.exec(e);return n?n[2]?Number(n[1])/100*t:Number(n[1]):NaN},oN=/^#[0-9a-f]+$/i,sN=e=>Math.min(Math.max(e,0),1),cN=RegExp(`^(${rN})(deg|grad|rad|turn)?$`,`i`),lN={deg:1,grad:.9,rad:UM,turn:360};function uN(e,t){return Math.min(Math.max(e||0,0),t)}var Y={_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)===RM},_isNumber(e){return Object.prototype.toString.call(e)===zM&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===BM},_isBoolean(e){return Object.prototype.toString.call(e)===VM},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!=`string`)return!1;let t=e[0];return t===`#`||t===`.`||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e,t){let n=t&&!t.closed&&t||ZM,r=QM.get(n);r||(r=[],QM.set(n,r),$M(n,function(){QM.delete(n),r.forEach(function(e){e()})})),r.push(e)},createCanvasElement(){IM();let e=document.createElement(`canvas`);try{e.style=e.style||{}}catch{}return e},createImageElement(){return IM(),document.createElement(`img`)},_isInDocument(e){return!!e.isConnected},_urlToImage(e,t){let n=Y.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(WM,GM);let 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=KM+e;return WM+e},isCanvasFarblingActive(){if(XM!==null)return XM;if(typeof document>`u`)return XM=!1,!1;let e=this.createCanvasElement();e.width=10,e.height=10;let t=e.getContext(`2d`,{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle=`#282828`,t.fillRect(0,0,10,10);let n=t.getImageData(0,0,10,10).data,r=!1;for(let e=0;e<100;e++)if(n[e*4]!==40||n[e*4+1]!==40||n[e*4+2]!==40||n[e*4+3]!==255){r=!0;break}return XM=r,this.releaseCanvas(e),XM},getHitColor(){let e=()=>Math.random()*256|0;return this.getHitColorKey(e(),e(),e())},getHitColorKey(e,t,n){let r=this.isCanvasFarblingActive()?5:3,i=e=>Math.round(e/r)*r;return WM+this._rgbToHex(i(e),i(t),i(n))},getSnappedHexColor(e){let{r:t,g:n,b:r}=this._hexToRgb(e);return this.getHitColorKey(t,n,r)},getRGB(e){let{r:t=0,g:n=0,b:r=0}=Y.colorToRGBA(e)??{};return{r:t,g:n,b:r}},colorToRGBA(e){e=(e||``).trim()||`black`;let t=Y._namedColorToRBA(e)||Y._hex3ColorToRGBA(e)||Y._hex4ColorToRGBA(e)||Y._hex6ColorToRGBA(e)||Y._hex8ColorToRGBA(e)||Y._rgbColorToRGBA(e)||Y._hslColorToRGBA(e);if(t&&[t.r,t.g,t.b,t.a].every(Y._isNumber))return t},_namedColorToRBA(e){let t=YM[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:t.length>3?t[3]:1}:null},_rgbColorToRGBA(e){let t=/^rgba?\(([^)]*)\)$/i.exec(e);if(!t)return;let n=nN(t[1]);if(!(n.length<3||n.length>4))return{r:aN(n[0],255),g:aN(n[1],255),b:aN(n[2],255),a:n.length>3?aN(n[3],1):1}},_hex8ColorToRGBA(e){if(e.length===9&&oN.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&&oN.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&&oN.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&&oN.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){let t=/^hsla?\(([^)]*)\)$/i.exec(e);if(!t)return;let n=nN(t[1]);if(n.length<3||n.length>4)return;let r=cN.exec(n[0]);if(!r)return;let i=r[2],a=Number(r[1])*(i?lN[i.toLowerCase()]:1);if(!isFinite(a))return;let o=(a%360+360)%360/360,s=sN(aN(n[1],100)/100),c=sN(aN(n[2],100)/100),l=n.length>3?aN(n[3],1):1,u=c<.5?c*(1+s):c+s-c*s,d=2*c-u,f=[0,0,0];for(let e=0;e<3;e++){let t=o+1/3*-(e-1);t<0&&t++,t>1&&t--;let n;n=6*t<1?d+(u-d)*6*t:2*t<1?u:3*t<2?d+(u-d)*(2/3-t)*6:d,f[e]=n*255}return{r:Math.round(f[0]),g:Math.round(f[1]),b:Math.round(f[2]),a:l}},_getPointsRect(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a=0;a<e.length;a+=2){let o=e[a],s=e[a+1];isNaN(o)||(t=Math.min(t,o),r=Math.max(r,o)),isNaN(s)||(n=Math.min(n,s),i=Math.max(i,s))}return isFinite(t+n)?{x:t,y:n,width:r-t,height:i-n}:{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){let t={};for(let n in e)t[n]=Y._cloneValue(e[n]);return t},_cloneValue(e){return Y._isArray(e)?e.some(e=>typeof e==`object`)?e.map(Y._cloneValue):e.slice():Y._isPlainObject(e)?Y.cloneObject(e):e instanceof tN?e.slice():e},cloneArray(e){return e.slice(0)},degToRad(e){return e*HM},radToDeg(e){return e*UM},_getRotation(e){return J.angleDeg?Y.radToDeg(e):e},_capitalize(e){let t=eN.get(e);if(t!==void 0)return t;let n=e.charAt(0).toUpperCase()+e.slice(1);return eN.set(e,n),n},throw(e){throw Error(JM+e)},error(e){console.error(JM+e)},warn(e){J.showWarnings&&console.warn(qM+e)},_batchEvents(e,t){if(!e)return t();let n=!1,r=!0;try{e(()=>{n||!r?Y.warn(`eventBatchFunc must call its argument exactly once, synchronously.`):(n=!0,t())})}finally{r=!1,n||Y.warn(`eventBatchFunc must call its argument synchronously.`)}},each(e,t){for(let n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,a){let o,s,c,l=(e-n)*(e-n)+(t-r)*(t-r);if(l==0)o=e,s=t,c=(i-n)*(i-n)+(a-r)*(a-r);else{let u=((i-e)*(n-e)+(a-t)*(r-t))/l;u<0?(o=e,s=t,c=(e-i)*(e-i)+(t-a)*(t-a)):u>1?(o=n,s=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(o=e+u*(n-e),s=t+u*(r-t),c=(o-i)*(o-i)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(e,t,n){let r=Y.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(a,o){if(!n&&o===t.length-1)return;let s=t[(o+1)%t.length],c=Y._getProjectionToSegment(a.x,a.y,s.x,s.y,e.x,e.y),l=c[0],u=c[1],d=c[2];d<i&&(r.x=l,r.y=u,i=d)}),r},_prepareArrayForTween(e,t,n){let r=[],i=[];if(e.length>t.length){let n=t;t=e,e=n}for(let t=0;t<e.length;t+=2)r.push({x:e[t],y:e[t+1]});for(let e=0;e<t.length;e+=2)i.push({x:t[e],y:t[e+1]});let a=[];return i.forEach(function(e){let t=Y._getProjectionToLine(e,r,n);a.push(t.x),a.push(t.y)}),a},_prepareToStringify(e,t=new Set){let n=Y._isArray(e)?[]:{};t.add(e);for(let r of Object.keys(e)){let i=e[r];Y._isElement(i)||t.has(i)||(n[r]=Y._isPlainObject(i)||Y._isArray(i)?Y._prepareToStringify(i,t):i)}return t.delete(e),n},_assign(e,t){for(let n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas(...e){J.releaseCanvasOnDestroy&&e.forEach(e=>{e.width=0,e.height=0})},_cornerRadii(e,t,n){let r=Math.min(t,n)/2;if(typeof e==`number`){let t=uN(e,r);return[t,t,t,t]}return[uN(e[0],r),uN(e[1],r),uN(e[2],r),uN(e[3],r)]},drawRoundedRectPath(e,t,n,r){let i=t<0?t:0,a=n<0?n:0;t=Math.abs(t),n=Math.abs(n);let[o,s,c,l]=Y._cornerRadii(r,t,n);e.moveTo(i+o,a),e.lineTo(i+t-s,a),e.arc(i+t-s,a+s,s,Math.PI*3/2,0,!1),e.lineTo(i+t,a+n-c),e.arc(i+t-c,a+n-c,c,0,Math.PI/2,!1),e.lineTo(i+l,a+n),e.arc(i+l,a+n-l,l,Math.PI/2,Math.PI,!1),e.lineTo(i,a+o),e.arc(i+o,a+o,o,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(e,t,n,r,i){r=Math.abs(r);for(let a=0;a<n;a++){let o=t[(a-1+n)%n],s=t[a],c=t[(a+1)%n],l={x:s.x-o.x,y:s.y-o.y},u={x:c.x-s.x,y:c.y-s.y},d=Math.hypot(l.x,l.y),f=Math.hypot(u.x,u.y),p;p=typeof i==`number`?i:a<i.length?i[a]:0,p=r*Math.cos(Math.PI/n)*Math.min(1,p/r*2);let m={x:l.x/d,y:l.y/d},h={x:u.x/f,y:u.y/f},g={x:s.x-m.x*p,y:s.y-m.y*p},_={x:s.x+h.x*p,y:s.y+h.y*p};a===0?e.moveTo(g.x,g.y):e.lineTo(g.x,g.y),e.arcTo(s.x,s.y,_.x,_.y,p)}}};function dN(e){let t=[],n=e.length,r=Y;for(let i=0;i<n;i++){let n=e[i];r._isNumber(n)?n=Math.round(n*1e3)/1e3:r._isString(n)||(n+=``),t.push(n)}return t}var fN=`,`,pN=`(`,mN=`)`,hN=`;`,gN=`()`,_N=`=`,vN=`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`.split(`.`),yN=[`fillStyle`,`strokeStyle`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`,`letterSpacing`,`lineCap`,`lineDashOffset`,`lineJoin`,`lineWidth`,`miterLimit`,`direction`,`font`,`textAlign`,`textBaseline`,`globalAlpha`,`globalCompositeOperation`,`imageSmoothingEnabled`,`filter`],bN=100,xN=null;function SN(){if(xN!==null)return xN;try{let e=Y.createCanvasElement(),t=e.getContext(`2d`);xN=!!t&&`filter`in t,Y.releaseCanvas(e)}catch{xN=!1}return xN}var CN=class{constructor(e){this.canvas=e,J.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){let n=this.traceArr,r=n.length,i=``,a,o,s,c;for(a=0;a<r;a++)o=n[a],s=o.method,s?(c=o.args,i+=s,e?i+=gN:(t&&(c=c.map(e=>typeof e==`number`?Math.floor(e):e)),i+=pN+c.join(fN)+mN)):(i+=o.property,e||(i+=_N+o.val)),i+=hN;return i}clearTrace(){this.traceArr=[]}_trace(e){let t=this.traceArr,n;t.push(e),n=t.length,n>=bN&&t.shift()}reset(){let e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){let t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){let t=e.attrs.lineCap;t&&this.setAttr(`lineCap`,t)}_applyOpacity(e){let t=e.getAbsoluteOpacity();t!==1&&this.setAttr(`globalAlpha`,t)}_applyLineJoin(e){let t=e.attrs.lineJoin;t&&this.setAttr(`lineJoin`,t)}_applyMiterLimit(e){let t=e.attrs.miterLimit;t!=null&&this.setAttr(`miterLimit`,t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,i,a){this._context.arc(e,t,n,r,i,a)}arcTo(e,t,n,r,i){this._context.arcTo(e,t,n,r,i)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,i,a){this._context.bezierCurveTo(e,t,n,r,i,a)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,t){let n=arguments;if(n.length===2)return this._context.createImageData(e,t);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,i,a){return this._context.createRadialGradient(e,t,n,r,i,a)}drawImage(e,t,n,r,i,a,o,s,c){let l=arguments,u=this._context;l.length===3?u.drawImage(e,t,n):l.length===5?u.drawImage(e,t,n,r,i):l.length===9&&u.drawImage(e,t,n,r,i,a,o,s,c)}ellipse(e,t,n,r,i,a,o,s){this._context.ellipse(e,t,n,r,i,a,o,s)}isPointInPath(e,t,n,r){return n?this._context.isPointInPath(n,e,t,r):this._context.isPointInPath(e,t,r)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}roundRect(e,t,n,r,i){this._context.roundRect(e,t,n,r,i)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash(e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,i,a){this._context.setTransform(e,t,n,r,i,a)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,i,a){this._context.transform(e,t,n,r,i,a)}translate(e,t){this._context.translate(e,t)}_enableTrace(){let e=this,t=vN.length,n=this.setAttr,r,i,a=function(t){let n=e[t],r;e[t]=function(){return i=dN(Array.prototype.slice.call(arguments,0)),r=n.apply(e,arguments),e._trace({method:t,args:i}),r}};for(r=0;r<t;r++)a(vN[r]);e.setAttr=function(){n.apply(e,arguments);let t=arguments[0],r=arguments[1];(t===`shadowOffsetX`||t===`shadowOffsetY`||t===`shadowBlur`)&&(r/=this.canvas.getPixelRatio()),e._trace({property:t,val:r})}}_applyGlobalCompositeOperation(e){let t=e.attrs.globalCompositeOperation;t&&t!==`source-over`&&this.setAttr(`globalCompositeOperation`,t)}};yN.forEach(function(e){Object.defineProperty(CN.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});var wN=class extends CN{constructor(e,{willReadFrequently:t=!1}={}){super(e),this._context=e._canvas.getContext(`2d`,{willReadFrequently:t})}_fillColor(e){let t=e.fill();this.setAttr(`fillStyle`,t),e._fillFunc(this)}_fillPattern(e){let t=this._context;`patternQuality`in t&&(t.patternQuality=t.imageSmoothingEnabled?`good`:`nearest`),this.setAttr(`fillStyle`,e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){let t=e._getLinearGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fillRadialGradient(e){let t=e._getRadialGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fill(e){let t=e.fill(),n=e.getFillPriority();if(t&&n===`color`){this._fillColor(e);return}let r=e.getFillPatternImage();if(r&&n===`pattern`){this._fillPattern(e);return}let i=e.getFillLinearGradientColorStops();if(i&&n===`linear-gradient`){this._fillLinearGradient(e);return}let a=e.getFillRadialGradientColorStops();a&&n===`radial-gradient`?this._fillRadialGradient(e):t?this._fillColor(e):r?this._fillPattern(e):i?this._fillLinearGradient(e):a&&this._fillRadialGradient(e)}_strokeLinearGradient(e){let t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(let e=0;e<r.length;e+=2)i.addColorStop(r[e],r[e+1]);this.setAttr(`strokeStyle`,i)}}_stroke(e){let t=e.dash(),n=e.getStrokeScaleEnabled();if(!n){this.save();let e=this.getCanvas().getPixelRatio();this.setTransform(e,0,0,e,0,0)}this._applyLineCap(e),t&&e.dashEnabled()&&(this.setLineDash(t),this.setAttr(`lineDashOffset`,e.dashOffset())),this.setAttr(`lineWidth`,e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr(`shadowColor`,`rgba(0,0,0,0)`),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr(`strokeStyle`,e.stroke()),e._strokeFunc(this),n||this.restore()}_applyShadow(e){let t=e.getShadowRGBA()??`black`,n=e.getShadowBlur(),r=e.getShadowOffset(),i=e.getAbsoluteScale(),a=this.canvas.getPixelRatio(),o=i.x*a,s=i.y*a;this.setAttr(`shadowColor`,t),this.setAttr(`shadowBlur`,n*Math.min(Math.abs(o),Math.abs(s))),this.setAttr(`shadowOffsetX`,r.x*o),this.setAttr(`shadowOffsetY`,r.y*s)}},TN=class extends CN{constructor(e){super(e),this._context=e._canvas.getContext(`2d`,{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr(`fillStyle`,e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){let t=e.getStrokeScaleEnabled();if(!t){this.save();let e=this.getCanvas().getPixelRatio();this.setTransform(e,0,0,e,0,0)}this._applyLineCap(e);let n=e.hitStrokeWidth(),r=n===`auto`?e.strokeWidth():n;this.setAttr(`lineWidth`,r),this.setAttr(`strokeStyle`,e.colorKey),e._strokeFuncHit(this),t||this.restore()}},EN=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this._logicalWidth=0,this._logicalHeight=0,this.isCache=!1,this.x=0,this.y=0;let t=(e||{}).pixelRatio||J.pixelRatio||J._global.devicePixelRatio||1;this.pixelRatio=t,this._canvas=Y.createCanvasElement(),this._canvas.style.padding=`0`,this._canvas.style.margin=`0`,this._canvas.style.border=`0`,this._canvas.style.background=`transparent`,this._canvas.style.position=`absolute`,this._canvas.style.top=`0`,this._canvas.style.left=`0`}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){this.pixelRatio=e,this.setSize(this._logicalWidth,this._logicalHeight)}setWidth(e){this.setSize(e,this._logicalHeight)}setHeight(e){this.setSize(this._logicalWidth,e)}getWidth(){return this.width}getHeight(){return this.height}_bitmapSize(e){return Math.floor((e||0)*this.pixelRatio)}setSize(e,t){(!isFinite(e??0)||!isFinite(t??0))&&(Y.error(`Canvas size must be finite numbers, got ${e}x${t}. The canvas is left empty.`),e=t=0),e||=0,t||=0;let n=this.pixelRatio;this._logicalWidth=e,this._logicalHeight=t,this.width=this._canvas.width=this._bitmapSize(e),this.height=this._canvas.height=this._bitmapSize(t),this._canvas.style.width=e+`px`,this._canvas.style.height=t+`px`,this.getContext()._context.scale(n,n)}setSizeIfChanged(e,t){(this.width!==this._bitmapSize(e)||this.height!==this._bitmapSize(t))&&this.setSize(e,t)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch{try{return this._canvas.toDataURL()}catch(e){return Y.error(`Unable to get data URL. `+e.message+` For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.`),``}}}},DN=class extends EN{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new wN(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}},ON=class extends EN{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new TN(this),this.setSize(e.width,e.height)}},kN={get isDragging(){let e=!1;return kN._dragElements.forEach(t=>{t.dragStatus===`dragging`&&(e=!0)}),e},justDragged:!1,get node(){let e;return kN._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_listenToWindow(e){let t=t=>kN._endDragBefore(t,e),n=t=>kN._batchEvents(()=>kN._drag(t,e),e),r=e=>kN._batchEvents(()=>kN._endDragAfter(e));e.addEventListener(`mouseup`,t,!0),e.addEventListener(`touchend`,t,!0),e.addEventListener(`touchcancel`,t,!0),e.addEventListener(`mousemove`,n),e.addEventListener(`touchmove`,n),e.addEventListener(`mouseup`,r,!1),e.addEventListener(`touchend`,r,!1),e.addEventListener(`touchcancel`,r,!1)},_batchEvents(e,t){if(!kN._dragElements.size)return;let n=new Set;for(let{node:e}of kN._dragElements.values()){let r=e.getStage();if(!r||t&&r._getOwnerWindow()!==t)continue;let i=r.eventBatchFunc();i&&n.add(i)}let r=e;for(let e of n){let t=r;r=()=>Y._batchEvents(e,t)}r()},_drag(e,t){let n=[],r=new Set;kN._dragElements.forEach((i,a)=>{let{node:o}=i,s=o.getStage();if(t&&s._getOwnerWindow()!==t)return;r.has(s)||(s.setPointersPositions(e),r.add(s)),i.pointerId===void 0&&(i.pointerId=Y._getFirstPointerId(e));let c=s._changedPointerPositions.find(e=>e.id===i.pointerId);if(c){if(i.dragStatus!==`dragging`){let t=o.dragDistance();if(Math.max(Math.abs(c.x-i.startPointerPos.x),Math.abs(c.y-i.startPointerPos.y))<t||(o.startDrag({evt:e}),!o.isDragging()))return}o._setDragPosition(e,i),n.push(o)}}),n.forEach(t=>{t.getStage()&&t.fire(`dragmove`,{type:`dragmove`,target:t,evt:e},!0)})},_endDragBefore(e,t){let n=[],r=new Set;kN._dragElements.forEach((i,a)=>{let{node:o}=i,s=o.getStage();if(e&&!r.has(s)&&(!t||s._getOwnerWindow()===t)&&(s.setPointersPositions(e),r.add(s)),i.pointerId===void 0||s._changedPointerPositions.some(e=>e.id===i.pointerId)){if(i.dragStatus===`ready`)kN._dragElements.delete(a);else{kN.justDragged=!0,J._mouseListenClick=!1,J._touchListenClick=!1,J._pointerListenClick=!1,i.dragStatus=`stopped`;let e=i.node.getLayer()||i.node instanceof J.Stage&&i.node;e&&n.indexOf(e)===-1&&n.push(e)}}}),n.forEach(e=>{e.draw()})},_endDragAfter(e){kN._dragElements.forEach((t,n)=>{t.dragStatus===`stopped`&&(t.node.fire(`dragend`,{type:`dragend`,target:t.node,evt:e},!0),t.dragStatus!==`dragging`&&kN._dragElements.delete(n))})}},AN=new Map,jN=J._global.PointerEvent!==void 0;function MN(e){return AN.get(e)}function NN(e){return{evt:e,pointerId:e.pointerId}}function PN(e,t){return AN.get(e)===t}function FN(e,t){var n;LN(e);let r=t.getStage();if(r&&(AN.set(e,t),jN)){try{(n=r.content)==null||n.setPointerCapture(e)}catch{}t._fire(`gotpointercapture`,NN(new PointerEvent(`gotpointercapture`)))}}function IN(e){AN.forEach((t,n)=>{t===e&&LN(n)})}function LN(e,t){var n;let r=AN.get(e);if(!r||t&&r!==t)return;let i=r.getStage();if(AN.delete(e),jN){try{(n=i?.content)==null||n.releasePointerCapture(e)}catch{}r._fire(`lostpointercapture`,NN(new PointerEvent(`lostpointercapture`)))}}function RN(e){return Y._isString(e)?`"`+e+`"`:Object.prototype.toString.call(e)===`[object Number]`||Y._isBoolean(e)?e:Object.prototype.toString.call(e)}function zN(e){return e>255?255:e<0?0:Math.round(e)}function X(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||Y.warn(RN(e)+` is a not valid value for "`+t+`" attribute. The value should be a number.`),e}}function BN(e){if(J.isUnminified)return function(t,n){let r=Y._isNumber(t),i=Y._isArray(t)&&t.length==e;return!r&&!i&&Y.warn(RN(t)+` is a not valid value for "`+n+`" attribute. The value should be a number or Array<number>(`+e+`)`),t}}function VN(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||e===`auto`||Y.warn(RN(e)+` is a not valid value for "`+t+`" attribute. The value should be a number or "auto".`),e}}function HN(){if(J.isUnminified)return function(e,t){return Y._isString(e)||Y.warn(RN(e)+` is a not valid value for "`+t+`" attribute. The value should be a string.`),e}}function UN(){if(J.isUnminified)return function(e,t){let n=Y._isString(e),r=Object.prototype.toString.call(e)===`[object CanvasGradient]`||e&&e.addColorStop;return n||r||Y.warn(RN(e)+` is a not valid value for "`+t+`" attribute. The value should be a string or a native gradient.`),e}}function WN(){if(J.isUnminified)return function(e,t){return e instanceof tN||(Y._isArray(e)?e.forEach(function(e){Y._isNumber(e)||Y.warn(`"`+t+`" attribute has non numeric element `+e+`. Make sure that all elements are numbers.`)}):Y.warn(RN(e)+` is a not valid value for "`+t+`" attribute. The value should be a array of numbers.`)),e}}function GN(){if(J.isUnminified)return function(e,t){return e!==!0&&e!==!1&&Y.warn(RN(e)+` is a not valid value for "`+t+`" attribute. The value should be a boolean.`),e}}function KN(e){if(J.isUnminified)return function(t,n){return t==null||Y.isObject(t)||Y.warn(RN(t)+` is a not valid value for "`+n+`" attribute. The value should be an object with properties `+e),t}}var qN=`get`,JN=`set`,Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){let r=qN+Y._capitalize(t);e.prototype[r]=e.prototype[r]||function(){let e=this.attrs[t];return e===void 0?n:e}},addSetter(e,t,n,r){let i=JN+Y._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){let i=JN+Y._capitalize(t);e.prototype[i]=function(e){return n&&e!=null&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){let a=n.length,o=Y._capitalize,s=qN+o(t),c=JN+o(t),l=n.map(e=>t+o(e)),u=l.map(e=>qN+o(e));e.prototype[s]=function(){let e={};for(let t=0;t<a;t++){let r=this[u[t]];e[n[t]]=r?r.call(this):this.attrs[l[t]]}return e};let d=KN(n);e.prototype[c]=function(e){let a=this.attrs[t];r&&(e=r.call(this,e,t)),d&&d.call(this,e,t);for(let n in e)e.hasOwnProperty(n)&&this._setAttr(t+o(n),e[n]);return e||n.forEach(e=>{this._setAttr(t+o(e),void 0)}),this._fireChangeEvent(t,a,e),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){let n=Y._capitalize(t),r=JN+n,i=qN+n,a=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()};a._isAttrAccessor=!0,e.prototype[t]=a},backCompat(e,t){Y.each(t,function(t,n){let r=e.prototype[n],i=qN+Y._capitalize(t),a=JN+Y._capitalize(t);function o(){return Y.error(`"`+t+`" method is deprecated and will be removed soon. Use ""`+n+`" instead.`),r.apply(this,arguments)}e.prototype[t]=o,e.prototype[i]=o,e.prototype[a]=o})},afterSetFilter(){this._filterUpToDate=!1}};function YN(e){let t=/(\w+)\(([^)]+)\)/g,n;for(;(n=t.exec(e))!==null;){let[,e,t]=n;switch(e){case`blur`:{let e=parseFloat(t.replace(`px`,``));return function(t){this.blurRadius(e*.5);let n=J.Filters;n&&n.Blur&&n.Blur.call(this,t)}}case`brightness`:{let e=t.includes(`%`)?parseFloat(t)/100:parseFloat(t);return function(t){this.brightness(e);let n=J.Filters;n&&n.Brightness&&n.Brightness.call(this,t)}}case`contrast`:{let e=parseFloat(t);return function(t){let n=100*(Math.sqrt(e)-1);this.contrast(n);let r=J.Filters;r&&r.Contrast&&r.Contrast.call(this,t)}}case`grayscale`:return function(e){let t=J.Filters;t&&t.Grayscale&&t.Grayscale.call(this,e)};case`sepia`:return function(e){let t=J.Filters;t&&t.Sepia&&t.Sepia.call(this,e)};case`invert`:return function(e){let t=J.Filters;t&&t.Invert&&t.Invert.call(this,e)};default:Y.warn(`CSS filter "${e}" is not supported in fallback mode. Consider using function filters for better compatibility.`)}}return()=>{}}var XN=`absoluteOpacity`,ZN=`absoluteTransform`,QN=`Change`,$N=`children`,eP=`konva`,tP=`listening`,nP=[`mouseenter`,`mouseleave`,`pointerenter`,`pointerleave`,`touchenter`,`touchleave`],rP=`set`,iP=`Shape`,aP=` `,oP=`stage`,sP=`transform`,cP=`Stage`,lP=`visible`,uP=[`xChange.konva`,`yChange.konva`,`scaleXChange.konva`,`scaleYChange.konva`,`skewXChange.konva`,`skewYChange.konva`,`rotationChange.konva`,`offsetXChange.konva`,`offsetYChange.konva`,`transformsEnabledChange.konva`].join(aP),dP=1;function fP(e,t,n){let r=new DN({width:0,height:0,pixelRatio:e.pixelRatio});return r.x=t,r.y=n,r}var Q=class e{constructor(e){this._id=dP++,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(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===sP||e===ZN)&&this._cache[e]?this._cache[e].dirty=!0:e?this._cache[e]=void 0:(this._cache={},this._attrsVersion!==void 0&&this._attrsVersion++)}_releaseCanvasCache(){let e=this._canvasCache;e&&(Y.releaseCanvas(e.scene._canvas,e.filter._canvas,...e.hit?[e.hit._canvas]:[]),this._canvasCache=null)}_getCache(e,t){let n=this._cache[e];return(n===void 0||(e===sP||e===ZN)&&n.dirty===!0)&&(n=t.call(this),this._cache[e]=n),n}_getCanvasCache(){return this._canvasCache}_clearSelfAndDescendantCache(e){this._clearCache(e),e===ZN&&this.fire(`absoluteTransformChange`)}static _runAfterAbsTransformCascade(t){e._absTransformCascadeDepth>0?e._pendingAfterCascade.push(t):t()}clearCache(){return this._releaseCanvasCache(),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){let t=e||{},n={};(t.x===void 0||t.y===void 0||t.width===void 0||t.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let r=Math.ceil(t.width||n.width),i=Math.ceil(t.height||n.height),a=t.pixelRatio,o=t.x===void 0?Math.floor(n.x):t.x,s=t.y===void 0?Math.floor(n.y):t.y,c=t.offset||0,l=t.drawBorder||!1,u=t.hitCanvasPixelRatio||1;if(!r||!i||!isFinite(o+s+r+i))return Y.error(`Can not cache the node. Its size is 0 or its bounds are not finite numbers (${o}, ${s}, ${r}x${i}). Caching is skipped.`),this;let d=+(Math.abs(Math.round(n.x)-o)>.5),f=+(Math.abs(Math.round(n.y)-s)>.5);r+=c*2+d,i+=c*2+f,o-=c,s-=c;let p=new DN({pixelRatio:a,width:r,height:i}),m=new DN({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),h=p.getContext(),g=fP(p,o,s);p.isCache=!0,this._releaseCanvasCache(),this._filterUpToDate=!1,t.imageSmoothingEnabled===!1&&(p.getContext()._context.imageSmoothingEnabled=!1,m.getContext()._context.imageSmoothingEnabled=!1),h.save(),h.translate(-o,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(XN);try{this.drawScene(p,this,g)}catch(e){throw Y.releaseCanvas(p._canvas),e}finally{this._isUnderCache=!1,this._clearSelfAndDescendantCache(XN),h.restore(),Y.releaseCanvas(g._canvas)}return l&&(h.save(),h.beginPath(),h.rect(0,0,r,i),h.closePath(),h.setAttr(`strokeStyle`,`red`),h.setAttr(`lineWidth`,5),h.stroke(),h.restore()),this._canvasCache={scene:p,filter:m,hit:null,hitConfig:{pixelRatio:u,width:r,height:i},x:o,y:s},this._requestDraw(),this}_getCachedHitCanvas(e){if(e===this)return null;let t=this._getCanvasCache();if(!t)return null;if(t.hit)return t.hit;let n=new ON(t.hitConfig);n.isCache=!0;let r=n.getContext();return r.save(),r.translate(-t.x,-t.y),this.drawHit(n,this),r.restore(),t.hit=n,n}isCached(){return!!this._canvasCache}getClientRect(e){throw Error(`abstract "getClientRect" method call`)}_transformedRect(e,t){let n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],r=1/0,i=1/0,a=-1/0,o=-1/0,s=this.getAbsoluteTransform(t);return n.forEach(function(e){let t=s.point(e);r=Math.min(r,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x),o=Math.max(o,t.y)}),{x:r,y:i,width:a-r,height:o-i}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);let t=this._getCanvasCache();e.translate(t.x,t.y);let n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e,t){let n=this._getCanvasCache();e.save(),e.translate(n.x,n.y),e.drawImage(t._canvas,0,0,t.width/t.pixelRatio,t.height/t.pixelRatio),e.restore()}_getCachedSceneCanvas(){let e=this.filters(),t=this._getCanvasCache(),n=t.scene,r=t.filter,i=r.getContext(),a,o,s,c;if(!e||e.length===0)return n;if(this._filterUpToDate)return r;let l=!0;for(let t=0;t<e.length;t++)if(typeof e[t]!=`string`||!SN()){l=!1;break}let u=n.pixelRatio;if(r.setSizeIfChanged(n._logicalWidth,n._logicalHeight),l){let t=e.join(` `);return i.clear(),i.save(),i.setAttr(`filter`,t),i.drawImage(n._canvas,0,0,n.getWidth()/u,n.getHeight()/u),i.restore(),this._filterUpToDate=!0,r}try{for(a=e.length,i.clear(),i.drawImage(n._canvas,0,0,n.getWidth()/u,n.getHeight()/u),o=i.getImageData(0,0,r.getWidth(),r.getHeight()),s=0;s<a;s++)c=e[s],typeof c==`string`&&(c=YN(c)),c.call(this,o);i.putImageData(o,0,0)}catch(e){Y.error(`Unable to apply filter. `+e.message+` This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.`)}return this._filterUpToDate=!0,r}on(...e){this._prepareListeners();let t=e[0],n=e[1];if(e[2],e.length===3)return this._delegate.apply(this,e);let r=t.split(aP);for(let e=0;e<r.length;e++){let t=r[e].split(`.`),i=t[0],a=t[1]||``;this.eventListeners[i]||(this.eventListeners[i]=[]),this.eventListeners[i].push({name:a,handler:n})}return this}_prepareListeners(){this===this.constructor.prototype&&(this.hasOwnProperty(`eventListeners`)||(this.eventListeners={}),e.protoListenerMap=new WeakMap)}off(e,t){this._prepareListeners();let n=(e||``).split(aP),r=n.length,i,a,o,s,c,l;if(!e)for(a in this.eventListeners)this._off(a);for(i=0;i<r;i++)if(o=n[i],s=o.split(`.`),c=s[0],l=s[1],c)this.eventListeners[c]&&this._off(c,l,t);else for(a in this.eventListeners)this._off(a,l,t);return this}dispatchEvent(e){let t={target:this,type:e.type,evt:e};return this.fire(e.type,t),this}addEventListener(e,t){return this.on(e,function(e){t.call(this,e.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,t,n){let r=this;return this.on(e,function(e){let i=e.target.findAncestors(t,!0,r);for(let t=0;t<i.length;t++)e=Y.cloneObject(e),e.currentTarget=i[t],n.call(i[t],e)}),this}remove(){return this.isDragging()&&this.stopDrag(),kN._dragElements.delete(this._id),kN._dragElements.forEach((e,t)=>{this.isAncestorOf(e.node)&&kN._dragElements.delete(t)}),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ZN),this._clearSelfAndDescendantCache(XN),this._clearSelfAndDescendantCache(oP),this._clearSelfAndDescendantCache(lP),this._clearSelfAndDescendantCache(tP)}_remove(){this._clearCaches();let e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this._fire(`destroy`,{target:this}),IN(this),this.remove(),this.clearCache(),this}getAttr(e){let t=`get`+Y._capitalize(e);return Y._isFunction(this[t])?this[t]():this.attrs[e]}getAncestors(){let e=this.getParent(),t=[];for(;e;)t.push(e),e=e.getParent();return t}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{let t,n;if(!e)return this;for(t in e)t!==$N&&(n=rP+Y._capitalize(t),Y._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))}),this}isListening(){return this._getCache(tP,this._isListening)}_isListening(e){if(!this.listening())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isListening(e):!0}isVisible(){return this._getCache(lP,this._isVisible)}_isVisible(e){if(!this.visible())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isVisible(e):!0}shouldDrawHit(e){return e?this._isVisible(e)&&this._isListening(e):this.isListening()&&this.isVisible()}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let e=this.getDepth(),t=this,n=0,r,i,a,o;function s(c){for(r=[],i=c.length,a=0;a<i;a++)o=c[a],n++,o.nodeType!==iP&&(r=r.concat(o.children)),o._id===t._id&&(a=i);r.length>0&&r[0].getDepth()<=e&&s(r)}let c=this.getStage();return t.nodeType!==cP&&c&&s(c.children),n}getDepth(){let e=0,t=this.parent;for(;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0;try{e()}finally{this._batchingTransformChange=!1,this._needClearTransformCache&&(this._needClearTransformCache=!1,this._clearCache(sP),this._clearSelfAndDescendantCache(ZN))}}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){let e=this.getStage();if(!e)return null;let t=e.getPointerPosition();if(!t)return null;let n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(e){let t=this.getAbsoluteTransform(e).getMatrix(),n=new LM,r=this.offset();return n.m=t.slice(),n.translate(r.x,r.y),n.getTranslation()}setAbsolutePosition(e){let{x:t,y:n,...r}=this._clearTransform();this.attrs.x=t,this.attrs.y=n,this._clearCache(sP);let i=this._getAbsoluteTransform().copy(),a=i.isInvertible();i.invert(),i.translate(e.x,e.y);let{x:o,y:s}=i.getTranslation();return this._setTransform(r),a?this.setPosition({x:this.attrs.x+o,y:this.attrs.y+s}):Y.warn(`Cannot set the absolute position: the absolute transform is not invertible (an ancestor has a zero scale).`),this._clearCache(sP),this._clearSelfAndDescendantCache(ZN),this}_setTransform(e){let t;for(t in e)this.attrs[t]=e[t]}_clearTransform(){let e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){let t=e.x,n=e.y,r=this.x(),i=this.y();return t!==void 0&&(r+=t),n!==void 0&&(i+=n),this.setPosition({x:r,y:i}),this}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return Y.warn(`Node has no parent. moveToTop function is ignored.`),!1;let e=this.index;return e<this.parent.children.length-1&&(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return Y.warn(`Node has no parent. moveUp function is ignored.`),!1;let e=this.index;return e<this.parent.children.length-1&&(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return Y.warn(`Node has no parent. moveDown function is ignored.`),!1;let e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return Y.warn(`Node has no parent. moveToBottom function is ignored.`),!1;let e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(e){if(!this.parent)return Y.warn(`Node has no parent. zIndex parameter is ignored.`),this;(e<0||e>=this.parent.children.length)&&Y.warn(`Unexpected value `+e+` for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to `+(this.parent.children.length-1)+`.`);let t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(XN,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){let e=this.getAttrs(),t,n,r,i,a,o={attrs:{},className:this.getClassName()};for(t in e)n=e[t],a=Y.isObject(n)&&!Y._isPlainObject(n)&&!Y._isArray(n),!a&&(r=this[t]?._isAttrAccessor&&this[t],delete e[t],i=r?r.call(this):null,e[t]=n,i!==n&&(o.attrs[t]=Y.isObject(n)?Y._prepareToStringify(n):n));return o}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){let r=[];t&&this._isMatch(e)&&r.push(this);let i=this.parent;for(;i;){if(i===n)return r;i._isMatch(e)&&r.push(i),i=i.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if(typeof e==`function`)return e(this);let t=e.replace(/ /g,``).split(`,`),n=t.length,r,i;for(r=0;r<n;r++)if(i=t[r],Y.isValidSelector(i)||(Y.warn(`Selector "`+i+`" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".`),Y.warn(`If you have a custom shape with such className, please change it to start with upper letter like "Triangle".`),Y.warn(`Konva is awesome, right?`)),i.charAt(0)===`#`){if(this.id()===i.slice(1))return!0}else if(i.charAt(0)===`.`){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){let e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(oP,this._getStage)}_getStage(){let e=this.getParent();return e?e.getStage():null}fire(e,t,n){return t||={},t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}getAbsoluteTransform(e){return e||this._hasCachedAncestor()?this._getAbsoluteTransform(e):this._getCache(ZN,this._getCachedAbsoluteTransform)}_hasCachedAncestor(){let e=this.parent;for(;e;){if(e.isCached())return!0;e=e.parent}return!1}_getAbsoluteTransform(e){let t=new LM;return this===e?t:(this.parent&&this.parent!==e&&this.parent.getAbsoluteTransform(e).copyInto(t),this._multiplyOwnTransform(t))}_getCachedAbsoluteTransform(){let e=this._cache[ZN]||new LM;return this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset(),this._multiplyOwnTransform(e),e.dirty=!1,e}_multiplyOwnTransform(e){let t=this.transformsEnabled();if(t===`all`)e.multiply(this.getTransform());else if(t===`position`){let t=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,i=this.attrs.offsetY||0;e.translate(t-r,n-i)}return e}getAbsoluteScale(e){let t=this;for(;t;)t._isUnderCache&&(e=t),t=t.getParent();let n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(sP,this._getTransform)}_getTransform(){let e=this._cache[sP]||new LM;e.reset();let t=this.x(),n=this.y(),r=J.getAngle(this.rotation()),i=this.attrs.scaleX??1,a=this.attrs.scaleY??1,o=this.attrs.skewX||0,s=this.attrs.skewY||0,c=this.attrs.offsetX||0,l=this.attrs.offsetY||0;return(t!==0||n!==0)&&e.translate(t,n),r!==0&&e.rotate(r),(o!==0||s!==0)&&e.skew(o,s),(i!==1||a!==1)&&e.scale(i,a),(c!==0||l!==0)&&e.translate(-1*c,-1*l),e.dirty=!1,e}clone(e){let t=Y.cloneObject(this.attrs),n,r,i,a,o;for(n in e)t[n]=e[n];let s=new this.constructor(t);for(n in this.eventListeners)for(r=this.eventListeners[n],i=r.length,a=0;a<i;a++)o=r[a],o.name.indexOf(eP)<0&&(s.eventListeners[n]||(s.eventListeners[n]=[]),s.eventListeners[n].push(o));return s}_toKonvaCanvas(e){e||={};let t=e.x===void 0||e.y===void 0||!e.width||!e.height?this.getClientRect():{x:0,y:0,width:0,height:0};isFinite(t.x+t.y+t.width+t.height)||Y.error(`Cannot find the bounds of the node to export, its client rect is ${t.x}, ${t.y}, ${t.width}x${t.height}. Check its position, size and points.`);let n=this.getStage(),r=e.x===void 0?Math.floor(t.x):e.x,i=e.y===void 0?Math.floor(t.y):e.y,a=e.pixelRatio||1,o=new DN({width:e.width||Math.ceil(t.width)||(n?n.width():0),height:e.height||Math.ceil(t.height)||(n?n.height():0),pixelRatio:a}),s=o.getContext(),c=fP(o,r,i);return e.imageSmoothingEnabled===!1&&(s._context.imageSmoothingEnabled=!1),s.save(),(r||i)&&s.translate(-1*r,-1*i),this.drawScene(o,void 0,c),s.restore(),Y.releaseCanvas(c._canvas),o}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e||={};let t=e.mimeType||null,n=e.quality||null,r=this._toKonvaCanvas(e).toDataURL(t,n);return e.callback&&e.callback(r),r}toImage(e){return new Promise((t,n)=>{try{let n=e?.callback;n&&delete e.callback,Y._urlToImage(this.toDataURL(e),function(e){t(e),n?.(e)})}catch(e){n(e)}})}toBlob(e){return new Promise((t,n)=>{try{let r=e?.callback;r&&delete e.callback,this.toCanvas(e).toBlob(e=>{e?(t(e),r?.(e)):n(Error(`Konva: toBlob() failed, the canvas was not encoded`))},e?.mimeType,e?.quality)}catch(e){n(e)}})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance===void 0?this.parent?this.parent.getDragDistance():J.dragDistance:this.attrs.dragDistance}_off(e,t,n){let r=this.eventListeners[e],i,a,o;for(i=0;i<r.length;i++)if(a=r[i].name,o=r[i].handler,(a!==`konva`||t===`konva`)&&(!t||a===t)&&(!n||n===o)){if(r.splice(i,1),r.length===0){delete this.eventListeners[e];break}i--}}_fireChangeEvent(e,t,n){this._fire(e+QN,{oldVal:t,newVal:n})}addName(e){if(!this.hasName(e)){let t=this.name(),n=t?t+` `+e:e;this.name(n)}return this}hasName(e){if(!e)return!1;let t=this.name();return t?(t||``).split(/\s/g).indexOf(e)!==-1:!1}removeName(e){let t=(this.name()||``).split(/\s/g),n=t.indexOf(e);return n!==-1&&(t.splice(n,1),this.name(t.join(` `))),this}setAttr(e,t){let n=this[rP+Y._capitalize(e)];return Y._isFunction(n)?n.call(this,t):this._setAttr(e,t),this}_requestDraw(){J.autoDrawEnabled&&(this.getLayer()||this.getStage())?.batchDraw()}_setAttr(e,t){let n=this.attrs[e];(n!==t||Y.isObject(t))&&(t==null?delete this.attrs[e]:this.attrs[e]=t,this._attrsVersion!==void 0&&this._attrsVersion++,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,t),this._requestDraw())}_fireAndBubble(e,t,n){t&&this.nodeType===iP&&(t.target=this);let r=nP.indexOf(e)!==-1;if(!(r&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType===`Stage`&&!n))){this._fire(e,t);let i=r&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(t&&!t.cancelBubble||!t)&&this.parent&&this.parent.isListening()&&!i&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,t,n):this._fireAndBubble.call(this.parent,e,t))}}_getProtoListeners(t){let n=Object.getPrototypeOf(this),r=e.protoListenerMap.get(n);r||(r={},e.protoListenerMap.set(n,r));let i=r[t];if(i===void 0){i=[];let e=new Set,n=Object.getPrototypeOf(this);for(;n;){let r=n.eventListeners?.[t]??[];for(let t=0;t<r.length;t++){let n=r[t];e.has(n)||(e.add(n),i.push(n))}n=Object.getPrototypeOf(n)}r[t]=i}return i}_fire(e,t){t||={},t.currentTarget=this,t.type=e;let n=this._getProtoListeners(e);if(n)for(let e=0;e<n.length;e++)n[e].handler.call(this,t);let r=this.eventListeners[e];if(r){let n=r.slice(),i=n.length;for(let e=0;e<n.length;e++)n[e].handler.call(this,t);let a=this.eventListeners[e];if(a)for(let e=i;e<a.length;e++)a[e].handler.call(this,t)}}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){let t=e?e.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition();if(!n)return;let i=n._getPointerById(t)||n._changedPointerPositions[0]||r;kN._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-r.x,y:i.y-r.y},dragStatus:`ready`,pointerId:t,startEvent:e})}startDrag(e,t=!0){kN._dragElements.has(this._id)||this._createDragElement(e);let n=kN._dragElements.get(this._id);n&&(n.dragStatus=`dragging`,this.fire(`dragstart`,{type:`dragstart`,target:this,evt:n.startEvent&&n.startEvent.evt||e&&e.evt},t))}_setDragPosition(e,t){let n=this.getStage()._getPointerById(t.pointerId);if(!n)return;let r={x:n.x-t.offset.x,y:n.y-t.offset.y},i=this.dragBoundFunc();if(i!==void 0){let t=i.call(this,r,e);if(!t)Y.warn(`dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.`);else if(!Y._isNumber(t.x)||!Y._isNumber(t.y)){Y.warn(`dragBoundFunc returned a position with a non-finite x or y (${t.x}, ${t.y}). The node was not moved.`);return}else r=t}let a=t.lastPos;(!a||a.x!==r.x||a.y!==r.y)&&(this.setAbsolutePosition(r),this._requestDraw()),t.lastPos=r}stopDrag(e){let t=kN._dragElements.get(this._id);t&&(t.dragStatus=`stopped`),kN._endDragBefore(e),kN._endDragAfter(e)}setDraggable(e){this._setAttr(`draggable`,e),this._dragChange()}isDragging(){let e=kN._dragElements.get(this._id);return e?e.dragStatus===`dragging`:!1}_listenDrag(){this._dragCleanup(),this.on(`mousedown.konva touchstart.konva`,function(e){if(!(e.evt.button===void 0||J.dragButtons.indexOf(e.evt.button)>=0)||this.isDragging())return;let t=!1;kN._dragElements.forEach(e=>{this.isAncestorOf(e.node)&&(t=!0)}),t||this._createDragElement(e)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let e=kN._dragElements.get(this._id),t=e&&e.dragStatus===`dragging`,n=e&&e.dragStatus===`ready`;t?this.stopDrag():n&&kN._dragElements.delete(this._id)}}_dragCleanup(){this.off(`mousedown.konva`),this.off(`touchstart.konva`)}isClientRectOnScreen(e={x:0,y:0}){let t=this.getStage();if(!t)return!1;let n={x:-e.x,y:-e.y,width:t.width()+2*e.x,height:t.height()+2*e.y};return Y.haveIntersection(n,this.getClientRect())}static create(e,t){return Y._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(t,n){let r=e.prototype.getClassName.call(t),i=t.children,a,o,s;n&&(t.attrs.container=n),J[r]||(Y.warn(`Can not find a node with class name "`+r+`". Fallback to "Shape".`),r=`Shape`);let c=J[r];if(a=new c(t.attrs),i)for(o=i.length,s=0;s<o;s++)a.add(e._createNode(i[s]));return a}};Q._absTransformCascadeDepth=0,Q._pendingAfterCascade=[],Q.protoListenerMap=new WeakMap,Q.prototype.nodeType=`Node`,Q.prototype._attrsAffectingSize=[],Q.prototype.on(uP,function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(sP),this._clearSelfAndDescendantCache(ZN))}),Q.prototype.on(`visibleChange.konva`,function(){this._clearSelfAndDescendantCache(lP)}),Q.prototype.on(`listeningChange.konva`,function(){this._clearSelfAndDescendantCache(tP)}),Q.prototype.on(`opacityChange.konva`,function(){this._clearSelfAndDescendantCache(XN)});var pP=Z.addGetterSetter;pP(Q,`zIndex`),pP(Q,`absolutePosition`),pP(Q,`position`),pP(Q,`x`,0,X()),pP(Q,`y`,0,X()),pP(Q,`globalCompositeOperation`,`source-over`,HN()),pP(Q,`opacity`,1,X()),pP(Q,`name`,``,HN()),pP(Q,`id`,``,HN()),pP(Q,`rotation`,0,X()),Z.addComponentsGetterSetter(Q,`scale`,[`x`,`y`]),pP(Q,`scaleX`,1,X()),pP(Q,`scaleY`,1,X()),Z.addComponentsGetterSetter(Q,`skew`,[`x`,`y`]),pP(Q,`skewX`,0,X()),pP(Q,`skewY`,0,X()),Z.addComponentsGetterSetter(Q,`offset`,[`x`,`y`]),pP(Q,`offsetX`,0,X()),pP(Q,`offsetY`,0,X()),pP(Q,`dragDistance`,void 0,X()),pP(Q,`width`,0,X()),pP(Q,`height`,0,X()),pP(Q,`listening`,!0,GN()),pP(Q,`preventDefault`,!0,GN()),pP(Q,`filters`,void 0,function(e){return this._filterUpToDate=!1,e}),pP(Q,`visible`,!0,GN()),pP(Q,`transformsEnabled`,`all`,HN()),pP(Q,`size`),pP(Q,`dragBoundFunc`),pP(Q,`draggable`,!1,GN()),Z.backCompat(Q,{rotateDeg:`rotate`,setRotationDeg:`setRotation`,getRotationDeg:`getRotation`});var mP=class extends Q{constructor(){super(...arguments),this.children=[]}getChildren(e){let t=this.children||[];return e?t.filter(e):t.slice()}hasChildren(){return this.children.length>0}removeChildren(){return this.children.forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.children.forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(let t=0;t<e.length;t++)this.add(e[t]);return this}let t=e[0];return t.getParent()?(t.moveTo(this),this):(this._validateAdd(t),t.index=this.children.length,t.parent=this,t._clearCaches(),this.children.push(t),this._fire(`add`,{child:t}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){let t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){let n=[];return this._descendants(r=>{let i=r._isMatch(e);return i&&n.push(r),!!(i&&t)}),n}_descendants(e){let t=!1;for(let n of this.children)if(t=e(n),t||n.hasChildren()&&(t=n._descendants(e),t))return!0;return!1}toObject(){let e=Q.prototype.toObject.call(this);return e.children=[],this.children.forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){let t=e.getParent();for(;t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){let t=Q.prototype.clone.call(this,e);return this.children.forEach(function(e){t.add(e.clone())}),t}getAllIntersections(e){let t=[];return this.find(`Shape`).forEach(n=>{n.isVisible()&&n.intersects(e)&&t.push(n)}),t}_clearSelfAndDescendantCache(e){var t;let n=e===`absoluteTransform`;n&&Q._absTransformCascadeDepth++;try{if(super._clearSelfAndDescendantCache(e),n&&this.isCached())return;(t=this.children)==null||t.forEach(function(t){t._clearSelfAndDescendantCache(e)})}finally{if(n&&--Q._absTransformCascadeDepth===0){let e=Q._pendingAfterCascade;if(e.length){Q._pendingAfterCascade=[];for(let t=0;t<e.length;t++)e[t]()}}}}_setChildrenIndices(){var e;(e=this.children)==null||e.forEach(function(e,t){e.index=t}),this._requestDraw()}drawScene(e,t,n){let r=this.getLayer(),i=e||r&&r.getCanvas(),a=i&&i.getContext(),o=this._getCanvasCache(),s=o&&o.scene,c=i&&i.isCache;if(!this.isVisible()&&!c)return this;if(s){a.save();let e=this.getAbsoluteTransform(t).getMatrix();a.transform(e[0],e[1],e[2],e[3],e[4],e[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren(`drawScene`,i,t,n);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;let n=this.getLayer(),r=e||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCachedHitCanvas(t);if(a){i.save();let e=this.getAbsoluteTransform(t).getMatrix();i.transform(e[0],e[1],e[2],e[3],e[4],e[5]),this._drawCachedHitCanvas(i,a),i.restore()}else this._drawChildren(`drawHit`,r,t);return this}_drawChildren(e,t,n,r){var i;let a=t&&t.getContext(),o=this.clipWidth(),s=this.clipHeight(),c=this.clipFunc(),l=typeof o==`number`&&typeof s==`number`||c,u=n===this;if(l){a.save();let e=this.getAbsoluteTransform(n),t=e.getMatrix();a.transform(t[0],t[1],t[2],t[3],t[4],t[5]),a.beginPath();let r;if(c)r=c.call(this,a,this);else{let e=this.clipX(),t=this.clipY();a.rect(e||0,t||0,o,s)}a.clip.apply(a,r),t=e.copy().invert().getMatrix(),a.transform(t[0],t[1],t[2],t[3],t[4],t[5])}let d=!u&&this.globalCompositeOperation()!==`source-over`&&e===`drawScene`;d&&(a.save(),a._applyGlobalCompositeOperation(this)),(i=this.children)==null||i.forEach(function(i){i[e](t,n,r)}),d&&a.restore(),l&&a.restore()}getClientRect(e={}){var t;let n=e.skipTransform,r=e.relativeTo,i,a,o,s,c={x:1/0,y:1/0,width:0,height:0},l=this;return(t=this.children)==null||t.forEach(function(t){if(!t.visible())return;let n=t.getClientRect({relativeTo:l,skipShadow:e.skipShadow,skipStroke:e.skipStroke});n.width===0&&n.height===0||!isFinite(n.x+n.y+n.width+n.height)||(i===void 0?(i=n.x,a=n.y,o=n.x+n.width,s=n.y+n.height):(i=Math.min(i,n.x),a=Math.min(a,n.y),o=Math.max(o,n.x+n.width),s=Math.max(s,n.y+n.height)))}),c=i===void 0?{x:0,y:0,width:0,height:0}:{x:i,y:a,width:o-i,height:s-a},n?c:this._transformedRect(c,r)}};Z.addComponentsGetterSetter(mP,`clip`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(mP,`clipX`,void 0,X()),Z.addGetterSetter(mP,`clipY`,void 0,X()),Z.addGetterSetter(mP,`clipWidth`,void 0,X()),Z.addGetterSetter(mP,`clipHeight`,void 0,X()),Z.addGetterSetter(mP,`clipFunc`);var hP=`Stage`,gP=`string`,_P=`px`,vP=`mouseout`,yP=`mouseleave`,bP=`mouseover`,xP=`mouseenter`,SP=`mousemove`,CP=`mousedown`,wP=`mouseup`,TP=`pointermove`,EP=`pointerdown`,DP=`pointerup`,OP=`pointercancel`,kP=`lostpointercapture`,AP=`pointerout`,jP=`pointerleave`,MP=`pointerover`,NP=`pointerenter`,PP=`contextmenu`,FP=`touchstart`,IP=`touchend`,LP=`touchmove`,RP=`touchcancel`,zP=`wheel`,BP=5,VP=[[xP,`_pointerenter`],[CP,`_pointerdown`],[SP,`_pointermove`],[wP,`_pointerup`],[yP,`_pointerleave`],[FP,`_pointerdown`],[LP,`_pointermove`],[IP,`_pointerup`],[RP,`_pointercancel`],[bP,`_pointerover`],[zP,`_wheel`],[PP,`_contextmenu`],[EP,`_pointerdown`],[TP,`_pointermove`],[DP,`_pointerup`],[OP,`_pointercancel`],[jP,`_pointerleave`],[kP,`_lostpointercapture`]],HP={mouse:{[AP]:vP,[jP]:yP,[MP]:bP,[NP]:xP,[TP]:SP,[EP]:CP,[DP]:wP,[OP]:`mousecancel`,pointerclick:`click`,pointerdblclick:`dblclick`},touch:{[AP]:`touchout`,[jP]:`touchleave`,[MP]:`touchover`,[NP]:`touchenter`,[TP]:LP,[EP]:FP,[DP]:IP,[OP]:RP,pointerclick:`tap`,pointerdblclick:`dbltap`},pointer:{[AP]:AP,[jP]:jP,[MP]:MP,[NP]:NP,[TP]:TP,[EP]:EP,[DP]:DP,[OP]:OP,pointerclick:`pointerclick`,pointerdblclick:`pointerdblclick`}},UP=e=>e.indexOf(`pointer`)>=0?`pointer`:e.indexOf(`touch`)>=0?`touch`:`mouse`,WP=e=>{let t=UP(e);if(t===`pointer`)return J.pointerEventsEnabled&&HP.pointer;if(t===`touch`)return HP.touch;if(t===`mouse`)return HP.mouse};function GP(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&Y.warn(`Stage does not support clipping. Please use clip for Layers or Groups.`),e}var KP=`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);`,qP=[],JP=new WeakSet,YP=e=>{e&&!JP.has(e)&&(JP.add(e),kN._listenToWindow(e),e.document.addEventListener(`visibilitychange`,()=>{qP.forEach(e=>{e.batchDraw()})}))},XP=class extends mP{constructor(e){super(GP(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),qP.push(this),this.on(`widthChange.konva heightChange.konva`,this._resizeDOM),this.on(`visibleChange.konva`,this._checkVisibility),this.on(`clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva`,()=>{GP(this.attrs)}),this._checkVisibility()}_validateAdd(e){let t=e.getType()===`Layer`,n=e.getType()===`FastLayer`;t||n||Y.throw(`You may only add layers to the stage.`)}_checkVisibility(){if(!this.content)return;let e=this.visible()?``:`none`;this.content.style.display=e}_getOwnerWindow(){return(this.content||this.container())?.ownerDocument?.defaultView||(J.isBrowser?window:null)}setContainer(e){if(typeof e===gP){let t;if(e.charAt(0)===`.`){let t=e.slice(1);e=document.getElementsByClassName(t)[0]}else t=e.charAt(0)===`#`?e.slice(1):e,e=document.getElementById(t);if(!e)throw`Can not find container in document with id `+t}return this._setAttr(`container`,e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content),YP(this._getOwnerWindow())),this}shouldDrawHit(){return!0}clear(){let e=this.children,t=e.length;for(let n=0;n<t;n++)e[n].clear();return this}clone(e){return e||={},e.container=typeof document<`u`&&document.createElement(`div`),mP.prototype.clone.call(this,e)}destroy(){super.destroy(),[`mouse`,`touch`,`pointer`].forEach(e=>{clearTimeout(this[`_`+e+`DblTimeout`]),J[`_`+e+`InDblClickWindow`]=!1});let e=this.content;e&&Y._isInDocument(e)&&this.container().removeChild(e);let t=qP.indexOf(this);return t>-1&&qP.splice(t,1),Y.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){let e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Y.warn(KP),null)}_getPointerById(e){return this._pointerPositions.find(t=>t.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e={...e},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();let t=new DN({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach(function(t){if(!t.isVisible())return;let r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio()),Y.releaseCanvas(r._canvas)}),t}getIntersection(e){if(!e)return null;let t=this.children,n=t.length-1;for(let r=n;r>=0;r--){let n=t[r].getIntersection(e);if(n)return n}return null}_resizeDOM(){let e=this.width(),t=this.height();this.content&&(this.content.style.width=e+_P,this.content.style.height=t+_P),this.children.forEach(n=>{n._setSize({width:e,height:t}),n.draw()})}_syncBufferSize(e){return e.setSizeIfChanged(this.width(),this.height()),e}add(e,...t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}super.add(e);let n=this.children.length;return n>BP&&Y.warn(`The stage has `+n+` layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.`),e._setSize({width:this.width(),height:this.height()}),e.draw(),J.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return PN(e,this)}setPointerCapture(e){FN(e,this)}releaseCapture(e){LN(e,this)}getLayers(){return this.getChildren()}_bindContentEvents(){J.isBrowser&&VP.forEach(([e,t])=>{this.content.addEventListener(e,e=>{this._batchEvents(()=>this[t](e))},{passive:!1})})}_batchEvents(e){Y._batchEvents(this.eventBatchFunc(),e)}_pointerenter(e){this.setPointersPositions(e);let t=WP(e.type);t&&this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);let t=WP(e.type);t&&this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+`targetShape`];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){let t=WP(e.type),n=UP(e.type);if(!t)return;this.setPointersPositions(e);let r=this._getTargetShape(n),i=!(J.isDragging()||J.isTransforming())||J.hitOnDragEnabled;r&&i?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+`targetShape`]=null):i&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(e){let t=WP(e.type),n=UP(e.type);if(!t)return;this.setPointersPositions(e);let r=!1;this._changedPointerPositions.forEach(i=>{let a=this.getIntersection(i);if(kN.justDragged=!1,J[`_`+n+`ListenClick`]=!0,!a||!a.isListening()){this[n+`ClickStartShape`]=void 0;return}J.capturePointerEventsEnabled&&a.setPointerCapture(i.id),this[n+`ClickStartShape`]=a,a._fireAndBubble(t.pointerdown,{evt:e,pointerId:i.id}),r=!0;let o=e.type.indexOf(`touch`)>=0;a.preventDefault()&&e.cancelable&&o&&e.preventDefault()}),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(e){let t=WP(e.type),n=UP(e.type);if(!t)return;let r=e.type.indexOf(`touch`)>=0||e.pointerType===`touch`;if(J.isDragging()&&kN.node.preventDefault()&&e.cancelable&&r&&e.preventDefault(),this.setPointersPositions(e),(J.isDragging()||J.isTransforming())&&!J.hitOnDragEnabled)return;let i={},a=!1,o=this._getTargetShape(n);this._changedPointerPositions.forEach(r=>{let s=MN(r.id)||this.getIntersection(r),c=r.id,l={evt:e,pointerId:c},u=o!==s;if(u&&o&&(o._fireAndBubble(t.pointerout,{...l},s),o._fireAndBubble(t.pointerleave,{...l},s)),s){if(i[s._id])return;i[s._id]=!0}s&&s.isListening()?(a=!0,u&&(s._fireAndBubble(t.pointerover,{...l},o),s._fireAndBubble(t.pointerenter,{...l},o),this[n+`targetShape`]=s),s._fireAndBubble(t.pointermove,{...l})):o&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:c}),this[n+`targetShape`]=null)}),a||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){let t=WP(e.type),n=UP(e.type);if(!t)return;this.setPointersPositions(e);let r=kN.justDragged||n===`pointer`&&J.isDragging(),i=J[`_`+n+`ListenClick`]&&!r,a=this[n+`ClickStartShape`],o=this[n+`ClickEndShape`],s={},c=!1;this._changedPointerPositions.forEach(l=>{let u=MN(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),s[u._id])return;s[u._id]=!0}let d=l.id,f={evt:e,pointerId:d},p=!1;J[`_`+n+`InDblClickWindow`]?(p=!0,clearTimeout(this[`_`+n+`DblTimeout`])):r||(J[`_`+n+`InDblClickWindow`]=!0,clearTimeout(this[`_`+n+`DblTimeout`])),this[`_`+n+`DblTimeout`]=setTimeout(function(){J[`_`+n+`InDblClickWindow`]=!1},J.dblClickWindow),u&&u.isListening()?(c=!0,this[n+`ClickEndShape`]=u,u._fireAndBubble(t.pointerup,{...f}),i&&a===u&&(u._fireAndBubble(t.pointerclick,{...f}),p&&o&&o===u&&u._fireAndBubble(t.pointerdblclick,{...f}))):(this[n+`ClickEndShape`]=null,c||=(this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),!0),i&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:d}),p&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:d}))}),c||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),J[`_`+n+`ListenClick`]=!1,e.cancelable&&n!==`touch`&&n!==`pointer`&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);let t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(PP,{evt:e}):this._fire(PP,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);let t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(zP,{evt:e}):this._fire(zP,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);let t=WP(e.type);this._changedPointerPositions.forEach(n=>{let r=MN(n.id)||this.getIntersection(n),i={evt:e,pointerId:n.id};r?(t&&r._fireAndBubble(t.pointercancel,{...i}),r._fireAndBubble(DP,{...i})):t&&this._fire(t.pointercancel,{...i,target:this,currentTarget:this}),LN(n.id)})}_lostpointercapture(e){LN(e.pointerId)}setPointersPositions(e){let t=this._getContentPosition(),n=null,r=null;e||=window.event,e.touches===void 0?(n=(e.clientX-t.left)/t.scaleX,r=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}]):(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))}_setPointerPosition(e){Y.warn(`Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.`),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};let e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new DN({width:0,height:0}),this.bufferHitCanvas=new ON({pixelRatio:1,width:0,height:0}),!J.isBrowser)return;let e=this.container();if(!e)throw`Stage has no container. A container is required.`;e.innerHTML=``,this.content=e.ownerDocument.createElement(`div`),this.content.style.position=`relative`,this.content.style.userSelect=`none`,this.content.className=`konvajs-content`,this.content.setAttribute(`role`,`presentation`),e.appendChild(this.content),YP(this._getOwnerWindow()),this._resizeDOM()}cache(){return Y.warn(`Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.`),this}clearCache(){return this}batchDraw(){var e;return(e=this.children)==null||e.forEach(function(e){e.batchDraw()}),this}};XP.prototype.nodeType=hP,PM(XP),Z.addGetterSetter(XP,`container`),Z.addGetterSetter(XP,`eventBatchFunc`);var ZP=`hasShadow`,QP=`hasFill`,$P=`hasStroke`,eF=`shadowRGBA`,tF=`patternImage`,nF=`linearGradient`,rF=`radialGradient`,iF;function aF(){return iF||(iF=Y.createCanvasElement().getContext(`2d`),iF)}var oF={};function sF(e){let t=this.attrs.fillRule;t?e.fill(t):e.fill()}function cF(e){e.stroke()}function lF(){this._clearCache(ZP)}function uF(){this._clearCache(QP)}function dF(){this._clearCache($P)}function fF(){this._clearCache(eF)}function pF(){this._clearCache(tF)}function mF(){this._clearCache(nF)}function hF(){this._clearCache(rF)}var $=class extends Q{constructor(e){super(e);let t,n=0;for(;t=Y.getHitColor(),!t||t in oF;)if(n++,n>=1e4){Y.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.`),t=Y.getRandomColor();break}this.colorKey=t,oF[t]=this}getContext(){return Y.warn(`shape.getContext() method is deprecated. Please do not use it.`),this.getLayer().getContext()}getCanvas(){return Y.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(ZP,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(tF,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let e=aF().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||`repeat`);if(e&&e.setTransform){let t=new LM;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(J.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let n=t.getMatrix(),r=typeof DOMMatrix>`u`?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);e.setTransform(r)}return e}}_getLinearGradient(){return this._getCache(nF,this.__getLinearGradient)}__getLinearGradient(){let e=this.fillLinearGradientColorStops();if(e){let t=aF(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=t.createLinearGradient(n.x,n.y,r.x,r.y);for(let t=0;t<e.length;t+=2)i.addColorStop(e[t],e[t+1]);return i}}_getRadialGradient(){return this._getCache(rF,this.__getRadialGradient)}__getRadialGradient(){let e=this.fillRadialGradientColorStops();if(e){let t=aF(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=t.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius());for(let t=0;t<e.length;t+=2)i.addColorStop(e[t],e[t+1]);return i}}getShadowRGBA(){return this._getCache(eF,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;let e=Y.colorToRGBA(this.shadowColor());if(e)return`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a*(this.shadowOpacity()||1)+`)`}hasFill(){return this._getCache(QP,this._hasFill)}_hasFill(){return this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops())}hasStroke(){return this._getCache($P,this._hasStroke)}_hasStroke(){return this.strokeEnabled()&&!!(this.strokeWidth()&&(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){let e=this.hitStrokeWidth();return e===`auto`?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){let t=this.getStage();if(!t)return!1;let n=t._syncBufferSize(t.bufferHitCanvas);return n.getContext().clear(),this.drawHit(n),n.context.getImageData(Math.floor(e.x),Math.floor(e.y),1,1).data[3]>0}destroy(){return Q.prototype.destroy.call(this),delete oF[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){if(!(this.attrs.perfectDrawEnabled??!0))return!1;let t=e||this.hasFill(),n=this.hasStroke(),r=this.getAbsoluteOpacity()!==1;if(t&&n&&r)return!0;let i=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(t&&n&&i&&a)}setStrokeHitEnabled(e){Y.warn(`strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.`),e?this.hitStrokeWidth(`auto`):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){let e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){let t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),i=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,a=r.width+i,o=r.height+i,s=!e.skipShadow&&this.hasShadow(),c=s?this.shadowOffsetX():0,l=s?this.shadowOffsetY():0,u=a+Math.abs(c),d=o+Math.abs(l),f=s&&this.shadowBlur()||0,p={width:u+f*2,height:d+f*2,x:-(i/2+f)+Math.min(c,0)+r.x,y:-(i/2+f)+Math.min(l,0)+r.y};return t?p:this._transformedRect(p,n)}drawScene(e,t,n){let r=this.getLayer(),i=e||r.getCanvas(),a=i.getContext(),o=this._getCanvasCache(),s=this.getSceneFunc(),c=this.hasShadow(),l,u=t===this;if(!this.isVisible()&&!u)return this;if(o){a.save();let e=this.getAbsoluteTransform(t).getMatrix();return a.transform(e[0],e[1],e[2],e[3],e[4],e[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),this._useBufferCanvas()){l=this.getStage();let e=n||l._syncBufferSize(l.bufferCanvas),r=e.getContext();n?e.width?(r.save(),r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,e.width,e.height),r.restore()):(e.setSize(i._logicalWidth,i._logicalHeight),r.translate(-e.x,-e.y)):r.clear(),r.save(),r.imageSmoothingEnabled=a.imageSmoothingEnabled,r._applyLineJoin(this),r._applyMiterLimit(this);let o=this.getAbsoluteTransform(t).getMatrix();r.transform(o[0],o[1],o[2],o[3],o[4],o[5]),s.call(this,r,this),r.restore();let d=e.pixelRatio;c&&a._applyShadow(this),u||(a._applyOpacity(this),a._applyGlobalCompositeOperation(this)),a.drawImage(e._canvas,e.x,e.y,e.width/d,e.height/d)}else{if(a._applyLineJoin(this),a._applyMiterLimit(this),!u){let e=this.getAbsoluteTransform(t).getMatrix();a.transform(e[0],e[1],e[2],e[3],e[4],e[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}c&&a._applyShadow(this),s.call(this,a,this)}return a.restore(),this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;let n=this.getLayer(),r=e||n.hitCanvas,i=r&&r.getContext(),a=this.hitFunc()||this.sceneFunc(),o=this._getCachedHitCanvas(t);if(this.colorKey||Y.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()`),o){i.save();let e=this.getAbsoluteTransform(t).getMatrix();return i.transform(e[0],e[1],e[2],e[3],e[4],e[5]),this._drawCachedHitCanvas(i,o),i.restore(),this}if(!a)return this;if(i.save(),i._applyLineJoin(this),i._applyMiterLimit(this),this!==t){let e=this.getAbsoluteTransform(t).getMatrix();i.transform(e[0],e[1],e[2],e[3],e[4],e[5])}return a.call(this,i,this),i.restore(),this}drawHitFromCache(e=0){let t=this._getCachedSceneCanvas(),n=this._getCachedHitCanvas(),r=n.getContext(),i=n.getWidth(),a=n.getHeight();r.clear(),r.drawImage(t._canvas,0,0,i/n.pixelRatio,a/n.pixelRatio);try{let t=r.getImageData(0,0,i,a),n=t.data,o=n.length,s=Y._hexToRgb(this.colorKey);for(let t=0;t<o;t+=4)n[t+3]>e?(n[t]=s.r,n[t+1]=s.g,n[t+2]=s.b,n[t+3]=255):n[t+3]=0;r.putImageData(t,0,0)}catch(e){Y.error(`Unable to draw hit graph from cached scene canvas. `+e.message)}return this}hasPointerCapture(e){return PN(e,this)}setPointerCapture(e){FN(e,this)}releaseCapture(e){LN(e,this)}};$.prototype._fillFunc=sF,$.prototype._strokeFunc=cF,$.prototype._fillFuncHit=sF,$.prototype._strokeFuncHit=cF,$.prototype._centroid=!1,$.prototype.nodeType=`Shape`,PM($),$.prototype.on(`shadowColorChange.konva shadowBlurChange.konva shadowOffsetXChange.konva shadowOffsetYChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,lF),$.prototype.on(`shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,fF),$.prototype.on(`fillEnabledChange.konva fillChange.konva fillPatternImageChange.konva fillLinearGradientColorStopsChange.konva fillRadialGradientColorStopsChange.konva`,uF),$.prototype.on(`strokeEnabledChange.konva strokeWidthChange.konva strokeChange.konva strokeLinearGradientColorStopsChange.konva`,dF),$.prototype.on(`fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva`,pF),$.prototype.on(`fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva`,mF),$.prototype.on(`fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva`,hF),Z.addGetterSetter($,`stroke`,void 0,UN()),Z.addGetterSetter($,`strokeWidth`,2,X()),Z.addGetterSetter($,`fillAfterStrokeEnabled`,!1),Z.addGetterSetter($,`hitStrokeWidth`,`auto`,VN()),Z.addGetterSetter($,`strokeHitEnabled`,!0,GN()),Z.addGetterSetter($,`perfectDrawEnabled`,!0,GN()),Z.addGetterSetter($,`shadowForStrokeEnabled`,!0,GN()),Z.addGetterSetter($,`lineJoin`),Z.addGetterSetter($,`lineCap`),Z.addGetterSetter($,`miterLimit`),Z.addGetterSetter($,`sceneFunc`),Z.addGetterSetter($,`hitFunc`),Z.addGetterSetter($,`dash`),Z.addGetterSetter($,`dashOffset`,0,X()),Z.addGetterSetter($,`shadowColor`,void 0,HN()),Z.addGetterSetter($,`shadowBlur`,0,X()),Z.addGetterSetter($,`shadowOpacity`,1,X()),Z.addComponentsGetterSetter($,`shadowOffset`,[`x`,`y`]),Z.addGetterSetter($,`shadowOffsetX`,0,X()),Z.addGetterSetter($,`shadowOffsetY`,0,X()),Z.addGetterSetter($,`fillPatternImage`),Z.addGetterSetter($,`fill`,void 0,UN()),Z.addGetterSetter($,`fillPatternX`,0,X()),Z.addGetterSetter($,`fillPatternY`,0,X()),Z.addGetterSetter($,`fillLinearGradientColorStops`),Z.addGetterSetter($,`strokeLinearGradientColorStops`),Z.addGetterSetter($,`fillRadialGradientStartRadius`,0),Z.addGetterSetter($,`fillRadialGradientEndRadius`,0),Z.addGetterSetter($,`fillRadialGradientColorStops`),Z.addGetterSetter($,`fillPatternRepeat`,`repeat`),Z.addGetterSetter($,`fillEnabled`,!0),Z.addGetterSetter($,`strokeEnabled`,!0),Z.addGetterSetter($,`shadowEnabled`,!0),Z.addGetterSetter($,`dashEnabled`,!0),Z.addGetterSetter($,`strokeScaleEnabled`,!0),Z.addGetterSetter($,`fillPriority`,`color`),Z.addComponentsGetterSetter($,`fillPatternOffset`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternOffsetX`,0,X()),Z.addGetterSetter($,`fillPatternOffsetY`,0,X()),Z.addComponentsGetterSetter($,`fillPatternScale`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternScaleX`,1,X()),Z.addGetterSetter($,`fillPatternScaleY`,1,X()),Z.addComponentsGetterSetter($,`fillLinearGradientStartPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientStartPointX`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointX`,0),Z.addGetterSetter($,`fillLinearGradientStartPointY`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillLinearGradientEndPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientEndPointX`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointX`,0),Z.addGetterSetter($,`fillLinearGradientEndPointY`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientStartPointX`,0),Z.addGetterSetter($,`fillRadialGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientEndPointX`,0),Z.addGetterSetter($,`fillRadialGradientEndPointY`,0),Z.addGetterSetter($,`fillPatternRotation`,0),Z.addGetterSetter($,`fillRule`,void 0,HN()),Z.backCompat($,{dashArray:`dash`,getDashArray:`getDash`,setDashArray:`setDash`,drawFunc:`sceneFunc`,getDrawFunc:`getSceneFunc`,setDrawFunc:`setSceneFunc`,drawHitFunc:`hitFunc`,getDrawHitFunc:`getHitFunc`,setDrawHitFunc:`setHitFunc`});var gF=`beforeDraw`,_F=`draw`,vF=10,yF=256;function bF(e,t){return e[t+3]>=128?oF[Y.getHitColorKey(e[t],e[t+1],e[t+2])]:void 0}var xF=class extends mP{constructor(e){super(e),this.canvas=new DN,this.hitCanvas=new ON({pixelRatio:1}),this._waitingForDraw=!1,this.on(`visibleChange.konva`,this._checkVisibility),this._checkVisibility(),this.on(`imageSmoothingEnabledChange.konva`,this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);let t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[e+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Q.prototype.moveToTop.call(this);let e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Q.prototype.moveUp.call(this))return!1;let e=this.getStage();return!e||!e.content?!1:(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Q.prototype.moveDown.call(this)){let e=this.getStage();if(e){let t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Q.prototype.moveToBottom.call(this)){let e=this.getStage();if(e){let t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){let e=this.getNativeCanvasElement();return Q.prototype.remove.call(this),e&&e.parentNode&&Y._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}_setSize({width:e,height:t}){return this.canvas.setSize(e,t),this._syncHitCanvasSize(),this._setSmoothEnabled(),this}_syncHitCanvasSize(){let e=this.isListening();this.hitCanvas.setSizeIfChanged((e?this.getWidth():0)||0,(e?this.getHeight():0)||0)}_validateAdd(e){let t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to a layer.`)}_toKonvaCanvas(e){return e={...e},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x===void 0?this.x():e.x,e.y=e.y===void 0?this.y():e.y,Q.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display=`block`:this.canvas._canvas.style.display=`none`}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Y.warn(`Can not change width of layer. Use "stage.width(value)" function instead.`)}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Y.warn(`Can not change height of layer. Use "stage.height(value)" function instead.`)}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Y.requestAnimFrame(()=>{this._waitingForDraw=!1,this.draw()},this.getStage()?._getOwnerWindow())),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;let t=this._getIntersection(e);if(t.shape)return t.shape;if(!t.antialiased)return null;let n=this.hitCanvas.pixelRatio,r=Math.floor(e.x*n),i=Math.floor(e.y*n),a=e=>this.hitCanvas.context.getImageData(r-e,i-e,e*2+1,e*2+1).data,o=vF,s=o*2+1,c=a(o),l=c[(o*s+o)*4+3];for(let e=1;e<=yF;e++){e>o&&(o=Math.min(yF,o*2),s=o*2+1,c=a(o));let t=0;for(let n=-e;n<=e;n++){let r=Math.abs(n)===e?1:e*2;for(let i=-e;i<=e;i+=r){let e=((n+o)*s+i+o)*4,r=bF(c,e);if(r)return r;t=Math.max(t,c[e+3])}}if(t<=l&&t!==255)return null;l=t}return null}_getIntersection(e){if(!this.hitCanvas.width||!this.hitCanvas.height)return{};let t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.floor(e.x*t),Math.floor(e.y*t),1,1).data,r=bF(n,0);return r?{shape:r}:n[3]>0?{antialiased:!0}:{}}drawScene(e,t,n){let r=this.getLayer(),i=e||r&&r.getCanvas();return this._fire(gF,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),mP.prototype.drawScene.call(this,i,t,n),this._fire(_F,{node:this}),this}shouldDrawHit(e){if(!super.shouldDrawHit(e))return!1;if(e||J.hitOnDragEnabled)return!0;let t=!1;return kN._dragElements.forEach(e=>{e.dragStatus===`dragging`&&(e.node.nodeType===`Stage`||e.node.getLayer()===this)&&(t=!0)}),!t&&!J.Transformer?._isLayerTransforming(this)}drawHit(e,t){let n=this.getLayer(),r=e||n&&n.hitCanvas;return!e&&n&&(n._syncHitCanvasSize(),n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear()),mP.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening(e)}getHitGraphEnabled(e){return Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;let e=this.parent;this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}destroy(){return Y.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};xF.prototype.nodeType=`Layer`,PM(xF),Z.addGetterSetter(xF,`imageSmoothingEnabled`,!0),Z.addGetterSetter(xF,`clearBeforeDraw`,!0),Z.addOverloadedGetterSetter(xF,`hitGraphEnabled`);var SF=class extends xF{constructor(e){super(e),this.listening(!1),Y.warn(`Konva.FastLayer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.`)}};SF.prototype.nodeType=`FastLayer`,PM(SF);var CF=class extends mP{_validateAdd(e){let t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to groups.`)}};CF.prototype.nodeType=`Group`,PM(CF);var wF=NM.performance?.now?()=>NM.performance.now():Date.now,TF=class e{constructor(t,n){this.id=e.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:wF(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(e){return this.layers=e?[].concat(e):[],this}getLayers(){return this.layers}addLayer(e){let t=this.layers,n=t.length;for(let r=0;r<n;r++)if(t[r]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){return e.animations.has(this)}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=wF(),e._addAnimation(this),this}stop(){return e._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.add(e),this._handleAnimation()}static _removeAnimation(e){this.animations.delete(e)}static _runFrames(){let e=new Set;Array.from(this.animations).forEach(t=>{this.animations.has(t)&&(t._updateFrameObject(wF()),!(t.func&&t.func.call(t,t.frame)===!1)&&t.layers.forEach(t=>t&&e.add(t)))}),e.forEach(e=>e.batchDraw())}static _animationLoop(){let t=e;t.animations.size?(t._runFrames(),Y.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,Y.requestAnimFrame(this._animationLoop))}};TF.animations=new Set,TF.animIdCounter=0,TF.animRunning=!1;var EF={node:1,duration:1,easing:1,onFinish:1,onUpdate:1,onReset:1,yoyo:1},DF=1,OF=2,kF=3,AF=[`fill`,`stroke`,`shadowColor`],jF=0;function MF(e){return Y.colorToRGBA(e)||Y.throw(`can not tween the color "`+e+`", because it is not a valid color.`)}var NF=class{constructor(e,t,n,r,i,a,o){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(e){let t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=OF,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onPlay`)}reverse(){this.state=kF,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onReverse`)}seek(e){this.pause(),this._time=e,this.update(),this.fire(`onSeek`)}reset(){this.pause(),this._time=0,this.update(),this.fire(`onReset`)}finish(){this.pause(),this._time=this.duration,this.update(),this.fire(`onFinish`)}update(){this.setPosition(this.getPosition(this._time)),this.fire(`onUpdate`)}onEnterFrame(){let e=this.getTimer()-this._startTime;this.state===OF?this.setTime(e):this.state===kF&&this.setTime(this.duration-e)}pause(){this.state=DF,this.fire(`onPause`)}getTimer(){return Date.now()}},PF=class e{constructor(t){let n=this,r=t.node,i=r._id,a=t.easing||FF.Linear,o=!!t.yoyo,s,c;s=t.duration===void 0?.3:t.duration===0?.001:t.duration,this.node=r,this._id=jF++;let l=r.getLayer()||(r instanceof J.Stage?r.getLayers():null);for(c in l||Y.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new TF(function(){n.tween.onEnterFrame()},l),this.tween=new NF(c,function(e){n._tweenFunc(e)},a,0,1,s*1e3,o),this._addListeners(),e.attrs[i]||(e.attrs[i]={}),e.attrs[i][this._id]||(e.attrs[i][this._id]={}),e.tweens[i]||(e.tweens[i]={}),t)EF[c]===void 0&&this._addAttr(c,t[c]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){if(Y._isPlainObject(n)){for(let e in n)this._addAttr(t+Y._capitalize(e),n[e]);return}let r=this.node,i=r._id,a,o,s,c,l,u=e.tweens[i][t];u!==void 0&&delete e.attrs[i][u][t];let d=r.getAttr(t);if(Y._isArray(n)){if(a=[],d=(d||[]).slice(),o=Math.max(n.length,d.length),t===`points`&&n.length!==d.length&&(n.length>d.length?(c=d,d=Y._prepareArrayForTween(d,n,r.closed())):(s=n,n=Y._prepareArrayForTween(n,d,r.closed()))),t.indexOf(`fill`)===0)for(let e=0;e<o;e++)if(e%2==0)a.push(n[e]-(d[e]||0));else{let t=MF(d[e]);l=MF(n[e]),d[e]=t,a.push({r:l.r-t.r,g:l.g-t.g,b:l.b-t.b,a:l.a-t.a})}else for(let e=0;e<o;e++)a.push(n[e]-(d[e]||0))}else AF.indexOf(t)===-1?a=n-d:(d=MF(d),l=MF(n),a={r:l.r-d.r,g:l.g-d.g,b:l.b-d.b,a:l.a-d.a});e.attrs[i][this._id][t]={start:d,diff:a,end:n,trueEnd:s,trueStart:c},e.tweens[i][t]=this._id}_tweenFunc(t){let n=this.node,r=e.attrs[n._id][this._id],i,a,o,s,c,l,u,d;for(i in r){if(a=r[i],o=a.start,s=a.diff,d=a.end,Y._isArray(o)){if(c=[],u=Math.max(o.length,d.length),i.indexOf(`fill`)===0)for(l=0;l<u;l++)l%2==0?c.push((o[l]||0)+s[l]*t):c.push(`rgba(`+Math.round(o[l].r+s[l].r*t)+`,`+Math.round(o[l].g+s[l].g*t)+`,`+Math.round(o[l].b+s[l].b*t)+`,`+(o[l].a+s[l].a*t)+`)`);else for(l=0;l<u;l++)c.push((o[l]||0)+s[l]*t)}else c=AF.indexOf(i)===-1?o+s*t:`rgba(`+Math.round(o.r+s.r*t)+`,`+Math.round(o.g+s.g*t)+`,`+Math.round(o.b+s.b*t)+`,`+(o.a+s.a*t)+`)`;n.setAttr(i,c)}}_addListeners(){let t=`destroy.konva-tween${this._id}`,n=()=>this.destroy(),r=()=>{this.node.off(t).on(t,n),this.anim.start()};this.tween.onPlay=r,this.tween.onReverse=r,this.tween.onPause=()=>{this.node.off(t),this.anim.stop()},this.tween.onFinish=()=>{let t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr(`points`,n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{let t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){let t=this.node._id,n=this._id,r=e.attrs[t]?.[n],i=e.tweens[t];if(this.pause(),this.anim&&this.anim.stop(),r){if(i){for(let e in r)delete i[e];Object.keys(i).length===0&&delete e.tweens[t]}delete e.attrs[t][n],Object.keys(e.attrs[t]).length===0&&delete e.attrs[t]}}};PF.attrs={},PF.tweens={},Q.prototype.to=function(e){let t=e.onFinish,n=new PF({...e,node:this,onFinish(){n.destroy(),t&&t()}});return n.play(),n};var FF={BackEaseIn(e,t,n,r){return n*(e/=r)*e*(2.70158*e-1.70158)+t},BackEaseOut(e,t,n,r){return n*((e=e/r-1)*e*(2.70158*e+1.70158)+1)+t},BackEaseInOut(e,t,n,r){let i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,a){let o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),-(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t)},ElasticEaseOut(e,t,n,r,i,a){let o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),i*2**(-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+n+t)},ElasticEaseInOut(e,t,n,r,i,a){let o=0;return e===0?t:(e/=r/2)==2?t+n:(a||=.3*1.5*r,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t:i*2**(-10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-FF.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?FF.BounceEaseIn(e*2,0,n,r)*.5+t:FF.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},IF=Y._assign(J,{Util:Y,Transform:LM,Node:Q,Container:mP,Stage:XP,stages:qP,Layer:xF,FastLayer:SF,Group:CF,DD:kN,Shape:$,shapes:oF,Animation:TF,Tween:PF,Easings:FF,Context:CN,Canvas:EN}),LF=class extends ${_sceneFunc(e){let t=J.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,Math.abs(this.outerRadius()),0,t,n),e.arc(0,0,Math.abs(this.innerRadius()),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return Math.abs(this.outerRadius())*2}getHeight(){return Math.abs(this.outerRadius())*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){let e=Math.abs(this.innerRadius()),t=Math.abs(this.outerRadius()),n=this.clockwise(),r=J.getAngle(this.angle());if(r%(Math.PI*2)==0)return r===0?{x:e,y:0,width:t-e,height:0}:{x:-t,y:-t,width:t*2,height:t*2};let i=J.getAngle(n?360-this.angle():this.angle()),a=Math.cos(Math.min(i,Math.PI)),o=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),s=Math.sin(Math.min(i,Math.PI/2)),c=a*(a>0?e:t),l=1*t,u=o*(o>0?e:t),d=s*(s>0?t:e);return{x:c,y:n?-1*d:u,width:l-c,height:d-u}}};LF.prototype._centroid=!0,LF.prototype.className=`Arc`,LF.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`,`angle`,`clockwise`],PM(LF),Z.addGetterSetter(LF,`innerRadius`,0,X()),Z.addGetterSetter(LF,`outerRadius`,0,X()),Z.addGetterSetter(LF,`angle`,0,X()),Z.addGetterSetter(LF,`clockwise`,!1,GN());var RF=[[],[],[-.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]],zF=[[],[],[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]],BF=[[1],[1,1],[1,2,1],[1,3,3,1]],VF=(e,t,n)=>{let r,i,a=n/2;r=0;for(let n=0;n<20;n++)i=a*RF[20][n]+a,r+=zF[20][n]*UF(e,t,i);return a*r},HF=(e,t,n)=>{n===void 0&&(n=1);let r=e[0]-2*e[1]+e[2],i=t[0]-2*t[1]+t[2],a=2*e[1]-2*e[0],o=2*t[1]-2*t[0],s=4*(r*r+i*i),c=4*(r*a+i*o),l=a*a+o*o;if(s===0)return n*Math.sqrt((e[2]-e[0])**2+(t[2]-t[0])**2);let u=c/(2*s),d=l/s,f=n+u,p=d-u*u,m=f*f+p>0?Math.sqrt(f*f+p):0,h=u*u+p>0?Math.sqrt(u*u+p):0,g=u+Math.sqrt(u*u+p)===0?0:p*Math.log(Math.abs((f+m)/(u+h)));return Math.sqrt(s)/2*(f*m-u*h+g)};function UF(e,t,n){let r=WF(1,n,e),i=WF(1,n,t),a=r*r+i*i;return Math.sqrt(a)}var WF=(e,t,n)=>{let r=n.length-1,i,a;if(r===0)return 0;if(e===0){a=0;for(let e=0;e<=r;e++)a+=BF[r][e]*(1-t)**(r-e)*t**+e*n[e];return a}i=Array(r);for(let e=0;e<r;e++)i[e]=r*(n[e+1]-n[e]);return WF(e-1,t,i)},GF=(e,t,n)=>{let r=1,i=e/t,a=(e-n(i))/t,o=0;for(;r>.001;){let s=n(i+a),c=Math.abs(e-s)/t;if(c<r)r=c,i+=a;else{let o=n(i-a),s=Math.abs(e-o)/t;s<r?(r=s,i-=a):a/=2}if(o++,o>500)break}return i},KF=(e,t,n,r)=>{let i=1-r;return i*i*e+2*i*r*t+r*r*n},qF=(e,t,n,r,i,a)=>{let o=[];for(let s of[[e,n,i],[t,r,a]]){let c=(s[0]-s[1])/(s[0]-2*s[1]+s[2]);c>0&&c<1&&o.push(KF(e,n,i,c),KF(t,r,a,c))}return o},JF=(e,t,n,r,i)=>{let a=1-i;return a*a*a*e+3*a*a*i*t+3*a*i*i*n+i*i*i*r},YF=(e,t,n,r,i,a,o,s)=>{let c=[];for(let l of[[e,n,i,o],[t,r,a,s]]){let u=-3*l[0]+9*l[1]-9*l[2]+3*l[3],d=6*l[0]-12*l[1]+6*l[2],f=-3*l[0]+3*l[1],p=d*d-4*u*f;if(p<0)continue;let m=-(d+(d<0?-1:1)*Math.sqrt(p))/2;for(let l of[m/u,f/m])l>0&&l<1&&c.push(JF(e,n,i,o,l),JF(t,r,a,s,l))}return c};function XF(e,t,n,r,i,a,o){let s=Math.sqrt((n-e)**2+(r-t)**2),c=Math.sqrt((i-n)**2+(a-r)**2),l=s+c;if(l===0)return[n,r,n,r];let u=o*s/l,d=o*c/l;return[n-u*(i-e),r-u*(a-t),n+d*(i-e),r+d*(a-t)]}function ZF(e,t){let n=e.length,r=[];for(let i=2;i<n-2;i+=2){let n=XF(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t);isNaN(n[0])||(r.push(n[0]),r.push(n[1]),r.push(e[i]),r.push(e[i+1]),r.push(n[2]),r.push(n[3]))}return r}function QF(e){let t=[];for(let n=0;n+7<e.length;n+=6)t.push(e[n+6],e[n+7],...YF(e[n],e[n+1],e[n+2],e[n+3],e[n+4],e[n+5],e[n+6],e[n+7]));return t}var $F=class extends ${constructor(e){super(e),this.on(`pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva`,function(){this._clearCache(`tensionPoints`)})}_hasTension(){return this.tension()!==0&&this.points().length>4}_eachTensionSegment(e,t){let n=this.points(),r=n.length,i=this.closed(),a=this.getTensionPoints(),o=a.length,s=n[0],c=n[1],l=i?0:4;for(i||(e(s,c,a[0],a[1],a[2],a[3]),s=a[2],c=a[3]);l<o-2;){let e=a[l++],n=a[l++],r=a[l++],i=a[l++],o=a[l++],u=a[l++];t(s,c,e,n,r,i,o,u),s=o,c=u}i||e(s,c,a[o-2],a[o-1],n[r-2],n[r-1])}_sceneFunc(e){let t=this.points(),n=t.length,r=this.closed(),i=this.bezier();if(!n)return;let a=0;if(e.beginPath(),e.moveTo(t[0],t[1]),this._hasTension())this._eachTensionSegment((t,n,r,i,a,o)=>e.quadraticCurveTo(r,i,a,o),(t,n,r,i,a,o,s,c)=>e.bezierCurveTo(r,i,a,o,s,c));else if(i)for(a=2;a<n;)e.bezierCurveTo(t[a++],t[a++],t[a++],t[a++],t[a++],t[a++]);else for(a=2;a<n;a+=2)e.lineTo(t[a],t[a+1]);r?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}getTensionPoints(){return this._getCache(`tensionPoints`,this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():ZF(this.points(),this.tension())}_getTensionPointsClosed(){let e=this.points(),t=e.length,n=this.tension(),r=XF(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),i=XF(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),a=ZF(e,n);return[r[2],r[3]].concat(a,[i[0],i[1],e[t-2],e[t-1],i[2],i[3],r[0],r[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};if(this._hasTension()){let t=[e[0],e[1]];this._eachTensionSegment((e,n,r,i,a,o)=>t.push(a,o,...qF(e,n,r,i,a,o)),(e,n,r,i,a,o,s,c)=>t.push(s,c,...YF(e,n,r,i,a,o,s,c))),e=t}else this.bezier()&&(e=[e[0],e[1],...QF(e)]);return Y._getPointsRect(e)}};$F.prototype.className=`Line`,$F.prototype._attrsAffectingSize=[`points`,`bezier`,`tension`],PM($F),Z.addGetterSetter($F,`closed`,!1),Z.addGetterSetter($F,`bezier`,!1),Z.addGetterSetter($F,`tension`,0,X()),Z.addGetterSetter($F,`points`,[],WN());var eI={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},tI=class e extends ${constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on(`dataChange.konva`,function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=e.parsePathData(this.data()),this.pathLength=e.getPathLength(this.dataArray)}_sceneFunc(e){let t=this.dataArray;e.beginPath();let n=!1;for(let r=0;r<t.length;r++){let i=t[r].command,a=t[r].points;switch(i){case`L`:e.lineTo(a[0],a[1]);break;case`M`:e.moveTo(a[0],a[1]);break;case`C`:e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case`Q`:e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case`A`:let t=a[0],r=a[1],i=a[2],o=a[3],s=a[4],c=a[5],l=a[6],u=a[7],d=i>o?i:o,f=i>o?1:i/o,p=i>o?o/i:1;e.translate(t,r),e.rotate(l),e.scale(f,p),e.arc(0,0,d,s,s+c,1-u),e.scale(1/f,1/p),e.rotate(-l),e.translate(-t,-r);break;case`z`:n=!0,e.closePath()}}!n&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=[];return this.dataArray.forEach(function(n){if(n.command===`A`){let r=n.points[4],i=n.points[5],a=n.points[4]+i,o=Math.PI/180;if(Math.abs(r-a)<o&&(o=Math.abs(r-a)),i<0)for(let i=r-o;i>a;i-=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,n.points[6]);t.push(r.x,r.y)}else for(let i=r+o;i<a;i+=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,n.points[6]);t.push(r.x,r.y)}}else n.command===`C`?t.push(n.start.x,n.start.y,n.points[4],n.points[5],...YF(n.start.x,n.start.y,n.points[0],n.points[1],n.points[2],n.points[3],n.points[4],n.points[5])):n.command===`Q`?t.push(n.start.x,n.start.y,n.points[2],n.points[3],...qF(n.start.x,n.start.y,n.points[0],n.points[1],n.points[2],n.points[3])):t=t.concat(n.points)}),Y._getPointsRect(t)}getLength(){return this.pathLength}getPointAtLength(t){return e.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}static getPathLength(e){let t=0;for(let n=0;n<e.length;++n)t+=e[n].pathLength;return t}static getPointAtLengthOfDataArray(t,n){let r,i=0,a=n.length;if(!a)return null;for(;i<a&&t>n[i].pathLength;)t-=n[i].pathLength,++i;if(i===a){for(i--;i>0&&n[i].points.length<2;)i--;t=n[i].pathLength}if(t<.01)return n[i].command===`M`?(r=n[i].points.slice(0,2),{x:r[0],y:r[1]}):{x:n[i].start.x,y:n[i].start.y};let o=n[i],s=o.points;switch(o.command){case`L`:return e.getPointOnLine(t,o.start.x,o.start.y,s[0],s[1]);case`C`:return e.getPointOnCubicBezier(GF(t,o.pathLength,e=>VF([o.start.x,s[0],s[2],s[4]],[o.start.y,s[1],s[3],s[5]],e)),o.start.x,o.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case`Q`:return e.getPointOnQuadraticBezier(GF(t,o.pathLength,e=>HF([o.start.x,s[0],s[2]],[o.start.y,s[1],s[3]],e)),o.start.x,o.start.y,s[0],s[1],s[2],s[3]);case`A`:let n=s[0],r=s[1],i=s[2],a=s[3],c=s[5],l=s[6],u=s[4];return u+=c*t/o.pathLength,e.getPointOnEllipticalArc(n,r,i,a,u,l)}return null}static getPointOnLine(e,t,n,r,i,a,o){a??=t,o??=n;let s=this.getLineLength(t,n,r,i);if(s<1e-10)return{x:t,y:n};if(r===t)return{x:a,y:o+(i>n?e:-e)};let c=(i-n)/(r-t),l=Math.sqrt(e*e/(1+c*c))*(r<t?-1:1),u=c*l;if(Math.abs(o-n-c*(a-t))<1e-10)return{x:a+l,y:o+u};let d=((a-t)*(r-t)+(o-n)*(i-n))/(s*s),f=t+d*(r-t),p=n+d*(i-n),m=this.getLineLength(a,o,f,p),h=Math.sqrt(e*e-m*m),g=Math.sqrt(h*h/(1+c*c))*(r<t?-1:1),_=c*g;return{x:f+g,y:p+_}}static getPointOnCubicBezier(e,t,n,r,i,a,o,s,c){function l(e){return e*e*e}function u(e){return 3*e*e*(1-e)}function d(e){return 3*e*(1-e)*(1-e)}function f(e){return(1-e)*(1-e)*(1-e)}return{x:s*l(e)+a*u(e)+r*d(e)+t*f(e),y:c*l(e)+o*u(e)+i*d(e)+n*f(e)}}static getPointOnQuadraticBezier(e,t,n,r,i,a,o){function s(e){return e*e}function c(e){return 2*e*(1-e)}function l(e){return(1-e)*(1-e)}return{x:a*s(e)+r*c(e)+t*l(e),y:o*s(e)+i*c(e)+n*l(e)}}static getPointOnEllipticalArc(e,t,n,r,i,a){let o=Math.cos(a),s=Math.sin(a),c={x:n*Math.cos(i),y:r*Math.sin(i)};return{x:e+(c.x*o-c.y*s),y:t+(c.x*s+c.y*o)}}static parsePathData(e){if(!e)return[];let t=e,n=[`m`,`M`,`l`,`L`,`v`,`V`,`h`,`H`,`z`,`Z`,`c`,`C`,`q`,`Q`,`t`,`T`,`s`,`S`,`a`,`A`];t=t.replace(RegExp(` `,`g`),`,`);for(let e=0;e<n.length;e++)t=t.replace(new RegExp(n[e],`g`),`|`+n[e]);let r=t.split(`|`),i=[],a=[],o=0,s=0,c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,l;for(let e=1;e<r.length;e++){let t=r[e],n=t.charAt(0);for(t=t.slice(1),a.length=0;l=c.exec(t);)a.push(l[0]);let u=[],d=n===`A`||n===`a`?0:-1;for(let e=0,t=a.length;e<t;e++){let t=a[e];for(;(d===3||d===4)&&t.length>1&&(t[0]===`0`||t[0]===`1`);)u.push(+t[0]),d++,t=t.slice(1);let n=parseFloat(t);u.push(isNaN(n)?0:n),d>=0&&(d=(d+1)%7)}for(;u.length>0&&!(u.length<eI[n.toLowerCase()]||n===`z`||n===`Z`);){let e=``,t=[],r=o,a=s,c,l,d,f,p,m,h,g,_,v;switch(n){case`l`:o+=u.shift(),s+=u.shift(),e=`L`,t.push(o,s);break;case`L`:o=u.shift(),s=u.shift(),t.push(o,s);break;case`m`:let r=u.shift(),a=u.shift();if(o+=r,s+=a,e=`M`,i.length>2&&i[i.length-1].command===`z`){for(let e=i.length-2;e>=0;e--)if(i[e].command===`M`){o=i[e].points[0]+r,s=i[e].points[1]+a;break}}t.push(o,s),n=`l`;break;case`M`:o=u.shift(),s=u.shift(),e=`M`,t.push(o,s),n=`L`;break;case`h`:o+=u.shift(),e=`L`,t.push(o,s);break;case`H`:o=u.shift(),e=`L`,t.push(o,s);break;case`v`:s+=u.shift(),e=`L`,t.push(o,s);break;case`V`:s=u.shift(),e=`L`,t.push(o,s);break;case`C`:t.push(u.shift(),u.shift(),u.shift(),u.shift()),o=u.shift(),s=u.shift(),t.push(o,s);break;case`c`:t.push(o+u.shift(),s+u.shift(),o+u.shift(),s+u.shift()),o+=u.shift(),s+=u.shift(),e=`C`,t.push(o,s);break;case`S`:l=o,d=s,c=i[i.length-1],c?.command===`C`&&(l=o+(o-c.points[2]),d=s+(s-c.points[3])),t.push(l,d,u.shift(),u.shift()),o=u.shift(),s=u.shift(),e=`C`,t.push(o,s);break;case`s`:l=o,d=s,c=i[i.length-1],c?.command===`C`&&(l=o+(o-c.points[2]),d=s+(s-c.points[3])),t.push(l,d,o+u.shift(),s+u.shift()),o+=u.shift(),s+=u.shift(),e=`C`,t.push(o,s);break;case`Q`:t.push(u.shift(),u.shift()),o=u.shift(),s=u.shift(),t.push(o,s);break;case`q`:t.push(o+u.shift(),s+u.shift()),o+=u.shift(),s+=u.shift(),e=`Q`,t.push(o,s);break;case`T`:l=o,d=s,c=i[i.length-1],c?.command===`Q`&&(l=o+(o-c.points[0]),d=s+(s-c.points[1])),o=u.shift(),s=u.shift(),e=`Q`,t.push(l,d,o,s);break;case`t`:l=o,d=s,c=i[i.length-1],c?.command===`Q`&&(l=o+(o-c.points[0]),d=s+(s-c.points[1])),o+=u.shift(),s+=u.shift(),e=`Q`,t.push(l,d,o,s);break;case`A`:case`a`:if(f=u.shift(),p=u.shift(),m=u.shift(),h=u.shift(),g=u.shift(),_=o,v=s,n===`a`?(o+=u.shift(),s+=u.shift()):(o=u.shift(),s=u.shift()),e=`A`,o===_&&s===v)continue;!f||!p?(e=`L`,t.push(o,s)):t=this.convertEndpointToCenterParameterization(_,v,o,s,h,g,f,p,m)}i.push({command:e||n,points:t,start:{x:r,y:a},pathLength:this.calcLength(r,a,e||n,t)})}(n===`z`||n===`Z`)&&i.push({command:`z`,points:[],start:void 0,pathLength:0})}return i}static calcLength(t,n,r,i){let a,o,s,c,l=e;switch(r){case`L`:return l.getLineLength(t,n,i[0],i[1]);case`C`:return VF([t,i[0],i[2],i[4]],[n,i[1],i[3],i[5]],1);case`Q`:return HF([t,i[0],i[2]],[n,i[1],i[3]],1);case`A`:a=0;let e=i[4],r=i[5],u=i[4]+r,d=Math.PI/180;if(Math.abs(e-u)<d&&(d=Math.abs(e-u)),o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],e,0),r<0)for(c=e-d;c>u;c-=d)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(c=e+d;c<u;c+=d)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),a}return 0}static convertEndpointToCenterParameterization(e,t,n,r,i,a,o,s,c){let l=Math.PI/180*c,u=Math.cos(l)*(e-n)/2+Math.sin(l)*(t-r)/2,d=-1*Math.sin(l)*(e-n)/2+Math.cos(l)*(t-r)/2,f=u*u/(o*o)+d*d/(s*s);f>1&&(o*=Math.sqrt(f),s*=Math.sqrt(f));let p=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));i===a&&(p*=-1),isNaN(p)&&(p=0);let m=p*o*d/s,h=p*-s*u/o,g=(e+n)/2+Math.cos(l)*m-Math.sin(l)*h,_=(t+r)/2+Math.sin(l)*m+Math.cos(l)*h,v=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},y=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(v(e)*v(t))},b=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(y(e,t))},x=b([1,0],[(u-m)/o,(d-h)/s]),S=[(u-m)/o,(d-h)/s],C=[(-1*u-m)/o,(-1*d-h)/s],w=b(S,C);return y(S,C)<=-1&&(w=Math.PI),y(S,C)>=1&&(w=0),a===0&&w>0&&(w-=2*Math.PI),a===1&&w<0&&(w+=2*Math.PI),[g,_,o,s,x,w,l,a]}};tI.prototype.className=`Path`,tI.prototype._attrsAffectingSize=[`data`],PM(tI),Z.addGetterSetter(tI,`data`);var nI=class extends $F{_sceneFunc(e){super._sceneFunc(e);let t=Math.PI*2,n=this.points(),r=n,i=this.tension()!==0&&n.length>4;i&&(r=this.getTensionPoints());let a=this.pointerLength(),o=n.length,s,c;if(i){let e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[o-2],n[o-1]],t=tI.calcLength(r[r.length-4],r[r.length-3],`C`,e),i=tI.getPointOnQuadraticBezier(Math.min(1,1-a/t),e[0],e[1],e[2],e[3],e[4],e[5]);s=n[o-2]-i.x,c=n[o-1]-i.y}else s=n[o-2]-n[o-4],c=n[o-1]-n[o-3];let l=(Math.atan2(c,s)+t)%t,u=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[o-2],n[o-1]),e.rotate(l),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),i?(s=(r[0]+r[2])/2-n[0],c=(r[1]+r[3])/2-n[1]):(s=n[2]-n[0],c=n[3]-n[1]),e.rotate((Math.atan2(-c,-s)+t)%t),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){let t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){let e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x,y:e.y-t,width:e.width,height:e.height+t*2}}};nI.prototype.className=`Arrow`,PM(nI),Z.addGetterSetter(nI,`pointerLength`,10,X()),Z.addGetterSetter(nI,`pointerWidth`,10,X()),Z.addGetterSetter(nI,`pointerAtBeginning`,!1),Z.addGetterSetter(nI,`pointerAtEnding`,!0);var rI=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,Math.abs(this.attrs.radius||0),0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return Math.abs(this.radius())*2}getHeight(){return Math.abs(this.radius())*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};rI.prototype._centroid=!0,rI.prototype.className=`Circle`,rI.prototype._attrsAffectingSize=[`radius`],PM(rI),Z.addGetterSetter(rI,`radius`,0,X());var iI=class extends ${_sceneFunc(e){let t=Math.abs(this.radiusX()),n=Math.abs(this.radiusY());e.beginPath(),e.ellipse(0,0,t,n,0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return Math.abs(this.radiusX())*2}getHeight(){return Math.abs(this.radiusY())*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};iI.prototype.className=`Ellipse`,iI.prototype._centroid=!0,iI.prototype._attrsAffectingSize=[`radiusX`,`radiusY`],PM(iI),Z.addComponentsGetterSetter(iI,`radius`,[`x`,`y`]),Z.addGetterSetter(iI,`radiusX`,0,X()),Z.addGetterSetter(iI,`radiusY`,0,X());var aI=class e extends ${constructor(e){super(e),this._loadListener=()=>{this._requestDraw()},this.on(`imageChange.konva`,e=>{this._removeImageLoad(e.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener(`load`,this._loadListener)}_removeImageLoad(e){e&&e.removeEventListener&&e.removeEventListener(`load`,this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){let e=!!this.cornerRadius(),t=this.hasShadow();return e&&t?!0:super._useBufferCanvas(!0)}_sceneFunc(e){let t=this.getWidth(),n=this.getHeight(),r=this.cornerRadius(),i=this.attrs.image;if((this.hasFill()||this.hasStroke()||r)&&(e.beginPath(),r?Y.drawRoundedRectPath(e,t,n,r):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),i){r&&e.clip();let a=this.attrs.cropWidth,o=this.attrs.cropHeight;a&&o?e.drawImage(i,this.cropX(),this.cropY(),a,o,0,0,t,n):e.drawImage(i,0,0,t,n)}}_hitFunc(e){let t=this.width(),n=this.height(),r=this.cornerRadius();e.beginPath(),r?Y.drawRoundedRectPath(e,t,n,r):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.attrs.width??this.image()?.width??0}getHeight(){return this.attrs.height??this.image()?.height??0}static fromURL(t,n,r=null){let i=Y.createImageElement();i.onload=function(){n(new e({image:i}))},i.onerror=r,i.crossOrigin=`Anonymous`,i.src=t}};aI.prototype.className=`Image`,aI.prototype._attrsAffectingSize=[`image`],PM(aI),Z.addGetterSetter(aI,`cornerRadius`,0,BN(4)),Z.addGetterSetter(aI,`image`),Z.addComponentsGetterSetter(aI,`crop`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(aI,`cropX`,0,X()),Z.addGetterSetter(aI,`cropY`,0,X()),Z.addGetterSetter(aI,`cropWidth`,0,X()),Z.addGetterSetter(aI,`cropHeight`,0,X());var oI=[`fontFamily`,`fontSize`,`fontStyle`,`padding`,`lineHeight`,`text`,`width`,`height`,`pointerDirection`,`pointerWidth`,`pointerHeight`],sI=`Change.konva`,cI=`none`,lI=`up`,uI=`right`,dI=`down`,fI=`left`,pI=oI.length,mI=class extends CF{constructor(e){super(e),this.on(`add.konva`,function(e){this._addListeners(e.child),this._sync()})}getText(){return this.find(`Text`)[0]}getTag(){return this.find(`Tag`)[0]}_addListeners(e){let t=this,n,r=function(){t._sync()};for(n=0;n<pI;n++)e.on(oI[n]+sI,r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let e=this.getText(),t=this.getTag(),n,r,i,a,o,s,c;if(e&&t){switch(n=e.width(),r=e.height(),i=t.pointerDirection(),a=t.pointerWidth(),c=t.pointerHeight(),o=0,s=0,i){case lI:o=n/2,s=-1*c;break;case uI:o=n+a,s=r/2;break;case dI:o=n/2,s=r+c;break;case fI:o=-1*a,s=r/2}t.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),e.setAttrs({x:-1*o,y:-1*s})}}};mI.prototype.className=`Label`,PM(mI);var hI=class extends ${_sceneFunc(e){let t=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius(),[s,c,l,u]=Y._cornerRadii(o,t,n);e.beginPath(),e.moveTo(s,0),r===lI&&(e.lineTo((t-i)/2,0),e.lineTo(t/2,-1*a),e.lineTo((t+i)/2,0)),e.lineTo(t-c,0),e.arc(t-c,c,c,Math.PI*3/2,0,!1),r===uI&&(e.lineTo(t,(n-a)/2),e.lineTo(t+i,n/2),e.lineTo(t,(n+a)/2)),e.lineTo(t,n-l),e.arc(t-l,n-l,l,0,Math.PI/2,!1),r===dI&&(e.lineTo((t+i)/2,n),e.lineTo(t/2,n+a),e.lineTo((t-i)/2,n)),e.lineTo(u,n),e.arc(u,n-u,u,Math.PI/2,Math.PI,!1),r===fI&&(e.lineTo(0,(n+a)/2),e.lineTo(-1*i,n/2),e.lineTo(0,(n-a)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){let e=0,t=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),a=this.width(),o=this.height();return i===lI?(t-=r,o+=r):i===dI?o+=r:i===fI?(e-=n,a+=n):i===uI&&(a+=n),{x:e,y:t,width:a,height:o}}};hI.prototype.className=`Tag`,PM(hI),Z.addGetterSetter(hI,`pointerDirection`,cI),Z.addGetterSetter(hI,`pointerWidth`,0,X()),Z.addGetterSetter(hI,`pointerHeight`,0,X()),Z.addGetterSetter(hI,`cornerRadius`,0,BN(4));var gI=class extends ${_sceneFunc(e){let t=this.cornerRadius(),n=this.width(),r=this.height();e.beginPath(),t?Y.drawRoundedRectPath(e,n,r,t):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}};gI.prototype.className=`Rect`,PM(gI),Z.addGetterSetter(gI,`cornerRadius`,0,BN(4));var _I=class extends ${_sceneFunc(e){let t=this._getPoints(),n=this.radius(),r=this.sides(),i=this.cornerRadius();if(t.length){if(e.beginPath(),i)Y.drawRoundedPolygonPath(e,t,r,n,i);else{e.moveTo(t[0].x,t[0].y);for(let n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y)}e.closePath(),e.fillStrokeShape(this)}}_getPoints(){let e=this.attrs.sides,t=this.attrs.radius||0,n=[];for(let r=0;r<e;r++)n.push({x:t*Math.sin(r*2*Math.PI/e),y:-1*t*Math.cos(r*2*Math.PI/e)});return n}getSelfRect(){let e=this._getPoints();if(!e.length)return{x:0,y:0,width:0,height:0};let t=e[0].x,n=e[0].x,r=e[0].y,i=e[0].y;return e.forEach(e=>{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.y)}),{x:t,y:r,width:n-t,height:i-r}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};_I.prototype.className=`RegularPolygon`,_I.prototype._centroid=!0,_I.prototype._attrsAffectingSize=[`radius`],PM(_I),Z.addGetterSetter(_I,`radius`,0,X()),Z.addGetterSetter(_I,`sides`,0,X()),Z.addGetterSetter(_I,`cornerRadius`,0,BN(4));var vI=Math.PI*2,yI=class extends ${_sceneFunc(e){let t=Math.abs(this.innerRadius()),n=Math.abs(this.outerRadius());e.beginPath(),e.arc(0,0,t,0,vI,!1),e.moveTo(n,0),e.arc(0,0,n,vI,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return Math.abs(this.outerRadius())*2}getHeight(){return Math.abs(this.outerRadius())*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};yI.prototype.className=`Ring`,yI.prototype._centroid=!0,yI.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],PM(yI),Z.addGetterSetter(yI,`innerRadius`,0,X()),Z.addGetterSetter(yI,`outerRadius`,0,X());var bI=class extends ${constructor(e){super(e),this._updated=!0,this.anim=new TF(()=>{let e=this._updated;return this._updated=!1,e}),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(){let e=this.animation(),t=this.animations()?.[e],n=this.frameIndex(),r=n*4;if(!t||!Number.isInteger(n)||r<0||r+4>t.length)return;let i=this.frameOffsets()?.[e]||[];return{x:t[r],y:t[r+1],width:t[r+2],height:t[r+3],offsetX:i[n*2]||0,offsetY:i[n*2+1]||0}}_sceneFunc(e){let t=this._getFrame();if(!t)return;let{x:n,y:r,width:i,height:a,offsetX:o,offsetY:s}=t,c=this.image();(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(o,s,i,a),e.closePath(),e.fillStrokeShape(this)),c&&e.drawImage(c,n,r,i,a,o,s,i,a)}_hitFunc(e){let{x:t,y:n,width:r,height:i}=this.getSelfRect();e.beginPath(),e.rect(t,n,r,i),e.closePath(),e.fillShape(this)}getSelfRect(){let e=this._getFrame();return e?{x:e.offsetX,y:e.offsetY,width:e.width,height:e.height}:{x:0,y:0,width:0,height:0}}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){let e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;let e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}destroy(){return this.stop(),super.destroy()}isRunning(){return this.anim.isRunning()}_updateIndex(){let e=this.frameIndex(),t=this.animations()?.[this.animation()],n=t?t.length/4:0;this.frameIndex(e<n-1?e+1:0)}};bI.prototype.className=`Sprite`,PM(bI),Z.addGetterSetter(bI,`animation`),Z.addGetterSetter(bI,`animations`),Z.addGetterSetter(bI,`frameOffsets`),Z.addGetterSetter(bI,`image`),Z.addGetterSetter(bI,`frameIndex`,0,X()),Z.addGetterSetter(bI,`frameRate`,17,X()),Z.backCompat(bI,{index:`frameIndex`,getIndex:`getFrameIndex`,setIndex:`setFrameIndex`});var xI=class extends ${_sceneFunc(e){let t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(let i=1;i<r*2;i++){let a=i%2==0?n:t,o=a*Math.sin(i*Math.PI/r),s=-1*a*Math.cos(i*Math.PI/r);e.lineTo(o,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};xI.prototype.className=`Star`,xI.prototype._centroid=!0,xI.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],PM(xI),Z.addGetterSetter(xI,`numPoints`,5,X()),Z.addGetterSetter(xI,`innerRadius`,0,X()),Z.addGetterSetter(xI,`outerRadius`,0,X());var SI=typeof Intl<`u`&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:`grapheme`}):null;function CI(e){return e/15}function wI(e){return SI?Array.from(SI.segment(e),e=>e.segment):e.match(/\p{RI}\p{RI}|\P{M}(?:\p{M}|\p{Emoji_Modifier}|\uFE0F|\u200D\P{M})*|\p{M}+/gu)||[]}var TI=`auto`,EI=`center`,DI=`inherit`,OI=`justify`,kI=`Change.konva`,AI=`2d`,jI=`-`,MI=`left`,NI=`text`,PI=`Text`,FI=`top`,II=`bottom`,LI=`middle`,RI=`normal`,zI=`px `,BI=` `,VI=`right`,HI=`rtl`,UI=`word`,WI=`char`,GI=`none`,KI=`…`,qI=[`direction`,`fontFamily`,`fontSize`,`fontStyle`,`fontVariant`,`padding`,`align`,`verticalAlign`,`lineHeight`,`text`,`width`,`height`,`wrap`,`ellipsis`,`letterSpacing`],JI=null;function YI(){if(JI!==null)return JI;JI=!1;let e;try{e=Y.createCanvasElement(),e.width=10,e.height=10;let t=e.getContext(AI);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);let e=t.getImageData(0,0,10,10).data;for(let t=3;t<e.length;t+=4)if(e[t]>0){JI=!0;break}}}catch{}finally{e&&Y.releaseCanvas(e)}return JI}function XI(e){return e.split(`,`).map(e=>{e=e.trim();let t=e.indexOf(` `)>=0,n=e.indexOf(`"`)>=0||e.indexOf(`'`)>=0;return t&&!n&&(e=`"${e}"`),e}).join(`, `)}var ZI;function QI(){return ZI||(ZI=Y.createCanvasElement().getContext(AI),ZI)}function $I(e){this._partialFillStyle&&e.setAttr(`fillStyle`,this._partialFillStyle),e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function eL(e){e.setAttr(`miterLimit`,2),this._partialStrokeStyle&&e.setAttr(`strokeStyle`,this._partialStrokeStyle),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function tL(e){return e||={},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||`black`),e}var nL=class extends ${constructor(e){super(tL(e)),this._partialTextX=0,this._partialTextY=0,this._setTextData()}_sceneFunc(e){let t=this.textArr,n=t.length;if(!this.text())return;let r=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,o=this.verticalAlign(),s=this.direction(),c=0,l=this.align(),u=this.getWidth(),d=this.letterSpacing(),f=this.charRenderFunc(),p=this.fill(),m=this.textDecoration(),h=this.underlineOffset(),g=m.indexOf(`underline`)!==-1,_=m.indexOf(`line-through`)!==-1,v;s=s===DI?e.direction:s;let y=a/2,b=LI;if(!J.legacyTextRendering){let e=this.measureSize(`M`);b=`alphabetic`,y=((e.fontBoundingBoxAscent??e.actualBoundingBoxAscent)-(e.fontBoundingBoxDescent??e.actualBoundingBoxDescent))/2+a/2}s===HI&&e.setAttr(`direction`,s),e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,b),e.setAttr(`textAlign`,MI),o===LI?c=(this.getHeight()-n*a-r*2)/2:o===II&&(c=this.getHeight()-n*a-r*2),e.translate(r,c+r);let x=f?e.fillStyle:void 0,S=f?e.strokeStyle:void 0,C=0;for(v=0;v<n;v++){let o=0,c=t[v],m=c.text,b=c.width,w=c.lastInParagraph;if(e.save(),l===VI?o+=u-b-r*2:l===EI&&(o+=(u-b-r*2)/2),g){e.save(),e.beginPath();let t=h??(J.legacyTextRendering?Math.round(i/2):Math.round(i/4)),n=o,a=y+0+t;e.moveTo(n,a);let s=l===OI&&!w?u-r*2:b;e.lineTo(n+Math.round(s),a),e.lineWidth=CI(i),e.strokeStyle=this._getLinearGradient()||p,e.stroke(),e.restore()}let T=o;if(s!==HI&&(d!==0||l===OI||f)){let t=m.split(` `).length-1,n=wI(m);for(let i=0;i<n.length;i++){let a=n[i];a===` `&&!w&&l===OI&&(o+=(u-r*2-b)/t),this._partialTextX=o,this._partialTextY=y+0,this._partialText=a;let s=e.measureText(a).width;if(f){e.save(),f({char:a,index:C,x:o,y:y+0,lineIndex:v,column:i,isLastInLine:i===n.length-1,width:s,context:e});let t=e.fillStyle;t!==x&&(this._partialFillStyle=t);let r=e.strokeStyle;r!==S&&(this._partialStrokeStyle=r)}e.fillStrokeShape(this),f&&(this._partialFillStyle=void 0,this._partialStrokeStyle=void 0,e.restore()),o+=s+d,C++}}else d!==0&&e.setAttr(`letterSpacing`,`${d}px`),this._partialTextX=o,this._partialTextY=y+0,this._partialText=m,e.fillStrokeShape(this);if(_){e.save(),e.beginPath();let t=J.legacyTextRendering?0:-Math.round(i/4),n=T;e.moveTo(n,y+0+t);let a=l===OI&&!w?u-r*2:b;e.lineTo(n+Math.round(a),y+0+t),e.lineWidth=CI(i),e.strokeStyle=this._getLinearGradient()||p,e.stroke(),e.restore()}e.restore(),n>1&&(y+=a)}}_hitFunc(e){let t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){let t=Y._isString(e)?e:e==null?``:e+``;return this._setAttr(NI,t),this}getWidth(){return this.attrs.width===TI||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===TI||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}measureSize(e){let t=QI(),n=this.fontSize(),r;t.save(),t.font=this._getContextFont(),r=t.measureText(e),t.restore();let i=n/100;return{actualBoundingBoxAscent:r.actualBoundingBoxAscent??71.58203125*i,actualBoundingBoxDescent:r.actualBoundingBoxDescent??0,actualBoundingBoxLeft:r.actualBoundingBoxLeft??-7.421875*i,actualBoundingBoxRight:r.actualBoundingBoxRight??75.732421875*i,alphabeticBaseline:r.alphabeticBaseline??0,emHeightAscent:r.emHeightAscent??100*i,emHeightDescent:r.emHeightDescent??-20*i,fontBoundingBoxAscent:r.fontBoundingBoxAscent??91*i,fontBoundingBoxDescent:r.fontBoundingBoxDescent??21*i,hangingBaseline:r.hangingBaseline??72.80000305175781*i,ideographicBaseline:r.ideographicBaseline??-21*i,width:r.width,height:n}}_getContextFont(){return this.fontStyle()+BI+this.fontVariant()+BI+(this.fontSize()+zI)+XI(this.fontFamily())}_addTextLine(e){this.align()===OI&&(e=e.trim());let t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e,t){let n=this.letterSpacing(),r=n?n*(t??wI(e).length):0;return QI().measureText(e).width+r}_setTextData(){let e=this.text().split(`
74
+ `),t=+this.fontSize(),n=0,r=this.lineHeight()*t,i=this.attrs.width,a=this.attrs.height,o=i!==TI&&i!==void 0,s=a!==TI&&a!==void 0,c=this.padding(),l=i-c*2,u=a-c*2,d=0,f=this.wrap(),p=f!==WI&&f!==GI,m=this.ellipsis();this.textArr=[],QI().font=this._getContextFont();let h=m?this._getTextWidth(KI):0;for(let t=0,i=e.length;t<i;++t){let a=e[t],c=this._getTextWidth(a);if(o&&c>l){let e=wI(a),t=e.length,i=0,o=t=>e.slice(i,t).join(``),f=e=>e===BI||e===jI,g=Math.max(1,Math.ceil(t*l/c));for(;i<t;){let a=m&&s&&d+r>u?h:0,c=0,_=e=>{let t=this._getTextWidth(o(e),e-i);return t+a>l?!1:(c=t,!0)},v=i,y=Math.min(t,i+g);for(;_(y)&&(v=y,y!==t);)y=Math.min(t,y+(y-i));for(;y-v>1;){let e=v+y>>>1;_(e)?v=e:y=e}if(v===i)break;if(v===t){this._addTextLine(o(t)),d+=r,n=Math.max(n,c);break}if(p&&!f(e[v])){let t=v-1;for(;t>=i&&!f(e[t]);)t--;t>=i&&(v=t+1,c=this._getTextWidth(o(v),v-i))}if(this._addTextLine(o(v).trimRight()),n=Math.max(n,c),d+=r,this._shouldHandleEllipsis(d)){this._tryToAddEllipsisToLastLine();break}for(i=v;i<t&&!e[i].trim();)i++}}else this._addTextLine(a),d+=r,n=Math.max(n,c),this._shouldHandleEllipsis(d)&&t<i-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),s&&d+r>u)break}this.textHeight=t,this.textWidth=n}_shouldHandleEllipsis(e){let t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,i=r!==TI&&r!==void 0,a=r-this.padding()*2;return this.wrap()===GI||i&&e+n>a}_tryToAddEllipsisToLastLine(){let e=this.attrs.width,t=e!==TI&&e!==void 0,n=e-this.padding()*2,r=this.ellipsis(),i=this.textArr[this.textArr.length-1];i&&r&&(t&&(this._getTextWidth(i.text+KI)<n||(i.text=i.text.slice(0,i.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(i.text+KI))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){let e=this.textDecoration().indexOf(`underline`)!==-1||this.textDecoration().indexOf(`line-through`)!==-1,t=this.hasShadow();return e&&t||t&&this.getAbsoluteOpacity()!==1&&YI()?!0:super._useBufferCanvas()}};nL.prototype._fillFunc=$I,nL.prototype._strokeFunc=eL,nL.prototype.className=PI,nL.prototype._attrsAffectingSize=[`text`,`fontSize`,`padding`,`wrap`,`lineHeight`,`letterSpacing`],PM(nL),nL.prototype.on(qI.map(e=>e+kI).join(` `),function(){this._setTextData()}),Z.overWriteSetter(nL,`width`,VN()),Z.overWriteSetter(nL,`height`,VN()),Z.addGetterSetter(nL,`direction`,DI),Z.addGetterSetter(nL,`fontFamily`,`Arial`),Z.addGetterSetter(nL,`fontSize`,12,X()),Z.addGetterSetter(nL,`fontStyle`,RI),Z.addGetterSetter(nL,`fontVariant`,RI),Z.addGetterSetter(nL,`padding`,0,X()),Z.addGetterSetter(nL,`align`,MI),Z.addGetterSetter(nL,`verticalAlign`,FI),Z.addGetterSetter(nL,`lineHeight`,1,X()),Z.addGetterSetter(nL,`wrap`,UI),Z.addGetterSetter(nL,`ellipsis`,!1,GN()),Z.addGetterSetter(nL,`letterSpacing`,0,X()),Z.addGetterSetter(nL,`text`,``,HN()),Z.addGetterSetter(nL,`textDecoration`,``),Z.addGetterSetter(nL,`underlineOffset`,void 0,X()),Z.addGetterSetter(nL,`charRenderFunc`,void 0);var rL=``,iL=`normal`;function aL(e){e.fillText(this.partialText,0,0)}function oL(e){e.strokeText(this.partialText,0,0)}var sL=class extends ${constructor(e){super(e),this.dataArray=[],this._readDataAttribute(),this._setTextData()}_getTextPathLength(){return tI.getPathLength(this.dataArray)}_getPointAtLength(e){return!this.attrs.data||e>this.pathLength?null:tI.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=tI.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,this.textBaseline()),e.setAttr(`textAlign`,`left`),e.save();let t=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo,a=t.indexOf(`underline`)!==-1,o=t.indexOf(`line-through`)!==-1;a&&e.beginPath();for(let t=0;t<i.length;t++){e.save();let n=i[t].p0;e.translate(n.x,n.y),e.rotate(i[t].rotation),this.partialText=i[t].text,e.fillStrokeShape(this),a&&(t===0&&e.moveTo(0,r/2+1),e.lineTo(i[t].width,r/2+1)),e.restore()}if(a&&(e.strokeStyle=n,e.lineWidth=CI(r),e.stroke()),o){e.beginPath();for(let t=0;t<i.length;t++){e.save();let n=i[t].p0;e.translate(n.x,n.y),e.rotate(i[t].rotation),t===0&&e.moveTo(0,0),e.lineTo(i[t].width,0),e.restore()}e.strokeStyle=n,e.lineWidth=CI(r),e.stroke()}e.restore()}_hitFunc(e){e.beginPath();let t=this.glyphInfo;if(t.length>=1){let n=t[0].p0;e.moveTo(n.x,n.y)}for(let n=0;n<t.length;n++){let r=t[n].p1;e.lineTo(r.x,r.y)}e.setAttr(`lineWidth`,this.fontSize()),e.setAttr(`strokeStyle`,this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}setText(e){return nL.prototype.setText.call(this,e)}_getContextFont(){return nL.prototype._getContextFont.call(this)}_getTextSize(e){let t=QI();t.save(),t.font=this._getContextFont();let n=t.measureText(e);return t.restore(),{width:n.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){let e=wI(this.text());this.direction()===`rtl`&&e.reverse();let t=[],n=0;for(let r=0;r<e.length;r++)t.push({char:e[r],width:this._getTextSize(e[r]).width}),n+=t[r].width;let{width:r,height:i}=this._getTextSize(this.attrs.text);if(this.textWidth=n,this.textHeight=i,this.glyphInfo=[],!this.attrs.data)return null;let a=this.letterSpacing(),o=this.align(),s=this.kerningFunc(),c=Math.max(0,n-r),l=Math.max(this.textWidth+(e.length-1)*a,0),u=0;o===`center`&&(u=Math.max(0,this.pathLength/2-l/2)),o===`right`&&(u=Math.max(0,this.pathLength-l));let d=u;for(let n=0;n<t.length;n++){let r=this._getPointAtLength(d);if(!r)return;let i=t[n].char,u=t[n].width+a;if(i===` `&&o===`justify`){let e=this.text().split(` `).length-1;u+=(this.pathLength-l)/e}let f=d+u,p=this._getPointAtLength(f>this.pathLength&&f-this.pathLength<=c?this.pathLength:f);if(!p)return;let m=tI.getLineLength(r.x,r.y,p.x,p.y),h=0;if(s&&n>0)try{h=s(t[n-1].char,i)*this.fontSize()}catch{h=0}r.x+=h,p.x+=h,this.textWidth+=h;let g=tI.getPointOnLine(h+m/2,r.x,r.y,p.x,p.y),_=Math.atan2(p.y-r.y,p.x-r.x);this.glyphInfo.push({transposeX:g.x,transposeY:g.y,text:e[n],rotation:_,p0:r,p1:p,width:m}),d+=u}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};let e=[];this.glyphInfo.forEach(function(t){e.push(t.p0.x),e.push(t.p0.y),e.push(t.p1.x),e.push(t.p1.y)});let t=Y._getPointsRect(e),n=this.fontSize();return{x:t.x-n/2,y:t.y-n/2,width:t.width+n,height:t.height+n}}};sL.prototype._fillFunc=aL,sL.prototype._strokeFunc=oL,sL.prototype._fillFuncHit=aL,sL.prototype._strokeFuncHit=oL,sL.prototype.className=`TextPath`,sL.prototype._attrsAffectingSize=[`text`,`fontSize`,`data`],PM(sL),sL.prototype.on(`dataChange.konva`,function(){this._readDataAttribute(),this._setTextData()}),sL.prototype.on(`textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva fontStyleChange.konva fontVariantChange.konva directionChange.konva`,function(){this._setTextData()}),Z.addGetterSetter(sL,`data`),Z.addGetterSetter(sL,`fontFamily`,`Arial`),Z.addGetterSetter(sL,`fontSize`,12,X()),Z.addGetterSetter(sL,`fontStyle`,iL),Z.addGetterSetter(sL,`align`,`left`),Z.addGetterSetter(sL,`letterSpacing`,0,X()),Z.addGetterSetter(sL,`textBaseline`,`middle`),Z.addGetterSetter(sL,`fontVariant`,iL),Z.addGetterSetter(sL,`text`,rL),Z.addGetterSetter(sL,`textDecoration`,``),Z.addGetterSetter(sL,`kerningFunc`,void 0),Z.addGetterSetter(sL,`direction`,`inherit`);var cL=`tr-konva`,lL=[`resizeEnabledChange`,`rotateAnchorOffsetChange`,`rotateAnchorAngleChange`,`rotateEnabledChange`,`enabledAnchorsChange`,`anchorSizeChange`,`borderEnabledChange`,`borderStrokeChange`,`borderStrokeWidthChange`,`borderDashChange`,`anchorStrokeChange`,`anchorStrokeWidthChange`,`anchorFillChange`,`anchorCornerRadiusChange`,`ignoreStrokeChange`,`anchorStyleFuncChange`,`paddingChange`].map(e=>e+`.${cL}`).join(` `),uL=`nodesRect`,dL=[`widthChange`,`heightChange`,`scaleXChange`,`scaleYChange`,`skewXChange`,`skewYChange`,`rotationChange`,`offsetXChange`,`offsetYChange`,`transformsEnabledChange`,`strokeWidthChange`,`draggableChange`],fL={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},pL=`ontouchstart`in J._global;function mL(e,t,n){if(e===`rotater`)return n;t+=Y.degToRad(fL[e]||0);let r=(Y.radToDeg(t)%360+360)%360;return Y._inRange(r,337.5,360)||Y._inRange(r,0,22.5)?`ns-resize`:Y._inRange(r,22.5,67.5)?`nesw-resize`:Y._inRange(r,67.5,112.5)?`ew-resize`:Y._inRange(r,112.5,157.5)?`nwse-resize`:Y._inRange(r,157.5,202.5)?`ns-resize`:Y._inRange(r,202.5,247.5)?`nesw-resize`:Y._inRange(r,247.5,292.5)?`ew-resize`:Y._inRange(r,292.5,337.5)?`nwse-resize`:(Y.error(`Transformer has unknown angle for cursor detection: `+r),`pointer`)}var hL=[`top-left`,`top-center`,`top-right`,`middle-right`,`middle-left`,`bottom-left`,`bottom-center`,`bottom-right`];function gL(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 _L(e,t,n){let r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:i}}function vL(e,t){return _L(e,t,gL(e))}function yL(e,t,n){let r=t;for(let i=0;i<e.length;i++){let a=J.getAngle(e[i]),o=Math.abs(a-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<n&&(r=a)}return r}var bL=new Set,xL=class extends CF{static _isLayerTransforming(e){for(let t of bL)if(t.getLayer()===e||t._nodes.some(t=>t.getLayer()===e))return!0;return!1}constructor(e){super(e),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(lL,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Y.warn(`tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.`),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return cL+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();let t=e.filter(e=>!e.isAncestorOf(this)||(Y.error(`Konva.Transformer cannot be an a child of the node you are trying to attach`),!1));return this._nodes=e=t,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(e=>{let t=()=>{var t;this._fitting?(t=this._nodeRectCache)==null||t.delete(e):(this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(e),this.isDragging()||this._scheduleUpdate())};if(e._attrsAffectingSize.length){let n=e._attrsAffectingSize.map(e=>e+`Change.`+this._getEventNamespace()).join(` `);e.on(n,t)}e.on(dL.map(e=>e+`.${this._getEventNamespace()}`).join(` `),t),e.on(`absoluteTransformChange.${this._getEventNamespace()}`,t),e.on(`destroy.${this._getEventNamespace()}`,()=>{this.setNodes(this._nodes.filter(t=>t!==e))}),this._proxyDrag(e)}),this._resetTransformCache(),this._elementsCreated&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,n=>{t=e.getAbsolutePosition(),!this.isDragging()&&e!==this._back&&this.startDrag(n,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!t)return;let r=e.getAbsolutePosition(),i=r.x-t.x,a=r.y-t.y;this.nodes().forEach(t=>{if(t===e||t.isDragging())return;let r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+i,y:r.y+a}),t.startDrag(n)}),t=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off(`.`+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(e){var t,n;e?(t=this._nodeRectCache)==null||t.delete(e):(n=this._nodeRectCache)==null||n.clear(),this._clearCache(uL),this._clearCache(`transform`),this._clearSelfAndDescendantCache(`absoluteTransform`)}_getNodeRect(){return this._getCache(uL,this.__getNodeRect)}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};let e=J.getAngle(this.rotation()),t=this.ignoreStroke(),n=new LM;n.rotate(-e);let r=this._nodeRectCache||=new Map,i=1/0,a=1/0,o=-1/0,s=-1/0;for(let c of this.nodes()){let l=c instanceof $&&c.getSelfRect===$.prototype.getSelfRect&&!c._hasCachedAncestor(),u=l?c.width():0,d=l?c.height():0;l&&(c._attrsVersion??=0);let f=l?r.get(c):void 0;if(!f||f.rotation!==e||f.ignoreStroke!==t||f.version!==c._attrsVersion||f.width!==u||f.height!==d){let i=c.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:t}),a=[{x:i.x,y:i.y},{x:i.x+i.width,y:i.y},{x:i.x+i.width,y:i.y+i.height},{x:i.x,y:i.y+i.height}],o=c.getAbsoluteTransform();f={rotation:e,ignoreStroke:t,width:u,height:d,version:c._attrsVersion||0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};for(let e of a){let t=n.point(o.point(e));f.minX=Math.min(f.minX,t.x),f.minY=Math.min(f.minY,t.y),f.maxX=Math.max(f.maxX,t.x),f.maxY=Math.max(f.maxY,t.y)}l&&r.set(c,f)}i=Math.min(i,f.minX),a=Math.min(a,f.minY),o=Math.max(o,f.maxX),s=Math.max(s,f.maxY)}n.invert();let c=n.point({x:i,y:a});return{x:c.x,y:c.y,width:o-i,height:s-a,rotation:J.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(),hL.forEach(e=>{this._createAnchor(e)}),this._createAnchor(`rotater`),this._elementsCreated=!0}_createAnchor(e){let t=new gI({stroke:`rgb(0, 161, 255)`,fill:`white`,strokeWidth:1,name:e+` _anchor`,dragDistance:0,draggable:!0,hitStrokeWidth:pL?10:`auto`});this._anchors[e]=t;let n=this;t.on(`mousedown touchstart`,function(e){n._handleMouseDown(e)}),t.on(`dragstart`,e=>{t.stopDrag(),e.cancelBubble=!0}),t.on(`dragend`,e=>{e.cancelBubble=!0}),t.on(`mouseenter`,()=>{let n=mL(e,J.getAngle(this.rotation()),this.rotateAnchorCursor());t.getStage().content&&(t.getStage().content.style.cursor=n),this._cursorChange=!0}),t.on(`mouseout`,()=>{t.getStage().content&&(t.getStage().content.style.cursor=``),this._cursorChange=!1}),this.add(t)}_createBack(){let e=new $({name:`back`,width:0,height:0,sceneFunc(e,t){let n=t.getParent(),r=n.padding(),i=t.width(),a=t.height();if(e.beginPath(),e.rect(-r,-r,i+r*2,a+r*2),n.rotateEnabled()&&n.rotateLineVisible()){let t=n.rotateAnchorAngle(),r=n.rotateAnchorOffset(),o=Y.degToRad(t),s=Math.sin(o),c=-Math.cos(o),l=i/2,u=a/2,d=1/0;c<0?d=Math.min(d,-u/c):c>0&&(d=Math.min(d,(a-u)/c)),s<0?d=Math.min(d,-l/s):s>0&&(d=Math.min(d,(i-l)/s));let f=l+s*d,p=u+c*d,m=Y._sign(a),h=f+s*r*m,g=p+c*r*m;e.moveTo(f,p),e.lineTo(h,g)}e.fillStrokeShape(t)},hitFunc:(e,t)=>{if(!this.shouldOverdrawWholeArea())return;let n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+n*2,t.height()+n*2),e.fillStrokeShape(t)}});this._back=e,this.add(e),this._proxyDrag(e),e.on(`dragstart`,e=>{e.cancelBubble=!0}),e.on(`dragmove`,e=>{e.cancelBubble=!0}),e.on(`dragend`,e=>{e.cancelBubble=!0}),this.on(`dragmove`,e=>{this.update()})}_handleMouseDown(e){if(this._transforming)return;this._movingAnchorName=e.target.name().split(` `)[0];let t=this._getNodeRect(),n=t.width,r=t.height,i=Math.sqrt(n**2+r**2);this.sin=Math.abs(r/i),this.cos=Math.abs(n/i);let a=this.getStage()?._getOwnerWindow();this._transformWindow=a||null,a&&(a.addEventListener(`mousemove`,this._handleMouseMove),a.addEventListener(`touchmove`,this._handleMouseMove),a.addEventListener(`mouseup`,this._handleMouseUp,!0),a.addEventListener(`touchend`,this._handleMouseUp,!0),a.addEventListener(`touchcancel`,this._handleMouseUp,!0)),this._transforming=!0,this._pointerId=e.pointerId??Y._getFirstPointerId(e.evt);let o=e.target.getAbsolutePosition(),s=e.target.getStage()._getPointerById(this._pointerId);this._anchorDragOffset={x:s.x-o.x,y:s.y-o.y},bL.add(this),this._fire(`transformstart`,{evt:e.evt,target:this.getNode()}),this._nodes.forEach(t=>{t._fire(`transformstart`,{evt:e.evt,target:t})})}_handleMouseMove(e){var t;(t=this.getStage())==null||t._batchEvents(()=>this._moveTransform(e))}_moveTransform(e){let t,n,r,i=this._anchors[this._movingAnchorName],a=i.getStage();a.setPointersPositions(e);let o=a._getPointerById(this._pointerId);if(!o)return;let s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y},c=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(c,s,e)),i.setAbsolutePosition(s);let l=i.getAbsolutePosition();if(c.x===l.x&&c.y===l.y)return;if(this._movingAnchorName===`rotater`){let r=this._getNodeRect();t=i.x()-r.width/2,n=-i.y()+r.height/2;let a=J.getAngle(this.rotateAnchorAngle()),o=Math.atan2(-n,t)+Math.PI/2-a;r.height<0&&(o-=Math.PI);let s=J.getAngle(this.rotation())+o,c=J.getAngle(this.rotationSnapTolerance()),l=vL(r,yL(this.rotationSnaps(),s,c)-r.rotation);this._fitNodesInto(l,e);return}let u=this.shiftBehavior(),d;d=u===`inverted`?this.keepRatio()&&!e.shiftKey:u===`none`?this.keepRatio():this.keepRatio()||e.shiftKey;let f=this.centeredScaling()||e.altKey,p=!1;if(this._movingAnchorName===`top-left`){if(d){p=!0;let e=f?{x:this.width()/2,y:this.height()/2}:{x:this._anchors[`bottom-right`].x(),y:this._anchors[`bottom-right`].y()};r=Math.sqrt((e.x-i.x())**2+(e.y-i.y())**2);let a=this._anchors[`top-left`].x()>e.x?-1:1,o=this._anchors[`top-left`].y()>e.y?-1:1;t=r*this.cos*a,n=r*this.sin*o,this._anchors[`top-left`].x(e.x-t),this._anchors[`top-left`].y(e.y-n)}}else if(this._movingAnchorName===`top-center`)this._anchors[`top-left`].y(i.y());else if(this._movingAnchorName===`top-right`){if(d){p=!0;let e=f?{x:this.width()/2,y:this.height()/2}:{x:this._anchors[`bottom-left`].x(),y:this._anchors[`bottom-left`].y()};r=Math.sqrt((i.x()-e.x)**2+(e.y-i.y())**2);let a=this._anchors[`top-right`].x()<e.x?-1:1,o=this._anchors[`top-right`].y()>e.y?-1:1;t=r*this.cos*a,n=r*this.sin*o,this._anchors[`top-right`].x(e.x+t),this._anchors[`top-right`].y(e.y-n)}var m=i.position();this._anchors[`top-left`].y(m.y),this._anchors[`bottom-right`].x(m.x)}else if(this._movingAnchorName===`middle-left`)this._anchors[`top-left`].x(i.x());else if(this._movingAnchorName===`middle-right`)this._anchors[`bottom-right`].x(i.x());else if(this._movingAnchorName===`bottom-left`){if(d){p=!0;let e=f?{x:this.width()/2,y:this.height()/2}:{x:this._anchors[`top-right`].x(),y:this._anchors[`top-right`].y()};r=Math.sqrt((e.x-i.x())**2+(i.y()-e.y)**2);let a=e.x<i.x()?-1:1,o=i.y()<e.y?-1:1;t=r*this.cos*a,n=r*this.sin*o,i.x(e.x-t),i.y(e.y+n)}m=i.position(),this._anchors[`top-left`].x(m.x),this._anchors[`bottom-right`].y(m.y)}else if(this._movingAnchorName===`bottom-center`)this._anchors[`bottom-right`].y(i.y());else if(this._movingAnchorName===`bottom-right`){if(d){p=!0;let e=f?{x:this.width()/2,y:this.height()/2}:{x:this._anchors[`top-left`].x(),y:this._anchors[`top-left`].y()};r=Math.sqrt((i.x()-e.x)**2+(i.y()-e.y)**2);let a=this._anchors[`bottom-right`].x()<e.x?-1:1,o=this._anchors[`bottom-right`].y()<e.y?-1:1;t=r*this.cos*a,n=r*this.sin*o,this._anchors[`bottom-right`].x(e.x+t),this._anchors[`bottom-right`].y(e.y+n)}}else console.error(Error(`Wrong position argument of selection resizer: `+this._movingAnchorName));if(f=this.centeredScaling()||e.altKey,f){let e=this._anchors[`top-left`],t=this._anchors[`bottom-right`],n=e.x(),r=e.y(),i=this.getWidth()-t.x(),a=this.getHeight()-t.y();t.move({x:-n,y:-r}),e.move({x:i,y:a})}let h=this._anchors[`top-left`].getAbsolutePosition();t=h.x,n=h.y;let g=this._anchors[`bottom-right`].x()-this._anchors[`top-left`].x(),_=this._anchors[`bottom-right`].y()-this._anchors[`top-left`].y();this._fitNodesInto({x:t,y:n,width:g,height:_,rotation:J.getAngle(this.rotation())},e,p)}_handleMouseUp(e){let t=this.getStage();t&&(t.setPointersPositions(e),!t._changedPointerPositions.some(e=>e.id===this._pointerId))||(t?t._batchEvents(()=>this._removeEvents(e)):this._removeEvents(e))}getAbsoluteTransform(e){let t=this.getTransform();return e?e.getAbsoluteTransform().copy().invert().multiply(t):t}_removeEvents(e){var t;if(this._transforming){this._transforming=!1;let n=this._transformWindow;this._transformWindow=null,n&&(n.removeEventListener(`mousemove`,this._handleMouseMove),n.removeEventListener(`touchmove`,this._handleMouseMove),n.removeEventListener(`mouseup`,this._handleMouseUp,!0),n.removeEventListener(`touchend`,this._handleMouseUp,!0),n.removeEventListener(`touchcancel`,this._handleMouseUp,!0));let r=this.getNode();bL.delete(this),this._fire(`transformend`,{evt:e,target:r}),(t=this.getLayer())==null||t.batchDraw(),r&&this._nodes.forEach(t=>{var n;t._fire(`transformend`,{evt:e,target:t}),(n=t.getLayer())==null||n.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,t,n=!1){let r=J.autoDrawEnabled;J.autoDrawEnabled=!1,this._fitting=!0;try{return this._doFitNodesInto(e,t,n)}finally{J.autoDrawEnabled=r,this._fitting=!1}}_doFitNodesInto(e,t,n=!1){let r=this._getNodeRect();if(!r.width||!r.height||Y._inRange(e.width,-this.padding()*2-1,1)||Y._inRange(e.height,-this.padding()*2-1,1)){this.update();return}let i=new LM;i.rotate(J.getAngle(this.rotation()));let a=n?0:this.padding()*2,o=null,s=null;if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`left`)>=0){let t=i.point({x:-a,y:0});e.x+=t.x,e.y+=t.y,e.width+=a,o={axis:`width`,from:`left`,to:`right`,offset:t}}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`right`)>=0){let t=i.point({x:a,y:0});e.width+=a,o={axis:`width`,from:`right`,to:`left`,offset:t}}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`top`)>=0){let t=i.point({x:0,y:-a});e.x+=t.x,e.y+=t.y,e.height+=a,s={axis:`height`,from:`top`,to:`bottom`,offset:t}}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`bottom`)>=0){let t=i.point({x:0,y:a});e.height+=a,s={axis:`height`,from:`bottom`,to:`top`,offset:t}}if(this.boundBoxFunc()){let t=this.boundBoxFunc()(r,e);t?e=t:Y.warn(`boundBoxFunc returned falsy. You should return new bound rect from it!`)}for(let t of[o,s])t&&e[t.axis]<0&&this._movingAnchorName&&(this._movingAnchorName=this._movingAnchorName.replace(t.from,t.to),this._anchorDragOffset.x-=t.offset.x,this._anchorDragOffset.y-=t.offset.y);let c=1e7,l=new LM;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/c,r.height/c);let u=new LM,d=e.width/c,f=e.height/c;this.flipEnabled()===!1?(u.translate(e.x,e.y),u.rotate(e.rotation),u.translate(e.width<0?e.width:0,e.height<0?e.height:0),u.scale(Math.abs(d),Math.abs(f))):(u.translate(e.x,e.y),u.rotate(e.rotation),u.scale(d,f));let p=u.multiply(l.invert()),m=new Set;this._nodes.forEach(e=>{if(!e.getStage())return;let t=e.getParent().getAbsoluteTransform(),n=e.getTransform().copy();n.translate(e.offsetX(),e.offsetY());let r=new LM;r.multiply(t.copy().invert()).multiply(p).multiply(t).multiply(n);let i=r.decompose();e.setAttrs(i);let a=e.getLayer();a&&m.add(a)}),this.rotation(Y._getRotation(e.rotation)),this._nodes.forEach(e=>{this._fire(`transform`,{evt:t,target:e}),e._fire(`transform`,{evt:t,target:e})}),this._resetTransformCache(),this.update(),m.add(this.getLayer()),m.forEach(e=>e&&e.batchDraw())}_scheduleUpdate(){this._updateScheduled||(this._updateScheduled=!0,Q._runAfterAbsTransformCascade(()=>{this._updateScheduled=!1,!(!this._nodes?.length||this._fitting||this.isDragging())&&this._update()}))}forceUpdate(){this._resetTransformCache(),this.update()}update(){this._lastNodeRect=void 0,this._update()}_update(){var e;let t=this._getNodeRect();this._updateElements(t);let n=this.nodes().some(e=>e.draggable());this._back.draggable()!==n&&this._back.draggable(n);let r=this.anchorStyleFunc();r&&Object.values(this._anchors).forEach(e=>r(e)),(e=this.getLayer())==null||e.batchDraw()}_updateElements(e){let t=this._lastNodeRect;if(t&&!this.anchorStyleFunc()&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height&&e.rotation===t.rotation)return;this._lastNodeRect={...e},this.rotation(Y._getRotation(e.rotation));let n=e.width,r=e.height,i=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),s=this.anchorSize();Object.values(this._anchors).forEach(e=>{e.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._anchors[`top-left`].setAttrs({x:0,y:0,offsetX:s/2+o,offsetY:s/2+o,visible:a&&i.indexOf(`top-left`)>=0}),this._anchors[`top-center`].setAttrs({x:n/2,y:0,offsetY:s/2+o,visible:a&&i.indexOf(`top-center`)>=0}),this._anchors[`top-right`].setAttrs({x:n,y:0,offsetX:s/2-o,offsetY:s/2+o,visible:a&&i.indexOf(`top-right`)>=0}),this._anchors[`middle-left`].setAttrs({x:0,y:r/2,offsetX:s/2+o,visible:a&&i.indexOf(`middle-left`)>=0}),this._anchors[`middle-right`].setAttrs({x:n,y:r/2,offsetX:s/2-o,visible:a&&i.indexOf(`middle-right`)>=0}),this._anchors[`bottom-left`].setAttrs({x:0,y:r,offsetX:s/2+o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-left`)>=0}),this._anchors[`bottom-center`].setAttrs({x:n/2,y:r,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-center`)>=0}),this._anchors[`bottom-right`].setAttrs({x:n,y:r,offsetX:s/2-o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-right`)>=0});let c=this.rotateAnchorAngle(),l=this.rotateAnchorOffset(),u=Y.degToRad(c),d=Math.sin(u),f=-Math.cos(u),p=n/2,m=r/2,h=1/0;f<0?h=Math.min(h,-m/f):f>0&&(h=Math.min(h,(r-m)/f)),d<0?h=Math.min(h,-p/d):d>0&&(h=Math.min(h,(n-p)/d));let g=p+d*h,_=m+f*h,v=Y._sign(r);this._anchors.rotater.setAttrs({x:g+d*l*v,y:_+f*l*v-o*f,visible:this.rotateEnabled()}),this._back.setAttrs({width:n,height:r,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=``),CF.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}add(...e){return this._elementsCreated?(Y.error(`You cannot add external nodes to the Transformer. Use tr.nodes([node]) instead.`),this):super.add(...e)}toObject(){return Q.prototype.toObject.call(this)}clone(e){return Q.prototype.clone.call(this,e)}getClientRect(e){return this.nodes().length>0?super.getClientRect(e):{x:0,y:0,width:0,height:0}}};xL.isTransforming=()=>bL.size>0;function SL(e){return e instanceof Array||Y.warn(`enabledAnchors value should be an array`),e instanceof Array&&e.forEach(function(e){hL.indexOf(e)===-1&&Y.warn(`Unknown anchor name: `+e+`. Available names are: `+hL.join(`, `))}),e||[]}xL.prototype.className=`Transformer`,PM(xL),Z.addGetterSetter(xL,`enabledAnchors`,hL,SL),Z.addGetterSetter(xL,`flipEnabled`,!0,GN()),Z.addGetterSetter(xL,`resizeEnabled`,!0),Z.addGetterSetter(xL,`anchorSize`,10,X()),Z.addGetterSetter(xL,`rotateEnabled`,!0),Z.addGetterSetter(xL,`rotateLineVisible`,!0),Z.addGetterSetter(xL,`rotationSnaps`,[]),Z.addGetterSetter(xL,`rotateAnchorOffset`,50,X()),Z.addGetterSetter(xL,`rotateAnchorAngle`,0,X()),Z.addGetterSetter(xL,`rotateAnchorCursor`,`crosshair`),Z.addGetterSetter(xL,`rotationSnapTolerance`,5,X()),Z.addGetterSetter(xL,`borderEnabled`,!0),Z.addGetterSetter(xL,`anchorStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(xL,`anchorStrokeWidth`,1,X()),Z.addGetterSetter(xL,`anchorFill`,`white`),Z.addGetterSetter(xL,`anchorCornerRadius`,0,X()),Z.addGetterSetter(xL,`borderStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(xL,`borderStrokeWidth`,1,X()),Z.addGetterSetter(xL,`borderDash`),Z.addGetterSetter(xL,`keepRatio`,!0),Z.addGetterSetter(xL,`shiftBehavior`,`default`),Z.addGetterSetter(xL,`centeredScaling`,!1),Z.addGetterSetter(xL,`ignoreStroke`,!1),Z.addGetterSetter(xL,`padding`,0,X()),Z.addGetterSetter(xL,`nodes`),Z.addGetterSetter(xL,`node`),Z.addGetterSetter(xL,`boundBoxFunc`),Z.addGetterSetter(xL,`anchorDragBoundFunc`),Z.addGetterSetter(xL,`anchorStyleFunc`),Z.addGetterSetter(xL,`shouldOverdrawWholeArea`,!1),Z.addGetterSetter(xL,`useSingleNodeRotation`,!0),Z.backCompat(xL,{lineEnabled:`borderEnabled`,rotateHandlerOffset:`rotateAnchorOffset`,enabledHandlers:`enabledAnchors`});var CL=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,Math.abs(this.radius()),0,J.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return Math.abs(this.radius())*2}getHeight(){return Math.abs(this.radius())*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};CL.prototype.className=`Wedge`,CL.prototype._centroid=!0,CL.prototype._attrsAffectingSize=[`radius`],PM(CL),Z.addGetterSetter(CL,`radius`,0,X()),Z.addGetterSetter(CL,`angle`,0,X()),Z.addGetterSetter(CL,`clockwise`,!1),Z.backCompat(CL,{angleDeg:`angle`,getAngleDeg:`getAngle`,setAngleDeg:`setAngle`});function wL(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var TL=[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],EL=[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 DL(e,t){return t===255?e:e*t/255}var OL=180;function kL(e,t){let n=e.data,r=e.width,i=e.height,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t+t+1,E=r-1,ee=i-1,D=t+1,O=D*(D+1)/2,te=new wL,ne=TL[t],re=EL[t],ie=null,k=te,ae=null,A=null;for(let e=1;e<T;e++)k=k.next=new wL,e===D&&(ie=k);k.next=te,s=o=0;for(let e=0;e<i;e++){g=_=v=y=c=l=u=d=0,C=n[o+3],b=DL(n[o],C),x=DL(n[o+1],C),S=DL(n[o+2],C),f=D*b,p=D*x,m=D*S,h=D*C,c+=O*b,l+=O*x,u+=O*S,d+=O*C,k=te;for(let e=0;e<D;e++)k.r=b,k.g=x,k.b=S,k.a=C,k=k.next;for(let e=1;e<D;e++)a=o+((E<e?E:e)<<2),C=n[a+3],c+=(k.r=b=DL(n[a],C))*(w=D-e),l+=(k.g=x=DL(n[a+1],C))*w,u+=(k.b=S=DL(n[a+2],C))*w,d+=(k.a=C)*w,g+=b,_+=x,v+=S,y+=C,k=k.next;ae=te,A=ie;for(let e=0;e<r;e++)n[o]=c*ne>>re,n[o+1]=l*ne>>re,n[o+2]=u*ne>>re,n[o+3]=d*ne>>re,c-=f,l-=p,u-=m,d-=h,f-=ae.r,p-=ae.g,m-=ae.b,h-=ae.a,a=s+((a=e+t+1)<E?a:E)<<2,C=n[a+3],g+=ae.r=DL(n[a],C),_+=ae.g=DL(n[a+1],C),v+=ae.b=DL(n[a+2],C),y+=ae.a=C,c+=g,l+=_,u+=v,d+=y,ae=ae.next,f+=b=A.r,p+=x=A.g,m+=S=A.b,h+=C=A.a,g-=b,_-=x,v-=S,y-=C,A=A.next,o+=4;s+=r}for(let e=0;e<r;e++){_=v=y=g=l=u=d=c=0,o=e<<2,f=D*(b=n[o]),p=D*(x=n[o+1]),m=D*(S=n[o+2]),h=D*(C=n[o+3]),c+=O*b,l+=O*x,u+=O*S,d+=O*C,k=te;for(let e=0;e<D;e++)k.r=b,k.g=x,k.b=S,k.a=C,k=k.next;let s=Math.min(1,ee)*r;for(let i=1;i<=t;i++)o=s+e<<2,c+=(k.r=b=n[o])*(w=D-i),l+=(k.g=x=n[o+1])*w,u+=(k.b=S=n[o+2])*w,d+=(k.a=C=n[o+3])*w,g+=b,_+=x,v+=S,y+=C,k=k.next,i<ee&&(s+=r);o=e,ae=te,A=ie;for(let t=0;t<i;t++)a=o<<2,n[a+3]=C=d*ne>>re,C>0?(C=255/C,n[a]=(c*ne>>re)*C,n[a+1]=(l*ne>>re)*C,n[a+2]=(u*ne>>re)*C):n[a]=n[a+1]=n[a+2]=0,c-=f,l-=p,u-=m,d-=h,f-=ae.r,p-=ae.g,m-=ae.b,h-=ae.a,a=e+((a=t+D)<ee?a:ee)*r<<2,c+=g+=ae.r=n[a],l+=_+=ae.g=n[a+1],u+=v+=ae.b=n[a+2],d+=y+=ae.a=n[a+3],ae=ae.next,f+=b=A.r,p+=x=A.g,m+=S=A.b,h+=C=A.a,g-=b,_-=x,v-=S,y-=C,A=A.next,o+=r}}var AL=function(e){let t=Math.min(Math.round(this.blurRadius()),OL);t>0&&kL(e,t)};Z.addGetterSetter(Q,`blurRadius`,0,X(),Z.afterSetFilter);var jL=function(e){let t=this.brightness()*255,n=e.data,r=n.length;for(let e=0;e<r;e+=4)n[e]+=t,n[e+1]+=t,n[e+2]+=t};Z.addGetterSetter(Q,`brightness`,0,X(),Z.afterSetFilter);var ML=function(e){let t=this.brightness(),n=e.data,r=n.length;for(let e=0;e<r;e+=4)n[e]=Math.min(255,n[e]*t),n[e+1]=Math.min(255,n[e+1]*t),n[e+2]=Math.min(255,n[e+2]*t)},NL=function(e){let t=((this.contrast()+100)/100)**2,n=e.data,r=n.length,i=150,a=150,o=150;for(let e=0;e<r;e+=4)i=n[e],a=n[e+1],o=n[e+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,i=i<0?0:i>255?255:i,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,n[e]=i,n[e+1]=a,n[e+2]=o};Z.addGetterSetter(Q,`contrast`,0,X(),Z.afterSetFilter);var PL=function(e){let t=e.data,n=e.width,r=e.height,i=Math.min(1,Math.max(0,this.embossStrength?.call(this)??.5)),a=Math.min(1,Math.max(0,this.embossWhiteLevel?.call(this)??.5)),o={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[this.embossDirection?.call(this)??`top-left`]??315,s=!!(this.embossBlend?.call(this)??!1),c=i*10,l=a*255,u=o*Math.PI/180,d=Math.cos(u),f=Math.sin(u),p=128/1020*c,m=new Uint8ClampedArray(t),h=new Float32Array(n*r);for(let e=0,n=0;n<t.length;n+=4,e++)h[e]=.2126*m[n]+.7152*m[n+1]+.0722*m[n+2];let g=[-1,0,1,-2,0,2,-1,0,1],_=[-1,-2,-1,0,0,0,1,2,1],v=[-n-1,-n,-n+1,-1,0,1,n-1,n,n+1],y=e=>e<0?0:e>255?255:e;for(let e=1;e<r-1;e++)for(let r=1;r<n-1;r++){let i=e*n+r,a=0,o=0;a+=h[i+v[0]]*g[0],o+=h[i+v[0]]*_[0],a+=h[i+v[1]]*g[1],o+=h[i+v[1]]*_[1],a+=h[i+v[2]]*g[2],o+=h[i+v[2]]*_[2],a+=h[i+v[3]]*g[3],o+=h[i+v[3]]*_[3],a+=h[i+v[5]]*g[5],o+=h[i+v[5]]*_[5],a+=h[i+v[6]]*g[6],o+=h[i+v[6]]*_[6],a+=h[i+v[7]]*g[7],o+=h[i+v[7]]*_[7],a+=h[i+v[8]]*g[8],o+=h[i+v[8]]*_[8];let c=y(l+(d*a+f*o)*p),u=i*4;if(s){let e=c-l;t[u]=y(m[u]+e),t[u+1]=y(m[u+1]+e),t[u+2]=y(m[u+2]+e),t[u+3]=m[u+3]}else t[u]=t[u+1]=t[u+2]=c,t[u+3]=m[u+3]}for(let e=0;e<n;e++){let i=e*4,a=((r-1)*n+e)*4;t[i]=m[i],t[i+1]=m[i+1],t[i+2]=m[i+2],t[i+3]=m[i+3],t[a]=m[a],t[a+1]=m[a+1],t[a+2]=m[a+2],t[a+3]=m[a+3]}for(let e=1;e<r-1;e++){let r=e*n*4,i=(e*n+(n-1))*4;t[r]=m[r],t[r+1]=m[r+1],t[r+2]=m[r+2],t[r+3]=m[r+3],t[i]=m[i],t[i+1]=m[i+1],t[i+2]=m[i+2],t[i+3]=m[i+3]}return e};Z.addGetterSetter(Q,`embossStrength`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`embossWhiteLevel`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`embossDirection`,`top-left`,void 0,Z.afterSetFilter),Z.addGetterSetter(Q,`embossBlend`,!1,void 0,Z.afterSetFilter);function FL(e,t,n,r,i){let a=n-t,o=i-r;if(a===0)return r+o/2;if(o===0)return r;let s=(e-t)/a;return s=o*s+r,s}var IL=function(e){let t=e.data,n=t.length,r=t[0],i=r,a,o=t[1],s=o,c,l=t[2],u=l,d,f=this.enhance();if(f===0)return;for(let e=0;e<n;e+=4)a=t[e+0],a<r?r=a:a>i&&(i=a),c=t[e+1],c<o?o=c:c>s&&(s=c),d=t[e+2],d<l?l=d:d>u&&(u=d);i===r&&(i=255,r=0),s===o&&(s=255,o=0),u===l&&(u=255,l=0);let p,m,h,g,_,v;if(f>0)p=i+f*(255-i),m=r-f*(r-0),h=s+f*(255-s),g=o-f*(o-0),_=u+f*(255-u),v=l-f*(l-0);else{let e=(i+r)*.5;p=i+f*(i-e),m=r+f*(r-e);let t=(s+o)*.5;h=s+f*(s-t),g=o+f*(o-t);let n=(u+l)*.5;_=u+f*(u-n),v=l+f*(l-n)}for(let e=0;e<n;e+=4)t[e+0]=FL(t[e+0],r,i,m,p),t[e+1]=FL(t[e+1],o,s,g,h),t[e+2]=FL(t[e+2],l,u,v,_)};Z.addGetterSetter(Q,`enhance`,0,X(),Z.afterSetFilter);var LL=function(e){let t=e.data,n=t.length;for(let e=0;e<n;e+=4){let n=.34*t[e]+.5*t[e+1]+.16*t[e+2];t[e]=n,t[e+1]=n,t[e+2]=n}};Z.addGetterSetter(Q,`hue`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`saturation`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`luminance`,0,X(),Z.afterSetFilter);var RL=function(e){let t=e.data,n=t.length,r=2**this.saturation(),i=(this.hue()%360+360)%360,a=this.luminance()*127,o=1*r*Math.cos(i*Math.PI/180),s=1*r*Math.sin(i*Math.PI/180),c=.299+.701*o+.168*s,l=.587-.587*o+.33*s,u=.114-.114*o-.497*s,d=.299-.299*o-.328*s,f=.587+.413*o+.035*s,p=.114-.114*o+.292*s,m=.299-.3*o+1.25*s,h=.587-.588*o-1.05*s,g=.114+.886*o-.203*s,_,v,y,b;for(let e=0;e<n;e+=4)_=t[e+0],v=t[e+1],y=t[e+2],b=t[e+3],t[e+0]=c*_+l*v+u*y+a,t[e+1]=d*_+f*v+p*y+a,t[e+2]=m*_+h*v+g*y+a,t[e+3]=b},zL=function(e){let t=e.data,n=t.length,r=2**this.value(),i=2**this.saturation(),a=(this.hue()%360+360)%360,o=r*i*Math.cos(a*Math.PI/180),s=r*i*Math.sin(a*Math.PI/180),c=.299*r+.701*o+.168*s,l=.587*r-.587*o+.33*s,u=.114*r-.114*o-.497*s,d=.299*r-.299*o-.328*s,f=.587*r+.413*o+.035*s,p=.114*r-.114*o+.292*s,m=.299*r-.3*o+1.25*s,h=.587*r-.588*o-1.05*s,g=.114*r+.886*o-.203*s;for(let e=0;e<n;e+=4){let n=t[e+0],r=t[e+1],i=t[e+2],a=t[e+3];t[e+0]=c*n+l*r+u*i,t[e+1]=d*n+f*r+p*i,t[e+2]=m*n+h*r+g*i,t[e+3]=a}};Z.addGetterSetter(Q,`hue`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`saturation`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`value`,0,X(),Z.afterSetFilter);var BL=function(e){let t=e.data,n=t.length;for(let e=0;e<n;e+=4)t[e]=255-t[e],t[e+1]=255-t[e+1],t[e+2]=255-t[e+2]},VL=function(e,t,n){let r=e.data,i=t.data,a=e.width,o=e.height,s=n.polarCenterX||a/2,c=n.polarCenterY||o/2,l=Math.sqrt(s*s+c*c),u=a-s,d=o-c,f=Math.sqrt(u*u+d*d);l=f>l?f:l;let p=o,m=a,h=360/m*Math.PI/180;for(let e=0;e<m;e+=1){let t=Math.sin(e*h),n=Math.cos(e*h);for(let o=0;o<p;o+=1){u=Math.floor(s+l*o/p*n),d=Math.floor(c+l*o/p*t);let f=(d*a+u)*4,m=r[f+0],h=r[f+1],g=r[f+2],_=r[f+3];f=(e+o*a)*4,i[f+0]=m,i[f+1]=h,i[f+2]=g,i[f+3]=_}}},HL=function(e,t,n){let r=e.data,i=t.data,a=e.width,o=e.height,s=n.polarCenterX||a/2,c=n.polarCenterY||o/2,l=Math.sqrt(s*s+c*c),u=a-s,d=o-c,f=Math.sqrt(u*u+d*d);l=f>l?f:l;let p=o,m=a,h=n.polarRotation||0,g,_;for(u=0;u<a;u+=1)for(d=0;d<o;d+=1){let e=u-s,t=d-c,n=Math.sqrt(e*e+t*t)*p/l,o=(Math.atan2(t,e)*180/Math.PI+360+h)%360;o=o*m/360,g=Math.floor(o),_=Math.floor(n);let f=(_*a+g)*4,v=r[f+0],y=r[f+1],b=r[f+2],x=r[f+3];f=(d*a+u)*4,i[f+0]=v,i[f+1]=y,i[f+2]=b,i[f+3]=x}},UL=function(e){let t=e.width,n=e.height,r,i,a,o,s,c,l,u,d,f,p=Math.round(this.kaleidoscopePower()),m=Math.round(this.kaleidoscopeAngle()),h=Math.floor(m%360*t/360);if(p<1)return;let g=Y.createCanvasElement();g.width=t,g.height=n;let _=g.getContext(`2d`).getImageData(0,0,t,n);Y.releaseCanvas(g),VL(e,_,{polarCenterX:t/2,polarCenterY:n/2});let v=t/2**p;for(;v<=8;)v*=2,--p;v=Math.ceil(v);let y=v,b=0,x=y,S=1;for(h+v>t&&(b=y,x=0,S=-1),i=0;i<n;i+=1)for(r=b;r!==x;r+=S)a=Math.round(r+h)%t,d=(t*i+a)*4,s=_.data[d+0],c=_.data[d+1],l=_.data[d+2],u=_.data[d+3],f=(t*i+r)*4,_.data[f+0]=s,_.data[f+1]=c,_.data[f+2]=l,_.data[f+3]=u;for(i=0;i<n;i+=1)for(y=Math.floor(v),o=0;o<p;o+=1){for(r=0;r<y+1;r+=1)d=(t*i+r)*4,s=_.data[d+0],c=_.data[d+1],l=_.data[d+2],u=_.data[d+3],f=(t*i+y*2-r-1)*4,_.data[f+0]=s,_.data[f+1]=c,_.data[f+2]=l,_.data[f+3]=u;y*=2}HL(_,e,{polarRotation:0})};Z.addGetterSetter(Q,`kaleidoscopePower`,2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`kaleidoscopeAngle`,0,X(),Z.afterSetFilter);function WL(e,t,n){let r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function GL(e,t){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2)}function KL(e){let t=[0,0,0];for(let n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function qL(e,t){let n=WL(e,0,0),r=WL(e,e.width-1,0),i=WL(e,0,e.height-1),a=WL(e,e.width-1,e.height-1),o=t||10;if(GL(n,r)<o&&GL(r,a)<o&&GL(a,i)<o&&GL(i,n)<o){let t=KL([r,n,a,i]),s=[];for(let n=0;n<e.width*e.height;n++){let r=GL(t,[e.data[n*4],e.data[n*4+1],e.data[n*4+2]]);s[n]=r<o?0:255}return s}}function JL(e,t){for(let n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function YL(e,t,n){let r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[];for(let s=0;s<n;s++)for(let c=0;c<t;c++){let l=s*t+c,u=0;for(let o=0;o<i;o++)for(let l=0;l<i;l++){let d=s+o-a,f=c+l-a;if(d>=0&&d<n&&f>=0&&f<t){let n=d*t+f,a=r[o*i+l];u+=e[n]*a}}o[l]=u===2040?255:0}return o}function XL(e,t,n){let r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[];for(let s=0;s<n;s++)for(let c=0;c<t;c++){let l=s*t+c,u=0;for(let o=0;o<i;o++)for(let l=0;l<i;l++){let d=s+o-a,f=c+l-a;if(d>=0&&d<n&&f>=0&&f<t){let n=d*t+f,a=r[o*i+l];u+=e[n]*a}}o[l]=u>=1020?255:0}return o}function ZL(e,t,n){let r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[];for(let s=0;s<n;s++)for(let c=0;c<t;c++){let l=s*t+c,u=0;for(let o=0;o<i;o++)for(let l=0;l<i;l++){let d=s+o-a,f=c+l-a;if(d>=0&&d<n&&f>=0&&f<t){let n=d*t+f,a=r[o*i+l];u+=e[n]*a}}o[l]=u}return o}var QL=function(e){let t=qL(e,this.threshold());return t&&(t=YL(t,e.width,e.height),t=XL(t,e.width,e.height),t=ZL(t,e.width,e.height),JL(e,t)),e};Z.addGetterSetter(Q,`threshold`,0,X(),Z.afterSetFilter);var $L=function(e){let t=this.noise()*255,n=e.data,r=n.length,i=t/2;for(let e=0;e<r;e+=4)n[e+0]+=i-2*i*Math.random(),n[e+1]+=i-2*i*Math.random(),n[e+2]+=i-2*i*Math.random()};Z.addGetterSetter(Q,`noise`,.2,X(),Z.afterSetFilter);var eR=function(e){let t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i=Math.ceil(n/t),a=Math.ceil(r/t),o=e.data;if(t<=0)Y.error(`pixelSize value can not be <= 0`);else for(let e=0;e<i;e+=1)for(let i=0;i<a;i+=1){let a=0,s=0,c=0,l=0,u=e*t,d=u+t,f=i*t,p=f+t,m=0;for(let e=u;e<d;e+=1)if(!(e>=n))for(let t=f;t<p;t+=1){if(t>=r)continue;let i=(n*t+e)*4;a+=o[i+0],s+=o[i+1],c+=o[i+2],l+=o[i+3],m+=1}a/=m,s/=m,c/=m,l/=m;for(let e=u;e<d;e+=1)if(!(e>=n))for(let t=f;t<p;t+=1){if(t>=r)continue;let i=(n*t+e)*4;o[i+0]=a,o[i+1]=s,o[i+2]=c,o[i+3]=l}}};Z.addGetterSetter(Q,`pixelSize`,8,X(),Z.afterSetFilter);var tR=function(e){let t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t;for(let e=0;e<r;e+=1)n[e]=Math.floor(n[e]/i)*i};Z.addGetterSetter(Q,`levels`,.5,X(),Z.afterSetFilter);var nR=function(e){let t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue();for(let e=0;e<n;e+=4){let n=(.34*t[e]+.5*t[e+1]+.16*t[e+2])/255;t[e]=n*r,t[e+1]=n*i,t[e+2]=n*a,t[e+3]=t[e+3]}};Z.addGetterSetter(Q,`red`,0,zN,Z.afterSetFilter),Z.addGetterSetter(Q,`green`,0,zN,Z.afterSetFilter),Z.addGetterSetter(Q,`blue`,0,zN,Z.afterSetFilter);var rR=function(e){let t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue(),o=this.alpha();for(let e=0;e<n;e+=4){let n=1-o;t[e]=r*o+t[e]*n,t[e+1]=i*o+t[e+1]*n,t[e+2]=a*o+t[e+2]*n}};Z.addGetterSetter(Q,`alpha`,1,e=>Math.min(1,Math.max(0,e)),Z.afterSetFilter);var iR=function(e){let t=e.data,n=t.length;for(let e=0;e<n;e+=4){let n=t[e+0],r=t[e+1],i=t[e+2];t[e+0]=Math.min(255,n*.393+r*.769+i*.189),t[e+1]=Math.min(255,n*.349+r*.686+i*.168),t[e+2]=Math.min(255,n*.272+r*.534+i*.131)}},aR=function(e){let t=e.data;for(let e=0;e<t.length;e+=4){let n=t[e],r=t[e+1],i=t[e+2];.2126*n+.7152*r+.0722*i>=128&&(t[e]=255-n,t[e+1]=255-r,t[e+2]=255-i)}return e},oR=function(e){let t=this.threshold()*255,n=e.data,r=n.length;for(let e=0;e<r;e+=1)n[e]=n[e]<t?0:255};Z.addGetterSetter(Q,`threshold`,.5,X(),Z.afterSetFilter);var sR=IF.Util._assign(IF,{Arc:LF,Arrow:nI,Circle:rI,Ellipse:iI,Image:aI,Label:mI,Tag:hI,Line:$F,Path:tI,Rect:gI,RegularPolygon:_I,Ring:yI,Sprite:bI,Star:xI,Text:nL,TextPath:sL,Transformer:xL,Wedge:CL,Filters:{Blur:AL,Brightness:ML,Brighten:jL,Contrast:NL,Emboss:PL,Enhance:IL,Grayscale:LL,HSL:RL,HSV:zL,Invert:BL,Kaleidoscope:UL,Mask:QL,Noise:$L,Pixelate:eR,Posterize:tR,RGB:nR,RGBA:rR,Sepia:iR,Solarize:aR,Threshold:oR}});function cR(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}var lR=e=>typeof e==`object`&&!!e&&typeof e.x==`number`&&typeof e.width==`number`;function uR(e,t){let n=t?cR(e.frame,t.path):void 0;if(typeof n!=`object`||!n)return;let{rotation:r}=n;return r===90||r===180||r===270?r:void 0}var dR=e=>e!==`collectorInfo`;function fR(e,t){let n=cR(e.frame,t.path);return typeof n!=`object`||!n?[]:Object.entries(n).filter(([,e])=>lR(e)).map(([e,t])=>({key:e,box:t}))}function pR(e,t,n){let r=cR(e.frame,t.path);if(typeof r!=`object`||!r)return[];let i=jj(r,n);return Object.entries(i).filter(([,e])=>lR(e)).map(([e,t])=>({key:e,box:t}))}function mR(e,t){let n=t?cR(e.frame,t.path):void 0;return typeof n==`object`&&n?n:void 0}function hR(e){let t=new Map;for(let n of e.slots){let e=t.get(n.variant)??new Set;e.add(n.layout),t.set(n.variant,e)}return[...t.entries()].sort((e,t)=>(e[0]??``).localeCompare(t[0]??``)).map(([e,t])=>({variant:e,layouts:[...t].sort()}))}function gR(e,t){let n=cR(e.frame,t.path);if(typeof n!=`object`||!n)return[];let r=[],i=(e,t)=>{if(typeof e==`string`)e.startsWith(`/api/asset`)&&r.push({label:t,url:e});else if(typeof e==`object`&&e)for(let[n,r]of Object.entries(e))i(r,t?`${t}.${n}`:n)};return i(n,``),r}var _R=12;function vR(e,t,n){let r=e===`x`?t.width:t.height,i=[144,r-144,r/2];for(let t of n){let n=e===`x`?t.x:t.y,r=e===`x`?t.width:t.height;i.push(n,n+r,n+r/2)}return i}function yR(e,t,n){let r=[],i={...e};for(let a of[`x`,`y`]){let o=vR(a,t,n),s=a===`x`?e.x:e.y,c=a===`x`?e.width:e.height,l;for(let e of[s,s+c,s+c/2])for(let t of o){let n=t-e;Math.abs(n)<=_R&&(!l||Math.abs(n)<Math.abs(l.delta))&&(l={delta:n,at:t})}l&&(r.push({axis:a,at:l.at}),a===`x`?i.x=Math.round(e.x+l.delta):i.y=Math.round(e.y+l.delta))}return{bounds:i,guides:r}}var bR=96/72,xR=e=>e*bR,SR=[`title`,`type`,`nicknameTitle`,`pt`,`defense`],CR=e=>SR.includes(e),wR=new URL(`PlantinMTProRgIt-D0FB51kb.woff2`,import.meta.url).href,TR=new URL(`beleren-b-B3lFvodX.ttf`,import.meta.url).href,ER=new URL(`beleren-bsc-yvL6mU7X.ttf`,import.meta.url).href,DR=[{family:`Beleren`,url:TR,weight:`bold`,style:`normal`},{family:`Beleren Small Caps`,url:ER,weight:`bold`,style:`normal`},{family:`Plantin MT Pro`,url:wR,weight:`normal`,style:`italic`}],OR=DR.map(e=>e.family),kR=`serif`,AR;function jR(){return AR??=(async()=>{await Promise.all(DR.map(async({family:e,url:t,weight:n,style:r})=>{let i=new FontFace(e,`url(${t})`,{weight:n,style:r});document.fonts.add(await i.load())})),await document.fonts.ready})(),AR}function MR(e){return OR.includes(e)?{family:e,substituted:!1}:{family:kR,substituted:!0}}function NR(e){let t={...e,fontSize:e.fontSize??0},n=mM(t),r=hM(t);return{...n?{stroke:n.color,strokeWidth:n.width,fillAfterStrokeEnabled:!0,lineJoin:`round`}:{},...r?{shadowEnabled:!0,shadowColor:r.color,shadowOffsetX:r.offsetX,shadowOffsetY:r.offsetY,shadowBlur:0}:{}}}var PR={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},defense:{family:`Beleren Small Caps`,fontStyle:`bold`,align:`center`,honoursFontFamily:!1}};function FR(e,t){let n=PR[e],{family:r,substituted:i}=MR(n.honoursFontFamily&&t.fontFamily!==void 0?t.fontFamily:n.family);return{family:r,fontStyle:n.fontStyle,align:t.textAlign??n.align,substituted:i}}var IR;function LR(){if(!IR){let e=document.createElement(`canvas`).getContext(`2d`);if(!e)throw Error(`could not create a 2d context for measuring`);IR=e}return IR}function RR(e,t,n){let{family:r,fontStyle:i}=FR(e,n),a=LR();return a.font=`${i} ${String(xR(n.fontSize??0))}px "${r}"`,a.measureText(t).width}function zR(e,t,n){let{family:r,fontStyle:i,align:a,substituted:o}=FR(e,n);return{node:new sR.Text({text:t,x:n.x,y:n.y,width:n.width,height:n.height,align:a,verticalAlign:`middle`,fontFamily:r,fontStyle:i,fontSize:xR(n.fontSize??0),fill:n.color??`black`,wrap:`none`,listening:!1,...NR(n),...n.opacity===void 0?{}:{opacity:n.opacity}}),overflow:Math.max(0,Math.round(RR(e,t,n)-n.width)),substituted:o}}function BR(e,t){let n=t.lines?.[0]?.align??`left`;return new sR.Text({text:e,x:t.x,y:t.y,width:t.width,height:t.height,align:n,verticalAlign:`middle`,fontFamily:`Gotham, sans-serif`,fontSize:xR(t.fontSize??0),...t.letterSpacing?{letterSpacing:t.letterSpacing}:{},fill:t.color??`white`,wrap:`none`,listening:!1,...NR(t)})}var VR=`#4ec9b0`,HR=`#1e1e1e`,UR=e=>typeof e==`object`&&!!e&&`altKey`in e&&e.altKey===!0,WR=new Map;function GR(e){let t=WR.get(e);return t?Promise.resolve(t):new Promise((t,n)=>{let r=new Image;r.onload=()=>{WR.set(e,r),t(r)},r.onerror=()=>{n(Error(`could not load ${e}`))},r.src=e})}function KR(e){let{payload:t,boxSlot:n,art:r,frameCutoutUrls:i,ring:a,cutoutUrls:o,previewBoxes:s,selected:c,hidden:l,showCardFace:u,sampleText:d,ptIsVehicle:f,editable:p,onSelect:m,onCommit:h,onHover:g,onOverflow:_}=e,v=(0,N.useRef)(null),y=(0,N.useRef)(null),b=(0,N.useRef)(null),x=(0,N.useRef)(null),S=(0,N.useRef)(null),C=(0,N.useRef)(null),{width:w,height:T}=t.canvas,E=uR(t,n),ee=(0,N.useRef)(1),D=(0,N.useCallback)(()=>{let e=v.current,t=y.current;if(!e||!t)return;let n={width:e.clientWidth,height:e.clientHeight},r=Math.min((n.width-32)/w,(n.height-32)/T);r>0&&Number.isFinite(r)&&(ee.current=r,t.size(n),t.scale({x:r,y:r}),t.position({x:(n.width-w*r)/2,y:(n.height-T*r)/2}),t.batchDraw())},[w,T]),O=(0,N.useCallback)((e,t)=>{let n=y.current;if(!n)return;let r=n.scaleX(),i=Math.min(8,Math.max(ee.current*.5,r*e));if(i===r)return;let a=t??{x:n.width()/2,y:n.height()/2},o={x:(a.x-n.x())/r,y:(a.y-n.y())/r};n.scale({x:i,y:i}),n.position({x:a.x-o.x*i,y:a.y-o.y*i}),n.batchDraw()},[]);return(0,N.useEffect)(()=>{let e=v.current;if(!e)return;let t=new sR.Stage({container:e,width:e.clientWidth,height:e.clientHeight}),n=new sR.Layer({listening:!1}),r=new sR.Layer({listening:!1}),i=new sR.Layer,a=new sR.Transformer({rotateEnabled:!1,keepRatio:!1,ignoreStroke:!0,borderStroke:VR,anchorStroke:VR,anchorFill:HR,anchorSize:12,boundBoxFunc:(e,t)=>({...t,width:Math.max(8,t.width),height:Math.max(8,t.height)})});i.add(a),t.add(n,r,i),t.on(`click tap`,e=>{e.target===t&&m(void 0)}),t.on(`wheel`,e=>{e.evt.preventDefault(),O(e.evt.deltaY<0?1.1:1/1.1,t.getPointerPosition())});let o;t.on(`mousedown`,e=>{let n=e.evt.button===1;(n||e.target===t)&&(o={x:e.evt.clientX-t.x(),y:e.evt.clientY-t.y()},n&&e.evt.preventDefault())}),t.on(`mousemove`,e=>{o&&(t.position({x:e.evt.clientX-o.x,y:e.evt.clientY-o.y}),t.batchDraw())}),t.on(`mouseup mouseleave`,()=>{o=void 0}),y.current=t,b.current=n,x.current=r,S.current=i,C.current=a,D();let s=new ResizeObserver(D);return s.observe(e),()=>{s.disconnect(),t.destroy(),y.current=null}},[w,T,D,m,O]),(0,N.useEffect)(()=>{let e=e=>{if(e.target!==document.body||e.ctrlKey||e.metaKey)return;let t=y.current;t&&(e.key===`0`?D():e.key===`1`?O(1/t.scaleX(),null):e.key===`+`||e.key===`=`?O(1.2,null):e.key===`-`&&O(1/1.2,null))};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[D,O]),(0,N.useEffect)(()=>{let e=b.current;if(!e)return;let t=!1,n={width:w,height:T},s=async()=>({images:await Promise.all(r.map(async e=>({item:e,image:await GR(e.url),mask:e.maskUrl===void 0?void 0:await GR(e.maskUrl),secondary:e.secondaryMaskUrl===void 0?void 0:await GR(e.secondaryMaskUrl)}))),frameCutouts:await Promise.all(i.map(GR)),ringMask:a===void 0?void 0:await GR(a.maskUrl),cutouts:await Promise.all(o.map(GR))}),c=(e,t)=>new sR.Image({image:e,x:(w-e.naturalWidth)/2,y:(T-e.naturalHeight)/2,globalCompositeOperation:t,listening:!1});return s().then(({images:r,frameCutouts:i,ringMask:o,cutouts:s})=>{if(t)return;e.destroyChildren();let l=new sR.Group({listening:!1}),u=new sR.Group({listening:!1});l.add(u);for(let{item:e,image:t,mask:i,secondary:a}of r){let r={width:t.naturalWidth,height:t.naturalHeight},o=Sj(e.placement,r,n);if(!o)continue;let s=e.part===`frame`?u:l,d=()=>new sR.Image({image:t,x:o.x,y:o.y,listening:!1}),f=d();if(e.recolor!==void 0){let t=new sR.Group({listening:!1});t.add(f,new sR.Rect({...o,...r,fill:e.recolor,globalCompositeOperation:`source-in`,listening:!1})),t.cache(),s.add(t);continue}if(!i){s.add(f);continue}let p=new sR.Group({listening:!1});if(p.add(f),e.preserveAlpha===!0)for(let e=1;e<8;e++)p.add(d());for(let e of[i,a])e&&p.add(c(e,`destination-in`));p.cache(),e.preserveAlpha===!0&&p.globalCompositeOperation(`source-atop`),s.add(p)}for(let e of i)u.add(c(e,`destination-in`));if(a!==void 0&&o!==void 0){let e=new sR.Group({listening:!1});e.add(new sR.Rect({...n,fill:a.color,listening:!1}),c(o,`destination-in`)),e.cache(),e.globalCompositeOperation(`source-atop`),u.add(e)}(i.length>0||o!==void 0)&&u.cache();for(let e of s)l.add(c(e,`destination-in`));s.length>0&&l.cache(),e.add(l),e.batchDraw()}).catch(()=>{}),()=>{t=!0}},[r,i,a,o,w,T]),(0,N.useEffect)(()=>{let e=x.current;if(!e)return;let t=!1;return jR().then(()=>{if(t)return;e.destroyChildren();let n={},r=E?new sR.Group({..._M({width:w,height:T},E),listening:!1}):void 0;r&&e.add(r);for(let{key:t,box:i}of s){if(l.has(t))continue;if(t===`collectorInfo`){let t=d.collectorInfo;t&&e.add(BR(t,i));continue}let a=t===`pt`?[d.power,d.toughness].every(Boolean)?`${d.power??``}/${d.toughness??``}`:``:d[t];if(!CR(t)||!a)continue;let o=zR(t,a,t===`pt`&&f?{...i,color:`white`}:i);r&&E?(o.node.shadowOffset(vM({x:o.node.shadowOffsetX(),y:o.node.shadowOffsetY()},E)),r.add(o.node)):e.add(o.node),o.overflow>0&&(n[t]=o.overflow)}e.batchDraw(),_(n)}),()=>{t=!0}},[s,d,f,l,_,E,w,T]),(0,N.useEffect)(()=>{let e=S.current,r=C.current;if(!e||!r)return;for(let t of[...e.getChildren()])t!==r&&t.destroy();u&&e.add(new sR.Rect({x:144,y:144,width:w-288,height:T-288,stroke:`rgba(255,255,255,0.75)`,strokeWidth:4,dash:[26,18],listening:!1}));let i=(e,t)=>{let n=new sR.Group({listening:!1});return e.add(n),{parent:e,size:t,guides:n}},a=i(e,{width:w,height:T}),o;if(E){let t=new sR.Group(_M({width:w,height:T},E));e.add(t),o=i(t,gM({width:w,height:T},E))}let s=e=>o&&dR(e)?o:a,d=(t,n)=>{t.guides.destroyChildren();for(let e of n)t.guides.add(new sR.Line({points:e.axis===`x`?[e.at,0,e.at,t.size.height]:[0,e.at,t.size.width,e.at],stroke:VR,strokeWidth:2,dash:[12,10],listening:!1}));t.guides.moveToTop(),e.batchDraw()},f=n?fR(t,n):[],_;f.forEach(({key:e,box:t},n)=>{if(l.has(e))return;let r=e===c,i=s(e),a=new sR.Rect({x:t.x,y:t.y,width:t.width,height:t.height,stroke:kM(n),strokeWidth:r?12:5,fill:kM(n,r?.2:.08),draggable:p,name:e}),o=t=>{let n={x:Math.round(a.x()),y:Math.round(a.y()),width:Math.round(a.width()*a.scaleX()),height:Math.round(a.height()*a.scaleY())};if(t)return n;let r=f.filter(t=>t.key!==e&&!l.has(t.key)&&s(t.key)===i).map(e=>e.box),o=yR(n,i.size,r);return d(i,o.guides),o.bounds};a.on(`mouseenter`,()=>{g(e)}),a.on(`mouseleave`,()=>{g(void 0)}),a.on(`mousedown touchstart`,()=>{m(e)}),a.on(`dragmove`,e=>{let t=o(UR(e.evt));a.position({x:t.x,y:t.y})}),a.on(`dragend`,t=>{let n=o(UR(t.evt));d(i,[]),a.position({x:n.x,y:n.y}),h(e,n)}),a.on(`transformend`,()=>{d(i,[]);let t={x:Math.round(a.x()),y:Math.round(a.y()),width:Math.round(a.width()*a.scaleX()),height:Math.round(a.height()*a.scaleY())};a.scale({x:1,y:1}),a.size({width:t.width,height:t.height}),h(e,t)}),i.parent.add(a),r&&(_=a)}),r.nodes(_&&p?[_]:[]),r.moveToTop(),e.batchDraw()},[t,n,c,l,u,p,w,T,E,h,g,m]),(0,N.useEffect)(()=>{if(!c||!n||!p)return;let e=e=>{let r={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];if(!r||e.target!==document.body)return;e.preventDefault();let i=e.shiftKey?10:1,a=fR(t,n).find(({key:e})=>e===c);if(!a)return;let o=a.box,s=yM({x:r[0]*i,y:r[1]*i},dR(c)?E:void 0);h(c,{x:o.x+s.x,y:o.y+s.y,width:o.width,height:o.height})};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[c,n,t,p,h,E]),(0,P.jsx)(pn,{ref:v,flex:`1`,minW:`0`,display:`grid`,placeItems:`center`,overflow:`hidden`,bg:`bg.muted`})}var qR=[{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`}],JR=[{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`}],YR=[{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 XR(e){let{shape:t,useNyxBorder:n,useNyxInsert:r,useUBCrowns:i,summary:a,onChange:o,onNyxBorderChange:s,onNyxInsertChange:c,onUBCrownsChange:l}=e,u={nyxInsert:[r,c],ubCrowns:[i,l]},d=t.colors??[],f=e=>{let n=d.includes(e)?d.filter(t=>t!==e):[...d,e];o({...t,colors:n})};return(0,P.jsxs)(gS,{align:`stretch`,gap:`2`,p:`3`,borderBottomWidth:`1px`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,textTransform:`uppercase`,color:`fg.muted`,children:`Card`}),(0,P.jsx)(Mx,{gap:`1`,children:qR.map(e=>{let t=d.includes(e.code);return(0,P.jsx)(pn,{as:`button`,flex:`1`,py:`1`,borderRadius:`sm`,border:`1px solid`,borderColor:t?e.swatch:`border`,bg:t?e.swatch:`transparent`,color:t?`bg`:`fg.muted`,fontSize:`xs`,fontWeight:`bold`,title:e.label,onClick:()=>{f(e.code)},children:e.code.toUpperCase()},e.code)})}),(0,P.jsxs)(Mx,{gap:`1`,flexWrap:`wrap`,children:[JR.map(e=>{let n=t[e.key]===!0;return(0,P.jsx)(pn,{as:`button`,px:`2`,py:`0.5`,borderRadius:`sm`,border:`1px solid`,borderColor:n?`teal.fg`:`border`,color:n?`teal.fg`:`fg.muted`,fontSize:`xs`,title:e.hint,onClick:()=>{o({...t,[e.key]:!n})},children:e.label},e.key)}),(0,P.jsx)(pn,{as:`button`,px:`2`,py:`0.5`,borderRadius:`sm`,border:`1px solid`,borderColor:n?`teal.fg`:`border`,color:n?`teal.fg`:`fg.muted`,fontSize:`xs`,title:`The app's nyx-border setting, which decides whether enchantments use nyx art`,onClick:()=>{s(!n)},children:`nyx borders`}),YR.map(e=>{let[t,n]=u[e.key]??[!1,()=>void 0];return(0,P.jsx)(pn,{as:`button`,px:`2`,py:`0.5`,borderRadius:`sm`,border:`1px solid`,borderColor:t?`teal.fg`:`border`,color:t?`teal.fg`:`fg.muted`,fontSize:`xs`,title:e.hint,onClick:()=>{n(!t)},children:e.label},e.key)})]}),(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,children:a})]})}var ZR=e=>Object.entries(e).filter(([,e])=>[`string`,`number`,`boolean`].includes(typeof e)).map(([e])=>e);function QR(e){let t=[...e.border===void 0?[]:[`border ${typeof e.border==`string`?e.border:e.border.join(` | `)}`],...Object.entries(e.settings??{}).map(([e,t])=>`${e} = ${String(t)}`)];return t.length>0?t.join(`, `):`always`}var $R=e=>Object.entries(e).map(([e,t])=>`${e} ${String(t)}`).join(`, `);function ez(e){let{overrides:t,state:n}=e;return(0,P.jsxs)(gS,{align:`stretch`,gap:`1`,pt:`2`,borderTopWidth:`1px`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,textTransform:`uppercase`,color:`fg.muted`,children:`Overrides`}),t.length===0&&(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,children:`None: this box keeps its own style whatever the border does.`}),t.map((e,t)=>{let r=kj(e.when,n);return(0,P.jsxs)(Mx,{gap:`2`,align:`start`,opacity:r?1:.5,children:[(0,P.jsx)(nx,{size:`sm`,colorPalette:r?`teal`:`gray`,variant:r?`solid`:`outline`,children:r?`active`:`idle`}),(0,P.jsxs)(Zo,{fontSize:`xs`,children:[QR(e.when),` → `,$R(e.style)]})]},t)})]})}var tz=[`x`,`y`,`width`,`height`,`fontSize`,`color`,`outlineColor`,`outlineWidth`,`opacity`,`textAlign`,`verticalAlign`,`fontFamily`,`shadow`];function nz({value:e}){if(!e)return null;if(e.editable){let t=e.shared.length,n=`${e.file}:${String(e.line)}`;return(0,P.jsxs)(Zo,{fontSize:`10px`,color:t>0?`fg.warning`:`fg.success`,truncate:!0,title:t>0?`${n} — also read by ${String(t)} other box ${t===1?`set`:`sets`}: ${e.shared.map(e=>`${e.layout}.${e.boxSet}`).join(`, `)}`:n,children:[e.file.split(`/`).pop(),`:`,e.line,t>0?` · shared ×${String(t+1)}`:``,e.sharedDefault?` · default`:``]})}return(0,P.jsxs)(Zo,{fontSize:`10px`,color:`fg.warning`,truncate:!0,title:e.detail,children:[`🔒 `,e.reason]})}function rz(e){let{slug:t,boxKey:n,box:r,basePath:i,state:a,editable:o,onChange:s}=e,[c,l]=(0,N.useState)({});if((0,N.useEffect)(()=>{if(l({}),!n||!r)return;let e=!1,a=ZR(r);return Promise.all(a.map(async e=>{try{return[e,await TM(t,[...i,n,e],!0)]}catch{return}})).then(t=>{e||l(Object.fromEntries(t.filter(e=>e!==void 0)))}),()=>{e=!0}},[t,n,r,i]),!n||!r)return(0,P.jsx)(pn,{p:`3`,children:(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,children:`Select a box to edit it.`})});let u=ZR(r),d=tz.filter(e=>u.includes(e)).concat(u.filter(e=>!tz.includes(e)));return(0,P.jsxs)(gS,{align:`stretch`,gap:`2`,p:`3`,children:[(0,P.jsxs)(Mx,{children:[(0,P.jsx)(Zo,{fontWeight:`600`,children:n}),!o&&(0,P.jsx)(nx,{colorPalette:`yellow`,children:`read-only`})]}),d.map(e=>{let t=r[e],n=c[e],i=!o||n!==void 0&&!n.editable;return(0,P.jsxs)(wn,{templateColumns:`90px 1fr`,gap:`2`,alignItems:`center`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,truncate:!0,title:e,children:e}),(0,P.jsxs)(gS,{align:`stretch`,gap:`0`,children:[(0,P.jsx)(Fx,{size:`xs`,value:typeof t==`string`?t:typeof t==`number`||typeof t==`boolean`?String(t):``,disabled:i,onChange:n=>{let r=typeof t==`number`?Number(n.target.value):typeof t==`boolean`?n.target.value===`true`:n.target.value;typeof r==`number`&&Number.isNaN(r)||s(e,r)}}),(0,P.jsx)(nz,{value:n})]})]},e)}),r.overrides!==void 0&&(0,P.jsx)(ez,{overrides:r.overrides,state:a})]})}function iz(e){let{slug:t,payload:n,slots:r,editable:i,onChange:a}=e,[o,s]=(0,N.useState)({}),c=(0,N.useMemo)(()=>r.flatMap(e=>{let t=cR(n.frame,e.path);return typeof t!=`object`||!t?[]:Object.entries(t).filter(([,e])=>typeof e==`number`||typeof e==`boolean`).map(([t,n])=>({slot:e.key,key:t,value:n,path:[...e.path,t]}))}),[r,n]);return(0,N.useEffect)(()=>{if(s({}),c.length===0)return;let e=!1;return Promise.all(c.map(async e=>{try{return[e.path.join(`.`),await TM(t,e.path)]}catch{return}})).then(t=>{e||s(Object.fromEntries(t.filter(e=>e!==void 0)))}),()=>{e=!0}},[t,c]),c.length===0?null:(0,P.jsxs)(gS,{align:`stretch`,gap:`2`,p:`3`,borderTopWidth:`1px`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,textTransform:`uppercase`,color:`fg.muted`,children:`Layout knobs`}),c.map(e=>{let t=o[e.path.join(`.`)],n=!i||t!==void 0&&!t.editable;return(0,P.jsxs)(wn,{templateColumns:`120px 1fr`,gap:`2`,alignItems:`center`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,truncate:!0,title:`${e.slot}.${e.key}`,children:r.length>1?`${e.slot.replace(/Config$/,``)}.${e.key}`:e.key}),(0,P.jsxs)(gS,{align:`stretch`,gap:`0`,children:[(0,P.jsx)(Fx,{size:`xs`,value:String(e.value),disabled:n,onChange:t=>{if(typeof e.value==`boolean`){a(e.path,t.target.value===`true`);return}let n=Number(t.target.value);Number.isNaN(n)||a(e.path,n)}}),t&&!t.editable&&(0,P.jsxs)(Zo,{fontSize:`xs`,color:`fg.warning`,truncate:!0,title:t.detail,children:[`🔒 `,t.reason]}),t?.editable===!0&&(0,P.jsxs)(Zo,{fontSize:`xs`,color:`fg.success`,truncate:!0,children:[t.file.split(`/`).pop(),`:`,t.line]})]})]},e.path.join(`.`))})]})}function az(e){let{masks:t,enabled:n,onToggle:r}=e;return(0,P.jsxs)(gS,{align:`stretch`,gap:`0`,mt:`3`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,textTransform:`uppercase`,color:`fg.muted`,mb:`1`,children:`Masks`}),t.length===0&&(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,children:`This layout ships no section masks.`}),t.map(e=>{let t=n.has(e.id);return(0,P.jsxs)(Mx,{gap:`1`,px:`2`,py:`0.5`,borderRadius:`sm`,opacity:t?1:.4,_hover:{bg:`bg.muted`},children:[(0,P.jsx)(pn,{as:`button`,fontSize:`xs`,color:`fg.muted`,title:t?`hide`:`show`,onClick:()=>{r(e.id)},children:t?`👁`:`🚫`}),(0,P.jsx)(Zo,{fontSize:`xs`,flex:`1`,truncate:!0,title:e.id,children:e.id})]},e.id)}),t.length>0&&(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,mt:`1`,children:`A mask cuts the art down to its shape, the way the renderer composites it.`})]})}var oz={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},sz=N.createContext&&N.createContext(oz),cz=[`attr`,`size`,`title`];function lz(e,t){if(e==null)return{};var n,r,i=uz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uz(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function dz(){return dz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dz.apply(null,arguments)}function fz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fz(Object(n),!0).forEach(function(t){mz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mz(e,t,n){return(t=hz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hz(e){var t=gz(e,`string`);return typeof t==`symbol`?t:t+``}function gz(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function _z(e){return e&&e.map((e,t)=>N.createElement(e.tag,pz({key:t},e.attr),_z(e.child)))}function vz(e){return t=>N.createElement(yz,dz({attr:pz({},e.attr)},t),_z(e.child))}function yz(e){var t=t=>{var n=e.attr,r=e.size,i=e.title,a=lz(e,cz),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),N.createElement(`svg`,dz({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:pz(pz({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&N.createElement(`title`,null,i),e.children)};return sz===void 0?t(oz):N.createElement(sz.Consumer,null,e=>t(e))}function bz(e){return vz({tag:`svg`,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 xz(e){return vz({tag:`svg`,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 Sz(e){return vz({tag:`svg`,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)}var Cz=N.forwardRef(function(e,t){return(0,P.jsx)(px,{variant:`ghost`,"aria-label":`Close`,ref:t,...e,children:e.children??(0,P.jsx)(bz,{})})}),wz=N.forwardRef(function(e,t){let{children:n,clearable:r,...i}=e;return(0,P.jsxs)(cS,{...i,children:[(0,P.jsx)(Zx,{ref:t,children:n}),(0,P.jsxs)(oS,{children:[r&&(0,P.jsx)(Tz,{}),(0,P.jsx)(sS,{})]})]})}),Tz=N.forwardRef(function(e,t){return(0,P.jsx)(tS,{asChild:!0,...e,ref:t,children:(0,P.jsx)(Cz,{size:`xs`,variant:`plain`,focusVisibleRing:`inside`,focusRingWidth:`2px`,pointerEvents:`auto`})})}),Ez=N.forwardRef(function(e,t){let{portalled:n=!0,portalRef:r,...i}=e;return(0,P.jsx)(Dm,{disabled:!n,container:r,children:(0,P.jsx)(Qx,{children:(0,P.jsx)($x,{...i,ref:t})})})}),Dz=N.forwardRef(function(e,t){let{item:n,children:r,...i}=e;return(0,P.jsxs)(iS,{item:n,...i,ref:t,children:[r,(0,P.jsx)(aS,{})]},n.value)}),Oz=N.forwardRef(function(e,t){let{children:n,...r}=e;return(0,P.jsx)(eS,{...r,ref:t,children:(0,P.jsx)(lS,{children:t=>{let r=t.selectedItems;return r.length===0?e.placeholder:n?n(r):r.length===1?t.collection.stringifyItem(r[0]):`${r.length} selected`}})})}),kz=N.forwardRef(function(e,t){return(0,P.jsx)(Xx,{...e,ref:t,positioning:{sameWidth:!0,...e.positioning},children:e.asChild?e.children:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(uS,{}),e.children]})})});N.forwardRef(function(e,t){let{children:n,label:r,...i}=e;return(0,P.jsxs)(nS,{...i,ref:t,children:[(0,P.jsx)(rS,{children:r}),n]})});function Az(e){let{label:t,value:n,options:r,width:i,placeholder:a,onChange:o}=e,s=(0,N.useMemo)(()=>Lp({items:[...r],itemToString:e=>e.label,itemToValue:e=>e.value}),[r]);return(0,P.jsxs)(kz,{collection:s,size:`xs`,width:i,value:r.some(e=>e.value===n)?[n]:[],onValueChange:e=>{let[t]=e.value;t!==void 0&&o(t)},children:[(0,P.jsx)(wz,{"aria-label":t,children:(0,P.jsx)(Oz,{placeholder:a??t})}),(0,P.jsx)(Ez,{children:s.items.map(e=>(0,P.jsx)(Dz,{item:e,children:e.label},e.value))})]})}var jz=[`#000000`,`#ffffff`,`#a2adb6`,`#808080`,`#a6874a`,`#f6c113`];function Mz(e){let{on:t,label:n,title:r,onClick:i}=e;return(0,P.jsx)(pn,{as:`button`,px:`2`,py:`0.5`,borderRadius:`sm`,border:`1px solid`,borderColor:t?`teal.fg`:`border`,color:t?`teal.fg`:`fg.muted`,fontSize:`xs`,title:r,onClick:i,children:n})}function Nz(e){let{entry:t,value:n,onChange:r}=e,{config:i}=t;if(i.type===`boolean`){let e=n===!0;return(0,P.jsx)(Mz,{on:e,label:i.label,title:i.helperText,onClick:()=>{r(!e)}})}return(0,P.jsxs)(Mx,{gap:`2`,w:`full`,title:i.helperText,children:[(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,w:`80px`,truncate:!0,children:i.label}),i.type===`select`?(0,P.jsx)(Az,{label:i.label,width:`150px`,value:String(n??i.defaultValue),options:i.options.map(e=>({value:e,label:e})),onChange:r}):(0,P.jsx)(Fx,{size:`xs`,value:String(n??i.defaultValue),onChange:e=>{r(e.target.value)}})]})}function Pz(e){let{entries:t,values:n,layout:r,borderColor:i,borderState:a,onBorderColorChange:o,onChange:s}=e,c=e=>{let t=e.scope===`frame`?n:n[r],i=typeof t==`object`?t[e.key]:void 0;return typeof i==`object`?void 0:i},l=e=>t.filter(t=>t.scope===e),u=e=>(0,P.jsx)(Mx,{gap:`1`,flexWrap:`wrap`,children:e.map(e=>(0,P.jsx)(Nz,{entry:e,value:c(e),onChange:t=>{s(e,t)}},`${e.scope}.${e.key}`))});return(0,P.jsxs)(gS,{align:`stretch`,gap:`2`,p:`3`,borderBottomWidth:`1px`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,textTransform:`uppercase`,color:`fg.muted`,children:`Settings`}),(0,P.jsxs)(Mx,{gap:`1`,flexWrap:`wrap`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,w:`80px`,children:`border color`}),(0,P.jsx)(Mz,{on:i===null,label:`none`,title:`No border color: the ring as the frame ships it`,onClick:()=>{o(null)}}),jz.map(e=>(0,P.jsx)(pn,{as:`button`,w:`18px`,h:`18px`,borderRadius:`sm`,border:`2px solid`,borderColor:i===e?`teal.fg`:`border`,bg:e,title:e,onClick:()=>{o(e)}},e)),(0,P.jsx)(Fx,{type:`color`,size:`xs`,w:`28px`,p:`0`,title:`Any other color`,value:i??`#000000`,onChange:e=>{o(e.target.value)}})]}),t.length===0?(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,children:`The frame declares no settings for this layout.`}):(0,P.jsxs)(P.Fragment,{children:[u(l(`frame`)),l(`layout`).length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Zo,{fontSize:`xs`,color:`fg.muted`,children:[r,` only`]}),u(l(`layout`))]})]}),(0,P.jsxs)(Zo,{fontSize:`xs`,color:`fg.muted`,children:[`Border: `,(0,P.jsx)(`b`,{children:a}),` — what text boxes'`,` `,(0,P.jsx)(`code`,{children:`overrides`}),` match on. Frame variant, nyx borders and UB crowns have their own controls.`]})]})}var Fz=N.forwardRef(function(e,t){let{children:n,portalled:r=!0,portalRef:i,backdrop:a=!0,...o}=e;return(0,P.jsxs)(Dm,{disabled:!r,container:i,children:[a&&(0,P.jsx)(Ox,{}),(0,P.jsx)(Sx,{children:(0,P.jsx)(Cx,{ref:t,...o,asChild:!1,children:n})})]})}),Iz=N.forwardRef(function(e,t){return(0,P.jsx)(Ex,{position:`absolute`,top:`2`,insetEnd:`2`,...e,asChild:!0,children:(0,P.jsx)(Cz,{size:`sm`,ref:t,children:e.children})})}),Lz=xx,Rz=Ax,zz=jx,Bz=kx,Vz=Tx,Hz=wx,Uz=Dx;function Wz(e){let{shared:t,onConfirm:n,onCancel:r}=e,i=t.length!==1;return(0,P.jsx)(Lz,{open:!0,role:`alertdialog`,placement:`center`,size:`sm`,onOpenChange:e=>{e.open||r()},children:(0,P.jsxs)(Fz,{children:[(0,P.jsx)(zz,{children:(0,P.jsx)(Vz,{children:`This value is shared`})}),(0,P.jsx)(Bz,{children:(0,P.jsxs)(gS,{align:`stretch`,gap:`3`,children:[(0,P.jsxs)(Hz,{children:[t.length,` other box `,i?`sets read`:`set reads`,` the same literal. Saving moves `,i?`them all`:`it`,`.`]}),(0,P.jsx)(gS,{align:`stretch`,gap:`0`,overflowY:`auto`,p:`2`,maxH:`240px`,children:t.map(e=>(0,P.jsxs)(Zo,{fontSize:`xs`,color:`fg.muted`,truncate:!0,children:[e.variant===null?``:`${e.variant} · `,e.layout,` · `,e.boxSet]},`${e.variant??`-`}/${e.layout}/${e.boxSet}`))}),(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,children:`To move only one layout, give it its own value in the source first.`})]})}),(0,P.jsxs)(Rz,{children:[(0,P.jsx)(Uz,{asChild:!0,children:(0,P.jsx)(ux,{size:`xs`,variant:`outline`,children:`Cancel`})}),(0,P.jsxs)(ux,{size:`xs`,onClick:n,children:[`Apply to all `,t.length+1]})]}),(0,P.jsx)(Iz,{})]})})}var Gz=(e,t,n,r,i,a,o,s)=>{let c=document.documentElement,l=[`light`,`dark`];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n=e===`class`,r=n&&a?i.map(e=>a[e]||e):i;n?(c.classList.remove(...r),c.classList.add(a&&a[t]?a[t]:t)):c.setAttribute(e,t)}),d(t)}function d(e){s&&l.includes(e)&&(c.style.colorScheme=e)}function f(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(o&&e===`system`?f():e)}catch{}},Kz=[`light`,`dark`],qz=`(prefers-color-scheme: dark)`,Jz=typeof window>`u`,Yz=N.createContext(void 0),Xz={setTheme:e=>{},themes:[]},Zz=()=>N.useContext(Yz)??Xz,Qz=e=>N.useContext(Yz)?N.createElement(N.Fragment,null,e.children):N.createElement(eB,{...e}),$z=[`light`,`dark`],eB=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i=`theme`,themes:a=$z,defaultTheme:o=n?`system`:`light`,attribute:s=`data-theme`,value:c,children:l,nonce:u,scriptProps:d})=>{let[f,p]=N.useState(()=>nB(i,o)),[m,h]=N.useState(()=>f===`system`?iB():f),g=c?Object.values(c):a,_=N.useCallback(e=>{let i=e;if(!i)return;e===`system`&&n&&(i=iB());let a=c?c[i]:i,l=t?rB(u):null,d=document.documentElement,f=e=>{e===`class`?(d.classList.remove(...g),a&&d.classList.add(a)):e.startsWith(`data-`)&&(a?d.setAttribute(e,a):d.removeAttribute(e))};if(Array.isArray(s)?s.forEach(f):f(s),r){let e=Kz.includes(o)?o:null,t=Kz.includes(i)?i:e;d.style.colorScheme=t}l?.()},[u]),v=N.useCallback(e=>{let t=typeof e==`function`?e(f):e;p(t);try{localStorage.setItem(i,t)}catch{}},[f]),y=N.useCallback(t=>{let r=iB(t);h(r),f===`system`&&n&&!e&&_(`system`)},[f,e]);N.useEffect(()=>{let e=window.matchMedia(qz);return e.addListener(y),y(e),()=>e.removeListener(y)},[y]),N.useEffect(()=>{let e=e=>{e.key===i&&(e.newValue?p(e.newValue):v(o))};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[v]),N.useEffect(()=>{_(e??f)},[e,f]);let b=N.useMemo(()=>({theme:f,setTheme:v,forcedTheme:e,resolvedTheme:f===`system`?m:f,themes:n?[...a,`system`]:a,systemTheme:n?m:void 0}),[f,v,e,m,n,a]);return N.createElement(Yz.Provider,{value:b},N.createElement(tB,{forcedTheme:e,storageKey:i,attribute:s,enableSystem:n,enableColorScheme:r,defaultTheme:o,value:c,themes:a,nonce:u,scriptProps:d}),l)},tB=N.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:c,scriptProps:l})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return N.createElement(`script`,{...l,suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(${Gz.toString()})(${u})`}})}),nB=(e,t)=>{if(Jz)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},rB=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)}},iB=e=>(e||=window.matchMedia(qz),e.matches?`dark`:`light`);function aB(e){return(0,P.jsx)(Qz,{attribute:`class`,disableTransitionOnChange:!0,...e})}function oB(){let{resolvedTheme:e,setTheme:t,forcedTheme:n}=Zz();return{colorMode:n||e,setColorMode:t,toggleColorMode:()=>{t(e===`dark`?`light`:`dark`)}}}function sB(){let{colorMode:e}=oB();return e===`dark`?(0,P.jsx)(Sz,{}):(0,P.jsx)(xz,{})}var cB=N.forwardRef(function(e,t){let{toggleColorMode:n}=oB();return(0,P.jsx)(fx,{fallback:(0,P.jsx)(pS,{boxSize:`9`}),children:(0,P.jsx)(px,{onClick:n,variant:`ghost`,"aria-label":`Toggle color mode`,size:`sm`,ref:t,...e,css:{_icon:{width:`5`,height:`5`}},children:(0,P.jsx)(sB,{})})})});N.forwardRef(function(e,t){return(0,P.jsx)(Ho,{color:`fg`,display:`contents`,className:`chakra-theme light`,colorPalette:`gray`,colorScheme:`light`,ref:t,...e})}),N.forwardRef(function(e,t){return(0,P.jsx)(Ho,{color:`fg`,display:`contents`,className:`chakra-theme dark`,colorPalette:`gray`,colorScheme:`dark`,ref:t,...e})});var lB={colors:[`w`]};function uB(e,t){let n=Xj(e,t),r=Gj(Yj(e),{family:n}),i=`${r.baseFrame.family}/${r.baseFrame.color}`,a=r.overlays??[];return`base ${i} · ${a.length===0?`no section overlays`:`${String(a.length)} overlay${a.length===1?``:`s`}: `+[...new Set(a.map(e=>e.mask))].join(`, `)}`}var dB=e=>typeof e==`object`&&e?e:void 0,fB=e=>dB(e);function pB(e){let{payload:t,assetSlot:n,maskSlot:r,boxSlot:i,shape:a,card:o,useNyxBorder:s,useNyxInsert:c,useUBCrowns:l,borderColor:u,useNoBorder:d,useFullBorder:f,inspectMasks:p}=e,m=n?fB(cR(t.frame,n.path)):void 0,h=mR(t,r);if(!m)return{layers:[],frameCutoutUrls:[],cutoutUrls:[]};let g=e=>{let t=dB(h)?.[e];return typeof t==`string`?t:void 0},_=Xj(a,s),v=Yj(a),y={family:_,...cR(t.frame,[...i?.path.slice(0,-1)??[],`hybridTitleMask`])===`title`?{hybridTitleMask:`title`}:{}},b=g(`adventureRules`)===void 0?Gj(v,{...y,hasPinlineMask:g(`pinlines`)!==void 0}):qj(v,``,y),x=[],S=cM(m,b.baseFrame);S&&x.push({id:`${b.baseFrame.family}.${b.baseFrame.color}`,url:S.url,placement:xj(`${S.ref.family}.${S.ref.color}`),part:`frame`});let C=S?.usedFallback===!0;if(!C)for(let e of b.overlays??[]){let t=sM(m,e.frame),n=g(e.mask);t!==void 0&&n!==void 0&&x.push({id:`${e.frame.family}.${e.frame.color}/${e.mask}`,url:t,placement:xj(`${e.frame.family}.${e.frame.color}`),part:`frame`,maskUrl:n,...e.secondaryMask?{secondaryMaskUrl:g(e.secondaryMask)}:{},...e.preserveAlpha===!0?{preserveAlpha:!0}:{}})}let w=i?.path.slice(0,-1)??[],T=(...e)=>{let n=dB(cR(t.frame,e));return typeof n?.x==`number`&&typeof n.y==`number`?n:void 0},E=oM({...o,isLegendary:a.isLegendary}),ee=E.nickname,D={crownConfig:dB(cR(t.frame,[...w,`crownConfig`])),nicknameConfig:T(...w,`nicknameConfig`),...i?{ptImage:T(...i.path,`ptImage`)}:{},hasNickname:ee},O=e=>Array.isArray(e)?e:[e],te=(e,t,n)=>{t!==void 0&&x.push({id:e,url:t,placement:xj(e,D),part:`decoration`,...n===void 0?{}:{recolor:n}})};if(E.crownBlackBar&&typeof m.black==`string`&&te(`black`,m.black,u??void 0),E.crown){for(let e of O(Qj(v,a)))te(`crown.${e}`,nM(m,e,{nickname:ee,useUBCrowns:l}));if(c)for(let e of O(Qj(v,a)))te(`crown.nyxInsert.${e}`,aM(m,e,l))}let ne=E.crown&&O(Qj(v,a)).some(e=>nM(m,e,{nickname:!0,useUBCrowns:l})!==nM(m,e,{nickname:!1,useUBCrowns:l}));if(ee&&!ne)for(let e of O($j(v,a)))te(`nickname.${e}`,rM(m,e));if(E.ptBox){let e=eM(v,a);te(`pt.${e}`,iM(m,e))}let re=Mj({masks:h,frameAssets:m,useNoBorder:d,isLegendary:a.isLegendary===!0,hasNickname:ee,frameColor:S?.ref.color??b.baseFrame.color,isTallFrame:b.baseFrame.family===`tall`}),ie=Ej(h,f),k=[...p].map(e=>g(e)).filter(e=>e!==void 0);return{layers:x,frameCutoutUrls:re,...u&&ie?{ring:{maskUrl:ie,color:u}}:{},cutoutUrls:k,...C?{fallbackNote:`no ${b.baseFrame.family} "${b.baseFrame.color}" art — using ${S.ref.family} "${S.ref.color}"; overlays dropped`}:{}}}var mB=new Set([`frameVariant`,`useNyxBorder`,`useUBCrowns`]),hB=e=>e;function gB(e,t){return Object.entries(e.config.layouts).find(([e])=>e===t)?.[1]}function _B(e,t){let n=(e,t)=>Object.entries(t??{}).map(([t,n])=>({scope:e,key:t,config:n}));return[...n(`frame`,e.templateSettings),...n(`layout`,gB(e,t)?.templateSettings)].filter(e=>!mB.has(e.key))}function vB(e,t,n,r){let i=t.scope===`frame`?{[t.key]:r}:{[n]:{[t.key]:r}};return dM(e,i)??i}function yB(e,t,n){let r=dM(uM(e),t)??{};return{frame:r,layout:fM(r,n)}}function bB(e,t){return t?gR(e,t).map(({label:e,url:t})=>({id:e,url:t})):[]}var xB=e=>e.join(`.`);function SB(e,t){if(t.size===0)return e;let n=structuredClone(e.frame);for(let[e,r]of t){let t=e.split(`.`),i=cR(n,t.slice(0,-1)),a=t[t.length-1];a!==void 0&&typeof i==`object`&&i&&(i[a]=r)}return{...e,frame:n}}var CB=`frame-studio.sampleText`,wB=`0279 R · SET · EN — Artist Name`,TB={title:`Serra Angel`,type:`Creature — Angel`,nicknameTitle:``,keyword:`Flying, vigilance`,power:`4`,toughness:`4`,defense:`4`,collectorInfo:wB},EB={typical:TB,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`,defense:`7`,collectorInfo:wB},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`,defense:`12`,collectorInfo:wB}};function DB(){try{let e=localStorage.getItem(CB);if(!e)return TB;let t=JSON.parse(e);return typeof t==`object`&&t?{...TB,...t}:TB}catch{return TB}}function OB(){let[e,t]=(0,N.useState)(DB),n=(0,N.useCallback)(e=>{t(e);try{localStorage.setItem(CB,JSON.stringify(e))}catch{}},[]);return{sampleText:e,setField:(0,N.useCallback)((t,r)=>{n({...e,[t]:r})},[e,n]),applyPreset:(0,N.useCallback)(e=>{n(EB[e]??TB)},[n])}}var kB=()=>void 0,AB=`__base__`;function jB(){let[e,t]=(0,N.useState)(),[n,r]=(0,N.useState)([]),[i,a]=(0,N.useState)(),[o,s]=(0,N.useState)(),[c,l]=(0,N.useState)(null),[u,d]=(0,N.useState)(`normal`),[f,p]=(0,N.useState)(`boxes`),[m,h]=(0,N.useState)(lB),[g,_]=(0,N.useState)(!0),[v,y]=(0,N.useState)(),[b,x]=(0,N.useState)(new Set),[S,C]=(0,N.useState)(!0),[w,T]=(0,N.useState)(``),[E,ee]=(0,N.useState)({}),{sampleText:D,setField:O,applyPreset:te}=OB(),[ne,re]=(0,N.useState)(),ie=(0,N.useRef)([]),k=(0,N.useRef)([]),[ae,A]=(0,N.useState)(new Map),oe=(0,N.useRef)(void 0),[se,ce]=(0,N.useState)(`typical`),[le,ue]=(0,N.useState)(!1),[de,fe]=(0,N.useState)(!1),[pe,me]=(0,N.useState)(new Set),[he,ge]=(0,N.useState)({}),[_e,j]=(0,N.useState)(null);(0,N.useEffect)(()=>{SM().then(t),CM().then(e=>{r(e),a(t=>t??e[0]?.slug)})},[]);let ve=(0,N.useCallback)(e=>{wM(e).then(s).catch(e=>{T(e instanceof Error?e.message:String(e))})},[]);(0,N.useEffect)(()=>{i&&ve(i)},[i,ve]),(0,N.useEffect)(()=>DM(e=>{e.type===`frames`?CM().then(r):e.slug!==void 0&&e.slug===i&&(ve(e.slug),T(e.cause===`self`?`saved`:`reloaded`))}),[i,ve]);let ye=(0,N.useMemo)(()=>o?SB(o,ae):void 0,[o,ae]),be=(0,N.useMemo)(()=>o?hR(o):[],[o]),xe=(0,N.useMemo)(()=>be.find(e=>e.variant===c)?.layouts??[],[be,c]),Se=(0,N.useMemo)(()=>o?.slots.filter(e=>e.variant===c&&e.layout===u)??[],[o,c,u]),M=Se.find(e=>e.kind===`boxes`&&e.key===f),Ce=Se.find(e=>e.kind===`assets`),we=Se.find(e=>e.kind===`masks`),Te=(0,N.useMemo)(()=>Se.filter(e=>e.kind===`knobs`),[Se]),Ee=(0,N.useMemo)(()=>ye&&M?fR(ye,M):[],[ye,M]),De=ye?uR(ye,M):void 0,Oe=Ee.find(e=>e.key===v)?.box,ke=(0,N.useMemo)(()=>ye?bB(ye,we):[],[ye,we]),Ae=(0,N.useMemo)(()=>ye?hB(ye.frame):void 0,[ye]),je=(0,N.useMemo)(()=>Ae?_B(Ae,u):[],[Ae,u]),Me=(0,N.useMemo)(()=>Ae?yB(Ae,he,u):void 0,[Ae,he,u]),Ne=Me?.frame.useNoBorder===!0,Pe=Me?.layout.useFullBorder===!0,Fe=(0,N.useMemo)(()=>({border:Dj({borderColor:_e,masks:ye?mR(ye,we):void 0,useNoBorder:Ne,useFullBorder:Pe}),settings:{...Me?.layout,useNyxBorder:g,useUBCrowns:de,...c===null?{}:{frameVariant:c}}}),[ye,we,_e,Ne,Pe,Me,g,de,c]),Ie=(0,N.useMemo)(()=>ye&&M?pR(ye,M,Fe):[],[ye,M,Fe]),Le=(0,N.useMemo)(()=>ye?pB({payload:ye,assetSlot:Ce,maskSlot:we,boxSlot:M,shape:m,useNyxBorder:g,card:{nickname:D.nicknameTitle??``,power:D.power??``,toughness:D.toughness??``},useNyxInsert:le,useUBCrowns:de,borderColor:_e,useNoBorder:Ne,useFullBorder:Pe,inspectMasks:pe}):{layers:[],frameCutoutUrls:[],cutoutUrls:[]},[ye,Ce,we,M,m,D,g,le,de,_e,Ne,Pe,pe]);(0,N.useEffect)(()=>{me(new Set)},[i,c,u]),(0,N.useEffect)(()=>{ge({})},[i]),(0,N.useEffect)(()=>{let e=xe[0];e!==void 0&&!xe.includes(u)&&d(e)},[xe,u]),(0,N.useEffect)(()=>{let e=Se.filter(e=>e.kind===`boxes`),t=e[0];t!==void 0&&!e.some(e=>e.key===f)&&p(t.key)},[Se,f]);let Re=(0,N.useCallback)(async(e,t,n={})=>{if(!i)return;T(`saving…`);let r=await EM(i,e,{...n.confirmShared===!0?{confirmShared:!0}:{}});if(r.shared)re({edits:e,shared:r.shared}),T(`shared — confirm`);else if(r.ok)oe.current=r.revision,n.track!==!1&&(ie.current=[...ie.current.slice(-49),{edits:e,inverse:t}],k.current=[]),T(`saved`);else{A(new Map),oe.current=void 0;let e=r.rejected?.[0];T(e?`${e.reason}: ${e.detail}`:`refused`),ve(i)}},[i,ve]),ze=(0,N.useCallback)((e,t)=>{if(!i||!M||!o)return;let n=fR(ye??o,M).find(t=>t.key===e)?.box,r=[],a=[];for(let[i,o]of Object.entries(t)){let t=n?.[i];t!==o&&(r.push({path:[...M.path,e,i],value:o}),t!==void 0&&a.push({path:[...M.path,e,i],value:t}))}r.length>0&&(A(e=>{let t=new Map(e);for(let e of r)t.set(xB(e.path),e.value);return t}),Re(r,a))},[i,M,o,ye,Re]);(0,N.useEffect)(()=>{let e=e=>{if(!e.ctrlKey&&!e.metaKey)return;let t=e.key.toLowerCase();if(t!==`z`&&t!==`y`)return;let n=t===`y`||e.shiftKey,r=(n?k.current:ie.current).pop();r?(e.preventDefault(),n?(ie.current=[...ie.current,r],Re(r.edits,r.inverse,{confirmShared:!0,track:!1})):(k.current=[...k.current,r],Re(r.inverse,r.edits,{confirmShared:!0,track:!1}))):T(n?`nothing to redo`:`nothing to undo`)};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[Re]);let Be=(0,N.useCallback)((e,t)=>{ze(e,{...t})},[ze]),Ve=e?.writeEnabled===!0;return(0,P.jsxs)(wn,{templateRows:`auto 1fr`,h:`100vh`,children:[(0,P.jsxs)(Mx,{gap:`3`,px:`3`,py:`2`,borderBottomWidth:`1px`,flexWrap:`wrap`,children:[(0,P.jsx)(Zo,{fontWeight:`bold`,children:`Frame Studio`}),(0,P.jsx)(Az,{label:`Frame`,width:`200px`,value:i??``,options:n.map(e=>({value:e.slug,label:`${e.name} (${e.slug})`})),onChange:e=>{a(e),y(void 0)}}),(0,P.jsx)(Az,{label:`Variant`,width:`160px`,value:c??AB,options:be.map(e=>({value:e.variant??AB,label:e.variant??`— base layouts`})),onChange:e=>{l(e===AB?null:e)}}),(0,P.jsx)(Az,{label:`Layout`,width:`180px`,value:u,options:xe.map(e=>({value:e,label:e})),onChange:d}),(0,P.jsx)(Az,{label:`Box set`,width:`190px`,value:f,options:Se.filter(e=>e.kind===`boxes`).map(e=>({value:e.key,label:e.key})),onChange:p}),De!==void 0&&(0,P.jsxs)(nx,{title:`This box set is read with the card turned ${String(De)}° clockwise. Its boxes are measured on the sheet as it then lies; collectorInfo stays on the unturned sheet. Change \`rotation\` in the frame's source.`,children:[`turned `,De,`°`]}),(0,P.jsx)(ux,{size:`xs`,variant:S?`solid`:`outline`,onClick:()=>{C(e=>!e)},children:`card face`}),(0,P.jsx)(Az,{label:`Sample text`,width:`130px`,value:se,options:Object.keys(EB).map(e=>({value:e,label:`${e} text`})),onChange:e=>{ce(e),te(e)}}),(0,P.jsx)(cB,{size:`xs`}),!Ve&&(0,P.jsx)(nx,{colorPalette:`yellow`,children:`read-only`}),Le.fallbackNote!==void 0&&(0,P.jsx)(nx,{colorPalette:`yellow`,title:Le.fallbackNote,children:`art fallback`}),o?.stale===!0&&(0,P.jsx)(nx,{colorPalette:`red`,children:`source has an error`}),(0,P.jsx)(Zo,{ml:`auto`,color:`fg.muted`,maxW:`40%`,truncate:!0,title:w,children:w})]}),(0,P.jsxs)(wn,{templateColumns:`260px 1fr 300px`,minH:`0`,children:[(0,P.jsxs)(gS,{align:`stretch`,gap:`0`,borderRightWidth:`1px`,overflowY:`auto`,p:`2`,children:[(0,P.jsx)(AM,{boxes:Ee,selected:v,hidden:b,overflow:E,onSelect:y,onToggleHidden:e=>{x(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}}),(0,P.jsx)(az,{masks:ke,enabled:pe,onToggle:e=>{me(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}})]}),ye?(0,P.jsx)(KR,{payload:ye,boxSlot:M,art:Le.layers,frameCutoutUrls:Le.frameCutoutUrls,ring:Le.ring,cutoutUrls:Le.cutoutUrls,previewBoxes:Ie,selected:v,hidden:b,showCardFace:S,editable:Ve,onSelect:y,onCommit:Be,onHover:kB,sampleText:D,ptIsVehicle:m.isVehicle===!0,onOverflow:ee}):(0,P.jsx)(pn,{display:`grid`,placeItems:`center`,color:`fg.muted`,children:`loading…`}),ne&&(0,P.jsx)(Wz,{shared:ne.shared,onCancel:()=>{re(void 0),A(new Map),oe.current=void 0,T(`cancelled`),i&&ve(i)},onConfirm:()=>{let{edits:e}=ne;re(void 0),Re(e,[],{confirmShared:!0})}}),(0,P.jsxs)(pn,{borderLeftWidth:`1px`,overflowY:`auto`,children:[(0,P.jsx)(XR,{shape:m,useNyxBorder:g,summary:uB(m,g),useNyxInsert:le,useUBCrowns:de,onChange:h,onNyxBorderChange:_,onNyxInsertChange:ue,onUBCrownsChange:fe}),(0,P.jsx)(Pz,{entries:je,values:Me?.frame??{},layout:u,borderColor:_e,borderState:Fe.border,onBorderColorChange:j,onChange:(e,t)=>{ge(n=>vB(n,e,u,t))}}),(0,P.jsxs)(gS,{align:`stretch`,gap:`1`,p:`3`,borderBottomWidth:`1px`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,textTransform:`uppercase`,color:`fg.muted`,children:`Sample text`}),[`power`,`toughness`].map(e=>(0,P.jsxs)(Mx,{gap:`2`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,w:`80px`,truncate:!0,children:e}),(0,P.jsx)(Fx,{size:`xs`,value:D[e]??``,onChange:t=>{O(e,t.target.value)}})]},e)),Ee.filter(({key:e})=>CR(e)&&e!==`pt`||e===`collectorInfo`).map(({key:e})=>(0,P.jsxs)(Mx,{gap:`2`,children:[(0,P.jsx)(Zo,{fontSize:`xs`,color:`fg.muted`,w:`80px`,truncate:!0,children:e}),(0,P.jsx)(Fx,{size:`xs`,value:D[e]??``,onChange:t=>{O(e,t.target.value)}})]},e)),(0,P.jsx)(Zo,{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. The collector line is a stand-in, there to show the style the settings above give it.`})]}),i&&ye&&Te.length>0&&(0,P.jsx)(iz,{slug:i,payload:ye,slots:Te,editable:Ve,onChange:(e,t)=>{let n=cR(ye.frame,e);Re([{path:[...e],value:t}],typeof n==`number`||typeof n==`boolean`?[{path:[...e],value:n}]:[])}}),i&&M&&(0,P.jsx)(rz,{slug:i,boxKey:v,box:Oe,basePath:M.path,state:Fe,editable:Ve,onChange:(e,t)=>{v&&ze(v,{[e]:t})}})]})]})]})}var MB=document.getElementById(`root`);if(!MB)throw Error(`no #root element`);(0,bM.createRoot)(MB).render((0,P.jsx)(N.StrictMode,{children:(0,P.jsx)(Jt,{value:Yb,children:(0,P.jsx)(aB,{defaultTheme:`dark`,children:(0,P.jsx)(jB,{})})})}));