@liip/liipgpt 3.3.2 → 3.3.4
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/button/liipgpt-button.iife.js +100 -61
- package/chat/liipgpt-chat.iife.js +102 -66
- package/config/index.cjs +13289 -3693
- package/config/index.d.ts +5246 -26814
- package/config/index.js +13253 -3657
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/6gGOJNBB.js +1 -0
- package/configurator/_app/immutable/chunks/B9KqQVWK.js +1 -0
- package/configurator/_app/immutable/chunks/BR4Ri1mV.js +15 -0
- package/configurator/_app/immutable/chunks/BXCiGO5D.js +1 -0
- package/configurator/_app/immutable/chunks/BXvq-tJR.js +1 -0
- package/configurator/_app/immutable/chunks/Bg7q39r6.js +1 -0
- package/configurator/_app/immutable/chunks/{CUA2mQrz.js → CR5-hwU3.js} +1 -1
- package/configurator/_app/immutable/chunks/CfJtR48A.js +2 -0
- package/configurator/_app/immutable/chunks/DDdNR6B9.js +1 -0
- package/configurator/_app/immutable/chunks/DP18hDNz.js +324 -0
- package/configurator/_app/immutable/chunks/DZ0jooU7.js +1 -0
- package/configurator/_app/immutable/chunks/DoVxcdSh.js +143 -0
- package/configurator/_app/immutable/chunks/DsnmJJEf.js +1 -0
- package/configurator/_app/immutable/chunks/NTlCU5wx.js +113 -0
- package/configurator/_app/immutable/chunks/hrZ0qwUL.js +1 -0
- package/configurator/_app/immutable/entry/app.DX1BO32c.js +2 -0
- package/configurator/_app/immutable/entry/start.DU4iEglC.js +1 -0
- package/configurator/_app/immutable/nodes/{0.B1_BHoHM.js → 0.DFZ7OBkw.js} +3 -3
- package/configurator/_app/immutable/nodes/1.RVsOXI4d.js +1 -0
- package/configurator/_app/immutable/nodes/2.gxyeht7h.js +31 -0
- package/configurator/_app/immutable/nodes/3.BbSVwn6I.js +954 -0
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +12 -12
- package/configurator/sidebar.html +12 -12
- package/index.cjs +16249 -6028
- package/index.d.ts +6952 -70037
- package/index.js +16249 -6028
- package/package.json +4 -4
- package/configurator/_app/immutable/chunks/BHyoBcMB.js +0 -15
- package/configurator/_app/immutable/chunks/Bwlnp1Fv.js +0 -3
- package/configurator/_app/immutable/chunks/C8ORMuNm.js +0 -286
- package/configurator/_app/immutable/chunks/Cg1M8nhR.js +0 -1
- package/configurator/_app/immutable/chunks/CjlIFGQR.js +0 -1
- package/configurator/_app/immutable/chunks/DEfNJr1d.js +0 -1
- package/configurator/_app/immutable/chunks/DShclvIF.js +0 -116
- package/configurator/_app/immutable/chunks/Dzs3iOAP.js +0 -1
- package/configurator/_app/immutable/chunks/KwlzJn94.js +0 -1
- package/configurator/_app/immutable/chunks/NZTpNUN0.js +0 -1
- package/configurator/_app/immutable/chunks/PaGpozZ3.js +0 -1
- package/configurator/_app/immutable/chunks/UUVzZ2eQ.js +0 -1
- package/configurator/_app/immutable/chunks/bzMFxNOM.js +0 -143
- package/configurator/_app/immutable/chunks/tg4KZpKp.js +0 -1
- package/configurator/_app/immutable/entry/app.wS03Lw9v.js +0 -2
- package/configurator/_app/immutable/entry/start.DC6usZVj.js +0 -1
- package/configurator/_app/immutable/nodes/1.Qf-3txMY.js +0 -1
- package/configurator/_app/immutable/nodes/2.QF2vvVAB.js +0 -31
- package/configurator/_app/immutable/nodes/3.y9o-F-NC.js +0 -897
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import{a7 as Jr,a8 as Wr}from"./CfJtR48A.js";import{B as Vr}from"./hrZ0qwUL.js";function Ka(e,r,...o){var t=new Vr(e);Jr(()=>{const n=r()??null;t.ensure(n,n&&(a=>n(a,...o)))},Wr)}const Ya="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Xa="3.3.4";function Hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ue,je;function Gr(){if(je)return ue;je=1;var e=function(b){return r(b)&&!o(b)};function r(g){return!!g&&typeof g=="object"}function o(g){var b=Object.prototype.toString.call(g);return b==="[object RegExp]"||b==="[object Date]"||a(g)}var t=typeof Symbol=="function"&&Symbol.for,n=t?Symbol.for("react.element"):60103;function a(g){return g.$$typeof===n}function i(g){return Array.isArray(g)?[]:{}}function s(g,b){return b.clone!==!1&&b.isMergeableObject(g)?z(i(g),g,b):g}function c(g,b,k){return g.concat(b).map(function(w){return s(w,k)})}function l(g,b){if(!b.customMerge)return z;var k=b.customMerge(g);return typeof k=="function"?k:z}function d(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(b){return Object.propertyIsEnumerable.call(g,b)}):[]}function f(g){return Object.keys(g).concat(d(g))}function m(g,b){try{return b in g}catch{return!1}}function v(g,b){return m(g,b)&&!(Object.hasOwnProperty.call(g,b)&&Object.propertyIsEnumerable.call(g,b))}function T(g,b,k){var w={};return k.isMergeableObject(g)&&f(g).forEach(function(y){w[y]=s(g[y],k)}),f(b).forEach(function(y){v(g,y)||(m(g,y)&&k.isMergeableObject(b[y])?w[y]=l(y,k)(g[y],b[y],k):w[y]=s(b[y],k))}),w}function z(g,b,k){k=k||{},k.arrayMerge=k.arrayMerge||c,k.isMergeableObject=k.isMergeableObject||e,k.cloneUnlessOtherwiseSpecified=s;var w=Array.isArray(b),y=Array.isArray(g),Oe=w===y;return Oe?w?k.arrayMerge(g,b,k):T(g,b,k):s(b,k)}z.all=function(b,k){if(!Array.isArray(b))throw new Error("first argument should be an array");return b.reduce(function(w,y){return z(w,y,k)},{})};var U=z;return ue=U,ue}var Kr=Gr();const Yr=Hr(Kr),Xr=e=>e===null||typeof e!="object",fe=e=>{if(Xr(e))return e;if(Array.isArray(e))return e.map(fe);const r=Object.entries(e).filter(([o,t])=>t!==void 0).map(([o,t])=>[o,fe(t)]);return Object.fromEntries(r)},qr=(e,r)=>{const o=fe(r);return Yr(e,o)},or={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},base:{fontSizeXs:{minRem:.75,maxRem:.875},fontSizeSm:{minRem:1,maxRem:1},fontSizeBody:{minRem:1,maxRem:1.25},fontSizeH3:{minRem:1.125,maxRem:1.5},fontSizeH2:{minRem:1.25,maxRem:1.75},fontSizeH1:{minRem:1.5,maxRem:2},fontWeightNormal:"400",fontWeightBold:"700",fontWeightTitle:"700",lineHeightDefault:"1.5",lineHeightSnug:"1.375",lineHeightTight:"1.25",borderRadius:{minRem:.5,maxRem:.75},lineColor:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)",boxShadow:"0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"},components:{body:{background:"var(--color-grey-0)",color:"var(--color-grey-900)",focus:{color:"var(--color-highlight-500)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)",focusWidth:"var(--spacer-3)",focusOffset:"var(--spacer-2)",focusStyle:"solid"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-700)",hover:{color:"var(--color-brand-950)"}},btnPrimary:{color:"var(--color-grey-0)",background:"var(--color-brand-700)",borderRadius:"var(--base-border-radius)",hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",borderRadius:"var(--base-border-radius)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--anchor-color)",background:"transparent",borderRadius:"var(--base-border-radius)",hover:{color:"var(--anchor-hover-color)"}},card:{color:"var(--color-grey-900)",background:"var(--color-grey-100)",borderRadius:"var(--base-border-radius)",boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"var(--base-border-radius)",custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)",placeholderOpacity:"1"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},checkbox:{color:"transparent",background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"0.2em",custom:{checkedColor:"var(--btn-primary-color)",checkedBorderColor:"var(--color-brand-700)",checkedBackground:"var(--color-brand-700)"}},radio:{color:"transparent",background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",custom:{checkedColor:"var(--btn-primary-color)",checkedBorderColor:"var(--color-brand-700)",checkedBackground:"var(--color-brand-700)"}},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",boxShadow:"var(--base-box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--base-font-weight-bold)",separatorColor:"var(--base-line-color)",errorColor:"var(--message-error-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:"var(--base-border-radius)",boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:"var(--base-border-radius)",borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:"calc(var(--base-border-radius) / 1.25)",hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#DD135A",color:"var(--color-grey-0)",borderColor:"#DD135A",borderWidth:"1px",borderRadius:"var(--chat-input-border-radius)"},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",boxShadow:"var(--base-box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--base-line-color)"}},aside:{background:"var(--card-background)",custom:{width:"400px",containerWidthForMobileLayout:1024,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--base-line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--base-line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:"var(--card-border-radius)"},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"},custom:{hideTitleWhenCollapsed:0,autoExpandScrollThreshold:0,autoCollapseDelay:0,autoExpandOnce:0}},referencesToggle:{color:"var(--color-brand-700)",hover:{color:"var(--anchor-hover-color)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{padding:"0.25em"}},referenceDomain:{color:"var(--color-brand-700)",hover:{color:"var(--color-brand-800)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"},boxShadow:"var(--base-box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",hover:{color:"var(--card-hover-color)",background:"var(--body-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceDescription:{color:"var(--reference-color)",hover:{color:"var(--reference-hover-color)"}},referenceNumber:{color:"var(--reference-number-trigger-color)",background:"var(--body-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)",borderRadius:"var(--reference-number-trigger-border-radius)",hover:{color:"var(--reference-number-trigger-color)",background:"var(--reference-number-trigger-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)"},custom:{padding:"var(--reference-number-trigger-padding)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--base-box-shadow)",borderRadius:"var(--card-border-radius)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)"},flyout:{custom:{backdropColor:"var(--color-brand-800)",backdropOpacity:"0.4",backdropDelayIn:"0",backdropDurationIn:"200",backdropDelayOut:"0",backdropDurationOut:"150",backdropBaseScaleIn:"1",backdropBaseScaleOut:"1",backdropTransformOrigin:"center",backdropScaleDirection:"scale"}}},svgs:{predefinedQuestion:`
|
|
2
|
+
<svg viewBox="0 0 24 24" >
|
|
3
|
+
<path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
4
|
+
<path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
5
|
+
<path d="M23.5 3.5A10.5 10.5 0 0 0 13 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
6
|
+
<path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
7
|
+
</svg>
|
|
8
|
+
`,edit:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m15.9 4.7 3.5 3.5-10.8 10.8-3.5-3.5z"/><path d="m5.1 15.4-1.7 5.3 5.3-1.7-3.5-3.5z"/><path d="m19.3 8.1-3.5-3.5.6-.6c1-1 2.6-.9 3.5 0 .9 1 .9 2.5 0 3.5z"/></g></svg>',newConversation:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m12.6 15.3-4.7 1.6 1.5-4.8 7.6-7.6c.6-.6 1.5-.6 2.1 0l1.1 1.1c.6.6.6 1.5 0 2.1l-7.7 7.7z"/><path d="m12.8 15.1-3.3-3.3"/><path d="m20.2 12.1v7.4c0 .8-.7 1.5-1.5 1.5h-13.8c-.8 0-1.5-.7-1.5-1.5v-14.5c0-.8.7-1.5 1.5-1.5h8.4"/></g></svg>',voteUp:'<svg viewBox="0 0 24 24"><path d="M0.5 8.372h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M3.5 19.372c7.339 3.726 6.981 3.235 13.265 3.235 2.632 0 3.958 -1.715 4.732 -4.228l0 -0.016 1.907 -6.4 0 -0.012A2 2 0 0 0 21.5 9.372h-4.9a2 2 0 0 1 -1.934 -2.51l0.882 -3.344a1.713 1.713 0 0 0 -3.06 -1.418L7.6 9.025a2 2 0 0 1 -1.634 0.847H3.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',voteDown:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m.5 2.5h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-2"/><path d="m3.5 15h2.5c.6 0 1.3.3 1.6.8l4.9 6.9c.4.6 1.1.9 1.8.7.9-.2 1.5-1.2 1.2-2.1l-.9-3.3c0-.2 0-.3 0-.5 0-1.1.9-2 2-2h4.9.6c1.1-.3 1.7-1.4 1.3-2.5s-1.9-6.4-1.9-6.4c-.8-2.5-2.1-4.2-4.7-4.2-6.3 0-5.9-.5-13.3 3.2"/></g></svg>',retry:`
|
|
9
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
10
|
+
<g stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
11
|
+
<path d="M19.701 5.488a10.063 10.063 0 0 0-7.7-3.573C6.43 1.915 1.914 6.43 1.914 12c0 1.17.2 2.293.565 3.338m1.84 3.199A10.063 10.063 0 0 0 12 22.085c5.57 0 10.085-4.515 10.085-10.085 0-1.224-.218-2.397-.617-3.482" stroke-miterlimit="10"/>
|
|
12
|
+
<path d="M16.802 5.784h3.16v-3.16M7.198 18.216h-3.16v3.16"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
15
|
+
`,message:'<svg viewBox="0 0 24 24"><path d="m12 1.6c-6 0-10.9 4-10.9 9 0 2.5 1.2 4.8 3.2 6.4l-2.3 5.4 6-3.4c1.3.4 2.6.6 3.9.6 6 0 10.9-4 10.9-9s-4.8-9-10.8-9z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',messageLoading:`<svg viewBox="0 0 24 24" width="24" height="24">
|
|
16
|
+
<circle cx="6" cy="23" r="1.75" fill="currentColor">
|
|
17
|
+
<animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0s"/>
|
|
18
|
+
</circle>
|
|
19
|
+
<circle cx="12" cy="23" r="1.75" fill="currentColor">
|
|
20
|
+
<animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.3s"/>
|
|
21
|
+
</circle>
|
|
22
|
+
<circle cx="18" cy="23" r="1.75" fill="currentColor">
|
|
23
|
+
<animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.6s"/>
|
|
24
|
+
</circle>
|
|
25
|
+
</svg>`,thread:'<svg viewBox="0 0 24 24"><path d="M9.5 16.5c0 4.288 5 7.5 9.5 5.5l4 1.5 -1.5 -3a4.994 4.994 0 0 0 2 -4c0 -3.154 -3.134 -6 -7 -6s-7 2.846 -7 6Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.4 8.5a5.822 5.822 0 0 0 0.1 -1c0 -3.866 -3.8 -7 -8.5 -7S0.5 3.634 0.5 7.5a6.434 6.434 0 0 0 2.517 4.97L1 16l4.939 -1.976a9.993 9.993 0 0 0 1.561 0.361" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',submit:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m12 1v22"/><path d="m4 9 8-8 8 8"/></g></svg>',abort:'<svg viewBox="0 0 24 24"><g fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 5h14v14H5z"/></g></svg>',expand:'<svg viewBox="0 0 24 24"><path d="m22 7-10 10-10-10" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',help:'<svg fill="none" viewBox="0 0 12 12"><path d="M5.04 7.955v-.161c.004-.555.053-.998.148-1.328.099-.33.241-.596.429-.799.187-.203.412-.387.675-.552.197-.127.373-.258.528-.395a1.71 1.71 0 0 0 .371-.452 1.15 1.15 0 0 0 .138-.561c0-.219-.052-.41-.157-.576a1.045 1.045 0 0 0-.423-.38 1.26 1.26 0 0 0-.58-.133c-.207 0-.402.046-.586.138a1.117 1.117 0 0 0-.452.4c-.117.174-.18.39-.19.65H3c.016-.633.168-1.157.457-1.569.288-.416.67-.725 1.146-.928.476-.206 1-.309 1.575-.309.631 0 1.19.105 1.675.314.485.206.865.506 1.141.9.276.392.414.867.414 1.422 0 .37-.062.7-.185.99-.12.285-.29.538-.51.76a3.943 3.943 0 0 1-.775.595c-.25.15-.457.304-.618.466a1.584 1.584 0 0 0-.357.562 2.42 2.42 0 0 0-.119.785v.161H5.041ZM5.984 11c-.317 0-.588-.111-.814-.333a1.095 1.095 0 0 1-.328-.809c-.003-.31.106-.577.328-.799.226-.222.497-.333.814-.333.301 0 .566.111.794.333a1.092 1.092 0 0 1 .181 1.375 1.23 1.23 0 0 1-.414.414 1.081 1.081 0 0 1-.561.152Z" fill="currentColor"/></svg>',attach:'<svg viewBox="0 0 24 24"><path d="m7.618 15.345 8.666 -8.666a2.039 2.039 0 1 1 2.883 2.883L7.461 21.305a4.078 4.078 0 0 1 -5.767 -5.768L13.928 3.305a5.606 5.606 0 0 1 7.929 7.928L13.192 19.9" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',record:'<svg viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" fill="currentColor"/><path d="M19 10v2a7 7 0 0 1-14 0v-2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 19v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 23h8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',reward:'<svg viewBox="0 0 24 24"><path d="M23.5 10.5a1 1 0 0 1 -1 1h-21a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h21a1 1 0 0 1 1 1Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M21.5 22.5a1 1 0 0 1 -1 1h-17a1 1 0 0 1 -1 -1v-11h19Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m8.5 7.5 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m15.5 23.5 0 -16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.427 3.84C16.663 4.605 13 5.5 13 5.5s0.9 -3.663 1.66 -4.427a1.957 1.957 0 1 1 2.767 2.767Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M6.573 3.84C7.337 4.605 11 5.5 11 5.5s-0.9 -3.663 -1.66 -4.427A1.957 1.957 0 0 0 6.573 3.84Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',share:'<svg viewBox="0 0 24 24"><g><path d="M14.8 12.56a2.25 2.25 0 0 0 3.27 0.1l4.45 -4.45a3.37 3.37 0 0 0 0 -4.76l-2 -2a3.37 3.37 0 0 0 -4.76 0l-4.42 4.48a2.24 2.24 0 0 0 0.1 3.26" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.2 11.44a2.26 2.26 0 0 0 -3.27 -0.1l-4.45 4.45a3.37 3.37 0 0 0 0 4.76l2 2a3.37 3.37 0 0 0 4.76 0l4.45 -4.45a2.25 2.25 0 0 0 -0.1 -3.27" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m7.64 16.36 8.72 -8.72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g></svg>',audio:'<svg viewBox="0 0 24 24"><path d="M5.5 9H2a1.5 1.5 0 0 0 -1.5 1.5v3A1.5 1.5 0 0 0 2 15h3.5l6.147 6.146a0.5 0.5 0 0 0 0.853 -0.353V3.207a0.5 0.5 0 0 0 -0.853 -0.353Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M20 4a10.893 10.893 0 0 1 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.5 6a7.535 7.535 0 0 1 0 12" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15.5 8.5c2.677 1.947 2.669 5.06 0 7" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',copy:'<svg viewBox="0 0 24 24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16.4999 5.5V1.50049c0 -0.552286 -0.4477 -1.000002 -1 -1.000002H1.49988C0.947593 0.500488 0.499878 0.948203 0.499878 1.50049V15.5005c0 0.5523 0.447715 1 1.000002 1H5.5" stroke-width="1.5"></path><path stroke="currentColor" stroke-linejoin="round" d="M7.4999 8.49951c0 -0.55228 0.44772 -1 1 -1h14c0.5523 0 1 0.44772 1 1V22.4995c0 0.5523 -0.4477 1 -1 1h-14c-0.55228 0 -1 -0.4477 -1 -1V8.49951Z" stroke-width="1.5"></path></svg>',dismiss:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>',menu:'<svg viewBox="0 0 24 24"><g stroke="currentColor" stroke-linecap="round" stroke-width="1.5"><path d="m4 6h16"/><path d="m4 12h16"/><path d="m4 18h16"/></g></svg>',menuClose:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>',externalLink:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m18 6-12 12"/><path d="m18 17v-11h-11"/></g></svg>',internalLink:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"/><path d="m13 19 7-7-7-7"/></g></svg>',chevronDown:'<svg viewBox="0 0 24 24"><path d="m20 8-8 8-8-8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>',chevronUp:'<svg viewBox="0 0 24 24"><path d="m20 16-8-8-8 8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>',chevronTopDown:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m19 9-7-7-7 7"/><path d="m19 15-7 7-7-7"/></g></svg>',chevronDownSmall:'<svg viewBox="0 0 10 10" fill="none"><path d="M8.75 3.75C7.25 5.25 5 7.5 5 7.50L1.25 3.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',liip:'<svg viewBox="0 0 199 72"><path d="m125.352941.70588235 14.588235 7.05882353-32.705882 63.29411762-14.5882352-7.0588235zm-37.6470586 0 14.3529416 7.05882353-32.7058828 63.29411762-14.5882353-7.0588235zm78.8235296 45.17647055v23.0588236h-16.235294v-64.9411765h26.117647c14.588235 0 22.588235 10.3529412 22.588235 20.9411765 0 10.8235294-7.764706 20.9411764-22.588235 20.9411764zm0-27.5294117v13.1764706h9.17647c4.470589 0 7.058824-3.2941177 7.058824-6.5882353 0-3.2941177-2.588235-6.5882353-7.058824-6.5882353zm-166.11764729-14.3529412h16.23529409v50.8235294h27.7647059v14.1176471h-43.99999999z" fill="currentColor" fill-rule="evenodd"/></svg>',avatar:`
|
|
26
|
+
<div style="border-radius: 9999px; overflow: hidden;">
|
|
27
|
+
<svg viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
|
|
28
|
+
<style>
|
|
29
|
+
.svg--avatar {
|
|
30
|
+
--logo-color1: var(--color-brand-500);
|
|
31
|
+
--logo-color1-transparent: var(--color-brand-400);
|
|
32
|
+
|
|
33
|
+
--logo-color2: var(--color-highlight-400);
|
|
34
|
+
--logo-color2-transparent: var(--color-highlight-500);
|
|
35
|
+
|
|
36
|
+
--logo-color3: var(--color-brand-400);
|
|
37
|
+
--logo-color3-transparent: var(--color-highlight-500);
|
|
38
|
+
|
|
39
|
+
--logo-color4: var(--color-highlight-400);
|
|
40
|
+
--logo-color4-transparent: var(--color-brand-500);
|
|
41
|
+
|
|
42
|
+
--logo-glass-color: oklch(1 0 0 / 0.2); /* Soft white glass effect */
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
#group1 {
|
|
46
|
+
animation: group1_anim 8000ms ease-in-out infinite normal forwards;
|
|
47
|
+
/* Delay animation after fly-in animation */
|
|
48
|
+
transform: translate(30px, 30px);
|
|
49
|
+
animation-delay: 0.8s;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes group1_anim {
|
|
53
|
+
0% { transform: translate(30px, 30px); }
|
|
54
|
+
25% { transform: translate(50px, 100px); }
|
|
55
|
+
50% { transform: translate(90px, 30px); }
|
|
56
|
+
75% { transform: translate(50px, 50px); }
|
|
57
|
+
100% { transform: translate(30px, 30px); }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#group2 {
|
|
61
|
+
animation: group2_anim 8000ms ease-in-out infinite normal forwards;
|
|
62
|
+
/* Delay animation after fly-in animation */
|
|
63
|
+
transform: translate(-35px, -35px);
|
|
64
|
+
animation-delay: 0.8s;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@keyframes group2_anim {
|
|
68
|
+
0% { transform: translate(-35px, -35px); }
|
|
69
|
+
25% { transform: translate(25px, 40px); }
|
|
70
|
+
50% { transform: translate(100px, 35px); }
|
|
71
|
+
75% { transform: translate(25px, 25px); }
|
|
72
|
+
100% { transform: translate(-35px, -35px); }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#group3 {
|
|
76
|
+
overflow: visible;
|
|
77
|
+
animation: group3_anim 8000ms ease-in-out infinite normal forwards;
|
|
78
|
+
/* Delay animation after fly-in animation */
|
|
79
|
+
transform: translate(120px, 20px);
|
|
80
|
+
animation-delay: 0.8s;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes group3_anim {
|
|
84
|
+
0% { transform: translate(120px, 20px); }
|
|
85
|
+
25% { transform: translate(30px, 17px); }
|
|
86
|
+
50% { transform: translate(35px, 20px); }
|
|
87
|
+
75% { transform: translate(30px, 120px); }
|
|
88
|
+
100% { transform: translate(120px, 20px); }
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
#group4 {
|
|
92
|
+
animation: group4_anim 12000ms ease-in-out infinite normal forwards;
|
|
93
|
+
/* Delay animation after fly-in animation */
|
|
94
|
+
transform: translate(40px, -40px);
|
|
95
|
+
animation-delay: 0.8s;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes group4_anim {
|
|
99
|
+
0% { transform: translate(40px, -40px); }
|
|
100
|
+
25% { transform: translate(25px, 45px); }
|
|
101
|
+
50% { transform: translate(-20px, 120px); }
|
|
102
|
+
75% { transform: translate(50px, 0px); }
|
|
103
|
+
100% { transform: translate(40px, -40px); }
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
106
|
+
<defs>
|
|
107
|
+
<!-- Define the circular masks -->
|
|
108
|
+
<mask id="circleMask1">
|
|
109
|
+
<rect width="100" height="100" fill="black" />
|
|
110
|
+
<circle cx="50" cy="50" r="50" fill="white" />
|
|
111
|
+
</mask>
|
|
112
|
+
<mask id="circleMask2">
|
|
113
|
+
<rect width="100" height="100" fill="black" />
|
|
114
|
+
<circle cx="50" cy="50" r="46" fill="white" />
|
|
115
|
+
</mask>
|
|
116
|
+
|
|
117
|
+
<!-- Radial Gradients for Animations -->
|
|
118
|
+
<radialGradient id="gradient1" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
|
|
119
|
+
<stop offset="0%" stop-color="var(--logo-color1)" />
|
|
120
|
+
<stop offset="80%" stop-color="var(--logo-color1-transparent)" />
|
|
121
|
+
</radialGradient>
|
|
122
|
+
<radialGradient id="gradient2" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
|
|
123
|
+
<stop offset="0%" stop-color="var(--logo-color2)" />
|
|
124
|
+
<stop offset="80%" stop-color="var(--logo-color2-transparent)" />
|
|
125
|
+
</radialGradient>
|
|
126
|
+
<radialGradient id="gradient3" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
|
|
127
|
+
<stop offset="0%" stop-color="var(--logo-color3)" />
|
|
128
|
+
<stop offset="50%" stop-color="var(--logo-color3-transparent)" />
|
|
129
|
+
</radialGradient>
|
|
130
|
+
<radialGradient id="gradient4" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
|
|
131
|
+
<stop offset="0%" stop-color="var(--logo-color4)" />
|
|
132
|
+
<stop offset="80%" stop-color="var(--logo-color4-transparent)" />
|
|
133
|
+
</radialGradient>
|
|
134
|
+
|
|
135
|
+
<!-- Radial Gradient for Centered Disc -->
|
|
136
|
+
<radialGradient id="centerGradient" cx="0.5" cy="0.5" r="0.5" spreadMethod="pad">
|
|
137
|
+
<stop offset="0%" stop-color="rgba(255, 255, 255, 0)" />
|
|
138
|
+
<stop offset="75%" stop-color="rgba(255, 255, 255, 0)" />
|
|
139
|
+
<stop offset="100%" stop-color="var(--logo-glass-color)" />
|
|
140
|
+
</radialGradient>
|
|
141
|
+
|
|
142
|
+
<!-- Gaussian blur filter -->
|
|
143
|
+
<filter id="blurFilter" x="-150%" y="-150%" width="400%" height="400%">
|
|
144
|
+
<feGaussianBlur stdDeviation="8" />
|
|
145
|
+
</filter>
|
|
146
|
+
|
|
147
|
+
</defs>
|
|
148
|
+
|
|
149
|
+
<!-- Larger Disc (border) -->
|
|
150
|
+
<g mask="url(#circleMask1)">
|
|
151
|
+
<circle cx="50" cy="50" r="50" fill="var(--logo-color2)" />
|
|
152
|
+
<g id="group1">
|
|
153
|
+
<ellipse x="50" rx="500" ry="80" fill="url(#gradient3)" filter="url(#blurFilter)" />
|
|
154
|
+
</g>
|
|
155
|
+
<g id="group2">
|
|
156
|
+
<ellipse rx="100" ry="100" fill="url(#gradient2)" filter="url(#blurFilter)" />
|
|
157
|
+
</g>
|
|
158
|
+
<g id="group3">
|
|
159
|
+
<ellipse rx="100" ry="100" fill="url(#gradient1)" filter="url(#blurFilter)" />
|
|
160
|
+
</g>
|
|
161
|
+
</g>
|
|
162
|
+
|
|
163
|
+
<!-- Smaller Disc -->
|
|
164
|
+
<g mask="url(#circleMask2)">
|
|
165
|
+
<circle cx="50" cy="50" r="46" fill="var(--logo-color1)" />
|
|
166
|
+
<g id="group1">
|
|
167
|
+
<ellipse x="50" rx="100" ry="80" fill="url(#gradient1)" filter="url(#blurFilter)" />
|
|
168
|
+
</g>
|
|
169
|
+
<g id="group2">
|
|
170
|
+
<ellipse rx="80" ry="50" fill="url(#gradient2)" filter="url(#blurFilter)" />
|
|
171
|
+
</g>
|
|
172
|
+
<g id="group3">
|
|
173
|
+
<ellipse rx="60" ry="40" fill="url(#gradient3)" filter="url(#blurFilter)" />
|
|
174
|
+
</g>
|
|
175
|
+
<g id="group4">
|
|
176
|
+
<ellipse rx="30" ry="40" fill="url(#gradient4)" filter="url(#blurFilter)" />
|
|
177
|
+
</g>
|
|
178
|
+
|
|
179
|
+
<!-- Grain -->
|
|
180
|
+
<circle cx="50" cy="50" r="46" fill="url(#centerGradient)" filter='url(#grainFilter)' style="mix-blend-mode: soft-light;" />
|
|
181
|
+
</g>
|
|
182
|
+
|
|
183
|
+
<!-- Grain -->
|
|
184
|
+
<circle cx="50" cy="50" r="46" fill="url(#centerGradient)" />
|
|
185
|
+
</svg>
|
|
186
|
+
</div>
|
|
187
|
+
`,avatarLarge:"",info:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m6.7 8.5c-.1-4.2 5.1-6.6 8.2-4 3.3 2.5 2 8.1-2.1 8.9-.6.1-1.1.7-1.1 1.3v2.2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="11.8" cy="20.6" r=".4"/></g></svg>',openChat:'<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m12 4v17"/><path d="m19 11-7-7-7 7"/></g></svg>',speechInput:`
|
|
188
|
+
<svg width="0" height="0">
|
|
189
|
+
<defs>
|
|
190
|
+
<mask id="microphone-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
|
|
191
|
+
<rect width="1" height="1" fill="black" />
|
|
192
|
+
<g
|
|
193
|
+
fill="none"
|
|
194
|
+
stroke="white"
|
|
195
|
+
stroke-width="2"
|
|
196
|
+
stroke-linecap="round"
|
|
197
|
+
stroke-linejoin="round"
|
|
198
|
+
transform="translate(0.1, 0.05) scale(0.035, 0.035)"
|
|
199
|
+
>
|
|
200
|
+
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
|
|
201
|
+
<path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
|
|
202
|
+
<path d="M12 19v4"></path>
|
|
203
|
+
<path d="M8 23h8"></path>
|
|
204
|
+
</g>
|
|
205
|
+
</mask>
|
|
206
|
+
</defs>
|
|
207
|
+
</svg>
|
|
208
|
+
`,listUnordered:`
|
|
209
|
+
<svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'>
|
|
210
|
+
<path d='M8 6H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
|
|
211
|
+
<path d='M8 12H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
|
|
212
|
+
<path d='M8 18H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
|
|
213
|
+
<path d='M3 6H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
|
|
214
|
+
<path d='M3 12H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
|
|
215
|
+
<path d='M3 18H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
|
|
216
|
+
</svg>
|
|
217
|
+
`,lightMode:`
|
|
218
|
+
<svg viewBox="0 0 24 24" fill="none">
|
|
219
|
+
<path d="M18.5625 12C18.5625 10.2595 17.8711 8.59032 16.6404 7.35961C15.4097 6.1289 13.7405 5.4375 12 5.4375C10.2595 5.4375 8.59032 6.1289 7.35961 7.35961C6.1289 8.59032 5.4375 10.2595 5.4375 12C5.4375 13.7405 6.1289 15.4097 7.35961 16.6404C8.59032 17.8711 10.2595 18.5625 12 18.5625C13.7405 18.5625 15.4097 17.8711 16.6404 16.6404C17.8711 15.4097 18.5625 13.7405 18.5625 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
220
|
+
<path d="M12 20.4375V22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
221
|
+
<path d="M20.4375 12H22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
222
|
+
<path d="M12 3.5625V1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
223
|
+
<path d="M3.5625 12H1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
224
|
+
<path d="M6.03469 17.9663L4.70813 19.2929" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
225
|
+
<path d="M17.9662 17.9663L19.2919 19.2919" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
226
|
+
<path d="M17.9672 6.03461L19.2928 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
227
|
+
<path d="M6.03375 6.03461L4.70813 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
228
|
+
</svg>
|
|
229
|
+
|
|
230
|
+
`,darkMode:`
|
|
231
|
+
<svg viewBox="0 0 24 24" fill="none">
|
|
232
|
+
<path d="M17.4546 19.3866C19.2134 18.1336 20.4574 16.2846 20.9554 14.1833C20.27 14.9892 19.4098 15.6282 18.4403 16.0517C17.4708 16.4753 16.4176 16.6723 15.3605 16.6277C14.3035 16.5831 13.2706 16.2981 12.3402 15.7944C11.4098 15.2908 10.6065 14.5816 9.99136 13.7209C9.37618 12.8601 8.96532 11.8705 8.78999 10.8272C8.61467 9.78384 8.67951 8.71426 8.97957 7.69974C9.27963 6.68522 9.80703 5.75246 10.5217 4.97235C11.2363 4.19223 12.1194 3.5853 13.1038 3.19768C11.6649 3.0599 10.2141 3.2727 8.87542 3.81787C7.53673 4.36304 6.35002 5.22437 5.41679 6.32817C4.48357 7.43197 3.83159 8.7454 3.51665 10.1561C3.2017 11.5668 3.23314 13.0328 3.6083 14.4287C3.98345 15.8246 4.69115 17.1089 5.67085 18.1717C6.65055 19.2344 7.87311 20.0441 9.23394 20.5313C10.5948 21.0186 12.0534 21.169 13.485 20.9696C14.9166 20.7703 16.2787 20.2271 17.4546 19.3866Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
233
|
+
</svg>
|
|
234
|
+
`,settings:`
|
|
235
|
+
<svg fill="none" viewBox="0 0 24 24">
|
|
236
|
+
<g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
237
|
+
<path d="M5.08008 12H1.26074"></path>
|
|
238
|
+
<path d="M22.7383 12H10.0059"></path>
|
|
239
|
+
<path d="M13.9941 20.1172H1.26074"></path>
|
|
240
|
+
<path d="M22.7383 20.1172h-3.8184"></path>
|
|
241
|
+
<path d="m13.9941 4.02344 -12.73336 0"></path>
|
|
242
|
+
<path d="M22.7383 4.02344h-3.8184"></path>
|
|
243
|
+
<path d="M5.08 12.002a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
|
|
244
|
+
<path d="M13.994 20.119a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
|
|
245
|
+
<path d="M13.994 3.885a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
|
|
246
|
+
</g>
|
|
247
|
+
</svg>
|
|
248
|
+
`,settingsClose:`
|
|
249
|
+
<svg fill="none" viewBox="0 0 24 24">
|
|
250
|
+
<g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
251
|
+
<path d="m6 18 12-12"/>
|
|
252
|
+
<path d="m18 18-12-12"/>
|
|
253
|
+
</g>
|
|
254
|
+
</svg>
|
|
255
|
+
`,sources:`
|
|
256
|
+
<svg fill="none" viewBox="0 0 24 24" width="24">
|
|
257
|
+
<g fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
|
|
258
|
+
<path d="m20.3713 11.9655c.0006 1.0543-.2065 2.0983-.6093 3.0726-.4029.9742-.9936 1.8595-1.7386 2.6054-.7449.7458-1.6294 1.3376-2.603 1.7416s-2.0172.6122-3.0712.6127c-2.1389-.0355-4.17716-.9146-5.67123-2.4459-1.49408-1.5313-2.32301-3.5908-2.30639-5.7304.00172-2.04515.80385-4.00834 2.23469-5.46928s3.37664-2.30352 5.42083-2.34734c.1155-.00487.231-.00696.3478-.00696 1.0491-.00569 2.089.19629 3.0598.5943.9707.39801 1.8531.9842 2.5964 1.72479s1.3327 1.62095 1.7343 2.59038c.4017.96942.6076 2.00871.6059 3.05811z"/>
|
|
259
|
+
<path d="m12.3713 3.9978c-3.99996 4.52568-3.99996 10.4299 0 16"/>
|
|
260
|
+
<path d="m12.3713 3.9978c4 4.52627 4 10.4292 0 16"/>
|
|
261
|
+
<path d="m4.37134 11.9978h15.99996"/>
|
|
262
|
+
</g>
|
|
263
|
+
</svg>
|
|
264
|
+
`,model:`
|
|
265
|
+
<svg fill="none" viewBox="0 0 24 24">
|
|
266
|
+
<g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
267
|
+
<path d="m2.63867 10.0059c3.35563-.67463 6.05732-3.40917 6.73292-6.8516.67571 3.44243 3.37671 6.17697 6.73231 6.8516m0 .0039c-3.3556.6746-6.0573 3.4091-6.73291 6.8516-.6756-3.4425-3.37669-6.177-6.73232-6.8516"/>
|
|
268
|
+
<path d="m13.6367 17.3983c2.0766-.4174 3.7486-2.1097 4.1668-4.2401.4181 2.1304 2.0896 3.8227 4.1663 4.2401m0 .0024c-2.0767.4176-3.7487 2.1098-4.1667 4.2402-.4181-2.1304-2.0898-3.8226-4.1664-4.2402"/>
|
|
269
|
+
</g>
|
|
270
|
+
</svg>
|
|
271
|
+
`,checkbox:`
|
|
272
|
+
<svg viewBox="0 0 24 24" fill="none">
|
|
273
|
+
<path d="M18 6L10 16L5 11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
274
|
+
</svg>
|
|
275
|
+
`,warning:`
|
|
276
|
+
<svg fill="none" viewBox="0 0 24 24">
|
|
277
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M20 11.8499c0.0058 2.1364 -0.8308 4.1889 -2.3284 5.7125C16.174 19.086 14.1362 19.9579 12 19.9889c-1.0431 0.0158 -2.07902 -0.1757 -3.04759 -0.5634 -0.96857 -0.3877 -1.85052 -0.9638 -2.59471 -1.695 -0.74419 -0.7312 -1.3358 -1.6028 -1.74052 -2.5644 -0.40472 -0.9616 -0.61449 -1.9939 -0.61715 -3.0372 -0.00576 -2.13645 0.83084 -4.18908 2.32839 -5.71284C7.82597 4.8923 9.86379 4.02023 12 3.98892c1.0432 -0.01562 2.0792 0.17602 3.0477 0.56381 0.9686 0.38779 1.8505 0.96402 2.5947 1.69526 0.7442 0.73125 1.3358 1.60296 1.7405 2.56458 0.4047 0.96163 0.6145 1.99403 0.6171 3.03733v0Z" stroke-width="2"></path>
|
|
278
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 12.989V7.98804" stroke-width="2"></path>
|
|
279
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 15.512h-0.004" stroke-width="2"></path>
|
|
280
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.001 15.512H12" stroke-width="2"></path>
|
|
281
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.50003 20.0341c-1.10018 -1.0257 -1.97829 -2.2662 -2.58007 -3.6447 -0.60179 -1.3786 -0.91445 -2.8659 -0.91867 -4.37 -0.004213 -1.5042 0.3001 -2.99325 0.89415 -4.37514 0.59404 -1.38189 1.46518 -2.62726 2.55959 -3.65915" stroke-width="2"></path>
|
|
282
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M19.523 3.96411c1.0995 1.03065 1.9754 2.27621 2.5736 3.65943 0.5981 1.38321 0.9056 2.87456 0.9034 4.38156 -0.0021 1.507 -0.3139 2.9975 -0.916 4.379 -0.6021 1.3815 -1.4816 2.6245 -2.584 3.652" stroke-width="2"></path>
|
|
283
|
+
<path stroke="currentColor" d="M11.998 16.0161c-0.138 0 -0.25 -0.1119 -0.25 -0.25s0.112 -0.25 0.25 -0.25" stroke-width="2"></path>
|
|
284
|
+
<path stroke="currentColor" d="M11.998 16.0161c0.1381 0 0.25 -0.1119 0.25 -0.25s-0.1119 -0.25 -0.25 -0.25" stroke-width="2"></path>
|
|
285
|
+
</svg>
|
|
286
|
+
`,embedAvatar:""}}},Qr=qr(or,{tokens:{base:{lineColor:"color-mix(in srgb, var(--color-brand-100) 20%, transparent)"},components:{body:{background:"var(--color-grey-900)",color:"var(--color-grey-100)",focus:{color:"var(--color-highlight-400)"},custom:{selectionColor:"var(--color-grey-1000)",selectionBackground:"var(--color-brand-400)"}},avatar:{color:"var(--color-brand-200)",background:"var(--color-grey-800)"},anchor:{color:"var(--color-brand-300)",hover:{color:"var(--color-brand-50)"}},btnPrimary:{color:"var(--color-grey-1000)",background:"var(--color-brand-300)",hover:{background:"var(--color-brand-100)"}},btnSecondary:{color:"var(--color-brand-100)",background:"var(--color-brand-900)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},btnTertiary:{color:"var(--anchor-color)",background:"transparent",borderRadius:"var(--base-border-radius)",hover:{color:"var(--anchor-hover-color)"}},card:{color:"var(--body-color)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-900)"}},input:{background:"var(--color-grey-900)",borderColor:"var(--color-grey-700)",custom:{placeholderColor:"var(--color-grey-400)"}},label:{color:"var(--color-grey-50)"},checkbox:{background:"var(--color-grey-700)",borderColor:"var(--color-grey-500)",custom:{checkedColor:"var(--color-grey-900)",checkedBorderColor:"var(--color-brand-300)",checkedBackground:"var(--color-brand-300)"}},radio:{background:"var(--color-grey-700)",borderColor:"var(--color-grey-500)",custom:{checkedColor:"var(--color-grey-900)",checkedBorderColor:"var(--color-brand-300)",checkedBackground:"var(--color-brand-300)"}},contextBox:{custom:{titleColor:"var(--color-grey-50)"}},referenceDescription:{color:"var(--color-grey-300)",hover:{color:"var(--color-grey-300)"}},chatFooter:{color:"var(--color-grey-500)"},chatInput:{color:"var(--color-grey-100)"},chatInputSubmit:{custom:{deactivatedBackground:"var(--color-grey-400)",deactivatedBorderColor:"var(--color-grey-400)"}},dialog:{custom:{backgroundOverlay:"rgba(0, 0, 0, 0.5)"}},tooltip:{background:"var(--color-grey-1000)"}}}}),te={fineGrained:{light:or,dark:Qr}},eo=Object.freeze(Object.defineProperty({__proto__:null,theme:te},Symbol.toStringTag,{value:"Module"})),be=structuredClone(te.fineGrained.light);be.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#037ABA",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},highlight:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}};const tr=structuredClone(te.fineGrained.dark);tr.tokens.colors=be.tokens.colors;const ro={fineGrained:{light:be,dark:tr}},oo=Object.freeze(Object.defineProperty({__proto__:null,theme:ro},Symbol.toStringTag,{value:"Module"}));function u(e,r,o){function t(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),r(s,c);const l=i.prototype,d=Object.keys(l);for(let f=0;f<d.length;f++){const m=d[f];m in s||(s[m]=l[m].bind(s))}}const n=o?.Parent??Object;class a extends n{}Object.defineProperty(a,"name",{value:e});function i(s){var c;const l=o?.Parent?new a:this;t(l,s),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(i,"init",{value:t}),Object.defineProperty(i,Symbol.hasInstance,{value:s=>o?.Parent&&s instanceof o.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class J extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class nr extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}const ir={};function A(e){return ir}function ar(e){const r=Object.values(e).filter(t=>typeof t=="number");return Object.entries(e).filter(([t,n])=>r.indexOf(+t)===-1).map(([t,n])=>n)}function he(e,r){return typeof r=="bigint"?r.toString():r}function ne(e){return{get value(){{const r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function ke(e){return e==null}function _e(e){const r=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(r,o)}function to(e,r){const o=(e.toString().split(".")[1]||"").length,t=r.toString();let n=(t.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(t)){const c=t.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]))}const a=o>n?o:n,i=Number.parseInt(e.toFixed(a).replace(".","")),s=Number.parseInt(r.toFixed(a).replace(".",""));return i%s/10**a}const Te=Symbol("evaluating");function _(e,r,o){let t;Object.defineProperty(e,r,{get(){if(t!==Te)return t===void 0&&(t=Te,t=o()),t},set(n){Object.defineProperty(e,r,{value:n})},configurable:!0})}function B(e,r,o){Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0})}function D(...e){const r={};for(const o of e){const t=Object.getOwnPropertyDescriptors(o);Object.assign(r,t)}return Object.defineProperties({},r)}function Ee(e){return JSON.stringify(e)}function no(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function K(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const io=ne(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function W(e){if(K(e)===!1)return!1;const r=e.constructor;if(r===void 0||typeof r!="function")return!0;const o=r.prototype;return!(K(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function cr(e){return W(e)?{...e}:Array.isArray(e)?[...e]:e}const ao=new Set(["string","number","symbol"]);function V(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function N(e,r,o){const t=new e._zod.constr(r??e._zod.def);return(!r||o?.parent)&&(t._zod.parent=e),t}function h(e){const r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function so(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}const co={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 uo(e,r){const o=e._zod.def,t=o.checks;if(t&&t.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const a=D(e._zod.def,{get shape(){const i={};for(const s in r){if(!(s in o.shape))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=o.shape[s])}return B(this,"shape",i),i},checks:[]});return N(e,a)}function lo(e,r){const o=e._zod.def,t=o.checks;if(t&&t.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const a=D(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in r){if(!(s in o.shape))throw new Error(`Unrecognized key: "${s}"`);r[s]&&delete i[s]}return B(this,"shape",i),i},checks:[]});return N(e,a)}function po(e,r){if(!W(r))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0){const a=e._zod.def.shape;for(const i in r)if(Object.getOwnPropertyDescriptor(a,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=D(e._zod.def,{get shape(){const a={...e._zod.def.shape,...r};return B(this,"shape",a),a}});return N(e,n)}function fo(e,r){if(!W(r))throw new Error("Invalid input to safeExtend: expected a plain object");const o=D(e._zod.def,{get shape(){const t={...e._zod.def.shape,...r};return B(this,"shape",t),t}});return N(e,o)}function ho(e,r){const o=D(e._zod.def,{get shape(){const t={...e._zod.def.shape,...r._zod.def.shape};return B(this,"shape",t),t},get catchall(){return r._zod.def.catchall},checks:[]});return N(e,o)}function mo(e,r,o){const n=r._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=D(r._zod.def,{get shape(){const s=r._zod.def.shape,c={...s};if(o)for(const l in o){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);o[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(const l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return B(this,"shape",c),c},checks:[]});return N(r,i)}function go(e,r,o){const t=D(r._zod.def,{get shape(){const n=r._zod.def.shape,a={...n};if(o)for(const i in o){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=new e({type:"nonoptional",innerType:n[i]}))}else for(const i in n)a[i]=new e({type:"nonoptional",innerType:n[i]});return B(this,"shape",a),a}});return N(r,t)}function F(e,r=0){if(e.aborted===!0)return!0;for(let o=r;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function L(e,r){return r.map(o=>{var t;return(t=o).path??(t.path=[]),o.path.unshift(e),o})}function X(e){return typeof e=="string"?e:e?.message}function R(e,r,o){const t={...e,path:e.path??[]};if(!e.message){const n=X(e.inst?._zod.def?.error?.(e))??X(r?.error?.(e))??X(o.customError?.(e))??X(o.localeError?.(e))??"Invalid input";t.message=n}return delete t.inst,delete t.continue,r?.reportInput||delete t.input,t}function ye(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Y(...e){const[r,o,t]=e;return typeof r=="string"?{message:r,code:"custom",input:o,inst:t}:{...r}}const ur=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,he,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lr=u("$ZodError",ur),dr=u("$ZodError",ur,{Parent:Error});function vo(e,r=o=>o.message){const o={},t=[];for(const n of e.issues)n.path.length>0?(o[n.path[0]]=o[n.path[0]]||[],o[n.path[0]].push(r(n))):t.push(r(n));return{formErrors:t,fieldErrors:o}}function bo(e,r=o=>o.message){const o={_errors:[]},t=n=>{for(const a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(i=>t({issues:i}));else if(a.code==="invalid_key")t({issues:a.issues});else if(a.code==="invalid_element")t({issues:a.issues});else if(a.path.length===0)o._errors.push(r(a));else{let i=o,s=0;for(;s<a.path.length;){const c=a.path[s];s===a.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(r(a))):i[c]=i[c]||{_errors:[]},i=i[c],s++}}};return t(e),o}const we=e=>(r,o,t,n)=>{const a=t?Object.assign(t,{async:!1}):{async:!1},i=r._zod.run({value:o,issues:[]},a);if(i instanceof Promise)throw new J;if(i.issues.length){const s=new(n?.Err??e)(i.issues.map(c=>R(c,a,A())));throw sr(s,n?.callee),s}return i.value},ze=e=>async(r,o,t,n)=>{const a=t?Object.assign(t,{async:!0}):{async:!0};let i=r._zod.run({value:o,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){const s=new(n?.Err??e)(i.issues.map(c=>R(c,a,A())));throw sr(s,n?.callee),s}return i.value},ie=e=>(r,o,t)=>{const n=t?{...t,async:!1}:{async:!1},a=r._zod.run({value:o,issues:[]},n);if(a instanceof Promise)throw new J;return a.issues.length?{success:!1,error:new(e??lr)(a.issues.map(i=>R(i,n,A())))}:{success:!0,data:a.value}},ko=ie(dr),ae=e=>async(r,o,t)=>{const n=t?Object.assign(t,{async:!0}):{async:!0};let a=r._zod.run({value:o,issues:[]},n);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(i=>R(i,n,A())))}:{success:!0,data:a.value}},_o=ae(dr),yo=e=>(r,o,t)=>{const n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return we(e)(r,o,n)},wo=e=>(r,o,t)=>we(e)(r,o,t),zo=e=>async(r,o,t)=>{const n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return ze(e)(r,o,n)},Co=e=>async(r,o,t)=>ze(e)(r,o,t),So=e=>(r,o,t)=>{const n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return ie(e)(r,o,n)},$o=e=>(r,o,t)=>ie(e)(r,o,t),Zo=e=>async(r,o,t)=>{const n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return ae(e)(r,o,n)},xo=e=>async(r,o,t)=>ae(e)(r,o,t),Oo=/^[cC][^\s-]{8,}$/,jo=/^[0-9a-z]+$/,To=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Eo=/^[0-9a-vA-V]{20}$/,Io=/^[A-Za-z0-9]{27}$/,Po=/^[a-zA-Z0-9_-]{21}$/,No=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mo=/^([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})$/,Ie=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ao=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ro="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Do(){return new RegExp(Ro,"u")}const Bo=/^(?:(?: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])$/,Uo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Fo=/^((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])$/,Lo=/^(([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])$/,Jo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pr=/^[A-Za-z0-9_-]*$/,Wo=/^\+[1-9]\d{6,14}$/,fr="(?:(?:\\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])))",Vo=new RegExp(`^${fr}$`);function hr(e){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ho(e){return new RegExp(`^${hr(e)}$`)}function Go(e){const r=hr({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const t=`${r}(?:${o.join("|")})`;return new RegExp(`^${fr}T(?:${t})$`)}const Ko=e=>{const r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},Yo=/^-?\d+$/,mr=/^-?\d+(?:\.\d+)?$/,Xo=/^(?:true|false)$/i,qo=/^[^A-Z]*$/,Qo=/^[^a-z]*$/,I=u("$ZodCheck",(e,r)=>{var o;e._zod??(e._zod={}),e._zod.def=r,(o=e._zod).onattach??(o.onattach=[])}),gr={number:"number",bigint:"bigint",object:"date"},vr=u("$ZodCheckLessThan",(e,r)=>{I.init(e,r);const o=gr[typeof r.value];e._zod.onattach.push(t=>{const n=t._zod.bag,a=(r.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<a&&(r.inclusive?n.maximum=r.value:n.exclusiveMaximum=r.value)}),e._zod.check=t=>{(r.inclusive?t.value<=r.value:t.value<r.value)||t.issues.push({origin:o,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:t.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),br=u("$ZodCheckGreaterThan",(e,r)=>{I.init(e,r);const o=gr[typeof r.value];e._zod.onattach.push(t=>{const n=t._zod.bag,a=(r.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>a&&(r.inclusive?n.minimum=r.value:n.exclusiveMinimum=r.value)}),e._zod.check=t=>{(r.inclusive?t.value>=r.value:t.value>r.value)||t.issues.push({origin:o,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:t.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),et=u("$ZodCheckMultipleOf",(e,r)=>{I.init(e,r),e._zod.onattach.push(o=>{var t;(t=o._zod.bag).multipleOf??(t.multipleOf=r.value)}),e._zod.check=o=>{if(typeof o.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof o.value=="bigint"?o.value%r.value===BigInt(0):to(o.value,r.value)===0)||o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:r.value,input:o.value,inst:e,continue:!r.abort})}}),rt=u("$ZodCheckNumberFormat",(e,r)=>{I.init(e,r),r.format=r.format||"float64";const o=r.format?.includes("int"),t=o?"int":"number",[n,a]=co[r.format];e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=r.format,s.minimum=n,s.maximum=a,o&&(s.pattern=Yo)}),e._zod.check=i=>{const s=i.value;if(o){if(!Number.isInteger(s)){i.issues.push({expected:t,format:r.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?i.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:t,inclusive:!0,continue:!r.abort}):i.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:t,inclusive:!0,continue:!r.abort});return}}s<n&&i.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),s>a&&i.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!r.abort})}}),ot=u("$ZodCheckMaxLength",(e,r)=>{var o;I.init(e,r),(o=e._zod.def).when??(o.when=t=>{const n=t.value;return!ke(n)&&n.length!==void 0}),e._zod.onattach.push(t=>{const n=t._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<n&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{const n=t.value;if(n.length<=r.maximum)return;const i=ye(n);t.issues.push({origin:i,code:"too_big",maximum:r.maximum,inclusive:!0,input:n,inst:e,continue:!r.abort})}}),tt=u("$ZodCheckMinLength",(e,r)=>{var o;I.init(e,r),(o=e._zod.def).when??(o.when=t=>{const n=t.value;return!ke(n)&&n.length!==void 0}),e._zod.onattach.push(t=>{const n=t._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>n&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{const n=t.value;if(n.length>=r.minimum)return;const i=ye(n);t.issues.push({origin:i,code:"too_small",minimum:r.minimum,inclusive:!0,input:n,inst:e,continue:!r.abort})}}),nt=u("$ZodCheckLengthEquals",(e,r)=>{var o;I.init(e,r),(o=e._zod.def).when??(o.when=t=>{const n=t.value;return!ke(n)&&n.length!==void 0}),e._zod.onattach.push(t=>{const n=t._zod.bag;n.minimum=r.length,n.maximum=r.length,n.length=r.length}),e._zod.check=t=>{const n=t.value,a=n.length;if(a===r.length)return;const i=ye(n),s=a>r.length;t.issues.push({origin:i,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort})}}),se=u("$ZodCheckStringFormat",(e,r)=>{var o,t;I.init(e,r),e._zod.onattach.push(n=>{const a=n._zod.bag;a.format=r.format,r.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(r.pattern))}),r.pattern?(o=e._zod).check??(o.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:r.format,input:n.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(t=e._zod).check??(t.check=()=>{})}),it=u("$ZodCheckRegex",(e,r)=>{se.init(e,r),e._zod.check=o=>{r.pattern.lastIndex=0,!r.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),at=u("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=qo),se.init(e,r)}),st=u("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=Qo),se.init(e,r)}),ct=u("$ZodCheckIncludes",(e,r)=>{I.init(e,r);const o=V(r.includes),t=new RegExp(typeof r.position=="number"?`^.{${r.position}}${o}`:o);r.pattern=t,e._zod.onattach.push(n=>{const a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(t)}),e._zod.check=n=>{n.value.includes(r.includes,r.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:n.value,inst:e,continue:!r.abort})}}),ut=u("$ZodCheckStartsWith",(e,r)=>{I.init(e,r);const o=new RegExp(`^${V(r.prefix)}.*`);r.pattern??(r.pattern=o),e._zod.onattach.push(t=>{const n=t._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),e._zod.check=t=>{t.value.startsWith(r.prefix)||t.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:t.value,inst:e,continue:!r.abort})}}),lt=u("$ZodCheckEndsWith",(e,r)=>{I.init(e,r);const o=new RegExp(`.*${V(r.suffix)}$`);r.pattern??(r.pattern=o),e._zod.onattach.push(t=>{const n=t._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),e._zod.check=t=>{t.value.endsWith(r.suffix)||t.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:t.value,inst:e,continue:!r.abort})}}),dt=u("$ZodCheckOverwrite",(e,r)=>{I.init(e,r),e._zod.check=o=>{o.value=r.tx(o.value)}});class pt{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const t=r.split(`
|
|
287
|
+
`).filter(i=>i),n=Math.min(...t.map(i=>i.length-i.trimStart().length)),a=t.map(i=>i.slice(n)).map(i=>" ".repeat(this.indent*2)+i);for(const i of a)this.content.push(i)}compile(){const r=Function,o=this?.args,n=[...(this?.content??[""]).map(a=>` ${a}`)];return new r(...o,n.join(`
|
|
288
|
+
`))}}const ft={major:4,minor:3,patch:6},S=u("$ZodType",(e,r)=>{var o;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=ft;const t=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&t.unshift(e);for(const n of t)for(const a of n._zod.onattach)a(e);if(t.length===0)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(i,s,c)=>{let l=F(i),d;for(const f of s){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(l)continue;const m=i.issues.length,v=f._zod.check(i);if(v instanceof Promise&&c?.async===!1)throw new J;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,i.issues.length!==m&&(l||(l=F(i,m)))});else{if(i.issues.length===m)continue;l||(l=F(i,m))}}return d?d.then(()=>i):i},a=(i,s,c)=>{if(F(i))return i.aborted=!0,i;const l=n(s,t,c);if(l instanceof Promise){if(c.async===!1)throw new J;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(i,s)=>{if(s.skipChecks)return e._zod.parse(i,s);if(s.direction==="backward"){const l=e._zod.parse({value:i.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>a(d,i,s)):a(l,i,s)}const c=e._zod.parse(i,s);if(c instanceof Promise){if(s.async===!1)throw new J;return c.then(l=>n(l,t,s))}return n(c,t,s)}}_(e,"~standard",()=>({validate:n=>{try{const a=ko(e,n);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return _o(e,n).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Ce=u("$ZodString",(e,r)=>{S.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ko(e._zod.bag),e._zod.parse=(o,t)=>{if(r.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),C=u("$ZodStringFormat",(e,r)=>{se.init(e,r),Ce.init(e,r)}),ht=u("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=Mo),C.init(e,r)}),mt=u("$ZodUUID",(e,r)=>{if(r.version){const t={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(t===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=Ie(t))}else r.pattern??(r.pattern=Ie());C.init(e,r)}),gt=u("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=Ao),C.init(e,r)}),vt=u("$ZodURL",(e,r)=>{C.init(e,r),e._zod.check=o=>{try{const t=o.value.trim(),n=new URL(t);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(n.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:o.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:o.value,inst:e,continue:!r.abort})),r.normalize?o.value=n.href:o.value=t;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!r.abort})}}}),bt=u("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=Do()),C.init(e,r)}),kt=u("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=Po),C.init(e,r)}),_t=u("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=Oo),C.init(e,r)}),yt=u("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=jo),C.init(e,r)}),wt=u("$ZodULID",(e,r)=>{r.pattern??(r.pattern=To),C.init(e,r)}),zt=u("$ZodXID",(e,r)=>{r.pattern??(r.pattern=Eo),C.init(e,r)}),Ct=u("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=Io),C.init(e,r)}),St=u("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=Go(r)),C.init(e,r)}),$t=u("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=Vo),C.init(e,r)}),Zt=u("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=Ho(r)),C.init(e,r)}),xt=u("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=No),C.init(e,r)}),Ot=u("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=Bo),C.init(e,r),e._zod.bag.format="ipv4"}),jt=u("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=Uo),C.init(e,r),e._zod.bag.format="ipv6",e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!r.abort})}}}),Tt=u("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=Fo),C.init(e,r)}),Et=u("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=Lo),C.init(e,r),e._zod.check=o=>{const t=o.value.split("/");try{if(t.length!==2)throw new Error;const[n,a]=t;if(!a)throw new Error;const i=Number(a);if(`${i}`!==a)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${n}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!r.abort})}}});function kr(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const It=u("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=Jo),C.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{kr(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!r.abort})}});function Pt(e){if(!pr.test(e))return!1;const r=e.replace(/[-_]/g,t=>t==="-"?"+":"/"),o=r.padEnd(Math.ceil(r.length/4)*4,"=");return kr(o)}const Nt=u("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=pr),C.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{Pt(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!r.abort})}}),Mt=u("$ZodE164",(e,r)=>{r.pattern??(r.pattern=Wo),C.init(e,r)});function At(e,r=null){try{const o=e.split(".");if(o.length!==3)return!1;const[t]=o;if(!t)return!1;const n=JSON.parse(atob(t));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||r&&(!("alg"in n)||n.alg!==r))}catch{return!1}}const Rt=u("$ZodJWT",(e,r)=>{C.init(e,r),e._zod.check=o=>{At(o.value,r.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!r.abort})}}),_r=u("$ZodNumber",(e,r)=>{S.init(e,r),e._zod.pattern=e._zod.bag.pattern??mr,e._zod.parse=(o,t)=>{if(r.coerce)try{o.value=Number(o.value)}catch{}const n=o.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return o;const a=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return o.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...a?{received:a}:{}}),o}}),Dt=u("$ZodNumberFormat",(e,r)=>{rt.init(e,r),_r.init(e,r)}),Bt=u("$ZodBoolean",(e,r)=>{S.init(e,r),e._zod.pattern=Xo,e._zod.parse=(o,t)=>{if(r.coerce)try{o.value=!!o.value}catch{}const n=o.value;return typeof n=="boolean"||o.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),o}}),Ut=u("$ZodUnknown",(e,r)=>{S.init(e,r),e._zod.parse=o=>o}),Ft=u("$ZodNever",(e,r)=>{S.init(e,r),e._zod.parse=(o,t)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)});function Pe(e,r,o){e.issues.length&&r.issues.push(...L(o,e.issues)),r.value[o]=e.value}const Lt=u("$ZodArray",(e,r)=>{S.init(e,r),e._zod.parse=(o,t)=>{const n=o.value;if(!Array.isArray(n))return o.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),o;o.value=Array(n.length);const a=[];for(let i=0;i<n.length;i++){const s=n[i],c=r.element._zod.run({value:s,issues:[]},t);c instanceof Promise?a.push(c.then(l=>Pe(l,o,i))):Pe(c,o,i)}return a.length?Promise.all(a).then(()=>o):o}});function ee(e,r,o,t,n){if(e.issues.length){if(n&&!(o in t))return;r.issues.push(...L(o,e.issues))}e.value===void 0?o in t&&(r.value[o]=void 0):r.value[o]=e.value}function yr(e){const r=Object.keys(e.shape);for(const t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${t}": expected a Zod schema`);const o=so(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(o)}}function wr(e,r,o,t,n,a){const i=[],s=n.keySet,c=n.catchall._zod,l=c.def.type,d=c.optout==="optional";for(const f in r){if(s.has(f))continue;if(l==="never"){i.push(f);continue}const m=c.run({value:r[f],issues:[]},t);m instanceof Promise?e.push(m.then(v=>ee(v,o,f,r,d))):ee(m,o,f,r,d)}return i.length&&o.issues.push({code:"unrecognized_keys",keys:i,input:r,inst:a}),e.length?Promise.all(e).then(()=>o):o}const Jt=u("$ZodObject",(e,r)=>{if(S.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){const s=r.shape;Object.defineProperty(r,"shape",{get:()=>{const c={...s};return Object.defineProperty(r,"shape",{value:c}),c}})}const t=ne(()=>yr(r));_(e._zod,"propValues",()=>{const s=r.shape,c={};for(const l in s){const d=s[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(const f of d.values)c[l].add(f)}}return c});const n=K,a=r.catchall;let i;e._zod.parse=(s,c)=>{i??(i=t.value);const l=s.value;if(!n(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};const d=[],f=i.shape;for(const m of i.keys){const v=f[m],T=v._zod.optout==="optional",z=v._zod.run({value:l[m],issues:[]},c);z instanceof Promise?d.push(z.then(U=>ee(U,s,m,l,T))):ee(z,s,m,l,T)}return a?wr(d,l,s,c,t.value,e):d.length?Promise.all(d).then(()=>s):s}}),Wt=u("$ZodObjectJIT",(e,r)=>{Jt.init(e,r);const o=e._zod.parse,t=ne(()=>yr(r)),n=m=>{const v=new pt(["shape","payload","ctx"]),T=t.value,z=k=>{const w=Ee(k);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};v.write("const input = payload.value;");const U=Object.create(null);let g=0;for(const k of T.keys)U[k]=`key_${g++}`;v.write("const newResult = {};");for(const k of T.keys){const w=U[k],y=Ee(k),Lr=m[k]?._zod?.optout==="optional";v.write(`const ${w} = ${z(k)};`),Lr?v.write(`
|
|
289
|
+
if (${w}.issues.length) {
|
|
290
|
+
if (${y} in input) {
|
|
291
|
+
payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
292
|
+
...iss,
|
|
293
|
+
path: iss.path ? [${y}, ...iss.path] : [${y}]
|
|
294
|
+
})));
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (${w}.value === undefined) {
|
|
299
|
+
if (${y} in input) {
|
|
300
|
+
newResult[${y}] = undefined;
|
|
301
|
+
}
|
|
302
|
+
} else {
|
|
303
|
+
newResult[${y}] = ${w}.value;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
`):v.write(`
|
|
307
|
+
if (${w}.issues.length) {
|
|
308
|
+
payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
309
|
+
...iss,
|
|
310
|
+
path: iss.path ? [${y}, ...iss.path] : [${y}]
|
|
311
|
+
})));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
if (${w}.value === undefined) {
|
|
315
|
+
if (${y} in input) {
|
|
316
|
+
newResult[${y}] = undefined;
|
|
317
|
+
}
|
|
318
|
+
} else {
|
|
319
|
+
newResult[${y}] = ${w}.value;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
`)}v.write("payload.value = newResult;"),v.write("return payload;");const b=v.compile();return(k,w)=>b(m,k,w)};let a;const i=K,s=!ir.jitless,l=s&&io.value,d=r.catchall;let f;e._zod.parse=(m,v)=>{f??(f=t.value);const T=m.value;return i(T)?s&&l&&v?.async===!1&&v.jitless!==!0?(a||(a=n(r.shape)),m=a(m,v),d?wr([],T,m,v,f,e):m):o(m,v):(m.issues.push({expected:"object",code:"invalid_type",input:T,inst:e}),m)}});function Ne(e,r,o,t){for(const a of e)if(a.issues.length===0)return r.value=a.value,r;const n=e.filter(a=>!F(a));return n.length===1?(r.value=n[0].value,n[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:o,errors:e.map(a=>a.issues.map(i=>R(i,t,A())))}),r)}const zr=u("$ZodUnion",(e,r)=>{S.init(e,r),_(e._zod,"optin",()=>r.options.some(n=>n._zod.optin==="optional")?"optional":void 0),_(e._zod,"optout",()=>r.options.some(n=>n._zod.optout==="optional")?"optional":void 0),_(e._zod,"values",()=>{if(r.options.every(n=>n._zod.values))return new Set(r.options.flatMap(n=>Array.from(n._zod.values)))}),_(e._zod,"pattern",()=>{if(r.options.every(n=>n._zod.pattern)){const n=r.options.map(a=>a._zod.pattern);return new RegExp(`^(${n.map(a=>_e(a.source)).join("|")})$`)}});const o=r.options.length===1,t=r.options[0]._zod.run;e._zod.parse=(n,a)=>{if(o)return t(n,a);let i=!1;const s=[];for(const c of r.options){const l=c._zod.run({value:n.value,issues:[]},a);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(c=>Ne(c,n,e,a)):Ne(s,n,e,a)}}),Vt=u("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,zr.init(e,r);const o=e._zod.parse;_(e._zod,"propValues",()=>{const n={};for(const a of r.options){const i=a._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(const[s,c]of Object.entries(i)){n[s]||(n[s]=new Set);for(const l of c)n[s].add(l)}}return n});const t=ne(()=>{const n=r.options,a=new Map;for(const i of n){const s=i._zod.propValues?.[r.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(i)}"`);for(const c of s){if(a.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,i)}}return a});e._zod.parse=(n,a)=>{const i=n.value;if(!K(i))return n.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),n;const s=t.value.get(i?.[r.discriminator]);return s?s._zod.run(n,a):r.unionFallback?o(n,a):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:i,path:[r.discriminator],inst:e}),n)}}),Ht=u("$ZodIntersection",(e,r)=>{S.init(e,r),e._zod.parse=(o,t)=>{const n=o.value,a=r.left._zod.run({value:n,issues:[]},t),i=r.right._zod.run({value:n,issues:[]},t);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([c,l])=>Me(o,c,l)):Me(o,a,i)}});function me(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(W(e)&&W(r)){const o=Object.keys(r),t=Object.keys(e).filter(a=>o.indexOf(a)!==-1),n={...e,...r};for(const a of t){const i=me(e[a],r[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};n[a]=i.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let t=0;t<e.length;t++){const n=e[t],a=r[t],i=me(n,a);if(!i.valid)return{valid:!1,mergeErrorPath:[t,...i.mergeErrorPath]};o.push(i.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function Me(e,r,o){const t=new Map;let n;for(const s of r.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(const c of s.keys)t.has(c)||t.set(c,{}),t.get(c).l=!0}else e.issues.push(s);for(const s of o.issues)if(s.code==="unrecognized_keys")for(const c of s.keys)t.has(c)||t.set(c,{}),t.get(c).r=!0;else e.issues.push(s);const a=[...t].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(a.length&&n&&e.issues.push({...n,keys:a}),F(e))return e;const i=me(r.value,o.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const Gt=u("$ZodRecord",(e,r)=>{S.init(e,r),e._zod.parse=(o,t)=>{const n=o.value;if(!W(n))return o.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),o;const a=[],i=r.keyType._zod.values;if(i){o.value={};const s=new Set;for(const l of i)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);const d=r.valueType._zod.run({value:n[l],issues:[]},t);d instanceof Promise?a.push(d.then(f=>{f.issues.length&&o.issues.push(...L(l,f.issues)),o.value[l]=f.value})):(d.issues.length&&o.issues.push(...L(l,d.issues)),o.value[l]=d.value)}let c;for(const l in n)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&o.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{o.value={};for(const s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let c=r.keyType._zod.run({value:s,issues:[]},t);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&mr.test(s)&&c.issues.length){const f=r.keyType._zod.run({value:Number(s),issues:[]},t);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(c=f)}if(c.issues.length){r.mode==="loose"?o.value[s]=n[s]:o.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(f=>R(f,t,A())),input:s,path:[s],inst:e});continue}const d=r.valueType._zod.run({value:n[s],issues:[]},t);d instanceof Promise?a.push(d.then(f=>{f.issues.length&&o.issues.push(...L(s,f.issues)),o.value[c.value]=f.value})):(d.issues.length&&o.issues.push(...L(s,d.issues)),o.value[c.value]=d.value)}}return a.length?Promise.all(a).then(()=>o):o}}),Kt=u("$ZodEnum",(e,r)=>{S.init(e,r);const o=ar(r.entries),t=new Set(o);e._zod.values=t,e._zod.pattern=new RegExp(`^(${o.filter(n=>ao.has(typeof n)).map(n=>typeof n=="string"?V(n):n.toString()).join("|")})$`),e._zod.parse=(n,a)=>{const i=n.value;return t.has(i)||n.issues.push({code:"invalid_value",values:o,input:i,inst:e}),n}}),Yt=u("$ZodLiteral",(e,r)=>{if(S.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");const o=new Set(r.values);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.values.map(t=>typeof t=="string"?V(t):t?V(t.toString()):String(t)).join("|")})$`),e._zod.parse=(t,n)=>{const a=t.value;return o.has(a)||t.issues.push({code:"invalid_value",values:r.values,input:a,inst:e}),t}}),Xt=u("$ZodTransform",(e,r)=>{S.init(e,r),e._zod.parse=(o,t)=>{if(t.direction==="backward")throw new nr(e.constructor.name);const n=r.transform(o.value,o);if(t.async)return(n instanceof Promise?n:Promise.resolve(n)).then(i=>(o.value=i,o));if(n instanceof Promise)throw new J;return o.value=n,o}});function Ae(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const Cr=u("$ZodOptional",(e,r)=>{S.init(e,r),e._zod.optin="optional",e._zod.optout="optional",_(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),_(e._zod,"pattern",()=>{const o=r.innerType._zod.pattern;return o?new RegExp(`^(${_e(o.source)})?$`):void 0}),e._zod.parse=(o,t)=>{if(r.innerType._zod.optin==="optional"){const n=r.innerType._zod.run(o,t);return n instanceof Promise?n.then(a=>Ae(a,o.value)):Ae(n,o.value)}return o.value===void 0?o:r.innerType._zod.run(o,t)}}),qt=u("$ZodExactOptional",(e,r)=>{Cr.init(e,r),_(e._zod,"values",()=>r.innerType._zod.values),_(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(o,t)=>r.innerType._zod.run(o,t)}),Qt=u("$ZodNullable",(e,r)=>{S.init(e,r),_(e._zod,"optin",()=>r.innerType._zod.optin),_(e._zod,"optout",()=>r.innerType._zod.optout),_(e._zod,"pattern",()=>{const o=r.innerType._zod.pattern;return o?new RegExp(`^(${_e(o.source)}|null)$`):void 0}),_(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(o,t)=>o.value===null?o:r.innerType._zod.run(o,t)}),en=u("$ZodDefault",(e,r)=>{S.init(e,r),e._zod.optin="optional",_(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(o,t)=>{if(t.direction==="backward")return r.innerType._zod.run(o,t);if(o.value===void 0)return o.value=r.defaultValue,o;const n=r.innerType._zod.run(o,t);return n instanceof Promise?n.then(a=>Re(a,r)):Re(n,r)}});function Re(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const rn=u("$ZodPrefault",(e,r)=>{S.init(e,r),e._zod.optin="optional",_(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(o,t)=>(t.direction==="backward"||o.value===void 0&&(o.value=r.defaultValue),r.innerType._zod.run(o,t))}),on=u("$ZodNonOptional",(e,r)=>{S.init(e,r),_(e._zod,"values",()=>{const o=r.innerType._zod.values;return o?new Set([...o].filter(t=>t!==void 0)):void 0}),e._zod.parse=(o,t)=>{const n=r.innerType._zod.run(o,t);return n instanceof Promise?n.then(a=>De(a,e)):De(n,e)}});function De(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const tn=u("$ZodCatch",(e,r)=>{S.init(e,r),_(e._zod,"optin",()=>r.innerType._zod.optin),_(e._zod,"optout",()=>r.innerType._zod.optout),_(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(o,t)=>{if(t.direction==="backward")return r.innerType._zod.run(o,t);const n=r.innerType._zod.run(o,t);return n instanceof Promise?n.then(a=>(o.value=a.value,a.issues.length&&(o.value=r.catchValue({...o,error:{issues:a.issues.map(i=>R(i,t,A()))},input:o.value}),o.issues=[]),o)):(o.value=n.value,n.issues.length&&(o.value=r.catchValue({...o,error:{issues:n.issues.map(a=>R(a,t,A()))},input:o.value}),o.issues=[]),o)}}),nn=u("$ZodPipe",(e,r)=>{S.init(e,r),_(e._zod,"values",()=>r.in._zod.values),_(e._zod,"optin",()=>r.in._zod.optin),_(e._zod,"optout",()=>r.out._zod.optout),_(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(o,t)=>{if(t.direction==="backward"){const a=r.out._zod.run(o,t);return a instanceof Promise?a.then(i=>q(i,r.in,t)):q(a,r.in,t)}const n=r.in._zod.run(o,t);return n instanceof Promise?n.then(a=>q(a,r.out,t)):q(n,r.out,t)}});function q(e,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},o)}const an=u("$ZodReadonly",(e,r)=>{S.init(e,r),_(e._zod,"propValues",()=>r.innerType._zod.propValues),_(e._zod,"values",()=>r.innerType._zod.values),_(e._zod,"optin",()=>r.innerType?._zod?.optin),_(e._zod,"optout",()=>r.innerType?._zod?.optout),e._zod.parse=(o,t)=>{if(t.direction==="backward")return r.innerType._zod.run(o,t);const n=r.innerType._zod.run(o,t);return n instanceof Promise?n.then(Be):Be(n)}});function Be(e){return e.value=Object.freeze(e.value),e}const sn=u("$ZodCustom",(e,r)=>{I.init(e,r),S.init(e,r),e._zod.parse=(o,t)=>o,e._zod.check=o=>{const t=o.value,n=r.fn(t);if(n instanceof Promise)return n.then(a=>Ue(a,o,t,e));Ue(n,o,t,e)}});function Ue(e,r,o,t){if(!e){const n={code:"custom",input:o,inst:t,path:[...t._zod.def.path??[]],continue:!t._zod.def.abort};t._zod.def.params&&(n.params=t._zod.def.params),r.issues.push(Y(n))}}var Fe;class cn{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...o){const t=o[0];return this._map.set(r,t),t&&typeof t=="object"&&"id"in t&&this._idmap.set(t.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const o=this._map.get(r);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(r),this}get(r){const o=r._zod.parent;if(o){const t={...this.get(o)??{}};delete t.id;const n={...t,...this._map.get(r)};return Object.keys(n).length?n:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function un(){return new cn}(Fe=globalThis).__zod_globalRegistry??(Fe.__zod_globalRegistry=un());const G=globalThis.__zod_globalRegistry;function ln(e,r){return new e({type:"string",...h(r)})}function dn(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...h(r)})}function Le(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...h(r)})}function pn(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...h(r)})}function fn(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...h(r)})}function hn(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...h(r)})}function mn(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...h(r)})}function gn(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...h(r)})}function vn(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...h(r)})}function bn(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...h(r)})}function kn(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...h(r)})}function _n(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...h(r)})}function yn(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...h(r)})}function wn(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...h(r)})}function zn(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...h(r)})}function Cn(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...h(r)})}function Sn(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...h(r)})}function $n(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...h(r)})}function Zn(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...h(r)})}function xn(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...h(r)})}function On(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...h(r)})}function jn(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...h(r)})}function Tn(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...h(r)})}function En(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...h(r)})}function In(e,r){return new e({type:"string",format:"date",check:"string_format",...h(r)})}function Pn(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...h(r)})}function Nn(e,r){return new e({type:"string",format:"duration",check:"string_format",...h(r)})}function Mn(e,r){return new e({type:"number",checks:[],...h(r)})}function An(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...h(r)})}function Rn(e,r){return new e({type:"boolean",...h(r)})}function Dn(e){return new e({type:"unknown"})}function Bn(e,r){return new e({type:"never",...h(r)})}function Je(e,r){return new vr({check:"less_than",...h(r),value:e,inclusive:!1})}function le(e,r){return new vr({check:"less_than",...h(r),value:e,inclusive:!0})}function We(e,r){return new br({check:"greater_than",...h(r),value:e,inclusive:!1})}function de(e,r){return new br({check:"greater_than",...h(r),value:e,inclusive:!0})}function Ve(e,r){return new et({check:"multiple_of",...h(r),value:e})}function Sr(e,r){return new ot({check:"max_length",...h(r),maximum:e})}function re(e,r){return new tt({check:"min_length",...h(r),minimum:e})}function $r(e,r){return new nt({check:"length_equals",...h(r),length:e})}function Un(e,r){return new it({check:"string_format",format:"regex",...h(r),pattern:e})}function Fn(e){return new at({check:"string_format",format:"lowercase",...h(e)})}function Ln(e){return new st({check:"string_format",format:"uppercase",...h(e)})}function Jn(e,r){return new ct({check:"string_format",format:"includes",...h(r),includes:e})}function Wn(e,r){return new ut({check:"string_format",format:"starts_with",...h(r),prefix:e})}function Vn(e,r){return new lt({check:"string_format",format:"ends_with",...h(r),suffix:e})}function H(e){return new dt({check:"overwrite",tx:e})}function Hn(e){return H(r=>r.normalize(e))}function Gn(){return H(e=>e.trim())}function Kn(){return H(e=>e.toLowerCase())}function Yn(){return H(e=>e.toUpperCase())}function Xn(){return H(e=>no(e))}function qn(e,r,o){return new e({type:"array",element:r,...h(o)})}function Qn(e,r,o){return new e({type:"custom",check:"custom",fn:r,...h(o)})}function ei(e){const r=ri(o=>(o.addIssue=t=>{if(typeof t=="string")o.issues.push(Y(t,o.value,r._zod.def));else{const n=t;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=o.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),o.issues.push(Y(n))}},e(o.value,o)));return r}function ri(e,r){const o=new I({check:"custom",...h(r)});return o._zod.check=e,o}function Zr(e){let r=e?.target??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??G,target:r,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function j(e,r,o={path:[],schemaPath:[]}){var t;const n=e._zod.def,a=r.seen.get(e);if(a)return a.count++,o.schemaPath.includes(e)&&(a.cycle=o.path),a.schema;const i={schema:{},count:1,cycle:void 0,path:o.path};r.seen.set(e,i);const s=e._zod.toJSONSchema?.();if(s)i.schema=s;else{const d={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,i.schema,d);else{const m=i.schema,v=r.processors[n.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);v(e,r,m,d)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),j(f,r,d),r.seen.get(f).isParent=!0)}const c=r.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),r.io==="input"&&E(e)&&(delete i.schema.examples,delete i.schema.default),r.io==="input"&&i.schema._prefault&&((t=i.schema).default??(t.default=i.schema._prefault)),delete i.schema._prefault,r.seen.get(e).schema}function xr(e,r){const o=e.seen.get(r);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const t=new Map;for(const i of e.seen.entries()){const s=e.metadataRegistry.get(i[0])?.id;if(s){const c=t.get(s);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);t.set(s,i[0])}}const n=i=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(i[0])?.id,m=e.external.uri??(T=>T);if(f)return{ref:m(f)};const v=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=v,{defId:v,ref:`${m("__shared")}#/${s}/${v}`}}if(i[1]===o)return{ref:"#"};const l=`#/${s}/`,d=i[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},a=i=>{if(i[1].schema.$ref)return;const s=i[1],{ref:c,defId:l}=n(i);s.def={...s.schema},l&&(s.defId=l);const d=s.schema;for(const f in d)delete d[f];d.$ref=c};if(e.cycles==="throw")for(const i of e.seen.entries()){const s=i[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
323
|
+
|
|
324
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const s=i[1];if(r===i[0]){a(i);continue}if(e.external){const l=e.external.registry.get(i[0])?.id;if(r!==i[0]&&l){a(i);continue}}if(e.metadataRegistry.get(i[0])?.id){a(i);continue}if(s.cycle){a(i);continue}if(s.count>1&&e.reused==="ref"){a(i);continue}}}function Or(e,r){const o=e.seen.get(r);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const t=i=>{const s=e.seen.get(i);if(s.ref===null)return;const c=s.def??s.schema,l={...c},d=s.ref;if(s.ref=null,d){t(d);const m=e.seen.get(d),v=m.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(v)):Object.assign(c,v),Object.assign(c,l),i._zod.parent===d)for(const z in c)z==="$ref"||z==="allOf"||z in l||delete c[z];if(v.$ref&&m.def)for(const z in c)z==="$ref"||z==="allOf"||z in m.def&&JSON.stringify(c[z])===JSON.stringify(m.def[z])&&delete c[z]}const f=i._zod.parent;if(f&&f!==d){t(f);const m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(const v in c)v==="$ref"||v==="allOf"||v in m.def&&JSON.stringify(c[v])===JSON.stringify(m.def[v])&&delete c[v]}e.override({zodSchema:i,jsonSchema:c,path:s.path??[]})};for(const i of[...e.seen.entries()].reverse())t(i[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const i=e.external.registry.get(r)?.id;if(!i)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(i)}Object.assign(n,o.def??o.schema);const a=e.external?.defs??{};for(const i of e.seen.entries()){const s=i[1];s.def&&s.defId&&(a[s.defId]=s.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{const i=JSON.parse(JSON.stringify(n));return Object.defineProperty(i,"~standard",{value:{...r["~standard"],jsonSchema:{input:oe(r,"input",e.processors),output:oe(r,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function E(e,r){const o=r??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);const t=e._zod.def;if(t.type==="transform")return!0;if(t.type==="array")return E(t.element,o);if(t.type==="set")return E(t.valueType,o);if(t.type==="lazy")return E(t.getter(),o);if(t.type==="promise"||t.type==="optional"||t.type==="nonoptional"||t.type==="nullable"||t.type==="readonly"||t.type==="default"||t.type==="prefault")return E(t.innerType,o);if(t.type==="intersection")return E(t.left,o)||E(t.right,o);if(t.type==="record"||t.type==="map")return E(t.keyType,o)||E(t.valueType,o);if(t.type==="pipe")return E(t.in,o)||E(t.out,o);if(t.type==="object"){for(const n in t.shape)if(E(t.shape[n],o))return!0;return!1}if(t.type==="union"){for(const n of t.options)if(E(n,o))return!0;return!1}if(t.type==="tuple"){for(const n of t.items)if(E(n,o))return!0;return!!(t.rest&&E(t.rest,o))}return!1}const oi=(e,r={})=>o=>{const t=Zr({...o,processors:r});return j(e,t),xr(t,e),Or(t,e)},oe=(e,r,o={})=>t=>{const{libraryOptions:n,target:a}=t??{},i=Zr({...n??{},target:a,io:r,processors:o});return j(e,i),xr(i,e),Or(i,e)},ti={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ni=(e,r,o,t)=>{const n=o;n.type="string";const{minimum:a,maximum:i,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a=="number"&&(n.minLength=a),typeof i=="number"&&(n.maxLength=i),s&&(n.format=ti[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){const d=[...c];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(f=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},ii=(e,r,o,t)=>{const n=o,{minimum:a,maximum:i,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number",typeof d=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d),typeof a=="number"&&(n.minimum=a,typeof d=="number"&&r.target!=="draft-04"&&(d>=a?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),typeof i=="number"&&(n.maximum=i,typeof l=="number"&&r.target!=="draft-04"&&(l<=i?delete n.maximum:delete n.exclusiveMaximum)),typeof c=="number"&&(n.multipleOf=c)},ai=(e,r,o,t)=>{o.type="boolean"},si=(e,r,o,t)=>{o.not={}},ci=(e,r,o,t)=>{},ui=(e,r,o,t)=>{const n=e._zod.def,a=ar(n.entries);a.every(i=>typeof i=="number")&&(o.type="number"),a.every(i=>typeof i=="string")&&(o.type="string"),o.enum=a},li=(e,r,o,t)=>{const n=e._zod.def,a=[];for(const i of n.values)if(i===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(i))}else a.push(i);if(a.length!==0)if(a.length===1){const i=a[0];o.type=i===null?"null":typeof i,r.target==="draft-04"||r.target==="openapi-3.0"?o.enum=[i]:o.const=i}else a.every(i=>typeof i=="number")&&(o.type="number"),a.every(i=>typeof i=="string")&&(o.type="string"),a.every(i=>typeof i=="boolean")&&(o.type="boolean"),a.every(i=>i===null)&&(o.type="null"),o.enum=a},di=(e,r,o,t)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},pi=(e,r,o,t)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},fi=(e,r,o,t)=>{const n=o,a=e._zod.def,{minimum:i,maximum:s}=e._zod.bag;typeof i=="number"&&(n.minItems=i),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=j(a.element,r,{...t,path:[...t.path,"items"]})},hi=(e,r,o,t)=>{const n=o,a=e._zod.def;n.type="object",n.properties={};const i=a.shape;for(const l in i)n.properties[l]=j(i[l],r,{...t,path:[...t.path,"properties",l]});const s=new Set(Object.keys(i)),c=new Set([...s].filter(l=>{const d=a.shape[l]._zod;return r.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(n.required=Array.from(c)),a.catchall?._zod.def.type==="never"?n.additionalProperties=!1:a.catchall?a.catchall&&(n.additionalProperties=j(a.catchall,r,{...t,path:[...t.path,"additionalProperties"]})):r.io==="output"&&(n.additionalProperties=!1)},mi=(e,r,o,t)=>{const n=e._zod.def,a=n.inclusive===!1,i=n.options.map((s,c)=>j(s,r,{...t,path:[...t.path,a?"oneOf":"anyOf",c]}));a?o.oneOf=i:o.anyOf=i},gi=(e,r,o,t)=>{const n=e._zod.def,a=j(n.left,r,{...t,path:[...t.path,"allOf",0]}),i=j(n.right,r,{...t,path:[...t.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(a)?a.allOf:[a],...s(i)?i.allOf:[i]];o.allOf=c},vi=(e,r,o,t)=>{const n=o,a=e._zod.def;n.type="object";const i=a.keyType,c=i._zod.bag?.patterns;if(a.mode==="loose"&&c&&c.size>0){const d=j(a.valueType,r,{...t,path:[...t.path,"patternProperties","*"]});n.patternProperties={};for(const f of c)n.patternProperties[f.source]=d}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(n.propertyNames=j(a.keyType,r,{...t,path:[...t.path,"propertyNames"]})),n.additionalProperties=j(a.valueType,r,{...t,path:[...t.path,"additionalProperties"]});const l=i._zod.values;if(l){const d=[...l].filter(f=>typeof f=="string"||typeof f=="number");d.length>0&&(n.required=d)}},bi=(e,r,o,t)=>{const n=e._zod.def,a=j(n.innerType,r,t),i=r.seen.get(e);r.target==="openapi-3.0"?(i.ref=n.innerType,o.nullable=!0):o.anyOf=[a,{type:"null"}]},ki=(e,r,o,t)=>{const n=e._zod.def;j(n.innerType,r,t);const a=r.seen.get(e);a.ref=n.innerType},_i=(e,r,o,t)=>{const n=e._zod.def;j(n.innerType,r,t);const a=r.seen.get(e);a.ref=n.innerType,o.default=JSON.parse(JSON.stringify(n.defaultValue))},yi=(e,r,o,t)=>{const n=e._zod.def;j(n.innerType,r,t);const a=r.seen.get(e);a.ref=n.innerType,r.io==="input"&&(o._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},wi=(e,r,o,t)=>{const n=e._zod.def;j(n.innerType,r,t);const a=r.seen.get(e);a.ref=n.innerType;let i;try{i=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}o.default=i},zi=(e,r,o,t)=>{const n=e._zod.def,a=r.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;j(a,r,t);const i=r.seen.get(e);i.ref=a},Ci=(e,r,o,t)=>{const n=e._zod.def;j(n.innerType,r,t);const a=r.seen.get(e);a.ref=n.innerType,o.readOnly=!0},jr=(e,r,o,t)=>{const n=e._zod.def;j(n.innerType,r,t);const a=r.seen.get(e);a.ref=n.innerType},Si=u("ZodISODateTime",(e,r)=>{St.init(e,r),Z.init(e,r)});function $i(e){return En(Si,e)}const Zi=u("ZodISODate",(e,r)=>{$t.init(e,r),Z.init(e,r)});function xi(e){return In(Zi,e)}const Oi=u("ZodISOTime",(e,r)=>{Zt.init(e,r),Z.init(e,r)});function ji(e){return Pn(Oi,e)}const Ti=u("ZodISODuration",(e,r)=>{xt.init(e,r),Z.init(e,r)});function Ei(e){return Nn(Ti,e)}const Ii=(e,r)=>{lr.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>bo(e,o)},flatten:{value:o=>vo(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,he,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,he,2)}},isEmpty:{get(){return e.issues.length===0}}})},P=u("ZodError",Ii,{Parent:Error}),Pi=we(P),Ni=ze(P),Mi=ie(P),Ai=ae(P),Ri=yo(P),Di=wo(P),Bi=zo(P),Ui=Co(P),Fi=So(P),Li=$o(P),Ji=Zo(P),Wi=xo(P),$=u("ZodType",(e,r)=>(S.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:oe(e,"input"),output:oe(e,"output")}}),e.toJSONSchema=oi(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...o)=>e.clone(D(r,{checks:[...r.checks??[],...o.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0}),e.with=e.check,e.clone=(o,t)=>N(e,o,t),e.brand=()=>e,e.register=((o,t)=>(o.add(e,t),e)),e.parse=(o,t)=>Pi(e,o,t,{callee:e.parse}),e.safeParse=(o,t)=>Mi(e,o,t),e.parseAsync=async(o,t)=>Ni(e,o,t,{callee:e.parseAsync}),e.safeParseAsync=async(o,t)=>Ai(e,o,t),e.spa=e.safeParseAsync,e.encode=(o,t)=>Ri(e,o,t),e.decode=(o,t)=>Di(e,o,t),e.encodeAsync=async(o,t)=>Bi(e,o,t),e.decodeAsync=async(o,t)=>Ui(e,o,t),e.safeEncode=(o,t)=>Fi(e,o,t),e.safeDecode=(o,t)=>Li(e,o,t),e.safeEncodeAsync=async(o,t)=>Ji(e,o,t),e.safeDecodeAsync=async(o,t)=>Wi(e,o,t),e.refine=(o,t)=>e.check(Aa(o,t)),e.superRefine=o=>e.check(Ra(o)),e.overwrite=o=>e.check(H(o)),e.optional=()=>Ye(e),e.exactOptional=()=>Ca(e),e.nullable=()=>Xe(e),e.nullish=()=>Ye(Xe(e)),e.nonoptional=o=>ja(e,o),e.array=()=>Ir(e),e.or=o=>ce([e,o]),e.and=o=>Se(e,o),e.transform=o=>qe(e,wa(o)),e.default=o=>Za(e,o),e.prefault=o=>Oa(e,o),e.catch=o=>Ea(e,o),e.pipe=o=>qe(e,o),e.readonly=()=>Na(e),e.describe=o=>{const t=e.clone();return G.add(t,{description:o}),t},Object.defineProperty(e,"description",{get(){return G.get(e)?.description},configurable:!0}),e.meta=(...o)=>{if(o.length===0)return G.get(e);const t=e.clone();return G.add(t,o[0]),t},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=o=>o(e),e)),Tr=u("_ZodString",(e,r)=>{Ce.init(e,r),$.init(e,r),e._zod.processJSONSchema=(t,n,a)=>ni(e,t,n);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,e.regex=(...t)=>e.check(Un(...t)),e.includes=(...t)=>e.check(Jn(...t)),e.startsWith=(...t)=>e.check(Wn(...t)),e.endsWith=(...t)=>e.check(Vn(...t)),e.min=(...t)=>e.check(re(...t)),e.max=(...t)=>e.check(Sr(...t)),e.length=(...t)=>e.check($r(...t)),e.nonempty=(...t)=>e.check(re(1,...t)),e.lowercase=t=>e.check(Fn(t)),e.uppercase=t=>e.check(Ln(t)),e.trim=()=>e.check(Gn()),e.normalize=(...t)=>e.check(Hn(...t)),e.toLowerCase=()=>e.check(Kn()),e.toUpperCase=()=>e.check(Yn()),e.slugify=()=>e.check(Xn())}),Vi=u("ZodString",(e,r)=>{Ce.init(e,r),Tr.init(e,r),e.email=o=>e.check(dn(Hi,o)),e.url=o=>e.check(gn(Gi,o)),e.jwt=o=>e.check(Tn(ua,o)),e.emoji=o=>e.check(vn(Ki,o)),e.guid=o=>e.check(Le(He,o)),e.uuid=o=>e.check(pn(Q,o)),e.uuidv4=o=>e.check(fn(Q,o)),e.uuidv6=o=>e.check(hn(Q,o)),e.uuidv7=o=>e.check(mn(Q,o)),e.nanoid=o=>e.check(bn(Yi,o)),e.guid=o=>e.check(Le(He,o)),e.cuid=o=>e.check(kn(Xi,o)),e.cuid2=o=>e.check(_n(qi,o)),e.ulid=o=>e.check(yn(Qi,o)),e.base64=o=>e.check(xn(aa,o)),e.base64url=o=>e.check(On(sa,o)),e.xid=o=>e.check(wn(ea,o)),e.ksuid=o=>e.check(zn(ra,o)),e.ipv4=o=>e.check(Cn(oa,o)),e.ipv6=o=>e.check(Sn(ta,o)),e.cidrv4=o=>e.check($n(na,o)),e.cidrv6=o=>e.check(Zn(ia,o)),e.e164=o=>e.check(jn(ca,o)),e.datetime=o=>e.check($i(o)),e.date=o=>e.check(xi(o)),e.time=o=>e.check(ji(o)),e.duration=o=>e.check(Ei(o))});function p(e){return ln(Vi,e)}const Z=u("ZodStringFormat",(e,r)=>{C.init(e,r),Tr.init(e,r)}),Hi=u("ZodEmail",(e,r)=>{gt.init(e,r),Z.init(e,r)}),He=u("ZodGUID",(e,r)=>{ht.init(e,r),Z.init(e,r)}),Q=u("ZodUUID",(e,r)=>{mt.init(e,r),Z.init(e,r)}),Gi=u("ZodURL",(e,r)=>{vt.init(e,r),Z.init(e,r)}),Ki=u("ZodEmoji",(e,r)=>{bt.init(e,r),Z.init(e,r)}),Yi=u("ZodNanoID",(e,r)=>{kt.init(e,r),Z.init(e,r)}),Xi=u("ZodCUID",(e,r)=>{_t.init(e,r),Z.init(e,r)}),qi=u("ZodCUID2",(e,r)=>{yt.init(e,r),Z.init(e,r)}),Qi=u("ZodULID",(e,r)=>{wt.init(e,r),Z.init(e,r)}),ea=u("ZodXID",(e,r)=>{zt.init(e,r),Z.init(e,r)}),ra=u("ZodKSUID",(e,r)=>{Ct.init(e,r),Z.init(e,r)}),oa=u("ZodIPv4",(e,r)=>{Ot.init(e,r),Z.init(e,r)}),ta=u("ZodIPv6",(e,r)=>{jt.init(e,r),Z.init(e,r)}),na=u("ZodCIDRv4",(e,r)=>{Tt.init(e,r),Z.init(e,r)}),ia=u("ZodCIDRv6",(e,r)=>{Et.init(e,r),Z.init(e,r)}),aa=u("ZodBase64",(e,r)=>{It.init(e,r),Z.init(e,r)}),sa=u("ZodBase64URL",(e,r)=>{Nt.init(e,r),Z.init(e,r)}),ca=u("ZodE164",(e,r)=>{Mt.init(e,r),Z.init(e,r)}),ua=u("ZodJWT",(e,r)=>{Rt.init(e,r),Z.init(e,r)}),Er=u("ZodNumber",(e,r)=>{_r.init(e,r),$.init(e,r),e._zod.processJSONSchema=(t,n,a)=>ii(e,t,n),e.gt=(t,n)=>e.check(We(t,n)),e.gte=(t,n)=>e.check(de(t,n)),e.min=(t,n)=>e.check(de(t,n)),e.lt=(t,n)=>e.check(Je(t,n)),e.lte=(t,n)=>e.check(le(t,n)),e.max=(t,n)=>e.check(le(t,n)),e.int=t=>e.check(Ge(t)),e.safe=t=>e.check(Ge(t)),e.positive=t=>e.check(We(0,t)),e.nonnegative=t=>e.check(de(0,t)),e.negative=t=>e.check(Je(0,t)),e.nonpositive=t=>e.check(le(0,t)),e.multipleOf=(t,n)=>e.check(Ve(t,n)),e.step=(t,n)=>e.check(Ve(t,n)),e.finite=()=>e;const o=e._zod.bag;e.minValue=Math.max(o.minimum??Number.NEGATIVE_INFINITY,o.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(o.maximum??Number.POSITIVE_INFINITY,o.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(o.format??"").includes("int")||Number.isSafeInteger(o.multipleOf??.5),e.isFinite=!0,e.format=o.format??null});function ge(e){return Mn(Er,e)}const la=u("ZodNumberFormat",(e,r)=>{Dt.init(e,r),Er.init(e,r)});function Ge(e){return An(la,e)}const da=u("ZodBoolean",(e,r)=>{Bt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>ai(e,o,t)});function qa(e){return Rn(da,e)}const pa=u("ZodUnknown",(e,r)=>{Ut.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>ci()});function Ke(){return Dn(pa)}const fa=u("ZodNever",(e,r)=>{Ft.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>si(e,o,t)});function ha(e){return Bn(fa,e)}const ma=u("ZodArray",(e,r)=>{Lt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>fi(e,o,t,n),e.element=r.element,e.min=(o,t)=>e.check(re(o,t)),e.nonempty=o=>e.check(re(1,o)),e.max=(o,t)=>e.check(Sr(o,t)),e.length=(o,t)=>e.check($r(o,t)),e.unwrap=()=>e.element});function Ir(e,r){return qn(ma,e,r)}const ga=u("ZodObject",(e,r)=>{Wt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>hi(e,o,t,n),_(e,"shape",()=>r.shape),e.keyof=()=>Ze(Object.keys(e._zod.def.shape)),e.catchall=o=>e.clone({...e._zod.def,catchall:o}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ke()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ke()}),e.strict=()=>e.clone({...e._zod.def,catchall:ha()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=o=>po(e,o),e.safeExtend=o=>fo(e,o),e.merge=o=>ho(e,o),e.pick=o=>uo(e,o),e.omit=o=>lo(e,o),e.partial=(...o)=>mo(Mr,e,o[0]),e.required=(...o)=>go(Ar,e,o[0])});function O(e,r){const o={type:"object",shape:e??{},...h(r)};return new ga(o)}const Pr=u("ZodUnion",(e,r)=>{zr.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>mi(e,o,t,n),e.options=r.options});function ce(e,r){return new Pr({type:"union",options:e,...h(r)})}const va=u("ZodDiscriminatedUnion",(e,r)=>{Pr.init(e,r),Vt.init(e,r)});function Qa(e,r,o){return new va({type:"union",options:r,discriminator:e,...h(o)})}const ba=u("ZodIntersection",(e,r)=>{Ht.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>gi(e,o,t,n)});function Se(e,r){return new ba({type:"intersection",left:e,right:r})}const Nr=u("ZodRecord",(e,r)=>{Gt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>vi(e,o,t,n),e.keyType=r.keyType,e.valueType=r.valueType});function $e(e,r,o){return new Nr({type:"record",keyType:e,valueType:r,...h(o)})}function ka(e,r,o){const t=N(e);return t._zod.values=void 0,new Nr({type:"record",keyType:t,valueType:r,...h(o)})}const ve=u("ZodEnum",(e,r)=>{Kt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(t,n,a)=>ui(e,t,n),e.enum=r.entries,e.options=Object.values(r.entries);const o=new Set(Object.keys(r.entries));e.extract=(t,n)=>{const a={};for(const i of t)if(o.has(i))a[i]=r.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ve({...r,checks:[],...h(n),entries:a})},e.exclude=(t,n)=>{const a={...r.entries};for(const i of t)if(o.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new ve({...r,checks:[],...h(n),entries:a})}});function Ze(e,r){const o=Array.isArray(e)?Object.fromEntries(e.map(t=>[t,t])):e;return new ve({type:"enum",entries:o,...h(r)})}const _a=u("ZodLiteral",(e,r)=>{Yt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>li(e,o,t),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function es(e,r){return new _a({type:"literal",values:Array.isArray(e)?e:[e],...h(r)})}const ya=u("ZodTransform",(e,r)=>{Xt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>pi(e,o),e._zod.parse=(o,t)=>{if(t.direction==="backward")throw new nr(e.constructor.name);o.addIssue=a=>{if(typeof a=="string")o.issues.push(Y(a,o.value,r));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=e),o.issues.push(Y(i))}};const n=r.transform(o.value,o);return n instanceof Promise?n.then(a=>(o.value=a,o)):(o.value=n,o)}});function wa(e){return new ya({type:"transform",transform:e})}const Mr=u("ZodOptional",(e,r)=>{Cr.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>jr(e,o,t,n),e.unwrap=()=>e._zod.def.innerType});function Ye(e){return new Mr({type:"optional",innerType:e})}const za=u("ZodExactOptional",(e,r)=>{qt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>jr(e,o,t,n),e.unwrap=()=>e._zod.def.innerType});function Ca(e){return new za({type:"optional",innerType:e})}const Sa=u("ZodNullable",(e,r)=>{Qt.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>bi(e,o,t,n),e.unwrap=()=>e._zod.def.innerType});function Xe(e){return new Sa({type:"nullable",innerType:e})}const $a=u("ZodDefault",(e,r)=>{en.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>_i(e,o,t,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Za(e,r){return new $a({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():cr(r)}})}const xa=u("ZodPrefault",(e,r)=>{rn.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>yi(e,o,t,n),e.unwrap=()=>e._zod.def.innerType});function Oa(e,r){return new xa({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():cr(r)}})}const Ar=u("ZodNonOptional",(e,r)=>{on.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>ki(e,o,t,n),e.unwrap=()=>e._zod.def.innerType});function ja(e,r){return new Ar({type:"nonoptional",innerType:e,...h(r)})}const Ta=u("ZodCatch",(e,r)=>{tn.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>wi(e,o,t,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ea(e,r){return new Ta({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const Ia=u("ZodPipe",(e,r)=>{nn.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>zi(e,o,t,n),e.in=r.in,e.out=r.out});function qe(e,r){return new Ia({type:"pipe",in:e,out:r})}const Pa=u("ZodReadonly",(e,r)=>{an.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>Ci(e,o,t,n),e.unwrap=()=>e._zod.def.innerType});function Na(e){return new Pa({type:"readonly",innerType:e})}const Ma=u("ZodCustom",(e,r)=>{sn.init(e,r),$.init(e,r),e._zod.processJSONSchema=(o,t,n)=>di(e,o)});function Aa(e,r={}){return Qn(Ma,e,r)}function Ra(e){return ei(e)}const Da=O({minRem:ge(),maxRem:ge()}),x=Da.or(p()),M=O({0:p().optional(),50:p(),100:p(),200:p(),300:p(),400:p(),500:p(),600:p(),700:p(),800:p(),900:p(),950:p(),1e3:p().optional()}),pe=O({color:p().optional(),background:p().optional(),borderWidth:p().optional(),borderColor:p().optional(),boxShadow:p().optional()}),Rr=Se(O({borderRadius:x.optional(),custom:$e(p(),ce([p(),ge()])).optional(),hover:pe.optional(),focus:pe.optional()}),pe),Dr=O({family:p().optional()}),Br=ka(Ze(["predefinedQuestion","edit","newConversation","voteUp","voteDown","retry","message","messageLoading","thread","submit","abort","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","info","menuClose","chevronDown","chevronUp","chevronTopDown","chevronDownSmall","internalLink","externalLink","liip","avatar","avatarLarge","openChat","speechInput","listUnordered","lightMode","darkMode","avatarLarge","settings","settingsClose","sources","model","checkbox","warning","headerLogo","embedAvatar"]),p()),Ba=O({font:Dr.optional(),colors:O({brand:M,accent:M.optional(),highlight:M,grey:M}),base:O({fontSizeXs:x.optional(),fontSizeSm:x.optional(),fontSizeBody:x.optional(),fontSizeH3:x.optional(),fontSizeH2:x.optional(),fontSizeH1:x.optional(),fontWeightNormal:p().optional(),fontWeightBold:p().optional(),fontWeightTitle:p().optional(),lineHeightDefault:p().optional(),lineHeightSnug:p().optional(),lineHeightTight:p().optional(),borderRadius:x.optional(),lineColor:p().optional(),boxShadow:p().optional()}),components:$e(p(),Rr),svgs:Br}),Qe=O({customCSS:p().optional(),fontCSS:p().optional(),fontURLs:p().array().optional(),tokens:Ba});O({light:Qe,dark:Qe});const Ua=O({font:Dr.optional(),colors:O({brand:M.partial().optional(),accent:M.partial().optional(),highlight:M.partial().optional(),grey:M.partial().optional()}).optional(),base:O({fontSizeXs:x.optional(),fontSizeSm:x.optional(),fontSizeBody:x.optional(),fontSizeH3:x.optional(),fontSizeH2:x.optional(),fontSizeH1:x.optional(),fontWeightNormal:p().optional(),fontWeightBold:p().optional(),fontWeightTitle:p().optional(),lineHeightDefault:p().optional(),lineHeightSnug:p().optional(),lineHeightTight:p().optional(),borderRadius:x.optional(),lineColor:p().optional(),boxShadow:p().optional()}).optional(),components:$e(p(),Rr).optional(),svgs:Br.optional()}),er=O({customCSS:p().optional(),fontCSS:p().optional(),fontURLs:p().array().optional(),tokens:Ua.optional()}),Fa=O({light:er.optional(),dark:er.optional()}),Ur=O({50:p(),100:p(),200:p(),300:p(),400:p(),500:p(),600:p(),700:p(),800:p(),900:p(),950:p()}),Fr=Ze(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),rr=ce([Ur,Fr]),La=ce([Se(Ur,O({0:p(),1e3:p()})),Fr]),Ja=O({avatarImageUrl:p().optional(),colors:O({brand:rr.optional(),highlight:rr.optional(),grey:La.optional(),background:p().optional(),text:p().optional(),anchor:O({default:p().optional(),hover:p().optional()}).optional()}).optional(),font:O({family:p().optional(),urls:Ir(p()).optional(),sizeXs:x.optional(),sizeSm:x.optional(),sizeBody:x.optional(),sizeH3:x.optional(),sizeH2:x.optional(),sizeH1:x.optional(),weightNormal:p().optional(),weightBold:p().optional(),weightTitle:p().optional()}).optional(),borderRadius:x.optional(),fineGrained:Fa.optional()}),Wa=e=>e.split("/").pop().split(".")[0],Va=Object.assign({"./default/fallback-dev.theme.ts":oo,"./default/fallback.theme.ts":eo}),xe=new Map;Object.entries(Va).forEach(([e,r])=>{const{error:o,data:t}=Ja.safeParse(r?.theme);if(o){console.error(`Invalid theme in ${e}:`,o);return}xe.set(Wa(e),t)});const rs=e=>{const r=xe.get(e);return r||(console.error(`Theme ${e} not found`),te)};Array.from(xe.keys());export{Ya as P,Ze as _,p as a,qa as b,Ir as c,Qa as d,Ja as e,Yr as f,Wa as g,Hr as h,Se as i,rs as j,Xa as k,es as l,qr as m,ge as n,O as o,ka as p,$e as r,Ka as s,te as t,ce as u};
|