@liip/liipgpt 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/button/liipgpt-button.iife.js +26 -17
  2. package/chat/liipgpt-chat.iife.js +54 -45
  3. package/config/index.cjs +10 -4
  4. package/config/index.d.ts +454 -374
  5. package/config/index.js +10 -4
  6. package/configurator/_app/env.js +1 -1
  7. package/configurator/_app/immutable/chunks/BWd1KRA2.js +67 -0
  8. package/configurator/_app/immutable/chunks/BtLfsQWl.js +15 -0
  9. package/configurator/_app/immutable/chunks/CBFTM35p.js +367 -0
  10. package/configurator/_app/immutable/chunks/CP9-4jcs.js +1 -0
  11. package/configurator/_app/immutable/chunks/CfQtRUjK.js +1 -0
  12. package/configurator/_app/immutable/chunks/Cgm2UlUC.js +1 -0
  13. package/configurator/_app/immutable/chunks/ChcTJagy.js +3 -0
  14. package/configurator/_app/immutable/chunks/{BzVylwd7.js → D-Dn-KSg.js} +1 -1
  15. package/configurator/_app/immutable/chunks/Daj9x7sZ.js +1 -0
  16. package/configurator/_app/immutable/chunks/DvEdoyY3.js +1 -0
  17. package/configurator/_app/immutable/chunks/LjIoA1Wm.js +1 -0
  18. package/configurator/_app/immutable/chunks/TMezqz9A.js +1 -0
  19. package/configurator/_app/immutable/chunks/pxprCMm0.js +1 -0
  20. package/configurator/_app/immutable/entry/app.B4WSrzpv.js +2 -0
  21. package/configurator/_app/immutable/entry/start.GK6q9XMZ.js +1 -0
  22. package/configurator/_app/immutable/nodes/{0.C1WA-Sd0.js → 0.B7euNXzq.js} +1 -1
  23. package/configurator/_app/immutable/nodes/1.C9w5e9w0.js +1 -0
  24. package/configurator/_app/immutable/nodes/2.CWOgfthk.js +28 -0
  25. package/configurator/_app/immutable/nodes/3.BaHVKKga.js +897 -0
  26. package/configurator/_app/version.json +1 -1
  27. package/configurator/index.html +10 -10
  28. package/configurator/sidebar.html +10 -10
  29. package/index.cjs +1303 -862
  30. package/index.d.ts +738 -594
  31. package/index.js +1303 -862
  32. package/package.json +1 -1
  33. package/configurator/_app/immutable/chunks/BiXZbQqO.js +0 -1
  34. package/configurator/_app/immutable/chunks/BmumJykv.js +0 -3
  35. package/configurator/_app/immutable/chunks/BynrE7QB.js +0 -4
  36. package/configurator/_app/immutable/chunks/CXbcLk5j.js +0 -1
  37. package/configurator/_app/immutable/chunks/CaDmIJkP.js +0 -28
  38. package/configurator/_app/immutable/chunks/D5wkZK_2.js +0 -1
  39. package/configurator/_app/immutable/chunks/DCtHJYgu.js +0 -1
  40. package/configurator/_app/immutable/chunks/DH3truD-.js +0 -364
  41. package/configurator/_app/immutable/chunks/DTGU2mqM.js +0 -1
  42. package/configurator/_app/immutable/chunks/DUt8zN7X.js +0 -1
  43. package/configurator/_app/immutable/chunks/DkXqbGhE.js +0 -58
  44. package/configurator/_app/immutable/chunks/Dq6jck_i.js +0 -1
  45. package/configurator/_app/immutable/chunks/DqybDqwy.js +0 -15
  46. package/configurator/_app/immutable/entry/app.0vDWmuRN.js +0 -2
  47. package/configurator/_app/immutable/entry/start.DR9kqzeI.js +0 -1
  48. package/configurator/_app/immutable/nodes/1.D_clQXr4.js +0 -1
  49. package/configurator/_app/immutable/nodes/2.DVQmbfVp.js +0 -1
  50. package/configurator/_app/immutable/nodes/3.CVRgUIw6.js +0 -897
package/config/index.js CHANGED
@@ -3983,10 +3983,11 @@ var coerce = {
3983
3983
  };
3984
3984
  var NEVER = INVALID;
3985
3985
  // src/lib/config/schemas/theme-schema.ts
3986
- var sizeDefinitionSchema = exports_external.object({
3986
+ var sizeDefinitionClampSchema = exports_external.object({
3987
3987
  minRem: exports_external.number(),
3988
3988
  maxRem: exports_external.number()
3989
3989
  });
3990
+ var sizeDefinitionSchema = sizeDefinitionClampSchema.or(exports_external.string());
3990
3991
  var colorSchema = exports_external.object({
3991
3992
  0: exports_external.string().optional(),
3992
3993
  50: exports_external.string(),
@@ -4049,6 +4050,7 @@ var svgsSchema = exports_external.record(exports_external.enum([
4049
4050
  "avatar",
4050
4051
  "openChat",
4051
4052
  "speechInput",
4053
+ "listUnordered",
4052
4054
  "lightMode",
4053
4055
  "darkMode"
4054
4056
  ]), exports_external.string());
@@ -4060,6 +4062,7 @@ var tokensSchema = exports_external.object({
4060
4062
  highlight: colorSchema,
4061
4063
  grey: colorSchema
4062
4064
  }),
4065
+ base: exports_external.object({}),
4063
4066
  components: exports_external.record(exports_external.string(), componentSchema),
4064
4067
  svgs: svgsSchema
4065
4068
  });
@@ -4132,11 +4135,11 @@ var themeSchema2 = objectType({
4132
4135
  }).optional()
4133
4136
  }).optional(),
