@assemble-inc/chat-widget 0.1.3 → 0.1.5
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/README.md +34 -58
- package/dist/Widget.d.ts +69 -3
- package/dist/embed.d.ts +25 -0
- package/dist/embed.iife.js +7 -7
- package/dist/index.d.ts +2 -3
- package/dist/index.js +10023 -3227
- package/dist/server.cjs +31 -8
- package/dist/server.d.cts +29 -5
- package/dist/server.d.ts +29 -5
- package/dist/server.js +31 -8
- package/package.json +1 -1
- package/dist/index.css +0 -1
package/dist/embed.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-neutral-300:oklch(87% 0 0);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-bold:700;--radius-xl:.75rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-asm-white:#fff;--color-asm-purple:#2e2438;--color-asm-pink-400:#ffa2f6;--color-asm-blue:#a5d5d8;--color-asm-gray-500:#f1f1f1}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.-bottom-4{bottom:calc(var(--spacing) * -4)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-1{bottom:calc(var(--spacing) * 1)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-20{bottom:calc(var(--spacing) * 20)}.left-0{left:calc(var(--spacing) * 0)}.left-2{left:calc(var(--spacing) * 2)}.left-4{left:calc(var(--spacing) * 4)}.left-6{left:calc(var(--spacing) * 6)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.-mt-1{margin-top:calc(var(--spacing) * -1)}.-mr-\\[4\\.5rem\\]{margin-right:-4.5rem}.mr-0{margin-right:calc(var(--spacing) * 0)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mb-24{margin-bottom:calc(var(--spacing) * 24)}.ml-0{margin-left:calc(var(--spacing) * 0)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.flex{display:flex}.inline-block{display:inline-block}.h-0{height:calc(var(--spacing) * 0)}.h-3\\/4{height:75%}.h-5\\/6{height:83.3333%}.h-6{height:calc(var(--spacing) * 6)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-full{height:100%}.max-h-\\[500px\\]{max-height:500px}.max-h-\\[800px\\]{max-height:800px}.min-h-\\[46px\\]{min-height:46px}.w-0{width:calc(var(--spacing) * 0)}.w-6{width:calc(var(--spacing) * 6)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-80{width:calc(var(--spacing) * 80)}.w-full{width:100%}.max-w-none{max-width:none}.shrink-0{flex-shrink:0}.origin-bottom-left{transform-origin:0 100%}.origin-bottom-right{transform-origin:100% 100%}.-translate-x-\\[2rem\\]{--tw-translate-x: -2rem ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-45{rotate:-45deg}.transform-gpu{transform:translateZ(0) var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[43px\\]{border-radius:43px}.rounded-full{border-radius:3.40282e38px}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-\\[43px\\]{border-top-left-radius:43px;border-top-right-radius:43px}.rounded-tl-\\[50\\%\\]{border-top-left-radius:50%}.rounded-tl-none{border-top-left-radius:0}.rounded-tr-\\[50\\%\\]{border-top-right-radius:50%}.rounded-tr-none{border-top-right-radius:0}.rounded-br{border-bottom-right-radius:.25rem}.rounded-br-\\[50\\%\\]{border-bottom-right-radius:50%}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-bl-\\[50\\%\\]{border-bottom-left-radius:50%}.border{border-style:var(--tw-border-style);border-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-gray-300{border-color:var(--color-gray-300)}.bg-asm-gray-500{background-color:var(--color-asm-gray-500)}.bg-asm-pink-400{background-color:var(--color-asm-pink-400)}.bg-asm-purple{background-color:var(--color-asm-purple)}.bg-asm-white{background-color:var(--color-asm-white)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-gray-500{--tw-gradient-from:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-neutral-300{--tw-gradient-to:var(--color-neutral-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-\\[\\.625rem\\]{padding-block:.625rem}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.text-asm-purple{color:var(--color-asm-purple)}.text-gray-600{color:var(--color-gray-600)}.text-white{color:var(--color-white)}.opacity-8{opacity:.08}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.first\\:pt-4:first-child{padding-top:calc(var(--spacing) * 4)}.last\\:pb-4:last-child{padding-bottom:calc(var(--spacing) * 4)}@media(hover:hover){.hover\\:bg-asm-blue\\/30:hover{background-color:#a5d5d84d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-asm-blue\\/30:hover{background-color:color-mix(in oklab,var(--color-asm-blue) 30%,transparent)}}}.focus\\:outline-asm-gray-500:focus{outline-color:var(--color-asm-gray-500)}@media(prefers-reduced-motion:reduce){.motion-reduce\\:transition-none{transition-property:none}}}.asw-widget{font-family:Inter,sans-serif}.asw-widget *,.asw-widget :before,.asw-widget :after{box-sizing:border-box}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-neutral-300:oklch(87% 0 0);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-bold:700;--radius-xl:.75rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-asm-white:#fff;--color-asm-purple:#2e2438;--color-asm-pink-400:#ffa2f6;--color-asm-blue:#a5d5d8;--color-asm-gray-500:#f1f1f1}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.-bottom-4{bottom:calc(var(--spacing) * -4)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-1{bottom:calc(var(--spacing) * 1)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-20{bottom:calc(var(--spacing) * 20)}.left-0{left:calc(var(--spacing) * 0)}.left-2{left:calc(var(--spacing) * 2)}.left-4{left:calc(var(--spacing) * 4)}.left-6{left:calc(var(--spacing) * 6)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.-mr-\\[4\\.5rem\\]{margin-right:-4.5rem}.mr-0{margin-right:calc(var(--spacing) * 0)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mb-24{margin-bottom:calc(var(--spacing) * 24)}.ml-0{margin-left:calc(var(--spacing) * 0)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.flex{display:flex}.h-0{height:calc(var(--spacing) * 0)}.h-3\\/4{height:75%}.h-5\\/6{height:83.3333%}.h-6{height:calc(var(--spacing) * 6)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-full{height:100%}.max-h-\\[500px\\]{max-height:500px}.max-h-\\[800px\\]{max-height:800px}.min-h-\\[46px\\]{min-height:46px}.w-0{width:calc(var(--spacing) * 0)}.w-6{width:calc(var(--spacing) * 6)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-80{width:calc(var(--spacing) * 80)}.w-full{width:100%}.max-w-none{max-width:none}.shrink-0{flex-shrink:0}.origin-bottom-left{transform-origin:0 100%}.origin-bottom-right{transform-origin:100% 100%}.-translate-x-\\[2rem\\]{--tw-translate-x: -2rem ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-45{rotate:-45deg}.transform-gpu{transform:translateZ(0) var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[43px\\]{border-radius:43px}.rounded-full{border-radius:3.40282e38px}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-\\[43px\\]{border-top-left-radius:43px;border-top-right-radius:43px}.rounded-tl-\\[50\\%\\]{border-top-left-radius:50%}.rounded-tl-none{border-top-left-radius:0}.rounded-tr-\\[50\\%\\]{border-top-right-radius:50%}.rounded-tr-none{border-top-right-radius:0}.rounded-br{border-bottom-right-radius:.25rem}.rounded-br-\\[50\\%\\]{border-bottom-right-radius:50%}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-bl-\\[50\\%\\]{border-bottom-left-radius:50%}.border{border-style:var(--tw-border-style);border-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-gray-300{border-color:var(--color-gray-300)}.bg-asm-gray-500{background-color:var(--color-asm-gray-500)}.bg-asm-pink-400{background-color:var(--color-asm-pink-400)}.bg-asm-purple{background-color:var(--color-asm-purple)}.bg-asm-white{background-color:var(--color-asm-white)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-gray-500{--tw-gradient-from:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-neutral-300{--tw-gradient-to:var(--color-neutral-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-\\[\\.625rem\\]{padding-block:.625rem}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.text-asm-purple{color:var(--color-asm-purple)}.text-gray-600{color:var(--color-gray-600)}.text-white{color:var(--color-white)}.opacity-8{opacity:.08}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.first\\:pt-4:first-child{padding-top:calc(var(--spacing) * 4)}.last\\:pb-4:last-child{padding-bottom:calc(var(--spacing) * 4)}@media(hover:hover){.hover\\:bg-asm-blue\\/30:hover{background-color:#a5d5d84d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-asm-blue\\/30:hover{background-color:color-mix(in oklab,var(--color-asm-blue) 30%,transparent)}}}.focus\\:outline-asm-gray-500:focus{outline-color:var(--color-asm-gray-500)}@media(prefers-reduced-motion:reduce){.motion-reduce\\:transition-none{transition-property:none}}}.asw-widget{font-family:Inter,sans-serif}.asw-widget *,.asw-widget :before,.asw-widget :after{box-sizing:border-box}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
(function(){"use strict";function xb(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var uv={exports:{}},gt={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.js
|
|
@@ -183,7 +183,7 @@ Incoming: %s`,ue,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var l=0;l<t.leng
|
|
|
183
183
|
root.render(%s)`,t,t,t):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
184
184
|
<%s>{%s}</%s>`,t,t,l,t,l))}function gn(e,t){var l=Se(e)||"Component";b2[l]||(b2[l]=!0,t=String(t),e.tag===3?console.error(`Symbols are not valid as a React child.
|
|
185
185
|
root.render(%s)`,t):console.error(`Symbols are not valid as a React child.
|
|
186
|
-
<%s>%s</%s>`,l,t,l))}function Ws(e){function t(B,Z){if(e){var V=B.deletions;V===null?(B.deletions=[Z],B.flags|=16):V.push(Z)}}function l(B,Z){if(!e)return null;for(;Z!==null;)t(B,Z),Z=Z.sibling;return null}function o(B){for(var Z=new Map;B!==null;)B.key!==null?Z.set(B.key,B):Z.set(B.index,B),B=B.sibling;return Z}function d(B,Z){return B=vi(B,Z),B.index=0,B.sibling=null,B}function p(B,Z,V){return B.index=V,e?(V=B.alternate,V!==null?(V=V.index,V<Z?(B.flags|=67108866,Z):V):(B.flags|=67108866,Z)):(B.flags|=1048576,Z)}function S(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function x(B,Z,V,fe){return Z===null||Z.tag!==6?(Z=tr(V,B.mode,fe),Z.return=B,Z._debugOwner=B,Z._debugTask=B._debugTask,Z._debugInfo=Et,Z):(Z=d(Z,V),Z.return=B,Z._debugInfo=Et,Z)}function N(B,Z,V,fe){var Ce=V.type;return Ce===st?(Z=te(B,Z,V.props.children,fe,V.key),Ec(V,Z,B),Z):Z!==null&&(Z.elementType===Ce||$v(Z,V)||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===dl&&as(Ce)===Z.type)?(Z=d(Z,V.props),Nl(Z,V),Z.return=B,Z._debugOwner=V._owner,Z._debugInfo=Et,Z):(Z=js(V,B.mode,fe),Nl(Z,V),Z.return=B,Z._debugInfo=Et,Z)}function H(B,Z,V,fe){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==V.containerInfo||Z.stateNode.implementation!==V.implementation?(Z=Um(V,B.mode,fe),Z.return=B,Z._debugInfo=Et,Z):(Z=d(Z,V.children||[]),Z.return=B,Z._debugInfo=Et,Z)}function te(B,Z,V,fe,Ce){return Z===null||Z.tag!==7?(Z=er(V,B.mode,fe,Ce),Z.return=B,Z._debugOwner=B,Z._debugTask=B._debugTask,Z._debugInfo=Et,Z):(Z=d(Z,V),Z.return=B,Z._debugInfo=Et,Z)}function re(B,Z,V){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=tr(""+Z,B.mode,V),Z.return=B,Z._debugOwner=B,Z._debugTask=B._debugTask,Z._debugInfo=Et,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case Or:return V=js(Z,B.mode,V),Nl(V,Z),V.return=B,B=Pn(Z._debugInfo),V._debugInfo=Et,Et=B,V;case _o:return Z=Um(Z,B.mode,V),Z.return=B,Z._debugInfo=Et,Z;case dl:var fe=Pn(Z._debugInfo);return Z=as(Z),B=re(B,Z,V),Et=fe,B}if(lt(Z)||Q(Z))return V=er(Z,B.mode,V,null),V.return=B,V._debugOwner=B,V._debugTask=B._debugTask,B=Pn(Z._debugInfo),V._debugInfo=Et,Et=B,V;if(typeof Z.then=="function")return fe=Pn(Z._debugInfo),B=re(B,Tc(Z),V),Et=fe,B;if(Z.$$typeof===Bl)return re(B,Bs(B,Z),V);ct(B,Z)}return typeof Z=="function"&&Lt(B,Z),typeof Z=="symbol"&&gn(B,Z),null}function W(B,Z,V,fe){var Ce=Z!==null?Z.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Ce!==null?null:x(B,Z,""+V,fe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case Or:return V.key===Ce?(Ce=Pn(V._debugInfo),B=N(B,Z,V,fe),Et=Ce,B):null;case _o:return V.key===Ce?H(B,Z,V,fe):null;case dl:return Ce=Pn(V._debugInfo),V=as(V),B=W(B,Z,V,fe),Et=Ce,B}if(lt(V)||Q(V))return Ce!==null?null:(Ce=Pn(V._debugInfo),B=te(B,Z,V,fe,null),Et=Ce,B);if(typeof V.then=="function")return Ce=Pn(V._debugInfo),B=W(B,Z,Tc(V),fe),Et=Ce,B;if(V.$$typeof===Bl)return W(B,Z,Bs(B,V),fe);ct(B,V)}return typeof V=="function"&&Lt(B,V),typeof V=="symbol"&&gn(B,V),null}function se(B,Z,V,fe,Ce){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return B=B.get(V)||null,x(Z,B,""+fe,Ce);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case Or:return V=B.get(fe.key===null?V:fe.key)||null,B=Pn(fe._debugInfo),Z=N(Z,V,fe,Ce),Et=B,Z;case _o:return B=B.get(fe.key===null?V:fe.key)||null,H(Z,B,fe,Ce);case dl:var ft=Pn(fe._debugInfo);return fe=as(fe),Z=se(B,Z,V,fe,Ce),Et=ft,Z}if(lt(fe)||Q(fe))return V=B.get(V)||null,B=Pn(fe._debugInfo),Z=te(Z,V,fe,Ce,null),Et=B,Z;if(typeof fe.then=="function")return ft=Pn(fe._debugInfo),Z=se(B,Z,V,Tc(fe),Ce),Et=ft,Z;if(fe.$$typeof===Bl)return se(B,Z,V,Bs(Z,fe),Ce);ct(Z,fe)}return typeof fe=="function"&&Lt(Z,fe),typeof fe=="symbol"&&gn(Z,fe),null}function Le(B,Z,V,fe){if(typeof V!="object"||V===null)return fe;switch(V.$$typeof){case Or:case _o:b(B,Z,V);var Ce=V.key;if(typeof Ce!="string")break;if(fe===null){fe=new Set,fe.add(Ce);break}if(!fe.has(Ce)){fe.add(Ce);break}Be(Z,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Ce)});break;case dl:V=as(V),Le(B,Z,V,fe)}return fe}function tt(B,Z,V,fe){for(var Ce=null,ft=null,Ze=null,dt=Z,mt=Z=0,fn=null;dt!==null&&mt<V.length;mt++){dt.index>mt?(fn=dt,dt=null):fn=dt.sibling;var In=W(B,dt,V[mt],fe);if(In===null){dt===null&&(dt=fn);break}Ce=Le(B,In,V[mt],Ce),e&&dt&&In.alternate===null&&t(B,dt),Z=p(In,Z,mt),Ze===null?ft=In:Ze.sibling=In,Ze=In,dt=fn}if(mt===V.length)return l(B,dt),jt&&Fr(B,mt),ft;if(dt===null){for(;mt<V.length;mt++)dt=re(B,V[mt],fe),dt!==null&&(Ce=Le(B,dt,V[mt],Ce),Z=p(dt,Z,mt),Ze===null?ft=dt:Ze.sibling=dt,Ze=dt);return jt&&Fr(B,mt),ft}for(dt=o(dt);mt<V.length;mt++)fn=se(dt,B,mt,V[mt],fe),fn!==null&&(Ce=Le(B,fn,V[mt],Ce),e&&fn.alternate!==null&&dt.delete(fn.key===null?mt:fn.key),Z=p(fn,Z,mt),Ze===null?ft=fn:Ze.sibling=fn,Ze=fn);return e&&dt.forEach(function(Xo){return t(B,Xo)}),jt&&Fr(B,mt),ft}function an(B,Z,V,fe){if(V==null)throw Error("An iterable object provided no iterator.");for(var Ce=null,ft=null,Ze=Z,dt=Z=0,mt=null,fn=null,In=V.next();Ze!==null&&!In.done;dt++,In=V.next()){Ze.index>dt?(mt=Ze,Ze=null):mt=Ze.sibling;var Xo=W(B,Ze,In.value,fe);if(Xo===null){Ze===null&&(Ze=mt);break}fn=Le(B,Xo,In.value,fn),e&&Ze&&Xo.alternate===null&&t(B,Ze),Z=p(Xo,Z,dt),ft===null?Ce=Xo:ft.sibling=Xo,ft=Xo,Ze=mt}if(In.done)return l(B,Ze),jt&&Fr(B,dt),Ce;if(Ze===null){for(;!In.done;dt++,In=V.next())Ze=re(B,In.value,fe),Ze!==null&&(fn=Le(B,Ze,In.value,fn),Z=p(Ze,Z,dt),ft===null?Ce=Ze:ft.sibling=Ze,ft=Ze);return jt&&Fr(B,dt),Ce}for(Ze=o(Ze);!In.done;dt++,In=V.next())mt=se(Ze,B,dt,In.value,fe),mt!==null&&(fn=Le(B,mt,In.value,fn),e&&mt.alternate!==null&&Ze.delete(mt.key===null?dt:mt.key),Z=p(mt,Z,dt),ft===null?Ce=mt:ft.sibling=mt,ft=mt);return e&&Ze.forEach(function(ak){return t(B,ak)}),jt&&Fr(B,dt),Ce}function Ct(B,Z,V,fe){if(typeof V=="object"&&V!==null&&V.type===st&&V.key===null&&(Ec(V,null,B),V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case Or:var Ce=Pn(V._debugInfo);e:{for(var ft=V.key;Z!==null;){if(Z.key===ft){if(ft=V.type,ft===st){if(Z.tag===7){l(B,Z.sibling),fe=d(Z,V.props.children),fe.return=B,fe._debugOwner=V._owner,fe._debugInfo=Et,Ec(V,fe,B),B=fe;break e}}else if(Z.elementType===ft||$v(Z,V)||typeof ft=="object"&&ft!==null&&ft.$$typeof===dl&&as(ft)===Z.type){l(B,Z.sibling),fe=d(Z,V.props),Nl(fe,V),fe.return=B,fe._debugOwner=V._owner,fe._debugInfo=Et,B=fe;break e}l(B,Z);break}else t(B,Z);Z=Z.sibling}V.type===st?(fe=er(V.props.children,B.mode,fe,V.key),fe.return=B,fe._debugOwner=B,fe._debugTask=B._debugTask,fe._debugInfo=Et,Ec(V,fe,B),B=fe):(fe=js(V,B.mode,fe),Nl(fe,V),fe.return=B,fe._debugInfo=Et,B=fe)}return B=S(B),Et=Ce,B;case _o:e:{for(Ce=V,V=Ce.key;Z!==null;){if(Z.key===V)if(Z.tag===4&&Z.stateNode.containerInfo===Ce.containerInfo&&Z.stateNode.implementation===Ce.implementation){l(B,Z.sibling),fe=d(Z,Ce.children||[]),fe.return=B,B=fe;break e}else{l(B,Z);break}else t(B,Z);Z=Z.sibling}fe=Um(Ce,B.mode,fe),fe.return=B,B=fe}return S(B);case dl:return Ce=Pn(V._debugInfo),V=as(V),B=Ct(B,Z,V,fe),Et=Ce,B}if(lt(V))return Ce=Pn(V._debugInfo),B=tt(B,Z,V,fe),Et=Ce,B;if(Q(V)){if(Ce=Pn(V._debugInfo),ft=Q(V),typeof ft!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ze=ft.call(V);return Ze===V?(B.tag!==0||Object.prototype.toString.call(B.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ze)!=="[object Generator]")&&(y2||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),y2=!0):V.entries!==ft||vS||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),vS=!0),B=an(B,Z,Ze,fe),Et=Ce,B}if(typeof V.then=="function")return Ce=Pn(V._debugInfo),B=Ct(B,Z,Tc(V),fe),Et=Ce,B;if(V.$$typeof===Bl)return Ct(B,Z,Bs(B,V),fe);ct(B,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(Ce=""+V,Z!==null&&Z.tag===6?(l(B,Z.sibling),fe=d(Z,Ce),fe.return=B,B=fe):(l(B,Z),fe=tr(Ce,B.mode,fe),fe.return=B,fe._debugOwner=B,fe._debugTask=B._debugTask,fe._debugInfo=Et,B=fe),S(B)):(typeof V=="function"&&Lt(B,V),typeof V=="symbol"&&gn(B,V),l(B,Z))}return function(B,Z,V,fe){var Ce=Et;Et=null;try{qg=0;var ft=Ct(B,Z,V,fe);return wp=null,ft}catch(fn){if(fn===jg||fn===K0)throw fn;var Ze=z(29,fn,null,B.mode);Ze.lanes=fe,Ze.return=B;var dt=Ze._debugInfo=Et;if(Ze._debugOwner=B._debugOwner,Ze._debugTask=B._debugTask,dt!=null){for(var mt=dt.length-1;0<=mt;mt--)if(typeof dt[mt].stack=="string"){Ze._debugOwner=dt[mt],Ze._debugTask=dt[mt].debugTask;break}}return Ze}finally{Et=Ce}}}function rl(e){var t=e.alternate;Ee(ya,ya.current&_p,e),Ee(nu,e,e),Hr===null&&(t===null||xp.current!==null||t.memoizedState!==null)&&(Hr=e)}function hr(e){if(e.tag===22){if(Ee(ya,ya.current,e),Ee(nu,e,e),Hr===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Hr=e)}}else li(e)}function li(e){Ee(ya,ya.current,e),Ee(nu,nu.current,e)}function ol(e){be(nu,e),Hr===e&&(Hr=null),be(ya,e)}function Su(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data===Yo||Yi(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ly(e){if(e!==null&&typeof e!="function"){var t=String(e);D2.has(t)||(D2.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function vn(e,t,l,o){var d=e.memoizedState,p=l(o,d);if(e.mode&el){Oe(!0);try{p=l(o,d)}finally{Oe(!1)}}p===void 0&&(t=pe(t)||"Component",w2.has(t)||(w2.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),d=p==null?d:yt({},d,p),e.memoizedState=d,e.lanes===0&&(e.updateQueue.baseState=d)}function th(e,t,l,o,d,p,S){var x=e.stateNode;if(typeof x.shouldComponentUpdate=="function"){if(l=x.shouldComponentUpdate(o,p,S),e.mode&el){Oe(!0);try{l=x.shouldComponentUpdate(o,p,S)}finally{Oe(!1)}}return l===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",pe(t)||"Component"),l}return t.prototype&&t.prototype.isPureReactComponent?!Ns(l,o)||!Ns(d,p):!0}function nh(e,t,l,o){var d=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,o),t.state!==d&&(e=Se(e)||"Component",T2.has(e)||(T2.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),bS.enqueueReplaceState(t,t.state,null))}function pr(e,t){var l=t;if("ref"in t){l={};for(var o in t)o!=="ref"&&(l[o]=t[o])}if(e=e.defaultProps){l===t&&(l=yt({},l));for(var d in e)l[d]===void 0&&(l[d]=e[d])}return l}function iy(e){SS(e),console.warn(`%s
|
|
186
|
+
<%s>%s</%s>`,l,t,l))}function Ws(e){function t(B,Z){if(e){var V=B.deletions;V===null?(B.deletions=[Z],B.flags|=16):V.push(Z)}}function l(B,Z){if(!e)return null;for(;Z!==null;)t(B,Z),Z=Z.sibling;return null}function o(B){for(var Z=new Map;B!==null;)B.key!==null?Z.set(B.key,B):Z.set(B.index,B),B=B.sibling;return Z}function d(B,Z){return B=vi(B,Z),B.index=0,B.sibling=null,B}function p(B,Z,V){return B.index=V,e?(V=B.alternate,V!==null?(V=V.index,V<Z?(B.flags|=67108866,Z):V):(B.flags|=67108866,Z)):(B.flags|=1048576,Z)}function S(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function x(B,Z,V,fe){return Z===null||Z.tag!==6?(Z=tr(V,B.mode,fe),Z.return=B,Z._debugOwner=B,Z._debugTask=B._debugTask,Z._debugInfo=Et,Z):(Z=d(Z,V),Z.return=B,Z._debugInfo=Et,Z)}function N(B,Z,V,fe){var Ce=V.type;return Ce===st?(Z=te(B,Z,V.props.children,fe,V.key),Ec(V,Z,B),Z):Z!==null&&(Z.elementType===Ce||$v(Z,V)||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===dl&&as(Ce)===Z.type)?(Z=d(Z,V.props),Nl(Z,V),Z.return=B,Z._debugOwner=V._owner,Z._debugInfo=Et,Z):(Z=js(V,B.mode,fe),Nl(Z,V),Z.return=B,Z._debugInfo=Et,Z)}function H(B,Z,V,fe){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==V.containerInfo||Z.stateNode.implementation!==V.implementation?(Z=Um(V,B.mode,fe),Z.return=B,Z._debugInfo=Et,Z):(Z=d(Z,V.children||[]),Z.return=B,Z._debugInfo=Et,Z)}function te(B,Z,V,fe,Ce){return Z===null||Z.tag!==7?(Z=er(V,B.mode,fe,Ce),Z.return=B,Z._debugOwner=B,Z._debugTask=B._debugTask,Z._debugInfo=Et,Z):(Z=d(Z,V),Z.return=B,Z._debugInfo=Et,Z)}function re(B,Z,V){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=tr(""+Z,B.mode,V),Z.return=B,Z._debugOwner=B,Z._debugTask=B._debugTask,Z._debugInfo=Et,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case Or:return V=js(Z,B.mode,V),Nl(V,Z),V.return=B,B=Pn(Z._debugInfo),V._debugInfo=Et,Et=B,V;case _o:return Z=Um(Z,B.mode,V),Z.return=B,Z._debugInfo=Et,Z;case dl:var fe=Pn(Z._debugInfo);return Z=as(Z),B=re(B,Z,V),Et=fe,B}if(lt(Z)||Q(Z))return V=er(Z,B.mode,V,null),V.return=B,V._debugOwner=B,V._debugTask=B._debugTask,B=Pn(Z._debugInfo),V._debugInfo=Et,Et=B,V;if(typeof Z.then=="function")return fe=Pn(Z._debugInfo),B=re(B,Tc(Z),V),Et=fe,B;if(Z.$$typeof===Bl)return re(B,Bs(B,Z),V);ct(B,Z)}return typeof Z=="function"&&Lt(B,Z),typeof Z=="symbol"&&gn(B,Z),null}function W(B,Z,V,fe){var Ce=Z!==null?Z.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Ce!==null?null:x(B,Z,""+V,fe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case Or:return V.key===Ce?(Ce=Pn(V._debugInfo),B=N(B,Z,V,fe),Et=Ce,B):null;case _o:return V.key===Ce?H(B,Z,V,fe):null;case dl:return Ce=Pn(V._debugInfo),V=as(V),B=W(B,Z,V,fe),Et=Ce,B}if(lt(V)||Q(V))return Ce!==null?null:(Ce=Pn(V._debugInfo),B=te(B,Z,V,fe,null),Et=Ce,B);if(typeof V.then=="function")return Ce=Pn(V._debugInfo),B=W(B,Z,Tc(V),fe),Et=Ce,B;if(V.$$typeof===Bl)return W(B,Z,Bs(B,V),fe);ct(B,V)}return typeof V=="function"&&Lt(B,V),typeof V=="symbol"&&gn(B,V),null}function se(B,Z,V,fe,Ce){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return B=B.get(V)||null,x(Z,B,""+fe,Ce);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case Or:return V=B.get(fe.key===null?V:fe.key)||null,B=Pn(fe._debugInfo),Z=N(Z,V,fe,Ce),Et=B,Z;case _o:return B=B.get(fe.key===null?V:fe.key)||null,H(Z,B,fe,Ce);case dl:var ft=Pn(fe._debugInfo);return fe=as(fe),Z=se(B,Z,V,fe,Ce),Et=ft,Z}if(lt(fe)||Q(fe))return V=B.get(V)||null,B=Pn(fe._debugInfo),Z=te(Z,V,fe,Ce,null),Et=B,Z;if(typeof fe.then=="function")return ft=Pn(fe._debugInfo),Z=se(B,Z,V,Tc(fe),Ce),Et=ft,Z;if(fe.$$typeof===Bl)return se(B,Z,V,Bs(Z,fe),Ce);ct(Z,fe)}return typeof fe=="function"&&Lt(Z,fe),typeof fe=="symbol"&&gn(Z,fe),null}function Le(B,Z,V,fe){if(typeof V!="object"||V===null)return fe;switch(V.$$typeof){case Or:case _o:b(B,Z,V);var Ce=V.key;if(typeof Ce!="string")break;if(fe===null){fe=new Set,fe.add(Ce);break}if(!fe.has(Ce)){fe.add(Ce);break}Be(Z,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Ce)});break;case dl:V=as(V),Le(B,Z,V,fe)}return fe}function tt(B,Z,V,fe){for(var Ce=null,ft=null,Ze=null,dt=Z,pt=Z=0,fn=null;dt!==null&&pt<V.length;pt++){dt.index>pt?(fn=dt,dt=null):fn=dt.sibling;var In=W(B,dt,V[pt],fe);if(In===null){dt===null&&(dt=fn);break}Ce=Le(B,In,V[pt],Ce),e&&dt&&In.alternate===null&&t(B,dt),Z=p(In,Z,pt),Ze===null?ft=In:Ze.sibling=In,Ze=In,dt=fn}if(pt===V.length)return l(B,dt),jt&&Fr(B,pt),ft;if(dt===null){for(;pt<V.length;pt++)dt=re(B,V[pt],fe),dt!==null&&(Ce=Le(B,dt,V[pt],Ce),Z=p(dt,Z,pt),Ze===null?ft=dt:Ze.sibling=dt,Ze=dt);return jt&&Fr(B,pt),ft}for(dt=o(dt);pt<V.length;pt++)fn=se(dt,B,pt,V[pt],fe),fn!==null&&(Ce=Le(B,fn,V[pt],Ce),e&&fn.alternate!==null&&dt.delete(fn.key===null?pt:fn.key),Z=p(fn,Z,pt),Ze===null?ft=fn:Ze.sibling=fn,Ze=fn);return e&&dt.forEach(function(Xo){return t(B,Xo)}),jt&&Fr(B,pt),ft}function an(B,Z,V,fe){if(V==null)throw Error("An iterable object provided no iterator.");for(var Ce=null,ft=null,Ze=Z,dt=Z=0,pt=null,fn=null,In=V.next();Ze!==null&&!In.done;dt++,In=V.next()){Ze.index>dt?(pt=Ze,Ze=null):pt=Ze.sibling;var Xo=W(B,Ze,In.value,fe);if(Xo===null){Ze===null&&(Ze=pt);break}fn=Le(B,Xo,In.value,fn),e&&Ze&&Xo.alternate===null&&t(B,Ze),Z=p(Xo,Z,dt),ft===null?Ce=Xo:ft.sibling=Xo,ft=Xo,Ze=pt}if(In.done)return l(B,Ze),jt&&Fr(B,dt),Ce;if(Ze===null){for(;!In.done;dt++,In=V.next())Ze=re(B,In.value,fe),Ze!==null&&(fn=Le(B,Ze,In.value,fn),Z=p(Ze,Z,dt),ft===null?Ce=Ze:ft.sibling=Ze,ft=Ze);return jt&&Fr(B,dt),Ce}for(Ze=o(Ze);!In.done;dt++,In=V.next())pt=se(Ze,B,dt,In.value,fe),pt!==null&&(fn=Le(B,pt,In.value,fn),e&&pt.alternate!==null&&Ze.delete(pt.key===null?dt:pt.key),Z=p(pt,Z,dt),ft===null?Ce=pt:ft.sibling=pt,ft=pt);return e&&Ze.forEach(function(ak){return t(B,ak)}),jt&&Fr(B,dt),Ce}function Ct(B,Z,V,fe){if(typeof V=="object"&&V!==null&&V.type===st&&V.key===null&&(Ec(V,null,B),V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case Or:var Ce=Pn(V._debugInfo);e:{for(var ft=V.key;Z!==null;){if(Z.key===ft){if(ft=V.type,ft===st){if(Z.tag===7){l(B,Z.sibling),fe=d(Z,V.props.children),fe.return=B,fe._debugOwner=V._owner,fe._debugInfo=Et,Ec(V,fe,B),B=fe;break e}}else if(Z.elementType===ft||$v(Z,V)||typeof ft=="object"&&ft!==null&&ft.$$typeof===dl&&as(ft)===Z.type){l(B,Z.sibling),fe=d(Z,V.props),Nl(fe,V),fe.return=B,fe._debugOwner=V._owner,fe._debugInfo=Et,B=fe;break e}l(B,Z);break}else t(B,Z);Z=Z.sibling}V.type===st?(fe=er(V.props.children,B.mode,fe,V.key),fe.return=B,fe._debugOwner=B,fe._debugTask=B._debugTask,fe._debugInfo=Et,Ec(V,fe,B),B=fe):(fe=js(V,B.mode,fe),Nl(fe,V),fe.return=B,fe._debugInfo=Et,B=fe)}return B=S(B),Et=Ce,B;case _o:e:{for(Ce=V,V=Ce.key;Z!==null;){if(Z.key===V)if(Z.tag===4&&Z.stateNode.containerInfo===Ce.containerInfo&&Z.stateNode.implementation===Ce.implementation){l(B,Z.sibling),fe=d(Z,Ce.children||[]),fe.return=B,B=fe;break e}else{l(B,Z);break}else t(B,Z);Z=Z.sibling}fe=Um(Ce,B.mode,fe),fe.return=B,B=fe}return S(B);case dl:return Ce=Pn(V._debugInfo),V=as(V),B=Ct(B,Z,V,fe),Et=Ce,B}if(lt(V))return Ce=Pn(V._debugInfo),B=tt(B,Z,V,fe),Et=Ce,B;if(Q(V)){if(Ce=Pn(V._debugInfo),ft=Q(V),typeof ft!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ze=ft.call(V);return Ze===V?(B.tag!==0||Object.prototype.toString.call(B.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ze)!=="[object Generator]")&&(y2||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),y2=!0):V.entries!==ft||vS||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),vS=!0),B=an(B,Z,Ze,fe),Et=Ce,B}if(typeof V.then=="function")return Ce=Pn(V._debugInfo),B=Ct(B,Z,Tc(V),fe),Et=Ce,B;if(V.$$typeof===Bl)return Ct(B,Z,Bs(B,V),fe);ct(B,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(Ce=""+V,Z!==null&&Z.tag===6?(l(B,Z.sibling),fe=d(Z,Ce),fe.return=B,B=fe):(l(B,Z),fe=tr(Ce,B.mode,fe),fe.return=B,fe._debugOwner=B,fe._debugTask=B._debugTask,fe._debugInfo=Et,B=fe),S(B)):(typeof V=="function"&&Lt(B,V),typeof V=="symbol"&&gn(B,V),l(B,Z))}return function(B,Z,V,fe){var Ce=Et;Et=null;try{qg=0;var ft=Ct(B,Z,V,fe);return wp=null,ft}catch(fn){if(fn===jg||fn===K0)throw fn;var Ze=z(29,fn,null,B.mode);Ze.lanes=fe,Ze.return=B;var dt=Ze._debugInfo=Et;if(Ze._debugOwner=B._debugOwner,Ze._debugTask=B._debugTask,dt!=null){for(var pt=dt.length-1;0<=pt;pt--)if(typeof dt[pt].stack=="string"){Ze._debugOwner=dt[pt],Ze._debugTask=dt[pt].debugTask;break}}return Ze}finally{Et=Ce}}}function rl(e){var t=e.alternate;Ee(ya,ya.current&_p,e),Ee(nu,e,e),Hr===null&&(t===null||xp.current!==null||t.memoizedState!==null)&&(Hr=e)}function hr(e){if(e.tag===22){if(Ee(ya,ya.current,e),Ee(nu,e,e),Hr===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Hr=e)}}else li(e)}function li(e){Ee(ya,ya.current,e),Ee(nu,nu.current,e)}function ol(e){be(nu,e),Hr===e&&(Hr=null),be(ya,e)}function Su(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data===Yo||Yi(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ly(e){if(e!==null&&typeof e!="function"){var t=String(e);D2.has(t)||(D2.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function vn(e,t,l,o){var d=e.memoizedState,p=l(o,d);if(e.mode&el){Oe(!0);try{p=l(o,d)}finally{Oe(!1)}}p===void 0&&(t=pe(t)||"Component",w2.has(t)||(w2.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),d=p==null?d:yt({},d,p),e.memoizedState=d,e.lanes===0&&(e.updateQueue.baseState=d)}function th(e,t,l,o,d,p,S){var x=e.stateNode;if(typeof x.shouldComponentUpdate=="function"){if(l=x.shouldComponentUpdate(o,p,S),e.mode&el){Oe(!0);try{l=x.shouldComponentUpdate(o,p,S)}finally{Oe(!1)}}return l===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",pe(t)||"Component"),l}return t.prototype&&t.prototype.isPureReactComponent?!Ns(l,o)||!Ns(d,p):!0}function nh(e,t,l,o){var d=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,o),t.state!==d&&(e=Se(e)||"Component",T2.has(e)||(T2.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),bS.enqueueReplaceState(t,t.state,null))}function pr(e,t){var l=t;if("ref"in t){l={};for(var o in t)o!=="ref"&&(l[o]=t[o])}if(e=e.defaultProps){l===t&&(l=yt({},l));for(var d in e)l[d]===void 0&&(l[d]=e[d])}return l}function iy(e){SS(e),console.warn(`%s
|
|
187
187
|
|
|
188
188
|
%s
|
|
189
189
|
`,Cp?"An error occurred in the <"+Cp+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
@@ -317,7 +317,7 @@ You might need to use a local HTTP server (instead of file://): https://react.de
|
|
|
317
317
|
<%s {...props} />
|
|
318
318
|
React keys must be passed directly to JSX without using spread:
|
|
319
319
|
let props = %s;
|
|
320
|
-
<%s key={someKey} {...props} />`,U,Ie,Bt,Ie),Ne[Ie+U]=!0)}if(Ie=null,ce!==void 0&&(c(ce),Ie=""+ce),v(K)&&(c(K.key),Ie=""+K.key),"key"in K){ce={};for(var Dn in K)Dn!=="key"&&(ce[Dn]=K[Dn])}else ce=K;return Ie&&b(ce,typeof A=="function"?A.displayName||A.name||"Unknown":A),E(A,Ie,Ye,_e,h(),ce,Oe,Wt)}function R(A){typeof A=="object"&&A!==null&&A.$$typeof===_&&A._store&&(A._store.validated=1)}var z=rd(),_=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),le=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),D=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),Se=Symbol.for("react.activity"),He=Symbol.for("react.client.reference"),be=z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=Object.prototype.hasOwnProperty,Qe=Array.isArray,ke=console.createTask?console.createTask:function(){return null};z={"react-stack-bottom-frame":function(A){return A()}};var Te,q={},F=z["react-stack-bottom-frame"].bind(z,y)(),ge=ke(s(y)),Ne={};Qp.Fragment=le,Qp.jsx=function(A,K,ce,U,_e){var Ye=1e4>be.recentlyCreatedOwnerStacks++;return O(A,K,ce,!1,U,_e,Ye?Error("react-stack-top-frame"):F,Ye?ke(s(A)):ge)},Qp.jsxs=function(A,K,ce,U,_e){var Ye=1e4>be.recentlyCreatedOwnerStacks++;return O(A,K,ce,!0,U,_e,Ye?Error("react-stack-top-frame"):F,Ye?ke(s(A)):ge)}})()),Qp}var dE;function HO(){return dE||(dE=1,process.env.NODE_ENV==="production"?sv.exports=kO():sv.exports=UO()),sv.exports}var
|
|
320
|
+
<%s key={someKey} {...props} />`,U,Ie,Bt,Ie),Ne[Ie+U]=!0)}if(Ie=null,ce!==void 0&&(c(ce),Ie=""+ce),v(K)&&(c(K.key),Ie=""+K.key),"key"in K){ce={};for(var Dn in K)Dn!=="key"&&(ce[Dn]=K[Dn])}else ce=K;return Ie&&b(ce,typeof A=="function"?A.displayName||A.name||"Unknown":A),E(A,Ie,Ye,_e,h(),ce,Oe,Wt)}function R(A){typeof A=="object"&&A!==null&&A.$$typeof===_&&A._store&&(A._store.validated=1)}var z=rd(),_=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),le=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),D=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),Se=Symbol.for("react.activity"),He=Symbol.for("react.client.reference"),be=z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=Object.prototype.hasOwnProperty,Qe=Array.isArray,ke=console.createTask?console.createTask:function(){return null};z={"react-stack-bottom-frame":function(A){return A()}};var Te,q={},F=z["react-stack-bottom-frame"].bind(z,y)(),ge=ke(s(y)),Ne={};Qp.Fragment=le,Qp.jsx=function(A,K,ce,U,_e){var Ye=1e4>be.recentlyCreatedOwnerStacks++;return O(A,K,ce,!1,U,_e,Ye?Error("react-stack-top-frame"):F,Ye?ke(s(A)):ge)},Qp.jsxs=function(A,K,ce,U,_e){var Ye=1e4>be.recentlyCreatedOwnerStacks++;return O(A,K,ce,!0,U,_e,Ye?Error("react-stack-top-frame"):F,Ye?ke(s(A)):ge)}})()),Qp}var dE;function HO(){return dE||(dE=1,process.env.NODE_ENV==="production"?sv.exports=kO():sv.exports=UO()),sv.exports}var mt=HO(),hE="vercel.ai.error",jO=Symbol.for(hE),pE,mE,Zu=class AO extends(mE=Error,pE=jO,mE){constructor({name:u,message:c,cause:s}){super(c),this[pE]=!0,this.name=u,this.cause=s}static isInstance(u){return AO.hasMarker(u,hE)}static hasMarker(u,c){const s=Symbol.for(c);return u!=null&&typeof u=="object"&&s in u&&typeof u[s]=="boolean"&&u[s]===!0}};function yE(a){return a==null?"unknown error":typeof a=="string"?a:a instanceof Error?a.message:JSON.stringify(a)}var gE="AI_InvalidArgumentError",vE=`vercel.ai.error.${gE}`,BO=Symbol.for(vE),bE,SE,LO=class extends(SE=Zu,bE=BO,SE){constructor({message:a,cause:u,argument:c}){super({name:gE,message:a,cause:u}),this[bE]=!0,this.argument=c}static isInstance(a){return Zu.hasMarker(a,vE)}},EE="AI_JSONParseError",TE=`vercel.ai.error.${EE}`,ZO=Symbol.for(TE),AE,xE,OE=class extends(xE=Zu,AE=ZO,xE){constructor({text:a,cause:u}){super({name:EE,message:`JSON parsing failed: Text: ${a}.
|
|
321
321
|
Error message: ${yE(u)}`,cause:u}),this[AE]=!0,this.text=a}static isInstance(a){return Zu.hasMarker(a,TE)}},RE="AI_TypeValidationError",wE=`vercel.ai.error.${RE}`,qO=Symbol.for(wE),zE,_E,od=class $S extends(_E=Zu,zE=qO,_E){constructor({value:u,cause:c,context:s}){let h="Type validation failed";if(s!=null&&s.field&&(h+=` for ${s.field}`),s!=null&&s.entityName||s!=null&&s.entityId){h+=" (";const y=[];s.entityName&&y.push(s.entityName),s.entityId&&y.push(`id: "${s.entityId}"`),h+=y.join(", "),h+=")"}super({name:RE,message:`${h}: Value: ${JSON.stringify(u)}.
|
|
322
322
|
Error message: ${yE(c)}`,cause:c}),this[zE]=!0,this.value=u,this.context=s}static isInstance(u){return Zu.hasMarker(u,wE)}static wrap({value:u,cause:c,context:s}){var h,y,v;return $S.isInstance(c)&&c.value===u&&((h=c.context)==null?void 0:h.field)===(s==null?void 0:s.field)&&((y=c.context)==null?void 0:y.entityName)===(s==null?void 0:s.entityName)&&((v=c.context)==null?void 0:v.entityId)===(s==null?void 0:s.entityId)?c:new $S({value:u,cause:c,context:s})}};function ye(a,u,c){function s(b,T){var E;Object.defineProperty(b,"_zod",{value:b._zod??{},enumerable:!1}),(E=b._zod).traits??(E.traits=new Set),b._zod.traits.add(a),u(b,T);for(const O in v.prototype)O in b||Object.defineProperty(b,O,{value:v.prototype[O].bind(b)});b._zod.constr=v,b._zod.def=T}const h=(c==null?void 0:c.Parent)??Object;class y extends h{}Object.defineProperty(y,"name",{value:a});function v(b){var T;const E=c!=null&&c.Parent?new y:this;s(E,b),(T=E._zod).deferred??(T.deferred=[]);for(const O of E._zod.deferred)O();return E}return Object.defineProperty(v,"init",{value:s}),Object.defineProperty(v,Symbol.hasInstance,{value:b=>{var T,E;return c!=null&&c.Parent&&b instanceof c.Parent?!0:(E=(T=b==null?void 0:b._zod)==null?void 0:T.traits)==null?void 0:E.has(a)}}),Object.defineProperty(v,"name",{value:a}),v}class Ip extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const CE={};function Qo(a){return CE}function DE(a){const u=Object.values(a).filter(s=>typeof s=="number");return Object.entries(a).filter(([s,h])=>u.indexOf(+s)===-1).map(([s,h])=>h)}function YO(a,u){return typeof u=="bigint"?u.toString():u}function wb(a){return{get value(){{const u=a();return Object.defineProperty(this,"value",{value:u}),u}}}}function zb(a){return a==null}function _b(a){const u=a.startsWith("^")?1:0,c=a.endsWith("$")?a.length-1:a.length;return a.slice(u,c)}function VO(a,u){const c=(a.toString().split(".")[1]||"").length,s=(u.toString().split(".")[1]||"").length,h=c>s?c:s,y=Number.parseInt(a.toFixed(h).replace(".","")),v=Number.parseInt(u.toFixed(h).replace(".",""));return y%v/10**h}function Xt(a,u,c){Object.defineProperty(a,u,{get(){{const s=c();return a[u]=s,s}},set(s){Object.defineProperty(a,u,{value:s})},configurable:!0})}function fv(a,u,c){Object.defineProperty(a,u,{value:c,writable:!0,enumerable:!0,configurable:!0})}function Jp(a){return JSON.stringify(a)}const ME=Error.captureStackTrace?Error.captureStackTrace:(...a)=>{};function dv(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}const GO=wb(()=>{var a;if(typeof navigator<"u"&&((a=navigator==null?void 0:navigator.userAgent)!=null&&a.includes("Cloudflare")))return!1;try{const u=Function;return new u(""),!0}catch{return!1}});function hv(a){if(dv(a)===!1)return!1;const u=a.constructor;if(u===void 0)return!0;const c=u.prototype;return!(dv(c)===!1||Object.prototype.hasOwnProperty.call(c,"isPrototypeOf")===!1)}const XO=new Set(["string","number","symbol"]);function $p(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ps(a,u,c){const s=new a._zod.constr(u??a._zod.def);return(!u||c!=null&&c.parent)&&(s._zod.parent=a),s}function Ve(a){const u=a;if(!u)return{};if(typeof u=="string")return{error:()=>u};if((u==null?void 0:u.message)!==void 0){if((u==null?void 0:u.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");u.error=u.message}return delete u.message,typeof u.error=="string"?{...u,error:()=>u.error}:u}function QO(a){return Object.keys(a).filter(u=>a[u]._zod.optin==="optional"&&a[u]._zod.optout==="optional")}const IO={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function JO(a,u){const c={},s=a._zod.def;for(const h in u){if(!(h in s.shape))throw new Error(`Unrecognized key: "${h}"`);u[h]&&(c[h]=s.shape[h])}return ps(a,{...a._zod.def,shape:c,checks:[]})}function $O(a,u){const c={...a._zod.def.shape},s=a._zod.def;for(const h in u){if(!(h in s.shape))throw new Error(`Unrecognized key: "${h}"`);u[h]&&delete c[h]}return ps(a,{...a._zod.def,shape:c,checks:[]})}function KO(a,u){if(!hv(u))throw new Error("Invalid input to extend: expected a plain object");const c={...a._zod.def,get shape(){const s={...a._zod.def.shape,...u};return fv(this,"shape",s),s},checks:[]};return ps(a,c)}function PO(a,u){return ps(a,{...a._zod.def,get shape(){const c={...a._zod.def.shape,...u._zod.def.shape};return fv(this,"shape",c),c},catchall:u._zod.def.catchall,checks:[]})}function FO(a,u,c){const s=u._zod.def.shape,h={...s};if(c)for(const y in c){if(!(y in s))throw new Error(`Unrecognized key: "${y}"`);c[y]&&(h[y]=a?new a({type:"optional",innerType:s[y]}):s[y])}else for(const y in s)h[y]=a?new a({type:"optional",innerType:s[y]}):s[y];return ps(u,{...u._zod.def,shape:h,checks:[]})}function WO(a,u,c){const s=u._zod.def.shape,h={...s};if(c)for(const y in c){if(!(y in h))throw new Error(`Unrecognized key: "${y}"`);c[y]&&(h[y]=new a({type:"nonoptional",innerType:s[y]}))}else for(const y in s)h[y]=new a({type:"nonoptional",innerType:s[y]});return ps(u,{...u._zod.def,shape:h,checks:[]})}function Kp(a,u=0){var c;for(let s=u;s<a.issues.length;s++)if(((c=a.issues[s])==null?void 0:c.continue)!==!0)return!0;return!1}function ms(a,u){return u.map(c=>{var s;return(s=c).path??(s.path=[]),c.path.unshift(a),c})}function pv(a){return typeof a=="string"?a:a==null?void 0:a.message}function Io(a,u,c){var h,y,v,b,T,E;const s={...a,path:a.path??[]};if(!a.message){const O=pv((v=(y=(h=a.inst)==null?void 0:h._zod.def)==null?void 0:y.error)==null?void 0:v.call(y,a))??pv((b=u==null?void 0:u.error)==null?void 0:b.call(u,a))??pv((T=c.customError)==null?void 0:T.call(c,a))??pv((E=c.localeError)==null?void 0:E.call(c,a))??"Invalid input";s.message=O}return delete s.inst,delete s.continue,u!=null&&u.reportInput||delete s.input,s}function Cb(a){return Array.isArray(a)?"array":typeof a=="string"?"string":"unknown"}function Pp(...a){const[u,c,s]=a;return typeof u=="string"?{message:u,code:"custom",input:c,inst:s}:{...u}}const NE=(a,u)=>{a.name="$ZodError",Object.defineProperty(a,"_zod",{value:a._zod,enumerable:!1}),Object.defineProperty(a,"issues",{value:u,enumerable:!1}),Object.defineProperty(a,"message",{get(){return JSON.stringify(u,YO,2)},enumerable:!0}),Object.defineProperty(a,"toString",{value:()=>a.message,enumerable:!1})},kE=ye("$ZodError",NE),UE=ye("$ZodError",NE,{Parent:Error});function eR(a,u=c=>c.message){const c={},s=[];for(const h of a.issues)h.path.length>0?(c[h.path[0]]=c[h.path[0]]||[],c[h.path[0]].push(u(h))):s.push(u(h));return{formErrors:s,fieldErrors:c}}function tR(a,u){const c=u||function(y){return y.message},s={_errors:[]},h=y=>{for(const v of y.issues)if(v.code==="invalid_union"&&v.errors.length)v.errors.map(b=>h({issues:b}));else if(v.code==="invalid_key")h({issues:v.issues});else if(v.code==="invalid_element")h({issues:v.issues});else if(v.path.length===0)s._errors.push(c(v));else{let b=s,T=0;for(;T<v.path.length;){const E=v.path[T];T===v.path.length-1?(b[E]=b[E]||{_errors:[]},b[E]._errors.push(c(v))):b[E]=b[E]||{_errors:[]},b=b[E],T++}}};return h(a),s}const nR=a=>(u,c,s,h)=>{const y=s?Object.assign(s,{async:!1}):{async:!1},v=u._zod.run({value:c,issues:[]},y);if(v instanceof Promise)throw new Ip;if(v.issues.length){const b=new((h==null?void 0:h.Err)??a)(v.issues.map(T=>Io(T,y,Qo())));throw ME(b,h==null?void 0:h.callee),b}return v.value},aR=a=>async(u,c,s,h)=>{const y=s?Object.assign(s,{async:!0}):{async:!0};let v=u._zod.run({value:c,issues:[]},y);if(v instanceof Promise&&(v=await v),v.issues.length){const b=new((h==null?void 0:h.Err)??a)(v.issues.map(T=>Io(T,y,Qo())));throw ME(b,h==null?void 0:h.callee),b}return v.value},HE=a=>(u,c,s)=>{const h=s?{...s,async:!1}:{async:!1},y=u._zod.run({value:c,issues:[]},h);if(y instanceof Promise)throw new Ip;return y.issues.length?{success:!1,error:new(a??kE)(y.issues.map(v=>Io(v,h,Qo())))}:{success:!0,data:y.value}},lR=HE(UE),jE=a=>async(u,c,s)=>{const h=s?Object.assign(s,{async:!0}):{async:!0};let y=u._zod.run({value:c,issues:[]},h);return y instanceof Promise&&(y=await y),y.issues.length?{success:!1,error:new a(y.issues.map(v=>Io(v,h,Qo())))}:{success:!0,data:y.value}},iR=jE(UE),uR=/^[cC][^\s-]{8,}$/,rR=/^[0-9a-z]+$/,oR=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,cR=/^[0-9a-vA-V]{20}$/,sR=/^[A-Za-z0-9]{27}$/,fR=/^[a-zA-Z0-9_-]{21}$/,dR=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hR=/^([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})$/,BE=a=>a?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${a}[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)$/,pR=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function yR(){return new RegExp(mR,"u")}const gR=/^(?:(?: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])$/,vR=/^(([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})$/,bR=/^((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])$/,SR=/^(([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])$/,ER=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,LE=/^[A-Za-z0-9_-]*$/,TR=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,AR=/^\+(?:[0-9]){6,14}[0-9]$/,ZE="(?:(?:\\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])))",xR=new RegExp(`^${ZE}$`);function qE(a){const u="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof a.precision=="number"?a.precision===-1?`${u}`:a.precision===0?`${u}:[0-5]\\d`:`${u}:[0-5]\\d\\.\\d{${a.precision}}`:`${u}(?::[0-5]\\d(?:\\.\\d+)?)?`}function OR(a){return new RegExp(`^${qE(a)}$`)}function RR(a){const u=qE({precision:a.precision}),c=["Z"];a.local&&c.push(""),a.offset&&c.push("([+-]\\d{2}:\\d{2})");const s=`${u}(?:${c.join("|")})`;return new RegExp(`^${ZE}T(?:${s})$`)}const wR=a=>{const u=a?`[\\s\\S]{${(a==null?void 0:a.minimum)??0},${(a==null?void 0:a.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${u}$`)},zR=/^\d+$/,_R=/^-?\d+(?:\.\d+)?/i,CR=/true|false/i,DR=/null/i,MR=/^[^A-Z]*$/,NR=/^[^a-z]*$/,bl=ye("$ZodCheck",(a,u)=>{var c;a._zod??(a._zod={}),a._zod.def=u,(c=a._zod).onattach??(c.onattach=[])}),YE={number:"number",bigint:"bigint",object:"date"},VE=ye("$ZodCheckLessThan",(a,u)=>{bl.init(a,u);const c=YE[typeof u.value];a._zod.onattach.push(s=>{const h=s._zod.bag,y=(u.inclusive?h.maximum:h.exclusiveMaximum)??Number.POSITIVE_INFINITY;u.value<y&&(u.inclusive?h.maximum=u.value:h.exclusiveMaximum=u.value)}),a._zod.check=s=>{(u.inclusive?s.value<=u.value:s.value<u.value)||s.issues.push({origin:c,code:"too_big",maximum:u.value,input:s.value,inclusive:u.inclusive,inst:a,continue:!u.abort})}}),GE=ye("$ZodCheckGreaterThan",(a,u)=>{bl.init(a,u);const c=YE[typeof u.value];a._zod.onattach.push(s=>{const h=s._zod.bag,y=(u.inclusive?h.minimum:h.exclusiveMinimum)??Number.NEGATIVE_INFINITY;u.value>y&&(u.inclusive?h.minimum=u.value:h.exclusiveMinimum=u.value)}),a._zod.check=s=>{(u.inclusive?s.value>=u.value:s.value>u.value)||s.issues.push({origin:c,code:"too_small",minimum:u.value,input:s.value,inclusive:u.inclusive,inst:a,continue:!u.abort})}}),kR=ye("$ZodCheckMultipleOf",(a,u)=>{bl.init(a,u),a._zod.onattach.push(c=>{var s;(s=c._zod.bag).multipleOf??(s.multipleOf=u.value)}),a._zod.check=c=>{if(typeof c.value!=typeof u.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof c.value=="bigint"?c.value%u.value===BigInt(0):VO(c.value,u.value)===0)||c.issues.push({origin:typeof c.value,code:"not_multiple_of",divisor:u.value,input:c.value,inst:a,continue:!u.abort})}}),UR=ye("$ZodCheckNumberFormat",(a,u)=>{var v;bl.init(a,u),u.format=u.format||"float64";const c=(v=u.format)==null?void 0:v.includes("int"),s=c?"int":"number",[h,y]=IO[u.format];a._zod.onattach.push(b=>{const T=b._zod.bag;T.format=u.format,T.minimum=h,T.maximum=y,c&&(T.pattern=zR)}),a._zod.check=b=>{const T=b.value;if(c){if(!Number.isInteger(T)){b.issues.push({expected:s,format:u.format,code:"invalid_type",input:T,inst:a});return}if(!Number.isSafeInteger(T)){T>0?b.issues.push({input:T,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:a,origin:s,continue:!u.abort}):b.issues.push({input:T,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:a,origin:s,continue:!u.abort});return}}T<h&&b.issues.push({origin:"number",input:T,code:"too_small",minimum:h,inclusive:!0,inst:a,continue:!u.abort}),T>y&&b.issues.push({origin:"number",input:T,code:"too_big",maximum:y,inst:a})}}),HR=ye("$ZodCheckMaxLength",(a,u)=>{var c;bl.init(a,u),(c=a._zod.def).when??(c.when=s=>{const h=s.value;return!zb(h)&&h.length!==void 0}),a._zod.onattach.push(s=>{const h=s._zod.bag.maximum??Number.POSITIVE_INFINITY;u.maximum<h&&(s._zod.bag.maximum=u.maximum)}),a._zod.check=s=>{const h=s.value;if(h.length<=u.maximum)return;const v=Cb(h);s.issues.push({origin:v,code:"too_big",maximum:u.maximum,inclusive:!0,input:h,inst:a,continue:!u.abort})}}),jR=ye("$ZodCheckMinLength",(a,u)=>{var c;bl.init(a,u),(c=a._zod.def).when??(c.when=s=>{const h=s.value;return!zb(h)&&h.length!==void 0}),a._zod.onattach.push(s=>{const h=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;u.minimum>h&&(s._zod.bag.minimum=u.minimum)}),a._zod.check=s=>{const h=s.value;if(h.length>=u.minimum)return;const v=Cb(h);s.issues.push({origin:v,code:"too_small",minimum:u.minimum,inclusive:!0,input:h,inst:a,continue:!u.abort})}}),BR=ye("$ZodCheckLengthEquals",(a,u)=>{var c;bl.init(a,u),(c=a._zod.def).when??(c.when=s=>{const h=s.value;return!zb(h)&&h.length!==void 0}),a._zod.onattach.push(s=>{const h=s._zod.bag;h.minimum=u.length,h.maximum=u.length,h.length=u.length}),a._zod.check=s=>{const h=s.value,y=h.length;if(y===u.length)return;const v=Cb(h),b=y>u.length;s.issues.push({origin:v,...b?{code:"too_big",maximum:u.length}:{code:"too_small",minimum:u.length},inclusive:!0,exact:!0,input:s.value,inst:a,continue:!u.abort})}}),mv=ye("$ZodCheckStringFormat",(a,u)=>{var c,s;bl.init(a,u),a._zod.onattach.push(h=>{const y=h._zod.bag;y.format=u.format,u.pattern&&(y.patterns??(y.patterns=new Set),y.patterns.add(u.pattern))}),u.pattern?(c=a._zod).check??(c.check=h=>{u.pattern.lastIndex=0,!u.pattern.test(h.value)&&h.issues.push({origin:"string",code:"invalid_format",format:u.format,input:h.value,...u.pattern?{pattern:u.pattern.toString()}:{},inst:a,continue:!u.abort})}):(s=a._zod).check??(s.check=()=>{})}),LR=ye("$ZodCheckRegex",(a,u)=>{mv.init(a,u),a._zod.check=c=>{u.pattern.lastIndex=0,!u.pattern.test(c.value)&&c.issues.push({origin:"string",code:"invalid_format",format:"regex",input:c.value,pattern:u.pattern.toString(),inst:a,continue:!u.abort})}}),ZR=ye("$ZodCheckLowerCase",(a,u)=>{u.pattern??(u.pattern=MR),mv.init(a,u)}),qR=ye("$ZodCheckUpperCase",(a,u)=>{u.pattern??(u.pattern=NR),mv.init(a,u)}),YR=ye("$ZodCheckIncludes",(a,u)=>{bl.init(a,u);const c=$p(u.includes),s=new RegExp(typeof u.position=="number"?`^.{${u.position}}${c}`:c);u.pattern=s,a._zod.onattach.push(h=>{const y=h._zod.bag;y.patterns??(y.patterns=new Set),y.patterns.add(s)}),a._zod.check=h=>{h.value.includes(u.includes,u.position)||h.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:u.includes,input:h.value,inst:a,continue:!u.abort})}}),VR=ye("$ZodCheckStartsWith",(a,u)=>{bl.init(a,u);const c=new RegExp(`^${$p(u.prefix)}.*`);u.pattern??(u.pattern=c),a._zod.onattach.push(s=>{const h=s._zod.bag;h.patterns??(h.patterns=new Set),h.patterns.add(c)}),a._zod.check=s=>{s.value.startsWith(u.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:u.prefix,input:s.value,inst:a,continue:!u.abort})}}),GR=ye("$ZodCheckEndsWith",(a,u)=>{bl.init(a,u);const c=new RegExp(`.*${$p(u.suffix)}$`);u.pattern??(u.pattern=c),a._zod.onattach.push(s=>{const h=s._zod.bag;h.patterns??(h.patterns=new Set),h.patterns.add(c)}),a._zod.check=s=>{s.value.endsWith(u.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:u.suffix,input:s.value,inst:a,continue:!u.abort})}}),XR=ye("$ZodCheckOverwrite",(a,u)=>{bl.init(a,u),a._zod.check=c=>{c.value=u.tx(c.value)}});class QR{constructor(u=[]){this.content=[],this.indent=0,this&&(this.args=u)}indented(u){this.indent+=1,u(this),this.indent-=1}write(u){if(typeof u=="function"){u(this,{execution:"sync"}),u(this,{execution:"async"});return}const s=u.split(`
|
|
323
323
|
`).filter(v=>v),h=Math.min(...s.map(v=>v.length-v.trimStart().length)),y=s.map(v=>v.slice(h)).map(v=>" ".repeat(this.indent*2)+v);for(const v of y)this.content.push(v)}compile(){const u=Function,c=this==null?void 0:this.args,h=[...((this==null?void 0:this.content)??[""]).map(y=>` ${y}`)];return new u(...c,h.join(`
|
|
@@ -346,7 +346,7 @@ Error message: ${yE(c)}`,cause:c}),this[zE]=!0,this.value=u,this.context=s}stati
|
|
|
346
346
|
path: iss.path ? [${Jp(L)}, ...iss.path] : [${Jp(L)}]
|
|
347
347
|
})));`),z.write(`newResult[${Jp(L)}] = ${D}.value`)}z.write("payload.value = newResult;"),z.write("return payload;");const k=z.compile();return(L,D)=>k(R,L,D)};let h;const y=dv,v=!CE.jitless,T=v&&GO.value,E=u.catchall;let O;a._zod.parse=(R,z)=>{O??(O=c.value);const _=R.value;if(!y(_))return R.issues.push({expected:"object",code:"invalid_type",input:_,inst:a}),R;const Y=[];if(v&&T&&(z==null?void 0:z.async)===!1&&z.jitless!==!0)h||(h=s(u.shape)),R=h(R,z);else{R.value={};const D=O.shape;for(const oe of O.keys){const ne=D[oe],Q=ne._zod.run({value:_[oe],issues:[]},z),pe=ne._zod.optin==="optional"&&ne._zod.optout==="optional";Q instanceof Promise?Y.push(Q.then(we=>pe?JE(we,R,oe,_):yv(we,R,oe))):pe?JE(Q,R,oe,_):yv(Q,R,oe)}}if(!E)return Y.length?Promise.all(Y).then(()=>R):R;const le=[],X=O.keySet,k=E._zod,L=k.def.type;for(const D of Object.keys(_)){if(X.has(D))continue;if(L==="never"){le.push(D);continue}const oe=k.run({value:_[D],issues:[]},z);oe instanceof Promise?Y.push(oe.then(ne=>yv(ne,R,D))):yv(oe,R,D)}return le.length&&R.issues.push({code:"unrecognized_keys",keys:le,input:_,inst:a}),Y.length?Promise.all(Y).then(()=>R):R}});function $E(a,u,c,s){for(const h of a)if(h.issues.length===0)return u.value=h.value,u;return u.issues.push({code:"invalid_union",input:u.value,inst:c,errors:a.map(h=>h.issues.map(y=>Io(y,s,Qo())))}),u}const KE=ye("$ZodUnion",(a,u)=>{ln.init(a,u),Xt(a._zod,"optin",()=>u.options.some(c=>c._zod.optin==="optional")?"optional":void 0),Xt(a._zod,"optout",()=>u.options.some(c=>c._zod.optout==="optional")?"optional":void 0),Xt(a._zod,"values",()=>{if(u.options.every(c=>c._zod.values))return new Set(u.options.flatMap(c=>Array.from(c._zod.values)))}),Xt(a._zod,"pattern",()=>{if(u.options.every(c=>c._zod.pattern)){const c=u.options.map(s=>s._zod.pattern);return new RegExp(`^(${c.map(s=>_b(s.source)).join("|")})$`)}}),a._zod.parse=(c,s)=>{let h=!1;const y=[];for(const v of u.options){const b=v._zod.run({value:c.value,issues:[]},s);if(b instanceof Promise)y.push(b),h=!0;else{if(b.issues.length===0)return b;y.push(b)}}return h?Promise.all(y).then(v=>$E(v,c,a,s)):$E(y,c,a,s)}}),Rw=ye("$ZodDiscriminatedUnion",(a,u)=>{KE.init(a,u);const c=a._zod.parse;Xt(a._zod,"propValues",()=>{const h={};for(const y of u.options){const v=y._zod.propValues;if(!v||Object.keys(v).length===0)throw new Error(`Invalid discriminated union option at index "${u.options.indexOf(y)}"`);for(const[b,T]of Object.entries(v)){h[b]||(h[b]=new Set);for(const E of T)h[b].add(E)}}return h});const s=wb(()=>{const h=u.options,y=new Map;for(const v of h){const b=v._zod.propValues[u.discriminator];if(!b||b.size===0)throw new Error(`Invalid discriminated union option at index "${u.options.indexOf(v)}"`);for(const T of b){if(y.has(T))throw new Error(`Duplicate discriminator value "${String(T)}"`);y.set(T,v)}}return y});a._zod.parse=(h,y)=>{const v=h.value;if(!dv(v))return h.issues.push({code:"invalid_type",expected:"object",input:v,inst:a}),h;const b=s.value.get(v==null?void 0:v[u.discriminator]);return b?b._zod.run(h,y):u.unionFallback?c(h,y):(h.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:v,path:[u.discriminator],inst:a}),h)}}),ww=ye("$ZodIntersection",(a,u)=>{ln.init(a,u),a._zod.parse=(c,s)=>{const h=c.value,y=u.left._zod.run({value:h,issues:[]},s),v=u.right._zod.run({value:h,issues:[]},s);return y instanceof Promise||v instanceof Promise?Promise.all([y,v]).then(([T,E])=>PE(c,T,E)):PE(c,y,v)}});function Mb(a,u){if(a===u)return{valid:!0,data:a};if(a instanceof Date&&u instanceof Date&&+a==+u)return{valid:!0,data:a};if(hv(a)&&hv(u)){const c=Object.keys(u),s=Object.keys(a).filter(y=>c.indexOf(y)!==-1),h={...a,...u};for(const y of s){const v=Mb(a[y],u[y]);if(!v.valid)return{valid:!1,mergeErrorPath:[y,...v.mergeErrorPath]};h[y]=v.data}return{valid:!0,data:h}}if(Array.isArray(a)&&Array.isArray(u)){if(a.length!==u.length)return{valid:!1,mergeErrorPath:[]};const c=[];for(let s=0;s<a.length;s++){const h=a[s],y=u[s],v=Mb(h,y);if(!v.valid)return{valid:!1,mergeErrorPath:[s,...v.mergeErrorPath]};c.push(v.data)}return{valid:!0,data:c}}return{valid:!1,mergeErrorPath:[]}}function PE(a,u,c){if(u.issues.length&&a.issues.push(...u.issues),c.issues.length&&a.issues.push(...c.issues),Kp(a))return a;const s=Mb(u.value,c.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return a.value=s.data,a}const zw=ye("$ZodRecord",(a,u)=>{ln.init(a,u),a._zod.parse=(c,s)=>{const h=c.value;if(!hv(h))return c.issues.push({expected:"record",code:"invalid_type",input:h,inst:a}),c;const y=[];if(u.keyType._zod.values){const v=u.keyType._zod.values;c.value={};for(const T of v)if(typeof T=="string"||typeof T=="number"||typeof T=="symbol"){const E=u.valueType._zod.run({value:h[T],issues:[]},s);E instanceof Promise?y.push(E.then(O=>{O.issues.length&&c.issues.push(...ms(T,O.issues)),c.value[T]=O.value})):(E.issues.length&&c.issues.push(...ms(T,E.issues)),c.value[T]=E.value)}let b;for(const T in h)v.has(T)||(b=b??[],b.push(T));b&&b.length>0&&c.issues.push({code:"unrecognized_keys",input:h,inst:a,keys:b})}else{c.value={};for(const v of Reflect.ownKeys(h)){if(v==="__proto__")continue;const b=u.keyType._zod.run({value:v,issues:[]},s);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(b.issues.length){c.issues.push({origin:"record",code:"invalid_key",issues:b.issues.map(E=>Io(E,s,Qo())),input:v,path:[v],inst:a}),c.value[b.value]=b.value;continue}const T=u.valueType._zod.run({value:h[v],issues:[]},s);T instanceof Promise?y.push(T.then(E=>{E.issues.length&&c.issues.push(...ms(v,E.issues)),c.value[b.value]=E.value})):(T.issues.length&&c.issues.push(...ms(v,T.issues)),c.value[b.value]=T.value)}}return y.length?Promise.all(y).then(()=>c):c}}),_w=ye("$ZodEnum",(a,u)=>{ln.init(a,u);const c=DE(u.entries);a._zod.values=new Set(c),a._zod.pattern=new RegExp(`^(${c.filter(s=>XO.has(typeof s)).map(s=>typeof s=="string"?$p(s):s.toString()).join("|")})$`),a._zod.parse=(s,h)=>{const y=s.value;return a._zod.values.has(y)||s.issues.push({code:"invalid_value",values:c,input:y,inst:a}),s}}),Cw=ye("$ZodLiteral",(a,u)=>{ln.init(a,u),a._zod.values=new Set(u.values),a._zod.pattern=new RegExp(`^(${u.values.map(c=>typeof c=="string"?$p(c):c?c.toString():String(c)).join("|")})$`),a._zod.parse=(c,s)=>{const h=c.value;return a._zod.values.has(h)||c.issues.push({code:"invalid_value",values:u.values,input:h,inst:a}),c}}),Dw=ye("$ZodTransform",(a,u)=>{ln.init(a,u),a._zod.parse=(c,s)=>{const h=u.transform(c.value,c);if(s.async)return(h instanceof Promise?h:Promise.resolve(h)).then(v=>(c.value=v,c));if(h instanceof Promise)throw new Ip;return c.value=h,c}}),Mw=ye("$ZodOptional",(a,u)=>{ln.init(a,u),a._zod.optin="optional",a._zod.optout="optional",Xt(a._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,void 0]):void 0),Xt(a._zod,"pattern",()=>{const c=u.innerType._zod.pattern;return c?new RegExp(`^(${_b(c.source)})?$`):void 0}),a._zod.parse=(c,s)=>u.innerType._zod.optin==="optional"?u.innerType._zod.run(c,s):c.value===void 0?c:u.innerType._zod.run(c,s)}),Nw=ye("$ZodNullable",(a,u)=>{ln.init(a,u),Xt(a._zod,"optin",()=>u.innerType._zod.optin),Xt(a._zod,"optout",()=>u.innerType._zod.optout),Xt(a._zod,"pattern",()=>{const c=u.innerType._zod.pattern;return c?new RegExp(`^(${_b(c.source)}|null)$`):void 0}),Xt(a._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,null]):void 0),a._zod.parse=(c,s)=>c.value===null?c:u.innerType._zod.run(c,s)}),kw=ye("$ZodDefault",(a,u)=>{ln.init(a,u),a._zod.optin="optional",Xt(a._zod,"values",()=>u.innerType._zod.values),a._zod.parse=(c,s)=>{if(c.value===void 0)return c.value=u.defaultValue,c;const h=u.innerType._zod.run(c,s);return h instanceof Promise?h.then(y=>FE(y,u)):FE(h,u)}});function FE(a,u){return a.value===void 0&&(a.value=u.defaultValue),a}const Uw=ye("$ZodPrefault",(a,u)=>{ln.init(a,u),a._zod.optin="optional",Xt(a._zod,"values",()=>u.innerType._zod.values),a._zod.parse=(c,s)=>(c.value===void 0&&(c.value=u.defaultValue),u.innerType._zod.run(c,s))}),Hw=ye("$ZodNonOptional",(a,u)=>{ln.init(a,u),Xt(a._zod,"values",()=>{const c=u.innerType._zod.values;return c?new Set([...c].filter(s=>s!==void 0)):void 0}),a._zod.parse=(c,s)=>{const h=u.innerType._zod.run(c,s);return h instanceof Promise?h.then(y=>WE(y,a)):WE(h,a)}});function WE(a,u){return!a.issues.length&&a.value===void 0&&a.issues.push({code:"invalid_type",expected:"nonoptional",input:a.value,inst:u}),a}const jw=ye("$ZodCatch",(a,u)=>{ln.init(a,u),a._zod.optin="optional",Xt(a._zod,"optout",()=>u.innerType._zod.optout),Xt(a._zod,"values",()=>u.innerType._zod.values),a._zod.parse=(c,s)=>{const h=u.innerType._zod.run(c,s);return h instanceof Promise?h.then(y=>(c.value=y.value,y.issues.length&&(c.value=u.catchValue({...c,error:{issues:y.issues.map(v=>Io(v,s,Qo()))},input:c.value}),c.issues=[]),c)):(c.value=h.value,h.issues.length&&(c.value=u.catchValue({...c,error:{issues:h.issues.map(y=>Io(y,s,Qo()))},input:c.value}),c.issues=[]),c)}}),Bw=ye("$ZodPipe",(a,u)=>{ln.init(a,u),Xt(a._zod,"values",()=>u.in._zod.values),Xt(a._zod,"optin",()=>u.in._zod.optin),Xt(a._zod,"optout",()=>u.out._zod.optout),a._zod.parse=(c,s)=>{const h=u.in._zod.run(c,s);return h instanceof Promise?h.then(y=>eT(y,u,s)):eT(h,u,s)}});function eT(a,u,c){return Kp(a)?a:u.out._zod.run({value:a.value,issues:a.issues},c)}const Lw=ye("$ZodReadonly",(a,u)=>{ln.init(a,u),Xt(a._zod,"propValues",()=>u.innerType._zod.propValues),Xt(a._zod,"values",()=>u.innerType._zod.values),Xt(a._zod,"optin",()=>u.innerType._zod.optin),Xt(a._zod,"optout",()=>u.innerType._zod.optout),a._zod.parse=(c,s)=>{const h=u.innerType._zod.run(c,s);return h instanceof Promise?h.then(tT):tT(h)}});function tT(a){return a.value=Object.freeze(a.value),a}const Zw=ye("$ZodLazy",(a,u)=>{ln.init(a,u),Xt(a._zod,"innerType",()=>u.getter()),Xt(a._zod,"pattern",()=>a._zod.innerType._zod.pattern),Xt(a._zod,"propValues",()=>a._zod.innerType._zod.propValues),Xt(a._zod,"optin",()=>a._zod.innerType._zod.optin),Xt(a._zod,"optout",()=>a._zod.innerType._zod.optout),a._zod.parse=(c,s)=>a._zod.innerType._zod.run(c,s)}),qw=ye("$ZodCustom",(a,u)=>{bl.init(a,u),ln.init(a,u),a._zod.parse=(c,s)=>c,a._zod.check=c=>{const s=c.value,h=u.fn(s);if(h instanceof Promise)return h.then(y=>nT(y,c,s,a));nT(h,c,s,a)}});function nT(a,u,c,s){if(!a){const h={code:"custom",input:c,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(h.params=s._zod.def.params),u.issues.push(Pp(h))}}class aT{constructor(){this._map=new Map,this._idmap=new Map}add(u,...c){const s=c[0];if(this._map.set(u,s),s&&typeof s=="object"&&"id"in s){if(this._idmap.has(s.id))throw new Error(`ID ${s.id} already exists in the registry`);this._idmap.set(s.id,u)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(u){const c=this._map.get(u);return c&&typeof c=="object"&&"id"in c&&this._idmap.delete(c.id),this._map.delete(u),this}get(u){const c=u._zod.parent;if(c){const s={...this.get(c)??{}};return delete s.id,{...s,...this._map.get(u)}}return this._map.get(u)}has(u){return this._map.has(u)}}function Yw(){return new aT}const Fp=Yw();function Vw(a,u){return new a({type:"string",...Ve(u)})}function Gw(a,u){return new a({type:"string",format:"email",check:"string_format",abort:!1,...Ve(u)})}function lT(a,u){return new a({type:"string",format:"guid",check:"string_format",abort:!1,...Ve(u)})}function Xw(a,u){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,...Ve(u)})}function Qw(a,u){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ve(u)})}function Iw(a,u){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ve(u)})}function Jw(a,u){return new a({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ve(u)})}function $w(a,u){return new a({type:"string",format:"url",check:"string_format",abort:!1,...Ve(u)})}function Kw(a,u){return new a({type:"string",format:"emoji",check:"string_format",abort:!1,...Ve(u)})}function Pw(a,u){return new a({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ve(u)})}function Fw(a,u){return new a({type:"string",format:"cuid",check:"string_format",abort:!1,...Ve(u)})}function Ww(a,u){return new a({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ve(u)})}function ez(a,u){return new a({type:"string",format:"ulid",check:"string_format",abort:!1,...Ve(u)})}function tz(a,u){return new a({type:"string",format:"xid",check:"string_format",abort:!1,...Ve(u)})}function nz(a,u){return new a({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ve(u)})}function az(a,u){return new a({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ve(u)})}function lz(a,u){return new a({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ve(u)})}function iz(a,u){return new a({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ve(u)})}function uz(a,u){return new a({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ve(u)})}function rz(a,u){return new a({type:"string",format:"base64",check:"string_format",abort:!1,...Ve(u)})}function oz(a,u){return new a({type:"string",format:"base64url",check:"string_format",abort:!1,...Ve(u)})}function cz(a,u){return new a({type:"string",format:"e164",check:"string_format",abort:!1,...Ve(u)})}function sz(a,u){return new a({type:"string",format:"jwt",check:"string_format",abort:!1,...Ve(u)})}function fz(a,u){return new a({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ve(u)})}function dz(a,u){return new a({type:"string",format:"date",check:"string_format",...Ve(u)})}function hz(a,u){return new a({type:"string",format:"time",check:"string_format",precision:null,...Ve(u)})}function pz(a,u){return new a({type:"string",format:"duration",check:"string_format",...Ve(u)})}function mz(a,u){return new a({type:"number",checks:[],...Ve(u)})}function yz(a,u){return new a({type:"number",check:"number_format",abort:!1,format:"safeint",...Ve(u)})}function gz(a,u){return new a({type:"boolean",...Ve(u)})}function vz(a,u){return new a({type:"null",...Ve(u)})}function bz(a){return new a({type:"unknown"})}function Sz(a,u){return new a({type:"never",...Ve(u)})}function iT(a,u){return new VE({check:"less_than",...Ve(u),value:a,inclusive:!1})}function Nb(a,u){return new VE({check:"less_than",...Ve(u),value:a,inclusive:!0})}function uT(a,u){return new GE({check:"greater_than",...Ve(u),value:a,inclusive:!1})}function kb(a,u){return new GE({check:"greater_than",...Ve(u),value:a,inclusive:!0})}function rT(a,u){return new kR({check:"multiple_of",...Ve(u),value:a})}function oT(a,u){return new HR({check:"max_length",...Ve(u),maximum:a})}function gv(a,u){return new jR({check:"min_length",...Ve(u),minimum:a})}function cT(a,u){return new BR({check:"length_equals",...Ve(u),length:a})}function Ez(a,u){return new LR({check:"string_format",format:"regex",...Ve(u),pattern:a})}function Tz(a){return new ZR({check:"string_format",format:"lowercase",...Ve(a)})}function Az(a){return new qR({check:"string_format",format:"uppercase",...Ve(a)})}function xz(a,u){return new YR({check:"string_format",format:"includes",...Ve(u),includes:a})}function Oz(a,u){return new VR({check:"string_format",format:"starts_with",...Ve(u),prefix:a})}function Rz(a,u){return new GR({check:"string_format",format:"ends_with",...Ve(u),suffix:a})}function Wp(a){return new XR({check:"overwrite",tx:a})}function wz(a){return Wp(u=>u.normalize(a))}function zz(){return Wp(a=>a.trim())}function _z(){return Wp(a=>a.toLowerCase())}function Cz(){return Wp(a=>a.toUpperCase())}function Dz(a,u,c){return new a({type:"array",element:u,...Ve(c)})}function Mz(a,u,c){const s=Ve(c);return s.abort??(s.abort=!0),new a({type:"custom",check:"custom",fn:u,...s})}function Nz(a,u,c){return new a({type:"custom",check:"custom",fn:u,...Ve(c)})}class sT{constructor(u){this.counter=0,this.metadataRegistry=(u==null?void 0:u.metadata)??Fp,this.target=(u==null?void 0:u.target)??"draft-2020-12",this.unrepresentable=(u==null?void 0:u.unrepresentable)??"throw",this.override=(u==null?void 0:u.override)??(()=>{}),this.io=(u==null?void 0:u.io)??"output",this.seen=new Map}process(u,c={path:[],schemaPath:[]}){var R,z,_;var s;const h=u._zod.def,y={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},v=this.seen.get(u);if(v)return v.count++,c.schemaPath.includes(u)&&(v.cycle=c.path),v.schema;const b={schema:{},count:1,cycle:void 0,path:c.path};this.seen.set(u,b);const T=(z=(R=u._zod).toJSONSchema)==null?void 0:z.call(R);if(T)b.schema=T;else{const Y={...c,schemaPath:[...c.schemaPath,u],path:c.path},le=u._zod.parent;if(le)b.ref=le,this.process(le,Y),this.seen.get(le).isParent=!0;else{const X=b.schema;switch(h.type){case"string":{const k=X;k.type="string";const{minimum:L,maximum:D,format:oe,patterns:ne,contentEncoding:Q}=u._zod.bag;if(typeof L=="number"&&(k.minLength=L),typeof D=="number"&&(k.maxLength=D),oe&&(k.format=y[oe]??oe,k.format===""&&delete k.format),Q&&(k.contentEncoding=Q),ne&&ne.size>0){const pe=[...ne];pe.length===1?k.pattern=pe[0].source:pe.length>1&&(b.schema.allOf=[...pe.map(we=>({...this.target==="draft-7"?{type:"string"}:{},pattern:we.source}))])}break}case"number":{const k=X,{minimum:L,maximum:D,format:oe,multipleOf:ne,exclusiveMaximum:Q,exclusiveMinimum:pe}=u._zod.bag;typeof oe=="string"&&oe.includes("int")?k.type="integer":k.type="number",typeof pe=="number"&&(k.exclusiveMinimum=pe),typeof L=="number"&&(k.minimum=L,typeof pe=="number"&&(pe>=L?delete k.minimum:delete k.exclusiveMinimum)),typeof Q=="number"&&(k.exclusiveMaximum=Q),typeof D=="number"&&(k.maximum=D,typeof Q=="number"&&(Q<=D?delete k.maximum:delete k.exclusiveMaximum)),typeof ne=="number"&&(k.multipleOf=ne);break}case"boolean":{const k=X;k.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{X.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{X.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const k=X,{minimum:L,maximum:D}=u._zod.bag;typeof L=="number"&&(k.minItems=L),typeof D=="number"&&(k.maxItems=D),k.type="array",k.items=this.process(h.element,{...Y,path:[...Y.path,"items"]});break}case"object":{const k=X;k.type="object",k.properties={};const L=h.shape;for(const ne in L)k.properties[ne]=this.process(L[ne],{...Y,path:[...Y.path,"properties",ne]});const D=new Set(Object.keys(L)),oe=new Set([...D].filter(ne=>{const Q=h.shape[ne]._zod;return this.io==="input"?Q.optin===void 0:Q.optout===void 0}));oe.size>0&&(k.required=Array.from(oe)),((_=h.catchall)==null?void 0:_._zod.def.type)==="never"?k.additionalProperties=!1:h.catchall?h.catchall&&(k.additionalProperties=this.process(h.catchall,{...Y,path:[...Y.path,"additionalProperties"]})):this.io==="output"&&(k.additionalProperties=!1);break}case"union":{const k=X;k.anyOf=h.options.map((L,D)=>this.process(L,{...Y,path:[...Y.path,"anyOf",D]}));break}case"intersection":{const k=X,L=this.process(h.left,{...Y,path:[...Y.path,"allOf",0]}),D=this.process(h.right,{...Y,path:[...Y.path,"allOf",1]}),oe=Q=>"allOf"in Q&&Object.keys(Q).length===1,ne=[...oe(L)?L.allOf:[L],...oe(D)?D.allOf:[D]];k.allOf=ne;break}case"tuple":{const k=X;k.type="array";const L=h.items.map((ne,Q)=>this.process(ne,{...Y,path:[...Y.path,"prefixItems",Q]}));if(this.target==="draft-2020-12"?k.prefixItems=L:k.items=L,h.rest){const ne=this.process(h.rest,{...Y,path:[...Y.path,"items"]});this.target==="draft-2020-12"?k.items=ne:k.additionalItems=ne}h.rest&&(k.items=this.process(h.rest,{...Y,path:[...Y.path,"items"]}));const{minimum:D,maximum:oe}=u._zod.bag;typeof D=="number"&&(k.minItems=D),typeof oe=="number"&&(k.maxItems=oe);break}case"record":{const k=X;k.type="object",k.propertyNames=this.process(h.keyType,{...Y,path:[...Y.path,"propertyNames"]}),k.additionalProperties=this.process(h.valueType,{...Y,path:[...Y.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const k=X,L=DE(h.entries);L.every(D=>typeof D=="number")&&(k.type="number"),L.every(D=>typeof D=="string")&&(k.type="string"),k.enum=L;break}case"literal":{const k=X,L=[];for(const D of h.values)if(D===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof D=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");L.push(Number(D))}else L.push(D);if(L.length!==0)if(L.length===1){const D=L[0];k.type=D===null?"null":typeof D,k.const=D}else L.every(D=>typeof D=="number")&&(k.type="number"),L.every(D=>typeof D=="string")&&(k.type="string"),L.every(D=>typeof D=="boolean")&&(k.type="string"),L.every(D=>D===null)&&(k.type="null"),k.enum=L;break}case"file":{const k=X,L={type:"string",format:"binary",contentEncoding:"binary"},{minimum:D,maximum:oe,mime:ne}=u._zod.bag;D!==void 0&&(L.minLength=D),oe!==void 0&&(L.maxLength=oe),ne?ne.length===1?(L.contentMediaType=ne[0],Object.assign(k,L)):k.anyOf=ne.map(Q=>({...L,contentMediaType:Q})):Object.assign(k,L);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const k=this.process(h.innerType,Y);X.anyOf=[k,{type:"null"}];break}case"nonoptional":{this.process(h.innerType,Y),b.ref=h.innerType;break}case"success":{const k=X;k.type="boolean";break}case"default":{this.process(h.innerType,Y),b.ref=h.innerType,X.default=JSON.parse(JSON.stringify(h.defaultValue));break}case"prefault":{this.process(h.innerType,Y),b.ref=h.innerType,this.io==="input"&&(X._prefault=JSON.parse(JSON.stringify(h.defaultValue)));break}case"catch":{this.process(h.innerType,Y),b.ref=h.innerType;let k;try{k=h.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}X.default=k;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const k=X,L=u._zod.pattern;if(!L)throw new Error("Pattern not found in template literal");k.type="string",k.pattern=L.source;break}case"pipe":{const k=this.io==="input"?h.in._zod.def.type==="transform"?h.out:h.in:h.out;this.process(k,Y),b.ref=k;break}case"readonly":{this.process(h.innerType,Y),b.ref=h.innerType,X.readOnly=!0;break}case"promise":{this.process(h.innerType,Y),b.ref=h.innerType;break}case"optional":{this.process(h.innerType,Y),b.ref=h.innerType;break}case"lazy":{const k=u._zod.innerType;this.process(k,Y),b.ref=k;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const E=this.metadataRegistry.get(u);return E&&Object.assign(b.schema,E),this.io==="input"&&aa(u)&&(delete b.schema.examples,delete b.schema.default),this.io==="input"&&b.schema._prefault&&((s=b.schema).default??(s.default=b.schema._prefault)),delete b.schema._prefault,this.seen.get(u).schema}emit(u,c){var O,R,z,_,Y,le;const s={cycles:(c==null?void 0:c.cycles)??"ref",reused:(c==null?void 0:c.reused)??"inline",external:(c==null?void 0:c.external)??void 0},h=this.seen.get(u);if(!h)throw new Error("Unprocessed schema. This is a bug in Zod.");const y=X=>{var ne;const k=this.target==="draft-2020-12"?"$defs":"definitions";if(s.external){const Q=(ne=s.external.registry.get(X[0]))==null?void 0:ne.id,pe=s.external.uri??(Se=>Se);if(Q)return{ref:pe(Q)};const we=X[1].defId??X[1].schema.id??`schema${this.counter++}`;return X[1].defId=we,{defId:we,ref:`${pe("__shared")}#/${k}/${we}`}}if(X[1]===h)return{ref:"#"};const D=`#/${k}/`,oe=X[1].schema.id??`__schema${this.counter++}`;return{defId:oe,ref:D+oe}},v=X=>{if(X[1].schema.$ref)return;const k=X[1],{ref:L,defId:D}=y(X);k.def={...k.schema},D&&(k.defId=D);const oe=k.schema;for(const ne in oe)delete oe[ne];oe.$ref=L};if(s.cycles==="throw")for(const X of this.seen.entries()){const k=X[1];if(k.cycle)throw new Error(`Cycle detected: #/${(O=k.cycle)==null?void 0:O.join("/")}/<root>
|
|
348
348
|
|
|
349
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const X of this.seen.entries()){const k=X[1];if(u===X[0]){v(X);continue}if(s.external){const D=(R=s.external.registry.get(X[0]))==null?void 0:R.id;if(u!==X[0]&&D){v(X);continue}}if((z=this.metadataRegistry.get(X[0]))==null?void 0:z.id){v(X);continue}if(k.cycle){v(X);continue}if(k.count>1&&s.reused==="ref"){v(X);continue}}const b=(X,k)=>{const L=this.seen.get(X),D=L.def??L.schema,oe={...D};if(L.ref===null)return;const ne=L.ref;if(L.ref=null,ne){b(ne,k);const Q=this.seen.get(ne).schema;Q.$ref&&k.target==="draft-7"?(D.allOf=D.allOf??[],D.allOf.push(Q)):(Object.assign(D,Q),Object.assign(D,oe))}L.isParent||this.override({zodSchema:X,jsonSchema:D,path:L.path??[]})};for(const X of[...this.seen.entries()].reverse())b(X[0],{target:this.target});const T={};if(this.target==="draft-2020-12"?T.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?T.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(_=s.external)!=null&&_.uri){const X=(Y=s.external.registry.get(u))==null?void 0:Y.id;if(!X)throw new Error("Schema is missing an `id` property");T.$id=s.external.uri(X)}Object.assign(T,h.def);const E=((le=s.external)==null?void 0:le.defs)??{};for(const X of this.seen.entries()){const k=X[1];k.def&&k.defId&&(E[k.defId]=k.def)}s.external||Object.keys(E).length>0&&(this.target==="draft-2020-12"?T.$defs=E:T.definitions=E);try{return JSON.parse(JSON.stringify(T))}catch{throw new Error("Error converting schema to JSON.")}}}function kz(a,u){if(a instanceof aT){const s=new sT(u),h={};for(const b of a._idmap.entries()){const[T,E]=b;s.process(E)}const y={},v={registry:a,uri:u==null?void 0:u.uri,defs:h};for(const b of a._idmap.entries()){const[T,E]=b;y[T]=s.emit(E,{...u,external:v})}if(Object.keys(h).length>0){const b=s.target==="draft-2020-12"?"$defs":"definitions";y.__shared={[b]:h}}return{schemas:y}}const c=new sT(u);return c.process(a),c.emit(a,u)}function aa(a,u){const c=u??{seen:new Set};if(c.seen.has(a))return!1;c.seen.add(a);const h=a._zod.def;switch(h.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return aa(h.element,c);case"object":{for(const y in h.shape)if(aa(h.shape[y],c))return!0;return!1}case"union":{for(const y of h.options)if(aa(y,c))return!0;return!1}case"intersection":return aa(h.left,c)||aa(h.right,c);case"tuple":{for(const y of h.items)if(aa(y,c))return!0;return!!(h.rest&&aa(h.rest,c))}case"record":return aa(h.keyType,c)||aa(h.valueType,c);case"map":return aa(h.keyType,c)||aa(h.valueType,c);case"set":return aa(h.valueType,c);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return aa(h.innerType,c);case"lazy":return aa(h.getter(),c);case"default":return aa(h.innerType,c);case"prefault":return aa(h.innerType,c);case"custom":return!1;case"transform":return!0;case"pipe":return aa(h.in,c)||aa(h.out,c);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${h.type}`)}const Uz=ye("ZodISODateTime",(a,u)=>{iw.init(a,u),Cn.init(a,u)});function Hz(a){return fz(Uz,a)}const jz=ye("ZodISODate",(a,u)=>{uw.init(a,u),Cn.init(a,u)});function Bz(a){return dz(jz,a)}const Lz=ye("ZodISOTime",(a,u)=>{rw.init(a,u),Cn.init(a,u)});function Zz(a){return hz(Lz,a)}const qz=ye("ZodISODuration",(a,u)=>{ow.init(a,u),Cn.init(a,u)});function Yz(a){return pz(qz,a)}const vv=ye("ZodError",(a,u)=>{kE.init(a,u),a.name="ZodError",Object.defineProperties(a,{format:{value:c=>tR(a,c)},flatten:{value:c=>eR(a,c)},addIssue:{value:c=>a.issues.push(c)},addIssues:{value:c=>a.issues.push(...c)},isEmpty:{get(){return a.issues.length===0}}})},{Parent:Error}),Vz=nR(vv),Gz=aR(vv),Xz=HE(vv),fT=jE(vv),En=ye("ZodType",(a,u)=>(ln.init(a,u),a.def=u,Object.defineProperty(a,"_def",{value:u}),a.check=(...c)=>a.clone({...u,checks:[...u.checks??[],...c.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),a.clone=(c,s)=>ps(a,c,s),a.brand=()=>a,a.register=((c,s)=>(c.add(a,s),a)),a.parse=(c,s)=>Vz(a,c,s,{callee:a.parse}),a.safeParse=(c,s)=>Xz(a,c,s),a.parseAsync=async(c,s)=>Gz(a,c,s,{callee:a.parseAsync}),a.safeParseAsync=async(c,s)=>fT(a,c,s),a.spa=a.safeParseAsync,a.refine=(c,s)=>a.check(Z_(c,s)),a.superRefine=c=>a.check(q_(c)),a.overwrite=c=>a.check(Wp(c)),a.optional=()=>ET(a),a.nullable=()=>TT(a),a.nullish=()=>ET(TT(a)),a.nonoptional=c=>D_(a,c),a.array=()=>cd(a),a.or=c=>nl([a,c]),a.and=c=>E_(a,c),a.transform=c=>xT(a,O_(c)),a.default=c=>z_(a,c),a.prefault=c=>C_(a,c),a.catch=c=>N_(a,c),a.pipe=c=>xT(a,c),a.readonly=()=>H_(a),a.describe=c=>{const s=a.clone();return Fp.add(s,{description:c}),s},Object.defineProperty(a,"description",{get(){var c;return(c=Fp.get(a))==null?void 0:c.description},configurable:!0}),a.meta=(...c)=>{if(c.length===0)return Fp.get(a);const s=a.clone();return Fp.add(s,c[0]),s},a.isOptional=()=>a.safeParse(void 0).success,a.isNullable=()=>a.safeParse(null).success,a)),dT=ye("_ZodString",(a,u)=>{Db.init(a,u),En.init(a,u);const c=a._zod.bag;a.format=c.format??null,a.minLength=c.minimum??null,a.maxLength=c.maximum??null,a.regex=(...s)=>a.check(Ez(...s)),a.includes=(...s)=>a.check(xz(...s)),a.startsWith=(...s)=>a.check(Oz(...s)),a.endsWith=(...s)=>a.check(Rz(...s)),a.min=(...s)=>a.check(gv(...s)),a.max=(...s)=>a.check(oT(...s)),a.length=(...s)=>a.check(cT(...s)),a.nonempty=(...s)=>a.check(gv(1,...s)),a.lowercase=s=>a.check(Tz(s)),a.uppercase=s=>a.check(Az(s)),a.trim=()=>a.check(zz()),a.normalize=(...s)=>a.check(wz(...s)),a.toLowerCase=()=>a.check(_z()),a.toUpperCase=()=>a.check(Cz())}),Qz=ye("ZodString",(a,u)=>{Db.init(a,u),dT.init(a,u),a.email=c=>a.check(Gw(Iz,c)),a.url=c=>a.check($w(Jz,c)),a.jwt=c=>a.check(sz(c_,c)),a.emoji=c=>a.check(Kw($z,c)),a.guid=c=>a.check(lT(hT,c)),a.uuid=c=>a.check(Xw(bv,c)),a.uuidv4=c=>a.check(Qw(bv,c)),a.uuidv6=c=>a.check(Iw(bv,c)),a.uuidv7=c=>a.check(Jw(bv,c)),a.nanoid=c=>a.check(Pw(Kz,c)),a.guid=c=>a.check(lT(hT,c)),a.cuid=c=>a.check(Fw(Pz,c)),a.cuid2=c=>a.check(Ww(Fz,c)),a.ulid=c=>a.check(ez(Wz,c)),a.base64=c=>a.check(rz(u_,c)),a.base64url=c=>a.check(oz(r_,c)),a.xid=c=>a.check(tz(e_,c)),a.ksuid=c=>a.check(nz(t_,c)),a.ipv4=c=>a.check(az(n_,c)),a.ipv6=c=>a.check(lz(a_,c)),a.cidrv4=c=>a.check(iz(l_,c)),a.cidrv6=c=>a.check(uz(i_,c)),a.e164=c=>a.check(cz(o_,c)),a.datetime=c=>a.check(Hz(c)),a.date=c=>a.check(Bz(c)),a.time=c=>a.check(Zz(c)),a.duration=c=>a.check(Yz(c))});function Me(a){return Vw(Qz,a)}const Cn=ye("ZodStringFormat",(a,u)=>{Sn.init(a,u),dT.init(a,u)}),Iz=ye("ZodEmail",(a,u)=>{KR.init(a,u),Cn.init(a,u)}),hT=ye("ZodGUID",(a,u)=>{JR.init(a,u),Cn.init(a,u)}),bv=ye("ZodUUID",(a,u)=>{$R.init(a,u),Cn.init(a,u)}),Jz=ye("ZodURL",(a,u)=>{PR.init(a,u),Cn.init(a,u)}),$z=ye("ZodEmoji",(a,u)=>{FR.init(a,u),Cn.init(a,u)}),Kz=ye("ZodNanoID",(a,u)=>{WR.init(a,u),Cn.init(a,u)}),Pz=ye("ZodCUID",(a,u)=>{ew.init(a,u),Cn.init(a,u)}),Fz=ye("ZodCUID2",(a,u)=>{tw.init(a,u),Cn.init(a,u)}),Wz=ye("ZodULID",(a,u)=>{nw.init(a,u),Cn.init(a,u)}),e_=ye("ZodXID",(a,u)=>{aw.init(a,u),Cn.init(a,u)}),t_=ye("ZodKSUID",(a,u)=>{lw.init(a,u),Cn.init(a,u)}),n_=ye("ZodIPv4",(a,u)=>{cw.init(a,u),Cn.init(a,u)}),a_=ye("ZodIPv6",(a,u)=>{sw.init(a,u),Cn.init(a,u)}),l_=ye("ZodCIDRv4",(a,u)=>{fw.init(a,u),Cn.init(a,u)}),i_=ye("ZodCIDRv6",(a,u)=>{dw.init(a,u),Cn.init(a,u)}),u_=ye("ZodBase64",(a,u)=>{hw.init(a,u),Cn.init(a,u)}),r_=ye("ZodBase64URL",(a,u)=>{mw.init(a,u),Cn.init(a,u)}),o_=ye("ZodE164",(a,u)=>{yw.init(a,u),Cn.init(a,u)}),c_=ye("ZodJWT",(a,u)=>{vw.init(a,u),Cn.init(a,u)}),pT=ye("ZodNumber",(a,u)=>{QE.init(a,u),En.init(a,u),a.gt=(s,h)=>a.check(uT(s,h)),a.gte=(s,h)=>a.check(kb(s,h)),a.min=(s,h)=>a.check(kb(s,h)),a.lt=(s,h)=>a.check(iT(s,h)),a.lte=(s,h)=>a.check(Nb(s,h)),a.max=(s,h)=>a.check(Nb(s,h)),a.int=s=>a.check(mT(s)),a.safe=s=>a.check(mT(s)),a.positive=s=>a.check(uT(0,s)),a.nonnegative=s=>a.check(kb(0,s)),a.negative=s=>a.check(iT(0,s)),a.nonpositive=s=>a.check(Nb(0,s)),a.multipleOf=(s,h)=>a.check(rT(s,h)),a.step=(s,h)=>a.check(rT(s,h)),a.finite=()=>a;const c=a._zod.bag;a.minValue=Math.max(c.minimum??Number.NEGATIVE_INFINITY,c.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,a.maxValue=Math.min(c.maximum??Number.POSITIVE_INFINITY,c.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,a.isInt=(c.format??"").includes("int")||Number.isSafeInteger(c.multipleOf??.5),a.isFinite=!0,a.format=c.format??null});function s_(a){return mz(pT,a)}const f_=ye("ZodNumberFormat",(a,u)=>{bw.init(a,u),pT.init(a,u)});function mT(a){return yz(f_,a)}const d_=ye("ZodBoolean",(a,u)=>{Sw.init(a,u),En.init(a,u)});function tl(a){return gz(d_,a)}const h_=ye("ZodNull",(a,u)=>{Ew.init(a,u),En.init(a,u)});function p_(a){return vz(h_,a)}const m_=ye("ZodUnknown",(a,u)=>{Tw.init(a,u),En.init(a,u)});function qu(){return bz(m_)}const y_=ye("ZodNever",(a,u)=>{Aw.init(a,u),En.init(a,u)});function yT(a){return Sz(y_,a)}const g_=ye("ZodArray",(a,u)=>{xw.init(a,u),En.init(a,u),a.element=u.element,a.min=(c,s)=>a.check(gv(c,s)),a.nonempty=c=>a.check(gv(1,c)),a.max=(c,s)=>a.check(oT(c,s)),a.length=(c,s)=>a.check(cT(c,s)),a.unwrap=()=>a.element});function cd(a,u){return Dz(g_,a,u)}const gT=ye("ZodObject",(a,u)=>{Ow.init(a,u),En.init(a,u),Xt(a,"shape",()=>u.shape),a.keyof=()=>bT(Object.keys(a._zod.def.shape)),a.catchall=c=>a.clone({...a._zod.def,catchall:c}),a.passthrough=()=>a.clone({...a._zod.def,catchall:qu()}),a.loose=()=>a.clone({...a._zod.def,catchall:qu()}),a.strict=()=>a.clone({...a._zod.def,catchall:yT()}),a.strip=()=>a.clone({...a._zod.def,catchall:void 0}),a.extend=c=>KO(a,c),a.merge=c=>PO(a,c),a.pick=c=>JO(a,c),a.omit=c=>$O(a,c),a.partial=(...c)=>FO(ST,a,c[0]),a.required=(...c)=>WO(AT,a,c[0])});function Ft(a,u){const c={type:"object",get shape(){return fv(this,"shape",{...a}),this.shape},...Ve(u)};return new gT(c)}function dn(a,u){return new gT({type:"object",get shape(){return fv(this,"shape",{...a}),this.shape},catchall:yT(),...Ve(u)})}const vT=ye("ZodUnion",(a,u)=>{KE.init(a,u),En.init(a,u),a.options=u.options});function nl(a,u){return new vT({type:"union",options:a,...Ve(u)})}const v_=ye("ZodDiscriminatedUnion",(a,u)=>{vT.init(a,u),Rw.init(a,u)});function b_(a,u,c){return new v_({type:"union",options:u,discriminator:a,...Ve(c)})}const S_=ye("ZodIntersection",(a,u)=>{ww.init(a,u),En.init(a,u)});function E_(a,u){return new S_({type:"intersection",left:a,right:u})}const T_=ye("ZodRecord",(a,u)=>{zw.init(a,u),En.init(a,u),a.keyType=u.keyType,a.valueType=u.valueType});function ys(a,u,c){return new T_({type:"record",keyType:a,valueType:u,...Ve(c)})}const Ub=ye("ZodEnum",(a,u)=>{_w.init(a,u),En.init(a,u),a.enum=u.entries,a.options=Object.values(u.entries);const c=new Set(Object.keys(u.entries));a.extract=(s,h)=>{const y={};for(const v of s)if(c.has(v))y[v]=u.entries[v];else throw new Error(`Key ${v} not found in enum`);return new Ub({...u,checks:[],...Ve(h),entries:y})},a.exclude=(s,h)=>{const y={...u.entries};for(const v of s)if(c.has(v))delete y[v];else throw new Error(`Key ${v} not found in enum`);return new Ub({...u,checks:[],...Ve(h),entries:y})}});function bT(a,u){const c=Array.isArray(a)?Object.fromEntries(a.map(s=>[s,s])):a;return new Ub({type:"enum",entries:c,...Ve(u)})}const A_=ye("ZodLiteral",(a,u)=>{Cw.init(a,u),En.init(a,u),a.values=new Set(u.values),Object.defineProperty(a,"value",{get(){if(u.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return u.values[0]}})});function We(a,u){return new A_({type:"literal",values:Array.isArray(a)?a:[a],...Ve(u)})}const x_=ye("ZodTransform",(a,u)=>{Dw.init(a,u),En.init(a,u),a._zod.parse=(c,s)=>{c.addIssue=y=>{if(typeof y=="string")c.issues.push(Pp(y,c.value,u));else{const v=y;v.fatal&&(v.continue=!1),v.code??(v.code="custom"),v.input??(v.input=c.value),v.inst??(v.inst=a),v.continue??(v.continue=!0),c.issues.push(Pp(v))}};const h=u.transform(c.value,c);return h instanceof Promise?h.then(y=>(c.value=y,c)):(c.value=h,c)}});function O_(a){return new x_({type:"transform",transform:a})}const ST=ye("ZodOptional",(a,u)=>{Mw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType});function ET(a){return new ST({type:"optional",innerType:a})}const R_=ye("ZodNullable",(a,u)=>{Nw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType});function TT(a){return new R_({type:"nullable",innerType:a})}const w_=ye("ZodDefault",(a,u)=>{kw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType,a.removeDefault=a.unwrap});function z_(a,u){return new w_({type:"default",innerType:a,get defaultValue(){return typeof u=="function"?u():u}})}const __=ye("ZodPrefault",(a,u)=>{Uw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType});function C_(a,u){return new __({type:"prefault",innerType:a,get defaultValue(){return typeof u=="function"?u():u}})}const AT=ye("ZodNonOptional",(a,u)=>{Hw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType});function D_(a,u){return new AT({type:"nonoptional",innerType:a,...Ve(u)})}const M_=ye("ZodCatch",(a,u)=>{jw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType,a.removeCatch=a.unwrap});function N_(a,u){return new M_({type:"catch",innerType:a,catchValue:typeof u=="function"?u:()=>u})}const k_=ye("ZodPipe",(a,u)=>{Bw.init(a,u),En.init(a,u),a.in=u.in,a.out=u.out});function xT(a,u){return new k_({type:"pipe",in:a,out:u})}const U_=ye("ZodReadonly",(a,u)=>{Lw.init(a,u),En.init(a,u)});function H_(a){return new U_({type:"readonly",innerType:a})}const j_=ye("ZodLazy",(a,u)=>{Zw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.getter()});function B_(a){return new j_({type:"lazy",getter:a})}const Hb=ye("ZodCustom",(a,u)=>{qw.init(a,u),En.init(a,u)});function L_(a){const u=new bl({check:"custom"});return u._zod.check=a,u}function OT(a,u){return Mz(Hb,a??(()=>!0),u)}function Z_(a,u={}){return Nz(Hb,a,u)}function q_(a){const u=L_(c=>(c.addIssue=s=>{if(typeof s=="string")c.issues.push(Pp(s,c.value,u._zod.def));else{const h=s;h.fatal&&(h.continue=!1),h.code??(h.code="custom"),h.input??(h.input=c.value),h.inst??(h.inst=u),h.continue??(h.continue=!u._zod.def.abort),c.issues.push(Pp(h))}},a(c.value,c)));return u}function Sv(a,u={error:`Input not instance of ${a.name}`}){const c=new Hb({type:"custom",check:"custom",fn:s=>s instanceof a,abort:!0,...Ve(u)});return c._zod.bag.Class=a,c}var pt;(function(a){a.ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline",a.ZodReadonly="ZodReadonly"})(pt||(pt={}));class RT extends Error{constructor(u,c){super(u),this.name="ParseError",this.type=c.type,this.field=c.field,this.value=c.value,this.line=c.line}}const wT=10,Y_=13,gs=32;function jb(a){}function V_(a){if(typeof a=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:u=jb,onError:c=jb,onRetry:s=jb,onComment:h}=a,y=[];let v=!0,b,T="",E=0,O;function R(k){if(v&&(v=!1,k.charCodeAt(0)===239&&k.charCodeAt(1)===187&&k.charCodeAt(2)===191&&(k=k.slice(3))),y.length===0){const oe=z(k);oe!==""&&y.push(oe);return}if(k.indexOf(`
|
|
349
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const X of this.seen.entries()){const k=X[1];if(u===X[0]){v(X);continue}if(s.external){const D=(R=s.external.registry.get(X[0]))==null?void 0:R.id;if(u!==X[0]&&D){v(X);continue}}if((z=this.metadataRegistry.get(X[0]))==null?void 0:z.id){v(X);continue}if(k.cycle){v(X);continue}if(k.count>1&&s.reused==="ref"){v(X);continue}}const b=(X,k)=>{const L=this.seen.get(X),D=L.def??L.schema,oe={...D};if(L.ref===null)return;const ne=L.ref;if(L.ref=null,ne){b(ne,k);const Q=this.seen.get(ne).schema;Q.$ref&&k.target==="draft-7"?(D.allOf=D.allOf??[],D.allOf.push(Q)):(Object.assign(D,Q),Object.assign(D,oe))}L.isParent||this.override({zodSchema:X,jsonSchema:D,path:L.path??[]})};for(const X of[...this.seen.entries()].reverse())b(X[0],{target:this.target});const T={};if(this.target==="draft-2020-12"?T.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?T.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(_=s.external)!=null&&_.uri){const X=(Y=s.external.registry.get(u))==null?void 0:Y.id;if(!X)throw new Error("Schema is missing an `id` property");T.$id=s.external.uri(X)}Object.assign(T,h.def);const E=((le=s.external)==null?void 0:le.defs)??{};for(const X of this.seen.entries()){const k=X[1];k.def&&k.defId&&(E[k.defId]=k.def)}s.external||Object.keys(E).length>0&&(this.target==="draft-2020-12"?T.$defs=E:T.definitions=E);try{return JSON.parse(JSON.stringify(T))}catch{throw new Error("Error converting schema to JSON.")}}}function kz(a,u){if(a instanceof aT){const s=new sT(u),h={};for(const b of a._idmap.entries()){const[T,E]=b;s.process(E)}const y={},v={registry:a,uri:u==null?void 0:u.uri,defs:h};for(const b of a._idmap.entries()){const[T,E]=b;y[T]=s.emit(E,{...u,external:v})}if(Object.keys(h).length>0){const b=s.target==="draft-2020-12"?"$defs":"definitions";y.__shared={[b]:h}}return{schemas:y}}const c=new sT(u);return c.process(a),c.emit(a,u)}function aa(a,u){const c=u??{seen:new Set};if(c.seen.has(a))return!1;c.seen.add(a);const h=a._zod.def;switch(h.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return aa(h.element,c);case"object":{for(const y in h.shape)if(aa(h.shape[y],c))return!0;return!1}case"union":{for(const y of h.options)if(aa(y,c))return!0;return!1}case"intersection":return aa(h.left,c)||aa(h.right,c);case"tuple":{for(const y of h.items)if(aa(y,c))return!0;return!!(h.rest&&aa(h.rest,c))}case"record":return aa(h.keyType,c)||aa(h.valueType,c);case"map":return aa(h.keyType,c)||aa(h.valueType,c);case"set":return aa(h.valueType,c);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return aa(h.innerType,c);case"lazy":return aa(h.getter(),c);case"default":return aa(h.innerType,c);case"prefault":return aa(h.innerType,c);case"custom":return!1;case"transform":return!0;case"pipe":return aa(h.in,c)||aa(h.out,c);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${h.type}`)}const Uz=ye("ZodISODateTime",(a,u)=>{iw.init(a,u),Cn.init(a,u)});function Hz(a){return fz(Uz,a)}const jz=ye("ZodISODate",(a,u)=>{uw.init(a,u),Cn.init(a,u)});function Bz(a){return dz(jz,a)}const Lz=ye("ZodISOTime",(a,u)=>{rw.init(a,u),Cn.init(a,u)});function Zz(a){return hz(Lz,a)}const qz=ye("ZodISODuration",(a,u)=>{ow.init(a,u),Cn.init(a,u)});function Yz(a){return pz(qz,a)}const vv=ye("ZodError",(a,u)=>{kE.init(a,u),a.name="ZodError",Object.defineProperties(a,{format:{value:c=>tR(a,c)},flatten:{value:c=>eR(a,c)},addIssue:{value:c=>a.issues.push(c)},addIssues:{value:c=>a.issues.push(...c)},isEmpty:{get(){return a.issues.length===0}}})},{Parent:Error}),Vz=nR(vv),Gz=aR(vv),Xz=HE(vv),fT=jE(vv),En=ye("ZodType",(a,u)=>(ln.init(a,u),a.def=u,Object.defineProperty(a,"_def",{value:u}),a.check=(...c)=>a.clone({...u,checks:[...u.checks??[],...c.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),a.clone=(c,s)=>ps(a,c,s),a.brand=()=>a,a.register=((c,s)=>(c.add(a,s),a)),a.parse=(c,s)=>Vz(a,c,s,{callee:a.parse}),a.safeParse=(c,s)=>Xz(a,c,s),a.parseAsync=async(c,s)=>Gz(a,c,s,{callee:a.parseAsync}),a.safeParseAsync=async(c,s)=>fT(a,c,s),a.spa=a.safeParseAsync,a.refine=(c,s)=>a.check(Z_(c,s)),a.superRefine=c=>a.check(q_(c)),a.overwrite=c=>a.check(Wp(c)),a.optional=()=>ET(a),a.nullable=()=>TT(a),a.nullish=()=>ET(TT(a)),a.nonoptional=c=>D_(a,c),a.array=()=>cd(a),a.or=c=>nl([a,c]),a.and=c=>E_(a,c),a.transform=c=>xT(a,O_(c)),a.default=c=>z_(a,c),a.prefault=c=>C_(a,c),a.catch=c=>N_(a,c),a.pipe=c=>xT(a,c),a.readonly=()=>H_(a),a.describe=c=>{const s=a.clone();return Fp.add(s,{description:c}),s},Object.defineProperty(a,"description",{get(){var c;return(c=Fp.get(a))==null?void 0:c.description},configurable:!0}),a.meta=(...c)=>{if(c.length===0)return Fp.get(a);const s=a.clone();return Fp.add(s,c[0]),s},a.isOptional=()=>a.safeParse(void 0).success,a.isNullable=()=>a.safeParse(null).success,a)),dT=ye("_ZodString",(a,u)=>{Db.init(a,u),En.init(a,u);const c=a._zod.bag;a.format=c.format??null,a.minLength=c.minimum??null,a.maxLength=c.maximum??null,a.regex=(...s)=>a.check(Ez(...s)),a.includes=(...s)=>a.check(xz(...s)),a.startsWith=(...s)=>a.check(Oz(...s)),a.endsWith=(...s)=>a.check(Rz(...s)),a.min=(...s)=>a.check(gv(...s)),a.max=(...s)=>a.check(oT(...s)),a.length=(...s)=>a.check(cT(...s)),a.nonempty=(...s)=>a.check(gv(1,...s)),a.lowercase=s=>a.check(Tz(s)),a.uppercase=s=>a.check(Az(s)),a.trim=()=>a.check(zz()),a.normalize=(...s)=>a.check(wz(...s)),a.toLowerCase=()=>a.check(_z()),a.toUpperCase=()=>a.check(Cz())}),Qz=ye("ZodString",(a,u)=>{Db.init(a,u),dT.init(a,u),a.email=c=>a.check(Gw(Iz,c)),a.url=c=>a.check($w(Jz,c)),a.jwt=c=>a.check(sz(c_,c)),a.emoji=c=>a.check(Kw($z,c)),a.guid=c=>a.check(lT(hT,c)),a.uuid=c=>a.check(Xw(bv,c)),a.uuidv4=c=>a.check(Qw(bv,c)),a.uuidv6=c=>a.check(Iw(bv,c)),a.uuidv7=c=>a.check(Jw(bv,c)),a.nanoid=c=>a.check(Pw(Kz,c)),a.guid=c=>a.check(lT(hT,c)),a.cuid=c=>a.check(Fw(Pz,c)),a.cuid2=c=>a.check(Ww(Fz,c)),a.ulid=c=>a.check(ez(Wz,c)),a.base64=c=>a.check(rz(u_,c)),a.base64url=c=>a.check(oz(r_,c)),a.xid=c=>a.check(tz(e_,c)),a.ksuid=c=>a.check(nz(t_,c)),a.ipv4=c=>a.check(az(n_,c)),a.ipv6=c=>a.check(lz(a_,c)),a.cidrv4=c=>a.check(iz(l_,c)),a.cidrv6=c=>a.check(uz(i_,c)),a.e164=c=>a.check(cz(o_,c)),a.datetime=c=>a.check(Hz(c)),a.date=c=>a.check(Bz(c)),a.time=c=>a.check(Zz(c)),a.duration=c=>a.check(Yz(c))});function Me(a){return Vw(Qz,a)}const Cn=ye("ZodStringFormat",(a,u)=>{Sn.init(a,u),dT.init(a,u)}),Iz=ye("ZodEmail",(a,u)=>{KR.init(a,u),Cn.init(a,u)}),hT=ye("ZodGUID",(a,u)=>{JR.init(a,u),Cn.init(a,u)}),bv=ye("ZodUUID",(a,u)=>{$R.init(a,u),Cn.init(a,u)}),Jz=ye("ZodURL",(a,u)=>{PR.init(a,u),Cn.init(a,u)}),$z=ye("ZodEmoji",(a,u)=>{FR.init(a,u),Cn.init(a,u)}),Kz=ye("ZodNanoID",(a,u)=>{WR.init(a,u),Cn.init(a,u)}),Pz=ye("ZodCUID",(a,u)=>{ew.init(a,u),Cn.init(a,u)}),Fz=ye("ZodCUID2",(a,u)=>{tw.init(a,u),Cn.init(a,u)}),Wz=ye("ZodULID",(a,u)=>{nw.init(a,u),Cn.init(a,u)}),e_=ye("ZodXID",(a,u)=>{aw.init(a,u),Cn.init(a,u)}),t_=ye("ZodKSUID",(a,u)=>{lw.init(a,u),Cn.init(a,u)}),n_=ye("ZodIPv4",(a,u)=>{cw.init(a,u),Cn.init(a,u)}),a_=ye("ZodIPv6",(a,u)=>{sw.init(a,u),Cn.init(a,u)}),l_=ye("ZodCIDRv4",(a,u)=>{fw.init(a,u),Cn.init(a,u)}),i_=ye("ZodCIDRv6",(a,u)=>{dw.init(a,u),Cn.init(a,u)}),u_=ye("ZodBase64",(a,u)=>{hw.init(a,u),Cn.init(a,u)}),r_=ye("ZodBase64URL",(a,u)=>{mw.init(a,u),Cn.init(a,u)}),o_=ye("ZodE164",(a,u)=>{yw.init(a,u),Cn.init(a,u)}),c_=ye("ZodJWT",(a,u)=>{vw.init(a,u),Cn.init(a,u)}),pT=ye("ZodNumber",(a,u)=>{QE.init(a,u),En.init(a,u),a.gt=(s,h)=>a.check(uT(s,h)),a.gte=(s,h)=>a.check(kb(s,h)),a.min=(s,h)=>a.check(kb(s,h)),a.lt=(s,h)=>a.check(iT(s,h)),a.lte=(s,h)=>a.check(Nb(s,h)),a.max=(s,h)=>a.check(Nb(s,h)),a.int=s=>a.check(mT(s)),a.safe=s=>a.check(mT(s)),a.positive=s=>a.check(uT(0,s)),a.nonnegative=s=>a.check(kb(0,s)),a.negative=s=>a.check(iT(0,s)),a.nonpositive=s=>a.check(Nb(0,s)),a.multipleOf=(s,h)=>a.check(rT(s,h)),a.step=(s,h)=>a.check(rT(s,h)),a.finite=()=>a;const c=a._zod.bag;a.minValue=Math.max(c.minimum??Number.NEGATIVE_INFINITY,c.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,a.maxValue=Math.min(c.maximum??Number.POSITIVE_INFINITY,c.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,a.isInt=(c.format??"").includes("int")||Number.isSafeInteger(c.multipleOf??.5),a.isFinite=!0,a.format=c.format??null});function s_(a){return mz(pT,a)}const f_=ye("ZodNumberFormat",(a,u)=>{bw.init(a,u),pT.init(a,u)});function mT(a){return yz(f_,a)}const d_=ye("ZodBoolean",(a,u)=>{Sw.init(a,u),En.init(a,u)});function tl(a){return gz(d_,a)}const h_=ye("ZodNull",(a,u)=>{Ew.init(a,u),En.init(a,u)});function p_(a){return vz(h_,a)}const m_=ye("ZodUnknown",(a,u)=>{Tw.init(a,u),En.init(a,u)});function qu(){return bz(m_)}const y_=ye("ZodNever",(a,u)=>{Aw.init(a,u),En.init(a,u)});function yT(a){return Sz(y_,a)}const g_=ye("ZodArray",(a,u)=>{xw.init(a,u),En.init(a,u),a.element=u.element,a.min=(c,s)=>a.check(gv(c,s)),a.nonempty=c=>a.check(gv(1,c)),a.max=(c,s)=>a.check(oT(c,s)),a.length=(c,s)=>a.check(cT(c,s)),a.unwrap=()=>a.element});function cd(a,u){return Dz(g_,a,u)}const gT=ye("ZodObject",(a,u)=>{Ow.init(a,u),En.init(a,u),Xt(a,"shape",()=>u.shape),a.keyof=()=>bT(Object.keys(a._zod.def.shape)),a.catchall=c=>a.clone({...a._zod.def,catchall:c}),a.passthrough=()=>a.clone({...a._zod.def,catchall:qu()}),a.loose=()=>a.clone({...a._zod.def,catchall:qu()}),a.strict=()=>a.clone({...a._zod.def,catchall:yT()}),a.strip=()=>a.clone({...a._zod.def,catchall:void 0}),a.extend=c=>KO(a,c),a.merge=c=>PO(a,c),a.pick=c=>JO(a,c),a.omit=c=>$O(a,c),a.partial=(...c)=>FO(ST,a,c[0]),a.required=(...c)=>WO(AT,a,c[0])});function Ft(a,u){const c={type:"object",get shape(){return fv(this,"shape",{...a}),this.shape},...Ve(u)};return new gT(c)}function dn(a,u){return new gT({type:"object",get shape(){return fv(this,"shape",{...a}),this.shape},catchall:yT(),...Ve(u)})}const vT=ye("ZodUnion",(a,u)=>{KE.init(a,u),En.init(a,u),a.options=u.options});function nl(a,u){return new vT({type:"union",options:a,...Ve(u)})}const v_=ye("ZodDiscriminatedUnion",(a,u)=>{vT.init(a,u),Rw.init(a,u)});function b_(a,u,c){return new v_({type:"union",options:u,discriminator:a,...Ve(c)})}const S_=ye("ZodIntersection",(a,u)=>{ww.init(a,u),En.init(a,u)});function E_(a,u){return new S_({type:"intersection",left:a,right:u})}const T_=ye("ZodRecord",(a,u)=>{zw.init(a,u),En.init(a,u),a.keyType=u.keyType,a.valueType=u.valueType});function ys(a,u,c){return new T_({type:"record",keyType:a,valueType:u,...Ve(c)})}const Ub=ye("ZodEnum",(a,u)=>{_w.init(a,u),En.init(a,u),a.enum=u.entries,a.options=Object.values(u.entries);const c=new Set(Object.keys(u.entries));a.extract=(s,h)=>{const y={};for(const v of s)if(c.has(v))y[v]=u.entries[v];else throw new Error(`Key ${v} not found in enum`);return new Ub({...u,checks:[],...Ve(h),entries:y})},a.exclude=(s,h)=>{const y={...u.entries};for(const v of s)if(c.has(v))delete y[v];else throw new Error(`Key ${v} not found in enum`);return new Ub({...u,checks:[],...Ve(h),entries:y})}});function bT(a,u){const c=Array.isArray(a)?Object.fromEntries(a.map(s=>[s,s])):a;return new Ub({type:"enum",entries:c,...Ve(u)})}const A_=ye("ZodLiteral",(a,u)=>{Cw.init(a,u),En.init(a,u),a.values=new Set(u.values),Object.defineProperty(a,"value",{get(){if(u.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return u.values[0]}})});function We(a,u){return new A_({type:"literal",values:Array.isArray(a)?a:[a],...Ve(u)})}const x_=ye("ZodTransform",(a,u)=>{Dw.init(a,u),En.init(a,u),a._zod.parse=(c,s)=>{c.addIssue=y=>{if(typeof y=="string")c.issues.push(Pp(y,c.value,u));else{const v=y;v.fatal&&(v.continue=!1),v.code??(v.code="custom"),v.input??(v.input=c.value),v.inst??(v.inst=a),v.continue??(v.continue=!0),c.issues.push(Pp(v))}};const h=u.transform(c.value,c);return h instanceof Promise?h.then(y=>(c.value=y,c)):(c.value=h,c)}});function O_(a){return new x_({type:"transform",transform:a})}const ST=ye("ZodOptional",(a,u)=>{Mw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType});function ET(a){return new ST({type:"optional",innerType:a})}const R_=ye("ZodNullable",(a,u)=>{Nw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType});function TT(a){return new R_({type:"nullable",innerType:a})}const w_=ye("ZodDefault",(a,u)=>{kw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType,a.removeDefault=a.unwrap});function z_(a,u){return new w_({type:"default",innerType:a,get defaultValue(){return typeof u=="function"?u():u}})}const __=ye("ZodPrefault",(a,u)=>{Uw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType});function C_(a,u){return new __({type:"prefault",innerType:a,get defaultValue(){return typeof u=="function"?u():u}})}const AT=ye("ZodNonOptional",(a,u)=>{Hw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType});function D_(a,u){return new AT({type:"nonoptional",innerType:a,...Ve(u)})}const M_=ye("ZodCatch",(a,u)=>{jw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.innerType,a.removeCatch=a.unwrap});function N_(a,u){return new M_({type:"catch",innerType:a,catchValue:typeof u=="function"?u:()=>u})}const k_=ye("ZodPipe",(a,u)=>{Bw.init(a,u),En.init(a,u),a.in=u.in,a.out=u.out});function xT(a,u){return new k_({type:"pipe",in:a,out:u})}const U_=ye("ZodReadonly",(a,u)=>{Lw.init(a,u),En.init(a,u)});function H_(a){return new U_({type:"readonly",innerType:a})}const j_=ye("ZodLazy",(a,u)=>{Zw.init(a,u),En.init(a,u),a.unwrap=()=>a._zod.def.getter()});function B_(a){return new j_({type:"lazy",getter:a})}const Hb=ye("ZodCustom",(a,u)=>{qw.init(a,u),En.init(a,u)});function L_(a){const u=new bl({check:"custom"});return u._zod.check=a,u}function OT(a,u){return Mz(Hb,a??(()=>!0),u)}function Z_(a,u={}){return Nz(Hb,a,u)}function q_(a){const u=L_(c=>(c.addIssue=s=>{if(typeof s=="string")c.issues.push(Pp(s,c.value,u._zod.def));else{const h=s;h.fatal&&(h.continue=!1),h.code??(h.code="custom"),h.input??(h.input=c.value),h.inst??(h.inst=u),h.continue??(h.continue=!u._zod.def.abort),c.issues.push(Pp(h))}},a(c.value,c)));return u}function Sv(a,u={error:`Input not instance of ${a.name}`}){const c=new Hb({type:"custom",check:"custom",fn:s=>s instanceof a,abort:!0,...Ve(u)});return c._zod.bag.Class=a,c}var ht;(function(a){a.ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline",a.ZodReadonly="ZodReadonly"})(ht||(ht={}));class RT extends Error{constructor(u,c){super(u),this.name="ParseError",this.type=c.type,this.field=c.field,this.value=c.value,this.line=c.line}}const wT=10,Y_=13,gs=32;function jb(a){}function V_(a){if(typeof a=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:u=jb,onError:c=jb,onRetry:s=jb,onComment:h}=a,y=[];let v=!0,b,T="",E=0,O;function R(k){if(v&&(v=!1,k.charCodeAt(0)===239&&k.charCodeAt(1)===187&&k.charCodeAt(2)===191&&(k=k.slice(3))),y.length===0){const oe=z(k);oe!==""&&y.push(oe);return}if(k.indexOf(`
|
|
350
350
|
`)===-1&&k.indexOf("\r")===-1){y.push(k);return}y.push(k);const L=y.join("");y.length=0;const D=z(L);D!==""&&y.push(D)}function z(k){let L=0;if(k.indexOf("\r")===-1){let D=k.indexOf(`
|
|
351
351
|
`,L);for(;D!==-1;){if(L===D){E>0&&u({id:b,event:O,data:T}),b=void 0,T="",E=0,O=void 0,L=D+1,D=k.indexOf(`
|
|
352
352
|
`,L);continue}const oe=k.charCodeAt(L);if(zT(k,L,oe)){const ne=k.charCodeAt(L+5)===gs?L+6:L+5,Q=k.slice(ne,D);if(E===0&&k.charCodeAt(D+1)===wT){u({id:b,event:O,data:Q}),b=void 0,T="",O=void 0,L=D+2,D=k.indexOf(`
|
|
@@ -355,11 +355,11 @@ ${Q}`,E++}else _T(k,L,oe)?O=k.slice(k.charCodeAt(L+6)===gs?L+7:L+6,D)||void 0:_(
|
|
|
355
355
|
`,L)}return k.slice(L)}for(;L<k.length;){const D=k.indexOf("\r",L),oe=k.indexOf(`
|
|
356
356
|
`,L);let ne=-1;if(D!==-1&&oe!==-1?ne=D<oe?D:oe:D!==-1?D===k.length-1?ne=-1:ne=D:oe!==-1&&(ne=oe),ne===-1)break;_(k,L,ne),L=ne+1,k.charCodeAt(L-1)===Y_&&k.charCodeAt(L)===wT&&L++}return k.slice(L)}function _(k,L,D){if(L===D){le();return}const oe=k.charCodeAt(L);if(zT(k,L,oe)){const He=k.charCodeAt(L+5)===gs?L+6:L+5,be=k.slice(He,D);T=E===0?be:`${T}
|
|
357
357
|
${be}`,E++;return}if(_T(k,L,oe)){O=k.slice(k.charCodeAt(L+6)===gs?L+7:L+6,D)||void 0;return}if(oe===105&&k.charCodeAt(L+1)===100&&k.charCodeAt(L+2)===58){const He=k.slice(k.charCodeAt(L+3)===gs?L+4:L+3,D);b=He.includes("\0")?void 0:He;return}if(oe===58){if(h){const He=k.slice(L,D);h(He.slice(k.charCodeAt(L+1)===gs?2:1))}return}const ne=k.slice(L,D),Q=ne.indexOf(":");if(Q===-1){Y(ne,"",ne);return}const pe=ne.slice(0,Q),we=ne.charCodeAt(Q+1)===gs?2:1,Se=ne.slice(Q+we);Y(pe,Se,ne)}function Y(k,L,D){switch(k){case"event":O=L||void 0;break;case"data":T=E===0?L:`${T}
|
|
358
|
-
${L}`,E++;break;case"id":b=L.includes("\0")?void 0:L;break;case"retry":/^\d+$/.test(L)?s(parseInt(L,10)):c(new RT(`Invalid \`retry\` value: "${L}"`,{type:"invalid-retry",value:L,line:D}));break;default:c(new RT(`Unknown field "${k.length>20?`${k.slice(0,20)}…`:k}"`,{type:"unknown-field",field:k,value:L,line:D}));break}}function le(){E>0&&u({id:b,event:O,data:T}),b=void 0,T="",E=0,O=void 0}function X(k={}){if(k.consume&&y.length>0){const L=y.join("");_(L,0,L.length)}v=!0,b=void 0,T="",E=0,O=void 0,y.length=0}return{feed:R,reset:X}}function zT(a,u,c){return c===100&&a.charCodeAt(u+1)===97&&a.charCodeAt(u+2)===116&&a.charCodeAt(u+3)===97&&a.charCodeAt(u+4)===58}function _T(a,u,c){return c===101&&a.charCodeAt(u+1)===118&&a.charCodeAt(u+2)===101&&a.charCodeAt(u+3)===110&&a.charCodeAt(u+4)===116&&a.charCodeAt(u+5)===58}class G_ extends TransformStream{constructor({onError:u,onRetry:c,onComment:s}={}){let h;super({start(y){h=V_({onEvent:v=>{y.enqueue(v)},onError(v){u==="terminate"?y.error(v):typeof u=="function"&&u(v)},onRetry:c,onComment:s})},transform(y){h.feed(y)}})}}var em=({prefix:a,size:u=16,alphabet:c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:s="-"}={})=>{const h=()=>{const y=c.length,v=new Array(u);for(let b=0;b<u;b++)v[b]=c[Math.random()*y|0];return v.join("")};if(a==null)return h;if(c.includes(s))throw new LO({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${c}".`});return()=>`${a}${s}${h()}`},X_=em();function sd(a){if(a==null)return{};const u={};if(a instanceof Headers)a.forEach((c,s)=>{u[s.toLowerCase()]=c});else{Array.isArray(a)||(a=Object.entries(a));for(const[c,s]of a)s!=null&&(u[c.toLowerCase()]=s)}return u}var Q_=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,I_=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function CT(a){const u=JSON.parse(a);return u===null||typeof u!="object"||Q_.test(a)===!1&&I_.test(a)===!1?u:J_(u)}function J_(a){let u=[a];for(;u.length;){const c=u;u=[];for(const s of c){if(Object.prototype.hasOwnProperty.call(s,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const h in s){const y=s[h];y&&typeof y=="object"&&u.push(y)}}}return a}function $_(a){const{stackTraceLimit:u}=Error;try{Error.stackTraceLimit=0}catch{return CT(a)}try{return CT(a)}finally{Error.stackTraceLimit=u}}function Bb(a){if(a.type==="object"||Array.isArray(a.type)&&a.type.includes("object")){a.additionalProperties=!1;const{properties:c}=a;if(c!=null)for(const s of Object.keys(c))c[s]=vs(c[s])}a.items!=null&&(a.items=Array.isArray(a.items)?a.items.map(vs):vs(a.items)),a.anyOf!=null&&(a.anyOf=a.anyOf.map(vs)),a.allOf!=null&&(a.allOf=a.allOf.map(vs)),a.oneOf!=null&&(a.oneOf=a.oneOf.map(vs));const{definitions:u}=a;if(u!=null)for(const c of Object.keys(u))u[c]=vs(u[c]);return a}function vs(a){return typeof a=="boolean"?a:Bb(a)}var K_=Symbol("Let zodToJsonSchema decide on which parser to use"),DT={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},P_=a=>typeof a=="string"?{...DT,name:a}:{...DT,...a};function Gl(){return{}}function F_(a,u){var c,s,h;const y={type:"array"};return(c=a.type)!=null&&c._def&&((h=(s=a.type)==null?void 0:s._def)==null?void 0:h.typeName)!==pt.ZodAny&&(y.items=$t(a.type._def,{...u,currentPath:[...u.currentPath,"items"]})),a.minLength&&(y.minItems=a.minLength.value),a.maxLength&&(y.maxItems=a.maxLength.value),a.exactLength&&(y.minItems=a.exactLength.value,y.maxItems=a.exactLength.value),y}function W_(a){const u={type:"integer",format:"int64"};if(!a.checks)return u;for(const c of a.checks)switch(c.kind){case"min":c.inclusive?u.minimum=c.value:u.exclusiveMinimum=c.value;break;case"max":c.inclusive?u.maximum=c.value:u.exclusiveMaximum=c.value;break;case"multipleOf":u.multipleOf=c.value;break}return u}function eC(){return{type:"boolean"}}function MT(a,u){return $t(a.type._def,u)}var tC=(a,u)=>$t(a.innerType._def,u);function NT(a,u,c){const s=c??u.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((h,y)=>NT(a,u,h))};switch(s){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return nC(a)}}var nC=a=>{const u={type:"integer",format:"unix-time"};for(const c of a.checks)switch(c.kind){case"min":u.minimum=c.value;break;case"max":u.maximum=c.value;break}return u};function aC(a,u){return{...$t(a.innerType._def,u),default:a.defaultValue()}}function lC(a,u){return u.effectStrategy==="input"?$t(a.schema._def,u):Gl()}function iC(a){return{type:"string",enum:Array.from(a.values)}}var uC=a=>"type"in a&&a.type==="string"?!1:"allOf"in a;function rC(a,u){const c=[$t(a.left._def,{...u,currentPath:[...u.currentPath,"allOf","0"]}),$t(a.right._def,{...u,currentPath:[...u.currentPath,"allOf","1"]})].filter(h=>!!h),s=[];return c.forEach(h=>{if(uC(h))s.push(...h.allOf);else{let y=h;if("additionalProperties"in h&&h.additionalProperties===!1){const{additionalProperties:v,...b}=h;y=b}s.push(y)}}),s.length?{allOf:s}:void 0}function oC(a){const u=typeof a.value;return u!=="bigint"&&u!=="number"&&u!=="boolean"&&u!=="string"?{type:Array.isArray(a.value)?"array":"object"}:{type:u==="bigint"?"integer":u,const:a.value}}var Lb=void 0,iu={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Lb===void 0&&(Lb=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Lb),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function kT(a,u){const c={type:"string"};if(a.checks)for(const s of a.checks)switch(s.kind){case"min":c.minLength=typeof c.minLength=="number"?Math.max(c.minLength,s.value):s.value;break;case"max":c.maxLength=typeof c.maxLength=="number"?Math.min(c.maxLength,s.value):s.value;break;case"email":switch(u.emailStrategy){case"format:email":uu(c,"email",s.message,u);break;case"format:idn-email":uu(c,"idn-email",s.message,u);break;case"pattern:zod":al(c,iu.email,s.message,u);break}break;case"url":uu(c,"uri",s.message,u);break;case"uuid":uu(c,"uuid",s.message,u);break;case"regex":al(c,s.regex,s.message,u);break;case"cuid":al(c,iu.cuid,s.message,u);break;case"cuid2":al(c,iu.cuid2,s.message,u);break;case"startsWith":al(c,RegExp(`^${Zb(s.value,u)}`),s.message,u);break;case"endsWith":al(c,RegExp(`${Zb(s.value,u)}$`),s.message,u);break;case"datetime":uu(c,"date-time",s.message,u);break;case"date":uu(c,"date",s.message,u);break;case"time":uu(c,"time",s.message,u);break;case"duration":uu(c,"duration",s.message,u);break;case"length":c.minLength=typeof c.minLength=="number"?Math.max(c.minLength,s.value):s.value,c.maxLength=typeof c.maxLength=="number"?Math.min(c.maxLength,s.value):s.value;break;case"includes":{al(c,RegExp(Zb(s.value,u)),s.message,u);break}case"ip":{s.version!=="v6"&&uu(c,"ipv4",s.message,u),s.version!=="v4"&&uu(c,"ipv6",s.message,u);break}case"base64url":al(c,iu.base64url,s.message,u);break;case"jwt":al(c,iu.jwt,s.message,u);break;case"cidr":{s.version!=="v6"&&al(c,iu.ipv4Cidr,s.message,u),s.version!=="v4"&&al(c,iu.ipv6Cidr,s.message,u);break}case"emoji":al(c,iu.emoji(),s.message,u);break;case"ulid":{al(c,iu.ulid,s.message,u);break}case"base64":{switch(u.base64Strategy){case"format:binary":{uu(c,"binary",s.message,u);break}case"contentEncoding:base64":{c.contentEncoding="base64";break}case"pattern:zod":{al(c,iu.base64,s.message,u);break}}break}case"nanoid":al(c,iu.nanoid,s.message,u)}return c}function Zb(a,u){return u.patternStrategy==="escape"?sC(a):a}var cC=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function sC(a){let u="";for(let c=0;c<a.length;c++)cC.has(a[c])||(u+="\\"),u+=a[c];return u}function uu(a,u,c,s){var h;a.format||(h=a.anyOf)!=null&&h.some(y=>y.format)?(a.anyOf||(a.anyOf=[]),a.format&&(a.anyOf.push({format:a.format}),delete a.format),a.anyOf.push({format:u,...c&&s.errorMessages&&{errorMessage:{format:c}}})):a.format=u}function al(a,u,c,s){var h;a.pattern||(h=a.allOf)!=null&&h.some(y=>y.pattern)?(a.allOf||(a.allOf=[]),a.pattern&&(a.allOf.push({pattern:a.pattern}),delete a.pattern),a.allOf.push({pattern:UT(u,s),...c&&s.errorMessages&&{errorMessage:{pattern:c}}})):a.pattern=UT(u,s)}function UT(a,u){var c;if(!u.applyRegexFlags||!a.flags)return a.source;const s={i:a.flags.includes("i"),m:a.flags.includes("m"),s:a.flags.includes("s")},h=s.i?a.source.toLowerCase():a.source;let y="",v=!1,b=!1,T=!1;for(let E=0;E<h.length;E++){if(v){y+=h[E],v=!1;continue}if(s.i){if(b){if(h[E].match(/[a-z]/)){T?(y+=h[E],y+=`${h[E-2]}-${h[E]}`.toUpperCase(),T=!1):h[E+1]==="-"&&((c=h[E+2])!=null&&c.match(/[a-z]/))?(y+=h[E],T=!0):y+=`${h[E]}${h[E].toUpperCase()}`;continue}}else if(h[E].match(/[a-z]/)){y+=`[${h[E]}${h[E].toUpperCase()}]`;continue}}if(s.m){if(h[E]==="^"){y+=`(^|(?<=[\r
|
|
358
|
+
${L}`,E++;break;case"id":b=L.includes("\0")?void 0:L;break;case"retry":/^\d+$/.test(L)?s(parseInt(L,10)):c(new RT(`Invalid \`retry\` value: "${L}"`,{type:"invalid-retry",value:L,line:D}));break;default:c(new RT(`Unknown field "${k.length>20?`${k.slice(0,20)}…`:k}"`,{type:"unknown-field",field:k,value:L,line:D}));break}}function le(){E>0&&u({id:b,event:O,data:T}),b=void 0,T="",E=0,O=void 0}function X(k={}){if(k.consume&&y.length>0){const L=y.join("");_(L,0,L.length)}v=!0,b=void 0,T="",E=0,O=void 0,y.length=0}return{feed:R,reset:X}}function zT(a,u,c){return c===100&&a.charCodeAt(u+1)===97&&a.charCodeAt(u+2)===116&&a.charCodeAt(u+3)===97&&a.charCodeAt(u+4)===58}function _T(a,u,c){return c===101&&a.charCodeAt(u+1)===118&&a.charCodeAt(u+2)===101&&a.charCodeAt(u+3)===110&&a.charCodeAt(u+4)===116&&a.charCodeAt(u+5)===58}class G_ extends TransformStream{constructor({onError:u,onRetry:c,onComment:s}={}){let h;super({start(y){h=V_({onEvent:v=>{y.enqueue(v)},onError(v){u==="terminate"?y.error(v):typeof u=="function"&&u(v)},onRetry:c,onComment:s})},transform(y){h.feed(y)}})}}var em=({prefix:a,size:u=16,alphabet:c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:s="-"}={})=>{const h=()=>{const y=c.length,v=new Array(u);for(let b=0;b<u;b++)v[b]=c[Math.random()*y|0];return v.join("")};if(a==null)return h;if(c.includes(s))throw new LO({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${c}".`});return()=>`${a}${s}${h()}`},X_=em();function sd(a){if(a==null)return{};const u={};if(a instanceof Headers)a.forEach((c,s)=>{u[s.toLowerCase()]=c});else{Array.isArray(a)||(a=Object.entries(a));for(const[c,s]of a)s!=null&&(u[c.toLowerCase()]=s)}return u}var Q_=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,I_=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function CT(a){const u=JSON.parse(a);return u===null||typeof u!="object"||Q_.test(a)===!1&&I_.test(a)===!1?u:J_(u)}function J_(a){let u=[a];for(;u.length;){const c=u;u=[];for(const s of c){if(Object.prototype.hasOwnProperty.call(s,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const h in s){const y=s[h];y&&typeof y=="object"&&u.push(y)}}}return a}function $_(a){const{stackTraceLimit:u}=Error;try{Error.stackTraceLimit=0}catch{return CT(a)}try{return CT(a)}finally{Error.stackTraceLimit=u}}function Bb(a){if(a.type==="object"||Array.isArray(a.type)&&a.type.includes("object")){a.additionalProperties=!1;const{properties:c}=a;if(c!=null)for(const s of Object.keys(c))c[s]=vs(c[s])}a.items!=null&&(a.items=Array.isArray(a.items)?a.items.map(vs):vs(a.items)),a.anyOf!=null&&(a.anyOf=a.anyOf.map(vs)),a.allOf!=null&&(a.allOf=a.allOf.map(vs)),a.oneOf!=null&&(a.oneOf=a.oneOf.map(vs));const{definitions:u}=a;if(u!=null)for(const c of Object.keys(u))u[c]=vs(u[c]);return a}function vs(a){return typeof a=="boolean"?a:Bb(a)}var K_=Symbol("Let zodToJsonSchema decide on which parser to use"),DT={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},P_=a=>typeof a=="string"?{...DT,name:a}:{...DT,...a};function Gl(){return{}}function F_(a,u){var c,s,h;const y={type:"array"};return(c=a.type)!=null&&c._def&&((h=(s=a.type)==null?void 0:s._def)==null?void 0:h.typeName)!==ht.ZodAny&&(y.items=$t(a.type._def,{...u,currentPath:[...u.currentPath,"items"]})),a.minLength&&(y.minItems=a.minLength.value),a.maxLength&&(y.maxItems=a.maxLength.value),a.exactLength&&(y.minItems=a.exactLength.value,y.maxItems=a.exactLength.value),y}function W_(a){const u={type:"integer",format:"int64"};if(!a.checks)return u;for(const c of a.checks)switch(c.kind){case"min":c.inclusive?u.minimum=c.value:u.exclusiveMinimum=c.value;break;case"max":c.inclusive?u.maximum=c.value:u.exclusiveMaximum=c.value;break;case"multipleOf":u.multipleOf=c.value;break}return u}function eC(){return{type:"boolean"}}function MT(a,u){return $t(a.type._def,u)}var tC=(a,u)=>$t(a.innerType._def,u);function NT(a,u,c){const s=c??u.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((h,y)=>NT(a,u,h))};switch(s){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return nC(a)}}var nC=a=>{const u={type:"integer",format:"unix-time"};for(const c of a.checks)switch(c.kind){case"min":u.minimum=c.value;break;case"max":u.maximum=c.value;break}return u};function aC(a,u){return{...$t(a.innerType._def,u),default:a.defaultValue()}}function lC(a,u){return u.effectStrategy==="input"?$t(a.schema._def,u):Gl()}function iC(a){return{type:"string",enum:Array.from(a.values)}}var uC=a=>"type"in a&&a.type==="string"?!1:"allOf"in a;function rC(a,u){const c=[$t(a.left._def,{...u,currentPath:[...u.currentPath,"allOf","0"]}),$t(a.right._def,{...u,currentPath:[...u.currentPath,"allOf","1"]})].filter(h=>!!h),s=[];return c.forEach(h=>{if(uC(h))s.push(...h.allOf);else{let y=h;if("additionalProperties"in h&&h.additionalProperties===!1){const{additionalProperties:v,...b}=h;y=b}s.push(y)}}),s.length?{allOf:s}:void 0}function oC(a){const u=typeof a.value;return u!=="bigint"&&u!=="number"&&u!=="boolean"&&u!=="string"?{type:Array.isArray(a.value)?"array":"object"}:{type:u==="bigint"?"integer":u,const:a.value}}var Lb=void 0,iu={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Lb===void 0&&(Lb=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Lb),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function kT(a,u){const c={type:"string"};if(a.checks)for(const s of a.checks)switch(s.kind){case"min":c.minLength=typeof c.minLength=="number"?Math.max(c.minLength,s.value):s.value;break;case"max":c.maxLength=typeof c.maxLength=="number"?Math.min(c.maxLength,s.value):s.value;break;case"email":switch(u.emailStrategy){case"format:email":uu(c,"email",s.message,u);break;case"format:idn-email":uu(c,"idn-email",s.message,u);break;case"pattern:zod":al(c,iu.email,s.message,u);break}break;case"url":uu(c,"uri",s.message,u);break;case"uuid":uu(c,"uuid",s.message,u);break;case"regex":al(c,s.regex,s.message,u);break;case"cuid":al(c,iu.cuid,s.message,u);break;case"cuid2":al(c,iu.cuid2,s.message,u);break;case"startsWith":al(c,RegExp(`^${Zb(s.value,u)}`),s.message,u);break;case"endsWith":al(c,RegExp(`${Zb(s.value,u)}$`),s.message,u);break;case"datetime":uu(c,"date-time",s.message,u);break;case"date":uu(c,"date",s.message,u);break;case"time":uu(c,"time",s.message,u);break;case"duration":uu(c,"duration",s.message,u);break;case"length":c.minLength=typeof c.minLength=="number"?Math.max(c.minLength,s.value):s.value,c.maxLength=typeof c.maxLength=="number"?Math.min(c.maxLength,s.value):s.value;break;case"includes":{al(c,RegExp(Zb(s.value,u)),s.message,u);break}case"ip":{s.version!=="v6"&&uu(c,"ipv4",s.message,u),s.version!=="v4"&&uu(c,"ipv6",s.message,u);break}case"base64url":al(c,iu.base64url,s.message,u);break;case"jwt":al(c,iu.jwt,s.message,u);break;case"cidr":{s.version!=="v6"&&al(c,iu.ipv4Cidr,s.message,u),s.version!=="v4"&&al(c,iu.ipv6Cidr,s.message,u);break}case"emoji":al(c,iu.emoji(),s.message,u);break;case"ulid":{al(c,iu.ulid,s.message,u);break}case"base64":{switch(u.base64Strategy){case"format:binary":{uu(c,"binary",s.message,u);break}case"contentEncoding:base64":{c.contentEncoding="base64";break}case"pattern:zod":{al(c,iu.base64,s.message,u);break}}break}case"nanoid":al(c,iu.nanoid,s.message,u)}return c}function Zb(a,u){return u.patternStrategy==="escape"?sC(a):a}var cC=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function sC(a){let u="";for(let c=0;c<a.length;c++)cC.has(a[c])||(u+="\\"),u+=a[c];return u}function uu(a,u,c,s){var h;a.format||(h=a.anyOf)!=null&&h.some(y=>y.format)?(a.anyOf||(a.anyOf=[]),a.format&&(a.anyOf.push({format:a.format}),delete a.format),a.anyOf.push({format:u,...c&&s.errorMessages&&{errorMessage:{format:c}}})):a.format=u}function al(a,u,c,s){var h;a.pattern||(h=a.allOf)!=null&&h.some(y=>y.pattern)?(a.allOf||(a.allOf=[]),a.pattern&&(a.allOf.push({pattern:a.pattern}),delete a.pattern),a.allOf.push({pattern:UT(u,s),...c&&s.errorMessages&&{errorMessage:{pattern:c}}})):a.pattern=UT(u,s)}function UT(a,u){var c;if(!u.applyRegexFlags||!a.flags)return a.source;const s={i:a.flags.includes("i"),m:a.flags.includes("m"),s:a.flags.includes("s")},h=s.i?a.source.toLowerCase():a.source;let y="",v=!1,b=!1,T=!1;for(let E=0;E<h.length;E++){if(v){y+=h[E],v=!1;continue}if(s.i){if(b){if(h[E].match(/[a-z]/)){T?(y+=h[E],y+=`${h[E-2]}-${h[E]}`.toUpperCase(),T=!1):h[E+1]==="-"&&((c=h[E+2])!=null&&c.match(/[a-z]/))?(y+=h[E],T=!0):y+=`${h[E]}${h[E].toUpperCase()}`;continue}}else if(h[E].match(/[a-z]/)){y+=`[${h[E]}${h[E].toUpperCase()}]`;continue}}if(s.m){if(h[E]==="^"){y+=`(^|(?<=[\r
|
|
359
359
|
]))`;continue}else if(h[E]==="$"){y+=`($|(?=[\r
|
|
360
360
|
]))`;continue}}if(s.s&&h[E]==="."){y+=b?`${h[E]}\r
|
|
361
361
|
`:`[${h[E]}\r
|
|
362
|
-
]`;continue}y+=h[E],h[E]==="\\"?v=!0:b&&h[E]==="]"?b=!1:!b&&h[E]==="["&&(b=!0)}try{new RegExp(y)}catch{return console.warn(`Could not convert regex pattern at ${u.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),a.source}return y}function HT(a,u){var c,s,h,y,v,b;const T={type:"object",additionalProperties:(c=$t(a.valueType._def,{...u,currentPath:[...u.currentPath,"additionalProperties"]}))!=null?c:u.allowedAdditionalProperties};if(((s=a.keyType)==null?void 0:s._def.typeName)===pt.ZodString&&((h=a.keyType._def.checks)!=null&&h.length)){const{type:E,...O}=kT(a.keyType._def,u);return{...T,propertyNames:O}}else{if(((y=a.keyType)==null?void 0:y._def.typeName)===pt.ZodEnum)return{...T,propertyNames:{enum:a.keyType._def.values}};if(((v=a.keyType)==null?void 0:v._def.typeName)===pt.ZodBranded&&a.keyType._def.type._def.typeName===pt.ZodString&&((b=a.keyType._def.type._def.checks)!=null&&b.length)){const{type:E,...O}=MT(a.keyType._def,u);return{...T,propertyNames:O}}}return T}function fC(a,u){if(u.mapStrategy==="record")return HT(a,u);const c=$t(a.keyType._def,{...u,currentPath:[...u.currentPath,"items","items","0"]})||Gl(),s=$t(a.valueType._def,{...u,currentPath:[...u.currentPath,"items","items","1"]})||Gl();return{type:"array",maxItems:125,items:{type:"array",items:[c,s],minItems:2,maxItems:2}}}function dC(a){const u=a.values,s=Object.keys(a.values).filter(y=>typeof u[u[y]]!="number").map(y=>u[y]),h=Array.from(new Set(s.map(y=>typeof y)));return{type:h.length===1?h[0]==="string"?"string":"number":["string","number"],enum:s}}function hC(){return{not:Gl()}}function pC(){return{type:"null"}}var qb={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function mC(a,u){const c=a.options instanceof Map?Array.from(a.options.values()):a.options;if(c.every(s=>s._def.typeName in qb&&(!s._def.checks||!s._def.checks.length))){const s=c.reduce((h,y)=>{const v=qb[y._def.typeName];return v&&!h.includes(v)?[...h,v]:h},[]);return{type:s.length>1?s:s[0]}}else if(c.every(s=>s._def.typeName==="ZodLiteral"&&!s.description)){const s=c.reduce((h,y)=>{const v=typeof y._def.value;switch(v){case"string":case"number":case"boolean":return[...h,v];case"bigint":return[...h,"integer"];case"object":if(y._def.value===null)return[...h,"null"];case"symbol":case"undefined":case"function":default:return h}},[]);if(s.length===c.length){const h=s.filter((y,v,b)=>b.indexOf(y)===v);return{type:h.length>1?h:h[0],enum:c.reduce((y,v)=>y.includes(v._def.value)?y:[...y,v._def.value],[])}}}else if(c.every(s=>s._def.typeName==="ZodEnum"))return{type:"string",enum:c.reduce((s,h)=>[...s,...h._def.values.filter(y=>!s.includes(y))],[])};return yC(a,u)}var yC=(a,u)=>{const c=(a.options instanceof Map?Array.from(a.options.values()):a.options).map((s,h)=>$t(s._def,{...u,currentPath:[...u.currentPath,"anyOf",`${h}`]})).filter(s=>!!s&&(!u.strictUnions||typeof s=="object"&&Object.keys(s).length>0));return c.length?{anyOf:c}:void 0};function gC(a,u){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(a.innerType._def.typeName)&&(!a.innerType._def.checks||!a.innerType._def.checks.length))return{type:[qb[a.innerType._def.typeName],"null"]};const c=$t(a.innerType._def,{...u,currentPath:[...u.currentPath,"anyOf","0"]});return c&&{anyOf:[c,{type:"null"}]}}function vC(a){const u={type:"number"};if(!a.checks)return u;for(const c of a.checks)switch(c.kind){case"int":u.type="integer";break;case"min":c.inclusive?u.minimum=c.value:u.exclusiveMinimum=c.value;break;case"max":c.inclusive?u.maximum=c.value:u.exclusiveMaximum=c.value;break;case"multipleOf":u.multipleOf=c.value;break}return u}function bC(a,u){const c={type:"object",properties:{}},s=[],h=a.shape();for(const v in h){let b=h[v];if(b===void 0||b._def===void 0)continue;const T=EC(b),E=$t(b._def,{...u,currentPath:[...u.currentPath,"properties",v],propertyPath:[...u.currentPath,"properties",v]});E!==void 0&&(c.properties[v]=E,T||s.push(v))}s.length&&(c.required=s);const y=SC(a,u);return y!==void 0&&(c.additionalProperties=y),c}function SC(a,u){if(a.catchall._def.typeName!=="ZodNever")return $t(a.catchall._def,{...u,currentPath:[...u.currentPath,"additionalProperties"]});switch(a.unknownKeys){case"passthrough":return u.allowedAdditionalProperties;case"strict":return u.rejectedAdditionalProperties;case"strip":return u.removeAdditionalStrategy==="strict"?u.allowedAdditionalProperties:u.rejectedAdditionalProperties}}function EC(a){try{return a.isOptional()}catch{return!0}}var TC=(a,u)=>{var c;if(u.currentPath.toString()===((c=u.propertyPath)==null?void 0:c.toString()))return $t(a.innerType._def,u);const s=$t(a.innerType._def,{...u,currentPath:[...u.currentPath,"anyOf","1"]});return s?{anyOf:[{not:Gl()},s]}:Gl()},AC=(a,u)=>{if(u.pipeStrategy==="input")return $t(a.in._def,u);if(u.pipeStrategy==="output")return $t(a.out._def,u);const c=$t(a.in._def,{...u,currentPath:[...u.currentPath,"allOf","0"]}),s=$t(a.out._def,{...u,currentPath:[...u.currentPath,"allOf",c?"1":"0"]});return{allOf:[c,s].filter(h=>h!==void 0)}};function xC(a,u){return $t(a.type._def,u)}function OC(a,u){const s={type:"array",uniqueItems:!0,items:$t(a.valueType._def,{...u,currentPath:[...u.currentPath,"items"]})};return a.minSize&&(s.minItems=a.minSize.value),a.maxSize&&(s.maxItems=a.maxSize.value),s}function RC(a,u){return a.rest?{type:"array",minItems:a.items.length,items:a.items.map((c,s)=>$t(c._def,{...u,currentPath:[...u.currentPath,"items",`${s}`]})).reduce((c,s)=>s===void 0?c:[...c,s],[]),additionalItems:$t(a.rest._def,{...u,currentPath:[...u.currentPath,"additionalItems"]})}:{type:"array",minItems:a.items.length,maxItems:a.items.length,items:a.items.map((c,s)=>$t(c._def,{...u,currentPath:[...u.currentPath,"items",`${s}`]})).reduce((c,s)=>s===void 0?c:[...c,s],[])}}function wC(){return{not:Gl()}}function zC(){return Gl()}var _C=(a,u)=>$t(a.innerType._def,u),CC=(a,u,c)=>{switch(u){case pt.ZodString:return kT(a,c);case pt.ZodNumber:return vC(a);case pt.ZodObject:return bC(a,c);case pt.ZodBigInt:return W_(a);case pt.ZodBoolean:return eC();case pt.ZodDate:return NT(a,c);case pt.ZodUndefined:return wC();case pt.ZodNull:return pC();case pt.ZodArray:return F_(a,c);case pt.ZodUnion:case pt.ZodDiscriminatedUnion:return mC(a,c);case pt.ZodIntersection:return rC(a,c);case pt.ZodTuple:return RC(a,c);case pt.ZodRecord:return HT(a,c);case pt.ZodLiteral:return oC(a);case pt.ZodEnum:return iC(a);case pt.ZodNativeEnum:return dC(a);case pt.ZodNullable:return gC(a,c);case pt.ZodOptional:return TC(a,c);case pt.ZodMap:return fC(a,c);case pt.ZodSet:return OC(a,c);case pt.ZodLazy:return()=>a.getter()._def;case pt.ZodPromise:return xC(a,c);case pt.ZodNaN:case pt.ZodNever:return hC();case pt.ZodEffects:return lC(a,c);case pt.ZodAny:return Gl();case pt.ZodUnknown:return zC();case pt.ZodDefault:return aC(a,c);case pt.ZodBranded:return MT(a,c);case pt.ZodReadonly:return _C(a,c);case pt.ZodCatch:return tC(a,c);case pt.ZodPipeline:return AC(a,c);case pt.ZodFunction:case pt.ZodVoid:case pt.ZodSymbol:return;default:return(s=>{})()}},DC=(a,u)=>{let c=0;for(;c<a.length&&c<u.length&&a[c]===u[c];c++);return[(a.length-c).toString(),...u.slice(c)].join("/")};function $t(a,u,c=!1){var s;const h=u.seen.get(a);if(u.override){const T=(s=u.override)==null?void 0:s.call(u,a,u,h,c);if(T!==K_)return T}if(h&&!c){const T=MC(h,u);if(T!==void 0)return T}const y={def:a,path:u.currentPath,jsonSchema:void 0};u.seen.set(a,y);const v=CC(a,a.typeName,u),b=typeof v=="function"?$t(v(),u):v;if(b&&NC(a,u,b),u.postProcess){const T=u.postProcess(b,a,u);return y.jsonSchema=b,T}return y.jsonSchema=b,b}var MC=(a,u)=>{switch(u.$refStrategy){case"root":return{$ref:a.path.join("/")};case"relative":return{$ref:DC(u.currentPath,a.path)};case"none":case"seen":return a.path.length<u.currentPath.length&&a.path.every((c,s)=>u.currentPath[s]===c)?(console.warn(`Recursive reference detected at ${u.currentPath.join("/")}! Defaulting to any`),Gl()):u.$refStrategy==="seen"?Gl():void 0}},NC=(a,u,c)=>(a.description&&(c.description=a.description),c),kC=a=>{const u=P_(a),c=u.name!==void 0?[...u.basePath,u.definitionPath,u.name]:u.basePath;return{...u,currentPath:c,propertyPath:void 0,seen:new Map(Object.entries(u.definitions).map(([s,h])=>[h._def,{def:h._def,path:[...u.basePath,u.definitionPath,s],jsonSchema:void 0}]))}},UC=(a,u)=>{var c;const s=kC(u);let h=typeof u=="object"&&u.definitions?Object.entries(u.definitions).reduce((E,[O,R])=>{var z;return{...E,[O]:(z=$t(R._def,{...s,currentPath:[...s.basePath,s.definitionPath,O]},!0))!=null?z:Gl()}},{}):void 0;const y=typeof u=="string"?u:(u==null?void 0:u.nameStrategy)==="title"||u==null?void 0:u.name,v=(c=$t(a._def,y===void 0?s:{...s,currentPath:[...s.basePath,s.definitionPath,y]},!1))!=null?c:Gl(),b=typeof u=="object"&&u.name!==void 0&&u.nameStrategy==="title"?u.name:void 0;b!==void 0&&(v.title=b);const T=y===void 0?h?{...v,[s.definitionPath]:h}:v:{$ref:[...s.$refStrategy==="relative"?[]:s.basePath,s.definitionPath,y].join("/"),[s.definitionPath]:{...h,[y]:v}};return T.$schema="http://json-schema.org/draft-07/schema#",T},Yb=Symbol.for("vercel.ai.schema");function HC(a){let u;return()=>(u==null&&(u=a()),u)}function Ev(a,{validate:u}={}){return{[Yb]:!0,_type:void 0,get jsonSchema(){return typeof a=="function"&&(a=a()),a},validate:u}}function jC(a){return typeof a=="object"&&a!==null&&Yb in a&&a[Yb]===!0&&"jsonSchema"in a&&"validate"in a}function Vb(a){return a==null?Ev({properties:{},additionalProperties:!1}):jC(a)?a:"~standard"in a?a["~standard"].vendor==="zod"?jT(a):BC(a):a()}function BC(a){return Ev(()=>Bb(a["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async u=>{const c=await a["~standard"].validate(u);return"value"in c?{success:!0,value:c.value}:{success:!1,error:new od({value:u,cause:c.issues})}}})}function LC(a,u){var c;const s=(c=void 0)!=null?c:!1;return Ev(()=>UC(a,{$refStrategy:s?"root":"none"}),{validate:async h=>{const y=await a.safeParseAsync(h);return y.success?{success:!0,value:y.data}:{success:!1,error:y.error}}})}function ZC(a,u){var c;const s=(c=void 0)!=null?c:!1;return Ev(()=>Bb(kz(a,{target:"draft-7",io:"input",reused:s?"ref":"inline"})),{validate:async h=>{const y=await fT(a,h);return y.success?{success:!0,value:y.data}:{success:!1,error:y.error}}})}function qC(a){return"_zod"in a}function jT(a,u){return qC(a)?ZC(a):LC(a)}async function BT({value:a,schema:u,context:c}){const s=await tm({value:a,schema:u,context:c});if(!s.success)throw od.wrap({value:a,cause:s.error,context:c});return s.value}async function tm({value:a,schema:u,context:c}){const s=Vb(u);try{if(s.validate==null)return{success:!0,value:a,rawValue:a};const h=await s.validate(a);return h.success?{success:!0,value:h.value,rawValue:a}:{success:!1,error:od.wrap({value:a,cause:h.error,context:c}),rawValue:a}}catch(h){return{success:!1,error:od.wrap({value:a,cause:h,context:c}),rawValue:a}}}async function bs({text:a,schema:u}){try{const c=$_(a);return u==null?{success:!0,value:c,rawValue:c}:await tm({value:c,schema:u})}catch(c){return{success:!1,error:OE.isInstance(c)?c:new OE({text:a,cause:c}),rawValue:void 0}}}function YC({stream:a,schema:u}){return a.pipeThrough(new TextDecoderStream).pipeThrough(new G_).pipeThrough(new TransformStream({async transform({data:c},s){c!=="[DONE]"&&s.enqueue(await bs({text:c,schema:u}))}}))}async function Jo(a){return typeof a=="function"&&(a=a()),Promise.resolve(a)}var VC=Object.defineProperty,GC=(a,u)=>{for(var c in u)VC(a,c,{get:u[c],enumerable:!0})},LT="AI_NoObjectGeneratedError",ZT=`vercel.ai.error.${LT}`,XC=Symbol.for(ZT),qT,$o=class extends Zu{constructor({message:a="No object generated.",cause:u,text:c,response:s,usage:h,finishReason:y}){super({name:LT,message:a,cause:u}),this[qT]=!0,this.text=c,this.response=s,this.usage=h,this.finishReason=y}static isInstance(a){return Zu.hasMarker(a,ZT)}};qT=XC;var YT="AI_UIMessageStreamError",VT=`vercel.ai.error.${YT}`,QC=Symbol.for(VT),GT,fd=class extends Zu{constructor({chunkType:a,chunkId:u,message:c}){super({name:YT,message:c}),this[GT]=!0,this.chunkType=a,this.chunkId=u}static isInstance(a){return Zu.hasMarker(a,VT)}};GT=QC;var XT=nl([Me(),Sv(Uint8Array),Sv(ArrayBuffer),OT(a=>{var u,c;return(c=(u=globalThis.Buffer)==null?void 0:u.isBuffer(a))!=null?c:!1},{message:"Must be a Buffer"})]),Ss=B_(()=>nl([p_(),Me(),s_(),tl(),ys(Me(),Ss.optional()),cd(Ss)])),wt=ys(Me(),ys(Me(),Ss.optional())),QT=Ft({type:We("text"),text:Me(),providerOptions:wt.optional()}),IC=Ft({type:We("image"),image:nl([XT,Sv(URL)]),mediaType:Me().optional(),providerOptions:wt.optional()}),IT=Ft({type:We("file"),data:nl([XT,Sv(URL)]),filename:Me().optional(),mediaType:Me(),providerOptions:wt.optional()}),JC=Ft({type:We("reasoning"),text:Me(),providerOptions:wt.optional()}),$C=Ft({type:We("tool-call"),toolCallId:Me(),toolName:Me(),input:qu(),providerOptions:wt.optional(),providerExecuted:tl().optional()}),KC=b_("type",[Ft({type:We("text"),value:Me(),providerOptions:wt.optional()}),Ft({type:We("json"),value:Ss,providerOptions:wt.optional()}),Ft({type:We("execution-denied"),reason:Me().optional(),providerOptions:wt.optional()}),Ft({type:We("error-text"),value:Me(),providerOptions:wt.optional()}),Ft({type:We("error-json"),value:Ss,providerOptions:wt.optional()}),Ft({type:We("content"),value:cd(nl([Ft({type:We("text"),text:Me(),providerOptions:wt.optional()}),Ft({type:We("media"),data:Me(),mediaType:Me()}),Ft({type:We("file-data"),data:Me(),mediaType:Me(),filename:Me().optional(),providerOptions:wt.optional()}),Ft({type:We("file-url"),url:Me(),providerOptions:wt.optional()}),Ft({type:We("file-id"),fileId:nl([Me(),ys(Me(),Me())]),providerOptions:wt.optional()}),Ft({type:We("image-data"),data:Me(),mediaType:Me(),providerOptions:wt.optional()}),Ft({type:We("image-url"),url:Me(),providerOptions:wt.optional()}),Ft({type:We("image-file-id"),fileId:nl([Me(),ys(Me(),Me())]),providerOptions:wt.optional()}),Ft({type:We("custom"),providerOptions:wt.optional()})]))})]),JT=Ft({type:We("tool-result"),toolCallId:Me(),toolName:Me(),output:KC,providerOptions:wt.optional()}),PC=Ft({type:We("tool-approval-request"),approvalId:Me(),toolCallId:Me()}),FC=Ft({type:We("tool-approval-response"),approvalId:Me(),approved:tl(),reason:Me().optional()}),WC=Ft({role:We("system"),content:Me(),providerOptions:wt.optional()}),eD=Ft({role:We("user"),content:nl([Me(),cd(nl([QT,IC,IT]))]),providerOptions:wt.optional()}),tD=Ft({role:We("assistant"),content:nl([Me(),cd(nl([QT,IT,JC,$C,JT,PC]))]),providerOptions:wt.optional()}),nD=Ft({role:We("tool"),content:cd(nl([JT,FC])),providerOptions:wt.optional()});nl([WC,eD,tD,nD]);function $T(a,u){if(a===void 0&&u===void 0)return;if(a===void 0)return u;if(u===void 0)return a;const c={...a};for(const s in u)if(!(s==="__proto__"||s==="constructor"||s==="prototype")&&Object.prototype.hasOwnProperty.call(u,s)){const h=u[s];if(h===void 0)continue;const y=s in a?a[s]:void 0,v=h!==null&&typeof h=="object"&&!Array.isArray(h)&&!(h instanceof Date)&&!(h instanceof RegExp),b=y!=null&&typeof y=="object"&&!Array.isArray(y)&&!(y instanceof Date)&&!(y instanceof RegExp);v&&b?c[s]=$T(y,h):c[s]=h}return c}var aD={};GC(aD,{array:()=>rD,choice:()=>oD,json:()=>cD,object:()=>uD,text:()=>iD});function lD(a){const u=["ROOT"];let c=-1,s=null;function h(T,E,O){switch(T){case'"':{c=E,u.pop(),u.push(O),u.push("INSIDE_STRING");break}case"f":case"t":case"n":{c=E,s=E,u.pop(),u.push(O),u.push("INSIDE_LITERAL");break}case"-":{u.pop(),u.push(O),u.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{c=E,u.pop(),u.push(O),u.push("INSIDE_NUMBER");break}case"{":{c=E,u.pop(),u.push(O),u.push("INSIDE_OBJECT_START");break}case"[":{c=E,u.pop(),u.push(O),u.push("INSIDE_ARRAY_START");break}}}function y(T,E){switch(T){case",":{u.pop(),u.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{c=E,u.pop();break}}}function v(T,E){switch(T){case",":{u.pop(),u.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{c=E,u.pop();break}}}for(let T=0;T<a.length;T++){const E=a[T];switch(u[u.length-1]){case"ROOT":h(E,T,"FINISH");break;case"INSIDE_OBJECT_START":{switch(E){case'"':{u.pop(),u.push("INSIDE_OBJECT_KEY");break}case"}":{c=T,u.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(E){case'"':{u.pop(),u.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(E){case'"':{u.pop(),u.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(E){case":":{u.pop(),u.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{h(E,T,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{y(E,T);break}case"INSIDE_STRING":{switch(E){case'"':{u.pop(),c=T;break}case"\\":{u.push("INSIDE_STRING_ESCAPE");break}default:c=T}break}case"INSIDE_ARRAY_START":{switch(E){case"]":{c=T,u.pop();break}default:{c=T,h(E,T,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(E){case",":{u.pop(),u.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{c=T,u.pop();break}default:{c=T;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{h(E,T,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{u.pop(),c=T;break}case"INSIDE_NUMBER":{switch(E){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{c=T;break}case"e":case"E":case"-":case".":break;case",":{u.pop(),u[u.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&v(E,T),u[u.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&y(E,T);break}case"}":{u.pop(),u[u.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&y(E,T);break}case"]":{u.pop(),u[u.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&v(E,T);break}default:{u.pop();break}}break}case"INSIDE_LITERAL":{const R=a.substring(s,T+1);!"false".startsWith(R)&&!"true".startsWith(R)&&!"null".startsWith(R)?(u.pop(),u[u.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?y(E,T):u[u.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&v(E,T)):c=T;break}}}let b=a.slice(0,c+1);for(let T=u.length-1;T>=0;T--)switch(u[T]){case"INSIDE_STRING":{b+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{b+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{b+="]";break}case"INSIDE_LITERAL":{const O=a.substring(s,a.length);"true".startsWith(O)?b+="true".slice(O.length):"false".startsWith(O)?b+="false".slice(O.length):"null".startsWith(O)&&(b+="null".slice(O.length))}}return b}async function nm(a){if(a===void 0)return{value:void 0,state:"undefined-input"};let u=await bs({text:a});return u.success?{value:u.value,state:"successful-parse"}:(u=await bs({text:lD(a)}),u.success?{value:u.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var iD=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:a}){return a},async parsePartialOutput({text:a}){return{partial:a}},createElementStreamTransform(){}}),uD=({schema:a,name:u,description:c})=>{const s=Vb(a);return{name:"object",responseFormat:Jo(s.jsonSchema).then(h=>({type:"json",schema:h,...u!=null&&{name:u},...c!=null&&{description:c}})),async parseCompleteOutput({text:h},y){const v=await bs({text:h});if(!v.success)throw new $o({message:"No object generated: could not parse the response.",cause:v.error,text:h,response:y.response,usage:y.usage,finishReason:y.finishReason});const b=await tm({value:v.value,schema:s});if(!b.success)throw new $o({message:"No object generated: response did not match schema.",cause:b.error,text:h,response:y.response,usage:y.usage,finishReason:y.finishReason});return b.value},async parsePartialOutput({text:h}){const y=await nm(h);switch(y.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:y.value}}},createElementStreamTransform(){}}},rD=({element:a,name:u,description:c})=>{const s=Vb(a);return{name:"array",responseFormat:Jo(s.jsonSchema).then(h=>{const{$schema:y,...v}=h;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:v}},required:["elements"],additionalProperties:!1},...u!=null&&{name:u},...c!=null&&{description:c}}}),async parseCompleteOutput({text:h},y){const v=await bs({text:h});if(!v.success)throw new $o({message:"No object generated: could not parse the response.",cause:v.error,text:h,response:y.response,usage:y.usage,finishReason:y.finishReason});const b=v.value;if(b==null||typeof b!="object"||!("elements"in b)||!Array.isArray(b.elements))throw new $o({message:"No object generated: response did not match schema.",cause:new od({value:b,cause:"response must be an object with an elements array"}),text:h,response:y.response,usage:y.usage,finishReason:y.finishReason});for(const T of b.elements){const E=await tm({value:T,schema:s});if(!E.success)throw new $o({message:"No object generated: response did not match schema.",cause:E.error,text:h,response:y.response,usage:y.usage,finishReason:y.finishReason})}return b.elements},async parsePartialOutput({text:h}){const y=await nm(h);switch(y.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const v=y.value;if(v==null||typeof v!="object"||!("elements"in v)||!Array.isArray(v.elements))return;const b=y.state==="repaired-parse"&&v.elements.length>0?v.elements.slice(0,-1):v.elements,T=[];for(const E of b){const O=await tm({value:E,schema:s});O.success&&T.push(O.value)}return{partial:T}}}},createElementStreamTransform(){let h=0;return new TransformStream({transform({partialOutput:y},v){if(y!=null)for(;h<y.length;h++)v.enqueue(y[h])}})}}},oD=({options:a,name:u,description:c})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:a}},required:["result"],additionalProperties:!1},...u!=null&&{name:u},...c!=null&&{description:c}}),async parseCompleteOutput({text:s},h){const y=await bs({text:s});if(!y.success)throw new $o({message:"No object generated: could not parse the response.",cause:y.error,text:s,response:h.response,usage:h.usage,finishReason:h.finishReason});const v=y.value;if(v==null||typeof v!="object"||!("result"in v)||typeof v.result!="string"||!a.includes(v.result))throw new $o({message:"No object generated: response did not match schema.",cause:new od({value:v,cause:"response must be an object that contains a choice value."}),text:s,response:h.response,usage:h.usage,finishReason:h.finishReason});return v.result},async parsePartialOutput({text:s}){const h=await nm(s);switch(h.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const y=h.value;if(y==null||typeof y!="object"||!("result"in y)||typeof y.result!="string")return;const v=a.filter(b=>b.startsWith(y.result));return h.state==="successful-parse"?v.includes(y.result)?{partial:y.result}:void 0:v.length===1?{partial:v[0]}:void 0}}},createElementStreamTransform(){}}),cD=({name:a,description:u}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...a!=null&&{name:a},...u!=null&&{description:u}}),async parseCompleteOutput({text:c},s){const h=await bs({text:c});if(!h.success)throw new $o({message:"No object generated: could not parse the response.",cause:h.error,text:c,response:s.response,usage:s.usage,finishReason:s.finishReason});return h.value},async parsePartialOutput({text:c}){const s=await nm(c);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return s.value===void 0?void 0:{partial:s.value}}},createElementStreamTransform(){}});em({prefix:"aitxt",size:24}),class extends TransformStream{constructor(){super({transform(a,u){u.enqueue(`data: ${JSON.stringify(a)}
|
|
362
|
+
]`;continue}y+=h[E],h[E]==="\\"?v=!0:b&&h[E]==="]"?b=!1:!b&&h[E]==="["&&(b=!0)}try{new RegExp(y)}catch{return console.warn(`Could not convert regex pattern at ${u.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),a.source}return y}function HT(a,u){var c,s,h,y,v,b;const T={type:"object",additionalProperties:(c=$t(a.valueType._def,{...u,currentPath:[...u.currentPath,"additionalProperties"]}))!=null?c:u.allowedAdditionalProperties};if(((s=a.keyType)==null?void 0:s._def.typeName)===ht.ZodString&&((h=a.keyType._def.checks)!=null&&h.length)){const{type:E,...O}=kT(a.keyType._def,u);return{...T,propertyNames:O}}else{if(((y=a.keyType)==null?void 0:y._def.typeName)===ht.ZodEnum)return{...T,propertyNames:{enum:a.keyType._def.values}};if(((v=a.keyType)==null?void 0:v._def.typeName)===ht.ZodBranded&&a.keyType._def.type._def.typeName===ht.ZodString&&((b=a.keyType._def.type._def.checks)!=null&&b.length)){const{type:E,...O}=MT(a.keyType._def,u);return{...T,propertyNames:O}}}return T}function fC(a,u){if(u.mapStrategy==="record")return HT(a,u);const c=$t(a.keyType._def,{...u,currentPath:[...u.currentPath,"items","items","0"]})||Gl(),s=$t(a.valueType._def,{...u,currentPath:[...u.currentPath,"items","items","1"]})||Gl();return{type:"array",maxItems:125,items:{type:"array",items:[c,s],minItems:2,maxItems:2}}}function dC(a){const u=a.values,s=Object.keys(a.values).filter(y=>typeof u[u[y]]!="number").map(y=>u[y]),h=Array.from(new Set(s.map(y=>typeof y)));return{type:h.length===1?h[0]==="string"?"string":"number":["string","number"],enum:s}}function hC(){return{not:Gl()}}function pC(){return{type:"null"}}var qb={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function mC(a,u){const c=a.options instanceof Map?Array.from(a.options.values()):a.options;if(c.every(s=>s._def.typeName in qb&&(!s._def.checks||!s._def.checks.length))){const s=c.reduce((h,y)=>{const v=qb[y._def.typeName];return v&&!h.includes(v)?[...h,v]:h},[]);return{type:s.length>1?s:s[0]}}else if(c.every(s=>s._def.typeName==="ZodLiteral"&&!s.description)){const s=c.reduce((h,y)=>{const v=typeof y._def.value;switch(v){case"string":case"number":case"boolean":return[...h,v];case"bigint":return[...h,"integer"];case"object":if(y._def.value===null)return[...h,"null"];case"symbol":case"undefined":case"function":default:return h}},[]);if(s.length===c.length){const h=s.filter((y,v,b)=>b.indexOf(y)===v);return{type:h.length>1?h:h[0],enum:c.reduce((y,v)=>y.includes(v._def.value)?y:[...y,v._def.value],[])}}}else if(c.every(s=>s._def.typeName==="ZodEnum"))return{type:"string",enum:c.reduce((s,h)=>[...s,...h._def.values.filter(y=>!s.includes(y))],[])};return yC(a,u)}var yC=(a,u)=>{const c=(a.options instanceof Map?Array.from(a.options.values()):a.options).map((s,h)=>$t(s._def,{...u,currentPath:[...u.currentPath,"anyOf",`${h}`]})).filter(s=>!!s&&(!u.strictUnions||typeof s=="object"&&Object.keys(s).length>0));return c.length?{anyOf:c}:void 0};function gC(a,u){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(a.innerType._def.typeName)&&(!a.innerType._def.checks||!a.innerType._def.checks.length))return{type:[qb[a.innerType._def.typeName],"null"]};const c=$t(a.innerType._def,{...u,currentPath:[...u.currentPath,"anyOf","0"]});return c&&{anyOf:[c,{type:"null"}]}}function vC(a){const u={type:"number"};if(!a.checks)return u;for(const c of a.checks)switch(c.kind){case"int":u.type="integer";break;case"min":c.inclusive?u.minimum=c.value:u.exclusiveMinimum=c.value;break;case"max":c.inclusive?u.maximum=c.value:u.exclusiveMaximum=c.value;break;case"multipleOf":u.multipleOf=c.value;break}return u}function bC(a,u){const c={type:"object",properties:{}},s=[],h=a.shape();for(const v in h){let b=h[v];if(b===void 0||b._def===void 0)continue;const T=EC(b),E=$t(b._def,{...u,currentPath:[...u.currentPath,"properties",v],propertyPath:[...u.currentPath,"properties",v]});E!==void 0&&(c.properties[v]=E,T||s.push(v))}s.length&&(c.required=s);const y=SC(a,u);return y!==void 0&&(c.additionalProperties=y),c}function SC(a,u){if(a.catchall._def.typeName!=="ZodNever")return $t(a.catchall._def,{...u,currentPath:[...u.currentPath,"additionalProperties"]});switch(a.unknownKeys){case"passthrough":return u.allowedAdditionalProperties;case"strict":return u.rejectedAdditionalProperties;case"strip":return u.removeAdditionalStrategy==="strict"?u.allowedAdditionalProperties:u.rejectedAdditionalProperties}}function EC(a){try{return a.isOptional()}catch{return!0}}var TC=(a,u)=>{var c;if(u.currentPath.toString()===((c=u.propertyPath)==null?void 0:c.toString()))return $t(a.innerType._def,u);const s=$t(a.innerType._def,{...u,currentPath:[...u.currentPath,"anyOf","1"]});return s?{anyOf:[{not:Gl()},s]}:Gl()},AC=(a,u)=>{if(u.pipeStrategy==="input")return $t(a.in._def,u);if(u.pipeStrategy==="output")return $t(a.out._def,u);const c=$t(a.in._def,{...u,currentPath:[...u.currentPath,"allOf","0"]}),s=$t(a.out._def,{...u,currentPath:[...u.currentPath,"allOf",c?"1":"0"]});return{allOf:[c,s].filter(h=>h!==void 0)}};function xC(a,u){return $t(a.type._def,u)}function OC(a,u){const s={type:"array",uniqueItems:!0,items:$t(a.valueType._def,{...u,currentPath:[...u.currentPath,"items"]})};return a.minSize&&(s.minItems=a.minSize.value),a.maxSize&&(s.maxItems=a.maxSize.value),s}function RC(a,u){return a.rest?{type:"array",minItems:a.items.length,items:a.items.map((c,s)=>$t(c._def,{...u,currentPath:[...u.currentPath,"items",`${s}`]})).reduce((c,s)=>s===void 0?c:[...c,s],[]),additionalItems:$t(a.rest._def,{...u,currentPath:[...u.currentPath,"additionalItems"]})}:{type:"array",minItems:a.items.length,maxItems:a.items.length,items:a.items.map((c,s)=>$t(c._def,{...u,currentPath:[...u.currentPath,"items",`${s}`]})).reduce((c,s)=>s===void 0?c:[...c,s],[])}}function wC(){return{not:Gl()}}function zC(){return Gl()}var _C=(a,u)=>$t(a.innerType._def,u),CC=(a,u,c)=>{switch(u){case ht.ZodString:return kT(a,c);case ht.ZodNumber:return vC(a);case ht.ZodObject:return bC(a,c);case ht.ZodBigInt:return W_(a);case ht.ZodBoolean:return eC();case ht.ZodDate:return NT(a,c);case ht.ZodUndefined:return wC();case ht.ZodNull:return pC();case ht.ZodArray:return F_(a,c);case ht.ZodUnion:case ht.ZodDiscriminatedUnion:return mC(a,c);case ht.ZodIntersection:return rC(a,c);case ht.ZodTuple:return RC(a,c);case ht.ZodRecord:return HT(a,c);case ht.ZodLiteral:return oC(a);case ht.ZodEnum:return iC(a);case ht.ZodNativeEnum:return dC(a);case ht.ZodNullable:return gC(a,c);case ht.ZodOptional:return TC(a,c);case ht.ZodMap:return fC(a,c);case ht.ZodSet:return OC(a,c);case ht.ZodLazy:return()=>a.getter()._def;case ht.ZodPromise:return xC(a,c);case ht.ZodNaN:case ht.ZodNever:return hC();case ht.ZodEffects:return lC(a,c);case ht.ZodAny:return Gl();case ht.ZodUnknown:return zC();case ht.ZodDefault:return aC(a,c);case ht.ZodBranded:return MT(a,c);case ht.ZodReadonly:return _C(a,c);case ht.ZodCatch:return tC(a,c);case ht.ZodPipeline:return AC(a,c);case ht.ZodFunction:case ht.ZodVoid:case ht.ZodSymbol:return;default:return(s=>{})()}},DC=(a,u)=>{let c=0;for(;c<a.length&&c<u.length&&a[c]===u[c];c++);return[(a.length-c).toString(),...u.slice(c)].join("/")};function $t(a,u,c=!1){var s;const h=u.seen.get(a);if(u.override){const T=(s=u.override)==null?void 0:s.call(u,a,u,h,c);if(T!==K_)return T}if(h&&!c){const T=MC(h,u);if(T!==void 0)return T}const y={def:a,path:u.currentPath,jsonSchema:void 0};u.seen.set(a,y);const v=CC(a,a.typeName,u),b=typeof v=="function"?$t(v(),u):v;if(b&&NC(a,u,b),u.postProcess){const T=u.postProcess(b,a,u);return y.jsonSchema=b,T}return y.jsonSchema=b,b}var MC=(a,u)=>{switch(u.$refStrategy){case"root":return{$ref:a.path.join("/")};case"relative":return{$ref:DC(u.currentPath,a.path)};case"none":case"seen":return a.path.length<u.currentPath.length&&a.path.every((c,s)=>u.currentPath[s]===c)?(console.warn(`Recursive reference detected at ${u.currentPath.join("/")}! Defaulting to any`),Gl()):u.$refStrategy==="seen"?Gl():void 0}},NC=(a,u,c)=>(a.description&&(c.description=a.description),c),kC=a=>{const u=P_(a),c=u.name!==void 0?[...u.basePath,u.definitionPath,u.name]:u.basePath;return{...u,currentPath:c,propertyPath:void 0,seen:new Map(Object.entries(u.definitions).map(([s,h])=>[h._def,{def:h._def,path:[...u.basePath,u.definitionPath,s],jsonSchema:void 0}]))}},UC=(a,u)=>{var c;const s=kC(u);let h=typeof u=="object"&&u.definitions?Object.entries(u.definitions).reduce((E,[O,R])=>{var z;return{...E,[O]:(z=$t(R._def,{...s,currentPath:[...s.basePath,s.definitionPath,O]},!0))!=null?z:Gl()}},{}):void 0;const y=typeof u=="string"?u:(u==null?void 0:u.nameStrategy)==="title"||u==null?void 0:u.name,v=(c=$t(a._def,y===void 0?s:{...s,currentPath:[...s.basePath,s.definitionPath,y]},!1))!=null?c:Gl(),b=typeof u=="object"&&u.name!==void 0&&u.nameStrategy==="title"?u.name:void 0;b!==void 0&&(v.title=b);const T=y===void 0?h?{...v,[s.definitionPath]:h}:v:{$ref:[...s.$refStrategy==="relative"?[]:s.basePath,s.definitionPath,y].join("/"),[s.definitionPath]:{...h,[y]:v}};return T.$schema="http://json-schema.org/draft-07/schema#",T},Yb=Symbol.for("vercel.ai.schema");function HC(a){let u;return()=>(u==null&&(u=a()),u)}function Ev(a,{validate:u}={}){return{[Yb]:!0,_type:void 0,get jsonSchema(){return typeof a=="function"&&(a=a()),a},validate:u}}function jC(a){return typeof a=="object"&&a!==null&&Yb in a&&a[Yb]===!0&&"jsonSchema"in a&&"validate"in a}function Vb(a){return a==null?Ev({properties:{},additionalProperties:!1}):jC(a)?a:"~standard"in a?a["~standard"].vendor==="zod"?jT(a):BC(a):a()}function BC(a){return Ev(()=>Bb(a["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async u=>{const c=await a["~standard"].validate(u);return"value"in c?{success:!0,value:c.value}:{success:!1,error:new od({value:u,cause:c.issues})}}})}function LC(a,u){var c;const s=(c=void 0)!=null?c:!1;return Ev(()=>UC(a,{$refStrategy:s?"root":"none"}),{validate:async h=>{const y=await a.safeParseAsync(h);return y.success?{success:!0,value:y.data}:{success:!1,error:y.error}}})}function ZC(a,u){var c;const s=(c=void 0)!=null?c:!1;return Ev(()=>Bb(kz(a,{target:"draft-7",io:"input",reused:s?"ref":"inline"})),{validate:async h=>{const y=await fT(a,h);return y.success?{success:!0,value:y.data}:{success:!1,error:y.error}}})}function qC(a){return"_zod"in a}function jT(a,u){return qC(a)?ZC(a):LC(a)}async function BT({value:a,schema:u,context:c}){const s=await tm({value:a,schema:u,context:c});if(!s.success)throw od.wrap({value:a,cause:s.error,context:c});return s.value}async function tm({value:a,schema:u,context:c}){const s=Vb(u);try{if(s.validate==null)return{success:!0,value:a,rawValue:a};const h=await s.validate(a);return h.success?{success:!0,value:h.value,rawValue:a}:{success:!1,error:od.wrap({value:a,cause:h.error,context:c}),rawValue:a}}catch(h){return{success:!1,error:od.wrap({value:a,cause:h,context:c}),rawValue:a}}}async function bs({text:a,schema:u}){try{const c=$_(a);return u==null?{success:!0,value:c,rawValue:c}:await tm({value:c,schema:u})}catch(c){return{success:!1,error:OE.isInstance(c)?c:new OE({text:a,cause:c}),rawValue:void 0}}}function YC({stream:a,schema:u}){return a.pipeThrough(new TextDecoderStream).pipeThrough(new G_).pipeThrough(new TransformStream({async transform({data:c},s){c!=="[DONE]"&&s.enqueue(await bs({text:c,schema:u}))}}))}async function Jo(a){return typeof a=="function"&&(a=a()),Promise.resolve(a)}var VC=Object.defineProperty,GC=(a,u)=>{for(var c in u)VC(a,c,{get:u[c],enumerable:!0})},LT="AI_NoObjectGeneratedError",ZT=`vercel.ai.error.${LT}`,XC=Symbol.for(ZT),qT,$o=class extends Zu{constructor({message:a="No object generated.",cause:u,text:c,response:s,usage:h,finishReason:y}){super({name:LT,message:a,cause:u}),this[qT]=!0,this.text=c,this.response=s,this.usage=h,this.finishReason=y}static isInstance(a){return Zu.hasMarker(a,ZT)}};qT=XC;var YT="AI_UIMessageStreamError",VT=`vercel.ai.error.${YT}`,QC=Symbol.for(VT),GT,fd=class extends Zu{constructor({chunkType:a,chunkId:u,message:c}){super({name:YT,message:c}),this[GT]=!0,this.chunkType=a,this.chunkId=u}static isInstance(a){return Zu.hasMarker(a,VT)}};GT=QC;var XT=nl([Me(),Sv(Uint8Array),Sv(ArrayBuffer),OT(a=>{var u,c;return(c=(u=globalThis.Buffer)==null?void 0:u.isBuffer(a))!=null?c:!1},{message:"Must be a Buffer"})]),Ss=B_(()=>nl([p_(),Me(),s_(),tl(),ys(Me(),Ss.optional()),cd(Ss)])),wt=ys(Me(),ys(Me(),Ss.optional())),QT=Ft({type:We("text"),text:Me(),providerOptions:wt.optional()}),IC=Ft({type:We("image"),image:nl([XT,Sv(URL)]),mediaType:Me().optional(),providerOptions:wt.optional()}),IT=Ft({type:We("file"),data:nl([XT,Sv(URL)]),filename:Me().optional(),mediaType:Me(),providerOptions:wt.optional()}),JC=Ft({type:We("reasoning"),text:Me(),providerOptions:wt.optional()}),$C=Ft({type:We("tool-call"),toolCallId:Me(),toolName:Me(),input:qu(),providerOptions:wt.optional(),providerExecuted:tl().optional()}),KC=b_("type",[Ft({type:We("text"),value:Me(),providerOptions:wt.optional()}),Ft({type:We("json"),value:Ss,providerOptions:wt.optional()}),Ft({type:We("execution-denied"),reason:Me().optional(),providerOptions:wt.optional()}),Ft({type:We("error-text"),value:Me(),providerOptions:wt.optional()}),Ft({type:We("error-json"),value:Ss,providerOptions:wt.optional()}),Ft({type:We("content"),value:cd(nl([Ft({type:We("text"),text:Me(),providerOptions:wt.optional()}),Ft({type:We("media"),data:Me(),mediaType:Me()}),Ft({type:We("file-data"),data:Me(),mediaType:Me(),filename:Me().optional(),providerOptions:wt.optional()}),Ft({type:We("file-url"),url:Me(),providerOptions:wt.optional()}),Ft({type:We("file-id"),fileId:nl([Me(),ys(Me(),Me())]),providerOptions:wt.optional()}),Ft({type:We("image-data"),data:Me(),mediaType:Me(),providerOptions:wt.optional()}),Ft({type:We("image-url"),url:Me(),providerOptions:wt.optional()}),Ft({type:We("image-file-id"),fileId:nl([Me(),ys(Me(),Me())]),providerOptions:wt.optional()}),Ft({type:We("custom"),providerOptions:wt.optional()})]))})]),JT=Ft({type:We("tool-result"),toolCallId:Me(),toolName:Me(),output:KC,providerOptions:wt.optional()}),PC=Ft({type:We("tool-approval-request"),approvalId:Me(),toolCallId:Me()}),FC=Ft({type:We("tool-approval-response"),approvalId:Me(),approved:tl(),reason:Me().optional()}),WC=Ft({role:We("system"),content:Me(),providerOptions:wt.optional()}),eD=Ft({role:We("user"),content:nl([Me(),cd(nl([QT,IC,IT]))]),providerOptions:wt.optional()}),tD=Ft({role:We("assistant"),content:nl([Me(),cd(nl([QT,IT,JC,$C,JT,PC]))]),providerOptions:wt.optional()}),nD=Ft({role:We("tool"),content:cd(nl([JT,FC])),providerOptions:wt.optional()});nl([WC,eD,tD,nD]);function $T(a,u){if(a===void 0&&u===void 0)return;if(a===void 0)return u;if(u===void 0)return a;const c={...a};for(const s in u)if(!(s==="__proto__"||s==="constructor"||s==="prototype")&&Object.prototype.hasOwnProperty.call(u,s)){const h=u[s];if(h===void 0)continue;const y=s in a?a[s]:void 0,v=h!==null&&typeof h=="object"&&!Array.isArray(h)&&!(h instanceof Date)&&!(h instanceof RegExp),b=y!=null&&typeof y=="object"&&!Array.isArray(y)&&!(y instanceof Date)&&!(y instanceof RegExp);v&&b?c[s]=$T(y,h):c[s]=h}return c}var aD={};GC(aD,{array:()=>rD,choice:()=>oD,json:()=>cD,object:()=>uD,text:()=>iD});function lD(a){const u=["ROOT"];let c=-1,s=null;function h(T,E,O){switch(T){case'"':{c=E,u.pop(),u.push(O),u.push("INSIDE_STRING");break}case"f":case"t":case"n":{c=E,s=E,u.pop(),u.push(O),u.push("INSIDE_LITERAL");break}case"-":{u.pop(),u.push(O),u.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{c=E,u.pop(),u.push(O),u.push("INSIDE_NUMBER");break}case"{":{c=E,u.pop(),u.push(O),u.push("INSIDE_OBJECT_START");break}case"[":{c=E,u.pop(),u.push(O),u.push("INSIDE_ARRAY_START");break}}}function y(T,E){switch(T){case",":{u.pop(),u.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{c=E,u.pop();break}}}function v(T,E){switch(T){case",":{u.pop(),u.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{c=E,u.pop();break}}}for(let T=0;T<a.length;T++){const E=a[T];switch(u[u.length-1]){case"ROOT":h(E,T,"FINISH");break;case"INSIDE_OBJECT_START":{switch(E){case'"':{u.pop(),u.push("INSIDE_OBJECT_KEY");break}case"}":{c=T,u.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(E){case'"':{u.pop(),u.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(E){case'"':{u.pop(),u.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(E){case":":{u.pop(),u.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{h(E,T,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{y(E,T);break}case"INSIDE_STRING":{switch(E){case'"':{u.pop(),c=T;break}case"\\":{u.push("INSIDE_STRING_ESCAPE");break}default:c=T}break}case"INSIDE_ARRAY_START":{switch(E){case"]":{c=T,u.pop();break}default:{c=T,h(E,T,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(E){case",":{u.pop(),u.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{c=T,u.pop();break}default:{c=T;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{h(E,T,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{u.pop(),c=T;break}case"INSIDE_NUMBER":{switch(E){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{c=T;break}case"e":case"E":case"-":case".":break;case",":{u.pop(),u[u.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&v(E,T),u[u.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&y(E,T);break}case"}":{u.pop(),u[u.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&y(E,T);break}case"]":{u.pop(),u[u.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&v(E,T);break}default:{u.pop();break}}break}case"INSIDE_LITERAL":{const R=a.substring(s,T+1);!"false".startsWith(R)&&!"true".startsWith(R)&&!"null".startsWith(R)?(u.pop(),u[u.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?y(E,T):u[u.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&v(E,T)):c=T;break}}}let b=a.slice(0,c+1);for(let T=u.length-1;T>=0;T--)switch(u[T]){case"INSIDE_STRING":{b+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{b+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{b+="]";break}case"INSIDE_LITERAL":{const O=a.substring(s,a.length);"true".startsWith(O)?b+="true".slice(O.length):"false".startsWith(O)?b+="false".slice(O.length):"null".startsWith(O)&&(b+="null".slice(O.length))}}return b}async function nm(a){if(a===void 0)return{value:void 0,state:"undefined-input"};let u=await bs({text:a});return u.success?{value:u.value,state:"successful-parse"}:(u=await bs({text:lD(a)}),u.success?{value:u.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var iD=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:a}){return a},async parsePartialOutput({text:a}){return{partial:a}},createElementStreamTransform(){}}),uD=({schema:a,name:u,description:c})=>{const s=Vb(a);return{name:"object",responseFormat:Jo(s.jsonSchema).then(h=>({type:"json",schema:h,...u!=null&&{name:u},...c!=null&&{description:c}})),async parseCompleteOutput({text:h},y){const v=await bs({text:h});if(!v.success)throw new $o({message:"No object generated: could not parse the response.",cause:v.error,text:h,response:y.response,usage:y.usage,finishReason:y.finishReason});const b=await tm({value:v.value,schema:s});if(!b.success)throw new $o({message:"No object generated: response did not match schema.",cause:b.error,text:h,response:y.response,usage:y.usage,finishReason:y.finishReason});return b.value},async parsePartialOutput({text:h}){const y=await nm(h);switch(y.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:y.value}}},createElementStreamTransform(){}}},rD=({element:a,name:u,description:c})=>{const s=Vb(a);return{name:"array",responseFormat:Jo(s.jsonSchema).then(h=>{const{$schema:y,...v}=h;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:v}},required:["elements"],additionalProperties:!1},...u!=null&&{name:u},...c!=null&&{description:c}}}),async parseCompleteOutput({text:h},y){const v=await bs({text:h});if(!v.success)throw new $o({message:"No object generated: could not parse the response.",cause:v.error,text:h,response:y.response,usage:y.usage,finishReason:y.finishReason});const b=v.value;if(b==null||typeof b!="object"||!("elements"in b)||!Array.isArray(b.elements))throw new $o({message:"No object generated: response did not match schema.",cause:new od({value:b,cause:"response must be an object with an elements array"}),text:h,response:y.response,usage:y.usage,finishReason:y.finishReason});for(const T of b.elements){const E=await tm({value:T,schema:s});if(!E.success)throw new $o({message:"No object generated: response did not match schema.",cause:E.error,text:h,response:y.response,usage:y.usage,finishReason:y.finishReason})}return b.elements},async parsePartialOutput({text:h}){const y=await nm(h);switch(y.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const v=y.value;if(v==null||typeof v!="object"||!("elements"in v)||!Array.isArray(v.elements))return;const b=y.state==="repaired-parse"&&v.elements.length>0?v.elements.slice(0,-1):v.elements,T=[];for(const E of b){const O=await tm({value:E,schema:s});O.success&&T.push(O.value)}return{partial:T}}}},createElementStreamTransform(){let h=0;return new TransformStream({transform({partialOutput:y},v){if(y!=null)for(;h<y.length;h++)v.enqueue(y[h])}})}}},oD=({options:a,name:u,description:c})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:a}},required:["result"],additionalProperties:!1},...u!=null&&{name:u},...c!=null&&{description:c}}),async parseCompleteOutput({text:s},h){const y=await bs({text:s});if(!y.success)throw new $o({message:"No object generated: could not parse the response.",cause:y.error,text:s,response:h.response,usage:h.usage,finishReason:h.finishReason});const v=y.value;if(v==null||typeof v!="object"||!("result"in v)||typeof v.result!="string"||!a.includes(v.result))throw new $o({message:"No object generated: response did not match schema.",cause:new od({value:v,cause:"response must be an object that contains a choice value."}),text:s,response:h.response,usage:h.usage,finishReason:h.finishReason});return v.result},async parsePartialOutput({text:s}){const h=await nm(s);switch(h.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const y=h.value;if(y==null||typeof y!="object"||!("result"in y)||typeof y.result!="string")return;const v=a.filter(b=>b.startsWith(y.result));return h.state==="successful-parse"?v.includes(y.result)?{partial:y.result}:void 0:v.length===1?{partial:v[0]}:void 0}}},createElementStreamTransform(){}}),cD=({name:a,description:u}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...a!=null&&{name:a},...u!=null&&{description:u}}),async parseCompleteOutput({text:c},s){const h=await bs({text:c});if(!h.success)throw new $o({message:"No object generated: could not parse the response.",cause:h.error,text:c,response:s.response,usage:s.usage,finishReason:s.finishReason});return h.value},async parsePartialOutput({text:c}){const s=await nm(c);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return s.value===void 0?void 0:{partial:s.value}}},createElementStreamTransform(){}});em({prefix:"aitxt",size:24}),class extends TransformStream{constructor(){super({transform(a,u){u.enqueue(`data: ${JSON.stringify(a)}
|
|
363
363
|
|
|
364
364
|
`)},flush(a){a.enqueue(`data: [DONE]
|
|
365
365
|
|
|
@@ -376,4 +376,4 @@ ${L}`,E++;break;case"id":b=L.includes("\0")?void 0:L;break;case"retry":/^\d+$/.t
|
|
|
376
376
|
`});++s<a.length;)s&&c.push({type:"text",value:`
|
|
377
377
|
`}),c.push(a[s]);return u&&a.length>0&&c.push({type:"text",value:`
|
|
378
378
|
`}),c}function hx(a){let u=0,c=a.charCodeAt(u);for(;c===9||c===32;)u++,c=a.charCodeAt(u);return a.slice(u)}function px(a,u){const c=l6(a,u),s=c.one(a,void 0),h=I3(c),y=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return h&&y.children.push({type:"text",value:`
|
|
379
|
-
`},h),y}function c6(a,u){return a&&"run"in a?async function(c,s){const h=px(c,{file:s,...u});await a.run(h,s)}:function(c,s){return px(c,{file:s,...a||u})}}function mx(a){if(a)throw a}var E1,yx;function s6(){if(yx)return E1;yx=1;var a=Object.prototype.hasOwnProperty,u=Object.prototype.toString,c=Object.defineProperty,s=Object.getOwnPropertyDescriptor,h=function(E){return typeof Array.isArray=="function"?Array.isArray(E):u.call(E)==="[object Array]"},y=function(E){if(!E||u.call(E)!=="[object Object]")return!1;var O=a.call(E,"constructor"),R=E.constructor&&E.constructor.prototype&&a.call(E.constructor.prototype,"isPrototypeOf");if(E.constructor&&!O&&!R)return!1;var z;for(z in E);return typeof z>"u"||a.call(E,z)},v=function(E,O){c&&O.name==="__proto__"?c(E,O.name,{enumerable:!0,configurable:!0,value:O.newValue,writable:!0}):E[O.name]=O.newValue},b=function(E,O){if(O==="__proto__")if(a.call(E,O)){if(s)return s(E,O).value}else return;return E[O]};return E1=function T(){var E,O,R,z,_,Y,le=arguments[0],X=1,k=arguments.length,L=!1;for(typeof le=="boolean"&&(L=le,le=arguments[1]||{},X=2),(le==null||typeof le!="object"&&typeof le!="function")&&(le={});X<k;++X)if(E=arguments[X],E!=null)for(O in E)R=b(le,O),z=b(E,O),le!==z&&(L&&z&&(y(z)||(_=h(z)))?(_?(_=!1,Y=R&&h(R)?R:[]):Y=R&&y(R)?R:{},v(le,{name:O,newValue:T(L,Y,z)})):typeof z<"u"&&v(le,{name:O,newValue:z}));return le},E1}var f6=s6();const T1=xb(f6);function A1(a){if(typeof a!="object"||a===null)return!1;const u=Object.getPrototypeOf(a);return(u===null||u===Object.prototype||Object.getPrototypeOf(u)===null)&&!(Symbol.toStringTag in a)&&!(Symbol.iterator in a)}function d6(){const a=[],u={run:c,use:s};return u;function c(...h){let y=-1;const v=h.pop();if(typeof v!="function")throw new TypeError("Expected function as last argument, not "+v);b(null,...h);function b(T,...E){const O=a[++y];let R=-1;if(T){v(T);return}for(;++R<h.length;)(E[R]===null||E[R]===void 0)&&(E[R]=h[R]);h=E,O?h6(O,b)(...E):v(null,...E)}}function s(h){if(typeof h!="function")throw new TypeError("Expected `middelware` to be a function, not "+h);return a.push(h),u}}function h6(a,u){let c;return s;function s(...v){const b=a.length>v.length;let T;b&&v.push(h);try{T=a.apply(this,v)}catch(E){const O=E;if(b&&c)throw O;return h(O)}b||(T&&T.then&&typeof T.then=="function"?T.then(y,h):T instanceof Error?h(T):y(T))}function h(v,...b){c||(c=!0,u(v,...b))}function y(v){h(null,v)}}const Xu={basename:p6,dirname:m6,extname:y6,join:g6,sep:"/"};function p6(a,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');ym(a);let c=0,s=-1,h=a.length,y;if(u===void 0||u.length===0||u.length>a.length){for(;h--;)if(a.codePointAt(h)===47){if(y){c=h+1;break}}else s<0&&(y=!0,s=h+1);return s<0?"":a.slice(c,s)}if(u===a)return"";let v=-1,b=u.length-1;for(;h--;)if(a.codePointAt(h)===47){if(y){c=h+1;break}}else v<0&&(y=!0,v=h+1),b>-1&&(a.codePointAt(h)===u.codePointAt(b--)?b<0&&(s=h):(b=-1,s=v));return c===s?s=v:s<0&&(s=a.length),a.slice(c,s)}function m6(a){if(ym(a),a.length===0)return".";let u=-1,c=a.length,s;for(;--c;)if(a.codePointAt(c)===47){if(s){u=c;break}}else s||(s=!0);return u<0?a.codePointAt(0)===47?"/":".":u===1&&a.codePointAt(0)===47?"//":a.slice(0,u)}function y6(a){ym(a);let u=a.length,c=-1,s=0,h=-1,y=0,v;for(;u--;){const b=a.codePointAt(u);if(b===47){if(v){s=u+1;break}continue}c<0&&(v=!0,c=u+1),b===46?h<0?h=u:y!==1&&(y=1):h>-1&&(y=-1)}return h<0||c<0||y===0||y===1&&h===c-1&&h===s+1?"":a.slice(h,c)}function g6(...a){let u=-1,c;for(;++u<a.length;)ym(a[u]),a[u]&&(c=c===void 0?a[u]:c+"/"+a[u]);return c===void 0?".":v6(c)}function v6(a){ym(a);const u=a.codePointAt(0)===47;let c=b6(a,!u);return c.length===0&&!u&&(c="."),c.length>0&&a.codePointAt(a.length-1)===47&&(c+="/"),u?"/"+c:c}function b6(a,u){let c="",s=0,h=-1,y=0,v=-1,b,T;for(;++v<=a.length;){if(v<a.length)b=a.codePointAt(v);else{if(b===47)break;b=47}if(b===47){if(!(h===v-1||y===1))if(h!==v-1&&y===2){if(c.length<2||s!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(T=c.lastIndexOf("/"),T!==c.length-1){T<0?(c="",s=0):(c=c.slice(0,T),s=c.length-1-c.lastIndexOf("/")),h=v,y=0;continue}}else if(c.length>0){c="",s=0,h=v,y=0;continue}}u&&(c=c.length>0?c+"/..":"..",s=2)}else c.length>0?c+="/"+a.slice(h+1,v):c=a.slice(h+1,v),s=v-h-1;h=v,y=0}else b===46&&y>-1?y++:y=-1}return c}function ym(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}const S6={cwd:E6};function E6(){return"/"}function x1(a){return!!(a!==null&&typeof a=="object"&&"href"in a&&a.href&&"protocol"in a&&a.protocol&&a.auth===void 0)}function T6(a){if(typeof a=="string")a=new URL(a);else if(!x1(a)){const u=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+a+"`");throw u.code="ERR_INVALID_ARG_TYPE",u}if(a.protocol!=="file:"){const u=new TypeError("The URL must be of scheme file");throw u.code="ERR_INVALID_URL_SCHEME",u}return A6(a)}function A6(a){if(a.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const u=a.pathname;let c=-1;for(;++c<u.length;)if(u.codePointAt(c)===37&&u.codePointAt(c+1)===50){const s=u.codePointAt(c+2);if(s===70||s===102){const h=new TypeError("File URL path must not include encoded / characters");throw h.code="ERR_INVALID_FILE_URL_PATH",h}}return decodeURIComponent(u)}const O1=["history","path","basename","stem","extname","dirname"];class gx{constructor(u){let c;u?x1(u)?c={path:u}:typeof u=="string"||x6(u)?c={value:u}:c=u:c={},this.cwd="cwd"in c?"":S6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<O1.length;){const y=O1[s];y in c&&c[y]!==void 0&&c[y]!==null&&(this[y]=y==="history"?[...c[y]]:c[y])}let h;for(h in c)O1.includes(h)||(this[h]=c[h])}get basename(){return typeof this.path=="string"?Xu.basename(this.path):void 0}set basename(u){w1(u,"basename"),R1(u,"basename"),this.path=Xu.join(this.dirname||"",u)}get dirname(){return typeof this.path=="string"?Xu.dirname(this.path):void 0}set dirname(u){vx(this.basename,"dirname"),this.path=Xu.join(u||"",this.basename)}get extname(){return typeof this.path=="string"?Xu.extname(this.path):void 0}set extname(u){if(R1(u,"extname"),vx(this.dirname,"extname"),u){if(u.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(u.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Xu.join(this.dirname,this.stem+(u||""))}get path(){return this.history[this.history.length-1]}set path(u){x1(u)&&(u=T6(u)),w1(u,"path"),this.path!==u&&this.history.push(u)}get stem(){return typeof this.path=="string"?Xu.basename(this.path,this.extname):void 0}set stem(u){w1(u,"stem"),R1(u,"stem"),this.path=Xu.join(this.dirname||"",u+(this.extname||""))}fail(u,c,s){const h=this.message(u,c,s);throw h.fatal=!0,h}info(u,c,s){const h=this.message(u,c,s);return h.fatal=void 0,h}message(u,c,s){const h=new Ba(u,c,s);return this.path&&(h.name=this.path+":"+h.name,h.file=this.path),h.fatal=!1,this.messages.push(h),h}toString(u){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(u||void 0).decode(this.value)}}function R1(a,u){if(a&&a.includes(Xu.sep))throw new Error("`"+u+"` cannot be a path: did not expect `"+Xu.sep+"`")}function w1(a,u){if(!a)throw new Error("`"+u+"` cannot be empty")}function vx(a,u){if(!a)throw new Error("Setting `"+u+"` requires `path` to be set too")}function x6(a){return!!(a&&typeof a=="object"&&"byteLength"in a&&"byteOffset"in a)}const O6=(function(a){const s=this.constructor.prototype,h=s[a],y=function(){return h.apply(y,arguments)};return Object.setPrototypeOf(y,s),y}),R6={}.hasOwnProperty;class z1 extends O6{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=d6()}copy(){const u=new z1;let c=-1;for(;++c<this.attachers.length;){const s=this.attachers[c];u.use(...s)}return u.data(T1(!0,{},this.namespace)),u}data(u,c){return typeof u=="string"?arguments.length===2?(D1("data",this.frozen),this.namespace[u]=c,this):R6.call(this.namespace,u)&&this.namespace[u]||void 0:u?(D1("data",this.frozen),this.namespace=u,this):this.namespace}freeze(){if(this.frozen)return this;const u=this;for(;++this.freezeIndex<this.attachers.length;){const[c,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const h=c.call(u,...s);typeof h=="function"&&this.transformers.use(h)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(u){this.freeze();const c=Nv(u),s=this.parser||this.Parser;return _1("parse",s),s(String(c),c)}process(u,c){const s=this;return this.freeze(),_1("process",this.parser||this.Parser),C1("process",this.compiler||this.Compiler),c?h(void 0,c):new Promise(h);function h(y,v){const b=Nv(u),T=s.parse(b);s.run(T,b,function(O,R,z){if(O||!R||!z)return E(O);const _=R,Y=s.stringify(_,z);_6(Y)?z.value=Y:z.result=Y,E(O,z)});function E(O,R){O||!R?v(O):y?y(R):c(void 0,R)}}}processSync(u){let c=!1,s;return this.freeze(),_1("processSync",this.parser||this.Parser),C1("processSync",this.compiler||this.Compiler),this.process(u,h),Sx("processSync","process",c),s;function h(y,v){c=!0,mx(y),s=v}}run(u,c,s){bx(u),this.freeze();const h=this.transformers;return!s&&typeof c=="function"&&(s=c,c=void 0),s?y(void 0,s):new Promise(y);function y(v,b){const T=Nv(c);h.run(u,T,E);function E(O,R,z){const _=R||u;O?b(O):v?v(_):s(void 0,_,z)}}}runSync(u,c){let s=!1,h;return this.run(u,c,y),Sx("runSync","run",s),h;function y(v,b){mx(v),h=b,s=!0}}stringify(u,c){this.freeze();const s=Nv(c),h=this.compiler||this.Compiler;return C1("stringify",h),bx(u),h(u,s)}use(u,...c){const s=this.attachers,h=this.namespace;if(D1("use",this.frozen),u!=null)if(typeof u=="function")T(u,c);else if(typeof u=="object")Array.isArray(u)?b(u):v(u);else throw new TypeError("Expected usable value, not `"+u+"`");return this;function y(E){if(typeof E=="function")T(E,[]);else if(typeof E=="object")if(Array.isArray(E)){const[O,...R]=E;T(O,R)}else v(E);else throw new TypeError("Expected usable value, not `"+E+"`")}function v(E){if(!("plugins"in E)&&!("settings"in E))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");b(E.plugins),E.settings&&(h.settings=T1(!0,h.settings,E.settings))}function b(E){let O=-1;if(E!=null)if(Array.isArray(E))for(;++O<E.length;){const R=E[O];y(R)}else throw new TypeError("Expected a list of plugins, not `"+E+"`")}function T(E,O){let R=-1,z=-1;for(;++R<s.length;)if(s[R][0]===E){z=R;break}if(z===-1)s.push([E,...O]);else if(O.length>0){let[_,...Y]=O;const le=s[z][1];A1(le)&&A1(_)&&(_=T1(!0,le,_)),s[z]=[E,_,...Y]}}}}const w6=new z1().freeze();function _1(a,u){if(typeof u!="function")throw new TypeError("Cannot `"+a+"` without `parser`")}function C1(a,u){if(typeof u!="function")throw new TypeError("Cannot `"+a+"` without `compiler`")}function D1(a,u){if(u)throw new Error("Cannot call `"+a+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bx(a){if(!A1(a)||typeof a.type!="string")throw new TypeError("Expected node, got `"+a+"`")}function Sx(a,u,c){if(!c)throw new Error("`"+a+"` finished async. Use `"+u+"` instead")}function Nv(a){return z6(a)?a:new gx(a)}function z6(a){return!!(a&&typeof a=="object"&&"message"in a&&"messages"in a)}function _6(a){return typeof a=="string"||C6(a)}function C6(a){return!!(a&&typeof a=="object"&&"byteLength"in a&&"byteOffset"in a)}const D6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ex=[],Tx={allowDangerousHtml:!0},M6=/^(https?|ircs?|mailto|xmpp)$/i,N6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function k6(a){const u=U6(a),c=H6(a);return j6(u.runSync(u.parse(c),c),a)}function U6(a){const u=a.rehypePlugins||Ex,c=a.remarkPlugins||Ex,s=a.remarkRehypeOptions?{...a.remarkRehypeOptions,...Tx}:Tx;return w6().use(h3).use(c).use(c6,s).use(u)}function H6(a){const u=a.children||"",c=new gx;return typeof u=="string"&&(c.value=u),c}function j6(a,u){const c=u.allowedElements,s=u.allowElement,h=u.components,y=u.disallowedElements,v=u.skipHtml,b=u.unwrapDisallowed,T=u.urlTransform||B6;for(const O of N6)Object.hasOwn(u,O.from)&&(""+O.from+(O.to?"use `"+O.to+"` instead":"remove it")+D6+O.id,void 0);return u.className&&(a={type:"element",tagName:"div",properties:{className:u.className},children:a.type==="root"?a.children:[a]}),dx(a,E),tM(a,{Fragment:ht.Fragment,components:h,ignoreInvalidStyle:!0,jsx:ht.jsx,jsxs:ht.jsxs,passKeys:!0,passNode:!0});function E(O,R,z){if(O.type==="raw"&&z&&typeof R=="number")return v?z.children.splice(R,1):z.children[R]={type:"text",value:O.value},R;if(O.type==="element"){let _;for(_ in r1)if(Object.hasOwn(r1,_)&&Object.hasOwn(O.properties,_)){const Y=O.properties[_],le=r1[_];(le===null||le.includes(O.tagName))&&(O.properties[_]=T(String(Y||""),_,O))}}if(O.type==="element"){let _=c?!c.includes(O.tagName):y?y.includes(O.tagName):!1;if(!_&&s&&typeof R=="number"&&(_=!s(O,R,z)),_&&z&&typeof R=="number")return b&&O.children?z.children.splice(R,1,...O.children):z.children.splice(R,1),R}}}function B6(a){const u=a.indexOf(":"),c=a.indexOf("?"),s=a.indexOf("#"),h=a.indexOf("/");return u===-1||h!==-1&&u>h||c!==-1&&u>c||s!==-1&&u>s||M6.test(a.slice(0,u))?a:""}const L6="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%20strokeWidth='1.5'%20stroke='currentColor'%3e%3cpath%20strokeLinecap='round'%20strokeLinejoin='round'%20d='M6%2012L3.269%203.126A59.768%2059.768%200%200121.485%2012%2059.77%2059.77%200%20013.27%2020.876L5.999%2012zm0%200h7.5'%20/%3e%3c/svg%3e",Ax="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%20stroke-width='1.5'%20stroke='currentColor'%3e%3cpath%20strokeLinecap='round'%20strokeLinejoin='round'%20d='M19.5%208.25l-7.5%207.5-7.5-7.5'%20/%3e%3c/svg%3e",Z6="data:image/png;base64,iV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slFVtIJDORJxa77gr7Hvt7Ud4RsFm2sTAJgY2MbCJgU0MbGJgEwObGNjEwCYGNjGwiYFNDGxiYBMDmxj4t4yB/w+Iyhhsm8O/RwAAAABJRU5ErkJggg==",q6=Es(["asw-widget font-inter fixed transition-all"],{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6"},open:{true:"h-5/6 max-h-[800px] w-80",false:"w-16 h-16"}},defaultVariants:{position:"bottom-right",open:!1}}),Y6=Es(["rounded-[43px] flex flex-col justify-between absolute w-80 h-5/6","bg-asm-gray-500 shadow-lg transition-all duration-300","motion-reduce:transition-none transform-gpu overflow-hidden"],{variants:{position:{"bottom-right":"right-2 origin-bottom-right","bottom-left":"left-2 origin-bottom-left"},open:{true:"scale-100 bottom-20",false:"scale-0 bottom-2"}},defaultVariants:{position:"bottom-right",open:!1}}),V6=Es(["relative w-full z-[2] transition-all motion-reduce:transition-none","origin-middle-right transform-gpu flex items-end"],{variants:{active:{true:"mr-0",false:"-mr-[4.5rem]"}}}),G6=Es(["relative flex items-center justify-center shrink-0 z-[1]","transition-all motion-reduce:transition-none origin-center-left transform-gpu","rounded-full text-asm-purple bg-transparent hover:bg-asm-blue/30 cursor-pointer bottom-1"],{variants:{active:{true:"scale-100 translate-x-0 w-10 h-10 ml-2",false:"scale-0 -translate-x-[2rem] w-0 h-0 ml-0"}}}),X6=Es(["absolute left-0 bottom-0 z-[3] h-3/4 w-full mb-24","transition-all duration-300 motion-reduce:transition-none transform-gpu"],{variants:{active:{true:"translate-y-0",false:"translate-y-full"}}}),Q6=Es(["flex gap-2"],{variants:{role:{user:"flex-row-reverse",assistant:"flex-row",system:"flex-row"}}}),I6=Es(["absolute bottom-0 text-white w-16 h-16 flex justify-center items-center","shadow-md cursor-pointer transition-colors duration-300 ease-in-out"],{variants:{position:{"bottom-right":"right-0 rounded-bl-[50%] rounded-tl-[50%] rounded-tr-[50%] rounded-br","bottom-left":"left-0 rounded-br-[50%] rounded-tr-[50%] rounded-tl-[50%] rounded-bl"},open:{true:"bg-asm-pink-400",false:"bg-asm-purple"}},defaultVariants:{position:"bottom-right",open:!1}});function xx(a){return a!=null&&a.persist?`asm-widget:${a.endpoint??"/api/chat"}:${a.context??""}`:null}function J6(a){if(!a)return null;try{const u=sessionStorage.getItem(a);return u?JSON.parse(u):null}catch{return null}}function $6(a){const u=xx(a),c=J6(u);return c||((a==null?void 0:a.initialMessages)??[]).map((s,h)=>({id:`initial-${h}`,role:s.role,parts:[{type:"text",text:s.content}],createdAt:new Date}))}const K6=({config:a,open:u,defaultOpen:c=!1,onOpenChange:s,onMessage:h,onError:y,children:v})=>{const b=bn.useRef(null),T=bn.useRef(null),E=bn.useRef(0),O=(a==null?void 0:a.position)??"bottom-right",[R]=bn.useState(()=>new PT({api:(a==null?void 0:a.endpoint)??"/api/chat",body:{...(a==null?void 0:a.systemPrompt)!==void 0&&{systemPrompt:a.systemPrompt},...(a==null?void 0:a.context)!==void 0&&{context:a.context},...(a==null?void 0:a.mcpServerUrl)!==void 0&&{mcpServerUrl:a.mcpServerUrl},...(a==null?void 0:a.model)!==void 0&&{model:a.model},...(a==null?void 0:a.temperature)!==void 0&&{temperature:a.temperature},...(a==null?void 0:a.user)!==void 0&&{user:a.user}}})),[z]=bn.useState(()=>$6(a)),{error:_,stop:Y,status:le,messages:X,sendMessage:k}=OD({transport:R,messages:z}),L=le==="submitted"||le==="streaming",D=u!==void 0,[oe,ne]=bn.useState(c),Q=D?u:oe,pe=bn.useCallback(F=>{D||ne(F),s==null||s(F)},[D,s]),[we,Se]=bn.useState(!1),[He,be]=bn.useState(""),Ee=xx(a);bn.useEffect(()=>{if(Ee&&X.length>0)try{sessionStorage.setItem(Ee,JSON.stringify(X))}catch{}},[X,Ee]),bn.useEffect(()=>{X.length>E.current&&X.slice(E.current).forEach(ge=>{if(ge.role==="assistant"){const Ne=ge.parts.filter(Gb).map(A=>A.text).join("");h==null||h({role:ge.role,content:Ne})}}),E.current=X.length},[X,h]),bn.useEffect(()=>{_&&(y==null||y(_))},[_,y]),bn.useEffect(()=>{T.current&&(T.current.scrollTop=T.current.scrollHeight)},[X]),bn.useEffect(()=>()=>{Y()},[]),bn.useEffect(()=>{const F=b.current;if(!F)return;const ge=Ne=>{var A;Ne.key==="Enter"&&!Ne.shiftKey&&(Ne.repeat||(A=F.form)==null||A.requestSubmit(),Ne.preventDefault())};return F.addEventListener("keydown",ge),()=>F.removeEventListener("keydown",ge)},[]);const Qe=()=>{Q&&Y(),pe(!Q)},ke=F=>{F.preventDefault(),He.trim()&&(k({parts:[{type:"text",text:He}]}),be(""))},Te=(a==null?void 0:a.logo)??Z6,q=(a==null?void 0:a.title)??"Ask ASMBL";return ht.jsxs("div",{className:q6({position:O,open:Q}),children:[ht.jsxs("div",{className:Y6({position:O,open:Q}),children:[ht.jsxs("div",{className:"px-4 py-6",children:[ht.jsxs("h2",{className:"text-2xl font-bold text-asm-purple flex items-center gap-1",children:[ht.jsx("img",{className:"inline-block -mt-1",width:30,height:30,src:Te,alt:""}),q]}),ht.jsx("button",{className:"absolute top-4 right-4 text-asm-purple transition-colors bg-transparent hover:bg-asm-blue/30 rounded-full w-10 h-10 flex justify-center items-center cursor-pointer",onClick:()=>Se(!1),disabled:!we,"aria-label":"Hide chat",children:ht.jsx("img",{width:20,height:20,src:Ax,alt:""})})]}),!L&&we&&_&&ht.jsxs("div",{className:"absolute bg-asm-white w-full opacity-8 z-40 flex flex-col gap-2 items-center justify-center h-full",children:[ht.jsx("button",{className:"absolute top-2 right-2 text-asm-purple transition-colors bg-transparent hover:bg-asm-blue/30 rounded-full w-10 h-10 flex justify-center items-center cursor-pointer",onClick:()=>Se(!1),"aria-label":"Hide chat",children:ht.jsx("img",{width:20,height:20,src:Ax,alt:""})}),ht.jsxs("h3",{className:"text-center font-bold",children:["Sorry, I'm having trouble",ht.jsx("br",{}),"connecting right now."]}),ht.jsx("p",{className:"text-center",children:":("})]}),ht.jsx("div",{className:X6({active:we}),children:ht.jsx("div",{className:"flex flex-col justify-end relative h-full bg-asm-white w-full border border-b-0 rounded-t-[43px] overflow-hidden",children:X.length>0?ht.jsx("div",{className:"overflow-y-auto h-full",ref:T,children:X.map((F,ge)=>ht.jsx("div",{className:"px-4 py-2 first:pt-4 last:pb-4",style:{overflowAnchor:"none"},children:ht.jsxs("div",{className:Q6({role:F.role}),children:[ht.jsx("div",{className:"relative shrink-0",children:F.role==="user"?ht.jsx("div",{className:"rounded-full bg-asm-gray-500 ml-1 w-10 h-10 p-2",children:ht.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:ht.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})}):ht.jsxs("div",{className:"relative",children:[L&&ge+1===X.length&&ht.jsx("span",{className:"shadow text-xs text-asm-gray-400 leading-none absolute -bottom-4 left-4 z-10 bg-white pb-2 px-2 rounded-xl",children:"..."}),ht.jsx("img",{className:"mr-1",width:36,height:36,src:Te,alt:""})]})}),F.role==="user"?ht.jsx("div",{className:"bg-asm-pink-400 rounded-3xl rounded-tr-none w-full",children:ht.jsx("p",{className:"text-gray-600 text-sm p-3",children:F.parts.filter(Gb).map(Ne=>Ne.text).join("")})}):ht.jsx("div",{className:"bg-asm-gray-500 rounded-3xl rounded-tl-none w-full",children:ht.jsx("div",{className:"text-gray-600 text-sm p-3 prose prose-sm max-w-none",children:ht.jsx(k6,{children:F.parts.filter(Gb).map(Ne=>Ne.text).join("")})})})]})},F.id))}):ht.jsxs("div",{className:"flex flex-col gap-2 items-center justify-center h-full px-4",children:[v??(a!=null&&a.welcomeHeading?ht.jsx("h3",{className:"text-center font-bold",children:a.welcomeHeading}):null),L&&ht.jsx("p",{className:"text-center bg-white py-1 px-2 rounded-xl text-sm",children:"This should only take a moment…"})]})})}),ht.jsx("div",{className:"absolute bottom-0 left-0 w-full flex items-center px-4 py-6 z-50 bg-asm-gray-500",children:ht.jsxs("form",{className:V6({active:we}),onSubmit:ke,children:[ht.jsx("textarea",{ref:b,style:{height:b.current&&document.activeElement===b.current?`${b.current.scrollHeight}px`:"auto"},rows:1,cols:1,onFocus:()=>Se(!0),value:He,onChange:F=>{Se(!0),be(F.target.value)},className:"w-full border border-gray-300 rounded-3xl px-4 py-[.625rem] min-h-[46px] max-h-[500px] focus:outline-asm-gray-500",placeholder:(a==null?void 0:a.placeholder)??""}),ht.jsx("button",{className:G6({active:we}),type:"submit",disabled:!we,"aria-label":"Send message",children:ht.jsx("img",{className:"-rotate-45",width:24,height:24,src:L6,alt:""})})]})})]}),ht.jsx("button",{className:I6({position:O,open:Q}),onClick:Qe,"aria-label":Q?"Close widget":"Open widget",children:ht.jsx("img",{className:"absolute",width:30,height:30,src:Te,alt:""})})]})},P6="asm-widget-root";function F6(a,u=P6){let c=document.getElementById(u);c||(c=document.createElement("div"),c.id=u,document.body.appendChild(c)),NO.createRoot(c).render(bn.createElement(K6,{config:a}))}window.AsmWidget={init:F6}})();
|
|
379
|
+
`},h),y}function c6(a,u){return a&&"run"in a?async function(c,s){const h=px(c,{file:s,...u});await a.run(h,s)}:function(c,s){return px(c,{file:s,...a||u})}}function mx(a){if(a)throw a}var E1,yx;function s6(){if(yx)return E1;yx=1;var a=Object.prototype.hasOwnProperty,u=Object.prototype.toString,c=Object.defineProperty,s=Object.getOwnPropertyDescriptor,h=function(E){return typeof Array.isArray=="function"?Array.isArray(E):u.call(E)==="[object Array]"},y=function(E){if(!E||u.call(E)!=="[object Object]")return!1;var O=a.call(E,"constructor"),R=E.constructor&&E.constructor.prototype&&a.call(E.constructor.prototype,"isPrototypeOf");if(E.constructor&&!O&&!R)return!1;var z;for(z in E);return typeof z>"u"||a.call(E,z)},v=function(E,O){c&&O.name==="__proto__"?c(E,O.name,{enumerable:!0,configurable:!0,value:O.newValue,writable:!0}):E[O.name]=O.newValue},b=function(E,O){if(O==="__proto__")if(a.call(E,O)){if(s)return s(E,O).value}else return;return E[O]};return E1=function T(){var E,O,R,z,_,Y,le=arguments[0],X=1,k=arguments.length,L=!1;for(typeof le=="boolean"&&(L=le,le=arguments[1]||{},X=2),(le==null||typeof le!="object"&&typeof le!="function")&&(le={});X<k;++X)if(E=arguments[X],E!=null)for(O in E)R=b(le,O),z=b(E,O),le!==z&&(L&&z&&(y(z)||(_=h(z)))?(_?(_=!1,Y=R&&h(R)?R:[]):Y=R&&y(R)?R:{},v(le,{name:O,newValue:T(L,Y,z)})):typeof z<"u"&&v(le,{name:O,newValue:z}));return le},E1}var f6=s6();const T1=xb(f6);function A1(a){if(typeof a!="object"||a===null)return!1;const u=Object.getPrototypeOf(a);return(u===null||u===Object.prototype||Object.getPrototypeOf(u)===null)&&!(Symbol.toStringTag in a)&&!(Symbol.iterator in a)}function d6(){const a=[],u={run:c,use:s};return u;function c(...h){let y=-1;const v=h.pop();if(typeof v!="function")throw new TypeError("Expected function as last argument, not "+v);b(null,...h);function b(T,...E){const O=a[++y];let R=-1;if(T){v(T);return}for(;++R<h.length;)(E[R]===null||E[R]===void 0)&&(E[R]=h[R]);h=E,O?h6(O,b)(...E):v(null,...E)}}function s(h){if(typeof h!="function")throw new TypeError("Expected `middelware` to be a function, not "+h);return a.push(h),u}}function h6(a,u){let c;return s;function s(...v){const b=a.length>v.length;let T;b&&v.push(h);try{T=a.apply(this,v)}catch(E){const O=E;if(b&&c)throw O;return h(O)}b||(T&&T.then&&typeof T.then=="function"?T.then(y,h):T instanceof Error?h(T):y(T))}function h(v,...b){c||(c=!0,u(v,...b))}function y(v){h(null,v)}}const Xu={basename:p6,dirname:m6,extname:y6,join:g6,sep:"/"};function p6(a,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');ym(a);let c=0,s=-1,h=a.length,y;if(u===void 0||u.length===0||u.length>a.length){for(;h--;)if(a.codePointAt(h)===47){if(y){c=h+1;break}}else s<0&&(y=!0,s=h+1);return s<0?"":a.slice(c,s)}if(u===a)return"";let v=-1,b=u.length-1;for(;h--;)if(a.codePointAt(h)===47){if(y){c=h+1;break}}else v<0&&(y=!0,v=h+1),b>-1&&(a.codePointAt(h)===u.codePointAt(b--)?b<0&&(s=h):(b=-1,s=v));return c===s?s=v:s<0&&(s=a.length),a.slice(c,s)}function m6(a){if(ym(a),a.length===0)return".";let u=-1,c=a.length,s;for(;--c;)if(a.codePointAt(c)===47){if(s){u=c;break}}else s||(s=!0);return u<0?a.codePointAt(0)===47?"/":".":u===1&&a.codePointAt(0)===47?"//":a.slice(0,u)}function y6(a){ym(a);let u=a.length,c=-1,s=0,h=-1,y=0,v;for(;u--;){const b=a.codePointAt(u);if(b===47){if(v){s=u+1;break}continue}c<0&&(v=!0,c=u+1),b===46?h<0?h=u:y!==1&&(y=1):h>-1&&(y=-1)}return h<0||c<0||y===0||y===1&&h===c-1&&h===s+1?"":a.slice(h,c)}function g6(...a){let u=-1,c;for(;++u<a.length;)ym(a[u]),a[u]&&(c=c===void 0?a[u]:c+"/"+a[u]);return c===void 0?".":v6(c)}function v6(a){ym(a);const u=a.codePointAt(0)===47;let c=b6(a,!u);return c.length===0&&!u&&(c="."),c.length>0&&a.codePointAt(a.length-1)===47&&(c+="/"),u?"/"+c:c}function b6(a,u){let c="",s=0,h=-1,y=0,v=-1,b,T;for(;++v<=a.length;){if(v<a.length)b=a.codePointAt(v);else{if(b===47)break;b=47}if(b===47){if(!(h===v-1||y===1))if(h!==v-1&&y===2){if(c.length<2||s!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(T=c.lastIndexOf("/"),T!==c.length-1){T<0?(c="",s=0):(c=c.slice(0,T),s=c.length-1-c.lastIndexOf("/")),h=v,y=0;continue}}else if(c.length>0){c="",s=0,h=v,y=0;continue}}u&&(c=c.length>0?c+"/..":"..",s=2)}else c.length>0?c+="/"+a.slice(h+1,v):c=a.slice(h+1,v),s=v-h-1;h=v,y=0}else b===46&&y>-1?y++:y=-1}return c}function ym(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}const S6={cwd:E6};function E6(){return"/"}function x1(a){return!!(a!==null&&typeof a=="object"&&"href"in a&&a.href&&"protocol"in a&&a.protocol&&a.auth===void 0)}function T6(a){if(typeof a=="string")a=new URL(a);else if(!x1(a)){const u=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+a+"`");throw u.code="ERR_INVALID_ARG_TYPE",u}if(a.protocol!=="file:"){const u=new TypeError("The URL must be of scheme file");throw u.code="ERR_INVALID_URL_SCHEME",u}return A6(a)}function A6(a){if(a.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const u=a.pathname;let c=-1;for(;++c<u.length;)if(u.codePointAt(c)===37&&u.codePointAt(c+1)===50){const s=u.codePointAt(c+2);if(s===70||s===102){const h=new TypeError("File URL path must not include encoded / characters");throw h.code="ERR_INVALID_FILE_URL_PATH",h}}return decodeURIComponent(u)}const O1=["history","path","basename","stem","extname","dirname"];class gx{constructor(u){let c;u?x1(u)?c={path:u}:typeof u=="string"||x6(u)?c={value:u}:c=u:c={},this.cwd="cwd"in c?"":S6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<O1.length;){const y=O1[s];y in c&&c[y]!==void 0&&c[y]!==null&&(this[y]=y==="history"?[...c[y]]:c[y])}let h;for(h in c)O1.includes(h)||(this[h]=c[h])}get basename(){return typeof this.path=="string"?Xu.basename(this.path):void 0}set basename(u){w1(u,"basename"),R1(u,"basename"),this.path=Xu.join(this.dirname||"",u)}get dirname(){return typeof this.path=="string"?Xu.dirname(this.path):void 0}set dirname(u){vx(this.basename,"dirname"),this.path=Xu.join(u||"",this.basename)}get extname(){return typeof this.path=="string"?Xu.extname(this.path):void 0}set extname(u){if(R1(u,"extname"),vx(this.dirname,"extname"),u){if(u.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(u.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Xu.join(this.dirname,this.stem+(u||""))}get path(){return this.history[this.history.length-1]}set path(u){x1(u)&&(u=T6(u)),w1(u,"path"),this.path!==u&&this.history.push(u)}get stem(){return typeof this.path=="string"?Xu.basename(this.path,this.extname):void 0}set stem(u){w1(u,"stem"),R1(u,"stem"),this.path=Xu.join(this.dirname||"",u+(this.extname||""))}fail(u,c,s){const h=this.message(u,c,s);throw h.fatal=!0,h}info(u,c,s){const h=this.message(u,c,s);return h.fatal=void 0,h}message(u,c,s){const h=new Ba(u,c,s);return this.path&&(h.name=this.path+":"+h.name,h.file=this.path),h.fatal=!1,this.messages.push(h),h}toString(u){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(u||void 0).decode(this.value)}}function R1(a,u){if(a&&a.includes(Xu.sep))throw new Error("`"+u+"` cannot be a path: did not expect `"+Xu.sep+"`")}function w1(a,u){if(!a)throw new Error("`"+u+"` cannot be empty")}function vx(a,u){if(!a)throw new Error("Setting `"+u+"` requires `path` to be set too")}function x6(a){return!!(a&&typeof a=="object"&&"byteLength"in a&&"byteOffset"in a)}const O6=(function(a){const s=this.constructor.prototype,h=s[a],y=function(){return h.apply(y,arguments)};return Object.setPrototypeOf(y,s),y}),R6={}.hasOwnProperty;class z1 extends O6{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=d6()}copy(){const u=new z1;let c=-1;for(;++c<this.attachers.length;){const s=this.attachers[c];u.use(...s)}return u.data(T1(!0,{},this.namespace)),u}data(u,c){return typeof u=="string"?arguments.length===2?(D1("data",this.frozen),this.namespace[u]=c,this):R6.call(this.namespace,u)&&this.namespace[u]||void 0:u?(D1("data",this.frozen),this.namespace=u,this):this.namespace}freeze(){if(this.frozen)return this;const u=this;for(;++this.freezeIndex<this.attachers.length;){const[c,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const h=c.call(u,...s);typeof h=="function"&&this.transformers.use(h)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(u){this.freeze();const c=Nv(u),s=this.parser||this.Parser;return _1("parse",s),s(String(c),c)}process(u,c){const s=this;return this.freeze(),_1("process",this.parser||this.Parser),C1("process",this.compiler||this.Compiler),c?h(void 0,c):new Promise(h);function h(y,v){const b=Nv(u),T=s.parse(b);s.run(T,b,function(O,R,z){if(O||!R||!z)return E(O);const _=R,Y=s.stringify(_,z);_6(Y)?z.value=Y:z.result=Y,E(O,z)});function E(O,R){O||!R?v(O):y?y(R):c(void 0,R)}}}processSync(u){let c=!1,s;return this.freeze(),_1("processSync",this.parser||this.Parser),C1("processSync",this.compiler||this.Compiler),this.process(u,h),Sx("processSync","process",c),s;function h(y,v){c=!0,mx(y),s=v}}run(u,c,s){bx(u),this.freeze();const h=this.transformers;return!s&&typeof c=="function"&&(s=c,c=void 0),s?y(void 0,s):new Promise(y);function y(v,b){const T=Nv(c);h.run(u,T,E);function E(O,R,z){const _=R||u;O?b(O):v?v(_):s(void 0,_,z)}}}runSync(u,c){let s=!1,h;return this.run(u,c,y),Sx("runSync","run",s),h;function y(v,b){mx(v),h=b,s=!0}}stringify(u,c){this.freeze();const s=Nv(c),h=this.compiler||this.Compiler;return C1("stringify",h),bx(u),h(u,s)}use(u,...c){const s=this.attachers,h=this.namespace;if(D1("use",this.frozen),u!=null)if(typeof u=="function")T(u,c);else if(typeof u=="object")Array.isArray(u)?b(u):v(u);else throw new TypeError("Expected usable value, not `"+u+"`");return this;function y(E){if(typeof E=="function")T(E,[]);else if(typeof E=="object")if(Array.isArray(E)){const[O,...R]=E;T(O,R)}else v(E);else throw new TypeError("Expected usable value, not `"+E+"`")}function v(E){if(!("plugins"in E)&&!("settings"in E))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");b(E.plugins),E.settings&&(h.settings=T1(!0,h.settings,E.settings))}function b(E){let O=-1;if(E!=null)if(Array.isArray(E))for(;++O<E.length;){const R=E[O];y(R)}else throw new TypeError("Expected a list of plugins, not `"+E+"`")}function T(E,O){let R=-1,z=-1;for(;++R<s.length;)if(s[R][0]===E){z=R;break}if(z===-1)s.push([E,...O]);else if(O.length>0){let[_,...Y]=O;const le=s[z][1];A1(le)&&A1(_)&&(_=T1(!0,le,_)),s[z]=[E,_,...Y]}}}}const w6=new z1().freeze();function _1(a,u){if(typeof u!="function")throw new TypeError("Cannot `"+a+"` without `parser`")}function C1(a,u){if(typeof u!="function")throw new TypeError("Cannot `"+a+"` without `compiler`")}function D1(a,u){if(u)throw new Error("Cannot call `"+a+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bx(a){if(!A1(a)||typeof a.type!="string")throw new TypeError("Expected node, got `"+a+"`")}function Sx(a,u,c){if(!c)throw new Error("`"+a+"` finished async. Use `"+u+"` instead")}function Nv(a){return z6(a)?a:new gx(a)}function z6(a){return!!(a&&typeof a=="object"&&"message"in a&&"messages"in a)}function _6(a){return typeof a=="string"||C6(a)}function C6(a){return!!(a&&typeof a=="object"&&"byteLength"in a&&"byteOffset"in a)}const D6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ex=[],Tx={allowDangerousHtml:!0},M6=/^(https?|ircs?|mailto|xmpp)$/i,N6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function k6(a){const u=U6(a),c=H6(a);return j6(u.runSync(u.parse(c),c),a)}function U6(a){const u=a.rehypePlugins||Ex,c=a.remarkPlugins||Ex,s=a.remarkRehypeOptions?{...a.remarkRehypeOptions,...Tx}:Tx;return w6().use(h3).use(c).use(c6,s).use(u)}function H6(a){const u=a.children||"",c=new gx;return typeof u=="string"&&(c.value=u),c}function j6(a,u){const c=u.allowedElements,s=u.allowElement,h=u.components,y=u.disallowedElements,v=u.skipHtml,b=u.unwrapDisallowed,T=u.urlTransform||B6;for(const O of N6)Object.hasOwn(u,O.from)&&(""+O.from+(O.to?"use `"+O.to+"` instead":"remove it")+D6+O.id,void 0);return u.className&&(a={type:"element",tagName:"div",properties:{className:u.className},children:a.type==="root"?a.children:[a]}),dx(a,E),tM(a,{Fragment:mt.Fragment,components:h,ignoreInvalidStyle:!0,jsx:mt.jsx,jsxs:mt.jsxs,passKeys:!0,passNode:!0});function E(O,R,z){if(O.type==="raw"&&z&&typeof R=="number")return v?z.children.splice(R,1):z.children[R]={type:"text",value:O.value},R;if(O.type==="element"){let _;for(_ in r1)if(Object.hasOwn(r1,_)&&Object.hasOwn(O.properties,_)){const Y=O.properties[_],le=r1[_];(le===null||le.includes(O.tagName))&&(O.properties[_]=T(String(Y||""),_,O))}}if(O.type==="element"){let _=c?!c.includes(O.tagName):y?y.includes(O.tagName):!1;if(!_&&s&&typeof R=="number"&&(_=!s(O,R,z)),_&&z&&typeof R=="number")return b&&O.children?z.children.splice(R,1,...O.children):z.children.splice(R,1),R}}}function B6(a){const u=a.indexOf(":"),c=a.indexOf("?"),s=a.indexOf("#"),h=a.indexOf("/");return u===-1||h!==-1&&u>h||c!==-1&&u>c||s!==-1&&u>s||M6.test(a.slice(0,u))?a:""}const L6="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%20strokeWidth='1.5'%20stroke='currentColor'%3e%3cpath%20strokeLinecap='round'%20strokeLinejoin='round'%20d='M6%2012L3.269%203.126A59.768%2059.768%200%200121.485%2012%2059.77%2059.77%200%20013.27%2020.876L5.999%2012zm0%200h7.5'%20/%3e%3c/svg%3e",Ax="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%20stroke-width='1.5'%20stroke='currentColor'%3e%3cpath%20strokeLinecap='round'%20strokeLinejoin='round'%20d='M19.5%208.25l-7.5%207.5-7.5-7.5'%20/%3e%3c/svg%3e",Z6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAgKADAAQAAAABAAAAgAAAAABrRiZNAAAym0lEQVR4Ae19CXRcx3Xl+7+7se8AARD7RpAgFoICCYCkFtq0bEuyYsmy7HjJYjue5IzjjBMnmSTjzGTGZzJZJseZmRMfx87iJTORbVmLJduSJVGUxA0kwQUgCBLEvpHYAQLE2t1/7q1Gg43uagKksNFB4TS6f/36Va9evXpbvaovspk2MbCJgU0MbGJgEwObGNjEwCYGNjGwiYFNDGxiYBMDmxj4t4IB4xe3oxWO0hzJt0xbvilWllhGvNiMKMMybGKI5RZrUixrWNzS5zas9rBpd0Ntb+3kLy4+9D37RSEAs6qgKmrSbWYbMnfIbdjeZ4pRgoGOQrdD8HHgYxexTEHmfHLj24U8J/Jm8XvKEqsZlHHMLeYb7hnX+dSeiLEjcgT3f3HTAjbuxS4ePHjQPtAxWWwzjYctMT6Gib1HDGNl+mRJj2UZ37MZ1suuuZu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gdudE/B9fhSSkL6Wxj8OSBuu82wA4FrnzjjqZTBm3YSQSRfHp6c+2pzV237ciAZGr82Ca72Ykps2jH4MXEAllGEuoCb9ejJciBeuoyJk3rFYbsCLnDb4Nt3RQBeMPqGe7ozwlLenAt1vAJfbhfiXraCAScuqaF5K3j33xNQfH6K0f+vLsv5tYstp06Mj1+7LeXrmuwb7emMScw47DCtn0PvwvEdkge6itKV3eh5sDIc4AKu/uFu6j5B010pgUFrUzeetpXnXI12meGZaH83rGluKk2Hvs7AxYX2YJ/wtSjzdhTsccTJAdnqGpwEUfELbmfcu/UuApSEIW7NIK8P5kUrogdPTtmNM7GTzmHG398etuXf5bkCY2PuuFDLUQqWUAVkboezPRPfWC707ONkbYDHCQA9Kzae6kF4CGLjPZRDHxcI0UDABLiLMs3QRzfqurXAj5N08Zi6B14GerZQr6cexksikmyhLPyIrFO1gZKohzAslFVtIJDORJxa77gr7Hvt7Ud4RsFm2sTAJgY2MbCJgU0MbGJgEwObGNjEwCYGNjGwiYFNDGxiYBMDmxj4t4yB/w+Iyhhsm8O/RwAAAABJRU5ErkJggg==",q6=Es(["asw-widget font-inter fixed transition-all"],{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6"},open:{true:"h-5/6 max-h-[800px] w-80",false:"w-16 h-16"}},defaultVariants:{position:"bottom-right",open:!1}}),Y6=Es(["rounded-[43px] flex flex-col justify-between absolute w-80 h-5/6","bg-asm-gray-500 shadow-lg transition-all duration-300","motion-reduce:transition-none transform-gpu overflow-hidden"],{variants:{position:{"bottom-right":"right-2 origin-bottom-right","bottom-left":"left-2 origin-bottom-left"},open:{true:"scale-100 bottom-20",false:"scale-0 bottom-2"}},defaultVariants:{position:"bottom-right",open:!1}}),V6=Es(["relative w-full z-[2] transition-all motion-reduce:transition-none","origin-middle-right transform-gpu flex items-end"],{variants:{active:{true:"mr-0",false:"-mr-[4.5rem]"}}}),G6=Es(["relative flex items-center justify-center shrink-0 z-[1]","transition-all motion-reduce:transition-none origin-center-left transform-gpu","rounded-full text-asm-purple bg-transparent hover:bg-asm-blue/30 cursor-pointer bottom-1"],{variants:{active:{true:"scale-100 translate-x-0 w-10 h-10 ml-2",false:"scale-0 -translate-x-[2rem] w-0 h-0 ml-0"}}}),X6=Es(["absolute left-0 bottom-0 z-[3] h-3/4 w-full mb-24","transition-all duration-300 motion-reduce:transition-none transform-gpu"],{variants:{active:{true:"translate-y-0",false:"translate-y-full"}}}),Q6=Es(["flex gap-2"],{variants:{role:{user:"flex-row-reverse",assistant:"flex-row",system:"flex-row"}}}),I6=Es(["absolute bottom-0 text-white w-16 h-16 flex justify-center items-center","shadow-md cursor-pointer transition-colors duration-300 ease-in-out"],{variants:{position:{"bottom-right":"right-0 rounded-bl-[50%] rounded-tl-[50%] rounded-tr-[50%] rounded-br","bottom-left":"left-0 rounded-br-[50%] rounded-tr-[50%] rounded-tl-[50%] rounded-bl"},open:{true:"bg-asm-pink-400",false:"bg-asm-purple"}},defaultVariants:{position:"bottom-right",open:!1}});function xx(a){return a!=null&&a.persist?`asm-widget:${a.endpoint??"/api/chat"}:${a.context??""}`:null}function J6(a){if(!a)return null;try{const u=sessionStorage.getItem(a);return u?JSON.parse(u):null}catch{return null}}function $6(a){const u=xx(a),c=J6(u);return c||((a==null?void 0:a.initialMessages)??[]).map((s,h)=>({id:`initial-${h}`,role:s.role,parts:[{type:"text",text:s.content}],createdAt:new Date}))}const K6=({config:a,open:u,defaultOpen:c=!1,onOpenChange:s,onMessage:h,onError:y,children:v})=>{const b=bn.useRef(null),T=bn.useRef(null),E=bn.useRef(0),O=(a==null?void 0:a.position)??"bottom-right",[R]=bn.useState(()=>new PT({api:(a==null?void 0:a.endpoint)??"/api/chat",body:{...(a==null?void 0:a.systemPrompt)!==void 0&&{systemPrompt:a.systemPrompt},...(a==null?void 0:a.context)!==void 0&&{context:a.context},...(a==null?void 0:a.mcpServerUrl)!==void 0&&{mcpServerUrl:a.mcpServerUrl},...(a==null?void 0:a.model)!==void 0&&{model:a.model},...(a==null?void 0:a.temperature)!==void 0&&{temperature:a.temperature},...(a==null?void 0:a.user)!==void 0&&{user:a.user}}})),[z]=bn.useState(()=>$6(a)),{error:_,stop:Y,status:le,messages:X,sendMessage:k}=OD({transport:R,messages:z}),L=le==="submitted"||le==="streaming",D=u!==void 0,[oe,ne]=bn.useState(c),Q=D?u:oe,pe=bn.useCallback(F=>{D||ne(F),s==null||s(F)},[D,s]),[we,Se]=bn.useState(!1),[He,be]=bn.useState(""),Ee=xx(a);bn.useEffect(()=>{if(Ee&&X.length>0)try{sessionStorage.setItem(Ee,JSON.stringify(X))}catch{}},[X,Ee]),bn.useEffect(()=>{X.length>E.current&&X.slice(E.current).forEach(ge=>{if(ge.role==="assistant"){const Ne=ge.parts.filter(Gb).map(A=>A.text).join("");h==null||h({role:ge.role,content:Ne})}}),E.current=X.length},[X,h]),bn.useEffect(()=>{_&&(y==null||y(_))},[_,y]),bn.useEffect(()=>{T.current&&(T.current.scrollTop=T.current.scrollHeight)},[X]),bn.useEffect(()=>()=>{Y()},[]),bn.useEffect(()=>{const F=b.current;if(!F)return;const ge=Ne=>{var A;Ne.key==="Enter"&&!Ne.shiftKey&&(Ne.repeat||(A=F.form)==null||A.requestSubmit(),Ne.preventDefault())};return F.addEventListener("keydown",ge),()=>F.removeEventListener("keydown",ge)},[]);const Qe=()=>{Q&&Y(),pe(!Q)},ke=F=>{F.preventDefault(),He.trim()&&(k({parts:[{type:"text",text:He}]}),be(""))},Te=(a==null?void 0:a.logo)??Z6,q=(a==null?void 0:a.title)??"Ask ASMBL";return mt.jsxs("div",{className:q6({position:O,open:Q}),children:[mt.jsxs("div",{className:Y6({position:O,open:Q}),children:[mt.jsxs("div",{className:"px-4 py-6",children:[mt.jsx("h2",{className:"text-2xl font-bold text-asm-purple flex items-center gap-1",children:q}),mt.jsx("button",{className:"absolute top-4 right-4 text-asm-purple transition-colors bg-transparent hover:bg-asm-blue/30 rounded-full w-10 h-10 flex justify-center items-center cursor-pointer",onClick:()=>Se(!1),disabled:!we,"aria-label":"Hide chat",children:mt.jsx("img",{width:20,height:20,src:Ax,alt:""})})]}),!L&&we&&_&&mt.jsxs("div",{className:"absolute bg-asm-white w-full opacity-8 z-40 flex flex-col gap-2 items-center justify-center h-full",children:[mt.jsx("button",{className:"absolute top-2 right-2 text-asm-purple transition-colors bg-transparent hover:bg-asm-blue/30 rounded-full w-10 h-10 flex justify-center items-center cursor-pointer",onClick:()=>Se(!1),"aria-label":"Hide chat",children:mt.jsx("img",{width:20,height:20,src:Ax,alt:""})}),mt.jsxs("h3",{className:"text-center font-bold",children:["Sorry, I'm having trouble",mt.jsx("br",{}),"connecting right now."]}),mt.jsx("p",{className:"text-center",children:":("})]}),mt.jsx("div",{className:X6({active:we}),children:mt.jsx("div",{className:"flex flex-col justify-end relative h-full bg-asm-white w-full border border-b-0 rounded-t-[43px] overflow-hidden",children:X.length>0?mt.jsx("div",{className:"overflow-y-auto h-full",ref:T,children:X.map((F,ge)=>mt.jsx("div",{className:"px-4 py-2 first:pt-4 last:pb-4",style:{overflowAnchor:"none"},children:mt.jsxs("div",{className:Q6({role:F.role}),children:[mt.jsx("div",{className:"relative shrink-0",children:F.role==="user"?mt.jsx("div",{className:"rounded-full bg-asm-gray-500 ml-1 w-10 h-10 p-2",children:mt.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:mt.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})}):mt.jsxs("div",{className:"relative",children:[L&&ge+1===X.length&&mt.jsx("span",{className:"shadow text-xs text-asm-gray-400 leading-none absolute -bottom-4 left-4 z-10 bg-white pb-2 px-2 rounded-xl",children:"..."}),mt.jsx("img",{className:"mr-1",width:36,height:36,src:Te,alt:""})]})}),F.role==="user"?mt.jsx("div",{className:"bg-asm-pink-400 rounded-3xl rounded-tr-none w-full",children:mt.jsx("p",{className:"text-gray-600 text-sm p-3",children:F.parts.filter(Gb).map(Ne=>Ne.text).join("")})}):mt.jsx("div",{className:"bg-asm-gray-500 rounded-3xl rounded-tl-none w-full",children:mt.jsx("div",{className:"text-gray-600 text-sm p-3 prose prose-sm max-w-none",children:mt.jsx(k6,{children:F.parts.filter(Gb).map(Ne=>Ne.text).join("")})})})]})},F.id))}):mt.jsxs("div",{className:"flex flex-col gap-2 items-center justify-center h-full px-4",children:[v??(a!=null&&a.welcomeHeading?mt.jsx("h3",{className:"text-center font-bold",children:a.welcomeHeading}):null),L&&mt.jsx("p",{className:"text-center bg-white py-1 px-2 rounded-xl text-sm",children:"This should only take a moment…"})]})})}),mt.jsx("div",{className:"absolute bottom-0 left-0 w-full flex items-center px-4 py-6 z-50 bg-asm-gray-500",children:mt.jsxs("form",{className:V6({active:we}),onSubmit:ke,children:[mt.jsx("textarea",{ref:b,style:{height:b.current&&document.activeElement===b.current?`${b.current.scrollHeight}px`:"auto"},rows:1,cols:1,onFocus:()=>Se(!0),value:He,onChange:F=>{Se(!0),be(F.target.value)},className:"w-full border border-gray-300 rounded-3xl px-4 py-[.625rem] min-h-[46px] max-h-[500px] focus:outline-asm-gray-500",placeholder:(a==null?void 0:a.placeholder)??""}),mt.jsx("button",{className:G6({active:we}),type:"submit",disabled:!we,"aria-label":"Send message",children:mt.jsx("img",{className:"-rotate-45",width:24,height:24,src:L6,alt:""})})]})})]}),mt.jsx("button",{className:I6({position:O,open:Q}),onClick:Qe,"aria-label":Q?"Close widget":"Open widget",children:mt.jsx("img",{className:"absolute",width:30,height:30,src:Te,alt:""})})]})},P6="asm-widget-root";function F6(a,u=P6){let c=document.getElementById(u);c||(c=document.createElement("div"),c.id=u,document.body.appendChild(c)),NO.createRoot(c).render(bn.createElement(K6,{config:a}))}window.AsmWidget={init:F6}})();
|