@openzeppelin/contracts-mcp 0.7.1 → 0.7.2
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.
- package/apps/cairo.html +1 -1
- package/apps/confidential.html +1 -1
- package/apps/solidity.html +2 -2
- package/apps/stellar.html +1 -1
- package/apps/stylus.html +1 -1
- package/apps/tron.html +2 -2
- package/apps/uniswap-hooks.html +1 -1
- package/dist/solidity/tools/erc20.d.ts.map +1 -1
- package/dist/solidity/tools/erc20.js +2 -1
- package/dist/solidity/tools/erc20.js.map +1 -1
- package/dist/solidity/tools/rwa.d.ts.map +1 -1
- package/dist/solidity/tools/rwa.js +2 -1
- package/dist/solidity/tools/rwa.js.map +1 -1
- package/dist/solidity/tools/stablecoin.d.ts.map +1 -1
- package/dist/solidity/tools/stablecoin.js +2 -1
- package/dist/solidity/tools/stablecoin.js.map +1 -1
- package/dist/tron/tools/erc20.js +1 -1
- package/dist/tron/tools/erc20.js.map +1 -1
- package/package.json +3 -3
- package/src/solidity/tools/erc20.ts +2 -0
- package/src/solidity/tools/rwa.ts +2 -0
- package/src/solidity/tools/stablecoin.ts +2 -0
- package/src/tron/tools/erc20.ts +2 -2
package/apps/cairo.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<script>
|
|
16
|
-
!function(){"use strict";var e=[],t=[];!function(n,o){if(n&&"undefined"!=typeof document){var r,i=!0===o.prepend?"prepend":"append",a=!0===o.singleTag,s="string"==typeof o.container?document.querySelector(o.container):document.getElementsByTagName("head")[0];if(a){var c=e.indexOf(s);-1===c&&(c=e.push(s)-1,t[c]={}),r=t[c]&&t[c][i]?t[c][i]:t[c][i]=l()}else r=l();65279===n.charCodeAt(0)&&(n=n.substring(1)),r.styleSheet?r.styleSheet.cssText+=n:r.appendChild(document.createTextNode(n))}function l(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),o.attributes)for(var t=Object.keys(o.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],o.attributes[t[n]]);var r="prepend"===i?"afterbegin":"beforeend";return s.insertAdjacentElement(r,e),e}}("pre code.hljs {\n display: block;\n overflow-x: auto;\n padding: 1em\n}\ncode.hljs {\n padding: 3px 5px\n}\n/*\n\nAtom One Dark by Daniel Gamage\nOriginal One Dark Syntax theme from https://github.com/atom/one-dark-syntax\n\nbase: #282c34\nmono-1: #abb2bf\nmono-2: #818896\nmono-3: #5c6370\nhue-1: #56b6c2\nhue-2: #61aeee\nhue-3: #c678dd\nhue-4: #98c379\nhue-5: #e06c75\nhue-5-2: #be5046\nhue-6: #d19a66\nhue-6-2: #e6c07b\n\n*/\n.hljs {\n color: #abb2bf;\n background: #282c34\n}\n.hljs-comment,\n.hljs-quote {\n color: #5c6370;\n font-style: italic\n}\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n color: #c678dd\n}\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n color: #e06c75\n}\n.hljs-literal {\n color: #56b6c2\n}\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta .hljs-string {\n color: #98c379\n}\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n color: #d19a66\n}\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n color: #61aeee\n}\n.hljs-built_in,\n.hljs-title.class_,\n.hljs-class .hljs-title {\n color: #e6c07b\n}\n.hljs-emphasis {\n font-style: italic\n}\n.hljs-strong {\n font-weight: bold\n}\n.hljs-link {\n text-decoration: underline\n}\n\n.visible {\n visibility: visible\n}\n\n.invisible {\n visibility: hidden\n}\n\n.collapse {\n visibility: collapse\n}\n\n.fixed {\n position: fixed\n}\n\n.absolute {\n position: absolute\n}\n\n.relative {\n position: relative\n}\n\n.bottom-1 {\n bottom: 0.25rem\n}\n\n.bottom-4 {\n bottom: 1rem\n}\n\n.bottom-8 {\n bottom: 2rem\n}\n\n.bottom-\\[3\\.75rem\\] {\n bottom: 3.75rem\n}\n\n.left-4 {\n left: 1rem\n}\n\n.right-0 {\n right: 0px\n}\n\n.right-4 {\n right: 1rem\n}\n\n.right-8 {\n right: 2rem\n}\n\n.z-20 {\n z-index: 20\n}\n\n.z-50 {\n z-index: 50\n}\n\n.m-0 {\n margin: 0px\n}\n\n.m-\\[2px\\] {\n margin: 2px\n}\n\n.mb-1 {\n margin-bottom: 0.25rem\n}\n\n.ml-1 {\n margin-left: 0.25rem\n}\n\n.ml-2 {\n margin-left: 0.5rem\n}\n\n.ml-auto {\n margin-left: auto\n}\n\n.mr-2 {\n margin-right: 0.5rem\n}\n\n.block {\n display: block\n}\n\n.flex {\n display: flex\n}\n\n.grid {\n display: grid\n}\n\n.contents {\n display: contents\n}\n\n.hidden {\n display: none\n}\n\n.h-10 {\n height: 2.5rem\n}\n\n.h-14 {\n height: 3.5rem\n}\n\n.h-32 {\n height: 8rem\n}\n\n.h-6 {\n height: 1.5rem\n}\n\n.h-\\[32px\\] {\n height: 32px\n}\n\n.h-\\[36px\\] {\n height: 36px\n}\n\n.h-\\[calc\\(100\\%-188px\\)\\] {\n height: calc(100% - 188px)\n}\n\n.h-\\[calc\\(100\\%-800px\\)\\] {\n height: calc(100% - 800px)\n}\n\n.h-full {\n height: 100%\n}\n\n.max-h-full {\n max-height: 100%\n}\n\n.min-h-0 {\n min-height: 0px\n}\n\n.min-h-\\[200px\\] {\n min-height: 200px\n}\n\n.w-10 {\n width: 2.5rem\n}\n\n.w-32 {\n width: 8rem\n}\n\n.w-6 {\n width: 1.5rem\n}\n\n.w-60 {\n width: 15rem\n}\n\n.w-80 {\n width: 20rem\n}\n\n.w-\\[32px\\] {\n width: 32px\n}\n\n.w-\\[36px\\] {\n width: 36px\n}\n\n.w-\\[40rem\\] {\n width: 40rem\n}\n\n.w-full {\n width: 100%\n}\n\n.min-w-0 {\n min-width: 0px\n}\n\n.min-w-\\[14rem\\] {\n min-width: 14rem\n}\n\n.min-w-\\[40px\\] {\n min-width: 40px\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px\n}\n\n.max-w-\\[42\\%\\] {\n max-width: 42%\n}\n\n.flex-1 {\n flex: 1 1 0%\n}\n\n.flex-none {\n flex: none\n}\n\n.shrink-0 {\n flex-shrink: 0\n}\n\n.grow {\n flex-grow: 1\n}\n\n.basis-0 {\n flex-basis: 0px\n}\n\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0\n }\n 100% {\n opacity: 1\n }\n}\n\n.animate-fade-in {\n animation: fade-in 0.3s ease-out\n}\n\n@keyframes fade-up {\n 0% {\n opacity: 0;\n transform: translateY(1rem)\n }\n 100% {\n opacity: 1;\n transform: translateY(0)\n }\n}\n\n.animate-fade-up {\n animation: fade-up 0.2s ease-out\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg)\n }\n}\n\n.animate-spin-slow {\n animation: spin 2s linear infinite\n}\n\n.cursor-pointer {\n cursor: pointer\n}\n\n.resize-none {\n resize: none\n}\n\n.resize {\n resize: both\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr))\n}\n\n.grid-cols-\\[2fr\\2c 1fr\\] {\n grid-template-columns: 2fr 1fr\n}\n\n.flex-row {\n flex-direction: row\n}\n\n.flex-col {\n flex-direction: column\n}\n\n.flex-col-reverse {\n flex-direction: column-reverse\n}\n\n.flex-wrap {\n flex-wrap: wrap\n}\n\n.items-center {\n align-items: center\n}\n\n.justify-center {\n justify-content: center\n}\n\n.justify-between {\n justify-content: space-between\n}\n\n.gap-2 {\n gap: 0.5rem\n}\n\n.gap-3 {\n gap: 0.75rem\n}\n\n.gap-4 {\n gap: 1rem\n}\n\n.overflow-auto {\n overflow: auto\n}\n\n.overflow-hidden {\n overflow: hidden\n}\n\n.overflow-x-auto {\n overflow-x: auto\n}\n\n.overflow-y-auto {\n overflow-y: auto\n}\n\n.rounded-full {\n border-radius: 9999px\n}\n\n.rounded-md {\n border-radius: 0.375rem\n}\n\n.rounded-xl {\n border-radius: 0.75rem\n}\n\n.border {\n border-width: 1px\n}\n\n.border-0 {\n border-width: 0px\n}\n\n.border-b {\n border-bottom-width: 1px\n}\n\n.border-r {\n border-right-width: 1px\n}\n\n.border-solid {\n border-style: solid\n}\n\n.border-none {\n border-style: none\n}\n\n.border-\\[var\\(--gray-3\\)\\] {\n border-color: var(--gray-3)\n}\n\n.border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1))\n}\n\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1))\n}\n\n.bg-transparent {\n background-color: transparent\n}\n\n.p-2 {\n padding: 0.5rem\n}\n\n.p-3 {\n padding: 0.75rem\n}\n\n.p-4 {\n padding: 1rem\n}\n\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem\n}\n\n.pr-2 {\n padding-right: 0.5rem\n}\n\n.text-center {\n text-align: center\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem\n}\n\n.font-bold {\n font-weight: 700\n}\n\n.lowercase {\n text-transform: lowercase\n}\n\n.italic {\n font-style: italic\n}\n\n.text-gray-50 {\n --tw-text-opacity: 1;\n color: rgb(249 250 251 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1))\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1))\n}\n\n.underline {\n text-decoration-line: underline\n}\n\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)\n}\n\n*,\n*:before,\n*:after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\nhtml {\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n}\n\ncode {\n font-family: var(--monospace);\n font-size: 1em;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n}\n:root {\n --sans-serif: system-ui, sans-serif;\n --monospace: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;\n\n /* Colors */\n\n --text-color: #333333;\n\n --gray-1: #f9fafb;\n --gray-2: #eff1f3;\n --gray-3: #d8dbe2;\n --gray-4: #818998;\n --gray-5: #575c66;\n --gray-6: #2c374b;\n\n --blue-1: #f5f6ff;\n --blue-2: #4e5de4;\n --blue-3: #343f9d;\n\n --yellow-1: #fffaeb;\n --yellow-2: #ffcc33;\n --yellow-3: #b27700;\n\n --red-1: #feecec;\n --red-2: #f53d3d;\n --red-3: #aa0909;\n\n --solidity-blue-1: #51d4ff;\n --solidity-blue-2: #4e5de4;\n\n --cairo-orange: #fe4a3c;\n\n --polkadot-pink: #ff2670;\n\n --stylus-pink: #e3066e;\n\n --stellar-black: #0f0f0f;\n\n --confidential-black: #000000;\n --confidential-yellow: #ffd208;\n\n --uniswap-pink: #f50eb4;\n\n /* TRON Red, per the official brand palette (PANTONE 185C). */\n --tron-red: #dc062b;\n\n /* Dimensions (scale taken from Tailwind) */\n\n --size-1: 0.25rem;\n --size-2: 0.5rem;\n --size-3: 0.75rem;\n --size-4: 1rem;\n --size-8: 2rem;\n --size-64: 16rem;\n\n /* Font Sizes */\n\n --text-small: 0.875rem;\n\n /* Utilities */\n\n --shadow: 0 2px 3px rgba(0, 0, 0, 0.1);\n\n --icon-adjust: 0.125em;\n}\n.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}\n[data-tippy-root]{max-width:calc(100vw - 10px)}\n.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}\n.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}\n.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}\n.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}\n.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}\n.tippy-box[data-placement^=left]>.tippy-arrow{right:0}\n.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}\n.tippy-box[data-placement^=right]>.tippy-arrow{left:0}\n.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}\n.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}\n.tippy-arrow{width:16px;height:16px;color:#333}\n.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}\n.tippy-content{position:relative;padding:5px 9px;z-index:1}\n.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}\n.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}\n:root {\n --tippy-background: #333;\n --tippy-text: var(--gray-3);\n --tippy-border: rgba(0, 8, 16, 0.15);\n}\n.tippy-box[data-theme~='light'] {\n --tippy-background: #fffffff5;\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-yellow'] {\n --tippy-background: var(--yellow-1);\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-red'] {\n --tippy-background: var(--red-1);\n --tippy-text: #333;\n}\n.tippy-box {\n background-color: var(--tippy-background);\n background-clip: padding-box;\n color: var(--tippy-text);\n box-shadow: var(--shadow);\n font-weight: initial;\n font-variant: initial;\n text-transform: none;\n}\n.tippy-box[data-theme~='border'] {\n border: 1px solid var(--tippy-border);\n}\n.tippy-box > .tippy-backdrop {\n background-color: var(--tippy-background);\n}\n.tippy-box[data-theme~='border'] > .tippy-arrow:after {\n content: '';\n position: absolute;\n z-index: -1;\n border-color: transparent;\n border-style: solid;\n}\n.tippy-box[data-placement^='top'] > .tippy-arrow:before {\n border-top-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='bottom'] > .tippy-arrow:before {\n border-bottom-color: var(--tippy-background);\n bottom: 16px;\n}\n.tippy-box[data-placement^='left'] > .tippy-arrow:before {\n border-left-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='right'] > .tippy-arrow:before {\n border-right-color: var(--tippy-background);\n right: 16px;\n}\n.tippy-box[data-theme~='border'][data-placement^='top'] > .tippy-arrow:after {\n border-top-color: var(--tippy-border);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='bottom'] > .tippy-arrow:after {\n border-bottom-color: var(--tippy-border);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='left'] > .tippy-arrow:after {\n border-left-color: var(--tippy-border);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='right'] > .tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: var(--tippy-border);\n}\n.container {\n background-color: var(--gray-1);\n min-width: 32rem;\n}\n.header {\n font-size: var(--text-small);\n}\n.tab {\n color: var(--gray-5);\n}\n.tab button:hover,\n.overflow-btn:hover {\n background-color: var(--gray-2);\n}\n/* Global .overflow-menu button with .selected class */\n.overflow-menu button.selected {\n order: unset;\n}\n.tab button,\n.overflow-btn {\n border: 0;\n background-color: transparent;\n padding: var(--size-2) var(--size-4);\n border-radius: 20px;\n cursor: pointer;\n transition: background-color ease-in-out 0.2s;\n}\n/* Global .action-button */\n.action-button {\n padding: 7px;\n border-radius: 20px;\n transition: background-color ease-in-out 0.2s;\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n color: var(--gray-6);\n cursor: pointer;\n}\n/* Hover and active states for .action-button */\n.action-button:hover {\n background-color: var(--gray-2);\n}\n.action-button:active,\n.action-button.active {\n background-color: var(--gray-2);\n}\n/* .icon inside .action-button */\n.action-button .icon {\n margin: 0 var(--size-1);\n}\n/* Disabled state */\n.action-button.disabled {\n color: var(--gray-4);\n}\n/* Button with text */\n.with-text {\n padding-right: var(--size-3);\n}\n/* Controls container */\n.controls {\n background-color: white;\n padding: var(--size-4);\n}\n/* Controls footer */\n.controls-footer {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n color: var(--gray-5);\n margin-top: var(--size-3);\n padding: 0 var(--size-2);\n font-size: var(--text-small);\n}\n/* Apply left margin to every element after the first child */\n.controls-footer > * + * {\n margin-left: var(--size-3);\n}\n/* .icon inside .controls-footer */\n.controls-footer .icon {\n margin-right: 0.2em;\n opacity: 0.8;\n}\n/* Links inside .controls-footer */\n.controls-footer a {\n color: inherit;\n text-decoration: none;\n}\n/* Hover effect for links */\n.controls-footer a:hover {\n color: var(--text-color);\n}\n.download-option-content {\n margin-left: var(--size-3);\n font-size: var(--text-small);\n}\n.download-option-content > :first-child {\n margin-bottom: var(--size-2);\n color: var(--gray-6);\n font-weight: bold;\n}\n.download-option-content > :not(:first-child) {\n margin-top: var(--size-1);\n color: var(--gray-5);\n}\n.download-option {\n display: flex;\n padding: var(--size-2);\n text-align: left;\n background: none;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n}\n/* The .icon inside .download-option */\n.download-option :global(.icon) {\n margin-top: var(--icon-adjust);\n}\n/* When the previous sibling is not hovered */\n:not(:hover) + .download-option {\n border-top: 1px solid var(--gray-2);\n}\n/* Hover and focus states */\n.download-option:hover,\n.download-option:focus {\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n}\n/* Direct or nested div inside .download-option */\n.download-option div {\n display: block;\n}\n\n/* General */\n\nbody {\n color: var(--text-color);\n font-family: var(--sans-serif);\n}\n\nsvg.vertical-align {\n vertical-align: calc(-1 * var(--icon-adjust));\n}\n\nsvg.keepcolor {\n fill: currentColor;\n}\n\nsvg.icon {\n vertical-align: calc(-1 * var(--icon-adjust));\n flex: 0 0 auto;\n height: 1em;\n width: 1em;\n fill: currentColor;\n}\n\ninput:not([type]),\ninput[type='text'],\ninput[type='number'],\ninput[type='datetime-local'] {\n border: 1px solid var(--gray-3);\n padding: var(--size-2) var(--size-3);\n border-radius: 6px;\n}\n\n/* Hide up and down arrows in numeric input fields */\n\ninput[type='number']::-webkit-outer-spin-button,\ninput[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type='number'] {\n -moz-appearance: textfield;\n -webkit-appearance: textfield;\n appearance: textfield;\n}\n\n/* Components */\n\n.controls-section {\n display: flex;\n flex-direction: column;\n}\n\n.controls-section + .controls-section {\n margin-top: var(--size-4);\n padding-top: var(--size-4);\n border-top: 1px solid var(--gray-3);\n }\n\n.controls-section > * + * {\n margin-top: var(--size-3);\n }\n\n.controls-section h1 {\n margin-top: 0;\n margin-bottom: 0;\n text-transform: lowercase;\n font-variant: small-caps;\n font-size: var(--text-small);\n color: var(--gray-4);\n font-weight: 600;\n }\n\n.subcontrol::before {\n content: '└';\n color: var(--gray-3);\n}\n\n.checkbox-group {\n display: flex;\n flex-direction: column;\n}\n\n.checkbox-group > * {\n display: flex;\n align-items: center;\n padding: var(--size-2);\n }\n\n.checkbox-group input {\n margin-right: var(--size-2);\n }\n\n.checkbox-group .tooltip {\n margin-left: auto;\n }\n\n.checkbox-group .checked {\n background-color: var(--blue-1);\n }\n\n.labeled-input {\n display: flex;\n flex-direction: column;\n}\n\n.labeled-input > span {\n font-size: var(--text-small);\n }\n\n.labeled-input > input {\n margin-top: var(--size-1);\n width: 100%;\n }\n\n.tooltip-container,\n.checkbox-group > *,\n.labeled-input {\n --tooltip-opacity: 0.15;\n}\n\n.tooltip-container:hover, .checkbox-group > *:hover, .labeled-input:hover {\n --tooltip-opacity: 0.5;\n }\n\ninput.input-inline {\n padding: 0.25em;\n height: 1.5em;\n width: 2em;\n max-width: 100%;\n text-align: center;\n}\n\n.has-error {\n box-shadow: 0 0 var(--size-1) var(--red-2);\n}\n\n.import-link {\n color: inherit;\n}\n\n.comment-link {\n color: #7d828d;\n}\n\n.glimmery {\n background: conic-gradient(rgb(196, 181, 253), rgb(110, 231, 183), rgb(249, 168, 212));\n}\n\n.hljs.-solidity {\n background: linear-gradient(30deg, #151a24, #2b323e);\n}\n\n.hljs.-cairo {\n background: linear-gradient(30deg, #191717, #2a0f0f);\n}\n\n.hljs.-stylus {\n background: linear-gradient(30deg, #181215, #360c1f);\n}\n\n.light-link {\n color: white;\n}\n\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))\n}\n",{});const n=Object.freeze({status:"aborted"});function o(e,t,n){function o(n,o){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:o,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,o);const r=a.prototype,i=Object.keys(r);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class i extends r{}function a(e){var t;const r=n?.Parent?new i:this;o(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const r=Symbol("zod_brand");class i extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class a extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const s={};function c(e){return e&&Object.assign(s,e),s}function l(e){const t=Object.values(e).filter(e=>"number"==typeof e),n=Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t);return n}function u(e,t="|"){return e.map(e=>O(e)).join(t)}function d(e,t){return"bigint"==typeof t?t.toString():t}function p(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function m(e){return null==e}function f(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function h(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let r=(o.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(o)){const e=o.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}const g=Symbol("evaluating");function v(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==g)return void 0===o&&(o=g,o=n()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function y(e){return JSON.stringify(e)}function _(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const k="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function x(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const w=p(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function I(e){if(!1===x(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==x(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function C(e){return I(e)?{...e}:Array.isArray(e)?[...e]:e}const S=new Set(["string","number","symbol"]),E=new Set(["string","number","bigint","boolean","symbol","undefined"]);function z(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(e,t,n){const o=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(o._zod.parent=e),o}function D(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function O(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function U(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const R={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},A={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function N(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return T(e,$(e._zod.def,{get shape(){const e={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(e[o]=n.shape[o])}return b(this,"shape",e),e},checks:[]}))}function j(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=$(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete o[e]}return b(this,"shape",o),o},checks:[]});return T(e,r)}function P(e,t){if(!I(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return T(e,o)}function M(e,t){if(!I(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return T(e,n)}function Z(e,t){const n=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return b(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return T(e,n)}function q(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=$(t._zod.def,{get shape(){const o=t._zod.def.shape,r={...o};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:o[t]}):o[t])}else for(const t in o)r[t]=e?new e({type:"optional",innerType:o[t]}):o[t];return b(this,"shape",r),r},checks:[]});return T(t,r)}function L(e,t,n){const o=$(t._zod.def,{get shape(){const o=t._zod.def.shape,r={...o};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:o[t]}))}else for(const t in o)r[t]=new e({type:"nonoptional",innerType:o[t]});return b(this,"shape",r),r}});return T(t,o)}function F(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function V(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function H(e){return"string"==typeof e?e:e?.message}function J(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const r=H(e.inst?._zod.def?.error?.(e))??H(t?.error?.(e))??H(n.customError?.(e))??H(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function G(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function B(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function W(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}function K(...e){const[t,n,o]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:o}:{...t}}function X(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Q(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Y=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:A,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:R,aborted:F,allowsEval:w,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error("Unexpected value in exhaustive check")},assertNotEqual:function(e){return e},assignProp:b,base64ToUint8Array:X,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return X(t+"=".repeat((4-t.length%4)%4))},cached:p,captureStackTrace:k,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:f,clone:T,cloneDef:function(e){return $(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,o,r)=>(t??(t=e()),Reflect.get(t,o,r)),set:(n,o,r,i)=>(t??(t=e()),Reflect.set(t,o,r,i)),has:(n,o)=>(t??(t=e()),Reflect.has(t,o)),deleteProperty:(n,o)=>(t??(t=e()),Reflect.deleteProperty(t,o)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,o)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)),defineProperty:(n,o,r)=>(t??(t=e()),Reflect.defineProperty(t,o,r))})},defineLazy:v,esc:y,escapeRegex:z,extend:P,finalizeIssue:J,floatSafeRemainder:h,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:l,getLengthableOrigin:B,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:G,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:x,isPlainObject:I,issue:K,joinValues:u,jsonStringifyReplacer:d,merge:Z,mergeDefs:$,normalizeParams:D,nullish:m,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:j,optionalKeys:U,parsedType:W,partial:q,pick:N,prefixIssues:V,primitiveTypes:E,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=e[o];return n})},propertyKeyTypes:S,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let o=0;o<e;o++)n+=t[Math.floor(26*Math.random())];return n},required:L,safeExtend:M,shallowClone:C,slugify:_,stringifyPrimitive:O,uint8ArrayToBase64:Q,uint8ArrayToBase64url:function(e){return Q(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:H});const ee=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,d,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},te=o("$ZodError",ee),ne=o("$ZodError",ee,{Parent:Error});function oe(e,t=e=>e.message){const n={},o=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function re(e,t=e=>e.message){const n={_errors:[]},o=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>o({issues:e}));else if("invalid_key"===r.code)o({issues:r.issues});else if("invalid_element"===r.code)o({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,o=0;for(;o<r.path.length;){const n=r.path[o];o===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],o++}}};return o(e),n}function ie(e,t=e=>e.message){const n={errors:[]},o=(e,r=[])=>{var i,a;for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>o({issues:e},s.path));else if("invalid_key"===s.code)o({issues:s.issues},s.path);else if("invalid_element"===s.code)o({issues:s.issues},s.path);else{const e=[...r,...s.path];if(0===e.length){n.errors.push(t(s));continue}let o=n,c=0;for(;c<e.length;){const n=e[c],r=c===e.length-1;"string"==typeof n?(o.properties??(o.properties={}),(i=o.properties)[n]??(i[n]={errors:[]}),o=o.properties[n]):(o.items??(o.items=[]),(a=o.items)[n]??(a[n]={errors:[]}),o=o.items[n]),r&&o.errors.push(t(s)),c++}}};return o(e),n}function ae(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function se(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ae(e.path)}`);return t.join("\n")}const ce=e=>(t,n,o,r)=>{const a=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new i;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>J(e,a,c())));throw k(t,r?.callee),t}return s.value},le=ce(ne),ue=e=>async(t,n,o,r)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>J(e,i,c())));throw k(t,r?.callee),t}return a.value},de=ue(ne),pe=e=>(t,n,o)=>{const r=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},r);if(a instanceof Promise)throw new i;return a.issues.length?{success:!1,error:new(e??te)(a.issues.map(e=>J(e,r,c())))}:{success:!0,data:a.value}},me=pe(ne),fe=e=>async(t,n,o)=>{const r=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>J(e,r,c())))}:{success:!0,data:i.value}},he=fe(ne),ge=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ce(e)(t,n,r)},ve=ge(ne),be=e=>(t,n,o)=>ce(e)(t,n,o),$e=be(ne),ye=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ue(e)(t,n,r)},_e=ye(ne),ke=e=>async(t,n,o)=>ue(e)(t,n,o),xe=ke(ne),we=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return pe(e)(t,n,r)},Ie=we(ne),Ce=e=>(t,n,o)=>pe(e)(t,n,o),Se=Ce(ne),Ee=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fe(e)(t,n,r)},ze=Ee(ne),Te=e=>async(t,n,o)=>fe(e)(t,n,o),De=Te(ne),Oe=/^[cC][^\s-]{8,}$/,Ue=/^[0-9a-z]+$/,Re=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ae=/^[0-9a-vA-V]{20}$/,Ne=/^[A-Za-z0-9]{27}$/,je=/^[a-zA-Z0-9_-]{21}$/,Pe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Me=/^([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})$/,Ze=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qe=Ze(4),Le=Ze(6),Fe=Ze(7),Ve=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,He=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Je=He;function Ge(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const Be=/^(?:(?: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])$/,We=/^(([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}|:))$/,Ke=e=>{const t=z(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Xe=/^((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])$/,Qe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ye=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,et=/^[A-Za-z0-9_-]*$/,tt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,nt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ot=/^\+[1-9]\d{6,14}$/,rt="(?:(?:\\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])))",it=new RegExp(`^${rt}$`);function at(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function st(e){return new RegExp(`^${at(e)}$`)}function ct(e){const t=at({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${rt}T(?:${o})$`)}const lt=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),ut=/^-?\d+n?$/,dt=/^-?\d+$/,pt=/^-?\d+(?:\.\d+)?$/,mt=/^(?:true|false)$/i,ft=/^null$/i,ht=/^undefined$/i,gt=/^[^A-Z]*$/,vt=/^[^a-z]*$/,bt=/^[0-9a-fA-F]*$/;function $t(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function yt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const _t=$t(22,"=="),kt=yt(22),xt=$t(27,"="),wt=yt(27),It=$t(43,"="),Ct=yt(43),St=$t(64,""),Et=yt(64),zt=$t(86,"=="),Tt=yt(86);var Dt=Object.freeze({__proto__:null,base64:Ye,base64url:et,bigint:ut,boolean:mt,browserEmail:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cidrv4:Xe,cidrv6:Qe,cuid:Oe,cuid2:Ue,date:it,datetime:ct,domain:nt,duration:Pe,e164:ot,email:Ve,emoji:Ge,extendedDuration:/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,guid:Me,hex:bt,hostname:tt,html5Email:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,idnEmail:Je,integer:dt,ipv4:Be,ipv6:We,ksuid:Ne,lowercase:gt,mac:Ke,md5_base64:_t,md5_base64url:kt,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:je,null:ft,number:pt,rfc5322Email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,sha1_base64:xt,sha1_base64url:wt,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:It,sha256_base64url:Ct,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:St,sha384_base64url:Et,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:zt,sha512_base64url:Tt,sha512_hex:/^[0-9a-fA-F]{128}$/,string:lt,time:st,ulid:Re,undefined:ht,unicodeEmail:He,uppercase:vt,uuid:Ze,uuid4:qe,uuid6:Le,uuid7:Fe,xid:Ae});const Ot=o("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ut={number:"number",bigint:"bigint",object:"date"},Rt=o("$ZodCheckLessThan",(e,t)=>{Ot.init(e,t);const n=Ut[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),At=o("$ZodCheckGreaterThan",(e,t)=>{Ot.init(e,t);const n=Ut[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Nt=o("$ZodCheckMultipleOf",(e,t)=>{Ot.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 new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===h(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),jt=o("$ZodCheckNumberFormat",(e,t)=>{Ot.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[r,i]=R[t.format];e._zod.onattach.push(e=>{const o=e._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i,n&&(o.pattern=dt)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}))}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Pt=o("$ZodCheckBigIntFormat",(e,t)=>{Ot.init(e,t);const[n,o]=A[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=o}),e._zod.check=r=>{const i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Mt=o("$ZodCheckMaxSize",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;o.size<=t.maximum||n.issues.push({origin:G(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Zt=o("$ZodCheckMinSize",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;o.size>=t.minimum||n.issues.push({origin:G(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qt=o("$ZodCheckSizeEquals",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const o=n.value,r=o.size;if(r===t.size)return;const i=r>t.size;n.issues.push({origin:G(o),...i?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Lt=o("$ZodCheckMaxLength",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const r=B(o);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ft=o("$ZodCheckMinLength",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const r=B(o);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vt=o("$ZodCheckLengthEquals",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const o=n.value,r=o.length;if(r===t.length)return;const i=B(o),a=r>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ht=o("$ZodCheckStringFormat",(e,t)=>{var n,o;Ot.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(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})}):(o=e._zod).check??(o.check=()=>{})}),Jt=o("$ZodCheckRegex",(e,t)=>{Ht.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})}}),Gt=o("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=gt),Ht.init(e,t)}),Bt=o("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vt),Ht.init(e,t)}),Wt=o("$ZodCheckIncludes",(e,t)=>{Ot.init(e,t);const n=z(t.includes),o=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),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})}}),Kt=o("$ZodCheckStartsWith",(e,t)=>{Ot.init(e,t);const n=new RegExp(`^${z(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(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})}}),Xt=o("$ZodCheckEndsWith",(e,t)=>{Ot.init(e,t);const n=new RegExp(`.*${z(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(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})}});function Qt(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues))}const Yt=o("$ZodCheckProperty",(e,t)=>{Ot.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Qt(n,e,t.property));Qt(n,e,t.property)}}),en=o("$ZodCheckMimeType",(e,t)=>{Ot.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),tn=o("$ZodCheckOverwrite",(e,t)=>{Ot.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class nn{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),o=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of o)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const on={major:4,minor:3,patch:6},rn=o("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=on;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const t of o)for(const n of t._zod.onattach)n(e);if(0===o.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let o,r=F(e);for(const a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new i;if(o||s instanceof Promise)o=(o??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=F(e,t)))});else{if(e.issues.length===t)continue;r||(r=F(e,t))}}return o?o.then(()=>e):e},n=(n,r,a)=>{if(F(n))return n.aborted=!0,n;const s=t(r,o,a);if(s instanceof Promise){if(!1===a.async)throw new i;return s.then(t=>e._zod.parse(t,a))}return e._zod.parse(s,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if("backward"===a.direction){const 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)}const s=e._zod.parse(r,a);if(s instanceof Promise){if(!1===a.async)throw new i;return s.then(e=>t(e,o,a))}return t(s,o,a)}}v(e,"~standard",()=>({validate:t=>{try{const n=me(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return he(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),an=o("$ZodString",(e,t)=>{rn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??lt(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(o){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),sn=o("$ZodStringFormat",(e,t)=>{Ht.init(e,t),an.init(e,t)}),cn=o("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Me),sn.init(e,t)}),ln=o("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ze(e))}else t.pattern??(t.pattern=Ze());sn.init(e,t)}),un=o("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ve),sn.init(e,t)}),dn=o("$ZodURL",(e,t)=>{sn.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),r=new URL(o);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.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&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=o)}catch(o){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),pn=o("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ge()),sn.init(e,t)}),mn=o("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=je),sn.init(e,t)}),fn=o("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Oe),sn.init(e,t)}),hn=o("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ue),sn.init(e,t)}),gn=o("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Re),sn.init(e,t)}),vn=o("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ae),sn.init(e,t)}),bn=o("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ne),sn.init(e,t)}),$n=o("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ct(t)),sn.init(e,t)}),yn=o("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=it),sn.init(e,t)}),_n=o("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=st(t)),sn.init(e,t)}),kn=o("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Pe),sn.init(e,t)}),xn=o("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Be),sn.init(e,t),e._zod.bag.format="ipv4"}),wn=o("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=We),sn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),In=o("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ke(t.delimiter)),sn.init(e,t),e._zod.bag.format="mac"}),Cn=o("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Xe),sn.init(e,t)}),Sn=o("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Qe),sn.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(2!==o.length)throw new Error;const[e,t]=o;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function En(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const zn=o("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ye),sn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{En(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Tn(e){if(!et.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return En(t.padEnd(4*Math.ceil(t.length/4),"="))}const Dn=o("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=et),sn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Tn(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),On=o("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ot),sn.init(e,t)});function Un(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[o]=n;if(!o)return!1;const r=JSON.parse(atob(o));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Rn=o("$ZodJWT",(e,t)=>{sn.init(e,t),e._zod.check=n=>{Un(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),An=o("$ZodCustomStringFormat",(e,t)=>{sn.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Nn=o("$ZodNumber",(e,t)=>{rn.init(e,t),e._zod.pattern=e._zod.bag.pattern??pt,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const i="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),jn=o("$ZodNumberFormat",(e,t)=>{jt.init(e,t),Nn.init(e,t)}),Pn=o("$ZodBoolean",(e,t)=>{rn.init(e,t),e._zod.pattern=mt,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Mn=o("$ZodBigInt",(e,t)=>{rn.init(e,t),e._zod.pattern=ut,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Zn=o("$ZodBigIntFormat",(e,t)=>{Pt.init(e,t),Mn.init(e,t)}),qn=o("$ZodSymbol",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return"symbol"==typeof o||t.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),t}}),Ln=o("$ZodUndefined",(e,t)=>{rn.init(e,t),e._zod.pattern=ht,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{const o=t.value;return void 0===o||t.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),t}}),Fn=o("$ZodNull",(e,t)=>{rn.init(e,t),e._zod.pattern=ft,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const o=t.value;return null===o||t.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),t}}),Vn=o("$ZodAny",(e,t)=>{rn.init(e,t),e._zod.parse=e=>e}),Hn=o("$ZodUnknown",(e,t)=>{rn.init(e,t),e._zod.parse=e=>e}),Jn=o("$ZodNever",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),Gn=o("$ZodVoid",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return void 0===o||t.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),t}}),Bn=o("$ZodDate",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function Wn(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues)),t.value[n]=e.value}const Kn=o("$ZodArray",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const i=[];for(let e=0;e<r.length;e++){const a=r[e],s=t.element._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(t=>Wn(t,n,e))):Wn(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Xn(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...V(n,e.issues))}void 0===e.value?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function Qn(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=U(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Yn(e,t,n,o,r,i){const a=[],s=r.keySet,c=r.catchall._zod,l=c.def.type,u="optional"===c.optout;for(const r in t){if(s.has(r))continue;if("never"===l){a.push(r);continue}const i=c.run({value:t[r],issues:[]},o);i instanceof Promise?e.push(i.then(e=>Xn(e,n,r,t,u))):Xn(i,n,r,t,u)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const eo=o("$ZodObject",(e,t)=>{rn.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const o=p(()=>Qn(t));v(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const o=e[t]._zod;if(o.values){n[t]??(n[t]=new Set);for(const e of o.values)n[t].add(e)}}return n});const r=x,i=t.catchall;let a;e._zod.parse=(t,n)=>{a??(a=o.value);const s=t.value;if(!r(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const c=[],l=a.shape;for(const e of a.keys){const o=l[e],r="optional"===o._zod.optout,i=o._zod.run({value:s[e],issues:[]},n);i instanceof Promise?c.push(i.then(n=>Xn(n,t,e,s,r))):Xn(i,t,e,s,r)}return i?Yn(c,s,t,n,o.value,e):c.length?Promise.all(c).then(()=>t):t}}),to=o("$ZodObjectJIT",(e,t)=>{eo.init(e,t);const n=e._zod.parse,o=p(()=>Qn(t));let r;const i=x,a=!s.jitless,c=a&&w.value,l=t.catchall;let u;e._zod.parse=(s,d)=>{u??(u=o.value);const p=s.value;return i(p)?a&&c&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new nn(["shape","payload","ctx"]),n=o.value,r=e=>{const t=y(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let a=0;for(const e of n.keys)i[e]="key_"+a++;t.write("const newResult = {};");for(const o of n.keys){const n=i[o],a=y(o),s=e[o],c="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(o)};`),c?t.write(`\n if (${n}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),s=r(s,d),l?Yn([],p,s,d,u,e):s):n(s,d):(s.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),s)}});function no(e,t,n,o){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!F(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>J(e,o,c())))}),t)}const oo=o("$ZodUnion",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),v(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),v(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),v(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>f(e.source)).join("|")})$`)}});const n=1===t.options.length,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>no(t,r,e,i)):no(s,r,e,i)}});function ro(e,t,n,o){const r=e.filter(e=>0===e.issues.length);return 1===r.length?(t.value=r[0].value,t):(0===r.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>J(e,o,c())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}const io=o("$ZodXor",(e,t)=>{oo.init(e,t),t.inclusive=!1;const n=1===t.options.length,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(s.push(t),a=!0):s.push(t)}return a?Promise.all(s).then(t=>ro(t,r,e,i)):ro(s,r,e,i)}}),ao=o("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,oo.init(e,t);const n=e._zod.parse;v(e._zod,"propValues",()=>{const e={};for(const n of t.options){const o=n._zod.propValues;if(!o||0===Object.keys(o).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(o)){e[t]||(e[t]=new Set);for(const o of n)e[t].add(o)}}return e});const o=p(()=>{const e=t.options,n=new Map;for(const o of e){const e=o._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,o)}}return n});e._zod.parse=(r,i)=>{const a=r.value;if(!x(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;const s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),so=o("$ZodIntersection",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>{const o=e.value,r=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return r instanceof Promise||i instanceof Promise?Promise.all([r,i]).then(([t,n])=>lo(e,t,n)):lo(e,r,i)}});function co(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(I(e)&&I(t)){const n=Object.keys(t),o=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of o){const o=co(e[n],t[n]);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r[n]=o.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const r=co(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function lo(e,t,n){const o=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)o.has(e)||o.set(e,{}),o.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);const i=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&r&&e.issues.push({...r,keys:i}),F(e))return e;const a=co(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const uo=o("$ZodTuple",(e,t)=>{rn.init(e,t);const n=t.items;e._zod.parse=(o,r)=>{const i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const a=[],s=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),c=-1===s?0:n.length-s;if(!t.rest){const t=i.length>n.length,r=i.length<c-1;if(t||r)return o.issues.push({...t?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let l=-1;for(const e of n){if(l++,l>=i.length&&l>=c)continue;const t=e._zod.run({value:i[l],issues:[]},r);t instanceof Promise?a.push(t.then(e=>po(e,o,l))):po(t,o,l)}if(t.rest){const e=i.slice(n.length);for(const n of e){l++;const e=t.rest._zod.run({value:n,issues:[]},r);e instanceof Promise?a.push(e.then(e=>po(e,o,l))):po(e,o,l)}}return a.length?Promise.all(a).then(()=>o):o}});function po(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues)),t.value[n]=e.value}const mo=o("$ZodRecord",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!I(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const i=[],a=t.keyType._zod.values;if(a){n.value={};const s=new Set;for(const e of a)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){s.add("number"==typeof e?e.toString():e);const a=t.valueType._zod.run({value:r[e],issues:[]},o);a instanceof Promise?i.push(a.then(t=>{t.issues.length&&n.issues.push(...V(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...V(e,a.issues)),n.value[e]=a.value)}let c;for(const e in r)s.has(e)||(c=c??[],c.push(e));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(const a of Reflect.ownKeys(r)){if("__proto__"===a)continue;let s=t.keyType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof a&&pt.test(a)&&s.issues.length){const e=t.keyType._zod.run({value:Number(a),issues:[]},o);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>J(e,o,c())),input:a,path:[a],inst:e});continue}const l=t.valueType._zod.run({value:r[a],issues:[]},o);l instanceof Promise?i.push(l.then(e=>{e.issues.length&&n.issues.push(...V(a,e.issues)),n.value[s.value]=e.value})):(l.issues.length&&n.issues.push(...V(a,l.issues)),n.value[s.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),fo=o("$ZodMap",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const i=[];n.value=new Map;for(const[a,s]of r){const c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([t,i])=>{ho(t,i,n,a,r,e,o)})):ho(c,l,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function ho(e,t,n,o,r,i,a){e.issues.length&&(S.has(typeof o)?n.issues.push(...V(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(e=>J(e,a,c()))})),t.issues.length&&(S.has(typeof o)?n.issues.push(...V(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(e=>J(e,a,c()))})),n.value.set(e.value,t.value)}const go=o("$ZodSet",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const i=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},o);r instanceof Promise?i.push(r.then(e=>vo(e,n))):vo(r,n)}return i.length?Promise.all(i).then(()=>n):n}});function vo(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const bo=o("$ZodEnum",(e,t)=>{rn.init(e,t);const n=l(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(e=>S.has(typeof e)).map(e=>"string"==typeof e?z(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const i=t.value;return o.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),$o=o("$ZodLiteral",(e,t)=>{if(rn.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?z(e):e?z(e.toString()):String(e)).join("|")})$`),e._zod.parse=(o,r)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),yo=o("$ZodFile",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return o instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),t}}),_o=o("$ZodTransform",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new a(e.constructor.name);const r=t.transform(n.value,n);if(o.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new i;return n.value=r,n}});function ko(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const xo=o("$ZodOptional",(e,t)=>{rn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(t=>ko(t,e.value)):ko(o,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),wo=o("$ZodExactOptional",(e,t)=>{xo.init(e,t),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Io=o("$ZodNullable",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)}|null)$`):void 0}),v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Co=o("$ZodDefault",(e,t)=>{rn.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(e=>So(e,t)):So(o,t)}});function So(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Eo=o("$ZodPrefault",(e,t)=>{rn.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),zo=o("$ZodNonOptional",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,o)=>{const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(t=>To(t,e)):To(r,e)}});function To(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Do=o("$ZodSuccess",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new a("ZodSuccess");const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===o.issues.length,e)}}),Oo=o("$ZodCatch",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(o=>(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>J(e,n,c()))},input:e.value}),e.issues=[]),e)):(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>J(e,n,c()))},input:e.value}),e.issues=[]),e)}}),Uo=o("$ZodNaN",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),Ro=o("$ZodPipe",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const o=t.out._zod.run(e,n);return o instanceof Promise?o.then(e=>Ao(e,t.in,n)):Ao(o,t.in,n)}const o=t.in._zod.run(e,n);return o instanceof Promise?o.then(e=>Ao(e,t.out,n)):Ao(o,t.out,n)}});function Ao(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const No=o("$ZodCodec",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const o=t.in._zod.run(e,n);return o instanceof Promise?o.then(e=>jo(e,t,n)):jo(o,t,n)}{const o=t.out._zod.run(e,n);return o instanceof Promise?o.then(e=>jo(e,t,n)):jo(o,t,n)}}});function jo(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const o=t.transform(e.value,e);return o instanceof Promise?o.then(o=>Po(e,o,t.out,n)):Po(e,o,t.out,n)}{const o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(o=>Po(e,o,t.in,n)):Po(e,o,t.in,n)}}function Po(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}const Mo=o("$ZodReadonly",(e,t)=>{rn.init(e,t),v(e._zod,"propValues",()=>t.innerType._zod.propValues),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"optin",()=>t.innerType?._zod?.optin),v(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(Zo):Zo(o)}});function Zo(e){return e.value=Object.freeze(e.value),e}const qo=o("$ZodTemplateLiteral",(e,t)=>{rn.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const o=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,r))}else{if(null!==e&&!E.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(z(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,o)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),Lo=o("$ZodFunction",(e,t)=>(rn.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const o=e._def.input?le(e._def.input,n):n,r=Reflect.apply(t,this,o);return e._def.output?le(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const o=e._def.input?await de(e._def.input,n):n,r=await Reflect.apply(t,this,o);return e._def.output?await de(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const o=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=o?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new uo({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Fo=o("$ZodPromise",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Vo=o("$ZodLazy",(e,t)=>{rn.init(e,t),v(e._zod,"innerType",()=>t.getter()),v(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),v(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),v(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),v(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ho=o("$ZodCustom",(e,t)=>{Ot.init(e,t),rn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(t=>Jo(t,n,o,e));Jo(r,n,o,e)}});function Jo(e,t,n,o){if(!e){const e={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(e.params=o._zod.def.params),t.issues.push(K(e))}}const Go=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${r}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${r}`}case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${O(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${o.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${o.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Bo=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(t){return e[t]??null}const 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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${r}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${r}`}case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${O(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${o.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function Wo(e,t,n,o){const r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:1===i?t:i>=2&&i<=4?n:o}const Ko=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(t){return e[t]??null}const n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},o={nan:"NaN",number:"лік",array:"масіў"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${r}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${r}`}case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${O(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=Wo(Number(e.maximum),o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${o.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=Wo(Number(e.minimum),o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${o.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const Xo=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},o={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${r}`:`Невалиден вход: очакван ${t}, получен ${r}`}case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${O(e.values[0])}`:`Невалидна опция: очаквано едно от ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let o="Невалиден";return"emoji"===t.format&&(o="Невалидно"),"datetime"===t.format&&(o="Невалидно"),"date"===t.format&&(o="Невалидна"),"time"===t.format&&(o="Невалидно"),"duration"===t.format&&(o="Невалидна"),`${o} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const Qo=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={regex:"entrada",email:"adreça electrònica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${r}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${r}`}case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${O(e.values[0])}`:`Opció invàlida: s'esperava una de ${u(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",o=t(e.origin);return o?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",o=t(e.origin);return o?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const Yo=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(t){return e[t]??null}const n={regex:"regulární výraz",email:"e-mailová adresa",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:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${r}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${r}`}case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${O(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${u(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const er=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(t){return e[t]??null}const n={regex:"input",email:"e-mailadresse",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 dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${r}`:`Ugyldigt input: forventede ${t}, fik ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${O(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),i=o[e.origin]??e.origin;return r?`For stor: forventede ${i??"value"} ${r.verb} ${n} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${i??"value"} havde ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),i=o[e.origin]??e.origin;return r?`For lille: forventede ${i} ${r.verb} ${n} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${i} havde ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const tr=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(t){return e[t]??null}const n={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${r}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${r}`}case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${O(e.values[0])}`:`Ungültige Option: erwartet eine von ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const nr=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const 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",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input);return`Invalid input: expected ${t}, received ${o[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${O(e.values[0])}`:`Invalid option: expected one of ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${o.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`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":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`}}};function or(){return{localeError:nr()}}const rr=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${r}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${r}`}case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${O(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const ir=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(t){return e[t]??null}const n={regex:"entrada",email:"dirección de correo electrónico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${r}`:`Entrada inválida: se esperaba ${t}, recibido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${O(e.values[0])}`:`Opción inválida: se esperaba una de ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),i=o[e.origin]??e.origin;return r?`Demasiado grande: se esperaba que ${i??"valor"} tuviera ${n}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${i??"valor"} fuera ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),i=o[e.origin]??e.origin;return r?`Demasiado pequeño: se esperaba que ${i} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${i} fuera ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o[e.origin]??e.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o[e.origin]??e.origin}`}}};const ar=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},o={nan:"NaN",number:"عدد",array:"آرایه"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: میبایست instanceof ${e.expected} میبود، ${r} دریافت شد`:`ورودی نامعتبر: میبایست ${t} میبود، ${r} دریافت شد`}case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: میبایست ${O(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${u(e.values,"|")} میبود`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${o.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${o.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${u(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const sr=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(t){return e[t]??null}const n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${r}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${r}`}case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${O(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Liian suuri: ${o.subject} täytyy olla ${n}${e.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Liian pieni: ${o.subject} täytyy olla ${n}${e.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${u(e.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};const cr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={regex:"entrée",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN",number:"nombre",array:"tableau"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${r} reçu`:`Entrée invalide : ${t} attendu, ${r} reçu`}case"invalid_value":return 1===e.values.length?`Entrée invalide : ${O(e.values[0])} attendu`:`Option invalide : une valeur parmi ${u(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Trop grand : ${e.origin??"valeur"} doit ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Trop petit : ${e.origin} doit ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const lr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={regex:"entrée",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${r}`:`Entrée invalide : attendu ${t}, reçu ${r}`}case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${O(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",o=t(e.origin);return o?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",o=t(e.origin);return o?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const ur=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,o=t=>{const o=n(t);return o?o.label:t??e.unknown.label},r=e=>`ה${o(e)}`,i=e=>{const t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},a=e=>e?t[e]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},c={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=c[n??""]??o(n),i=W(t.input),a=c[i]??e[i]?.label??i;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${a}`:`קלט לא תקין: צריך להיות ${r}, התקבל ${a}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${O(t.values[0])}`;const e=t.values.map(e=>O(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;const n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(", ")} או ${n}`}case"too_big":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`}if("array"===t.origin||"set"===t.origin){return`גדול מדי: ${n} ${"set"===t.origin?"צריכה":"צריך"} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`}`.trim()}const o=t.inclusive?"<=":"<",s=i(t.origin??"value");return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${o}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??"גדול"} מדי: ${n} ${s} ${o}${t.maximum.toString()}`}case"too_small":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`}if("array"===t.origin||"set"===t.origin){const o="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){return`קטן מדי: ${n} ${o} להכיל ${t.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${n} ${o} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`}`.trim()}const o=t.inclusive?">=":">",s=i(t.origin??"value");return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${o}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??"קטן"} מדי: ${n} ${s} ${o}${t.minimum.toString()}`}case"invalid_format":{const e=t;if("starts_with"===e.format)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if("ends_with"===e.format)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if("includes"===e.format)return`המחרוזת חייבת לכלול "${e.includes}"`;if("regex"===e.format)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;const n=s[e.format];return`${n?.label??e.format} לא ${"f"===(n?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${u(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const dr=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={regex:"bemenet",email:"email cím",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 időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"szám",array:"tömb"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${r}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${r}`}case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${O(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${o.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${o.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};function pr(e,t,n){return 1===Math.abs(e)?t:n}function mr(e){if(!e)return"";const t=e[e.length-1];return e+(["ա","ե","ը","ի","ո","ու","օ"].includes(t)?"ն":"ը")}const fr=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(t){return e[t]??null}const n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},o={nan:"NaN",number:"թիվ",array:"զանգված"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${r}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${r}`}case"invalid_value":return 1===e.values.length?`Սխալ մուտքագրում․ սպասվում էր ${O(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=pr(Number(e.maximum),o.unit.one,o.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${mr(e.origin??"արժեք")} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${mr(e.origin??"արժեք")} լինի ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=pr(Number(e.minimum),o.unit.one,o.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${mr(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${mr(e.origin)} լինի ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:"ends_with"===t.format?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:"includes"===t.format?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:"regex"===t.format?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${e.keys.length>1?"ներ":""}. ${u(e.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${mr(e.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${mr(e.origin)}-ում`}}};const hr=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${r}`:`Input tidak valid: diharapkan ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${O(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const gr=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(t){return e[t]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"númer",array:"fylki"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${r} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${r} þar sem á að vera ${t}`}case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${O(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${u(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const vr=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${r}`:`Input non valido: atteso ${t}, ricevuto ${r}`}case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${O(e.values[0])}`:`Opzione non valida: atteso uno tra ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${u(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const br=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},o={nan:"NaN",number:"数値",array:"配列"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${r}が入力されました`:`無効な入力: ${t}が期待されましたが、${r}が入力されました`}case"invalid_value":return 1===e.values.length?`無効な入力: ${O(e.values[0])}が期待されました`:`無効な選択: ${u(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",o=t(e.origin);return o?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${o.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",o=t(e.origin);return o?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${o.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${u(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const $r=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},o={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${r}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${r}`}case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${O(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${u(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${u(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const yr=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},o={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${r}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${r}`}case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${O(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${o.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${o.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${u(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function _r(){return{localeError:yr()}}const kr=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${r}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${r}입니다`}case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${O(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${u(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",o="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),i=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${i} ${n}${o}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${o}`}case"too_small":{const n=e.inclusive?"이상":"초과",o="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),i=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${i} ${n}${o}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${o}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${u(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const xr=e=>e.charAt(0).toUpperCase()+e.slice(1);function wr(e){const t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||0===n?"many":1===n?"one":"few"}const Ir=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,o,r){const i=e[t]??null;return null===i?i:{unit:i.unit[n],verb:i.verb[r][o?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},o={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${r}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${r}, o tikėtasi - ${t}`}case"invalid_value":return 1===e.values.length?`Privalo būti ${O(e.values[0])}`:`Privalo būti vienas iš ${u(e.values,"|")} pasirinkimų`;case"too_big":{const n=o[e.origin]??e.origin,r=t(e.origin,wr(Number(e.maximum)),e.inclusive??!1,"smaller");if(r?.verb)return`${xr(n??e.origin??"reikšmė")} ${r.verb} ${e.maximum.toString()} ${r.unit??"elementų"}`;const i=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${xr(n??e.origin??"reikšmė")} turi būti ${i} ${e.maximum.toString()} ${r?.unit}`}case"too_small":{const n=o[e.origin]??e.origin,r=t(e.origin,wr(Number(e.minimum)),e.inclusive??!1,"bigger");if(r?.verb)return`${xr(n??e.origin??"reikšmė")} ${r.verb} ${e.minimum.toString()} ${r.unit??"elementų"}`;const i=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${xr(n??e.origin??"reikšmė")} turi būti ${i} ${e.minimum.toString()} ${r?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${u(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=o[e.origin]??e.origin;return`${xr(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}};const Cr=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},o={nan:"NaN",number:"број",array:"низа"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${r}`:`Грешен внес: се очекува ${t}, примено ${r}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${O(e.values[0])}`:`Грешана опција: се очекува една ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${o.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${o.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${u(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const Sr=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${r}`:`Input tidak sah: dijangka ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${O(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Terlalu besar: dijangka ${e.origin??"nilai"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Terlalu kecil: dijangka ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const Er=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(t){return e[t]??null}const n={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${r}`:`Ongeldige invoer: verwacht ${t}, ontving ${r}`}case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${O(e.values[0])}`:`Ongeldige optie: verwacht één van ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin),r="date"===e.origin?"laat":"string"===e.origin?"lang":"groot";return o?`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin),r="date"===e.origin?"vroeg":"string"===e.origin?"kort":"klein";return o?`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const zr=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${r}`:`Ugyldig input: forventet ${t}, fikk ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${O(e.values[0])}`:`Ugyldig valg: forventet en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const Tr=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(t){return e[t]??null}const n={regex:"giren",email:"epostagâh",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 hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${r}`:`Fâsit giren: umulan ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${O(e.values[0])}`:`Fâsit tercih: mûteberler ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${o.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const Dr=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},o={nan:"NaN",number:"عدد",array:"ارې"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${r} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${r} ترلاسه شو`}case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${O(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${u(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${o.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${o.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${u(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Or=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(t){return e[t]??null}const n={regex:"wyrażenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},o={nan:"NaN",number:"liczba",array:"tablica"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${r}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${r}`}case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${O(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${o.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${o.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const Ur=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={regex:"padrão",email:"endereço de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"número",null:"nulo"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${r}`:`Tipo inválido: esperado ${t}, recebido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${O(e.values[0])}`:`Opção inválida: esperada uma das ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function Rr(e,t,n,o){const r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:1===i?t:i>=2&&i<=4?n:o}const Ar=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(t){return e[t]??null}const n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},o={nan:"NaN",number:"число",array:"массив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${r}`:`Неверный ввод: ожидалось ${t}, получено ${r}`}case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${O(e.values[0])}`:`Неверный вариант: ожидалось одно из ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=Rr(Number(e.maximum),o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=Rr(Number(e.minimum),o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const Nr=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={regex:"vnos",email:"e-poštni naslov",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 datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"število",array:"tabela"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${r}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${r}`}case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${O(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${o.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const jr=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(t){return e[t]??null}const n={regex:"reguljärt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${r}`:`Ogiltig inmatning: förväntat ${t}, fick ${r}`}case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${O(e.values[0])}`:`Ogiltigt val: förväntade en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${o.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${o.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const Pr=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${r}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${r}`}case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${O(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${u(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const Mr=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},o={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${r}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${r}`}case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${O(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",o=t(e.origin);return o?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${o.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",o=t(e.origin);return o?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${o.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${u(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const Zr=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${r}`:`Geçersiz değer: beklenen ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${O(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const qr=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},o={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${r}`:`Неправильні вхідні дані: очікується ${t}, отримано ${r}`}case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${O(e.values[0])}`:`Неправильна опція: очікується одне з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Занадто велике: очікується, що ${e.origin??"значення"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Занадто мале: очікується, що ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Lr(){return{localeError:qr()}}const Fr=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},o={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${r} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${r} موصول ہوا`}case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${O(e.values[0])} متوقع تھا`:`غلط آپشن: ${u(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${o.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const Vr=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(t){return e[t]??null}const n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${r}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${r}`}case"invalid_value":return 1===e.values.length?`Noto‘g‘ri kirish: kutilgan ${O(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:"ends_with"===t.format?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:"includes"===t.format?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:"regex"===t.format?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${e.origin} da noto‘g‘ri qiymat`}}};const Hr=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(t){return e[t]??null}const n={regex:"đầu vào",email:"địa chỉ email",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:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},o={nan:"NaN",number:"số",array:"mảng"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${r}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${r}`}case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${O(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Quá nhỏ: mong đợi ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${u(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${e.origin}`}}};const Jr=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},o={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${r}`:`无效输入:期望 ${t},实际接收 ${r}`}case"invalid_value":return 1===e.values.length?`无效输入:期望 ${O(e.values[0])}`:`无效选项:期望以下之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${o.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Gr=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={regex:"輸入",email:"郵件地址",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${r}`:`無效的輸入值:預期為 ${t},但收到 ${r}`}case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${O(e.values[0])}`:`無效的選項:預期為以下其中之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${o.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${o.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${u(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const Br=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},o={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${r}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${r}`}case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${O(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${o.verb} ${n}${e.maximum} ${o.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${o.verb} ${n}${e.minimum} ${o.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${u(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var Wr,Kr=Object.freeze({__proto__:null,ar:function(){return{localeError:Go()}},az:function(){return{localeError:Bo()}},be:function(){return{localeError:Ko()}},bg:function(){return{localeError:Xo()}},ca:function(){return{localeError:Qo()}},cs:function(){return{localeError:Yo()}},da:function(){return{localeError:er()}},de:function(){return{localeError:tr()}},en:or,eo:function(){return{localeError:rr()}},es:function(){return{localeError:ir()}},fa:function(){return{localeError:ar()}},fi:function(){return{localeError:sr()}},fr:function(){return{localeError:cr()}},frCA:function(){return{localeError:lr()}},he:function(){return{localeError:ur()}},hu:function(){return{localeError:dr()}},hy:function(){return{localeError:fr()}},id:function(){return{localeError:hr()}},is:function(){return{localeError:gr()}},it:function(){return{localeError:vr()}},ja:function(){return{localeError:br()}},ka:function(){return{localeError:$r()}},kh:function(){return _r()},km:_r,ko:function(){return{localeError:kr()}},lt:function(){return{localeError:Ir()}},mk:function(){return{localeError:Cr()}},ms:function(){return{localeError:Sr()}},nl:function(){return{localeError:Er()}},no:function(){return{localeError:zr()}},ota:function(){return{localeError:Tr()}},pl:function(){return{localeError:Or()}},ps:function(){return{localeError:Dr()}},pt:function(){return{localeError:Ur()}},ru:function(){return{localeError:Ar()}},sl:function(){return{localeError:Nr()}},sv:function(){return{localeError:jr()}},ta:function(){return{localeError:Pr()}},th:function(){return{localeError:Mr()}},tr:function(){return{localeError:Zr()}},ua:function(){return Lr()},uk:Lr,ur:function(){return{localeError:Fr()}},uz:function(){return{localeError:Vr()}},vi:function(){return{localeError:Hr()}},yo:function(){return{localeError:Br()}},zhCN:function(){return{localeError:Jr()}},zhTW:function(){return{localeError:Gr()}}});const Xr=Symbol("ZodOutput"),Qr=Symbol("ZodInput");class Yr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function ei(){return new Yr}(Wr=globalThis).__zod_globalRegistry??(Wr.__zod_globalRegistry=ei());const ti=globalThis.__zod_globalRegistry;function ni(e,t){return new e({type:"string",...D(t)})}function oi(e,t){return new e({type:"string",coerce:!0,...D(t)})}function ri(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...D(t)})}function ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...D(t)})}function ai(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...D(t)})}function si(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...D(t)})}function ci(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...D(t)})}function li(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...D(t)})}function ui(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...D(t)})}function di(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...D(t)})}function pi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...D(t)})}function mi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...D(t)})}function fi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...D(t)})}function hi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...D(t)})}function gi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...D(t)})}function vi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...D(t)})}function bi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...D(t)})}function $i(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...D(t)})}function yi(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...D(t)})}function _i(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...D(t)})}function ki(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...D(t)})}function xi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...D(t)})}function wi(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...D(t)})}function Ii(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...D(t)})}function Ci(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...D(t)})}const Si={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ei(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...D(t)})}function zi(e,t){return new e({type:"string",format:"date",check:"string_format",...D(t)})}function Ti(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...D(t)})}function Di(e,t){return new e({type:"string",format:"duration",check:"string_format",...D(t)})}function Oi(e,t){return new e({type:"number",checks:[],...D(t)})}function Ui(e,t){return new e({type:"number",coerce:!0,checks:[],...D(t)})}function Ri(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...D(t)})}function Ai(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...D(t)})}function Ni(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...D(t)})}function ji(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...D(t)})}function Pi(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...D(t)})}function Mi(e,t){return new e({type:"boolean",...D(t)})}function Zi(e,t){return new e({type:"boolean",coerce:!0,...D(t)})}function qi(e,t){return new e({type:"bigint",...D(t)})}function Li(e,t){return new e({type:"bigint",coerce:!0,...D(t)})}function Fi(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...D(t)})}function Vi(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...D(t)})}function Hi(e,t){return new e({type:"symbol",...D(t)})}function Ji(e,t){return new e({type:"undefined",...D(t)})}function Gi(e,t){return new e({type:"null",...D(t)})}function Bi(e){return new e({type:"any"})}function Wi(e){return new e({type:"unknown"})}function Ki(e,t){return new e({type:"never",...D(t)})}function Xi(e,t){return new e({type:"void",...D(t)})}function Qi(e,t){return new e({type:"date",...D(t)})}function Yi(e,t){return new e({type:"date",coerce:!0,...D(t)})}function ea(e,t){return new e({type:"nan",...D(t)})}function ta(e,t){return new Rt({check:"less_than",...D(t),value:e,inclusive:!1})}function na(e,t){return new Rt({check:"less_than",...D(t),value:e,inclusive:!0})}function oa(e,t){return new At({check:"greater_than",...D(t),value:e,inclusive:!1})}function ra(e,t){return new At({check:"greater_than",...D(t),value:e,inclusive:!0})}function ia(e){return oa(0,e)}function aa(e){return ta(0,e)}function sa(e){return na(0,e)}function ca(e){return ra(0,e)}function la(e,t){return new Nt({check:"multiple_of",...D(t),value:e})}function ua(e,t){return new Mt({check:"max_size",...D(t),maximum:e})}function da(e,t){return new Zt({check:"min_size",...D(t),minimum:e})}function pa(e,t){return new qt({check:"size_equals",...D(t),size:e})}function ma(e,t){return new Lt({check:"max_length",...D(t),maximum:e})}function fa(e,t){return new Ft({check:"min_length",...D(t),minimum:e})}function ha(e,t){return new Vt({check:"length_equals",...D(t),length:e})}function ga(e,t){return new Jt({check:"string_format",format:"regex",...D(t),pattern:e})}function va(e){return new Gt({check:"string_format",format:"lowercase",...D(e)})}function ba(e){return new Bt({check:"string_format",format:"uppercase",...D(e)})}function $a(e,t){return new Wt({check:"string_format",format:"includes",...D(t),includes:e})}function ya(e,t){return new Kt({check:"string_format",format:"starts_with",...D(t),prefix:e})}function _a(e,t){return new Xt({check:"string_format",format:"ends_with",...D(t),suffix:e})}function ka(e,t,n){return new Yt({check:"property",property:e,schema:t,...D(n)})}function xa(e,t){return new en({check:"mime_type",mime:e,...D(t)})}function wa(e){return new tn({check:"overwrite",tx:e})}function Ia(e){return wa(t=>t.normalize(e))}function Ca(){return wa(e=>e.trim())}function Sa(){return wa(e=>e.toLowerCase())}function Ea(){return wa(e=>e.toUpperCase())}function za(){return wa(e=>_(e))}function Ta(e,t,n){return new e({type:"array",element:t,...D(n)})}function Da(e,t){return new e({type:"file",...D(t)})}function Oa(e,t,n){const o=D(n);o.abort??(o.abort=!0);return new e({type:"custom",check:"custom",fn:t,...o})}function Ua(e,t,n){return new e({type:"custom",check:"custom",fn:t,...D(n)})}function Ra(e){const t=Aa(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(K(e,n.value,t._zod.def));else{const o=e;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(K(o))}},e(n.value,n)));return t}function Aa(e,t){const n=new Ot({check:"custom",...D(t)});return n._zod.check=e,n}function Na(e){const t=new Ot({check:"describe"});return t._zod.onattach=[t=>{const n=ti.get(t)??{};ti.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function ja(e){const t=new Ot({check:"meta"});return t._zod.onattach=[t=>{const n=ti.get(t)??{};ti.add(t,{...n,...e})}],t._zod.check=()=>{},t}function Pa(e,t){const n=D(t);let o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(o=o.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const i=new Set(o),a=new Set(r),s=e.Codec??No,c=e.Boolean??Pn,l=new s({type:"pipe",in:new(e.String??an)({type:"string",error:n.error}),out:new c({type:"boolean",error:n.error}),transform:(e,t)=>{let o=e;return"sensitive"!==n.case&&(o=o.toLowerCase()),!!i.has(o)||!a.has(o)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:t.value,inst:l,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?o[0]||"true":r[0]||"false",error:n.error});return l}function Ma(e,t,n,o={}){const r=D(o),i={...D(o),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(i.pattern=n);return new e(i)}function Za(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ti,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function qa(e,t,n={path:[],schemaPath:[]}){var o;const r=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const o={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,o);else{const n=a.schema,i=t.processors[r.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);i(e,t,n,o)}const i=e._zod.parent;i&&(a.ref||(a.ref=i),qa(i,t,o),t.seen.get(i).isParent=!0)}const c=t.metadataRegistry.get(e);c&&Object.assign(a.schema,c),"input"===t.io&&Va(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault;return t.seen.get(e).schema}function La(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=o.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const o=t[1],{ref:r,defId:i}=(t=>{const o="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${r("__shared")}#/${o}/${i}`}}if(t[1]===n)return{ref:"#"};const r=`#/${o}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:r+i}})(t);o.def={...o.schema},i&&(o.defId=i);const a=o.schema;for(const e in a)delete a[e];a.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const o=n[1];if(t===n[0]){r(n);continue}if(e.external){const o=e.external.registry.get(n[0])?.id;if(t!==n[0]&&o){r(n);continue}}const i=e.metadataRegistry.get(n[0])?.id;i?r(n):(o.cycle||o.count>1&&"ref"===e.reused)&&r(n)}}function Fa(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,i={...r},a=n.ref;if(n.ref=null,a){o(a);const n=e.seen.get(a),s=n.schema;!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,s):(r.allOf=r.allOf??[],r.allOf.push(s)),Object.assign(r,i);if(t._zod.parent===a)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in i||delete r[e]);if(s.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const s=t._zod.parent;if(s&&s!==a){o(s);const t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const e in r)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())o(t[0]);const r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const i=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?r.$defs=i:r.definitions=i);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ja(t,"input",e.processors),output:Ja(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Va(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return Va(o.element,n);if("set"===o.type)return Va(o.valueType,n);if("lazy"===o.type)return Va(o.getter(),n);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return Va(o.innerType,n);if("intersection"===o.type)return Va(o.left,n)||Va(o.right,n);if("record"===o.type||"map"===o.type)return Va(o.keyType,n)||Va(o.valueType,n);if("pipe"===o.type)return Va(o.in,n)||Va(o.out,n);if("object"===o.type){for(const e in o.shape)if(Va(o.shape[e],n))return!0;return!1}if("union"===o.type){for(const e of o.options)if(Va(e,n))return!0;return!1}if("tuple"===o.type){for(const e of o.items)if(Va(e,n))return!0;return!(!o.rest||!Va(o.rest,n))}return!1}const Ha=(e,t={})=>n=>{const o=Za({...n,processors:t});return qa(e,o),La(o,e),Fa(o,e)},Ja=(e,t,n={})=>o=>{const{libraryOptions:r,target:i}=o??{},a=Za({...r??{},target:i,io:t,processors:n});return qa(e,a),La(a,e),Fa(a,e)},Ga={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ba=(e,t,n,o)=>{const r=n;r.type="string";const{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if("number"==typeof i&&(r.minLength=i),"number"==typeof a&&(r.maxLength=a),s&&(r.format=Ga[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),l&&(r.contentEncoding=l),c&&c.size>0){const e=[...c];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},Wa=(e,t,n,o)=>{const r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),"number"==typeof i&&(r.minimum=i,"number"==typeof u&&"draft-04"!==t.target&&(u>=i?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l),"number"==typeof a&&(r.maximum=a,"number"==typeof l&&"draft-04"!==t.target&&(l<=a?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof c&&(r.multipleOf=c)},Ka=(e,t,n,o)=>{n.type="boolean"},Xa=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema")},Qa=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema")},Ya=(e,t,n,o)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},es=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema")},ts=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Void cannot be represented in JSON Schema")},ns=(e,t,n,o)=>{n.not={}},os=(e,t,n,o)=>{},rs=(e,t,n,o)=>{},is=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Date cannot be represented in JSON Schema")},as=(e,t,n,o)=>{const r=l(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r},ss=(e,t,n,o)=>{const r=e._zod.def,i=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(e))}else i.push(e);if(0===i.length);else if(1===i.length){const e=i[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),i.every(e=>"boolean"==typeof e)&&(n.type="boolean"),i.every(e=>null===e)&&(n.type="null"),n.enum=i},cs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},ls=(e,t,n,o)=>{const r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},us=(e,t,n,o)=>{const r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;void 0!==a&&(i.minLength=a),void 0!==s&&(i.maxLength=s),c?1===c.length?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(r,i)},ds=(e,t,n,o)=>{n.type="boolean"},ps=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")},ms=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")},fs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")},hs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Map cannot be represented in JSON Schema")},gs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Set cannot be represented in JSON Schema")},vs=(e,t,n,o)=>{const r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=qa(i.element,t,{...o,path:[...o.path,"items"]})},bs=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object",r.properties={};const a=i.shape;for(const e in a)r.properties[e]=qa(a[e],t,{...o,path:[...o.path,"properties",e]});const s=new Set(Object.keys(a)),c=new Set([...s].filter(e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));c.size>0&&(r.required=Array.from(c)),"never"===i.catchall?._zod.def.type?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=qa(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},$s=(e,t,n,o)=>{const r=e._zod.def,i=!1===r.inclusive,a=r.options.map((e,n)=>qa(e,t,{...o,path:[...o.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=a:n.anyOf=a},ys=(e,t,n,o)=>{const r=e._zod.def,i=qa(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=qa(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},_s=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="array";const a="draft-2020-12"===t.target?"prefixItems":"items",s="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",c=i.items.map((e,n)=>qa(e,t,{...o,path:[...o.path,a,n]})),l=i.rest?qa(i.rest,t,{...o,path:[...o.path,s,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=c,l&&(r.items=l)):"openapi-3.0"===t.target?(r.items={anyOf:c},l&&r.items.anyOf.push(l),r.minItems=c.length,l||(r.maxItems=c.length)):(r.items=c,l&&(r.additionalItems=l));const{minimum:u,maximum:d}=e._zod.bag;"number"==typeof u&&(r.minItems=u),"number"==typeof d&&(r.maxItems=d)},ks=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object";const a=i.keyType,s=a._zod.bag,c=s?.patterns;if("loose"===i.mode&&c&&c.size>0){const e=qa(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(const t of c)r.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(r.propertyNames=qa(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=qa(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const l=a._zod.values;if(l){const e=[...l].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},xs=(e,t,n,o)=>{const r=e._zod.def,i=qa(r.innerType,t,o),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ws=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Is=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Cs=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Ss=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);let i;t.seen.get(e).ref=r.innerType;try{i=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},Es=(e,t,n,o)=>{const r=e._zod.def,i="input"===t.io?"transform"===r.in._zod.def.type?r.out:r.in:r.out;qa(i,t,o);t.seen.get(e).ref=i},zs=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Ts=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Ds=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Os=(e,t,n,o)=>{const r=e._zod.innerType;qa(r,t,o);t.seen.get(e).ref=r},Us={string:Ba,number:Wa,boolean:Ka,bigint:Xa,symbol:Qa,null:Ya,undefined:es,void:ts,never:ns,any:os,unknown:rs,date:is,enum:as,literal:ss,nan:cs,template_literal:ls,file:us,success:ds,custom:ps,function:ms,transform:fs,map:hs,set:gs,array:vs,object:bs,union:$s,intersection:ys,tuple:_s,record:ks,nullable:xs,nonoptional:ws,default:Is,prefault:Cs,catch:Ss,pipe:Es,readonly:zs,promise:Ts,optional:Ds,lazy:Os};function Rs(e,t){if("_idmap"in e){const n=e,o=Za({...t,processors:Us}),r={};for(const e of n._idmap.entries()){const[t,n]=e;qa(n,o)}const i={},a={registry:n,uri:t?.uri,defs:r};o.external=a;for(const e of n._idmap.entries()){const[t,n]=e;La(o,n),i[t]=Fa(o,n)}if(Object.keys(r).length>0){const e="draft-2020-12"===o.target?"$defs":"definitions";i.__shared={[e]:r}}return{schemas:i}}const n=Za({...t,processors:Us});return qa(e,n),La(n,e),Fa(n,e)}var As=Object.freeze({__proto__:null}),Ns=Object.freeze({__proto__:null,$ZodAny:Vn,$ZodArray:Kn,$ZodAsyncError:i,$ZodBase64:zn,$ZodBase64URL:Dn,$ZodBigInt:Mn,$ZodBigIntFormat:Zn,$ZodBoolean:Pn,$ZodCIDRv4:Cn,$ZodCIDRv6:Sn,$ZodCUID:fn,$ZodCUID2:hn,$ZodCatch:Oo,$ZodCheck:Ot,$ZodCheckBigIntFormat:Pt,$ZodCheckEndsWith:Xt,$ZodCheckGreaterThan:At,$ZodCheckIncludes:Wt,$ZodCheckLengthEquals:Vt,$ZodCheckLessThan:Rt,$ZodCheckLowerCase:Gt,$ZodCheckMaxLength:Lt,$ZodCheckMaxSize:Mt,$ZodCheckMimeType:en,$ZodCheckMinLength:Ft,$ZodCheckMinSize:Zt,$ZodCheckMultipleOf:Nt,$ZodCheckNumberFormat:jt,$ZodCheckOverwrite:tn,$ZodCheckProperty:Yt,$ZodCheckRegex:Jt,$ZodCheckSizeEquals:qt,$ZodCheckStartsWith:Kt,$ZodCheckStringFormat:Ht,$ZodCheckUpperCase:Bt,$ZodCodec:No,$ZodCustom:Ho,$ZodCustomStringFormat:An,$ZodDate:Bn,$ZodDefault:Co,$ZodDiscriminatedUnion:ao,$ZodE164:On,$ZodEmail:un,$ZodEmoji:pn,$ZodEncodeError:a,$ZodEnum:bo,$ZodError:te,$ZodExactOptional:wo,$ZodFile:yo,$ZodFunction:Lo,$ZodGUID:cn,$ZodIPv4:xn,$ZodIPv6:wn,$ZodISODate:yn,$ZodISODateTime:$n,$ZodISODuration:kn,$ZodISOTime:_n,$ZodIntersection:so,$ZodJWT:Rn,$ZodKSUID:bn,$ZodLazy:Vo,$ZodLiteral:$o,$ZodMAC:In,$ZodMap:fo,$ZodNaN:Uo,$ZodNanoID:mn,$ZodNever:Jn,$ZodNonOptional:zo,$ZodNull:Fn,$ZodNullable:Io,$ZodNumber:Nn,$ZodNumberFormat:jn,$ZodObject:eo,$ZodObjectJIT:to,$ZodOptional:xo,$ZodPipe:Ro,$ZodPrefault:Eo,$ZodPromise:Fo,$ZodReadonly:Mo,$ZodRealError:ne,$ZodRecord:mo,$ZodRegistry:Yr,$ZodSet:go,$ZodString:an,$ZodStringFormat:sn,$ZodSuccess:Do,$ZodSymbol:qn,$ZodTemplateLiteral:qo,$ZodTransform:_o,$ZodTuple:uo,$ZodType:rn,$ZodULID:gn,$ZodURL:dn,$ZodUUID:ln,$ZodUndefined:Ln,$ZodUnion:oo,$ZodUnknown:Hn,$ZodVoid:Gn,$ZodXID:vn,$ZodXor:io,$brand:r,$constructor:o,$input:Qr,$output:Xr,Doc:nn,JSONSchema:As,JSONSchemaGenerator:class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=Za({processors:Us,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return qa(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),La(this.ctx,e);const n=Fa(this.ctx,e),{"~standard":o,...r}=n;return r}},NEVER:n,TimePrecision:Si,_any:Bi,_array:Ta,_base64:xi,_base64url:wi,_bigint:qi,_boolean:Mi,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:Aa,_cidrv4:_i,_cidrv6:ki,_coercedBigint:Li,_coercedBoolean:Zi,_coercedDate:Yi,_coercedNumber:Ui,_coercedString:oi,_cuid:mi,_cuid2:fi,_custom:Oa,_date:Qi,_decode:be,_decodeAsync:ke,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():C(n)}})},_discriminatedUnion:function(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...D(o)})},_e164:Ii,_email:ri,_emoji:di,_encode:ge,_encodeAsync:ye,_endsWith:_a,_enum:function(e,t,n){const o=Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t;return new e({type:"enum",entries:o,...D(n)})},_file:Da,_float32:Ai,_float64:Ni,_gt:oa,_gte:ra,_guid:ii,_includes:$a,_int:Ri,_int32:ji,_int64:Fi,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:bi,_ipv6:$i,_isoDate:zi,_isoDateTime:Ei,_isoDuration:Di,_isoTime:Ti,_jwt:Ci,_ksuid:vi,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:ha,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...D(n)})},_lowercase:va,_lt:ta,_lte:na,_mac:yi,_map:function(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...D(o)})},_max:na,_maxLength:ma,_maxSize:ua,_mime:xa,_min:ra,_minLength:fa,_minSize:da,_multipleOf:la,_nan:ea,_nanoid:pi,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...D(n)})},_negative:aa,_never:Ki,_nonnegative:ca,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...D(n)})},_nonpositive:sa,_normalize:Ia,_null:Gi,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Oi,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:wa,_parse:ce,_parseAsync:ue,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:ia,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:ka,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...D(o)})},_refine:Ua,_regex:ga,_safeDecode:Ce,_safeDecodeAsync:Te,_safeEncode:we,_safeEncodeAsync:Ee,_safeParse:pe,_safeParseAsync:fe,_set:function(e,t,n){return new e({type:"set",valueType:t,...D(n)})},_size:pa,_slugify:za,_startsWith:ya,_string:ni,_stringFormat:Ma,_stringbool:Pa,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Ra,_symbol:Hi,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...D(n)})},_toLowerCase:Sa,_toUpperCase:Ea,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:Ca,_tuple:function(e,t,n,o){const r=n instanceof rn;return new e({type:"tuple",items:t,rest:r?n:null,...D(r?o:n)})},_uint32:Pi,_uint64:Vi,_ulid:hi,_undefined:Ji,_union:function(e,t,n){return new e({type:"union",options:t,...D(n)})},_unknown:Wi,_uppercase:ba,_url:ui,_uuid:ai,_uuidv4:si,_uuidv6:ci,_uuidv7:li,_void:Xi,_xid:gi,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...D(n)})},clone:T,config:c,createStandardJSONSchemaMethod:Ja,createToJSONSchemaMethod:Ha,decode:$e,decodeAsync:xe,describe:Na,encode:ve,encodeAsync:_e,extractDefs:La,finalize:Fa,flattenError:oe,formatError:re,globalConfig:s,globalRegistry:ti,initializeContext:Za,isValidBase64:En,isValidBase64URL:Tn,isValidJWT:Un,locales:Kr,meta:ja,parse:le,parseAsync:de,prettifyError:se,process:qa,regexes:Dt,registry:ei,safeDecode:Se,safeDecodeAsync:De,safeEncode:Ie,safeEncodeAsync:ze,safeParse:me,safeParseAsync:he,toDotPath:ae,toJSONSchema:Rs,treeifyError:ie,util:Y,version:on});function js(e){return!!e._zod}function Ps(e,t){if(js(e)){return me(e,t)}return e.safeParse(t)}var Ms=Object.freeze({__proto__:null,endsWith:_a,gt:oa,gte:ra,includes:$a,length:ha,lowercase:va,lt:ta,lte:na,maxLength:ma,maxSize:ua,mime:xa,minLength:fa,minSize:da,multipleOf:la,negative:aa,nonnegative:ca,nonpositive:sa,normalize:Ia,overwrite:wa,positive:ia,property:ka,regex:ga,size:pa,slugify:za,startsWith:ya,toLowerCase:Sa,toUpperCase:Ea,trim:Ca,uppercase:ba});const Zs=o("ZodISODateTime",(e,t)=>{$n.init(e,t),fc.init(e,t)});function qs(e){return Ei(Zs,e)}const Ls=o("ZodISODate",(e,t)=>{yn.init(e,t),fc.init(e,t)});function Fs(e){return zi(Ls,e)}const Vs=o("ZodISOTime",(e,t)=>{_n.init(e,t),fc.init(e,t)});function Hs(e){return Ti(Vs,e)}const Js=o("ZodISODuration",(e,t)=>{kn.init(e,t),fc.init(e,t)});function Gs(e){return Di(Js,e)}var Bs=Object.freeze({__proto__:null,ZodISODate:Ls,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Vs,date:Fs,datetime:qs,duration:Gs,time:Hs});const Ws=(e,t)=>{te.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>re(e,t)},flatten:{value:t=>oe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)}},isEmpty:{get:()=>0===e.issues.length}})},Ks=o("ZodError",Ws),Xs=o("ZodError",Ws,{Parent:Error}),Qs=ce(Xs),Ys=ue(Xs),ec=pe(Xs),tc=fe(Xs),nc=ge(Xs),oc=be(Xs),rc=ye(Xs),ic=ke(Xs),ac=we(Xs),sc=Ce(Xs),cc=Ee(Xs),lc=Te(Xs),uc=o("ZodType",(e,t)=>(rn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ja(e,"input"),output:Ja(e,"output")}}),e.toJSONSchema=Ha(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone($(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>T(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Qs(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ec(e,t,n),e.parseAsync=async(t,n)=>Ys(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>tc(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nc(e,t,n),e.decode=(t,n)=>oc(e,t,n),e.encodeAsync=async(t,n)=>rc(e,t,n),e.decodeAsync=async(t,n)=>ic(e,t,n),e.safeEncode=(t,n)=>ac(e,t,n),e.safeDecode=(t,n)=>sc(e,t,n),e.safeEncodeAsync=async(t,n)=>cc(e,t,n),e.safeDecodeAsync=async(t,n)=>lc(e,t,n),e.refine=(t,n)=>e.check(od(t,n)),e.superRefine=t=>e.check(rd(t)),e.overwrite=t=>e.check(wa(t)),e.optional=()=>ku(e),e.exactOptional=()=>wu(e),e.nullable=()=>Cu(e),e.nullish=()=>ku(Cu(e)),e.nonoptional=t=>Uu(e,t),e.array=()=>Ll(e),e.or=t=>Wl([e,t]),e.and=t=>tu(e,t),e.transform=t=>qu(e,yu(t)),e.default=t=>zu(e,t),e.prefault=t=>Du(e,t),e.catch=t=>ju(e,t),e.pipe=t=>qu(e,t),e.readonly=()=>Hu(e),e.describe=t=>{const n=e.clone();return ti.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>ti.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return ti.get(e);const n=e.clone();return ti.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),dc=o("_ZodString",(e,t)=>{an.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ba(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ga(...t)),e.includes=(...t)=>e.check($a(...t)),e.startsWith=(...t)=>e.check(ya(...t)),e.endsWith=(...t)=>e.check(_a(...t)),e.min=(...t)=>e.check(fa(...t)),e.max=(...t)=>e.check(ma(...t)),e.length=(...t)=>e.check(ha(...t)),e.nonempty=(...t)=>e.check(fa(1,...t)),e.lowercase=t=>e.check(va(t)),e.uppercase=t=>e.check(ba(t)),e.trim=()=>e.check(Ca()),e.normalize=(...t)=>e.check(Ia(...t)),e.toLowerCase=()=>e.check(Sa()),e.toUpperCase=()=>e.check(Ea()),e.slugify=()=>e.check(za())}),pc=o("ZodString",(e,t)=>{an.init(e,t),dc.init(e,t),e.email=t=>e.check(ri(hc,t)),e.url=t=>e.check(ui(wc,t)),e.jwt=t=>e.check(Ci(ol,t)),e.emoji=t=>e.check(di(Sc,t)),e.guid=t=>e.check(ii(vc,t)),e.uuid=t=>e.check(ai($c,t)),e.uuidv4=t=>e.check(si($c,t)),e.uuidv6=t=>e.check(ci($c,t)),e.uuidv7=t=>e.check(li($c,t)),e.nanoid=t=>e.check(pi(zc,t)),e.guid=t=>e.check(ii(vc,t)),e.cuid=t=>e.check(mi(Dc,t)),e.cuid2=t=>e.check(fi(Uc,t)),e.ulid=t=>e.check(hi(Ac,t)),e.base64=t=>e.check(xi(Xc,t)),e.base64url=t=>e.check(wi(Yc,t)),e.xid=t=>e.check(gi(jc,t)),e.ksuid=t=>e.check(vi(Mc,t)),e.ipv4=t=>e.check(bi(qc,t)),e.ipv6=t=>e.check($i(Hc,t)),e.cidrv4=t=>e.check(_i(Gc,t)),e.cidrv6=t=>e.check(ki(Wc,t)),e.e164=t=>e.check(Ii(tl,t)),e.datetime=t=>e.check(qs(t)),e.date=t=>e.check(Fs(t)),e.time=t=>e.check(Hs(t)),e.duration=t=>e.check(Gs(t))});function mc(e){return ni(pc,e)}const fc=o("ZodStringFormat",(e,t)=>{sn.init(e,t),dc.init(e,t)}),hc=o("ZodEmail",(e,t)=>{un.init(e,t),fc.init(e,t)});function gc(e){return ri(hc,e)}const vc=o("ZodGUID",(e,t)=>{cn.init(e,t),fc.init(e,t)});function bc(e){return ii(vc,e)}const $c=o("ZodUUID",(e,t)=>{ln.init(e,t),fc.init(e,t)});function yc(e){return ai($c,e)}function _c(e){return si($c,e)}function kc(e){return ci($c,e)}function xc(e){return li($c,e)}const wc=o("ZodURL",(e,t)=>{dn.init(e,t),fc.init(e,t)});function Ic(e){return ui(wc,e)}function Cc(e){return ui(wc,{protocol:/^https?$/,hostname:nt,...D(e)})}const Sc=o("ZodEmoji",(e,t)=>{pn.init(e,t),fc.init(e,t)});function Ec(e){return di(Sc,e)}const zc=o("ZodNanoID",(e,t)=>{mn.init(e,t),fc.init(e,t)});function Tc(e){return pi(zc,e)}const Dc=o("ZodCUID",(e,t)=>{fn.init(e,t),fc.init(e,t)});function Oc(e){return mi(Dc,e)}const Uc=o("ZodCUID2",(e,t)=>{hn.init(e,t),fc.init(e,t)});function Rc(e){return fi(Uc,e)}const Ac=o("ZodULID",(e,t)=>{gn.init(e,t),fc.init(e,t)});function Nc(e){return hi(Ac,e)}const jc=o("ZodXID",(e,t)=>{vn.init(e,t),fc.init(e,t)});function Pc(e){return gi(jc,e)}const Mc=o("ZodKSUID",(e,t)=>{bn.init(e,t),fc.init(e,t)});function Zc(e){return vi(Mc,e)}const qc=o("ZodIPv4",(e,t)=>{xn.init(e,t),fc.init(e,t)});function Lc(e){return bi(qc,e)}const Fc=o("ZodMAC",(e,t)=>{In.init(e,t),fc.init(e,t)});function Vc(e){return yi(Fc,e)}const Hc=o("ZodIPv6",(e,t)=>{wn.init(e,t),fc.init(e,t)});function Jc(e){return $i(Hc,e)}const Gc=o("ZodCIDRv4",(e,t)=>{Cn.init(e,t),fc.init(e,t)});function Bc(e){return _i(Gc,e)}const Wc=o("ZodCIDRv6",(e,t)=>{Sn.init(e,t),fc.init(e,t)});function Kc(e){return ki(Wc,e)}const Xc=o("ZodBase64",(e,t)=>{zn.init(e,t),fc.init(e,t)});function Qc(e){return xi(Xc,e)}const Yc=o("ZodBase64URL",(e,t)=>{Dn.init(e,t),fc.init(e,t)});function el(e){return wi(Yc,e)}const tl=o("ZodE164",(e,t)=>{On.init(e,t),fc.init(e,t)});function nl(e){return Ii(tl,e)}const ol=o("ZodJWT",(e,t)=>{Rn.init(e,t),fc.init(e,t)});function rl(e){return Ci(ol,e)}const il=o("ZodCustomStringFormat",(e,t)=>{An.init(e,t),fc.init(e,t)});function al(e,t,n={}){return Ma(il,e,t,n)}function sl(e){return Ma(il,"hostname",tt,e)}function cl(e){return Ma(il,"hex",bt,e)}function ll(e,t){const n=`${e}_${t?.enc??"hex"}`,o=Dt[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Ma(il,n,o,t)}const ul=o("ZodNumber",(e,t)=>{Nn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Wa(e,t,n),e.gt=(t,n)=>e.check(oa(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.int=t=>e.check(ml(t)),e.safe=t=>e.check(ml(t)),e.positive=t=>e.check(oa(0,t)),e.nonnegative=t=>e.check(ra(0,t)),e.negative=t=>e.check(ta(0,t)),e.nonpositive=t=>e.check(na(0,t)),e.multipleOf=(t,n)=>e.check(la(t,n)),e.step=(t,n)=>e.check(la(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function dl(e){return Oi(ul,e)}const pl=o("ZodNumberFormat",(e,t)=>{jn.init(e,t),ul.init(e,t)});function ml(e){return Ri(pl,e)}function fl(e){return Ai(pl,e)}function hl(e){return Ni(pl,e)}function gl(e){return ji(pl,e)}function vl(e){return Pi(pl,e)}const bl=o("ZodBoolean",(e,t)=>{Pn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ka(0,0,t)});function $l(e){return Mi(bl,e)}const yl=o("ZodBigInt",(e,t)=>{Mn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Xa(0,e),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.gt=(t,n)=>e.check(oa(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.positive=t=>e.check(oa(BigInt(0),t)),e.negative=t=>e.check(ta(BigInt(0),t)),e.nonpositive=t=>e.check(na(BigInt(0),t)),e.nonnegative=t=>e.check(ra(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(la(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function _l(e){return qi(yl,e)}const kl=o("ZodBigIntFormat",(e,t)=>{Zn.init(e,t),yl.init(e,t)});function xl(e){return Fi(kl,e)}function wl(e){return Vi(kl,e)}const Il=o("ZodSymbol",(e,t)=>{qn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Qa(0,e)});function Cl(e){return Hi(Il,e)}const Sl=o("ZodUndefined",(e,t)=>{Ln.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>es(0,e)});function El(e){return Ji(Sl,e)}const zl=o("ZodNull",(e,t)=>{Fn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ya(0,e,t)});function Tl(e){return Gi(zl,e)}const Dl=o("ZodAny",(e,t)=>{Vn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Ol(){return Bi(Dl)}const Ul=o("ZodUnknown",(e,t)=>{Hn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Rl(){return Wi(Ul)}const Al=o("ZodNever",(e,t)=>{Jn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ns(0,0,t)});function Nl(e){return Ki(Al,e)}const jl=o("ZodVoid",(e,t)=>{Gn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ts(0,e)});function Pl(e){return Xi(jl,e)}const Ml=o("ZodDate",(e,t)=>{Bn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>is(0,e),e.min=(t,n)=>e.check(ra(t,n)),e.max=(t,n)=>e.check(na(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Zl(e){return Qi(Ml,e)}const ql=o("ZodArray",(e,t)=>{Kn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>vs(e,t,n,o),e.element=t.element,e.min=(t,n)=>e.check(fa(t,n)),e.nonempty=t=>e.check(fa(1,t)),e.max=(t,n)=>e.check(ma(t,n)),e.length=(t,n)=>e.check(ha(t,n)),e.unwrap=()=>e.element});function Ll(e,t){return Ta(ql,e,t)}function Fl(e){const t=e._zod.def.shape;return mu(Object.keys(t))}const Vl=o("ZodObject",(e,t)=>{to.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>bs(e,t,n,o),v(e,"shape",()=>t.shape),e.keyof=()=>mu(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Rl()}),e.loose=()=>e.clone({...e._zod.def,catchall:Rl()}),e.strict=()=>e.clone({...e._zod.def,catchall:Nl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>P(e,t),e.safeExtend=t=>M(e,t),e.merge=t=>Z(e,t),e.pick=t=>N(e,t),e.omit=t=>j(e,t),e.partial=(...t)=>q(_u,e,t[0]),e.required=(...t)=>L(Ou,e,t[0])});function Hl(e,t){const n={type:"object",shape:e??{},...D(t)};return new Vl(n)}function Jl(e,t){return new Vl({type:"object",shape:e,catchall:Nl(),...D(t)})}function Gl(e,t){return new Vl({type:"object",shape:e,catchall:Rl(),...D(t)})}const Bl=o("ZodUnion",(e,t)=>{oo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>$s(e,t,n,o),e.options=t.options});function Wl(e,t){return new Bl({type:"union",options:e,...D(t)})}const Kl=o("ZodXor",(e,t)=>{Bl.init(e,t),io.init(e,t),e._zod.processJSONSchema=(t,n,o)=>$s(e,t,n,o),e.options=t.options});function Xl(e,t){return new Kl({type:"union",options:e,inclusive:!1,...D(t)})}const Ql=o("ZodDiscriminatedUnion",(e,t)=>{Bl.init(e,t),ao.init(e,t)});function Yl(e,t,n){return new Ql({type:"union",options:t,discriminator:e,...D(n)})}const eu=o("ZodIntersection",(e,t)=>{so.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ys(e,t,n,o)});function tu(e,t){return new eu({type:"intersection",left:e,right:t})}const nu=o("ZodTuple",(e,t)=>{uo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>_s(e,t,n,o),e.rest=t=>e.clone({...e._zod.def,rest:t})});function ou(e,t,n){const o=t instanceof rn;return new nu({type:"tuple",items:e,rest:o?t:null,...D(o?n:t)})}const ru=o("ZodRecord",(e,t)=>{mo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ks(e,t,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function iu(e,t,n){return new ru({type:"record",keyType:e,valueType:t,...D(n)})}function au(e,t,n){const o=T(e);return o._zod.values=void 0,new ru({type:"record",keyType:o,valueType:t,...D(n)})}function su(e,t,n){return new ru({type:"record",keyType:e,valueType:t,mode:"loose",...D(n)})}const cu=o("ZodMap",(e,t)=>{fo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>hs(0,e),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function lu(e,t,n){return new cu({type:"map",keyType:e,valueType:t,...D(n)})}const uu=o("ZodSet",(e,t)=>{go.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>gs(0,e),e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function du(e,t){return new uu({type:"set",valueType:e,...D(t)})}const pu=o("ZodEnum",(e,t)=>{bo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>as(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,o)=>{const r={};for(const o of e){if(!n.has(o))throw new Error(`Key ${o} not found in enum`);r[o]=t.entries[o]}return new pu({...t,checks:[],...D(o),entries:r})},e.exclude=(e,o)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new pu({...t,checks:[],...D(o),entries:r})}});function mu(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pu({type:"enum",entries:n,...D(t)})}function fu(e,t){return new pu({type:"enum",entries:e,...D(t)})}const hu=o("ZodLiteral",(e,t)=>{$o.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ss(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function gu(e,t){return new hu({type:"literal",values:Array.isArray(e)?e:[e],...D(t)})}const vu=o("ZodFile",(e,t)=>{yo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>us(e,0,n),e.min=(t,n)=>e.check(da(t,n)),e.max=(t,n)=>e.check(ua(t,n)),e.mime=(t,n)=>e.check(xa(Array.isArray(t)?t:[t],n))});function bu(e){return Da(vu,e)}const $u=o("ZodTransform",(e,t)=>{_o.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>fs(0,e),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new a(e.constructor.name);n.addIssue=o=>{if("string"==typeof o)n.issues.push(K(o,n.value,t));else{const t=o;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(K(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function yu(e){return new $u({type:"transform",transform:e})}const _u=o("ZodOptional",(e,t)=>{xo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ds(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function ku(e){return new _u({type:"optional",innerType:e})}const xu=o("ZodExactOptional",(e,t)=>{wo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ds(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function wu(e){return new xu({type:"optional",innerType:e})}const Iu=o("ZodNullable",(e,t)=>{Io.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>xs(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Cu(e){return new Iu({type:"nullable",innerType:e})}function Su(e){return ku(Cu(e))}const Eu=o("ZodDefault",(e,t)=>{Co.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Is(e,t,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zu(e,t){return new Eu({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():C(t)}})}const Tu=o("ZodPrefault",(e,t)=>{Eo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Cs(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Du(e,t){return new Tu({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():C(t)}})}const Ou=o("ZodNonOptional",(e,t)=>{zo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ws(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function Uu(e,t){return new Ou({type:"nonoptional",innerType:e,...D(t)})}const Ru=o("ZodSuccess",(e,t)=>{Do.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ds(0,0,t),e.unwrap=()=>e._zod.def.innerType});function Au(e){return new Ru({type:"success",innerType:e})}const Nu=o("ZodCatch",(e,t)=>{Oo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ss(e,t,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ju(e,t){return new Nu({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Pu=o("ZodNaN",(e,t)=>{Uo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>cs(0,e)});function Mu(e){return ea(Pu,e)}const Zu=o("ZodPipe",(e,t)=>{Ro.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Es(e,t,0,o),e.in=t.in,e.out=t.out});function qu(e,t){return new Zu({type:"pipe",in:e,out:t})}const Lu=o("ZodCodec",(e,t)=>{Zu.init(e,t),No.init(e,t)});function Fu(e,t,n){return new Lu({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Vu=o("ZodReadonly",(e,t)=>{Mo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>zs(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Hu(e){return new Vu({type:"readonly",innerType:e})}const Ju=o("ZodTemplateLiteral",(e,t)=>{qo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ls(e,0,n)});function Gu(e,t){return new Ju({type:"template_literal",parts:e,...D(t)})}const Bu=o("ZodLazy",(e,t)=>{Vo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Os(e,t,0,o),e.unwrap=()=>e._zod.def.getter()});function Wu(e){return new Bu({type:"lazy",getter:e})}const Ku=o("ZodPromise",(e,t)=>{Fo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ts(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function Xu(e){return new Ku({type:"promise",innerType:e})}const Qu=o("ZodFunction",(e,t)=>{Lo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ms(0,e)});function Yu(e){return new Qu({type:"function",input:Array.isArray(e?.input)?ou(e?.input):e?.input??Ll(Rl()),output:e?.output??Rl()})}const ed=o("ZodCustom",(e,t)=>{Ho.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ps(0,e)});function td(e){const t=new Ot({check:"custom"});return t._zod.check=e,t}function nd(e,t){return Oa(ed,e??(()=>!0),t)}function od(e,t={}){return Ua(ed,e,t)}function rd(e){return Ra(e)}const id=Na,ad=ja;function sd(e,t={}){const n=new ed({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...D(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const cd=(...e)=>Pa({Codec:Lu,Boolean:bl,String:pc},...e);function ld(e){const t=Wu(()=>Wl([mc(e),dl(),$l(),Tl(),Ll(t),iu(mc(),t)]));return t}function ud(e,t){return qu(yu(e),t)}const dd={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function pd(e){c({customError:e})}function md(){return c().customError}var fd;fd||(fd={});const hd={...Object.freeze({__proto__:null,ZodAny:Dl,ZodArray:ql,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:kl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Dc,ZodCUID2:Uc,ZodCatch:Nu,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Ml,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:hc,ZodEmoji:Sc,ZodEnum:pu,ZodExactOptional:xu,ZodFile:vu,ZodFunction:Qu,ZodGUID:vc,ZodIPv4:qc,ZodIPv6:Hc,ZodIntersection:eu,ZodJWT:ol,ZodKSUID:Mc,ZodLazy:Bu,ZodLiteral:hu,ZodMAC:Fc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Ou,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Vl,ZodOptional:_u,ZodPipe:Zu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Vu,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Ru,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:wc,ZodUUID:$c,ZodUndefined:Sl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:jl,ZodXID:jc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Ol,array:Ll,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:ju,check:td,cidrv4:Bc,cidrv6:Kc,codec:Fu,cuid:Oc,cuid2:Rc,custom:nd,date:Zl,describe:id,discriminatedUnion:Yl,e164:nl,email:gc,emoji:Ec,enum:mu,exactOptional:wu,file:bu,float32:fl,float64:hl,function:Yu,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Cc,instanceof:sd,int:ml,int32:gl,int64:xl,intersection:tu,ipv4:Lc,ipv6:Jc,json:ld,jwt:rl,keyof:Fl,ksuid:Zc,lazy:Wu,literal:gu,looseObject:Gl,looseRecord:su,mac:Vc,map:lu,meta:ad,nan:Mu,nanoid:Tc,nativeEnum:fu,never:Nl,nonoptional:Uu,null:Tl,nullable:Cu,nullish:Su,number:dl,object:Hl,optional:ku,partialRecord:au,pipe:qu,prefault:Du,preprocess:ud,promise:Xu,readonly:Hu,record:iu,refine:od,set:du,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Cl,templateLiteral:Gu,transform:yu,tuple:ou,uint32:vl,uint64:wl,ulid:Nc,undefined:El,union:Wl,unknown:Rl,url:Ic,uuid:yc,uuidv4:_c,uuidv6:kc,uuidv7:xc,void:Pl,xid:Pc,xor:Xl}),...Ms,iso:Bs},gd=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function vd(e,t){if(void 0!==e.not){if("object"==typeof e.not&&0===Object.keys(e.not).length)return hd.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==e.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==e.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==e.if||void 0!==e.then||void 0!==e.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==e.dependentSchemas||void 0!==e.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return hd.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const o=function(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;const o="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===o){const o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}(n,t),r=bd(o,t);return t.refs.set(n,r),t.processing.delete(n),r}if(void 0!==e.enum){const n=e.enum;if("openapi-3.0"===t.version&&!0===e.nullable&&1===n.length&&null===n[0])return hd.null();if(0===n.length)return hd.never();if(1===n.length)return hd.literal(n[0]);if(n.every(e=>"string"==typeof e))return hd.enum(n);const o=n.map(e=>hd.literal(e));return o.length<2?o[0]:hd.union([o[0],o[1],...o.slice(2)])}if(void 0!==e.const)return hd.literal(e.const);const n=e.type;if(Array.isArray(n)){const o=n.map(n=>vd({...e,type:n},t));return 0===o.length?hd.never():1===o.length?o[0]:hd.union(o)}if(!n)return hd.any();let o;switch(n){case"string":{let t=hd.string();if(e.format){const n=e.format;"email"===n?t=t.check(hd.email()):"uri"===n||"uri-reference"===n?t=t.check(hd.url()):"uuid"===n||"guid"===n?t=t.check(hd.uuid()):"date-time"===n?t=t.check(hd.iso.datetime()):"date"===n?t=t.check(hd.iso.date()):"time"===n?t=t.check(hd.iso.time()):"duration"===n?t=t.check(hd.iso.duration()):"ipv4"===n?t=t.check(hd.ipv4()):"ipv6"===n?t=t.check(hd.ipv6()):"mac"===n?t=t.check(hd.mac()):"cidr"===n?t=t.check(hd.cidrv4()):"cidr-v6"===n?t=t.check(hd.cidrv6()):"base64"===n?t=t.check(hd.base64()):"base64url"===n?t=t.check(hd.base64url()):"e164"===n?t=t.check(hd.e164()):"jwt"===n?t=t.check(hd.jwt()):"emoji"===n?t=t.check(hd.emoji()):"nanoid"===n?t=t.check(hd.nanoid()):"cuid"===n?t=t.check(hd.cuid()):"cuid2"===n?t=t.check(hd.cuid2()):"ulid"===n?t=t.check(hd.ulid()):"xid"===n?t=t.check(hd.xid()):"ksuid"===n&&(t=t.check(hd.ksuid()))}"number"==typeof e.minLength&&(t=t.min(e.minLength)),"number"==typeof e.maxLength&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),o=t;break}case"number":case"integer":{let t="integer"===n?hd.number().int():hd.number();"number"==typeof e.minimum&&(t=t.min(e.minimum)),"number"==typeof e.maximum&&(t=t.max(e.maximum)),"number"==typeof e.exclusiveMinimum?t=t.gt(e.exclusiveMinimum):!0===e.exclusiveMinimum&&"number"==typeof e.minimum&&(t=t.gt(e.minimum)),"number"==typeof e.exclusiveMaximum?t=t.lt(e.exclusiveMaximum):!0===e.exclusiveMaximum&&"number"==typeof e.maximum&&(t=t.lt(e.maximum)),"number"==typeof e.multipleOf&&(t=t.multipleOf(e.multipleOf)),o=t;break}case"boolean":o=hd.boolean();break;case"null":o=hd.null();break;case"object":{const n={},r=e.properties||{},i=new Set(e.required||[]);for(const[e,o]of Object.entries(r)){const r=bd(o,t);n[e]=i.has(e)?r:r.optional()}if(e.propertyNames){const r=bd(e.propertyNames,t),i=e.additionalProperties&&"object"==typeof e.additionalProperties?bd(e.additionalProperties,t):hd.any();if(0===Object.keys(n).length){o=hd.record(r,i);break}const a=hd.object(n).passthrough(),s=hd.looseRecord(r,i);o=hd.intersection(a,s);break}if(e.patternProperties){const r=e.patternProperties,i=Object.keys(r),a=[];for(const e of i){const n=bd(r[e],t),o=hd.string().regex(new RegExp(e));a.push(hd.looseRecord(o,n))}const s=[];if(Object.keys(n).length>0&&s.push(hd.object(n).passthrough()),s.push(...a),0===s.length)o=hd.object({}).passthrough();else if(1===s.length)o=s[0];else{let e=hd.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=hd.intersection(e,s[t]);o=e}break}const a=hd.object(n);o=!1===e.additionalProperties?a.strict():"object"==typeof e.additionalProperties?a.catchall(bd(e.additionalProperties,t)):a.passthrough();break}case"array":{const n=e.prefixItems,r=e.items;if(n&&Array.isArray(n)){const i=n.map(e=>bd(e,t)),a=r&&"object"==typeof r&&!Array.isArray(r)?bd(r,t):void 0;o=a?hd.tuple(i).rest(a):hd.tuple(i),"number"==typeof e.minItems&&(o=o.check(hd.minLength(e.minItems))),"number"==typeof e.maxItems&&(o=o.check(hd.maxLength(e.maxItems)))}else if(Array.isArray(r)){const n=r.map(e=>bd(e,t)),i=e.additionalItems&&"object"==typeof e.additionalItems?bd(e.additionalItems,t):void 0;o=i?hd.tuple(n).rest(i):hd.tuple(n),"number"==typeof e.minItems&&(o=o.check(hd.minLength(e.minItems))),"number"==typeof e.maxItems&&(o=o.check(hd.maxLength(e.maxItems)))}else if(void 0!==r){const n=bd(r,t);let i=hd.array(n);"number"==typeof e.minItems&&(i=i.min(e.minItems)),"number"==typeof e.maxItems&&(i=i.max(e.maxItems)),o=i}else o=hd.array(hd.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(o=o.describe(e.description)),void 0!==e.default&&(o=o.default(e.default)),o}function bd(e,t){if("boolean"==typeof e)return e?hd.any():hd.never();let n=vd(e,t);const o=e.type||void 0!==e.enum||void 0!==e.const;if(e.anyOf&&Array.isArray(e.anyOf)){const r=e.anyOf.map(e=>bd(e,t)),i=hd.union(r);n=o?hd.intersection(n,i):i}if(e.oneOf&&Array.isArray(e.oneOf)){const r=e.oneOf.map(e=>bd(e,t)),i=hd.xor(r);n=o?hd.intersection(n,i):i}if(e.allOf&&Array.isArray(e.allOf))if(0===e.allOf.length)n=o?n:hd.any();else{let r=o?n:bd(e.allOf[0],t);for(let n=o?0:1;n<e.allOf.length;n++)r=hd.intersection(r,bd(e.allOf[n],t));n=r}!0===e.nullable&&"openapi-3.0"===t.version&&(n=hd.nullable(n)),!0===e.readOnly&&(n=hd.readonly(n));const r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const t of i)t in e&&(r[t]=e[t]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const t of a)t in e&&(r[t]=e[t]);for(const t of Object.keys(e))gd.has(t)||(r[t]=e[t]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function $d(e,t){if("boolean"==typeof e)return e?hd.any():hd.never();const n=function(e,t){const n=e.$schema;return"https://json-schema.org/draft/2020-12/schema"===n?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===n?"draft-7":"http://json-schema.org/draft-04/schema#"===n?"draft-4":t??"draft-2020-12"}(e,t?.defaultTarget);return bd(e,{version:n,defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??ti})}var yd=Object.freeze({__proto__:null,bigint:function(e){return Li(yl,e)},boolean:function(e){return Zi(bl,e)},date:function(e){return Yi(Ml,e)},number:function(e){return Ui(ul,e)},string:function(e){return oi(pc,e)}});c(or());var _d=Object.freeze({__proto__:null,$brand:r,$input:Qr,$output:Xr,NEVER:n,TimePrecision:Si,ZodAny:Dl,ZodArray:ql,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:kl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Dc,ZodCUID2:Uc,ZodCatch:Nu,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Ml,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:hc,ZodEmoji:Sc,ZodEnum:pu,ZodError:Ks,ZodExactOptional:xu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Qu,ZodGUID:vc,ZodIPv4:qc,ZodIPv6:Hc,ZodISODate:Ls,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Vs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ol,ZodKSUID:Mc,ZodLazy:Bu,ZodLiteral:hu,ZodMAC:Fc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Ou,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Vl,ZodOptional:_u,ZodPipe:Zu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Vu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Ru,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:wc,ZodUUID:$c,ZodUndefined:Sl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:jl,ZodXID:jc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Ol,array:Ll,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:ju,check:td,cidrv4:Bc,cidrv6:Kc,clone:T,codec:Fu,coerce:yd,config:c,core:Ns,cuid:Oc,cuid2:Rc,custom:nd,date:Zl,decode:oc,decodeAsync:ic,describe:id,discriminatedUnion:Yl,e164:nl,email:gc,emoji:Ec,encode:nc,encodeAsync:rc,endsWith:_a,enum:mu,exactOptional:wu,file:bu,flattenError:oe,float32:fl,float64:hl,formatError:re,fromJSONSchema:$d,function:Yu,getErrorMap:md,globalRegistry:ti,gt:oa,gte:ra,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Cc,includes:$a,instanceof:sd,int:ml,int32:gl,int64:xl,intersection:tu,ipv4:Lc,ipv6:Jc,iso:Bs,json:ld,jwt:rl,keyof:Fl,ksuid:Zc,lazy:Wu,length:ha,literal:gu,locales:Kr,looseObject:Gl,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Vc,map:lu,maxLength:ma,maxSize:ua,meta:ad,mime:xa,minLength:fa,minSize:da,multipleOf:la,nan:Mu,nanoid:Tc,nativeEnum:fu,negative:aa,never:Nl,nonnegative:ca,nonoptional:Uu,nonpositive:sa,normalize:Ia,null:Tl,nullable:Cu,nullish:Su,number:dl,object:Hl,optional:ku,overwrite:wa,parse:Qs,parseAsync:Ys,partialRecord:au,pipe:qu,positive:ia,prefault:Du,preprocess:ud,prettifyError:se,promise:Xu,property:ka,readonly:Hu,record:iu,refine:od,regex:ga,regexes:Dt,registry:ei,safeDecode:sc,safeDecodeAsync:lc,safeEncode:ac,safeEncodeAsync:cc,safeParse:ec,safeParseAsync:tc,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:ya,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Cl,templateLiteral:Gu,toJSONSchema:Rs,toLowerCase:Sa,toUpperCase:Ea,transform:yu,treeifyError:ie,trim:Ca,tuple:ou,uint32:vl,uint64:wl,ulid:Nc,undefined:El,union:Wl,unknown:Rl,uppercase:ba,url:Ic,util:Y,uuid:yc,uuidv4:_c,uuidv6:kc,uuidv7:xc,void:Pl,xid:Pc,xor:Xl}),kd=Object.freeze({__proto__:null,$brand:r,$input:Qr,$output:Xr,NEVER:n,TimePrecision:Si,ZodAny:Dl,ZodArray:ql,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:kl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Dc,ZodCUID2:Uc,ZodCatch:Nu,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Ml,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:hc,ZodEmoji:Sc,ZodEnum:pu,ZodError:Ks,ZodExactOptional:xu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Qu,ZodGUID:vc,ZodIPv4:qc,ZodIPv6:Hc,ZodISODate:Ls,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Vs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ol,ZodKSUID:Mc,ZodLazy:Bu,ZodLiteral:hu,ZodMAC:Fc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Ou,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Vl,ZodOptional:_u,ZodPipe:Zu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Vu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Ru,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:wc,ZodUUID:$c,ZodUndefined:Sl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:jl,ZodXID:jc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Ol,array:Ll,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:ju,check:td,cidrv4:Bc,cidrv6:Kc,clone:T,codec:Fu,coerce:yd,config:c,core:Ns,cuid:Oc,cuid2:Rc,custom:nd,date:Zl,decode:oc,decodeAsync:ic,describe:id,discriminatedUnion:Yl,e164:nl,email:gc,emoji:Ec,encode:nc,encodeAsync:rc,endsWith:_a,enum:mu,exactOptional:wu,file:bu,flattenError:oe,float32:fl,float64:hl,formatError:re,fromJSONSchema:$d,function:Yu,getErrorMap:md,globalRegistry:ti,gt:oa,gte:ra,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Cc,includes:$a,instanceof:sd,int:ml,int32:gl,int64:xl,intersection:tu,ipv4:Lc,ipv6:Jc,iso:Bs,json:ld,jwt:rl,keyof:Fl,ksuid:Zc,lazy:Wu,length:ha,literal:gu,locales:Kr,looseObject:Gl,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Vc,map:lu,maxLength:ma,maxSize:ua,meta:ad,mime:xa,minLength:fa,minSize:da,multipleOf:la,nan:Mu,nanoid:Tc,nativeEnum:fu,negative:aa,never:Nl,nonnegative:ca,nonoptional:Uu,nonpositive:sa,normalize:Ia,null:Tl,nullable:Cu,nullish:Su,number:dl,object:Hl,optional:ku,overwrite:wa,parse:Qs,parseAsync:Ys,partialRecord:au,pipe:qu,positive:ia,prefault:Du,preprocess:ud,prettifyError:se,promise:Xu,property:ka,readonly:Hu,record:iu,refine:od,regex:ga,regexes:Dt,registry:ei,safeDecode:sc,safeDecodeAsync:lc,safeEncode:ac,safeEncodeAsync:cc,safeParse:ec,safeParseAsync:tc,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:ya,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Cl,templateLiteral:Gu,toJSONSchema:Rs,toLowerCase:Sa,toUpperCase:Ea,transform:yu,treeifyError:ie,trim:Ca,tuple:ou,uint32:vl,uint64:wl,ulid:Nc,undefined:El,union:Wl,unknown:Rl,uppercase:ba,url:Ic,util:Y,uuid:yc,uuidv4:_c,uuidv6:kc,uuidv7:xc,void:Pl,xid:Pc,xor:Xl,z:_d});const xd="io.modelcontextprotocol/related-task",wd="2.0",Id=nd(e=>null!==e&&("object"==typeof e||"function"==typeof e)),Cd=Wl([mc(),dl().int()]),Sd=mc();Gl({ttl:dl().optional(),pollInterval:dl().optional()});const Ed=Hl({ttl:dl().optional()}),zd=Hl({taskId:mc()}),Td=Gl({progressToken:Cd.optional(),[xd]:zd.optional()}),Dd=Hl({_meta:Td.optional()}),Od=Dd.extend({task:Ed.optional()}),Ud=Hl({method:mc(),params:Dd.loose().optional()}),Rd=Hl({_meta:Td.optional()}),Ad=Hl({method:mc(),params:Rd.loose().optional()}),Nd=Gl({_meta:Td.optional()}),jd=Wl([mc(),dl().int()]),Pd=Hl({jsonrpc:gu(wd),id:jd,...Ud.shape}).strict(),Md=e=>Pd.safeParse(e).success,Zd=Hl({jsonrpc:gu(wd),...Ad.shape}).strict(),qd=Hl({jsonrpc:gu(wd),id:jd,result:Nd}).strict(),Ld=e=>qd.safeParse(e).success;var Fd;!function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"}(Fd||(Fd={}));const Vd=Hl({jsonrpc:gu(wd),id:jd.optional(),error:Hl({code:dl().int(),message:mc(),data:Rl().optional()})}).strict(),Hd=Wl([Pd,Zd,qd,Vd]);Wl([qd,Vd]);const Jd=Nd.strict(),Gd=Rd.extend({requestId:jd.optional(),reason:mc().optional()}),Bd=Ad.extend({method:gu("notifications/cancelled"),params:Gd}),Wd=Hl({src:mc(),mimeType:mc().optional(),sizes:Ll(mc()).optional(),theme:mu(["light","dark"]).optional()}),Kd=Hl({icons:Ll(Wd).optional()}),Xd=Hl({name:mc(),title:mc().optional()}),Qd=Xd.extend({...Xd.shape,...Kd.shape,version:mc(),websiteUrl:mc().optional(),description:mc().optional()}),Yd=tu(Hl({applyDefaults:$l().optional()}),iu(mc(),Rl())),ep=ud(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,tu(Hl({form:Yd.optional(),url:Id.optional()}),iu(mc(),Rl()).optional())),tp=Gl({list:Id.optional(),cancel:Id.optional(),requests:Gl({sampling:Gl({createMessage:Id.optional()}).optional(),elicitation:Gl({create:Id.optional()}).optional()}).optional()}),np=Gl({list:Id.optional(),cancel:Id.optional(),requests:Gl({tools:Gl({call:Id.optional()}).optional()}).optional()}),op=Hl({experimental:iu(mc(),Id).optional(),sampling:Hl({context:Id.optional(),tools:Id.optional()}).optional(),elicitation:ep.optional(),roots:Hl({listChanged:$l().optional()}).optional(),tasks:tp.optional(),extensions:iu(mc(),Id).optional()}),rp=Dd.extend({protocolVersion:mc(),capabilities:op,clientInfo:Qd}),ip=Ud.extend({method:gu("initialize"),params:rp}),ap=Hl({experimental:iu(mc(),Id).optional(),logging:Id.optional(),completions:Id.optional(),prompts:Hl({listChanged:$l().optional()}).optional(),resources:Hl({subscribe:$l().optional(),listChanged:$l().optional()}).optional(),tools:Hl({listChanged:$l().optional()}).optional(),tasks:np.optional(),extensions:iu(mc(),Id).optional()}),sp=Nd.extend({protocolVersion:mc(),capabilities:ap,serverInfo:Qd,instructions:mc().optional()}),cp=Ad.extend({method:gu("notifications/initialized"),params:Rd.optional()}),lp=Ud.extend({method:gu("ping"),params:Dd.optional()}),up=Hl({progress:dl(),total:ku(dl()),message:ku(mc())}),dp=Hl({...Rd.shape,...up.shape,progressToken:Cd}),pp=Ad.extend({method:gu("notifications/progress"),params:dp}),mp=Dd.extend({cursor:Sd.optional()}),fp=Ud.extend({params:mp.optional()}),hp=Nd.extend({nextCursor:Sd.optional()}),gp=mu(["working","input_required","completed","failed","cancelled"]),vp=Hl({taskId:mc(),status:gp,ttl:Wl([dl(),Tl()]),createdAt:mc(),lastUpdatedAt:mc(),pollInterval:ku(dl()),statusMessage:ku(mc())}),bp=Nd.extend({task:vp}),$p=Rd.merge(vp),yp=Ad.extend({method:gu("notifications/tasks/status"),params:$p}),_p=Ud.extend({method:gu("tasks/get"),params:Dd.extend({taskId:mc()})}),kp=Nd.merge(vp),xp=Ud.extend({method:gu("tasks/result"),params:Dd.extend({taskId:mc()})});Nd.loose();const wp=fp.extend({method:gu("tasks/list")}),Ip=hp.extend({tasks:Ll(vp)}),Cp=Ud.extend({method:gu("tasks/cancel"),params:Dd.extend({taskId:mc()})}),Sp=Nd.merge(vp),Ep=Hl({uri:mc(),mimeType:ku(mc()),_meta:iu(mc(),Rl()).optional()}),zp=Ep.extend({text:mc()}),Tp=mc().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Dp=Ep.extend({blob:Tp}),Op=mu(["user","assistant"]),Up=Hl({audience:Ll(Op).optional(),priority:dl().min(0).max(1).optional(),lastModified:qs({offset:!0}).optional()}),Rp=Hl({...Xd.shape,...Kd.shape,uri:mc(),description:ku(mc()),mimeType:ku(mc()),size:ku(dl()),annotations:Up.optional(),_meta:ku(Gl({}))}),Ap=Hl({...Xd.shape,...Kd.shape,uriTemplate:mc(),description:ku(mc()),mimeType:ku(mc()),annotations:Up.optional(),_meta:ku(Gl({}))}),Np=fp.extend({method:gu("resources/list")}),jp=hp.extend({resources:Ll(Rp)}),Pp=fp.extend({method:gu("resources/templates/list")}),Mp=hp.extend({resourceTemplates:Ll(Ap)}),Zp=Dd.extend({uri:mc()}),qp=Zp,Lp=Ud.extend({method:gu("resources/read"),params:qp}),Fp=Nd.extend({contents:Ll(Wl([zp,Dp]))}),Vp=Ad.extend({method:gu("notifications/resources/list_changed"),params:Rd.optional()}),Hp=Zp,Jp=Ud.extend({method:gu("resources/subscribe"),params:Hp}),Gp=Zp,Bp=Ud.extend({method:gu("resources/unsubscribe"),params:Gp}),Wp=Rd.extend({uri:mc()}),Kp=Ad.extend({method:gu("notifications/resources/updated"),params:Wp}),Xp=Hl({name:mc(),description:ku(mc()),required:ku($l())}),Qp=Hl({...Xd.shape,...Kd.shape,description:ku(mc()),arguments:ku(Ll(Xp)),_meta:ku(Gl({}))}),Yp=fp.extend({method:gu("prompts/list")}),em=hp.extend({prompts:Ll(Qp)}),tm=Dd.extend({name:mc(),arguments:iu(mc(),mc()).optional()}),nm=Ud.extend({method:gu("prompts/get"),params:tm}),om=Hl({type:gu("text"),text:mc(),annotations:Up.optional(),_meta:iu(mc(),Rl()).optional()}),rm=Hl({type:gu("image"),data:Tp,mimeType:mc(),annotations:Up.optional(),_meta:iu(mc(),Rl()).optional()}),im=Hl({type:gu("audio"),data:Tp,mimeType:mc(),annotations:Up.optional(),_meta:iu(mc(),Rl()).optional()}),am=Hl({type:gu("tool_use"),name:mc(),id:mc(),input:iu(mc(),Rl()),_meta:iu(mc(),Rl()).optional()}),sm=Hl({type:gu("resource"),resource:Wl([zp,Dp]),annotations:Up.optional(),_meta:iu(mc(),Rl()).optional()}),cm=Rp.extend({type:gu("resource_link")}),lm=Wl([om,rm,im,cm,sm]),um=Hl({role:Op,content:lm}),dm=Nd.extend({description:mc().optional(),messages:Ll(um)}),pm=Ad.extend({method:gu("notifications/prompts/list_changed"),params:Rd.optional()}),mm=Hl({title:mc().optional(),readOnlyHint:$l().optional(),destructiveHint:$l().optional(),idempotentHint:$l().optional(),openWorldHint:$l().optional()}),fm=Hl({taskSupport:mu(["required","optional","forbidden"]).optional()}),hm=Hl({...Xd.shape,...Kd.shape,description:mc().optional(),inputSchema:Hl({type:gu("object"),properties:iu(mc(),Id).optional(),required:Ll(mc()).optional()}).catchall(Rl()),outputSchema:Hl({type:gu("object"),properties:iu(mc(),Id).optional(),required:Ll(mc()).optional()}).catchall(Rl()).optional(),annotations:mm.optional(),execution:fm.optional(),_meta:iu(mc(),Rl()).optional()}),gm=fp.extend({method:gu("tools/list")}),vm=hp.extend({tools:Ll(hm)}),bm=Nd.extend({content:Ll(lm).default([]),structuredContent:iu(mc(),Rl()).optional(),isError:$l().optional()});bm.or(Nd.extend({toolResult:Rl()}));const $m=Od.extend({name:mc(),arguments:iu(mc(),Rl()).optional()}),ym=Ud.extend({method:gu("tools/call"),params:$m}),_m=Ad.extend({method:gu("notifications/tools/list_changed"),params:Rd.optional()});Hl({autoRefresh:$l().default(!0),debounceMs:dl().int().nonnegative().default(300)});const km=mu(["debug","info","notice","warning","error","critical","alert","emergency"]),xm=Dd.extend({level:km}),wm=Ud.extend({method:gu("logging/setLevel"),params:xm}),Im=Rd.extend({level:km,logger:mc().optional(),data:Rl()}),Cm=Ad.extend({method:gu("notifications/message"),params:Im}),Sm=Hl({name:mc().optional()}),Em=Hl({hints:Ll(Sm).optional(),costPriority:dl().min(0).max(1).optional(),speedPriority:dl().min(0).max(1).optional(),intelligencePriority:dl().min(0).max(1).optional()}),zm=Hl({mode:mu(["auto","required","none"]).optional()}),Tm=Hl({type:gu("tool_result"),toolUseId:mc().describe("The unique identifier for the corresponding tool call."),content:Ll(lm).default([]),structuredContent:Hl({}).loose().optional(),isError:$l().optional(),_meta:iu(mc(),Rl()).optional()}),Dm=Yl("type",[om,rm,im]),Om=Yl("type",[om,rm,im,am,Tm]),Um=Hl({role:Op,content:Wl([Om,Ll(Om)]),_meta:iu(mc(),Rl()).optional()}),Rm=Od.extend({messages:Ll(Um),modelPreferences:Em.optional(),systemPrompt:mc().optional(),includeContext:mu(["none","thisServer","allServers"]).optional(),temperature:dl().optional(),maxTokens:dl().int(),stopSequences:Ll(mc()).optional(),metadata:Id.optional(),tools:Ll(hm).optional(),toolChoice:zm.optional()}),Am=Ud.extend({method:gu("sampling/createMessage"),params:Rm}),Nm=Nd.extend({model:mc(),stopReason:ku(mu(["endTurn","stopSequence","maxTokens"]).or(mc())),role:Op,content:Dm}),jm=Nd.extend({model:mc(),stopReason:ku(mu(["endTurn","stopSequence","maxTokens","toolUse"]).or(mc())),role:Op,content:Wl([Om,Ll(Om)])}),Pm=Hl({type:gu("boolean"),title:mc().optional(),description:mc().optional(),default:$l().optional()}),Mm=Hl({type:gu("string"),title:mc().optional(),description:mc().optional(),minLength:dl().optional(),maxLength:dl().optional(),format:mu(["email","uri","date","date-time"]).optional(),default:mc().optional()}),Zm=Hl({type:mu(["number","integer"]),title:mc().optional(),description:mc().optional(),minimum:dl().optional(),maximum:dl().optional(),default:dl().optional()}),qm=Hl({type:gu("string"),title:mc().optional(),description:mc().optional(),enum:Ll(mc()),default:mc().optional()}),Lm=Hl({type:gu("string"),title:mc().optional(),description:mc().optional(),oneOf:Ll(Hl({const:mc(),title:mc()})),default:mc().optional()}),Fm=Hl({type:gu("string"),title:mc().optional(),description:mc().optional(),enum:Ll(mc()),enumNames:Ll(mc()).optional(),default:mc().optional()}),Vm=Wl([qm,Lm]),Hm=Wl([Hl({type:gu("array"),title:mc().optional(),description:mc().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Hl({type:gu("string"),enum:Ll(mc())}),default:Ll(mc()).optional()}),Hl({type:gu("array"),title:mc().optional(),description:mc().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Hl({anyOf:Ll(Hl({const:mc(),title:mc()}))}),default:Ll(mc()).optional()})]),Jm=Wl([Fm,Vm,Hm]),Gm=Wl([Jm,Pm,Mm,Zm]),Bm=Wl([Od.extend({mode:gu("form").optional(),message:mc(),requestedSchema:Hl({type:gu("object"),properties:iu(mc(),Gm),required:Ll(mc()).optional()})}),Od.extend({mode:gu("url"),message:mc(),elicitationId:mc(),url:mc().url()})]),Wm=Ud.extend({method:gu("elicitation/create"),params:Bm}),Km=Rd.extend({elicitationId:mc()}),Xm=Ad.extend({method:gu("notifications/elicitation/complete"),params:Km}),Qm=Nd.extend({action:mu(["accept","decline","cancel"]),content:ud(e=>null===e?void 0:e,iu(mc(),Wl([mc(),dl(),$l(),Ll(mc())])).optional())}),Ym=Hl({type:gu("ref/resource"),uri:mc()}),ef=Hl({type:gu("ref/prompt"),name:mc()}),tf=Dd.extend({ref:Wl([ef,Ym]),argument:Hl({name:mc(),value:mc()}),context:Hl({arguments:iu(mc(),mc()).optional()}).optional()}),nf=Ud.extend({method:gu("completion/complete"),params:tf}),of=Nd.extend({completion:Gl({values:Ll(mc()).max(100),total:ku(dl().int()),hasMore:ku($l())})}),rf=Hl({uri:mc().startsWith("file://"),name:mc().optional(),_meta:iu(mc(),Rl()).optional()}),af=Ud.extend({method:gu("roots/list"),params:Dd.optional()}),sf=Nd.extend({roots:Ll(rf)}),cf=Ad.extend({method:gu("notifications/roots/list_changed"),params:Rd.optional()});Wl([lp,ip,nf,wm,nm,Yp,Np,Pp,Lp,Jp,Bp,ym,gm,_p,xp,wp,Cp]),Wl([Bd,pp,cp,cf,yp]),Wl([Jd,Nm,jm,Qm,sf,kp,Ip,bp]),Wl([lp,Am,Wm,af,_p,xp,wp,Cp]),Wl([Bd,pp,Cm,Kp,Vp,_m,pm,yp,Xm]),Wl([Jd,sp,of,dm,em,jp,Mp,Fp,bm,vm,kp,Ip,bp]);class lf extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,t,n){if(e===Fd.UrlElicitationRequired&&n){const e=n;if(e.elicitations)return new uf(e.elicitations,t)}return new lf(e,t,n)}}class uf extends lf{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Fd.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}function df(e){return"completed"===e||"failed"===e||"cancelled"===e}function pf(e){const t=function(e){if(!e)return;let t;if(js(e)){const n=e;t=n._zod?.def?.shape}else t=e.shape;if(t){if("function"==typeof t)try{return t()}catch{return}return t}}(e),n=t?.method;if(!n)throw new Error("Schema is missing a method literal");const o=function(e){if(js(e)){const t=e,n=t._zod?.def;if(n){if(void 0!==n.value)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}}const t=e._def;if(t){if(void 0!==t.value)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const n=e.value;if(void 0!==n)return n}(n);if("string"!=typeof o)throw new Error("Schema method literal must be a string");return o}function mf(e,t){const n=Ps(e,t);if(!n.success)throw n.error;return n.data}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");class ff{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Bd,e=>{this._oncancel(e)}),this.setNotificationHandler(pp,e=>{this._onprogress(e)}),this.setRequestHandler(lp,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(_p,async(e,t)=>{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new lf(Fd.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(xp,async(e,t)=>{const n=async()=>{const o=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(o,t.sessionId);){if("response"===e.type||"error"===e.type){const t=e.message,n=t.id,o=this._requestResolvers.get(n);if(o)if(this._requestResolvers.delete(n),"response"===e.type)o(t);else{const e=t;o(new lf(e.error.code,e.error.message,e.error.data))}else{const t="response"===e.type?"Response":"Error";this._onerror(new Error(`${t} handler missing for request ${n}`))}continue}await(this._transport?.send(e.message,{relatedRequestId:t.requestId}))}}const r=await this._taskStore.getTask(o,t.sessionId);if(!r)throw new lf(Fd.InvalidParams,`Task not found: ${o}`);if(!df(r.status))return await this._waitForTaskUpdate(o,t.signal),await n();if(df(r.status)){const e=await this._taskStore.getTaskResult(o,t.sessionId);return this._clearTaskQueue(o),{...e,_meta:{...e._meta,[xd]:{taskId:o}}}}return await n()};return await n()}),this.setRequestHandler(wp,async(e,t)=>{try{const{tasks:n,nextCursor:o}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:o,_meta:{}}}catch(e){throw new lf(Fd.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Cp,async(e,t)=>{try{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new lf(Fd.InvalidParams,`Task not found: ${e.params.taskId}`);if(df(n.status))throw new lf(Fd.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,"cancelled","Client cancelled task execution.",t.sessionId),this._clearTaskQueue(e.params.taskId);const o=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!o)throw new lf(Fd.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...o}}catch(e){if(e instanceof lf)throw e;throw new lf(Fd.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;const t=this._requestHandlerAbortControllers.get(e.params.requestId);t?.abort(e.params.reason)}_setupTimeout(e,t,n,o,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),lf.fromError(Fd.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};const o=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{var n;o?.(e,t),Ld(e)||(n=e,Vd.safeParse(n).success)?this._onresponse(e):Md(e)?this._onrequest(e,t):(e=>Zd.safeParse(e).success)(e)?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(const e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();const t=lf.fromError(Fd.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){const n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,r=e.params?._meta?.[xd]?.taskId;if(void 0===n){const t={jsonrpc:"2.0",id:e.id,error:{code:Fd.MethodNotFound,message:"Method not found"}};return void(r&&this._taskMessageQueue?this._enqueueTaskMessage(r,{type:"error",message:t,timestamp:Date.now()},o?.sessionId).catch(e=>this._onerror(new Error(`Failed to enqueue error response: ${e}`))):o?.send(t).catch(e=>this._onerror(new Error(`Failed to send an error response: ${e}`))))}const i=new AbortController;this._requestHandlerAbortControllers.set(e.id,i);const a=(s=e.params,Od.safeParse(s).success?e.params.task:void 0);var s;const c=this._taskStore?this.requestTaskStore(e,o?.sessionId):void 0,l={signal:i.signal,sessionId:o?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(i.signal.aborted)return;const n={relatedRequestId:e.id};r&&(n.relatedTask={taskId:r}),await this.notification(t,n)},sendRequest:async(t,n,o)=>{if(i.signal.aborted)throw new lf(Fd.ConnectionClosed,"Request was cancelled");const a={...o,relatedRequestId:e.id};r&&!a.relatedTask&&(a.relatedTask={taskId:r});const s=a.relatedTask?.taskId??r;return s&&c&&await c.updateTaskStatus(s,"input_required"),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:r,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,l)).then(async t=>{if(i.signal.aborted)return;const n={result:t,jsonrpc:"2.0",id:e.id};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"response",message:n,timestamp:Date.now()},o?.sessionId):await(o?.send(n))},async t=>{if(i.signal.aborted)return;const n={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Fd.InternalError,message:t.message??"Internal error",...void 0!==t.data&&{data:t.data}}};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"error",message:n,timestamp:Date.now()},o?.sessionId):await(o?.send(n))}).catch(e=>this._onerror(new Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===i&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const i=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&i&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(e){return this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),void i(e)}r(n)}_onresponse(e){const t=Number(e.id),n=this._requestResolvers.get(t);if(n){if(this._requestResolvers.delete(t),Ld(e))n(e);else{n(new lf(e.error.code,e.error.message,e.error.data))}return}const o=this._responseHandlers.get(t);if(void 0===o)return void this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));this._responseHandlers.delete(t),this._cleanupTimeout(t);let r=!1;if(Ld(e)&&e.result&&"object"==typeof e.result){const n=e.result;if(n.task&&"object"==typeof n.task){const e=n.task;"string"==typeof e.taskId&&(r=!0,this._taskProgressTokens.set(e.taskId,t))}}if(r||this._progressHandlers.delete(t),Ld(e))o(e);else{o(lf.fromError(e.error.code,e.error.message,e.error.data))}}get transport(){return this._transport}async close(){await(this._transport?.close())}async*requestStream(e,t,n){const{task:o}=n??{};if(!o){try{const o=await this.request(e,t,n);yield{type:"result",result:o}}catch(e){yield{type:"error",error:e instanceof lf?e:new lf(Fd.InternalError,String(e))}}return}let r;try{const o=await this.request(e,bp,n);if(!o.task)throw new lf(Fd.InternalError,"Task creation did not return a task");for(r=o.task.taskId,yield{type:"taskCreated",task:o.task};;){const e=await this.getTask({taskId:r},n);if(yield{type:"taskStatus",task:e},df(e.status)){if("completed"===e.status){const e=await this.getTaskResult({taskId:r},t,n);yield{type:"result",result:e}}else"failed"===e.status?yield{type:"error",error:new lf(Fd.InternalError,`Task ${r} failed`)}:"cancelled"===e.status&&(yield{type:"error",error:new lf(Fd.InternalError,`Task ${r} was cancelled`)});return}if("input_required"===e.status){const e=await this.getTaskResult({taskId:r},t,n);return void(yield{type:"result",result:e})}const o=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,o)),n?.signal?.throwIfAborted()}}catch(e){yield{type:"error",error:e instanceof lf?e:new lf(Fd.InternalError,String(e))}}}request(e,t,n){const{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i,task:a,relatedTask:s}=n??{};return new Promise((c,l)=>{const u=e=>{l(e)};if(!this._transport)return void u(new Error("Not connected"));if(!0===this._options?.enforceStrictCapabilities)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(e){return void u(e)}n?.signal?.throwIfAborted();const d=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),p.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),a&&(p.params={...p.params,task:a}),s&&(p.params={...p.params,_meta:{...p.params?._meta||{},[xd]:s}});const m=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(e)}},{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i}).catch(e=>this._onerror(new Error(`Failed to send cancellation: ${e}`)));const t=e instanceof lf?e:new lf(Fd.RequestTimeout,String(e));l(t)};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{const n=Ps(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});const f=n?.timeout??6e4;this._setupTimeout(d,f,n?.maxTotalTimeout,()=>m(lf.fromError(Fd.RequestTimeout,"Request timed out",{timeout:f})),n?.resetTimeoutOnProgress??!1);const h=s?.taskId;if(h){const e=e=>{const t=this._responseHandlers.get(d);t?t(e):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,e),this._enqueueTaskMessage(h,{type:"request",message:p,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})}else this._transport.send(p,{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},kp,t)}async getTaskResult(e,t,n){return this.request({method:"tasks/result",params:e},t,n)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},Ip,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},Sp,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const n=t?.relatedTask?.taskId;if(n){const o={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[xd]:t.relatedTask}}};return void await this._enqueueTaskMessage(n,{type:"notification",message:o,timestamp:Date.now()})}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[xd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))})}let o={...e,jsonrpc:"2.0"};t?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[xd]:t.relatedTask}}}),await this._transport.send(o,t)}setRequestHandler(e,t){const n=pf(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,o)=>{const r=mf(e,n);return Promise.resolve(t(r,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const n=pf(e);this._notificationHandlers.set(n,n=>{const o=mf(e,n);return Promise.resolve(t(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);void 0!==t&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,o)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const n=await this._taskMessageQueue.dequeueAll(e,t);for(const t of n)if("request"===t.type&&Md(t.message)){const n=t.message.id,o=this._requestResolvers.get(n);o?(o(new lf(Fd.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n)):this._onerror(new Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{const t=await(this._taskStore?.getTask(e));t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,o)=>{if(t.aborted)return void o(new lf(Fd.InvalidRequest,"Request cancelled"));const r=setTimeout(e,n);t.addEventListener("abort",()=>{clearTimeout(r),o(new lf(Fd.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await n.createTask(o,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{const o=await n.getTask(e,t);if(!o)throw new lf(Fd.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(e,o,r)=>{await n.storeTaskResult(e,o,r,t);const i=await n.getTask(e,t);if(i){const t=yp.parse({method:"notifications/tasks/status",params:i});await this.notification(t),df(i.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,o,r)=>{const i=await n.getTask(e,t);if(!i)throw new lf(Fd.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(df(i.status))throw new lf(Fd.InvalidParams,`Cannot update task "${e}" from terminal status "${i.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,o,r,t);const a=await n.getTask(e,t);if(a){const t=yp.parse({method:"notifications/tasks/status",params:a});await this.notification(t),df(a.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}}function hf(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}var gf;gf=function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"&&new Proxy(gf,{get:(e,t)=>(typeof require<"u"?require:e)[t]});class vf extends ff{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let o=n.shape.method.value;this._registeredMethods.add(o);let r=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),r.onHandler?.(n);for(let e of[...r.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let o=n.listeners.indexOf(t);-1!==o&&n.listeners.splice(o,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setRequestHandler"),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setNotificationHandler"),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}}class bf{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource)return void console.debug("Ignoring message from unknown source",e);let n=Hd.safeParse(e.data);n.success?(console.debug("Parsed message",n.data),this.onmessage?.(n.data)):"2.0"!==e.data?.jsonrpc?console.debug("Ignoring non-JSON-RPC message",n.error.message,e):(console.error("Failed to parse message",n.error.message,e),this.onerror?.(Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,t){"ui/notifications/tool-input-partial"!==e.method&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var $f=Wl([gu("light"),gu("dark")]).describe("Color theme preference for the host environment."),yf=Wl([gu("inline"),gu("fullscreen"),gu("pip")]).describe("Display mode for UI presentation."),_f=iu(Wl([gu("--color-background-primary"),gu("--color-background-secondary"),gu("--color-background-tertiary"),gu("--color-background-inverse"),gu("--color-background-ghost"),gu("--color-background-info"),gu("--color-background-danger"),gu("--color-background-success"),gu("--color-background-warning"),gu("--color-background-disabled"),gu("--color-text-primary"),gu("--color-text-secondary"),gu("--color-text-tertiary"),gu("--color-text-inverse"),gu("--color-text-ghost"),gu("--color-text-info"),gu("--color-text-danger"),gu("--color-text-success"),gu("--color-text-warning"),gu("--color-text-disabled"),gu("--color-border-primary"),gu("--color-border-secondary"),gu("--color-border-tertiary"),gu("--color-border-inverse"),gu("--color-border-ghost"),gu("--color-border-info"),gu("--color-border-danger"),gu("--color-border-success"),gu("--color-border-warning"),gu("--color-border-disabled"),gu("--color-ring-primary"),gu("--color-ring-secondary"),gu("--color-ring-inverse"),gu("--color-ring-info"),gu("--color-ring-danger"),gu("--color-ring-success"),gu("--color-ring-warning"),gu("--font-sans"),gu("--font-mono"),gu("--font-weight-normal"),gu("--font-weight-medium"),gu("--font-weight-semibold"),gu("--font-weight-bold"),gu("--font-text-xs-size"),gu("--font-text-sm-size"),gu("--font-text-md-size"),gu("--font-text-lg-size"),gu("--font-heading-xs-size"),gu("--font-heading-sm-size"),gu("--font-heading-md-size"),gu("--font-heading-lg-size"),gu("--font-heading-xl-size"),gu("--font-heading-2xl-size"),gu("--font-heading-3xl-size"),gu("--font-text-xs-line-height"),gu("--font-text-sm-line-height"),gu("--font-text-md-line-height"),gu("--font-text-lg-line-height"),gu("--font-heading-xs-line-height"),gu("--font-heading-sm-line-height"),gu("--font-heading-md-line-height"),gu("--font-heading-lg-line-height"),gu("--font-heading-xl-line-height"),gu("--font-heading-2xl-line-height"),gu("--font-heading-3xl-line-height"),gu("--border-radius-xs"),gu("--border-radius-sm"),gu("--border-radius-md"),gu("--border-radius-lg"),gu("--border-radius-xl"),gu("--border-radius-full"),gu("--border-width-regular"),gu("--shadow-hairline"),gu("--shadow-sm"),gu("--shadow-md"),gu("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming.").describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation."),Wl([mc(),El()]).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.")).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.");Hl({method:gu("ui/open-link"),params:Hl({url:mc().describe("URL to open in the host's browser")})});var kf=Hl({isError:$l().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),xf=Hl({isError:$l().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),wf=Hl({isError:$l().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();Hl({method:gu("ui/notifications/sandbox-proxy-ready"),params:Hl({})});var If=Hl({connectDomains:Ll(mc()).optional().describe("Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP `connect-src` directive\n- Empty or omitted → no network connections (secure default)"),resourceDomains:Ll(mc()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Ll(mc()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Ll(mc()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Cf=Hl({camera:Hl({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:Hl({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:Hl({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:Hl({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});Hl({method:gu("ui/notifications/size-changed"),params:Hl({width:dl().optional().describe("New width in pixels."),height:dl().optional().describe("New height in pixels.")})});var Sf=Hl({method:gu("ui/notifications/tool-input"),params:Hl({arguments:iu(mc(),Rl().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Ef=Hl({method:gu("ui/notifications/tool-input-partial"),params:Hl({arguments:iu(mc(),Rl().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),zf=Hl({method:gu("ui/notifications/tool-cancelled"),params:Hl({reason:mc().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Tf=Hl({fonts:mc().optional()}),Df=Hl({variables:_f.optional().describe("CSS variables for theming the app."),css:Tf.optional().describe("CSS blocks that apps can inject.")}),Of=Hl({method:gu("ui/resource-teardown"),params:Hl({})});iu(mc(),Rl());var Uf=Hl({text:Hl({}).optional().describe("Host supports text content blocks."),image:Hl({}).optional().describe("Host supports image content blocks."),audio:Hl({}).optional().describe("Host supports audio content blocks."),resource:Hl({}).optional().describe("Host supports resource content blocks."),resourceLink:Hl({}).optional().describe("Host supports resource link content blocks."),structuredContent:Hl({}).optional().describe("Host supports structured content.")});Hl({method:gu("ui/notifications/request-teardown"),params:Hl({}).optional()});var Rf=Hl({experimental:iu(mc(),iu(mc(),Ol()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:Hl({}).optional().describe("Host supports opening external URLs."),downloadFile:Hl({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:Hl({listChanged:$l().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:Hl({listChanged:$l().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:Hl({}).optional().describe("Host accepts log messages."),sandbox:Hl({permissions:Cf.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:If.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Uf.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Uf.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:Hl({tools:Hl({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Af=Hl({experimental:iu(mc(),iu(mc(),Ol()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:Hl({listChanged:$l().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:Ll(yf).optional().describe("Display modes the app supports.")});Hl({method:gu("ui/notifications/initialized"),params:Hl({}).optional()}),Hl({csp:If.optional().describe("Content Security Policy configuration for UI resources."),permissions:Cf.optional().describe("Sandbox permissions requested by the UI resource."),domain:mc().optional().describe("Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., `{hash}.claudemcpcontent.com`)\n- URL-derived subdomains (e.g., `www-example-com.oaiusercontent.com`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation)."),prefersBorder:$l().optional().describe("Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- `true`: request visible border + background\n- `false`: request no visible border + background\n- omitted: host decides border")}),Hl({method:gu("ui/request-display-mode"),params:Hl({mode:yf.describe("The display mode being requested.")})});var Nf=Hl({mode:yf.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),jf=Wl([gu("model"),gu("app")]).describe("Tool visibility scope - who can access the tool.");Hl({resourceUri:mc().optional(),visibility:Ll(jf).optional().describe('Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only'),csp:Nl().optional(),permissions:Nl().optional()}),Hl({mimeTypes:Ll(mc()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Hl({method:gu("ui/download-file"),params:Hl({contents:Ll(Wl([sm,cm])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Hl({method:gu("ui/message"),params:Hl({role:gu("user").describe('Message role, currently only "user" is supported.'),content:Ll(lm).describe("Message content blocks (text, image, etc.).")})}),Hl({method:gu("ui/notifications/sandbox-resource-ready"),params:Hl({html:mc().describe("HTML content to load into the inner iframe."),sandbox:mc().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:If.optional().describe("CSP configuration from resource metadata."),permissions:Cf.optional().describe("Sandbox permissions from resource metadata.")})});var Pf=Hl({method:gu("ui/notifications/tool-result"),params:bm.describe("Standard MCP tool execution result.")}),Mf=Hl({toolInfo:Hl({id:jd.optional().describe("JSON-RPC id of the tools/call request."),tool:hm.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:$f.optional().describe("Current color theme preference."),styles:Df.optional().describe("Style configuration for theming the app."),displayMode:yf.optional().describe("How the UI is currently displayed."),availableDisplayModes:Ll(yf).optional().describe("Display modes the host supports."),containerDimensions:Wl([Hl({height:dl().describe("Fixed container height in pixels.")}),Hl({maxHeight:Wl([dl(),El()]).optional().describe("Maximum container height in pixels.")})]).and(Wl([Hl({width:dl().describe("Fixed container width in pixels.")}),Hl({maxWidth:Wl([dl(),El()]).optional().describe("Maximum container width in pixels.")})])).optional().describe("Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight."),locale:mc().optional().describe("User's language and region preference in BCP 47 format."),timeZone:mc().optional().describe("User's timezone in IANA format."),userAgent:mc().optional().describe("Host application identifier."),platform:Wl([gu("web"),gu("desktop"),gu("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Hl({touch:$l().optional().describe("Whether the device supports touch input."),hover:$l().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Hl({top:dl().describe("Top safe area inset in pixels."),right:dl().describe("Right safe area inset in pixels."),bottom:dl().describe("Bottom safe area inset in pixels."),left:dl().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Zf=Hl({method:gu("ui/notifications/host-context-changed"),params:Mf.describe("Partial context update containing only changed fields.")});Hl({method:gu("ui/update-model-context"),params:Hl({content:Ll(lm).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:iu(mc(),Rl().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Hl({method:gu("ui/initialize"),params:Hl({appInfo:Qd.describe("App identification (name and version)."),appCapabilities:Af.describe("Features and capabilities this app provides."),protocolVersion:mc().describe("Protocol version this app supports.")})});var qf=Hl({protocolVersion:mc().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Qd.describe("Host application identification and version."),hostCapabilities:Rf.describe("Features and capabilities provided by the host."),hostContext:Mf.describe("Rich context about the host environment.")}).passthrough(),Lf={target:"draft-2020-12"};async function Ff(e,t){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[t](Lf);if("zod"===n.vendor){let{z:n}=await Promise.resolve().then(function(){return kd});return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Vf(e,t,n=""){let o=await e["~standard"].validate(t);if(o.issues){let e=o.issues.map(e=>{let t=e.path?.map(e=>"object"==typeof e?e.key:e).join(".");return t?`${t}: ${e.message}`:e.message}).join("; ");throw Error(n+e)}return o.value}class Hf extends vf{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Sf,toolinputpartial:Ef,toolresult:Pf,toolcancelled:zf,hostcontextchanged:Zf};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Hf.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e))return;if(this._everHadListener.add(e),!this._initializedSent)return;let t=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(t);console.warn(t)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){"hostcontextchanged"===e&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||c({jitless:!0}),this.setRequestHandler(lp,e=>(console.log("Received ping:",e.params),{})),this.setEventHandler("hostcontextchanged",void 0)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=function(e,t){const n={...e};for(const e in t){const o=e,r=t[o];if(void 0===r)continue;const i=n[o];hf(i)&&hf(r)?n[o]={...i,...r}:n[o]=r}return n}(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,r=()=>{o._initializedSent&&o._capabilities.tools?.listChanged&&o.sendToolListChanged()},i=void 0!==t.inputSchema,a={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,r()},disable(){this.enabled=!1,r()},update(e){Object.assign(this,e),r()},remove(){o._registeredTools[e]===a&&(delete o._registeredTools[e],r())},handler:async(t,o)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let r;if(i){let i=a.inputSchema,s=i?await Vf(i,t??{},`Invalid input for tool ${e}: `):t??{};r=await n(s,o)}else r=await n(o);return a.outputSchema&&!r.isError&&(r.structuredContent=await Vf(a.outputSchema,r.structuredContent,`Invalid output for tool ${e}: `)),r}};return this._registeredTools[e]=a,this._capabilities.tools||this.transport||this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),r(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Ff(t.inputSchema,"input"):{type:"object",properties:{}}};return t.outputSchema&&(n.outputSchema=await Ff(t.outputSchema,"output")),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Of,(e,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(ym,(e,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(gm,(e,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if("sampling/createMessage"===e)if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(e,t){if(this._assertInitialized("callServerTool"),"string"==typeof e)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},bm,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},Fp,t)}async listServerResources(e,t){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},jp,t)}async createSamplingMessage(e,t){this._assertInitialized("createSamplingMessage");let n=e.tools?jm:Nm;return await this.request({method:"sampling/createMessage",params:e},n,t)}sendMessage(e,t){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},wf,t)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,t){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Jd,t)}openLink(e,t){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},kf,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},xf,t)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,t){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},Nf,t)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,o=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let o=document.documentElement,r=o.style.height;o.style.height="max-content";let i=Math.ceil(o.getBoundingClientRect().height);o.style.height=r;let a=Math.ceil(window.innerWidth);a===t&&i===n||(t=a,n=i,this.sendSizeChanged({width:a,height:i}))}))};o();let r=new ResizeObserver(o);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(e=new bf(window.parent,window.parent),t){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:"2026-01-26"}},qf,t);if(void 0===e)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}}function Jf(){}function Gf(e,t){for(const n in t)e[n]=t[n];return e}function Bf(e){return e()}function Wf(){return Object.create(null)}function Kf(e){e.forEach(Bf)}function Xf(e){return"function"==typeof e}function Qf(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function Yf(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return Jf;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function eh(e,t,n,o){if(e){const r=th(e,t,n,o);return e[0](r)}}function th(e,t,n,o){return e[1]&&o?Gf(n.ctx.slice(),e[1](o(t))):n.ctx}function nh(e,t,n,o){if(e[2]&&o){const r=e[2](o(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let o=0;o<n;o+=1)e[o]=t.dirty[o]|r[o];return e}return t.dirty|r}return t.dirty}function oh(e,t,n,o,r,i){if(r){const a=th(t,n,o,i);e.p(a,r)}}function rh(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function ih(e,t){const n={};t=new Set(t);for(const o in e)t.has(o)||"$"===o[0]||(n[o]=e[o]);return n}function ah(e){return e&&Xf(e.destroy)?e.destroy:Jf}function sh(e,t){e.appendChild(t)}function ch(e,t,n){const o=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!o.getElementById(t)){const e=dh("style");e.id=t,e.textContent=n,function(e,t){sh(e.head||e,t),t.sheet}(o,e)}}function lh(e,t,n){e.insertBefore(t,n||null)}function uh(e){e.parentNode&&e.parentNode.removeChild(e)}function dh(e){return document.createElement(e)}function ph(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function mh(e){return document.createTextNode(e)}function fh(){return mh(" ")}function hh(){return mh("")}function gh(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function vh(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function bh(e){let t;return{p(...n){t=n,t.forEach(t=>e.push(t))},r(){t.forEach(t=>e.splice(e.indexOf(t),1))}}}function $h(e){return""===e?null:+e}function yh(e,t){t=""+t,e.data!==t&&(e.data=t)}function _h(e,t){e.value=null==t?"":t}function kh(e,t,n,o){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function xh(e,t,n){e.classList[n?"add":"remove"](t)}class wh{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=ph(t.nodeName):this.e=dh(11===t.nodeType?"TEMPLATE":t.nodeName),this.t="TEMPLATE"!==t.tagName?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)lh(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(uh)}}function Ih(e,t){return new e(t)}let Ch;function Sh(e){Ch=e}function Eh(){if(!Ch)throw new Error("Function called outside component initialization");return Ch}function zh(e){Eh().$$.on_mount.push(e)}const Th=[],Dh=[];let Oh=[];const Uh=[],Rh=Promise.resolve();let Ah=!1;function Nh(e){Oh.push(e)}function jh(e){Uh.push(e)}const Ph=new Set;let Mh=0;function Zh(){if(0!==Mh)return;const e=Ch;do{try{for(;Mh<Th.length;){const e=Th[Mh];Mh++,Sh(e),qh(e.$$)}}catch(e){throw Th.length=0,Mh=0,e}for(Sh(null),Th.length=0,Mh=0;Dh.length;)Dh.pop()();for(let e=0;e<Oh.length;e+=1){const t=Oh[e];Ph.has(t)||(Ph.add(t),t())}Oh.length=0}while(Th.length);for(;Uh.length;)Uh.pop()();Ah=!1,Ph.clear(),Sh(e)}function qh(e){if(null!==e.fragment){e.update(),Kf(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Nh)}}const Lh=new Set;let Fh;function Vh(){Fh={r:0,c:[],p:Fh}}function Hh(){Fh.r||Kf(Fh.c),Fh=Fh.p}function Jh(e,t){e&&e.i&&(Lh.delete(e),e.i(t))}function Gh(e,t,n,o){if(e&&e.o){if(Lh.has(e))return;Lh.add(e),Fh.c.push(()=>{Lh.delete(e),o&&(n&&e.d(1),o())}),e.o(t)}else o&&o()}function Bh(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function Wh(e){e&&e.c()}function Kh(e,t,n,o){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),o||Nh(()=>{const t=e.$$.on_mount.map(Bf).filter(Xf);e.$$.on_destroy?e.$$.on_destroy.push(...t):Kf(t),e.$$.on_mount=[]}),i.forEach(Nh)}function Xh(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];Oh.forEach(o=>-1===e.indexOf(o)?t.push(o):n.push(o)),n.forEach(e=>e()),Oh=t}(n.after_update),Kf(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Qh(e,t){-1===e.$$.dirty[0]&&(Th.push(e),Ah||(Ah=!0,Rh.then(Zh)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Yh(e,t,n,o,r,i,a,s=[-1]){const c=Ch;Sh(e);const l=e.$$={fragment:null,ctx:[],props:i,update:Jf,not_equal:r,bound:Wf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:Wf(),dirty:s,skip_bound:!1,root:t.target||c.$$.root};a&&a(l.root);let u=!1;if(l.ctx=n?n(e,t.props||{},(t,n,...o)=>{const i=o.length?o[0]:n;return l.ctx&&r(l.ctx[t],l.ctx[t]=i)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](i),u&&Qh(e,t)),n}):[],l.update(),u=!0,Kf(l.before_update),l.fragment=!!o&&o(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(uh)}else l.fragment&&l.fragment.c();t.intro&&Jh(e.$$.fragment),Kh(e,t.target,t.anchor,t.customElement),Zh()}Sh(c)}class eg{$destroy(){Xh(this,1),this.$destroy=Jf}$on(e,t){if(!Xf(t))return Jf;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const tg=[];function ng(e,t=Jf){let n;const o=new Set;function r(t){if(Qf(e,t)&&(e=t,n)){const t=!tg.length;for(const t of o)t[1](),tg.push(t,e);if(t){for(let e=0;e<tg.length;e+=2)tg[e][0](tg[e+1]);tg.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(i,a=Jf){const s=[i,a];return o.add(s),1===o.size&&(n=t(r)||Jf),i(e),()=>{o.delete(s),0===o.size&&n&&(n(),n=null)}}}}const og={message:!1,updateModelContext:!1,openLinks:!1};class rg extends Error{constructor(e="Update cancelled"){super(e),this.name="HandoffCancelledError"}}function ig(e){const t=e.getHostCapabilities();return{message:null!=t?.message,updateModelContext:null!=t?.updateModelContext,openLinks:null!=t?.openLinks}}function ag(e){return e.message}function sg(e,t){return`I refined this contract in the Wizard UI beyond the initial MCP tool result. Here is the current generated source.\n\n\`\`\`${e}\n${t.trimEnd()}\n\`\`\``}async function cg(e){if(!navigator.clipboard?.writeText)throw new Error("Clipboard is not available in this host.");await navigator.clipboard.writeText(e)}const lg="mcp-external-links";function ug(e){ch(e,"svelte-h4n0sq",".mcp-shell.svelte-h4n0sq{height:var(--mcp-app-height);min-height:var(--mcp-app-height);background-color:var(--gray-1);box-sizing:border-box;font-size:12px;--text-small:0.75rem;--size-1:0.2rem;--size-2:0.35rem;--size-3:0.55rem;--size-4:0.7rem}.mcp-shell.svelte-h4n0sq .controls{padding:var(--size-3)}.mcp-shell.svelte-h4n0sq pre code.hljs{font-size:0.7rem;line-height:1.35}.footer.svelte-h4n0sq{display:flex;flex-direction:column;gap:0.35rem}.drift-notice.svelte-h4n0sq{padding:0.4rem 0.55rem;border:1px solid var(--gray-3);border-radius:8px;background:color-mix(in srgb, var(--gray-2) 65%, transparent)}.drift-text.svelte-h4n0sq{margin:0;font-size:0.75rem;line-height:1.4;color:var(--gray-5);text-align:left}.actions.svelte-h4n0sq{display:flex;justify-content:flex-end;align-items:center;gap:0.75rem}.actions.drifted.svelte-h4n0sq{justify-content:space-between}.restore-link.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--gray-4);font:inherit;font-size:0.75rem;text-decoration:underline;cursor:pointer}.restore-link.svelte-h4n0sq:hover{color:var(--gray-5)}.restore-confirm.svelte-h4n0sq{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.35rem 0.5rem;font-size:0.75rem;color:var(--gray-5)}.restore-confirm-btn.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--solidity-blue-2);font:inherit;font-size:0.75rem;font-weight:600;text-decoration:underline;cursor:pointer}.restore-confirm-btn.cancel.svelte-h4n0sq{color:var(--gray-4);font-weight:500}.use-button.svelte-h4n0sq{padding:0.45rem 0.9rem;border-radius:16px;border:1px solid var(--gray-3);background-color:var(--solidity-blue-2);color:white;font-weight:600;font-size:0.75rem;cursor:pointer}.use-button.drifted.svelte-h4n0sq:not(.disabled):not(:disabled){box-shadow:0 0 0 2px color-mix(in srgb, var(--solidity-blue-2) 35%, transparent)}.use-button.disabled.svelte-h4n0sq,.use-button.svelte-h4n0sq:disabled{opacity:0.5;cursor:not-allowed}.status.svelte-h4n0sq{margin:0;max-width:100%;font-size:0.75rem;text-align:right}.status.hint.svelte-h4n0sq{color:var(--gray-4)}.status.error.svelte-h4n0sq{color:var(--red-3)}.no-select.svelte-h4n0sq{-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box{font-size:12px;line-height:1.35}.tippy-box .tippy-content{padding:0.35rem 0.5rem}html.mcp-no-open-links .tippy-box a[href]{display:none}")}const dg=e=>({}),pg=e=>({});function mg(e){let t;return{c(){t=dh("div"),t.innerHTML='<p class="drift-text svelte-h4n0sq">Preview differs from the original tool run. The agent's reply from that run still matches the original\n settings. Send updates to the agent for it to see the new code.</p>',vh(t,"class","drift-notice svelte-h4n0sq")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function fg(e){let t;function n(e,t){return e[11]?gg:hg}let o=n(e),r=o(e);return{c(){r.c(),t=hh()},m(e,n){r.m(e,n),lh(e,t,n)},p(e,i){o===(o=n(e))&&r?r.p(e,i):(r.d(1),r=o(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&uh(t)}}}function hg(e){let t,n,o;return{c(){t=dh("button"),t.textContent="Restore original",vh(t,"type","button"),vh(t,"class","restore-link svelte-h4n0sq")},m(r,i){lh(r,t,i),n||(o=gh(t,"click",e[25]),n=!0)},p:Jf,d(e){e&&uh(t),n=!1,o()}}}function gg(e){let t,n,o,r,i,a,s;return{c(){t=dh("span"),n=mh("Restore original settings?\n "),o=dh("button"),o.textContent="Confirm",r=fh(),i=dh("button"),i.textContent="Cancel",vh(o,"type","button"),vh(o,"class","restore-confirm-btn svelte-h4n0sq"),vh(i,"type","button"),vh(i,"class","restore-confirm-btn cancel svelte-h4n0sq"),vh(t,"class","restore-confirm svelte-h4n0sq")},m(c,l){lh(c,t,l),sh(t,n),sh(t,o),sh(t,r),sh(t,i),a||(s=[gh(o,"click",e[23]),gh(i,"click",e[24])],a=!0)},p:Jf,d(e){e&&uh(t),a=!1,Kf(s)}}}function vg(e){let t;return{c(){t=mh("Send Updates to Agent")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&uh(t)}}}function bg(e){let t;return{c(){t=mh("Copy to Clipboard")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&uh(t)}}}function $g(e){let t;return{c(){t=mh(e[8])},m(e,n){lh(e,t,n)},p(e,n){256&n&&yh(t,e[8])},d(e){e&&uh(t)}}}function yg(e){let t,n=e[12]?"Copying…":"Sending…";return{c(){t=mh(n)},m(e,n){lh(e,t,n)},p(e,o){4096&o&&n!==(n=e[12]?"Copying…":"Sending…")&&yh(t,n)},d(e){e&&uh(t)}}}function _g(e){let t;return{c(){t=mh("Connecting…")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&uh(t)}}}function kg(e){let t,n;return{c(){t=dh("p"),n=mh(e[10]),vh(t,"class","status hint svelte-h4n0sq")},m(e,o){lh(e,t,o),sh(t,n)},p(e,t){1024&t&&yh(n,e[10])},d(e){e&&uh(t)}}}function xg(e){let t,n;return{c(){t=dh("p"),n=mh(e[9]),vh(t,"class","status error svelte-h4n0sq")},m(e,o){lh(e,t,o),sh(t,n)},p(e,t){512&t&&yh(n,e[9])},d(e){e&&uh(t)}}}function wg(e){let t,n,o;return{c(){t=dh("p"),n=mh("Could not connect to host: "),o=mh(e[4]),vh(t,"class","status error svelte-h4n0sq")},m(e,r){lh(e,t,r),sh(t,n),sh(t,o)},p(e,t){16&t&&yh(o,e[4])},d(e){e&&uh(t)}}}function Ig(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_;const k=e[22].controls,x=eh(k,e,e[21],pg);let w=e[5]&&mg(),I=e[5]&&e[6]&&fg(e);function C(e,t){return e[3]||e[4]?e[7]?yg:e[8]?$g:e[12]?bg:vg:_g}let S=C(e),E=S(e);function z(e,t){return e[4]?wg:e[9]?xg:e[10]?kg:void 0}let T=z(e),D=T&&T(e);return{c(){t=dh("div"),n=dh("div"),o=dh("div"),x&&x.c(),r=fh(),i=dh("div"),a=dh("pre"),s=mh(" "),c=dh("code"),u=mh("\n "),d=fh(),p=dh("div"),w&&w.c(),m=fh(),f=dh("div"),I&&I.c(),h=fh(),g=dh("button"),E.c(),b=fh(),D&&D.c(),vh(o,"class","controls min-w-[14rem] w-60 max-w-[42%] flex flex-col shrink-0 overflow-auto border-r border-[var(--gray-3)]"),vh(c,"class",l="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"),vh(a,"class","flex flex-col grow basis-0 overflow-auto m-0"),vh(i,"class","output flex flex-col grow min-w-0 overflow-hidden"),vh(n,"class","flex flex-row grow min-h-0 overflow-hidden rounded-xl border border-[var(--gray-3)]"),vh(g,"class","use-button svelte-h4n0sq"),g.disabled=e[13],vh(g,"title",v=e[12]?"Copy to Clipboard":void 0),xh(g,"disabled",e[13]),xh(g,"drifted",e[5]),vh(f,"class","actions svelte-h4n0sq"),xh(f,"drifted",e[5]),vh(p,"class","footer shrink-0 svelte-h4n0sq"),vh(t,"class","mcp-shell flex flex-col gap-2 p-2 min-h-0 svelte-h4n0sq")},m(l,v){lh(l,t,v),sh(t,n),sh(n,o),x&&x.m(o,null),sh(n,r),sh(n,i),sh(i,a),sh(a,s),sh(a,c),c.innerHTML=e[0],sh(a,u),sh(t,d),sh(t,p),w&&w.m(p,null),sh(p,m),sh(p,f),I&&I.m(f,null),sh(f,h),sh(f,g),E.m(g,null),sh(p,b),D&&D.m(p,null),$=!0,y||(_=[gh(a,"click",e[15]),gh(g,"click",e[14])],y=!0)},p(e,[t]){x&&x.p&&(!$||2097152&t)&&oh(x,k,e,e[21],$?nh(k,e[21],t,dg):rh(e[21]),pg),(!$||1&t)&&(c.innerHTML=e[0]),(!$||6&t&&l!==(l="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"))&&vh(c,"class",l),e[5]?w||(w=mg(),w.c(),w.m(p,m)):w&&(w.d(1),w=null),e[5]&&e[6]?I?I.p(e,t):(I=fg(e),I.c(),I.m(f,h)):I&&(I.d(1),I=null),S===(S=C(e))&&E?E.p(e,t):(E.d(1),E=S(e),E&&(E.c(),E.m(g,null))),(!$||8192&t)&&(g.disabled=e[13]),(!$||4096&t&&v!==(v=e[12]?"Copy to Clipboard":void 0))&&vh(g,"title",v),(!$||8192&t)&&xh(g,"disabled",e[13]),(!$||32&t)&&xh(g,"drifted",e[5]),(!$||32&t)&&xh(f,"drifted",e[5]),T===(T=z(e))&&D?D.p(e,t):(D&&D.d(1),D=T&&T(e),D&&(D.c(),D.m(p,null)))},i(e){$||(Jh(x,e),$=!0)},o(e){Gh(x,e),$=!1},d(e){e&&uh(t),x&&x.d(e),w&&w.d(),I&&I.d(),E.d(),D&&D.d(),y=!1,Kf(_)}}}function Cg(e,t,n){let o,r,i,a,s,c,l,{$$slots:u={},$$scope:d}=t,{highlightedCode:p}=t,{hasErrors:m=!1}=t,{highlightClass:f="-solidity"}=t,{code:h=""}=t,{fence:g}=t,{hostConnected:v=!1}=t,{hostConnectError:b}=t,{hostSendCaps:$=og}=t,{mcpApp:y}=t,{drifted:_=!1}=t,{onRestoreOriginal:k}=t,x=!1,w=!1;const I=ng({canOpen:!1});var C,S;function E(e){l&&clearTimeout(l),n(8,a=e),l=setTimeout(()=>{n(8,a=void 0),l=void 0},1e3)}function z(e,t){return n=>{const o=n.target,r=o instanceof Element?o.closest(e)?.getAttribute("href"):void 0;r&&!r.startsWith("#")&&(n.preventDefault(),n.stopPropagation(),$.openLinks&&async function(e,t){if((await e.openLink({url:t})).isError)throw new Error("Host denied opening the link.")}(y,r).catch(e=>console.warn(`[mcp-apps] ${t} openLink failed`,e)))}}C=lg,S=I,Eh().$$.context.set(C,S);const T=z("a[href]","code preview"),D=z(".tippy-box a[href]","tippy");zh(()=>(document.addEventListener("click",D,!0),()=>document.removeEventListener("click",D,!0)));return e.$$set=e=>{"highlightedCode"in e&&n(0,p=e.highlightedCode),"hasErrors"in e&&n(1,m=e.hasErrors),"highlightClass"in e&&n(2,f=e.highlightClass),"code"in e&&n(16,h=e.code),"fence"in e&&n(17,g=e.fence),"hostConnected"in e&&n(3,v=e.hostConnected),"hostConnectError"in e&&n(4,b=e.hostConnectError),"hostSendCaps"in e&&n(18,$=e.hostSendCaps),"mcpApp"in e&&n(19,y=e.mcpApp),"drifted"in e&&n(5,_=e.drifted),"onRestoreOriginal"in e&&n(6,k=e.onRestoreOriginal),"$$scope"in e&&n(21,d=e.$$scope)},e.$$.update=()=>{32&e.$$.dirty&&(_||n(11,w=!1)),262144&e.$$.dirty&&I.set({canOpen:$.openLinks}),262144&e.$$.dirty&&document.documentElement.classList.toggle("mcp-no-open-links",!$.openLinks),262144&e.$$.dirty&&n(20,o=ag($)),1048584&e.$$.dirty&&n(12,r=v&&!o),65946&e.$$.dirty&&n(13,i=m||x||!h||!v||!!b||!!a)},[p,m,f,v,b,_,k,x,a,s,c,w,r,i,async function(){if(!i){n(9,s=void 0),n(10,c=void 0),n(7,x=!0);try{if(r)return await cg(h),void E("Copied");await async function(e,t,n){const o=ig(e);if(!ag(o))throw new Error("This host does not support sending the contract to the agent.");if(o.updateModelContext)try{await e.updateModelContext({content:[{type:"text",text:t}]})}catch(e){console.warn("[mcp-apps] updateModelContext failed",e)}if((await e.sendMessage({role:"user",content:[{type:"text",text:sg(n,t)}]})).isError)throw new rg}(y,h,g),E("Sent")}catch(e){if(e instanceof rg)return void n(10,c=e.message);console.error("[mcp-apps] Send Updates to Agent failed",e),n(9,s=e instanceof Error?e.message:String(e));try{await cg(h),E("Copied")}catch{}}finally{n(7,x=!1)}}},T,h,g,$,y,o,d,u,()=>{n(11,w=!1),k()},()=>n(11,w=!1),()=>n(11,w=!0)]}class Sg extends eg{constructor(e){super(),Yh(this,e,Cg,Ig,Qf,{highlightedCode:0,hasErrors:1,highlightClass:2,code:16,fence:17,hostConnected:3,hostConnectError:4,hostSendCaps:18,mcpApp:19,drifted:5,onRestoreOriginal:6},ug)}}function Eg(e){return structuredClone(e)}function zg(e){let t,n,o,r;const i=[{errors:e[7]},e[1].controlProps?.(e[2],e[6])??{}];function a(t){e[15](t)}var s=e[1].controls[e[2]];function c(e){let t={};for(let e=0;e<i.length;e+=1)t=Gf(t,i[e]);return void 0!==e[6]&&(t.opts=e[6]),{props:t}}return s&&(t=Ih(s,c(e)),Dh.push(()=>Bh(t,"opts",a))),{c(){t&&Wh(t.$$.fragment),o=hh()},m(e,n){t&&Kh(t,e,n),lh(e,o,n),r=!0},p(e,r){const l=198&r?function(e,t){const n={},o={},r={$$scope:1};let i=e.length;for(;i--;){const a=e[i],s=t[i];if(s){for(const e in a)e in s||(o[e]=1);for(const e in s)r[e]||(n[e]=s[e],r[e]=1);e[i]=s}else for(const e in a)r[e]=1}for(const e in o)e in n||(n[e]=void 0);return n}(i,[128&r&&{errors:e[7]},70&r&&(u=e[1].controlProps?.(e[2],e[6])??{},"object"==typeof u&&null!==u?u:{})]):{};var u;if(!n&&64&r&&(n=!0,l.opts=e[6],jh(()=>n=!1)),6&r&&s!==(s=e[1].controls[e[2]])){if(t){Vh();const e=t;Gh(e.$$.fragment,1,0,()=>{Xh(e,1)}),Hh()}s?(t=Ih(s,c(e)),Dh.push(()=>Bh(t,"opts",a)),Wh(t.$$.fragment),Jh(t.$$.fragment,1),Kh(t,o.parentNode,o)):t=null}else s&&t.$set(l)},i(e){r||(t&&Jh(t.$$.fragment,e),r=!0)},o(e){t&&Gh(t.$$.fragment,e),r=!1},d(e){e&&uh(o),t&&Xh(t,e)}}}function Tg(e){let t,n;return t=new Sg({props:{highlightedCode:e[11],hasErrors:e[8],code:e[9],highlightClass:e[1].highlightClass,fence:e[1].fence,hostConnected:e[3],hostConnectError:e[4],hostSendCaps:e[5],mcpApp:e[0],drifted:e[10],onRestoreOriginal:e[12],$$slots:{controls:[zg]},$$scope:{ctx:e}}}),{c(){Wh(t.$$.fragment)},m(e,o){Kh(t,e,o),n=!0},p(e,[n]){const o={};2048&n&&(o.highlightedCode=e[11]),256&n&&(o.hasErrors=e[8]),512&n&&(o.code=e[9]),2&n&&(o.highlightClass=e[1].highlightClass),2&n&&(o.fence=e[1].fence),8&n&&(o.hostConnected=e[3]),16&n&&(o.hostConnectError=e[4]),32&n&&(o.hostSendCaps=e[5]),1&n&&(o.mcpApp=e[0]),1024&n&&(o.drifted=e[10]),524486&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Jh(t.$$.fragment,e),n=!0)},o(e){Gh(t.$$.fragment,e),n=!1},d(e){Xh(t,e)}}}function Dg(e,t,n){let o,r,i,a,s,c,l,u,{adapter:d}=t,{kind:p}=t,{mcpApp:m}=t,{hostConnected:f=!1}=t,{hostConnectError:h}=t,{hostSendCaps:g=og}=t,v=d.emptyContract();function b(e){try{return d.print(d.build(e))}catch{return}}function $(e,t){if(!e)return;const o=function(e,t,n){return void 0===e||"result"===n&&!t}(l,a,t),r={...s??{},...e,kind:p};if(n(6,s=r),!o)return;const i=function(e,t,n){const o=n(e);if(void 0!==o)return{opts:Eg(e),code:o,supersedesOpts:!1};const r=n(t);return void 0!==r?{opts:Eg(t),code:r,supersedesOpts:!0}:void 0}(r,{...e,kind:p},b);void 0!==i&&(c=i.opts,n(13,l=i.code),i.supersedesOpts&&n(6,s=Eg(i.opts)))}return m.ontoolinput=e=>{$(e.arguments,"input")},m.ontoolresult=e=>{const t=e.structuredContent;t?.opts&&$(t.opts,"result")},e.$$set=e=>{"adapter"in e&&n(1,d=e.adapter),"kind"in e&&n(2,p=e.kind),"mcpApp"in e&&n(0,m=e.mcpApp),"hostConnected"in e&&n(3,f=e.hostConnected),"hostConnectError"in e&&n(4,h=e.hostConnectError),"hostSendCaps"in e&&n(5,g=e.hostSendCaps)},e.$$.update=()=>{if(66&e.$$.dirty&&s)try{n(14,v=d.build(s)),n(7,u=void 0)}catch(e){const t=e instanceof Error?e.message:String(e);n(7,u=d.optionsErrors(e)??{_:t||"Failed to build contract"})}16386&e.$$.dirty&&n(9,o=d.print(v)),546&e.$$.dirty&&n(11,r=g.openLinks?d.injectHyperlinks(d.highlight(o)):d.highlight(o)),128&e.$$.dirty&&n(8,i=void 0!==u),8960&e.$$.dirty&&n(10,a=function(e){const{originalCode:t,code:n,hasErrors:o}=e;return void 0!==t&&(o||n!==t)}({originalCode:l,code:o,hasErrors:i}))},[m,d,p,f,h,g,s,u,i,o,a,r,function(){null!=c&&n(6,s=Eg(c))},l,v,function(e){s=e,n(6,s)}]}class Og extends eg{constructor(e){super(),Yh(this,e,Dg,Tg,Qf,{adapter:1,kind:2,mcpApp:0,hostConnected:3,hostConnectError:4,hostSendCaps:5})}}const Ug=560;class Rg extends Error{constructor(e){super("Invalid options"),this.messages=e}}const Ag=/^(?!$)\d+$/;function Ng(e){return Ag.test(e)}function jg(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]+/g,"").replace(/(\\|")/g,(e,t)=>"\\"+t)}function Pg(e,t){const n=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]+/g,"").replace(/(\\|')/g,(e,t)=>"\\"+t);if(n.length>31)throw new Rg({[t]:"String is longer than 31 characters"});return n}function Mg(e){if(e<=0)throw new Error(`Number of bits must be positive (actual '${e}').`);if(e%8!=0)throw new Error(`The number of bits must be a multiple of 8 (actual '${e}').`);return BigInt("0x"+"ff".repeat(e/8))}const Zg={u8:Mg(8),u16:Mg(16),u32:Mg(32),u64:Mg(64),u128:Mg(128),u256:Mg(256)};function qg(e,t,n){const o=e.toString();if(!/^\d+$/.test(o))throw new Rg({[t]:"Not a valid number"});const r=BigInt(o);if(r>Zg[n])throw new Rg({[t]:`Value is greater than ${n} max value`});return r}function Lg(e,t,n){qg(e,t,n)}class Fg{constructor(e,t,n=!1){this.license="MIT",this.upgradeable=!1,this.documentations=[],this.constructorArgs=[],this.constructorCode=[],this.componentsMap=new Map,this.implementedTraitsMap=new Map,this.superVariablesMap=new Map,this.constantsMap=new Map,this.useClausesMap=new Map,this.interfaceFlagsSet=new Set,this.storageMembersMap=new Map,this.name=function(e,t=!1){const n=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/^[^a-zA-Z_]+/,"").replace(/^(.)/,e=>t?e.toUpperCase():e).replace(/[^\w]+(.?)/g,(e,t)=>t.toUpperCase());if(0===n.length)throw new Rg({name:"Identifier is empty or does not have valid characters"});return n}(e,!0),this.macros=t,this.account=n}get components(){return[...this.componentsMap.values()]}get implementedTraits(){return[...this.implementedTraitsMap.values()]}get superVariables(){return[...this.superVariablesMap.values()]}get constants(){return[...this.constantsMap.values()]}get useClauses(){return[...this.useClausesMap.values()]}get storageMembers(){return[...this.storageMembersMap.values()]}addStorageMember(e){const t=this.storageMembersMap.get(e.name);if(void 0!==t){if(t.type!==e.type)throw new Error(`Tried to add duplicate storage member ${e.name} with different type: ${e.type} instead of ${t.type}.`);return!1}return this.storageMembersMap.set(e.name,e),!0}get interfaceFlags(){return this.interfaceFlagsSet}addUseClause(e,t,n){const o=n?.groupable??!0,r=n?.alias??"",i=r.length>0?r:t;this.useClausesMap.has(i)||this.useClausesMap.set(i,{containerPath:e,name:t,groupable:o,alias:r})}addComponent(e,t=[],n=!0){this.macros.withComponents||this.addUseClause(e.path,e.name);const o=e.name,r=this.componentsMap.has(o);if(!r){const r={initializer:n?{params:t}:void 0,...e,impls:[...e.impls]};this.componentsMap.set(o,r)}return!r}addImplToComponent(e,t){this.addComponent(e);const n=this.componentsMap.get(e.name);if(null==n)throw new Error(`Component ${e.name} has not been added yet`);n.impls.some(e=>e.name===t.name)||n.impls.push(t)}addConstant(e){return!this.constantsMap.has(e.name)&&(this.constantsMap.set(e.name,e),!0)}addSuperVariable(e){return!this.superVariablesMap.has(e.name)&&(this.superVariablesMap.set(e.name,e),this.addUseClause("super",e.name),!0)}addImplementedTrait(e){const t=e.name,n=this.implementedTraitsMap.get(t);if(void 0!==n)return n;{const n={name:e.name,of:e.of,tags:[...e.tags],superVariables:[],functions:[],section:e.section,priority:e.priority};return this.implementedTraitsMap.set(t,n),n}}addSuperVariableToTrait(e,t){const n=this.addImplementedTrait(e);for(const e of n.superVariables)if(e.name===t.name){if(e.type!==t.type)throw new Error(`Tried to add duplicate super var ${t.name} with different type: ${t.type} instead of ${e.type}.`);if(e.value!==t.value)throw new Error(`Tried to add duplicate super var ${t.name} with different value: ${t.value} instead of ${e.value}.`);return!1}return n.superVariables.push(t),!0}addFunction(e,t){const n=this.addImplementedTrait(e),o=this.getFunctionSignature(t);for(let e=0;e<n.functions.length;e++){const t=n.functions[e];if(void 0!==t&&this.getFunctionSignature(t)===o)return t}const r={...t,codeBefore:[],tag:e.perItemTag};return n.functions.push(r),r}getFunctionSignature(e){return[e.name,"(",...e.args.map(e=>e.name),")"].join("")}addFunctionCodeBefore(e,t,n){this.addImplementedTrait(e);const o=this.addFunction(e,t);o.codeBefore=[...o.codeBefore??[],n]}addConstructorArgument(e){for(const t of this.constructorArgs)if(t.name==e.name)return;this.constructorArgs.push(e)}addConstructorCode(e){this.constructorCode.push(e)}addInterfaceFlag(e){this.interfaceFlagsSet.add(e)}addDocumentation(e){this.documentations.push(e)}}function Vg(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:e},t)]))}const Hg=Vg({SRC5Component:{path:"openzeppelin_introspection::src5",substorage:{name:"src5",type:"SRC5Component::Storage"},event:{name:"SRC5Event",type:"SRC5Component::Event"},impls:[]},VotesComponent:{path:"openzeppelin_governance::votes",substorage:{name:"votes",type:"VotesComponent::Storage"},event:{name:"VotesEvent",type:"VotesComponent::Event"},impls:[{name:"VotesInternalImpl",embed:!1,value:"VotesComponent::InternalImpl<ContractState>"}]},NoncesComponent:{path:"openzeppelin_utils::cryptography::nonces",substorage:{name:"nonces",type:"NoncesComponent::Storage"},event:{name:"NoncesEvent",type:"NoncesComponent::Event"},impls:[{name:"NoncesImpl",embed:!0,value:"NoncesComponent::NoncesImpl<ContractState>"}]}});function Jg(e,t){e.addComponent(Hg.SRC5Component,[],!1),e.interfaceFlags.has("ISRC5")||(e.addImplToComponent(Hg.SRC5Component,{name:"SRC5Impl",embed:!0,value:"SRC5Component::SRC5Impl<ContractState>",section:t}),e.addInterfaceFlag("ISRC5"))}function Gg(e,t,n,o){Bg(e,t,n,o),e.addComponent(Hg.NoncesComponent,[],!1),e.addComponent(Hg.VotesComponent,[],!1),e.addImplToComponent(Hg.VotesComponent,{name:"VotesImpl",embed:!0,value:"VotesComponent::VotesImpl<ContractState>"}),e.addUseClause("openzeppelin_utils::contract_clock","ERC6372TimestampClock")}function Bg(e,t,n,o){e.addUseClause("openzeppelin_utils::cryptography::snip12","SNIP12Metadata");const r={name:"SNIP12MetadataImpl",of:"SNIP12Metadata",tags:[],priority:0,section:o};e.addImplementedTrait(r),e.addFunction(r,{name:"name",args:[],returns:"felt252",code:[`'${t}'`]}),e.addFunction(r,{name:"version",args:[],returns:"felt252",code:[`'${n}'`]})}const Wg=new RegExp(`^(\\d+(?:\\.\\d+)?) +(${["second","minute","hour","day","week","month","year"].join("|")})s?$`),Kg=86400,Xg={second:1,minute:60,hour:3600,day:Kg,week:604800,month:2592e3,year:31536e3};function Qg(e){const t=e.trim().match(Wg);if(!t||t.length<2)throw new Error("Bad duration format");const n=parseFloat(t[1]),o=t[2],r=n*Xg[o];return Math.round(r)}const Yg={darInitialDelay:"1 day",darDefaultDelayIncrease:"5 days",darMaxTransferDelay:"30 days"},ev=()=>({type:!1,...Yg}),tv=()=>({type:"ownable",...Yg}),nv="ownable",ov=BigInt(432e3),rv=BigInt(2592e3);function iv(e,t){switch(t.type){case!1:break;case"ownable":e.addComponent(sv.OwnableComponent,[{lit:"owner"}],!0),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"owner",type:"ContractAddress"});break;case"roles":e.addComponent(sv.AccessControlComponent,[],!0)&&(e.interfaceFlags.has("ISRC5")?(e.addImplToComponent(sv.AccessControlComponent,{name:"AccessControlImpl",embed:!0,value:"AccessControlComponent::AccessControlImpl<ContractState>"}),e.addImplToComponent(sv.AccessControlComponent,{name:"AccessControlCamelImpl",embed:!0,value:"AccessControlComponent::AccessControlCamelImpl<ContractState>"}),e.addImplToComponent(sv.AccessControlComponent,{name:"AccessControlWithDelayImpl",embed:!0,value:"AccessControlComponent::AccessControlWithDelayImpl<ContractState>"})):(e.addImplToComponent(sv.AccessControlComponent,{name:"AccessControlMixinImpl",embed:!0,value:"AccessControlComponent::AccessControlMixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5")),Jg(e),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"default_admin",type:"ContractAddress"}),e.addUseClause("openzeppelin_access::accesscontrol","DEFAULT_ADMIN_ROLE"),e.addConstructorCode("self.access_control._grant_role(DEFAULT_ADMIN_ROLE, default_admin)"));break;case"roles-dar":{const n=[{lit:"INITIAL_DELAY"},{lit:"initial_default_admin"}];if(e.addComponent(sv.AccessControlDefaultAdminRulesComponent,n,!0)){e.interfaceFlags.has("ISRC5")?(e.addImplToComponent(sv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlImpl<ContractState>"}),e.addImplToComponent(sv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlDefaultAdminRulesImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlDefaultAdminRulesImpl<ContractState>"}),e.addImplToComponent(sv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlCamelImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlCamelImpl<ContractState>"}),e.addImplToComponent(sv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlWithDelayImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlWithDelayImpl<ContractState>"})):(e.addImplToComponent(sv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlMixinImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlMixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5")),Jg(e);const n=qg(function(e){try{return Qg(e.darInitialDelay)}catch(e){throw e instanceof Error?new Rg({darInitialDelay:e.message}):e}}(t),"darInitialDelay","u64");e.addConstant({name:"INITIAL_DELAY",type:"u64",value:n.toString(),comment:t.darInitialDelay,inlineComment:!0});const o=qg(function(e){try{return Qg(e.darDefaultDelayIncrease)}catch(e){throw e instanceof Error?new Rg({darDefaultDelayIncrease:e.message}):e}}(t),"darDefaultDelayIncrease","u64"),r=qg(function(e){try{return Qg(e.darMaxTransferDelay)}catch(e){throw e instanceof Error?new Rg({darMaxTransferDelay:e.message}):e}}(t),"darMaxTransferDelay","u64");if(o===ov&&r===rv)e.addUseClause("openzeppelin_access::accesscontrol::extensions","DefaultConfig",{alias:"AccessControlDefaultAdminRulesDefaultConfig"});else{const n={name:"AccessControlDefaultAdminRulesImmutableConfig",of:"AccessControlDefaultAdminRulesComponent::ImmutableConfig",tags:[]};e.addImplementedTrait(n),e.addSuperVariableToTrait(n,{name:"DEFAULT_ADMIN_DELAY_INCREASE_WAIT",type:"u64",value:o.toString(),comment:t.darDefaultDelayIncrease,inlineComment:!0}),e.addSuperVariableToTrait(n,{name:"MAXIMUM_DEFAULT_ADMIN_TRANSFER_DELAY",type:"u64",value:r.toString(),comment:t.darMaxTransferDelay,inlineComment:!0})}e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"initial_default_admin",type:"ContractAddress"})}break}default:throw t.type,new Error("Unknown access type")}}function av(e,t,n,o,r,i){const a={...o};switch(!1===a.type&&(a.type=nv),iv(e,a),a.type){case"ownable":e.addFunctionCodeBefore(t,n,"self.ownable.assert_only_owner()");break;case"roles":case"roles-dar":{const o=r+"_ROLE",s=e.addSuperVariable({name:o,type:"felt252",value:`selector!("${o}")`}),c="roles-dar"===a.type?sv.AccessControlDefaultAdminRulesComponent.substorage.name:sv.AccessControlComponent.substorage.name;void 0!==i&&(e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:i,type:"ContractAddress"}),s&&e.addConstructorCode(`self.${c}._grant_role(${o}, ${i})`)),e.addFunctionCodeBefore(t,n,`self.${c}.assert_only_role(${o})`);break}default:throw a.type,new Error("Unknown access type")}}const sv=Vg({OwnableComponent:{path:"openzeppelin_access::ownable",substorage:{name:"ownable",type:"OwnableComponent::Storage"},event:{name:"OwnableEvent",type:"OwnableComponent::Event"},impls:[{name:"OwnableMixinImpl",embed:!0,value:"OwnableComponent::OwnableMixinImpl<ContractState>"},{name:"OwnableInternalImpl",embed:!1,value:"OwnableComponent::InternalImpl<ContractState>"}]},AccessControlComponent:{path:"openzeppelin_access::accesscontrol",substorage:{name:"access_control",type:"AccessControlComponent::Storage"},event:{name:"AccessControlEvent",type:"AccessControlComponent::Event"},impls:[{name:"AccessControlInternalImpl",embed:!1,value:"AccessControlComponent::InternalImpl<ContractState>"}]},AccessControlDefaultAdminRulesComponent:{path:"openzeppelin_access::accesscontrol::extensions",substorage:{name:"access_control_dar",type:"AccessControlDefaultAdminRulesComponent::Storage"},event:{name:"AccessControlDefaultAdminRulesEvent",type:"AccessControlDefaultAdminRulesComponent::Event"},impls:[{name:"AccessControlDefaultAdminRulesInternalImpl",embed:!1,value:"AccessControlDefaultAdminRulesComponent::InternalImpl<ContractState>"}]}}),cv=/[\n\r\u2028\u2029]/u;function lv(e,t){if(cv.test(e))throw new Rg({[t]:"Must not contain line breaks"})}const uv={license:"MIT"};function dv(e,t){const{securityContact:n,license:o}=t;n&&(lv(n,"securityContact"),e.addDocumentation(`Security contact: ${n}`)),o&&(lv(o,"license"),e.license=o)}const pv={withComponents:!1},mv={upgradeable:!0,info:uv,macros:pv},fv={...mv,access:ev()};function hv(e){return{upgradeable:e.upgradeable??mv.upgradeable,info:e.info??mv.info,macros:e.macros??mv.macros}}function gv(e){return{...hv(e),access:e.access??fv.access}}function vv(e="external"){return"view"===e?{name:"self",type:"@ContractState"}:{name:"ref self",type:"ContractState"}}function bv(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:e},t)]))}const $v={name:"ExternalImpl",of:"ExternalTrait",tags:["generate_trait","abi(per_item)"],perItemTag:"external(v0)"};function yv(e,t){e.addComponent(_v.PausableComponent,[],!1),e.addFunction($v,kv.pause),e.addFunction($v,kv.unpause),av(e,$v,kv.pause,t,"PAUSER","pauser"),av(e,$v,kv.unpause,t,"PAUSER","pauser")}const _v=Vg({PausableComponent:{path:"openzeppelin_security::pausable",substorage:{name:"pausable",type:"PausableComponent::Storage"},event:{name:"PausableEvent",type:"PausableComponent::Event"},impls:[{name:"PausableImpl",embed:!0,value:"PausableComponent::PausableImpl<ContractState>"},{name:"PausableInternalImpl",embed:!1,value:"PausableComponent::InternalImpl<ContractState>"}]}}),kv=bv({pause:{args:[vv()],code:["self.pausable.pause()"]},unpause:{args:[vv()],code:["self.pausable.unpause()"]}});function xv(e,t){if(!1===t)return;e.upgradeable=!0,e.addComponent(Iv.UpgradeableComponent,[],!1),e.addUseClause("openzeppelin_interfaces::upgrades","IUpgradeable"),e.addUseClause("starknet","ClassHash");const n={name:"UpgradeableImpl",of:"IUpgradeable<ContractState>",section:"Upgradeable",tags:["abi(embed_v0)"]};return e.addImplementedTrait(n),n}function wv(e,t,n){const o=xv(e,t);void 0!==o&&av(e,o,Cv.upgrade,n,"UPGRADER","upgrader")}const Iv=Vg({UpgradeableComponent:{path:"openzeppelin_upgrades",substorage:{name:"upgradeable",type:"UpgradeableComponent::Storage"},event:{name:"UpgradeableEvent",type:"UpgradeableComponent::Event"},impls:[{name:"UpgradeableInternalImpl",embed:!1,value:"UpgradeableComponent::InternalImpl<ContractState>"}]}}),Cv=bv({upgrade:{args:[vv(),{name:"new_class_hash",type:"ClassHash"}],code:["self.upgradeable.upgrade(new_class_hash)"]}}),Sv=Symbol("whitespace");function*Ev(e,t){for(const n of t)n===Sv?yield"":Array.isArray(n)?yield*Ev(e+1,n):yield" ".repeat(e)+n}function zv(...e){return e.filter(e=>e.length>0).flatMap(e=>[Sv,...e]).slice(1)}const Tv="1. with no section",Dv="Standalone Imports";function Ov(e){if(!e.macros.withComponents||0===e.components.length)return[];return[`#[with_components(${e.components.map(e=>e.name).map(e=>{const t=e.indexOf("Component");if(-1===t)throw new Error(`Component name "${e}" must contain "Component" substring`);return e.substring(0,t)}).join(", ")})]`]}function Uv(e){const t=e.account?"#[starknet::contract(account)]":"#[starknet::contract]";return function(...e){return[...Ev(0,e)].join("\n")+"\n"}(...zv([`// SPDX-License-Identifier: ${e.license}`,"// Compatible with OpenZeppelin Contracts for Cairo ^4.0.1"],function(e){return Rv(e.superVariables.map(e=>`const ${e.name}: ${e.type} = ${e.value}`))}(e),[...(n=e.documentations,n.map(e=>`// ${e}`)),`${t}`,...Ov(e),`mod ${e.name} {`,zv(Av(e),Pv(e.constants),Mv(e),Zv(e),qv(e),Lv(e),Vv(e),Fv(e)),"}"]));var n}function Rv(e){return e.map(e=>e.endsWith(";")?e:e+";")}function Av(e){const t=function(e){return e.useClauses.sort((e,t)=>{const n=`${e.containerPath}::${Nv(e)}`,o=`${t.containerPath}::${Nv(t)}`;return n.localeCompare(o)})}(e),n=t.reduce((e,t)=>(t.groupable?(e[t.containerPath]=e[t.containerPath]||[]).push(t):(e[Dv]=e[Dv]||[]).push(t),e),{});return Object.entries(n).flatMap(([e,t])=>function(e,t){const n=[];if(t===Dv)for(const t of e)n.push(`use ${t.containerPath}::${Nv(t)};`);else if(1==e.length)n.push(`use ${t}::${Nv(e[0])};`);else if(e.length>1){const o=e.map(e=>Nv(e)).join(", ");n.push(`use ${t}::{${o}};`)}return n}(t,e)).flatMap(e=>function(e){const t=[],n=-1!==e.indexOf("{");n&&e.length>90?(t.push(e.slice(0,e.indexOf("{")+1)),t.push(...jv(e.slice(e.indexOf("{")+1,-2))),t.push("};")):t.push(e);return t}(e.toString()))}function Nv(e){return e.alias?`${e.name} as ${e.alias}`:e.name}function jv(e){const t=[];if(e.length>90){const n=e.slice(0,90),o=n.lastIndexOf(",");-1!==o?(t.push("\t"+n.slice(0,o+1)),t.push(...jv(e.slice(o+2)))):t.push("\t"+n)}else t.push("\t"+e);return t}function Pv(e){const t=[];for(const n of e){const e=n.inlineComment??!1,o=!!n.comment;o&&!e?(t.push(`// ${n.comment}`),t.push(`const ${n.name}: ${n.type} = ${n.value};`)):o?t.push(`const ${n.name}: ${n.type} = ${n.value}; // ${n.comment}`):t.push(`const ${n.name}: ${n.type} = ${n.value};`)}return t}function Mv(e){return e.macros.withComponents?[]:e.components.map(e=>`component!(path: ${e.name}, storage: ${e.substorage.name}, event: ${e.event.name});`)}function Zv(e){const t=e.macros.withComponents,n=e.components.flatMap(e=>t?e.impls.filter(e=>e.embed):e.impls),o=n.reduce((e,t)=>{const n=t.embed??!0,o=t.section??(n?"External":"Internal");return(e[o]=e[o]||[]).push(t),e},{}),r=Object.entries(o).sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>function(e,t){const n=[];return n.push(`// ${e}`),t.map(e=>n.push(...function(e){const t=[];(e.embed??1)&&t.push("#[abi(embed_v0)]");return t.push(`impl ${e.name} = ${e.value};`),t}(e))),n}(e,t));return zv(...r)}function qv(e){const t=e.storageMembers.map(e=>`${e.name}: ${e.type},`);if(e.macros.withComponents||0===e.components.length)return 0===t.length?["#[storage]","struct Storage {}"]:["#[storage]","struct Storage {",t,"}"];const n=[...t];for(const t of e.components)n.push("#[substorage(v0)]"),n.push(`${t.substorage.name}: ${t.substorage.type},`);return["#[storage]","struct Storage {",n,"}"]}function Lv(e){if(e.macros.withComponents||0===e.components.length)return[];const t=[];for(const n of e.components)t.push("#[flat]"),t.push(`${n.event.name}: ${n.event.type},`);return["#[event]","#[derive(Drop, starknet::Event)]","enum Event {",t,"}"]}function Fv(e){const t=e.implementedTraits.sort((e,t)=>e.priority!==t.priority?(e.priority??1/0)-(t.priority??1/0):e.tags.length!==t.tags.length?e.tags.length-t.tags.length:e.name.localeCompare(t.name)),n=t.reduce((e,t)=>{const n=t.section??Tv;return(e[n]=e[n]||[]).push(t),e},{}),o=Object.entries(n).sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>function(e,t){const n=[],o=e===Tv;o||(n.push("//"),n.push(`// ${e}`),n.push("//"));return t.forEach((e,t)=>{(t>0||!o)&&n.push(""),n.push(...function(e){const t=[];t.push(...e.tags.map(e=>`#[${e}]`)),t.push(`impl ${e.name} of ${e.of} {`);const n=Pv(e.superVariables);t.push(n);const o=e.functions.map(e=>function(e){const t=`fn ${e.name}`,n=e.args.map(e=>Bv(e)),o=e.codeBefore?.concat(e.code)??e.code;for(let t=0;t<o.length;t++){const n=o[t],r=t<o.length-1||void 0===e.returns;void 0!==n&&n.length>0&&(r&&!["{","}",";"].includes(n.charAt(n.length-1))?o[t]+=";":!r&&n.endsWith(";")&&(o[t]=n.slice(0,n.length-1)))}return Gv(t,n,e.tag,e.returns,void 0,o)}(e));return t.push(zv(...o)),t.push("}"),t}(e))}),n}(e,t));return zv(...o)}function Vv(e){const t=e.components.some(e=>void 0!==e.initializer),n=e.constructorCode.length>0;if(t||n){const t=e.components.filter(Hv).flatMap(e=>function({substorage:e,initializer:t}){if(void 0===t||void 0===e?.name)return[];return[`self.${e.name}.initializer(`+t.params.map(Jv).join(", ")+")"]}(e)),n="constructor",o="fn constructor",r=[vv(),...e.constructorArgs],i=zv(Rv(t),Rv(e.constructorCode));return Gv(o,r.map(e=>Bv(e)),n,void 0,void 0,i)}return[]}function Hv(e){return void 0!==e.initializer&&void 0!==e.substorage?.name}function Jv(e){if("object"==typeof e){if("lit"in e)return e.lit;if("note"in e)return`${Jv(e.value)}`;throw Error("Unknown value type")}if("number"==typeof e){if(Number.isSafeInteger(e))return e.toFixed(0);throw new Error(`Number not representable (${e})`)}return"bigint"==typeof e?`${e}`:`"${e}"`}function Gv(e,t,n,o,r,i){const a=[];void 0!==n&&a.push(`#[${n}]`);let s=`${e}(`;if(t.length>0){const e=t.join(", ");e.length>80?(a.push(s),s="",a.push(t.map(e=>`${e},`))):s+=`${e}`}return s+=")",s+=void 0===o?" {":` -> ${o} {`,a.push(s),a.push(i),a.push("}"),a}function Bv(e){if(void 0!==e.type){const t=e.type;return`${e.name}: ${t}`}return`${e.name}`}const Wv=BigInt(18),Kv={enabled:!1,maxAmount:"max",feeMode:"percent",feePercent:"0",feeDestination:"burn"},Xv={name:"MyToken",symbol:"MTK",decimals:Wv.toString(),burnable:!1,pausable:!1,premint:"0",mintable:!1,wrapper:!1,votes:!1,appName:"",appVersion:"v1",flashmint:Kv,access:fv.access,upgradeable:fv.upgradeable,info:fv.info,macros:fv.macros};function Qv(e){const t=function(e){return{...e,...gv(e),decimals:e.decimals??Xv.decimals,burnable:e.burnable??Xv.burnable,pausable:e.pausable??Xv.pausable,premint:e.premint||Xv.premint,mintable:e.mintable??Xv.mintable,wrapper:e.wrapper??Xv.wrapper,votes:e.votes??Xv.votes,appName:e.appName??Xv.appName,appVersion:e.appVersion??Xv.appVersion,flashmint:e.flashmint??Xv.flashmint}}(e),n=new Fg(t.name,t.macros),o=qg(t.decimals,"decimals","u8");return function(e,t,n,o){if(e.addComponent(tb.ERC20Component,[t,n],!0),o===Wv)e.addUseClause("openzeppelin_token::erc20","DefaultConfig",{alias:"ERC20DefaultConfig"});else{const t={name:"ERC20ImmutableConfig",of:"ERC20Component::ImmutableConfig",tags:[]};e.addImplementedTrait(t),e.addSuperVariableToTrait(t,{name:"DECIMALS",type:"u8",value:o.toString()})}}(n,jg(t.name),jg(t.symbol),o),function(e){e.addImplToComponent(tb.ERC20Component,{name:"ERC20MixinImpl",embed:!0,value:"ERC20Component::ERC20MixinImpl<ContractState>"})}(n),t.premint&&function(e,t,n){if(void 0!==t&&"0"!==t){if(!Yv.test(t))throw new Rg({premint:"Not a valid number"});const o=qg(eb(t,Number(n)),"premint","u256");e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"recipient",type:"ContractAddress"}),e.addConstructorCode(`self.erc20.mint(recipient, ${o})`)}}(n,t.premint,o),t.pausable&&yv(n,t.access),t.burnable&&function(e){e.addUseClause("starknet","get_caller_address"),e.addFunction($v,nb.burn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),av(e,$v,nb.mint,t,"MINTER","minter")}(n,t.access),t.wrapper&&function(e){e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"underlying",type:"ContractAddress"}),e.addComponent(tb.ERC20WrapperComponent,[{lit:"underlying"}],!0)}(n),t.flashmint.enabled&&function(e,t,n){e.addComponent(tb.ERC20FlashMintComponent,[],!1);const o=function(e,t){if("max"===e)return null;if(""===e||!Yv.test(e))throw new Rg({flashMintMaxAmount:'Must be "max" or a non-negative number'});return qg(eb(e,Number(t)),"flashMintMaxAmount","u256")}(t.maxAmount,n),r=null!==o,i="fee_receiver"===t.feeDestination,a=function(e){switch(e.feeMode){case"percent":{const t=function(e){if(""===e)return null;if(!Yv.test(e))throw new Rg({flashMintFeePercent:"Must be a number between 0 and 100"});const[t="",n=""]=e.split("."),o=n.length,r=(t+n).replace(/^0+/,"");if(""===r)return null;const i=BigInt(r),a=10n**BigInt(o);if(i>100n*a)throw new Rg({flashMintFeePercent:"Must be a number between 0 and 100"});const s=100n*a;return qg(s.toString(),"flashMintFeePercent","u256"),{numerator:i,denominator:s}}(e.feePercent);return null===t?null:[`amount * ${t.numerator} / ${t.denominator}`]}case"custom":return["// TODO: Must be implemented according to the desired flash fee logic","0"];default:{const t=e.feeMode;throw new Error(`Unknown flashMintFeeMode: ${t}`)}}}(t),s=null!==a;if(!r&&!s&&!i)return void e.addUseClause("openzeppelin_token::erc20::extensions::erc20_flash_mint","DefaultConfig",{alias:"ERC20FlashMintDefaultConfig"});const c={name:"FlashMintConfigImpl",of:"ERC20FlashMintComponent::FlashMintConfigTrait<ContractState>",tags:[]};e.addImplementedTrait(c),(r||s||i)&&e.addUseClause("starknet","ContractAddress");if(r){e.addUseClause("starknet","get_contract_address"),e.addUseClause("core::num::traits","Bounded");e.addFunction(c,{name:"max_flash_loan",args:[{name:"self",type:"@ERC20FlashMintComponent::ComponentState<ContractState>"},{name:"token",type:"ContractAddress"},{name:"total_supply",type:"u256"}],returns:"u256",code:[]}).code.push("if token != get_contract_address() {"," return 0;","}","let headroom = Bounded::<u256>::MAX - total_supply;",`let cap: u256 = ${o};`,"if cap < headroom { cap } else { headroom }")}if(s){e.addFunction(c,{name:"flash_fee",args:[{name:"self",type:"@ERC20FlashMintComponent::ComponentState<ContractState>"},{name:"token",type:"ContractAddress"},{name:"amount",type:"u256"}],returns:"u256",code:[]}).code.push(...a)}if(i){e.addUseClause("core::num::traits","Zero"),e.addUseClause("starknet::storage","StoragePointerReadAccess"),e.addUseClause("starknet::storage","StoragePointerWriteAccess"),e.addStorageMember({name:"flash_fee_receiver",type:"ContractAddress"}),e.addConstructorArgument({name:"flash_fee_receiver",type:"ContractAddress"}),e.addConstructorCode("assert(!flash_fee_receiver.is_zero(), 'FlashMint: invalid receiver')"),e.addConstructorCode("self.flash_fee_receiver.write(flash_fee_receiver)");e.addFunction(c,{name:"flash_fee_receiver",args:[{name:"self",type:"@ERC20FlashMintComponent::ComponentState<ContractState>"}],returns:"ContractAddress",code:[]}).code.push("self.get_contract().flash_fee_receiver.read()")}}(n,t.flashmint,o),function(e,t){const n=t.pausable||t.votes;if(n){const n={name:"ERC20HooksImpl",of:"ERC20Component::ERC20HooksTrait<ContractState>",tags:[],priority:1};if(e.addImplementedTrait(n),t.pausable){e.addUseClause("starknet","ContractAddress");e.addFunction(n,{name:"before_update",args:[{name:"ref self",type:"ERC20Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:[]}).code.push("let contract_state = self.get_contract();","contract_state.pausable.assert_not_paused();")}if(t.votes){if(!t.appName)throw new Rg({appName:"Application Name is required when Votes are enabled"});if(!t.appVersion)throw new Rg({appVersion:"Application Version is required when Votes are enabled"});Gg(e,Pg(t.appName,"appName"),Pg(t.appVersion,"appVersion"),"SNIP12 Metadata"),e.addUseClause("starknet","ContractAddress");e.addFunction(n,{name:"after_update",args:[{name:"ref self",type:"ERC20Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:[]}).code.push("let mut contract_state = self.get_contract_mut();","contract_state.votes.transfer_voting_units(from, recipient, amount);")}}else e.addUseClause("openzeppelin_token::erc20","ERC20HooksEmptyImpl")}(n,t),iv(n,t.access),wv(n,t.upgradeable,t.access),dv(n,t.info),n}const Yv=/^\d*(?:\.\d*)?$/;function eb(e,t){let n;const o=e.split(".");if(o.length>2)throw new Rg({premint:"Not a valid number"});{const e=o[0]??"";let r=o[1]??"";if(t>r.length)try{r+="0".repeat(t-r.length)}catch{throw new Rg({premint:"Decimals number too large"})}else if(t<r.length)throw new Rg({premint:"Too many decimals"});n=e.concat(r).replace(/^0+/,"")}return 0===n.length&&(n="0"),n}const tb=Vg({ERC20Component:{path:"openzeppelin_token::erc20",substorage:{name:"erc20",type:"ERC20Component::Storage"},event:{name:"ERC20Event",type:"ERC20Component::Event"},impls:[{name:"ERC20InternalImpl",embed:!1,value:"ERC20Component::InternalImpl<ContractState>"}]},ERC20WrapperComponent:{path:"openzeppelin_token::erc20::extensions::erc20_wrapper",substorage:{name:"erc20_wrapper",type:"ERC20WrapperComponent::Storage"},event:{name:"ERC20WrapperEvent",type:"ERC20WrapperComponent::Event"},impls:[{name:"ERC20WrapperImpl",embed:!0,value:"ERC20WrapperComponent::ERC20WrapperImpl<ContractState>"},{name:"ERC20WrapperInternalImpl",embed:!1,value:"ERC20WrapperComponent::InternalImpl<ContractState>"}]},ERC20FlashMintComponent:{path:"openzeppelin_token::erc20::extensions::erc20_flash_mint",substorage:{name:"erc20_flash_mint",type:"ERC20FlashMintComponent::Storage"},event:{name:"ERC20FlashMintEvent",type:"ERC20FlashMintComponent::Event"},impls:[{name:"ERC20FlashMintImpl",embed:!0,value:"ERC20FlashMintComponent::ERC20FlashMintImpl<ContractState>"}]}}),nb=bv({burn:{args:[vv(),{name:"value",type:"u256"}],code:["self.erc20.burn(get_caller_address(), value);"]},mint:{args:[vv(),{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:["self.erc20.mint(recipient, amount);"]}}),ob=BigInt(1e4),rb={enabled:!1,defaultRoyaltyFraction:"0",feeDenominator:ob.toString()};function ib(e,t,n){if(!t.enabled)return;const o={...n};!1===o.type&&(o.type=nv),iv(e,o);const{defaultRoyaltyFraction:r,feeDenominator:i}=function(e){const t=qg(e.feeDenominator,"feeDenominator","u128");if(t===BigInt(0))throw new Rg({feeDenominator:"Must be greater than 0"});const n=qg(e.defaultRoyaltyFraction,"defaultRoyaltyFraction","u128");if(n>t)throw new Rg({defaultRoyaltyFraction:"Cannot be greater than fee denominator"});return{defaultRoyaltyFraction:n,feeDenominator:t}}(t),a=[{lit:"default_royalty_receiver"},r];switch(e.addComponent(ab.ERC2981Component,a,!0),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"default_royalty_receiver",type:"ContractAddress"}),o.type){case"ownable":e.addImplToComponent(ab.ERC2981Component,{name:"ERC2981AdminOwnableImpl",embed:!0,value:"ERC2981Component::ERC2981AdminOwnableImpl<ContractState>"});break;case"roles":e.addImplToComponent(ab.ERC2981Component,{name:"ERC2981AdminAccessControlImpl",embed:!0,value:"ERC2981Component::ERC2981AdminAccessControlImpl<ContractState>"}),e.addConstructorArgument({name:"royalty_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control._grant_role(ERC2981Component::ROYALTY_ADMIN_ROLE, royalty_admin)");break;case"roles-dar":e.addImplToComponent(ab.ERC2981Component,{name:"ERC2981AdminAccessControlDefaultAdminRulesImpl",embed:!0,value:"ERC2981Component::ERC2981AdminAccessControlDefaultAdminRulesImpl<ContractState>"}),e.addConstructorArgument({name:"royalty_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control_dar._grant_role(ERC2981Component::ROYALTY_ADMIN_ROLE, royalty_admin)");break;default:throw o.type,new Error("Unknown access type")}if(i===ob)e.addUseClause("openzeppelin_token::common::erc2981","DefaultConfig",{alias:"ERC2981DefaultConfig"});else{const t={name:"ERC2981ImmutableConfig",of:"ERC2981Component::ImmutableConfig",tags:[]};e.addImplementedTrait(t),e.addSuperVariableToTrait(t,{name:"FEE_DENOMINATOR",type:"u128",value:i.toString()})}}ob.toString();const ab=Vg({ERC2981Component:{path:"openzeppelin_token::common::erc2981",substorage:{name:"erc2981",type:"ERC2981Component::Storage"},event:{name:"ERC2981Event",type:"ERC2981Component::Event"},impls:[{name:"ERC2981Impl",embed:!0,value:"ERC2981Component::ERC2981Impl<ContractState>"},{name:"ERC2981InfoImpl",embed:!0,value:"ERC2981Component::ERC2981InfoImpl<ContractState>"},{name:"ERC2981InternalImpl",embed:!1,value:"ERC2981Component::InternalImpl<ContractState>"}]}}),sb={name:"MyToken",symbol:"MTK",baseUri:"",burnable:!1,pausable:!1,mintable:!1,enumerable:!1,wrapper:!1,uriStorage:!1,votes:!1,consecutive:!1,royaltyInfo:rb,appName:"",appVersion:"v1",access:fv.access,upgradeable:fv.upgradeable,info:fv.info,macros:fv.macros};function cb(e){const t=function(e){return{...e,...gv(e),baseUri:e.baseUri??sb.baseUri,burnable:e.burnable??sb.burnable,pausable:e.pausable??sb.pausable,mintable:e.mintable??sb.mintable,enumerable:e.enumerable??sb.enumerable,wrapper:e.wrapper??sb.wrapper,uriStorage:e.uriStorage??sb.uriStorage,royaltyInfo:e.royaltyInfo??sb.royaltyInfo,votes:e.votes??sb.votes,consecutive:e.consecutive??sb.consecutive,appName:e.appName??sb.appName,appVersion:e.appVersion??sb.appVersion}}(e);if(t.consecutive&&t.enumerable)throw new Rg({consecutive:"Consecutive cannot be combined with Enumerable: batch mints bypass the update hook that Enumerable relies on to track ownership."});const n=new Fg(t.name,t.macros);return function(e,t,n,o){e.addComponent(lb.ERC721Component,[t,n,o],!0)}(n,jg(t.name),jg(t.symbol),jg(t.baseUri)),function(e){e.addImplToComponent(lb.ERC721Component,{name:"ERC721MixinImpl",embed:!0,value:"ERC721Component::ERC721MixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5"),Jg(e)}(n),t.consecutive||n.addUseClause("openzeppelin_token::erc721","ERC721OwnerOfDefaultImpl"),t.pausable&&yv(n,t.access),t.burnable&&function(e){e.addUseClause("core::num::traits","Zero"),e.addUseClause("starknet","get_caller_address"),e.addFunction($v,ub.burn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),av(e,$v,ub.safe_mint,t,"MINTER","minter"),e.addFunction($v,ub.safeMint)}(n,t.access),t.enumerable&&function(e){e.addComponent(lb.ERC721EnumerableComponent,[],!0)}(n),t.consecutive&&function(e){e.addUseClause("openzeppelin_token::erc721::extensions::erc721_consecutive","DefaultConfig"),e.addComponent(lb.ERC721ConsecutiveComponent,[],!1)}(n),t.wrapper&&function(e){e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"underlying",type:"ContractAddress"}),e.addComponent(lb.ERC721WrapperComponent,[{lit:"underlying"}],!0)}(n),t.uriStorage?(!function(e,t){e.addUseClause("starknet","ContractAddress"),av(e,$v,ub.set_token_uri,t,"URI_SETTER","uri_setter"),e.addComponent(lb.ERC721URIStorageComponent,[],!1)}(n,t.access),n.addUseClause("openzeppelin_token::erc721::extensions::ERC721URIStorageComponent","ERC721TokenURIStorageImpl")):n.addUseClause("openzeppelin_token::erc721","ERC721TokenURIDefaultImpl"),iv(n,t.access),wv(n,t.upgradeable,t.access),dv(n,t.info),ib(n,t.royaltyInfo,t.access),function(e,t){const n=t.pausable||t.enumerable||t.votes||t.consecutive,o=t.uriStorage||t.consecutive;if(n||o){const r={name:"ERC721HooksImpl",of:"ERC721Component::ERC721HooksTrait<ContractState>",tags:[],priority:0};e.addImplementedTrait(r),e.addUseClause("starknet","ContractAddress"),n&&function(e,t,n){if(!(n.pausable||n.enumerable||n.votes||n.consecutive))return;const o=n.enumerable||n.votes||n.consecutive,r=[o?"let mut contract_state = self.get_contract_mut()":"let contract_state = self.get_contract()"];n.pausable&&r.push("contract_state.pausable.assert_not_paused()");n.enumerable&&r.push("contract_state.erc721_enumerable.before_update(to, token_id)");if(n.votes){if(!n.appName)throw new Rg({appName:"Application Name is required when Votes are enabled"});if(!n.appVersion)throw new Rg({appVersion:"Application Version is required when Votes are enabled"});Gg(e,Pg(n.appName,"appName"),Pg(n.appVersion,"appVersion"),"SNIP12 Metadata"),r.push("let previous_owner = self._owner_of(token_id);"),r.push("contract_state.votes.transfer_voting_units(previous_owner, to, 1);")}n.consecutive&&r.push("contract_state.erc721_consecutive.before_update(to, token_id, auth)");e.addFunction(t,{name:"before_update",args:[{name:"ref self",type:"ERC721Component::ComponentState<ContractState>"},{name:"to",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"auth",type:"ContractAddress"}],code:r})}(e,r,t),o&&function(e,t,n){if(!n.uriStorage&&!n.consecutive)return;const o=["let mut contract_state = self.get_contract_mut()"];n.uriStorage&&o.push("contract_state.erc721_uri_storage.after_update(to, token_id, auth)");n.consecutive&&o.push("contract_state.erc721_consecutive.after_update(to, token_id, auth)");e.addFunction(t,{name:"after_update",args:[{name:"ref self",type:"ERC721Component::ComponentState<ContractState>"},{name:"to",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"auth",type:"ContractAddress"}],code:o})}(e,r,t)}else e.addUseClause("openzeppelin_token::erc721","ERC721HooksEmptyImpl")}(n,t),n}const lb=Vg({ERC721Component:{path:"openzeppelin_token::erc721",substorage:{name:"erc721",type:"ERC721Component::Storage"},event:{name:"ERC721Event",type:"ERC721Component::Event"},impls:[{name:"ERC721InternalImpl",embed:!1,value:"ERC721Component::InternalImpl<ContractState>"}]},ERC721WrapperComponent:{path:"openzeppelin_token::erc721::extensions::erc721_wrapper",substorage:{name:"erc721_wrapper",type:"ERC721WrapperComponent::Storage"},event:{name:"ERC721WrapperEvent",type:"ERC721WrapperComponent::Event"},impls:[{name:"ERC721WrapperImpl",embed:!0,value:"ERC721WrapperComponent::ERC721WrapperImpl<ContractState>"},{name:"ERC721WrapperReceiverImpl",embed:!0,value:"ERC721WrapperComponent::ERC721WrapperReceiverImpl<ContractState>"},{name:"ERC721WrapperInternalImpl",embed:!1,value:"ERC721WrapperComponent::InternalImpl<ContractState>"}]},ERC721EnumerableComponent:{path:"openzeppelin_token::erc721::extensions",substorage:{name:"erc721_enumerable",type:"ERC721EnumerableComponent::Storage"},event:{name:"ERC721EnumerableEvent",type:"ERC721EnumerableComponent::Event"},impls:[{name:"ERC721EnumerableImpl",embed:!0,value:"ERC721EnumerableComponent::ERC721EnumerableImpl<ContractState>"},{name:"ERC721EnumerableInternalImpl",embed:!1,value:"ERC721EnumerableComponent::InternalImpl<ContractState>"}]},ERC721URIStorageComponent:{path:"openzeppelin_token::erc721::extensions",substorage:{name:"erc721_uri_storage",type:"ERC721URIStorageComponent::Storage"},event:{name:"ERC721URIStorageEvent",type:"ERC721URIStorageComponent::Event"},impls:[{name:"ERC721URIStorageInternalImpl",embed:!1,value:"ERC721URIStorageComponent::InternalImpl<ContractState>"}]},ERC721ConsecutiveComponent:{path:"openzeppelin_token::erc721::extensions",substorage:{name:"erc721_consecutive",type:"ERC721ConsecutiveComponent::Storage"},event:{name:"ERC721ConsecutiveEvent",type:"ERC721ConsecutiveComponent::Event"},impls:[{name:"ERC721ConsecutiveInternalImpl",embed:!1,value:"ERC721ConsecutiveComponent::InternalImpl<ContractState>"}]}}),ub=bv({burn:{args:[vv(),{name:"token_id",type:"u256"}],code:["self.erc721.update(Zero::zero(), token_id, get_caller_address());"]},safe_mint:{args:[vv(),{name:"recipient",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.erc721.safe_mint(recipient, token_id, data);"]},safeMint:{args:[vv(),{name:"recipient",type:"ContractAddress"},{name:"tokenId",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.safe_mint(recipient, tokenId, data);"]},set_token_uri:{args:[vv(),{name:"token_id",type:"u256"},{name:"token_uri",type:"ByteArray"}],code:["self.erc721_uri_storage.set_token_uri(token_id, token_uri);"]}}),db={name:"MyToken",baseUri:"",burnable:!1,pausable:!1,mintable:!1,supply:!1,uriStorage:!1,updatableUri:!0,royaltyInfo:rb,access:fv.access,upgradeable:fv.upgradeable,info:fv.info,macros:fv.macros};function pb(e){const t=function(e){return{...e,...gv(e),burnable:e.burnable??db.burnable,pausable:e.pausable??db.pausable,mintable:e.mintable??db.mintable,supply:e.supply??db.supply,uriStorage:e.uriStorage??db.uriStorage,updatableUri:e.updatableUri??db.updatableUri,royaltyInfo:e.royaltyInfo??db.royaltyInfo}}(e),n=new Fg(t.name,t.macros);return function(e,t){e.addComponent(mb.ERC1155Component,[t],!0)}(n,jg(t.baseUri)),function(e){e.addImplToComponent(mb.ERC1155Component,{name:"ERC1155MixinImpl",embed:!0,value:"ERC1155Component::ERC1155MixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5"),Jg(e)}(n),t.pausable&&yv(n,t.access),t.burnable&&function(e){e.addUseClause("starknet","ContractAddress"),e.addUseClause("starknet","get_caller_address"),e.addFunction($v,fb.burn),e.addFunction($v,fb.batch_burn),e.addFunction($v,fb.batchBurn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),av(e,$v,fb.mint,t,"MINTER","minter"),av(e,$v,fb.batch_mint,t,"MINTER","minter"),e.addFunction($v,fb.batchMint)}(n,t.access),t.supply&&function(e){e.addComponent(mb.ERC1155SupplyComponent,[],!1)}(n),function(e,t){if(t.uriStorage)return e.addUseClause("starknet","ContractAddress"),av(e,$v,hb.set_base_uri,t.access,"URI_SETTER","uri_setter"),void av(e,$v,hb.set_token_uri,t.access,"URI_SETTER","uri_setter");if(t.updatableUri)e.addUseClause("starknet","ContractAddress"),av(e,$v,fb.set_base_uri,t.access,"URI_SETTER","uri_setter"),e.addFunction($v,fb.setBaseUri)}(n,t),t.uriStorage?(!function(e){e.addComponent(mb.ERC1155URIStorageComponent,[],!1)}(n),n.addUseClause("openzeppelin_token::erc1155::extensions::ERC1155URIStorageComponent","ERC1155URIStorageImpl")):n.addUseClause("openzeppelin_token::erc1155","ERC1155TokenURIDefaultImpl"),iv(n,t.access),wv(n,t.upgradeable,t.access),dv(n,t.info),ib(n,t.royaltyInfo,t.access),function(e,t){const n=t.pausable||t.supply;if(n){const n={name:"ERC1155HooksImpl",of:"ERC1155Component::ERC1155HooksTrait<ContractState>",tags:[],priority:1};if(e.addImplementedTrait(n),e.addUseClause("starknet","ContractAddress"),t.pausable&&e.addFunction(n,{name:"before_update",args:[{name:"ref self",type:"ERC1155Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"to",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["let contract_state = self.get_contract()","contract_state.pausable.assert_not_paused()"]}),t.supply){e.addFunction(n,{name:"after_update",args:[{name:"ref self",type:"ERC1155Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"to",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:[]}).code.push("let mut contract_state = self.get_contract_mut();","contract_state.erc1155_supply.after_update(from, to, token_ids, values);")}}else e.addUseClause("openzeppelin_token::erc1155","ERC1155HooksEmptyImpl")}(n,t),n}const mb=Vg({ERC1155Component:{path:"openzeppelin_token::erc1155",substorage:{name:"erc1155",type:"ERC1155Component::Storage"},event:{name:"ERC1155Event",type:"ERC1155Component::Event"},impls:[{name:"ERC1155InternalImpl",embed:!1,value:"ERC1155Component::InternalImpl<ContractState>"}]},ERC1155SupplyComponent:{path:"openzeppelin_token::erc1155::extensions",substorage:{name:"erc1155_supply",type:"ERC1155SupplyComponent::Storage"},event:{name:"ERC1155SupplyEvent",type:"ERC1155SupplyComponent::Event"},impls:[{name:"ERC1155SupplyImpl",embed:!0,value:"ERC1155SupplyComponent::ERC1155SupplyImpl<ContractState>"},{name:"ERC1155SupplyInternalImpl",embed:!1,value:"ERC1155SupplyComponent::InternalImpl<ContractState>"}]},ERC1155URIStorageComponent:{path:"openzeppelin_token::erc1155::extensions",substorage:{name:"erc1155_uri_storage",type:"ERC1155URIStorageComponent::Storage"},event:{name:"ERC1155URIStorageEvent",type:"ERC1155URIStorageComponent::Event"},impls:[{name:"ERC1155URIStorageInternalImpl",embed:!1,value:"ERC1155URIStorageComponent::InternalImpl<ContractState>"}]}}),fb=bv({burn:{args:[vv(),{name:"account",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"value",type:"u256"}],code:["let caller = get_caller_address();","if account != caller {"," assert(self.erc1155.is_approved_for_all(account, caller), ERC1155Component::Errors::UNAUTHORIZED)","}","self.erc1155.burn(account, token_id, value);"]},batch_burn:{args:[vv(),{name:"account",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["let caller = get_caller_address();","if account != caller {"," assert(self.erc1155.is_approved_for_all(account, caller), ERC1155Component::Errors::UNAUTHORIZED)","}","self.erc1155.batch_burn(account, token_ids, values);"]},batchBurn:{args:[vv(),{name:"account",type:"ContractAddress"},{name:"tokenIds",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["self.batch_burn(account, tokenIds, values);"]},mint:{args:[vv(),{name:"account",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"value",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.erc1155.mint_with_acceptance_check(account, token_id, value, data);"]},batch_mint:{args:[vv(),{name:"account",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"},{name:"data",type:"Span<felt252>"}],code:["self.erc1155.batch_mint_with_acceptance_check(account, token_ids, values, data);"]},batchMint:{args:[vv(),{name:"account",type:"ContractAddress"},{name:"tokenIds",type:"Span<u256>"},{name:"values",type:"Span<u256>"},{name:"data",type:"Span<felt252>"}],code:["self.batch_mint(account, tokenIds, values, data);"]},set_base_uri:{args:[vv(),{name:"base_uri",type:"ByteArray"}],code:["self.erc1155._set_base_uri(base_uri);"]},setBaseUri:{args:[vv(),{name:"baseUri",type:"ByteArray"}],code:["self.set_base_uri(baseUri);"]}}),hb=bv({set_base_uri:{args:[vv(),{name:"base_uri",type:"ByteArray"}],code:["self.erc1155_uri_storage.set_base_uri(base_uri);"]},set_token_uri:{args:[vv(),{name:"token_id",type:"u256"},{name:"token_uri",type:"ByteArray"}],code:["self.erc1155_uri_storage.set_token_uri(token_id, token_uri);"]}}),gb={name:"MyToken",burnable:!1,pausable:!1,mintable:!1,contentUri:!1,tokenSupply:!1,metadata:!1,access:fv.access,upgradeable:fv.upgradeable,info:fv.info,macros:fv.macros};function vb(e){const t=function(e){return{...e,...gv(e),burnable:e.burnable??gb.burnable,pausable:e.pausable??gb.pausable,mintable:e.mintable??gb.mintable,contentUri:e.contentUri??gb.contentUri,tokenSupply:e.tokenSupply??gb.tokenSupply,metadata:e.metadata??gb.metadata}}(e),n=new Fg(t.name,t.macros);return function(e){e.addComponent(bb.ERC6909Component,[],!0)}(n),Jg(n),t.pausable&&yv(n,t.access),t.burnable&&function(e){e.addUseClause("starknet","ContractAddress"),e.addUseClause("starknet","get_caller_address"),e.addFunction($v,$b.burn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),av(e,$v,$b.mint,t,"MINTER","minter")}(n,t.access),t.contentUri&&function(e,t){const n={...t};!1===n.type&&(n.type=nv);switch(iv(e,n),e.addComponent(bb.ERC6909ContentURIComponent,[],!0),n.type){case"ownable":e.addImplToComponent(bb.ERC6909ContentURIComponent,{name:"ERC6909ContentURIAdminOwnableImpl",embed:!0,value:"ERC6909ContentURIComponent::ERC6909ContentURIAdminOwnableImpl<ContractState>"});break;case"roles":e.addImplToComponent(bb.ERC6909ContentURIComponent,{name:"ERC6909ContentURIAdminAccessControlImpl",embed:!0,value:"ERC6909ContentURIComponent::ERC6909ContentURIAdminAccessControlImpl<ContractState>"}),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"content_uri_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control._grant_role(ERC6909ContentURIComponent::CONTENT_URI_ADMIN_ROLE, content_uri_admin)");break;case"roles-dar":e.addImplToComponent(bb.ERC6909ContentURIComponent,{name:"ERC6909ContentURIAdminAccessControlDefaultAdminRulesImpl",embed:!0,value:"ERC6909ContentURIComponent::ERC6909ContentURIAdminAccessControlDefaultAdminRulesImpl<ContractState>"}),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"content_uri_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control_dar._grant_role(ERC6909ContentURIComponent::CONTENT_URI_ADMIN_ROLE, content_uri_admin)");break;default:throw n.type,new Error("Unknown access type")}}(n,t.access),t.tokenSupply&&function(e){e.addComponent(bb.ERC6909TokenSupplyComponent,[],!0)}(n),t.metadata&&function(e,t){const n={...t};!1===n.type&&(n.type=nv);switch(iv(e,n),e.addComponent(bb.ERC6909MetadataComponent,[],!0),n.type){case"ownable":e.addImplToComponent(bb.ERC6909MetadataComponent,{name:"ERC6909MetadataAdminOwnableImpl",embed:!0,value:"ERC6909MetadataComponent::ERC6909MetadataAdminOwnableImpl<ContractState>"});break;case"roles":e.addImplToComponent(bb.ERC6909MetadataComponent,{name:"ERC6909MetadataAdminAccessControlImpl",embed:!0,value:"ERC6909MetadataComponent::ERC6909MetadataAdminAccessControlImpl<ContractState>"}),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"metadata_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control._grant_role(ERC6909MetadataComponent::METADATA_ADMIN_ROLE, metadata_admin)");break;case"roles-dar":e.addImplToComponent(bb.ERC6909MetadataComponent,{name:"ERC6909MetadataAdminAccessControlDefaultAdminRulesImpl",embed:!0,value:"ERC6909MetadataComponent::ERC6909MetadataAdminAccessControlDefaultAdminRulesImpl<ContractState>"}),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"metadata_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control_dar._grant_role(ERC6909MetadataComponent::METADATA_ADMIN_ROLE, metadata_admin)");break;default:throw n.type,new Error("Unknown access type")}}(n,t.access),iv(n,t.access),wv(n,t.upgradeable,t.access),dv(n,t.info),function(e,t){const n=t.pausable||t.tokenSupply;if(n){const n={name:"ERC6909HooksImpl",of:"ERC6909Component::ERC6909HooksTrait<ContractState>",tags:[],priority:1};e.addImplementedTrait(n),e.addUseClause("starknet","ContractAddress");const o=[],r=t.tokenSupply?"let mut contract_state = self.get_contract_mut();":"let contract_state = self.get_contract();";o.push(r),t.pausable&&o.push("contract_state.pausable.assert_not_paused();"),t.tokenSupply&&o.push("contract_state.erc6909_token_supply.update_token_supply(from, recipient, id, amount);"),e.addFunction(n,{name:"before_update",args:[{name:"ref self",type:"ERC6909Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"recipient",type:"ContractAddress"},{name:"id",type:"u256"},{name:"amount",type:"u256"}],code:o})}else e.addUseClause("openzeppelin_token::erc6909","ERC6909HooksEmptyImpl")}(n,t),n}const bb=Vg({ERC6909Component:{path:"openzeppelin_token::erc6909",substorage:{name:"erc6909",type:"ERC6909Component::Storage"},event:{name:"ERC6909Event",type:"ERC6909Component::Event"},impls:[{name:"ERC6909Impl",embed:!0,value:"ERC6909Component::ERC6909Impl<ContractState>"},{name:"ERC6909InternalImpl",embed:!1,value:"ERC6909Component::InternalImpl<ContractState>"}]},ERC6909ContentURIComponent:{path:"openzeppelin_token::erc6909::extensions",substorage:{name:"erc6909_content_uri",type:"ERC6909ContentURIComponent::Storage"},event:{name:"ERC6909ContentURIEvent",type:"ERC6909ContentURIComponent::Event"},impls:[{name:"ERC6909ContentURIImpl",embed:!0,value:"ERC6909ContentURIComponent::ERC6909ContentURIImpl<ContractState>"},{name:"ERC6909ContentURIInternalImpl",embed:!1,value:"ERC6909ContentURIComponent::InternalImpl<ContractState>"}]},ERC6909TokenSupplyComponent:{path:"openzeppelin_token::erc6909::extensions",substorage:{name:"erc6909_token_supply",type:"ERC6909TokenSupplyComponent::Storage"},event:{name:"ERC6909TokenSupplyEvent",type:"ERC6909TokenSupplyComponent::Event"},impls:[{name:"ERC6909TokenSupplyImpl",embed:!0,value:"ERC6909TokenSupplyComponent::ERC6909TokenSupplyImpl<ContractState>"},{name:"ERC6909TokenSupplyInternalImpl",embed:!1,value:"ERC6909TokenSupplyComponent::InternalImpl<ContractState>"}]},ERC6909MetadataComponent:{path:"openzeppelin_token::erc6909::extensions",substorage:{name:"erc6909_metadata",type:"ERC6909MetadataComponent::Storage"},event:{name:"ERC6909MetadataEvent",type:"ERC6909MetadataComponent::Event"},impls:[{name:"ERC6909MetadataImpl",embed:!0,value:"ERC6909MetadataComponent::ERC6909MetadataImpl<ContractState>"},{name:"ERC6909MetadataInternalImpl",embed:!1,value:"ERC6909MetadataComponent::InternalImpl<ContractState>"}]}}),$b=bv({burn:{args:[vv(),{name:"account",type:"ContractAddress"},{name:"id",type:"u256"},{name:"amount",type:"u256"}],code:["let caller = get_caller_address();","if account != caller {"," assert(self.erc6909.is_operator(account, caller), ERC6909Component::Errors::INSUFFICIENT_ALLOWANCE)","}","self.erc6909.burn(account, id, amount);"]},mint:{args:[vv(),{name:"account",type:"ContractAddress"},{name:"id",type:"u256"},{name:"amount",type:"u256"}],code:["self.erc6909.mint(account, id, amount);"]}}),yb={name:"MyContract",pausable:!1,access:fv.access,upgradeable:fv.upgradeable,info:fv.info,macros:fv.macros};function _b(e){const t=function(e){return{...e,...gv(e),pausable:e.pausable??yb.pausable}}(e),n=new Fg(t.name,t.macros);return t.pausable&&yv(n,t.access),iv(n,t.access),wv(n,t.upgradeable,t.access),dv(n,t.info),n}const kb={name:"MyAccount",type:"stark",declare:!0,deploy:!0,pubkey:!0,outsideExecution:!0,upgradeable:mv.upgradeable,info:mv.info,macros:mv.macros};function xb(e){const t=function(e){return{...e,...hv(e),declare:e.declare??kb.declare,deploy:e.deploy??kb.deploy,pubkey:e.pubkey??kb.pubkey,outsideExecution:e.outsideExecution??kb.outsideExecution}}(e),n=new Fg(t.name,t.macros,!0);switch(t.type){case"stark":n.addConstructorArgument({name:"public_key",type:"felt252"}),n.addComponent(Ib.AccountComponent,[{lit:"public_key"}],!0);break;case"eth":n.addUseClause("openzeppelin_interfaces::accounts","EthPublicKey"),n.addConstructorArgument({name:"public_key",type:"EthPublicKey"}),n.addComponent(Ib.EthAccountComponent,[{lit:"public_key"}],!0)}return t.declare&&t.deploy&&t.pubkey?function(e,t){const n="stark"===t?"AccountMixinImpl":"EthAccountMixinImpl",[o,r]=wb(t);e.addImplToComponent(r,{name:`${n}`,value:`${o}::${n}<ContractState>`,embed:!0}),e.addInterfaceFlag("ISRC5"),Jg(e)}(n,t.type):(function(e,t){const[n,o]=wb(t);e.addImplToComponent(o,{name:"SRC6Impl",embed:!0,value:`${n}::SRC6Impl<ContractState>`}),e.addImplToComponent(o,{name:"SRC6CamelOnlyImpl",embed:!0,value:`${n}::SRC6CamelOnlyImpl<ContractState>`}),Jg(e)}(n,t.type),t.declare&&function(e,t){const[n,o]=wb(t);e.addImplToComponent(o,{name:"DeclarerImpl",embed:!0,value:`${n}::DeclarerImpl<ContractState>`})}(n,t.type),t.deploy&&function(e,t){const[n,o]=wb(t);e.addImplToComponent(o,{name:"DeployableImpl",embed:!0,value:`${n}::DeployableImpl<ContractState>`})}(n,t.type),t.pubkey&&function(e,t){const[n,o]=wb(t);e.addImplToComponent(o,{name:"PublicKeyImpl",embed:!0,value:`${n}::PublicKeyImpl<ContractState>`}),e.addImplToComponent(o,{name:"PublicKeyCamelImpl",embed:!0,value:`${n}::PublicKeyCamelImpl<ContractState>`})}(n,t.type)),t.outsideExecution&&function(e){e.addComponent(Ib.SRC9Component,[],!0)}(n),function(e,t,n){const o=xv(e,t);if(void 0!==o)switch(n){case"stark":e.addFunctionCodeBefore(o,Cv.upgrade,"self.account.assert_only_self()");break;case"eth":e.addFunctionCodeBefore(o,Cv.upgrade,"self.eth_account.assert_only_self()")}}(n,t.upgradeable,t.type),dv(n,t.info),n}function wb(e){const[t,n]="stark"===e?["AccountComponent",Ib.AccountComponent]:["EthAccountComponent",Ib.EthAccountComponent];return[t,n]}const Ib=Vg({AccountComponent:{path:"openzeppelin_account",substorage:{name:"account",type:"AccountComponent::Storage"},event:{name:"AccountEvent",type:"AccountComponent::Event"},impls:[{name:"AccountInternalImpl",embed:!1,value:"AccountComponent::InternalImpl<ContractState>"}]},EthAccountComponent:{path:"openzeppelin_account::eth_account",substorage:{name:"eth_account",type:"EthAccountComponent::Storage"},event:{name:"EthAccountEvent",type:"EthAccountComponent::Event"},impls:[{name:"EthAccountInternalImpl",embed:!1,value:"EthAccountComponent::InternalImpl<ContractState>"}]},SRC9Component:{path:"openzeppelin_account::extensions",substorage:{name:"src9",type:"SRC9Component::Storage"},event:{name:"SRC9Event",type:"SRC9Component::Event"},impls:[{name:"OutsideExecutionV2Impl",embed:!0,value:"SRC9Component::OutsideExecutionV2Impl<ContractState>"},{name:"OutsideExecutionInternalImpl",embed:!1,value:"SRC9Component::InternalImpl<ContractState>"}]}}),Cb="openzeppelin_governance::governor::extensions",Sb="Extensions (external)",Eb="Extensions (internal)",zb={name:"MyGovernor",delay:"1 day",period:"1 week",votes:"erc20votes",clockMode:"timestamp",timelock:"openzeppelin",decimals:18,proposalThreshold:"0",quorumMode:"percent",quorumPercent:4,quorumAbsolute:"",settings:!0,upgradeable:fv.upgradeable,appName:"OpenZeppelin Governor",appVersion:"v1",info:fv.info,macros:fv.macros};function Tb(e){const t=function(e){return{...e,...hv(e),delay:e.delay??zb.delay,period:e.period??zb.period,proposalThreshold:e.proposalThreshold||zb.proposalThreshold,decimals:e.decimals??zb.decimals,quorumPercent:e.quorumPercent??zb.quorumPercent,quorumAbsolute:e.quorumAbsolute??zb.quorumAbsolute,settings:e.settings??zb.settings,quorumMode:e.quorumMode??zb.quorumMode,votes:e.votes??zb.votes,clockMode:e.clockMode??zb.clockMode,timelock:e.timelock??zb.timelock,appName:e.appName??zb.appName,appVersion:e.appVersion??zb.appVersion}}(e),n=new Fg(t.name,t.macros);return function(e){if(!/^\d+$/.test(e.toString()))throw new Rg({decimals:"Not a valid number"})}(t.decimals),function(e){e.addUseClause("starknet","ContractAddress"),e.addUseClause("openzeppelin_governance::governor","DefaultConfig",{alias:"GovernorDefaultConfig"}),e.addConstructorArgument({name:"votes_token",type:"ContractAddress"}),e.addUseClause("openzeppelin_governance::governor::GovernorComponent","InternalTrait",{alias:"GovernorInternalTrait"}),e.addComponent(Db.GovernorComponent,[],!0)}(n),Jg(n,"SRC5"),Bg(n,t.appName,t.appVersion,"SNIP12 Metadata"),function(e){e.addComponent(Db.GovernorCountingSimpleComponent,[],!1)}(n),function(e,t){if("percent"===t.quorumMode){if(t.quorumPercent>100)throw new Rg({quorumPercent:"Invalid percentage"});!function(e,t){e.addConstant({name:"QUORUM_NUMERATOR",type:"u256",value:(10*t).toString(),comment:`${t}%`,inlineComment:!0}),e.addUseClause(`${Cb}::GovernorVotesQuorumFractionComponent`,"InternalTrait",{alias:"GovernorVotesQuorumFractionInternalTrait"}),e.addComponent(Db.GovernorVotesQuorumFractionComponent,[{lit:"votes_token"},{lit:"QUORUM_NUMERATOR"}],!0)}(e,t.quorumPercent)}else if("absolute"===t.quorumMode){if(!Ng(t.quorumAbsolute))throw new Rg({quorumAbsolute:"Not a valid number"});let n,o="";0===t.decimals||"erc721votes"===t.votes?n=`${t.quorumAbsolute}`:(n=""+BigInt(t.quorumAbsolute)*BigInt(10)**BigInt(t.decimals),n=qg(n,"quorumAbsolute","u256").toString(),o=`${t.quorumAbsolute} * pow!(10, ${t.decimals})`),function(e){e.addUseClause(`${Cb}::GovernorVotesComponent`,"InternalTrait",{alias:"GovernorVotesInternalTrait"}),e.addComponent(Db.GovernorVotesComponent,[{lit:"votes_token"}],!0)}(e),function(e,t,n){e.addConstant({name:"QUORUM",type:"u256",value:t,comment:n,inlineComment:!0});const o={name:"GovernorQuorum",of:"GovernorComponent::GovernorQuorumTrait<ContractState>",tags:[],section:"Locally implemented extensions",priority:1};e.addImplementedTrait(o),e.addFunction(o,{name:"quorum",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"},{name:"timepoint",type:"u64"}],returns:"u256",code:["QUORUM"]})}(e,n,o)}}(n,t),function(e,t){e.addConstant({name:"VOTING_DELAY",type:"u64",value:Ob(t).toString(),comment:t.delay,inlineComment:!0}),e.addConstant({name:"VOTING_PERIOD",type:"u64",value:Ub(t).toString(),comment:t.period,inlineComment:!0}),e.addConstant({name:"PROPOSAL_THRESHOLD",type:"u256",...Rb(t),inlineComment:!0}),t.settings?(e.addUseClause(`${Cb}::GovernorSettingsComponent`,"InternalTrait",{alias:"GovernorSettingsInternalTrait"}),e.addComponent(Db.GovernorSettingsComponent,[{lit:"VOTING_DELAY"},{lit:"VOTING_PERIOD"},{lit:"PROPOSAL_THRESHOLD"}],!0)):function(e){const t={name:"GovernorSettings",of:"GovernorComponent::GovernorSettingsTrait<ContractState>",tags:[],section:"Locally implemented extensions",priority:2};e.addImplementedTrait(t),e.addFunction(t,{name:"voting_delay",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u64",code:["VOTING_DELAY"]}),e.addFunction(t,{name:"voting_period",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u64",code:["VOTING_PERIOD"]}),e.addFunction(t,{name:"proposal_threshold",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u256",code:["PROPOSAL_THRESHOLD"]})}(e)}(n,t),function(e,{timelock:t}){!1===t?e.addComponent(Db.GovernorCoreExecutionComponent,[],!1):(e.addConstructorArgument({name:"timelock_controller",type:"ContractAddress"}),e.addUseClause(`${Cb}::GovernorTimelockExecutionComponent`,"InternalTrait",{alias:"GovernorTimelockExecutionInternalTrait"}),e.addComponent(Db.GovernorTimelockExecutionComponent,[{lit:"timelock_controller"}],!0))}(n,t),function(e,t){const n=xv(e,t);void 0!==n&&(e.addUseClause("openzeppelin_governance::governor::GovernorComponent","InternalExtendedImpl"),e.addFunctionCodeBefore(n,Cv.upgrade,"self.governor.assert_only_governance()"))}(n,t.upgradeable),dv(n,t.info),n}const Db=Vg({GovernorComponent:{path:"openzeppelin_governance::governor",substorage:{name:"governor",type:"GovernorComponent::Storage"},event:{name:"GovernorEvent",type:"GovernorComponent::Event"},impls:[{name:"GovernorImpl",embed:!0,value:"GovernorComponent::GovernorImpl<ContractState>",section:"Governor Core"}]},GovernorSettingsComponent:{path:Cb,substorage:{name:"governor_settings",type:"GovernorSettingsComponent::Storage"},event:{name:"GovernorSettingsEvent",type:"GovernorSettingsComponent::Event"},impls:[{name:"GovernorSettingsAdminImpl",embed:!0,value:"GovernorSettingsComponent::GovernorSettingsAdminImpl<ContractState>",section:Sb},{name:"GovernorSettingsImpl",embed:!1,value:"GovernorSettingsComponent::GovernorSettings<ContractState>",section:Eb}]},GovernorVotesComponent:{path:Cb,substorage:{name:"governor_votes",type:"GovernorVotesComponent::Storage"},event:{name:"GovernorVotesEvent",type:"GovernorVotesComponent::Event"},impls:[{name:"VotesTokenImpl",embed:!0,value:"GovernorVotesComponent::VotesTokenImpl<ContractState>",section:Sb},{name:"GovernorVotesImpl",embed:!1,value:"GovernorVotesComponent::GovernorVotes<ContractState>",section:Eb}]},GovernorVotesQuorumFractionComponent:{path:Cb,substorage:{name:"governor_votes_quorum_fraction",type:"GovernorVotesQuorumFractionComponent::Storage"},event:{name:"GovernorVotesEvent",type:"GovernorVotesQuorumFractionComponent::Event"},impls:[{name:"GovernorQuorumImpl",embed:!1,value:"GovernorVotesQuorumFractionComponent::GovernorQuorum<ContractState>",section:Eb},{name:"GovernorVotesImpl",embed:!1,value:"GovernorVotesQuorumFractionComponent::GovernorVotes<ContractState>",section:Eb},{name:"QuorumFractionImpl",embed:!0,value:"GovernorVotesQuorumFractionComponent::QuorumFractionImpl<ContractState>",section:Sb}]},GovernorCountingSimpleComponent:{path:Cb,substorage:{name:"governor_counting_simple",type:"GovernorCountingSimpleComponent::Storage"},event:{name:"GovernorCountingSimpleEvent",type:"GovernorCountingSimpleComponent::Event"},impls:[{name:"GovernorCountingSimpleImpl",embed:!1,value:"GovernorCountingSimpleComponent::GovernorCounting<ContractState>",section:Eb}]},GovernorCoreExecutionComponent:{path:Cb,substorage:{name:"governor_core_execution",type:"GovernorCoreExecutionComponent::Storage"},event:{name:"GovernorCoreExecutionEvent",type:"GovernorCoreExecutionComponent::Event"},impls:[{name:"GovernorCoreExecutionImpl",embed:!1,value:"GovernorCoreExecutionComponent::GovernorExecution<ContractState>",section:Eb}]},GovernorTimelockExecutionComponent:{path:Cb,substorage:{name:"governor_timelock_execution",type:"GovernorTimelockExecutionComponent::Storage"},event:{name:"GovernorTimelockExecutionEvent",type:"GovernorTimelockExecutionComponent::Event"},impls:[{name:"TimelockedImpl",embed:!0,value:"GovernorTimelockExecutionComponent::TimelockedImpl<ContractState>",section:Sb},{name:"GovernorTimelockExecutionImpl",embed:!1,value:"GovernorTimelockExecutionComponent::GovernorExecution<ContractState>",section:Eb}]}});function Ob(e){try{if("timestamp"===e.clockMode)return Qg(e.delay);throw new Error("Invalid clock mode")}catch(e){throw e instanceof Error?new Rg({delay:e.message}):e}}function Ub(e){try{if("timestamp"===e.clockMode)return Qg(e.period);throw new Error("Invalid clock mode")}catch(e){throw e instanceof Error?new Rg({period:e.message}):e}}function Rb({proposalThreshold:e,decimals:t,votes:n}){if(!/^\d+$/.test(e))throw new Rg({proposalThreshold:"Not a valid number"});if(/^0+$/.test(e)||0===t||"erc721votes"===n)return{value:e};{let n=""+BigInt(e)*BigInt(10)**BigInt(t);return n=qg(n,"proposalThreshold","u256").toString(),{value:`${n}`,comment:`${e} * pow!(10, ${t})`}}}const Ab={name:"MyMultisig",quorum:"2",upgradeable:fv.upgradeable,info:fv.info,macros:fv.macros};function Nb(e){const t=function(e){return{...e,...hv(e),quorum:e.quorum??Ab.quorum}}(e),n=new Fg(t.name,t.macros);return function(e,t){e.addUseClause("starknet","ContractAddress");const n=function(e){const t=e.quorum;if(!Ng(t))throw new Rg({quorum:"Not a valid number"});const n=qg(t,"quorum","u32");if(n===BigInt(0))throw new Rg({quorum:"Quorum cannot be 0"});return n}(t);e.addConstant({name:"INITIAL_QUORUM",type:"u32",value:n.toString()}),e.addConstructorArgument({name:"signers",type:"Span<ContractAddress>"});const o=[{lit:"INITIAL_QUORUM"},{lit:"signers"}];e.addComponent(jb.MultisigComponent,o,!0)}(n,t),dv(n,t.info),function(e,t){const n=xv(e,t);void 0!==n&&e.addFunctionCodeBefore(n,Cv.upgrade,"self.multisig.assert_only_self()")}(n,t.upgradeable),iv(n,ev()),n}const jb=Vg({MultisigComponent:{path:"openzeppelin_governance::multisig",substorage:{name:"multisig",type:"MultisigComponent::Storage"},event:{name:"MultisigEvent",type:"MultisigComponent::Event"},impls:[{name:"MultisigImpl",embed:!0,value:"MultisigComponent::MultisigImpl<ContractState>"},{name:"MultisigInternalImpl",embed:!1,value:"MultisigComponent::InternalImpl<ContractState>"}]}}),Pb={name:"MyVesting",startDate:"",duration:"0 day",cliffDuration:"0 day",schedule:"custom",info:fv.info,macros:fv.macros};function Mb(e){const t=function(e){return{name:e.name??Pb.name,startDate:e.startDate??Pb.startDate,duration:e.duration??Pb.duration,cliffDuration:e.cliffDuration??Pb.cliffDuration,schedule:e.schedule??Pb.schedule,info:e.info??Pb.info,macros:e.macros??Pb.macros}}(e),n=new Fg(t.name,t.macros);!function(e,t){e.addUseClause("starknet","ContractAddress");const n=function(e){if(""===e.startDate||"NaN"===e.startDate)return;const t=new Date(`${e.startDate}Z`),n=t.getTime(),o=qg(Math.floor(n/1e3),"startDate","u64"),r=t.toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:"UTC"});return{timestampInSec:o,formattedDate:`${r} (UTC)`}}(t),o=function(e){try{return Qg(e.duration)}catch(e){throw e instanceof Error?new Rg({duration:e.message}):e}}(t),r=function(e){try{return Qg(e.cliffDuration)}catch(e){throw e instanceof Error?new Rg({cliffDuration:e.message}):e}}(t);(function(e,t){if(Lg(e,"duration","u64"),Lg(t,"cliffDuration","u64"),t>e)throw new Rg({cliffDuration:"Cliff duration must be less than or equal to the total duration"})})(o,r),void 0!==n?e.addConstant({name:"START",type:"u64",value:n.timestampInSec.toString(),comment:n.formattedDate,inlineComment:!0}):e.addConstant({name:"START",type:"u64",value:"0"});e.addConstant({name:"DURATION",type:"u64",value:o.toString(),comment:t.duration,inlineComment:!0}),e.addConstant({name:"CLIFF_DURATION",type:"u64",value:r.toString(),comment:t.cliffDuration,inlineComment:!0});const i=[{lit:"START"},{lit:"DURATION"},{lit:"CLIFF_DURATION"}];e.addComponent(Zb.VestingComponent,i,!0)}(n,t),function(e,t){switch(t.schedule){case"linear":return void e.addUseClause("openzeppelin_finance::vesting","LinearVestingSchedule");case"custom":{const t={name:"VestingSchedule",of:"VestingComponent::VestingScheduleTrait<ContractState>",tags:[],priority:0};e.addImplementedTrait(t),e.addFunction(t,{name:"calculate_vested_amount",returns:"u256",args:[{name:"self",type:"@VestingComponent::ComponentState<ContractState>"},{name:"token",type:"ContractAddress"},{name:"total_allocation",type:"u256"},{name:"timestamp",type:"u64"},{name:"start",type:"u64"},{name:"duration",type:"u64"},{name:"cliff",type:"u64"}],code:["// TODO: Must be implemented according to the desired vesting schedule","0"]})}}}(n,t),dv(n,t.info);const o=tv();return iv(n,o),wv(n,!1,o),n}const Zb=Vg({VestingComponent:{path:"openzeppelin_finance::vesting",substorage:{name:"vesting",type:"VestingComponent::Storage"},event:{name:"VestingEvent",type:"VestingComponent::Event"},impls:[{name:"VestingImpl",embed:!0,value:"VestingComponent::VestingImpl<ContractState>"},{name:"VestingInternalImpl",embed:!1,value:"VestingComponent::InternalImpl<ContractState>"}]}});const qb={print:function(e=Xv){return Uv(Qv(e))},defaults:Xv,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable}},Lb={print:function(e=sb){return Uv(cb(e))},defaults:sb,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable||!0===e.royaltyInfo?.enabled||!0===e.uriStorage}},Fb={print:function(e=db){return Uv(pb(e))},defaults:db,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!1!==e.updatableUri||!0===e.uriStorage||!0===e.upgradeable||!0===e.royaltyInfo?.enabled}},Vb={print:function(e=gb){return Uv(vb(e))},defaults:gb,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable||!0===e.contentUri||!0===e.metadata}},Hb={defaults:kb},Jb={defaults:Ab},Gb={defaults:zb},Bb={defaults:Pb},Wb={print:function(e=yb){return Uv(_b(e))},defaults:yb,isAccessControlRequired:function(e){return!0===e.pausable||!0===e.upgradeable}};function Kb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xb,Qb;function Yb(){if(Qb)return Xb;function e(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n],r=typeof o;"object"!==r&&"function"!==r||Object.isFrozen(o)||e(o)}),t}Qb=1;class t{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach(function(e){for(const t in e)n[t]=e[t]}),n}const r=e=>!!e.scope;class i{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=n(e)}openNode(e){if(!r(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${"_".repeat(t+1)}`)].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){r(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class s{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=a({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{s._collapse(e)}))}}class c extends s{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new i(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function l(e){return e?"string"==typeof e?e:e.source:null}function u(e){return m("(?=",e,")")}function d(e){return m("(?:",e,")*")}function p(e){return m("(?:",e,")?")}function m(...e){return e.map(e=>l(e)).join("")}function f(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>l(e)).join("|")+")"}function h(e){return new RegExp(e.toString()+"|").exec("").length-1}const g=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function v(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let o=l(e),r="";for(;o.length>0;){const e=g.exec(o);if(!e){r+=o;break}r+=o.substring(0,e.index),o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const b="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",k="\\b(0b[01]+)",x={begin:"\\\\[\\s\\S]",relevance:0},w={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[x]},I={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[x]},C=function(e,t,n={}){const r=o({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:m(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},S=C("//","$"),E=C("/\\*","\\*/"),z=C("#","$"),T={scope:"number",begin:y,relevance:0},D={scope:"number",begin:_,relevance:0},O={scope:"number",begin:k,relevance:0},U={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[x,{begin:/\[/,end:/\]/,relevance:0,contains:[x]}]},R={scope:"title",begin:b,relevance:0},A={scope:"title",begin:$,relevance:0},N={begin:"\\.\\s*"+$,relevance:0};var j=Object.freeze({__proto__:null,APOS_STRING_MODE:w,BACKSLASH_ESCAPE:x,BINARY_NUMBER_MODE:O,BINARY_NUMBER_RE:k,COMMENT:C,C_BLOCK_COMMENT_MODE:E,C_LINE_COMMENT_MODE:S,C_NUMBER_MODE:D,C_NUMBER_RE:_,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:b,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:N,NUMBER_MODE:T,NUMBER_RE:y,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:I,REGEXP_MODE:U,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=m(t,/.*\b/,e.binary,/\b.*/)),o({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:R,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:A});function P(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function M(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Z(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=P,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function q(e,t){Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function L(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,t){void 0===e.relevance&&(e.relevance=1)}const V=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=m(n.beforeMatch,u(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},H=["of","and","for","in","not","or","if","then","parent","list","value"];function J(e,t,n="keyword"){const o=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(n){Object.assign(o,J(e[n],t,n))}),o;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){const n=t.split("|");o[n[0]]=[e,G(n[0],n[1])]})}}function G(e,t){return t?Number(t):function(e){return H.includes(e.toLowerCase())}(e)?0:1}const B={},W=e=>{console.error(e)},K=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{B[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),B[`${e}/${t}`]=!0)},Q=new Error;function Y(e,t,{key:n}){let o=0;const r=e[n],i={},a={};for(let e=1;e<=t.length;e++)a[e+o]=r[e],i[e+o]=!0,o+=h(t[e-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function ee(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw W("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Q;if("object"!=typeof e.beginScope||null===e.beginScope)throw W("beginScope must be object"),Q;Y(e,e.begin,{key:"beginScope"}),e.begin=v(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw W("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Q;if("object"!=typeof e.endScope||null===e.endScope)throw W("endScope must be object"),Q;Y(e,e.end,{key:"endScope"}),e.end=v(e.end,{joinWith:""})}}(e)}function te(e){function t(t,n){return new RegExp(l(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=h(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(v(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),o=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,o)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=o(e.classNameAliases||{}),function n(i,a){const s=i;if(i.isCompiled)return s;[M,L,ee,V].forEach(e=>e(i,a)),e.compilerExtensions.forEach(e=>e(i,a)),i.__beforeBegin=null,[Z,q,F].forEach(e=>e(i,a)),i.isCompiled=!0;let c=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),c=i.keywords.$pattern,delete i.keywords.$pattern),c=c||/\w+/,i.keywords&&(i.keywords=J(i.keywords,e.case_insensitive)),s.keywordPatternRe=t(c,!0),a&&(i.begin||(i.begin=/\B|\b/),s.beginRe=t(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=t(s.end)),s.terminatorEnd=l(s.end)||"",i.endsWithParent&&a.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+a.terminatorEnd)),i.illegal&&(s.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return o(e,{variants:null},t)}));if(e.cachedVariants)return e.cachedVariants;if(ne(e))return o(e,{starts:e.starts?o(e.starts):null});if(Object.isFrozen(e))return o(e);return e}("self"===e?i:e)})),i.contains.forEach(function(e){n(e,s)}),i.starts&&n(i.starts,a),s.matcher=function(e){const t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function ne(e){return!!e&&(e.endsWithParent||ne(e.starts))}class oe extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const re=n,ie=o,ae=Symbol("nomatch"),se=function(n){const o=Object.create(null),r=Object.create(null),i=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let h={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function g(e){return h.noHighlightRe.test(e)}function v(e,t,n){let o="",r="";"object"==typeof t?(o=e,n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."),X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,o=t),void 0===n&&(n=!0);const i={code:o,language:r};C("before:highlight",i);const a=i.result?i.result:b(i.language,i.code,n);return a.code=i.code,C("after:highlight",a),a}function b(e,n,r,i){const c=Object.create(null);function l(e,t){return e.keywords[t]}function u(){if(!S.keywords)return void z.addText(T);let e=0;S.keywordPatternRe.lastIndex=0;let t=S.keywordPatternRe.exec(T),n="";for(;t;){n+=T.substring(e,t.index);const o=w.case_insensitive?t[0].toLowerCase():t[0],r=l(S,o);if(r){const[e,i]=r;if(z.addText(n),n="",c[o]=(c[o]||0)+1,c[o]<=7&&(D+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=S.keywordPatternRe.lastIndex,t=S.keywordPatternRe.exec(T)}n+=T.substring(e),z.addText(n)}function d(){null!=S.subLanguage?function(){if(""===T)return;let e=null;if("string"==typeof S.subLanguage){if(!o[S.subLanguage])return void z.addText(T);e=b(S.subLanguage,T,!0,E[S.subLanguage]),E[S.subLanguage]=e._top}else e=$(T,S.subLanguage.length?S.subLanguage:null);S.relevance>0&&(D+=e.relevance),z.__addSublanguage(e._emitter,e.language)}():u(),T=""}function p(e,t){""!==e&&(z.startScope(t),z.addText(e),z.endScope())}function m(e,t){let n=1;const o=t.length-1;for(;n<=o;){if(!e._emit[n]){n++;continue}const o=w.classNameAliases[e[n]]||e[n],r=t[n];o?p(r,o):(T=r,u(),T=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&z.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(T,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),T=""):e.beginScope._multi&&(m(e.beginScope,t),T="")),S=Object.create(e,{parent:{value:S}}),S}function g(e,n,o){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,o);if(r){if(e["on:end"]){const o=new t(e);e["on:end"](n,o),o.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,n,o)}function v(e){return 0===S.matcher.regexIndex?(T+=e[0],1):(R=!0,0)}function y(e){const t=e[0],o=n.substring(e.index),r=g(S,e,o);if(!r)return ae;const i=S;S.endScope&&S.endScope._wrap?(d(),p(t,S.endScope._wrap)):S.endScope&&S.endScope._multi?(d(),m(S.endScope,e)):i.skip?T+=t:(i.returnEnd||i.excludeEnd||(T+=t),d(),i.excludeEnd&&(T=t));do{S.scope&&z.closeNode(),S.skip||S.subLanguage||(D+=S.relevance),S=S.parent}while(S!==r.parent);return r.starts&&f(r.starts,e),i.returnEnd?0:t.length}let _={};function k(o,i){const s=i&&i[0];if(T+=o,null==s)return d(),0;if("begin"===_.type&&"end"===i.type&&_.index===i.index&&""===s){if(T+=n.slice(i.index,i.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=_.rule,t}return 1}if(_=i,"begin"===i.type)return function(e){const n=e[0],o=e.rule,r=new t(o),i=[o.__beforeBegin,o["on:begin"]];for(const t of i)if(t&&(t(e,r),r.isMatchIgnored))return v(n);return o.skip?T+=n:(o.excludeBegin&&(T+=n),d(),o.returnBegin||o.excludeBegin||(T=n)),f(o,e),o.returnBegin?0:n.length}(i);if("illegal"===i.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(S.scope||"<unnamed>")+'"');throw e.mode=S,e}if("end"===i.type){const e=y(i);if(e!==ae)return e}if("illegal"===i.type&&""===s)return T+="\n",1;if(U>1e5&&U>3*i.index){throw new Error("potential infinite loop, way more iterations than matches")}return T+=s,s.length}const w=x(e);if(!w)throw W(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const I=te(w);let C="",S=i||I;const E={},z=new h.__emitter(h);!function(){const e=[];for(let t=S;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>z.openNode(e))}();let T="",D=0,O=0,U=0,R=!1;try{if(w.__emitTokens)w.__emitTokens(n,z);else{for(S.matcher.considerAll();;){U++,R?R=!1:S.matcher.considerAll(),S.matcher.lastIndex=O;const e=S.matcher.exec(n);if(!e)break;const t=k(n.substring(O,e.index),e);O=e.index+t}k(n.substring(O))}return z.finalize(),C=z.toHTML(),{language:e,value:C,relevance:D,illegal:!1,_emitter:z,_top:S}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:re(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:O,context:n.slice(O-100,O+100),mode:t.mode,resultSoFar:C},_emitter:z};if(a)return{language:e,value:re(n),illegal:!1,relevance:0,errorRaised:t,_emitter:z,_top:S};throw t}}function $(e,t){t=t||h.languages||Object.keys(o);const n=function(e){const t={value:re(e),illegal:!1,relevance:0,_top:l,_emitter:new h.__emitter(h)};return t._emitter.addText(e),t}(e),r=t.filter(x).filter(I).map(t=>b(t,e,!1));r.unshift(n);const i=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(x(e.language).supersetOf===t.language)return 1;if(x(t.language).supersetOf===e.language)return-1}return 0}),[a,s]=i,c=a;return c.secondBest=s,c}function y(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=h.languageDetectRe.exec(t);if(n){const t=x(n[1]);return t||(K(s.replace("{}",n[1])),K("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>g(e)||x(e))}(e);if(g(n))return;if(C("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(h.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),h.throwUnescapedHTML)){throw new oe("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,i=n?v(o,{language:n,ignoreIllegals:!0}):$(o);e.innerHTML=i.value,e.dataset.highlighted="yes",function(e,t,n){const o=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),C("after:highlightElement",{el:e,result:i,text:o})}let _=!1;function k(){if("loading"===document.readyState)return _||window.addEventListener("DOMContentLoaded",function(){k()},!1),void(_=!0);document.querySelectorAll(h.cssSelector).forEach(y)}function x(e){return e=(e||"").toLowerCase(),o[e]||o[r[e]]}function w(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{r[e.toLowerCase()]=t})}function I(e){const t=x(e);return t&&!t.disableAutodetect}function C(e,t){const n=e;i.forEach(function(e){e[n]&&e[n](t)})}Object.assign(n,{highlight:v,highlightAuto:$,highlightAll:k,highlightElement:y,highlightBlock:function(e){return X("10.7.0","highlightBlock will be removed entirely in v12.0"),X("10.7.0","Please use highlightElement now."),y(e)},configure:function(e){h=ie(h,e)},initHighlighting:()=>{k(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){k(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,t){let r=null;try{r=t(n)}catch(t){if(W("Language definition for '{}' could not be registered.".replace("{}",e)),!a)throw t;W(t),r=l}r.name||(r.name=e),o[e]=r,r.rawDefinition=t.bind(null,n),r.aliases&&w(r.aliases,{languageName:e})},unregisterLanguage:function(e){delete o[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(o)},getLanguage:x,registerAliases:w,autoDetection:I,inherit:ie,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),i.push(e)},removePlugin:function(e){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}),n.debugMode=function(){a=!1},n.safeMode=function(){a=!0},n.versionString="11.11.1",n.regex={concat:m,lookahead:u,either:f,optional:p,anyNumberOfTimes:d};for(const t in j)"object"==typeof j[t]&&e(j[t]);return Object.assign(n,j),n},ce=se({});return ce.newInstance=()=>se({}),Xb=ce,ce.HighlightJS=ce,ce.default=ce,Xb}var e$,t$,n$,o$,r$,i$=Kb(Yb()),a$={exports:{}};function s$(){return t$?e$:(t$=1,e$=function(e){var t="([ui](8|16|32|64|128|size)|f(32|64))?",n="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{aliases:["rs"],keywords:{keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:n},lexemes:e.IDENT_RE+"!?",illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+t}],relevance:0},{className:"function",beginKeywords:"fn",end:"(\\(|<)",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"meta",begin:"#\\!?\\[",end:"\\]",contains:[{className:"meta-string",begin:/"/,end:/"/}]},{className:"class",beginKeywords:"type",end:";",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"\\S"},{className:"class",beginKeywords:"trait enum struct union",end:"{",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"[\\w\\d]"},{begin:e.IDENT_RE+"::",keywords:{built_in:n}},{begin:"->"}]}})}var c$=function(){if(r$)return a$.exports;r$=1;const e=function(){if(o$)return n$;o$=1;const e=s$();return n$=function(t){const n=e(t);if("object"!=typeof n.keywords)throw Error("Expected object");const o={keyword:["break","const","continue","else","enum","false","for","fn","hint","if","impl","in","match","pub","return","struct","trait","true","type","use","as","assert","do","dyn","extern","let","macro","mod","move","ref","static_assert","static","super","try","typeof","unsafe","where","while","with","yield"].join(" "),literal:["true","false"].join(" "),type:["bool","u8","u16","u32","u64","u128","u256","usize"].join(" ")};return Object.assign(n.keywords,o),Object.assign(n.contains,[...n.contains,{className:"built_in",begin:"selector!"},{className:"built_in",begin:"component!"},{className:"class",beginKeywords:"mod",end:"{",contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{endsParent:!0})]},{className:"class",beginKeywords:"impl",end:";",contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{endsParent:!0})]},{beginKeywords:"let",end:";",contains:[t.inherit({className:"variable",begin:t.UNDERSCORE_IDENT_RE,relevance:0},{endsParent:!0})]}]),Object.assign(n,{name:"Cairo",aliases:["cairo"]}),n}}();return a$.exports=function(t){t.registerLanguage("cairo",e)},a$.exports.cairo=e,a$.exports}();Kb(c$)(i$);const l$={AccountComponent:"account",UpgradeableComponent:"upgradeable"};var u$="top",d$="bottom",p$="right",m$="left",f$="auto",h$=[u$,d$,p$,m$],g$="start",v$="end",b$="viewport",$$="popper",y$=h$.reduce(function(e,t){return e.concat([t+"-"+g$,t+"-"+v$])},[]),_$=[].concat(h$,[f$]).reduce(function(e,t){return e.concat([t,t+"-"+g$,t+"-"+v$])},[]),k$=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function x$(e){return e?(e.nodeName||"").toLowerCase():null}function w$(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function I$(e){return e instanceof w$(e).Element||e instanceof Element}function C$(e){return e instanceof w$(e).HTMLElement||e instanceof HTMLElement}function S$(e){return"undefined"!=typeof ShadowRoot&&(e instanceof w$(e).ShadowRoot||e instanceof ShadowRoot)}var E$={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];C$(r)&&x$(r)&&(Object.assign(r.style,n),Object.keys(o).forEach(function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});C$(o)&&x$(o)&&(Object.assign(o.style,i),Object.keys(r).forEach(function(e){o.removeAttribute(e)}))})}},requires:["computeStyles"]};function z$(e){return e.split("-")[0]}var T$=Math.max,D$=Math.min,O$=Math.round;function U$(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function R$(){return!/^((?!chrome|android).)*safari/i.test(U$())}function A$(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&C$(e)&&(r=e.offsetWidth>0&&O$(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&O$(o.height)/e.offsetHeight||1);var a=(I$(e)?w$(e):window).visualViewport,s=!R$()&&n,c=(o.left+(s&&a?a.offsetLeft:0))/r,l=(o.top+(s&&a?a.offsetTop:0))/i,u=o.width/r,d=o.height/i;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function N$(e){var t=A$(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function j$(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&S$(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function P$(e){return w$(e).getComputedStyle(e)}function M$(e){return["table","td","th"].indexOf(x$(e))>=0}function Z$(e){return((I$(e)?e.ownerDocument:e.document)||window.document).documentElement}function q$(e){return"html"===x$(e)?e:e.assignedSlot||e.parentNode||(S$(e)?e.host:null)||Z$(e)}function L$(e){return C$(e)&&"fixed"!==P$(e).position?e.offsetParent:null}function F$(e){for(var t=w$(e),n=L$(e);n&&M$(n)&&"static"===P$(n).position;)n=L$(n);return n&&("html"===x$(n)||"body"===x$(n)&&"static"===P$(n).position)?t:n||function(e){var t=/firefox/i.test(U$());if(/Trident/i.test(U$())&&C$(e)&&"fixed"===P$(e).position)return null;var n=q$(e);for(S$(n)&&(n=n.host);C$(n)&&["html","body"].indexOf(x$(n))<0;){var o=P$(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function V$(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function H$(e,t,n){return T$(e,D$(t,n))}function J$(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G$(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var B$={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=z$(n.placement),c=V$(s),l=[m$,p$].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return J$("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G$(e,h$))}(r.padding,n),d=N$(i),p="y"===c?u$:m$,m="y"===c?d$:p$,f=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],h=a[c]-n.rects.reference[c],g=F$(i),v=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,b=f/2-h/2,$=u[p],y=v-d[l]-u[m],_=v/2-d[l]/2+b,k=H$($,_,y),x=c;n.modifiersData[o]=((t={})[x]=k,t.centerOffset=k-_,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&j$(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function W$(e){return e.split("-")[1]}var K$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function X$(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,m=void 0===p?0:p,f=a.y,h=void 0===f?0:f,g="function"==typeof u?u({x:m,y:h}):{x:m,y:h};m=g.x,h=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),$=m$,y=u$,_=window;if(l){var k=F$(n),x="clientHeight",w="clientWidth";if(k===w$(n)&&"static"!==P$(k=Z$(n)).position&&"absolute"===s&&(x="scrollHeight",w="scrollWidth"),r===u$||(r===m$||r===p$)&&i===v$)y=d$,h-=(d&&k===_&&_.visualViewport?_.visualViewport.height:k[x])-o.height,h*=c?1:-1;if(r===m$||(r===u$||r===d$)&&i===v$)$=p$,m-=(d&&k===_&&_.visualViewport?_.visualViewport.width:k[w])-o.width,m*=c?1:-1}var I,C=Object.assign({position:s},l&&K$),S=!0===u?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:O$(n*r)/r||0,y:O$(o*r)/r||0}}({x:m,y:h},w$(n)):{x:m,y:h};return m=S.x,h=S.y,c?Object.assign({},C,((I={})[y]=b?"0":"",I[$]=v?"0":"",I.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+h+"px)":"translate3d("+m+"px, "+h+"px, 0)",I)):Object.assign({},C,((t={})[y]=b?h+"px":"",t[$]=v?m+"px":"",t.transform="",t))}var Q$={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,l={placement:z$(t.placement),variation:W$(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,X$(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,X$(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Y$={passive:!0};var ey={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,a=o.resize,s=void 0===a||a,c=w$(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach(function(e){e.addEventListener("scroll",n.update,Y$)}),s&&c.addEventListener("resize",n.update,Y$),function(){i&&l.forEach(function(e){e.removeEventListener("scroll",n.update,Y$)}),s&&c.removeEventListener("resize",n.update,Y$)}},data:{}},ty={left:"right",right:"left",bottom:"top",top:"bottom"};function ny(e){return e.replace(/left|right|bottom|top/g,function(e){return ty[e]})}var oy={start:"end",end:"start"};function ry(e){return e.replace(/start|end/g,function(e){return oy[e]})}function iy(e){var t=w$(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ay(e){return A$(Z$(e)).left+iy(e).scrollLeft}function sy(e){var t=P$(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function cy(e){return["html","body","#document"].indexOf(x$(e))>=0?e.ownerDocument.body:C$(e)&&sy(e)?e:cy(q$(e))}function ly(e,t){var n;void 0===t&&(t=[]);var o=cy(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=w$(o),a=r?[i].concat(i.visualViewport||[],sy(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(ly(q$(a)))}function uy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function dy(e,t,n){return t===b$?uy(function(e,t){var n=w$(e),o=Z$(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,c=0;if(r){i=r.width,a=r.height;var l=R$();(l||!l&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:i,height:a,x:s+ay(e),y:c}}(e,n)):I$(t)?function(e,t){var n=A$(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):uy(function(e){var t,n=Z$(e),o=iy(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=T$(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=T$(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+ay(e),c=-o.scrollTop;return"rtl"===P$(r||n).direction&&(s+=T$(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(Z$(e)))}function py(e,t,n,o){var r="clippingParents"===t?function(e){var t=ly(q$(e)),n=["absolute","fixed"].indexOf(P$(e).position)>=0&&C$(e)?F$(e):e;return I$(n)?t.filter(function(e){return I$(e)&&j$(e,n)&&"body"!==x$(e)}):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],s=i.reduce(function(t,n){var r=dy(e,n,o);return t.top=T$(r.top,t.top),t.right=D$(r.right,t.right),t.bottom=D$(r.bottom,t.bottom),t.left=T$(r.left,t.left),t},dy(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function my(e){var t,n=e.reference,o=e.element,r=e.placement,i=r?z$(r):null,a=r?W$(r):null,s=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2;switch(i){case u$:t={x:s,y:n.y-o.height};break;case d$:t={x:s,y:n.y+n.height};break;case p$:t={x:n.x+n.width,y:c};break;case m$:t={x:n.x-o.width,y:c};break;default:t={x:n.x,y:n.y}}var l=i?V$(i):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case g$:t[l]=t[l]-(n[u]/2-o[u]/2);break;case v$:t[l]=t[l]+(n[u]/2-o[u]/2)}}return t}function fy(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=void 0===o?e.placement:o,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,c=void 0===s?"clippingParents":s,l=n.rootBoundary,u=void 0===l?b$:l,d=n.elementContext,p=void 0===d?$$:d,m=n.altBoundary,f=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,v=J$("number"!=typeof g?g:G$(g,h$)),b=p===$$?"reference":$$,$=e.rects.popper,y=e.elements[f?b:p],_=py(I$(y)?y:y.contextElement||Z$(e.elements.popper),c,u,a),k=A$(e.elements.reference),x=my({reference:k,element:$,placement:r}),w=uy(Object.assign({},$,x)),I=p===$$?w:k,C={top:_.top-I.top+v.top,bottom:I.bottom-_.bottom+v.bottom,left:_.left-I.left+v.left,right:I.right-_.right+v.right},S=e.modifiersData.offset;if(p===$$&&S){var E=S[r];Object.keys(C).forEach(function(e){var t=[p$,d$].indexOf(e)>=0?1:-1,n=[u$,d$].indexOf(e)>=0?"y":"x";C[e]+=E[n]*t})}return C}function hy(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?_$:c,u=W$(o),d=u?s?y$:y$.filter(function(e){return W$(e)===u}):h$,p=d.filter(function(e){return l.indexOf(e)>=0});0===p.length&&(p=d);var m=p.reduce(function(t,n){return t[n]=fy(e,{placement:n,boundary:r,rootBoundary:i,padding:a})[z$(n)],t},{});return Object.keys(m).sort(function(e,t){return m[e]-m[t]})}var gy={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=void 0===m||m,h=n.allowedAutoPlacements,g=t.options.placement,v=z$(g),b=c||(v===g||!f?[ny(g)]:function(e){if(z$(e)===f$)return[];var t=ny(e);return[ry(e),t,ry(t)]}(g)),$=[g].concat(b).reduce(function(e,n){return e.concat(z$(n)===f$?hy(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:f,allowedAutoPlacements:h}):n)},[]),y=t.rects.reference,_=t.rects.popper,k=new Map,x=!0,w=$[0],I=0;I<$.length;I++){var C=$[I],S=z$(C),E=W$(C)===g$,z=[u$,d$].indexOf(S)>=0,T=z?"width":"height",D=fy(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:p,padding:l}),O=z?E?p$:m$:E?d$:u$;y[T]>_[T]&&(O=ny(O));var U=ny(O),R=[];if(i&&R.push(D[S]<=0),s&&R.push(D[O]<=0,D[U]<=0),R.every(function(e){return e})){w=C,x=!1;break}k.set(C,R)}if(x)for(var A=function(e){var t=$.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,"break"},N=f?3:1;N>0;N--){if("break"===A(N))break}t.placement!==w&&(t.modifiersData[o]._skip=!0,t.placement=w,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function vy(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function by(e){return[u$,p$,d$,m$].some(function(t){return e[t]>=0})}var $y={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=void 0===r?[0,0]:r,a=_$.reduce(function(e,n){return e[n]=function(e,t,n){var o=z$(e),r=[m$,u$].indexOf(o)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*r,[m$,p$].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=a}};var yy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,f=n.tetherOffset,h=void 0===f?0:f,g=fy(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),v=z$(t.placement),b=W$(t.placement),$=!b,y=V$(v),_="x"===y?"y":"x",k=t.modifiersData.popperOffsets,x=t.rects.reference,w=t.rects.popper,I="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,C="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(k){if(i){var z,T="y"===y?u$:m$,D="y"===y?d$:p$,O="y"===y?"height":"width",U=k[y],R=U+g[T],A=U-g[D],N=m?-w[O]/2:0,j=b===g$?x[O]:w[O],P=b===g$?-w[O]:-x[O],M=t.elements.arrow,Z=m&&M?N$(M):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},L=q[T],F=q[D],V=H$(0,x[O],Z[O]),H=$?x[O]/2-N-V-L-C.mainAxis:j-V-L-C.mainAxis,J=$?-x[O]/2+N+V+F+C.mainAxis:P+V+F+C.mainAxis,G=t.elements.arrow&&F$(t.elements.arrow),B=G?"y"===y?G.clientTop||0:G.clientLeft||0:0,W=null!=(z=null==S?void 0:S[y])?z:0,K=U+J-W,X=H$(m?D$(R,U+H-W-B):R,U,m?T$(A,K):A);k[y]=X,E[y]=X-U}if(s){var Q,Y="x"===y?u$:m$,ee="x"===y?d$:p$,te=k[_],ne="y"===_?"height":"width",oe=te+g[Y],re=te-g[ee],ie=-1!==[u$,m$].indexOf(v),ae=null!=(Q=null==S?void 0:S[_])?Q:0,se=ie?oe:te-x[ne]-w[ne]-ae+C.altAxis,ce=ie?te+x[ne]+w[ne]-ae-C.altAxis:re,le=m&&ie?function(e,t,n){var o=H$(e,t,n);return o>n?n:o}(se,te,ce):H$(m?se:oe,te,m?ce:re);k[_]=le,E[_]=le-te}t.modifiersData[o]=E}},requiresIfExists:["offset"]};function _y(e,t,n){void 0===n&&(n=!1);var o,r=C$(t),i=C$(t)&&function(e){var t=e.getBoundingClientRect(),n=O$(t.width)/e.offsetWidth||1,o=O$(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),a=Z$(t),s=A$(e,i,n),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==x$(t)||sy(a))&&(c=(o=t)!==w$(o)&&C$(o)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(o):iy(o)),C$(t)?((l=A$(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=ay(a))),{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function ky(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}}),o.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||r(e)}),o}var xy={placement:"bottom",modifiers:[],strategy:"absolute"};function wy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Iy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?xy:r;return function(e,t,n){void 0===n&&(n=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},xy,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,r),s.scrollParents={reference:I$(e)?ly(e):e.contextElement?ly(e.contextElement):[],popper:ly(t)};var a,l,p=function(e){var t=ky(e);return k$.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(o,s.options.modifiers),l=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(l).map(function(e){return l[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var i=r({state:s,name:t,instance:u,options:o}),a=function(){};c.push(i||a)}}),u.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(wy(t,n)){s.rects={reference:_y(t,F$(n),"fixed"===s.options.strategy),popper:N$(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var r=s.orderedModifiers[o],i=r.fn,a=r.options,c=void 0===a?{}:a,d=r.name;"function"==typeof i&&(s=i({state:s,options:c,name:d,instance:u})||s)}else s.reset=!1,o=-1}}},update:(r=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),l=!0}};if(!wy(e,t))return u;function d(){c.forEach(function(e){return e()}),c=[]}return u.setOptions(n).then(function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}var Cy=Iy({defaultModifiers:[ey,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=my({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},Q$,E$,$y,gy,yy,B$,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=fy(t,{elementContext:"reference"}),s=fy(t,{altBoundary:!0}),c=vy(a,o),l=vy(s,r,i),u=by(c),d=by(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Sy="tippy-content",Ey="tippy-arrow",zy="tippy-svg-arrow",Ty={passive:!0,capture:!0},Dy=function(){return document.body};function Oy(e,t,n){if(Array.isArray(e)){var o=e[t];return null==o?Array.isArray(n)?n[t]:n:o}return e}function Uy(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Ry(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Ay(e,t){return 0===t?e:function(o){clearTimeout(n),n=setTimeout(function(){e(o)},t)};var n}function Ny(e){return[].concat(e)}function jy(e,t){-1===e.indexOf(t)&&e.push(t)}function Py(e){return[].slice.call(e)}function My(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function Zy(){return document.createElement("div")}function qy(e){return["Element","Fragment"].some(function(t){return Uy(e,t)})}function Ly(e){return qy(e)?[e]:function(e){return Uy(e,"NodeList")}(e)?Py(e):Array.isArray(e)?e:Py(document.querySelectorAll(e))}function Fy(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Vy(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Hy(e,t,n){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[o](t,n)})}function Jy(e,t){for(var n=t;n;){var o;if(e.contains(n))return!0;n=null==n.getRootNode||null==(o=n.getRootNode())?void 0:o.host}return!1}var Gy={isTouch:!1},By=0;function Wy(){Gy.isTouch||(Gy.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ky))}function Ky(){var e=performance.now();e-By<20&&(Gy.isTouch=!1,document.removeEventListener("mousemove",Ky)),By=e}function Xy(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Qy=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Yy=Object.assign({appendTo:Dy,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),e_=Object.keys(Yy);function t_(e){var t=(e.plugins||[]).reduce(function(t,n){var o,r=n.name,i=n.defaultValue;r&&(t[r]=void 0!==e[r]?e[r]:null!=(o=Yy[r])?o:i);return t},{});return Object.assign({},e,t)}function n_(e,t){var n=Object.assign({},t,{content:Ry(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(t_(Object.assign({},Yy,{plugins:t}))):e_).reduce(function(t,n){var o=(e.getAttribute("data-tippy-"+n)||"").trim();if(!o)return t;if("content"===n)t[n]=o;else try{t[n]=JSON.parse(o)}catch(e){t[n]=o}return t},{})}(e,t.plugins));return n.aria=Object.assign({},Yy.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function o_(e,t){e.innerHTML=t}function r_(e){var t=Zy();return!0===e?t.className=Ey:(t.className=zy,qy(e)?t.appendChild(e):o_(t,e)),t}function i_(e,t){qy(t.content)?(o_(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?o_(e,t.content):e.textContent=t.content)}function a_(e){var t=e.firstElementChild,n=Py(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(Sy)}),arrow:n.find(function(e){return e.classList.contains(Ey)||e.classList.contains(zy)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function s_(e){var t=Zy(),n=Zy();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var o=Zy();function r(n,o){var r=a_(t),i=r.box,a=r.content,s=r.arrow;o.theme?i.setAttribute("data-theme",o.theme):i.removeAttribute("data-theme"),"string"==typeof o.animation?i.setAttribute("data-animation",o.animation):i.removeAttribute("data-animation"),o.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?i.setAttribute("role",o.role):i.removeAttribute("role"),n.content===o.content&&n.allowHTML===o.allowHTML||i_(a,e.props),o.arrow?s?n.arrow!==o.arrow&&(i.removeChild(s),i.appendChild(r_(o.arrow))):i.appendChild(r_(o.arrow)):s&&i.removeChild(s)}return o.className=Sy,o.setAttribute("data-state","hidden"),i_(o,e.props),t.appendChild(n),n.appendChild(o),r(e.props,e.props),{popper:t,onUpdate:r}}s_.$$tippy=!0;var c_=1,l_=[],u_=[];function d_(e,t){var n,o,r,i,a,s,c,l,u=n_(e,Object.assign({},Yy,t_(My(t)))),d=!1,p=!1,m=!1,f=!1,h=[],g=Ay(G,u.interactiveDebounce),v=c_++,b=(l=u.plugins).filter(function(e,t){return l.indexOf(e)===t}),$={id:v,reference:e,popper:Zy(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(o),cancelAnimationFrame(r)},setProps:function(t){if($.state.isDestroyed)return;U("onBeforeUpdate",[$,t]),H();var n=$.props,o=n_(e,Object.assign({},n,My(t),{ignoreAttributes:!0}));$.props=o,V(),n.interactiveDebounce!==o.interactiveDebounce&&(N(),g=Ay(G,o.interactiveDebounce));n.triggerTarget&&!o.triggerTarget?Ny(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):o.triggerTarget&&e.removeAttribute("aria-expanded");A(),O(),k&&k(n,o);$.popperInstance&&(X(),Y().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));U("onAfterUpdate",[$,t])},setContent:function(e){$.setProps({content:e})},show:function(){var e=$.state.isVisible,t=$.state.isDestroyed,n=!$.state.isEnabled,o=Gy.isTouch&&!$.props.touch,r=Oy($.props.duration,0,Yy.duration);if(e||t||n||o)return;if(E().hasAttribute("disabled"))return;if(U("onShow",[$],!1),!1===$.props.onShow($))return;$.state.isVisible=!0,S()&&(_.style.visibility="visible");O(),Z(),$.state.isMounted||(_.style.transition="none");if(S()){var i=T();Fy([i.box,i.content],0)}s=function(){var e;if($.state.isVisible&&!f){if(f=!0,_.offsetHeight,_.style.transition=$.props.moveTransition,S()&&$.props.animation){var t=T(),n=t.box,o=t.content;Fy([n,o],r),Vy([n,o],"visible")}R(),A(),jy(u_,$),null==(e=$.popperInstance)||e.forceUpdate(),U("onMount",[$]),$.props.animation&&S()&&function(e,t){L(e,t)}(r,function(){$.state.isShown=!0,U("onShown",[$])})}},function(){var e,t=$.props.appendTo,n=E();e=$.props.interactive&&t===Dy||"parent"===t?n.parentNode:Ry(t,[n]);e.contains(_)||e.appendChild(_);$.state.isMounted=!0,X()}()},hide:function(){var e=!$.state.isVisible,t=$.state.isDestroyed,n=!$.state.isEnabled,o=Oy($.props.duration,1,Yy.duration);if(e||t||n)return;if(U("onHide",[$],!1),!1===$.props.onHide($))return;$.state.isVisible=!1,$.state.isShown=!1,f=!1,d=!1,S()&&(_.style.visibility="hidden");if(N(),q(),O(!0),S()){var r=T(),i=r.box,a=r.content;$.props.animation&&(Fy([i,a],o),Vy([i,a],"hidden"))}R(),A(),$.props.animation?S()&&function(e,t){L(e,function(){!$.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()})}(o,$.unmount):$.unmount()},hideWithInteractivity:function(e){z().addEventListener("mousemove",g),jy(l_,g),g(e)},enable:function(){$.state.isEnabled=!0},disable:function(){$.hide(),$.state.isEnabled=!1},unmount:function(){$.state.isVisible&&$.hide();if(!$.state.isMounted)return;Q(),Y().forEach(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);u_=u_.filter(function(e){return e!==$}),$.state.isMounted=!1,U("onHidden",[$])},destroy:function(){if($.state.isDestroyed)return;$.clearDelayTimeouts(),$.unmount(),H(),delete e._tippy,$.state.isDestroyed=!0,U("onDestroy",[$])}};if(!u.render)return $;var y=u.render($),_=y.popper,k=y.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+$.id,$.popper=_,e._tippy=$,_._tippy=$;var x=b.map(function(e){return e.fn($)}),w=e.hasAttribute("aria-expanded");return V(),A(),O(),U("onCreate",[$]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",function(){$.props.interactive&&$.state.isVisible&&$.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){$.props.interactive&&$.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",g)}),$;function I(){var e=$.props.touch;return Array.isArray(e)?e:[e,0]}function C(){return"hold"===I()[0]}function S(){var e;return!(null==(e=$.props.render)||!e.$$tippy)}function E(){return c||e}function z(){var e=E().parentNode;return e?function(e){var t,n=Ny(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}(e):document}function T(){return a_(_)}function D(e){return $.state.isMounted&&!$.state.isVisible||Gy.isTouch||i&&"focus"===i.type?0:Oy($.props.delay,e?0:1,Yy.delay)}function O(e){void 0===e&&(e=!1),_.style.pointerEvents=$.props.interactive&&!e?"":"none",_.style.zIndex=""+$.props.zIndex}function U(e,t,n){var o;(void 0===n&&(n=!0),x.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(o=$.props)[e].apply(o,t)}function R(){var t=$.props.aria;if(t.content){var n="aria-"+t.content,o=_.id;Ny($.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if($.state.isVisible)e.setAttribute(n,t?t+" "+o:o);else{var r=t&&t.replace(o,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}})}}function A(){!w&&$.props.aria.expanded&&Ny($.props.triggerTarget||e).forEach(function(e){$.props.interactive?e.setAttribute("aria-expanded",$.state.isVisible&&e===E()?"true":"false"):e.removeAttribute("aria-expanded")})}function N(){z().removeEventListener("mousemove",g),l_=l_.filter(function(e){return e!==g})}function j(t){if(!Gy.isTouch||!m&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!$.props.interactive||!Jy(_,n)){if(Ny($.props.triggerTarget||e).some(function(e){return Jy(e,n)})){if(Gy.isTouch)return;if($.state.isVisible&&$.props.trigger.indexOf("click")>=0)return}else U("onClickOutside",[$,t]);!0===$.props.hideOnClick&&($.clearDelayTimeouts(),$.hide(),p=!0,setTimeout(function(){p=!1}),$.state.isMounted||q())}}}function P(){m=!0}function M(){m=!1}function Z(){var e=z();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,Ty),e.addEventListener("touchstart",M,Ty),e.addEventListener("touchmove",P,Ty)}function q(){var e=z();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,Ty),e.removeEventListener("touchstart",M,Ty),e.removeEventListener("touchmove",P,Ty)}function L(e,t){var n=T().box;function o(e){e.target===n&&(Hy(n,"remove",o),t())}if(0===e)return t();Hy(n,"remove",a),Hy(n,"add",o),a=o}function F(t,n,o){void 0===o&&(o=!1),Ny($.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,o),h.push({node:e,eventType:t,handler:n,options:o})})}function V(){var e;C()&&(F("touchstart",J,{passive:!0}),F("touchend",B,{passive:!0})),(e=$.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(F(e,J),e){case"mouseenter":F("mouseleave",B);break;case"focus":F(Qy?"focusout":"blur",W);break;case"focusin":F("focusout",W)}})}function H(){h.forEach(function(e){var t=e.node,n=e.eventType,o=e.handler,r=e.options;t.removeEventListener(n,o,r)}),h=[]}function J(e){var t,n=!1;if($.state.isEnabled&&!K(e)&&!p){var o="focus"===(null==(t=i)?void 0:t.type);i=e,c=e.currentTarget,A(),!$.state.isVisible&&Uy(e,"MouseEvent")&&l_.forEach(function(t){return t(e)}),"click"===e.type&&($.props.trigger.indexOf("mouseenter")<0||d)&&!1!==$.props.hideOnClick&&$.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!o&&te(e)}}function G(e){var t=e.target,n=E().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var o=Y().concat(_).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null}).filter(Boolean);(function(e,t){var n=t.clientX,o=t.clientY;return e.every(function(e){var t=e.popperRect,r=e.popperState,i=e.props.interactiveBorder,a=r.placement.split("-")[0],s=r.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-o+c>i,m=o-t.bottom-l>i,f=t.left-n+u>i,h=n-t.right-d>i;return p||m||f||h})})(o,e)&&(N(),te(e))}}function B(e){K(e)||$.props.trigger.indexOf("click")>=0&&d||($.props.interactive?$.hideWithInteractivity(e):te(e))}function W(e){$.props.trigger.indexOf("focusin")<0&&e.target!==E()||$.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function K(e){return!!Gy.isTouch&&C()!==e.type.indexOf("touch")>=0}function X(){Q();var t=$.props,n=t.popperOptions,o=t.placement,r=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=S()?a_(_).arrow:null,l=i?{getBoundingClientRect:i,contextElement:i.contextElement||E()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=T().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];S()&&c&&d.push({name:"arrow",options:{element:c,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),$.popperInstance=Cy(l,_,Object.assign({},n,{placement:o,onFirstUpdate:s,modifiers:d}))}function Q(){$.popperInstance&&($.popperInstance.destroy(),$.popperInstance=null)}function Y(){return Py(_.querySelectorAll("[data-tippy-root]"))}function ee(e){$.clearDelayTimeouts(),e&&U("onTrigger",[$,e]),Z();var t=D(!0),o=I(),r=o[0],i=o[1];Gy.isTouch&&"hold"===r&&i&&(t=i),t?n=setTimeout(function(){$.show()},t):$.show()}function te(e){if($.clearDelayTimeouts(),U("onUntrigger",[$,e]),$.state.isVisible){if(!($.props.trigger.indexOf("mouseenter")>=0&&$.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=D(!1);t?o=setTimeout(function(){$.state.isVisible&&$.hide()},t):r=requestAnimationFrame(function(){$.hide()})}}else q()}}function p_(e,t){void 0===t&&(t={});var n=Yy.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Wy,Ty),window.addEventListener("blur",Xy);var o=Object.assign({},t,{plugins:n}),r=Ly(e).reduce(function(e,t){var n=t&&d_(t,o);return n&&e.push(n),e},[]);return qy(e)?r[0]:r}p_.defaultProps=Yy,p_.setDefaultProps=function(e){Object.keys(e).forEach(function(t){Yy[t]=e[t]})},p_.currentInput=Gy,Object.assign({},E$,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),p_.setDefaultProps({render:s_});const m_=e=>({}),f_=e=>({trigger:e[2]}),h_=e=>({}),g_=e=>({trigger:e[2]});function v_(e){let t,n,o;const r=e[6].default,i=eh(r,e,e[5],g_),a=e[6].content,s=eh(a,e,e[5],f_),c=s||function(e){let t;return{c(){t=mh(e[0])},m(e,n){lh(e,t,n)},p(e,n){1&n&&yh(t,e[0])},d(e){e&&uh(t)}}}(e);return{c(){i&&i.c(),t=fh(),n=dh("div"),c&&c.c(),kh(n,"display","none")},m(r,a){i&&i.m(r,a),lh(r,t,a),lh(r,n,a),c&&c.m(n,null),e[7](n),o=!0},p(e,[t]){i&&i.p&&(!o||32&t)&&oh(i,r,e,e[5],o?nh(r,e[5],t,h_):rh(e[5]),g_),s?s.p&&(!o||32&t)&&oh(s,a,e,e[5],o?nh(a,e[5],t,m_):rh(e[5]),f_):c&&c.p&&(!o||1&t)&&c.p(e,o?t:-1)},i(e){o||(Jh(i,e),Jh(c,e),o=!0)},o(e){Gh(i,e),Gh(c,e),o=!1},d(o){i&&i.d(o),o&&uh(t),o&&uh(n),c&&c.d(o),e[7](null)}}}function b_(e,t,n){const o=["text","disabled"];let r,i,a,s=ih(t,o),{$$slots:c={},$$scope:l}=t,{text:u=""}=t,{disabled:d=!1}=t;return zh(()=>{r&&(n(4,a=p_(r,{...s,content:i})),i.style.removeProperty("display"))}),e.$$set=e=>{t=Gf(Gf({},t),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),n(9,s=ih(t,o)),"text"in e&&n(0,u=e.text),"disabled"in e&&n(3,d=e.disabled),"$$scope"in e&&n(5,l=e.$$scope)},e.$$.update=()=>{24&e.$$.dirty&&a&&(d?a.disable():a.enable())},[u,i,e=>{r=e},d,a,l,c,function(e){Dh[e?"unshift":"push"](()=>{i=e,n(1,i)})}]}class $_ extends eg{constructor(e){super(),Yh(this,e,b_,v_,Qf,{text:0,disabled:3})}}function y_(e){ch(e,"svelte-wb18kg","svg.svelte-wb18kg{opacity:var(--tooltip-opacity, 1);color:var(--text-color)}")}function __(e){let t,n,o,r;return{c(){t=ph("svg"),n=ph("path"),vh(n,"fill","currentColor"),vh(n,"d","M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"),vh(t,"class","tooltip svelte-wb18kg"),kh(t,"width","1rem"),kh(t,"height","1rem"),vh(t,"viewBox","0 0 24 24")},m(i,a){lh(i,t,a),sh(t,n),o||(r=ah(e[9].call(null,t)),o=!0)},p:Jf,d(e){e&&uh(t),o=!1,r()}}}function k_(e){let t,n,o,r;return{c(){t=dh("br"),n=fh(),o=dh("a"),r=mh("Read more."),vh(o,"href",e[0]),vh(o,"target",e[3]?void 0:"_blank"),vh(o,"rel",e[3]?void 0:"noopener noreferrer")},m(e,i){lh(e,t,i),lh(e,n,i),lh(e,o,i),sh(o,r)},p(e,t){1&t&&vh(o,"href",e[0])},d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function x_(e){let t,n,o;const r=e[6].default,i=eh(r,e,e[7],null);let a=e[2]&&k_(e);return{c(){t=dh("div"),i&&i.c(),n=fh(),a&&a.c(),vh(t,"slot","content")},m(e,r){lh(e,t,r),i&&i.m(t,null),sh(t,n),a&&a.m(t,null),o=!0},p(e,n){i&&i.p&&(!o||128&n)&&oh(i,r,e,e[7],o?nh(r,e[7],n,null):rh(e[7]),null),e[2]?a?a.p(e,n):(a=k_(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i(e){o||(Jh(i,e),o=!0)},o(e){Gh(i,e),o=!1},d(e){e&&uh(t),i&&i.d(e),a&&a.d()}}}function w_(e){let t,n;return t=new $_({props:{interactive:!0,placement:e[1],theme:"light border",maxWidth:"22em",$$slots:{content:[x_,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0],default:[__,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){Wh(t.$$.fragment)},m(e,o){Kh(t,e,o),n=!0},p(e,[n]){const o={};2&n&&(o.placement=e[1]),133&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Jh(t.$$.fragment,e),n=!0)},o(e){Gh(t.$$.fragment,e),n=!1},d(e){Xh(t,e)}}}function I_(e,t,n){let o,r,{$$slots:i={},$$scope:a}=t,{link:s}=t,{placement:c="right"}=t;const l=(u=lg,Eh().$$.context.get(u));var u;const d=null!=l,p=l??function(e,t){return{subscribe:ng(e,t).subscribe}}({canOpen:!1});return Yf(e,p,e=>n(5,r=e)),e.$$set=e=>{"link"in e&&n(0,s=e.link),"placement"in e&&n(1,c=e.placement),"$$scope"in e&&n(7,a=e.$$scope)},e.$$.update=()=>{33&e.$$.dirty&&n(2,o=null!=s&&(!d||r.canOpen))},[s,c,o,d,p,r,i,a]}class C_ extends eg{constructor(e){super(),Yh(this,e,I_,w_,Qf,{link:0,placement:1},y_)}}function S_(e){let t,n,o;return{c(){t=dh("input"),vh(t,"type","checkbox"),t.disabled=e[1]},m(r,i){lh(r,t,i),t.checked=e[0],n||(o=gh(t,"change",e[6]),n=!0)},p(e,[n]){2&n&&(t.disabled=e[1]),1&n&&(t.checked=e[0])},i:Jf,o:Jf,d(e){e&&uh(t),n=!1,o()}}}function E_(e,t,n){let{value:o=!1}=t,{checked:r=!1!==o}=t,{defaultValue:i}=t,{disabled:a}=t,s=r,c=o||i;return e.$$set=e=>{"value"in e&&n(2,o=e.value),"checked"in e&&n(0,r=e.checked),"defaultValue"in e&&n(3,i=e.defaultValue),"disabled"in e&&n(1,a=e.disabled)},e.$$.update=()=>{53&e.$$.dirty&&(s?r?!1===o&&n(0,r=!1):n(2,o=!1):r?n(2,o=c):!1!==o&&n(0,r=!0),n(4,s=r),n(5,c=o||c))},[r,a,o,i,s,c,function(){r=this.checked,n(0,r),n(4,s),n(5,c),n(2,o)}]}class z_ extends eg{constructor(e){super(),Yh(this,e,E_,S_,Qf,{value:2,checked:0,defaultValue:3,disabled:1})}}function T_(e){let t,n;return{c(){t=ph("svg"),n=ph("path"),vh(n,"d","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"),vh(t,"class","keepcolor"),vh(t,"width","9"),vh(t,"height","9"),vh(t,"xmlns","http://www.w3.org/2000/svg"),vh(t,"viewBox","0 0 320 512")},m(e,o){lh(e,t,o),sh(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&uh(t)}}}class D_ extends eg{constructor(e){super(),Yh(this,e,null,T_,Qf,{})}}function O_(e){let t,n;return{c(){t=ph("svg"),n=ph("path"),vh(n,"d","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"),vh(t,"class","keepcolor"),vh(t,"width","9"),vh(t,"height","9"),vh(t,"xmlns","http://www.w3.org/2000/svg"),vh(t,"viewBox","0 0 512 512")},m(e,o){lh(e,t,o),sh(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&uh(t)}}}class U_ extends eg{constructor(e){super(),Yh(this,e,null,O_,Qf,{})}}function R_(e){let t,n,o,r;const i=[N_,A_],a=[];function s(e,t){return"checkbox"===e[3]?0:"toggleradio"===e[3]?1:-1}return~(n=s(e))&&(o=a[n]=i[n](e)),{c(){t=dh("span"),o&&o.c(),vh(t,"class","mr-2")},m(e,o){lh(e,t,o),~n&&a[n].m(t,null),r=!0},p(e,r){let c=n;n=s(e),n===c?~n&&a[n].p(e,r):(o&&(Vh(),Gh(a[c],1,1,()=>{a[c]=null}),Hh()),~n?(o=a[n],o?o.p(e,r):(o=a[n]=i[n](e),o.c()),Jh(o,1),o.m(t,null)):o=null)},i(e){r||(Jh(o),r=!0)},o(e){Gh(o),r=!1},d(e){e&&uh(t),~n&&a[n].d()}}}function A_(e){let t,n,o;function r(t){e[19](t)}let i={defaultValue:e[4],disabled:e[7]||e[9]};return void 0!==e[1]&&(i.value=e[1]),t=new z_({props:i}),Dh.push(()=>Bh(t,"value",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,o){const r={};16&o&&(r.defaultValue=e[4]),640&o&&(r.disabled=e[7]||e[9]),!n&&2&o&&(n=!0,r.value=e[1],jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function N_(e){let t,n,o,r;return{c(){t=dh("input"),vh(t,"type","checkbox"),t.disabled=n=e[7]||e[9]},m(n,i){lh(n,t,i),t.checked=e[0],o||(r=gh(t,"change",e[18]),o=!0)},p(e,o){640&o&&n!==(n=e[7]||e[9])&&(t.disabled=n),1&o&&(t.checked=e[0])},i:Jf,o:Jf,d(e){e&&uh(t),o=!1,r()}}}function j_(e){let t,n;return t=new D_({}),{c(){Wh(t.$$.fragment)},m(e,o){Kh(t,e,o),n=!0},i(e){n||(Jh(t.$$.fragment,e),n=!0)},o(e){Gh(t.$$.fragment,e),n=!1},d(e){Xh(t,e)}}}function P_(e){let t,n;return t=new U_({}),{c(){Wh(t.$$.fragment)},m(e,o){Kh(t,e,o),n=!0},i(e){n||(Jh(t.$$.fragment,e),n=!0)},o(e){Gh(t.$$.fragment,e),n=!1},d(e){Xh(t,e)}}}function M_(e){let t,n;return{c(){t=new wh(!1),n=hh(),t.a=n},m(o,r){t.m(e[5],o,r),lh(o,n,r)},p(e,n){32&n&&t.p(e[5])},d(e){e&&uh(n),e&&t.d()}}}function Z_(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C="section"!==e[3]&&R_(e);const S=[P_,j_],E=[];function z(e,t){return e[10]?0:1}d=z(e),p=E[d]=S[d](e),h=new C_({props:{link:e[6],$$slots:{default:[M_]},$$scope:{ctx:e}}});const T=e[17].default,D=eh(T,e,e[20],null);return{c(){t=dh("section"),n=dh("h1"),o=dh("label"),r=dh("div"),C&&C.c(),i=fh(),a=dh("span"),s=mh(e[2]),c=fh(),l=dh("div"),u=dh("button"),p.c(),f=fh(),Wh(h.$$.fragment),g=fh(),v=dh("div"),b=dh("span"),y=fh(),_=dh("div"),D&&D.c(),vh(r,"class","flex items-center"),vh(u,"class","px-1 bg-transparent border-0 mr-2"),vh(u,"aria-label",m=e[10]?"Collapse section":"Expand section"),vh(l,"class","flex items-center"),vh(o,"class","items-center tooltip-container pr-2 flex justify-between"),vh(b,"class","italic"),vh(v,"class","text-sm text-gray-500"),v.hidden=$=!e[7]||void 0===e[8],_.hidden=k=!e[10],vh(t,"class","controls-section")},m(p,m){var $;lh(p,t,m),sh(t,n),sh(n,o),sh(o,r),C&&C.m(r,null),sh(r,i),sh(r,a),sh(a,s),sh(o,c),sh(o,l),sh(l,u),E[d].m(u,null),sh(l,f),Kh(h,l,null),sh(t,g),sh(t,v),sh(v,b),b.innerHTML=e[8],sh(t,y),sh(t,_),D&&D.m(_,null),x=!0,w||(I=gh(u,"click",($=e[11],function(e){return e.preventDefault(),$.call(this,e)})),w=!0)},p(e,[t]){"section"!==e[3]?C?(C.p(e,t),8&t&&Jh(C,1)):(C=R_(e),C.c(),Jh(C,1),C.m(r,i)):C&&(Vh(),Gh(C,1,1,()=>{C=null}),Hh()),(!x||4&t)&&yh(s,e[2]);let n=d;d=z(e),d!==n&&(Vh(),Gh(E[n],1,1,()=>{E[n]=null}),Hh(),p=E[d],p||(p=E[d]=S[d](e),p.c()),Jh(p,1),p.m(u,null)),(!x||1024&t&&m!==(m=e[10]?"Collapse section":"Expand section"))&&vh(u,"aria-label",m);const o={};64&t&&(o.link=e[6]),1048608&t&&(o.$$scope={dirty:t,ctx:e}),h.$set(o),(!x||256&t)&&(b.innerHTML=e[8]),(!x||384&t&&$!==($=!e[7]||void 0===e[8]))&&(v.hidden=$),D&&D.p&&(!x||1048576&t)&&oh(D,T,e,e[20],x?nh(T,e[20],t,null):rh(e[20]),null),(!x||1024&t&&k!==(k=!e[10]))&&(_.hidden=k)},i(e){x||(Jh(C),Jh(p),Jh(h.$$.fragment,e),Jh(D,e),x=!0)},o(e){Gh(C),Gh(p),Gh(h.$$.fragment,e),Gh(D,e),x=!1},d(e){e&&uh(t),C&&C.d(),E[d].d(),Xh(h),D&&D.d(e),w=!1,I()}}}function q_(e,t,n){let o,r,{$$slots:i={},$$scope:a}=t,{label:s}=t,{type:c}=t,{checkboxChecked:l}=t,{toggleRadioValue:u}=t,{toggleRadioDefaultValue:d}=t,{helpContent:p}=t,{helpLink:m}=t,{disabled:f}=t,{disabledReason:h}=t,{required:g}=t,{error:v}=t,b=!1,$=g,y=r;return e.$$set=e=>{"label"in e&&n(2,s=e.label),"type"in e&&n(3,c=e.type),"checkboxChecked"in e&&n(0,l=e.checkboxChecked),"toggleRadioValue"in e&&n(1,u=e.toggleRadioValue),"toggleRadioDefaultValue"in e&&n(4,d=e.toggleRadioDefaultValue),"helpContent"in e&&n(5,p=e.helpContent),"helpLink"in e&&n(6,m=e.helpLink),"disabled"in e&&n(7,f=e.disabled),"disabledReason"in e&&n(8,h=e.disabledReason),"required"in e&&n(9,g=e.required),"error"in e&&n(12,v=e.error),"$$scope"in e&&n(20,a=e.$$scope)},e.$$.update=()=>{4096&e.$$.dirty&&n(16,o=void 0!==v),3&e.$$.dirty&&n(15,r=!(!l&&!u)),123392&e.$$.dirty&&((o||!y&&r||!$&&g)&&n(10,b=!0),n(13,$=g),n(14,y=r))},[l,u,s,c,d,p,m,f,h,g,b,function(){n(10,b=!b||o)},v,$,y,r,o,i,function(){l=this.checked,n(0,l)},function(e){u=e,n(1,u)},a]}class L_ extends eg{constructor(e){super(),Yh(this,e,q_,Z_,Qf,{label:2,type:3,checkboxChecked:0,toggleRadioValue:1,toggleRadioDefaultValue:4,helpContent:5,helpLink:6,disabled:7,disabledReason:8,required:9,error:12})}}function F_(e){let t;const n=e[9].default,o=eh(n,e,e[11],null);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,r){o&&o.p&&(!t||2048&r)&&oh(o,n,e,e[11],t?nh(n,e[11],r,null):rh(e[11]),null)},i(e){t||(Jh(o,e),t=!0)},o(e){Gh(o,e),t=!1},d(e){o&&o.d(e)}}}function V_(e){let t,n,o;function r(t){e[10](t)}let i={type:"toggleradio",label:e[1],toggleRadioDefaultValue:e[2],helpContent:e[3],helpLink:e[4],disabled:e[5],disabledReason:e[6],required:e[7],error:e[8],$$slots:{default:[F_]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.toggleRadioValue=e[0]),t=new L_({props:i}),Dh.push(()=>Bh(t,"toggleRadioValue",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.label=e[1]),4&o&&(r.toggleRadioDefaultValue=e[2]),8&o&&(r.helpContent=e[3]),16&o&&(r.helpLink=e[4]),32&o&&(r.disabled=e[5]),64&o&&(r.disabledReason=e[6]),128&o&&(r.required=e[7]),256&o&&(r.error=e[8]),2048&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.toggleRadioValue=e[0],jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function H_(e,t,n){let{$$slots:o={},$$scope:r}=t,{label:i}=t,{value:a}=t,{defaultValue:s}=t,{helpContent:c}=t,{helpLink:l}=t,{disabled:u=!1}=t,{disabledReason:d}=t,{required:p=!1}=t,{error:m}=t;return e.$$set=e=>{"label"in e&&n(1,i=e.label),"value"in e&&n(0,a=e.value),"defaultValue"in e&&n(2,s=e.defaultValue),"helpContent"in e&&n(3,c=e.helpContent),"helpLink"in e&&n(4,l=e.helpLink),"disabled"in e&&n(5,u=e.disabled),"disabledReason"in e&&n(6,d=e.disabledReason),"required"in e&&n(7,p=e.required),"error"in e&&n(8,m=e.error),"$$scope"in e&&n(11,r=e.$$scope)},[a,i,s,c,l,u,d,p,m,o,function(e){a=e,n(0,a)},r]}class J_ extends eg{constructor(e){super(),Yh(this,e,H_,V_,Qf,{label:1,value:0,defaultValue:2,helpContent:3,helpLink:4,disabled:5,disabledReason:6,required:7,error:8})}}const G_="has-error";function B_(e,t){const n=p_(e,{placement:"right",theme:"light-red border",trigger:"manual",hideOnClick:!1,interactive:!0});function o(t){t?(n.setContent(t),n.show(),e.classList.add(G_)):(n.hide(),e.classList.remove(G_))}return o(t),{update:o,destroy:n.destroy}}function W_(e){let t;return{c(){t=mh("Simple mechanism with a single account authorized for all privileged actions.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function K_(e){let t;return{c(){t=mh("Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function X_(e){let t;return{c(){t=mh("Provides additional enforced security measures on top of standard Roles mechanism for managing the most\n privileged role: default admin.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Q_(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C;return r=new C_({props:{$$slots:{default:[Y_]},$$scope:{ctx:e}}}),p=new C_({props:{$$slots:{default:[ek]},$$scope:{ctx:e}}}),y=new C_({props:{$$slots:{default:[tk]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("span"),o=mh("Initial delay\n "),Wh(r.$$.fragment),i=fh(),a=dh("input"),c=fh(),l=dh("label"),u=dh("span"),d=mh("Default admin delay increase\n "),Wh(p.$$.fragment),m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),$=mh("Max default admin transfer delay\n "),Wh(y.$$.fragment),_=fh(),k=dh("input"),vh(n,"class","flex justify-between pr-2"),vh(a,"placeholder",""),vh(t,"class","labeled-input"),vh(u,"class","flex justify-between pr-2"),vh(f,"placeholder",""),vh(l,"class","labeled-input"),vh(b,"class","flex justify-between pr-2"),vh(k,"placeholder",""),vh(v,"class","labeled-input")},m(S,E){lh(S,t,E),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),_h(a,e[1]),lh(S,c,E),lh(S,l,E),sh(l,u),sh(u,d),Kh(p,u,null),sh(l,m),sh(l,f),_h(f,e[2]),lh(S,g,E),lh(S,v,E),sh(v,b),sh(b,$),Kh(y,b,null),sh(v,_),sh(v,k),_h(k,e[3]),w=!0,I||(C=[gh(a,"input",e[13]),ah(s=B_.call(null,a,e[5]?.darInitialDelay)),gh(f,"input",e[14]),ah(h=B_.call(null,f,e[5]?.darDefaultDelayIncrease)),gh(k,"input",e[15]),ah(x=B_.call(null,k,e[5]?.darMaxTransferDelay))],I=!0)},p(e,t){const n={};131072&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),2&t&&a.value!==e[1]&&_h(a,e[1]),s&&Xf(s.update)&&32&t&&s.update.call(null,e[5]?.darInitialDelay);const o={};131072&t&&(o.$$scope={dirty:t,ctx:e}),p.$set(o),4&t&&f.value!==e[2]&&_h(f,e[2]),h&&Xf(h.update)&&32&t&&h.update.call(null,e[5]?.darDefaultDelayIncrease);const i={};131072&t&&(i.$$scope={dirty:t,ctx:e}),y.$set(i),8&t&&k.value!==e[3]&&_h(k,e[3]),x&&Xf(x.update)&&32&t&&x.update.call(null,e[5]?.darMaxTransferDelay)},i(e){w||(Jh(r.$$.fragment,e),Jh(p.$$.fragment,e),Jh(y.$$.fragment,e),w=!0)},o(e){Gh(r.$$.fragment,e),Gh(p.$$.fragment,e),Gh(y.$$.fragment,e),w=!1},d(e){e&&uh(t),Xh(r),e&&uh(c),e&&uh(l),Xh(p),e&&uh(g),e&&uh(v),Xh(y),I=!1,Kf(C)}}}function Y_(e){let t;return{c(){t=mh("The initial delay before the default admin can be assigned.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ek(e){let t;return{c(){t=mh("The duration by which the delay for the default admin increases after each assignment.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function tk(e){let t;return{c(){t=mh("The maximum delay in seconds for a default admin transfer.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function nk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_;i=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/access#ownership-and-ownable",$$slots:{default:[W_]},$$scope:{ctx:e}}}),u=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/access#role-based-accesscontrol",$$slots:{default:[K_]},$$scope:{ctx:e}}}),h=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/access#AccessControlDefaultAdminRulesComponent",$$slots:{default:[X_]},$$scope:{ctx:e}}});let k="roles-dar"===e[0]&&Q_(e);return $=bh(e[10][0]),{c(){t=dh("div"),n=dh("label"),o=dh("input"),r=mh("\n Ownable\n "),Wh(i.$$.fragment),a=fh(),s=dh("label"),c=dh("input"),l=mh("\n Roles\n "),Wh(u.$$.fragment),d=fh(),p=dh("label"),m=dh("input"),f=mh("\n Roles (Default Admin Rules)\n "),Wh(h.$$.fragment),g=fh(),k&&k.c(),v=hh(),vh(o,"type","radio"),o.__value="ownable",o.value=o.__value,xh(n,"checked","ownable"===e[0]),vh(c,"type","radio"),c.__value="roles",c.value=c.__value,xh(s,"checked","roles"===e[0]),vh(m,"type","radio"),m.__value="roles-dar",m.value=m.__value,xh(p,"checked","roles-dar"===e[0]),vh(t,"class","checkbox-group"),$.p(o,c,m)},m($,x){lh($,t,x),sh(t,n),sh(n,o),o.checked=o.__value===e[0],sh(n,r),Kh(i,n,null),sh(t,a),sh(t,s),sh(s,c),c.checked=c.__value===e[0],sh(s,l),Kh(u,s,null),sh(t,d),sh(t,p),sh(p,m),m.checked=m.__value===e[0],sh(p,f),Kh(h,p,null),lh($,g,x),k&&k.m($,x),lh($,v,x),b=!0,y||(_=[gh(o,"change",e[9]),gh(c,"change",e[11]),gh(m,"change",e[12])],y=!0)},p(e,t){1&t&&(o.checked=o.__value===e[0]);const r={};131072&t&&(r.$$scope={dirty:t,ctx:e}),i.$set(r),(!b||1&t)&&xh(n,"checked","ownable"===e[0]),1&t&&(c.checked=c.__value===e[0]);const a={};131072&t&&(a.$$scope={dirty:t,ctx:e}),u.$set(a),(!b||1&t)&&xh(s,"checked","roles"===e[0]),1&t&&(m.checked=m.__value===e[0]);const l={};131072&t&&(l.$$scope={dirty:t,ctx:e}),h.$set(l),(!b||1&t)&&xh(p,"checked","roles-dar"===e[0]),"roles-dar"===e[0]?k?(k.p(e,t),1&t&&Jh(k,1)):(k=Q_(e),k.c(),Jh(k,1),k.m(v.parentNode,v)):k&&(Vh(),Gh(k,1,1,()=>{k=null}),Hh())},i(e){b||(Jh(i.$$.fragment,e),Jh(u.$$.fragment,e),Jh(h.$$.fragment,e),Jh(k),b=!0)},o(e){Gh(i.$$.fragment,e),Gh(u.$$.fragment,e),Gh(h.$$.fragment,e),Gh(k),b=!1},d(e){e&&uh(t),Xh(i),Xh(u),Xh(h),e&&uh(g),k&&k.d(e),e&&uh(v),$.r(),y=!1,Kf(_)}}}function ok(e){let t,n,o;function r(t){e[16](t)}let i={label:"Access Control",defaultValue:"ownable",helpContent:"Restrict who can access the functions of a contract or when they can do it.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/4.x/access",required:e[4],$$slots:{default:[nk]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.value=e[0]),t=new J_({props:i}),Dh.push(()=>Bh(t,"value",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,[o]){const r={};16&o&&(r.required=e[4]),131119&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.value=e[0],jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function rk(e,t,n){let{accessType:o}=t,{darInitialDelay:r}=t,{darDefaultDelayIncrease:i}=t,{darMaxTransferDelay:a}=t,{required:s}=t,{errors:c}=t,l="ownable",u=s,d=o;return e.$$set=e=>{"accessType"in e&&n(0,o=e.accessType),"darInitialDelay"in e&&n(1,r=e.darInitialDelay),"darDefaultDelayIncrease"in e&&n(2,i=e.darDefaultDelayIncrease),"darMaxTransferDelay"in e&&n(3,a=e.darMaxTransferDelay),"required"in e&&n(4,s=e.required),"errors"in e&&n(5,c=e.errors)},e.$$.update=()=>{465&e.$$.dirty&&(u&&!s?n(0,o=d):(n(8,d=o),!1===o&&s&&n(0,o=l)),n(7,u=s),!1!==o&&n(6,l=o))},[o,r,i,a,s,c,l,u,d,function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},[[]],function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},function(){r=this.value,n(1,r)},function(){i=this.value,n(2,i)},function(){a=this.value,n(3,a)},function(e){o=e,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)}]}class ik extends eg{constructor(e){super(),Yh(this,e,rk,ok,Qf,{accessType:0,darInitialDelay:1,darDefaultDelayIncrease:2,darMaxTransferDelay:3,required:4,errors:5})}}function ak(e){let t;return{c(){t=mh("Smart contracts are immutable by default unless they include code that allows them to be upgraded.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function sk(e){let t,n,o,r,i,a,s;return r=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/upgrades",$$slots:{default:[ak]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("input"),o=mh("\n Upgradeable\n "),Wh(r.$$.fragment),vh(n,"type","checkbox"),xh(t,"checked",e[0])},m(c,l){lh(c,t,l),sh(t,n),n.checked=e[0],sh(t,o),Kh(r,t,null),i=!0,a||(s=gh(n,"change",e[1]),a=!0)},p(e,[o]){1&o&&(n.checked=e[0]);const a={};4&o&&(a.$$scope={dirty:o,ctx:e}),r.$set(a),(!i||1&o)&&xh(t,"checked",e[0])},i(e){i||(Jh(r.$$.fragment,e),i=!0)},o(e){Gh(r.$$.fragment,e),i=!1},d(e){e&&uh(t),Xh(r),a=!1,s()}}}function ck(e,t,n){let{upgradeable:o}=t;return e.$$set=e=>{"upgradeable"in e&&n(0,o=e.upgradeable)},[o,function(){o=this.checked,n(0,o)}]}class lk extends eg{constructor(e){super(),Yh(this,e,ck,sk,Qf,{upgradeable:0})}}function uk(e){let t;return{c(){t=mh("Where people can contact you to report security issues. Will only be visible if contract metadata is verified.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function dk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$;return s=new C_({props:{$$slots:{default:[uk]},$$scope:{ctx:e}}}),{c(){t=dh("section"),n=dh("h1"),n.innerHTML='<label class="flex items-center tooltip-container pr-2"><span>Info</span></label>',o=fh(),r=dh("label"),i=dh("span"),a=mh("Security Contact\n "),Wh(s.$$.fragment),c=fh(),l=dh("input"),d=fh(),p=dh("label"),m=dh("span"),m.textContent="License",f=fh(),h=dh("input"),vh(i,"class","flex justify-between pr-2"),vh(l,"placeholder","security@example.com"),vh(r,"class","labeled-input"),vh(h,"placeholder",uv.license),vh(p,"class","labeled-input"),vh(t,"class","controls-section")},m(y,_){lh(y,t,_),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(i,a),Kh(s,i,null),sh(r,c),sh(r,l),_h(l,e[0].securityContact),sh(t,d),sh(t,p),sh(p,m),sh(p,f),sh(p,h),_h(h,e[0].license),v=!0,b||($=[gh(l,"input",e[2]),ah(u=B_.call(null,l,e[1]?.securityContact)),gh(h,"input",e[3]),ah(g=B_.call(null,h,e[1]?.license))],b=!0)},p(e,[t]){const n={};16&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n),1&t&&l.value!==e[0].securityContact&&_h(l,e[0].securityContact),u&&Xf(u.update)&&2&t&&u.update.call(null,e[1]?.securityContact),1&t&&h.value!==e[0].license&&_h(h,e[0].license),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.license)},i(e){v||(Jh(s.$$.fragment,e),v=!0)},o(e){Gh(s.$$.fragment,e),v=!1},d(e){e&&uh(t),Xh(s),b=!1,Kf($)}}}function pk(e,t,n){let{info:o}=t,{errors:r}=t;return e.$$set=e=>{"info"in e&&n(0,o=e.info),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.securityContact=this.value,n(0,o)},function(){o.license=this.value,n(0,o)}]}class mk extends eg{constructor(e){super(),Yh(this,e,pk,dk,Qf,{info:0,errors:1})}}function fk(e){let t,n,o;return{c(){t=mh("In order to compile Cairo contracts with macros enabled, you need to have the Rust toolchain installed and "),n=dh("code"),n.textContent="openzeppelin_macros",o=mh(" package added as a dependency.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function hk(e){let t,n,o;return{c(){t=mh("Use the "),n=dh("code"),n.textContent="with_components",o=mh(" macro for simplified contract structure.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function gk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h;return a=new C_({props:{$$slots:{default:[fk]},$$scope:{ctx:e}}}),p=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/macros/with_components",$$slots:{default:[hk]},$$scope:{ctx:e}}}),{c(){t=dh("section"),n=dh("h1"),o=dh("div"),r=dh("span"),r.textContent="Macros",i=fh(),Wh(a.$$.fragment),s=fh(),c=dh("div"),l=dh("label"),u=dh("input"),d=mh("\n with_components\n "),Wh(p.$$.fragment),vh(o,"class","items-center tooltip-container pr-2 flex justify-between"),vh(u,"type","checkbox"),xh(l,"checked",e[0].withComponents),vh(c,"class","checkbox-group"),vh(t,"class","controls-section")},m(g,v){lh(g,t,v),sh(t,n),sh(n,o),sh(o,r),sh(o,i),Kh(a,o,null),sh(t,s),sh(t,c),sh(c,l),sh(l,u),u.checked=e[0].withComponents,sh(l,d),Kh(p,l,null),m=!0,f||(h=gh(u,"change",e[1]),f=!0)},p(e,[t]){const n={};4&t&&(n.$$scope={dirty:t,ctx:e}),a.$set(n),1&t&&(u.checked=e[0].withComponents);const o={};4&t&&(o.$$scope={dirty:t,ctx:e}),p.$set(o),(!m||1&t)&&xh(l,"checked",e[0].withComponents)},i(e){m||(Jh(a.$$.fragment,e),Jh(p.$$.fragment,e),m=!0)},o(e){Gh(a.$$.fragment,e),Gh(p.$$.fragment,e),m=!1},d(e){e&&uh(t),Xh(a),Xh(p),f=!1,h()}}}function vk(e,t,n){let{macros:o}=t;return e.$$set=e=>{"macros"in e&&n(0,o=e.macros)},[o,function(){o.withComponents=this.checked,n(0,o)}]}class bk extends eg{constructor(e){super(),Yh(this,e,vk,gk,Qf,{macros:0})}}function $k(e){let t;const n=e[8].default,o=eh(n,e,e[10],null);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,r){o&&o.p&&(!t||1024&r)&&oh(o,n,e,e[10],t?nh(n,e[10],r,null):rh(e[10]),null)},i(e){t||(Jh(o,e),t=!0)},o(e){Gh(o,e),t=!1},d(e){o&&o.d(e)}}}function yk(e){let t,n,o;function r(t){e[9](t)}let i={type:"checkbox",label:e[1],helpContent:e[2],helpLink:e[3],disabled:e[4],disabledReason:e[5],required:e[6],error:e[7],$$slots:{default:[$k]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.checkboxChecked=e[0]),t=new L_({props:i}),Dh.push(()=>Bh(t,"checkboxChecked",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.label=e[1]),4&o&&(r.helpContent=e[2]),8&o&&(r.helpLink=e[3]),16&o&&(r.disabled=e[4]),32&o&&(r.disabledReason=e[5]),64&o&&(r.required=e[6]),128&o&&(r.error=e[7]),1024&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.checkboxChecked=e[0],jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function _k(e,t,n){let{$$slots:o={},$$scope:r}=t,{label:i}=t,{checked:a}=t,{helpContent:s}=t,{helpLink:c}=t,{disabled:l=!1}=t,{disabledReason:u}=t,{required:d=!1}=t,{error:p}=t;return e.$$set=e=>{"label"in e&&n(1,i=e.label),"checked"in e&&n(0,a=e.checked),"helpContent"in e&&n(2,s=e.helpContent),"helpLink"in e&&n(3,c=e.helpLink),"disabled"in e&&n(4,l=e.disabled),"disabledReason"in e&&n(5,u=e.disabledReason),"required"in e&&n(6,d=e.required),"error"in e&&n(7,p=e.error),"$$scope"in e&&n(10,r=e.$$scope)},[a,i,s,c,l,u,d,p,o,function(e){a=e,n(0,a)},r]}class kk extends eg{constructor(e){super(),Yh(this,e,_k,yk,Qf,{label:1,checked:0,helpContent:2,helpLink:3,disabled:4,disabledReason:5,required:6,error:7})}}function xk(e){const t=()=>{if(""===e.value)return;const t=window.getComputedStyle(e),n=wk(e.value,t),o=`calc(5px + max(${wk(e.placeholder,t)}, ${n}) + ${["padding-left","padding-right","border-left-width","border-right-width"].map(e=>t.getPropertyValue(e)).join(" + ")})`;e.style.setProperty("width",o)};t(),e.addEventListener("input",t)}function wk(e,t){const n=["font-size","font-family"].map(e=>t.getPropertyValue(e)).join(" "),o=document.createElement("canvas").getContext("2d");return o.font=n,o.measureText(e).width+"px"}function Ik(e){let t;return{c(){t=mh("The number of decimals to use for the contract. Defaults to 18.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ck(e){let t;return{c(){t=mh("Create an initial amount of tokens for the recipient.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Sk(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ek(e){let t;return{c(){t=mh("Wrap an existing ERC20 by depositing underlying tokens. The constructor requires the underlying token address\n and matching decimals.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function zk(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Tk(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function Dk(e){let t;return{c(){t=mh("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ok(e){let t;return{c(){t=mh("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Uk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y;return r=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[Dk]},$$scope:{ctx:e}}}),m=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[Ok]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("span"),o=mh("Application Name\n "),Wh(r.$$.fragment),i=fh(),a=dh("input"),l=fh(),u=dh("label"),d=dh("span"),p=mh("Application Version\n "),Wh(m.$$.fragment),f=fh(),h=dh("input"),vh(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].votes,vh(t,"class","labeled-input"),vh(d,"class","flex justify-between pr-2"),h.disabled=g=!e[0].votes,vh(u,"class","labeled-input")},m(s,g){lh(s,t,g),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),_h(a,e[0].appName),lh(s,l,g),lh(s,u,g),sh(u,d),sh(d,p),Kh(m,d,null),sh(u,f),sh(u,h),_h(h,e[0].appVersion),b=!0,$||(y=[gh(a,"input",e[16]),ah(c=B_.call(null,a,e[1]?.appName)),gh(h,"input",e[17]),ah(v=B_.call(null,h,e[1]?.appVersion))],$=!0)},p(e,t){const n={};8&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t[0]&&s!==(s=!e[0].votes))&&(a.disabled=s),1&t[0]&&a.value!==e[0].appName&&_h(a,e[0].appName),c&&Xf(c.update)&&2&t[0]&&c.update.call(null,e[1]?.appName);const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t[0]&&g!==(g=!e[0].votes))&&(h.disabled=g),1&t[0]&&h.value!==e[0].appVersion&&_h(h,e[0].appVersion),v&&Xf(v.update)&&2&t[0]&&v.update.call(null,e[1]?.appVersion)},i(e){b||(Jh(r.$$.fragment,e),Jh(m.$$.fragment,e),b=!0)},o(e){Gh(r.$$.fragment,e),Gh(m.$$.fragment,e),b=!1},d(e){e&&uh(t),Xh(r),e&&uh(l),e&&uh(u),Xh(m),$=!1,Kf(y)}}}function Rk(e){let t;return{c(){t=mh("Maximum amount of tokens that can be flash-loaned in a single call.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ak(e){let t;return{c(){t=mh("Inherits the default: the maximum representable amount minus the current total supply.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Nk(e){let t,n,o,r,i;return{c(){t=dh("input"),vh(t,"class","input-inline ml-2"),kh(t,"max-width","8rem"),t.disabled=n=!e[0].flashmint.enabled,vh(t,"pattern",Yv.source)},m(n,a){lh(n,t,a),_h(t,e[0].flashmint.maxAmount),r||(i=[gh(t,"input",e[19]),ah(o=B_.call(null,t,e[1]?.flashMintMaxAmount)),ah(xk.call(null,t))],r=!0)},p(e,r){1&r[0]&&n!==(n=!e[0].flashmint.enabled)&&(t.disabled=n),1&r[0]&&t.value!==e[0].flashmint.maxAmount&&_h(t,e[0].flashmint.maxAmount),o&&Xf(o.update)&&2&r[0]&&o.update.call(null,e[1]?.flashMintMaxAmount)},d(e){e&&uh(t),r=!1,Kf(i)}}}function jk(e){let t;return{c(){t=mh("A fixed non-negative cap. Setting it to 0 effectively disables flash loans.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Pk(e){let t;return{c(){t=mh("Fee charged for each flash loan.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Mk(e){let t,n,o,r,i,a,s,c;return{c(){t=dh("span"),n=dh("input"),i=fh(),a=dh("span"),a.textContent="%",vh(n,"class","input-inline"),kh(n,"max-width","6.5rem"),vh(n,"type","text"),n.disabled=o=!e[0].flashmint.enabled,vh(n,"pattern",Yv.source),vh(n,"placeholder","0"),vh(a,"class","ml-1"),vh(t,"class","ml-2 flex items-center")},m(o,l){lh(o,t,l),sh(t,n),_h(n,e[0].flashmint.feePercent),sh(t,i),sh(t,a),s||(c=[gh(n,"input",e[22]),gh(n,"input",e[6]),ah(r=B_.call(null,n,e[1]?.flashMintFeePercent)),ah(xk.call(null,n))],s=!0)},p(e,t){1&t[0]&&o!==(o=!e[0].flashmint.enabled)&&(n.disabled=o),1&t[0]&&n.value!==e[0].flashmint.feePercent&&_h(n,e[0].flashmint.feePercent),r&&Xf(r.update)&&2&t[0]&&r.update.call(null,e[1]?.flashMintFeePercent)},d(e){e&&uh(t),s=!1,Kf(c)}}}function Zk(e){let t;return{c(){t=mh("Charges a percentage of the loan amount.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function qk(e){let t;return{c(){t=mh("Emits a TODO stub for you to implement the fee logic manually.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Lk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x;return r=new C_({props:{$$slots:{default:[Fk]},$$scope:{ctx:e}}}),p=new C_({props:{$$slots:{default:[Vk]},$$scope:{ctx:e}}}),$=new C_({props:{$$slots:{default:[Hk]},$$scope:{ctx:e}}}),_=bh(e[21][0]),{c(){t=dh("div"),n=dh("span"),o=mh("Flash Fee Destination\n "),Wh(r.$$.fragment),i=fh(),a=dh("div"),s=dh("label"),c=dh("input"),u=mh("\n Burn\n "),d=dh("span"),Wh(p.$$.fragment),m=fh(),f=dh("label"),h=dh("input"),v=mh("\n Fee receiver\n "),b=dh("span"),Wh($.$$.fragment),vh(n,"class","flex justify-between items-center pr-2 mb-1"),vh(c,"type","radio"),c.__value="burn",c.value=c.__value,c.disabled=l=!e[0].flashmint.enabled,vh(d,"class","ml-auto flex items-center"),xh(s,"checked","burn"===e[0].flashmint.feeDestination),vh(h,"type","radio"),h.__value="fee_receiver",h.value=h.__value,h.disabled=g=!e[0].flashmint.enabled,vh(b,"class","ml-auto flex items-center"),xh(f,"checked","fee_receiver"===e[0].flashmint.feeDestination),vh(a,"class","checkbox-group"),vh(t,"class","tooltip-container"),_.p(c,h)},m(l,g){lh(l,t,g),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),sh(a,s),sh(s,c),c.checked=c.__value===e[0].flashmint.feeDestination,sh(s,u),sh(s,d),Kh(p,d,null),sh(a,m),sh(a,f),sh(f,h),h.checked=h.__value===e[0].flashmint.feeDestination,sh(f,v),sh(f,b),Kh($,b,null),y=!0,k||(x=[gh(c,"change",e[24]),gh(h,"change",e[25])],k=!0)},p(e,t){const n={};8&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!y||1&t[0]&&l!==(l=!e[0].flashmint.enabled))&&(c.disabled=l),1&t[0]&&(c.checked=c.__value===e[0].flashmint.feeDestination);const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),p.$set(o),(!y||1&t[0])&&xh(s,"checked","burn"===e[0].flashmint.feeDestination),(!y||1&t[0]&&g!==(g=!e[0].flashmint.enabled))&&(h.disabled=g),1&t[0]&&(h.checked=h.__value===e[0].flashmint.feeDestination);const i={};8&t[1]&&(i.$$scope={dirty:t,ctx:e}),$.$set(i),(!y||1&t[0])&&xh(f,"checked","fee_receiver"===e[0].flashmint.feeDestination)},i(e){y||(Jh(r.$$.fragment,e),Jh(p.$$.fragment,e),Jh($.$$.fragment,e),y=!0)},o(e){Gh(r.$$.fragment,e),Gh(p.$$.fragment,e),Gh($.$$.fragment,e),y=!1},d(e){e&&uh(t),Xh(r),Xh(p),Xh($),_.r(),k=!1,Kf(x)}}}function Fk(e){let t;return{c(){t=mh("Where the flash loan fee goes.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Vk(e){let t;return{c(){t=mh("The flash loan fee is sent to the zero address and effectively burnt.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Hk(e){let t;return{c(){t=mh("Adds a constructor argument for the fee receiver. The deployer provides the address at deployment, the\n contract validates that it is non-zero and stores it on-chain.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Jk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W;r=new C_({props:{$$slots:{default:[Rk]},$$scope:{ctx:e}}}),m=new C_({props:{$$slots:{default:[Ak]},$$scope:{ctx:e}}});let K="max"!==e[0].flashmint.maxAmount&&Nk(e);k=new C_({props:{$$slots:{default:[jk]},$$scope:{ctx:e}}}),S=new C_({props:{$$slots:{default:[Pk]},$$scope:{ctx:e}}});let X="percent"===e[0].flashmint.feeMode&&Mk(e);N=new C_({props:{$$slots:{default:[Zk]},$$scope:{ctx:e}}}),F=new C_({props:{$$slots:{default:[qk]},$$scope:{ctx:e}}});let Q=e[2]&&Lk(e);return G=bh(e[21][1]),{c(){t=dh("div"),n=dh("span"),o=mh("Max Flash Loan\n "),Wh(r.$$.fragment),i=fh(),a=dh("div"),s=dh("label"),c=dh("input"),d=mh("\n Max\n "),p=dh("span"),Wh(m.$$.fragment),f=fh(),h=dh("label"),g=dh("input"),$=mh("\n Custom\n "),K&&K.c(),y=fh(),_=dh("span"),Wh(k.$$.fragment),x=fh(),w=dh("div"),I=dh("span"),C=mh("Flash Fee\n "),Wh(S.$$.fragment),E=fh(),z=dh("div"),T=dh("label"),D=dh("input"),U=mh("\n Percent\n "),X&&X.c(),R=fh(),A=dh("span"),Wh(N.$$.fragment),j=fh(),P=dh("label"),M=dh("input"),q=mh("\n Custom\n "),L=dh("span"),Wh(F.$$.fragment),V=fh(),Q&&Q.c(),H=hh(),vh(n,"class","flex justify-between items-center pr-2 mb-1"),vh(c,"type","radio"),vh(c,"name","flash-mint-max-amount-mode"),c.checked=l="max"===e[0].flashmint.maxAmount,c.disabled=u=!e[0].flashmint.enabled,vh(p,"class","ml-auto flex items-center"),xh(s,"checked","max"===e[0].flashmint.maxAmount),vh(g,"type","radio"),vh(g,"name","flash-mint-max-amount-mode"),g.checked=v="max"!==e[0].flashmint.maxAmount,g.disabled=b=!e[0].flashmint.enabled,vh(_,"class","ml-auto flex items-center"),xh(h,"checked","max"!==e[0].flashmint.maxAmount),vh(a,"class","checkbox-group"),vh(t,"class","tooltip-container"),vh(I,"class","flex justify-between items-center pr-2 mb-1"),vh(D,"type","radio"),D.__value="percent",D.value=D.__value,D.disabled=O=!e[0].flashmint.enabled,vh(A,"class","ml-auto flex items-center"),xh(T,"checked","percent"===e[0].flashmint.feeMode),vh(M,"type","radio"),M.__value="custom",M.value=M.__value,M.disabled=Z=!e[0].flashmint.enabled,vh(L,"class","ml-auto flex items-center"),xh(P,"checked","custom"===e[0].flashmint.feeMode),vh(z,"class","checkbox-group"),vh(w,"class","tooltip-container"),G.p(D,M)},m(l,u){lh(l,t,u),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),sh(a,s),sh(s,c),sh(s,d),sh(s,p),Kh(m,p,null),sh(a,f),sh(a,h),sh(h,g),sh(h,$),K&&K.m(h,null),sh(h,y),sh(h,_),Kh(k,_,null),lh(l,x,u),lh(l,w,u),sh(w,I),sh(I,C),Kh(S,I,null),sh(w,E),sh(w,z),sh(z,T),sh(T,D),D.checked=D.__value===e[0].flashmint.feeMode,sh(T,U),X&&X.m(T,null),sh(T,R),sh(T,A),Kh(N,A,null),sh(z,j),sh(z,P),sh(P,M),M.checked=M.__value===e[0].flashmint.feeMode,sh(P,q),sh(P,L),Kh(F,L,null),lh(l,V,u),Q&&Q.m(l,u),lh(l,H,u),J=!0,B||(W=[gh(c,"change",e[4]),gh(g,"change",e[5]),gh(D,"change",e[20]),gh(M,"change",e[23])],B=!0)},p(e,t){const n={};8&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!J||1&t[0]&&l!==(l="max"===e[0].flashmint.maxAmount))&&(c.checked=l),(!J||1&t[0]&&u!==(u=!e[0].flashmint.enabled))&&(c.disabled=u);const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!J||1&t[0])&&xh(s,"checked","max"===e[0].flashmint.maxAmount),(!J||1&t[0]&&v!==(v="max"!==e[0].flashmint.maxAmount))&&(g.checked=v),(!J||1&t[0]&&b!==(b=!e[0].flashmint.enabled))&&(g.disabled=b),"max"!==e[0].flashmint.maxAmount?K?K.p(e,t):(K=Nk(e),K.c(),K.m(h,y)):K&&(K.d(1),K=null);const i={};8&t[1]&&(i.$$scope={dirty:t,ctx:e}),k.$set(i),(!J||1&t[0])&&xh(h,"checked","max"!==e[0].flashmint.maxAmount);const a={};8&t[1]&&(a.$$scope={dirty:t,ctx:e}),S.$set(a),(!J||1&t[0]&&O!==(O=!e[0].flashmint.enabled))&&(D.disabled=O),1&t[0]&&(D.checked=D.__value===e[0].flashmint.feeMode),"percent"===e[0].flashmint.feeMode?X?X.p(e,t):(X=Mk(e),X.c(),X.m(T,R)):X&&(X.d(1),X=null);const d={};8&t[1]&&(d.$$scope={dirty:t,ctx:e}),N.$set(d),(!J||1&t[0])&&xh(T,"checked","percent"===e[0].flashmint.feeMode),(!J||1&t[0]&&Z!==(Z=!e[0].flashmint.enabled))&&(M.disabled=Z),1&t[0]&&(M.checked=M.__value===e[0].flashmint.feeMode);const p={};8&t[1]&&(p.$$scope={dirty:t,ctx:e}),F.$set(p),(!J||1&t[0])&&xh(P,"checked","custom"===e[0].flashmint.feeMode),e[2]?Q?(Q.p(e,t),4&t[0]&&Jh(Q,1)):(Q=Lk(e),Q.c(),Jh(Q,1),Q.m(H.parentNode,H)):Q&&(Vh(),Gh(Q,1,1,()=>{Q=null}),Hh())},i(e){J||(Jh(r.$$.fragment,e),Jh(m.$$.fragment,e),Jh(k.$$.fragment,e),Jh(S.$$.fragment,e),Jh(N.$$.fragment,e),Jh(F.$$.fragment,e),Jh(Q),J=!0)},o(e){Gh(r.$$.fragment,e),Gh(m.$$.fragment,e),Gh(k.$$.fragment,e),Gh(S.$$.fragment,e),Gh(N.$$.fragment,e),Gh(F.$$.fragment,e),Gh(Q),J=!1},d(e){e&&uh(t),Xh(r),Xh(m),K&&K.d(),Xh(k),e&&uh(x),e&&uh(w),Xh(S),X&&X.d(),Xh(N),Xh(F),e&&uh(V),Q&&Q.d(e),e&&uh(H),G.r(),B=!1,Kf(W)}}}function Gk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,he,ge,ve,be,$e,ye,_e,ke,xe,we,Ie;function Ce(t){e[15](t)}y=new C_({props:{$$slots:{default:[Ik]},$$scope:{ctx:e}}}),E=new C_({props:{$$slots:{default:[Ck]},$$scope:{ctx:e}}}),Z=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/erc20-supply",$$slots:{default:[Sk]},$$scope:{ctx:e}}}),H=new C_({props:{$$slots:{default:[Ek]},$$scope:{ctx:e}}}),K=new C_({props:{$$slots:{default:[zk]},$$scope:{ctx:e}}}),te=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[Tk]},$$scope:{ctx:e}}});let Se={};function Ee(t){e[18](t)}void 0!==e[0].upgradeable&&(Se.upgradeable=e[0].upgradeable),oe=new lk({props:Se}),Dh.push(()=>Bh(oe,"upgradeable",Ce));let ze={label:"Votes",helpContent:"Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/4.x/governance/votes",error:e[1]?.appName||e[1]?.appVersion,$$slots:{default:[Uk]},$$scope:{ctx:e}};function Te(t){e[26](t)}void 0!==e[0].votes&&(ze.checked=e[0].votes),ae=new kk({props:ze}),Dh.push(()=>Bh(ae,"checked",Ee));let De={label:"Flash Mint",helpContent:"Allow flash loans of tokens compliant with ERC-3156.",error:e[1]?.flashMintMaxAmount||e[1]?.flashMintFeePercent,$$slots:{default:[Jk]},$$scope:{ctx:e}};function Oe(t){e[27](t)}function Ue(t){e[28](t)}function Re(t){e[29](t)}function Ae(t){e[30](t)}void 0!==e[0].flashmint.enabled&&(De.checked=e[0].flashmint.enabled),le=new kk({props:De}),Dh.push(()=>Bh(le,"checked",Te));let Ne={required:e[3],errors:e[1]};function je(t){e[31](t)}void 0!==e[0].access.type&&(Ne.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(Ne.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(Ne.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(Ne.darMaxTransferDelay=e[0].access.darMaxTransferDelay),pe=new ik({props:Ne}),Dh.push(()=>Bh(pe,"accessType",Oe)),Dh.push(()=>Bh(pe,"darInitialDelay",Ue)),Dh.push(()=>Bh(pe,"darDefaultDelayIncrease",Re)),Dh.push(()=>Bh(pe,"darMaxTransferDelay",Ae));let Pe={};function Me(t){e[32](t)}void 0!==e[0].macros&&(Pe.macros=e[0].macros),be=new bk({props:Pe}),Dh.push(()=>Bh(be,"macros",je));let Ze={errors:e[1]};return void 0!==e[0].info&&(Ze.info=e[0].info),_e=new mk({props:Ze}),Dh.push(()=>Bh(_e,"info",Me)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("div"),i=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),c=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),$=mh("Decimals\n "),Wh(y.$$.fragment),_=fh(),k=dh("input"),w=fh(),I=dh("label"),C=dh("span"),S=mh("Premint\n "),Wh(E.$$.fragment),z=fh(),T=dh("input"),O=fh(),U=dh("section"),R=dh("h1"),R.textContent="Features",A=fh(),N=dh("div"),j=dh("label"),P=dh("input"),M=mh("\n Mintable\n "),Wh(Z.$$.fragment),q=fh(),L=dh("label"),F=dh("input"),V=mh("\n Wrapper\n "),Wh(H.$$.fragment),J=fh(),G=dh("label"),B=dh("input"),W=mh("\n Burnable\n "),Wh(K.$$.fragment),X=fh(),Q=dh("label"),Y=dh("input"),ee=mh("\n Pausable\n "),Wh(te.$$.fragment),ne=fh(),Wh(oe.$$.fragment),ie=fh(),Wh(ae.$$.fragment),ce=fh(),Wh(le.$$.fragment),de=fh(),Wh(pe.$$.fragment),ve=fh(),Wh(be.$$.fragment),ye=fh(),Wh(_e.$$.fragment),vh(i,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(v,"class","labeled-input"),vh(C,"class","flex justify-between pr-2"),vh(T,"placeholder","0"),vh(T,"pattern",Yv.source),vh(I,"class","labeled-input"),vh(t,"class","controls-section"),vh(P,"type","checkbox"),xh(j,"checked",e[0].mintable),vh(F,"type","checkbox"),xh(L,"checked",e[0].wrapper),vh(B,"type","checkbox"),xh(G,"checked",e[0].burnable),vh(Y,"type","checkbox"),xh(Q,"checked",e[0].pausable),vh(N,"class","checkbox-group"),vh(U,"class","controls-section")},m(re,se){lh(re,t,se),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(i,a),sh(i,s),sh(i,c),_h(c,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),_h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,$),Kh(y,b,null),sh(v,_),sh(v,k),_h(k,e[0].decimals),sh(t,w),sh(t,I),sh(I,C),sh(C,S),Kh(E,C,null),sh(I,z),sh(I,T),_h(T,e[0].premint),lh(re,O,se),lh(re,U,se),sh(U,R),sh(U,A),sh(U,N),sh(N,j),sh(j,P),P.checked=e[0].mintable,sh(j,M),Kh(Z,j,null),sh(N,q),sh(N,L),sh(L,F),F.checked=e[0].wrapper,sh(L,V),Kh(H,L,null),sh(N,J),sh(N,G),sh(G,B),B.checked=e[0].burnable,sh(G,W),Kh(K,G,null),sh(N,X),sh(N,Q),sh(Q,Y),Y.checked=e[0].pausable,sh(Q,ee),Kh(te,Q,null),sh(N,ne),Kh(oe,N,null),lh(re,ie,se),Kh(ae,re,se),lh(re,ce,se),Kh(le,re,se),lh(re,de,se),Kh(pe,re,se),lh(re,ve,se),Kh(be,re,se),lh(re,ye,se),Kh(_e,re,se),xe=!0,we||(Ie=[gh(c,"input",e[7]),ah(l=B_.call(null,c,e[1]?.name)),gh(f,"input",e[8]),ah(h=B_.call(null,f,e[1]?.symbol)),gh(k,"input",e[9]),ah(x=B_.call(null,k,e[1]?.decimals)),gh(T,"input",e[10]),ah(D=B_.call(null,T,e[1]?.premint)),gh(P,"change",e[11]),gh(F,"change",e[12]),gh(B,"change",e[13]),gh(Y,"change",e[14])],we=!0)},p(e,t){1&t[0]&&c.value!==e[0].name&&_h(c,e[0].name),l&&Xf(l.update)&&2&t[0]&&l.update.call(null,e[1]?.name),1&t[0]&&f.value!==e[0].symbol&&_h(f,e[0].symbol),h&&Xf(h.update)&&2&t[0]&&h.update.call(null,e[1]?.symbol);const n={};8&t[1]&&(n.$$scope={dirty:t,ctx:e}),y.$set(n),1&t[0]&&k.value!==e[0].decimals&&_h(k,e[0].decimals),x&&Xf(x.update)&&2&t[0]&&x.update.call(null,e[1]?.decimals);const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),E.$set(o),1&t[0]&&T.value!==e[0].premint&&_h(T,e[0].premint),D&&Xf(D.update)&&2&t[0]&&D.update.call(null,e[1]?.premint),1&t[0]&&(P.checked=e[0].mintable);const r={};8&t[1]&&(r.$$scope={dirty:t,ctx:e}),Z.$set(r),(!xe||1&t[0])&&xh(j,"checked",e[0].mintable),1&t[0]&&(F.checked=e[0].wrapper);const i={};8&t[1]&&(i.$$scope={dirty:t,ctx:e}),H.$set(i),(!xe||1&t[0])&&xh(L,"checked",e[0].wrapper),1&t[0]&&(B.checked=e[0].burnable);const a={};8&t[1]&&(a.$$scope={dirty:t,ctx:e}),K.$set(a),(!xe||1&t[0])&&xh(G,"checked",e[0].burnable),1&t[0]&&(Y.checked=e[0].pausable);const s={};8&t[1]&&(s.$$scope={dirty:t,ctx:e}),te.$set(s),(!xe||1&t[0])&&xh(Q,"checked",e[0].pausable);const u={};!re&&1&t[0]&&(re=!0,u.upgradeable=e[0].upgradeable,jh(()=>re=!1)),oe.$set(u);const d={};2&t[0]&&(d.error=e[1]?.appName||e[1]?.appVersion),3&t[0]|8&t[1]&&(d.$$scope={dirty:t,ctx:e}),!se&&1&t[0]&&(se=!0,d.checked=e[0].votes,jh(()=>se=!1)),ae.$set(d);const p={};2&t[0]&&(p.error=e[1]?.flashMintMaxAmount||e[1]?.flashMintFeePercent),7&t[0]|8&t[1]&&(p.$$scope={dirty:t,ctx:e}),!ue&&1&t[0]&&(ue=!0,p.checked=e[0].flashmint.enabled,jh(()=>ue=!1)),le.$set(p);const m={};8&t[0]&&(m.required=e[3]),2&t[0]&&(m.errors=e[1]),!me&&1&t[0]&&(me=!0,m.accessType=e[0].access.type,jh(()=>me=!1)),!fe&&1&t[0]&&(fe=!0,m.darInitialDelay=e[0].access.darInitialDelay,jh(()=>fe=!1)),!he&&1&t[0]&&(he=!0,m.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>he=!1)),!ge&&1&t[0]&&(ge=!0,m.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>ge=!1)),pe.$set(m);const g={};!$e&&1&t[0]&&($e=!0,g.macros=e[0].macros,jh(()=>$e=!1)),be.$set(g);const v={};2&t[0]&&(v.errors=e[1]),!ke&&1&t[0]&&(ke=!0,v.info=e[0].info,jh(()=>ke=!1)),_e.$set(v)},i(e){xe||(Jh(y.$$.fragment,e),Jh(E.$$.fragment,e),Jh(Z.$$.fragment,e),Jh(H.$$.fragment,e),Jh(K.$$.fragment,e),Jh(te.$$.fragment,e),Jh(oe.$$.fragment,e),Jh(ae.$$.fragment,e),Jh(le.$$.fragment,e),Jh(pe.$$.fragment,e),Jh(be.$$.fragment,e),Jh(_e.$$.fragment,e),xe=!0)},o(e){Gh(y.$$.fragment,e),Gh(E.$$.fragment,e),Gh(Z.$$.fragment,e),Gh(H.$$.fragment,e),Gh(K.$$.fragment,e),Gh(te.$$.fragment,e),Gh(oe.$$.fragment,e),Gh(ae.$$.fragment,e),Gh(le.$$.fragment,e),Gh(pe.$$.fragment,e),Gh(be.$$.fragment,e),Gh(_e.$$.fragment,e),xe=!1},d(e){e&&uh(t),Xh(y),Xh(E),e&&uh(O),e&&uh(U),Xh(Z),Xh(H),Xh(K),Xh(te),Xh(oe),e&&uh(ie),Xh(ae,e),e&&uh(ce),Xh(le,e),e&&uh(de),Xh(pe,e),e&&uh(ve),Xh(be,e),e&&uh(ye),Xh(_e,e),we=!1,Kf(Ie)}}}function Bk(e,t,n){let o,r,{opts:i={kind:"ERC20",...qb.defaults,premint:"",info:{...uv},macros:{...pv},access:{...qb.defaults.access},flashmint:{...Kv}}}=t,{errors:a}=t,s="max"===i.flashmint.maxAmount?"0":i.flashmint.maxAmount;return e.$$set=e=>{"opts"in e&&n(0,i=e.opts),"errors"in e&&n(1,a=e.errors)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(3,o=qb.isAccessControlRequired(i)),1&e.$$.dirty[0]&&n(2,r=i.flashmint.enabled&&function(e){switch(e.feeMode){case"percent":return parseFloat(e.feePercent||"0")>0;case"custom":return!0}}(i.flashmint)),1&e.$$.dirty[0]&&"max"!==i.flashmint.maxAmount&&(s=i.flashmint.maxAmount)},[i,a,r,o,function(){n(0,i.flashmint.maxAmount="max",i)},function(){n(0,i.flashmint.maxAmount=s,i)},function(e){parseFloat(e.currentTarget.value)>100&&n(0,i.flashmint.feePercent="100",i)},function(){i.name=this.value,n(0,i)},function(){i.symbol=this.value,n(0,i)},function(){i.decimals=this.value,n(0,i)},function(){i.premint=this.value,n(0,i)},function(){i.mintable=this.checked,n(0,i)},function(){i.wrapper=this.checked,n(0,i)},function(){i.burnable=this.checked,n(0,i)},function(){i.pausable=this.checked,n(0,i)},function(t){e.$$.not_equal(i.upgradeable,t)&&(i.upgradeable=t,n(0,i))},function(){i.appName=this.value,n(0,i)},function(){i.appVersion=this.value,n(0,i)},function(t){e.$$.not_equal(i.votes,t)&&(i.votes=t,n(0,i))},function(){i.flashmint.maxAmount=this.value,n(0,i)},function(){i.flashmint.feeMode=this.__value,n(0,i)},[[],[]],function(){i.flashmint.feePercent=this.value,n(0,i)},function(){i.flashmint.feeMode=this.__value,n(0,i)},function(){i.flashmint.feeDestination=this.__value,n(0,i)},function(){i.flashmint.feeDestination=this.__value,n(0,i)},function(t){e.$$.not_equal(i.flashmint.enabled,t)&&(i.flashmint.enabled=t,n(0,i))},function(t){e.$$.not_equal(i.access.type,t)&&(i.access.type=t,n(0,i))},function(t){e.$$.not_equal(i.access.darInitialDelay,t)&&(i.access.darInitialDelay=t,n(0,i))},function(t){e.$$.not_equal(i.access.darDefaultDelayIncrease,t)&&(i.access.darDefaultDelayIncrease=t,n(0,i))},function(t){e.$$.not_equal(i.access.darMaxTransferDelay,t)&&(i.access.darMaxTransferDelay=t,n(0,i))},function(t){e.$$.not_equal(i.macros,t)&&(i.macros=t,n(0,i))},function(t){e.$$.not_equal(i.info,t)&&(i.info=t,n(0,i))}]}function Wk(e){let t;return{c(){t=mh("The royalty fraction that will be default for all tokens. It will be used for a token if there's no custom\n royalty fraction set for it.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Kk(e){let t;return{c(){t=mh("The denominator used to interpret a token's fee and to calculate the result fee fraction.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Xk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y;return r=new C_({props:{$$slots:{default:[Wk]},$$scope:{ctx:e}}}),m=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/token_common#ERC2981Component-IC-FEE_DENOMINATOR",$$slots:{default:[Kk]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("span"),o=mh("Default Royalty Fraction\n "),Wh(r.$$.fragment),i=fh(),a=dh("input"),l=fh(),u=dh("label"),d=dh("span"),p=mh("Fee Denominator\n "),Wh(m.$$.fragment),f=fh(),h=dh("input"),vh(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].enabled,vh(t,"class","labeled-input"),vh(d,"class","flex justify-between pr-2"),h.disabled=g=!e[0].enabled,vh(u,"class","labeled-input")},m(s,g){lh(s,t,g),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),_h(a,e[0].defaultRoyaltyFraction),lh(s,l,g),lh(s,u,g),sh(u,d),sh(d,p),Kh(m,d,null),sh(u,f),sh(u,h),_h(h,e[0].feeDenominator),b=!0,$||(y=[gh(a,"input",e[2]),ah(c=B_.call(null,a,e[1]?.defaultRoyaltyFraction)),gh(h,"input",e[3]),ah(v=B_.call(null,h,e[1]?.feeDenominator))],$=!0)},p(e,t){const n={};32&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t&&s!==(s=!e[0].enabled))&&(a.disabled=s),1&t&&a.value!==e[0].defaultRoyaltyFraction&&_h(a,e[0].defaultRoyaltyFraction),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.defaultRoyaltyFraction);const o={};32&t&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t&&g!==(g=!e[0].enabled))&&(h.disabled=g),1&t&&h.value!==e[0].feeDenominator&&_h(h,e[0].feeDenominator),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.feeDenominator)},i(e){b||(Jh(r.$$.fragment,e),Jh(m.$$.fragment,e),b=!0)},o(e){Gh(r.$$.fragment,e),Gh(m.$$.fragment,e),b=!1},d(e){e&&uh(t),Xh(r),e&&uh(l),e&&uh(u),Xh(m),$=!1,Kf(y)}}}function Qk(e){let t,n,o;function r(t){e[4](t)}let i={label:"Royalty Info",helpContent:"Provides information for how much royalty is owed and to whom, based on a sale price. Follows ERC-2981 standard.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/token_common#ERC2981Component",error:e[1]?.defaultRoyaltyFraction||e[1]?.feeDenominator,$$slots:{default:[Xk]},$$scope:{ctx:e}};return void 0!==e[0].enabled&&(i.checked=e[0].enabled),t=new kk({props:i}),Dh.push(()=>Bh(t,"checked",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.error=e[1]?.defaultRoyaltyFraction||e[1]?.feeDenominator),35&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.checked=e[0].enabled,jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function Yk(e,t,n){let{opts:o}=t,{errors:r}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.defaultRoyaltyFraction=this.value,n(0,o)},function(){o.feeDenominator=this.value,n(0,o)},function(t){e.$$.not_equal(o.enabled,t)&&(o.enabled=t,n(0,o))}]}class ex extends eg{constructor(e){super(),Yh(this,e,Yk,Qk,Qf,{opts:0,errors:1})}}function tx(e){let t;return{c(){t=mh("Will be concatenated with token IDs to generate the token URIs.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function nx(e){let t;return{c(){t=mh("Privileged accounts will be able to emit new tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ox(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function rx(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function ix(e){let t;return{c(){t=mh("Allows a contract to publish its entire list of NFTs and make them discoverable by keeping track of all token\n ids and all tokens owned by an address.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ax(e){let t,n,o;return{c(){t=mh("Enables gas-efficient batch minting of consecutive token IDs (ERC-2309). Call "),n=dh("code"),n.textContent="self.erc721_consecutive.mint_consecutive(recipient, batch_size)",o=mh(" from the constructor to issue the initial batch. Cannot be combined with Enumerable.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function sx(e){let t;return{c(){t=mh("Wrap an existing ERC721 by depositing underlying token IDs and minting matching wrapped tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function cx(e){let t;return{c(){t=mh("Allows updating token URIs for individual token IDs.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function lx(e){let t;return{c(){t=mh("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ux(e){let t;return{c(){t=mh("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function dx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y;return r=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[lx]},$$scope:{ctx:e}}}),m=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[ux]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("span"),o=mh("Application Name\n "),Wh(r.$$.fragment),i=fh(),a=dh("input"),l=fh(),u=dh("label"),d=dh("span"),p=mh("Application Version\n "),Wh(m.$$.fragment),f=fh(),h=dh("input"),vh(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].votes,vh(t,"class","labeled-input"),vh(d,"class","flex justify-between pr-2"),h.disabled=g=!e[0].votes,vh(u,"class","labeled-input")},m(s,g){lh(s,t,g),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),_h(a,e[0].appName),lh(s,l,g),lh(s,u,g),sh(u,d),sh(d,p),Kh(m,d,null),sh(u,f),sh(u,h),_h(h,e[0].appVersion),b=!0,$||(y=[gh(a,"input",e[14]),ah(c=B_.call(null,a,e[1]?.appName)),gh(h,"input",e[15]),ah(v=B_.call(null,h,e[1]?.appVersion))],$=!0)},p(e,t){const n={};16777216&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t&&s!==(s=!e[0].votes))&&(a.disabled=s),1&t&&a.value!==e[0].appName&&_h(a,e[0].appName),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.appName);const o={};16777216&t&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t&&g!==(g=!e[0].votes))&&(h.disabled=g),1&t&&h.value!==e[0].appVersion&&_h(h,e[0].appVersion),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.appVersion)},i(e){b||(Jh(r.$$.fragment,e),Jh(m.$$.fragment,e),b=!0)},o(e){Gh(r.$$.fragment,e),Gh(m.$$.fragment,e),b=!1},d(e){e&&uh(t),Xh(r),e&&uh(l),e&&uh(u),Xh(m),$=!1,Kf(y)}}}function px(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,he,ge,ve,be,$e,ye,_e,ke,xe,we,Ie,Ce,Se,Ee,ze,Te,De,Oe,Ue;function Re(t){e[13](t)}y=new C_({props:{$$slots:{default:[tx]},$$scope:{ctx:e}}}),D=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/erc721",$$slots:{default:[nx]},$$scope:{ctx:e}}}),N=new C_({props:{$$slots:{default:[ox]},$$scope:{ctx:e}}}),q=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[rx]},$$scope:{ctx:e}}}),G=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/erc721#ERC721EnumerableComponent",$$slots:{default:[ix]},$$scope:{ctx:e}}}),Y=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/erc721#ERC721ConsecutiveComponent",$$slots:{default:[ax]},$$scope:{ctx:e}}}),re=new C_({props:{$$slots:{default:[sx]},$$scope:{ctx:e}}}),le=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/erc721#ERC721URIStorageComponent",$$slots:{default:[cx]},$$scope:{ctx:e}}});let Ae={};function Ne(t){e[16](t)}void 0!==e[0].upgradeable&&(Ae.upgradeable=e[0].upgradeable),de=new lk({props:Ae}),Dh.push(()=>Bh(de,"upgradeable",Re));let je={label:"Votes",helpContent:"Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/4.x/governance/votes",error:e[1]?.appName||e[1]?.appVersion,$$slots:{default:[dx]},$$scope:{ctx:e}};function Pe(t){e[17](t)}void 0!==e[0].votes&&(je.checked=e[0].votes),fe=new kk({props:je}),Dh.push(()=>Bh(fe,"checked",Ne));let Me={errors:e[1]};function Ze(t){e[18](t)}function qe(t){e[19](t)}function Le(t){e[20](t)}function Fe(t){e[21](t)}void 0!==e[0].royaltyInfo&&(Me.opts=e[0].royaltyInfo),ve=new ex({props:Me}),Dh.push(()=>Bh(ve,"opts",Pe));let Ve={required:e[2],errors:e[1]};function He(t){e[22](t)}void 0!==e[0].access.type&&(Ve.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(Ve.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(Ve.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(Ve.darMaxTransferDelay=e[0].access.darMaxTransferDelay),ye=new ik({props:Ve}),Dh.push(()=>Bh(ye,"accessType",Ze)),Dh.push(()=>Bh(ye,"darInitialDelay",qe)),Dh.push(()=>Bh(ye,"darDefaultDelayIncrease",Le)),Dh.push(()=>Bh(ye,"darMaxTransferDelay",Fe));let Je={};function Ge(t){e[23](t)}void 0!==e[0].macros&&(Je.macros=e[0].macros),Ce=new bk({props:Je}),Dh.push(()=>Bh(Ce,"macros",He));let Be={errors:e[1]};return void 0!==e[0].info&&(Be.info=e[0].info),ze=new mk({props:Be}),Dh.push(()=>Bh(ze,"info",Ge)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("div"),i=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),c=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),$=mh("Base URI\n "),Wh(y.$$.fragment),_=fh(),k=dh("input"),x=fh(),w=dh("section"),I=dh("h1"),I.textContent="Features",C=fh(),S=dh("div"),E=dh("label"),z=dh("input"),T=mh("\n Mintable\n "),Wh(D.$$.fragment),O=fh(),U=dh("label"),R=dh("input"),A=mh("\n Burnable\n "),Wh(N.$$.fragment),j=fh(),P=dh("label"),M=dh("input"),Z=mh("\n Pausable\n "),Wh(q.$$.fragment),L=fh(),F=dh("label"),V=dh("input"),J=mh("\n Enumerable\n "),Wh(G.$$.fragment),B=fh(),W=dh("label"),K=dh("input"),Q=mh("\n Consecutive\n "),Wh(Y.$$.fragment),ee=fh(),te=dh("label"),ne=dh("input"),oe=mh("\n Wrapper\n "),Wh(re.$$.fragment),ie=fh(),ae=dh("label"),se=dh("input"),ce=mh("\n URI Storage\n "),Wh(le.$$.fragment),ue=fh(),Wh(de.$$.fragment),me=fh(),Wh(fe.$$.fragment),ge=fh(),Wh(ve.$$.fragment),$e=fh(),Wh(ye.$$.fragment),Ie=fh(),Wh(Ce.$$.fragment),Ee=fh(),Wh(ze.$$.fragment),vh(i,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(k,"placeholder","https://..."),vh(v,"class","labeled-input"),vh(t,"class","controls-section"),vh(z,"type","checkbox"),xh(E,"checked",e[0].mintable),vh(R,"type","checkbox"),xh(U,"checked",e[0].burnable),vh(M,"type","checkbox"),xh(P,"checked",e[0].pausable),vh(V,"type","checkbox"),xh(F,"checked",e[0].enumerable),vh(K,"type","checkbox"),xh(W,"checked",e[0].consecutive),vh(ne,"type","checkbox"),xh(te,"checked",e[0].wrapper),vh(se,"type","checkbox"),xh(ae,"checked",e[0].uriStorage),vh(S,"class","checkbox-group"),vh(w,"class","controls-section")},m(pe,he){lh(pe,t,he),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(i,a),sh(i,s),sh(i,c),_h(c,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),_h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,$),Kh(y,b,null),sh(v,_),sh(v,k),_h(k,e[0].baseUri),lh(pe,x,he),lh(pe,w,he),sh(w,I),sh(w,C),sh(w,S),sh(S,E),sh(E,z),z.checked=e[0].mintable,sh(E,T),Kh(D,E,null),sh(S,O),sh(S,U),sh(U,R),R.checked=e[0].burnable,sh(U,A),Kh(N,U,null),sh(S,j),sh(S,P),sh(P,M),M.checked=e[0].pausable,sh(P,Z),Kh(q,P,null),sh(S,L),sh(S,F),sh(F,V),V.checked=e[0].enumerable,sh(F,J),Kh(G,F,null),sh(S,B),sh(S,W),sh(W,K),K.checked=e[0].consecutive,sh(W,Q),Kh(Y,W,null),sh(S,ee),sh(S,te),sh(te,ne),ne.checked=e[0].wrapper,sh(te,oe),Kh(re,te,null),sh(S,ie),sh(S,ae),sh(ae,se),se.checked=e[0].uriStorage,sh(ae,ce),Kh(le,ae,null),sh(S,ue),Kh(de,S,null),lh(pe,me,he),Kh(fe,pe,he),lh(pe,ge,he),Kh(ve,pe,he),lh(pe,$e,he),Kh(ye,pe,he),lh(pe,Ie,he),Kh(Ce,pe,he),lh(pe,Ee,he),Kh(ze,pe,he),De=!0,Oe||(Ue=[gh(c,"input",e[3]),ah(l=B_.call(null,c,e[1]?.name)),gh(f,"input",e[4]),ah(h=B_.call(null,f,e[1]?.symbol)),gh(k,"input",e[5]),gh(z,"change",e[6]),gh(R,"change",e[7]),gh(M,"change",e[8]),gh(V,"change",e[9]),ah(H=B_.call(null,V,e[1]?.enumerable)),gh(K,"change",e[10]),ah(X=B_.call(null,K,e[1]?.consecutive)),gh(ne,"change",e[11]),gh(se,"change",e[12])],Oe=!0)},p(e,[t]){1&t&&c.value!==e[0].name&&_h(c,e[0].name),l&&Xf(l.update)&&2&t&&l.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&_h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};16777216&t&&(n.$$scope={dirty:t,ctx:e}),y.$set(n),1&t&&k.value!==e[0].baseUri&&_h(k,e[0].baseUri),1&t&&(z.checked=e[0].mintable);const o={};16777216&t&&(o.$$scope={dirty:t,ctx:e}),D.$set(o),(!De||1&t)&&xh(E,"checked",e[0].mintable),1&t&&(R.checked=e[0].burnable);const r={};16777216&t&&(r.$$scope={dirty:t,ctx:e}),N.$set(r),(!De||1&t)&&xh(U,"checked",e[0].burnable),1&t&&(M.checked=e[0].pausable);const i={};16777216&t&&(i.$$scope={dirty:t,ctx:e}),q.$set(i),(!De||1&t)&&xh(P,"checked",e[0].pausable),1&t&&(V.checked=e[0].enumerable),H&&Xf(H.update)&&2&t&&H.update.call(null,e[1]?.enumerable);const a={};16777216&t&&(a.$$scope={dirty:t,ctx:e}),G.$set(a),(!De||1&t)&&xh(F,"checked",e[0].enumerable),1&t&&(K.checked=e[0].consecutive),X&&Xf(X.update)&&2&t&&X.update.call(null,e[1]?.consecutive);const s={};16777216&t&&(s.$$scope={dirty:t,ctx:e}),Y.$set(s),(!De||1&t)&&xh(W,"checked",e[0].consecutive),1&t&&(ne.checked=e[0].wrapper);const u={};16777216&t&&(u.$$scope={dirty:t,ctx:e}),re.$set(u),(!De||1&t)&&xh(te,"checked",e[0].wrapper),1&t&&(se.checked=e[0].uriStorage);const d={};16777216&t&&(d.$$scope={dirty:t,ctx:e}),le.$set(d),(!De||1&t)&&xh(ae,"checked",e[0].uriStorage);const p={};!pe&&1&t&&(pe=!0,p.upgradeable=e[0].upgradeable,jh(()=>pe=!1)),de.$set(p);const m={};2&t&&(m.error=e[1]?.appName||e[1]?.appVersion),16777219&t&&(m.$$scope={dirty:t,ctx:e}),!he&&1&t&&(he=!0,m.checked=e[0].votes,jh(()=>he=!1)),fe.$set(m);const g={};2&t&&(g.errors=e[1]),!be&&1&t&&(be=!0,g.opts=e[0].royaltyInfo,jh(()=>be=!1)),ve.$set(g);const v={};4&t&&(v.required=e[2]),2&t&&(v.errors=e[1]),!_e&&1&t&&(_e=!0,v.accessType=e[0].access.type,jh(()=>_e=!1)),!ke&&1&t&&(ke=!0,v.darInitialDelay=e[0].access.darInitialDelay,jh(()=>ke=!1)),!xe&&1&t&&(xe=!0,v.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>xe=!1)),!we&&1&t&&(we=!0,v.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>we=!1)),ye.$set(v);const b={};!Se&&1&t&&(Se=!0,b.macros=e[0].macros,jh(()=>Se=!1)),Ce.$set(b);const $={};2&t&&($.errors=e[1]),!Te&&1&t&&(Te=!0,$.info=e[0].info,jh(()=>Te=!1)),ze.$set($)},i(e){De||(Jh(y.$$.fragment,e),Jh(D.$$.fragment,e),Jh(N.$$.fragment,e),Jh(q.$$.fragment,e),Jh(G.$$.fragment,e),Jh(Y.$$.fragment,e),Jh(re.$$.fragment,e),Jh(le.$$.fragment,e),Jh(de.$$.fragment,e),Jh(fe.$$.fragment,e),Jh(ve.$$.fragment,e),Jh(ye.$$.fragment,e),Jh(Ce.$$.fragment,e),Jh(ze.$$.fragment,e),De=!0)},o(e){Gh(y.$$.fragment,e),Gh(D.$$.fragment,e),Gh(N.$$.fragment,e),Gh(q.$$.fragment,e),Gh(G.$$.fragment,e),Gh(Y.$$.fragment,e),Gh(re.$$.fragment,e),Gh(le.$$.fragment,e),Gh(de.$$.fragment,e),Gh(fe.$$.fragment,e),Gh(ve.$$.fragment,e),Gh(ye.$$.fragment,e),Gh(Ce.$$.fragment,e),Gh(ze.$$.fragment,e),De=!1},d(e){e&&uh(t),Xh(y),e&&uh(x),e&&uh(w),Xh(D),Xh(N),Xh(q),Xh(G),Xh(Y),Xh(re),Xh(le),Xh(de),e&&uh(me),Xh(fe,e),e&&uh(ge),Xh(ve,e),e&&uh($e),Xh(ye,e),e&&uh(Ie),Xh(Ce,e),e&&uh(Ee),Xh(ze,e),Oe=!1,Kf(Ue)}}}function mx(e,t,n){let o,{opts:r={kind:"ERC721",...Lb.defaults,royaltyInfo:{...Lb.defaults.royaltyInfo},info:{...uv},macros:{...pv},access:{...Lb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Lb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.baseUri=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.enumerable=this.checked,n(0,r)},function(){r.consecutive=this.checked,n(0,r)},function(){r.wrapper=this.checked,n(0,r)},function(){r.uriStorage=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(){r.appName=this.value,n(0,r)},function(){r.appVersion=this.value,n(0,r)},function(t){e.$$.not_equal(r.votes,t)&&(r.votes=t,n(0,r))},function(t){e.$$.not_equal(r.royaltyInfo,t)&&(r.royaltyInfo=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function fx(e){let t,n,o;return{c(){t=mh("Location of the metadata. Clients will replace any instance of "),n=mh("{id}"),o=mh(" in this string with the tokenId.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function hx(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function gx(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function vx(e){let t;return{c(){t=mh("Keeps track of total supply of tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function bx(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function $x(e){let t;return{c(){t=mh("Allows updating token URIs for individual token IDs.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function yx(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to set a new URI for all token types. Clients will replace any instance of "),n=mh("{id}"),o=mh("\n in the URI with the tokenId.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function _x(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,he;function ge(t){e[11](t)}p=new C_({props:{$$slots:{default:[fx]},$$scope:{ctx:e}}}),x=new C_({props:{$$slots:{default:[hx]},$$scope:{ctx:e}}}),E=new C_({props:{$$slots:{default:[gx]},$$scope:{ctx:e}}}),U=new C_({props:{$$slots:{default:[vx]},$$scope:{ctx:e}}}),P=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[bx]},$$scope:{ctx:e}}}),F=new C_({props:{$$slots:{default:[$x]},$$scope:{ctx:e}}}),B=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/erc1155#ERC1155Component-set_base_uri",$$slots:{default:[yx]},$$scope:{ctx:e}}});let ve={};function be(t){e[12](t)}void 0!==e[0].upgradeable&&(ve.upgradeable=e[0].upgradeable),K=new lk({props:ve}),Dh.push(()=>Bh(K,"upgradeable",ge));let $e={errors:e[1]};function ye(t){e[13](t)}function _e(t){e[14](t)}function ke(t){e[15](t)}function xe(t){e[16](t)}void 0!==e[0].royaltyInfo&&($e.opts=e[0].royaltyInfo),Y=new ex({props:$e}),Dh.push(()=>Bh(Y,"opts",be));let we={required:e[2],errors:e[1]};function Ie(t){e[17](t)}void 0!==e[0].access.type&&(we.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(we.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(we.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(we.darMaxTransferDelay=e[0].access.darMaxTransferDelay),ne=new ik({props:we}),Dh.push(()=>Bh(ne,"accessType",ye)),Dh.push(()=>Bh(ne,"darInitialDelay",_e)),Dh.push(()=>Bh(ne,"darDefaultDelayIncrease",ke)),Dh.push(()=>Bh(ne,"darMaxTransferDelay",xe));let Ce={};function Se(t){e[18](t)}void 0!==e[0].macros&&(Ce.macros=e[0].macros),ce=new bk({props:Ce}),Dh.push(()=>Bh(ce,"macros",Ie));let Ee={errors:e[1]};return void 0!==e[0].info&&(Ee.info=e[0].info),de=new mk({props:Ee}),Dh.push(()=>Bh(de,"info",Se)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),c=fh(),l=dh("label"),u=dh("span"),d=mh("Base URI\n "),Wh(p.$$.fragment),m=fh(),f=dh("input"),h=fh(),g=dh("section"),v=dh("h1"),v.textContent="Features",b=fh(),$=dh("div"),y=dh("label"),_=dh("input"),k=mh("\n Mintable\n "),Wh(x.$$.fragment),w=fh(),I=dh("label"),C=dh("input"),S=mh("\n Burnable\n "),Wh(E.$$.fragment),z=fh(),T=dh("label"),D=dh("input"),O=mh("\n Supply Tracking\n "),Wh(U.$$.fragment),R=fh(),A=dh("label"),N=dh("input"),j=mh("\n Pausable\n "),Wh(P.$$.fragment),M=fh(),Z=dh("label"),q=dh("input"),L=mh("\n URI Storage\n "),Wh(F.$$.fragment),V=fh(),H=dh("label"),J=dh("input"),G=mh("\n Updatable URI\n "),Wh(B.$$.fragment),W=fh(),Wh(K.$$.fragment),Q=fh(),Wh(Y.$$.fragment),te=fh(),Wh(ne.$$.fragment),se=fh(),Wh(ce.$$.fragment),ue=fh(),Wh(de.$$.fragment),vh(r,"class","labeled-input"),vh(u,"class","flex justify-between pr-2"),vh(f,"placeholder","https://..."),vh(l,"class","labeled-input"),vh(t,"class","controls-section"),vh(_,"type","checkbox"),xh(y,"checked",e[0].mintable),vh(C,"type","checkbox"),xh(I,"checked",e[0].burnable),vh(D,"type","checkbox"),xh(T,"checked",e[0].supply),vh(N,"type","checkbox"),xh(A,"checked",e[0].pausable),vh(q,"type","checkbox"),xh(Z,"checked",e[0].uriStorage),vh(J,"type","checkbox"),xh(H,"checked",e[0].updatableUri),vh($,"class","checkbox-group"),vh(g,"class","controls-section")},m(X,ee){lh(X,t,ee),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,c),sh(t,l),sh(l,u),sh(u,d),Kh(p,u,null),sh(l,m),sh(l,f),_h(f,e[0].baseUri),lh(X,h,ee),lh(X,g,ee),sh(g,v),sh(g,b),sh(g,$),sh($,y),sh(y,_),_.checked=e[0].mintable,sh(y,k),Kh(x,y,null),sh($,w),sh($,I),sh(I,C),C.checked=e[0].burnable,sh(I,S),Kh(E,I,null),sh($,z),sh($,T),sh(T,D),D.checked=e[0].supply,sh(T,O),Kh(U,T,null),sh($,R),sh($,A),sh(A,N),N.checked=e[0].pausable,sh(A,j),Kh(P,A,null),sh($,M),sh($,Z),sh(Z,q),q.checked=e[0].uriStorage,sh(Z,L),Kh(F,Z,null),sh($,V),sh($,H),sh(H,J),J.checked=e[0].updatableUri,sh(H,G),Kh(B,H,null),sh($,W),Kh(K,$,null),lh(X,Q,ee),Kh(Y,X,ee),lh(X,te,ee),Kh(ne,X,ee),lh(X,se,ee),Kh(ce,X,ee),lh(X,ue,ee),Kh(de,X,ee),me=!0,fe||(he=[gh(s,"input",e[3]),gh(f,"input",e[4]),gh(_,"change",e[5]),gh(C,"change",e[6]),gh(D,"change",e[7]),gh(N,"change",e[8]),gh(q,"change",e[9]),gh(J,"change",e[10])],fe=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name);const n={};524288&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&f.value!==e[0].baseUri&&_h(f,e[0].baseUri),1&t&&(_.checked=e[0].mintable);const o={};524288&t&&(o.$$scope={dirty:t,ctx:e}),x.$set(o),(!me||1&t)&&xh(y,"checked",e[0].mintable),1&t&&(C.checked=e[0].burnable);const r={};524288&t&&(r.$$scope={dirty:t,ctx:e}),E.$set(r),(!me||1&t)&&xh(I,"checked",e[0].burnable),1&t&&(D.checked=e[0].supply);const i={};524288&t&&(i.$$scope={dirty:t,ctx:e}),U.$set(i),(!me||1&t)&&xh(T,"checked",e[0].supply),1&t&&(N.checked=e[0].pausable);const a={};524288&t&&(a.$$scope={dirty:t,ctx:e}),P.$set(a),(!me||1&t)&&xh(A,"checked",e[0].pausable),1&t&&(q.checked=e[0].uriStorage);const c={};524288&t&&(c.$$scope={dirty:t,ctx:e}),F.$set(c),(!me||1&t)&&xh(Z,"checked",e[0].uriStorage),1&t&&(J.checked=e[0].updatableUri);const l={};524288&t&&(l.$$scope={dirty:t,ctx:e}),B.$set(l),(!me||1&t)&&xh(H,"checked",e[0].updatableUri);const u={};!X&&1&t&&(X=!0,u.upgradeable=e[0].upgradeable,jh(()=>X=!1)),K.$set(u);const d={};2&t&&(d.errors=e[1]),!ee&&1&t&&(ee=!0,d.opts=e[0].royaltyInfo,jh(()=>ee=!1)),Y.$set(d);const m={};4&t&&(m.required=e[2]),2&t&&(m.errors=e[1]),!oe&&1&t&&(oe=!0,m.accessType=e[0].access.type,jh(()=>oe=!1)),!re&&1&t&&(re=!0,m.darInitialDelay=e[0].access.darInitialDelay,jh(()=>re=!1)),!ie&&1&t&&(ie=!0,m.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>ie=!1)),!ae&&1&t&&(ae=!0,m.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>ae=!1)),ne.$set(m);const h={};!le&&1&t&&(le=!0,h.macros=e[0].macros,jh(()=>le=!1)),ce.$set(h);const g={};2&t&&(g.errors=e[1]),!pe&&1&t&&(pe=!0,g.info=e[0].info,jh(()=>pe=!1)),de.$set(g)},i(e){me||(Jh(p.$$.fragment,e),Jh(x.$$.fragment,e),Jh(E.$$.fragment,e),Jh(U.$$.fragment,e),Jh(P.$$.fragment,e),Jh(F.$$.fragment,e),Jh(B.$$.fragment,e),Jh(K.$$.fragment,e),Jh(Y.$$.fragment,e),Jh(ne.$$.fragment,e),Jh(ce.$$.fragment,e),Jh(de.$$.fragment,e),me=!0)},o(e){Gh(p.$$.fragment,e),Gh(x.$$.fragment,e),Gh(E.$$.fragment,e),Gh(U.$$.fragment,e),Gh(P.$$.fragment,e),Gh(F.$$.fragment,e),Gh(B.$$.fragment,e),Gh(K.$$.fragment,e),Gh(Y.$$.fragment,e),Gh(ne.$$.fragment,e),Gh(ce.$$.fragment,e),Gh(de.$$.fragment,e),me=!1},d(e){e&&uh(t),Xh(p),e&&uh(h),e&&uh(g),Xh(x),Xh(E),Xh(U),Xh(P),Xh(F),Xh(B),Xh(K),e&&uh(Q),Xh(Y,e),e&&uh(te),Xh(ne,e),e&&uh(se),Xh(ce,e),e&&uh(ue),Xh(de,e),fe=!1,Kf(he)}}}function kx(e,t,n){let o,{opts:r={kind:"ERC1155",...Fb.defaults,royaltyInfo:{...Fb.defaults.royaltyInfo},info:{...uv},macros:{...pv},access:{...Fb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Fb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.baseUri=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.supply=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.uriStorage=this.checked,n(0,r)},function(){r.updatableUri=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.royaltyInfo,t)&&(r.royaltyInfo=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function xx(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function wx(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ix(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function Cx(e){let t,n,o,r,i;return{c(){t=mh("Provides contract-level and per-token URI metadata via "),n=dh("code"),n.textContent="contract_uri()",o=mh(" and\n "),r=dh("code"),r.textContent="token_uri(id)",i=mh(".")},m(e,a){lh(e,t,a),lh(e,n,a),lh(e,o,a),lh(e,r,a),lh(e,i,a)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o),e&&uh(r),e&&uh(i)}}}function Sx(e){let t,n,o;return{c(){t=mh("Keeps track of total supply per token ID via "),n=dh("code"),n.textContent="total_supply(id)",o=mh(".")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function Ex(e){let t,n,o,r,i,a,s;return{c(){t=mh("Provides per-token metadata including "),n=dh("code"),n.textContent="name(id)",o=mh(", "),r=dh("code"),r.textContent="symbol(id)",i=mh(", and\n "),a=dh("code"),a.textContent="decimals(id)",s=mh(".")},m(e,c){lh(e,t,c),lh(e,n,c),lh(e,o,c),lh(e,r,c),lh(e,i,c),lh(e,a,c),lh(e,s,c)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o),e&&uh(r),e&&uh(i),e&&uh(a),e&&uh(s)}}}function zx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae;function se(t){e[10](t)}v=new C_({props:{$$slots:{default:[xx]},$$scope:{ctx:e}}}),k=new C_({props:{$$slots:{default:[wx]},$$scope:{ctx:e}}}),S=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[Ix]},$$scope:{ctx:e}}}),O=new C_({props:{$$slots:{default:[Cx]},$$scope:{ctx:e}}}),j=new C_({props:{$$slots:{default:[Sx]},$$scope:{ctx:e}}}),L=new C_({props:{$$slots:{default:[Ex]},$$scope:{ctx:e}}});let ce={};function le(t){e[11](t)}function ue(t){e[12](t)}function de(t){e[13](t)}function pe(t){e[14](t)}void 0!==e[0].upgradeable&&(ce.upgradeable=e[0].upgradeable),V=new lk({props:ce}),Dh.push(()=>Bh(V,"upgradeable",se));let me={required:e[2],errors:e[1]};function fe(t){e[15](t)}void 0!==e[0].access.type&&(me.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(me.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(me.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(me.darMaxTransferDelay=e[0].access.darMaxTransferDelay),G=new ik({props:me}),Dh.push(()=>Bh(G,"accessType",le)),Dh.push(()=>Bh(G,"darInitialDelay",ue)),Dh.push(()=>Bh(G,"darDefaultDelayIncrease",de)),Dh.push(()=>Bh(G,"darMaxTransferDelay",pe));let he={};function ge(t){e[16](t)}void 0!==e[0].macros&&(he.macros=e[0].macros),Y=new bk({props:he}),Dh.push(()=>Bh(Y,"macros",fe));let ve={errors:e[1]};return void 0!==e[0].info&&(ve.info=e[0].info),ne=new mk({props:ve}),Dh.push(()=>Bh(ne,"info",ge)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),l=fh(),u=dh("section"),d=dh("h1"),d.textContent="Features",p=fh(),m=dh("div"),f=dh("label"),h=dh("input"),g=mh("\n Mintable\n "),Wh(v.$$.fragment),b=fh(),$=dh("label"),y=dh("input"),_=mh("\n Burnable\n "),Wh(k.$$.fragment),x=fh(),w=dh("label"),I=dh("input"),C=mh("\n Pausable\n "),Wh(S.$$.fragment),E=fh(),z=dh("label"),T=dh("input"),D=mh("\n Content URI\n "),Wh(O.$$.fragment),U=fh(),R=dh("label"),A=dh("input"),N=mh("\n Supply Tracking\n "),Wh(j.$$.fragment),P=fh(),M=dh("label"),Z=dh("input"),q=mh("\n Metadata\n "),Wh(L.$$.fragment),F=fh(),Wh(V.$$.fragment),J=fh(),Wh(G.$$.fragment),Q=fh(),Wh(Y.$$.fragment),te=fh(),Wh(ne.$$.fragment),vh(r,"class","labeled-input"),vh(t,"class","controls-section"),vh(h,"type","checkbox"),xh(f,"checked",e[0].mintable),vh(y,"type","checkbox"),xh($,"checked",e[0].burnable),vh(I,"type","checkbox"),xh(w,"checked",e[0].pausable),vh(T,"type","checkbox"),xh(z,"checked",e[0].contentUri),vh(A,"type","checkbox"),xh(R,"checked",e[0].tokenSupply),vh(Z,"type","checkbox"),xh(M,"checked",e[0].metadata),vh(m,"class","checkbox-group"),vh(u,"class","controls-section")},m(H,B){lh(H,t,B),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),lh(H,l,B),lh(H,u,B),sh(u,d),sh(u,p),sh(u,m),sh(m,f),sh(f,h),h.checked=e[0].mintable,sh(f,g),Kh(v,f,null),sh(m,b),sh(m,$),sh($,y),y.checked=e[0].burnable,sh($,_),Kh(k,$,null),sh(m,x),sh(m,w),sh(w,I),I.checked=e[0].pausable,sh(w,C),Kh(S,w,null),sh(m,E),sh(m,z),sh(z,T),T.checked=e[0].contentUri,sh(z,D),Kh(O,z,null),sh(m,U),sh(m,R),sh(R,A),A.checked=e[0].tokenSupply,sh(R,N),Kh(j,R,null),sh(m,P),sh(m,M),sh(M,Z),Z.checked=e[0].metadata,sh(M,q),Kh(L,M,null),sh(m,F),Kh(V,m,null),lh(H,J,B),Kh(G,H,B),lh(H,Q,B),Kh(Y,H,B),lh(H,te,B),Kh(ne,H,B),re=!0,ie||(ae=[gh(s,"input",e[3]),ah(c=B_.call(null,s,e[1]?.name)),gh(h,"change",e[4]),gh(y,"change",e[5]),gh(I,"change",e[6]),gh(T,"change",e[7]),gh(A,"change",e[8]),gh(Z,"change",e[9])],ie=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&(h.checked=e[0].mintable);const n={};131072&t&&(n.$$scope={dirty:t,ctx:e}),v.$set(n),(!re||1&t)&&xh(f,"checked",e[0].mintable),1&t&&(y.checked=e[0].burnable);const o={};131072&t&&(o.$$scope={dirty:t,ctx:e}),k.$set(o),(!re||1&t)&&xh($,"checked",e[0].burnable),1&t&&(I.checked=e[0].pausable);const r={};131072&t&&(r.$$scope={dirty:t,ctx:e}),S.$set(r),(!re||1&t)&&xh(w,"checked",e[0].pausable),1&t&&(T.checked=e[0].contentUri);const i={};131072&t&&(i.$$scope={dirty:t,ctx:e}),O.$set(i),(!re||1&t)&&xh(z,"checked",e[0].contentUri),1&t&&(A.checked=e[0].tokenSupply);const a={};131072&t&&(a.$$scope={dirty:t,ctx:e}),j.$set(a),(!re||1&t)&&xh(R,"checked",e[0].tokenSupply),1&t&&(Z.checked=e[0].metadata);const l={};131072&t&&(l.$$scope={dirty:t,ctx:e}),L.$set(l),(!re||1&t)&&xh(M,"checked",e[0].metadata);const u={};!H&&1&t&&(H=!0,u.upgradeable=e[0].upgradeable,jh(()=>H=!1)),V.$set(u);const d={};4&t&&(d.required=e[2]),2&t&&(d.errors=e[1]),!B&&1&t&&(B=!0,d.accessType=e[0].access.type,jh(()=>B=!1)),!W&&1&t&&(W=!0,d.darInitialDelay=e[0].access.darInitialDelay,jh(()=>W=!1)),!K&&1&t&&(K=!0,d.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>K=!1)),!X&&1&t&&(X=!0,d.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>X=!1)),G.$set(d);const p={};!ee&&1&t&&(ee=!0,p.macros=e[0].macros,jh(()=>ee=!1)),Y.$set(p);const m={};2&t&&(m.errors=e[1]),!oe&&1&t&&(oe=!0,m.info=e[0].info,jh(()=>oe=!1)),ne.$set(m)},i(e){re||(Jh(v.$$.fragment,e),Jh(k.$$.fragment,e),Jh(S.$$.fragment,e),Jh(O.$$.fragment,e),Jh(j.$$.fragment,e),Jh(L.$$.fragment,e),Jh(V.$$.fragment,e),Jh(G.$$.fragment,e),Jh(Y.$$.fragment,e),Jh(ne.$$.fragment,e),re=!0)},o(e){Gh(v.$$.fragment,e),Gh(k.$$.fragment,e),Gh(S.$$.fragment,e),Gh(O.$$.fragment,e),Gh(j.$$.fragment,e),Gh(L.$$.fragment,e),Gh(V.$$.fragment,e),Gh(G.$$.fragment,e),Gh(Y.$$.fragment,e),Gh(ne.$$.fragment,e),re=!1},d(e){e&&uh(t),e&&uh(l),e&&uh(u),Xh(v),Xh(k),Xh(S),Xh(O),Xh(j),Xh(L),Xh(V),e&&uh(J),Xh(G,e),e&&uh(Q),Xh(Y,e),e&&uh(te),Xh(ne,e),ie=!1,Kf(ae)}}}function Tx(e,t,n){let o,{opts:r={kind:"ERC6909",...Vb.defaults,info:{...uv},macros:{...pv},access:{...Vb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Vb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.contentUri=this.checked,n(0,r)},function(){r.tokenSupply=this.checked,n(0,r)},function(){r.metadata=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function Dx(e){let t;return{c(){t=mh("Starknet account that uses the STARK curve for signature checking.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ox(e){let t;return{c(){t=mh("Ethereum-flavored account that uses the Secp256k1 curve for signature checking.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ux(e){let t;return{c(){t=mh("Allows a protocol to submit transactions on behalf of the account, as long as it has the relevant signatures.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Rx(e){let t;return{c(){t=mh("Enables the account to declare other contract classes.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ax(e){let t;return{c(){t=mh("Enables the account to be counterfactually deployed.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Nx(e){let t;return{c(){t=mh("Enables the account to change its own public key.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function jx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie;function ae(t){e[11](t)}v=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/accounts#starknet_account",$$slots:{default:[Dx]},$$scope:{ctx:e}}}),k=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/accounts#ethereum_account",$$slots:{default:[Ox]},$$scope:{ctx:e}}}),D=new C_({props:{link:"https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-9.md",$$slots:{default:[Ux]},$$scope:{ctx:e}}}),N=new C_({props:{link:"https://docs.starknet.io/architecture-and-concepts/smart-contracts/contract-classes/",$$slots:{default:[Rx]},$$scope:{ctx:e}}}),q=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/accounts#deploying_an_account",$$slots:{default:[Ax]},$$scope:{ctx:e}}}),J=new C_({props:{$$slots:{default:[Nx]},$$scope:{ctx:e}}});let se={};function ce(t){e[12](t)}void 0!==e[0].upgradeable&&(se.upgradeable=e[0].upgradeable),B=new lk({props:se}),Dh.push(()=>Bh(B,"upgradeable",ae));let le={};function ue(t){e[13](t)}void 0!==e[0].macros&&(le.macros=e[0].macros),X=new bk({props:le}),Dh.push(()=>Bh(X,"macros",ce));let de={errors:e[1]};return void 0!==e[0].info&&(de.info=e[0].info),ee=new mk({props:de}),Dh.push(()=>Bh(ee,"info",ue)),oe=bh(e[5][0]),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),l=fh(),u=dh("section"),d=dh("h1"),d.textContent="Account Type",p=fh(),m=dh("div"),f=dh("label"),h=dh("input"),g=mh("\n Starknet\n "),Wh(v.$$.fragment),b=fh(),$=dh("label"),y=dh("input"),_=mh("\n Ethereum\n "),Wh(k.$$.fragment),x=fh(),w=dh("section"),I=dh("h1"),I.textContent="Features",C=fh(),S=dh("div"),E=dh("label"),z=dh("input"),T=mh("\n Outside Execution\n "),Wh(D.$$.fragment),O=fh(),U=dh("label"),R=dh("input"),A=mh("\n Declarer\n "),Wh(N.$$.fragment),j=fh(),P=dh("label"),M=dh("input"),Z=mh("\n Deployable\n "),Wh(q.$$.fragment),L=fh(),F=dh("label"),V=dh("input"),H=mh("\n Public Key\n "),Wh(J.$$.fragment),G=fh(),Wh(B.$$.fragment),K=fh(),Wh(X.$$.fragment),Y=fh(),Wh(ee.$$.fragment),vh(r,"class","labeled-input"),vh(t,"class","controls-section"),vh(h,"type","radio"),h.__value="stark",h.value=h.__value,xh(f,"checked","stark"===e[2]),vh(y,"type","radio"),y.__value="eth",y.value=y.__value,xh($,"checked","eth"===e[2]),vh(m,"class","checkbox-group"),vh(u,"class","controls-section"),vh(z,"type","checkbox"),xh(E,"checked",e[0].outsideExecution),vh(R,"type","checkbox"),xh(U,"checked",e[0].declare),vh(M,"type","checkbox"),xh(P,"checked",e[0].deploy),vh(V,"type","checkbox"),xh(F,"checked",e[0].pubkey),vh(S,"class","checkbox-group"),vh(w,"class","controls-section"),oe.p(h,y)},m(W,Q){lh(W,t,Q),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),lh(W,l,Q),lh(W,u,Q),sh(u,d),sh(u,p),sh(u,m),sh(m,f),sh(f,h),h.checked=h.__value===e[0].type,sh(f,g),Kh(v,f,null),sh(m,b),sh(m,$),sh($,y),y.checked=y.__value===e[0].type,sh($,_),Kh(k,$,null),lh(W,x,Q),lh(W,w,Q),sh(w,I),sh(w,C),sh(w,S),sh(S,E),sh(E,z),z.checked=e[0].outsideExecution,sh(E,T),Kh(D,E,null),sh(S,O),sh(S,U),sh(U,R),R.checked=e[0].declare,sh(U,A),Kh(N,U,null),sh(S,j),sh(S,P),sh(P,M),M.checked=e[0].deploy,sh(P,Z),Kh(q,P,null),sh(S,L),sh(S,F),sh(F,V),V.checked=e[0].pubkey,sh(F,H),Kh(J,F,null),sh(S,G),Kh(B,S,null),lh(W,K,Q),Kh(X,W,Q),lh(W,Y,Q),Kh(ee,W,Q),ne=!0,re||(ie=[gh(s,"input",e[3]),ah(c=B_.call(null,s,e[1]?.name)),gh(h,"change",e[4]),gh(y,"change",e[6]),gh(z,"change",e[7]),gh(R,"change",e[8]),gh(M,"change",e[9]),gh(V,"change",e[10])],re=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&(h.checked=h.__value===e[0].type);const n={};16384&t&&(n.$$scope={dirty:t,ctx:e}),v.$set(n),(!ne||4&t)&&xh(f,"checked","stark"===e[2]),1&t&&(y.checked=y.__value===e[0].type);const o={};16384&t&&(o.$$scope={dirty:t,ctx:e}),k.$set(o),(!ne||4&t)&&xh($,"checked","eth"===e[2]),1&t&&(z.checked=e[0].outsideExecution);const r={};16384&t&&(r.$$scope={dirty:t,ctx:e}),D.$set(r),(!ne||1&t)&&xh(E,"checked",e[0].outsideExecution),1&t&&(R.checked=e[0].declare);const i={};16384&t&&(i.$$scope={dirty:t,ctx:e}),N.$set(i),(!ne||1&t)&&xh(U,"checked",e[0].declare),1&t&&(M.checked=e[0].deploy);const a={};16384&t&&(a.$$scope={dirty:t,ctx:e}),q.$set(a),(!ne||1&t)&&xh(P,"checked",e[0].deploy),1&t&&(V.checked=e[0].pubkey);const l={};16384&t&&(l.$$scope={dirty:t,ctx:e}),J.$set(l),(!ne||1&t)&&xh(F,"checked",e[0].pubkey);const u={};!W&&1&t&&(W=!0,u.upgradeable=e[0].upgradeable,jh(()=>W=!1)),B.$set(u);const d={};!Q&&1&t&&(Q=!0,d.macros=e[0].macros,jh(()=>Q=!1)),X.$set(d);const p={};2&t&&(p.errors=e[1]),!te&&1&t&&(te=!0,p.info=e[0].info,jh(()=>te=!1)),ee.$set(p)},i(e){ne||(Jh(v.$$.fragment,e),Jh(k.$$.fragment,e),Jh(D.$$.fragment,e),Jh(N.$$.fragment,e),Jh(q.$$.fragment,e),Jh(J.$$.fragment,e),Jh(B.$$.fragment,e),Jh(X.$$.fragment,e),Jh(ee.$$.fragment,e),ne=!0)},o(e){Gh(v.$$.fragment,e),Gh(k.$$.fragment,e),Gh(D.$$.fragment,e),Gh(N.$$.fragment,e),Gh(q.$$.fragment,e),Gh(J.$$.fragment,e),Gh(B.$$.fragment,e),Gh(X.$$.fragment,e),Gh(ee.$$.fragment,e),ne=!1},d(e){e&&uh(t),e&&uh(l),e&&uh(u),Xh(v),Xh(k),e&&uh(x),e&&uh(w),Xh(D),Xh(N),Xh(q),Xh(J),Xh(B),e&&uh(K),Xh(X,e),e&&uh(Y),Xh(ee,e),oe.r(),re=!1,Kf(ie)}}}function Px(e,t,n){let{opts:o={kind:"Account",...Hb.defaults,info:{...uv},macros:{...pv}}}=t,{errors:r}=t,{accountType:i}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors),"accountType"in e&&n(2,i=e.accountType)},[o,r,i,function(){o.name=this.value,n(0,o)},function(){o.type=this.__value,n(0,o)},[[]],function(){o.type=this.__value,n(0,o)},function(){o.outsideExecution=this.checked,n(0,o)},function(){o.declare=this.checked,n(0,o)},function(){o.deploy=this.checked,n(0,o)},function(){o.pubkey=this.checked,n(0,o)},function(t){e.$$.not_equal(o.upgradeable,t)&&(o.upgradeable=t,n(0,o))},function(t){e.$$.not_equal(o.macros,t)&&(o.macros=t,n(0,o))},function(t){e.$$.not_equal(o.info,t)&&(o.info=t,n(0,o))}]}function Mx(e){let t;return{c(){t=mh("The minimal number of confirmations required to approve a transaction.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Zx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D;function O(t){e[4](t)}p=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/governance/multisig#signer_management",$$slots:{default:[Mx]},$$scope:{ctx:e}}});let U={};function R(t){e[5](t)}void 0!==e[0].upgradeable&&(U.upgradeable=e[0].upgradeable),_=new lk({props:U}),Dh.push(()=>Bh(_,"upgradeable",O));let A={};function N(t){e[6](t)}void 0!==e[0].macros&&(A.macros=e[0].macros),w=new bk({props:A}),Dh.push(()=>Bh(w,"macros",R));let j={errors:e[1]};return void 0!==e[0].info&&(j.info=e[0].info),S=new mk({props:j}),Dh.push(()=>Bh(S,"info",N)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),c=fh(),l=dh("label"),u=dh("span"),d=mh("Quorum\n "),Wh(p.$$.fragment),m=fh(),f=dh("input"),g=fh(),v=dh("section"),b=dh("h1"),b.textContent="Features",$=fh(),y=dh("div"),Wh(_.$$.fragment),x=fh(),Wh(w.$$.fragment),C=fh(),Wh(S.$$.fragment),vh(r,"class","labeled-input"),vh(u,"class","flex justify-between pr-2"),vh(f,"placeholder",""),vh(l,"class","labeled-input"),vh(t,"class","controls-section"),vh(y,"class","checkbox-group"),vh(v,"class","controls-section")},m(k,I){lh(k,t,I),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,c),sh(t,l),sh(l,u),sh(u,d),Kh(p,u,null),sh(l,m),sh(l,f),_h(f,e[0].quorum),lh(k,g,I),lh(k,v,I),sh(v,b),sh(v,$),sh(v,y),Kh(_,y,null),lh(k,x,I),Kh(w,k,I),lh(k,C,I),Kh(S,k,I),z=!0,T||(D=[gh(s,"input",e[2]),gh(f,"input",e[3]),ah(h=B_.call(null,f,e[1]?.quorum))],T=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name);const n={};256&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&f.value!==e[0].quorum&&_h(f,e[0].quorum),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.quorum);const o={};!k&&1&t&&(k=!0,o.upgradeable=e[0].upgradeable,jh(()=>k=!1)),_.$set(o);const r={};!I&&1&t&&(I=!0,r.macros=e[0].macros,jh(()=>I=!1)),w.$set(r);const i={};2&t&&(i.errors=e[1]),!E&&1&t&&(E=!0,i.info=e[0].info,jh(()=>E=!1)),S.$set(i)},i(e){z||(Jh(p.$$.fragment,e),Jh(_.$$.fragment,e),Jh(w.$$.fragment,e),Jh(S.$$.fragment,e),z=!0)},o(e){Gh(p.$$.fragment,e),Gh(_.$$.fragment,e),Gh(w.$$.fragment,e),Gh(S.$$.fragment,e),z=!1},d(e){e&&uh(t),Xh(p),e&&uh(g),e&&uh(v),Xh(_),e&&uh(x),Xh(w,e),e&&uh(C),Xh(S,e),T=!1,Kf(D)}}}function qx(e,t,n){const o=Jb.defaults;let{opts:r={kind:"Multisig",...o,info:{...uv},macros:{...pv}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},[r,i,function(){r.name=this.value,n(0,r)},function(){r.quorum=this.value,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function Lx(e){let t;return{c(){t=mh("Delay since proposal is created until voting starts.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Fx(e){let t;return{c(){t=mh("Length of period during which people can cast their vote.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Vx(e){let t;return{c(){t=mh("Minimum number of votes an account must have to create a proposal.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Hx(e){let t;return{c(){t=mh("Quorum required for a proposal to pass.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Jx(e){let t,n,o,r;return{c(){t=dh("input"),vh(t,"id","quorum-input")},m(i,a){lh(i,t,a),_h(t,e[0].quorumAbsolute),e[17](t),o||(r=[gh(t,"input",e[16]),ah(n=B_.call(null,t,e[1]?.quorumAbsolute))],o=!0)},p(e,o){1&o&&t.value!==e[0].quorumAbsolute&&_h(t,e[0].quorumAbsolute),n&&Xf(n.update)&&2&o&&n.update.call(null,e[1]?.quorumAbsolute)},d(n){n&&uh(t),e[17](null),o=!1,Kf(r)}}}function Gx(e){let t,n,o,r;return{c(){t=dh("input"),vh(t,"id","quorum-input"),vh(t,"type","number"),vh(t,"placeholder",e[4].quorumPercent.toString())},m(i,a){lh(i,t,a),_h(t,e[0].quorumPercent),o||(r=[gh(t,"input",e[15]),ah(n=B_.call(null,t,e[1]?.quorumPercent))],o=!0)},p(e,o){1&o&&$h(t.value)!==e[0].quorumPercent&&_h(t,e[0].quorumPercent),n&&Xf(n.update)&&2&o&&n.update.call(null,e[1]?.quorumPercent)},d(e){e&&uh(t),o=!1,Kf(r)}}}function Bx(e){let t;return{c(){t=mh("Token amounts above will be extended with this number of zeroes. Does not apply to ERC721Votes.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Wx(e){let t;return{c(){t=mh("Allow governance to update voting settings (delay, period, proposal threshold).")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Kx(e){let t;return{c(){t=mh("Represent voting power with a votes-enabled ERC20 token. Voters can entrust their voting power to a delegate.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Xx(e){let t;return{c(){t=mh("Represent voting power with a votes-enabled ERC721 token. Voters can entrust their voting power to a delegate.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Qx(e){let t,n,o,r,i;return{c(){t=mh("The clock mode used by the voting token.\n "),n=dh("br"),o=fh(),r=dh("b"),r.textContent="NOTE:",i=mh(" This setting must be the same as what the token uses. For now, only timestamp mode is supported.")},m(e,a){lh(e,t,a),lh(e,n,a),lh(e,o,a),lh(e,r,a),lh(e,i,a)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o),e&&uh(r),e&&uh(i)}}}function Yx(e){let t;return{c(){t=mh("The token uses voting durations expressed as timestamps.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ew(e){let t,n,o;return{c(){t=mh("Module compatible with OpenZeppelin's "),n=dh("code"),n.textContent="TimelockController",o=mh(".")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function tw(e){let t,n,o,r,i,a,s,c,l;return i=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/governance#TimelockControllerComponent",$$slots:{default:[ew]},$$scope:{ctx:e}}}),s=bh(e[13][0]),{c(){t=dh("div"),n=dh("label"),o=dh("input"),r=mh("\n TimelockController\n "),Wh(i.$$.fragment),vh(o,"type","radio"),o.__value="openzeppelin",o.value=o.__value,xh(n,"checked","openzeppelin"===e[0].timelock),vh(t,"class","checkbox-group"),s.p(o)},m(s,u){lh(s,t,u),sh(t,n),sh(n,o),o.checked=o.__value===e[0].timelock,sh(n,r),Kh(i,n,null),a=!0,c||(l=gh(o,"change",e[24]),c=!0)},p(e,t){1&t&&(o.checked=o.__value===e[0].timelock);const r={};1073741824&t&&(r.$$scope={dirty:t,ctx:e}),i.$set(r),(!a||1&t)&&xh(n,"checked","openzeppelin"===e[0].timelock)},i(e){a||(Jh(i.$$.fragment,e),a=!0)},o(e){Gh(i.$$.fragment,e),a=!1},d(e){e&&uh(t),Xh(i),s.r(),c=!1,l()}}}function nw(e){let t;return{c(){t=mh("Metadata for the SNIP12 domain separator.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ow(e){let t;return{c(){t=mh("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function rw(e){let t;return{c(){t=mh("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function iw(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,he,ge,ve,be,$e,ye,_e,ke,xe,we,Ie,Ce,Se,Ee,ze,Te,De,Oe,Ue,Re,Ae,Ne,je,Pe,Me,Ze,qe,Le,Fe,Ve,He,Je,Ge,Be,We,Ke,Xe,Qe,Ye,et,tt,nt,ot,rt,it,at,st,ct,lt,ut,dt,pt,mt,ft,ht,gt,vt,bt,$t,yt,_t,kt,xt;function wt(e,t){return"percent"===e[0].quorumMode?Gx:Jx}f=new C_({props:{$$slots:{default:[Lx]},$$scope:{ctx:e}}}),x=new C_({props:{$$slots:{default:[Fx]},$$scope:{ctx:e}}}),D=new C_({props:{$$slots:{default:[Vx]},$$scope:{ctx:e}}}),B=new C_({props:{$$slots:{default:[Hx]},$$scope:{ctx:e}}});let It=wt(e),Ct=It(e);function St(t){e[20](t)}oe=new C_({props:{$$slots:{default:[Bx]},$$scope:{ctx:e}}}),le=new C_({props:{$$slots:{default:[Wx]},$$scope:{ctx:e}}});let Et={};function zt(t){e[25](t)}void 0!==e[0].upgradeable&&(Et.upgradeable=e[0].upgradeable),de=new lk({props:Et}),Dh.push(()=>Bh(de,"upgradeable",St)),_e=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/governance#VotesComponent",$$slots:{default:[Kx]},$$scope:{ctx:e}}}),Ce=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/governance#VotesComponent",$$slots:{default:[Xx]},$$scope:{ctx:e}}}),Ue=new C_({props:{$$slots:{default:[Qx]},$$scope:{ctx:e}}}),Me=new C_({props:{$$slots:{default:[Yx]},$$scope:{ctx:e}}});let Tt={label:"Timelock",defaultValue:"openzeppelin",helpContent:"Add a delay to actions taken by the Governor. Gives users time to exit the system if they disagree with governance decisions.",$$slots:{default:[tw]},$$scope:{ctx:e}};function Dt(t){e[28](t)}void 0!==e[0].timelock&&(Tt.value=e[0].timelock),qe=new J_({props:Tt}),Dh.push(()=>Bh(qe,"value",zt)),We=new C_({props:{$$slots:{default:[nw]},$$scope:{ctx:e}}}),et=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[ow]},$$scope:{ctx:e}}}),ct=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[rw]},$$scope:{ctx:e}}});let Ot={};function Ut(t){e[29](t)}void 0!==e[0].macros&&(Ot.macros=e[0].macros),mt=new bk({props:Ot}),Dh.push(()=>Bh(mt,"macros",Dt));let Rt={errors:e[1]};return void 0!==e[0].info&&(Rt.info=e[0].info),gt=new mk({props:Rt}),Dh.push(()=>Bh(gt,"info",Ut)),$t=bh(e[13][1]),yt=bh(e[13][2]),_t=bh(e[13][3]),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),c=fh(),l=dh("div"),u=dh("label"),d=dh("span"),p=dh("span"),p.textContent="Voting Delay",m=fh(),Wh(f.$$.fragment),h=fh(),g=dh("input"),b=fh(),$=dh("label"),y=dh("span"),_=dh("span"),_.textContent="Voting Period",k=fh(),Wh(x.$$.fragment),w=fh(),I=dh("input"),S=fh(),E=dh("label"),z=dh("span"),T=mh("Proposal Threshold\n "),Wh(D.$$.fragment),O=fh(),U=dh("input"),A=fh(),N=dh("label"),j=dh("span"),P=dh("span"),M=mh("Quorum\n "),Z=dh("label"),q=mh("% "),L=dh("input"),F=fh(),V=dh("label"),H=mh("# "),J=dh("input"),G=fh(),Wh(B.$$.fragment),W=fh(),Ct.c(),K=fh(),X=dh("p"),Q=dh("label"),Y=mh("Token decimals:\n "),ee=dh("input"),ne=fh(),Wh(oe.$$.fragment),re=fh(),ie=dh("div"),ae=dh("label"),se=dh("input"),ce=mh("\n Updatable Settings\n "),Wh(le.$$.fragment),ue=fh(),Wh(de.$$.fragment),me=fh(),fe=dh("section"),he=dh("h1"),he.textContent="Votes",ge=fh(),ve=dh("div"),be=dh("label"),$e=dh("input"),ye=mh("\n ERC20Votes\n "),Wh(_e.$$.fragment),ke=fh(),xe=dh("label"),we=dh("input"),Ie=mh("\n ERC721Votes\n "),Wh(Ce.$$.fragment),Se=fh(),Ee=dh("section"),ze=dh("h1"),Te=dh("label"),De=dh("span"),De.textContent="Token Clock Mode",Oe=fh(),Wh(Ue.$$.fragment),Re=fh(),Ae=dh("div"),Ne=dh("label"),je=dh("input"),Pe=mh("\n Timestamp\n "),Wh(Me.$$.fragment),Ze=fh(),Wh(qe.$$.fragment),Fe=fh(),Ve=dh("section"),He=dh("h1"),Je=dh("label"),Ge=dh("span"),Ge.textContent="SNIP12 Metadata",Be=fh(),Wh(We.$$.fragment),Ke=fh(),Xe=dh("label"),Qe=dh("span"),Ye=mh("Application Name\n "),Wh(et.$$.fragment),tt=fh(),nt=dh("input"),rt=fh(),it=dh("label"),at=dh("span"),st=mh("Application Version\n "),Wh(ct.$$.fragment),lt=fh(),ut=dh("input"),pt=fh(),Wh(mt.$$.fragment),ht=fh(),Wh(gt.$$.fragment),vh(r,"class","labeled-input"),vh(d,"class","flex justify-between"),vh(u,"class","labeled-input"),vh(y,"class","flex justify-between"),vh($,"class","labeled-input"),vh(l,"class","grid grid-cols-2 gap-2"),vh(z,"class","flex justify-between pr-2"),vh(U,"placeholder","0"),vh(E,"class","labeled-input"),vh(L,"type","radio"),L.__value="percent",L.value=L.__value,vh(J,"type","radio"),J.__value="absolute",J.value=J.__value,vh(j,"class","flex justify-between pr-2"),vh(N,"class","labeled-input"),vh(N,"for","quorum-input"),ee.disabled=e[3],vh(ee,"type","number"),vh(ee,"placeholder",e[4].decimals.toString()),vh(ee,"class","input-inline"),vh(Q,"class","text-sm"),vh(X,"class","tooltip-container flex justify-between items-center pr-2"),vh(se,"type","checkbox"),xh(ae,"checked",e[0].settings),vh(ie,"class","checkbox-group"),vh(t,"class","controls-section"),vh($e,"type","radio"),$e.__value="erc20votes",$e.value=$e.__value,xh(be,"checked","erc20votes"===e[0].votes),vh(we,"type","radio"),we.__value="erc721votes",we.value=we.__value,xh(xe,"checked","erc721votes"===e[0].votes),vh(ve,"class","checkbox-group"),vh(fe,"class","controls-section"),vh(Te,"class","flex justify-between items-center tooltip-container pr-2"),vh(je,"type","radio"),je.__value="timestamp",je.value=je.__value,xh(Ne,"checked","timestamp"===e[0].clockMode),vh(Ae,"class","checkbox-group"),vh(Ee,"class","controls-section"),vh(Je,"class","flex justify-between items-center tooltip-container pr-2"),vh(Qe,"class","flex justify-between pr-2"),vh(Xe,"class","labeled-input"),vh(at,"class","flex justify-between pr-2"),vh(it,"class","labeled-input"),vh(Ve,"class","controls-section"),$t.p(je),yt.p($e,we),_t.p(L,J)},m(pe,Le){lh(pe,t,Le),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,c),sh(t,l),sh(l,u),sh(u,d),sh(d,p),sh(d,m),Kh(f,d,null),sh(u,h),sh(u,g),_h(g,e[0].delay),sh(l,b),sh(l,$),sh($,y),sh(y,_),sh(y,k),Kh(x,y,null),sh($,w),sh($,I),_h(I,e[0].period),sh(t,S),sh(t,E),sh(E,z),sh(z,T),Kh(D,z,null),sh(E,O),sh(E,U),_h(U,e[0].proposalThreshold),sh(t,A),sh(t,N),sh(N,j),sh(j,P),sh(P,M),sh(P,Z),sh(Z,q),sh(Z,L),L.checked=L.__value===e[0].quorumMode,sh(P,F),sh(P,V),sh(V,H),sh(V,J),J.checked=J.__value===e[0].quorumMode,sh(j,G),Kh(B,j,null),sh(N,W),Ct.m(N,null),sh(t,K),sh(t,X),sh(X,Q),sh(Q,Y),sh(Q,ee),_h(ee,e[0].decimals),sh(X,ne),Kh(oe,X,null),sh(t,re),sh(t,ie),sh(ie,ae),sh(ae,se),se.checked=e[0].settings,sh(ae,ce),Kh(le,ae,null),sh(ie,ue),Kh(de,ie,null),lh(pe,me,Le),lh(pe,fe,Le),sh(fe,he),sh(fe,ge),sh(fe,ve),sh(ve,be),sh(be,$e),$e.checked=$e.__value===e[0].votes,sh(be,ye),Kh(_e,be,null),sh(ve,ke),sh(ve,xe),sh(xe,we),we.checked=we.__value===e[0].votes,sh(xe,Ie),Kh(Ce,xe,null),lh(pe,Se,Le),lh(pe,Ee,Le),sh(Ee,ze),sh(ze,Te),sh(Te,De),sh(Te,Oe),Kh(Ue,Te,null),sh(Ee,Re),sh(Ee,Ae),sh(Ae,Ne),sh(Ne,je),je.checked=je.__value===e[0].clockMode,sh(Ne,Pe),Kh(Me,Ne,null),lh(pe,Ze,Le),Kh(qe,pe,Le),lh(pe,Fe,Le),lh(pe,Ve,Le),sh(Ve,He),sh(He,Je),sh(Je,Ge),sh(Je,Be),Kh(We,Je,null),sh(Ve,Ke),sh(Ve,Xe),sh(Xe,Qe),sh(Qe,Ye),Kh(et,Qe,null),sh(Xe,tt),sh(Xe,nt),_h(nt,e[0].appName),sh(Ve,rt),sh(Ve,it),sh(it,at),sh(at,st),Kh(ct,at,null),sh(it,lt),sh(it,ut),_h(ut,e[0].appVersion),lh(pe,pt,Le),Kh(mt,pe,Le),lh(pe,ht,Le),Kh(gt,pe,Le),bt=!0,kt||(xt=[gh(s,"input",e[8]),gh(g,"input",e[9]),ah(v=B_.call(null,g,e[1]?.delay)),gh(I,"input",e[10]),ah(C=B_.call(null,I,e[1]?.period)),gh(U,"input",e[11]),ah(R=B_.call(null,U,e[1]?.proposalThreshold)),gh(L,"change",e[12]),gh(J,"change",e[14]),gh(J,"change",e[5]),gh(ee,"input",e[18]),ah(xk.call(null,ee)),ah(te=B_.call(null,ee,e[1]?.decimals)),gh(se,"change",e[19]),gh($e,"change",e[21]),gh(we,"change",e[22]),gh(je,"change",e[23]),gh(nt,"input",e[26]),ah(ot=B_.call(null,nt,e[1]?.appName)),gh(ut,"input",e[27]),ah(dt=B_.call(null,ut,e[1]?.appVersion))],kt=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name);const n={};1073741824&t&&(n.$$scope={dirty:t,ctx:e}),f.$set(n),1&t&&g.value!==e[0].delay&&_h(g,e[0].delay),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.delay);const o={};1073741824&t&&(o.$$scope={dirty:t,ctx:e}),x.$set(o),1&t&&I.value!==e[0].period&&_h(I,e[0].period),C&&Xf(C.update)&&2&t&&C.update.call(null,e[1]?.period);const r={};1073741824&t&&(r.$$scope={dirty:t,ctx:e}),D.$set(r),1&t&&U.value!==e[0].proposalThreshold&&_h(U,e[0].proposalThreshold),R&&Xf(R.update)&&2&t&&R.update.call(null,e[1]?.proposalThreshold),1&t&&(L.checked=L.__value===e[0].quorumMode),1&t&&(J.checked=J.__value===e[0].quorumMode);const i={};1073741824&t&&(i.$$scope={dirty:t,ctx:e}),B.$set(i),It===(It=wt(e))&&Ct?Ct.p(e,t):(Ct.d(1),Ct=It(e),Ct&&(Ct.c(),Ct.m(N,null))),(!bt||8&t)&&(ee.disabled=e[3]),1&t&&$h(ee.value)!==e[0].decimals&&_h(ee,e[0].decimals),te&&Xf(te.update)&&2&t&&te.update.call(null,e[1]?.decimals);const a={};1073741824&t&&(a.$$scope={dirty:t,ctx:e}),oe.$set(a),1&t&&(se.checked=e[0].settings);const c={};1073741824&t&&(c.$$scope={dirty:t,ctx:e}),le.$set(c),(!bt||1&t)&&xh(ae,"checked",e[0].settings);const l={};!pe&&1&t&&(pe=!0,l.upgradeable=e[0].upgradeable,jh(()=>pe=!1)),de.$set(l),1&t&&($e.checked=$e.__value===e[0].votes);const u={};1073741824&t&&(u.$$scope={dirty:t,ctx:e}),_e.$set(u),(!bt||1&t)&&xh(be,"checked","erc20votes"===e[0].votes),1&t&&(we.checked=we.__value===e[0].votes);const d={};1073741824&t&&(d.$$scope={dirty:t,ctx:e}),Ce.$set(d),(!bt||1&t)&&xh(xe,"checked","erc721votes"===e[0].votes);const p={};1073741824&t&&(p.$$scope={dirty:t,ctx:e}),Ue.$set(p),1&t&&(je.checked=je.__value===e[0].clockMode);const m={};1073741824&t&&(m.$$scope={dirty:t,ctx:e}),Me.$set(m),(!bt||1&t)&&xh(Ne,"checked","timestamp"===e[0].clockMode);const h={};1073741825&t&&(h.$$scope={dirty:t,ctx:e}),!Le&&1&t&&(Le=!0,h.value=e[0].timelock,jh(()=>Le=!1)),qe.$set(h);const b={};1073741824&t&&(b.$$scope={dirty:t,ctx:e}),We.$set(b);const $={};1073741824&t&&($.$$scope={dirty:t,ctx:e}),et.$set($),1&t&&nt.value!==e[0].appName&&_h(nt,e[0].appName),ot&&Xf(ot.update)&&2&t&&ot.update.call(null,e[1]?.appName);const y={};1073741824&t&&(y.$$scope={dirty:t,ctx:e}),ct.$set(y),1&t&&ut.value!==e[0].appVersion&&_h(ut,e[0].appVersion),dt&&Xf(dt.update)&&2&t&&dt.update.call(null,e[1]?.appVersion);const _={};!ft&&1&t&&(ft=!0,_.macros=e[0].macros,jh(()=>ft=!1)),mt.$set(_);const k={};2&t&&(k.errors=e[1]),!vt&&1&t&&(vt=!0,k.info=e[0].info,jh(()=>vt=!1)),gt.$set(k)},i(e){bt||(Jh(f.$$.fragment,e),Jh(x.$$.fragment,e),Jh(D.$$.fragment,e),Jh(B.$$.fragment,e),Jh(oe.$$.fragment,e),Jh(le.$$.fragment,e),Jh(de.$$.fragment,e),Jh(_e.$$.fragment,e),Jh(Ce.$$.fragment,e),Jh(Ue.$$.fragment,e),Jh(Me.$$.fragment,e),Jh(qe.$$.fragment,e),Jh(We.$$.fragment,e),Jh(et.$$.fragment,e),Jh(ct.$$.fragment,e),Jh(mt.$$.fragment,e),Jh(gt.$$.fragment,e),bt=!0)},o(e){Gh(f.$$.fragment,e),Gh(x.$$.fragment,e),Gh(D.$$.fragment,e),Gh(B.$$.fragment,e),Gh(oe.$$.fragment,e),Gh(le.$$.fragment,e),Gh(de.$$.fragment,e),Gh(_e.$$.fragment,e),Gh(Ce.$$.fragment,e),Gh(Ue.$$.fragment,e),Gh(Me.$$.fragment,e),Gh(qe.$$.fragment,e),Gh(We.$$.fragment,e),Gh(et.$$.fragment,e),Gh(ct.$$.fragment,e),Gh(mt.$$.fragment,e),Gh(gt.$$.fragment,e),bt=!1},d(e){e&&uh(t),Xh(f),Xh(x),Xh(D),Xh(B),Ct.d(),Xh(oe),Xh(le),Xh(de),e&&uh(me),e&&uh(fe),Xh(_e),Xh(Ce),e&&uh(Se),e&&uh(Ee),Xh(Ue),Xh(Me),e&&uh(Ze),Xh(qe,e),e&&uh(Fe),e&&uh(Ve),Xh(We),Xh(et),Xh(ct),e&&uh(pt),Xh(mt,e),e&&uh(ht),Xh(gt,e),$t.r(),yt.r(),_t.r(),kt=!1,Kf(xt)}}}function aw(e,t,n){const o=Gb.defaults;let r,{opts:i={kind:"Governor",...o,proposalThreshold:"",quorumAbsolute:"",info:{...uv},macros:{...pv}}}=t;let a,{errors:s}=t,c="erc721votes"===i.votes,l=i.decimals;return e.$$set=e=>{"opts"in e&&n(0,i=e.opts),"errors"in e&&n(1,s=e.errors)},e.$$.update=()=>{193&e.$$.dirty&&(c&&"erc721votes"!==i.votes?(n(0,i.decimals=l,i),n(3,a=!1)):c||"erc721votes"!==i.votes||(n(7,l=i.decimals),n(0,i.decimals=0,i),n(3,a=!0)),n(6,c="erc721votes"===i.votes))},[i,s,r,a,o,()=>{if(s){const e=s,t=s.quorumAbsolute;n(1,s.quorumAbsolute=void 0,s),r.focus(),setTimeout(()=>{s===e&&n(1,s.quorumAbsolute=t,s)},1e3)}},c,l,function(){i.name=this.value,n(0,i),n(6,c),n(7,l)},function(){i.delay=this.value,n(0,i),n(6,c),n(7,l)},function(){i.period=this.value,n(0,i),n(6,c),n(7,l)},function(){i.proposalThreshold=this.value,n(0,i),n(6,c),n(7,l)},function(){i.quorumMode=this.__value,n(0,i),n(6,c),n(7,l)},[[],[],[],[]],function(){i.quorumMode=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.quorumPercent=$h(this.value),n(0,i),n(6,c),n(7,l)},function(){i.quorumAbsolute=this.value,n(0,i),n(6,c),n(7,l)},function(e){Dh[e?"unshift":"push"](()=>{r=e,n(2,r)})},function(){i.decimals=$h(this.value),n(0,i),n(6,c),n(7,l)},function(){i.settings=this.checked,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.upgradeable,t)&&(i.upgradeable=t,n(0,i),n(6,c),n(7,l))},function(){i.votes=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.votes=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.clockMode=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.timelock=this.__value,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.timelock,t)&&(i.timelock=t,n(0,i),n(6,c),n(7,l))},function(){i.appName=this.value,n(0,i),n(6,c),n(7,l)},function(){i.appVersion=this.value,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.macros,t)&&(i.macros=t,n(0,i),n(6,c),n(7,l))},function(t){e.$$.not_equal(i.info,t)&&(i.info=t,n(0,i),n(6,c),n(7,l))}]}function sw(e){let t;return{c(){t=mh("The timestamp marking the beginning of the vesting period.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function cw(e){let t;return{c(){t=mh("The total duration of the vesting period.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function lw(e){let t;return{c(){t=mh("The duration of the cliff period. Must be less than or equal to the total duration.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function uw(e){let t;return{c(){t=mh("A vesting schedule implementation when tokens are vested gradually following a linear curve.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function dw(e){let t;return{c(){t=mh("A custom vesting schedule that requires the implementation of the VestingSchedule trait.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function pw(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te;function ne(t){e[9](t)}p=new C_({props:{$$slots:{default:[sw]},$$scope:{ctx:e}}}),y=new C_({props:{$$slots:{default:[cw]},$$scope:{ctx:e}}}),E=new C_({props:{$$slots:{default:[lw]},$$scope:{ctx:e}}}),Z=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/finance#LinearVestingSchedule",$$slots:{default:[uw]},$$scope:{ctx:e}}}),H=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/finance#VestingComponent-Vesting-Schedule",$$slots:{default:[dw]},$$scope:{ctx:e}}});let oe={};function re(t){e[10](t)}void 0!==e[0].macros&&(oe.macros=e[0].macros),G=new bk({props:oe}),Dh.push(()=>Bh(G,"macros",ne));let ie={errors:e[1]};return void 0!==e[0].info&&(ie.info=e[0].info),K=new mk({props:ie}),Dh.push(()=>Bh(K,"info",re)),Y=bh(e[7][0]),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),c=fh(),l=dh("label"),u=dh("span"),d=mh("Start date (UTC)\n "),Wh(p.$$.fragment),m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),$=mh("Duration\n "),Wh(y.$$.fragment),_=fh(),k=dh("input"),w=fh(),I=dh("label"),C=dh("span"),S=mh("Cliff duration\n "),Wh(E.$$.fragment),z=fh(),T=dh("input"),O=fh(),U=dh("section"),R=dh("h1"),R.textContent="Vesting Schedule",A=fh(),N=dh("div"),j=dh("label"),P=dh("input"),M=mh("\n Linear\n "),Wh(Z.$$.fragment),q=fh(),L=dh("label"),F=dh("input"),V=mh("\n Custom\n "),Wh(H.$$.fragment),J=fh(),Wh(G.$$.fragment),W=fh(),Wh(K.$$.fragment),vh(r,"class","labeled-input"),vh(u,"class","flex justify-between pr-2"),vh(f,"type","datetime-local"),vh(f,"placeholder",""),vh(l,"class","labeled-input"),vh(b,"class","flex justify-between pr-2"),vh(k,"placeholder","0"),vh(v,"class","labeled-input"),vh(C,"class","flex justify-between pr-2"),vh(T,"placeholder","0"),vh(I,"class","labeled-input"),vh(t,"class","controls-section"),vh(P,"type","radio"),P.__value="linear",P.value=P.__value,xh(j,"checked","linear"===e[0].schedule),vh(F,"type","radio"),F.__value="custom",F.value=F.__value,xh(L,"checked","custom"===e[0].schedule),vh(N,"class","checkbox-group"),vh(U,"class","controls-section"),Y.p(P,F)},m(B,X){lh(B,t,X),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,c),sh(t,l),sh(l,u),sh(u,d),Kh(p,u,null),sh(l,m),sh(l,f),_h(f,e[0].startDate),sh(t,g),sh(t,v),sh(v,b),sh(b,$),Kh(y,b,null),sh(v,_),sh(v,k),_h(k,e[0].duration),sh(t,w),sh(t,I),sh(I,C),sh(C,S),Kh(E,C,null),sh(I,z),sh(I,T),_h(T,e[0].cliffDuration),lh(B,O,X),lh(B,U,X),sh(U,R),sh(U,A),sh(U,N),sh(N,j),sh(j,P),P.checked=P.__value===e[0].schedule,sh(j,M),Kh(Z,j,null),sh(N,q),sh(N,L),sh(L,F),F.checked=F.__value===e[0].schedule,sh(L,V),Kh(H,L,null),lh(B,J,X),Kh(G,B,X),lh(B,W,X),Kh(K,B,X),Q=!0,ee||(te=[gh(s,"input",e[2]),gh(f,"input",e[3]),ah(h=B_.call(null,f,e[1]?.startDate)),gh(k,"input",e[4]),ah(x=B_.call(null,k,e[1]?.duration)),gh(T,"input",e[5]),ah(D=B_.call(null,T,e[1]?.cliffDuration)),gh(P,"change",e[6]),gh(F,"change",e[8])],ee=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name);const n={};2048&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&_h(f,e[0].startDate),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.startDate);const o={};2048&t&&(o.$$scope={dirty:t,ctx:e}),y.$set(o),1&t&&k.value!==e[0].duration&&_h(k,e[0].duration),x&&Xf(x.update)&&2&t&&x.update.call(null,e[1]?.duration);const r={};2048&t&&(r.$$scope={dirty:t,ctx:e}),E.$set(r),1&t&&T.value!==e[0].cliffDuration&&_h(T,e[0].cliffDuration),D&&Xf(D.update)&&2&t&&D.update.call(null,e[1]?.cliffDuration),1&t&&(P.checked=P.__value===e[0].schedule);const i={};2048&t&&(i.$$scope={dirty:t,ctx:e}),Z.$set(i),(!Q||1&t)&&xh(j,"checked","linear"===e[0].schedule),1&t&&(F.checked=F.__value===e[0].schedule);const a={};2048&t&&(a.$$scope={dirty:t,ctx:e}),H.$set(a),(!Q||1&t)&&xh(L,"checked","custom"===e[0].schedule);const c={};!B&&1&t&&(B=!0,c.macros=e[0].macros,jh(()=>B=!1)),G.$set(c);const l={};2&t&&(l.errors=e[1]),!X&&1&t&&(X=!0,l.info=e[0].info,jh(()=>X=!1)),K.$set(l)},i(e){Q||(Jh(p.$$.fragment,e),Jh(y.$$.fragment,e),Jh(E.$$.fragment,e),Jh(Z.$$.fragment,e),Jh(H.$$.fragment,e),Jh(G.$$.fragment,e),Jh(K.$$.fragment,e),Q=!0)},o(e){Gh(p.$$.fragment,e),Gh(y.$$.fragment,e),Gh(E.$$.fragment,e),Gh(Z.$$.fragment,e),Gh(H.$$.fragment,e),Gh(G.$$.fragment,e),Gh(K.$$.fragment,e),Q=!1},d(e){e&&uh(t),Xh(p),Xh(y),Xh(E),e&&uh(O),e&&uh(U),Xh(Z),Xh(H),e&&uh(J),Xh(G,e),e&&uh(W),Xh(K,e),Y.r(),ee=!1,Kf(te)}}}function mw(e,t,n){let{opts:o={kind:"Vesting",...Bb.defaults,info:{...uv},macros:{...pv}}}=t,{errors:r}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.name=this.value,n(0,o)},function(){o.startDate=this.value,n(0,o)},function(){o.duration=this.value,n(0,o)},function(){o.cliffDuration=this.value,n(0,o)},function(){o.schedule=this.__value,n(0,o)},[[]],function(){o.schedule=this.__value,n(0,o)},function(t){e.$$.not_equal(o.macros,t)&&(o.macros=t,n(0,o))},function(t){e.$$.not_equal(o.info,t)&&(o.info=t,n(0,o))}]}function fw(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function hw(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A;function N(t){e[5](t)}v=new C_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[fw]},$$scope:{ctx:e}}});let j={};function P(t){e[6](t)}function M(t){e[7](t)}function Z(t){e[8](t)}function q(t){e[9](t)}void 0!==e[0].upgradeable&&(j.upgradeable=e[0].upgradeable),$=new lk({props:j}),Dh.push(()=>Bh($,"upgradeable",N));let L={required:e[2],errors:e[1]};function F(t){e[10](t)}void 0!==e[0].access.type&&(L.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(L.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(L.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(L.darMaxTransferDelay=e[0].access.darMaxTransferDelay),k=new ik({props:L}),Dh.push(()=>Bh(k,"accessType",P)),Dh.push(()=>Bh(k,"darInitialDelay",M)),Dh.push(()=>Bh(k,"darDefaultDelayIncrease",Z)),Dh.push(()=>Bh(k,"darMaxTransferDelay",q));let V={};function H(t){e[11](t)}void 0!==e[0].macros&&(V.macros=e[0].macros),E=new bk({props:V}),Dh.push(()=>Bh(E,"macros",F));let J={errors:e[1]};return void 0!==e[0].info&&(J.info=e[0].info),D=new mk({props:J}),Dh.push(()=>Bh(D,"info",H)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),l=fh(),u=dh("section"),d=dh("h1"),d.textContent="Features",p=fh(),m=dh("div"),f=dh("label"),h=dh("input"),g=mh("\n Pausable\n "),Wh(v.$$.fragment),b=fh(),Wh($.$$.fragment),_=fh(),Wh(k.$$.fragment),S=fh(),Wh(E.$$.fragment),T=fh(),Wh(D.$$.fragment),vh(r,"class","labeled-input"),vh(t,"class","controls-section"),vh(h,"type","checkbox"),xh(f,"checked",e[0].pausable),vh(m,"class","checkbox-group"),vh(u,"class","controls-section")},m(y,x){lh(y,t,x),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),lh(y,l,x),lh(y,u,x),sh(u,d),sh(u,p),sh(u,m),sh(m,f),sh(f,h),h.checked=e[0].pausable,sh(f,g),Kh(v,f,null),sh(m,b),Kh($,m,null),lh(y,_,x),Kh(k,y,x),lh(y,S,x),Kh(E,y,x),lh(y,T,x),Kh(D,y,x),U=!0,R||(A=[gh(s,"input",e[3]),ah(c=B_.call(null,s,e[1]?.name)),gh(h,"change",e[4])],R=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&(h.checked=e[0].pausable);const n={};4096&t&&(n.$$scope={dirty:t,ctx:e}),v.$set(n),(!U||1&t)&&xh(f,"checked",e[0].pausable);const o={};!y&&1&t&&(y=!0,o.upgradeable=e[0].upgradeable,jh(()=>y=!1)),$.$set(o);const r={};4&t&&(r.required=e[2]),2&t&&(r.errors=e[1]),!x&&1&t&&(x=!0,r.accessType=e[0].access.type,jh(()=>x=!1)),!w&&1&t&&(w=!0,r.darInitialDelay=e[0].access.darInitialDelay,jh(()=>w=!1)),!I&&1&t&&(I=!0,r.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>I=!1)),!C&&1&t&&(C=!0,r.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>C=!1)),k.$set(r);const i={};!z&&1&t&&(z=!0,i.macros=e[0].macros,jh(()=>z=!1)),E.$set(i);const a={};2&t&&(a.errors=e[1]),!O&&1&t&&(O=!0,a.info=e[0].info,jh(()=>O=!1)),D.$set(a)},i(e){U||(Jh(v.$$.fragment,e),Jh($.$$.fragment,e),Jh(k.$$.fragment,e),Jh(E.$$.fragment,e),Jh(D.$$.fragment,e),U=!0)},o(e){Gh(v.$$.fragment,e),Gh($.$$.fragment,e),Gh(k.$$.fragment,e),Gh(E.$$.fragment,e),Gh(D.$$.fragment,e),U=!1},d(e){e&&uh(t),e&&uh(l),e&&uh(u),Xh(v),Xh($),e&&uh(_),Xh(k,e),e&&uh(S),Xh(E,e),e&&uh(T),Xh(D,e),R=!1,Kf(A)}}}function gw(e,t,n){let o,{opts:r={kind:"Custom",...Wb.defaults,info:{...uv},macros:{...pv},access:{...Wb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Wb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}const vw={ERC20:class extends eg{constructor(e){super(),Yh(this,e,Bk,Gk,Qf,{opts:0,errors:1},null,[-1,-1])}},ERC721:class extends eg{constructor(e){super(),Yh(this,e,mx,px,Qf,{opts:0,errors:1})}},ERC1155:class extends eg{constructor(e){super(),Yh(this,e,kx,_x,Qf,{opts:0,errors:1})}},ERC6909:class extends eg{constructor(e){super(),Yh(this,e,Tx,zx,Qf,{opts:0,errors:1})}},Account:class extends eg{constructor(e){super(),Yh(this,e,Px,jx,Qf,{opts:0,errors:1,accountType:2})}},Multisig:class extends eg{constructor(e){super(),Yh(this,e,qx,Zx,Qf,{opts:0,errors:1})}},Governor:class extends eg{constructor(e){super(),Yh(this,e,aw,iw,Qf,{opts:0,errors:1})}},Vesting:class extends eg{constructor(e){super(),Yh(this,e,mw,pw,Qf,{opts:0,errors:1})}},Custom:class extends eg{constructor(e){super(),Yh(this,e,gw,hw,Qf,{opts:0,errors:1})}}},bw={emptyContract:()=>new Fg("MyToken",{withComponents:pv.withComponents}),build:e=>function(e){switch(e.kind){case"ERC20":return Qv(e);case"ERC721":return cb(e);case"ERC1155":return pb(e);case"ERC6909":return vb(e);case"Account":return xb(e);case"Multisig":return Nb(e);case"Governor":return Tb(e);case"Vesting":return Mb(e);case"Custom":return _b(e);default:throw new Error("Unknown ERC")}}(e),print:e=>Uv(e),optionsErrors:e=>e instanceof Rg?e.messages:void 0,highlight:e=>i$.highlight("cairo",e).value,injectHyperlinks:function(e){const t=/use<\/span> (openzeppelin)::([^A-Z]*)(::[a-zA-Z0-9]+|::{)/g;let n=e,o=t.exec(e);for(;null!=o;){const[r,i,a,s]=o;if(void 0!==r&&void 0!==i&&void 0!==a&&void 0!==s){const e="https://github.com/OpenZeppelin/cairo-contracts/blob/v4.0.1/packages/",t=a.split("::");if(t.splice(1,0,"src"),void 0!==t&&t.length>0){let o;if("::{"===s)o=`use</span> <a class="import-link" href='${e}${t.join("/")}.cairo' target='_blank' rel='noopener noreferrer'>${i}::${a}</a>${s}`;else{const n=s.substring(2,s.length),r=l$[n],c=r?`/${r}.cairo`:".cairo";o=`use</span> <a class="import-link" href='${e}${t.join("/")}${c}' target='_blank' rel='noopener noreferrer'>${i}::${a}${s}</a>`}n=n.replace(r,o)}}o=t.exec(e)}return n},highlightClass:"-cairo",fence:"cairo",controls:vw,controlProps:(e,t)=>"Account"===e?{accountType:t?.type}:{}};!function(e,t=document.body){(async function(e,t,n=document.body){const o=new Hf({name:`OpenZeppelin ${t}`,version:"1.0.0"},{},{autoResize:!1});document.documentElement.style.setProperty("--mcp-app-height","560px");const r=new Og({target:n,props:{adapter:e,kind:t,mcpApp:o}}),i=new bf(window.parent,window.parent);o.connect(i).then(async()=>{const e=ig(o);console.info(`[mcp-apps] connected (${t}) hostCapabilities`,o.getHostCapabilities()),r.$set({hostConnected:!0,hostConnectError:void 0,hostSendCaps:e}),await o.sendSizeChanged({height:Ug})}).catch(e=>{const n=e instanceof Error?e.message:String(e);console.error(`[mcp-apps] connect failed for ${t}`,e),r.$set({hostConnected:!1,hostConnectError:n})})})(e,"__OZ_MCP_KIND__",t)}(bw)}();
|
|
16
|
+
!function(){"use strict";var e=[],t=[];!function(n,o){if(n&&"undefined"!=typeof document){var r,i=!0===o.prepend?"prepend":"append",a=!0===o.singleTag,s="string"==typeof o.container?document.querySelector(o.container):document.getElementsByTagName("head")[0];if(a){var c=e.indexOf(s);-1===c&&(c=e.push(s)-1,t[c]={}),r=t[c]&&t[c][i]?t[c][i]:t[c][i]=l()}else r=l();65279===n.charCodeAt(0)&&(n=n.substring(1)),r.styleSheet?r.styleSheet.cssText+=n:r.appendChild(document.createTextNode(n))}function l(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),o.attributes)for(var t=Object.keys(o.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],o.attributes[t[n]]);var r="prepend"===i?"afterbegin":"beforeend";return s.insertAdjacentElement(r,e),e}}("pre code.hljs {\n display: block;\n overflow-x: auto;\n padding: 1em\n}\ncode.hljs {\n padding: 3px 5px\n}\n/*\n\nAtom One Dark by Daniel Gamage\nOriginal One Dark Syntax theme from https://github.com/atom/one-dark-syntax\n\nbase: #282c34\nmono-1: #abb2bf\nmono-2: #818896\nmono-3: #5c6370\nhue-1: #56b6c2\nhue-2: #61aeee\nhue-3: #c678dd\nhue-4: #98c379\nhue-5: #e06c75\nhue-5-2: #be5046\nhue-6: #d19a66\nhue-6-2: #e6c07b\n\n*/\n.hljs {\n color: #abb2bf;\n background: #282c34\n}\n.hljs-comment,\n.hljs-quote {\n color: #5c6370;\n font-style: italic\n}\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n color: #c678dd\n}\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n color: #e06c75\n}\n.hljs-literal {\n color: #56b6c2\n}\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta .hljs-string {\n color: #98c379\n}\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n color: #d19a66\n}\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n color: #61aeee\n}\n.hljs-built_in,\n.hljs-title.class_,\n.hljs-class .hljs-title {\n color: #e6c07b\n}\n.hljs-emphasis {\n font-style: italic\n}\n.hljs-strong {\n font-weight: bold\n}\n.hljs-link {\n text-decoration: underline\n}\n\n.visible {\n visibility: visible\n}\n\n.invisible {\n visibility: hidden\n}\n\n.collapse {\n visibility: collapse\n}\n\n.fixed {\n position: fixed\n}\n\n.absolute {\n position: absolute\n}\n\n.relative {\n position: relative\n}\n\n.bottom-1 {\n bottom: 0.25rem\n}\n\n.bottom-4 {\n bottom: 1rem\n}\n\n.bottom-8 {\n bottom: 2rem\n}\n\n.bottom-\\[3\\.75rem\\] {\n bottom: 3.75rem\n}\n\n.left-4 {\n left: 1rem\n}\n\n.right-0 {\n right: 0px\n}\n\n.right-4 {\n right: 1rem\n}\n\n.right-8 {\n right: 2rem\n}\n\n.z-20 {\n z-index: 20\n}\n\n.z-50 {\n z-index: 50\n}\n\n.m-0 {\n margin: 0px\n}\n\n.m-\\[2px\\] {\n margin: 2px\n}\n\n.mb-1 {\n margin-bottom: 0.25rem\n}\n\n.ml-1 {\n margin-left: 0.25rem\n}\n\n.ml-2 {\n margin-left: 0.5rem\n}\n\n.ml-auto {\n margin-left: auto\n}\n\n.mr-2 {\n margin-right: 0.5rem\n}\n\n.block {\n display: block\n}\n\n.flex {\n display: flex\n}\n\n.grid {\n display: grid\n}\n\n.contents {\n display: contents\n}\n\n.hidden {\n display: none\n}\n\n.h-10 {\n height: 2.5rem\n}\n\n.h-14 {\n height: 3.5rem\n}\n\n.h-32 {\n height: 8rem\n}\n\n.h-6 {\n height: 1.5rem\n}\n\n.h-\\[32px\\] {\n height: 32px\n}\n\n.h-\\[36px\\] {\n height: 36px\n}\n\n.h-\\[calc\\(100\\%-188px\\)\\] {\n height: calc(100% - 188px)\n}\n\n.h-\\[calc\\(100\\%-800px\\)\\] {\n height: calc(100% - 800px)\n}\n\n.h-full {\n height: 100%\n}\n\n.max-h-full {\n max-height: 100%\n}\n\n.min-h-0 {\n min-height: 0px\n}\n\n.min-h-\\[200px\\] {\n min-height: 200px\n}\n\n.w-10 {\n width: 2.5rem\n}\n\n.w-32 {\n width: 8rem\n}\n\n.w-6 {\n width: 1.5rem\n}\n\n.w-60 {\n width: 15rem\n}\n\n.w-80 {\n width: 20rem\n}\n\n.w-\\[32px\\] {\n width: 32px\n}\n\n.w-\\[36px\\] {\n width: 36px\n}\n\n.w-\\[40rem\\] {\n width: 40rem\n}\n\n.w-full {\n width: 100%\n}\n\n.min-w-0 {\n min-width: 0px\n}\n\n.min-w-\\[14rem\\] {\n min-width: 14rem\n}\n\n.min-w-\\[40px\\] {\n min-width: 40px\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px\n}\n\n.max-w-\\[42\\%\\] {\n max-width: 42%\n}\n\n.flex-1 {\n flex: 1 1 0%\n}\n\n.flex-none {\n flex: none\n}\n\n.shrink-0 {\n flex-shrink: 0\n}\n\n.grow {\n flex-grow: 1\n}\n\n.basis-0 {\n flex-basis: 0px\n}\n\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0\n }\n 100% {\n opacity: 1\n }\n}\n\n.animate-fade-in {\n animation: fade-in 0.3s ease-out\n}\n\n@keyframes fade-up {\n 0% {\n opacity: 0;\n transform: translateY(1rem)\n }\n 100% {\n opacity: 1;\n transform: translateY(0)\n }\n}\n\n.animate-fade-up {\n animation: fade-up 0.2s ease-out\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg)\n }\n}\n\n.animate-spin-slow {\n animation: spin 2s linear infinite\n}\n\n.cursor-pointer {\n cursor: pointer\n}\n\n.resize-none {\n resize: none\n}\n\n.resize {\n resize: both\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr))\n}\n\n.grid-cols-\\[2fr\\2c 1fr\\] {\n grid-template-columns: 2fr 1fr\n}\n\n.flex-row {\n flex-direction: row\n}\n\n.flex-col {\n flex-direction: column\n}\n\n.flex-col-reverse {\n flex-direction: column-reverse\n}\n\n.flex-wrap {\n flex-wrap: wrap\n}\n\n.items-center {\n align-items: center\n}\n\n.justify-center {\n justify-content: center\n}\n\n.justify-between {\n justify-content: space-between\n}\n\n.gap-2 {\n gap: 0.5rem\n}\n\n.gap-3 {\n gap: 0.75rem\n}\n\n.gap-4 {\n gap: 1rem\n}\n\n.overflow-auto {\n overflow: auto\n}\n\n.overflow-hidden {\n overflow: hidden\n}\n\n.overflow-x-auto {\n overflow-x: auto\n}\n\n.overflow-y-auto {\n overflow-y: auto\n}\n\n.rounded-full {\n border-radius: 9999px\n}\n\n.rounded-md {\n border-radius: 0.375rem\n}\n\n.rounded-xl {\n border-radius: 0.75rem\n}\n\n.border {\n border-width: 1px\n}\n\n.border-0 {\n border-width: 0px\n}\n\n.border-b {\n border-bottom-width: 1px\n}\n\n.border-r {\n border-right-width: 1px\n}\n\n.border-solid {\n border-style: solid\n}\n\n.border-none {\n border-style: none\n}\n\n.border-\\[var\\(--gray-3\\)\\] {\n border-color: var(--gray-3)\n}\n\n.border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1))\n}\n\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1))\n}\n\n.bg-transparent {\n background-color: transparent\n}\n\n.p-2 {\n padding: 0.5rem\n}\n\n.p-3 {\n padding: 0.75rem\n}\n\n.p-4 {\n padding: 1rem\n}\n\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem\n}\n\n.pr-2 {\n padding-right: 0.5rem\n}\n\n.text-center {\n text-align: center\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem\n}\n\n.font-bold {\n font-weight: 700\n}\n\n.lowercase {\n text-transform: lowercase\n}\n\n.italic {\n font-style: italic\n}\n\n.text-gray-50 {\n --tw-text-opacity: 1;\n color: rgb(249 250 251 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1))\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1))\n}\n\n.underline {\n text-decoration-line: underline\n}\n\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)\n}\n\n*,\n*:before,\n*:after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\nhtml {\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n}\n\ncode {\n font-family: var(--monospace);\n font-size: 1em;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n}\n:root {\n --sans-serif: system-ui, sans-serif;\n --monospace: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;\n\n /* Colors */\n\n --text-color: #333333;\n\n --gray-1: #f9fafb;\n --gray-2: #eff1f3;\n --gray-3: #d8dbe2;\n --gray-4: #818998;\n --gray-5: #575c66;\n --gray-6: #2c374b;\n\n --blue-1: #f5f6ff;\n --blue-2: #4e5de4;\n --blue-3: #343f9d;\n\n --yellow-1: #fffaeb;\n --yellow-2: #ffcc33;\n --yellow-3: #b27700;\n\n --red-1: #feecec;\n --red-2: #f53d3d;\n --red-3: #aa0909;\n\n --solidity-blue-1: #51d4ff;\n --solidity-blue-2: #4e5de4;\n\n --cairo-orange: #fe4a3c;\n\n --polkadot-pink: #ff2670;\n\n --stylus-pink: #e3066e;\n\n --stellar-black: #0f0f0f;\n\n --confidential-black: #000000;\n --confidential-yellow: #ffd208;\n\n --uniswap-pink: #f50eb4;\n\n /* TRON Red, per the official brand palette (PANTONE 185C). */\n --tron-red: #dc062b;\n\n /* Dimensions (scale taken from Tailwind) */\n\n --size-1: 0.25rem;\n --size-2: 0.5rem;\n --size-3: 0.75rem;\n --size-4: 1rem;\n --size-8: 2rem;\n --size-64: 16rem;\n\n /* Font Sizes */\n\n --text-small: 0.875rem;\n\n /* Utilities */\n\n --shadow: 0 2px 3px rgba(0, 0, 0, 0.1);\n\n --icon-adjust: 0.125em;\n}\n.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}\n[data-tippy-root]{max-width:calc(100vw - 10px)}\n.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}\n.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}\n.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}\n.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}\n.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}\n.tippy-box[data-placement^=left]>.tippy-arrow{right:0}\n.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}\n.tippy-box[data-placement^=right]>.tippy-arrow{left:0}\n.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}\n.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}\n.tippy-arrow{width:16px;height:16px;color:#333}\n.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}\n.tippy-content{position:relative;padding:5px 9px;z-index:1}\n.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}\n.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}\n:root {\n --tippy-background: #333;\n --tippy-text: var(--gray-3);\n --tippy-border: rgba(0, 8, 16, 0.15);\n}\n.tippy-box[data-theme~='light'] {\n --tippy-background: #fffffff5;\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-yellow'] {\n --tippy-background: var(--yellow-1);\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-red'] {\n --tippy-background: var(--red-1);\n --tippy-text: #333;\n}\n.tippy-box {\n background-color: var(--tippy-background);\n background-clip: padding-box;\n color: var(--tippy-text);\n box-shadow: var(--shadow);\n font-weight: initial;\n font-variant: initial;\n text-transform: none;\n}\n.tippy-box[data-theme~='border'] {\n border: 1px solid var(--tippy-border);\n}\n.tippy-box > .tippy-backdrop {\n background-color: var(--tippy-background);\n}\n.tippy-box[data-theme~='border'] > .tippy-arrow:after {\n content: '';\n position: absolute;\n z-index: -1;\n border-color: transparent;\n border-style: solid;\n}\n.tippy-box[data-placement^='top'] > .tippy-arrow:before {\n border-top-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='bottom'] > .tippy-arrow:before {\n border-bottom-color: var(--tippy-background);\n bottom: 16px;\n}\n.tippy-box[data-placement^='left'] > .tippy-arrow:before {\n border-left-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='right'] > .tippy-arrow:before {\n border-right-color: var(--tippy-background);\n right: 16px;\n}\n.tippy-box[data-theme~='border'][data-placement^='top'] > .tippy-arrow:after {\n border-top-color: var(--tippy-border);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='bottom'] > .tippy-arrow:after {\n border-bottom-color: var(--tippy-border);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='left'] > .tippy-arrow:after {\n border-left-color: var(--tippy-border);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='right'] > .tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: var(--tippy-border);\n}\n.container {\n background-color: var(--gray-1);\n min-width: 0;\n width: 100%;\n box-sizing: border-box;\n}\n.wizard-panes {\n position: relative;\n min-width: 0;\n}\n.wizard-panes .controls,\n.wizard-panes .output {\n height: calc(100vh - 84px);\n min-width: 0;\n}\n.header .tab {\n flex: 1 1 auto;\n min-width: 0;\n}\n.wizard-panes::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: 0;\n width: var(--controls-fade-width, 18rem);\n max-width: 100%;\n height: 4.5rem;\n pointer-events: none;\n background: linear-gradient(to top, rgb(255, 255, 255) 25%, rgba(255, 255, 255, 0.85) 55%, transparent);\n border-bottom-left-radius: 1.5rem;\n z-index: 1;\n opacity: 1;\n transition: opacity 0.15s ease;\n}\n.wizard-panes.controls-at-end::after {\n opacity: 0;\n}\n.wizard-panes .controls {\n scrollbar-width: thin;\n scrollbar-color: var(--gray-3) transparent;\n}\n.wizard-panes .controls::-webkit-scrollbar {\n width: 8px;\n}\n.wizard-panes .controls::-webkit-scrollbar-thumb {\n background: var(--gray-3);\n border-radius: 8px;\n}\n@media (max-width: 720px) {\n .container,\n .page-container {\n overflow: visible;\n }\n\n /* Flatten wrappers so the stack is tabs → options → actions → code. */\n .header,\n .wizard-panes {\n display: contents;\n }\n\n .wizard-panes::after {\n display: none;\n }\n\n .tab {\n order: 0;\n flex: 0 0 auto;\n width: 100%;\n min-width: 0;\n }\n\n .wizard-panes .controls,\n .wizard-panes .output {\n width: 100%;\n min-width: 0;\n max-width: 100%;\n height: auto;\n resize: none;\n }\n\n .wizard-panes .controls {\n order: 1;\n /* rem, not vh: the embed iframe is sized to content, so vh would recurse. */\n max-height: 22rem;\n border-radius: 1.5rem;\n box-shadow: none;\n -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);\n mask-image: linear-gradient(to bottom, #000 78%, transparent);\n }\n\n .wizard-panes.controls-at-end .controls {\n -webkit-mask-image: none;\n mask-image: none;\n }\n\n .action {\n order: 2;\n z-index: 5;\n justify-content: flex-end;\n flex-wrap: nowrap;\n width: 100%;\n box-sizing: border-box;\n margin-left: 0;\n /* Collapse the container gap so this toolbar sits on the code card. */\n margin-bottom: -1rem;\n padding: 0.4rem 0.6rem;\n background-color: white;\n border-radius: 1.5rem 1.5rem 0 0;\n }\n\n .action .action-button {\n padding: 7px 12px;\n }\n\n .wizard-panes .output {\n order: 3;\n min-height: 32rem;\n margin-top: 0;\n border-radius: 0 0 1.5rem 1.5rem;\n }\n}\n.header {\n font-size: var(--text-small);\n}\n.tab {\n color: var(--gray-5);\n}\n.tab button:hover,\n.overflow-btn:hover {\n background-color: var(--gray-2);\n}\n/* Global .overflow-menu button with .selected class */\n.overflow-menu button.selected {\n order: unset;\n}\n.tab button,\n.overflow-btn {\n border: 0;\n background-color: transparent;\n padding: var(--size-2) var(--size-4);\n border-radius: 20px;\n cursor: pointer;\n transition: background-color ease-in-out 0.2s;\n}\n/* Global .action-button */\n.action-button {\n padding: 7px;\n border-radius: 20px;\n transition: background-color ease-in-out 0.2s;\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n color: var(--gray-6);\n cursor: pointer;\n}\n/* Hover and active states for .action-button */\n.action-button:hover {\n background-color: var(--gray-2);\n}\n.action-button:active,\n.action-button.active {\n background-color: var(--gray-2);\n}\n/* .icon inside .action-button */\n.action-button .icon {\n margin: 0 var(--size-1);\n}\n/* Disabled state */\n.action-button.disabled {\n color: var(--gray-4);\n}\n/* Button with text */\n.with-text {\n padding-right: var(--size-3);\n}\n/* Controls container */\n.controls {\n background-color: white;\n padding: var(--size-4);\n}\n/* Controls footer */\n.controls-footer {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n color: var(--gray-5);\n margin-top: var(--size-3);\n padding: 0 var(--size-2);\n font-size: var(--text-small);\n}\n/* Apply left margin to every element after the first child */\n.controls-footer > * + * {\n margin-left: var(--size-3);\n}\n/* .icon inside .controls-footer */\n.controls-footer .icon {\n margin-right: 0.2em;\n opacity: 0.8;\n}\n/* Links inside .controls-footer */\n.controls-footer a {\n color: inherit;\n text-decoration: none;\n}\n/* Hover effect for links */\n.controls-footer a:hover {\n color: var(--text-color);\n}\n.download-option-content {\n margin-left: var(--size-3);\n font-size: var(--text-small);\n}\n.download-option-content > :first-child {\n margin-bottom: var(--size-2);\n color: var(--gray-6);\n font-weight: bold;\n}\n.download-option-content > :not(:first-child) {\n margin-top: var(--size-1);\n color: var(--gray-5);\n}\n.download-option {\n display: flex;\n padding: var(--size-2);\n text-align: left;\n background: none;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n}\n/* The .icon inside .download-option */\n.download-option :global(.icon) {\n margin-top: var(--icon-adjust);\n}\n/* When the previous sibling is not hovered */\n:not(:hover) + .download-option {\n border-top: 1px solid var(--gray-2);\n}\n/* Hover and focus states */\n.download-option:hover,\n.download-option:focus {\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n}\n/* Direct or nested div inside .download-option */\n.download-option div {\n display: block;\n}\n\n/* General */\n\nbody {\n color: var(--text-color);\n font-family: var(--sans-serif);\n}\n\nsvg.vertical-align {\n vertical-align: calc(-1 * var(--icon-adjust));\n}\n\nsvg.keepcolor {\n fill: currentColor;\n}\n\nsvg.icon {\n vertical-align: calc(-1 * var(--icon-adjust));\n flex: 0 0 auto;\n height: 1em;\n width: 1em;\n fill: currentColor;\n}\n\ninput:not([type]),\ninput[type='text'],\ninput[type='number'],\ninput[type='datetime-local'] {\n border: 1px solid var(--gray-3);\n padding: var(--size-2) var(--size-3);\n border-radius: 6px;\n}\n\n/* Hide up and down arrows in numeric input fields */\n\ninput[type='number']::-webkit-outer-spin-button,\ninput[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type='number'] {\n -moz-appearance: textfield;\n -webkit-appearance: textfield;\n appearance: textfield;\n}\n\n/* Components */\n\n.controls-section {\n display: flex;\n flex-direction: column;\n}\n\n.controls-section + .controls-section {\n margin-top: var(--size-4);\n padding-top: var(--size-4);\n border-top: 1px solid var(--gray-3);\n }\n\n.controls-section > * + * {\n margin-top: var(--size-3);\n }\n\n.controls-section h1 {\n margin-top: 0;\n margin-bottom: 0;\n text-transform: lowercase;\n font-variant: small-caps;\n font-size: var(--text-small);\n color: var(--gray-4);\n font-weight: 600;\n }\n\n.subcontrol::before {\n content: '└';\n color: var(--gray-3);\n}\n\n.checkbox-group {\n display: flex;\n flex-direction: column;\n}\n\n.checkbox-group > * {\n display: flex;\n align-items: center;\n padding: var(--size-2);\n }\n\n.checkbox-group input {\n margin-right: var(--size-2);\n }\n\n.checkbox-group .tooltip {\n margin-left: auto;\n }\n\n.checkbox-group .checked {\n background-color: var(--blue-1);\n }\n\n.labeled-input {\n display: flex;\n flex-direction: column;\n}\n\n.labeled-input > span {\n font-size: var(--text-small);\n }\n\n.labeled-input > input {\n margin-top: var(--size-1);\n width: 100%;\n }\n\n.tooltip-container,\n.checkbox-group > *,\n.labeled-input {\n --tooltip-opacity: 0.15;\n}\n\n.tooltip-container:hover, .checkbox-group > *:hover, .labeled-input:hover {\n --tooltip-opacity: 0.5;\n }\n\ninput.input-inline {\n padding: 0.25em;\n height: 1.5em;\n width: 2em;\n max-width: 100%;\n text-align: center;\n}\n\n.has-error {\n box-shadow: inset 0 0 0 1px var(--red-2);\n}\n\n.import-link {\n color: inherit;\n}\n\n.comment-link {\n color: #7d828d;\n}\n\n.glimmery {\n background: conic-gradient(rgb(196, 181, 253), rgb(110, 231, 183), rgb(249, 168, 212));\n}\n\n.hljs.-solidity {\n background: linear-gradient(30deg, #151a24, #2b323e);\n}\n\n.hljs.-cairo {\n background: linear-gradient(30deg, #191717, #2a0f0f);\n}\n\n.hljs.-stylus {\n background: linear-gradient(30deg, #181215, #360c1f);\n}\n\n.light-link {\n color: white;\n}\n\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))\n}\n",{});const n=Object.freeze({status:"aborted"});function o(e,t,n){function o(n,o){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:o,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,o);const r=a.prototype,i=Object.keys(r);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class i extends r{}function a(e){var t;const r=n?.Parent?new i:this;o(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const r=Symbol("zod_brand");class i extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class a extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const s={};function c(e){return e&&Object.assign(s,e),s}function l(e){const t=Object.values(e).filter(e=>"number"==typeof e),n=Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t);return n}function u(e,t="|"){return e.map(e=>O(e)).join(t)}function d(e,t){return"bigint"==typeof t?t.toString():t}function p(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function m(e){return null==e}function f(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function h(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let r=(o.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(o)){const e=o.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}const g=Symbol("evaluating");function v(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==g)return void 0===o&&(o=g,o=n()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function y(e){return JSON.stringify(e)}function _(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const k="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function x(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const w=p(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function I(e){if(!1===x(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==x(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function C(e){return I(e)?{...e}:Array.isArray(e)?[...e]:e}const S=new Set(["string","number","symbol"]),E=new Set(["string","number","bigint","boolean","symbol","undefined"]);function z(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(e,t,n){const o=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(o._zod.parent=e),o}function D(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function O(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function U(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const R={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},A={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function N(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return T(e,$(e._zod.def,{get shape(){const e={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(e[o]=n.shape[o])}return b(this,"shape",e),e},checks:[]}))}function j(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=$(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete o[e]}return b(this,"shape",o),o},checks:[]});return T(e,r)}function P(e,t){if(!I(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return T(e,o)}function M(e,t){if(!I(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return T(e,n)}function Z(e,t){const n=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return b(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return T(e,n)}function q(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=$(t._zod.def,{get shape(){const o=t._zod.def.shape,r={...o};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:o[t]}):o[t])}else for(const t in o)r[t]=e?new e({type:"optional",innerType:o[t]}):o[t];return b(this,"shape",r),r},checks:[]});return T(t,r)}function L(e,t,n){const o=$(t._zod.def,{get shape(){const o=t._zod.def.shape,r={...o};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:o[t]}))}else for(const t in o)r[t]=new e({type:"nonoptional",innerType:o[t]});return b(this,"shape",r),r}});return T(t,o)}function F(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function V(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function H(e){return"string"==typeof e?e:e?.message}function J(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const r=H(e.inst?._zod.def?.error?.(e))??H(t?.error?.(e))??H(n.customError?.(e))??H(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function G(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function B(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function W(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}function K(...e){const[t,n,o]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:o}:{...t}}function X(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Q(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Y=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:A,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:R,aborted:F,allowsEval:w,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error("Unexpected value in exhaustive check")},assertNotEqual:function(e){return e},assignProp:b,base64ToUint8Array:X,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return X(t+"=".repeat((4-t.length%4)%4))},cached:p,captureStackTrace:k,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:f,clone:T,cloneDef:function(e){return $(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,o,r)=>(t??(t=e()),Reflect.get(t,o,r)),set:(n,o,r,i)=>(t??(t=e()),Reflect.set(t,o,r,i)),has:(n,o)=>(t??(t=e()),Reflect.has(t,o)),deleteProperty:(n,o)=>(t??(t=e()),Reflect.deleteProperty(t,o)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,o)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)),defineProperty:(n,o,r)=>(t??(t=e()),Reflect.defineProperty(t,o,r))})},defineLazy:v,esc:y,escapeRegex:z,extend:P,finalizeIssue:J,floatSafeRemainder:h,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:l,getLengthableOrigin:B,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:G,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:x,isPlainObject:I,issue:K,joinValues:u,jsonStringifyReplacer:d,merge:Z,mergeDefs:$,normalizeParams:D,nullish:m,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:j,optionalKeys:U,parsedType:W,partial:q,pick:N,prefixIssues:V,primitiveTypes:E,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=e[o];return n})},propertyKeyTypes:S,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let o=0;o<e;o++)n+=t[Math.floor(26*Math.random())];return n},required:L,safeExtend:M,shallowClone:C,slugify:_,stringifyPrimitive:O,uint8ArrayToBase64:Q,uint8ArrayToBase64url:function(e){return Q(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:H});const ee=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,d,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},te=o("$ZodError",ee),ne=o("$ZodError",ee,{Parent:Error});function oe(e,t=e=>e.message){const n={},o=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function re(e,t=e=>e.message){const n={_errors:[]},o=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>o({issues:e}));else if("invalid_key"===r.code)o({issues:r.issues});else if("invalid_element"===r.code)o({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,o=0;for(;o<r.path.length;){const n=r.path[o];o===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],o++}}};return o(e),n}function ie(e,t=e=>e.message){const n={errors:[]},o=(e,r=[])=>{var i,a;for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>o({issues:e},s.path));else if("invalid_key"===s.code)o({issues:s.issues},s.path);else if("invalid_element"===s.code)o({issues:s.issues},s.path);else{const e=[...r,...s.path];if(0===e.length){n.errors.push(t(s));continue}let o=n,c=0;for(;c<e.length;){const n=e[c],r=c===e.length-1;"string"==typeof n?(o.properties??(o.properties={}),(i=o.properties)[n]??(i[n]={errors:[]}),o=o.properties[n]):(o.items??(o.items=[]),(a=o.items)[n]??(a[n]={errors:[]}),o=o.items[n]),r&&o.errors.push(t(s)),c++}}};return o(e),n}function ae(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function se(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ae(e.path)}`);return t.join("\n")}const ce=e=>(t,n,o,r)=>{const a=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new i;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>J(e,a,c())));throw k(t,r?.callee),t}return s.value},le=ce(ne),ue=e=>async(t,n,o,r)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>J(e,i,c())));throw k(t,r?.callee),t}return a.value},de=ue(ne),pe=e=>(t,n,o)=>{const r=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},r);if(a instanceof Promise)throw new i;return a.issues.length?{success:!1,error:new(e??te)(a.issues.map(e=>J(e,r,c())))}:{success:!0,data:a.value}},me=pe(ne),fe=e=>async(t,n,o)=>{const r=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>J(e,r,c())))}:{success:!0,data:i.value}},he=fe(ne),ge=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ce(e)(t,n,r)},ve=ge(ne),be=e=>(t,n,o)=>ce(e)(t,n,o),$e=be(ne),ye=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ue(e)(t,n,r)},_e=ye(ne),ke=e=>async(t,n,o)=>ue(e)(t,n,o),xe=ke(ne),we=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return pe(e)(t,n,r)},Ie=we(ne),Ce=e=>(t,n,o)=>pe(e)(t,n,o),Se=Ce(ne),Ee=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fe(e)(t,n,r)},ze=Ee(ne),Te=e=>async(t,n,o)=>fe(e)(t,n,o),De=Te(ne),Oe=/^[cC][^\s-]{8,}$/,Ue=/^[0-9a-z]+$/,Re=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ae=/^[0-9a-vA-V]{20}$/,Ne=/^[A-Za-z0-9]{27}$/,je=/^[a-zA-Z0-9_-]{21}$/,Pe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Me=/^([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})$/,Ze=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qe=Ze(4),Le=Ze(6),Fe=Ze(7),Ve=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,He=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Je=He;function Ge(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const Be=/^(?:(?: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])$/,We=/^(([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}|:))$/,Ke=e=>{const t=z(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Xe=/^((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])$/,Qe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ye=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,et=/^[A-Za-z0-9_-]*$/,tt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,nt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ot=/^\+[1-9]\d{6,14}$/,rt="(?:(?:\\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])))",it=new RegExp(`^${rt}$`);function at(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function st(e){return new RegExp(`^${at(e)}$`)}function ct(e){const t=at({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${rt}T(?:${o})$`)}const lt=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),ut=/^-?\d+n?$/,dt=/^-?\d+$/,pt=/^-?\d+(?:\.\d+)?$/,mt=/^(?:true|false)$/i,ft=/^null$/i,ht=/^undefined$/i,gt=/^[^A-Z]*$/,vt=/^[^a-z]*$/,bt=/^[0-9a-fA-F]*$/;function $t(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function yt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const _t=$t(22,"=="),kt=yt(22),xt=$t(27,"="),wt=yt(27),It=$t(43,"="),Ct=yt(43),St=$t(64,""),Et=yt(64),zt=$t(86,"=="),Tt=yt(86);var Dt=Object.freeze({__proto__:null,base64:Ye,base64url:et,bigint:ut,boolean:mt,browserEmail:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cidrv4:Xe,cidrv6:Qe,cuid:Oe,cuid2:Ue,date:it,datetime:ct,domain:nt,duration:Pe,e164:ot,email:Ve,emoji:Ge,extendedDuration:/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,guid:Me,hex:bt,hostname:tt,html5Email:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,idnEmail:Je,integer:dt,ipv4:Be,ipv6:We,ksuid:Ne,lowercase:gt,mac:Ke,md5_base64:_t,md5_base64url:kt,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:je,null:ft,number:pt,rfc5322Email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,sha1_base64:xt,sha1_base64url:wt,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:It,sha256_base64url:Ct,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:St,sha384_base64url:Et,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:zt,sha512_base64url:Tt,sha512_hex:/^[0-9a-fA-F]{128}$/,string:lt,time:st,ulid:Re,undefined:ht,unicodeEmail:He,uppercase:vt,uuid:Ze,uuid4:qe,uuid6:Le,uuid7:Fe,xid:Ae});const Ot=o("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ut={number:"number",bigint:"bigint",object:"date"},Rt=o("$ZodCheckLessThan",(e,t)=>{Ot.init(e,t);const n=Ut[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),At=o("$ZodCheckGreaterThan",(e,t)=>{Ot.init(e,t);const n=Ut[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Nt=o("$ZodCheckMultipleOf",(e,t)=>{Ot.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 new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===h(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),jt=o("$ZodCheckNumberFormat",(e,t)=>{Ot.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[r,i]=R[t.format];e._zod.onattach.push(e=>{const o=e._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i,n&&(o.pattern=dt)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}))}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Pt=o("$ZodCheckBigIntFormat",(e,t)=>{Ot.init(e,t);const[n,o]=A[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=o}),e._zod.check=r=>{const i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Mt=o("$ZodCheckMaxSize",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;o.size<=t.maximum||n.issues.push({origin:G(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Zt=o("$ZodCheckMinSize",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;o.size>=t.minimum||n.issues.push({origin:G(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qt=o("$ZodCheckSizeEquals",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const o=n.value,r=o.size;if(r===t.size)return;const i=r>t.size;n.issues.push({origin:G(o),...i?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Lt=o("$ZodCheckMaxLength",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const r=B(o);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ft=o("$ZodCheckMinLength",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const r=B(o);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vt=o("$ZodCheckLengthEquals",(e,t)=>{var n;Ot.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const o=n.value,r=o.length;if(r===t.length)return;const i=B(o),a=r>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ht=o("$ZodCheckStringFormat",(e,t)=>{var n,o;Ot.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(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})}):(o=e._zod).check??(o.check=()=>{})}),Jt=o("$ZodCheckRegex",(e,t)=>{Ht.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})}}),Gt=o("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=gt),Ht.init(e,t)}),Bt=o("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vt),Ht.init(e,t)}),Wt=o("$ZodCheckIncludes",(e,t)=>{Ot.init(e,t);const n=z(t.includes),o=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),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})}}),Kt=o("$ZodCheckStartsWith",(e,t)=>{Ot.init(e,t);const n=new RegExp(`^${z(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(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})}}),Xt=o("$ZodCheckEndsWith",(e,t)=>{Ot.init(e,t);const n=new RegExp(`.*${z(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(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})}});function Qt(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues))}const Yt=o("$ZodCheckProperty",(e,t)=>{Ot.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Qt(n,e,t.property));Qt(n,e,t.property)}}),en=o("$ZodCheckMimeType",(e,t)=>{Ot.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),tn=o("$ZodCheckOverwrite",(e,t)=>{Ot.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class nn{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),o=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of o)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const on={major:4,minor:3,patch:6},rn=o("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=on;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const t of o)for(const n of t._zod.onattach)n(e);if(0===o.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let o,r=F(e);for(const a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new i;if(o||s instanceof Promise)o=(o??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=F(e,t)))});else{if(e.issues.length===t)continue;r||(r=F(e,t))}}return o?o.then(()=>e):e},n=(n,r,a)=>{if(F(n))return n.aborted=!0,n;const s=t(r,o,a);if(s instanceof Promise){if(!1===a.async)throw new i;return s.then(t=>e._zod.parse(t,a))}return e._zod.parse(s,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if("backward"===a.direction){const 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)}const s=e._zod.parse(r,a);if(s instanceof Promise){if(!1===a.async)throw new i;return s.then(e=>t(e,o,a))}return t(s,o,a)}}v(e,"~standard",()=>({validate:t=>{try{const n=me(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return he(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),an=o("$ZodString",(e,t)=>{rn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??lt(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(o){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),sn=o("$ZodStringFormat",(e,t)=>{Ht.init(e,t),an.init(e,t)}),cn=o("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Me),sn.init(e,t)}),ln=o("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ze(e))}else t.pattern??(t.pattern=Ze());sn.init(e,t)}),un=o("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ve),sn.init(e,t)}),dn=o("$ZodURL",(e,t)=>{sn.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),r=new URL(o);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.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&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=o)}catch(o){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),pn=o("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ge()),sn.init(e,t)}),mn=o("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=je),sn.init(e,t)}),fn=o("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Oe),sn.init(e,t)}),hn=o("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ue),sn.init(e,t)}),gn=o("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Re),sn.init(e,t)}),vn=o("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ae),sn.init(e,t)}),bn=o("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ne),sn.init(e,t)}),$n=o("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ct(t)),sn.init(e,t)}),yn=o("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=it),sn.init(e,t)}),_n=o("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=st(t)),sn.init(e,t)}),kn=o("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Pe),sn.init(e,t)}),xn=o("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Be),sn.init(e,t),e._zod.bag.format="ipv4"}),wn=o("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=We),sn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),In=o("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ke(t.delimiter)),sn.init(e,t),e._zod.bag.format="mac"}),Cn=o("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Xe),sn.init(e,t)}),Sn=o("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Qe),sn.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(2!==o.length)throw new Error;const[e,t]=o;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function En(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const zn=o("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ye),sn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{En(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Tn(e){if(!et.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return En(t.padEnd(4*Math.ceil(t.length/4),"="))}const Dn=o("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=et),sn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Tn(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),On=o("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ot),sn.init(e,t)});function Un(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[o]=n;if(!o)return!1;const r=JSON.parse(atob(o));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Rn=o("$ZodJWT",(e,t)=>{sn.init(e,t),e._zod.check=n=>{Un(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),An=o("$ZodCustomStringFormat",(e,t)=>{sn.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Nn=o("$ZodNumber",(e,t)=>{rn.init(e,t),e._zod.pattern=e._zod.bag.pattern??pt,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const i="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),jn=o("$ZodNumberFormat",(e,t)=>{jt.init(e,t),Nn.init(e,t)}),Pn=o("$ZodBoolean",(e,t)=>{rn.init(e,t),e._zod.pattern=mt,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Mn=o("$ZodBigInt",(e,t)=>{rn.init(e,t),e._zod.pattern=ut,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Zn=o("$ZodBigIntFormat",(e,t)=>{Pt.init(e,t),Mn.init(e,t)}),qn=o("$ZodSymbol",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return"symbol"==typeof o||t.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),t}}),Ln=o("$ZodUndefined",(e,t)=>{rn.init(e,t),e._zod.pattern=ht,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{const o=t.value;return void 0===o||t.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),t}}),Fn=o("$ZodNull",(e,t)=>{rn.init(e,t),e._zod.pattern=ft,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const o=t.value;return null===o||t.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),t}}),Vn=o("$ZodAny",(e,t)=>{rn.init(e,t),e._zod.parse=e=>e}),Hn=o("$ZodUnknown",(e,t)=>{rn.init(e,t),e._zod.parse=e=>e}),Jn=o("$ZodNever",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),Gn=o("$ZodVoid",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return void 0===o||t.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),t}}),Bn=o("$ZodDate",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function Wn(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues)),t.value[n]=e.value}const Kn=o("$ZodArray",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const i=[];for(let e=0;e<r.length;e++){const a=r[e],s=t.element._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(t=>Wn(t,n,e))):Wn(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Xn(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...V(n,e.issues))}void 0===e.value?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function Qn(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=U(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Yn(e,t,n,o,r,i){const a=[],s=r.keySet,c=r.catchall._zod,l=c.def.type,u="optional"===c.optout;for(const r in t){if(s.has(r))continue;if("never"===l){a.push(r);continue}const i=c.run({value:t[r],issues:[]},o);i instanceof Promise?e.push(i.then(e=>Xn(e,n,r,t,u))):Xn(i,n,r,t,u)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const eo=o("$ZodObject",(e,t)=>{rn.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const o=p(()=>Qn(t));v(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const o=e[t]._zod;if(o.values){n[t]??(n[t]=new Set);for(const e of o.values)n[t].add(e)}}return n});const r=x,i=t.catchall;let a;e._zod.parse=(t,n)=>{a??(a=o.value);const s=t.value;if(!r(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const c=[],l=a.shape;for(const e of a.keys){const o=l[e],r="optional"===o._zod.optout,i=o._zod.run({value:s[e],issues:[]},n);i instanceof Promise?c.push(i.then(n=>Xn(n,t,e,s,r))):Xn(i,t,e,s,r)}return i?Yn(c,s,t,n,o.value,e):c.length?Promise.all(c).then(()=>t):t}}),to=o("$ZodObjectJIT",(e,t)=>{eo.init(e,t);const n=e._zod.parse,o=p(()=>Qn(t));let r;const i=x,a=!s.jitless,c=a&&w.value,l=t.catchall;let u;e._zod.parse=(s,d)=>{u??(u=o.value);const p=s.value;return i(p)?a&&c&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new nn(["shape","payload","ctx"]),n=o.value,r=e=>{const t=y(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let a=0;for(const e of n.keys)i[e]="key_"+a++;t.write("const newResult = {};");for(const o of n.keys){const n=i[o],a=y(o),s=e[o],c="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(o)};`),c?t.write(`\n if (${n}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),s=r(s,d),l?Yn([],p,s,d,u,e):s):n(s,d):(s.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),s)}});function no(e,t,n,o){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!F(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>J(e,o,c())))}),t)}const oo=o("$ZodUnion",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),v(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),v(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),v(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>f(e.source)).join("|")})$`)}});const n=1===t.options.length,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>no(t,r,e,i)):no(s,r,e,i)}});function ro(e,t,n,o){const r=e.filter(e=>0===e.issues.length);return 1===r.length?(t.value=r[0].value,t):(0===r.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>J(e,o,c())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}const io=o("$ZodXor",(e,t)=>{oo.init(e,t),t.inclusive=!1;const n=1===t.options.length,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(s.push(t),a=!0):s.push(t)}return a?Promise.all(s).then(t=>ro(t,r,e,i)):ro(s,r,e,i)}}),ao=o("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,oo.init(e,t);const n=e._zod.parse;v(e._zod,"propValues",()=>{const e={};for(const n of t.options){const o=n._zod.propValues;if(!o||0===Object.keys(o).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(o)){e[t]||(e[t]=new Set);for(const o of n)e[t].add(o)}}return e});const o=p(()=>{const e=t.options,n=new Map;for(const o of e){const e=o._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,o)}}return n});e._zod.parse=(r,i)=>{const a=r.value;if(!x(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;const s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),so=o("$ZodIntersection",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>{const o=e.value,r=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return r instanceof Promise||i instanceof Promise?Promise.all([r,i]).then(([t,n])=>lo(e,t,n)):lo(e,r,i)}});function co(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(I(e)&&I(t)){const n=Object.keys(t),o=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of o){const o=co(e[n],t[n]);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r[n]=o.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const r=co(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function lo(e,t,n){const o=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)o.has(e)||o.set(e,{}),o.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);const i=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&r&&e.issues.push({...r,keys:i}),F(e))return e;const a=co(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const uo=o("$ZodTuple",(e,t)=>{rn.init(e,t);const n=t.items;e._zod.parse=(o,r)=>{const i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const a=[],s=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),c=-1===s?0:n.length-s;if(!t.rest){const t=i.length>n.length,r=i.length<c-1;if(t||r)return o.issues.push({...t?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let l=-1;for(const e of n){if(l++,l>=i.length&&l>=c)continue;const t=e._zod.run({value:i[l],issues:[]},r);t instanceof Promise?a.push(t.then(e=>po(e,o,l))):po(t,o,l)}if(t.rest){const e=i.slice(n.length);for(const n of e){l++;const e=t.rest._zod.run({value:n,issues:[]},r);e instanceof Promise?a.push(e.then(e=>po(e,o,l))):po(e,o,l)}}return a.length?Promise.all(a).then(()=>o):o}});function po(e,t,n){e.issues.length&&t.issues.push(...V(n,e.issues)),t.value[n]=e.value}const mo=o("$ZodRecord",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!I(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const i=[],a=t.keyType._zod.values;if(a){n.value={};const s=new Set;for(const e of a)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){s.add("number"==typeof e?e.toString():e);const a=t.valueType._zod.run({value:r[e],issues:[]},o);a instanceof Promise?i.push(a.then(t=>{t.issues.length&&n.issues.push(...V(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...V(e,a.issues)),n.value[e]=a.value)}let c;for(const e in r)s.has(e)||(c=c??[],c.push(e));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(const a of Reflect.ownKeys(r)){if("__proto__"===a)continue;let s=t.keyType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof a&&pt.test(a)&&s.issues.length){const e=t.keyType._zod.run({value:Number(a),issues:[]},o);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>J(e,o,c())),input:a,path:[a],inst:e});continue}const l=t.valueType._zod.run({value:r[a],issues:[]},o);l instanceof Promise?i.push(l.then(e=>{e.issues.length&&n.issues.push(...V(a,e.issues)),n.value[s.value]=e.value})):(l.issues.length&&n.issues.push(...V(a,l.issues)),n.value[s.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),fo=o("$ZodMap",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const i=[];n.value=new Map;for(const[a,s]of r){const c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([t,i])=>{ho(t,i,n,a,r,e,o)})):ho(c,l,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function ho(e,t,n,o,r,i,a){e.issues.length&&(S.has(typeof o)?n.issues.push(...V(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(e=>J(e,a,c()))})),t.issues.length&&(S.has(typeof o)?n.issues.push(...V(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(e=>J(e,a,c()))})),n.value.set(e.value,t.value)}const go=o("$ZodSet",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const i=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},o);r instanceof Promise?i.push(r.then(e=>vo(e,n))):vo(r,n)}return i.length?Promise.all(i).then(()=>n):n}});function vo(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const bo=o("$ZodEnum",(e,t)=>{rn.init(e,t);const n=l(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(e=>S.has(typeof e)).map(e=>"string"==typeof e?z(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const i=t.value;return o.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),$o=o("$ZodLiteral",(e,t)=>{if(rn.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?z(e):e?z(e.toString()):String(e)).join("|")})$`),e._zod.parse=(o,r)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),yo=o("$ZodFile",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return o instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),t}}),_o=o("$ZodTransform",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new a(e.constructor.name);const r=t.transform(n.value,n);if(o.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new i;return n.value=r,n}});function ko(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const xo=o("$ZodOptional",(e,t)=>{rn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(t=>ko(t,e.value)):ko(o,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),wo=o("$ZodExactOptional",(e,t)=>{xo.init(e,t),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Io=o("$ZodNullable",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)}|null)$`):void 0}),v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Co=o("$ZodDefault",(e,t)=>{rn.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(e=>So(e,t)):So(o,t)}});function So(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Eo=o("$ZodPrefault",(e,t)=>{rn.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),zo=o("$ZodNonOptional",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,o)=>{const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(t=>To(t,e)):To(r,e)}});function To(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Do=o("$ZodSuccess",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new a("ZodSuccess");const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===o.issues.length,e)}}),Oo=o("$ZodCatch",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(o=>(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>J(e,n,c()))},input:e.value}),e.issues=[]),e)):(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>J(e,n,c()))},input:e.value}),e.issues=[]),e)}}),Uo=o("$ZodNaN",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),Ro=o("$ZodPipe",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const o=t.out._zod.run(e,n);return o instanceof Promise?o.then(e=>Ao(e,t.in,n)):Ao(o,t.in,n)}const o=t.in._zod.run(e,n);return o instanceof Promise?o.then(e=>Ao(e,t.out,n)):Ao(o,t.out,n)}});function Ao(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const No=o("$ZodCodec",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const o=t.in._zod.run(e,n);return o instanceof Promise?o.then(e=>jo(e,t,n)):jo(o,t,n)}{const o=t.out._zod.run(e,n);return o instanceof Promise?o.then(e=>jo(e,t,n)):jo(o,t,n)}}});function jo(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const o=t.transform(e.value,e);return o instanceof Promise?o.then(o=>Po(e,o,t.out,n)):Po(e,o,t.out,n)}{const o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(o=>Po(e,o,t.in,n)):Po(e,o,t.in,n)}}function Po(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}const Mo=o("$ZodReadonly",(e,t)=>{rn.init(e,t),v(e._zod,"propValues",()=>t.innerType._zod.propValues),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"optin",()=>t.innerType?._zod?.optin),v(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(Zo):Zo(o)}});function Zo(e){return e.value=Object.freeze(e.value),e}const qo=o("$ZodTemplateLiteral",(e,t)=>{rn.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const o=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,r))}else{if(null!==e&&!E.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(z(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,o)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),Lo=o("$ZodFunction",(e,t)=>(rn.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const o=e._def.input?le(e._def.input,n):n,r=Reflect.apply(t,this,o);return e._def.output?le(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const o=e._def.input?await de(e._def.input,n):n,r=await Reflect.apply(t,this,o);return e._def.output?await de(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const o=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=o?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new uo({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Fo=o("$ZodPromise",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Vo=o("$ZodLazy",(e,t)=>{rn.init(e,t),v(e._zod,"innerType",()=>t.getter()),v(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),v(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),v(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),v(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ho=o("$ZodCustom",(e,t)=>{Ot.init(e,t),rn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(t=>Jo(t,n,o,e));Jo(r,n,o,e)}});function Jo(e,t,n,o){if(!e){const e={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(e.params=o._zod.def.params),t.issues.push(K(e))}}const Go=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${r}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${r}`}case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${O(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${o.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${o.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Bo=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(t){return e[t]??null}const 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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${r}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${r}`}case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${O(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${o.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function Wo(e,t,n,o){const r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:1===i?t:i>=2&&i<=4?n:o}const Ko=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(t){return e[t]??null}const n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},o={nan:"NaN",number:"лік",array:"масіў"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${r}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${r}`}case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${O(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=Wo(Number(e.maximum),o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${o.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=Wo(Number(e.minimum),o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${o.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const Xo=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},o={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${r}`:`Невалиден вход: очакван ${t}, получен ${r}`}case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${O(e.values[0])}`:`Невалидна опция: очаквано едно от ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let o="Невалиден";return"emoji"===t.format&&(o="Невалидно"),"datetime"===t.format&&(o="Невалидно"),"date"===t.format&&(o="Невалидна"),"time"===t.format&&(o="Невалидно"),"duration"===t.format&&(o="Невалидна"),`${o} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const Qo=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={regex:"entrada",email:"adreça electrònica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${r}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${r}`}case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${O(e.values[0])}`:`Opció invàlida: s'esperava una de ${u(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",o=t(e.origin);return o?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",o=t(e.origin);return o?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const Yo=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(t){return e[t]??null}const n={regex:"regulární výraz",email:"e-mailová adresa",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:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${r}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${r}`}case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${O(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${u(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const er=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(t){return e[t]??null}const n={regex:"input",email:"e-mailadresse",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 dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${r}`:`Ugyldigt input: forventede ${t}, fik ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${O(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),i=o[e.origin]??e.origin;return r?`For stor: forventede ${i??"value"} ${r.verb} ${n} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${i??"value"} havde ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),i=o[e.origin]??e.origin;return r?`For lille: forventede ${i} ${r.verb} ${n} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${i} havde ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const tr=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(t){return e[t]??null}const n={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${r}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${r}`}case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${O(e.values[0])}`:`Ungültige Option: erwartet eine von ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const nr=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const 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",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input);return`Invalid input: expected ${t}, received ${o[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${O(e.values[0])}`:`Invalid option: expected one of ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${o.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`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":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`}}};function or(){return{localeError:nr()}}const rr=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${r}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${r}`}case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${O(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const ir=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(t){return e[t]??null}const n={regex:"entrada",email:"dirección de correo electrónico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${r}`:`Entrada inválida: se esperaba ${t}, recibido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${O(e.values[0])}`:`Opción inválida: se esperaba una de ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),i=o[e.origin]??e.origin;return r?`Demasiado grande: se esperaba que ${i??"valor"} tuviera ${n}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${i??"valor"} fuera ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),i=o[e.origin]??e.origin;return r?`Demasiado pequeño: se esperaba que ${i} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${i} fuera ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o[e.origin]??e.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o[e.origin]??e.origin}`}}};const ar=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},o={nan:"NaN",number:"عدد",array:"آرایه"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: میبایست instanceof ${e.expected} میبود، ${r} دریافت شد`:`ورودی نامعتبر: میبایست ${t} میبود، ${r} دریافت شد`}case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: میبایست ${O(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${u(e.values,"|")} میبود`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${o.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${o.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${u(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const sr=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(t){return e[t]??null}const n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${r}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${r}`}case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${O(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Liian suuri: ${o.subject} täytyy olla ${n}${e.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Liian pieni: ${o.subject} täytyy olla ${n}${e.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${u(e.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};const cr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={regex:"entrée",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN",number:"nombre",array:"tableau"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${r} reçu`:`Entrée invalide : ${t} attendu, ${r} reçu`}case"invalid_value":return 1===e.values.length?`Entrée invalide : ${O(e.values[0])} attendu`:`Option invalide : une valeur parmi ${u(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Trop grand : ${e.origin??"valeur"} doit ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Trop petit : ${e.origin} doit ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const lr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={regex:"entrée",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${r}`:`Entrée invalide : attendu ${t}, reçu ${r}`}case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${O(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",o=t(e.origin);return o?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",o=t(e.origin);return o?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const ur=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,o=t=>{const o=n(t);return o?o.label:t??e.unknown.label},r=e=>`ה${o(e)}`,i=e=>{const t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},a=e=>e?t[e]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},c={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=c[n??""]??o(n),i=W(t.input),a=c[i]??e[i]?.label??i;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${a}`:`קלט לא תקין: צריך להיות ${r}, התקבל ${a}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${O(t.values[0])}`;const e=t.values.map(e=>O(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;const n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(", ")} או ${n}`}case"too_big":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`}if("array"===t.origin||"set"===t.origin){return`גדול מדי: ${n} ${"set"===t.origin?"צריכה":"צריך"} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`}`.trim()}const o=t.inclusive?"<=":"<",s=i(t.origin??"value");return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${o}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??"גדול"} מדי: ${n} ${s} ${o}${t.maximum.toString()}`}case"too_small":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`}if("array"===t.origin||"set"===t.origin){const o="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){return`קטן מדי: ${n} ${o} להכיל ${t.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${n} ${o} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`}`.trim()}const o=t.inclusive?">=":">",s=i(t.origin??"value");return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${o}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??"קטן"} מדי: ${n} ${s} ${o}${t.minimum.toString()}`}case"invalid_format":{const e=t;if("starts_with"===e.format)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if("ends_with"===e.format)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if("includes"===e.format)return`המחרוזת חייבת לכלול "${e.includes}"`;if("regex"===e.format)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;const n=s[e.format];return`${n?.label??e.format} לא ${"f"===(n?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${u(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const dr=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={regex:"bemenet",email:"email cím",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 időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"szám",array:"tömb"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${r}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${r}`}case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${O(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${o.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${o.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};function pr(e,t,n){return 1===Math.abs(e)?t:n}function mr(e){if(!e)return"";const t=e[e.length-1];return e+(["ա","ե","ը","ի","ո","ու","օ"].includes(t)?"ն":"ը")}const fr=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(t){return e[t]??null}const n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},o={nan:"NaN",number:"թիվ",array:"զանգված"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${r}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${r}`}case"invalid_value":return 1===e.values.length?`Սխալ մուտքագրում․ սպասվում էր ${O(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=pr(Number(e.maximum),o.unit.one,o.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${mr(e.origin??"արժեք")} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${mr(e.origin??"արժեք")} լինի ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=pr(Number(e.minimum),o.unit.one,o.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${mr(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${mr(e.origin)} լինի ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:"ends_with"===t.format?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:"includes"===t.format?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:"regex"===t.format?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${e.keys.length>1?"ներ":""}. ${u(e.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${mr(e.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${mr(e.origin)}-ում`}}};const hr=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${r}`:`Input tidak valid: diharapkan ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${O(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const gr=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(t){return e[t]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"númer",array:"fylki"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${r} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${r} þar sem á að vera ${t}`}case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${O(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${u(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const vr=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${r}`:`Input non valido: atteso ${t}, ricevuto ${r}`}case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${O(e.values[0])}`:`Opzione non valida: atteso uno tra ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${u(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const br=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},o={nan:"NaN",number:"数値",array:"配列"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${r}が入力されました`:`無効な入力: ${t}が期待されましたが、${r}が入力されました`}case"invalid_value":return 1===e.values.length?`無効な入力: ${O(e.values[0])}が期待されました`:`無効な選択: ${u(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",o=t(e.origin);return o?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${o.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",o=t(e.origin);return o?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${o.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${u(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const $r=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},o={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${r}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${r}`}case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${O(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${u(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${u(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const yr=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},o={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${r}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${r}`}case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${O(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${o.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${o.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${u(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function _r(){return{localeError:yr()}}const kr=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${r}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${r}입니다`}case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${O(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${u(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",o="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),i=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${i} ${n}${o}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${o}`}case"too_small":{const n=e.inclusive?"이상":"초과",o="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),i=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${i} ${n}${o}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${o}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${u(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const xr=e=>e.charAt(0).toUpperCase()+e.slice(1);function wr(e){const t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||0===n?"many":1===n?"one":"few"}const Ir=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,o,r){const i=e[t]??null;return null===i?i:{unit:i.unit[n],verb:i.verb[r][o?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},o={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${r}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${r}, o tikėtasi - ${t}`}case"invalid_value":return 1===e.values.length?`Privalo būti ${O(e.values[0])}`:`Privalo būti vienas iš ${u(e.values,"|")} pasirinkimų`;case"too_big":{const n=o[e.origin]??e.origin,r=t(e.origin,wr(Number(e.maximum)),e.inclusive??!1,"smaller");if(r?.verb)return`${xr(n??e.origin??"reikšmė")} ${r.verb} ${e.maximum.toString()} ${r.unit??"elementų"}`;const i=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${xr(n??e.origin??"reikšmė")} turi būti ${i} ${e.maximum.toString()} ${r?.unit}`}case"too_small":{const n=o[e.origin]??e.origin,r=t(e.origin,wr(Number(e.minimum)),e.inclusive??!1,"bigger");if(r?.verb)return`${xr(n??e.origin??"reikšmė")} ${r.verb} ${e.minimum.toString()} ${r.unit??"elementų"}`;const i=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${xr(n??e.origin??"reikšmė")} turi būti ${i} ${e.minimum.toString()} ${r?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${u(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=o[e.origin]??e.origin;return`${xr(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}};const Cr=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},o={nan:"NaN",number:"број",array:"низа"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${r}`:`Грешен внес: се очекува ${t}, примено ${r}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${O(e.values[0])}`:`Грешана опција: се очекува една ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${o.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${o.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${u(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const Sr=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${r}`:`Input tidak sah: dijangka ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${O(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Terlalu besar: dijangka ${e.origin??"nilai"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Terlalu kecil: dijangka ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const Er=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(t){return e[t]??null}const n={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${r}`:`Ongeldige invoer: verwacht ${t}, ontving ${r}`}case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${O(e.values[0])}`:`Ongeldige optie: verwacht één van ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin),r="date"===e.origin?"laat":"string"===e.origin?"lang":"groot";return o?`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin),r="date"===e.origin?"vroeg":"string"===e.origin?"kort":"klein";return o?`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const zr=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${r}`:`Ugyldig input: forventet ${t}, fikk ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${O(e.values[0])}`:`Ugyldig valg: forventet en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const Tr=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(t){return e[t]??null}const n={regex:"giren",email:"epostagâh",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 hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${r}`:`Fâsit giren: umulan ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${O(e.values[0])}`:`Fâsit tercih: mûteberler ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${o.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const Dr=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},o={nan:"NaN",number:"عدد",array:"ارې"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${r} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${r} ترلاسه شو`}case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${O(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${u(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${o.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${o.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${u(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Or=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(t){return e[t]??null}const n={regex:"wyrażenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},o={nan:"NaN",number:"liczba",array:"tablica"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${r}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${r}`}case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${O(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${o.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${o.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const Ur=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={regex:"padrão",email:"endereço de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"número",null:"nulo"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${r}`:`Tipo inválido: esperado ${t}, recebido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${O(e.values[0])}`:`Opção inválida: esperada uma das ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function Rr(e,t,n,o){const r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:1===i?t:i>=2&&i<=4?n:o}const Ar=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(t){return e[t]??null}const n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},o={nan:"NaN",number:"число",array:"массив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${r}`:`Неверный ввод: ожидалось ${t}, получено ${r}`}case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${O(e.values[0])}`:`Неверный вариант: ожидалось одно из ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=Rr(Number(e.maximum),o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=Rr(Number(e.minimum),o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const Nr=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={regex:"vnos",email:"e-poštni naslov",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 datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"število",array:"tabela"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${r}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${r}`}case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${O(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${o.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const jr=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(t){return e[t]??null}const n={regex:"reguljärt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${r}`:`Ogiltig inmatning: förväntat ${t}, fick ${r}`}case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${O(e.values[0])}`:`Ogiltigt val: förväntade en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${o.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${o.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const Pr=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${r}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${r}`}case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${O(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${u(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const Mr=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},o={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${r}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${r}`}case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${O(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",o=t(e.origin);return o?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${o.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",o=t(e.origin);return o?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${o.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${u(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const Zr=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${r}`:`Geçersiz değer: beklenen ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${O(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const qr=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},o={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${r}`:`Неправильні вхідні дані: очікується ${t}, отримано ${r}`}case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${O(e.values[0])}`:`Неправильна опція: очікується одне з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Занадто велике: очікується, що ${e.origin??"значення"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Занадто мале: очікується, що ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Lr(){return{localeError:qr()}}const Fr=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},o={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${r} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${r} موصول ہوا`}case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${O(e.values[0])} متوقع تھا`:`غلط آپشن: ${u(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${o.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const Vr=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(t){return e[t]??null}const n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${r}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${r}`}case"invalid_value":return 1===e.values.length?`Noto‘g‘ri kirish: kutilgan ${O(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:"ends_with"===t.format?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:"includes"===t.format?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:"regex"===t.format?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${e.origin} da noto‘g‘ri qiymat`}}};const Hr=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(t){return e[t]??null}const n={regex:"đầu vào",email:"địa chỉ email",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:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},o={nan:"NaN",number:"số",array:"mảng"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${r}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${r}`}case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${O(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Quá nhỏ: mong đợi ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${u(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${e.origin}`}}};const Jr=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},o={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${r}`:`无效输入:期望 ${t},实际接收 ${r}`}case"invalid_value":return 1===e.values.length?`无效输入:期望 ${O(e.values[0])}`:`无效选项:期望以下之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${o.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Gr=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={regex:"輸入",email:"郵件地址",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${r}`:`無效的輸入值:預期為 ${t},但收到 ${r}`}case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${O(e.values[0])}`:`無效的選項:預期為以下其中之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${o.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${o.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${u(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const Br=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},o={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${r}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${r}`}case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${O(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${o.verb} ${n}${e.maximum} ${o.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${o.verb} ${n}${e.minimum} ${o.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${u(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var Wr,Kr=Object.freeze({__proto__:null,ar:function(){return{localeError:Go()}},az:function(){return{localeError:Bo()}},be:function(){return{localeError:Ko()}},bg:function(){return{localeError:Xo()}},ca:function(){return{localeError:Qo()}},cs:function(){return{localeError:Yo()}},da:function(){return{localeError:er()}},de:function(){return{localeError:tr()}},en:or,eo:function(){return{localeError:rr()}},es:function(){return{localeError:ir()}},fa:function(){return{localeError:ar()}},fi:function(){return{localeError:sr()}},fr:function(){return{localeError:cr()}},frCA:function(){return{localeError:lr()}},he:function(){return{localeError:ur()}},hu:function(){return{localeError:dr()}},hy:function(){return{localeError:fr()}},id:function(){return{localeError:hr()}},is:function(){return{localeError:gr()}},it:function(){return{localeError:vr()}},ja:function(){return{localeError:br()}},ka:function(){return{localeError:$r()}},kh:function(){return _r()},km:_r,ko:function(){return{localeError:kr()}},lt:function(){return{localeError:Ir()}},mk:function(){return{localeError:Cr()}},ms:function(){return{localeError:Sr()}},nl:function(){return{localeError:Er()}},no:function(){return{localeError:zr()}},ota:function(){return{localeError:Tr()}},pl:function(){return{localeError:Or()}},ps:function(){return{localeError:Dr()}},pt:function(){return{localeError:Ur()}},ru:function(){return{localeError:Ar()}},sl:function(){return{localeError:Nr()}},sv:function(){return{localeError:jr()}},ta:function(){return{localeError:Pr()}},th:function(){return{localeError:Mr()}},tr:function(){return{localeError:Zr()}},ua:function(){return Lr()},uk:Lr,ur:function(){return{localeError:Fr()}},uz:function(){return{localeError:Vr()}},vi:function(){return{localeError:Hr()}},yo:function(){return{localeError:Br()}},zhCN:function(){return{localeError:Jr()}},zhTW:function(){return{localeError:Gr()}}});const Xr=Symbol("ZodOutput"),Qr=Symbol("ZodInput");class Yr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function ei(){return new Yr}(Wr=globalThis).__zod_globalRegistry??(Wr.__zod_globalRegistry=ei());const ti=globalThis.__zod_globalRegistry;function ni(e,t){return new e({type:"string",...D(t)})}function oi(e,t){return new e({type:"string",coerce:!0,...D(t)})}function ri(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...D(t)})}function ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...D(t)})}function ai(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...D(t)})}function si(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...D(t)})}function ci(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...D(t)})}function li(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...D(t)})}function ui(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...D(t)})}function di(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...D(t)})}function pi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...D(t)})}function mi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...D(t)})}function fi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...D(t)})}function hi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...D(t)})}function gi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...D(t)})}function vi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...D(t)})}function bi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...D(t)})}function $i(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...D(t)})}function yi(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...D(t)})}function _i(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...D(t)})}function ki(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...D(t)})}function xi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...D(t)})}function wi(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...D(t)})}function Ii(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...D(t)})}function Ci(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...D(t)})}const Si={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ei(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...D(t)})}function zi(e,t){return new e({type:"string",format:"date",check:"string_format",...D(t)})}function Ti(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...D(t)})}function Di(e,t){return new e({type:"string",format:"duration",check:"string_format",...D(t)})}function Oi(e,t){return new e({type:"number",checks:[],...D(t)})}function Ui(e,t){return new e({type:"number",coerce:!0,checks:[],...D(t)})}function Ri(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...D(t)})}function Ai(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...D(t)})}function Ni(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...D(t)})}function ji(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...D(t)})}function Pi(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...D(t)})}function Mi(e,t){return new e({type:"boolean",...D(t)})}function Zi(e,t){return new e({type:"boolean",coerce:!0,...D(t)})}function qi(e,t){return new e({type:"bigint",...D(t)})}function Li(e,t){return new e({type:"bigint",coerce:!0,...D(t)})}function Fi(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...D(t)})}function Vi(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...D(t)})}function Hi(e,t){return new e({type:"symbol",...D(t)})}function Ji(e,t){return new e({type:"undefined",...D(t)})}function Gi(e,t){return new e({type:"null",...D(t)})}function Bi(e){return new e({type:"any"})}function Wi(e){return new e({type:"unknown"})}function Ki(e,t){return new e({type:"never",...D(t)})}function Xi(e,t){return new e({type:"void",...D(t)})}function Qi(e,t){return new e({type:"date",...D(t)})}function Yi(e,t){return new e({type:"date",coerce:!0,...D(t)})}function ea(e,t){return new e({type:"nan",...D(t)})}function ta(e,t){return new Rt({check:"less_than",...D(t),value:e,inclusive:!1})}function na(e,t){return new Rt({check:"less_than",...D(t),value:e,inclusive:!0})}function oa(e,t){return new At({check:"greater_than",...D(t),value:e,inclusive:!1})}function ra(e,t){return new At({check:"greater_than",...D(t),value:e,inclusive:!0})}function ia(e){return oa(0,e)}function aa(e){return ta(0,e)}function sa(e){return na(0,e)}function ca(e){return ra(0,e)}function la(e,t){return new Nt({check:"multiple_of",...D(t),value:e})}function ua(e,t){return new Mt({check:"max_size",...D(t),maximum:e})}function da(e,t){return new Zt({check:"min_size",...D(t),minimum:e})}function pa(e,t){return new qt({check:"size_equals",...D(t),size:e})}function ma(e,t){return new Lt({check:"max_length",...D(t),maximum:e})}function fa(e,t){return new Ft({check:"min_length",...D(t),minimum:e})}function ha(e,t){return new Vt({check:"length_equals",...D(t),length:e})}function ga(e,t){return new Jt({check:"string_format",format:"regex",...D(t),pattern:e})}function va(e){return new Gt({check:"string_format",format:"lowercase",...D(e)})}function ba(e){return new Bt({check:"string_format",format:"uppercase",...D(e)})}function $a(e,t){return new Wt({check:"string_format",format:"includes",...D(t),includes:e})}function ya(e,t){return new Kt({check:"string_format",format:"starts_with",...D(t),prefix:e})}function _a(e,t){return new Xt({check:"string_format",format:"ends_with",...D(t),suffix:e})}function ka(e,t,n){return new Yt({check:"property",property:e,schema:t,...D(n)})}function xa(e,t){return new en({check:"mime_type",mime:e,...D(t)})}function wa(e){return new tn({check:"overwrite",tx:e})}function Ia(e){return wa(t=>t.normalize(e))}function Ca(){return wa(e=>e.trim())}function Sa(){return wa(e=>e.toLowerCase())}function Ea(){return wa(e=>e.toUpperCase())}function za(){return wa(e=>_(e))}function Ta(e,t,n){return new e({type:"array",element:t,...D(n)})}function Da(e,t){return new e({type:"file",...D(t)})}function Oa(e,t,n){const o=D(n);o.abort??(o.abort=!0);return new e({type:"custom",check:"custom",fn:t,...o})}function Ua(e,t,n){return new e({type:"custom",check:"custom",fn:t,...D(n)})}function Ra(e){const t=Aa(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(K(e,n.value,t._zod.def));else{const o=e;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(K(o))}},e(n.value,n)));return t}function Aa(e,t){const n=new Ot({check:"custom",...D(t)});return n._zod.check=e,n}function Na(e){const t=new Ot({check:"describe"});return t._zod.onattach=[t=>{const n=ti.get(t)??{};ti.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function ja(e){const t=new Ot({check:"meta"});return t._zod.onattach=[t=>{const n=ti.get(t)??{};ti.add(t,{...n,...e})}],t._zod.check=()=>{},t}function Pa(e,t){const n=D(t);let o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(o=o.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const i=new Set(o),a=new Set(r),s=e.Codec??No,c=e.Boolean??Pn,l=new s({type:"pipe",in:new(e.String??an)({type:"string",error:n.error}),out:new c({type:"boolean",error:n.error}),transform:(e,t)=>{let o=e;return"sensitive"!==n.case&&(o=o.toLowerCase()),!!i.has(o)||!a.has(o)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:t.value,inst:l,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?o[0]||"true":r[0]||"false",error:n.error});return l}function Ma(e,t,n,o={}){const r=D(o),i={...D(o),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(i.pattern=n);return new e(i)}function Za(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ti,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function qa(e,t,n={path:[],schemaPath:[]}){var o;const r=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const o={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,o);else{const n=a.schema,i=t.processors[r.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);i(e,t,n,o)}const i=e._zod.parent;i&&(a.ref||(a.ref=i),qa(i,t,o),t.seen.get(i).isParent=!0)}const c=t.metadataRegistry.get(e);c&&Object.assign(a.schema,c),"input"===t.io&&Va(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault;return t.seen.get(e).schema}function La(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=o.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const o=t[1],{ref:r,defId:i}=(t=>{const o="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${r("__shared")}#/${o}/${i}`}}if(t[1]===n)return{ref:"#"};const r=`#/${o}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:r+i}})(t);o.def={...o.schema},i&&(o.defId=i);const a=o.schema;for(const e in a)delete a[e];a.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const o=n[1];if(t===n[0]){r(n);continue}if(e.external){const o=e.external.registry.get(n[0])?.id;if(t!==n[0]&&o){r(n);continue}}const i=e.metadataRegistry.get(n[0])?.id;i?r(n):(o.cycle||o.count>1&&"ref"===e.reused)&&r(n)}}function Fa(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,i={...r},a=n.ref;if(n.ref=null,a){o(a);const n=e.seen.get(a),s=n.schema;!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,s):(r.allOf=r.allOf??[],r.allOf.push(s)),Object.assign(r,i);if(t._zod.parent===a)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in i||delete r[e]);if(s.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const s=t._zod.parent;if(s&&s!==a){o(s);const t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const e in r)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())o(t[0]);const r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const i=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?r.$defs=i:r.definitions=i);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ja(t,"input",e.processors),output:Ja(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Va(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return Va(o.element,n);if("set"===o.type)return Va(o.valueType,n);if("lazy"===o.type)return Va(o.getter(),n);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return Va(o.innerType,n);if("intersection"===o.type)return Va(o.left,n)||Va(o.right,n);if("record"===o.type||"map"===o.type)return Va(o.keyType,n)||Va(o.valueType,n);if("pipe"===o.type)return Va(o.in,n)||Va(o.out,n);if("object"===o.type){for(const e in o.shape)if(Va(o.shape[e],n))return!0;return!1}if("union"===o.type){for(const e of o.options)if(Va(e,n))return!0;return!1}if("tuple"===o.type){for(const e of o.items)if(Va(e,n))return!0;return!(!o.rest||!Va(o.rest,n))}return!1}const Ha=(e,t={})=>n=>{const o=Za({...n,processors:t});return qa(e,o),La(o,e),Fa(o,e)},Ja=(e,t,n={})=>o=>{const{libraryOptions:r,target:i}=o??{},a=Za({...r??{},target:i,io:t,processors:n});return qa(e,a),La(a,e),Fa(a,e)},Ga={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ba=(e,t,n,o)=>{const r=n;r.type="string";const{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if("number"==typeof i&&(r.minLength=i),"number"==typeof a&&(r.maxLength=a),s&&(r.format=Ga[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),l&&(r.contentEncoding=l),c&&c.size>0){const e=[...c];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},Wa=(e,t,n,o)=>{const r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),"number"==typeof i&&(r.minimum=i,"number"==typeof u&&"draft-04"!==t.target&&(u>=i?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l),"number"==typeof a&&(r.maximum=a,"number"==typeof l&&"draft-04"!==t.target&&(l<=a?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof c&&(r.multipleOf=c)},Ka=(e,t,n,o)=>{n.type="boolean"},Xa=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema")},Qa=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema")},Ya=(e,t,n,o)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},es=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema")},ts=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Void cannot be represented in JSON Schema")},ns=(e,t,n,o)=>{n.not={}},os=(e,t,n,o)=>{},rs=(e,t,n,o)=>{},is=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Date cannot be represented in JSON Schema")},as=(e,t,n,o)=>{const r=l(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r},ss=(e,t,n,o)=>{const r=e._zod.def,i=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(e))}else i.push(e);if(0===i.length);else if(1===i.length){const e=i[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),i.every(e=>"boolean"==typeof e)&&(n.type="boolean"),i.every(e=>null===e)&&(n.type="null"),n.enum=i},cs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},ls=(e,t,n,o)=>{const r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},us=(e,t,n,o)=>{const r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;void 0!==a&&(i.minLength=a),void 0!==s&&(i.maxLength=s),c?1===c.length?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(r,i)},ds=(e,t,n,o)=>{n.type="boolean"},ps=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")},ms=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")},fs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")},hs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Map cannot be represented in JSON Schema")},gs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Set cannot be represented in JSON Schema")},vs=(e,t,n,o)=>{const r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=qa(i.element,t,{...o,path:[...o.path,"items"]})},bs=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object",r.properties={};const a=i.shape;for(const e in a)r.properties[e]=qa(a[e],t,{...o,path:[...o.path,"properties",e]});const s=new Set(Object.keys(a)),c=new Set([...s].filter(e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));c.size>0&&(r.required=Array.from(c)),"never"===i.catchall?._zod.def.type?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=qa(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},$s=(e,t,n,o)=>{const r=e._zod.def,i=!1===r.inclusive,a=r.options.map((e,n)=>qa(e,t,{...o,path:[...o.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=a:n.anyOf=a},ys=(e,t,n,o)=>{const r=e._zod.def,i=qa(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=qa(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},_s=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="array";const a="draft-2020-12"===t.target?"prefixItems":"items",s="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",c=i.items.map((e,n)=>qa(e,t,{...o,path:[...o.path,a,n]})),l=i.rest?qa(i.rest,t,{...o,path:[...o.path,s,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=c,l&&(r.items=l)):"openapi-3.0"===t.target?(r.items={anyOf:c},l&&r.items.anyOf.push(l),r.minItems=c.length,l||(r.maxItems=c.length)):(r.items=c,l&&(r.additionalItems=l));const{minimum:u,maximum:d}=e._zod.bag;"number"==typeof u&&(r.minItems=u),"number"==typeof d&&(r.maxItems=d)},ks=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object";const a=i.keyType,s=a._zod.bag,c=s?.patterns;if("loose"===i.mode&&c&&c.size>0){const e=qa(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(const t of c)r.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(r.propertyNames=qa(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=qa(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const l=a._zod.values;if(l){const e=[...l].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},xs=(e,t,n,o)=>{const r=e._zod.def,i=qa(r.innerType,t,o),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ws=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Is=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Cs=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Ss=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);let i;t.seen.get(e).ref=r.innerType;try{i=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},Es=(e,t,n,o)=>{const r=e._zod.def,i="input"===t.io?"transform"===r.in._zod.def.type?r.out:r.in:r.out;qa(i,t,o);t.seen.get(e).ref=i},zs=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Ts=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Ds=(e,t,n,o)=>{const r=e._zod.def;qa(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Os=(e,t,n,o)=>{const r=e._zod.innerType;qa(r,t,o);t.seen.get(e).ref=r},Us={string:Ba,number:Wa,boolean:Ka,bigint:Xa,symbol:Qa,null:Ya,undefined:es,void:ts,never:ns,any:os,unknown:rs,date:is,enum:as,literal:ss,nan:cs,template_literal:ls,file:us,success:ds,custom:ps,function:ms,transform:fs,map:hs,set:gs,array:vs,object:bs,union:$s,intersection:ys,tuple:_s,record:ks,nullable:xs,nonoptional:ws,default:Is,prefault:Cs,catch:Ss,pipe:Es,readonly:zs,promise:Ts,optional:Ds,lazy:Os};function Rs(e,t){if("_idmap"in e){const n=e,o=Za({...t,processors:Us}),r={};for(const e of n._idmap.entries()){const[t,n]=e;qa(n,o)}const i={},a={registry:n,uri:t?.uri,defs:r};o.external=a;for(const e of n._idmap.entries()){const[t,n]=e;La(o,n),i[t]=Fa(o,n)}if(Object.keys(r).length>0){const e="draft-2020-12"===o.target?"$defs":"definitions";i.__shared={[e]:r}}return{schemas:i}}const n=Za({...t,processors:Us});return qa(e,n),La(n,e),Fa(n,e)}var As=Object.freeze({__proto__:null}),Ns=Object.freeze({__proto__:null,$ZodAny:Vn,$ZodArray:Kn,$ZodAsyncError:i,$ZodBase64:zn,$ZodBase64URL:Dn,$ZodBigInt:Mn,$ZodBigIntFormat:Zn,$ZodBoolean:Pn,$ZodCIDRv4:Cn,$ZodCIDRv6:Sn,$ZodCUID:fn,$ZodCUID2:hn,$ZodCatch:Oo,$ZodCheck:Ot,$ZodCheckBigIntFormat:Pt,$ZodCheckEndsWith:Xt,$ZodCheckGreaterThan:At,$ZodCheckIncludes:Wt,$ZodCheckLengthEquals:Vt,$ZodCheckLessThan:Rt,$ZodCheckLowerCase:Gt,$ZodCheckMaxLength:Lt,$ZodCheckMaxSize:Mt,$ZodCheckMimeType:en,$ZodCheckMinLength:Ft,$ZodCheckMinSize:Zt,$ZodCheckMultipleOf:Nt,$ZodCheckNumberFormat:jt,$ZodCheckOverwrite:tn,$ZodCheckProperty:Yt,$ZodCheckRegex:Jt,$ZodCheckSizeEquals:qt,$ZodCheckStartsWith:Kt,$ZodCheckStringFormat:Ht,$ZodCheckUpperCase:Bt,$ZodCodec:No,$ZodCustom:Ho,$ZodCustomStringFormat:An,$ZodDate:Bn,$ZodDefault:Co,$ZodDiscriminatedUnion:ao,$ZodE164:On,$ZodEmail:un,$ZodEmoji:pn,$ZodEncodeError:a,$ZodEnum:bo,$ZodError:te,$ZodExactOptional:wo,$ZodFile:yo,$ZodFunction:Lo,$ZodGUID:cn,$ZodIPv4:xn,$ZodIPv6:wn,$ZodISODate:yn,$ZodISODateTime:$n,$ZodISODuration:kn,$ZodISOTime:_n,$ZodIntersection:so,$ZodJWT:Rn,$ZodKSUID:bn,$ZodLazy:Vo,$ZodLiteral:$o,$ZodMAC:In,$ZodMap:fo,$ZodNaN:Uo,$ZodNanoID:mn,$ZodNever:Jn,$ZodNonOptional:zo,$ZodNull:Fn,$ZodNullable:Io,$ZodNumber:Nn,$ZodNumberFormat:jn,$ZodObject:eo,$ZodObjectJIT:to,$ZodOptional:xo,$ZodPipe:Ro,$ZodPrefault:Eo,$ZodPromise:Fo,$ZodReadonly:Mo,$ZodRealError:ne,$ZodRecord:mo,$ZodRegistry:Yr,$ZodSet:go,$ZodString:an,$ZodStringFormat:sn,$ZodSuccess:Do,$ZodSymbol:qn,$ZodTemplateLiteral:qo,$ZodTransform:_o,$ZodTuple:uo,$ZodType:rn,$ZodULID:gn,$ZodURL:dn,$ZodUUID:ln,$ZodUndefined:Ln,$ZodUnion:oo,$ZodUnknown:Hn,$ZodVoid:Gn,$ZodXID:vn,$ZodXor:io,$brand:r,$constructor:o,$input:Qr,$output:Xr,Doc:nn,JSONSchema:As,JSONSchemaGenerator:class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=Za({processors:Us,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return qa(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),La(this.ctx,e);const n=Fa(this.ctx,e),{"~standard":o,...r}=n;return r}},NEVER:n,TimePrecision:Si,_any:Bi,_array:Ta,_base64:xi,_base64url:wi,_bigint:qi,_boolean:Mi,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:Aa,_cidrv4:_i,_cidrv6:ki,_coercedBigint:Li,_coercedBoolean:Zi,_coercedDate:Yi,_coercedNumber:Ui,_coercedString:oi,_cuid:mi,_cuid2:fi,_custom:Oa,_date:Qi,_decode:be,_decodeAsync:ke,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():C(n)}})},_discriminatedUnion:function(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...D(o)})},_e164:Ii,_email:ri,_emoji:di,_encode:ge,_encodeAsync:ye,_endsWith:_a,_enum:function(e,t,n){const o=Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t;return new e({type:"enum",entries:o,...D(n)})},_file:Da,_float32:Ai,_float64:Ni,_gt:oa,_gte:ra,_guid:ii,_includes:$a,_int:Ri,_int32:ji,_int64:Fi,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:bi,_ipv6:$i,_isoDate:zi,_isoDateTime:Ei,_isoDuration:Di,_isoTime:Ti,_jwt:Ci,_ksuid:vi,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:ha,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...D(n)})},_lowercase:va,_lt:ta,_lte:na,_mac:yi,_map:function(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...D(o)})},_max:na,_maxLength:ma,_maxSize:ua,_mime:xa,_min:ra,_minLength:fa,_minSize:da,_multipleOf:la,_nan:ea,_nanoid:pi,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...D(n)})},_negative:aa,_never:Ki,_nonnegative:ca,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...D(n)})},_nonpositive:sa,_normalize:Ia,_null:Gi,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Oi,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:wa,_parse:ce,_parseAsync:ue,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:ia,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:ka,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...D(o)})},_refine:Ua,_regex:ga,_safeDecode:Ce,_safeDecodeAsync:Te,_safeEncode:we,_safeEncodeAsync:Ee,_safeParse:pe,_safeParseAsync:fe,_set:function(e,t,n){return new e({type:"set",valueType:t,...D(n)})},_size:pa,_slugify:za,_startsWith:ya,_string:ni,_stringFormat:Ma,_stringbool:Pa,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Ra,_symbol:Hi,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...D(n)})},_toLowerCase:Sa,_toUpperCase:Ea,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:Ca,_tuple:function(e,t,n,o){const r=n instanceof rn;return new e({type:"tuple",items:t,rest:r?n:null,...D(r?o:n)})},_uint32:Pi,_uint64:Vi,_ulid:hi,_undefined:Ji,_union:function(e,t,n){return new e({type:"union",options:t,...D(n)})},_unknown:Wi,_uppercase:ba,_url:ui,_uuid:ai,_uuidv4:si,_uuidv6:ci,_uuidv7:li,_void:Xi,_xid:gi,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...D(n)})},clone:T,config:c,createStandardJSONSchemaMethod:Ja,createToJSONSchemaMethod:Ha,decode:$e,decodeAsync:xe,describe:Na,encode:ve,encodeAsync:_e,extractDefs:La,finalize:Fa,flattenError:oe,formatError:re,globalConfig:s,globalRegistry:ti,initializeContext:Za,isValidBase64:En,isValidBase64URL:Tn,isValidJWT:Un,locales:Kr,meta:ja,parse:le,parseAsync:de,prettifyError:se,process:qa,regexes:Dt,registry:ei,safeDecode:Se,safeDecodeAsync:De,safeEncode:Ie,safeEncodeAsync:ze,safeParse:me,safeParseAsync:he,toDotPath:ae,toJSONSchema:Rs,treeifyError:ie,util:Y,version:on});function js(e){return!!e._zod}function Ps(e,t){if(js(e)){return me(e,t)}return e.safeParse(t)}var Ms=Object.freeze({__proto__:null,endsWith:_a,gt:oa,gte:ra,includes:$a,length:ha,lowercase:va,lt:ta,lte:na,maxLength:ma,maxSize:ua,mime:xa,minLength:fa,minSize:da,multipleOf:la,negative:aa,nonnegative:ca,nonpositive:sa,normalize:Ia,overwrite:wa,positive:ia,property:ka,regex:ga,size:pa,slugify:za,startsWith:ya,toLowerCase:Sa,toUpperCase:Ea,trim:Ca,uppercase:ba});const Zs=o("ZodISODateTime",(e,t)=>{$n.init(e,t),fc.init(e,t)});function qs(e){return Ei(Zs,e)}const Ls=o("ZodISODate",(e,t)=>{yn.init(e,t),fc.init(e,t)});function Fs(e){return zi(Ls,e)}const Vs=o("ZodISOTime",(e,t)=>{_n.init(e,t),fc.init(e,t)});function Hs(e){return Ti(Vs,e)}const Js=o("ZodISODuration",(e,t)=>{kn.init(e,t),fc.init(e,t)});function Gs(e){return Di(Js,e)}var Bs=Object.freeze({__proto__:null,ZodISODate:Ls,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Vs,date:Fs,datetime:qs,duration:Gs,time:Hs});const Ws=(e,t)=>{te.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>re(e,t)},flatten:{value:t=>oe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)}},isEmpty:{get:()=>0===e.issues.length}})},Ks=o("ZodError",Ws),Xs=o("ZodError",Ws,{Parent:Error}),Qs=ce(Xs),Ys=ue(Xs),ec=pe(Xs),tc=fe(Xs),nc=ge(Xs),oc=be(Xs),rc=ye(Xs),ic=ke(Xs),ac=we(Xs),sc=Ce(Xs),cc=Ee(Xs),lc=Te(Xs),uc=o("ZodType",(e,t)=>(rn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ja(e,"input"),output:Ja(e,"output")}}),e.toJSONSchema=Ha(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone($(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>T(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Qs(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ec(e,t,n),e.parseAsync=async(t,n)=>Ys(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>tc(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nc(e,t,n),e.decode=(t,n)=>oc(e,t,n),e.encodeAsync=async(t,n)=>rc(e,t,n),e.decodeAsync=async(t,n)=>ic(e,t,n),e.safeEncode=(t,n)=>ac(e,t,n),e.safeDecode=(t,n)=>sc(e,t,n),e.safeEncodeAsync=async(t,n)=>cc(e,t,n),e.safeDecodeAsync=async(t,n)=>lc(e,t,n),e.refine=(t,n)=>e.check(od(t,n)),e.superRefine=t=>e.check(rd(t)),e.overwrite=t=>e.check(wa(t)),e.optional=()=>ku(e),e.exactOptional=()=>wu(e),e.nullable=()=>Cu(e),e.nullish=()=>ku(Cu(e)),e.nonoptional=t=>Uu(e,t),e.array=()=>Ll(e),e.or=t=>Wl([e,t]),e.and=t=>tu(e,t),e.transform=t=>qu(e,yu(t)),e.default=t=>zu(e,t),e.prefault=t=>Du(e,t),e.catch=t=>ju(e,t),e.pipe=t=>qu(e,t),e.readonly=()=>Hu(e),e.describe=t=>{const n=e.clone();return ti.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>ti.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return ti.get(e);const n=e.clone();return ti.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),dc=o("_ZodString",(e,t)=>{an.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ba(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ga(...t)),e.includes=(...t)=>e.check($a(...t)),e.startsWith=(...t)=>e.check(ya(...t)),e.endsWith=(...t)=>e.check(_a(...t)),e.min=(...t)=>e.check(fa(...t)),e.max=(...t)=>e.check(ma(...t)),e.length=(...t)=>e.check(ha(...t)),e.nonempty=(...t)=>e.check(fa(1,...t)),e.lowercase=t=>e.check(va(t)),e.uppercase=t=>e.check(ba(t)),e.trim=()=>e.check(Ca()),e.normalize=(...t)=>e.check(Ia(...t)),e.toLowerCase=()=>e.check(Sa()),e.toUpperCase=()=>e.check(Ea()),e.slugify=()=>e.check(za())}),pc=o("ZodString",(e,t)=>{an.init(e,t),dc.init(e,t),e.email=t=>e.check(ri(hc,t)),e.url=t=>e.check(ui(wc,t)),e.jwt=t=>e.check(Ci(ol,t)),e.emoji=t=>e.check(di(Sc,t)),e.guid=t=>e.check(ii(vc,t)),e.uuid=t=>e.check(ai($c,t)),e.uuidv4=t=>e.check(si($c,t)),e.uuidv6=t=>e.check(ci($c,t)),e.uuidv7=t=>e.check(li($c,t)),e.nanoid=t=>e.check(pi(zc,t)),e.guid=t=>e.check(ii(vc,t)),e.cuid=t=>e.check(mi(Dc,t)),e.cuid2=t=>e.check(fi(Uc,t)),e.ulid=t=>e.check(hi(Ac,t)),e.base64=t=>e.check(xi(Xc,t)),e.base64url=t=>e.check(wi(Yc,t)),e.xid=t=>e.check(gi(jc,t)),e.ksuid=t=>e.check(vi(Mc,t)),e.ipv4=t=>e.check(bi(qc,t)),e.ipv6=t=>e.check($i(Hc,t)),e.cidrv4=t=>e.check(_i(Gc,t)),e.cidrv6=t=>e.check(ki(Wc,t)),e.e164=t=>e.check(Ii(tl,t)),e.datetime=t=>e.check(qs(t)),e.date=t=>e.check(Fs(t)),e.time=t=>e.check(Hs(t)),e.duration=t=>e.check(Gs(t))});function mc(e){return ni(pc,e)}const fc=o("ZodStringFormat",(e,t)=>{sn.init(e,t),dc.init(e,t)}),hc=o("ZodEmail",(e,t)=>{un.init(e,t),fc.init(e,t)});function gc(e){return ri(hc,e)}const vc=o("ZodGUID",(e,t)=>{cn.init(e,t),fc.init(e,t)});function bc(e){return ii(vc,e)}const $c=o("ZodUUID",(e,t)=>{ln.init(e,t),fc.init(e,t)});function yc(e){return ai($c,e)}function _c(e){return si($c,e)}function kc(e){return ci($c,e)}function xc(e){return li($c,e)}const wc=o("ZodURL",(e,t)=>{dn.init(e,t),fc.init(e,t)});function Ic(e){return ui(wc,e)}function Cc(e){return ui(wc,{protocol:/^https?$/,hostname:nt,...D(e)})}const Sc=o("ZodEmoji",(e,t)=>{pn.init(e,t),fc.init(e,t)});function Ec(e){return di(Sc,e)}const zc=o("ZodNanoID",(e,t)=>{mn.init(e,t),fc.init(e,t)});function Tc(e){return pi(zc,e)}const Dc=o("ZodCUID",(e,t)=>{fn.init(e,t),fc.init(e,t)});function Oc(e){return mi(Dc,e)}const Uc=o("ZodCUID2",(e,t)=>{hn.init(e,t),fc.init(e,t)});function Rc(e){return fi(Uc,e)}const Ac=o("ZodULID",(e,t)=>{gn.init(e,t),fc.init(e,t)});function Nc(e){return hi(Ac,e)}const jc=o("ZodXID",(e,t)=>{vn.init(e,t),fc.init(e,t)});function Pc(e){return gi(jc,e)}const Mc=o("ZodKSUID",(e,t)=>{bn.init(e,t),fc.init(e,t)});function Zc(e){return vi(Mc,e)}const qc=o("ZodIPv4",(e,t)=>{xn.init(e,t),fc.init(e,t)});function Lc(e){return bi(qc,e)}const Fc=o("ZodMAC",(e,t)=>{In.init(e,t),fc.init(e,t)});function Vc(e){return yi(Fc,e)}const Hc=o("ZodIPv6",(e,t)=>{wn.init(e,t),fc.init(e,t)});function Jc(e){return $i(Hc,e)}const Gc=o("ZodCIDRv4",(e,t)=>{Cn.init(e,t),fc.init(e,t)});function Bc(e){return _i(Gc,e)}const Wc=o("ZodCIDRv6",(e,t)=>{Sn.init(e,t),fc.init(e,t)});function Kc(e){return ki(Wc,e)}const Xc=o("ZodBase64",(e,t)=>{zn.init(e,t),fc.init(e,t)});function Qc(e){return xi(Xc,e)}const Yc=o("ZodBase64URL",(e,t)=>{Dn.init(e,t),fc.init(e,t)});function el(e){return wi(Yc,e)}const tl=o("ZodE164",(e,t)=>{On.init(e,t),fc.init(e,t)});function nl(e){return Ii(tl,e)}const ol=o("ZodJWT",(e,t)=>{Rn.init(e,t),fc.init(e,t)});function rl(e){return Ci(ol,e)}const il=o("ZodCustomStringFormat",(e,t)=>{An.init(e,t),fc.init(e,t)});function al(e,t,n={}){return Ma(il,e,t,n)}function sl(e){return Ma(il,"hostname",tt,e)}function cl(e){return Ma(il,"hex",bt,e)}function ll(e,t){const n=`${e}_${t?.enc??"hex"}`,o=Dt[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Ma(il,n,o,t)}const ul=o("ZodNumber",(e,t)=>{Nn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Wa(e,t,n),e.gt=(t,n)=>e.check(oa(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.int=t=>e.check(ml(t)),e.safe=t=>e.check(ml(t)),e.positive=t=>e.check(oa(0,t)),e.nonnegative=t=>e.check(ra(0,t)),e.negative=t=>e.check(ta(0,t)),e.nonpositive=t=>e.check(na(0,t)),e.multipleOf=(t,n)=>e.check(la(t,n)),e.step=(t,n)=>e.check(la(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function dl(e){return Oi(ul,e)}const pl=o("ZodNumberFormat",(e,t)=>{jn.init(e,t),ul.init(e,t)});function ml(e){return Ri(pl,e)}function fl(e){return Ai(pl,e)}function hl(e){return Ni(pl,e)}function gl(e){return ji(pl,e)}function vl(e){return Pi(pl,e)}const bl=o("ZodBoolean",(e,t)=>{Pn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ka(0,0,t)});function $l(e){return Mi(bl,e)}const yl=o("ZodBigInt",(e,t)=>{Mn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Xa(0,e),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.gt=(t,n)=>e.check(oa(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.positive=t=>e.check(oa(BigInt(0),t)),e.negative=t=>e.check(ta(BigInt(0),t)),e.nonpositive=t=>e.check(na(BigInt(0),t)),e.nonnegative=t=>e.check(ra(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(la(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function _l(e){return qi(yl,e)}const kl=o("ZodBigIntFormat",(e,t)=>{Zn.init(e,t),yl.init(e,t)});function xl(e){return Fi(kl,e)}function wl(e){return Vi(kl,e)}const Il=o("ZodSymbol",(e,t)=>{qn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Qa(0,e)});function Cl(e){return Hi(Il,e)}const Sl=o("ZodUndefined",(e,t)=>{Ln.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>es(0,e)});function El(e){return Ji(Sl,e)}const zl=o("ZodNull",(e,t)=>{Fn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ya(0,e,t)});function Tl(e){return Gi(zl,e)}const Dl=o("ZodAny",(e,t)=>{Vn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Ol(){return Bi(Dl)}const Ul=o("ZodUnknown",(e,t)=>{Hn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Rl(){return Wi(Ul)}const Al=o("ZodNever",(e,t)=>{Jn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ns(0,0,t)});function Nl(e){return Ki(Al,e)}const jl=o("ZodVoid",(e,t)=>{Gn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ts(0,e)});function Pl(e){return Xi(jl,e)}const Ml=o("ZodDate",(e,t)=>{Bn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>is(0,e),e.min=(t,n)=>e.check(ra(t,n)),e.max=(t,n)=>e.check(na(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Zl(e){return Qi(Ml,e)}const ql=o("ZodArray",(e,t)=>{Kn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>vs(e,t,n,o),e.element=t.element,e.min=(t,n)=>e.check(fa(t,n)),e.nonempty=t=>e.check(fa(1,t)),e.max=(t,n)=>e.check(ma(t,n)),e.length=(t,n)=>e.check(ha(t,n)),e.unwrap=()=>e.element});function Ll(e,t){return Ta(ql,e,t)}function Fl(e){const t=e._zod.def.shape;return mu(Object.keys(t))}const Vl=o("ZodObject",(e,t)=>{to.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>bs(e,t,n,o),v(e,"shape",()=>t.shape),e.keyof=()=>mu(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Rl()}),e.loose=()=>e.clone({...e._zod.def,catchall:Rl()}),e.strict=()=>e.clone({...e._zod.def,catchall:Nl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>P(e,t),e.safeExtend=t=>M(e,t),e.merge=t=>Z(e,t),e.pick=t=>N(e,t),e.omit=t=>j(e,t),e.partial=(...t)=>q(_u,e,t[0]),e.required=(...t)=>L(Ou,e,t[0])});function Hl(e,t){const n={type:"object",shape:e??{},...D(t)};return new Vl(n)}function Jl(e,t){return new Vl({type:"object",shape:e,catchall:Nl(),...D(t)})}function Gl(e,t){return new Vl({type:"object",shape:e,catchall:Rl(),...D(t)})}const Bl=o("ZodUnion",(e,t)=>{oo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>$s(e,t,n,o),e.options=t.options});function Wl(e,t){return new Bl({type:"union",options:e,...D(t)})}const Kl=o("ZodXor",(e,t)=>{Bl.init(e,t),io.init(e,t),e._zod.processJSONSchema=(t,n,o)=>$s(e,t,n,o),e.options=t.options});function Xl(e,t){return new Kl({type:"union",options:e,inclusive:!1,...D(t)})}const Ql=o("ZodDiscriminatedUnion",(e,t)=>{Bl.init(e,t),ao.init(e,t)});function Yl(e,t,n){return new Ql({type:"union",options:t,discriminator:e,...D(n)})}const eu=o("ZodIntersection",(e,t)=>{so.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ys(e,t,n,o)});function tu(e,t){return new eu({type:"intersection",left:e,right:t})}const nu=o("ZodTuple",(e,t)=>{uo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>_s(e,t,n,o),e.rest=t=>e.clone({...e._zod.def,rest:t})});function ou(e,t,n){const o=t instanceof rn;return new nu({type:"tuple",items:e,rest:o?t:null,...D(o?n:t)})}const ru=o("ZodRecord",(e,t)=>{mo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ks(e,t,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function iu(e,t,n){return new ru({type:"record",keyType:e,valueType:t,...D(n)})}function au(e,t,n){const o=T(e);return o._zod.values=void 0,new ru({type:"record",keyType:o,valueType:t,...D(n)})}function su(e,t,n){return new ru({type:"record",keyType:e,valueType:t,mode:"loose",...D(n)})}const cu=o("ZodMap",(e,t)=>{fo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>hs(0,e),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function lu(e,t,n){return new cu({type:"map",keyType:e,valueType:t,...D(n)})}const uu=o("ZodSet",(e,t)=>{go.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>gs(0,e),e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function du(e,t){return new uu({type:"set",valueType:e,...D(t)})}const pu=o("ZodEnum",(e,t)=>{bo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>as(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,o)=>{const r={};for(const o of e){if(!n.has(o))throw new Error(`Key ${o} not found in enum`);r[o]=t.entries[o]}return new pu({...t,checks:[],...D(o),entries:r})},e.exclude=(e,o)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new pu({...t,checks:[],...D(o),entries:r})}});function mu(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pu({type:"enum",entries:n,...D(t)})}function fu(e,t){return new pu({type:"enum",entries:e,...D(t)})}const hu=o("ZodLiteral",(e,t)=>{$o.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ss(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function gu(e,t){return new hu({type:"literal",values:Array.isArray(e)?e:[e],...D(t)})}const vu=o("ZodFile",(e,t)=>{yo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>us(e,0,n),e.min=(t,n)=>e.check(da(t,n)),e.max=(t,n)=>e.check(ua(t,n)),e.mime=(t,n)=>e.check(xa(Array.isArray(t)?t:[t],n))});function bu(e){return Da(vu,e)}const $u=o("ZodTransform",(e,t)=>{_o.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>fs(0,e),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new a(e.constructor.name);n.addIssue=o=>{if("string"==typeof o)n.issues.push(K(o,n.value,t));else{const t=o;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(K(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function yu(e){return new $u({type:"transform",transform:e})}const _u=o("ZodOptional",(e,t)=>{xo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ds(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function ku(e){return new _u({type:"optional",innerType:e})}const xu=o("ZodExactOptional",(e,t)=>{wo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ds(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function wu(e){return new xu({type:"optional",innerType:e})}const Iu=o("ZodNullable",(e,t)=>{Io.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>xs(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Cu(e){return new Iu({type:"nullable",innerType:e})}function Su(e){return ku(Cu(e))}const Eu=o("ZodDefault",(e,t)=>{Co.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Is(e,t,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zu(e,t){return new Eu({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():C(t)}})}const Tu=o("ZodPrefault",(e,t)=>{Eo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Cs(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Du(e,t){return new Tu({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():C(t)}})}const Ou=o("ZodNonOptional",(e,t)=>{zo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ws(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function Uu(e,t){return new Ou({type:"nonoptional",innerType:e,...D(t)})}const Ru=o("ZodSuccess",(e,t)=>{Do.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ds(0,0,t),e.unwrap=()=>e._zod.def.innerType});function Au(e){return new Ru({type:"success",innerType:e})}const Nu=o("ZodCatch",(e,t)=>{Oo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ss(e,t,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ju(e,t){return new Nu({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Pu=o("ZodNaN",(e,t)=>{Uo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>cs(0,e)});function Mu(e){return ea(Pu,e)}const Zu=o("ZodPipe",(e,t)=>{Ro.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Es(e,t,0,o),e.in=t.in,e.out=t.out});function qu(e,t){return new Zu({type:"pipe",in:e,out:t})}const Lu=o("ZodCodec",(e,t)=>{Zu.init(e,t),No.init(e,t)});function Fu(e,t,n){return new Lu({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Vu=o("ZodReadonly",(e,t)=>{Mo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>zs(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Hu(e){return new Vu({type:"readonly",innerType:e})}const Ju=o("ZodTemplateLiteral",(e,t)=>{qo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ls(e,0,n)});function Gu(e,t){return new Ju({type:"template_literal",parts:e,...D(t)})}const Bu=o("ZodLazy",(e,t)=>{Vo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Os(e,t,0,o),e.unwrap=()=>e._zod.def.getter()});function Wu(e){return new Bu({type:"lazy",getter:e})}const Ku=o("ZodPromise",(e,t)=>{Fo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ts(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function Xu(e){return new Ku({type:"promise",innerType:e})}const Qu=o("ZodFunction",(e,t)=>{Lo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ms(0,e)});function Yu(e){return new Qu({type:"function",input:Array.isArray(e?.input)?ou(e?.input):e?.input??Ll(Rl()),output:e?.output??Rl()})}const ed=o("ZodCustom",(e,t)=>{Ho.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ps(0,e)});function td(e){const t=new Ot({check:"custom"});return t._zod.check=e,t}function nd(e,t){return Oa(ed,e??(()=>!0),t)}function od(e,t={}){return Ua(ed,e,t)}function rd(e){return Ra(e)}const id=Na,ad=ja;function sd(e,t={}){const n=new ed({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...D(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const cd=(...e)=>Pa({Codec:Lu,Boolean:bl,String:pc},...e);function ld(e){const t=Wu(()=>Wl([mc(e),dl(),$l(),Tl(),Ll(t),iu(mc(),t)]));return t}function ud(e,t){return qu(yu(e),t)}const dd={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function pd(e){c({customError:e})}function md(){return c().customError}var fd;fd||(fd={});const hd={...Object.freeze({__proto__:null,ZodAny:Dl,ZodArray:ql,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:kl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Dc,ZodCUID2:Uc,ZodCatch:Nu,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Ml,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:hc,ZodEmoji:Sc,ZodEnum:pu,ZodExactOptional:xu,ZodFile:vu,ZodFunction:Qu,ZodGUID:vc,ZodIPv4:qc,ZodIPv6:Hc,ZodIntersection:eu,ZodJWT:ol,ZodKSUID:Mc,ZodLazy:Bu,ZodLiteral:hu,ZodMAC:Fc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Ou,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Vl,ZodOptional:_u,ZodPipe:Zu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Vu,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Ru,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:wc,ZodUUID:$c,ZodUndefined:Sl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:jl,ZodXID:jc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Ol,array:Ll,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:ju,check:td,cidrv4:Bc,cidrv6:Kc,codec:Fu,cuid:Oc,cuid2:Rc,custom:nd,date:Zl,describe:id,discriminatedUnion:Yl,e164:nl,email:gc,emoji:Ec,enum:mu,exactOptional:wu,file:bu,float32:fl,float64:hl,function:Yu,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Cc,instanceof:sd,int:ml,int32:gl,int64:xl,intersection:tu,ipv4:Lc,ipv6:Jc,json:ld,jwt:rl,keyof:Fl,ksuid:Zc,lazy:Wu,literal:gu,looseObject:Gl,looseRecord:su,mac:Vc,map:lu,meta:ad,nan:Mu,nanoid:Tc,nativeEnum:fu,never:Nl,nonoptional:Uu,null:Tl,nullable:Cu,nullish:Su,number:dl,object:Hl,optional:ku,partialRecord:au,pipe:qu,prefault:Du,preprocess:ud,promise:Xu,readonly:Hu,record:iu,refine:od,set:du,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Cl,templateLiteral:Gu,transform:yu,tuple:ou,uint32:vl,uint64:wl,ulid:Nc,undefined:El,union:Wl,unknown:Rl,url:Ic,uuid:yc,uuidv4:_c,uuidv6:kc,uuidv7:xc,void:Pl,xid:Pc,xor:Xl}),...Ms,iso:Bs},gd=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function vd(e,t){if(void 0!==e.not){if("object"==typeof e.not&&0===Object.keys(e.not).length)return hd.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==e.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==e.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==e.if||void 0!==e.then||void 0!==e.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==e.dependentSchemas||void 0!==e.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return hd.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const o=function(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;const o="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===o){const o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}(n,t),r=bd(o,t);return t.refs.set(n,r),t.processing.delete(n),r}if(void 0!==e.enum){const n=e.enum;if("openapi-3.0"===t.version&&!0===e.nullable&&1===n.length&&null===n[0])return hd.null();if(0===n.length)return hd.never();if(1===n.length)return hd.literal(n[0]);if(n.every(e=>"string"==typeof e))return hd.enum(n);const o=n.map(e=>hd.literal(e));return o.length<2?o[0]:hd.union([o[0],o[1],...o.slice(2)])}if(void 0!==e.const)return hd.literal(e.const);const n=e.type;if(Array.isArray(n)){const o=n.map(n=>vd({...e,type:n},t));return 0===o.length?hd.never():1===o.length?o[0]:hd.union(o)}if(!n)return hd.any();let o;switch(n){case"string":{let t=hd.string();if(e.format){const n=e.format;"email"===n?t=t.check(hd.email()):"uri"===n||"uri-reference"===n?t=t.check(hd.url()):"uuid"===n||"guid"===n?t=t.check(hd.uuid()):"date-time"===n?t=t.check(hd.iso.datetime()):"date"===n?t=t.check(hd.iso.date()):"time"===n?t=t.check(hd.iso.time()):"duration"===n?t=t.check(hd.iso.duration()):"ipv4"===n?t=t.check(hd.ipv4()):"ipv6"===n?t=t.check(hd.ipv6()):"mac"===n?t=t.check(hd.mac()):"cidr"===n?t=t.check(hd.cidrv4()):"cidr-v6"===n?t=t.check(hd.cidrv6()):"base64"===n?t=t.check(hd.base64()):"base64url"===n?t=t.check(hd.base64url()):"e164"===n?t=t.check(hd.e164()):"jwt"===n?t=t.check(hd.jwt()):"emoji"===n?t=t.check(hd.emoji()):"nanoid"===n?t=t.check(hd.nanoid()):"cuid"===n?t=t.check(hd.cuid()):"cuid2"===n?t=t.check(hd.cuid2()):"ulid"===n?t=t.check(hd.ulid()):"xid"===n?t=t.check(hd.xid()):"ksuid"===n&&(t=t.check(hd.ksuid()))}"number"==typeof e.minLength&&(t=t.min(e.minLength)),"number"==typeof e.maxLength&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),o=t;break}case"number":case"integer":{let t="integer"===n?hd.number().int():hd.number();"number"==typeof e.minimum&&(t=t.min(e.minimum)),"number"==typeof e.maximum&&(t=t.max(e.maximum)),"number"==typeof e.exclusiveMinimum?t=t.gt(e.exclusiveMinimum):!0===e.exclusiveMinimum&&"number"==typeof e.minimum&&(t=t.gt(e.minimum)),"number"==typeof e.exclusiveMaximum?t=t.lt(e.exclusiveMaximum):!0===e.exclusiveMaximum&&"number"==typeof e.maximum&&(t=t.lt(e.maximum)),"number"==typeof e.multipleOf&&(t=t.multipleOf(e.multipleOf)),o=t;break}case"boolean":o=hd.boolean();break;case"null":o=hd.null();break;case"object":{const n={},r=e.properties||{},i=new Set(e.required||[]);for(const[e,o]of Object.entries(r)){const r=bd(o,t);n[e]=i.has(e)?r:r.optional()}if(e.propertyNames){const r=bd(e.propertyNames,t),i=e.additionalProperties&&"object"==typeof e.additionalProperties?bd(e.additionalProperties,t):hd.any();if(0===Object.keys(n).length){o=hd.record(r,i);break}const a=hd.object(n).passthrough(),s=hd.looseRecord(r,i);o=hd.intersection(a,s);break}if(e.patternProperties){const r=e.patternProperties,i=Object.keys(r),a=[];for(const e of i){const n=bd(r[e],t),o=hd.string().regex(new RegExp(e));a.push(hd.looseRecord(o,n))}const s=[];if(Object.keys(n).length>0&&s.push(hd.object(n).passthrough()),s.push(...a),0===s.length)o=hd.object({}).passthrough();else if(1===s.length)o=s[0];else{let e=hd.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=hd.intersection(e,s[t]);o=e}break}const a=hd.object(n);o=!1===e.additionalProperties?a.strict():"object"==typeof e.additionalProperties?a.catchall(bd(e.additionalProperties,t)):a.passthrough();break}case"array":{const n=e.prefixItems,r=e.items;if(n&&Array.isArray(n)){const i=n.map(e=>bd(e,t)),a=r&&"object"==typeof r&&!Array.isArray(r)?bd(r,t):void 0;o=a?hd.tuple(i).rest(a):hd.tuple(i),"number"==typeof e.minItems&&(o=o.check(hd.minLength(e.minItems))),"number"==typeof e.maxItems&&(o=o.check(hd.maxLength(e.maxItems)))}else if(Array.isArray(r)){const n=r.map(e=>bd(e,t)),i=e.additionalItems&&"object"==typeof e.additionalItems?bd(e.additionalItems,t):void 0;o=i?hd.tuple(n).rest(i):hd.tuple(n),"number"==typeof e.minItems&&(o=o.check(hd.minLength(e.minItems))),"number"==typeof e.maxItems&&(o=o.check(hd.maxLength(e.maxItems)))}else if(void 0!==r){const n=bd(r,t);let i=hd.array(n);"number"==typeof e.minItems&&(i=i.min(e.minItems)),"number"==typeof e.maxItems&&(i=i.max(e.maxItems)),o=i}else o=hd.array(hd.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(o=o.describe(e.description)),void 0!==e.default&&(o=o.default(e.default)),o}function bd(e,t){if("boolean"==typeof e)return e?hd.any():hd.never();let n=vd(e,t);const o=e.type||void 0!==e.enum||void 0!==e.const;if(e.anyOf&&Array.isArray(e.anyOf)){const r=e.anyOf.map(e=>bd(e,t)),i=hd.union(r);n=o?hd.intersection(n,i):i}if(e.oneOf&&Array.isArray(e.oneOf)){const r=e.oneOf.map(e=>bd(e,t)),i=hd.xor(r);n=o?hd.intersection(n,i):i}if(e.allOf&&Array.isArray(e.allOf))if(0===e.allOf.length)n=o?n:hd.any();else{let r=o?n:bd(e.allOf[0],t);for(let n=o?0:1;n<e.allOf.length;n++)r=hd.intersection(r,bd(e.allOf[n],t));n=r}!0===e.nullable&&"openapi-3.0"===t.version&&(n=hd.nullable(n)),!0===e.readOnly&&(n=hd.readonly(n));const r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const t of i)t in e&&(r[t]=e[t]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const t of a)t in e&&(r[t]=e[t]);for(const t of Object.keys(e))gd.has(t)||(r[t]=e[t]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function $d(e,t){if("boolean"==typeof e)return e?hd.any():hd.never();const n=function(e,t){const n=e.$schema;return"https://json-schema.org/draft/2020-12/schema"===n?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===n?"draft-7":"http://json-schema.org/draft-04/schema#"===n?"draft-4":t??"draft-2020-12"}(e,t?.defaultTarget);return bd(e,{version:n,defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??ti})}var yd=Object.freeze({__proto__:null,bigint:function(e){return Li(yl,e)},boolean:function(e){return Zi(bl,e)},date:function(e){return Yi(Ml,e)},number:function(e){return Ui(ul,e)},string:function(e){return oi(pc,e)}});c(or());var _d=Object.freeze({__proto__:null,$brand:r,$input:Qr,$output:Xr,NEVER:n,TimePrecision:Si,ZodAny:Dl,ZodArray:ql,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:kl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Dc,ZodCUID2:Uc,ZodCatch:Nu,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Ml,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:hc,ZodEmoji:Sc,ZodEnum:pu,ZodError:Ks,ZodExactOptional:xu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Qu,ZodGUID:vc,ZodIPv4:qc,ZodIPv6:Hc,ZodISODate:Ls,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Vs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ol,ZodKSUID:Mc,ZodLazy:Bu,ZodLiteral:hu,ZodMAC:Fc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Ou,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Vl,ZodOptional:_u,ZodPipe:Zu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Vu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Ru,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:wc,ZodUUID:$c,ZodUndefined:Sl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:jl,ZodXID:jc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Ol,array:Ll,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:ju,check:td,cidrv4:Bc,cidrv6:Kc,clone:T,codec:Fu,coerce:yd,config:c,core:Ns,cuid:Oc,cuid2:Rc,custom:nd,date:Zl,decode:oc,decodeAsync:ic,describe:id,discriminatedUnion:Yl,e164:nl,email:gc,emoji:Ec,encode:nc,encodeAsync:rc,endsWith:_a,enum:mu,exactOptional:wu,file:bu,flattenError:oe,float32:fl,float64:hl,formatError:re,fromJSONSchema:$d,function:Yu,getErrorMap:md,globalRegistry:ti,gt:oa,gte:ra,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Cc,includes:$a,instanceof:sd,int:ml,int32:gl,int64:xl,intersection:tu,ipv4:Lc,ipv6:Jc,iso:Bs,json:ld,jwt:rl,keyof:Fl,ksuid:Zc,lazy:Wu,length:ha,literal:gu,locales:Kr,looseObject:Gl,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Vc,map:lu,maxLength:ma,maxSize:ua,meta:ad,mime:xa,minLength:fa,minSize:da,multipleOf:la,nan:Mu,nanoid:Tc,nativeEnum:fu,negative:aa,never:Nl,nonnegative:ca,nonoptional:Uu,nonpositive:sa,normalize:Ia,null:Tl,nullable:Cu,nullish:Su,number:dl,object:Hl,optional:ku,overwrite:wa,parse:Qs,parseAsync:Ys,partialRecord:au,pipe:qu,positive:ia,prefault:Du,preprocess:ud,prettifyError:se,promise:Xu,property:ka,readonly:Hu,record:iu,refine:od,regex:ga,regexes:Dt,registry:ei,safeDecode:sc,safeDecodeAsync:lc,safeEncode:ac,safeEncodeAsync:cc,safeParse:ec,safeParseAsync:tc,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:ya,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Cl,templateLiteral:Gu,toJSONSchema:Rs,toLowerCase:Sa,toUpperCase:Ea,transform:yu,treeifyError:ie,trim:Ca,tuple:ou,uint32:vl,uint64:wl,ulid:Nc,undefined:El,union:Wl,unknown:Rl,uppercase:ba,url:Ic,util:Y,uuid:yc,uuidv4:_c,uuidv6:kc,uuidv7:xc,void:Pl,xid:Pc,xor:Xl}),kd=Object.freeze({__proto__:null,$brand:r,$input:Qr,$output:Xr,NEVER:n,TimePrecision:Si,ZodAny:Dl,ZodArray:ql,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:kl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Dc,ZodCUID2:Uc,ZodCatch:Nu,ZodCodec:Lu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Ml,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:hc,ZodEmoji:Sc,ZodEnum:pu,ZodError:Ks,ZodExactOptional:xu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Qu,ZodGUID:vc,ZodIPv4:qc,ZodIPv6:Hc,ZodISODate:Ls,ZodISODateTime:Zs,ZodISODuration:Js,ZodISOTime:Vs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ol,ZodKSUID:Mc,ZodLazy:Bu,ZodLiteral:hu,ZodMAC:Fc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Ou,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Vl,ZodOptional:_u,ZodPipe:Zu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Vu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Ru,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:wc,ZodUUID:$c,ZodUndefined:Sl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:jl,ZodXID:jc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Ol,array:Ll,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:ju,check:td,cidrv4:Bc,cidrv6:Kc,clone:T,codec:Fu,coerce:yd,config:c,core:Ns,cuid:Oc,cuid2:Rc,custom:nd,date:Zl,decode:oc,decodeAsync:ic,describe:id,discriminatedUnion:Yl,e164:nl,email:gc,emoji:Ec,encode:nc,encodeAsync:rc,endsWith:_a,enum:mu,exactOptional:wu,file:bu,flattenError:oe,float32:fl,float64:hl,formatError:re,fromJSONSchema:$d,function:Yu,getErrorMap:md,globalRegistry:ti,gt:oa,gte:ra,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Cc,includes:$a,instanceof:sd,int:ml,int32:gl,int64:xl,intersection:tu,ipv4:Lc,ipv6:Jc,iso:Bs,json:ld,jwt:rl,keyof:Fl,ksuid:Zc,lazy:Wu,length:ha,literal:gu,locales:Kr,looseObject:Gl,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Vc,map:lu,maxLength:ma,maxSize:ua,meta:ad,mime:xa,minLength:fa,minSize:da,multipleOf:la,nan:Mu,nanoid:Tc,nativeEnum:fu,negative:aa,never:Nl,nonnegative:ca,nonoptional:Uu,nonpositive:sa,normalize:Ia,null:Tl,nullable:Cu,nullish:Su,number:dl,object:Hl,optional:ku,overwrite:wa,parse:Qs,parseAsync:Ys,partialRecord:au,pipe:qu,positive:ia,prefault:Du,preprocess:ud,prettifyError:se,promise:Xu,property:ka,readonly:Hu,record:iu,refine:od,regex:ga,regexes:Dt,registry:ei,safeDecode:sc,safeDecodeAsync:lc,safeEncode:ac,safeEncodeAsync:cc,safeParse:ec,safeParseAsync:tc,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:ya,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Cl,templateLiteral:Gu,toJSONSchema:Rs,toLowerCase:Sa,toUpperCase:Ea,transform:yu,treeifyError:ie,trim:Ca,tuple:ou,uint32:vl,uint64:wl,ulid:Nc,undefined:El,union:Wl,unknown:Rl,uppercase:ba,url:Ic,util:Y,uuid:yc,uuidv4:_c,uuidv6:kc,uuidv7:xc,void:Pl,xid:Pc,xor:Xl,z:_d});const xd="io.modelcontextprotocol/related-task",wd="2.0",Id=nd(e=>null!==e&&("object"==typeof e||"function"==typeof e)),Cd=Wl([mc(),dl().int()]),Sd=mc();Gl({ttl:dl().optional(),pollInterval:dl().optional()});const Ed=Hl({ttl:dl().optional()}),zd=Hl({taskId:mc()}),Td=Gl({progressToken:Cd.optional(),[xd]:zd.optional()}),Dd=Hl({_meta:Td.optional()}),Od=Dd.extend({task:Ed.optional()}),Ud=Hl({method:mc(),params:Dd.loose().optional()}),Rd=Hl({_meta:Td.optional()}),Ad=Hl({method:mc(),params:Rd.loose().optional()}),Nd=Gl({_meta:Td.optional()}),jd=Wl([mc(),dl().int()]),Pd=Hl({jsonrpc:gu(wd),id:jd,...Ud.shape}).strict(),Md=e=>Pd.safeParse(e).success,Zd=Hl({jsonrpc:gu(wd),...Ad.shape}).strict(),qd=Hl({jsonrpc:gu(wd),id:jd,result:Nd}).strict(),Ld=e=>qd.safeParse(e).success;var Fd;!function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"}(Fd||(Fd={}));const Vd=Hl({jsonrpc:gu(wd),id:jd.optional(),error:Hl({code:dl().int(),message:mc(),data:Rl().optional()})}).strict(),Hd=Wl([Pd,Zd,qd,Vd]);Wl([qd,Vd]);const Jd=Nd.strict(),Gd=Rd.extend({requestId:jd.optional(),reason:mc().optional()}),Bd=Ad.extend({method:gu("notifications/cancelled"),params:Gd}),Wd=Hl({src:mc(),mimeType:mc().optional(),sizes:Ll(mc()).optional(),theme:mu(["light","dark"]).optional()}),Kd=Hl({icons:Ll(Wd).optional()}),Xd=Hl({name:mc(),title:mc().optional()}),Qd=Xd.extend({...Xd.shape,...Kd.shape,version:mc(),websiteUrl:mc().optional(),description:mc().optional()}),Yd=tu(Hl({applyDefaults:$l().optional()}),iu(mc(),Rl())),ep=ud(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,tu(Hl({form:Yd.optional(),url:Id.optional()}),iu(mc(),Rl()).optional())),tp=Gl({list:Id.optional(),cancel:Id.optional(),requests:Gl({sampling:Gl({createMessage:Id.optional()}).optional(),elicitation:Gl({create:Id.optional()}).optional()}).optional()}),np=Gl({list:Id.optional(),cancel:Id.optional(),requests:Gl({tools:Gl({call:Id.optional()}).optional()}).optional()}),op=Hl({experimental:iu(mc(),Id).optional(),sampling:Hl({context:Id.optional(),tools:Id.optional()}).optional(),elicitation:ep.optional(),roots:Hl({listChanged:$l().optional()}).optional(),tasks:tp.optional(),extensions:iu(mc(),Id).optional()}),rp=Dd.extend({protocolVersion:mc(),capabilities:op,clientInfo:Qd}),ip=Ud.extend({method:gu("initialize"),params:rp}),ap=Hl({experimental:iu(mc(),Id).optional(),logging:Id.optional(),completions:Id.optional(),prompts:Hl({listChanged:$l().optional()}).optional(),resources:Hl({subscribe:$l().optional(),listChanged:$l().optional()}).optional(),tools:Hl({listChanged:$l().optional()}).optional(),tasks:np.optional(),extensions:iu(mc(),Id).optional()}),sp=Nd.extend({protocolVersion:mc(),capabilities:ap,serverInfo:Qd,instructions:mc().optional()}),cp=Ad.extend({method:gu("notifications/initialized"),params:Rd.optional()}),lp=Ud.extend({method:gu("ping"),params:Dd.optional()}),up=Hl({progress:dl(),total:ku(dl()),message:ku(mc())}),dp=Hl({...Rd.shape,...up.shape,progressToken:Cd}),pp=Ad.extend({method:gu("notifications/progress"),params:dp}),mp=Dd.extend({cursor:Sd.optional()}),fp=Ud.extend({params:mp.optional()}),hp=Nd.extend({nextCursor:Sd.optional()}),gp=mu(["working","input_required","completed","failed","cancelled"]),vp=Hl({taskId:mc(),status:gp,ttl:Wl([dl(),Tl()]),createdAt:mc(),lastUpdatedAt:mc(),pollInterval:ku(dl()),statusMessage:ku(mc())}),bp=Nd.extend({task:vp}),$p=Rd.merge(vp),yp=Ad.extend({method:gu("notifications/tasks/status"),params:$p}),_p=Ud.extend({method:gu("tasks/get"),params:Dd.extend({taskId:mc()})}),kp=Nd.merge(vp),xp=Ud.extend({method:gu("tasks/result"),params:Dd.extend({taskId:mc()})});Nd.loose();const wp=fp.extend({method:gu("tasks/list")}),Ip=hp.extend({tasks:Ll(vp)}),Cp=Ud.extend({method:gu("tasks/cancel"),params:Dd.extend({taskId:mc()})}),Sp=Nd.merge(vp),Ep=Hl({uri:mc(),mimeType:ku(mc()),_meta:iu(mc(),Rl()).optional()}),zp=Ep.extend({text:mc()}),Tp=mc().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Dp=Ep.extend({blob:Tp}),Op=mu(["user","assistant"]),Up=Hl({audience:Ll(Op).optional(),priority:dl().min(0).max(1).optional(),lastModified:qs({offset:!0}).optional()}),Rp=Hl({...Xd.shape,...Kd.shape,uri:mc(),description:ku(mc()),mimeType:ku(mc()),size:ku(dl()),annotations:Up.optional(),_meta:ku(Gl({}))}),Ap=Hl({...Xd.shape,...Kd.shape,uriTemplate:mc(),description:ku(mc()),mimeType:ku(mc()),annotations:Up.optional(),_meta:ku(Gl({}))}),Np=fp.extend({method:gu("resources/list")}),jp=hp.extend({resources:Ll(Rp)}),Pp=fp.extend({method:gu("resources/templates/list")}),Mp=hp.extend({resourceTemplates:Ll(Ap)}),Zp=Dd.extend({uri:mc()}),qp=Zp,Lp=Ud.extend({method:gu("resources/read"),params:qp}),Fp=Nd.extend({contents:Ll(Wl([zp,Dp]))}),Vp=Ad.extend({method:gu("notifications/resources/list_changed"),params:Rd.optional()}),Hp=Zp,Jp=Ud.extend({method:gu("resources/subscribe"),params:Hp}),Gp=Zp,Bp=Ud.extend({method:gu("resources/unsubscribe"),params:Gp}),Wp=Rd.extend({uri:mc()}),Kp=Ad.extend({method:gu("notifications/resources/updated"),params:Wp}),Xp=Hl({name:mc(),description:ku(mc()),required:ku($l())}),Qp=Hl({...Xd.shape,...Kd.shape,description:ku(mc()),arguments:ku(Ll(Xp)),_meta:ku(Gl({}))}),Yp=fp.extend({method:gu("prompts/list")}),em=hp.extend({prompts:Ll(Qp)}),tm=Dd.extend({name:mc(),arguments:iu(mc(),mc()).optional()}),nm=Ud.extend({method:gu("prompts/get"),params:tm}),om=Hl({type:gu("text"),text:mc(),annotations:Up.optional(),_meta:iu(mc(),Rl()).optional()}),rm=Hl({type:gu("image"),data:Tp,mimeType:mc(),annotations:Up.optional(),_meta:iu(mc(),Rl()).optional()}),im=Hl({type:gu("audio"),data:Tp,mimeType:mc(),annotations:Up.optional(),_meta:iu(mc(),Rl()).optional()}),am=Hl({type:gu("tool_use"),name:mc(),id:mc(),input:iu(mc(),Rl()),_meta:iu(mc(),Rl()).optional()}),sm=Hl({type:gu("resource"),resource:Wl([zp,Dp]),annotations:Up.optional(),_meta:iu(mc(),Rl()).optional()}),cm=Rp.extend({type:gu("resource_link")}),lm=Wl([om,rm,im,cm,sm]),um=Hl({role:Op,content:lm}),dm=Nd.extend({description:mc().optional(),messages:Ll(um)}),pm=Ad.extend({method:gu("notifications/prompts/list_changed"),params:Rd.optional()}),mm=Hl({title:mc().optional(),readOnlyHint:$l().optional(),destructiveHint:$l().optional(),idempotentHint:$l().optional(),openWorldHint:$l().optional()}),fm=Hl({taskSupport:mu(["required","optional","forbidden"]).optional()}),hm=Hl({...Xd.shape,...Kd.shape,description:mc().optional(),inputSchema:Hl({type:gu("object"),properties:iu(mc(),Id).optional(),required:Ll(mc()).optional()}).catchall(Rl()),outputSchema:Hl({type:gu("object"),properties:iu(mc(),Id).optional(),required:Ll(mc()).optional()}).catchall(Rl()).optional(),annotations:mm.optional(),execution:fm.optional(),_meta:iu(mc(),Rl()).optional()}),gm=fp.extend({method:gu("tools/list")}),vm=hp.extend({tools:Ll(hm)}),bm=Nd.extend({content:Ll(lm).default([]),structuredContent:iu(mc(),Rl()).optional(),isError:$l().optional()});bm.or(Nd.extend({toolResult:Rl()}));const $m=Od.extend({name:mc(),arguments:iu(mc(),Rl()).optional()}),ym=Ud.extend({method:gu("tools/call"),params:$m}),_m=Ad.extend({method:gu("notifications/tools/list_changed"),params:Rd.optional()});Hl({autoRefresh:$l().default(!0),debounceMs:dl().int().nonnegative().default(300)});const km=mu(["debug","info","notice","warning","error","critical","alert","emergency"]),xm=Dd.extend({level:km}),wm=Ud.extend({method:gu("logging/setLevel"),params:xm}),Im=Rd.extend({level:km,logger:mc().optional(),data:Rl()}),Cm=Ad.extend({method:gu("notifications/message"),params:Im}),Sm=Hl({name:mc().optional()}),Em=Hl({hints:Ll(Sm).optional(),costPriority:dl().min(0).max(1).optional(),speedPriority:dl().min(0).max(1).optional(),intelligencePriority:dl().min(0).max(1).optional()}),zm=Hl({mode:mu(["auto","required","none"]).optional()}),Tm=Hl({type:gu("tool_result"),toolUseId:mc().describe("The unique identifier for the corresponding tool call."),content:Ll(lm).default([]),structuredContent:Hl({}).loose().optional(),isError:$l().optional(),_meta:iu(mc(),Rl()).optional()}),Dm=Yl("type",[om,rm,im]),Om=Yl("type",[om,rm,im,am,Tm]),Um=Hl({role:Op,content:Wl([Om,Ll(Om)]),_meta:iu(mc(),Rl()).optional()}),Rm=Od.extend({messages:Ll(Um),modelPreferences:Em.optional(),systemPrompt:mc().optional(),includeContext:mu(["none","thisServer","allServers"]).optional(),temperature:dl().optional(),maxTokens:dl().int(),stopSequences:Ll(mc()).optional(),metadata:Id.optional(),tools:Ll(hm).optional(),toolChoice:zm.optional()}),Am=Ud.extend({method:gu("sampling/createMessage"),params:Rm}),Nm=Nd.extend({model:mc(),stopReason:ku(mu(["endTurn","stopSequence","maxTokens"]).or(mc())),role:Op,content:Dm}),jm=Nd.extend({model:mc(),stopReason:ku(mu(["endTurn","stopSequence","maxTokens","toolUse"]).or(mc())),role:Op,content:Wl([Om,Ll(Om)])}),Pm=Hl({type:gu("boolean"),title:mc().optional(),description:mc().optional(),default:$l().optional()}),Mm=Hl({type:gu("string"),title:mc().optional(),description:mc().optional(),minLength:dl().optional(),maxLength:dl().optional(),format:mu(["email","uri","date","date-time"]).optional(),default:mc().optional()}),Zm=Hl({type:mu(["number","integer"]),title:mc().optional(),description:mc().optional(),minimum:dl().optional(),maximum:dl().optional(),default:dl().optional()}),qm=Hl({type:gu("string"),title:mc().optional(),description:mc().optional(),enum:Ll(mc()),default:mc().optional()}),Lm=Hl({type:gu("string"),title:mc().optional(),description:mc().optional(),oneOf:Ll(Hl({const:mc(),title:mc()})),default:mc().optional()}),Fm=Hl({type:gu("string"),title:mc().optional(),description:mc().optional(),enum:Ll(mc()),enumNames:Ll(mc()).optional(),default:mc().optional()}),Vm=Wl([qm,Lm]),Hm=Wl([Hl({type:gu("array"),title:mc().optional(),description:mc().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Hl({type:gu("string"),enum:Ll(mc())}),default:Ll(mc()).optional()}),Hl({type:gu("array"),title:mc().optional(),description:mc().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Hl({anyOf:Ll(Hl({const:mc(),title:mc()}))}),default:Ll(mc()).optional()})]),Jm=Wl([Fm,Vm,Hm]),Gm=Wl([Jm,Pm,Mm,Zm]),Bm=Wl([Od.extend({mode:gu("form").optional(),message:mc(),requestedSchema:Hl({type:gu("object"),properties:iu(mc(),Gm),required:Ll(mc()).optional()})}),Od.extend({mode:gu("url"),message:mc(),elicitationId:mc(),url:mc().url()})]),Wm=Ud.extend({method:gu("elicitation/create"),params:Bm}),Km=Rd.extend({elicitationId:mc()}),Xm=Ad.extend({method:gu("notifications/elicitation/complete"),params:Km}),Qm=Nd.extend({action:mu(["accept","decline","cancel"]),content:ud(e=>null===e?void 0:e,iu(mc(),Wl([mc(),dl(),$l(),Ll(mc())])).optional())}),Ym=Hl({type:gu("ref/resource"),uri:mc()}),ef=Hl({type:gu("ref/prompt"),name:mc()}),tf=Dd.extend({ref:Wl([ef,Ym]),argument:Hl({name:mc(),value:mc()}),context:Hl({arguments:iu(mc(),mc()).optional()}).optional()}),nf=Ud.extend({method:gu("completion/complete"),params:tf}),of=Nd.extend({completion:Gl({values:Ll(mc()).max(100),total:ku(dl().int()),hasMore:ku($l())})}),rf=Hl({uri:mc().startsWith("file://"),name:mc().optional(),_meta:iu(mc(),Rl()).optional()}),af=Ud.extend({method:gu("roots/list"),params:Dd.optional()}),sf=Nd.extend({roots:Ll(rf)}),cf=Ad.extend({method:gu("notifications/roots/list_changed"),params:Rd.optional()});Wl([lp,ip,nf,wm,nm,Yp,Np,Pp,Lp,Jp,Bp,ym,gm,_p,xp,wp,Cp]),Wl([Bd,pp,cp,cf,yp]),Wl([Jd,Nm,jm,Qm,sf,kp,Ip,bp]),Wl([lp,Am,Wm,af,_p,xp,wp,Cp]),Wl([Bd,pp,Cm,Kp,Vp,_m,pm,yp,Xm]),Wl([Jd,sp,of,dm,em,jp,Mp,Fp,bm,vm,kp,Ip,bp]);class lf extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,t,n){if(e===Fd.UrlElicitationRequired&&n){const e=n;if(e.elicitations)return new uf(e.elicitations,t)}return new lf(e,t,n)}}class uf extends lf{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Fd.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}function df(e){return"completed"===e||"failed"===e||"cancelled"===e}function pf(e){const t=function(e){if(!e)return;let t;if(js(e)){const n=e;t=n._zod?.def?.shape}else t=e.shape;if(t){if("function"==typeof t)try{return t()}catch{return}return t}}(e),n=t?.method;if(!n)throw new Error("Schema is missing a method literal");const o=function(e){if(js(e)){const t=e,n=t._zod?.def;if(n){if(void 0!==n.value)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}}const t=e._def;if(t){if(void 0!==t.value)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const n=e.value;if(void 0!==n)return n}(n);if("string"!=typeof o)throw new Error("Schema method literal must be a string");return o}function mf(e,t){const n=Ps(e,t);if(!n.success)throw n.error;return n.data}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");class ff{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Bd,e=>{this._oncancel(e)}),this.setNotificationHandler(pp,e=>{this._onprogress(e)}),this.setRequestHandler(lp,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(_p,async(e,t)=>{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new lf(Fd.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(xp,async(e,t)=>{const n=async()=>{const o=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(o,t.sessionId);){if("response"===e.type||"error"===e.type){const t=e.message,n=t.id,o=this._requestResolvers.get(n);if(o)if(this._requestResolvers.delete(n),"response"===e.type)o(t);else{const e=t;o(new lf(e.error.code,e.error.message,e.error.data))}else{const t="response"===e.type?"Response":"Error";this._onerror(new Error(`${t} handler missing for request ${n}`))}continue}await(this._transport?.send(e.message,{relatedRequestId:t.requestId}))}}const r=await this._taskStore.getTask(o,t.sessionId);if(!r)throw new lf(Fd.InvalidParams,`Task not found: ${o}`);if(!df(r.status))return await this._waitForTaskUpdate(o,t.signal),await n();if(df(r.status)){const e=await this._taskStore.getTaskResult(o,t.sessionId);return this._clearTaskQueue(o),{...e,_meta:{...e._meta,[xd]:{taskId:o}}}}return await n()};return await n()}),this.setRequestHandler(wp,async(e,t)=>{try{const{tasks:n,nextCursor:o}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:o,_meta:{}}}catch(e){throw new lf(Fd.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Cp,async(e,t)=>{try{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new lf(Fd.InvalidParams,`Task not found: ${e.params.taskId}`);if(df(n.status))throw new lf(Fd.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,"cancelled","Client cancelled task execution.",t.sessionId),this._clearTaskQueue(e.params.taskId);const o=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!o)throw new lf(Fd.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...o}}catch(e){if(e instanceof lf)throw e;throw new lf(Fd.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;const t=this._requestHandlerAbortControllers.get(e.params.requestId);t?.abort(e.params.reason)}_setupTimeout(e,t,n,o,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),lf.fromError(Fd.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};const o=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{var n;o?.(e,t),Ld(e)||(n=e,Vd.safeParse(n).success)?this._onresponse(e):Md(e)?this._onrequest(e,t):(e=>Zd.safeParse(e).success)(e)?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(const e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();const t=lf.fromError(Fd.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){const n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,r=e.params?._meta?.[xd]?.taskId;if(void 0===n){const t={jsonrpc:"2.0",id:e.id,error:{code:Fd.MethodNotFound,message:"Method not found"}};return void(r&&this._taskMessageQueue?this._enqueueTaskMessage(r,{type:"error",message:t,timestamp:Date.now()},o?.sessionId).catch(e=>this._onerror(new Error(`Failed to enqueue error response: ${e}`))):o?.send(t).catch(e=>this._onerror(new Error(`Failed to send an error response: ${e}`))))}const i=new AbortController;this._requestHandlerAbortControllers.set(e.id,i);const a=(s=e.params,Od.safeParse(s).success?e.params.task:void 0);var s;const c=this._taskStore?this.requestTaskStore(e,o?.sessionId):void 0,l={signal:i.signal,sessionId:o?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(i.signal.aborted)return;const n={relatedRequestId:e.id};r&&(n.relatedTask={taskId:r}),await this.notification(t,n)},sendRequest:async(t,n,o)=>{if(i.signal.aborted)throw new lf(Fd.ConnectionClosed,"Request was cancelled");const a={...o,relatedRequestId:e.id};r&&!a.relatedTask&&(a.relatedTask={taskId:r});const s=a.relatedTask?.taskId??r;return s&&c&&await c.updateTaskStatus(s,"input_required"),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:r,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,l)).then(async t=>{if(i.signal.aborted)return;const n={result:t,jsonrpc:"2.0",id:e.id};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"response",message:n,timestamp:Date.now()},o?.sessionId):await(o?.send(n))},async t=>{if(i.signal.aborted)return;const n={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Fd.InternalError,message:t.message??"Internal error",...void 0!==t.data&&{data:t.data}}};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"error",message:n,timestamp:Date.now()},o?.sessionId):await(o?.send(n))}).catch(e=>this._onerror(new Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===i&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const i=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&i&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(e){return this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),void i(e)}r(n)}_onresponse(e){const t=Number(e.id),n=this._requestResolvers.get(t);if(n){if(this._requestResolvers.delete(t),Ld(e))n(e);else{n(new lf(e.error.code,e.error.message,e.error.data))}return}const o=this._responseHandlers.get(t);if(void 0===o)return void this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));this._responseHandlers.delete(t),this._cleanupTimeout(t);let r=!1;if(Ld(e)&&e.result&&"object"==typeof e.result){const n=e.result;if(n.task&&"object"==typeof n.task){const e=n.task;"string"==typeof e.taskId&&(r=!0,this._taskProgressTokens.set(e.taskId,t))}}if(r||this._progressHandlers.delete(t),Ld(e))o(e);else{o(lf.fromError(e.error.code,e.error.message,e.error.data))}}get transport(){return this._transport}async close(){await(this._transport?.close())}async*requestStream(e,t,n){const{task:o}=n??{};if(!o){try{const o=await this.request(e,t,n);yield{type:"result",result:o}}catch(e){yield{type:"error",error:e instanceof lf?e:new lf(Fd.InternalError,String(e))}}return}let r;try{const o=await this.request(e,bp,n);if(!o.task)throw new lf(Fd.InternalError,"Task creation did not return a task");for(r=o.task.taskId,yield{type:"taskCreated",task:o.task};;){const e=await this.getTask({taskId:r},n);if(yield{type:"taskStatus",task:e},df(e.status)){if("completed"===e.status){const e=await this.getTaskResult({taskId:r},t,n);yield{type:"result",result:e}}else"failed"===e.status?yield{type:"error",error:new lf(Fd.InternalError,`Task ${r} failed`)}:"cancelled"===e.status&&(yield{type:"error",error:new lf(Fd.InternalError,`Task ${r} was cancelled`)});return}if("input_required"===e.status){const e=await this.getTaskResult({taskId:r},t,n);return void(yield{type:"result",result:e})}const o=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,o)),n?.signal?.throwIfAborted()}}catch(e){yield{type:"error",error:e instanceof lf?e:new lf(Fd.InternalError,String(e))}}}request(e,t,n){const{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i,task:a,relatedTask:s}=n??{};return new Promise((c,l)=>{const u=e=>{l(e)};if(!this._transport)return void u(new Error("Not connected"));if(!0===this._options?.enforceStrictCapabilities)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(e){return void u(e)}n?.signal?.throwIfAborted();const d=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),p.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),a&&(p.params={...p.params,task:a}),s&&(p.params={...p.params,_meta:{...p.params?._meta||{},[xd]:s}});const m=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(e)}},{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i}).catch(e=>this._onerror(new Error(`Failed to send cancellation: ${e}`)));const t=e instanceof lf?e:new lf(Fd.RequestTimeout,String(e));l(t)};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{const n=Ps(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});const f=n?.timeout??6e4;this._setupTimeout(d,f,n?.maxTotalTimeout,()=>m(lf.fromError(Fd.RequestTimeout,"Request timed out",{timeout:f})),n?.resetTimeoutOnProgress??!1);const h=s?.taskId;if(h){const e=e=>{const t=this._responseHandlers.get(d);t?t(e):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,e),this._enqueueTaskMessage(h,{type:"request",message:p,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})}else this._transport.send(p,{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},kp,t)}async getTaskResult(e,t,n){return this.request({method:"tasks/result",params:e},t,n)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},Ip,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},Sp,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const n=t?.relatedTask?.taskId;if(n){const o={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[xd]:t.relatedTask}}};return void await this._enqueueTaskMessage(n,{type:"notification",message:o,timestamp:Date.now()})}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[xd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))})}let o={...e,jsonrpc:"2.0"};t?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[xd]:t.relatedTask}}}),await this._transport.send(o,t)}setRequestHandler(e,t){const n=pf(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,o)=>{const r=mf(e,n);return Promise.resolve(t(r,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const n=pf(e);this._notificationHandlers.set(n,n=>{const o=mf(e,n);return Promise.resolve(t(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);void 0!==t&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,o)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const n=await this._taskMessageQueue.dequeueAll(e,t);for(const t of n)if("request"===t.type&&Md(t.message)){const n=t.message.id,o=this._requestResolvers.get(n);o?(o(new lf(Fd.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n)):this._onerror(new Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{const t=await(this._taskStore?.getTask(e));t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,o)=>{if(t.aborted)return void o(new lf(Fd.InvalidRequest,"Request cancelled"));const r=setTimeout(e,n);t.addEventListener("abort",()=>{clearTimeout(r),o(new lf(Fd.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await n.createTask(o,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{const o=await n.getTask(e,t);if(!o)throw new lf(Fd.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(e,o,r)=>{await n.storeTaskResult(e,o,r,t);const i=await n.getTask(e,t);if(i){const t=yp.parse({method:"notifications/tasks/status",params:i});await this.notification(t),df(i.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,o,r)=>{const i=await n.getTask(e,t);if(!i)throw new lf(Fd.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(df(i.status))throw new lf(Fd.InvalidParams,`Cannot update task "${e}" from terminal status "${i.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,o,r,t);const a=await n.getTask(e,t);if(a){const t=yp.parse({method:"notifications/tasks/status",params:a});await this.notification(t),df(a.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}}function hf(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}var gf;gf=function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"&&new Proxy(gf,{get:(e,t)=>(typeof require<"u"?require:e)[t]});class vf extends ff{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let o=n.shape.method.value;this._registeredMethods.add(o);let r=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),r.onHandler?.(n);for(let e of[...r.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let o=n.listeners.indexOf(t);-1!==o&&n.listeners.splice(o,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setRequestHandler"),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setNotificationHandler"),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}}class bf{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource)return void console.debug("Ignoring message from unknown source",e);let n=Hd.safeParse(e.data);n.success?(console.debug("Parsed message",n.data),this.onmessage?.(n.data)):"2.0"!==e.data?.jsonrpc?console.debug("Ignoring non-JSON-RPC message",n.error.message,e):(console.error("Failed to parse message",n.error.message,e),this.onerror?.(Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,t){"ui/notifications/tool-input-partial"!==e.method&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var $f=Wl([gu("light"),gu("dark")]).describe("Color theme preference for the host environment."),yf=Wl([gu("inline"),gu("fullscreen"),gu("pip")]).describe("Display mode for UI presentation."),_f=iu(Wl([gu("--color-background-primary"),gu("--color-background-secondary"),gu("--color-background-tertiary"),gu("--color-background-inverse"),gu("--color-background-ghost"),gu("--color-background-info"),gu("--color-background-danger"),gu("--color-background-success"),gu("--color-background-warning"),gu("--color-background-disabled"),gu("--color-text-primary"),gu("--color-text-secondary"),gu("--color-text-tertiary"),gu("--color-text-inverse"),gu("--color-text-ghost"),gu("--color-text-info"),gu("--color-text-danger"),gu("--color-text-success"),gu("--color-text-warning"),gu("--color-text-disabled"),gu("--color-border-primary"),gu("--color-border-secondary"),gu("--color-border-tertiary"),gu("--color-border-inverse"),gu("--color-border-ghost"),gu("--color-border-info"),gu("--color-border-danger"),gu("--color-border-success"),gu("--color-border-warning"),gu("--color-border-disabled"),gu("--color-ring-primary"),gu("--color-ring-secondary"),gu("--color-ring-inverse"),gu("--color-ring-info"),gu("--color-ring-danger"),gu("--color-ring-success"),gu("--color-ring-warning"),gu("--font-sans"),gu("--font-mono"),gu("--font-weight-normal"),gu("--font-weight-medium"),gu("--font-weight-semibold"),gu("--font-weight-bold"),gu("--font-text-xs-size"),gu("--font-text-sm-size"),gu("--font-text-md-size"),gu("--font-text-lg-size"),gu("--font-heading-xs-size"),gu("--font-heading-sm-size"),gu("--font-heading-md-size"),gu("--font-heading-lg-size"),gu("--font-heading-xl-size"),gu("--font-heading-2xl-size"),gu("--font-heading-3xl-size"),gu("--font-text-xs-line-height"),gu("--font-text-sm-line-height"),gu("--font-text-md-line-height"),gu("--font-text-lg-line-height"),gu("--font-heading-xs-line-height"),gu("--font-heading-sm-line-height"),gu("--font-heading-md-line-height"),gu("--font-heading-lg-line-height"),gu("--font-heading-xl-line-height"),gu("--font-heading-2xl-line-height"),gu("--font-heading-3xl-line-height"),gu("--border-radius-xs"),gu("--border-radius-sm"),gu("--border-radius-md"),gu("--border-radius-lg"),gu("--border-radius-xl"),gu("--border-radius-full"),gu("--border-width-regular"),gu("--shadow-hairline"),gu("--shadow-sm"),gu("--shadow-md"),gu("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming.").describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation."),Wl([mc(),El()]).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.")).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.");Hl({method:gu("ui/open-link"),params:Hl({url:mc().describe("URL to open in the host's browser")})});var kf=Hl({isError:$l().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),xf=Hl({isError:$l().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),wf=Hl({isError:$l().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();Hl({method:gu("ui/notifications/sandbox-proxy-ready"),params:Hl({})});var If=Hl({connectDomains:Ll(mc()).optional().describe("Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP `connect-src` directive\n- Empty or omitted → no network connections (secure default)"),resourceDomains:Ll(mc()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Ll(mc()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Ll(mc()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Cf=Hl({camera:Hl({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:Hl({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:Hl({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:Hl({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});Hl({method:gu("ui/notifications/size-changed"),params:Hl({width:dl().optional().describe("New width in pixels."),height:dl().optional().describe("New height in pixels.")})});var Sf=Hl({method:gu("ui/notifications/tool-input"),params:Hl({arguments:iu(mc(),Rl().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Ef=Hl({method:gu("ui/notifications/tool-input-partial"),params:Hl({arguments:iu(mc(),Rl().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),zf=Hl({method:gu("ui/notifications/tool-cancelled"),params:Hl({reason:mc().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Tf=Hl({fonts:mc().optional()}),Df=Hl({variables:_f.optional().describe("CSS variables for theming the app."),css:Tf.optional().describe("CSS blocks that apps can inject.")}),Of=Hl({method:gu("ui/resource-teardown"),params:Hl({})});iu(mc(),Rl());var Uf=Hl({text:Hl({}).optional().describe("Host supports text content blocks."),image:Hl({}).optional().describe("Host supports image content blocks."),audio:Hl({}).optional().describe("Host supports audio content blocks."),resource:Hl({}).optional().describe("Host supports resource content blocks."),resourceLink:Hl({}).optional().describe("Host supports resource link content blocks."),structuredContent:Hl({}).optional().describe("Host supports structured content.")});Hl({method:gu("ui/notifications/request-teardown"),params:Hl({}).optional()});var Rf=Hl({experimental:iu(mc(),iu(mc(),Ol()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:Hl({}).optional().describe("Host supports opening external URLs."),downloadFile:Hl({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:Hl({listChanged:$l().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:Hl({listChanged:$l().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:Hl({}).optional().describe("Host accepts log messages."),sandbox:Hl({permissions:Cf.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:If.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Uf.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Uf.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:Hl({tools:Hl({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Af=Hl({experimental:iu(mc(),iu(mc(),Ol()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:Hl({listChanged:$l().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:Ll(yf).optional().describe("Display modes the app supports.")});Hl({method:gu("ui/notifications/initialized"),params:Hl({}).optional()}),Hl({csp:If.optional().describe("Content Security Policy configuration for UI resources."),permissions:Cf.optional().describe("Sandbox permissions requested by the UI resource."),domain:mc().optional().describe("Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., `{hash}.claudemcpcontent.com`)\n- URL-derived subdomains (e.g., `www-example-com.oaiusercontent.com`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation)."),prefersBorder:$l().optional().describe("Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- `true`: request visible border + background\n- `false`: request no visible border + background\n- omitted: host decides border")}),Hl({method:gu("ui/request-display-mode"),params:Hl({mode:yf.describe("The display mode being requested.")})});var Nf=Hl({mode:yf.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),jf=Wl([gu("model"),gu("app")]).describe("Tool visibility scope - who can access the tool.");Hl({resourceUri:mc().optional(),visibility:Ll(jf).optional().describe('Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only'),csp:Nl().optional(),permissions:Nl().optional()}),Hl({mimeTypes:Ll(mc()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Hl({method:gu("ui/download-file"),params:Hl({contents:Ll(Wl([sm,cm])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Hl({method:gu("ui/message"),params:Hl({role:gu("user").describe('Message role, currently only "user" is supported.'),content:Ll(lm).describe("Message content blocks (text, image, etc.).")})}),Hl({method:gu("ui/notifications/sandbox-resource-ready"),params:Hl({html:mc().describe("HTML content to load into the inner iframe."),sandbox:mc().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:If.optional().describe("CSP configuration from resource metadata."),permissions:Cf.optional().describe("Sandbox permissions from resource metadata.")})});var Pf=Hl({method:gu("ui/notifications/tool-result"),params:bm.describe("Standard MCP tool execution result.")}),Mf=Hl({toolInfo:Hl({id:jd.optional().describe("JSON-RPC id of the tools/call request."),tool:hm.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:$f.optional().describe("Current color theme preference."),styles:Df.optional().describe("Style configuration for theming the app."),displayMode:yf.optional().describe("How the UI is currently displayed."),availableDisplayModes:Ll(yf).optional().describe("Display modes the host supports."),containerDimensions:Wl([Hl({height:dl().describe("Fixed container height in pixels.")}),Hl({maxHeight:Wl([dl(),El()]).optional().describe("Maximum container height in pixels.")})]).and(Wl([Hl({width:dl().describe("Fixed container width in pixels.")}),Hl({maxWidth:Wl([dl(),El()]).optional().describe("Maximum container width in pixels.")})])).optional().describe("Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight."),locale:mc().optional().describe("User's language and region preference in BCP 47 format."),timeZone:mc().optional().describe("User's timezone in IANA format."),userAgent:mc().optional().describe("Host application identifier."),platform:Wl([gu("web"),gu("desktop"),gu("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Hl({touch:$l().optional().describe("Whether the device supports touch input."),hover:$l().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Hl({top:dl().describe("Top safe area inset in pixels."),right:dl().describe("Right safe area inset in pixels."),bottom:dl().describe("Bottom safe area inset in pixels."),left:dl().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Zf=Hl({method:gu("ui/notifications/host-context-changed"),params:Mf.describe("Partial context update containing only changed fields.")});Hl({method:gu("ui/update-model-context"),params:Hl({content:Ll(lm).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:iu(mc(),Rl().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Hl({method:gu("ui/initialize"),params:Hl({appInfo:Qd.describe("App identification (name and version)."),appCapabilities:Af.describe("Features and capabilities this app provides."),protocolVersion:mc().describe("Protocol version this app supports.")})});var qf=Hl({protocolVersion:mc().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Qd.describe("Host application identification and version."),hostCapabilities:Rf.describe("Features and capabilities provided by the host."),hostContext:Mf.describe("Rich context about the host environment.")}).passthrough(),Lf={target:"draft-2020-12"};async function Ff(e,t){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[t](Lf);if("zod"===n.vendor){let{z:n}=await Promise.resolve().then(function(){return kd});return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Vf(e,t,n=""){let o=await e["~standard"].validate(t);if(o.issues){let e=o.issues.map(e=>{let t=e.path?.map(e=>"object"==typeof e?e.key:e).join(".");return t?`${t}: ${e.message}`:e.message}).join("; ");throw Error(n+e)}return o.value}class Hf extends vf{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Sf,toolinputpartial:Ef,toolresult:Pf,toolcancelled:zf,hostcontextchanged:Zf};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Hf.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e))return;if(this._everHadListener.add(e),!this._initializedSent)return;let t=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(t);console.warn(t)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){"hostcontextchanged"===e&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||c({jitless:!0}),this.setRequestHandler(lp,e=>(console.log("Received ping:",e.params),{})),this.setEventHandler("hostcontextchanged",void 0)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=function(e,t){const n={...e};for(const e in t){const o=e,r=t[o];if(void 0===r)continue;const i=n[o];hf(i)&&hf(r)?n[o]={...i,...r}:n[o]=r}return n}(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,r=()=>{o._initializedSent&&o._capabilities.tools?.listChanged&&o.sendToolListChanged()},i=void 0!==t.inputSchema,a={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,r()},disable(){this.enabled=!1,r()},update(e){Object.assign(this,e),r()},remove(){o._registeredTools[e]===a&&(delete o._registeredTools[e],r())},handler:async(t,o)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let r;if(i){let i=a.inputSchema,s=i?await Vf(i,t??{},`Invalid input for tool ${e}: `):t??{};r=await n(s,o)}else r=await n(o);return a.outputSchema&&!r.isError&&(r.structuredContent=await Vf(a.outputSchema,r.structuredContent,`Invalid output for tool ${e}: `)),r}};return this._registeredTools[e]=a,this._capabilities.tools||this.transport||this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),r(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Ff(t.inputSchema,"input"):{type:"object",properties:{}}};return t.outputSchema&&(n.outputSchema=await Ff(t.outputSchema,"output")),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Of,(e,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(ym,(e,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(gm,(e,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if("sampling/createMessage"===e)if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(e,t){if(this._assertInitialized("callServerTool"),"string"==typeof e)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},bm,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},Fp,t)}async listServerResources(e,t){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},jp,t)}async createSamplingMessage(e,t){this._assertInitialized("createSamplingMessage");let n=e.tools?jm:Nm;return await this.request({method:"sampling/createMessage",params:e},n,t)}sendMessage(e,t){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},wf,t)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,t){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Jd,t)}openLink(e,t){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},kf,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},xf,t)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,t){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},Nf,t)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,o=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let o=document.documentElement,r=o.style.height;o.style.height="max-content";let i=Math.ceil(o.getBoundingClientRect().height);o.style.height=r;let a=Math.ceil(window.innerWidth);a===t&&i===n||(t=a,n=i,this.sendSizeChanged({width:a,height:i}))}))};o();let r=new ResizeObserver(o);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(e=new bf(window.parent,window.parent),t){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:"2026-01-26"}},qf,t);if(void 0===e)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}}function Jf(){}function Gf(e,t){for(const n in t)e[n]=t[n];return e}function Bf(e){return e()}function Wf(){return Object.create(null)}function Kf(e){e.forEach(Bf)}function Xf(e){return"function"==typeof e}function Qf(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function Yf(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return Jf;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function eh(e,t,n,o){if(e){const r=th(e,t,n,o);return e[0](r)}}function th(e,t,n,o){return e[1]&&o?Gf(n.ctx.slice(),e[1](o(t))):n.ctx}function nh(e,t,n,o){if(e[2]&&o){const r=e[2](o(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let o=0;o<n;o+=1)e[o]=t.dirty[o]|r[o];return e}return t.dirty|r}return t.dirty}function oh(e,t,n,o,r,i){if(r){const a=th(t,n,o,i);e.p(a,r)}}function rh(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function ih(e,t){const n={};t=new Set(t);for(const o in e)t.has(o)||"$"===o[0]||(n[o]=e[o]);return n}function ah(e){return e&&Xf(e.destroy)?e.destroy:Jf}function sh(e,t){e.appendChild(t)}function ch(e,t,n){const o=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!o.getElementById(t)){const e=dh("style");e.id=t,e.textContent=n,function(e,t){sh(e.head||e,t),t.sheet}(o,e)}}function lh(e,t,n){e.insertBefore(t,n||null)}function uh(e){e.parentNode&&e.parentNode.removeChild(e)}function dh(e){return document.createElement(e)}function ph(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function mh(e){return document.createTextNode(e)}function fh(){return mh(" ")}function hh(){return mh("")}function gh(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function vh(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function bh(e){let t;return{p(...n){t=n,t.forEach(t=>e.push(t))},r(){t.forEach(t=>e.splice(e.indexOf(t),1))}}}function $h(e){return""===e?null:+e}function yh(e,t){t=""+t,e.data!==t&&(e.data=t)}function _h(e,t){e.value=null==t?"":t}function kh(e,t,n,o){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function xh(e,t,n){e.classList[n?"add":"remove"](t)}class wh{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=ph(t.nodeName):this.e=dh(11===t.nodeType?"TEMPLATE":t.nodeName),this.t="TEMPLATE"!==t.tagName?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)lh(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(uh)}}function Ih(e,t){return new e(t)}let Ch;function Sh(e){Ch=e}function Eh(){if(!Ch)throw new Error("Function called outside component initialization");return Ch}function zh(e){Eh().$$.on_mount.push(e)}const Th=[],Dh=[];let Oh=[];const Uh=[],Rh=Promise.resolve();let Ah=!1;function Nh(e){Oh.push(e)}function jh(e){Uh.push(e)}const Ph=new Set;let Mh=0;function Zh(){if(0!==Mh)return;const e=Ch;do{try{for(;Mh<Th.length;){const e=Th[Mh];Mh++,Sh(e),qh(e.$$)}}catch(e){throw Th.length=0,Mh=0,e}for(Sh(null),Th.length=0,Mh=0;Dh.length;)Dh.pop()();for(let e=0;e<Oh.length;e+=1){const t=Oh[e];Ph.has(t)||(Ph.add(t),t())}Oh.length=0}while(Th.length);for(;Uh.length;)Uh.pop()();Ah=!1,Ph.clear(),Sh(e)}function qh(e){if(null!==e.fragment){e.update(),Kf(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Nh)}}const Lh=new Set;let Fh;function Vh(){Fh={r:0,c:[],p:Fh}}function Hh(){Fh.r||Kf(Fh.c),Fh=Fh.p}function Jh(e,t){e&&e.i&&(Lh.delete(e),e.i(t))}function Gh(e,t,n,o){if(e&&e.o){if(Lh.has(e))return;Lh.add(e),Fh.c.push(()=>{Lh.delete(e),o&&(n&&e.d(1),o())}),e.o(t)}else o&&o()}function Bh(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function Wh(e){e&&e.c()}function Kh(e,t,n,o){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),o||Nh(()=>{const t=e.$$.on_mount.map(Bf).filter(Xf);e.$$.on_destroy?e.$$.on_destroy.push(...t):Kf(t),e.$$.on_mount=[]}),i.forEach(Nh)}function Xh(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];Oh.forEach(o=>-1===e.indexOf(o)?t.push(o):n.push(o)),n.forEach(e=>e()),Oh=t}(n.after_update),Kf(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Qh(e,t){-1===e.$$.dirty[0]&&(Th.push(e),Ah||(Ah=!0,Rh.then(Zh)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Yh(e,t,n,o,r,i,a,s=[-1]){const c=Ch;Sh(e);const l=e.$$={fragment:null,ctx:[],props:i,update:Jf,not_equal:r,bound:Wf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:Wf(),dirty:s,skip_bound:!1,root:t.target||c.$$.root};a&&a(l.root);let u=!1;if(l.ctx=n?n(e,t.props||{},(t,n,...o)=>{const i=o.length?o[0]:n;return l.ctx&&r(l.ctx[t],l.ctx[t]=i)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](i),u&&Qh(e,t)),n}):[],l.update(),u=!0,Kf(l.before_update),l.fragment=!!o&&o(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(uh)}else l.fragment&&l.fragment.c();t.intro&&Jh(e.$$.fragment),Kh(e,t.target,t.anchor,t.customElement),Zh()}Sh(c)}class eg{$destroy(){Xh(this,1),this.$destroy=Jf}$on(e,t){if(!Xf(t))return Jf;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const tg=[];function ng(e,t=Jf){let n;const o=new Set;function r(t){if(Qf(e,t)&&(e=t,n)){const t=!tg.length;for(const t of o)t[1](),tg.push(t,e);if(t){for(let e=0;e<tg.length;e+=2)tg[e][0](tg[e+1]);tg.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(i,a=Jf){const s=[i,a];return o.add(s),1===o.size&&(n=t(r)||Jf),i(e),()=>{o.delete(s),0===o.size&&n&&(n(),n=null)}}}}const og={message:!1,updateModelContext:!1,openLinks:!1};class rg extends Error{constructor(e="Update cancelled"){super(e),this.name="HandoffCancelledError"}}function ig(e){const t=e.getHostCapabilities();return{message:null!=t?.message,updateModelContext:null!=t?.updateModelContext,openLinks:null!=t?.openLinks}}function ag(e){return e.message}function sg(e,t){return`I refined this contract in the Wizard UI beyond the initial MCP tool result. Here is the current generated source.\n\n\`\`\`${e}\n${t.trimEnd()}\n\`\`\``}async function cg(e){if(!navigator.clipboard?.writeText)throw new Error("Clipboard is not available in this host.");await navigator.clipboard.writeText(e)}const lg="mcp-external-links";function ug(e){ch(e,"svelte-h4n0sq",".mcp-shell.svelte-h4n0sq{height:var(--mcp-app-height);min-height:var(--mcp-app-height);background-color:var(--gray-1);box-sizing:border-box;font-size:12px;--text-small:0.75rem;--size-1:0.2rem;--size-2:0.35rem;--size-3:0.55rem;--size-4:0.7rem}.mcp-shell.svelte-h4n0sq .controls{padding:var(--size-3)}.mcp-shell.svelte-h4n0sq pre code.hljs{font-size:0.7rem;line-height:1.35}.footer.svelte-h4n0sq{display:flex;flex-direction:column;gap:0.35rem}.drift-notice.svelte-h4n0sq{padding:0.4rem 0.55rem;border:1px solid var(--gray-3);border-radius:8px;background:color-mix(in srgb, var(--gray-2) 65%, transparent)}.drift-text.svelte-h4n0sq{margin:0;font-size:0.75rem;line-height:1.4;color:var(--gray-5);text-align:left}.actions.svelte-h4n0sq{display:flex;justify-content:flex-end;align-items:center;gap:0.75rem}.actions.drifted.svelte-h4n0sq{justify-content:space-between}.restore-link.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--gray-4);font:inherit;font-size:0.75rem;text-decoration:underline;cursor:pointer}.restore-link.svelte-h4n0sq:hover{color:var(--gray-5)}.restore-confirm.svelte-h4n0sq{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.35rem 0.5rem;font-size:0.75rem;color:var(--gray-5)}.restore-confirm-btn.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--solidity-blue-2);font:inherit;font-size:0.75rem;font-weight:600;text-decoration:underline;cursor:pointer}.restore-confirm-btn.cancel.svelte-h4n0sq{color:var(--gray-4);font-weight:500}.use-button.svelte-h4n0sq{padding:0.45rem 0.9rem;border-radius:16px;border:1px solid var(--gray-3);background-color:var(--solidity-blue-2);color:white;font-weight:600;font-size:0.75rem;cursor:pointer}.use-button.drifted.svelte-h4n0sq:not(.disabled):not(:disabled){box-shadow:0 0 0 2px color-mix(in srgb, var(--solidity-blue-2) 35%, transparent)}.use-button.disabled.svelte-h4n0sq,.use-button.svelte-h4n0sq:disabled{opacity:0.5;cursor:not-allowed}.status.svelte-h4n0sq{margin:0;max-width:100%;font-size:0.75rem;text-align:right}.status.hint.svelte-h4n0sq{color:var(--gray-4)}.status.error.svelte-h4n0sq{color:var(--red-3)}.no-select.svelte-h4n0sq{-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box{font-size:12px;line-height:1.35}.tippy-box .tippy-content{padding:0.35rem 0.5rem}html.mcp-no-open-links .tippy-box a[href]{display:none}")}function dg(e,t,n){const o=e.slice();return o[35]=t[n],o}const pg=e=>({}),mg=e=>({});function fg(e){let t,n,o,r,i=e[2],a=[];for(let t=0;t<i.length;t+=1)a[t]=hg(dg(e,i,t));return{c(){t=dh("div"),n=dh("p"),n.textContent="Fix these options to generate your contract:",o=fh(),r=dh("ul");for(let e=0;e<a.length;e+=1)a[e].c();vh(t,"role","alert"),vh(t,"class","p-2 overflow-auto shrink-0"),kh(t,"color","var(--red-3)")},m(e,i){lh(e,t,i),sh(t,n),sh(t,o),sh(t,r);for(let e=0;e<a.length;e+=1)a[e]&&a[e].m(r,null)},p(e,t){if(4&t[0]){let n;for(i=e[2],n=0;n<i.length;n+=1){const o=dg(e,i,n);a[n]?a[n].p(o,t):(a[n]=hg(o),a[n].c(),a[n].m(r,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=i.length}},d(e){e&&uh(t),function(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}(a,e)}}}function hg(e){let t,n,o=e[35]+"";return{c(){t=dh("li"),n=mh(o)},m(e,o){lh(e,t,o),sh(t,n)},p(e,t){4&t[0]&&o!==(o=e[35]+"")&&yh(n,o)},d(e){e&&uh(t)}}}function gg(e){let t;return{c(){t=dh("div"),t.innerHTML='<p class="drift-text svelte-h4n0sq">Preview differs from the original tool run. The agent's reply from that run still matches the original\n settings. Send updates to the agent for it to see the new code.</p>',vh(t,"class","drift-notice svelte-h4n0sq")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function vg(e){let t;function n(e,t){return e[12]?$g:bg}let o=n(e),r=o(e);return{c(){r.c(),t=hh()},m(e,n){r.m(e,n),lh(e,t,n)},p(e,i){o===(o=n(e))&&r?r.p(e,i):(r.d(1),r=o(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&uh(t)}}}function bg(e){let t,n,o;return{c(){t=dh("button"),t.textContent="Restore original",vh(t,"type","button"),vh(t,"class","restore-link svelte-h4n0sq")},m(r,i){lh(r,t,i),n||(o=gh(t,"click",e[28]),n=!0)},p:Jf,d(e){e&&uh(t),n=!1,o()}}}function $g(e){let t,n,o,r,i,a,s;return{c(){t=dh("span"),n=mh("Restore original settings?\n "),o=dh("button"),o.textContent="Confirm",r=fh(),i=dh("button"),i.textContent="Cancel",vh(o,"type","button"),vh(o,"class","restore-confirm-btn svelte-h4n0sq"),vh(i,"type","button"),vh(i,"class","restore-confirm-btn cancel svelte-h4n0sq"),vh(t,"class","restore-confirm svelte-h4n0sq")},m(c,l){lh(c,t,l),sh(t,n),sh(t,o),sh(t,r),sh(t,i),a||(s=[gh(o,"click",e[26]),gh(i,"click",e[27])],a=!0)},p:Jf,d(e){e&&uh(t),a=!1,Kf(s)}}}function yg(e){let t;return{c(){t=mh("Send Updates to Agent")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&uh(t)}}}function _g(e){let t;return{c(){t=mh("Copy to Clipboard")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&uh(t)}}}function kg(e){let t;return{c(){t=mh(e[9])},m(e,n){lh(e,t,n)},p(e,n){512&n[0]&&yh(t,e[9])},d(e){e&&uh(t)}}}function xg(e){let t,n=e[14]?"Copying…":"Sending…";return{c(){t=mh(n)},m(e,n){lh(e,t,n)},p(e,o){16384&o[0]&&n!==(n=e[14]?"Copying…":"Sending…")&&yh(t,n)},d(e){e&&uh(t)}}}function wg(e){let t;return{c(){t=mh("Connecting…")},m(e,n){lh(e,t,n)},p:Jf,d(e){e&&uh(t)}}}function Ig(e){let t,n;return{c(){t=dh("p"),n=mh(e[11]),vh(t,"class","status hint svelte-h4n0sq")},m(e,o){lh(e,t,o),sh(t,n)},p(e,t){2048&t[0]&&yh(n,e[11])},d(e){e&&uh(t)}}}function Cg(e){let t,n;return{c(){t=dh("p"),n=mh(e[10]),vh(t,"class","status error svelte-h4n0sq")},m(e,o){lh(e,t,o),sh(t,n)},p(e,t){1024&t[0]&&yh(n,e[10])},d(e){e&&uh(t)}}}function Sg(e){let t,n,o;return{c(){t=dh("p"),n=mh("Could not connect to host: "),o=mh(e[5]),vh(t,"class","status error svelte-h4n0sq")},m(e,r){lh(e,t,r),sh(t,n),sh(t,o)},p(e,t){32&t[0]&&yh(o,e[5])},d(e){e&&uh(t)}}}function Eg(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k;const x=e[24].controls,w=eh(x,e,e[23],mg);let I=e[1]&&fg(e),C=e[6]&&gg(),S=e[6]&&e[7]&&vg(e);function E(e,t){return e[4]||e[5]?e[8]?xg:e[9]?kg:e[14]?_g:yg:wg}let z=E(e),T=z(e);function D(e,t){return e[5]?Sg:e[10]?Cg:e[11]?Ig:void 0}let O=D(e),U=O&&O(e);return{c(){t=dh("div"),n=dh("div"),o=dh("div"),w&&w.c(),r=fh(),i=dh("div"),I&&I.c(),a=fh(),s=dh("pre"),c=mh(" "),l=dh("code"),d=mh("\n "),p=fh(),m=dh("div"),C&&C.c(),f=fh(),h=dh("div"),S&&S.c(),g=fh(),v=dh("button"),T.c(),$=fh(),U&&U.c(),vh(o,"class","controls min-w-[14rem] w-60 max-w-[42%] flex flex-col shrink-0 overflow-auto border-r border-[var(--gray-3)]"),vh(l,"class",u="hljs "+e[3]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"),vh(s,"class","flex flex-col grow basis-0 overflow-auto m-0"),vh(i,"class","output flex flex-col grow min-w-0 overflow-hidden"),vh(n,"class","flex flex-row grow min-h-0 overflow-hidden rounded-xl border border-[var(--gray-3)]"),vh(v,"class","use-button svelte-h4n0sq"),v.disabled=e[15],vh(v,"title",b=e[14]?"Copy to Clipboard":void 0),xh(v,"disabled",e[15]),xh(v,"drifted",e[6]),vh(h,"class","actions svelte-h4n0sq"),xh(h,"drifted",e[6]),vh(m,"class","footer shrink-0 svelte-h4n0sq"),vh(t,"class","mcp-shell flex flex-col gap-2 p-2 min-h-0 svelte-h4n0sq")},m(u,b){lh(u,t,b),sh(t,n),sh(n,o),w&&w.m(o,null),e[25](o),sh(n,r),sh(n,i),I&&I.m(i,null),sh(i,a),sh(i,s),sh(s,c),sh(s,l),l.innerHTML=e[0],sh(s,d),sh(t,p),sh(t,m),C&&C.m(m,null),sh(m,f),sh(m,h),S&&S.m(h,null),sh(h,g),sh(h,v),T.m(v,null),sh(m,$),U&&U.m(m,null),y=!0,_||(k=[gh(s,"click",e[17]),gh(v,"click",e[16])],_=!0)},p(e,t){w&&w.p&&(!y||8388608&t[0])&&oh(w,x,e,e[23],y?nh(x,e[23],t,pg):rh(e[23]),mg),e[1]?I?I.p(e,t):(I=fg(e),I.c(),I.m(i,a)):I&&(I.d(1),I=null),(!y||1&t[0])&&(l.innerHTML=e[0]),(!y||10&t[0]&&u!==(u="hljs "+e[3]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"))&&vh(l,"class",u),e[6]?C||(C=gg(),C.c(),C.m(m,f)):C&&(C.d(1),C=null),e[6]&&e[7]?S?S.p(e,t):(S=vg(e),S.c(),S.m(h,g)):S&&(S.d(1),S=null),z===(z=E(e))&&T?T.p(e,t):(T.d(1),T=z(e),T&&(T.c(),T.m(v,null))),(!y||32768&t[0])&&(v.disabled=e[15]),(!y||16384&t[0]&&b!==(b=e[14]?"Copy to Clipboard":void 0))&&vh(v,"title",b),(!y||32768&t[0])&&xh(v,"disabled",e[15]),(!y||64&t[0])&&xh(v,"drifted",e[6]),(!y||64&t[0])&&xh(h,"drifted",e[6]),O===(O=D(e))&&U?U.p(e,t):(U&&U.d(1),U=O&&O(e),U&&(U.c(),U.m(m,null)))},i(e){y||(Jh(w,e),y=!0)},o(e){Gh(w,e),y=!1},d(n){n&&uh(t),w&&w.d(n),e[25](null),I&&I.d(),C&&C.d(),S&&S.d(),T.d(),U&&U.d(),_=!1,Kf(k)}}}function zg(e,t,n){let o,r,i,a,s,c,l,{$$slots:u={},$$scope:d}=t,{highlightedCode:p}=t,{hasErrors:m=!1}=t,{errorMessages:f=[]}=t,{highlightClass:h="-solidity"}=t,{code:g=""}=t,{fence:v}=t,{hostConnected:b=!1}=t,{hostConnectError:$}=t,{hostSendCaps:y=og}=t,{mcpApp:_}=t,{drifted:k=!1}=t,{onRestoreOriginal:x}=t,w=!1,I=!1;const C=ng({canOpen:!1});var S,E;function z(e){l&&clearTimeout(l),n(9,a=e),l=setTimeout(()=>{n(9,a=void 0),l=void 0},1e3)}function T(e,t){return n=>{const o=n.target,r=o instanceof Element?o.closest(e)?.getAttribute("href"):void 0;r&&!r.startsWith("#")&&(n.preventDefault(),n.stopPropagation(),y.openLinks&&async function(e,t){if((await e.openLink({url:t})).isError)throw new Error("Host denied opening the link.")}(_,r).catch(e=>console.warn(`[mcp-apps] ${t} openLink failed`,e)))}}S=lg,E=C,Eh().$$.context.set(S,E);const D=T("a[href]","code preview"),O=T("a[href]","controls");let U;const R=T(".tippy-box a[href]","tippy");zh(()=>(document.addEventListener("click",R,!0),U.addEventListener("click",O),()=>{document.removeEventListener("click",R,!0),U.removeEventListener("click",O)}));return e.$$set=e=>{"highlightedCode"in e&&n(0,p=e.highlightedCode),"hasErrors"in e&&n(1,m=e.hasErrors),"errorMessages"in e&&n(2,f=e.errorMessages),"highlightClass"in e&&n(3,h=e.highlightClass),"code"in e&&n(18,g=e.code),"fence"in e&&n(19,v=e.fence),"hostConnected"in e&&n(4,b=e.hostConnected),"hostConnectError"in e&&n(5,$=e.hostConnectError),"hostSendCaps"in e&&n(20,y=e.hostSendCaps),"mcpApp"in e&&n(21,_=e.mcpApp),"drifted"in e&&n(6,k=e.drifted),"onRestoreOriginal"in e&&n(7,x=e.onRestoreOriginal),"$$scope"in e&&n(23,d=e.$$scope)},e.$$.update=()=>{64&e.$$.dirty[0]&&(k||n(12,I=!1)),1048576&e.$$.dirty[0]&&C.set({canOpen:y.openLinks}),1048576&e.$$.dirty[0]&&document.documentElement.classList.toggle("mcp-no-open-links",!y.openLinks),1048576&e.$$.dirty[0]&&n(22,o=ag(y)),4194320&e.$$.dirty[0]&&n(14,r=b&&!o),262962&e.$$.dirty[0]&&n(15,i=m||w||!g||!b||!!$||!!a)},[p,m,f,h,b,$,k,x,w,a,s,c,I,U,r,i,async function(){if(!i){n(10,s=void 0),n(11,c=void 0),n(8,w=!0);try{if(r)return await cg(g),void z("Copied");await async function(e,t,n){const o=ig(e);if(!ag(o))throw new Error("This host does not support sending the contract to the agent.");if(o.updateModelContext)try{await e.updateModelContext({content:[{type:"text",text:t}]})}catch(e){console.warn("[mcp-apps] updateModelContext failed",e)}if((await e.sendMessage({role:"user",content:[{type:"text",text:sg(n,t)}]})).isError)throw new rg}(_,g,v),z("Sent")}catch(e){if(e instanceof rg)return void n(11,c=e.message);console.error("[mcp-apps] Send Updates to Agent failed",e),n(10,s=e instanceof Error?e.message:String(e));try{await cg(g),z("Copied")}catch{}}finally{n(8,w=!1)}}},D,g,v,y,_,o,d,u,function(e){Dh[e?"unshift":"push"](()=>{U=e,n(13,U)})},()=>{n(12,I=!1),x()},()=>n(12,I=!1),()=>n(12,I=!0)]}class Tg extends eg{constructor(e){super(),Yh(this,e,zg,Eg,Qf,{highlightedCode:0,hasErrors:1,errorMessages:2,highlightClass:3,code:18,fence:19,hostConnected:4,hostConnectError:5,hostSendCaps:20,mcpApp:21,drifted:6,onRestoreOriginal:7},ug,[-1,-1])}}function Dg(e){return structuredClone(e)}function Og(e){let t,n,o,r;const i=[{errors:e[7]},e[1].controlProps?.(e[2],e[6])??{}];function a(t){e[16](t)}var s=e[1].controls[e[2]];function c(e){let t={};for(let e=0;e<i.length;e+=1)t=Gf(t,i[e]);return void 0!==e[6]&&(t.opts=e[6]),{props:t}}return s&&(t=Ih(s,c(e)),Dh.push(()=>Bh(t,"opts",a))),{c(){t&&Wh(t.$$.fragment),o=hh()},m(e,n){t&&Kh(t,e,n),lh(e,o,n),r=!0},p(e,r){const l=198&r?function(e,t){const n={},o={},r={$$scope:1};let i=e.length;for(;i--;){const a=e[i],s=t[i];if(s){for(const e in a)e in s||(o[e]=1);for(const e in s)r[e]||(n[e]=s[e],r[e]=1);e[i]=s}else for(const e in a)r[e]=1}for(const e in o)e in n||(n[e]=void 0);return n}(i,[128&r&&{errors:e[7]},70&r&&(u=e[1].controlProps?.(e[2],e[6])??{},"object"==typeof u&&null!==u?u:{})]):{};var u;if(!n&&64&r&&(n=!0,l.opts=e[6],jh(()=>n=!1)),6&r&&s!==(s=e[1].controls[e[2]])){if(t){Vh();const e=t;Gh(e.$$.fragment,1,0,()=>{Xh(e,1)}),Hh()}s?(t=Ih(s,c(e)),Dh.push(()=>Bh(t,"opts",a)),Wh(t.$$.fragment),Jh(t.$$.fragment,1),Kh(t,o.parentNode,o)):t=null}else s&&t.$set(l)},i(e){r||(t&&Jh(t.$$.fragment,e),r=!0)},o(e){t&&Gh(t.$$.fragment,e),r=!1},d(e){e&&uh(o),t&&Xh(t,e)}}}function Ug(e){let t,n;return t=new Tg({props:{highlightedCode:e[12],hasErrors:e[8],errorMessages:e[11],code:e[9],highlightClass:e[1].highlightClass,fence:e[1].fence,hostConnected:e[3],hostConnectError:e[4],hostSendCaps:e[5],mcpApp:e[0],drifted:e[10],onRestoreOriginal:e[13],$$slots:{controls:[Og]},$$scope:{ctx:e}}}),{c(){Wh(t.$$.fragment)},m(e,o){Kh(t,e,o),n=!0},p(e,[n]){const o={};4096&n&&(o.highlightedCode=e[12]),256&n&&(o.hasErrors=e[8]),2048&n&&(o.errorMessages=e[11]),512&n&&(o.code=e[9]),2&n&&(o.highlightClass=e[1].highlightClass),2&n&&(o.fence=e[1].fence),8&n&&(o.hostConnected=e[3]),16&n&&(o.hostConnectError=e[4]),32&n&&(o.hostSendCaps=e[5]),1&n&&(o.mcpApp=e[0]),1024&n&&(o.drifted=e[10]),1048774&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Jh(t.$$.fragment,e),n=!0)},o(e){Gh(t.$$.fragment,e),n=!1},d(e){Xh(t,e)}}}function Rg(e){return e.info??(e.info={}),e}function Ag(e,t,n){let o,r,i,a,s,c,l,u,d,{adapter:p}=t,{kind:m}=t,{mcpApp:f}=t,{hostConnected:h=!1}=t,{hostConnectError:g}=t,{hostSendCaps:v=og}=t,b=p.emptyContract();function $(e){try{return p.print(p.build(e))}catch{return}}function y(e,t){if(!e)return;const o=function(e,t,n){return void 0===e||"result"===n&&!t}(u,s,t),r=Rg({...c??{},...e,kind:m});if(n(6,c=r),!o)return;const i=function(e,t,n){const o=n(e);if(void 0!==o)return{opts:Dg(e),code:o,supersedesOpts:!1};const r=n(t);return void 0!==r?{opts:Dg(t),code:r,supersedesOpts:!0}:void 0}(r,{...e,kind:m},$);void 0!==i&&(l=i.opts,n(14,u=i.code),i.supersedesOpts&&n(6,c=Rg(Dg(i.opts))))}return f.ontoolinput=e=>{y(e.arguments,"input")},f.ontoolresult=e=>{const t=e.structuredContent;t?.opts&&y(t.opts,"result")},e.$$set=e=>{"adapter"in e&&n(1,p=e.adapter),"kind"in e&&n(2,m=e.kind),"mcpApp"in e&&n(0,f=e.mcpApp),"hostConnected"in e&&n(3,h=e.hostConnected),"hostConnectError"in e&&n(4,g=e.hostConnectError),"hostSendCaps"in e&&n(5,v=e.hostSendCaps)},e.$$.update=()=>{if(66&e.$$.dirty&&c)try{n(15,b=p.build(c)),n(7,d=void 0)}catch(e){const t=e instanceof Error?e.message:String(e);n(7,d=p.optionsErrors(e)??{_:t||"Failed to build contract"})}32770&e.$$.dirty&&n(9,o=p.print(b)),546&e.$$.dirty&&n(12,r=v.openLinks?p.injectHyperlinks(p.highlight(o)):p.highlight(o)),128&e.$$.dirty&&n(11,i=Object.values(d??{}).filter(e=>void 0!==e)),128&e.$$.dirty&&n(8,a=void 0!==d),17152&e.$$.dirty&&n(10,s=function(e){const{originalCode:t,code:n,hasErrors:o}=e;return void 0!==t&&(o||n!==t)}({originalCode:u,code:o,hasErrors:a}))},[f,p,m,h,g,v,c,d,a,o,s,i,r,function(){null!=l&&n(6,c=Rg(Dg(l)))},u,b,function(e){c=e,n(6,c)}]}class Ng extends eg{constructor(e){super(),Yh(this,e,Ag,Ug,Qf,{adapter:1,kind:2,mcpApp:0,hostConnected:3,hostConnectError:4,hostSendCaps:5})}}const jg=560;class Pg extends Error{constructor(e){super("Invalid options"),this.messages=e}}const Mg=/^(?!$)\d+$/;function Zg(e){return Mg.test(e)}function qg(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]+/g,"").replace(/(\\|")/g,(e,t)=>"\\"+t)}function Lg(e,t){const n=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]+/g,"").replace(/(\\|')/g,(e,t)=>"\\"+t);if(n.length>31)throw new Pg({[t]:"String is longer than 31 characters"});return n}function Fg(e){if(e<=0)throw new Error(`Number of bits must be positive (actual '${e}').`);if(e%8!=0)throw new Error(`The number of bits must be a multiple of 8 (actual '${e}').`);return BigInt("0x"+"ff".repeat(e/8))}const Vg={u8:Fg(8),u16:Fg(16),u32:Fg(32),u64:Fg(64),u128:Fg(128),u256:Fg(256)};function Hg(e,t,n){const o=e.toString();if(!/^\d+$/.test(o))throw new Pg({[t]:"Not a valid number"});const r=BigInt(o);if(r>Vg[n])throw new Pg({[t]:`Value is greater than ${n} max value`});return r}function Jg(e,t,n){Hg(e,t,n)}class Gg{constructor(e,t,n=!1){this.license="MIT",this.upgradeable=!1,this.documentations=[],this.constructorArgs=[],this.constructorCode=[],this.componentsMap=new Map,this.implementedTraitsMap=new Map,this.superVariablesMap=new Map,this.constantsMap=new Map,this.useClausesMap=new Map,this.interfaceFlagsSet=new Set,this.storageMembersMap=new Map,this.name=function(e,t=!1){const n=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/^[^a-zA-Z_]+/,"").replace(/^(.)/,e=>t?e.toUpperCase():e).replace(/[^\w]+(.?)/g,(e,t)=>t.toUpperCase());if(0===n.length)throw new Pg({name:"Identifier is empty or does not have valid characters"});return n}(e,!0),this.macros=t,this.account=n}get components(){return[...this.componentsMap.values()]}get implementedTraits(){return[...this.implementedTraitsMap.values()]}get superVariables(){return[...this.superVariablesMap.values()]}get constants(){return[...this.constantsMap.values()]}get useClauses(){return[...this.useClausesMap.values()]}get storageMembers(){return[...this.storageMembersMap.values()]}addStorageMember(e){const t=this.storageMembersMap.get(e.name);if(void 0!==t){if(t.type!==e.type)throw new Error(`Tried to add duplicate storage member ${e.name} with different type: ${e.type} instead of ${t.type}.`);return!1}return this.storageMembersMap.set(e.name,e),!0}get interfaceFlags(){return this.interfaceFlagsSet}addUseClause(e,t,n){const o=n?.groupable??!0,r=n?.alias??"",i=r.length>0?r:t;this.useClausesMap.has(i)||this.useClausesMap.set(i,{containerPath:e,name:t,groupable:o,alias:r})}addComponent(e,t=[],n=!0){this.macros.withComponents||this.addUseClause(e.path,e.name);const o=e.name,r=this.componentsMap.has(o);if(!r){const r={initializer:n?{params:t}:void 0,...e,impls:[...e.impls]};this.componentsMap.set(o,r)}return!r}addImplToComponent(e,t){this.addComponent(e);const n=this.componentsMap.get(e.name);if(null==n)throw new Error(`Component ${e.name} has not been added yet`);n.impls.some(e=>e.name===t.name)||n.impls.push(t)}addConstant(e){return!this.constantsMap.has(e.name)&&(this.constantsMap.set(e.name,e),!0)}addSuperVariable(e){return!this.superVariablesMap.has(e.name)&&(this.superVariablesMap.set(e.name,e),this.addUseClause("super",e.name),!0)}addImplementedTrait(e){const t=e.name,n=this.implementedTraitsMap.get(t);if(void 0!==n)return n;{const n={name:e.name,of:e.of,tags:[...e.tags],superVariables:[],functions:[],section:e.section,priority:e.priority};return this.implementedTraitsMap.set(t,n),n}}addSuperVariableToTrait(e,t){const n=this.addImplementedTrait(e);for(const e of n.superVariables)if(e.name===t.name){if(e.type!==t.type)throw new Error(`Tried to add duplicate super var ${t.name} with different type: ${t.type} instead of ${e.type}.`);if(e.value!==t.value)throw new Error(`Tried to add duplicate super var ${t.name} with different value: ${t.value} instead of ${e.value}.`);return!1}return n.superVariables.push(t),!0}addFunction(e,t){const n=this.addImplementedTrait(e),o=this.getFunctionSignature(t);for(let e=0;e<n.functions.length;e++){const t=n.functions[e];if(void 0!==t&&this.getFunctionSignature(t)===o)return t}const r={...t,codeBefore:[],tag:e.perItemTag};return n.functions.push(r),r}getFunctionSignature(e){return[e.name,"(",...e.args.map(e=>e.name),")"].join("")}addFunctionCodeBefore(e,t,n){this.addImplementedTrait(e);const o=this.addFunction(e,t);o.codeBefore=[...o.codeBefore??[],n]}addConstructorArgument(e){for(const t of this.constructorArgs)if(t.name==e.name)return;this.constructorArgs.push(e)}addConstructorCode(e){this.constructorCode.push(e)}addInterfaceFlag(e){this.interfaceFlagsSet.add(e)}addDocumentation(e){this.documentations.push(e)}}function Bg(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:e},t)]))}const Wg=Bg({SRC5Component:{path:"openzeppelin_introspection::src5",substorage:{name:"src5",type:"SRC5Component::Storage"},event:{name:"SRC5Event",type:"SRC5Component::Event"},impls:[]},VotesComponent:{path:"openzeppelin_governance::votes",substorage:{name:"votes",type:"VotesComponent::Storage"},event:{name:"VotesEvent",type:"VotesComponent::Event"},impls:[{name:"VotesInternalImpl",embed:!1,value:"VotesComponent::InternalImpl<ContractState>"}]},NoncesComponent:{path:"openzeppelin_utils::cryptography::nonces",substorage:{name:"nonces",type:"NoncesComponent::Storage"},event:{name:"NoncesEvent",type:"NoncesComponent::Event"},impls:[{name:"NoncesImpl",embed:!0,value:"NoncesComponent::NoncesImpl<ContractState>"}]}});function Kg(e,t){e.addComponent(Wg.SRC5Component,[],!1),e.interfaceFlags.has("ISRC5")||(e.addImplToComponent(Wg.SRC5Component,{name:"SRC5Impl",embed:!0,value:"SRC5Component::SRC5Impl<ContractState>",section:t}),e.addInterfaceFlag("ISRC5"))}function Xg(e,t,n,o){Qg(e,t,n,o),e.addComponent(Wg.NoncesComponent,[],!1),e.addComponent(Wg.VotesComponent,[],!1),e.addImplToComponent(Wg.VotesComponent,{name:"VotesImpl",embed:!0,value:"VotesComponent::VotesImpl<ContractState>"}),e.addUseClause("openzeppelin_utils::contract_clock","ERC6372TimestampClock")}function Qg(e,t,n,o){e.addUseClause("openzeppelin_utils::cryptography::snip12","SNIP12Metadata");const r={name:"SNIP12MetadataImpl",of:"SNIP12Metadata",tags:[],priority:0,section:o};e.addImplementedTrait(r),e.addFunction(r,{name:"name",args:[],returns:"felt252",code:[`'${t}'`]}),e.addFunction(r,{name:"version",args:[],returns:"felt252",code:[`'${n}'`]})}const Yg=new RegExp(`^(\\d+(?:\\.\\d+)?) +(${["second","minute","hour","day","week","month","year"].join("|")})s?$`),ev=86400,tv={second:1,minute:60,hour:3600,day:ev,week:604800,month:2592e3,year:31536e3};function nv(e){const t=e.trim().match(Yg);if(!t||t.length<2)throw new Error("Bad duration format");const n=parseFloat(t[1]),o=t[2],r=n*tv[o];return Math.round(r)}const ov={darInitialDelay:"1 day",darDefaultDelayIncrease:"5 days",darMaxTransferDelay:"30 days"},rv=()=>({type:!1,...ov}),iv=()=>({type:"ownable",...ov}),av="ownable",sv=BigInt(432e3),cv=BigInt(2592e3);function lv(e,t){switch(t.type){case!1:break;case"ownable":e.addComponent(dv.OwnableComponent,[{lit:"owner"}],!0),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"owner",type:"ContractAddress"});break;case"roles":e.addComponent(dv.AccessControlComponent,[],!0)&&(e.interfaceFlags.has("ISRC5")?(e.addImplToComponent(dv.AccessControlComponent,{name:"AccessControlImpl",embed:!0,value:"AccessControlComponent::AccessControlImpl<ContractState>"}),e.addImplToComponent(dv.AccessControlComponent,{name:"AccessControlCamelImpl",embed:!0,value:"AccessControlComponent::AccessControlCamelImpl<ContractState>"}),e.addImplToComponent(dv.AccessControlComponent,{name:"AccessControlWithDelayImpl",embed:!0,value:"AccessControlComponent::AccessControlWithDelayImpl<ContractState>"})):(e.addImplToComponent(dv.AccessControlComponent,{name:"AccessControlMixinImpl",embed:!0,value:"AccessControlComponent::AccessControlMixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5")),Kg(e),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"default_admin",type:"ContractAddress"}),e.addUseClause("openzeppelin_access::accesscontrol","DEFAULT_ADMIN_ROLE"),e.addConstructorCode("self.access_control._grant_role(DEFAULT_ADMIN_ROLE, default_admin)"));break;case"roles-dar":{const n=[{lit:"INITIAL_DELAY"},{lit:"initial_default_admin"}];if(e.addComponent(dv.AccessControlDefaultAdminRulesComponent,n,!0)){e.interfaceFlags.has("ISRC5")?(e.addImplToComponent(dv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlImpl<ContractState>"}),e.addImplToComponent(dv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlDefaultAdminRulesImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlDefaultAdminRulesImpl<ContractState>"}),e.addImplToComponent(dv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlCamelImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlCamelImpl<ContractState>"}),e.addImplToComponent(dv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlWithDelayImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlWithDelayImpl<ContractState>"})):(e.addImplToComponent(dv.AccessControlDefaultAdminRulesComponent,{name:"AccessControlMixinImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlMixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5")),Kg(e);const n=Hg(function(e){try{return nv(e.darInitialDelay)}catch(e){throw e instanceof Error?new Pg({darInitialDelay:e.message}):e}}(t),"darInitialDelay","u64");e.addConstant({name:"INITIAL_DELAY",type:"u64",value:n.toString(),comment:t.darInitialDelay,inlineComment:!0});const o=Hg(function(e){try{return nv(e.darDefaultDelayIncrease)}catch(e){throw e instanceof Error?new Pg({darDefaultDelayIncrease:e.message}):e}}(t),"darDefaultDelayIncrease","u64"),r=Hg(function(e){try{return nv(e.darMaxTransferDelay)}catch(e){throw e instanceof Error?new Pg({darMaxTransferDelay:e.message}):e}}(t),"darMaxTransferDelay","u64");if(o===sv&&r===cv)e.addUseClause("openzeppelin_access::accesscontrol::extensions","DefaultConfig",{alias:"AccessControlDefaultAdminRulesDefaultConfig"});else{const n={name:"AccessControlDefaultAdminRulesImmutableConfig",of:"AccessControlDefaultAdminRulesComponent::ImmutableConfig",tags:[]};e.addImplementedTrait(n),e.addSuperVariableToTrait(n,{name:"DEFAULT_ADMIN_DELAY_INCREASE_WAIT",type:"u64",value:o.toString(),comment:t.darDefaultDelayIncrease,inlineComment:!0}),e.addSuperVariableToTrait(n,{name:"MAXIMUM_DEFAULT_ADMIN_TRANSFER_DELAY",type:"u64",value:r.toString(),comment:t.darMaxTransferDelay,inlineComment:!0})}e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"initial_default_admin",type:"ContractAddress"})}break}default:throw t.type,new Error("Unknown access type")}}function uv(e,t,n,o,r,i){const a={...o};switch(!1===a.type&&(a.type=av),lv(e,a),a.type){case"ownable":e.addFunctionCodeBefore(t,n,"self.ownable.assert_only_owner()");break;case"roles":case"roles-dar":{const o=r+"_ROLE",s=e.addSuperVariable({name:o,type:"felt252",value:`selector!("${o}")`}),c="roles-dar"===a.type?dv.AccessControlDefaultAdminRulesComponent.substorage.name:dv.AccessControlComponent.substorage.name;void 0!==i&&(e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:i,type:"ContractAddress"}),s&&e.addConstructorCode(`self.${c}._grant_role(${o}, ${i})`)),e.addFunctionCodeBefore(t,n,`self.${c}.assert_only_role(${o})`);break}default:throw a.type,new Error("Unknown access type")}}const dv=Bg({OwnableComponent:{path:"openzeppelin_access::ownable",substorage:{name:"ownable",type:"OwnableComponent::Storage"},event:{name:"OwnableEvent",type:"OwnableComponent::Event"},impls:[{name:"OwnableMixinImpl",embed:!0,value:"OwnableComponent::OwnableMixinImpl<ContractState>"},{name:"OwnableInternalImpl",embed:!1,value:"OwnableComponent::InternalImpl<ContractState>"}]},AccessControlComponent:{path:"openzeppelin_access::accesscontrol",substorage:{name:"access_control",type:"AccessControlComponent::Storage"},event:{name:"AccessControlEvent",type:"AccessControlComponent::Event"},impls:[{name:"AccessControlInternalImpl",embed:!1,value:"AccessControlComponent::InternalImpl<ContractState>"}]},AccessControlDefaultAdminRulesComponent:{path:"openzeppelin_access::accesscontrol::extensions",substorage:{name:"access_control_dar",type:"AccessControlDefaultAdminRulesComponent::Storage"},event:{name:"AccessControlDefaultAdminRulesEvent",type:"AccessControlDefaultAdminRulesComponent::Event"},impls:[{name:"AccessControlDefaultAdminRulesInternalImpl",embed:!1,value:"AccessControlDefaultAdminRulesComponent::InternalImpl<ContractState>"}]}}),pv=/[\n\r\u2028\u2029]/u;function mv(e,t){if(pv.test(e))throw new Pg({[t]:"Must not contain line breaks"})}const fv={license:"MIT"};function hv(e,t){const{securityContact:n,license:o}=t;n&&(mv(n,"securityContact"),e.addDocumentation(`Security contact: ${n}`)),o&&(mv(o,"license"),e.license=o)}const gv={withComponents:!1},vv={upgradeable:!0,info:fv,macros:gv},bv={...vv,access:rv()};function $v(e){return{upgradeable:e.upgradeable??vv.upgradeable,info:e.info??vv.info,macros:e.macros??vv.macros}}function yv(e){return{...$v(e),access:e.access??bv.access}}function _v(e="external"){return"view"===e?{name:"self",type:"@ContractState"}:{name:"ref self",type:"ContractState"}}function kv(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:e},t)]))}const xv={name:"ExternalImpl",of:"ExternalTrait",tags:["generate_trait","abi(per_item)"],perItemTag:"external(v0)"};function wv(e,t){e.addComponent(Iv.PausableComponent,[],!1),e.addFunction(xv,Cv.pause),e.addFunction(xv,Cv.unpause),uv(e,xv,Cv.pause,t,"PAUSER","pauser"),uv(e,xv,Cv.unpause,t,"PAUSER","pauser")}const Iv=Bg({PausableComponent:{path:"openzeppelin_security::pausable",substorage:{name:"pausable",type:"PausableComponent::Storage"},event:{name:"PausableEvent",type:"PausableComponent::Event"},impls:[{name:"PausableImpl",embed:!0,value:"PausableComponent::PausableImpl<ContractState>"},{name:"PausableInternalImpl",embed:!1,value:"PausableComponent::InternalImpl<ContractState>"}]}}),Cv=kv({pause:{args:[_v()],code:["self.pausable.pause()"]},unpause:{args:[_v()],code:["self.pausable.unpause()"]}});function Sv(e,t){if(!1===t)return;e.upgradeable=!0,e.addComponent(zv.UpgradeableComponent,[],!1),e.addUseClause("openzeppelin_interfaces::upgrades","IUpgradeable"),e.addUseClause("starknet","ClassHash");const n={name:"UpgradeableImpl",of:"IUpgradeable<ContractState>",section:"Upgradeable",tags:["abi(embed_v0)"]};return e.addImplementedTrait(n),n}function Ev(e,t,n){const o=Sv(e,t);void 0!==o&&uv(e,o,Tv.upgrade,n,"UPGRADER","upgrader")}const zv=Bg({UpgradeableComponent:{path:"openzeppelin_upgrades",substorage:{name:"upgradeable",type:"UpgradeableComponent::Storage"},event:{name:"UpgradeableEvent",type:"UpgradeableComponent::Event"},impls:[{name:"UpgradeableInternalImpl",embed:!1,value:"UpgradeableComponent::InternalImpl<ContractState>"}]}}),Tv=kv({upgrade:{args:[_v(),{name:"new_class_hash",type:"ClassHash"}],code:["self.upgradeable.upgrade(new_class_hash)"]}}),Dv=Symbol("whitespace");function*Ov(e,t){for(const n of t)n===Dv?yield"":Array.isArray(n)?yield*Ov(e+1,n):yield" ".repeat(e)+n}function Uv(...e){return e.filter(e=>e.length>0).flatMap(e=>[Dv,...e]).slice(1)}const Rv="1. with no section",Av="Standalone Imports";function Nv(e){if(!e.macros.withComponents||0===e.components.length)return[];return[`#[with_components(${e.components.map(e=>e.name).map(e=>{const t=e.indexOf("Component");if(-1===t)throw new Error(`Component name "${e}" must contain "Component" substring`);return e.substring(0,t)}).join(", ")})]`]}function jv(e){const t=e.account?"#[starknet::contract(account)]":"#[starknet::contract]";return function(...e){return[...Ov(0,e)].join("\n")+"\n"}(...Uv([`// SPDX-License-Identifier: ${e.license}`,"// Compatible with OpenZeppelin Contracts for Cairo ^4.0.1"],function(e){return Pv(e.superVariables.map(e=>`const ${e.name}: ${e.type} = ${e.value}`))}(e),[...(n=e.documentations,n.map(e=>`// ${e}`)),`${t}`,...Nv(e),`mod ${e.name} {`,Uv(Mv(e),Lv(e.constants),Fv(e),Vv(e),Hv(e),Jv(e),Bv(e),Gv(e)),"}"]));var n}function Pv(e){return e.map(e=>e.endsWith(";")?e:e+";")}function Mv(e){const t=function(e){return e.useClauses.sort((e,t)=>{const n=`${e.containerPath}::${Zv(e)}`,o=`${t.containerPath}::${Zv(t)}`;return n.localeCompare(o)})}(e),n=t.reduce((e,t)=>(t.groupable?(e[t.containerPath]=e[t.containerPath]||[]).push(t):(e[Av]=e[Av]||[]).push(t),e),{});return Object.entries(n).flatMap(([e,t])=>function(e,t){const n=[];if(t===Av)for(const t of e)n.push(`use ${t.containerPath}::${Zv(t)};`);else if(1==e.length)n.push(`use ${t}::${Zv(e[0])};`);else if(e.length>1){const o=e.map(e=>Zv(e)).join(", ");n.push(`use ${t}::{${o}};`)}return n}(t,e)).flatMap(e=>function(e){const t=[],n=-1!==e.indexOf("{");n&&e.length>90?(t.push(e.slice(0,e.indexOf("{")+1)),t.push(...qv(e.slice(e.indexOf("{")+1,-2))),t.push("};")):t.push(e);return t}(e.toString()))}function Zv(e){return e.alias?`${e.name} as ${e.alias}`:e.name}function qv(e){const t=[];if(e.length>90){const n=e.slice(0,90),o=n.lastIndexOf(",");-1!==o?(t.push("\t"+n.slice(0,o+1)),t.push(...qv(e.slice(o+2)))):t.push("\t"+n)}else t.push("\t"+e);return t}function Lv(e){const t=[];for(const n of e){const e=n.inlineComment??!1,o=!!n.comment;o&&!e?(t.push(`// ${n.comment}`),t.push(`const ${n.name}: ${n.type} = ${n.value};`)):o?t.push(`const ${n.name}: ${n.type} = ${n.value}; // ${n.comment}`):t.push(`const ${n.name}: ${n.type} = ${n.value};`)}return t}function Fv(e){return e.macros.withComponents?[]:e.components.map(e=>`component!(path: ${e.name}, storage: ${e.substorage.name}, event: ${e.event.name});`)}function Vv(e){const t=e.macros.withComponents,n=e.components.flatMap(e=>t?e.impls.filter(e=>e.embed):e.impls),o=n.reduce((e,t)=>{const n=t.embed??!0,o=t.section??(n?"External":"Internal");return(e[o]=e[o]||[]).push(t),e},{}),r=Object.entries(o).sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>function(e,t){const n=[];return n.push(`// ${e}`),t.map(e=>n.push(...function(e){const t=[];(e.embed??1)&&t.push("#[abi(embed_v0)]");return t.push(`impl ${e.name} = ${e.value};`),t}(e))),n}(e,t));return Uv(...r)}function Hv(e){const t=e.storageMembers.map(e=>`${e.name}: ${e.type},`);if(e.macros.withComponents||0===e.components.length)return 0===t.length?["#[storage]","struct Storage {}"]:["#[storage]","struct Storage {",t,"}"];const n=[...t];for(const t of e.components)n.push("#[substorage(v0)]"),n.push(`${t.substorage.name}: ${t.substorage.type},`);return["#[storage]","struct Storage {",n,"}"]}function Jv(e){if(e.macros.withComponents||0===e.components.length)return[];const t=[];for(const n of e.components)t.push("#[flat]"),t.push(`${n.event.name}: ${n.event.type},`);return["#[event]","#[derive(Drop, starknet::Event)]","enum Event {",t,"}"]}function Gv(e){const t=e.implementedTraits.sort((e,t)=>e.priority!==t.priority?(e.priority??1/0)-(t.priority??1/0):e.tags.length!==t.tags.length?e.tags.length-t.tags.length:e.name.localeCompare(t.name)),n=t.reduce((e,t)=>{const n=t.section??Rv;return(e[n]=e[n]||[]).push(t),e},{}),o=Object.entries(n).sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>function(e,t){const n=[],o=e===Rv;o||(n.push("//"),n.push(`// ${e}`),n.push("//"));return t.forEach((e,t)=>{(t>0||!o)&&n.push(""),n.push(...function(e){const t=[];t.push(...e.tags.map(e=>`#[${e}]`)),t.push(`impl ${e.name} of ${e.of} {`);const n=Lv(e.superVariables);t.push(n);const o=e.functions.map(e=>function(e){const t=`fn ${e.name}`,n=e.args.map(e=>Qv(e)),o=e.codeBefore?.concat(e.code)??e.code;for(let t=0;t<o.length;t++){const n=o[t],r=t<o.length-1||void 0===e.returns;void 0!==n&&n.length>0&&(r&&!["{","}",";"].includes(n.charAt(n.length-1))?o[t]+=";":!r&&n.endsWith(";")&&(o[t]=n.slice(0,n.length-1)))}return Xv(t,n,e.tag,e.returns,void 0,o)}(e));return t.push(Uv(...o)),t.push("}"),t}(e))}),n}(e,t));return Uv(...o)}function Bv(e){const t=e.components.some(e=>void 0!==e.initializer),n=e.constructorCode.length>0;if(t||n){const t=e.components.filter(Wv).flatMap(e=>function({substorage:e,initializer:t}){if(void 0===t||void 0===e?.name)return[];return[`self.${e.name}.initializer(`+t.params.map(Kv).join(", ")+")"]}(e)),n="constructor",o="fn constructor",r=[_v(),...e.constructorArgs],i=Uv(Pv(t),Pv(e.constructorCode));return Xv(o,r.map(e=>Qv(e)),n,void 0,void 0,i)}return[]}function Wv(e){return void 0!==e.initializer&&void 0!==e.substorage?.name}function Kv(e){if("object"==typeof e){if("lit"in e)return e.lit;if("note"in e)return`${Kv(e.value)}`;throw Error("Unknown value type")}if("number"==typeof e){if(Number.isSafeInteger(e))return e.toFixed(0);throw new Error(`Number not representable (${e})`)}return"bigint"==typeof e?`${e}`:`"${e}"`}function Xv(e,t,n,o,r,i){const a=[];void 0!==n&&a.push(`#[${n}]`);let s=`${e}(`;if(t.length>0){const e=t.join(", ");e.length>80?(a.push(s),s="",a.push(t.map(e=>`${e},`))):s+=`${e}`}return s+=")",s+=void 0===o?" {":` -> ${o} {`,a.push(s),a.push(i),a.push("}"),a}function Qv(e){if(void 0!==e.type){const t=e.type;return`${e.name}: ${t}`}return`${e.name}`}const Yv=BigInt(18),eb={enabled:!1,maxAmount:"max",feeMode:"percent",feePercent:"0",feeDestination:"burn"},tb={name:"MyToken",symbol:"MTK",decimals:Yv.toString(),burnable:!1,pausable:!1,premint:"0",mintable:!1,wrapper:!1,votes:!1,appName:"",appVersion:"v1",flashmint:eb,access:bv.access,upgradeable:bv.upgradeable,info:bv.info,macros:bv.macros};function nb(e){const t=function(e){return{...e,...yv(e),decimals:e.decimals??tb.decimals,burnable:e.burnable??tb.burnable,pausable:e.pausable??tb.pausable,premint:e.premint||tb.premint,mintable:e.mintable??tb.mintable,wrapper:e.wrapper??tb.wrapper,votes:e.votes??tb.votes,appName:e.appName??tb.appName,appVersion:e.appVersion??tb.appVersion,flashmint:e.flashmint??tb.flashmint}}(e),n=new Gg(t.name,t.macros),o=Hg(t.decimals,"decimals","u8");return function(e,t,n,o){if(e.addComponent(ib.ERC20Component,[t,n],!0),o===Yv)e.addUseClause("openzeppelin_token::erc20","DefaultConfig",{alias:"ERC20DefaultConfig"});else{const t={name:"ERC20ImmutableConfig",of:"ERC20Component::ImmutableConfig",tags:[]};e.addImplementedTrait(t),e.addSuperVariableToTrait(t,{name:"DECIMALS",type:"u8",value:o.toString()})}}(n,qg(t.name),qg(t.symbol),o),function(e){e.addImplToComponent(ib.ERC20Component,{name:"ERC20MixinImpl",embed:!0,value:"ERC20Component::ERC20MixinImpl<ContractState>"})}(n),t.premint&&function(e,t,n){if(void 0!==t&&"0"!==t){if(!ob.test(t))throw new Pg({premint:"Not a valid number"});const o=Hg(rb(t,Number(n)),"premint","u256");e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"recipient",type:"ContractAddress"}),e.addConstructorCode(`self.erc20.mint(recipient, ${o})`)}}(n,t.premint,o),t.pausable&&wv(n,t.access),t.burnable&&function(e){e.addUseClause("starknet","get_caller_address"),e.addFunction(xv,ab.burn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),uv(e,xv,ab.mint,t,"MINTER","minter")}(n,t.access),t.wrapper&&function(e){e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"underlying",type:"ContractAddress"}),e.addComponent(ib.ERC20WrapperComponent,[{lit:"underlying"}],!0)}(n),t.flashmint.enabled&&function(e,t,n){e.addComponent(ib.ERC20FlashMintComponent,[],!1);const o=function(e,t){if("max"===e)return null;if(""===e||!ob.test(e))throw new Pg({flashMintMaxAmount:'Must be "max" or a non-negative number'});return Hg(rb(e,Number(t)),"flashMintMaxAmount","u256")}(t.maxAmount,n),r=null!==o,i="fee_receiver"===t.feeDestination,a=function(e){switch(e.feeMode){case"percent":{const t=function(e){if(""===e)return null;if(!ob.test(e))throw new Pg({flashMintFeePercent:"Must be a number between 0 and 100"});const[t="",n=""]=e.split("."),o=n.length,r=(t+n).replace(/^0+/,"");if(""===r)return null;const i=BigInt(r),a=10n**BigInt(o);if(i>100n*a)throw new Pg({flashMintFeePercent:"Must be a number between 0 and 100"});const s=100n*a;return Hg(s.toString(),"flashMintFeePercent","u256"),{numerator:i,denominator:s}}(e.feePercent);return null===t?null:[`amount * ${t.numerator} / ${t.denominator}`]}case"custom":return["// TODO: Must be implemented according to the desired flash fee logic","0"];default:{const t=e.feeMode;throw new Error(`Unknown flashMintFeeMode: ${t}`)}}}(t),s=null!==a;if(!r&&!s&&!i)return void e.addUseClause("openzeppelin_token::erc20::extensions::erc20_flash_mint","DefaultConfig",{alias:"ERC20FlashMintDefaultConfig"});const c={name:"FlashMintConfigImpl",of:"ERC20FlashMintComponent::FlashMintConfigTrait<ContractState>",tags:[]};e.addImplementedTrait(c),(r||s||i)&&e.addUseClause("starknet","ContractAddress");if(r){e.addUseClause("starknet","get_contract_address"),e.addUseClause("core::num::traits","Bounded");e.addFunction(c,{name:"max_flash_loan",args:[{name:"self",type:"@ERC20FlashMintComponent::ComponentState<ContractState>"},{name:"token",type:"ContractAddress"},{name:"total_supply",type:"u256"}],returns:"u256",code:[]}).code.push("if token != get_contract_address() {"," return 0;","}","let headroom = Bounded::<u256>::MAX - total_supply;",`let cap: u256 = ${o};`,"if cap < headroom { cap } else { headroom }")}if(s){e.addFunction(c,{name:"flash_fee",args:[{name:"self",type:"@ERC20FlashMintComponent::ComponentState<ContractState>"},{name:"token",type:"ContractAddress"},{name:"amount",type:"u256"}],returns:"u256",code:[]}).code.push(...a)}if(i){e.addUseClause("core::num::traits","Zero"),e.addUseClause("starknet::storage","StoragePointerReadAccess"),e.addUseClause("starknet::storage","StoragePointerWriteAccess"),e.addStorageMember({name:"flash_fee_receiver",type:"ContractAddress"}),e.addConstructorArgument({name:"flash_fee_receiver",type:"ContractAddress"}),e.addConstructorCode("assert(!flash_fee_receiver.is_zero(), 'FlashMint: invalid receiver')"),e.addConstructorCode("self.flash_fee_receiver.write(flash_fee_receiver)");e.addFunction(c,{name:"flash_fee_receiver",args:[{name:"self",type:"@ERC20FlashMintComponent::ComponentState<ContractState>"}],returns:"ContractAddress",code:[]}).code.push("self.get_contract().flash_fee_receiver.read()")}}(n,t.flashmint,o),function(e,t){const n=t.pausable||t.votes;if(n){const n={name:"ERC20HooksImpl",of:"ERC20Component::ERC20HooksTrait<ContractState>",tags:[],priority:1};if(e.addImplementedTrait(n),t.pausable){e.addUseClause("starknet","ContractAddress");e.addFunction(n,{name:"before_update",args:[{name:"ref self",type:"ERC20Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:[]}).code.push("let contract_state = self.get_contract();","contract_state.pausable.assert_not_paused();")}if(t.votes){if(!t.appName)throw new Pg({appName:"Application Name is required when Votes are enabled"});if(!t.appVersion)throw new Pg({appVersion:"Application Version is required when Votes are enabled"});Xg(e,Lg(t.appName,"appName"),Lg(t.appVersion,"appVersion"),"SNIP12 Metadata"),e.addUseClause("starknet","ContractAddress");e.addFunction(n,{name:"after_update",args:[{name:"ref self",type:"ERC20Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:[]}).code.push("let mut contract_state = self.get_contract_mut();","contract_state.votes.transfer_voting_units(from, recipient, amount);")}}else e.addUseClause("openzeppelin_token::erc20","ERC20HooksEmptyImpl")}(n,t),lv(n,t.access),Ev(n,t.upgradeable,t.access),hv(n,t.info),n}const ob=/^\d*(?:\.\d*)?$/;function rb(e,t){let n;const o=e.split(".");if(o.length>2)throw new Pg({premint:"Not a valid number"});{const e=o[0]??"";let r=o[1]??"";if(t>r.length)try{r+="0".repeat(t-r.length)}catch{throw new Pg({premint:"Decimals number too large"})}else if(t<r.length)throw new Pg({premint:"Too many decimals"});n=e.concat(r).replace(/^0+/,"")}return 0===n.length&&(n="0"),n}const ib=Bg({ERC20Component:{path:"openzeppelin_token::erc20",substorage:{name:"erc20",type:"ERC20Component::Storage"},event:{name:"ERC20Event",type:"ERC20Component::Event"},impls:[{name:"ERC20InternalImpl",embed:!1,value:"ERC20Component::InternalImpl<ContractState>"}]},ERC20WrapperComponent:{path:"openzeppelin_token::erc20::extensions::erc20_wrapper",substorage:{name:"erc20_wrapper",type:"ERC20WrapperComponent::Storage"},event:{name:"ERC20WrapperEvent",type:"ERC20WrapperComponent::Event"},impls:[{name:"ERC20WrapperImpl",embed:!0,value:"ERC20WrapperComponent::ERC20WrapperImpl<ContractState>"},{name:"ERC20WrapperInternalImpl",embed:!1,value:"ERC20WrapperComponent::InternalImpl<ContractState>"}]},ERC20FlashMintComponent:{path:"openzeppelin_token::erc20::extensions::erc20_flash_mint",substorage:{name:"erc20_flash_mint",type:"ERC20FlashMintComponent::Storage"},event:{name:"ERC20FlashMintEvent",type:"ERC20FlashMintComponent::Event"},impls:[{name:"ERC20FlashMintImpl",embed:!0,value:"ERC20FlashMintComponent::ERC20FlashMintImpl<ContractState>"}]}}),ab=kv({burn:{args:[_v(),{name:"value",type:"u256"}],code:["self.erc20.burn(get_caller_address(), value);"]},mint:{args:[_v(),{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:["self.erc20.mint(recipient, amount);"]}}),sb=BigInt(1e4),cb={enabled:!1,defaultRoyaltyFraction:"0",feeDenominator:sb.toString()};function lb(e,t,n){if(!t.enabled)return;const o={...n};!1===o.type&&(o.type=av),lv(e,o);const{defaultRoyaltyFraction:r,feeDenominator:i}=function(e){const t=Hg(e.feeDenominator,"feeDenominator","u128");if(t===BigInt(0))throw new Pg({feeDenominator:"Must be greater than 0"});const n=Hg(e.defaultRoyaltyFraction,"defaultRoyaltyFraction","u128");if(n>t)throw new Pg({defaultRoyaltyFraction:"Cannot be greater than fee denominator"});return{defaultRoyaltyFraction:n,feeDenominator:t}}(t),a=[{lit:"default_royalty_receiver"},r];switch(e.addComponent(ub.ERC2981Component,a,!0),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"default_royalty_receiver",type:"ContractAddress"}),o.type){case"ownable":e.addImplToComponent(ub.ERC2981Component,{name:"ERC2981AdminOwnableImpl",embed:!0,value:"ERC2981Component::ERC2981AdminOwnableImpl<ContractState>"});break;case"roles":e.addImplToComponent(ub.ERC2981Component,{name:"ERC2981AdminAccessControlImpl",embed:!0,value:"ERC2981Component::ERC2981AdminAccessControlImpl<ContractState>"}),e.addConstructorArgument({name:"royalty_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control._grant_role(ERC2981Component::ROYALTY_ADMIN_ROLE, royalty_admin)");break;case"roles-dar":e.addImplToComponent(ub.ERC2981Component,{name:"ERC2981AdminAccessControlDefaultAdminRulesImpl",embed:!0,value:"ERC2981Component::ERC2981AdminAccessControlDefaultAdminRulesImpl<ContractState>"}),e.addConstructorArgument({name:"royalty_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control_dar._grant_role(ERC2981Component::ROYALTY_ADMIN_ROLE, royalty_admin)");break;default:throw o.type,new Error("Unknown access type")}if(i===sb)e.addUseClause("openzeppelin_token::common::erc2981","DefaultConfig",{alias:"ERC2981DefaultConfig"});else{const t={name:"ERC2981ImmutableConfig",of:"ERC2981Component::ImmutableConfig",tags:[]};e.addImplementedTrait(t),e.addSuperVariableToTrait(t,{name:"FEE_DENOMINATOR",type:"u128",value:i.toString()})}}sb.toString();const ub=Bg({ERC2981Component:{path:"openzeppelin_token::common::erc2981",substorage:{name:"erc2981",type:"ERC2981Component::Storage"},event:{name:"ERC2981Event",type:"ERC2981Component::Event"},impls:[{name:"ERC2981Impl",embed:!0,value:"ERC2981Component::ERC2981Impl<ContractState>"},{name:"ERC2981InfoImpl",embed:!0,value:"ERC2981Component::ERC2981InfoImpl<ContractState>"},{name:"ERC2981InternalImpl",embed:!1,value:"ERC2981Component::InternalImpl<ContractState>"}]}}),db={name:"MyToken",symbol:"MTK",baseUri:"",burnable:!1,pausable:!1,mintable:!1,enumerable:!1,wrapper:!1,uriStorage:!1,votes:!1,consecutive:!1,royaltyInfo:cb,appName:"",appVersion:"v1",access:bv.access,upgradeable:bv.upgradeable,info:bv.info,macros:bv.macros};function pb(e){const t=function(e){return{...e,...yv(e),baseUri:e.baseUri??db.baseUri,burnable:e.burnable??db.burnable,pausable:e.pausable??db.pausable,mintable:e.mintable??db.mintable,enumerable:e.enumerable??db.enumerable,wrapper:e.wrapper??db.wrapper,uriStorage:e.uriStorage??db.uriStorage,royaltyInfo:e.royaltyInfo??db.royaltyInfo,votes:e.votes??db.votes,consecutive:e.consecutive??db.consecutive,appName:e.appName??db.appName,appVersion:e.appVersion??db.appVersion}}(e);if(t.consecutive&&t.enumerable)throw new Pg({consecutive:"Consecutive cannot be combined with Enumerable: batch mints bypass the update hook that Enumerable relies on to track ownership."});const n=new Gg(t.name,t.macros);return function(e,t,n,o){e.addComponent(mb.ERC721Component,[t,n,o],!0)}(n,qg(t.name),qg(t.symbol),qg(t.baseUri)),function(e){e.addImplToComponent(mb.ERC721Component,{name:"ERC721MixinImpl",embed:!0,value:"ERC721Component::ERC721MixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5"),Kg(e)}(n),t.consecutive||n.addUseClause("openzeppelin_token::erc721","ERC721OwnerOfDefaultImpl"),t.pausable&&wv(n,t.access),t.burnable&&function(e){e.addUseClause("core::num::traits","Zero"),e.addUseClause("starknet","get_caller_address"),e.addFunction(xv,fb.burn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),uv(e,xv,fb.safe_mint,t,"MINTER","minter"),e.addFunction(xv,fb.safeMint)}(n,t.access),t.enumerable&&function(e){e.addComponent(mb.ERC721EnumerableComponent,[],!0)}(n),t.consecutive&&function(e){e.addUseClause("openzeppelin_token::erc721::extensions::erc721_consecutive","DefaultConfig"),e.addComponent(mb.ERC721ConsecutiveComponent,[],!1)}(n),t.wrapper&&function(e){e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"underlying",type:"ContractAddress"}),e.addComponent(mb.ERC721WrapperComponent,[{lit:"underlying"}],!0)}(n),t.uriStorage?(!function(e,t){e.addUseClause("starknet","ContractAddress"),uv(e,xv,fb.set_token_uri,t,"URI_SETTER","uri_setter"),e.addComponent(mb.ERC721URIStorageComponent,[],!1)}(n,t.access),n.addUseClause("openzeppelin_token::erc721::extensions::ERC721URIStorageComponent","ERC721TokenURIStorageImpl")):n.addUseClause("openzeppelin_token::erc721","ERC721TokenURIDefaultImpl"),lv(n,t.access),Ev(n,t.upgradeable,t.access),hv(n,t.info),lb(n,t.royaltyInfo,t.access),function(e,t){const n=t.pausable||t.enumerable||t.votes||t.consecutive,o=t.uriStorage||t.consecutive;if(n||o){const r={name:"ERC721HooksImpl",of:"ERC721Component::ERC721HooksTrait<ContractState>",tags:[],priority:0};e.addImplementedTrait(r),e.addUseClause("starknet","ContractAddress"),n&&function(e,t,n){if(!(n.pausable||n.enumerable||n.votes||n.consecutive))return;const o=n.enumerable||n.votes||n.consecutive,r=[o?"let mut contract_state = self.get_contract_mut()":"let contract_state = self.get_contract()"];n.pausable&&r.push("contract_state.pausable.assert_not_paused()");n.enumerable&&r.push("contract_state.erc721_enumerable.before_update(to, token_id)");if(n.votes){if(!n.appName)throw new Pg({appName:"Application Name is required when Votes are enabled"});if(!n.appVersion)throw new Pg({appVersion:"Application Version is required when Votes are enabled"});Xg(e,Lg(n.appName,"appName"),Lg(n.appVersion,"appVersion"),"SNIP12 Metadata"),r.push("let previous_owner = self._owner_of(token_id);"),r.push("contract_state.votes.transfer_voting_units(previous_owner, to, 1);")}n.consecutive&&r.push("contract_state.erc721_consecutive.before_update(to, token_id, auth)");e.addFunction(t,{name:"before_update",args:[{name:"ref self",type:"ERC721Component::ComponentState<ContractState>"},{name:"to",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"auth",type:"ContractAddress"}],code:r})}(e,r,t),o&&function(e,t,n){if(!n.uriStorage&&!n.consecutive)return;const o=["let mut contract_state = self.get_contract_mut()"];n.uriStorage&&o.push("contract_state.erc721_uri_storage.after_update(to, token_id, auth)");n.consecutive&&o.push("contract_state.erc721_consecutive.after_update(to, token_id, auth)");e.addFunction(t,{name:"after_update",args:[{name:"ref self",type:"ERC721Component::ComponentState<ContractState>"},{name:"to",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"auth",type:"ContractAddress"}],code:o})}(e,r,t)}else e.addUseClause("openzeppelin_token::erc721","ERC721HooksEmptyImpl")}(n,t),n}const mb=Bg({ERC721Component:{path:"openzeppelin_token::erc721",substorage:{name:"erc721",type:"ERC721Component::Storage"},event:{name:"ERC721Event",type:"ERC721Component::Event"},impls:[{name:"ERC721InternalImpl",embed:!1,value:"ERC721Component::InternalImpl<ContractState>"}]},ERC721WrapperComponent:{path:"openzeppelin_token::erc721::extensions::erc721_wrapper",substorage:{name:"erc721_wrapper",type:"ERC721WrapperComponent::Storage"},event:{name:"ERC721WrapperEvent",type:"ERC721WrapperComponent::Event"},impls:[{name:"ERC721WrapperImpl",embed:!0,value:"ERC721WrapperComponent::ERC721WrapperImpl<ContractState>"},{name:"ERC721WrapperReceiverImpl",embed:!0,value:"ERC721WrapperComponent::ERC721WrapperReceiverImpl<ContractState>"},{name:"ERC721WrapperInternalImpl",embed:!1,value:"ERC721WrapperComponent::InternalImpl<ContractState>"}]},ERC721EnumerableComponent:{path:"openzeppelin_token::erc721::extensions",substorage:{name:"erc721_enumerable",type:"ERC721EnumerableComponent::Storage"},event:{name:"ERC721EnumerableEvent",type:"ERC721EnumerableComponent::Event"},impls:[{name:"ERC721EnumerableImpl",embed:!0,value:"ERC721EnumerableComponent::ERC721EnumerableImpl<ContractState>"},{name:"ERC721EnumerableInternalImpl",embed:!1,value:"ERC721EnumerableComponent::InternalImpl<ContractState>"}]},ERC721URIStorageComponent:{path:"openzeppelin_token::erc721::extensions",substorage:{name:"erc721_uri_storage",type:"ERC721URIStorageComponent::Storage"},event:{name:"ERC721URIStorageEvent",type:"ERC721URIStorageComponent::Event"},impls:[{name:"ERC721URIStorageInternalImpl",embed:!1,value:"ERC721URIStorageComponent::InternalImpl<ContractState>"}]},ERC721ConsecutiveComponent:{path:"openzeppelin_token::erc721::extensions",substorage:{name:"erc721_consecutive",type:"ERC721ConsecutiveComponent::Storage"},event:{name:"ERC721ConsecutiveEvent",type:"ERC721ConsecutiveComponent::Event"},impls:[{name:"ERC721ConsecutiveInternalImpl",embed:!1,value:"ERC721ConsecutiveComponent::InternalImpl<ContractState>"}]}}),fb=kv({burn:{args:[_v(),{name:"token_id",type:"u256"}],code:["self.erc721.update(Zero::zero(), token_id, get_caller_address());"]},safe_mint:{args:[_v(),{name:"recipient",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.erc721.safe_mint(recipient, token_id, data);"]},safeMint:{args:[_v(),{name:"recipient",type:"ContractAddress"},{name:"tokenId",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.safe_mint(recipient, tokenId, data);"]},set_token_uri:{args:[_v(),{name:"token_id",type:"u256"},{name:"token_uri",type:"ByteArray"}],code:["self.erc721_uri_storage.set_token_uri(token_id, token_uri);"]}}),hb={name:"MyToken",baseUri:"",burnable:!1,pausable:!1,mintable:!1,supply:!1,uriStorage:!1,updatableUri:!0,royaltyInfo:cb,access:bv.access,upgradeable:bv.upgradeable,info:bv.info,macros:bv.macros};function gb(e){const t=function(e){return{...e,...yv(e),burnable:e.burnable??hb.burnable,pausable:e.pausable??hb.pausable,mintable:e.mintable??hb.mintable,supply:e.supply??hb.supply,uriStorage:e.uriStorage??hb.uriStorage,updatableUri:e.updatableUri??hb.updatableUri,royaltyInfo:e.royaltyInfo??hb.royaltyInfo}}(e),n=new Gg(t.name,t.macros);return function(e,t){e.addComponent(vb.ERC1155Component,[t],!0)}(n,qg(t.baseUri)),function(e){e.addImplToComponent(vb.ERC1155Component,{name:"ERC1155MixinImpl",embed:!0,value:"ERC1155Component::ERC1155MixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5"),Kg(e)}(n),t.pausable&&wv(n,t.access),t.burnable&&function(e){e.addUseClause("starknet","ContractAddress"),e.addUseClause("starknet","get_caller_address"),e.addFunction(xv,bb.burn),e.addFunction(xv,bb.batch_burn),e.addFunction(xv,bb.batchBurn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),uv(e,xv,bb.mint,t,"MINTER","minter"),uv(e,xv,bb.batch_mint,t,"MINTER","minter"),e.addFunction(xv,bb.batchMint)}(n,t.access),t.supply&&function(e){e.addComponent(vb.ERC1155SupplyComponent,[],!1)}(n),function(e,t){if(t.uriStorage)return e.addUseClause("starknet","ContractAddress"),uv(e,xv,$b.set_base_uri,t.access,"URI_SETTER","uri_setter"),void uv(e,xv,$b.set_token_uri,t.access,"URI_SETTER","uri_setter");if(t.updatableUri)e.addUseClause("starknet","ContractAddress"),uv(e,xv,bb.set_base_uri,t.access,"URI_SETTER","uri_setter"),e.addFunction(xv,bb.setBaseUri)}(n,t),t.uriStorage?(!function(e){e.addComponent(vb.ERC1155URIStorageComponent,[],!1)}(n),n.addUseClause("openzeppelin_token::erc1155::extensions::ERC1155URIStorageComponent","ERC1155URIStorageImpl")):n.addUseClause("openzeppelin_token::erc1155","ERC1155TokenURIDefaultImpl"),lv(n,t.access),Ev(n,t.upgradeable,t.access),hv(n,t.info),lb(n,t.royaltyInfo,t.access),function(e,t){const n=t.pausable||t.supply;if(n){const n={name:"ERC1155HooksImpl",of:"ERC1155Component::ERC1155HooksTrait<ContractState>",tags:[],priority:1};if(e.addImplementedTrait(n),e.addUseClause("starknet","ContractAddress"),t.pausable&&e.addFunction(n,{name:"before_update",args:[{name:"ref self",type:"ERC1155Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"to",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["let contract_state = self.get_contract()","contract_state.pausable.assert_not_paused()"]}),t.supply){e.addFunction(n,{name:"after_update",args:[{name:"ref self",type:"ERC1155Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"to",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:[]}).code.push("let mut contract_state = self.get_contract_mut();","contract_state.erc1155_supply.after_update(from, to, token_ids, values);")}}else e.addUseClause("openzeppelin_token::erc1155","ERC1155HooksEmptyImpl")}(n,t),n}const vb=Bg({ERC1155Component:{path:"openzeppelin_token::erc1155",substorage:{name:"erc1155",type:"ERC1155Component::Storage"},event:{name:"ERC1155Event",type:"ERC1155Component::Event"},impls:[{name:"ERC1155InternalImpl",embed:!1,value:"ERC1155Component::InternalImpl<ContractState>"}]},ERC1155SupplyComponent:{path:"openzeppelin_token::erc1155::extensions",substorage:{name:"erc1155_supply",type:"ERC1155SupplyComponent::Storage"},event:{name:"ERC1155SupplyEvent",type:"ERC1155SupplyComponent::Event"},impls:[{name:"ERC1155SupplyImpl",embed:!0,value:"ERC1155SupplyComponent::ERC1155SupplyImpl<ContractState>"},{name:"ERC1155SupplyInternalImpl",embed:!1,value:"ERC1155SupplyComponent::InternalImpl<ContractState>"}]},ERC1155URIStorageComponent:{path:"openzeppelin_token::erc1155::extensions",substorage:{name:"erc1155_uri_storage",type:"ERC1155URIStorageComponent::Storage"},event:{name:"ERC1155URIStorageEvent",type:"ERC1155URIStorageComponent::Event"},impls:[{name:"ERC1155URIStorageInternalImpl",embed:!1,value:"ERC1155URIStorageComponent::InternalImpl<ContractState>"}]}}),bb=kv({burn:{args:[_v(),{name:"account",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"value",type:"u256"}],code:["let caller = get_caller_address();","if account != caller {"," assert(self.erc1155.is_approved_for_all(account, caller), ERC1155Component::Errors::UNAUTHORIZED)","}","self.erc1155.burn(account, token_id, value);"]},batch_burn:{args:[_v(),{name:"account",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["let caller = get_caller_address();","if account != caller {"," assert(self.erc1155.is_approved_for_all(account, caller), ERC1155Component::Errors::UNAUTHORIZED)","}","self.erc1155.batch_burn(account, token_ids, values);"]},batchBurn:{args:[_v(),{name:"account",type:"ContractAddress"},{name:"tokenIds",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["self.batch_burn(account, tokenIds, values);"]},mint:{args:[_v(),{name:"account",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"value",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.erc1155.mint_with_acceptance_check(account, token_id, value, data);"]},batch_mint:{args:[_v(),{name:"account",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"},{name:"data",type:"Span<felt252>"}],code:["self.erc1155.batch_mint_with_acceptance_check(account, token_ids, values, data);"]},batchMint:{args:[_v(),{name:"account",type:"ContractAddress"},{name:"tokenIds",type:"Span<u256>"},{name:"values",type:"Span<u256>"},{name:"data",type:"Span<felt252>"}],code:["self.batch_mint(account, tokenIds, values, data);"]},set_base_uri:{args:[_v(),{name:"base_uri",type:"ByteArray"}],code:["self.erc1155._set_base_uri(base_uri);"]},setBaseUri:{args:[_v(),{name:"baseUri",type:"ByteArray"}],code:["self.set_base_uri(baseUri);"]}}),$b=kv({set_base_uri:{args:[_v(),{name:"base_uri",type:"ByteArray"}],code:["self.erc1155_uri_storage.set_base_uri(base_uri);"]},set_token_uri:{args:[_v(),{name:"token_id",type:"u256"},{name:"token_uri",type:"ByteArray"}],code:["self.erc1155_uri_storage.set_token_uri(token_id, token_uri);"]}}),yb={name:"MyToken",burnable:!1,pausable:!1,mintable:!1,contentUri:!1,tokenSupply:!1,metadata:!1,access:bv.access,upgradeable:bv.upgradeable,info:bv.info,macros:bv.macros};function _b(e){const t=function(e){return{...e,...yv(e),burnable:e.burnable??yb.burnable,pausable:e.pausable??yb.pausable,mintable:e.mintable??yb.mintable,contentUri:e.contentUri??yb.contentUri,tokenSupply:e.tokenSupply??yb.tokenSupply,metadata:e.metadata??yb.metadata}}(e),n=new Gg(t.name,t.macros);return function(e){e.addComponent(kb.ERC6909Component,[],!0)}(n),Kg(n),t.pausable&&wv(n,t.access),t.burnable&&function(e){e.addUseClause("starknet","ContractAddress"),e.addUseClause("starknet","get_caller_address"),e.addFunction(xv,xb.burn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),uv(e,xv,xb.mint,t,"MINTER","minter")}(n,t.access),t.contentUri&&function(e,t){const n={...t};!1===n.type&&(n.type=av);switch(lv(e,n),e.addComponent(kb.ERC6909ContentURIComponent,[],!0),n.type){case"ownable":e.addImplToComponent(kb.ERC6909ContentURIComponent,{name:"ERC6909ContentURIAdminOwnableImpl",embed:!0,value:"ERC6909ContentURIComponent::ERC6909ContentURIAdminOwnableImpl<ContractState>"});break;case"roles":e.addImplToComponent(kb.ERC6909ContentURIComponent,{name:"ERC6909ContentURIAdminAccessControlImpl",embed:!0,value:"ERC6909ContentURIComponent::ERC6909ContentURIAdminAccessControlImpl<ContractState>"}),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"content_uri_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control._grant_role(ERC6909ContentURIComponent::CONTENT_URI_ADMIN_ROLE, content_uri_admin)");break;case"roles-dar":e.addImplToComponent(kb.ERC6909ContentURIComponent,{name:"ERC6909ContentURIAdminAccessControlDefaultAdminRulesImpl",embed:!0,value:"ERC6909ContentURIComponent::ERC6909ContentURIAdminAccessControlDefaultAdminRulesImpl<ContractState>"}),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"content_uri_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control_dar._grant_role(ERC6909ContentURIComponent::CONTENT_URI_ADMIN_ROLE, content_uri_admin)");break;default:throw n.type,new Error("Unknown access type")}}(n,t.access),t.tokenSupply&&function(e){e.addComponent(kb.ERC6909TokenSupplyComponent,[],!0)}(n),t.metadata&&function(e,t){const n={...t};!1===n.type&&(n.type=av);switch(lv(e,n),e.addComponent(kb.ERC6909MetadataComponent,[],!0),n.type){case"ownable":e.addImplToComponent(kb.ERC6909MetadataComponent,{name:"ERC6909MetadataAdminOwnableImpl",embed:!0,value:"ERC6909MetadataComponent::ERC6909MetadataAdminOwnableImpl<ContractState>"});break;case"roles":e.addImplToComponent(kb.ERC6909MetadataComponent,{name:"ERC6909MetadataAdminAccessControlImpl",embed:!0,value:"ERC6909MetadataComponent::ERC6909MetadataAdminAccessControlImpl<ContractState>"}),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"metadata_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control._grant_role(ERC6909MetadataComponent::METADATA_ADMIN_ROLE, metadata_admin)");break;case"roles-dar":e.addImplToComponent(kb.ERC6909MetadataComponent,{name:"ERC6909MetadataAdminAccessControlDefaultAdminRulesImpl",embed:!0,value:"ERC6909MetadataComponent::ERC6909MetadataAdminAccessControlDefaultAdminRulesImpl<ContractState>"}),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"metadata_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control_dar._grant_role(ERC6909MetadataComponent::METADATA_ADMIN_ROLE, metadata_admin)");break;default:throw n.type,new Error("Unknown access type")}}(n,t.access),lv(n,t.access),Ev(n,t.upgradeable,t.access),hv(n,t.info),function(e,t){const n=t.pausable||t.tokenSupply;if(n){const n={name:"ERC6909HooksImpl",of:"ERC6909Component::ERC6909HooksTrait<ContractState>",tags:[],priority:1};e.addImplementedTrait(n),e.addUseClause("starknet","ContractAddress");const o=[],r=t.tokenSupply?"let mut contract_state = self.get_contract_mut();":"let contract_state = self.get_contract();";o.push(r),t.pausable&&o.push("contract_state.pausable.assert_not_paused();"),t.tokenSupply&&o.push("contract_state.erc6909_token_supply.update_token_supply(from, recipient, id, amount);"),e.addFunction(n,{name:"before_update",args:[{name:"ref self",type:"ERC6909Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"recipient",type:"ContractAddress"},{name:"id",type:"u256"},{name:"amount",type:"u256"}],code:o})}else e.addUseClause("openzeppelin_token::erc6909","ERC6909HooksEmptyImpl")}(n,t),n}const kb=Bg({ERC6909Component:{path:"openzeppelin_token::erc6909",substorage:{name:"erc6909",type:"ERC6909Component::Storage"},event:{name:"ERC6909Event",type:"ERC6909Component::Event"},impls:[{name:"ERC6909Impl",embed:!0,value:"ERC6909Component::ERC6909Impl<ContractState>"},{name:"ERC6909InternalImpl",embed:!1,value:"ERC6909Component::InternalImpl<ContractState>"}]},ERC6909ContentURIComponent:{path:"openzeppelin_token::erc6909::extensions",substorage:{name:"erc6909_content_uri",type:"ERC6909ContentURIComponent::Storage"},event:{name:"ERC6909ContentURIEvent",type:"ERC6909ContentURIComponent::Event"},impls:[{name:"ERC6909ContentURIImpl",embed:!0,value:"ERC6909ContentURIComponent::ERC6909ContentURIImpl<ContractState>"},{name:"ERC6909ContentURIInternalImpl",embed:!1,value:"ERC6909ContentURIComponent::InternalImpl<ContractState>"}]},ERC6909TokenSupplyComponent:{path:"openzeppelin_token::erc6909::extensions",substorage:{name:"erc6909_token_supply",type:"ERC6909TokenSupplyComponent::Storage"},event:{name:"ERC6909TokenSupplyEvent",type:"ERC6909TokenSupplyComponent::Event"},impls:[{name:"ERC6909TokenSupplyImpl",embed:!0,value:"ERC6909TokenSupplyComponent::ERC6909TokenSupplyImpl<ContractState>"},{name:"ERC6909TokenSupplyInternalImpl",embed:!1,value:"ERC6909TokenSupplyComponent::InternalImpl<ContractState>"}]},ERC6909MetadataComponent:{path:"openzeppelin_token::erc6909::extensions",substorage:{name:"erc6909_metadata",type:"ERC6909MetadataComponent::Storage"},event:{name:"ERC6909MetadataEvent",type:"ERC6909MetadataComponent::Event"},impls:[{name:"ERC6909MetadataImpl",embed:!0,value:"ERC6909MetadataComponent::ERC6909MetadataImpl<ContractState>"},{name:"ERC6909MetadataInternalImpl",embed:!1,value:"ERC6909MetadataComponent::InternalImpl<ContractState>"}]}}),xb=kv({burn:{args:[_v(),{name:"account",type:"ContractAddress"},{name:"id",type:"u256"},{name:"amount",type:"u256"}],code:["let caller = get_caller_address();","if account != caller {"," assert(self.erc6909.is_operator(account, caller), ERC6909Component::Errors::INSUFFICIENT_ALLOWANCE)","}","self.erc6909.burn(account, id, amount);"]},mint:{args:[_v(),{name:"account",type:"ContractAddress"},{name:"id",type:"u256"},{name:"amount",type:"u256"}],code:["self.erc6909.mint(account, id, amount);"]}}),wb={name:"MyContract",pausable:!1,access:bv.access,upgradeable:bv.upgradeable,info:bv.info,macros:bv.macros};function Ib(e){const t=function(e){return{...e,...yv(e),pausable:e.pausable??wb.pausable}}(e),n=new Gg(t.name,t.macros);return t.pausable&&wv(n,t.access),lv(n,t.access),Ev(n,t.upgradeable,t.access),hv(n,t.info),n}const Cb={name:"MyAccount",type:"stark",declare:!0,deploy:!0,pubkey:!0,outsideExecution:!0,upgradeable:vv.upgradeable,info:vv.info,macros:vv.macros};function Sb(e){const t=function(e){return{...e,...$v(e),declare:e.declare??Cb.declare,deploy:e.deploy??Cb.deploy,pubkey:e.pubkey??Cb.pubkey,outsideExecution:e.outsideExecution??Cb.outsideExecution}}(e),n=new Gg(t.name,t.macros,!0);switch(t.type){case"stark":n.addConstructorArgument({name:"public_key",type:"felt252"}),n.addComponent(zb.AccountComponent,[{lit:"public_key"}],!0);break;case"eth":n.addUseClause("openzeppelin_interfaces::accounts","EthPublicKey"),n.addConstructorArgument({name:"public_key",type:"EthPublicKey"}),n.addComponent(zb.EthAccountComponent,[{lit:"public_key"}],!0)}return t.declare&&t.deploy&&t.pubkey?function(e,t){const n="stark"===t?"AccountMixinImpl":"EthAccountMixinImpl",[o,r]=Eb(t);e.addImplToComponent(r,{name:`${n}`,value:`${o}::${n}<ContractState>`,embed:!0}),e.addInterfaceFlag("ISRC5"),Kg(e)}(n,t.type):(function(e,t){const[n,o]=Eb(t);e.addImplToComponent(o,{name:"SRC6Impl",embed:!0,value:`${n}::SRC6Impl<ContractState>`}),e.addImplToComponent(o,{name:"SRC6CamelOnlyImpl",embed:!0,value:`${n}::SRC6CamelOnlyImpl<ContractState>`}),Kg(e)}(n,t.type),t.declare&&function(e,t){const[n,o]=Eb(t);e.addImplToComponent(o,{name:"DeclarerImpl",embed:!0,value:`${n}::DeclarerImpl<ContractState>`})}(n,t.type),t.deploy&&function(e,t){const[n,o]=Eb(t);e.addImplToComponent(o,{name:"DeployableImpl",embed:!0,value:`${n}::DeployableImpl<ContractState>`})}(n,t.type),t.pubkey&&function(e,t){const[n,o]=Eb(t);e.addImplToComponent(o,{name:"PublicKeyImpl",embed:!0,value:`${n}::PublicKeyImpl<ContractState>`}),e.addImplToComponent(o,{name:"PublicKeyCamelImpl",embed:!0,value:`${n}::PublicKeyCamelImpl<ContractState>`})}(n,t.type)),t.outsideExecution&&function(e){e.addComponent(zb.SRC9Component,[],!0)}(n),function(e,t,n){const o=Sv(e,t);if(void 0!==o)switch(n){case"stark":e.addFunctionCodeBefore(o,Tv.upgrade,"self.account.assert_only_self()");break;case"eth":e.addFunctionCodeBefore(o,Tv.upgrade,"self.eth_account.assert_only_self()")}}(n,t.upgradeable,t.type),hv(n,t.info),n}function Eb(e){const[t,n]="stark"===e?["AccountComponent",zb.AccountComponent]:["EthAccountComponent",zb.EthAccountComponent];return[t,n]}const zb=Bg({AccountComponent:{path:"openzeppelin_account",substorage:{name:"account",type:"AccountComponent::Storage"},event:{name:"AccountEvent",type:"AccountComponent::Event"},impls:[{name:"AccountInternalImpl",embed:!1,value:"AccountComponent::InternalImpl<ContractState>"}]},EthAccountComponent:{path:"openzeppelin_account::eth_account",substorage:{name:"eth_account",type:"EthAccountComponent::Storage"},event:{name:"EthAccountEvent",type:"EthAccountComponent::Event"},impls:[{name:"EthAccountInternalImpl",embed:!1,value:"EthAccountComponent::InternalImpl<ContractState>"}]},SRC9Component:{path:"openzeppelin_account::extensions",substorage:{name:"src9",type:"SRC9Component::Storage"},event:{name:"SRC9Event",type:"SRC9Component::Event"},impls:[{name:"OutsideExecutionV2Impl",embed:!0,value:"SRC9Component::OutsideExecutionV2Impl<ContractState>"},{name:"OutsideExecutionInternalImpl",embed:!1,value:"SRC9Component::InternalImpl<ContractState>"}]}}),Tb="openzeppelin_governance::governor::extensions",Db="Extensions (external)",Ob="Extensions (internal)",Ub={name:"MyGovernor",delay:"1 day",period:"1 week",votes:"erc20votes",clockMode:"timestamp",timelock:"openzeppelin",decimals:18,proposalThreshold:"0",quorumMode:"percent",quorumPercent:4,quorumAbsolute:"",settings:!0,upgradeable:bv.upgradeable,appName:"OpenZeppelin Governor",appVersion:"v1",info:bv.info,macros:bv.macros};function Rb(e){const t=function(e){return{...e,...$v(e),delay:e.delay??Ub.delay,period:e.period??Ub.period,proposalThreshold:e.proposalThreshold||Ub.proposalThreshold,decimals:e.decimals??Ub.decimals,quorumPercent:e.quorumPercent??Ub.quorumPercent,quorumAbsolute:e.quorumAbsolute??Ub.quorumAbsolute,settings:e.settings??Ub.settings,quorumMode:e.quorumMode??Ub.quorumMode,votes:e.votes??Ub.votes,clockMode:e.clockMode??Ub.clockMode,timelock:e.timelock??Ub.timelock,appName:e.appName??Ub.appName,appVersion:e.appVersion??Ub.appVersion}}(e),n=new Gg(t.name,t.macros);return function(e){if(!/^\d+$/.test(e.toString()))throw new Pg({decimals:"Not a valid number"})}(t.decimals),function(e){e.addUseClause("starknet","ContractAddress"),e.addUseClause("openzeppelin_governance::governor","DefaultConfig",{alias:"GovernorDefaultConfig"}),e.addConstructorArgument({name:"votes_token",type:"ContractAddress"}),e.addUseClause("openzeppelin_governance::governor::GovernorComponent","InternalTrait",{alias:"GovernorInternalTrait"}),e.addComponent(Ab.GovernorComponent,[],!0)}(n),Kg(n,"SRC5"),Qg(n,t.appName,t.appVersion,"SNIP12 Metadata"),function(e){e.addComponent(Ab.GovernorCountingSimpleComponent,[],!1)}(n),function(e,t){if("percent"===t.quorumMode){if(t.quorumPercent>100)throw new Pg({quorumPercent:"Invalid percentage"});!function(e,t){e.addConstant({name:"QUORUM_NUMERATOR",type:"u256",value:(10*t).toString(),comment:`${t}%`,inlineComment:!0}),e.addUseClause(`${Tb}::GovernorVotesQuorumFractionComponent`,"InternalTrait",{alias:"GovernorVotesQuorumFractionInternalTrait"}),e.addComponent(Ab.GovernorVotesQuorumFractionComponent,[{lit:"votes_token"},{lit:"QUORUM_NUMERATOR"}],!0)}(e,t.quorumPercent)}else if("absolute"===t.quorumMode){if(!Zg(t.quorumAbsolute))throw new Pg({quorumAbsolute:"Not a valid number"});let n,o="";0===t.decimals||"erc721votes"===t.votes?n=`${t.quorumAbsolute}`:(n=""+BigInt(t.quorumAbsolute)*BigInt(10)**BigInt(t.decimals),n=Hg(n,"quorumAbsolute","u256").toString(),o=`${t.quorumAbsolute} * pow!(10, ${t.decimals})`),function(e){e.addUseClause(`${Tb}::GovernorVotesComponent`,"InternalTrait",{alias:"GovernorVotesInternalTrait"}),e.addComponent(Ab.GovernorVotesComponent,[{lit:"votes_token"}],!0)}(e),function(e,t,n){e.addConstant({name:"QUORUM",type:"u256",value:t,comment:n,inlineComment:!0});const o={name:"GovernorQuorum",of:"GovernorComponent::GovernorQuorumTrait<ContractState>",tags:[],section:"Locally implemented extensions",priority:1};e.addImplementedTrait(o),e.addFunction(o,{name:"quorum",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"},{name:"timepoint",type:"u64"}],returns:"u256",code:["QUORUM"]})}(e,n,o)}}(n,t),function(e,t){e.addConstant({name:"VOTING_DELAY",type:"u64",value:Nb(t).toString(),comment:t.delay,inlineComment:!0}),e.addConstant({name:"VOTING_PERIOD",type:"u64",value:jb(t).toString(),comment:t.period,inlineComment:!0}),e.addConstant({name:"PROPOSAL_THRESHOLD",type:"u256",...Pb(t),inlineComment:!0}),t.settings?(e.addUseClause(`${Tb}::GovernorSettingsComponent`,"InternalTrait",{alias:"GovernorSettingsInternalTrait"}),e.addComponent(Ab.GovernorSettingsComponent,[{lit:"VOTING_DELAY"},{lit:"VOTING_PERIOD"},{lit:"PROPOSAL_THRESHOLD"}],!0)):function(e){const t={name:"GovernorSettings",of:"GovernorComponent::GovernorSettingsTrait<ContractState>",tags:[],section:"Locally implemented extensions",priority:2};e.addImplementedTrait(t),e.addFunction(t,{name:"voting_delay",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u64",code:["VOTING_DELAY"]}),e.addFunction(t,{name:"voting_period",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u64",code:["VOTING_PERIOD"]}),e.addFunction(t,{name:"proposal_threshold",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u256",code:["PROPOSAL_THRESHOLD"]})}(e)}(n,t),function(e,{timelock:t}){!1===t?e.addComponent(Ab.GovernorCoreExecutionComponent,[],!1):(e.addConstructorArgument({name:"timelock_controller",type:"ContractAddress"}),e.addUseClause(`${Tb}::GovernorTimelockExecutionComponent`,"InternalTrait",{alias:"GovernorTimelockExecutionInternalTrait"}),e.addComponent(Ab.GovernorTimelockExecutionComponent,[{lit:"timelock_controller"}],!0))}(n,t),function(e,t){const n=Sv(e,t);void 0!==n&&(e.addUseClause("openzeppelin_governance::governor::GovernorComponent","InternalExtendedImpl"),e.addFunctionCodeBefore(n,Tv.upgrade,"self.governor.assert_only_governance()"))}(n,t.upgradeable),hv(n,t.info),n}const Ab=Bg({GovernorComponent:{path:"openzeppelin_governance::governor",substorage:{name:"governor",type:"GovernorComponent::Storage"},event:{name:"GovernorEvent",type:"GovernorComponent::Event"},impls:[{name:"GovernorImpl",embed:!0,value:"GovernorComponent::GovernorImpl<ContractState>",section:"Governor Core"}]},GovernorSettingsComponent:{path:Tb,substorage:{name:"governor_settings",type:"GovernorSettingsComponent::Storage"},event:{name:"GovernorSettingsEvent",type:"GovernorSettingsComponent::Event"},impls:[{name:"GovernorSettingsAdminImpl",embed:!0,value:"GovernorSettingsComponent::GovernorSettingsAdminImpl<ContractState>",section:Db},{name:"GovernorSettingsImpl",embed:!1,value:"GovernorSettingsComponent::GovernorSettings<ContractState>",section:Ob}]},GovernorVotesComponent:{path:Tb,substorage:{name:"governor_votes",type:"GovernorVotesComponent::Storage"},event:{name:"GovernorVotesEvent",type:"GovernorVotesComponent::Event"},impls:[{name:"VotesTokenImpl",embed:!0,value:"GovernorVotesComponent::VotesTokenImpl<ContractState>",section:Db},{name:"GovernorVotesImpl",embed:!1,value:"GovernorVotesComponent::GovernorVotes<ContractState>",section:Ob}]},GovernorVotesQuorumFractionComponent:{path:Tb,substorage:{name:"governor_votes_quorum_fraction",type:"GovernorVotesQuorumFractionComponent::Storage"},event:{name:"GovernorVotesEvent",type:"GovernorVotesQuorumFractionComponent::Event"},impls:[{name:"GovernorQuorumImpl",embed:!1,value:"GovernorVotesQuorumFractionComponent::GovernorQuorum<ContractState>",section:Ob},{name:"GovernorVotesImpl",embed:!1,value:"GovernorVotesQuorumFractionComponent::GovernorVotes<ContractState>",section:Ob},{name:"QuorumFractionImpl",embed:!0,value:"GovernorVotesQuorumFractionComponent::QuorumFractionImpl<ContractState>",section:Db}]},GovernorCountingSimpleComponent:{path:Tb,substorage:{name:"governor_counting_simple",type:"GovernorCountingSimpleComponent::Storage"},event:{name:"GovernorCountingSimpleEvent",type:"GovernorCountingSimpleComponent::Event"},impls:[{name:"GovernorCountingSimpleImpl",embed:!1,value:"GovernorCountingSimpleComponent::GovernorCounting<ContractState>",section:Ob}]},GovernorCoreExecutionComponent:{path:Tb,substorage:{name:"governor_core_execution",type:"GovernorCoreExecutionComponent::Storage"},event:{name:"GovernorCoreExecutionEvent",type:"GovernorCoreExecutionComponent::Event"},impls:[{name:"GovernorCoreExecutionImpl",embed:!1,value:"GovernorCoreExecutionComponent::GovernorExecution<ContractState>",section:Ob}]},GovernorTimelockExecutionComponent:{path:Tb,substorage:{name:"governor_timelock_execution",type:"GovernorTimelockExecutionComponent::Storage"},event:{name:"GovernorTimelockExecutionEvent",type:"GovernorTimelockExecutionComponent::Event"},impls:[{name:"TimelockedImpl",embed:!0,value:"GovernorTimelockExecutionComponent::TimelockedImpl<ContractState>",section:Db},{name:"GovernorTimelockExecutionImpl",embed:!1,value:"GovernorTimelockExecutionComponent::GovernorExecution<ContractState>",section:Ob}]}});function Nb(e){try{if("timestamp"===e.clockMode)return nv(e.delay);throw new Error("Invalid clock mode")}catch(e){throw e instanceof Error?new Pg({delay:e.message}):e}}function jb(e){try{if("timestamp"===e.clockMode)return nv(e.period);throw new Error("Invalid clock mode")}catch(e){throw e instanceof Error?new Pg({period:e.message}):e}}function Pb({proposalThreshold:e,decimals:t,votes:n}){if(!/^\d+$/.test(e))throw new Pg({proposalThreshold:"Not a valid number"});if(/^0+$/.test(e)||0===t||"erc721votes"===n)return{value:e};{let n=""+BigInt(e)*BigInt(10)**BigInt(t);return n=Hg(n,"proposalThreshold","u256").toString(),{value:`${n}`,comment:`${e} * pow!(10, ${t})`}}}const Mb={name:"MyMultisig",quorum:"2",upgradeable:bv.upgradeable,info:bv.info,macros:bv.macros};function Zb(e){const t=function(e){return{...e,...$v(e),quorum:e.quorum??Mb.quorum}}(e),n=new Gg(t.name,t.macros);return function(e,t){e.addUseClause("starknet","ContractAddress");const n=function(e){const t=e.quorum;if(!Zg(t))throw new Pg({quorum:"Not a valid number"});const n=Hg(t,"quorum","u32");if(n===BigInt(0))throw new Pg({quorum:"Quorum cannot be 0"});return n}(t);e.addConstant({name:"INITIAL_QUORUM",type:"u32",value:n.toString()}),e.addConstructorArgument({name:"signers",type:"Span<ContractAddress>"});const o=[{lit:"INITIAL_QUORUM"},{lit:"signers"}];e.addComponent(qb.MultisigComponent,o,!0)}(n,t),hv(n,t.info),function(e,t){const n=Sv(e,t);void 0!==n&&e.addFunctionCodeBefore(n,Tv.upgrade,"self.multisig.assert_only_self()")}(n,t.upgradeable),lv(n,rv()),n}const qb=Bg({MultisigComponent:{path:"openzeppelin_governance::multisig",substorage:{name:"multisig",type:"MultisigComponent::Storage"},event:{name:"MultisigEvent",type:"MultisigComponent::Event"},impls:[{name:"MultisigImpl",embed:!0,value:"MultisigComponent::MultisigImpl<ContractState>"},{name:"MultisigInternalImpl",embed:!1,value:"MultisigComponent::InternalImpl<ContractState>"}]}}),Lb={name:"MyVesting",startDate:"",duration:"0 day",cliffDuration:"0 day",schedule:"custom",info:bv.info,macros:bv.macros};function Fb(e){const t=function(e){return{name:e.name??Lb.name,startDate:e.startDate??Lb.startDate,duration:e.duration??Lb.duration,cliffDuration:e.cliffDuration??Lb.cliffDuration,schedule:e.schedule??Lb.schedule,info:e.info??Lb.info,macros:e.macros??Lb.macros}}(e),n=new Gg(t.name,t.macros);!function(e,t){e.addUseClause("starknet","ContractAddress");const n=function(e){if(""===e.startDate||"NaN"===e.startDate)return;const t=new Date(`${e.startDate}Z`),n=t.getTime(),o=Hg(Math.floor(n/1e3),"startDate","u64"),r=t.toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:"UTC"});return{timestampInSec:o,formattedDate:`${r} (UTC)`}}(t),o=function(e){try{return nv(e.duration)}catch(e){throw e instanceof Error?new Pg({duration:e.message}):e}}(t),r=function(e){try{return nv(e.cliffDuration)}catch(e){throw e instanceof Error?new Pg({cliffDuration:e.message}):e}}(t);(function(e,t){if(Jg(e,"duration","u64"),Jg(t,"cliffDuration","u64"),t>e)throw new Pg({cliffDuration:"Cliff duration must be less than or equal to the total duration"})})(o,r),void 0!==n?e.addConstant({name:"START",type:"u64",value:n.timestampInSec.toString(),comment:n.formattedDate,inlineComment:!0}):e.addConstant({name:"START",type:"u64",value:"0"});e.addConstant({name:"DURATION",type:"u64",value:o.toString(),comment:t.duration,inlineComment:!0}),e.addConstant({name:"CLIFF_DURATION",type:"u64",value:r.toString(),comment:t.cliffDuration,inlineComment:!0});const i=[{lit:"START"},{lit:"DURATION"},{lit:"CLIFF_DURATION"}];e.addComponent(Vb.VestingComponent,i,!0)}(n,t),function(e,t){switch(t.schedule){case"linear":return void e.addUseClause("openzeppelin_finance::vesting","LinearVestingSchedule");case"custom":{const t={name:"VestingSchedule",of:"VestingComponent::VestingScheduleTrait<ContractState>",tags:[],priority:0};e.addImplementedTrait(t),e.addFunction(t,{name:"calculate_vested_amount",returns:"u256",args:[{name:"self",type:"@VestingComponent::ComponentState<ContractState>"},{name:"token",type:"ContractAddress"},{name:"total_allocation",type:"u256"},{name:"timestamp",type:"u64"},{name:"start",type:"u64"},{name:"duration",type:"u64"},{name:"cliff",type:"u64"}],code:["// TODO: Must be implemented according to the desired vesting schedule","0"]})}}}(n,t),hv(n,t.info);const o=iv();return lv(n,o),Ev(n,!1,o),n}const Vb=Bg({VestingComponent:{path:"openzeppelin_finance::vesting",substorage:{name:"vesting",type:"VestingComponent::Storage"},event:{name:"VestingEvent",type:"VestingComponent::Event"},impls:[{name:"VestingImpl",embed:!0,value:"VestingComponent::VestingImpl<ContractState>"},{name:"VestingInternalImpl",embed:!1,value:"VestingComponent::InternalImpl<ContractState>"}]}});const Hb={print:function(e=tb){return jv(nb(e))},defaults:tb,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable}},Jb={print:function(e=db){return jv(pb(e))},defaults:db,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable||!0===e.royaltyInfo?.enabled||!0===e.uriStorage}},Gb={print:function(e=hb){return jv(gb(e))},defaults:hb,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!1!==e.updatableUri||!0===e.uriStorage||!0===e.upgradeable||!0===e.royaltyInfo?.enabled}},Bb={print:function(e=yb){return jv(_b(e))},defaults:yb,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable||!0===e.contentUri||!0===e.metadata}},Wb={defaults:Cb},Kb={defaults:Mb},Xb={defaults:Ub},Qb={defaults:Lb},Yb={print:function(e=wb){return jv(Ib(e))},defaults:wb,isAccessControlRequired:function(e){return!0===e.pausable||!0===e.upgradeable}};function e$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t$,n$;function o$(){if(n$)return t$;function e(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n],r=typeof o;"object"!==r&&"function"!==r||Object.isFrozen(o)||e(o)}),t}n$=1;class t{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach(function(e){for(const t in e)n[t]=e[t]}),n}const r=e=>!!e.scope;class i{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=n(e)}openNode(e){if(!r(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${"_".repeat(t+1)}`)].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){r(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class s{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=a({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{s._collapse(e)}))}}class c extends s{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new i(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function l(e){return e?"string"==typeof e?e:e.source:null}function u(e){return m("(?=",e,")")}function d(e){return m("(?:",e,")*")}function p(e){return m("(?:",e,")?")}function m(...e){return e.map(e=>l(e)).join("")}function f(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>l(e)).join("|")+")"}function h(e){return new RegExp(e.toString()+"|").exec("").length-1}const g=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function v(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let o=l(e),r="";for(;o.length>0;){const e=g.exec(o);if(!e){r+=o;break}r+=o.substring(0,e.index),o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const b="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",k="\\b(0b[01]+)",x={begin:"\\\\[\\s\\S]",relevance:0},w={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[x]},I={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[x]},C=function(e,t,n={}){const r=o({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:m(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},S=C("//","$"),E=C("/\\*","\\*/"),z=C("#","$"),T={scope:"number",begin:y,relevance:0},D={scope:"number",begin:_,relevance:0},O={scope:"number",begin:k,relevance:0},U={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[x,{begin:/\[/,end:/\]/,relevance:0,contains:[x]}]},R={scope:"title",begin:b,relevance:0},A={scope:"title",begin:$,relevance:0},N={begin:"\\.\\s*"+$,relevance:0};var j=Object.freeze({__proto__:null,APOS_STRING_MODE:w,BACKSLASH_ESCAPE:x,BINARY_NUMBER_MODE:O,BINARY_NUMBER_RE:k,COMMENT:C,C_BLOCK_COMMENT_MODE:E,C_LINE_COMMENT_MODE:S,C_NUMBER_MODE:D,C_NUMBER_RE:_,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:b,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:N,NUMBER_MODE:T,NUMBER_RE:y,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:I,REGEXP_MODE:U,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=m(t,/.*\b/,e.binary,/\b.*/)),o({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:R,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:A});function P(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function M(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Z(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=P,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function q(e,t){Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function L(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,t){void 0===e.relevance&&(e.relevance=1)}const V=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=m(n.beforeMatch,u(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},H=["of","and","for","in","not","or","if","then","parent","list","value"];function J(e,t,n="keyword"){const o=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(n){Object.assign(o,J(e[n],t,n))}),o;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){const n=t.split("|");o[n[0]]=[e,G(n[0],n[1])]})}}function G(e,t){return t?Number(t):function(e){return H.includes(e.toLowerCase())}(e)?0:1}const B={},W=e=>{console.error(e)},K=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{B[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),B[`${e}/${t}`]=!0)},Q=new Error;function Y(e,t,{key:n}){let o=0;const r=e[n],i={},a={};for(let e=1;e<=t.length;e++)a[e+o]=r[e],i[e+o]=!0,o+=h(t[e-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function ee(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw W("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Q;if("object"!=typeof e.beginScope||null===e.beginScope)throw W("beginScope must be object"),Q;Y(e,e.begin,{key:"beginScope"}),e.begin=v(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw W("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Q;if("object"!=typeof e.endScope||null===e.endScope)throw W("endScope must be object"),Q;Y(e,e.end,{key:"endScope"}),e.end=v(e.end,{joinWith:""})}}(e)}function te(e){function t(t,n){return new RegExp(l(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=h(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(v(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),o=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,o)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=o(e.classNameAliases||{}),function n(i,a){const s=i;if(i.isCompiled)return s;[M,L,ee,V].forEach(e=>e(i,a)),e.compilerExtensions.forEach(e=>e(i,a)),i.__beforeBegin=null,[Z,q,F].forEach(e=>e(i,a)),i.isCompiled=!0;let c=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),c=i.keywords.$pattern,delete i.keywords.$pattern),c=c||/\w+/,i.keywords&&(i.keywords=J(i.keywords,e.case_insensitive)),s.keywordPatternRe=t(c,!0),a&&(i.begin||(i.begin=/\B|\b/),s.beginRe=t(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=t(s.end)),s.terminatorEnd=l(s.end)||"",i.endsWithParent&&a.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+a.terminatorEnd)),i.illegal&&(s.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return o(e,{variants:null},t)}));if(e.cachedVariants)return e.cachedVariants;if(ne(e))return o(e,{starts:e.starts?o(e.starts):null});if(Object.isFrozen(e))return o(e);return e}("self"===e?i:e)})),i.contains.forEach(function(e){n(e,s)}),i.starts&&n(i.starts,a),s.matcher=function(e){const t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function ne(e){return!!e&&(e.endsWithParent||ne(e.starts))}class oe extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const re=n,ie=o,ae=Symbol("nomatch"),se=function(n){const o=Object.create(null),r=Object.create(null),i=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let h={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function g(e){return h.noHighlightRe.test(e)}function v(e,t,n){let o="",r="";"object"==typeof t?(o=e,n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."),X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,o=t),void 0===n&&(n=!0);const i={code:o,language:r};C("before:highlight",i);const a=i.result?i.result:b(i.language,i.code,n);return a.code=i.code,C("after:highlight",a),a}function b(e,n,r,i){const c=Object.create(null);function l(e,t){return e.keywords[t]}function u(){if(!S.keywords)return void z.addText(T);let e=0;S.keywordPatternRe.lastIndex=0;let t=S.keywordPatternRe.exec(T),n="";for(;t;){n+=T.substring(e,t.index);const o=w.case_insensitive?t[0].toLowerCase():t[0],r=l(S,o);if(r){const[e,i]=r;if(z.addText(n),n="",c[o]=(c[o]||0)+1,c[o]<=7&&(D+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=S.keywordPatternRe.lastIndex,t=S.keywordPatternRe.exec(T)}n+=T.substring(e),z.addText(n)}function d(){null!=S.subLanguage?function(){if(""===T)return;let e=null;if("string"==typeof S.subLanguage){if(!o[S.subLanguage])return void z.addText(T);e=b(S.subLanguage,T,!0,E[S.subLanguage]),E[S.subLanguage]=e._top}else e=$(T,S.subLanguage.length?S.subLanguage:null);S.relevance>0&&(D+=e.relevance),z.__addSublanguage(e._emitter,e.language)}():u(),T=""}function p(e,t){""!==e&&(z.startScope(t),z.addText(e),z.endScope())}function m(e,t){let n=1;const o=t.length-1;for(;n<=o;){if(!e._emit[n]){n++;continue}const o=w.classNameAliases[e[n]]||e[n],r=t[n];o?p(r,o):(T=r,u(),T=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&z.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(T,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),T=""):e.beginScope._multi&&(m(e.beginScope,t),T="")),S=Object.create(e,{parent:{value:S}}),S}function g(e,n,o){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,o);if(r){if(e["on:end"]){const o=new t(e);e["on:end"](n,o),o.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,n,o)}function v(e){return 0===S.matcher.regexIndex?(T+=e[0],1):(R=!0,0)}function y(e){const t=e[0],o=n.substring(e.index),r=g(S,e,o);if(!r)return ae;const i=S;S.endScope&&S.endScope._wrap?(d(),p(t,S.endScope._wrap)):S.endScope&&S.endScope._multi?(d(),m(S.endScope,e)):i.skip?T+=t:(i.returnEnd||i.excludeEnd||(T+=t),d(),i.excludeEnd&&(T=t));do{S.scope&&z.closeNode(),S.skip||S.subLanguage||(D+=S.relevance),S=S.parent}while(S!==r.parent);return r.starts&&f(r.starts,e),i.returnEnd?0:t.length}let _={};function k(o,i){const s=i&&i[0];if(T+=o,null==s)return d(),0;if("begin"===_.type&&"end"===i.type&&_.index===i.index&&""===s){if(T+=n.slice(i.index,i.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=_.rule,t}return 1}if(_=i,"begin"===i.type)return function(e){const n=e[0],o=e.rule,r=new t(o),i=[o.__beforeBegin,o["on:begin"]];for(const t of i)if(t&&(t(e,r),r.isMatchIgnored))return v(n);return o.skip?T+=n:(o.excludeBegin&&(T+=n),d(),o.returnBegin||o.excludeBegin||(T=n)),f(o,e),o.returnBegin?0:n.length}(i);if("illegal"===i.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(S.scope||"<unnamed>")+'"');throw e.mode=S,e}if("end"===i.type){const e=y(i);if(e!==ae)return e}if("illegal"===i.type&&""===s)return T+="\n",1;if(U>1e5&&U>3*i.index){throw new Error("potential infinite loop, way more iterations than matches")}return T+=s,s.length}const w=x(e);if(!w)throw W(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const I=te(w);let C="",S=i||I;const E={},z=new h.__emitter(h);!function(){const e=[];for(let t=S;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>z.openNode(e))}();let T="",D=0,O=0,U=0,R=!1;try{if(w.__emitTokens)w.__emitTokens(n,z);else{for(S.matcher.considerAll();;){U++,R?R=!1:S.matcher.considerAll(),S.matcher.lastIndex=O;const e=S.matcher.exec(n);if(!e)break;const t=k(n.substring(O,e.index),e);O=e.index+t}k(n.substring(O))}return z.finalize(),C=z.toHTML(),{language:e,value:C,relevance:D,illegal:!1,_emitter:z,_top:S}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:re(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:O,context:n.slice(O-100,O+100),mode:t.mode,resultSoFar:C},_emitter:z};if(a)return{language:e,value:re(n),illegal:!1,relevance:0,errorRaised:t,_emitter:z,_top:S};throw t}}function $(e,t){t=t||h.languages||Object.keys(o);const n=function(e){const t={value:re(e),illegal:!1,relevance:0,_top:l,_emitter:new h.__emitter(h)};return t._emitter.addText(e),t}(e),r=t.filter(x).filter(I).map(t=>b(t,e,!1));r.unshift(n);const i=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(x(e.language).supersetOf===t.language)return 1;if(x(t.language).supersetOf===e.language)return-1}return 0}),[a,s]=i,c=a;return c.secondBest=s,c}function y(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=h.languageDetectRe.exec(t);if(n){const t=x(n[1]);return t||(K(s.replace("{}",n[1])),K("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>g(e)||x(e))}(e);if(g(n))return;if(C("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(h.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),h.throwUnescapedHTML)){throw new oe("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,i=n?v(o,{language:n,ignoreIllegals:!0}):$(o);e.innerHTML=i.value,e.dataset.highlighted="yes",function(e,t,n){const o=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),C("after:highlightElement",{el:e,result:i,text:o})}let _=!1;function k(){if("loading"===document.readyState)return _||window.addEventListener("DOMContentLoaded",function(){k()},!1),void(_=!0);document.querySelectorAll(h.cssSelector).forEach(y)}function x(e){return e=(e||"").toLowerCase(),o[e]||o[r[e]]}function w(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{r[e.toLowerCase()]=t})}function I(e){const t=x(e);return t&&!t.disableAutodetect}function C(e,t){const n=e;i.forEach(function(e){e[n]&&e[n](t)})}Object.assign(n,{highlight:v,highlightAuto:$,highlightAll:k,highlightElement:y,highlightBlock:function(e){return X("10.7.0","highlightBlock will be removed entirely in v12.0"),X("10.7.0","Please use highlightElement now."),y(e)},configure:function(e){h=ie(h,e)},initHighlighting:()=>{k(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){k(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,t){let r=null;try{r=t(n)}catch(t){if(W("Language definition for '{}' could not be registered.".replace("{}",e)),!a)throw t;W(t),r=l}r.name||(r.name=e),o[e]=r,r.rawDefinition=t.bind(null,n),r.aliases&&w(r.aliases,{languageName:e})},unregisterLanguage:function(e){delete o[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(o)},getLanguage:x,registerAliases:w,autoDetection:I,inherit:ie,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),i.push(e)},removePlugin:function(e){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}),n.debugMode=function(){a=!1},n.safeMode=function(){a=!0},n.versionString="11.11.1",n.regex={concat:m,lookahead:u,either:f,optional:p,anyNumberOfTimes:d};for(const t in j)"object"==typeof j[t]&&e(j[t]);return Object.assign(n,j),n},ce=se({});return ce.newInstance=()=>se({}),t$=ce,ce.HighlightJS=ce,ce.default=ce,t$}var r$,i$,a$,s$,c$,l$=e$(o$()),u$={exports:{}};function d$(){return i$?r$:(i$=1,r$=function(e){var t="([ui](8|16|32|64|128|size)|f(32|64))?",n="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{aliases:["rs"],keywords:{keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:n},lexemes:e.IDENT_RE+"!?",illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+t}],relevance:0},{className:"function",beginKeywords:"fn",end:"(\\(|<)",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"meta",begin:"#\\!?\\[",end:"\\]",contains:[{className:"meta-string",begin:/"/,end:/"/}]},{className:"class",beginKeywords:"type",end:";",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"\\S"},{className:"class",beginKeywords:"trait enum struct union",end:"{",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"[\\w\\d]"},{begin:e.IDENT_RE+"::",keywords:{built_in:n}},{begin:"->"}]}})}var p$=function(){if(c$)return u$.exports;c$=1;const e=function(){if(s$)return a$;s$=1;const e=d$();return a$=function(t){const n=e(t);if("object"!=typeof n.keywords)throw Error("Expected object");const o={keyword:["break","const","continue","else","enum","false","for","fn","hint","if","impl","in","match","pub","return","struct","trait","true","type","use","as","assert","do","dyn","extern","let","macro","mod","move","ref","static_assert","static","super","try","typeof","unsafe","where","while","with","yield"].join(" "),literal:["true","false"].join(" "),type:["bool","u8","u16","u32","u64","u128","u256","usize"].join(" ")};return Object.assign(n.keywords,o),Object.assign(n.contains,[...n.contains,{className:"built_in",begin:"selector!"},{className:"built_in",begin:"component!"},{className:"class",beginKeywords:"mod",end:"{",contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{endsParent:!0})]},{className:"class",beginKeywords:"impl",end:";",contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{endsParent:!0})]},{beginKeywords:"let",end:";",contains:[t.inherit({className:"variable",begin:t.UNDERSCORE_IDENT_RE,relevance:0},{endsParent:!0})]}]),Object.assign(n,{name:"Cairo",aliases:["cairo"]}),n}}();return u$.exports=function(t){t.registerLanguage("cairo",e)},u$.exports.cairo=e,u$.exports}();e$(p$)(l$);const m$={AccountComponent:"account",UpgradeableComponent:"upgradeable"};var f$="top",h$="bottom",g$="right",v$="left",b$="auto",$$=[f$,h$,g$,v$],y$="start",_$="end",k$="viewport",x$="popper",w$=$$.reduce(function(e,t){return e.concat([t+"-"+y$,t+"-"+_$])},[]),I$=[].concat($$,[b$]).reduce(function(e,t){return e.concat([t,t+"-"+y$,t+"-"+_$])},[]),C$=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function S$(e){return e?(e.nodeName||"").toLowerCase():null}function E$(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function z$(e){return e instanceof E$(e).Element||e instanceof Element}function T$(e){return e instanceof E$(e).HTMLElement||e instanceof HTMLElement}function D$(e){return"undefined"!=typeof ShadowRoot&&(e instanceof E$(e).ShadowRoot||e instanceof ShadowRoot)}var O$={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];T$(r)&&S$(r)&&(Object.assign(r.style,n),Object.keys(o).forEach(function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});T$(o)&&S$(o)&&(Object.assign(o.style,i),Object.keys(r).forEach(function(e){o.removeAttribute(e)}))})}},requires:["computeStyles"]};function U$(e){return e.split("-")[0]}var R$=Math.max,A$=Math.min,N$=Math.round;function j$(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function P$(){return!/^((?!chrome|android).)*safari/i.test(j$())}function M$(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&T$(e)&&(r=e.offsetWidth>0&&N$(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&N$(o.height)/e.offsetHeight||1);var a=(z$(e)?E$(e):window).visualViewport,s=!P$()&&n,c=(o.left+(s&&a?a.offsetLeft:0))/r,l=(o.top+(s&&a?a.offsetTop:0))/i,u=o.width/r,d=o.height/i;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function Z$(e){var t=M$(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function q$(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&D$(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function L$(e){return E$(e).getComputedStyle(e)}function F$(e){return["table","td","th"].indexOf(S$(e))>=0}function V$(e){return((z$(e)?e.ownerDocument:e.document)||window.document).documentElement}function H$(e){return"html"===S$(e)?e:e.assignedSlot||e.parentNode||(D$(e)?e.host:null)||V$(e)}function J$(e){return T$(e)&&"fixed"!==L$(e).position?e.offsetParent:null}function G$(e){for(var t=E$(e),n=J$(e);n&&F$(n)&&"static"===L$(n).position;)n=J$(n);return n&&("html"===S$(n)||"body"===S$(n)&&"static"===L$(n).position)?t:n||function(e){var t=/firefox/i.test(j$());if(/Trident/i.test(j$())&&T$(e)&&"fixed"===L$(e).position)return null;var n=H$(e);for(D$(n)&&(n=n.host);T$(n)&&["html","body"].indexOf(S$(n))<0;){var o=L$(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function B$(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function W$(e,t,n){return R$(e,A$(t,n))}function K$(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function X$(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Q$={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=U$(n.placement),c=B$(s),l=[v$,g$].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return K$("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:X$(e,$$))}(r.padding,n),d=Z$(i),p="y"===c?f$:v$,m="y"===c?h$:g$,f=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],h=a[c]-n.rects.reference[c],g=G$(i),v=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,b=f/2-h/2,$=u[p],y=v-d[l]-u[m],_=v/2-d[l]/2+b,k=W$($,_,y),x=c;n.modifiersData[o]=((t={})[x]=k,t.centerOffset=k-_,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&q$(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Y$(e){return e.split("-")[1]}var ey={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ty(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,m=void 0===p?0:p,f=a.y,h=void 0===f?0:f,g="function"==typeof u?u({x:m,y:h}):{x:m,y:h};m=g.x,h=g.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),$=v$,y=f$,_=window;if(l){var k=G$(n),x="clientHeight",w="clientWidth";if(k===E$(n)&&"static"!==L$(k=V$(n)).position&&"absolute"===s&&(x="scrollHeight",w="scrollWidth"),r===f$||(r===v$||r===g$)&&i===_$)y=h$,h-=(d&&k===_&&_.visualViewport?_.visualViewport.height:k[x])-o.height,h*=c?1:-1;if(r===v$||(r===f$||r===h$)&&i===_$)$=g$,m-=(d&&k===_&&_.visualViewport?_.visualViewport.width:k[w])-o.width,m*=c?1:-1}var I,C=Object.assign({position:s},l&&ey),S=!0===u?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:N$(n*r)/r||0,y:N$(o*r)/r||0}}({x:m,y:h},E$(n)):{x:m,y:h};return m=S.x,h=S.y,c?Object.assign({},C,((I={})[y]=b?"0":"",I[$]=v?"0":"",I.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+h+"px)":"translate3d("+m+"px, "+h+"px, 0)",I)):Object.assign({},C,((t={})[y]=b?h+"px":"",t[$]=v?m+"px":"",t.transform="",t))}var ny={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,l={placement:U$(t.placement),variation:Y$(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ty(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ty(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},oy={passive:!0};var ry={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,a=o.resize,s=void 0===a||a,c=E$(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach(function(e){e.addEventListener("scroll",n.update,oy)}),s&&c.addEventListener("resize",n.update,oy),function(){i&&l.forEach(function(e){e.removeEventListener("scroll",n.update,oy)}),s&&c.removeEventListener("resize",n.update,oy)}},data:{}},iy={left:"right",right:"left",bottom:"top",top:"bottom"};function ay(e){return e.replace(/left|right|bottom|top/g,function(e){return iy[e]})}var sy={start:"end",end:"start"};function cy(e){return e.replace(/start|end/g,function(e){return sy[e]})}function ly(e){var t=E$(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function uy(e){return M$(V$(e)).left+ly(e).scrollLeft}function dy(e){var t=L$(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function py(e){return["html","body","#document"].indexOf(S$(e))>=0?e.ownerDocument.body:T$(e)&&dy(e)?e:py(H$(e))}function my(e,t){var n;void 0===t&&(t=[]);var o=py(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=E$(o),a=r?[i].concat(i.visualViewport||[],dy(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(my(H$(a)))}function fy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function hy(e,t,n){return t===k$?fy(function(e,t){var n=E$(e),o=V$(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,c=0;if(r){i=r.width,a=r.height;var l=P$();(l||!l&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:i,height:a,x:s+uy(e),y:c}}(e,n)):z$(t)?function(e,t){var n=M$(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):fy(function(e){var t,n=V$(e),o=ly(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=R$(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=R$(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+uy(e),c=-o.scrollTop;return"rtl"===L$(r||n).direction&&(s+=R$(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(V$(e)))}function gy(e,t,n,o){var r="clippingParents"===t?function(e){var t=my(H$(e)),n=["absolute","fixed"].indexOf(L$(e).position)>=0&&T$(e)?G$(e):e;return z$(n)?t.filter(function(e){return z$(e)&&q$(e,n)&&"body"!==S$(e)}):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],s=i.reduce(function(t,n){var r=hy(e,n,o);return t.top=R$(r.top,t.top),t.right=A$(r.right,t.right),t.bottom=A$(r.bottom,t.bottom),t.left=R$(r.left,t.left),t},hy(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function vy(e){var t,n=e.reference,o=e.element,r=e.placement,i=r?U$(r):null,a=r?Y$(r):null,s=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2;switch(i){case f$:t={x:s,y:n.y-o.height};break;case h$:t={x:s,y:n.y+n.height};break;case g$:t={x:n.x+n.width,y:c};break;case v$:t={x:n.x-o.width,y:c};break;default:t={x:n.x,y:n.y}}var l=i?B$(i):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case y$:t[l]=t[l]-(n[u]/2-o[u]/2);break;case _$:t[l]=t[l]+(n[u]/2-o[u]/2)}}return t}function by(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=void 0===o?e.placement:o,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,c=void 0===s?"clippingParents":s,l=n.rootBoundary,u=void 0===l?k$:l,d=n.elementContext,p=void 0===d?x$:d,m=n.altBoundary,f=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,v=K$("number"!=typeof g?g:X$(g,$$)),b=p===x$?"reference":x$,$=e.rects.popper,y=e.elements[f?b:p],_=gy(z$(y)?y:y.contextElement||V$(e.elements.popper),c,u,a),k=M$(e.elements.reference),x=vy({reference:k,element:$,placement:r}),w=fy(Object.assign({},$,x)),I=p===x$?w:k,C={top:_.top-I.top+v.top,bottom:I.bottom-_.bottom+v.bottom,left:_.left-I.left+v.left,right:I.right-_.right+v.right},S=e.modifiersData.offset;if(p===x$&&S){var E=S[r];Object.keys(C).forEach(function(e){var t=[g$,h$].indexOf(e)>=0?1:-1,n=[f$,h$].indexOf(e)>=0?"y":"x";C[e]+=E[n]*t})}return C}function $y(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?I$:c,u=Y$(o),d=u?s?w$:w$.filter(function(e){return Y$(e)===u}):$$,p=d.filter(function(e){return l.indexOf(e)>=0});0===p.length&&(p=d);var m=p.reduce(function(t,n){return t[n]=by(e,{placement:n,boundary:r,rootBoundary:i,padding:a})[U$(n)],t},{});return Object.keys(m).sort(function(e,t){return m[e]-m[t]})}var yy={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=void 0===m||m,h=n.allowedAutoPlacements,g=t.options.placement,v=U$(g),b=c||(v===g||!f?[ay(g)]:function(e){if(U$(e)===b$)return[];var t=ay(e);return[cy(e),t,cy(t)]}(g)),$=[g].concat(b).reduce(function(e,n){return e.concat(U$(n)===b$?$y(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:f,allowedAutoPlacements:h}):n)},[]),y=t.rects.reference,_=t.rects.popper,k=new Map,x=!0,w=$[0],I=0;I<$.length;I++){var C=$[I],S=U$(C),E=Y$(C)===y$,z=[f$,h$].indexOf(S)>=0,T=z?"width":"height",D=by(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:p,padding:l}),O=z?E?g$:v$:E?h$:f$;y[T]>_[T]&&(O=ay(O));var U=ay(O),R=[];if(i&&R.push(D[S]<=0),s&&R.push(D[O]<=0,D[U]<=0),R.every(function(e){return e})){w=C,x=!1;break}k.set(C,R)}if(x)for(var A=function(e){var t=$.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,"break"},N=f?3:1;N>0;N--){if("break"===A(N))break}t.placement!==w&&(t.modifiersData[o]._skip=!0,t.placement=w,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _y(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ky(e){return[f$,g$,h$,v$].some(function(t){return e[t]>=0})}var xy={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=void 0===r?[0,0]:r,a=I$.reduce(function(e,n){return e[n]=function(e,t,n){var o=U$(e),r=[v$,f$].indexOf(o)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*r,[v$,g$].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=a}};var wy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,f=n.tetherOffset,h=void 0===f?0:f,g=by(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),v=U$(t.placement),b=Y$(t.placement),$=!b,y=B$(v),_="x"===y?"y":"x",k=t.modifiersData.popperOffsets,x=t.rects.reference,w=t.rects.popper,I="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,C="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(k){if(i){var z,T="y"===y?f$:v$,D="y"===y?h$:g$,O="y"===y?"height":"width",U=k[y],R=U+g[T],A=U-g[D],N=m?-w[O]/2:0,j=b===y$?x[O]:w[O],P=b===y$?-w[O]:-x[O],M=t.elements.arrow,Z=m&&M?Z$(M):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},L=q[T],F=q[D],V=W$(0,x[O],Z[O]),H=$?x[O]/2-N-V-L-C.mainAxis:j-V-L-C.mainAxis,J=$?-x[O]/2+N+V+F+C.mainAxis:P+V+F+C.mainAxis,G=t.elements.arrow&&G$(t.elements.arrow),B=G?"y"===y?G.clientTop||0:G.clientLeft||0:0,W=null!=(z=null==S?void 0:S[y])?z:0,K=U+J-W,X=W$(m?A$(R,U+H-W-B):R,U,m?R$(A,K):A);k[y]=X,E[y]=X-U}if(s){var Q,Y="x"===y?f$:v$,ee="x"===y?h$:g$,te=k[_],ne="y"===_?"height":"width",oe=te+g[Y],re=te-g[ee],ie=-1!==[f$,v$].indexOf(v),ae=null!=(Q=null==S?void 0:S[_])?Q:0,se=ie?oe:te-x[ne]-w[ne]-ae+C.altAxis,ce=ie?te+x[ne]+w[ne]-ae-C.altAxis:re,le=m&&ie?function(e,t,n){var o=W$(e,t,n);return o>n?n:o}(se,te,ce):W$(m?se:oe,te,m?ce:re);k[_]=le,E[_]=le-te}t.modifiersData[o]=E}},requiresIfExists:["offset"]};function Iy(e,t,n){void 0===n&&(n=!1);var o,r=T$(t),i=T$(t)&&function(e){var t=e.getBoundingClientRect(),n=N$(t.width)/e.offsetWidth||1,o=N$(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),a=V$(t),s=M$(e,i,n),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==S$(t)||dy(a))&&(c=(o=t)!==E$(o)&&T$(o)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(o):ly(o)),T$(t)?((l=M$(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=uy(a))),{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function Cy(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}}),o.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||r(e)}),o}var Sy={placement:"bottom",modifiers:[],strategy:"absolute"};function Ey(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function zy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?Sy:r;return function(e,t,n){void 0===n&&(n=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Sy,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,r),s.scrollParents={reference:z$(e)?my(e):e.contextElement?my(e.contextElement):[],popper:my(t)};var a,l,p=function(e){var t=Cy(e);return C$.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(o,s.options.modifiers),l=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(l).map(function(e){return l[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var i=r({state:s,name:t,instance:u,options:o}),a=function(){};c.push(i||a)}}),u.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(Ey(t,n)){s.rects={reference:Iy(t,G$(n),"fixed"===s.options.strategy),popper:Z$(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var r=s.orderedModifiers[o],i=r.fn,a=r.options,c=void 0===a?{}:a,d=r.name;"function"==typeof i&&(s=i({state:s,options:c,name:d,instance:u})||s)}else s.reset=!1,o=-1}}},update:(r=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),l=!0}};if(!Ey(e,t))return u;function d(){c.forEach(function(e){return e()}),c=[]}return u.setOptions(n).then(function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}var Ty=zy({defaultModifiers:[ry,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=vy({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},ny,O$,xy,yy,wy,Q$,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=by(t,{elementContext:"reference"}),s=by(t,{altBoundary:!0}),c=_y(a,o),l=_y(s,r,i),u=ky(c),d=ky(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Dy="tippy-content",Oy="tippy-arrow",Uy="tippy-svg-arrow",Ry={passive:!0,capture:!0},Ay=function(){return document.body};function Ny(e,t,n){if(Array.isArray(e)){var o=e[t];return null==o?Array.isArray(n)?n[t]:n:o}return e}function jy(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Py(e,t){return"function"==typeof e?e.apply(void 0,t):e}function My(e,t){return 0===t?e:function(o){clearTimeout(n),n=setTimeout(function(){e(o)},t)};var n}function Zy(e){return[].concat(e)}function qy(e,t){-1===e.indexOf(t)&&e.push(t)}function Ly(e){return[].slice.call(e)}function Fy(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function Vy(){return document.createElement("div")}function Hy(e){return["Element","Fragment"].some(function(t){return jy(e,t)})}function Jy(e){return Hy(e)?[e]:function(e){return jy(e,"NodeList")}(e)?Ly(e):Array.isArray(e)?e:Ly(document.querySelectorAll(e))}function Gy(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function By(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Wy(e,t,n){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[o](t,n)})}function Ky(e,t){for(var n=t;n;){var o;if(e.contains(n))return!0;n=null==n.getRootNode||null==(o=n.getRootNode())?void 0:o.host}return!1}var Xy={isTouch:!1},Qy=0;function Yy(){Xy.isTouch||(Xy.isTouch=!0,window.performance&&document.addEventListener("mousemove",e_))}function e_(){var e=performance.now();e-Qy<20&&(Xy.isTouch=!1,document.removeEventListener("mousemove",e_)),Qy=e}function t_(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var n_=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,o_=Object.assign({appendTo:Ay,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),r_=Object.keys(o_);function i_(e){var t=(e.plugins||[]).reduce(function(t,n){var o,r=n.name,i=n.defaultValue;r&&(t[r]=void 0!==e[r]?e[r]:null!=(o=o_[r])?o:i);return t},{});return Object.assign({},e,t)}function a_(e,t){var n=Object.assign({},t,{content:Py(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(i_(Object.assign({},o_,{plugins:t}))):r_).reduce(function(t,n){var o=(e.getAttribute("data-tippy-"+n)||"").trim();if(!o)return t;if("content"===n)t[n]=o;else try{t[n]=JSON.parse(o)}catch(e){t[n]=o}return t},{})}(e,t.plugins));return n.aria=Object.assign({},o_.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function s_(e,t){e.innerHTML=t}function c_(e){var t=Vy();return!0===e?t.className=Oy:(t.className=Uy,Hy(e)?t.appendChild(e):s_(t,e)),t}function l_(e,t){Hy(t.content)?(s_(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?s_(e,t.content):e.textContent=t.content)}function u_(e){var t=e.firstElementChild,n=Ly(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(Dy)}),arrow:n.find(function(e){return e.classList.contains(Oy)||e.classList.contains(Uy)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function d_(e){var t=Vy(),n=Vy();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var o=Vy();function r(n,o){var r=u_(t),i=r.box,a=r.content,s=r.arrow;o.theme?i.setAttribute("data-theme",o.theme):i.removeAttribute("data-theme"),"string"==typeof o.animation?i.setAttribute("data-animation",o.animation):i.removeAttribute("data-animation"),o.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?i.setAttribute("role",o.role):i.removeAttribute("role"),n.content===o.content&&n.allowHTML===o.allowHTML||l_(a,e.props),o.arrow?s?n.arrow!==o.arrow&&(i.removeChild(s),i.appendChild(c_(o.arrow))):i.appendChild(c_(o.arrow)):s&&i.removeChild(s)}return o.className=Dy,o.setAttribute("data-state","hidden"),l_(o,e.props),t.appendChild(n),n.appendChild(o),r(e.props,e.props),{popper:t,onUpdate:r}}d_.$$tippy=!0;var p_=1,m_=[],f_=[];function h_(e,t){var n,o,r,i,a,s,c,l,u=a_(e,Object.assign({},o_,i_(Fy(t)))),d=!1,p=!1,m=!1,f=!1,h=[],g=My(G,u.interactiveDebounce),v=p_++,b=(l=u.plugins).filter(function(e,t){return l.indexOf(e)===t}),$={id:v,reference:e,popper:Vy(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(o),cancelAnimationFrame(r)},setProps:function(t){if($.state.isDestroyed)return;U("onBeforeUpdate",[$,t]),H();var n=$.props,o=a_(e,Object.assign({},n,Fy(t),{ignoreAttributes:!0}));$.props=o,V(),n.interactiveDebounce!==o.interactiveDebounce&&(N(),g=My(G,o.interactiveDebounce));n.triggerTarget&&!o.triggerTarget?Zy(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):o.triggerTarget&&e.removeAttribute("aria-expanded");A(),O(),k&&k(n,o);$.popperInstance&&(X(),Y().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));U("onAfterUpdate",[$,t])},setContent:function(e){$.setProps({content:e})},show:function(){var e=$.state.isVisible,t=$.state.isDestroyed,n=!$.state.isEnabled,o=Xy.isTouch&&!$.props.touch,r=Ny($.props.duration,0,o_.duration);if(e||t||n||o)return;if(E().hasAttribute("disabled"))return;if(U("onShow",[$],!1),!1===$.props.onShow($))return;$.state.isVisible=!0,S()&&(_.style.visibility="visible");O(),Z(),$.state.isMounted||(_.style.transition="none");if(S()){var i=T();Gy([i.box,i.content],0)}s=function(){var e;if($.state.isVisible&&!f){if(f=!0,_.offsetHeight,_.style.transition=$.props.moveTransition,S()&&$.props.animation){var t=T(),n=t.box,o=t.content;Gy([n,o],r),By([n,o],"visible")}R(),A(),qy(f_,$),null==(e=$.popperInstance)||e.forceUpdate(),U("onMount",[$]),$.props.animation&&S()&&function(e,t){L(e,t)}(r,function(){$.state.isShown=!0,U("onShown",[$])})}},function(){var e,t=$.props.appendTo,n=E();e=$.props.interactive&&t===Ay||"parent"===t?n.parentNode:Py(t,[n]);e.contains(_)||e.appendChild(_);$.state.isMounted=!0,X()}()},hide:function(){var e=!$.state.isVisible,t=$.state.isDestroyed,n=!$.state.isEnabled,o=Ny($.props.duration,1,o_.duration);if(e||t||n)return;if(U("onHide",[$],!1),!1===$.props.onHide($))return;$.state.isVisible=!1,$.state.isShown=!1,f=!1,d=!1,S()&&(_.style.visibility="hidden");if(N(),q(),O(!0),S()){var r=T(),i=r.box,a=r.content;$.props.animation&&(Gy([i,a],o),By([i,a],"hidden"))}R(),A(),$.props.animation?S()&&function(e,t){L(e,function(){!$.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()})}(o,$.unmount):$.unmount()},hideWithInteractivity:function(e){z().addEventListener("mousemove",g),qy(m_,g),g(e)},enable:function(){$.state.isEnabled=!0},disable:function(){$.hide(),$.state.isEnabled=!1},unmount:function(){$.state.isVisible&&$.hide();if(!$.state.isMounted)return;Q(),Y().forEach(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);f_=f_.filter(function(e){return e!==$}),$.state.isMounted=!1,U("onHidden",[$])},destroy:function(){if($.state.isDestroyed)return;$.clearDelayTimeouts(),$.unmount(),H(),delete e._tippy,$.state.isDestroyed=!0,U("onDestroy",[$])}};if(!u.render)return $;var y=u.render($),_=y.popper,k=y.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+$.id,$.popper=_,e._tippy=$,_._tippy=$;var x=b.map(function(e){return e.fn($)}),w=e.hasAttribute("aria-expanded");return V(),A(),O(),U("onCreate",[$]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",function(){$.props.interactive&&$.state.isVisible&&$.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){$.props.interactive&&$.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",g)}),$;function I(){var e=$.props.touch;return Array.isArray(e)?e:[e,0]}function C(){return"hold"===I()[0]}function S(){var e;return!(null==(e=$.props.render)||!e.$$tippy)}function E(){return c||e}function z(){var e=E().parentNode;return e?function(e){var t,n=Zy(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}(e):document}function T(){return u_(_)}function D(e){return $.state.isMounted&&!$.state.isVisible||Xy.isTouch||i&&"focus"===i.type?0:Ny($.props.delay,e?0:1,o_.delay)}function O(e){void 0===e&&(e=!1),_.style.pointerEvents=$.props.interactive&&!e?"":"none",_.style.zIndex=""+$.props.zIndex}function U(e,t,n){var o;(void 0===n&&(n=!0),x.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(o=$.props)[e].apply(o,t)}function R(){var t=$.props.aria;if(t.content){var n="aria-"+t.content,o=_.id;Zy($.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if($.state.isVisible)e.setAttribute(n,t?t+" "+o:o);else{var r=t&&t.replace(o,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}})}}function A(){!w&&$.props.aria.expanded&&Zy($.props.triggerTarget||e).forEach(function(e){$.props.interactive?e.setAttribute("aria-expanded",$.state.isVisible&&e===E()?"true":"false"):e.removeAttribute("aria-expanded")})}function N(){z().removeEventListener("mousemove",g),m_=m_.filter(function(e){return e!==g})}function j(t){if(!Xy.isTouch||!m&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!$.props.interactive||!Ky(_,n)){if(Zy($.props.triggerTarget||e).some(function(e){return Ky(e,n)})){if(Xy.isTouch)return;if($.state.isVisible&&$.props.trigger.indexOf("click")>=0)return}else U("onClickOutside",[$,t]);!0===$.props.hideOnClick&&($.clearDelayTimeouts(),$.hide(),p=!0,setTimeout(function(){p=!1}),$.state.isMounted||q())}}}function P(){m=!0}function M(){m=!1}function Z(){var e=z();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,Ry),e.addEventListener("touchstart",M,Ry),e.addEventListener("touchmove",P,Ry)}function q(){var e=z();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,Ry),e.removeEventListener("touchstart",M,Ry),e.removeEventListener("touchmove",P,Ry)}function L(e,t){var n=T().box;function o(e){e.target===n&&(Wy(n,"remove",o),t())}if(0===e)return t();Wy(n,"remove",a),Wy(n,"add",o),a=o}function F(t,n,o){void 0===o&&(o=!1),Zy($.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,o),h.push({node:e,eventType:t,handler:n,options:o})})}function V(){var e;C()&&(F("touchstart",J,{passive:!0}),F("touchend",B,{passive:!0})),(e=$.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(F(e,J),e){case"mouseenter":F("mouseleave",B);break;case"focus":F(n_?"focusout":"blur",W);break;case"focusin":F("focusout",W)}})}function H(){h.forEach(function(e){var t=e.node,n=e.eventType,o=e.handler,r=e.options;t.removeEventListener(n,o,r)}),h=[]}function J(e){var t,n=!1;if($.state.isEnabled&&!K(e)&&!p){var o="focus"===(null==(t=i)?void 0:t.type);i=e,c=e.currentTarget,A(),!$.state.isVisible&&jy(e,"MouseEvent")&&m_.forEach(function(t){return t(e)}),"click"===e.type&&($.props.trigger.indexOf("mouseenter")<0||d)&&!1!==$.props.hideOnClick&&$.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!o&&te(e)}}function G(e){var t=e.target,n=E().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var o=Y().concat(_).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null}).filter(Boolean);(function(e,t){var n=t.clientX,o=t.clientY;return e.every(function(e){var t=e.popperRect,r=e.popperState,i=e.props.interactiveBorder,a=r.placement.split("-")[0],s=r.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-o+c>i,m=o-t.bottom-l>i,f=t.left-n+u>i,h=n-t.right-d>i;return p||m||f||h})})(o,e)&&(N(),te(e))}}function B(e){K(e)||$.props.trigger.indexOf("click")>=0&&d||($.props.interactive?$.hideWithInteractivity(e):te(e))}function W(e){$.props.trigger.indexOf("focusin")<0&&e.target!==E()||$.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function K(e){return!!Xy.isTouch&&C()!==e.type.indexOf("touch")>=0}function X(){Q();var t=$.props,n=t.popperOptions,o=t.placement,r=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=S()?u_(_).arrow:null,l=i?{getBoundingClientRect:i,contextElement:i.contextElement||E()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=T().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];S()&&c&&d.push({name:"arrow",options:{element:c,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),$.popperInstance=Ty(l,_,Object.assign({},n,{placement:o,onFirstUpdate:s,modifiers:d}))}function Q(){$.popperInstance&&($.popperInstance.destroy(),$.popperInstance=null)}function Y(){return Ly(_.querySelectorAll("[data-tippy-root]"))}function ee(e){$.clearDelayTimeouts(),e&&U("onTrigger",[$,e]),Z();var t=D(!0),o=I(),r=o[0],i=o[1];Xy.isTouch&&"hold"===r&&i&&(t=i),t?n=setTimeout(function(){$.show()},t):$.show()}function te(e){if($.clearDelayTimeouts(),U("onUntrigger",[$,e]),$.state.isVisible){if(!($.props.trigger.indexOf("mouseenter")>=0&&$.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=D(!1);t?o=setTimeout(function(){$.state.isVisible&&$.hide()},t):r=requestAnimationFrame(function(){$.hide()})}}else q()}}function g_(e,t){void 0===t&&(t={});var n=o_.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Yy,Ry),window.addEventListener("blur",t_);var o=Object.assign({},t,{plugins:n}),r=Jy(e).reduce(function(e,t){var n=t&&h_(t,o);return n&&e.push(n),e},[]);return Hy(e)?r[0]:r}g_.defaultProps=o_,g_.setDefaultProps=function(e){Object.keys(e).forEach(function(t){o_[t]=e[t]})},g_.currentInput=Xy,Object.assign({},O$,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),g_.setDefaultProps({render:d_});const v_=e=>({}),b_=e=>({trigger:e[2]}),$_=e=>({}),y_=e=>({trigger:e[2]});function __(e){let t,n,o;const r=e[6].default,i=eh(r,e,e[5],y_),a=e[6].content,s=eh(a,e,e[5],b_),c=s||function(e){let t;return{c(){t=mh(e[0])},m(e,n){lh(e,t,n)},p(e,n){1&n&&yh(t,e[0])},d(e){e&&uh(t)}}}(e);return{c(){i&&i.c(),t=fh(),n=dh("div"),c&&c.c(),kh(n,"display","none")},m(r,a){i&&i.m(r,a),lh(r,t,a),lh(r,n,a),c&&c.m(n,null),e[7](n),o=!0},p(e,[t]){i&&i.p&&(!o||32&t)&&oh(i,r,e,e[5],o?nh(r,e[5],t,$_):rh(e[5]),y_),s?s.p&&(!o||32&t)&&oh(s,a,e,e[5],o?nh(a,e[5],t,v_):rh(e[5]),b_):c&&c.p&&(!o||1&t)&&c.p(e,o?t:-1)},i(e){o||(Jh(i,e),Jh(c,e),o=!0)},o(e){Gh(i,e),Gh(c,e),o=!1},d(o){i&&i.d(o),o&&uh(t),o&&uh(n),c&&c.d(o),e[7](null)}}}function k_(e,t,n){const o=["text","disabled"];let r,i,a,s=ih(t,o),{$$slots:c={},$$scope:l}=t,{text:u=""}=t,{disabled:d=!1}=t;return zh(()=>{r&&(n(4,a=g_(r,{...s,content:i})),i.style.removeProperty("display"))}),e.$$set=e=>{t=Gf(Gf({},t),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),n(9,s=ih(t,o)),"text"in e&&n(0,u=e.text),"disabled"in e&&n(3,d=e.disabled),"$$scope"in e&&n(5,l=e.$$scope)},e.$$.update=()=>{24&e.$$.dirty&&a&&(d?a.disable():a.enable())},[u,i,e=>{r=e},d,a,l,c,function(e){Dh[e?"unshift":"push"](()=>{i=e,n(1,i)})}]}class x_ extends eg{constructor(e){super(),Yh(this,e,k_,__,Qf,{text:0,disabled:3})}}function w_(e){ch(e,"svelte-wb18kg","svg.svelte-wb18kg{opacity:var(--tooltip-opacity, 1);color:var(--text-color)}")}function I_(e){let t,n,o,r;return{c(){t=ph("svg"),n=ph("path"),vh(n,"fill","currentColor"),vh(n,"d","M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"),vh(t,"class","tooltip svelte-wb18kg"),kh(t,"width","1rem"),kh(t,"height","1rem"),vh(t,"viewBox","0 0 24 24")},m(i,a){lh(i,t,a),sh(t,n),o||(r=ah(e[9].call(null,t)),o=!0)},p:Jf,d(e){e&&uh(t),o=!1,r()}}}function C_(e){let t,n,o,r;return{c(){t=dh("br"),n=fh(),o=dh("a"),r=mh("Read more."),vh(o,"href",e[0]),vh(o,"target",e[3]?void 0:"_blank"),vh(o,"rel",e[3]?void 0:"noopener noreferrer")},m(e,i){lh(e,t,i),lh(e,n,i),lh(e,o,i),sh(o,r)},p(e,t){1&t&&vh(o,"href",e[0])},d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function S_(e){let t,n,o;const r=e[6].default,i=eh(r,e,e[7],null);let a=e[2]&&C_(e);return{c(){t=dh("div"),i&&i.c(),n=fh(),a&&a.c(),vh(t,"slot","content")},m(e,r){lh(e,t,r),i&&i.m(t,null),sh(t,n),a&&a.m(t,null),o=!0},p(e,n){i&&i.p&&(!o||128&n)&&oh(i,r,e,e[7],o?nh(r,e[7],n,null):rh(e[7]),null),e[2]?a?a.p(e,n):(a=C_(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i(e){o||(Jh(i,e),o=!0)},o(e){Gh(i,e),o=!1},d(e){e&&uh(t),i&&i.d(e),a&&a.d()}}}function E_(e){let t,n;return t=new x_({props:{interactive:!0,placement:e[1],theme:"light border",maxWidth:"22em",$$slots:{content:[S_,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0],default:[I_,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){Wh(t.$$.fragment)},m(e,o){Kh(t,e,o),n=!0},p(e,[n]){const o={};2&n&&(o.placement=e[1]),133&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Jh(t.$$.fragment,e),n=!0)},o(e){Gh(t.$$.fragment,e),n=!1},d(e){Xh(t,e)}}}function z_(e,t,n){let o,r,{$$slots:i={},$$scope:a}=t,{link:s}=t,{placement:c="right"}=t;const l=(u=lg,Eh().$$.context.get(u));var u;const d=null!=l,p=l??function(e,t){return{subscribe:ng(e,t).subscribe}}({canOpen:!1});return Yf(e,p,e=>n(5,r=e)),e.$$set=e=>{"link"in e&&n(0,s=e.link),"placement"in e&&n(1,c=e.placement),"$$scope"in e&&n(7,a=e.$$scope)},e.$$.update=()=>{33&e.$$.dirty&&n(2,o=null!=s&&(!d||r.canOpen))},[s,c,o,d,p,r,i,a]}class T_ extends eg{constructor(e){super(),Yh(this,e,z_,E_,Qf,{link:0,placement:1},w_)}}function D_(e){let t,n,o;return{c(){t=dh("input"),vh(t,"type","checkbox"),t.disabled=e[1]},m(r,i){lh(r,t,i),t.checked=e[0],n||(o=gh(t,"change",e[6]),n=!0)},p(e,[n]){2&n&&(t.disabled=e[1]),1&n&&(t.checked=e[0])},i:Jf,o:Jf,d(e){e&&uh(t),n=!1,o()}}}function O_(e,t,n){let{value:o=!1}=t,{checked:r=!1!==o}=t,{defaultValue:i}=t,{disabled:a}=t,s=r,c=o||i;return e.$$set=e=>{"value"in e&&n(2,o=e.value),"checked"in e&&n(0,r=e.checked),"defaultValue"in e&&n(3,i=e.defaultValue),"disabled"in e&&n(1,a=e.disabled)},e.$$.update=()=>{53&e.$$.dirty&&(s?r?!1===o&&n(0,r=!1):n(2,o=!1):r?n(2,o=c):!1!==o&&n(0,r=!0),n(4,s=r),n(5,c=o||c))},[r,a,o,i,s,c,function(){r=this.checked,n(0,r),n(4,s),n(5,c),n(2,o)}]}class U_ extends eg{constructor(e){super(),Yh(this,e,O_,D_,Qf,{value:2,checked:0,defaultValue:3,disabled:1})}}const R_="has-error";function A_(e,t){const n=g_(e,{placement:"right",theme:"light-red border",trigger:"manual",hideOnClick:!1,interactive:!0});function o(t){t?(n.setContent(t),n.show(),e.classList.add(R_)):(n.hide(),e.classList.remove(R_))}return o(t),{update:o,destroy:n.destroy}}function N_(e){let t,n;return{c(){t=ph("svg"),n=ph("path"),vh(n,"d","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"),vh(t,"class","keepcolor"),vh(t,"width","9"),vh(t,"height","9"),vh(t,"xmlns","http://www.w3.org/2000/svg"),vh(t,"viewBox","0 0 320 512")},m(e,o){lh(e,t,o),sh(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&uh(t)}}}class j_ extends eg{constructor(e){super(),Yh(this,e,null,N_,Qf,{})}}function P_(e){let t,n;return{c(){t=ph("svg"),n=ph("path"),vh(n,"d","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"),vh(t,"class","keepcolor"),vh(t,"width","9"),vh(t,"height","9"),vh(t,"xmlns","http://www.w3.org/2000/svg"),vh(t,"viewBox","0 0 512 512")},m(e,o){lh(e,t,o),sh(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&uh(t)}}}class M_ extends eg{constructor(e){super(),Yh(this,e,null,P_,Qf,{})}}function Z_(e){let t,n,o,r;const i=[L_,q_],a=[];function s(e,t){return"checkbox"===e[3]?0:"toggleradio"===e[3]?1:-1}return~(n=s(e))&&(o=a[n]=i[n](e)),{c(){t=dh("span"),o&&o.c(),vh(t,"class","mr-2")},m(e,o){lh(e,t,o),~n&&a[n].m(t,null),r=!0},p(e,r){let c=n;n=s(e),n===c?~n&&a[n].p(e,r):(o&&(Vh(),Gh(a[c],1,1,()=>{a[c]=null}),Hh()),~n?(o=a[n],o?o.p(e,r):(o=a[n]=i[n](e),o.c()),Jh(o,1),o.m(t,null)):o=null)},i(e){r||(Jh(o),r=!0)},o(e){Gh(o),r=!1},d(e){e&&uh(t),~n&&a[n].d()}}}function q_(e){let t,n,o;function r(t){e[19](t)}let i={defaultValue:e[4],disabled:e[7]||e[9]};return void 0!==e[1]&&(i.value=e[1]),t=new U_({props:i}),Dh.push(()=>Bh(t,"value",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,o){const r={};16&o&&(r.defaultValue=e[4]),640&o&&(r.disabled=e[7]||e[9]),!n&&2&o&&(n=!0,r.value=e[1],jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function L_(e){let t,n,o,r;return{c(){t=dh("input"),vh(t,"type","checkbox"),t.disabled=n=e[7]||e[9]},m(n,i){lh(n,t,i),t.checked=e[0],o||(r=gh(t,"change",e[18]),o=!0)},p(e,o){640&o&&n!==(n=e[7]||e[9])&&(t.disabled=n),1&o&&(t.checked=e[0])},i:Jf,o:Jf,d(e){e&&uh(t),o=!1,r()}}}function F_(e){let t,n;return t=new j_({}),{c(){Wh(t.$$.fragment)},m(e,o){Kh(t,e,o),n=!0},i(e){n||(Jh(t.$$.fragment,e),n=!0)},o(e){Gh(t.$$.fragment,e),n=!1},d(e){Xh(t,e)}}}function V_(e){let t,n;return t=new M_({}),{c(){Wh(t.$$.fragment)},m(e,o){Kh(t,e,o),n=!0},i(e){n||(Jh(t.$$.fragment,e),n=!0)},o(e){Gh(t.$$.fragment,e),n=!1},d(e){Xh(t,e)}}}function H_(e){let t,n;return{c(){t=new wh(!1),n=hh(),t.a=n},m(o,r){t.m(e[5],o,r),lh(o,n,r)},p(e,n){32&n&&t.p(e[5])},d(e){e&&uh(n),e&&t.d()}}}function J_(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S="section"!==e[3]&&Z_(e);const E=[V_,F_],z=[];function T(e,t){return e[11]?0:1}d=T(e),p=z[d]=E[d](e),h=new T_({props:{link:e[6],$$slots:{default:[H_]},$$scope:{ctx:e}}});const D=e[17].default,O=eh(D,e,e[20],null);return{c(){t=dh("section"),n=dh("h1"),o=dh("label"),r=dh("div"),S&&S.c(),i=fh(),a=dh("span"),s=mh(e[2]),c=fh(),l=dh("div"),u=dh("button"),p.c(),f=fh(),Wh(h.$$.fragment),v=fh(),b=dh("div"),$=dh("span"),_=fh(),k=dh("div"),O&&O.c(),vh(r,"class","flex items-center"),vh(u,"class","px-1 bg-transparent border-0 mr-2"),vh(u,"aria-label",m=e[11]?"Collapse section":"Expand section"),vh(l,"class","flex items-center"),vh(o,"class","items-center tooltip-container pr-2 flex justify-between"),vh($,"class","italic"),vh(b,"class","text-sm text-gray-500"),b.hidden=y=!e[7]||void 0===e[8],k.hidden=x=!e[11],vh(t,"class","controls-section")},m(p,m){var y;lh(p,t,m),sh(t,n),sh(n,o),sh(o,r),S&&S.m(r,null),sh(r,i),sh(r,a),sh(a,s),sh(o,c),sh(o,l),sh(l,u),z[d].m(u,null),sh(l,f),Kh(h,l,null),sh(t,v),sh(t,b),sh(b,$),$.innerHTML=e[8],sh(t,_),sh(t,k),O&&O.m(k,null),w=!0,I||(C=[gh(u,"click",(y=e[12],function(e){return e.preventDefault(),y.call(this,e)})),ah(g=A_.call(null,o,e[10]))],I=!0)},p(e,[t]){"section"!==e[3]?S?(S.p(e,t),8&t&&Jh(S,1)):(S=Z_(e),S.c(),Jh(S,1),S.m(r,i)):S&&(Vh(),Gh(S,1,1,()=>{S=null}),Hh()),(!w||4&t)&&yh(s,e[2]);let n=d;d=T(e),d!==n&&(Vh(),Gh(z[n],1,1,()=>{z[n]=null}),Hh(),p=z[d],p||(p=z[d]=E[d](e),p.c()),Jh(p,1),p.m(u,null)),(!w||2048&t&&m!==(m=e[11]?"Collapse section":"Expand section"))&&vh(u,"aria-label",m);const o={};64&t&&(o.link=e[6]),1048608&t&&(o.$$scope={dirty:t,ctx:e}),h.$set(o),g&&Xf(g.update)&&1024&t&&g.update.call(null,e[10]),(!w||256&t)&&($.innerHTML=e[8]),(!w||384&t&&y!==(y=!e[7]||void 0===e[8]))&&(b.hidden=y),O&&O.p&&(!w||1048576&t)&&oh(O,D,e,e[20],w?nh(D,e[20],t,null):rh(e[20]),null),(!w||2048&t&&x!==(x=!e[11]))&&(k.hidden=x)},i(e){w||(Jh(S),Jh(p),Jh(h.$$.fragment,e),Jh(O,e),w=!0)},o(e){Gh(S),Gh(p),Gh(h.$$.fragment,e),Gh(O,e),w=!1},d(e){e&&uh(t),S&&S.d(),z[d].d(),Xh(h),O&&O.d(e),I=!1,Kf(C)}}}function G_(e,t,n){let o,r,{$$slots:i={},$$scope:a}=t,{label:s}=t,{type:c}=t,{checkboxChecked:l}=t,{toggleRadioValue:u}=t,{toggleRadioDefaultValue:d}=t,{helpContent:p}=t,{helpLink:m}=t,{disabled:f}=t,{disabledReason:h}=t,{required:g}=t,{error:v}=t,b=!1,$=g,y=r;return e.$$set=e=>{"label"in e&&n(2,s=e.label),"type"in e&&n(3,c=e.type),"checkboxChecked"in e&&n(0,l=e.checkboxChecked),"toggleRadioValue"in e&&n(1,u=e.toggleRadioValue),"toggleRadioDefaultValue"in e&&n(4,d=e.toggleRadioDefaultValue),"helpContent"in e&&n(5,p=e.helpContent),"helpLink"in e&&n(6,m=e.helpLink),"disabled"in e&&n(7,f=e.disabled),"disabledReason"in e&&n(8,h=e.disabledReason),"required"in e&&n(9,g=e.required),"error"in e&&n(10,v=e.error),"$$scope"in e&&n(20,a=e.$$scope)},e.$$.update=()=>{1024&e.$$.dirty&&n(16,o=void 0!==v),3&e.$$.dirty&&n(15,r=!(!l&&!u)),123392&e.$$.dirty&&((o||!y&&r||!$&&g)&&n(11,b=!0),n(13,$=g),n(14,y=r))},[l,u,s,c,d,p,m,f,h,g,v,b,function(){n(11,b=!b||o)},$,y,r,o,i,function(){l=this.checked,n(0,l)},function(e){u=e,n(1,u)},a]}class B_ extends eg{constructor(e){super(),Yh(this,e,G_,J_,Qf,{label:2,type:3,checkboxChecked:0,toggleRadioValue:1,toggleRadioDefaultValue:4,helpContent:5,helpLink:6,disabled:7,disabledReason:8,required:9,error:10})}}function W_(e){let t;const n=e[9].default,o=eh(n,e,e[11],null);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,r){o&&o.p&&(!t||2048&r)&&oh(o,n,e,e[11],t?nh(n,e[11],r,null):rh(e[11]),null)},i(e){t||(Jh(o,e),t=!0)},o(e){Gh(o,e),t=!1},d(e){o&&o.d(e)}}}function K_(e){let t,n,o;function r(t){e[10](t)}let i={type:"toggleradio",label:e[1],toggleRadioDefaultValue:e[2],helpContent:e[3],helpLink:e[4],disabled:e[5],disabledReason:e[6],required:e[7],error:e[8],$$slots:{default:[W_]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.toggleRadioValue=e[0]),t=new B_({props:i}),Dh.push(()=>Bh(t,"toggleRadioValue",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.label=e[1]),4&o&&(r.toggleRadioDefaultValue=e[2]),8&o&&(r.helpContent=e[3]),16&o&&(r.helpLink=e[4]),32&o&&(r.disabled=e[5]),64&o&&(r.disabledReason=e[6]),128&o&&(r.required=e[7]),256&o&&(r.error=e[8]),2048&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.toggleRadioValue=e[0],jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function X_(e,t,n){let{$$slots:o={},$$scope:r}=t,{label:i}=t,{value:a}=t,{defaultValue:s}=t,{helpContent:c}=t,{helpLink:l}=t,{disabled:u=!1}=t,{disabledReason:d}=t,{required:p=!1}=t,{error:m}=t;return e.$$set=e=>{"label"in e&&n(1,i=e.label),"value"in e&&n(0,a=e.value),"defaultValue"in e&&n(2,s=e.defaultValue),"helpContent"in e&&n(3,c=e.helpContent),"helpLink"in e&&n(4,l=e.helpLink),"disabled"in e&&n(5,u=e.disabled),"disabledReason"in e&&n(6,d=e.disabledReason),"required"in e&&n(7,p=e.required),"error"in e&&n(8,m=e.error),"$$scope"in e&&n(11,r=e.$$scope)},[a,i,s,c,l,u,d,p,m,o,function(e){a=e,n(0,a)},r]}class Q_ extends eg{constructor(e){super(),Yh(this,e,X_,K_,Qf,{label:1,value:0,defaultValue:2,helpContent:3,helpLink:4,disabled:5,disabledReason:6,required:7,error:8})}}function Y_(e){let t;return{c(){t=mh("Simple mechanism with a single account authorized for all privileged actions.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ek(e){let t;return{c(){t=mh("Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function tk(e){let t;return{c(){t=mh("Provides additional enforced security measures on top of standard Roles mechanism for managing the most\n privileged role: default admin.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function nk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C;return r=new T_({props:{$$slots:{default:[ok]},$$scope:{ctx:e}}}),p=new T_({props:{$$slots:{default:[rk]},$$scope:{ctx:e}}}),y=new T_({props:{$$slots:{default:[ik]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("span"),o=mh("Initial delay\n "),Wh(r.$$.fragment),i=fh(),a=dh("input"),c=fh(),l=dh("label"),u=dh("span"),d=mh("Default admin delay increase\n "),Wh(p.$$.fragment),m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),$=mh("Max default admin transfer delay\n "),Wh(y.$$.fragment),_=fh(),k=dh("input"),vh(n,"class","flex justify-between pr-2"),vh(a,"placeholder",""),vh(t,"class","labeled-input"),vh(u,"class","flex justify-between pr-2"),vh(f,"placeholder",""),vh(l,"class","labeled-input"),vh(b,"class","flex justify-between pr-2"),vh(k,"placeholder",""),vh(v,"class","labeled-input")},m(S,E){lh(S,t,E),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),_h(a,e[1]),lh(S,c,E),lh(S,l,E),sh(l,u),sh(u,d),Kh(p,u,null),sh(l,m),sh(l,f),_h(f,e[2]),lh(S,g,E),lh(S,v,E),sh(v,b),sh(b,$),Kh(y,b,null),sh(v,_),sh(v,k),_h(k,e[3]),w=!0,I||(C=[gh(a,"input",e[13]),ah(s=A_.call(null,a,e[5]?.darInitialDelay)),gh(f,"input",e[14]),ah(h=A_.call(null,f,e[5]?.darDefaultDelayIncrease)),gh(k,"input",e[15]),ah(x=A_.call(null,k,e[5]?.darMaxTransferDelay))],I=!0)},p(e,t){const n={};131072&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),2&t&&a.value!==e[1]&&_h(a,e[1]),s&&Xf(s.update)&&32&t&&s.update.call(null,e[5]?.darInitialDelay);const o={};131072&t&&(o.$$scope={dirty:t,ctx:e}),p.$set(o),4&t&&f.value!==e[2]&&_h(f,e[2]),h&&Xf(h.update)&&32&t&&h.update.call(null,e[5]?.darDefaultDelayIncrease);const i={};131072&t&&(i.$$scope={dirty:t,ctx:e}),y.$set(i),8&t&&k.value!==e[3]&&_h(k,e[3]),x&&Xf(x.update)&&32&t&&x.update.call(null,e[5]?.darMaxTransferDelay)},i(e){w||(Jh(r.$$.fragment,e),Jh(p.$$.fragment,e),Jh(y.$$.fragment,e),w=!0)},o(e){Gh(r.$$.fragment,e),Gh(p.$$.fragment,e),Gh(y.$$.fragment,e),w=!1},d(e){e&&uh(t),Xh(r),e&&uh(c),e&&uh(l),Xh(p),e&&uh(g),e&&uh(v),Xh(y),I=!1,Kf(C)}}}function ok(e){let t;return{c(){t=mh("The initial delay before the default admin can be assigned.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function rk(e){let t;return{c(){t=mh("The duration by which the delay for the default admin increases after each assignment.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ik(e){let t;return{c(){t=mh("The maximum delay in seconds for a default admin transfer.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ak(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_;i=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/access#ownership-and-ownable",$$slots:{default:[Y_]},$$scope:{ctx:e}}}),u=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/access#role-based-accesscontrol",$$slots:{default:[ek]},$$scope:{ctx:e}}}),h=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/access#AccessControlDefaultAdminRulesComponent",$$slots:{default:[tk]},$$scope:{ctx:e}}});let k="roles-dar"===e[0]&&nk(e);return $=bh(e[10][0]),{c(){t=dh("div"),n=dh("label"),o=dh("input"),r=mh("\n Ownable\n "),Wh(i.$$.fragment),a=fh(),s=dh("label"),c=dh("input"),l=mh("\n Roles\n "),Wh(u.$$.fragment),d=fh(),p=dh("label"),m=dh("input"),f=mh("\n Roles (Default Admin Rules)\n "),Wh(h.$$.fragment),g=fh(),k&&k.c(),v=hh(),vh(o,"type","radio"),o.__value="ownable",o.value=o.__value,xh(n,"checked","ownable"===e[0]),vh(c,"type","radio"),c.__value="roles",c.value=c.__value,xh(s,"checked","roles"===e[0]),vh(m,"type","radio"),m.__value="roles-dar",m.value=m.__value,xh(p,"checked","roles-dar"===e[0]),vh(t,"class","checkbox-group"),$.p(o,c,m)},m($,x){lh($,t,x),sh(t,n),sh(n,o),o.checked=o.__value===e[0],sh(n,r),Kh(i,n,null),sh(t,a),sh(t,s),sh(s,c),c.checked=c.__value===e[0],sh(s,l),Kh(u,s,null),sh(t,d),sh(t,p),sh(p,m),m.checked=m.__value===e[0],sh(p,f),Kh(h,p,null),lh($,g,x),k&&k.m($,x),lh($,v,x),b=!0,y||(_=[gh(o,"change",e[9]),gh(c,"change",e[11]),gh(m,"change",e[12])],y=!0)},p(e,t){1&t&&(o.checked=o.__value===e[0]);const r={};131072&t&&(r.$$scope={dirty:t,ctx:e}),i.$set(r),(!b||1&t)&&xh(n,"checked","ownable"===e[0]),1&t&&(c.checked=c.__value===e[0]);const a={};131072&t&&(a.$$scope={dirty:t,ctx:e}),u.$set(a),(!b||1&t)&&xh(s,"checked","roles"===e[0]),1&t&&(m.checked=m.__value===e[0]);const l={};131072&t&&(l.$$scope={dirty:t,ctx:e}),h.$set(l),(!b||1&t)&&xh(p,"checked","roles-dar"===e[0]),"roles-dar"===e[0]?k?(k.p(e,t),1&t&&Jh(k,1)):(k=nk(e),k.c(),Jh(k,1),k.m(v.parentNode,v)):k&&(Vh(),Gh(k,1,1,()=>{k=null}),Hh())},i(e){b||(Jh(i.$$.fragment,e),Jh(u.$$.fragment,e),Jh(h.$$.fragment,e),Jh(k),b=!0)},o(e){Gh(i.$$.fragment,e),Gh(u.$$.fragment,e),Gh(h.$$.fragment,e),Gh(k),b=!1},d(e){e&&uh(t),Xh(i),Xh(u),Xh(h),e&&uh(g),k&&k.d(e),e&&uh(v),$.r(),y=!1,Kf(_)}}}function sk(e){let t,n,o;function r(t){e[16](t)}let i={label:"Access Control",defaultValue:"ownable",helpContent:"Restrict who can access the functions of a contract or when they can do it.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/4.x/access",required:e[4],$$slots:{default:[ak]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.value=e[0]),t=new Q_({props:i}),Dh.push(()=>Bh(t,"value",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,[o]){const r={};16&o&&(r.required=e[4]),131119&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.value=e[0],jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function ck(e,t,n){let{accessType:o}=t,{darInitialDelay:r}=t,{darDefaultDelayIncrease:i}=t,{darMaxTransferDelay:a}=t,{required:s}=t,{errors:c}=t,l="ownable",u=s,d=o;return e.$$set=e=>{"accessType"in e&&n(0,o=e.accessType),"darInitialDelay"in e&&n(1,r=e.darInitialDelay),"darDefaultDelayIncrease"in e&&n(2,i=e.darDefaultDelayIncrease),"darMaxTransferDelay"in e&&n(3,a=e.darMaxTransferDelay),"required"in e&&n(4,s=e.required),"errors"in e&&n(5,c=e.errors)},e.$$.update=()=>{465&e.$$.dirty&&(u&&!s?n(0,o=d):(n(8,d=o),!1===o&&s&&n(0,o=l)),n(7,u=s),!1!==o&&n(6,l=o))},[o,r,i,a,s,c,l,u,d,function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},[[]],function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},function(){r=this.value,n(1,r)},function(){i=this.value,n(2,i)},function(){a=this.value,n(3,a)},function(e){o=e,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)}]}class lk extends eg{constructor(e){super(),Yh(this,e,ck,sk,Qf,{accessType:0,darInitialDelay:1,darDefaultDelayIncrease:2,darMaxTransferDelay:3,required:4,errors:5})}}function uk(e){let t;return{c(){t=mh("Smart contracts are immutable by default unless they include code that allows them to be upgraded.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function dk(e){let t,n,o,r,i,a,s;return r=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/upgrades",$$slots:{default:[uk]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("input"),o=mh("\n Upgradeable\n "),Wh(r.$$.fragment),vh(n,"type","checkbox"),xh(t,"checked",e[0])},m(c,l){lh(c,t,l),sh(t,n),n.checked=e[0],sh(t,o),Kh(r,t,null),i=!0,a||(s=gh(n,"change",e[1]),a=!0)},p(e,[o]){1&o&&(n.checked=e[0]);const a={};4&o&&(a.$$scope={dirty:o,ctx:e}),r.$set(a),(!i||1&o)&&xh(t,"checked",e[0])},i(e){i||(Jh(r.$$.fragment,e),i=!0)},o(e){Gh(r.$$.fragment,e),i=!1},d(e){e&&uh(t),Xh(r),a=!1,s()}}}function pk(e,t,n){let{upgradeable:o}=t;return e.$$set=e=>{"upgradeable"in e&&n(0,o=e.upgradeable)},[o,function(){o=this.checked,n(0,o)}]}class mk extends eg{constructor(e){super(),Yh(this,e,pk,dk,Qf,{upgradeable:0})}}function fk(e){let t;return{c(){t=mh("Where people can contact you to report security issues. Will only be visible if contract metadata is verified.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function hk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$;return s=new T_({props:{$$slots:{default:[fk]},$$scope:{ctx:e}}}),{c(){t=dh("section"),n=dh("h1"),n.innerHTML='<label class="flex items-center tooltip-container pr-2"><span>Info</span></label>',o=fh(),r=dh("label"),i=dh("span"),a=mh("Security Contact\n "),Wh(s.$$.fragment),c=fh(),l=dh("input"),d=fh(),p=dh("label"),m=dh("span"),m.textContent="License",f=fh(),h=dh("input"),vh(i,"class","flex justify-between pr-2"),vh(l,"placeholder","security@example.com"),vh(r,"class","labeled-input"),vh(h,"placeholder",fv.license),vh(p,"class","labeled-input"),vh(t,"class","controls-section")},m(y,_){lh(y,t,_),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(i,a),Kh(s,i,null),sh(r,c),sh(r,l),_h(l,e[0].securityContact),sh(t,d),sh(t,p),sh(p,m),sh(p,f),sh(p,h),_h(h,e[0].license),v=!0,b||($=[gh(l,"input",e[2]),ah(u=A_.call(null,l,e[1]?.securityContact)),gh(h,"input",e[3]),ah(g=A_.call(null,h,e[1]?.license))],b=!0)},p(e,[t]){const n={};16&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n),1&t&&l.value!==e[0].securityContact&&_h(l,e[0].securityContact),u&&Xf(u.update)&&2&t&&u.update.call(null,e[1]?.securityContact),1&t&&h.value!==e[0].license&&_h(h,e[0].license),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.license)},i(e){v||(Jh(s.$$.fragment,e),v=!0)},o(e){Gh(s.$$.fragment,e),v=!1},d(e){e&&uh(t),Xh(s),b=!1,Kf($)}}}function gk(e,t,n){let{info:o}=t,{errors:r}=t;return e.$$set=e=>{"info"in e&&n(0,o=e.info),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.securityContact=this.value,n(0,o)},function(){o.license=this.value,n(0,o)}]}class vk extends eg{constructor(e){super(),Yh(this,e,gk,hk,Qf,{info:0,errors:1})}}function bk(e){let t,n,o;return{c(){t=mh("In order to compile Cairo contracts with macros enabled, you need to have the Rust toolchain installed and "),n=dh("code"),n.textContent="openzeppelin_macros",o=mh(" package added as a dependency.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function $k(e){let t,n,o;return{c(){t=mh("Use the "),n=dh("code"),n.textContent="with_components",o=mh(" macro for simplified contract structure.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function yk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h;return a=new T_({props:{$$slots:{default:[bk]},$$scope:{ctx:e}}}),p=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/macros/with_components",$$slots:{default:[$k]},$$scope:{ctx:e}}}),{c(){t=dh("section"),n=dh("h1"),o=dh("div"),r=dh("span"),r.textContent="Macros",i=fh(),Wh(a.$$.fragment),s=fh(),c=dh("div"),l=dh("label"),u=dh("input"),d=mh("\n with_components\n "),Wh(p.$$.fragment),vh(o,"class","items-center tooltip-container pr-2 flex justify-between"),vh(u,"type","checkbox"),xh(l,"checked",e[0].withComponents),vh(c,"class","checkbox-group"),vh(t,"class","controls-section")},m(g,v){lh(g,t,v),sh(t,n),sh(n,o),sh(o,r),sh(o,i),Kh(a,o,null),sh(t,s),sh(t,c),sh(c,l),sh(l,u),u.checked=e[0].withComponents,sh(l,d),Kh(p,l,null),m=!0,f||(h=gh(u,"change",e[1]),f=!0)},p(e,[t]){const n={};4&t&&(n.$$scope={dirty:t,ctx:e}),a.$set(n),1&t&&(u.checked=e[0].withComponents);const o={};4&t&&(o.$$scope={dirty:t,ctx:e}),p.$set(o),(!m||1&t)&&xh(l,"checked",e[0].withComponents)},i(e){m||(Jh(a.$$.fragment,e),Jh(p.$$.fragment,e),m=!0)},o(e){Gh(a.$$.fragment,e),Gh(p.$$.fragment,e),m=!1},d(e){e&&uh(t),Xh(a),Xh(p),f=!1,h()}}}function _k(e,t,n){let{macros:o}=t;return e.$$set=e=>{"macros"in e&&n(0,o=e.macros)},[o,function(){o.withComponents=this.checked,n(0,o)}]}class kk extends eg{constructor(e){super(),Yh(this,e,_k,yk,Qf,{macros:0})}}function xk(e){let t;const n=e[8].default,o=eh(n,e,e[10],null);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,r){o&&o.p&&(!t||1024&r)&&oh(o,n,e,e[10],t?nh(n,e[10],r,null):rh(e[10]),null)},i(e){t||(Jh(o,e),t=!0)},o(e){Gh(o,e),t=!1},d(e){o&&o.d(e)}}}function wk(e){let t,n,o;function r(t){e[9](t)}let i={type:"checkbox",label:e[1],helpContent:e[2],helpLink:e[3],disabled:e[4],disabledReason:e[5],required:e[6],error:e[7],$$slots:{default:[xk]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.checkboxChecked=e[0]),t=new B_({props:i}),Dh.push(()=>Bh(t,"checkboxChecked",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.label=e[1]),4&o&&(r.helpContent=e[2]),8&o&&(r.helpLink=e[3]),16&o&&(r.disabled=e[4]),32&o&&(r.disabledReason=e[5]),64&o&&(r.required=e[6]),128&o&&(r.error=e[7]),1024&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.checkboxChecked=e[0],jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function Ik(e,t,n){let{$$slots:o={},$$scope:r}=t,{label:i}=t,{checked:a}=t,{helpContent:s}=t,{helpLink:c}=t,{disabled:l=!1}=t,{disabledReason:u}=t,{required:d=!1}=t,{error:p}=t;return e.$$set=e=>{"label"in e&&n(1,i=e.label),"checked"in e&&n(0,a=e.checked),"helpContent"in e&&n(2,s=e.helpContent),"helpLink"in e&&n(3,c=e.helpLink),"disabled"in e&&n(4,l=e.disabled),"disabledReason"in e&&n(5,u=e.disabledReason),"required"in e&&n(6,d=e.required),"error"in e&&n(7,p=e.error),"$$scope"in e&&n(10,r=e.$$scope)},[a,i,s,c,l,u,d,p,o,function(e){a=e,n(0,a)},r]}class Ck extends eg{constructor(e){super(),Yh(this,e,Ik,wk,Qf,{label:1,checked:0,helpContent:2,helpLink:3,disabled:4,disabledReason:5,required:6,error:7})}}function Sk(e){const t=()=>{if(""===e.value)return;const t=window.getComputedStyle(e),n=Ek(e.value,t),o=`calc(5px + max(${Ek(e.placeholder,t)}, ${n}) + ${["padding-left","padding-right","border-left-width","border-right-width"].map(e=>t.getPropertyValue(e)).join(" + ")})`;e.style.setProperty("width",o)};t(),e.addEventListener("input",t)}function Ek(e,t){const n=["font-size","font-family"].map(e=>t.getPropertyValue(e)).join(" "),o=document.createElement("canvas").getContext("2d");return o.font=n,o.measureText(e).width+"px"}function zk(e){let t;return{c(){t=mh("The number of decimals to use for the contract. Defaults to 18.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Tk(e){let t;return{c(){t=mh("Create an initial amount of tokens for the recipient.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Dk(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ok(e){let t;return{c(){t=mh("Wrap an existing ERC20 by depositing underlying tokens. The constructor requires the underlying token address\n and matching decimals.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Uk(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Rk(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function Ak(e){let t;return{c(){t=mh("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Nk(e){let t;return{c(){t=mh("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function jk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y;return r=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[Ak]},$$scope:{ctx:e}}}),m=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[Nk]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("span"),o=mh("Application Name\n "),Wh(r.$$.fragment),i=fh(),a=dh("input"),l=fh(),u=dh("label"),d=dh("span"),p=mh("Application Version\n "),Wh(m.$$.fragment),f=fh(),h=dh("input"),vh(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].votes,vh(t,"class","labeled-input"),vh(d,"class","flex justify-between pr-2"),h.disabled=g=!e[0].votes,vh(u,"class","labeled-input")},m(s,g){lh(s,t,g),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),_h(a,e[0].appName),lh(s,l,g),lh(s,u,g),sh(u,d),sh(d,p),Kh(m,d,null),sh(u,f),sh(u,h),_h(h,e[0].appVersion),b=!0,$||(y=[gh(a,"input",e[16]),ah(c=A_.call(null,a,e[1]?.appName)),gh(h,"input",e[17]),ah(v=A_.call(null,h,e[1]?.appVersion))],$=!0)},p(e,t){const n={};8&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t[0]&&s!==(s=!e[0].votes))&&(a.disabled=s),1&t[0]&&a.value!==e[0].appName&&_h(a,e[0].appName),c&&Xf(c.update)&&2&t[0]&&c.update.call(null,e[1]?.appName);const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t[0]&&g!==(g=!e[0].votes))&&(h.disabled=g),1&t[0]&&h.value!==e[0].appVersion&&_h(h,e[0].appVersion),v&&Xf(v.update)&&2&t[0]&&v.update.call(null,e[1]?.appVersion)},i(e){b||(Jh(r.$$.fragment,e),Jh(m.$$.fragment,e),b=!0)},o(e){Gh(r.$$.fragment,e),Gh(m.$$.fragment,e),b=!1},d(e){e&&uh(t),Xh(r),e&&uh(l),e&&uh(u),Xh(m),$=!1,Kf(y)}}}function Pk(e){let t;return{c(){t=mh("Maximum amount of tokens that can be flash-loaned in a single call.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Mk(e){let t;return{c(){t=mh("Inherits the default: the maximum representable amount minus the current total supply.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Zk(e){let t,n,o,r,i;return{c(){t=dh("input"),vh(t,"class","input-inline ml-2"),kh(t,"max-width","8rem"),t.disabled=n=!e[0].flashmint.enabled,vh(t,"pattern",ob.source)},m(n,a){lh(n,t,a),_h(t,e[0].flashmint.maxAmount),r||(i=[gh(t,"input",e[19]),ah(o=A_.call(null,t,e[1]?.flashMintMaxAmount)),ah(Sk.call(null,t))],r=!0)},p(e,r){1&r[0]&&n!==(n=!e[0].flashmint.enabled)&&(t.disabled=n),1&r[0]&&t.value!==e[0].flashmint.maxAmount&&_h(t,e[0].flashmint.maxAmount),o&&Xf(o.update)&&2&r[0]&&o.update.call(null,e[1]?.flashMintMaxAmount)},d(e){e&&uh(t),r=!1,Kf(i)}}}function qk(e){let t;return{c(){t=mh("A fixed non-negative cap. Setting it to 0 effectively disables flash loans.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Lk(e){let t;return{c(){t=mh("Fee charged for each flash loan.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Fk(e){let t,n,o,r,i,a,s,c;return{c(){t=dh("span"),n=dh("input"),i=fh(),a=dh("span"),a.textContent="%",vh(n,"class","input-inline"),kh(n,"max-width","6.5rem"),vh(n,"type","text"),n.disabled=o=!e[0].flashmint.enabled,vh(n,"pattern",ob.source),vh(n,"placeholder","0"),vh(a,"class","ml-1"),vh(t,"class","ml-2 flex items-center")},m(o,l){lh(o,t,l),sh(t,n),_h(n,e[0].flashmint.feePercent),sh(t,i),sh(t,a),s||(c=[gh(n,"input",e[22]),gh(n,"input",e[6]),ah(r=A_.call(null,n,e[1]?.flashMintFeePercent)),ah(Sk.call(null,n))],s=!0)},p(e,t){1&t[0]&&o!==(o=!e[0].flashmint.enabled)&&(n.disabled=o),1&t[0]&&n.value!==e[0].flashmint.feePercent&&_h(n,e[0].flashmint.feePercent),r&&Xf(r.update)&&2&t[0]&&r.update.call(null,e[1]?.flashMintFeePercent)},d(e){e&&uh(t),s=!1,Kf(c)}}}function Vk(e){let t;return{c(){t=mh("Charges a percentage of the loan amount.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Hk(e){let t;return{c(){t=mh("Emits a TODO stub for you to implement the fee logic manually.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Jk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x;return r=new T_({props:{$$slots:{default:[Gk]},$$scope:{ctx:e}}}),p=new T_({props:{$$slots:{default:[Bk]},$$scope:{ctx:e}}}),$=new T_({props:{$$slots:{default:[Wk]},$$scope:{ctx:e}}}),_=bh(e[21][0]),{c(){t=dh("div"),n=dh("span"),o=mh("Flash Fee Destination\n "),Wh(r.$$.fragment),i=fh(),a=dh("div"),s=dh("label"),c=dh("input"),u=mh("\n Burn\n "),d=dh("span"),Wh(p.$$.fragment),m=fh(),f=dh("label"),h=dh("input"),v=mh("\n Fee receiver\n "),b=dh("span"),Wh($.$$.fragment),vh(n,"class","flex justify-between items-center pr-2 mb-1"),vh(c,"type","radio"),c.__value="burn",c.value=c.__value,c.disabled=l=!e[0].flashmint.enabled,vh(d,"class","ml-auto flex items-center"),xh(s,"checked","burn"===e[0].flashmint.feeDestination),vh(h,"type","radio"),h.__value="fee_receiver",h.value=h.__value,h.disabled=g=!e[0].flashmint.enabled,vh(b,"class","ml-auto flex items-center"),xh(f,"checked","fee_receiver"===e[0].flashmint.feeDestination),vh(a,"class","checkbox-group"),vh(t,"class","tooltip-container"),_.p(c,h)},m(l,g){lh(l,t,g),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),sh(a,s),sh(s,c),c.checked=c.__value===e[0].flashmint.feeDestination,sh(s,u),sh(s,d),Kh(p,d,null),sh(a,m),sh(a,f),sh(f,h),h.checked=h.__value===e[0].flashmint.feeDestination,sh(f,v),sh(f,b),Kh($,b,null),y=!0,k||(x=[gh(c,"change",e[24]),gh(h,"change",e[25])],k=!0)},p(e,t){const n={};8&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!y||1&t[0]&&l!==(l=!e[0].flashmint.enabled))&&(c.disabled=l),1&t[0]&&(c.checked=c.__value===e[0].flashmint.feeDestination);const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),p.$set(o),(!y||1&t[0])&&xh(s,"checked","burn"===e[0].flashmint.feeDestination),(!y||1&t[0]&&g!==(g=!e[0].flashmint.enabled))&&(h.disabled=g),1&t[0]&&(h.checked=h.__value===e[0].flashmint.feeDestination);const i={};8&t[1]&&(i.$$scope={dirty:t,ctx:e}),$.$set(i),(!y||1&t[0])&&xh(f,"checked","fee_receiver"===e[0].flashmint.feeDestination)},i(e){y||(Jh(r.$$.fragment,e),Jh(p.$$.fragment,e),Jh($.$$.fragment,e),y=!0)},o(e){Gh(r.$$.fragment,e),Gh(p.$$.fragment,e),Gh($.$$.fragment,e),y=!1},d(e){e&&uh(t),Xh(r),Xh(p),Xh($),_.r(),k=!1,Kf(x)}}}function Gk(e){let t;return{c(){t=mh("Where the flash loan fee goes.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Bk(e){let t;return{c(){t=mh("The flash loan fee is sent to the zero address and effectively burnt.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Wk(e){let t;return{c(){t=mh("Adds a constructor argument for the fee receiver. The deployer provides the address at deployment, the\n contract validates that it is non-zero and stores it on-chain.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Kk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W;r=new T_({props:{$$slots:{default:[Pk]},$$scope:{ctx:e}}}),m=new T_({props:{$$slots:{default:[Mk]},$$scope:{ctx:e}}});let K="max"!==e[0].flashmint.maxAmount&&Zk(e);k=new T_({props:{$$slots:{default:[qk]},$$scope:{ctx:e}}}),S=new T_({props:{$$slots:{default:[Lk]},$$scope:{ctx:e}}});let X="percent"===e[0].flashmint.feeMode&&Fk(e);N=new T_({props:{$$slots:{default:[Vk]},$$scope:{ctx:e}}}),F=new T_({props:{$$slots:{default:[Hk]},$$scope:{ctx:e}}});let Q=e[2]&&Jk(e);return G=bh(e[21][1]),{c(){t=dh("div"),n=dh("span"),o=mh("Max Flash Loan\n "),Wh(r.$$.fragment),i=fh(),a=dh("div"),s=dh("label"),c=dh("input"),d=mh("\n Max\n "),p=dh("span"),Wh(m.$$.fragment),f=fh(),h=dh("label"),g=dh("input"),$=mh("\n Custom\n "),K&&K.c(),y=fh(),_=dh("span"),Wh(k.$$.fragment),x=fh(),w=dh("div"),I=dh("span"),C=mh("Flash Fee\n "),Wh(S.$$.fragment),E=fh(),z=dh("div"),T=dh("label"),D=dh("input"),U=mh("\n Percent\n "),X&&X.c(),R=fh(),A=dh("span"),Wh(N.$$.fragment),j=fh(),P=dh("label"),M=dh("input"),q=mh("\n Custom\n "),L=dh("span"),Wh(F.$$.fragment),V=fh(),Q&&Q.c(),H=hh(),vh(n,"class","flex justify-between items-center pr-2 mb-1"),vh(c,"type","radio"),vh(c,"name","flash-mint-max-amount-mode"),c.checked=l="max"===e[0].flashmint.maxAmount,c.disabled=u=!e[0].flashmint.enabled,vh(p,"class","ml-auto flex items-center"),xh(s,"checked","max"===e[0].flashmint.maxAmount),vh(g,"type","radio"),vh(g,"name","flash-mint-max-amount-mode"),g.checked=v="max"!==e[0].flashmint.maxAmount,g.disabled=b=!e[0].flashmint.enabled,vh(_,"class","ml-auto flex items-center"),xh(h,"checked","max"!==e[0].flashmint.maxAmount),vh(a,"class","checkbox-group"),vh(t,"class","tooltip-container"),vh(I,"class","flex justify-between items-center pr-2 mb-1"),vh(D,"type","radio"),D.__value="percent",D.value=D.__value,D.disabled=O=!e[0].flashmint.enabled,vh(A,"class","ml-auto flex items-center"),xh(T,"checked","percent"===e[0].flashmint.feeMode),vh(M,"type","radio"),M.__value="custom",M.value=M.__value,M.disabled=Z=!e[0].flashmint.enabled,vh(L,"class","ml-auto flex items-center"),xh(P,"checked","custom"===e[0].flashmint.feeMode),vh(z,"class","checkbox-group"),vh(w,"class","tooltip-container"),G.p(D,M)},m(l,u){lh(l,t,u),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),sh(a,s),sh(s,c),sh(s,d),sh(s,p),Kh(m,p,null),sh(a,f),sh(a,h),sh(h,g),sh(h,$),K&&K.m(h,null),sh(h,y),sh(h,_),Kh(k,_,null),lh(l,x,u),lh(l,w,u),sh(w,I),sh(I,C),Kh(S,I,null),sh(w,E),sh(w,z),sh(z,T),sh(T,D),D.checked=D.__value===e[0].flashmint.feeMode,sh(T,U),X&&X.m(T,null),sh(T,R),sh(T,A),Kh(N,A,null),sh(z,j),sh(z,P),sh(P,M),M.checked=M.__value===e[0].flashmint.feeMode,sh(P,q),sh(P,L),Kh(F,L,null),lh(l,V,u),Q&&Q.m(l,u),lh(l,H,u),J=!0,B||(W=[gh(c,"change",e[4]),gh(g,"change",e[5]),gh(D,"change",e[20]),gh(M,"change",e[23])],B=!0)},p(e,t){const n={};8&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!J||1&t[0]&&l!==(l="max"===e[0].flashmint.maxAmount))&&(c.checked=l),(!J||1&t[0]&&u!==(u=!e[0].flashmint.enabled))&&(c.disabled=u);const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!J||1&t[0])&&xh(s,"checked","max"===e[0].flashmint.maxAmount),(!J||1&t[0]&&v!==(v="max"!==e[0].flashmint.maxAmount))&&(g.checked=v),(!J||1&t[0]&&b!==(b=!e[0].flashmint.enabled))&&(g.disabled=b),"max"!==e[0].flashmint.maxAmount?K?K.p(e,t):(K=Zk(e),K.c(),K.m(h,y)):K&&(K.d(1),K=null);const i={};8&t[1]&&(i.$$scope={dirty:t,ctx:e}),k.$set(i),(!J||1&t[0])&&xh(h,"checked","max"!==e[0].flashmint.maxAmount);const a={};8&t[1]&&(a.$$scope={dirty:t,ctx:e}),S.$set(a),(!J||1&t[0]&&O!==(O=!e[0].flashmint.enabled))&&(D.disabled=O),1&t[0]&&(D.checked=D.__value===e[0].flashmint.feeMode),"percent"===e[0].flashmint.feeMode?X?X.p(e,t):(X=Fk(e),X.c(),X.m(T,R)):X&&(X.d(1),X=null);const d={};8&t[1]&&(d.$$scope={dirty:t,ctx:e}),N.$set(d),(!J||1&t[0])&&xh(T,"checked","percent"===e[0].flashmint.feeMode),(!J||1&t[0]&&Z!==(Z=!e[0].flashmint.enabled))&&(M.disabled=Z),1&t[0]&&(M.checked=M.__value===e[0].flashmint.feeMode);const p={};8&t[1]&&(p.$$scope={dirty:t,ctx:e}),F.$set(p),(!J||1&t[0])&&xh(P,"checked","custom"===e[0].flashmint.feeMode),e[2]?Q?(Q.p(e,t),4&t[0]&&Jh(Q,1)):(Q=Jk(e),Q.c(),Jh(Q,1),Q.m(H.parentNode,H)):Q&&(Vh(),Gh(Q,1,1,()=>{Q=null}),Hh())},i(e){J||(Jh(r.$$.fragment,e),Jh(m.$$.fragment,e),Jh(k.$$.fragment,e),Jh(S.$$.fragment,e),Jh(N.$$.fragment,e),Jh(F.$$.fragment,e),Jh(Q),J=!0)},o(e){Gh(r.$$.fragment,e),Gh(m.$$.fragment,e),Gh(k.$$.fragment,e),Gh(S.$$.fragment,e),Gh(N.$$.fragment,e),Gh(F.$$.fragment,e),Gh(Q),J=!1},d(e){e&&uh(t),Xh(r),Xh(m),K&&K.d(),Xh(k),e&&uh(x),e&&uh(w),Xh(S),X&&X.d(),Xh(N),Xh(F),e&&uh(V),Q&&Q.d(e),e&&uh(H),G.r(),B=!1,Kf(W)}}}function Xk(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,he,ge,ve,be,$e,ye,_e,ke,xe,we,Ie;function Ce(t){e[15](t)}y=new T_({props:{$$slots:{default:[zk]},$$scope:{ctx:e}}}),E=new T_({props:{$$slots:{default:[Tk]},$$scope:{ctx:e}}}),Z=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/erc20-supply",$$slots:{default:[Dk]},$$scope:{ctx:e}}}),H=new T_({props:{$$slots:{default:[Ok]},$$scope:{ctx:e}}}),K=new T_({props:{$$slots:{default:[Uk]},$$scope:{ctx:e}}}),te=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[Rk]},$$scope:{ctx:e}}});let Se={};function Ee(t){e[18](t)}void 0!==e[0].upgradeable&&(Se.upgradeable=e[0].upgradeable),oe=new mk({props:Se}),Dh.push(()=>Bh(oe,"upgradeable",Ce));let ze={label:"Votes",helpContent:"Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/4.x/governance/votes",error:e[1]?.appName||e[1]?.appVersion,$$slots:{default:[jk]},$$scope:{ctx:e}};function Te(t){e[26](t)}void 0!==e[0].votes&&(ze.checked=e[0].votes),ae=new Ck({props:ze}),Dh.push(()=>Bh(ae,"checked",Ee));let De={label:"Flash Mint",helpContent:"Allow flash loans of tokens compliant with ERC-3156.",error:e[1]?.flashMintMaxAmount||e[1]?.flashMintFeePercent,$$slots:{default:[Kk]},$$scope:{ctx:e}};function Oe(t){e[27](t)}function Ue(t){e[28](t)}function Re(t){e[29](t)}function Ae(t){e[30](t)}void 0!==e[0].flashmint.enabled&&(De.checked=e[0].flashmint.enabled),le=new Ck({props:De}),Dh.push(()=>Bh(le,"checked",Te));let Ne={required:e[3],errors:e[1]};function je(t){e[31](t)}void 0!==e[0].access.type&&(Ne.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(Ne.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(Ne.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(Ne.darMaxTransferDelay=e[0].access.darMaxTransferDelay),pe=new lk({props:Ne}),Dh.push(()=>Bh(pe,"accessType",Oe)),Dh.push(()=>Bh(pe,"darInitialDelay",Ue)),Dh.push(()=>Bh(pe,"darDefaultDelayIncrease",Re)),Dh.push(()=>Bh(pe,"darMaxTransferDelay",Ae));let Pe={};function Me(t){e[32](t)}void 0!==e[0].macros&&(Pe.macros=e[0].macros),be=new kk({props:Pe}),Dh.push(()=>Bh(be,"macros",je));let Ze={errors:e[1]};return void 0!==e[0].info&&(Ze.info=e[0].info),_e=new vk({props:Ze}),Dh.push(()=>Bh(_e,"info",Me)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("div"),i=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),c=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),$=mh("Decimals\n "),Wh(y.$$.fragment),_=fh(),k=dh("input"),w=fh(),I=dh("label"),C=dh("span"),S=mh("Premint\n "),Wh(E.$$.fragment),z=fh(),T=dh("input"),O=fh(),U=dh("section"),R=dh("h1"),R.textContent="Features",A=fh(),N=dh("div"),j=dh("label"),P=dh("input"),M=mh("\n Mintable\n "),Wh(Z.$$.fragment),q=fh(),L=dh("label"),F=dh("input"),V=mh("\n Wrapper\n "),Wh(H.$$.fragment),J=fh(),G=dh("label"),B=dh("input"),W=mh("\n Burnable\n "),Wh(K.$$.fragment),X=fh(),Q=dh("label"),Y=dh("input"),ee=mh("\n Pausable\n "),Wh(te.$$.fragment),ne=fh(),Wh(oe.$$.fragment),ie=fh(),Wh(ae.$$.fragment),ce=fh(),Wh(le.$$.fragment),de=fh(),Wh(pe.$$.fragment),ve=fh(),Wh(be.$$.fragment),ye=fh(),Wh(_e.$$.fragment),vh(i,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(v,"class","labeled-input"),vh(C,"class","flex justify-between pr-2"),vh(T,"placeholder","0"),vh(T,"pattern",ob.source),vh(I,"class","labeled-input"),vh(t,"class","controls-section"),vh(P,"type","checkbox"),xh(j,"checked",e[0].mintable),vh(F,"type","checkbox"),xh(L,"checked",e[0].wrapper),vh(B,"type","checkbox"),xh(G,"checked",e[0].burnable),vh(Y,"type","checkbox"),xh(Q,"checked",e[0].pausable),vh(N,"class","checkbox-group"),vh(U,"class","controls-section")},m(re,se){lh(re,t,se),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(i,a),sh(i,s),sh(i,c),_h(c,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),_h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,$),Kh(y,b,null),sh(v,_),sh(v,k),_h(k,e[0].decimals),sh(t,w),sh(t,I),sh(I,C),sh(C,S),Kh(E,C,null),sh(I,z),sh(I,T),_h(T,e[0].premint),lh(re,O,se),lh(re,U,se),sh(U,R),sh(U,A),sh(U,N),sh(N,j),sh(j,P),P.checked=e[0].mintable,sh(j,M),Kh(Z,j,null),sh(N,q),sh(N,L),sh(L,F),F.checked=e[0].wrapper,sh(L,V),Kh(H,L,null),sh(N,J),sh(N,G),sh(G,B),B.checked=e[0].burnable,sh(G,W),Kh(K,G,null),sh(N,X),sh(N,Q),sh(Q,Y),Y.checked=e[0].pausable,sh(Q,ee),Kh(te,Q,null),sh(N,ne),Kh(oe,N,null),lh(re,ie,se),Kh(ae,re,se),lh(re,ce,se),Kh(le,re,se),lh(re,de,se),Kh(pe,re,se),lh(re,ve,se),Kh(be,re,se),lh(re,ye,se),Kh(_e,re,se),xe=!0,we||(Ie=[gh(c,"input",e[7]),ah(l=A_.call(null,c,e[1]?.name)),gh(f,"input",e[8]),ah(h=A_.call(null,f,e[1]?.symbol)),gh(k,"input",e[9]),ah(x=A_.call(null,k,e[1]?.decimals)),gh(T,"input",e[10]),ah(D=A_.call(null,T,e[1]?.premint)),gh(P,"change",e[11]),gh(F,"change",e[12]),gh(B,"change",e[13]),gh(Y,"change",e[14])],we=!0)},p(e,t){1&t[0]&&c.value!==e[0].name&&_h(c,e[0].name),l&&Xf(l.update)&&2&t[0]&&l.update.call(null,e[1]?.name),1&t[0]&&f.value!==e[0].symbol&&_h(f,e[0].symbol),h&&Xf(h.update)&&2&t[0]&&h.update.call(null,e[1]?.symbol);const n={};8&t[1]&&(n.$$scope={dirty:t,ctx:e}),y.$set(n),1&t[0]&&k.value!==e[0].decimals&&_h(k,e[0].decimals),x&&Xf(x.update)&&2&t[0]&&x.update.call(null,e[1]?.decimals);const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),E.$set(o),1&t[0]&&T.value!==e[0].premint&&_h(T,e[0].premint),D&&Xf(D.update)&&2&t[0]&&D.update.call(null,e[1]?.premint),1&t[0]&&(P.checked=e[0].mintable);const r={};8&t[1]&&(r.$$scope={dirty:t,ctx:e}),Z.$set(r),(!xe||1&t[0])&&xh(j,"checked",e[0].mintable),1&t[0]&&(F.checked=e[0].wrapper);const i={};8&t[1]&&(i.$$scope={dirty:t,ctx:e}),H.$set(i),(!xe||1&t[0])&&xh(L,"checked",e[0].wrapper),1&t[0]&&(B.checked=e[0].burnable);const a={};8&t[1]&&(a.$$scope={dirty:t,ctx:e}),K.$set(a),(!xe||1&t[0])&&xh(G,"checked",e[0].burnable),1&t[0]&&(Y.checked=e[0].pausable);const s={};8&t[1]&&(s.$$scope={dirty:t,ctx:e}),te.$set(s),(!xe||1&t[0])&&xh(Q,"checked",e[0].pausable);const u={};!re&&1&t[0]&&(re=!0,u.upgradeable=e[0].upgradeable,jh(()=>re=!1)),oe.$set(u);const d={};2&t[0]&&(d.error=e[1]?.appName||e[1]?.appVersion),3&t[0]|8&t[1]&&(d.$$scope={dirty:t,ctx:e}),!se&&1&t[0]&&(se=!0,d.checked=e[0].votes,jh(()=>se=!1)),ae.$set(d);const p={};2&t[0]&&(p.error=e[1]?.flashMintMaxAmount||e[1]?.flashMintFeePercent),7&t[0]|8&t[1]&&(p.$$scope={dirty:t,ctx:e}),!ue&&1&t[0]&&(ue=!0,p.checked=e[0].flashmint.enabled,jh(()=>ue=!1)),le.$set(p);const m={};8&t[0]&&(m.required=e[3]),2&t[0]&&(m.errors=e[1]),!me&&1&t[0]&&(me=!0,m.accessType=e[0].access.type,jh(()=>me=!1)),!fe&&1&t[0]&&(fe=!0,m.darInitialDelay=e[0].access.darInitialDelay,jh(()=>fe=!1)),!he&&1&t[0]&&(he=!0,m.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>he=!1)),!ge&&1&t[0]&&(ge=!0,m.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>ge=!1)),pe.$set(m);const g={};!$e&&1&t[0]&&($e=!0,g.macros=e[0].macros,jh(()=>$e=!1)),be.$set(g);const v={};2&t[0]&&(v.errors=e[1]),!ke&&1&t[0]&&(ke=!0,v.info=e[0].info,jh(()=>ke=!1)),_e.$set(v)},i(e){xe||(Jh(y.$$.fragment,e),Jh(E.$$.fragment,e),Jh(Z.$$.fragment,e),Jh(H.$$.fragment,e),Jh(K.$$.fragment,e),Jh(te.$$.fragment,e),Jh(oe.$$.fragment,e),Jh(ae.$$.fragment,e),Jh(le.$$.fragment,e),Jh(pe.$$.fragment,e),Jh(be.$$.fragment,e),Jh(_e.$$.fragment,e),xe=!0)},o(e){Gh(y.$$.fragment,e),Gh(E.$$.fragment,e),Gh(Z.$$.fragment,e),Gh(H.$$.fragment,e),Gh(K.$$.fragment,e),Gh(te.$$.fragment,e),Gh(oe.$$.fragment,e),Gh(ae.$$.fragment,e),Gh(le.$$.fragment,e),Gh(pe.$$.fragment,e),Gh(be.$$.fragment,e),Gh(_e.$$.fragment,e),xe=!1},d(e){e&&uh(t),Xh(y),Xh(E),e&&uh(O),e&&uh(U),Xh(Z),Xh(H),Xh(K),Xh(te),Xh(oe),e&&uh(ie),Xh(ae,e),e&&uh(ce),Xh(le,e),e&&uh(de),Xh(pe,e),e&&uh(ve),Xh(be,e),e&&uh(ye),Xh(_e,e),we=!1,Kf(Ie)}}}function Qk(e,t,n){let o,r,{opts:i={kind:"ERC20",...Hb.defaults,premint:"",info:{...fv},macros:{...gv},access:{...Hb.defaults.access},flashmint:{...eb}}}=t,{errors:a}=t,s="max"===i.flashmint.maxAmount?"0":i.flashmint.maxAmount;return e.$$set=e=>{"opts"in e&&n(0,i=e.opts),"errors"in e&&n(1,a=e.errors)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(3,o=Hb.isAccessControlRequired(i)),1&e.$$.dirty[0]&&n(2,r=i.flashmint.enabled&&function(e){switch(e.feeMode){case"percent":return parseFloat(e.feePercent||"0")>0;case"custom":return!0}}(i.flashmint)),1&e.$$.dirty[0]&&"max"!==i.flashmint.maxAmount&&(s=i.flashmint.maxAmount)},[i,a,r,o,function(){n(0,i.flashmint.maxAmount="max",i)},function(){n(0,i.flashmint.maxAmount=s,i)},function(e){parseFloat(e.currentTarget.value)>100&&n(0,i.flashmint.feePercent="100",i)},function(){i.name=this.value,n(0,i)},function(){i.symbol=this.value,n(0,i)},function(){i.decimals=this.value,n(0,i)},function(){i.premint=this.value,n(0,i)},function(){i.mintable=this.checked,n(0,i)},function(){i.wrapper=this.checked,n(0,i)},function(){i.burnable=this.checked,n(0,i)},function(){i.pausable=this.checked,n(0,i)},function(t){e.$$.not_equal(i.upgradeable,t)&&(i.upgradeable=t,n(0,i))},function(){i.appName=this.value,n(0,i)},function(){i.appVersion=this.value,n(0,i)},function(t){e.$$.not_equal(i.votes,t)&&(i.votes=t,n(0,i))},function(){i.flashmint.maxAmount=this.value,n(0,i)},function(){i.flashmint.feeMode=this.__value,n(0,i)},[[],[]],function(){i.flashmint.feePercent=this.value,n(0,i)},function(){i.flashmint.feeMode=this.__value,n(0,i)},function(){i.flashmint.feeDestination=this.__value,n(0,i)},function(){i.flashmint.feeDestination=this.__value,n(0,i)},function(t){e.$$.not_equal(i.flashmint.enabled,t)&&(i.flashmint.enabled=t,n(0,i))},function(t){e.$$.not_equal(i.access.type,t)&&(i.access.type=t,n(0,i))},function(t){e.$$.not_equal(i.access.darInitialDelay,t)&&(i.access.darInitialDelay=t,n(0,i))},function(t){e.$$.not_equal(i.access.darDefaultDelayIncrease,t)&&(i.access.darDefaultDelayIncrease=t,n(0,i))},function(t){e.$$.not_equal(i.access.darMaxTransferDelay,t)&&(i.access.darMaxTransferDelay=t,n(0,i))},function(t){e.$$.not_equal(i.macros,t)&&(i.macros=t,n(0,i))},function(t){e.$$.not_equal(i.info,t)&&(i.info=t,n(0,i))}]}function Yk(e){let t;return{c(){t=mh("The royalty fraction that will be default for all tokens. It will be used for a token if there's no custom\n royalty fraction set for it.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ex(e){let t;return{c(){t=mh("The denominator used to interpret a token's fee and to calculate the result fee fraction.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function tx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y;return r=new T_({props:{$$slots:{default:[Yk]},$$scope:{ctx:e}}}),m=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/token_common#ERC2981Component-IC-FEE_DENOMINATOR",$$slots:{default:[ex]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("span"),o=mh("Default Royalty Fraction\n "),Wh(r.$$.fragment),i=fh(),a=dh("input"),l=fh(),u=dh("label"),d=dh("span"),p=mh("Fee Denominator\n "),Wh(m.$$.fragment),f=fh(),h=dh("input"),vh(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].enabled,vh(t,"class","labeled-input"),vh(d,"class","flex justify-between pr-2"),h.disabled=g=!e[0].enabled,vh(u,"class","labeled-input")},m(s,g){lh(s,t,g),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),_h(a,e[0].defaultRoyaltyFraction),lh(s,l,g),lh(s,u,g),sh(u,d),sh(d,p),Kh(m,d,null),sh(u,f),sh(u,h),_h(h,e[0].feeDenominator),b=!0,$||(y=[gh(a,"input",e[2]),ah(c=A_.call(null,a,e[1]?.defaultRoyaltyFraction)),gh(h,"input",e[3]),ah(v=A_.call(null,h,e[1]?.feeDenominator))],$=!0)},p(e,t){const n={};32&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t&&s!==(s=!e[0].enabled))&&(a.disabled=s),1&t&&a.value!==e[0].defaultRoyaltyFraction&&_h(a,e[0].defaultRoyaltyFraction),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.defaultRoyaltyFraction);const o={};32&t&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t&&g!==(g=!e[0].enabled))&&(h.disabled=g),1&t&&h.value!==e[0].feeDenominator&&_h(h,e[0].feeDenominator),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.feeDenominator)},i(e){b||(Jh(r.$$.fragment,e),Jh(m.$$.fragment,e),b=!0)},o(e){Gh(r.$$.fragment,e),Gh(m.$$.fragment,e),b=!1},d(e){e&&uh(t),Xh(r),e&&uh(l),e&&uh(u),Xh(m),$=!1,Kf(y)}}}function nx(e){let t,n,o;function r(t){e[4](t)}let i={label:"Royalty Info",helpContent:"Provides information for how much royalty is owed and to whom, based on a sale price. Follows ERC-2981 standard.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/token_common#ERC2981Component",error:e[1]?.defaultRoyaltyFraction||e[1]?.feeDenominator,$$slots:{default:[tx]},$$scope:{ctx:e}};return void 0!==e[0].enabled&&(i.checked=e[0].enabled),t=new Ck({props:i}),Dh.push(()=>Bh(t,"checked",r)),{c(){Wh(t.$$.fragment)},m(e,n){Kh(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.error=e[1]?.defaultRoyaltyFraction||e[1]?.feeDenominator),35&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.checked=e[0].enabled,jh(()=>n=!1)),t.$set(r)},i(e){o||(Jh(t.$$.fragment,e),o=!0)},o(e){Gh(t.$$.fragment,e),o=!1},d(e){Xh(t,e)}}}function ox(e,t,n){let{opts:o}=t,{errors:r}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.defaultRoyaltyFraction=this.value,n(0,o)},function(){o.feeDenominator=this.value,n(0,o)},function(t){e.$$.not_equal(o.enabled,t)&&(o.enabled=t,n(0,o))}]}class rx extends eg{constructor(e){super(),Yh(this,e,ox,nx,Qf,{opts:0,errors:1})}}function ix(e){let t;return{c(){t=mh("Will be concatenated with token IDs to generate the token URIs.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ax(e){let t;return{c(){t=mh("Privileged accounts will be able to emit new tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function sx(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function cx(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function lx(e){let t;return{c(){t=mh("Allows a contract to publish its entire list of NFTs and make them discoverable by keeping track of all token\n ids and all tokens owned by an address.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ux(e){let t,n,o;return{c(){t=mh("Enables gas-efficient batch minting of consecutive token IDs (ERC-2309). Call "),n=dh("code"),n.textContent="self.erc721_consecutive.mint_consecutive(recipient, batch_size)",o=mh(" from the constructor to issue the initial batch. Cannot be combined with Enumerable.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function dx(e){let t;return{c(){t=mh("Wrap an existing ERC721 by depositing underlying token IDs and minting matching wrapped tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function px(e){let t;return{c(){t=mh("Allows updating token URIs for individual token IDs.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function mx(e){let t;return{c(){t=mh("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function fx(e){let t;return{c(){t=mh("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function hx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y;return r=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[mx]},$$scope:{ctx:e}}}),m=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[fx]},$$scope:{ctx:e}}}),{c(){t=dh("label"),n=dh("span"),o=mh("Application Name\n "),Wh(r.$$.fragment),i=fh(),a=dh("input"),l=fh(),u=dh("label"),d=dh("span"),p=mh("Application Version\n "),Wh(m.$$.fragment),f=fh(),h=dh("input"),vh(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].votes,vh(t,"class","labeled-input"),vh(d,"class","flex justify-between pr-2"),h.disabled=g=!e[0].votes,vh(u,"class","labeled-input")},m(s,g){lh(s,t,g),sh(t,n),sh(n,o),Kh(r,n,null),sh(t,i),sh(t,a),_h(a,e[0].appName),lh(s,l,g),lh(s,u,g),sh(u,d),sh(d,p),Kh(m,d,null),sh(u,f),sh(u,h),_h(h,e[0].appVersion),b=!0,$||(y=[gh(a,"input",e[14]),ah(c=A_.call(null,a,e[1]?.appName)),gh(h,"input",e[15]),ah(v=A_.call(null,h,e[1]?.appVersion))],$=!0)},p(e,t){const n={};16777216&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t&&s!==(s=!e[0].votes))&&(a.disabled=s),1&t&&a.value!==e[0].appName&&_h(a,e[0].appName),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.appName);const o={};16777216&t&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t&&g!==(g=!e[0].votes))&&(h.disabled=g),1&t&&h.value!==e[0].appVersion&&_h(h,e[0].appVersion),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.appVersion)},i(e){b||(Jh(r.$$.fragment,e),Jh(m.$$.fragment,e),b=!0)},o(e){Gh(r.$$.fragment,e),Gh(m.$$.fragment,e),b=!1},d(e){e&&uh(t),Xh(r),e&&uh(l),e&&uh(u),Xh(m),$=!1,Kf(y)}}}function gx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,he,ge,ve,be,$e,ye,_e,ke,xe,we,Ie,Ce,Se,Ee,ze,Te,De,Oe,Ue;function Re(t){e[13](t)}y=new T_({props:{$$slots:{default:[ix]},$$scope:{ctx:e}}}),D=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/erc721",$$slots:{default:[ax]},$$scope:{ctx:e}}}),N=new T_({props:{$$slots:{default:[sx]},$$scope:{ctx:e}}}),q=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[cx]},$$scope:{ctx:e}}}),G=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/erc721#ERC721EnumerableComponent",$$slots:{default:[lx]},$$scope:{ctx:e}}}),Y=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/erc721#ERC721ConsecutiveComponent",$$slots:{default:[ux]},$$scope:{ctx:e}}}),re=new T_({props:{$$slots:{default:[dx]},$$scope:{ctx:e}}}),le=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/erc721#ERC721URIStorageComponent",$$slots:{default:[px]},$$scope:{ctx:e}}});let Ae={};function Ne(t){e[16](t)}void 0!==e[0].upgradeable&&(Ae.upgradeable=e[0].upgradeable),de=new mk({props:Ae}),Dh.push(()=>Bh(de,"upgradeable",Re));let je={label:"Votes",helpContent:"Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/4.x/governance/votes",error:e[1]?.appName||e[1]?.appVersion,$$slots:{default:[hx]},$$scope:{ctx:e}};function Pe(t){e[17](t)}void 0!==e[0].votes&&(je.checked=e[0].votes),fe=new Ck({props:je}),Dh.push(()=>Bh(fe,"checked",Ne));let Me={errors:e[1]};function Ze(t){e[18](t)}function qe(t){e[19](t)}function Le(t){e[20](t)}function Fe(t){e[21](t)}void 0!==e[0].royaltyInfo&&(Me.opts=e[0].royaltyInfo),ve=new rx({props:Me}),Dh.push(()=>Bh(ve,"opts",Pe));let Ve={required:e[2],errors:e[1]};function He(t){e[22](t)}void 0!==e[0].access.type&&(Ve.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(Ve.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(Ve.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(Ve.darMaxTransferDelay=e[0].access.darMaxTransferDelay),ye=new lk({props:Ve}),Dh.push(()=>Bh(ye,"accessType",Ze)),Dh.push(()=>Bh(ye,"darInitialDelay",qe)),Dh.push(()=>Bh(ye,"darDefaultDelayIncrease",Le)),Dh.push(()=>Bh(ye,"darMaxTransferDelay",Fe));let Je={};function Ge(t){e[23](t)}void 0!==e[0].macros&&(Je.macros=e[0].macros),Ce=new kk({props:Je}),Dh.push(()=>Bh(Ce,"macros",He));let Be={errors:e[1]};return void 0!==e[0].info&&(Be.info=e[0].info),ze=new vk({props:Be}),Dh.push(()=>Bh(ze,"info",Ge)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("div"),i=dh("label"),a=dh("span"),a.textContent="Name",s=fh(),c=dh("input"),u=fh(),d=dh("label"),p=dh("span"),p.textContent="Symbol",m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),$=mh("Base URI\n "),Wh(y.$$.fragment),_=fh(),k=dh("input"),x=fh(),w=dh("section"),I=dh("h1"),I.textContent="Features",C=fh(),S=dh("div"),E=dh("label"),z=dh("input"),T=mh("\n Mintable\n "),Wh(D.$$.fragment),O=fh(),U=dh("label"),R=dh("input"),A=mh("\n Burnable\n "),Wh(N.$$.fragment),j=fh(),P=dh("label"),M=dh("input"),Z=mh("\n Pausable\n "),Wh(q.$$.fragment),L=fh(),F=dh("label"),V=dh("input"),J=mh("\n Enumerable\n "),Wh(G.$$.fragment),B=fh(),W=dh("label"),K=dh("input"),Q=mh("\n Consecutive\n "),Wh(Y.$$.fragment),ee=fh(),te=dh("label"),ne=dh("input"),oe=mh("\n Wrapper\n "),Wh(re.$$.fragment),ie=fh(),ae=dh("label"),se=dh("input"),ce=mh("\n URI Storage\n "),Wh(le.$$.fragment),ue=fh(),Wh(de.$$.fragment),me=fh(),Wh(fe.$$.fragment),ge=fh(),Wh(ve.$$.fragment),$e=fh(),Wh(ye.$$.fragment),Ie=fh(),Wh(Ce.$$.fragment),Ee=fh(),Wh(ze.$$.fragment),vh(i,"class","labeled-input"),vh(d,"class","labeled-input"),vh(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vh(b,"class","flex justify-between pr-2"),vh(k,"placeholder","https://..."),vh(v,"class","labeled-input"),vh(t,"class","controls-section"),vh(z,"type","checkbox"),xh(E,"checked",e[0].mintable),vh(R,"type","checkbox"),xh(U,"checked",e[0].burnable),vh(M,"type","checkbox"),xh(P,"checked",e[0].pausable),vh(V,"type","checkbox"),xh(F,"checked",e[0].enumerable),vh(K,"type","checkbox"),xh(W,"checked",e[0].consecutive),vh(ne,"type","checkbox"),xh(te,"checked",e[0].wrapper),vh(se,"type","checkbox"),xh(ae,"checked",e[0].uriStorage),vh(S,"class","checkbox-group"),vh(w,"class","controls-section")},m(pe,he){lh(pe,t,he),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(i,a),sh(i,s),sh(i,c),_h(c,e[0].name),sh(r,u),sh(r,d),sh(d,p),sh(d,m),sh(d,f),_h(f,e[0].symbol),sh(t,g),sh(t,v),sh(v,b),sh(b,$),Kh(y,b,null),sh(v,_),sh(v,k),_h(k,e[0].baseUri),lh(pe,x,he),lh(pe,w,he),sh(w,I),sh(w,C),sh(w,S),sh(S,E),sh(E,z),z.checked=e[0].mintable,sh(E,T),Kh(D,E,null),sh(S,O),sh(S,U),sh(U,R),R.checked=e[0].burnable,sh(U,A),Kh(N,U,null),sh(S,j),sh(S,P),sh(P,M),M.checked=e[0].pausable,sh(P,Z),Kh(q,P,null),sh(S,L),sh(S,F),sh(F,V),V.checked=e[0].enumerable,sh(F,J),Kh(G,F,null),sh(S,B),sh(S,W),sh(W,K),K.checked=e[0].consecutive,sh(W,Q),Kh(Y,W,null),sh(S,ee),sh(S,te),sh(te,ne),ne.checked=e[0].wrapper,sh(te,oe),Kh(re,te,null),sh(S,ie),sh(S,ae),sh(ae,se),se.checked=e[0].uriStorage,sh(ae,ce),Kh(le,ae,null),sh(S,ue),Kh(de,S,null),lh(pe,me,he),Kh(fe,pe,he),lh(pe,ge,he),Kh(ve,pe,he),lh(pe,$e,he),Kh(ye,pe,he),lh(pe,Ie,he),Kh(Ce,pe,he),lh(pe,Ee,he),Kh(ze,pe,he),De=!0,Oe||(Ue=[gh(c,"input",e[3]),ah(l=A_.call(null,c,e[1]?.name)),gh(f,"input",e[4]),ah(h=A_.call(null,f,e[1]?.symbol)),gh(k,"input",e[5]),gh(z,"change",e[6]),gh(R,"change",e[7]),gh(M,"change",e[8]),gh(V,"change",e[9]),ah(H=A_.call(null,V,e[1]?.enumerable)),gh(K,"change",e[10]),ah(X=A_.call(null,K,e[1]?.consecutive)),gh(ne,"change",e[11]),gh(se,"change",e[12])],Oe=!0)},p(e,[t]){1&t&&c.value!==e[0].name&&_h(c,e[0].name),l&&Xf(l.update)&&2&t&&l.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&_h(f,e[0].symbol),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.symbol);const n={};16777216&t&&(n.$$scope={dirty:t,ctx:e}),y.$set(n),1&t&&k.value!==e[0].baseUri&&_h(k,e[0].baseUri),1&t&&(z.checked=e[0].mintable);const o={};16777216&t&&(o.$$scope={dirty:t,ctx:e}),D.$set(o),(!De||1&t)&&xh(E,"checked",e[0].mintable),1&t&&(R.checked=e[0].burnable);const r={};16777216&t&&(r.$$scope={dirty:t,ctx:e}),N.$set(r),(!De||1&t)&&xh(U,"checked",e[0].burnable),1&t&&(M.checked=e[0].pausable);const i={};16777216&t&&(i.$$scope={dirty:t,ctx:e}),q.$set(i),(!De||1&t)&&xh(P,"checked",e[0].pausable),1&t&&(V.checked=e[0].enumerable),H&&Xf(H.update)&&2&t&&H.update.call(null,e[1]?.enumerable);const a={};16777216&t&&(a.$$scope={dirty:t,ctx:e}),G.$set(a),(!De||1&t)&&xh(F,"checked",e[0].enumerable),1&t&&(K.checked=e[0].consecutive),X&&Xf(X.update)&&2&t&&X.update.call(null,e[1]?.consecutive);const s={};16777216&t&&(s.$$scope={dirty:t,ctx:e}),Y.$set(s),(!De||1&t)&&xh(W,"checked",e[0].consecutive),1&t&&(ne.checked=e[0].wrapper);const u={};16777216&t&&(u.$$scope={dirty:t,ctx:e}),re.$set(u),(!De||1&t)&&xh(te,"checked",e[0].wrapper),1&t&&(se.checked=e[0].uriStorage);const d={};16777216&t&&(d.$$scope={dirty:t,ctx:e}),le.$set(d),(!De||1&t)&&xh(ae,"checked",e[0].uriStorage);const p={};!pe&&1&t&&(pe=!0,p.upgradeable=e[0].upgradeable,jh(()=>pe=!1)),de.$set(p);const m={};2&t&&(m.error=e[1]?.appName||e[1]?.appVersion),16777219&t&&(m.$$scope={dirty:t,ctx:e}),!he&&1&t&&(he=!0,m.checked=e[0].votes,jh(()=>he=!1)),fe.$set(m);const g={};2&t&&(g.errors=e[1]),!be&&1&t&&(be=!0,g.opts=e[0].royaltyInfo,jh(()=>be=!1)),ve.$set(g);const v={};4&t&&(v.required=e[2]),2&t&&(v.errors=e[1]),!_e&&1&t&&(_e=!0,v.accessType=e[0].access.type,jh(()=>_e=!1)),!ke&&1&t&&(ke=!0,v.darInitialDelay=e[0].access.darInitialDelay,jh(()=>ke=!1)),!xe&&1&t&&(xe=!0,v.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>xe=!1)),!we&&1&t&&(we=!0,v.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>we=!1)),ye.$set(v);const b={};!Se&&1&t&&(Se=!0,b.macros=e[0].macros,jh(()=>Se=!1)),Ce.$set(b);const $={};2&t&&($.errors=e[1]),!Te&&1&t&&(Te=!0,$.info=e[0].info,jh(()=>Te=!1)),ze.$set($)},i(e){De||(Jh(y.$$.fragment,e),Jh(D.$$.fragment,e),Jh(N.$$.fragment,e),Jh(q.$$.fragment,e),Jh(G.$$.fragment,e),Jh(Y.$$.fragment,e),Jh(re.$$.fragment,e),Jh(le.$$.fragment,e),Jh(de.$$.fragment,e),Jh(fe.$$.fragment,e),Jh(ve.$$.fragment,e),Jh(ye.$$.fragment,e),Jh(Ce.$$.fragment,e),Jh(ze.$$.fragment,e),De=!0)},o(e){Gh(y.$$.fragment,e),Gh(D.$$.fragment,e),Gh(N.$$.fragment,e),Gh(q.$$.fragment,e),Gh(G.$$.fragment,e),Gh(Y.$$.fragment,e),Gh(re.$$.fragment,e),Gh(le.$$.fragment,e),Gh(de.$$.fragment,e),Gh(fe.$$.fragment,e),Gh(ve.$$.fragment,e),Gh(ye.$$.fragment,e),Gh(Ce.$$.fragment,e),Gh(ze.$$.fragment,e),De=!1},d(e){e&&uh(t),Xh(y),e&&uh(x),e&&uh(w),Xh(D),Xh(N),Xh(q),Xh(G),Xh(Y),Xh(re),Xh(le),Xh(de),e&&uh(me),Xh(fe,e),e&&uh(ge),Xh(ve,e),e&&uh($e),Xh(ye,e),e&&uh(Ie),Xh(Ce,e),e&&uh(Ee),Xh(ze,e),Oe=!1,Kf(Ue)}}}function vx(e,t,n){let o,{opts:r={kind:"ERC721",...Jb.defaults,royaltyInfo:{...Jb.defaults.royaltyInfo},info:{...fv},macros:{...gv},access:{...Jb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Jb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.baseUri=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.enumerable=this.checked,n(0,r)},function(){r.consecutive=this.checked,n(0,r)},function(){r.wrapper=this.checked,n(0,r)},function(){r.uriStorage=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(){r.appName=this.value,n(0,r)},function(){r.appVersion=this.value,n(0,r)},function(t){e.$$.not_equal(r.votes,t)&&(r.votes=t,n(0,r))},function(t){e.$$.not_equal(r.royaltyInfo,t)&&(r.royaltyInfo=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function bx(e){let t,n,o;return{c(){t=mh("Location of the metadata. Clients will replace any instance of "),n=mh("{id}"),o=mh(" in this string with the tokenId.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function $x(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function yx(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function _x(e){let t;return{c(){t=mh("Keeps track of total supply of tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function kx(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function xx(e){let t;return{c(){t=mh("Allows updating token URIs for individual token IDs.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function wx(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to set a new URI for all token types. Clients will replace any instance of "),n=mh("{id}"),o=mh("\n in the URI with the tokenId.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function Ix(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,he;function ge(t){e[11](t)}p=new T_({props:{$$slots:{default:[bx]},$$scope:{ctx:e}}}),x=new T_({props:{$$slots:{default:[$x]},$$scope:{ctx:e}}}),E=new T_({props:{$$slots:{default:[yx]},$$scope:{ctx:e}}}),U=new T_({props:{$$slots:{default:[_x]},$$scope:{ctx:e}}}),P=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[kx]},$$scope:{ctx:e}}}),F=new T_({props:{$$slots:{default:[xx]},$$scope:{ctx:e}}}),B=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/erc1155#ERC1155Component-set_base_uri",$$slots:{default:[wx]},$$scope:{ctx:e}}});let ve={};function be(t){e[12](t)}void 0!==e[0].upgradeable&&(ve.upgradeable=e[0].upgradeable),K=new mk({props:ve}),Dh.push(()=>Bh(K,"upgradeable",ge));let $e={errors:e[1]};function ye(t){e[13](t)}function _e(t){e[14](t)}function ke(t){e[15](t)}function xe(t){e[16](t)}void 0!==e[0].royaltyInfo&&($e.opts=e[0].royaltyInfo),Y=new rx({props:$e}),Dh.push(()=>Bh(Y,"opts",be));let we={required:e[2],errors:e[1]};function Ie(t){e[17](t)}void 0!==e[0].access.type&&(we.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(we.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(we.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(we.darMaxTransferDelay=e[0].access.darMaxTransferDelay),ne=new lk({props:we}),Dh.push(()=>Bh(ne,"accessType",ye)),Dh.push(()=>Bh(ne,"darInitialDelay",_e)),Dh.push(()=>Bh(ne,"darDefaultDelayIncrease",ke)),Dh.push(()=>Bh(ne,"darMaxTransferDelay",xe));let Ce={};function Se(t){e[18](t)}void 0!==e[0].macros&&(Ce.macros=e[0].macros),ce=new kk({props:Ce}),Dh.push(()=>Bh(ce,"macros",Ie));let Ee={errors:e[1]};return void 0!==e[0].info&&(Ee.info=e[0].info),de=new vk({props:Ee}),Dh.push(()=>Bh(de,"info",Se)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),c=fh(),l=dh("label"),u=dh("span"),d=mh("Base URI\n "),Wh(p.$$.fragment),m=fh(),f=dh("input"),h=fh(),g=dh("section"),v=dh("h1"),v.textContent="Features",b=fh(),$=dh("div"),y=dh("label"),_=dh("input"),k=mh("\n Mintable\n "),Wh(x.$$.fragment),w=fh(),I=dh("label"),C=dh("input"),S=mh("\n Burnable\n "),Wh(E.$$.fragment),z=fh(),T=dh("label"),D=dh("input"),O=mh("\n Supply Tracking\n "),Wh(U.$$.fragment),R=fh(),A=dh("label"),N=dh("input"),j=mh("\n Pausable\n "),Wh(P.$$.fragment),M=fh(),Z=dh("label"),q=dh("input"),L=mh("\n URI Storage\n "),Wh(F.$$.fragment),V=fh(),H=dh("label"),J=dh("input"),G=mh("\n Updatable URI\n "),Wh(B.$$.fragment),W=fh(),Wh(K.$$.fragment),Q=fh(),Wh(Y.$$.fragment),te=fh(),Wh(ne.$$.fragment),se=fh(),Wh(ce.$$.fragment),ue=fh(),Wh(de.$$.fragment),vh(r,"class","labeled-input"),vh(u,"class","flex justify-between pr-2"),vh(f,"placeholder","https://..."),vh(l,"class","labeled-input"),vh(t,"class","controls-section"),vh(_,"type","checkbox"),xh(y,"checked",e[0].mintable),vh(C,"type","checkbox"),xh(I,"checked",e[0].burnable),vh(D,"type","checkbox"),xh(T,"checked",e[0].supply),vh(N,"type","checkbox"),xh(A,"checked",e[0].pausable),vh(q,"type","checkbox"),xh(Z,"checked",e[0].uriStorage),vh(J,"type","checkbox"),xh(H,"checked",e[0].updatableUri),vh($,"class","checkbox-group"),vh(g,"class","controls-section")},m(X,ee){lh(X,t,ee),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,c),sh(t,l),sh(l,u),sh(u,d),Kh(p,u,null),sh(l,m),sh(l,f),_h(f,e[0].baseUri),lh(X,h,ee),lh(X,g,ee),sh(g,v),sh(g,b),sh(g,$),sh($,y),sh(y,_),_.checked=e[0].mintable,sh(y,k),Kh(x,y,null),sh($,w),sh($,I),sh(I,C),C.checked=e[0].burnable,sh(I,S),Kh(E,I,null),sh($,z),sh($,T),sh(T,D),D.checked=e[0].supply,sh(T,O),Kh(U,T,null),sh($,R),sh($,A),sh(A,N),N.checked=e[0].pausable,sh(A,j),Kh(P,A,null),sh($,M),sh($,Z),sh(Z,q),q.checked=e[0].uriStorage,sh(Z,L),Kh(F,Z,null),sh($,V),sh($,H),sh(H,J),J.checked=e[0].updatableUri,sh(H,G),Kh(B,H,null),sh($,W),Kh(K,$,null),lh(X,Q,ee),Kh(Y,X,ee),lh(X,te,ee),Kh(ne,X,ee),lh(X,se,ee),Kh(ce,X,ee),lh(X,ue,ee),Kh(de,X,ee),me=!0,fe||(he=[gh(s,"input",e[3]),gh(f,"input",e[4]),gh(_,"change",e[5]),gh(C,"change",e[6]),gh(D,"change",e[7]),gh(N,"change",e[8]),gh(q,"change",e[9]),gh(J,"change",e[10])],fe=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name);const n={};524288&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&f.value!==e[0].baseUri&&_h(f,e[0].baseUri),1&t&&(_.checked=e[0].mintable);const o={};524288&t&&(o.$$scope={dirty:t,ctx:e}),x.$set(o),(!me||1&t)&&xh(y,"checked",e[0].mintable),1&t&&(C.checked=e[0].burnable);const r={};524288&t&&(r.$$scope={dirty:t,ctx:e}),E.$set(r),(!me||1&t)&&xh(I,"checked",e[0].burnable),1&t&&(D.checked=e[0].supply);const i={};524288&t&&(i.$$scope={dirty:t,ctx:e}),U.$set(i),(!me||1&t)&&xh(T,"checked",e[0].supply),1&t&&(N.checked=e[0].pausable);const a={};524288&t&&(a.$$scope={dirty:t,ctx:e}),P.$set(a),(!me||1&t)&&xh(A,"checked",e[0].pausable),1&t&&(q.checked=e[0].uriStorage);const c={};524288&t&&(c.$$scope={dirty:t,ctx:e}),F.$set(c),(!me||1&t)&&xh(Z,"checked",e[0].uriStorage),1&t&&(J.checked=e[0].updatableUri);const l={};524288&t&&(l.$$scope={dirty:t,ctx:e}),B.$set(l),(!me||1&t)&&xh(H,"checked",e[0].updatableUri);const u={};!X&&1&t&&(X=!0,u.upgradeable=e[0].upgradeable,jh(()=>X=!1)),K.$set(u);const d={};2&t&&(d.errors=e[1]),!ee&&1&t&&(ee=!0,d.opts=e[0].royaltyInfo,jh(()=>ee=!1)),Y.$set(d);const m={};4&t&&(m.required=e[2]),2&t&&(m.errors=e[1]),!oe&&1&t&&(oe=!0,m.accessType=e[0].access.type,jh(()=>oe=!1)),!re&&1&t&&(re=!0,m.darInitialDelay=e[0].access.darInitialDelay,jh(()=>re=!1)),!ie&&1&t&&(ie=!0,m.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>ie=!1)),!ae&&1&t&&(ae=!0,m.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>ae=!1)),ne.$set(m);const h={};!le&&1&t&&(le=!0,h.macros=e[0].macros,jh(()=>le=!1)),ce.$set(h);const g={};2&t&&(g.errors=e[1]),!pe&&1&t&&(pe=!0,g.info=e[0].info,jh(()=>pe=!1)),de.$set(g)},i(e){me||(Jh(p.$$.fragment,e),Jh(x.$$.fragment,e),Jh(E.$$.fragment,e),Jh(U.$$.fragment,e),Jh(P.$$.fragment,e),Jh(F.$$.fragment,e),Jh(B.$$.fragment,e),Jh(K.$$.fragment,e),Jh(Y.$$.fragment,e),Jh(ne.$$.fragment,e),Jh(ce.$$.fragment,e),Jh(de.$$.fragment,e),me=!0)},o(e){Gh(p.$$.fragment,e),Gh(x.$$.fragment,e),Gh(E.$$.fragment,e),Gh(U.$$.fragment,e),Gh(P.$$.fragment,e),Gh(F.$$.fragment,e),Gh(B.$$.fragment,e),Gh(K.$$.fragment,e),Gh(Y.$$.fragment,e),Gh(ne.$$.fragment,e),Gh(ce.$$.fragment,e),Gh(de.$$.fragment,e),me=!1},d(e){e&&uh(t),Xh(p),e&&uh(h),e&&uh(g),Xh(x),Xh(E),Xh(U),Xh(P),Xh(F),Xh(B),Xh(K),e&&uh(Q),Xh(Y,e),e&&uh(te),Xh(ne,e),e&&uh(se),Xh(ce,e),e&&uh(ue),Xh(de,e),fe=!1,Kf(he)}}}function Cx(e,t,n){let o,{opts:r={kind:"ERC1155",...Gb.defaults,royaltyInfo:{...Gb.defaults.royaltyInfo},info:{...fv},macros:{...gv},access:{...Gb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Gb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.baseUri=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.supply=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.uriStorage=this.checked,n(0,r)},function(){r.updatableUri=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.royaltyInfo,t)&&(r.royaltyInfo=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function Sx(e){let t;return{c(){t=mh("Privileged accounts will be able to create more supply.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Ex(e){let t;return{c(){t=mh("Token holders will be able to destroy their tokens.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function zx(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function Tx(e){let t,n,o,r,i;return{c(){t=mh("Provides contract-level and per-token URI metadata via "),n=dh("code"),n.textContent="contract_uri()",o=mh(" and\n "),r=dh("code"),r.textContent="token_uri(id)",i=mh(".")},m(e,a){lh(e,t,a),lh(e,n,a),lh(e,o,a),lh(e,r,a),lh(e,i,a)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o),e&&uh(r),e&&uh(i)}}}function Dx(e){let t,n,o;return{c(){t=mh("Keeps track of total supply per token ID via "),n=dh("code"),n.textContent="total_supply(id)",o=mh(".")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function Ox(e){let t,n,o,r,i,a,s;return{c(){t=mh("Provides per-token metadata including "),n=dh("code"),n.textContent="name(id)",o=mh(", "),r=dh("code"),r.textContent="symbol(id)",i=mh(", and\n "),a=dh("code"),a.textContent="decimals(id)",s=mh(".")},m(e,c){lh(e,t,c),lh(e,n,c),lh(e,o,c),lh(e,r,c),lh(e,i,c),lh(e,a,c),lh(e,s,c)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o),e&&uh(r),e&&uh(i),e&&uh(a),e&&uh(s)}}}function Ux(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae;function se(t){e[10](t)}v=new T_({props:{$$slots:{default:[Sx]},$$scope:{ctx:e}}}),k=new T_({props:{$$slots:{default:[Ex]},$$scope:{ctx:e}}}),S=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[zx]},$$scope:{ctx:e}}}),O=new T_({props:{$$slots:{default:[Tx]},$$scope:{ctx:e}}}),j=new T_({props:{$$slots:{default:[Dx]},$$scope:{ctx:e}}}),L=new T_({props:{$$slots:{default:[Ox]},$$scope:{ctx:e}}});let ce={};function le(t){e[11](t)}function ue(t){e[12](t)}function de(t){e[13](t)}function pe(t){e[14](t)}void 0!==e[0].upgradeable&&(ce.upgradeable=e[0].upgradeable),V=new mk({props:ce}),Dh.push(()=>Bh(V,"upgradeable",se));let me={required:e[2],errors:e[1]};function fe(t){e[15](t)}void 0!==e[0].access.type&&(me.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(me.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(me.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(me.darMaxTransferDelay=e[0].access.darMaxTransferDelay),G=new lk({props:me}),Dh.push(()=>Bh(G,"accessType",le)),Dh.push(()=>Bh(G,"darInitialDelay",ue)),Dh.push(()=>Bh(G,"darDefaultDelayIncrease",de)),Dh.push(()=>Bh(G,"darMaxTransferDelay",pe));let he={};function ge(t){e[16](t)}void 0!==e[0].macros&&(he.macros=e[0].macros),Y=new kk({props:he}),Dh.push(()=>Bh(Y,"macros",fe));let ve={errors:e[1]};return void 0!==e[0].info&&(ve.info=e[0].info),ne=new vk({props:ve}),Dh.push(()=>Bh(ne,"info",ge)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),l=fh(),u=dh("section"),d=dh("h1"),d.textContent="Features",p=fh(),m=dh("div"),f=dh("label"),h=dh("input"),g=mh("\n Mintable\n "),Wh(v.$$.fragment),b=fh(),$=dh("label"),y=dh("input"),_=mh("\n Burnable\n "),Wh(k.$$.fragment),x=fh(),w=dh("label"),I=dh("input"),C=mh("\n Pausable\n "),Wh(S.$$.fragment),E=fh(),z=dh("label"),T=dh("input"),D=mh("\n Content URI\n "),Wh(O.$$.fragment),U=fh(),R=dh("label"),A=dh("input"),N=mh("\n Supply Tracking\n "),Wh(j.$$.fragment),P=fh(),M=dh("label"),Z=dh("input"),q=mh("\n Metadata\n "),Wh(L.$$.fragment),F=fh(),Wh(V.$$.fragment),J=fh(),Wh(G.$$.fragment),Q=fh(),Wh(Y.$$.fragment),te=fh(),Wh(ne.$$.fragment),vh(r,"class","labeled-input"),vh(t,"class","controls-section"),vh(h,"type","checkbox"),xh(f,"checked",e[0].mintable),vh(y,"type","checkbox"),xh($,"checked",e[0].burnable),vh(I,"type","checkbox"),xh(w,"checked",e[0].pausable),vh(T,"type","checkbox"),xh(z,"checked",e[0].contentUri),vh(A,"type","checkbox"),xh(R,"checked",e[0].tokenSupply),vh(Z,"type","checkbox"),xh(M,"checked",e[0].metadata),vh(m,"class","checkbox-group"),vh(u,"class","controls-section")},m(H,B){lh(H,t,B),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),lh(H,l,B),lh(H,u,B),sh(u,d),sh(u,p),sh(u,m),sh(m,f),sh(f,h),h.checked=e[0].mintable,sh(f,g),Kh(v,f,null),sh(m,b),sh(m,$),sh($,y),y.checked=e[0].burnable,sh($,_),Kh(k,$,null),sh(m,x),sh(m,w),sh(w,I),I.checked=e[0].pausable,sh(w,C),Kh(S,w,null),sh(m,E),sh(m,z),sh(z,T),T.checked=e[0].contentUri,sh(z,D),Kh(O,z,null),sh(m,U),sh(m,R),sh(R,A),A.checked=e[0].tokenSupply,sh(R,N),Kh(j,R,null),sh(m,P),sh(m,M),sh(M,Z),Z.checked=e[0].metadata,sh(M,q),Kh(L,M,null),sh(m,F),Kh(V,m,null),lh(H,J,B),Kh(G,H,B),lh(H,Q,B),Kh(Y,H,B),lh(H,te,B),Kh(ne,H,B),re=!0,ie||(ae=[gh(s,"input",e[3]),ah(c=A_.call(null,s,e[1]?.name)),gh(h,"change",e[4]),gh(y,"change",e[5]),gh(I,"change",e[6]),gh(T,"change",e[7]),gh(A,"change",e[8]),gh(Z,"change",e[9])],ie=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&(h.checked=e[0].mintable);const n={};131072&t&&(n.$$scope={dirty:t,ctx:e}),v.$set(n),(!re||1&t)&&xh(f,"checked",e[0].mintable),1&t&&(y.checked=e[0].burnable);const o={};131072&t&&(o.$$scope={dirty:t,ctx:e}),k.$set(o),(!re||1&t)&&xh($,"checked",e[0].burnable),1&t&&(I.checked=e[0].pausable);const r={};131072&t&&(r.$$scope={dirty:t,ctx:e}),S.$set(r),(!re||1&t)&&xh(w,"checked",e[0].pausable),1&t&&(T.checked=e[0].contentUri);const i={};131072&t&&(i.$$scope={dirty:t,ctx:e}),O.$set(i),(!re||1&t)&&xh(z,"checked",e[0].contentUri),1&t&&(A.checked=e[0].tokenSupply);const a={};131072&t&&(a.$$scope={dirty:t,ctx:e}),j.$set(a),(!re||1&t)&&xh(R,"checked",e[0].tokenSupply),1&t&&(Z.checked=e[0].metadata);const l={};131072&t&&(l.$$scope={dirty:t,ctx:e}),L.$set(l),(!re||1&t)&&xh(M,"checked",e[0].metadata);const u={};!H&&1&t&&(H=!0,u.upgradeable=e[0].upgradeable,jh(()=>H=!1)),V.$set(u);const d={};4&t&&(d.required=e[2]),2&t&&(d.errors=e[1]),!B&&1&t&&(B=!0,d.accessType=e[0].access.type,jh(()=>B=!1)),!W&&1&t&&(W=!0,d.darInitialDelay=e[0].access.darInitialDelay,jh(()=>W=!1)),!K&&1&t&&(K=!0,d.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>K=!1)),!X&&1&t&&(X=!0,d.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>X=!1)),G.$set(d);const p={};!ee&&1&t&&(ee=!0,p.macros=e[0].macros,jh(()=>ee=!1)),Y.$set(p);const m={};2&t&&(m.errors=e[1]),!oe&&1&t&&(oe=!0,m.info=e[0].info,jh(()=>oe=!1)),ne.$set(m)},i(e){re||(Jh(v.$$.fragment,e),Jh(k.$$.fragment,e),Jh(S.$$.fragment,e),Jh(O.$$.fragment,e),Jh(j.$$.fragment,e),Jh(L.$$.fragment,e),Jh(V.$$.fragment,e),Jh(G.$$.fragment,e),Jh(Y.$$.fragment,e),Jh(ne.$$.fragment,e),re=!0)},o(e){Gh(v.$$.fragment,e),Gh(k.$$.fragment,e),Gh(S.$$.fragment,e),Gh(O.$$.fragment,e),Gh(j.$$.fragment,e),Gh(L.$$.fragment,e),Gh(V.$$.fragment,e),Gh(G.$$.fragment,e),Gh(Y.$$.fragment,e),Gh(ne.$$.fragment,e),re=!1},d(e){e&&uh(t),e&&uh(l),e&&uh(u),Xh(v),Xh(k),Xh(S),Xh(O),Xh(j),Xh(L),Xh(V),e&&uh(J),Xh(G,e),e&&uh(Q),Xh(Y,e),e&&uh(te),Xh(ne,e),ie=!1,Kf(ae)}}}function Rx(e,t,n){let o,{opts:r={kind:"ERC6909",...Bb.defaults,info:{...fv},macros:{...gv},access:{...Bb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Bb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.contentUri=this.checked,n(0,r)},function(){r.tokenSupply=this.checked,n(0,r)},function(){r.metadata=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function Ax(e){let t;return{c(){t=mh("Starknet account that uses the STARK curve for signature checking.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Nx(e){let t;return{c(){t=mh("Ethereum-flavored account that uses the Secp256k1 curve for signature checking.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function jx(e){let t;return{c(){t=mh("Allows a protocol to submit transactions on behalf of the account, as long as it has the relevant signatures.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Px(e){let t;return{c(){t=mh("Enables the account to declare other contract classes.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Mx(e){let t;return{c(){t=mh("Enables the account to be counterfactually deployed.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Zx(e){let t;return{c(){t=mh("Enables the account to change its own public key.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function qx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie;function ae(t){e[11](t)}v=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/accounts#starknet_account",$$slots:{default:[Ax]},$$scope:{ctx:e}}}),k=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/accounts#ethereum_account",$$slots:{default:[Nx]},$$scope:{ctx:e}}}),D=new T_({props:{link:"https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-9.md",$$slots:{default:[jx]},$$scope:{ctx:e}}}),N=new T_({props:{link:"https://docs.starknet.io/architecture-and-concepts/smart-contracts/contract-classes/",$$slots:{default:[Px]},$$scope:{ctx:e}}}),q=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/accounts#deploying_an_account",$$slots:{default:[Mx]},$$scope:{ctx:e}}}),J=new T_({props:{$$slots:{default:[Zx]},$$scope:{ctx:e}}});let se={};function ce(t){e[12](t)}void 0!==e[0].upgradeable&&(se.upgradeable=e[0].upgradeable),B=new mk({props:se}),Dh.push(()=>Bh(B,"upgradeable",ae));let le={};function ue(t){e[13](t)}void 0!==e[0].macros&&(le.macros=e[0].macros),X=new kk({props:le}),Dh.push(()=>Bh(X,"macros",ce));let de={errors:e[1]};return void 0!==e[0].info&&(de.info=e[0].info),ee=new vk({props:de}),Dh.push(()=>Bh(ee,"info",ue)),oe=bh(e[5][0]),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),l=fh(),u=dh("section"),d=dh("h1"),d.textContent="Account Type",p=fh(),m=dh("div"),f=dh("label"),h=dh("input"),g=mh("\n Starknet\n "),Wh(v.$$.fragment),b=fh(),$=dh("label"),y=dh("input"),_=mh("\n Ethereum\n "),Wh(k.$$.fragment),x=fh(),w=dh("section"),I=dh("h1"),I.textContent="Features",C=fh(),S=dh("div"),E=dh("label"),z=dh("input"),T=mh("\n Outside Execution\n "),Wh(D.$$.fragment),O=fh(),U=dh("label"),R=dh("input"),A=mh("\n Declarer\n "),Wh(N.$$.fragment),j=fh(),P=dh("label"),M=dh("input"),Z=mh("\n Deployable\n "),Wh(q.$$.fragment),L=fh(),F=dh("label"),V=dh("input"),H=mh("\n Public Key\n "),Wh(J.$$.fragment),G=fh(),Wh(B.$$.fragment),K=fh(),Wh(X.$$.fragment),Y=fh(),Wh(ee.$$.fragment),vh(r,"class","labeled-input"),vh(t,"class","controls-section"),vh(h,"type","radio"),h.__value="stark",h.value=h.__value,xh(f,"checked","stark"===e[2]),vh(y,"type","radio"),y.__value="eth",y.value=y.__value,xh($,"checked","eth"===e[2]),vh(m,"class","checkbox-group"),vh(u,"class","controls-section"),vh(z,"type","checkbox"),xh(E,"checked",e[0].outsideExecution),vh(R,"type","checkbox"),xh(U,"checked",e[0].declare),vh(M,"type","checkbox"),xh(P,"checked",e[0].deploy),vh(V,"type","checkbox"),xh(F,"checked",e[0].pubkey),vh(S,"class","checkbox-group"),vh(w,"class","controls-section"),oe.p(h,y)},m(W,Q){lh(W,t,Q),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),lh(W,l,Q),lh(W,u,Q),sh(u,d),sh(u,p),sh(u,m),sh(m,f),sh(f,h),h.checked=h.__value===e[0].type,sh(f,g),Kh(v,f,null),sh(m,b),sh(m,$),sh($,y),y.checked=y.__value===e[0].type,sh($,_),Kh(k,$,null),lh(W,x,Q),lh(W,w,Q),sh(w,I),sh(w,C),sh(w,S),sh(S,E),sh(E,z),z.checked=e[0].outsideExecution,sh(E,T),Kh(D,E,null),sh(S,O),sh(S,U),sh(U,R),R.checked=e[0].declare,sh(U,A),Kh(N,U,null),sh(S,j),sh(S,P),sh(P,M),M.checked=e[0].deploy,sh(P,Z),Kh(q,P,null),sh(S,L),sh(S,F),sh(F,V),V.checked=e[0].pubkey,sh(F,H),Kh(J,F,null),sh(S,G),Kh(B,S,null),lh(W,K,Q),Kh(X,W,Q),lh(W,Y,Q),Kh(ee,W,Q),ne=!0,re||(ie=[gh(s,"input",e[3]),ah(c=A_.call(null,s,e[1]?.name)),gh(h,"change",e[4]),gh(y,"change",e[6]),gh(z,"change",e[7]),gh(R,"change",e[8]),gh(M,"change",e[9]),gh(V,"change",e[10])],re=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&(h.checked=h.__value===e[0].type);const n={};16384&t&&(n.$$scope={dirty:t,ctx:e}),v.$set(n),(!ne||4&t)&&xh(f,"checked","stark"===e[2]),1&t&&(y.checked=y.__value===e[0].type);const o={};16384&t&&(o.$$scope={dirty:t,ctx:e}),k.$set(o),(!ne||4&t)&&xh($,"checked","eth"===e[2]),1&t&&(z.checked=e[0].outsideExecution);const r={};16384&t&&(r.$$scope={dirty:t,ctx:e}),D.$set(r),(!ne||1&t)&&xh(E,"checked",e[0].outsideExecution),1&t&&(R.checked=e[0].declare);const i={};16384&t&&(i.$$scope={dirty:t,ctx:e}),N.$set(i),(!ne||1&t)&&xh(U,"checked",e[0].declare),1&t&&(M.checked=e[0].deploy);const a={};16384&t&&(a.$$scope={dirty:t,ctx:e}),q.$set(a),(!ne||1&t)&&xh(P,"checked",e[0].deploy),1&t&&(V.checked=e[0].pubkey);const l={};16384&t&&(l.$$scope={dirty:t,ctx:e}),J.$set(l),(!ne||1&t)&&xh(F,"checked",e[0].pubkey);const u={};!W&&1&t&&(W=!0,u.upgradeable=e[0].upgradeable,jh(()=>W=!1)),B.$set(u);const d={};!Q&&1&t&&(Q=!0,d.macros=e[0].macros,jh(()=>Q=!1)),X.$set(d);const p={};2&t&&(p.errors=e[1]),!te&&1&t&&(te=!0,p.info=e[0].info,jh(()=>te=!1)),ee.$set(p)},i(e){ne||(Jh(v.$$.fragment,e),Jh(k.$$.fragment,e),Jh(D.$$.fragment,e),Jh(N.$$.fragment,e),Jh(q.$$.fragment,e),Jh(J.$$.fragment,e),Jh(B.$$.fragment,e),Jh(X.$$.fragment,e),Jh(ee.$$.fragment,e),ne=!0)},o(e){Gh(v.$$.fragment,e),Gh(k.$$.fragment,e),Gh(D.$$.fragment,e),Gh(N.$$.fragment,e),Gh(q.$$.fragment,e),Gh(J.$$.fragment,e),Gh(B.$$.fragment,e),Gh(X.$$.fragment,e),Gh(ee.$$.fragment,e),ne=!1},d(e){e&&uh(t),e&&uh(l),e&&uh(u),Xh(v),Xh(k),e&&uh(x),e&&uh(w),Xh(D),Xh(N),Xh(q),Xh(J),Xh(B),e&&uh(K),Xh(X,e),e&&uh(Y),Xh(ee,e),oe.r(),re=!1,Kf(ie)}}}function Lx(e,t,n){let{opts:o={kind:"Account",...Wb.defaults,info:{...fv},macros:{...gv}}}=t,{errors:r}=t,{accountType:i}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors),"accountType"in e&&n(2,i=e.accountType)},[o,r,i,function(){o.name=this.value,n(0,o)},function(){o.type=this.__value,n(0,o)},[[]],function(){o.type=this.__value,n(0,o)},function(){o.outsideExecution=this.checked,n(0,o)},function(){o.declare=this.checked,n(0,o)},function(){o.deploy=this.checked,n(0,o)},function(){o.pubkey=this.checked,n(0,o)},function(t){e.$$.not_equal(o.upgradeable,t)&&(o.upgradeable=t,n(0,o))},function(t){e.$$.not_equal(o.macros,t)&&(o.macros=t,n(0,o))},function(t){e.$$.not_equal(o.info,t)&&(o.info=t,n(0,o))}]}function Fx(e){let t;return{c(){t=mh("The minimal number of confirmations required to approve a transaction.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Vx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D;function O(t){e[4](t)}p=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/governance/multisig#signer_management",$$slots:{default:[Fx]},$$scope:{ctx:e}}});let U={};function R(t){e[5](t)}void 0!==e[0].upgradeable&&(U.upgradeable=e[0].upgradeable),_=new mk({props:U}),Dh.push(()=>Bh(_,"upgradeable",O));let A={};function N(t){e[6](t)}void 0!==e[0].macros&&(A.macros=e[0].macros),w=new kk({props:A}),Dh.push(()=>Bh(w,"macros",R));let j={errors:e[1]};return void 0!==e[0].info&&(j.info=e[0].info),S=new vk({props:j}),Dh.push(()=>Bh(S,"info",N)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),c=fh(),l=dh("label"),u=dh("span"),d=mh("Quorum\n "),Wh(p.$$.fragment),m=fh(),f=dh("input"),g=fh(),v=dh("section"),b=dh("h1"),b.textContent="Features",$=fh(),y=dh("div"),Wh(_.$$.fragment),x=fh(),Wh(w.$$.fragment),C=fh(),Wh(S.$$.fragment),vh(r,"class","labeled-input"),vh(u,"class","flex justify-between pr-2"),vh(f,"placeholder",""),vh(l,"class","labeled-input"),vh(t,"class","controls-section"),vh(y,"class","checkbox-group"),vh(v,"class","controls-section")},m(k,I){lh(k,t,I),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,c),sh(t,l),sh(l,u),sh(u,d),Kh(p,u,null),sh(l,m),sh(l,f),_h(f,e[0].quorum),lh(k,g,I),lh(k,v,I),sh(v,b),sh(v,$),sh(v,y),Kh(_,y,null),lh(k,x,I),Kh(w,k,I),lh(k,C,I),Kh(S,k,I),z=!0,T||(D=[gh(s,"input",e[2]),gh(f,"input",e[3]),ah(h=A_.call(null,f,e[1]?.quorum))],T=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name);const n={};256&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&f.value!==e[0].quorum&&_h(f,e[0].quorum),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.quorum);const o={};!k&&1&t&&(k=!0,o.upgradeable=e[0].upgradeable,jh(()=>k=!1)),_.$set(o);const r={};!I&&1&t&&(I=!0,r.macros=e[0].macros,jh(()=>I=!1)),w.$set(r);const i={};2&t&&(i.errors=e[1]),!E&&1&t&&(E=!0,i.info=e[0].info,jh(()=>E=!1)),S.$set(i)},i(e){z||(Jh(p.$$.fragment,e),Jh(_.$$.fragment,e),Jh(w.$$.fragment,e),Jh(S.$$.fragment,e),z=!0)},o(e){Gh(p.$$.fragment,e),Gh(_.$$.fragment,e),Gh(w.$$.fragment,e),Gh(S.$$.fragment,e),z=!1},d(e){e&&uh(t),Xh(p),e&&uh(g),e&&uh(v),Xh(_),e&&uh(x),Xh(w,e),e&&uh(C),Xh(S,e),T=!1,Kf(D)}}}function Hx(e,t,n){const o=Kb.defaults;let{opts:r={kind:"Multisig",...o,info:{...fv},macros:{...gv}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},[r,i,function(){r.name=this.value,n(0,r)},function(){r.quorum=this.value,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function Jx(e){let t;return{c(){t=mh("Delay since proposal is created until voting starts.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Gx(e){let t;return{c(){t=mh("Length of period during which people can cast their vote.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Bx(e){let t;return{c(){t=mh("Minimum number of votes an account must have to create a proposal.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Wx(e){let t;return{c(){t=mh("Quorum required for a proposal to pass.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Kx(e){let t,n,o,r;return{c(){t=dh("input"),vh(t,"id","quorum-input")},m(i,a){lh(i,t,a),_h(t,e[0].quorumAbsolute),e[17](t),o||(r=[gh(t,"input",e[16]),ah(n=A_.call(null,t,e[1]?.quorumAbsolute))],o=!0)},p(e,o){1&o&&t.value!==e[0].quorumAbsolute&&_h(t,e[0].quorumAbsolute),n&&Xf(n.update)&&2&o&&n.update.call(null,e[1]?.quorumAbsolute)},d(n){n&&uh(t),e[17](null),o=!1,Kf(r)}}}function Xx(e){let t,n,o,r;return{c(){t=dh("input"),vh(t,"id","quorum-input"),vh(t,"type","number"),vh(t,"placeholder",e[4].quorumPercent.toString())},m(i,a){lh(i,t,a),_h(t,e[0].quorumPercent),o||(r=[gh(t,"input",e[15]),ah(n=A_.call(null,t,e[1]?.quorumPercent))],o=!0)},p(e,o){1&o&&$h(t.value)!==e[0].quorumPercent&&_h(t,e[0].quorumPercent),n&&Xf(n.update)&&2&o&&n.update.call(null,e[1]?.quorumPercent)},d(e){e&&uh(t),o=!1,Kf(r)}}}function Qx(e){let t;return{c(){t=mh("Token amounts above will be extended with this number of zeroes. Does not apply to ERC721Votes.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function Yx(e){let t;return{c(){t=mh("Allow governance to update voting settings (delay, period, proposal threshold).")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function ew(e){let t;return{c(){t=mh("Represent voting power with a votes-enabled ERC20 token. Voters can entrust their voting power to a delegate.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function tw(e){let t;return{c(){t=mh("Represent voting power with a votes-enabled ERC721 token. Voters can entrust their voting power to a delegate.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function nw(e){let t,n,o,r,i;return{c(){t=mh("The clock mode used by the voting token.\n "),n=dh("br"),o=fh(),r=dh("b"),r.textContent="NOTE:",i=mh(" This setting must be the same as what the token uses. For now, only timestamp mode is supported.")},m(e,a){lh(e,t,a),lh(e,n,a),lh(e,o,a),lh(e,r,a),lh(e,i,a)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o),e&&uh(r),e&&uh(i)}}}function ow(e){let t;return{c(){t=mh("The token uses voting durations expressed as timestamps.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function rw(e){let t,n,o;return{c(){t=mh("Module compatible with OpenZeppelin's "),n=dh("code"),n.textContent="TimelockController",o=mh(".")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function iw(e){let t,n,o,r,i,a,s,c,l;return i=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/governance#TimelockControllerComponent",$$slots:{default:[rw]},$$scope:{ctx:e}}}),s=bh(e[13][0]),{c(){t=dh("div"),n=dh("label"),o=dh("input"),r=mh("\n TimelockController\n "),Wh(i.$$.fragment),vh(o,"type","radio"),o.__value="openzeppelin",o.value=o.__value,xh(n,"checked","openzeppelin"===e[0].timelock),vh(t,"class","checkbox-group"),s.p(o)},m(s,u){lh(s,t,u),sh(t,n),sh(n,o),o.checked=o.__value===e[0].timelock,sh(n,r),Kh(i,n,null),a=!0,c||(l=gh(o,"change",e[24]),c=!0)},p(e,t){1&t&&(o.checked=o.__value===e[0].timelock);const r={};1073741824&t&&(r.$$scope={dirty:t,ctx:e}),i.$set(r),(!a||1&t)&&xh(n,"checked","openzeppelin"===e[0].timelock)},i(e){a||(Jh(i.$$.fragment,e),a=!0)},o(e){Gh(i.$$.fragment,e),a=!1},d(e){e&&uh(t),Xh(i),s.r(),c=!1,l()}}}function aw(e){let t;return{c(){t=mh("Metadata for the SNIP12 domain separator.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function sw(e){let t;return{c(){t=mh("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function cw(e){let t;return{c(){t=mh("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function lw(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,he,ge,ve,be,$e,ye,_e,ke,xe,we,Ie,Ce,Se,Ee,ze,Te,De,Oe,Ue,Re,Ae,Ne,je,Pe,Me,Ze,qe,Le,Fe,Ve,He,Je,Ge,Be,We,Ke,Xe,Qe,Ye,et,tt,nt,ot,rt,it,at,st,ct,lt,ut,dt,pt,mt,ft,ht,gt,vt,bt,$t,yt,_t,kt,xt;function wt(e,t){return"percent"===e[0].quorumMode?Xx:Kx}f=new T_({props:{$$slots:{default:[Jx]},$$scope:{ctx:e}}}),x=new T_({props:{$$slots:{default:[Gx]},$$scope:{ctx:e}}}),D=new T_({props:{$$slots:{default:[Bx]},$$scope:{ctx:e}}}),B=new T_({props:{$$slots:{default:[Wx]},$$scope:{ctx:e}}});let It=wt(e),Ct=It(e);function St(t){e[20](t)}oe=new T_({props:{$$slots:{default:[Qx]},$$scope:{ctx:e}}}),le=new T_({props:{$$slots:{default:[Yx]},$$scope:{ctx:e}}});let Et={};function zt(t){e[25](t)}void 0!==e[0].upgradeable&&(Et.upgradeable=e[0].upgradeable),de=new mk({props:Et}),Dh.push(()=>Bh(de,"upgradeable",St)),_e=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/governance#VotesComponent",$$slots:{default:[ew]},$$scope:{ctx:e}}}),Ce=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/governance#VotesComponent",$$slots:{default:[tw]},$$scope:{ctx:e}}}),Ue=new T_({props:{$$slots:{default:[nw]},$$scope:{ctx:e}}}),Me=new T_({props:{$$slots:{default:[ow]},$$scope:{ctx:e}}});let Tt={label:"Timelock",defaultValue:"openzeppelin",helpContent:"Add a delay to actions taken by the Governor. Gives users time to exit the system if they disagree with governance decisions.",$$slots:{default:[iw]},$$scope:{ctx:e}};function Dt(t){e[28](t)}void 0!==e[0].timelock&&(Tt.value=e[0].timelock),qe=new Q_({props:Tt}),Dh.push(()=>Bh(qe,"value",zt)),We=new T_({props:{$$slots:{default:[aw]},$$scope:{ctx:e}}}),et=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[sw]},$$scope:{ctx:e}}}),ct=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/guides/snip12",$$slots:{default:[cw]},$$scope:{ctx:e}}});let Ot={};function Ut(t){e[29](t)}void 0!==e[0].macros&&(Ot.macros=e[0].macros),mt=new kk({props:Ot}),Dh.push(()=>Bh(mt,"macros",Dt));let Rt={errors:e[1]};return void 0!==e[0].info&&(Rt.info=e[0].info),gt=new vk({props:Rt}),Dh.push(()=>Bh(gt,"info",Ut)),$t=bh(e[13][1]),yt=bh(e[13][2]),_t=bh(e[13][3]),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),c=fh(),l=dh("div"),u=dh("label"),d=dh("span"),p=dh("span"),p.textContent="Voting Delay",m=fh(),Wh(f.$$.fragment),h=fh(),g=dh("input"),b=fh(),$=dh("label"),y=dh("span"),_=dh("span"),_.textContent="Voting Period",k=fh(),Wh(x.$$.fragment),w=fh(),I=dh("input"),S=fh(),E=dh("label"),z=dh("span"),T=mh("Proposal Threshold\n "),Wh(D.$$.fragment),O=fh(),U=dh("input"),A=fh(),N=dh("label"),j=dh("span"),P=dh("span"),M=mh("Quorum\n "),Z=dh("label"),q=mh("% "),L=dh("input"),F=fh(),V=dh("label"),H=mh("# "),J=dh("input"),G=fh(),Wh(B.$$.fragment),W=fh(),Ct.c(),K=fh(),X=dh("p"),Q=dh("label"),Y=mh("Token decimals:\n "),ee=dh("input"),ne=fh(),Wh(oe.$$.fragment),re=fh(),ie=dh("div"),ae=dh("label"),se=dh("input"),ce=mh("\n Updatable Settings\n "),Wh(le.$$.fragment),ue=fh(),Wh(de.$$.fragment),me=fh(),fe=dh("section"),he=dh("h1"),he.textContent="Votes",ge=fh(),ve=dh("div"),be=dh("label"),$e=dh("input"),ye=mh("\n ERC20Votes\n "),Wh(_e.$$.fragment),ke=fh(),xe=dh("label"),we=dh("input"),Ie=mh("\n ERC721Votes\n "),Wh(Ce.$$.fragment),Se=fh(),Ee=dh("section"),ze=dh("h1"),Te=dh("label"),De=dh("span"),De.textContent="Token Clock Mode",Oe=fh(),Wh(Ue.$$.fragment),Re=fh(),Ae=dh("div"),Ne=dh("label"),je=dh("input"),Pe=mh("\n Timestamp\n "),Wh(Me.$$.fragment),Ze=fh(),Wh(qe.$$.fragment),Fe=fh(),Ve=dh("section"),He=dh("h1"),Je=dh("label"),Ge=dh("span"),Ge.textContent="SNIP12 Metadata",Be=fh(),Wh(We.$$.fragment),Ke=fh(),Xe=dh("label"),Qe=dh("span"),Ye=mh("Application Name\n "),Wh(et.$$.fragment),tt=fh(),nt=dh("input"),rt=fh(),it=dh("label"),at=dh("span"),st=mh("Application Version\n "),Wh(ct.$$.fragment),lt=fh(),ut=dh("input"),pt=fh(),Wh(mt.$$.fragment),ht=fh(),Wh(gt.$$.fragment),vh(r,"class","labeled-input"),vh(d,"class","flex justify-between"),vh(u,"class","labeled-input"),vh(y,"class","flex justify-between"),vh($,"class","labeled-input"),vh(l,"class","grid grid-cols-2 gap-2"),vh(z,"class","flex justify-between pr-2"),vh(U,"placeholder","0"),vh(E,"class","labeled-input"),vh(L,"type","radio"),L.__value="percent",L.value=L.__value,vh(J,"type","radio"),J.__value="absolute",J.value=J.__value,vh(j,"class","flex justify-between pr-2"),vh(N,"class","labeled-input"),vh(N,"for","quorum-input"),ee.disabled=e[3],vh(ee,"type","number"),vh(ee,"placeholder",e[4].decimals.toString()),vh(ee,"class","input-inline"),vh(Q,"class","text-sm"),vh(X,"class","tooltip-container flex justify-between items-center pr-2"),vh(se,"type","checkbox"),xh(ae,"checked",e[0].settings),vh(ie,"class","checkbox-group"),vh(t,"class","controls-section"),vh($e,"type","radio"),$e.__value="erc20votes",$e.value=$e.__value,xh(be,"checked","erc20votes"===e[0].votes),vh(we,"type","radio"),we.__value="erc721votes",we.value=we.__value,xh(xe,"checked","erc721votes"===e[0].votes),vh(ve,"class","checkbox-group"),vh(fe,"class","controls-section"),vh(Te,"class","flex justify-between items-center tooltip-container pr-2"),vh(je,"type","radio"),je.__value="timestamp",je.value=je.__value,xh(Ne,"checked","timestamp"===e[0].clockMode),vh(Ae,"class","checkbox-group"),vh(Ee,"class","controls-section"),vh(Je,"class","flex justify-between items-center tooltip-container pr-2"),vh(Qe,"class","flex justify-between pr-2"),vh(Xe,"class","labeled-input"),vh(at,"class","flex justify-between pr-2"),vh(it,"class","labeled-input"),vh(Ve,"class","controls-section"),$t.p(je),yt.p($e,we),_t.p(L,J)},m(pe,Le){lh(pe,t,Le),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,c),sh(t,l),sh(l,u),sh(u,d),sh(d,p),sh(d,m),Kh(f,d,null),sh(u,h),sh(u,g),_h(g,e[0].delay),sh(l,b),sh(l,$),sh($,y),sh(y,_),sh(y,k),Kh(x,y,null),sh($,w),sh($,I),_h(I,e[0].period),sh(t,S),sh(t,E),sh(E,z),sh(z,T),Kh(D,z,null),sh(E,O),sh(E,U),_h(U,e[0].proposalThreshold),sh(t,A),sh(t,N),sh(N,j),sh(j,P),sh(P,M),sh(P,Z),sh(Z,q),sh(Z,L),L.checked=L.__value===e[0].quorumMode,sh(P,F),sh(P,V),sh(V,H),sh(V,J),J.checked=J.__value===e[0].quorumMode,sh(j,G),Kh(B,j,null),sh(N,W),Ct.m(N,null),sh(t,K),sh(t,X),sh(X,Q),sh(Q,Y),sh(Q,ee),_h(ee,e[0].decimals),sh(X,ne),Kh(oe,X,null),sh(t,re),sh(t,ie),sh(ie,ae),sh(ae,se),se.checked=e[0].settings,sh(ae,ce),Kh(le,ae,null),sh(ie,ue),Kh(de,ie,null),lh(pe,me,Le),lh(pe,fe,Le),sh(fe,he),sh(fe,ge),sh(fe,ve),sh(ve,be),sh(be,$e),$e.checked=$e.__value===e[0].votes,sh(be,ye),Kh(_e,be,null),sh(ve,ke),sh(ve,xe),sh(xe,we),we.checked=we.__value===e[0].votes,sh(xe,Ie),Kh(Ce,xe,null),lh(pe,Se,Le),lh(pe,Ee,Le),sh(Ee,ze),sh(ze,Te),sh(Te,De),sh(Te,Oe),Kh(Ue,Te,null),sh(Ee,Re),sh(Ee,Ae),sh(Ae,Ne),sh(Ne,je),je.checked=je.__value===e[0].clockMode,sh(Ne,Pe),Kh(Me,Ne,null),lh(pe,Ze,Le),Kh(qe,pe,Le),lh(pe,Fe,Le),lh(pe,Ve,Le),sh(Ve,He),sh(He,Je),sh(Je,Ge),sh(Je,Be),Kh(We,Je,null),sh(Ve,Ke),sh(Ve,Xe),sh(Xe,Qe),sh(Qe,Ye),Kh(et,Qe,null),sh(Xe,tt),sh(Xe,nt),_h(nt,e[0].appName),sh(Ve,rt),sh(Ve,it),sh(it,at),sh(at,st),Kh(ct,at,null),sh(it,lt),sh(it,ut),_h(ut,e[0].appVersion),lh(pe,pt,Le),Kh(mt,pe,Le),lh(pe,ht,Le),Kh(gt,pe,Le),bt=!0,kt||(xt=[gh(s,"input",e[8]),gh(g,"input",e[9]),ah(v=A_.call(null,g,e[1]?.delay)),gh(I,"input",e[10]),ah(C=A_.call(null,I,e[1]?.period)),gh(U,"input",e[11]),ah(R=A_.call(null,U,e[1]?.proposalThreshold)),gh(L,"change",e[12]),gh(J,"change",e[14]),gh(J,"change",e[5]),gh(ee,"input",e[18]),ah(Sk.call(null,ee)),ah(te=A_.call(null,ee,e[1]?.decimals)),gh(se,"change",e[19]),gh($e,"change",e[21]),gh(we,"change",e[22]),gh(je,"change",e[23]),gh(nt,"input",e[26]),ah(ot=A_.call(null,nt,e[1]?.appName)),gh(ut,"input",e[27]),ah(dt=A_.call(null,ut,e[1]?.appVersion))],kt=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name);const n={};1073741824&t&&(n.$$scope={dirty:t,ctx:e}),f.$set(n),1&t&&g.value!==e[0].delay&&_h(g,e[0].delay),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.delay);const o={};1073741824&t&&(o.$$scope={dirty:t,ctx:e}),x.$set(o),1&t&&I.value!==e[0].period&&_h(I,e[0].period),C&&Xf(C.update)&&2&t&&C.update.call(null,e[1]?.period);const r={};1073741824&t&&(r.$$scope={dirty:t,ctx:e}),D.$set(r),1&t&&U.value!==e[0].proposalThreshold&&_h(U,e[0].proposalThreshold),R&&Xf(R.update)&&2&t&&R.update.call(null,e[1]?.proposalThreshold),1&t&&(L.checked=L.__value===e[0].quorumMode),1&t&&(J.checked=J.__value===e[0].quorumMode);const i={};1073741824&t&&(i.$$scope={dirty:t,ctx:e}),B.$set(i),It===(It=wt(e))&&Ct?Ct.p(e,t):(Ct.d(1),Ct=It(e),Ct&&(Ct.c(),Ct.m(N,null))),(!bt||8&t)&&(ee.disabled=e[3]),1&t&&$h(ee.value)!==e[0].decimals&&_h(ee,e[0].decimals),te&&Xf(te.update)&&2&t&&te.update.call(null,e[1]?.decimals);const a={};1073741824&t&&(a.$$scope={dirty:t,ctx:e}),oe.$set(a),1&t&&(se.checked=e[0].settings);const c={};1073741824&t&&(c.$$scope={dirty:t,ctx:e}),le.$set(c),(!bt||1&t)&&xh(ae,"checked",e[0].settings);const l={};!pe&&1&t&&(pe=!0,l.upgradeable=e[0].upgradeable,jh(()=>pe=!1)),de.$set(l),1&t&&($e.checked=$e.__value===e[0].votes);const u={};1073741824&t&&(u.$$scope={dirty:t,ctx:e}),_e.$set(u),(!bt||1&t)&&xh(be,"checked","erc20votes"===e[0].votes),1&t&&(we.checked=we.__value===e[0].votes);const d={};1073741824&t&&(d.$$scope={dirty:t,ctx:e}),Ce.$set(d),(!bt||1&t)&&xh(xe,"checked","erc721votes"===e[0].votes);const p={};1073741824&t&&(p.$$scope={dirty:t,ctx:e}),Ue.$set(p),1&t&&(je.checked=je.__value===e[0].clockMode);const m={};1073741824&t&&(m.$$scope={dirty:t,ctx:e}),Me.$set(m),(!bt||1&t)&&xh(Ne,"checked","timestamp"===e[0].clockMode);const h={};1073741825&t&&(h.$$scope={dirty:t,ctx:e}),!Le&&1&t&&(Le=!0,h.value=e[0].timelock,jh(()=>Le=!1)),qe.$set(h);const b={};1073741824&t&&(b.$$scope={dirty:t,ctx:e}),We.$set(b);const $={};1073741824&t&&($.$$scope={dirty:t,ctx:e}),et.$set($),1&t&&nt.value!==e[0].appName&&_h(nt,e[0].appName),ot&&Xf(ot.update)&&2&t&&ot.update.call(null,e[1]?.appName);const y={};1073741824&t&&(y.$$scope={dirty:t,ctx:e}),ct.$set(y),1&t&&ut.value!==e[0].appVersion&&_h(ut,e[0].appVersion),dt&&Xf(dt.update)&&2&t&&dt.update.call(null,e[1]?.appVersion);const _={};!ft&&1&t&&(ft=!0,_.macros=e[0].macros,jh(()=>ft=!1)),mt.$set(_);const k={};2&t&&(k.errors=e[1]),!vt&&1&t&&(vt=!0,k.info=e[0].info,jh(()=>vt=!1)),gt.$set(k)},i(e){bt||(Jh(f.$$.fragment,e),Jh(x.$$.fragment,e),Jh(D.$$.fragment,e),Jh(B.$$.fragment,e),Jh(oe.$$.fragment,e),Jh(le.$$.fragment,e),Jh(de.$$.fragment,e),Jh(_e.$$.fragment,e),Jh(Ce.$$.fragment,e),Jh(Ue.$$.fragment,e),Jh(Me.$$.fragment,e),Jh(qe.$$.fragment,e),Jh(We.$$.fragment,e),Jh(et.$$.fragment,e),Jh(ct.$$.fragment,e),Jh(mt.$$.fragment,e),Jh(gt.$$.fragment,e),bt=!0)},o(e){Gh(f.$$.fragment,e),Gh(x.$$.fragment,e),Gh(D.$$.fragment,e),Gh(B.$$.fragment,e),Gh(oe.$$.fragment,e),Gh(le.$$.fragment,e),Gh(de.$$.fragment,e),Gh(_e.$$.fragment,e),Gh(Ce.$$.fragment,e),Gh(Ue.$$.fragment,e),Gh(Me.$$.fragment,e),Gh(qe.$$.fragment,e),Gh(We.$$.fragment,e),Gh(et.$$.fragment,e),Gh(ct.$$.fragment,e),Gh(mt.$$.fragment,e),Gh(gt.$$.fragment,e),bt=!1},d(e){e&&uh(t),Xh(f),Xh(x),Xh(D),Xh(B),Ct.d(),Xh(oe),Xh(le),Xh(de),e&&uh(me),e&&uh(fe),Xh(_e),Xh(Ce),e&&uh(Se),e&&uh(Ee),Xh(Ue),Xh(Me),e&&uh(Ze),Xh(qe,e),e&&uh(Fe),e&&uh(Ve),Xh(We),Xh(et),Xh(ct),e&&uh(pt),Xh(mt,e),e&&uh(ht),Xh(gt,e),$t.r(),yt.r(),_t.r(),kt=!1,Kf(xt)}}}function uw(e,t,n){const o=Xb.defaults;let r,{opts:i={kind:"Governor",...o,proposalThreshold:"",quorumAbsolute:"",info:{...fv},macros:{...gv}}}=t;let a,{errors:s}=t,c="erc721votes"===i.votes,l=i.decimals;return e.$$set=e=>{"opts"in e&&n(0,i=e.opts),"errors"in e&&n(1,s=e.errors)},e.$$.update=()=>{193&e.$$.dirty&&(c&&"erc721votes"!==i.votes?(n(0,i.decimals=l,i),n(3,a=!1)):c||"erc721votes"!==i.votes||(n(7,l=i.decimals),n(0,i.decimals=0,i),n(3,a=!0)),n(6,c="erc721votes"===i.votes))},[i,s,r,a,o,()=>{if(s){const e=s,t=s.quorumAbsolute;n(1,s.quorumAbsolute=void 0,s),r.focus(),setTimeout(()=>{s===e&&n(1,s.quorumAbsolute=t,s)},1e3)}},c,l,function(){i.name=this.value,n(0,i),n(6,c),n(7,l)},function(){i.delay=this.value,n(0,i),n(6,c),n(7,l)},function(){i.period=this.value,n(0,i),n(6,c),n(7,l)},function(){i.proposalThreshold=this.value,n(0,i),n(6,c),n(7,l)},function(){i.quorumMode=this.__value,n(0,i),n(6,c),n(7,l)},[[],[],[],[]],function(){i.quorumMode=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.quorumPercent=$h(this.value),n(0,i),n(6,c),n(7,l)},function(){i.quorumAbsolute=this.value,n(0,i),n(6,c),n(7,l)},function(e){Dh[e?"unshift":"push"](()=>{r=e,n(2,r)})},function(){i.decimals=$h(this.value),n(0,i),n(6,c),n(7,l)},function(){i.settings=this.checked,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.upgradeable,t)&&(i.upgradeable=t,n(0,i),n(6,c),n(7,l))},function(){i.votes=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.votes=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.clockMode=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.timelock=this.__value,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.timelock,t)&&(i.timelock=t,n(0,i),n(6,c),n(7,l))},function(){i.appName=this.value,n(0,i),n(6,c),n(7,l)},function(){i.appVersion=this.value,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.macros,t)&&(i.macros=t,n(0,i),n(6,c),n(7,l))},function(t){e.$$.not_equal(i.info,t)&&(i.info=t,n(0,i),n(6,c),n(7,l))}]}function dw(e){let t;return{c(){t=mh("The timestamp marking the beginning of the vesting period.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function pw(e){let t;return{c(){t=mh("The total duration of the vesting period.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function mw(e){let t;return{c(){t=mh("The duration of the cliff period. Must be less than or equal to the total duration.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function fw(e){let t;return{c(){t=mh("A vesting schedule implementation when tokens are vested gradually following a linear curve.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function hw(e){let t;return{c(){t=mh("A custom vesting schedule that requires the implementation of the VestingSchedule trait.")},m(e,n){lh(e,t,n)},d(e){e&&uh(t)}}}function gw(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A,N,j,P,M,Z,q,L,F,V,H,J,G,B,W,K,X,Q,Y,ee,te;function ne(t){e[9](t)}p=new T_({props:{$$slots:{default:[dw]},$$scope:{ctx:e}}}),y=new T_({props:{$$slots:{default:[pw]},$$scope:{ctx:e}}}),E=new T_({props:{$$slots:{default:[mw]},$$scope:{ctx:e}}}),Z=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/finance#LinearVestingSchedule",$$slots:{default:[fw]},$$scope:{ctx:e}}}),H=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/api/finance#VestingComponent-Vesting-Schedule",$$slots:{default:[hw]},$$scope:{ctx:e}}});let oe={};function re(t){e[10](t)}void 0!==e[0].macros&&(oe.macros=e[0].macros),G=new kk({props:oe}),Dh.push(()=>Bh(G,"macros",ne));let ie={errors:e[1]};return void 0!==e[0].info&&(ie.info=e[0].info),K=new vk({props:ie}),Dh.push(()=>Bh(K,"info",re)),Y=bh(e[7][0]),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),c=fh(),l=dh("label"),u=dh("span"),d=mh("Start date (UTC)\n "),Wh(p.$$.fragment),m=fh(),f=dh("input"),g=fh(),v=dh("label"),b=dh("span"),$=mh("Duration\n "),Wh(y.$$.fragment),_=fh(),k=dh("input"),w=fh(),I=dh("label"),C=dh("span"),S=mh("Cliff duration\n "),Wh(E.$$.fragment),z=fh(),T=dh("input"),O=fh(),U=dh("section"),R=dh("h1"),R.textContent="Vesting Schedule",A=fh(),N=dh("div"),j=dh("label"),P=dh("input"),M=mh("\n Linear\n "),Wh(Z.$$.fragment),q=fh(),L=dh("label"),F=dh("input"),V=mh("\n Custom\n "),Wh(H.$$.fragment),J=fh(),Wh(G.$$.fragment),W=fh(),Wh(K.$$.fragment),vh(r,"class","labeled-input"),vh(u,"class","flex justify-between pr-2"),vh(f,"type","datetime-local"),vh(f,"placeholder",""),vh(l,"class","labeled-input"),vh(b,"class","flex justify-between pr-2"),vh(k,"placeholder","0"),vh(v,"class","labeled-input"),vh(C,"class","flex justify-between pr-2"),vh(T,"placeholder","0"),vh(I,"class","labeled-input"),vh(t,"class","controls-section"),vh(P,"type","radio"),P.__value="linear",P.value=P.__value,xh(j,"checked","linear"===e[0].schedule),vh(F,"type","radio"),F.__value="custom",F.value=F.__value,xh(L,"checked","custom"===e[0].schedule),vh(N,"class","checkbox-group"),vh(U,"class","controls-section"),Y.p(P,F)},m(B,X){lh(B,t,X),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),sh(t,c),sh(t,l),sh(l,u),sh(u,d),Kh(p,u,null),sh(l,m),sh(l,f),_h(f,e[0].startDate),sh(t,g),sh(t,v),sh(v,b),sh(b,$),Kh(y,b,null),sh(v,_),sh(v,k),_h(k,e[0].duration),sh(t,w),sh(t,I),sh(I,C),sh(C,S),Kh(E,C,null),sh(I,z),sh(I,T),_h(T,e[0].cliffDuration),lh(B,O,X),lh(B,U,X),sh(U,R),sh(U,A),sh(U,N),sh(N,j),sh(j,P),P.checked=P.__value===e[0].schedule,sh(j,M),Kh(Z,j,null),sh(N,q),sh(N,L),sh(L,F),F.checked=F.__value===e[0].schedule,sh(L,V),Kh(H,L,null),lh(B,J,X),Kh(G,B,X),lh(B,W,X),Kh(K,B,X),Q=!0,ee||(te=[gh(s,"input",e[2]),gh(f,"input",e[3]),ah(h=A_.call(null,f,e[1]?.startDate)),gh(k,"input",e[4]),ah(x=A_.call(null,k,e[1]?.duration)),gh(T,"input",e[5]),ah(D=A_.call(null,T,e[1]?.cliffDuration)),gh(P,"change",e[6]),gh(F,"change",e[8])],ee=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name);const n={};2048&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&_h(f,e[0].startDate),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.startDate);const o={};2048&t&&(o.$$scope={dirty:t,ctx:e}),y.$set(o),1&t&&k.value!==e[0].duration&&_h(k,e[0].duration),x&&Xf(x.update)&&2&t&&x.update.call(null,e[1]?.duration);const r={};2048&t&&(r.$$scope={dirty:t,ctx:e}),E.$set(r),1&t&&T.value!==e[0].cliffDuration&&_h(T,e[0].cliffDuration),D&&Xf(D.update)&&2&t&&D.update.call(null,e[1]?.cliffDuration),1&t&&(P.checked=P.__value===e[0].schedule);const i={};2048&t&&(i.$$scope={dirty:t,ctx:e}),Z.$set(i),(!Q||1&t)&&xh(j,"checked","linear"===e[0].schedule),1&t&&(F.checked=F.__value===e[0].schedule);const a={};2048&t&&(a.$$scope={dirty:t,ctx:e}),H.$set(a),(!Q||1&t)&&xh(L,"checked","custom"===e[0].schedule);const c={};!B&&1&t&&(B=!0,c.macros=e[0].macros,jh(()=>B=!1)),G.$set(c);const l={};2&t&&(l.errors=e[1]),!X&&1&t&&(X=!0,l.info=e[0].info,jh(()=>X=!1)),K.$set(l)},i(e){Q||(Jh(p.$$.fragment,e),Jh(y.$$.fragment,e),Jh(E.$$.fragment,e),Jh(Z.$$.fragment,e),Jh(H.$$.fragment,e),Jh(G.$$.fragment,e),Jh(K.$$.fragment,e),Q=!0)},o(e){Gh(p.$$.fragment,e),Gh(y.$$.fragment,e),Gh(E.$$.fragment,e),Gh(Z.$$.fragment,e),Gh(H.$$.fragment,e),Gh(G.$$.fragment,e),Gh(K.$$.fragment,e),Q=!1},d(e){e&&uh(t),Xh(p),Xh(y),Xh(E),e&&uh(O),e&&uh(U),Xh(Z),Xh(H),e&&uh(J),Xh(G,e),e&&uh(W),Xh(K,e),Y.r(),ee=!1,Kf(te)}}}function vw(e,t,n){let{opts:o={kind:"Vesting",...Qb.defaults,info:{...fv},macros:{...gv}}}=t,{errors:r}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.name=this.value,n(0,o)},function(){o.startDate=this.value,n(0,o)},function(){o.duration=this.value,n(0,o)},function(){o.cliffDuration=this.value,n(0,o)},function(){o.schedule=this.__value,n(0,o)},[[]],function(){o.schedule=this.__value,n(0,o)},function(t){e.$$.not_equal(o.macros,t)&&(o.macros=t,n(0,o))},function(t){e.$$.not_equal(o.info,t)&&(o.info=t,n(0,o))}]}function bw(e){let t,n,o;return{c(){t=mh("Privileged accounts will be able to pause the functionality marked with "),n=dh("code"),n.textContent="self.pausable.assert_not_paused()",o=mh(". Useful for emergency response.")},m(e,r){lh(e,t,r),lh(e,n,r),lh(e,o,r)},p:Jf,d(e){e&&uh(t),e&&uh(n),e&&uh(o)}}}function $w(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,h,g,v,b,$,y,_,k,x,w,I,C,S,E,z,T,D,O,U,R,A;function N(t){e[5](t)}v=new T_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/4.x/security#pausable",$$slots:{default:[bw]},$$scope:{ctx:e}}});let j={};function P(t){e[6](t)}function M(t){e[7](t)}function Z(t){e[8](t)}function q(t){e[9](t)}void 0!==e[0].upgradeable&&(j.upgradeable=e[0].upgradeable),$=new mk({props:j}),Dh.push(()=>Bh($,"upgradeable",N));let L={required:e[2],errors:e[1]};function F(t){e[10](t)}void 0!==e[0].access.type&&(L.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(L.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(L.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(L.darMaxTransferDelay=e[0].access.darMaxTransferDelay),k=new lk({props:L}),Dh.push(()=>Bh(k,"accessType",P)),Dh.push(()=>Bh(k,"darInitialDelay",M)),Dh.push(()=>Bh(k,"darDefaultDelayIncrease",Z)),Dh.push(()=>Bh(k,"darMaxTransferDelay",q));let V={};function H(t){e[11](t)}void 0!==e[0].macros&&(V.macros=e[0].macros),E=new kk({props:V}),Dh.push(()=>Bh(E,"macros",F));let J={errors:e[1]};return void 0!==e[0].info&&(J.info=e[0].info),D=new vk({props:J}),Dh.push(()=>Bh(D,"info",H)),{c(){t=dh("section"),n=dh("h1"),n.textContent="Settings",o=fh(),r=dh("label"),i=dh("span"),i.textContent="Name",a=fh(),s=dh("input"),l=fh(),u=dh("section"),d=dh("h1"),d.textContent="Features",p=fh(),m=dh("div"),f=dh("label"),h=dh("input"),g=mh("\n Pausable\n "),Wh(v.$$.fragment),b=fh(),Wh($.$$.fragment),_=fh(),Wh(k.$$.fragment),S=fh(),Wh(E.$$.fragment),T=fh(),Wh(D.$$.fragment),vh(r,"class","labeled-input"),vh(t,"class","controls-section"),vh(h,"type","checkbox"),xh(f,"checked",e[0].pausable),vh(m,"class","checkbox-group"),vh(u,"class","controls-section")},m(y,x){lh(y,t,x),sh(t,n),sh(t,o),sh(t,r),sh(r,i),sh(r,a),sh(r,s),_h(s,e[0].name),lh(y,l,x),lh(y,u,x),sh(u,d),sh(u,p),sh(u,m),sh(m,f),sh(f,h),h.checked=e[0].pausable,sh(f,g),Kh(v,f,null),sh(m,b),Kh($,m,null),lh(y,_,x),Kh(k,y,x),lh(y,S,x),Kh(E,y,x),lh(y,T,x),Kh(D,y,x),U=!0,R||(A=[gh(s,"input",e[3]),ah(c=A_.call(null,s,e[1]?.name)),gh(h,"change",e[4])],R=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_h(s,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&(h.checked=e[0].pausable);const n={};4096&t&&(n.$$scope={dirty:t,ctx:e}),v.$set(n),(!U||1&t)&&xh(f,"checked",e[0].pausable);const o={};!y&&1&t&&(y=!0,o.upgradeable=e[0].upgradeable,jh(()=>y=!1)),$.$set(o);const r={};4&t&&(r.required=e[2]),2&t&&(r.errors=e[1]),!x&&1&t&&(x=!0,r.accessType=e[0].access.type,jh(()=>x=!1)),!w&&1&t&&(w=!0,r.darInitialDelay=e[0].access.darInitialDelay,jh(()=>w=!1)),!I&&1&t&&(I=!0,r.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,jh(()=>I=!1)),!C&&1&t&&(C=!0,r.darMaxTransferDelay=e[0].access.darMaxTransferDelay,jh(()=>C=!1)),k.$set(r);const i={};!z&&1&t&&(z=!0,i.macros=e[0].macros,jh(()=>z=!1)),E.$set(i);const a={};2&t&&(a.errors=e[1]),!O&&1&t&&(O=!0,a.info=e[0].info,jh(()=>O=!1)),D.$set(a)},i(e){U||(Jh(v.$$.fragment,e),Jh($.$$.fragment,e),Jh(k.$$.fragment,e),Jh(E.$$.fragment,e),Jh(D.$$.fragment,e),U=!0)},o(e){Gh(v.$$.fragment,e),Gh($.$$.fragment,e),Gh(k.$$.fragment,e),Gh(E.$$.fragment,e),Gh(D.$$.fragment,e),U=!1},d(e){e&&uh(t),e&&uh(l),e&&uh(u),Xh(v),Xh($),e&&uh(_),Xh(k,e),e&&uh(S),Xh(E,e),e&&uh(T),Xh(D,e),R=!1,Kf(A)}}}function yw(e,t,n){let o,{opts:r={kind:"Custom",...Yb.defaults,info:{...fv},macros:{...gv},access:{...Yb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Yb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}const _w={ERC20:class extends eg{constructor(e){super(),Yh(this,e,Qk,Xk,Qf,{opts:0,errors:1},null,[-1,-1])}},ERC721:class extends eg{constructor(e){super(),Yh(this,e,vx,gx,Qf,{opts:0,errors:1})}},ERC1155:class extends eg{constructor(e){super(),Yh(this,e,Cx,Ix,Qf,{opts:0,errors:1})}},ERC6909:class extends eg{constructor(e){super(),Yh(this,e,Rx,Ux,Qf,{opts:0,errors:1})}},Account:class extends eg{constructor(e){super(),Yh(this,e,Lx,qx,Qf,{opts:0,errors:1,accountType:2})}},Multisig:class extends eg{constructor(e){super(),Yh(this,e,Hx,Vx,Qf,{opts:0,errors:1})}},Governor:class extends eg{constructor(e){super(),Yh(this,e,uw,lw,Qf,{opts:0,errors:1})}},Vesting:class extends eg{constructor(e){super(),Yh(this,e,vw,gw,Qf,{opts:0,errors:1})}},Custom:class extends eg{constructor(e){super(),Yh(this,e,yw,$w,Qf,{opts:0,errors:1})}}},kw={emptyContract:()=>new Gg("MyToken",{withComponents:gv.withComponents}),build:e=>function(e){switch(e.kind){case"ERC20":return nb(e);case"ERC721":return pb(e);case"ERC1155":return gb(e);case"ERC6909":return _b(e);case"Account":return Sb(e);case"Multisig":return Zb(e);case"Governor":return Rb(e);case"Vesting":return Fb(e);case"Custom":return Ib(e);default:throw new Error("Unknown ERC")}}(e),print:e=>jv(e),optionsErrors:e=>e instanceof Pg?e.messages:void 0,highlight:e=>l$.highlight("cairo",e).value,injectHyperlinks:function(e){const t=/use<\/span> (openzeppelin)::([^A-Z]*)(::[a-zA-Z0-9]+|::{)/g;let n=e,o=t.exec(e);for(;null!=o;){const[r,i,a,s]=o;if(void 0!==r&&void 0!==i&&void 0!==a&&void 0!==s){const e="https://github.com/OpenZeppelin/cairo-contracts/blob/v4.0.1/packages/",t=a.split("::");if(t.splice(1,0,"src"),void 0!==t&&t.length>0){let o;if("::{"===s)o=`use</span> <a class="import-link" href='${e}${t.join("/")}.cairo' target='_blank' rel='noopener noreferrer'>${i}::${a}</a>${s}`;else{const n=s.substring(2,s.length),r=m$[n],c=r?`/${r}.cairo`:".cairo";o=`use</span> <a class="import-link" href='${e}${t.join("/")}${c}' target='_blank' rel='noopener noreferrer'>${i}::${a}${s}</a>`}n=n.replace(r,o)}}o=t.exec(e)}return n},highlightClass:"-cairo",fence:"cairo",controls:_w,controlProps:(e,t)=>"Account"===e?{accountType:t?.type}:{}};!function(e,t=document.body){(async function(e,t,n=document.body){const o=new Hf({name:`OpenZeppelin ${t}`,version:"1.0.0"},{},{autoResize:!1});document.documentElement.style.setProperty("--mcp-app-height","560px");const r=new Ng({target:n,props:{adapter:e,kind:t,mcpApp:o}}),i=new bf(window.parent,window.parent);o.connect(i).then(async()=>{const e=ig(o);console.info(`[mcp-apps] connected (${t}) hostCapabilities`,o.getHostCapabilities()),r.$set({hostConnected:!0,hostConnectError:void 0,hostSendCaps:e}),await o.sendSizeChanged({height:jg})}).catch(e=>{const n=e instanceof Error?e.message:String(e);console.error(`[mcp-apps] connect failed for ${t}`,e),r.$set({hostConnected:!1,hostConnectError:n})})})(e,"__OZ_MCP_KIND__",t)}(kw)}();
|
|
17
17
|
|
|
18
18
|
</script>
|
|
19
19
|
</body>
|