4134
4137
  font: objectType({
4135
- size: sizeDefinitionSchema.optional(),
4138
+ size: sizeDefinitionClampSchema.optional(),
4136
4139
  family: stringType().optional(),
4137
4140
  urls: arrayType(stringType()).optional()
4138
4141
  }).optional(),
4139
- borderRadius: sizeDefinitionSchema.optional(),
4142
+ borderRadius: sizeDefinitionClampSchema.optional(),
4140
4143
  fineGrained: fineGrainedThemeSchema.optional()
4141
4144
  });
4142
4145
 
@@ -4174,13 +4177,16 @@ var translationSchema = exports_external.object({
4174
4177
  predefinedQuestions: exports_external.string(),
4175
4178
  introductionTitle: exports_external.string(),
4176
4179
  introductionDisclaimer: exports_external.string().optional(),
4177
- referenceTitle: exports_external.string(),
4178
4180
  chatInputPlaceholder: exports_external.string(),
4179
4181
  chatInputPlaceholderListening: exports_external.string().optional(),
4180
4182
  chatInputSubmit: exports_external.string(),
4181
4183
  chatInputStartListening: exports_external.string(),
4182
4184
  chatInputStopListening: exports_external.string(),
4183
4185
  referenceLink: exports_external.string(),
4186
+ referencesDisplay: exports_external.string(),
4187
+ referencesHide: exports_external.string(),
4188
+ referencesTitle: exports_external.string(),
4189
+ referencesFurtherTitle: exports_external.string(),
4184
4190
  newChat: exports_external.string(),
4185
4191
  maintenanceModeError: exports_external.string(),
4186
4192
  messageBotLoading: exports_external.string(),
@@ -1 +1 @@
1
- export const env={"PUBLIC_API_URL":"https://liipgpt.api.dev.genai.liip.ch/liipgpt","PUBLIC_CI_COMMIT_TAG":"1.0.0"}
1
+ export const env={"PUBLIC_API_URL":"https://liipgpt.api.dev.genai.liip.ch/liipgpt","PUBLIC_CI_COMMIT_TAG":"2.0.0"}
@@ -0,0 +1,67 @@
1
+ const Pt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Dt="2.0.0";function Je(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var oe,xe;function Qe(){if(xe)return oe;xe=1;var a=function(k){return e(k)&&!t(k)};function e(g){return!!g&&typeof g=="object"}function t(g){var k=Object.prototype.toString.call(g);return k==="[object RegExp]"||k==="[object Date]"||o(g)}var r=typeof Symbol=="function"&&Symbol.for,n=r?Symbol.for("react.element"):60103;function o(g){return g.$$typeof===n}function s(g){return Array.isArray(g)?[]:{}}function i(g,k){return k.clone!==!1&&k.isMergeableObject(g)?z(s(g),g,k):g}function h(g,k,w){return g.concat(k).map(function(R){return i(R,w)})}function f(g,k){if(!k.customMerge)return z;var w=k.customMerge(g);return typeof w=="function"?w:z}function _(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(k){return Object.propertyIsEnumerable.call(g,k)}):[]}function I(g){return Object.keys(g).concat(_(g))}function G(g,k){try{return k in g}catch{return!1}}function He(g,k){return G(g,k)&&!(Object.hasOwnProperty.call(g,k)&&Object.propertyIsEnumerable.call(g,k))}function qe(g,k,w){var R={};return w.isMergeableObject(g)&&I(g).forEach(function(S){R[S]=i(g[S],w)}),I(k).forEach(function(S){He(g,S)||(G(g,S)&&w.isMergeableObject(k[S])?R[S]=f(S,w)(g[S],k[S],w):R[S]=i(k[S],w))}),R}function z(g,k,w){w=w||{},w.arrayMerge=w.arrayMerge||h,w.isMergeableObject=w.isMergeableObject||a,w.cloneUnlessOtherwiseSpecified=i;var R=Array.isArray(k),S=Array.isArray(g),Ge=R===S;return Ge?R?w.arrayMerge(g,k,w):qe(g,k,w):i(k,w)}z.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(R,S){return z(R,S,w)},{})};var Ye=z;return oe=Ye,oe}var Xe=Qe();const Ke=Je(Xe),Le={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:{},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)"}},header:{background:"transparent"},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},box:{custom:{shadow:"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)"}},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},line:{color:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)"},btnPrimary:{color:"var(--color-grey-0)",background:"var(--color-brand-700)",borderRadius:{minRem:.5,maxRem:.75},hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--color-grey-600)",background:"var(--color-grey-100)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},card:{color:"inherit",background:"var(--color-grey-100)",borderRadius:{minRem:.5,maxRem:.75},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:{minRem:.25,maxRem:.5},custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--line-color)"},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--font-weight-bold)",separatorColor:"var(--line-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:{minRem:.25,maxRem:.5},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:{minRem:.75,maxRem:1},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:{minRem:.75,maxRem:1},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:{minRem:.5,maxRem:.75},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:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:{minRem:.25,maxRem:.5}},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",boxShadow:"var(--box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--line-color)"}},aside:{background:"var(--card-background)",custom:{width:"400px",containerWidthForMobileLayout:768,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageReferences:{color:"var(--anchor-color)",background:"transparent",borderRadius:{minRem:.5,maxRem:.75},hover:{color:"var(--anchor-hover-color)"}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:{minRem:.5,maxRem:.75}},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:{minRem:.25,maxRem:.5},hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesToggle:{color:"var(--anchor-color)",hover:{color:"var(--anchor-hover-color)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:{minRem:.25,maxRem:.25},hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{padding:"1px 0.4em 0"}},referenceDomain:{color:"var(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",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(--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)",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:"1px 0.4em 0"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--box-shadow)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:{minRem:.2,maxRem:.3}}},svgs:{predefinedQuestion:'<svg viewBox="0 0 24 24" ><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><path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><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><path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',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:'<svg viewBox="0 0 24 24"><path d="M5.5 18.928A9.5 9.5 0 0 1 17.061 3.956" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m18.5 9.498 0 -4.5 4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m5.5 14.498 0 4.5 -4.5 0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M18.5 5.071A9.5 9.5 0 0 1 6.883 20.006" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>',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">
2
+ <circle cx="6" cy="23" r="1.75" fill="currentColor">
3
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0s"/>
4
+ </circle>
5
+ <circle cx="12" cy="23" r="1.75" fill="currentColor">
6
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.3s"/>
7
+ </circle>
8
+ <circle cx="18" cy="23" r="1.75" fill="currentColor">
9
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.6s"/>
10
+ </circle>
11
+ </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" xmlns="http://www.w3.org/2000/svg" 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"><path d="m20 16-8-8-8 8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></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>',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:`
12
+ <svg viewBox="0 0 24 24">
13
+ <circle cx="12" cy="12" r="11" fill="var(--avatar-background)"/>
14
+ <g fill="var(--avatar-color)" stroke="none" stroke-linecap="round" stroke-linejoin="round">
15
+ <path d="m14.1 12.5c-3.1 1-4.1 2.2-4.8 5-.7-2.9-1.8-4-4.8-5 3.1-1 4.1-2.2 4.8-5 .7 2.9 1.8 4 4.8 5z" vector-effect="non-scaling-stroke" />
16
+ <path d="m17.9 7.8c-1.7.6-2.3 1.2-2.7 2.8-.4-1.6-1-2.3-2.7-2.8 1.7-.6 2.3-1.2 2.7-2.8.4 1.6 1 2.3 2.7 2.8z" vector-effect="non-scaling-stroke" />
17
+ <path d="m18.2 16.1c-1.3.4-1.7.9-2 2.1-.3-1.2-.7-1.6-2-2.1 1.3-.4 1.7-.9 2-2.1.3 1.2.7 1.6 2 2.1z" vector-effect="non-scaling-stroke" />
18
+ </g>
19
+ </svg>
20
+ `,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:`
21
+ <svg width="0" height="0">
22
+ <defs>
23
+ <mask id="microphone-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
24
+ <rect width="1" height="1" fill="black" />
25
+ <g
26
+ fill="none"
27
+ stroke="white"
28
+ stroke-width="2"
29
+ stroke-linecap="round"
30
+ stroke-linejoin="round"
31
+ transform="translate(0.1, 0.05) scale(0.035, 0.035)"
32
+ >
33
+ <path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
34
+ <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
35
+ <path d="M12 19v4"></path>
36
+ <path d="M8 23h8"></path>
37
+ </g>
38
+ </mask>
39
+ </defs>
40
+ </svg>
41
+ `,listUnordered:`
42
+ <svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'>
43
+ <path d='M8 6H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
44
+ <path d='M8 12H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
45
+ <path d='M8 18H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
46
+ <path d='M3 6H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
47
+ <path d='M3 12H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
48
+ <path d='M3 18H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
49
+ </svg>
50
+ `,lightMode:`
51
+ <svg viewBox="0 0 24 24" fill="none">
52
+ <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"/>
53
+ <path d="M12 20.4375V22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
54
+ <path d="M20.4375 12H22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
55
+ <path d="M12 3.5625V1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
56
+ <path d="M3.5625 12H1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
57
+ <path d="M6.03469 17.9663L4.70813 19.2929" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
58
+ <path d="M17.9662 17.9663L19.2919 19.2919" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
59
+ <path d="M17.9672 6.03461L19.2928 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
60
+ <path d="M6.03375 6.03461L4.70813 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
61
+ </svg>
62
+
63
+ `,darkMode:`
64
+ <svg viewBox="0 0 24 24" fill="none">
65
+ <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"/>
66
+ </svg>
67
+ `}}},et=Ke(Le,{tokens:{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)"}},line:{color:"color-mix(in srgb, var(--color-brand-100) 20%, transparent)"},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(--color-grey-0)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},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)"},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)"}}}}),ne={fineGrained:{light:Le,dark:et}},tt=Object.freeze(Object.defineProperty({__proto__:null,theme:ne},Symbol.toStringTag,{value:"Module"})),ge=structuredClone(ne.fineGrained.light);ge.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",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 ze=structuredClone(ne.fineGrained.dark);ze.tokens.colors=ge.tokens.colors;const rt={fineGrained:{light:ge,dark:ze}},at=Object.freeze(Object.defineProperty({__proto__:null,theme:rt},Symbol.toStringTag,{value:"Module"}));var x;(function(a){a.assertEqual=n=>{};function e(n){}a.assertIs=e;function t(n){throw new Error}a.assertNever=t,a.arrayToEnum=n=>{const o={};for(const s of n)o[s]=s;return o},a.getValidEnumValues=n=>{const o=a.objectKeys(n).filter(i=>typeof n[n[i]]!="number"),s={};for(const i of o)s[i]=n[i];return a.objectValues(s)},a.objectValues=n=>a.objectKeys(n).map(function(o){return n[o]}),a.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(s);return o},a.find=(n,o)=>{for(const s of n)if(o(s))return s},a.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,o=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}a.joinValues=r,a.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(x||(x={}));var we;(function(a){a.mergeShapes=(e,t)=>({...e,...t})})(we||(we={}));const l=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),E=a=>{switch(typeof a){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(a)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(a)?l.array:a===null?l.null:a.then&&typeof a.then=="function"&&a.catch&&typeof a.catch=="function"?l.promise:typeof Map<"u"&&a instanceof Map?l.map:typeof Set<"u"&&a instanceof Set?l.set:typeof Date<"u"&&a instanceof Date?l.date:l.object;default:return l.unknown}},c=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Z extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(o){return o.message},r={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)r._errors.push(t(s));else{let i=r,h=0;for(;h<s.path.length;){const f=s.path[h];h===s.path.length-1?(i[f]=i[f]||{_errors:[]},i[f]._errors.push(t(s))):i[f]=i[f]||{_errors:[]},i=i[f],h++}}};return n(this),r}static assert(e){if(!(e instanceof Z))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];t[o]=t[o]||[],t[o].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}Z.create=a=>new Z(a);const ce=(a,e)=>{let t;switch(a.code){case c.invalid_type:a.received===l.undefined?t="Required":t=`Expected ${a.expected}, received ${a.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(a.expected,x.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(a.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(a.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(a.options)}, received '${a.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof a.validation=="object"?"includes"in a.validation?(t=`Invalid input: must include "${a.validation.includes}"`,typeof a.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${a.validation.position}`)):"startsWith"in a.validation?t=`Invalid input: must start with "${a.validation.startsWith}"`:"endsWith"in a.validation?t=`Invalid input: must end with "${a.validation.endsWith}"`:x.assertNever(a.validation):a.validation!=="regex"?t=`Invalid ${a.validation}`:t="Invalid";break;case c.too_small:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at least":"more than"} ${a.minimum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at least":"over"} ${a.minimum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${a.minimum}`:a.type==="bigint"?t=`Number must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${a.minimum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(a.minimum))}`:t="Invalid input";break;case c.too_big:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at most":"less than"} ${a.maximum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at most":"under"} ${a.maximum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="bigint"?t=`BigInt must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly":a.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(a.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${a.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(a)}return{message:t}};let nt=ce;function ot(){return nt}const st=a=>{const{data:e,path:t,errorMaps:r,issueData:n}=a,o=[...t,...n.path||[]],s={...n,path:o};if(n.message!==void 0)return{...n,path:o,message:n.message};let i="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)i=f(s,{data:e,defaultError:i}).message;return{...n,path:o,message:i}};function d(a,e){const t=ot(),r=st({issueData:e,data:a.data,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,t,t===ce?void 0:ce].filter(n=>!!n)});a.common.issues.push(r)}class T{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return v;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const o=await n.key,s=await n.value;r.push({key:o,value:s})}return T.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:o,value:s}=n;if(o.status==="aborted"||s.status==="aborted")return v;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(r[o.value]=s.value)}return{status:e.value,value:r}}}const v=Object.freeze({status:"aborted"}),H=a=>({status:"dirty",value:a}),O=a=>({status:"valid",value:a}),Ce=a=>a.status==="aborted",je=a=>a.status==="dirty",P=a=>a.status==="valid",Q=a=>typeof Promise<"u"&&a instanceof Promise;var u;(function(a){a.errToObj=e=>typeof e=="string"?{message:e}:e||{},a.toString=e=>typeof e=="string"?e:e?.message})(u||(u={}));class M{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Se=(a,e)=>{if(P(e))return{success:!0,data:e.value};if(!a.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Z(a.common.issues);return this._error=t,this._error}}};function y(a){if(!a)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=a;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,i)=>{const{message:h}=a;return s.code==="invalid_enum_value"?{message:h??i.defaultError}:typeof i.data>"u"?{message:h??r??i.defaultError}:s.code!=="invalid_type"?{message:i.defaultError}:{message:h??t??i.defaultError}},description:n}}class b{get description(){return this._def.description}_getType(e){return E(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:E(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new T,ctx:{common:e.parent.common,data:e.data,parsedType:E(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)},n=this._parseSync({data:e,path:r.path,parent:r});return Se(r,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return P(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>P(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(Q(n)?n:Promise.resolve(n));return Se(r,o)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,o)=>{const s=e(n),i=()=>o.addIssue({code:c.custom,...r(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(h=>h?!0:(i(),!1)):s?!0:(i(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new W({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return B.create(this,this._def)}nullable(){return F.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A.create(this)}promise(){return re.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new W({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new he({...y(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Rt({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new fe({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ye.create(this,e)}readonly(){return pe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const it=/^c[^\s-]{8,}$/i,ct=/^[0-9a-z]+$/,dt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ut=/^[a-z0-9_-]{21}$/i,ht=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ft=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let se;const vt=/^(?:(?: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])$/,gt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,yt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,kt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,_t=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ve="((\\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])))",xt=new RegExp(`^${Ve}$`);function Pe(a){let e="[0-5]\\d";a.precision?e=`${e}\\.\\d{${a.precision}}`:a.precision==null&&(e=`${e}(\\.\\d+)?`);const t=a.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function wt(a){return new RegExp(`^${Pe(a)}$`)}function Ct(a){let e=`${Ve}T${Pe(a)}`;const t=[];return t.push(a.local?"Z?":"Z"),a.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function jt(a,e){return!!((e==="v4"||!e)&&vt.test(a)||(e==="v6"||!e)&&yt.test(a))}function St(a,e){if(!ht.test(a))return!1;try{const[t]=a.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Tt(a,e){return!!((e==="v4"||!e)&&gt.test(a)||(e==="v6"||!e)&&kt.test(a))}class N extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const o=this._getOrReturnCtx(e);return d(o,{code:c.invalid_type,expected:l.string,received:o.parsedType}),v}const r=new T;let n;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,i=e.data.length<o.value;(s||i)&&(n=this._getOrReturnCtx(e,n),s?d(n,{code:c.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&d(n,{code:c.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")pt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"email",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")se||(se=new RegExp(mt,"u")),se.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"emoji",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")lt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"uuid",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")ut.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"nanoid",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")it.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")ct.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid2",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")dt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ulid",code:c.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),d(n,{validation:"url",code:c.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"regex",code:c.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Ct(o).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?xt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?wt(o).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?ft.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"duration",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?jt(e.data,o.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ip",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?St(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"jwt",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Tt(e.data,o.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cidr",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?bt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64",code:c.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?_t.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64url",code:c.invalid_string,message:o.message}),r.dirty()):x.assertNever(o);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...u.errToObj(r)})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...u.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...u.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...u.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...u.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...u.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...u.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...u.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...u.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...u.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...u.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...u.errToObj(t)})}nonempty(e){return this.min(1,u.errToObj(e))}trim(){return new N({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}N.create=a=>new N({checks:[],typeName:m.ZodString,coerce:a?.coerce??!1,...y(a)});function Ot(a,e){const t=(a.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,o=Number.parseInt(a.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return o%s/10**n}class D extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==l.number){const o=this._getOrReturnCtx(e);return d(o,{code:c.invalid_type,expected:l.number,received:o.parsedType}),v}let r;const n=new T;for(const o of this._def.checks)o.kind==="int"?x.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?Ot(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_finite,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,r,n){return new D({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:u.toString(n)}]})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}D.create=a=>new D({checks:[],typeName:m.ZodNumber,coerce:a?.coerce||!1,...y(a)});class q extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==l.bigint)return this._getInvalidInput(e);let r;const n=new T;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:l.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,r,n){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:u.toString(n)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}q.create=a=>new q({checks:[],typeName:m.ZodBigInt,coerce:a?.coerce??!1,...y(a)});class de extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.boolean,received:r.parsedType}),v}return O(e.data)}}de.create=a=>new de({typeName:m.ZodBoolean,coerce:a?.coerce||!1,...y(a)});class X extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const o=this._getOrReturnCtx(e);return d(o,{code:c.invalid_type,expected:l.date,received:o.parsedType}),v}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return d(o,{code:c.invalid_date}),v}const r=new T;let n;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):x.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}X.create=a=>new X({checks:[],coerce:a?.coerce||!1,typeName:m.ZodDate,...y(a)});class Te extends b{_parse(e){if(this._getType(e)!==l.symbol){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.symbol,received:r.parsedType}),v}return O(e.data)}}Te.create=a=>new Te({typeName:m.ZodSymbol,...y(a)});class Oe extends b{_parse(e){if(this._getType(e)!==l.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.undefined,received:r.parsedType}),v}return O(e.data)}}Oe.create=a=>new Oe({typeName:m.ZodUndefined,...y(a)});class Re extends b{_parse(e){if(this._getType(e)!==l.null){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.null,received:r.parsedType}),v}return O(e.data)}}Re.create=a=>new Re({typeName:m.ZodNull,...y(a)});class Ae extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ae.create=a=>new Ae({typeName:m.ZodAny,...y(a)});class Me extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}Me.create=a=>new Me({typeName:m.ZodUnknown,...y(a)});class $ extends b{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:l.never,received:t.parsedType}),v}}$.create=a=>new $({typeName:m.ZodNever,...y(a)});class Ne extends b{_parse(e){if(this._getType(e)!==l.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.void,received:r.parsedType}),v}return O(e.data)}}Ne.create=a=>new Ne({typeName:m.ZodVoid,...y(a)});class A extends b{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==l.array)return d(t,{code:c.invalid_type,expected:l.array,received:t.parsedType}),v;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(s||i)&&(d(t,{code:s?c.too_big:c.too_small,minimum:i?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(d(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(d(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((s,i)=>n.type._parseAsync(new M(t,s,t.path,i)))).then(s=>T.mergeArray(r,s));const o=[...t.data].map((s,i)=>n.type._parseSync(new M(t,s,t.path,i)));return T.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new A({...this._def,minLength:{value:e,message:u.toString(t)}})}max(e,t){return new A({...this._def,maxLength:{value:e,message:u.toString(t)}})}length(e,t){return new A({...this._def,exactLength:{value:e,message:u.toString(t)}})}nonempty(e){return this.min(1,e)}}A.create=(a,e)=>new A({type:a,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function V(a){if(a instanceof C){const e={};for(const t in a.shape){const r=a.shape[t];e[t]=B.create(V(r))}return new C({...a._def,shape:()=>e})}else return a instanceof A?new A({...a._def,type:V(a.element)}):a instanceof B?B.create(V(a.unwrap())):a instanceof F?F.create(V(a.unwrap())):a instanceof L?L.create(a.items.map(e=>V(e))):a}class C extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==l.object){const f=this._getOrReturnCtx(e);return d(f,{code:c.invalid_type,expected:l.object,received:f.parsedType}),v}const{status:r,ctx:n}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof $&&this._def.unknownKeys==="strip"))for(const f in n.data)s.includes(f)||i.push(f);const h=[];for(const f of s){const _=o[f],I=n.data[f];h.push({key:{status:"valid",value:f},value:_._parse(new M(n,I,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof $){const f=this._def.unknownKeys;if(f==="passthrough")for(const _ of i)h.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(f==="strict")i.length>0&&(d(n,{code:c.unrecognized_keys,keys:i}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const _ of i){const I=n.data[_];h.push({key:{status:"valid",value:_},value:f._parse(new M(n,I,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const f=[];for(const _ of h){const I=await _.key,G=await _.value;f.push({key:I,value:G,alwaysSet:_.alwaysSet})}return f}).then(f=>T.mergeObjectSync(r,f)):T.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new C({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{const n=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:u.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new C({...this._def,unknownKeys:"strip"})}passthrough(){return new C({...this._def,unknownKeys:"passthrough"})}extend(e){return new C({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new C({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new C({...this._def,catchall:e})}pick(e){const t={};for(const r of x.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new C({...this._def,shape:()=>t})}omit(e){const t={};for(const r of x.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new C({...this._def,shape:()=>t})}deepPartial(){return V(this)}partial(e){const t={};for(const r of x.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new C({...this._def,shape:()=>t})}required(e){const t={};for(const r of x.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof B;)o=o._def.innerType;t[r]=o}return new C({...this._def,shape:()=>t})}keyof(){return De(x.objectKeys(this.shape))}}C.create=(a,e)=>new C({shape:()=>a,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...y(e)});C.strictCreate=(a,e)=>new C({shape:()=>a,unknownKeys:"strict",catchall:$.create(),typeName:m.ZodObject,...y(e)});C.lazycreate=(a,e)=>new C({shape:a,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...y(e)});class K extends b{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(i=>new Z(i.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:s}),v}if(t.common.async)return Promise.all(r.map(async o=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let o;const s=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},_=h._parseSync({data:t.data,path:t.path,parent:f});if(_.status==="valid")return _;_.status==="dirty"&&!o&&(o={result:_,ctx:f}),f.common.issues.length&&s.push(f.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(h=>new Z(h));return d(t,{code:c.invalid_union,unionErrors:i}),v}}get options(){return this._def.options}}K.create=(a,e)=>new K({options:a,typeName:m.ZodUnion,...y(e)});function le(a,e){const t=E(a),r=E(e);if(a===e)return{valid:!0,data:a};if(t===l.object&&r===l.object){const n=x.objectKeys(e),o=x.objectKeys(a).filter(i=>n.indexOf(i)!==-1),s={...a,...e};for(const i of o){const h=le(a[i],e[i]);if(!h.valid)return{valid:!1};s[i]=h.data}return{valid:!0,data:s}}else if(t===l.array&&r===l.array){if(a.length!==e.length)return{valid:!1};const n=[];for(let o=0;o<a.length;o++){const s=a[o],i=e[o],h=le(s,i);if(!h.valid)return{valid:!1};n.push(h.data)}return{valid:!0,data:n}}else return t===l.date&&r===l.date&&+a==+e?{valid:!0,data:a}:{valid:!1}}class ee extends b{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(o,s)=>{if(Ce(o)||Ce(s))return v;const i=le(o.value,s.value);return i.valid?((je(o)||je(s))&&t.dirty(),{status:t.value,value:i.data}):(d(r,{code:c.invalid_intersection_types}),v)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ee.create=(a,e,t)=>new ee({left:a,right:e,typeName:m.ZodIntersection,...y(t)});class L extends b{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.array)return d(r,{code:c.invalid_type,expected:l.array,received:r.parsedType}),v;if(r.data.length<this._def.items.length)return d(r,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&r.data.length>this._def.items.length&&(d(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const o=[...r.data].map((s,i)=>{const h=this._def.items[i]||this._def.rest;return h?h._parse(new M(r,s,r.path,i)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>T.mergeArray(t,s)):T.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new L({...this._def,rest:e})}}L.create=(a,e)=>{if(!Array.isArray(a))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new L({items:a,typeName:m.ZodTuple,rest:null,...y(e)})};class te extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.object)return d(r,{code:c.invalid_type,expected:l.object,received:r.parsedType}),v;const n=[],o=this._def.keyType,s=this._def.valueType;for(const i in r.data)n.push({key:o._parse(new M(r,i,r.path,i)),value:s._parse(new M(r,r.data[i],r.path,i)),alwaysSet:i in r.data});return r.common.async?T.mergeObjectAsync(t,n):T.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof b?new te({keyType:e,valueType:t,typeName:m.ZodRecord,...y(r)}):new te({keyType:N.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}}class Ze extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.map)return d(r,{code:c.invalid_type,expected:l.map,received:r.parsedType}),v;const n=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([i,h],f)=>({key:n._parse(new M(r,i,r.path,[f,"key"])),value:o._parse(new M(r,h,r.path,[f,"value"]))}));if(r.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const h of s){const f=await h.key,_=await h.value;if(f.status==="aborted"||_.status==="aborted")return v;(f.status==="dirty"||_.status==="dirty")&&t.dirty(),i.set(f.value,_.value)}return{status:t.value,value:i}})}else{const i=new Map;for(const h of s){const f=h.key,_=h.value;if(f.status==="aborted"||_.status==="aborted")return v;(f.status==="dirty"||_.status==="dirty")&&t.dirty(),i.set(f.value,_.value)}return{status:t.value,value:i}}}}Ze.create=(a,e,t)=>new Ze({valueType:e,keyType:a,typeName:m.ZodMap,...y(t)});class Y extends b{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==l.set)return d(r,{code:c.invalid_type,expected:l.set,received:r.parsedType}),v;const n=this._def;n.minSize!==null&&r.data.size<n.minSize.value&&(d(r,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&r.data.size>n.maxSize.value&&(d(r,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const o=this._def.valueType;function s(h){const f=new Set;for(const _ of h){if(_.status==="aborted")return v;_.status==="dirty"&&t.dirty(),f.add(_.value)}return{status:t.value,value:f}}const i=[...r.data.values()].map((h,f)=>o._parse(new M(r,h,r.path,f)));return r.common.async?Promise.all(i).then(h=>s(h)):s(i)}min(e,t){return new Y({...this._def,minSize:{value:e,message:u.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:u.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(a,e)=>new Y({valueType:a,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class Ie extends b{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ie.create=(a,e)=>new Ie({getter:a,typeName:m.ZodLazy,...y(e)});class ue extends b{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}ue.create=(a,e)=>new ue({value:a,typeName:m.ZodLiteral,...y(e)});function De(a,e){return new U({values:a,typeName:m.ZodEnum,...y(e)})}class U extends b{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{expected:x.joinValues(r),received:t.parsedType,code:c.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:r}),v}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return U.create(e,{...this._def,...t})}exclude(e,t=this._def){return U.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}U.create=De;class Ee extends b{_parse(e){const t=x.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==l.string&&r.parsedType!==l.number){const n=x.objectValues(t);return d(r,{expected:x.joinValues(n),received:r.parsedType,code:c.invalid_type}),v}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=x.objectValues(t);return d(r,{received:r.data,code:c.invalid_enum_value,options:n}),v}return O(e.data)}get enum(){return this._def.values}}Ee.create=(a,e)=>new Ee({values:a,typeName:m.ZodNativeEnum,...y(e)});class re extends b{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:l.promise,received:t.parsedType}),v;const r=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return O(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}re.create=(a,e)=>new re({type:a,typeName:m.ZodPromise,...y(e)});class W extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{d(r,s),s.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const s=n.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async i=>{if(t.value==="aborted")return v;const h=await this._def.schema._parseAsync({data:i,path:r.path,parent:r});return h.status==="aborted"?v:h.status==="dirty"||t.value==="dirty"?H(h.value):h});{if(t.value==="aborted")return v;const i=this._def.schema._parseSync({data:s,path:r.path,parent:r});return i.status==="aborted"?v:i.status==="dirty"||t.value==="dirty"?H(i.value):i}}if(n.type==="refinement"){const s=i=>{const h=n.refinement(i,o);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?v:(i.status==="dirty"&&t.dirty(),s(i.value),{status:t.value,value:i.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>i.status==="aborted"?v:(i.status==="dirty"&&t.dirty(),s(i.value).then(()=>({status:t.value,value:i.value}))))}if(n.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!P(s))return v;const i=n.transform(s.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>P(s)?Promise.resolve(n.transform(s.value,o)).then(i=>({status:t.value,value:i})):v);x.assertNever(n)}}W.create=(a,e,t)=>new W({schema:a,typeName:m.ZodEffects,effect:e,...y(t)});W.createWithPreprocess=(a,e,t)=>new W({schema:e,effect:{type:"preprocess",transform:a},typeName:m.ZodEffects,...y(t)});class B extends b{_parse(e){return this._getType(e)===l.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}B.create=(a,e)=>new B({innerType:a,typeName:m.ZodOptional,...y(e)});class F extends b{_parse(e){return this._getType(e)===l.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}F.create=(a,e)=>new F({innerType:a,typeName:m.ZodNullable,...y(e)});class he extends b{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===l.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}he.create=(a,e)=>new he({innerType:a,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class fe extends b{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Z(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Z(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}fe.create=(a,e)=>new fe({innerType:a,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Be extends b{_parse(e){if(this._getType(e)!==l.nan){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:l.nan,received:r.parsedType}),v}return{status:"valid",value:e.data}}}Be.create=a=>new Be({typeName:m.ZodNaN,...y(a)});class Rt extends b{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ye extends b{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?v:o.status==="dirty"?(t.dirty(),H(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?v:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ye({in:e,out:t,typeName:m.ZodPipeline})}}class pe extends b{_parse(e){const t=this._def.innerType._parse(e),r=n=>(P(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}pe.create=(a,e)=>new pe({innerType:a,typeName:m.ZodReadonly,...y(e)});var m;(function(a){a.ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline",a.ZodReadonly="ZodReadonly"})(m||(m={}));const p=N.create,me=D.create,Ut=de.create;$.create;const At=A.create,j=C.create,ke=K.create;ee.create;L.create;const be=te.create,Wt=ue.create,Ue=U.create;re.create;B.create;F.create;const ve=j({minRem:me(),maxRem:me()}),Mt=ve.or(p()),J=j({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()}),ie=j({color:p().optional(),background:p().optional(),borderWidth:p().optional(),borderColor:p().optional(),boxShadow:p().optional()}),Nt=j({borderRadius:Mt.optional(),custom:be(p(),ke([p(),me()])).optional(),hover:ie.optional(),focus:ie.optional()}).and(ie),Zt=j({family:p()}),It=be(Ue(["predefinedQuestion","edit","newConversation","voteUp","voteDown","retry","message","messageLoading","thread","submit","abort","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","info","menuClose","chevronDown","internalLink","externalLink","liip","avatar","openChat","speechInput","listUnordered","lightMode","darkMode"]),p()),Et=j({font:Zt,colors:j({brand:J,accent:J.optional(),highlight:J,grey:J}),base:j({}),components:be(p(),Nt),svgs:It}),ae=j({customCSS:p().optional(),fontCSS:p().optional(),fontURLs:p().array().optional(),tokens:Et});j({light:ae,dark:ae});const Bt=j({light:ae,dark:ae}).deepPartial(),We=j({50:p(),100:p(),200:p(),300:p(),400:p(),500:p(),600:p(),700:p(),800:p(),900:p(),950:p()}),Fe=Ue(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),$e=ke([We,Fe]),$t=ke([We.and(j({0:p(),1e3:p()})),Fe]),Lt=j({avatarImageUrl:p().optional(),colors:j({brand:$e.optional(),highlight:$e.optional(),grey:$t.optional(),background:p().optional(),text:p().optional(),anchor:j({default:p().optional(),hover:p().optional()}).optional()}).optional(),font:j({size:ve.optional(),family:p().optional(),urls:At(p()).optional()}).optional(),borderRadius:ve.optional(),fineGrained:Bt.optional()}),zt=a=>a.split("/").pop().split(".")[0],Vt=Object.assign({"./default/fallback-dev.theme.ts":at,"./default/fallback.theme.ts":tt}),_e=new Map;Object.entries(Vt).forEach(([a,e])=>{const{error:t,data:r}=Lt.safeParse(e?.theme);if(t){console.error(`Invalid theme in ${a}:`,t);return}_e.set(zt(a),r)});const Ft=a=>{const e=_e.get(a);return e||(console.error(`Theme ${a} not found`),ne)};Array.from(_e.keys());export{Pt as P,At as a,Ut as b,Lt as c,Ke as d,Ue as e,zt as f,Je as g,Ft as h,Dt as i,Wt as l,me as n,j as o,be as r,p as s,ne as t,ke as u};
@@ -0,0 +1,15 @@
1
+ import"./NZTpNUN0.js";import{p as J,I as b,a as d,J as K,b as n,d as L,v as k,G as x,K as N,F as q,L as O,M as P,c as R,N as T,f as B,s as E,t as U,g as j,O as S,e as w,r as z}from"./TMezqz9A.js";import{i as F}from"./Cgm2UlUC.js";import{a as A}from"./CBFTM35p.js";import{p as M}from"./CfQtRUjK.js";var D=(u,a)=>a()(),H=B('<div class="chat-app__container"><div class="error-message svelte-4thrqu">Server is unreachable, please try later... <button class="error-message__retry-button svelte-4thrqu">Retry</button></div></div>'),Q=B(" <!>",1);const V={hash:"svelte-4thrqu",code:`
2
+ /* These styles are inline, because at this point theme loading has failed. */.error-message.svelte-4thrqu {display:table;z-index:1000;width:auto;margin:2rem auto;padding:2rem;border-radius:2px;background:white;color:oklch(27.8% 0.033 256.848);font-family:-apple-system,
3
+ BlinkMacSystemFont,
4
+ avenir next,
5
+ avenir,
6
+ segoe ui,
7
+ helvetica neue,
8
+ helvetica,
9
+ Cantarell,
10
+ Ubuntu,
11
+ roboto,
12
+ noto,
13
+ arial,
14
+ sans-serif;}.error-message__retry-button.svelte-4thrqu {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function W(u,a){J(a,!0),A(u,V);const h=(e,o=q,f=q)=>{T();var i=Q(),l=d(i),r=E(l);{var c=t=>{},_=t=>{var p=H(),y=w(p),I=E(w(y));I.__click=[D,f],z(y),z(p),n(t,p)};F(r,t=>{m()?t(c):t(_,!1)})}U(t=>j(l,`${t??""} `),[()=>console.error(`Panic, uncaught error:
15
+ `,o())??""]),n(e,i)};let v=M(a,"body",7),m=M(a,"silent",7),s=N(void 0);const C=e=>{S(s,{error:e},!0)};var g=b(),G=d(g);return K(G,{get failed(){return h}},e=>{var o=b(),f=d(o);{var i=r=>{h(r,()=>x(s).error,()=>()=>{S(s,void 0)})},l=r=>{var c=b(),_=d(c);O(_,v,()=>C),n(r,c)};F(f,r=>{x(s)?r(i):r(l,!1)})}n(e,o)}),n(u,g),L({get body(){return v()},set body(e){v(e),k()},get silent(){return m()},set silent(e){m(e),k()}})}P(["click"]);R(W,{body:{},silent:{}},[],[],!0);export{W as E};