@liip/liipgpt 3.9.0 → 3.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +88 -0
  2. package/button/liipgpt-button.iife.js +11 -71
  3. package/chat/liipgpt-chat.iife.js +12 -12
  4. package/config/index.cjs +947 -946
  5. package/config/index.d.ts +6 -0
  6. package/config/index.js +947 -946
  7. package/configurator/_app/env.js +1 -1
  8. package/configurator/_app/immutable/chunks/7mY4OJGU.js +1 -0
  9. package/configurator/_app/immutable/chunks/B7iNpEKB.js +143 -0
  10. package/configurator/_app/immutable/chunks/B9Sj_kOF.js +2 -0
  11. package/configurator/_app/immutable/chunks/Bo_I9OnC.js +1 -0
  12. package/configurator/_app/immutable/chunks/C4jvtK34.js +1 -0
  13. package/configurator/_app/immutable/chunks/C5QUeOT4.js +16 -0
  14. package/configurator/_app/immutable/chunks/{DGbgqVw-.js → CA38AHEC.js} +2 -2
  15. package/configurator/_app/immutable/chunks/CFeIeoV1.js +1 -0
  16. package/configurator/_app/immutable/chunks/{CW8XT_f0.js → D1JxtiVt.js} +1 -1
  17. package/configurator/_app/immutable/chunks/{CzlKx6Dn.js → DGQ954rx.js} +1 -1
  18. package/configurator/_app/immutable/chunks/DY91rqbt.js +61 -0
  19. package/configurator/_app/immutable/chunks/{BiMiaf32.js → DYa1ApbB.js} +1 -1
  20. package/configurator/_app/immutable/chunks/{BoSlghYU.js → Qr3QoTpa.js} +1 -1
  21. package/configurator/_app/immutable/chunks/{kfKo0Lxm.js → ZVK8Dk3M.js} +1 -1
  22. package/configurator/_app/immutable/chunks/hdHt6us6.js +1 -0
  23. package/configurator/_app/immutable/entry/{app.CwqfSUK4.js → app.CNOaE4a-.js} +2 -2
  24. package/configurator/_app/immutable/entry/start.Dt2jlaUG.js +1 -0
  25. package/configurator/_app/immutable/nodes/{0.WsdkbKsV.js → 0.5_GG2VVz.js} +1 -1
  26. package/configurator/_app/immutable/nodes/{1.2qVIdLFb.js → 1.CC4YG4vs.js} +1 -1
  27. package/configurator/_app/immutable/nodes/{2.zFWWXwja.js → 2.Bsn6JT-r.js} +5 -5
  28. package/configurator/_app/immutable/nodes/{3.YVKriLPj.js → 3.BGFB6L4G.js} +1 -1
  29. package/configurator/_app/version.json +1 -1
  30. package/configurator/index.html +6 -6
  31. package/configurator/sidebar.html +6 -6
  32. package/index.cjs +1263 -3510
  33. package/index.d.ts +34 -0
  34. package/index.js +1230 -3479
  35. package/package.json +2 -2
  36. package/search-summary/liipgpt-search-summary.iife.js +6 -6
  37. package/configurator/_app/immutable/chunks/BKESH8zC.js +0 -1
  38. package/configurator/_app/immutable/chunks/BKZTsJMz.js +0 -1
  39. package/configurator/_app/immutable/chunks/C8BUw-Wc.js +0 -61
  40. package/configurator/_app/immutable/chunks/CWvh3_h0.js +0 -16
  41. package/configurator/_app/immutable/chunks/CqCdl07t.js +0 -1
  42. package/configurator/_app/immutable/chunks/DWxJNFvO.js +0 -143
  43. package/configurator/_app/immutable/chunks/Dn_5PWao.js +0 -2
  44. package/configurator/_app/immutable/chunks/IPBcm7Y9.js +0 -1
  45. package/configurator/_app/immutable/chunks/cE02ifhd.js +0 -1
  46. package/configurator/_app/immutable/entry/start.C9g5qB7o.js +0 -1
  47. package/configurator/bs.png +0 -0
@@ -1,6 +1,6 @@
1
- var LiipGPTButton=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var u={},d=Symbol(),f=`http://www.w3.org/1999/xhtml`,p=`http://www.w3.org/2000/svg`,m=`http://www.w3.org/1998/Math/MathML`,h=Array.isArray,g=Array.prototype.indexOf,_=Array.prototype.includes,ee=Array.from,v=Object.keys,y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyDescriptors,te=Object.prototype,ne=Array.prototype,re=Object.getPrototypeOf,ie=Object.isExtensible;function ae(e){return typeof e==`function`}var oe=()=>{};function se(e){return typeof e?.then==`function`}function ce(e){for(var t=0;t<e.length;t++)e[t]()}function le(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var ue=1<<24,de=1024,fe=2048,pe=4096,me=8192,he=16384,ge=32768,_e=1<<25,ve=65536,S=1<<18,ye=1<<19,be=1<<20,xe=1<<25,Se=65536,Ce=1<<21,we=1<<22,Te=1<<23,Ee=Symbol(`$state`),De=Symbol(`legacy props`),Oe=Symbol(``),ke=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ae=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function je(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Me(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ne(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Pe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Fe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ie(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Le(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Re(){throw Error(`https://svelte.dev/e/hydration_failed`)}function ze(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Be(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function He(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ue(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function We(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Ge(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Ke(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var C=!1;function w(e){C=e}var T;function E(e){if(e===null)throw We(),u;return T=e}function qe(){return E(En(T))}function Je(e){if(C){if(En(T)!==null)throw We(),u;T=e}}function Ye(e=1){if(C){for(var t=e,n=T;t--;)n=En(n);T=n}}function Xe(e=!0){for(var t=0,n=T;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=En(n);e&&n.remove(),n=i}}function Ze(e){if(!e||e.nodeType!==8)throw We(),u;return e.data}function Qe(e){return e===this.v}function D(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function $e(e){return!D(e,this.v)}var et=!1,tt=!1,nt=[];function rt(e,t=!1,n=!1){return it(e,new Map,``,nt,null,n)}function it(e,t,n,r,i=null,a=!1){if(typeof e==`object`&&e){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(h(e)){var s=Array(e.length);t.set(e,s),i!==null&&t.set(i,s);for(var c=0;c<e.length;c+=1){var l=e[c];c in e&&(s[c]=it(l,t,n,r,null,a))}return s}if(re(e)===te){s={},t.set(e,s),i!==null&&t.set(i,s);for(var u of Object.keys(e))s[u]=it(e[u],t,n,r,null,a);return s}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON==`function`&&!a)return it(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}var O=null;function at(e){O=e}function ot(e,t=!1,n){O={p:O,i:!1,c:null,e:null,s:e,x:null,r:F,l:tt&&!t?{s:null,u:null,$:[]}:null}}function st(e){var t=O,n=t.e;if(n!==null){t.e=null;for(var r of n)Wn(r)}return e!==void 0&&(t.x=e),t.i=!0,O=t.p,e??{}}function ct(){return!tt||O!==null&&O.l===null}var lt=[];function ut(){var e=lt;lt=[],ce(e)}function dt(e){if(lt.length===0&&!Ot){var t=lt;queueMicrotask(()=>{t===lt&&ut()})}lt.push(e)}function ft(){for(;lt.length>0;)ut()}function pt(e){var t=F;if(t===null)return P.f|=Te,e;if(!(t.f&32768)&&!(t.f&4))throw e;mt(e,t)}function mt(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var ht=~(fe|pe|de);function gt(e,t){e.f=e.f&ht|t}function _t(e){e.f&512||e.deps===null?gt(e,de):gt(e,pe)}function vt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=Se,vt(t.deps))}function yt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),vt(e.deps),gt(e,de)}var bt=[];function xt(e,t=oe){let n=null,r=new Set;function i(t){if(D(e,t)&&(e=t,n)){let t=!bt.length;for(let t of r)t[1](),bt.push(t,e);if(t){for(let e=0;e<bt.length;e+=2)bt[e][0](bt[e+1]);bt.length=0}}}function a(t){i(t(e))}function o(o,s=oe){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||oe),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}var St=!1,Ct=!1;function wt(e){var t=Ct;try{return Ct=!1,[e(),Ct]}finally{Ct=t}}var Tt=new Set,k=null,Et=null,Dt=null,Ot=!1,kt=!1,At=null,jt=null,Mt=0,Nt=1,Pt=class e{id=Nt++;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#r=0;#i=null;#a=[];#o=new Set;#s=new Set;#c=new Map;is_fork=!1;#l=!1;#u(){return this.is_fork||this.#r>0}skip_effect(e){this.#c.has(e)||this.#c.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#c.get(e);if(t){this.#c.delete(e);for(var n of t.d)gt(n,fe),this.schedule(n);for(n of t.m)gt(n,pe),this.schedule(n)}}#d(){if(Mt++>1e3&&(Tt.delete(this),Ft()),!this.#u()){for(let e of this.#o)this.#s.delete(e),gt(e,fe),this.schedule(e);for(let e of this.#s)gt(e,pe),this.schedule(e)}let t=this.#a;this.#a=[],this.apply();var n=At=[],r=[],i=jt=[];for(let e of t)try{this.#f(e,n,r)}catch(t){throw Ht(e),t}if(k=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(At=null,jt=null,this.#u()){this.#p(r),this.#p(n);for(let[e,t]of this.#c)Vt(e,t)}else{this.#n===0&&Tt.delete(this),this.#o.clear(),this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),Lt(r),Lt(n),this.#i?.resolve()}var o=k;if(this.#a.length>0){let e=o??=this;e.#a.push(...this.#a.filter(t=>!e.#a.includes(t)))}o!==null&&(Tt.add(o),o.#d()),Tt.has(this)||this.#m()}#f(e,t,n){e.f^=de;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#c.has(r))&&r.fn!==null){a?r.f^=de:i&4?t.push(r):et&&i&16777224?n.push(r):kr(r)&&(i&16&&this.#s.add(r),Pr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#p(e){for(var t=0;t<e.length;t+=1)yt(e[t],this.#o,this.#s)}capture(e,t){t!==d&&!this.previous.has(e)&&this.previous.set(e,t),e.f&8388608||(this.current.set(e,e.v),Et?.set(e,e.v))}activate(){k=this}deactivate(){k=null,Et=null}flush(){try{kt=!0,k=this,this.#d()}finally{Mt=0,Dt=null,At=null,jt=null,kt=!1,k=null,Et=null,cn.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear(),Tt.delete(this)}#m(){for(let s of Tt){var e=s.id<this.id,t=[];for(let[n,r]of this.current){if(s.current.has(n))if(e&&r!==s.current.get(n))s.current.set(n,r);else continue;t.push(n)}var n=[...s.current.keys()].filter(e=>!this.current.has(e));if(n.length===0)e&&s.discard();else if(t.length>0){s.activate();var r=new Set,i=new Map;for(var a of t)Rt(a,n,r,i);if(s.#a.length>0){s.apply();for(var o of s.#a)s.#f(o,[],[]);s.#a=[]}s.deactivate()}}}increment(e){this.#n+=1,e&&(this.#r+=1)}decrement(e,t){--this.#n,e&&--this.#r,!(this.#l||t)&&(this.#l=!0,dt(()=>{this.#l=!1,this.flush()}))}transfer_effects(e,t){for(let t of e)this.#o.add(t);for(let e of t)this.#s.add(e);e.clear(),t.clear()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=le()).promise}static ensure(){if(k===null){let t=k=new e;kt||(Tt.add(k),Ot||dt(()=>{k===t&&t.flush()}))}return k}apply(){if(!et||!this.is_fork&&Tt.size===1){Et=null;return}Et=new Map(this.current);for(let e of Tt)if(!(e===this||e.is_fork))for(let[t,n]of e.previous)Et.has(t)||Et.set(t,n)}schedule(e){if(Dt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(At!==null&&t===F&&(et||(P===null||!(P.f&2))&&!St))return;if(n&96){if(!(n&1024))return;t.f^=de}}this.#a.push(t)}};function A(e){var t=Ot;Ot=!0;try{var n;for(e&&(k!==null&&!k.is_fork&&k.flush(),n=e());;){if(ft(),k===null)return n;k.flush()}}finally{Ot=t}}function Ft(){try{Le()}catch(e){mt(e,Dt)}}var It=null;function Lt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&kr(r)&&(It=new Set,Pr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ar(r),It?.size>0)){cn.clear();for(let e of It){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)It.has(n)&&(It.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Pr(n)}}It.clear()}}It=null}}function Rt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Rt(i,t,n,r):e&4194320&&!(e&2048)&&zt(i,t,r)&&(gt(i,fe),Bt(i))}}function zt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(_.call(t,r))return!0;if(r.f&2&&zt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Bt(e){k.schedule(e)}function Vt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),gt(e,de);for(var n=e.first;n!==null;)Vt(n,t),n=n.next}}function Ht(e){gt(e,de);for(var t=e.first;t!==null;)Ht(t),t=t.next}function Ut(e){let t=0,n=un(0),r;return()=>{Vn()&&(I(n),Yn(()=>(t===0&&(r=Rr(()=>e(()=>mn(n)))),t+=1,()=>{dt(()=>{--t,t===0&&(r?.(),r=void 0,mn(n))})})))}}var Wt=ve|ye;function Gt(e,t,n,r){new Kt(e,t,n,r)}var Kt=class{parent;is_pending=!1;transform_error;#e;#t=C?T:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Ut(()=>(this.#m=un(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=F;t.b=this,t.f|=128,n(e)},this.parent=F.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Zn(()=>{if(C){let e=this.#t;qe();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Wt),C&&(this.#e=T)}#g(){try{this.#a=$n(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=$n(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=$n(()=>e(this.#e)),dt(()=>{var e=this.#c=document.createDocumentFragment(),t=wn();e.append(t),this.#a=this.#x(()=>$n(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,or(this.#o,()=>{this.#o=null}),this.#b(k))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=$n(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();ur(this.#a,e);let t=this.#n.pending;this.#o=$n(()=>t(this.#e))}else this.#b(k)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){yt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=F,n=P,r=O;_r(this.#i),gr(this.#i),at(this.#i.ctx);try{return Pt.ensure(),e()}catch(e){return pt(e),null}finally{_r(t),gr(n),at(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&or(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,dt(()=>{this.#d=!1,this.#m&&fn(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),I(this.#m)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#a&&=(rr(this.#a),null),this.#o&&=(rr(this.#o),null),this.#s&&=(rr(this.#s),null),C&&(E(this.#t),Ye(),E(Xe()));var r=!1,i=!1;let a=()=>{if(r){Ke();return}r=!0,i&&Ue(),this.#s!==null&&or(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){mt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return $n(()=>{var t=F;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return mt(e,this.#i.parent),null}}))};dt(()=>{var t;try{t=this.transform_error(e)}catch(e){mt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>mt(e,this.#i&&this.#i.parent)):o(t)})}};function qt(e,t,n,r){let i=ct()?Zt:$t;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=F,s=Jt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){o.f&16384||mt(e,o)}Yt()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=Xt();function d(){Promise.all(n.map(e=>Qt(e))).then(e=>l([...t.map(i),...e])).catch(e=>mt(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),Yt()}):d()}function Jt(){var e=F,t=P,n=O,r=k;return function(i=!0){_r(e),gr(t),at(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Yt(e=!0){_r(null),gr(null),at(null),e&&k?.deactivate()}function Xt(){var e=F.b,t=k,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}function Zt(e){var t=2|fe,n=P!==null&&P.f&2?P:null;return F!==null&&(F.f|=ye),{ctx:O,deps:null,effects:null,equals:Qe,f:t,fn:e,reactions:null,rv:0,v:d,wv:0,parent:n??F,ac:null}}function Qt(e,t,n){let r=F;r===null&&Me();var i=void 0,a=un(d),o=!P,s=new Map;return Jn(()=>{var t=F,n=le();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(Yt)}catch(e){n.reject(e),Yt()}var c=k;if(o){if(t.f&32768)var l=Xt();if(r.b.is_rendered())s.get(c)?.reject(ke),s.delete(c);else{for(let e of s.values())e.reject(ke);s.clear()}s.set(c,n)}let u=(e,n=void 0)=>{if(l&&l(n===ke),!(n===ke||t.f&16384)){if(c.activate(),n)a.f|=Te,fn(a,n);else{a.f&8388608&&(a.f^=Te),fn(a,e);for(let[e,t]of s){if(s.delete(e),e===c)break;t.reject(ke)}}c.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),Hn(()=>{for(let e of s.values())e.reject(ke)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function j(e){let t=Zt(e);return et||yr(t),t}function $t(e){let t=Zt(e);return t.equals=$e,t}function en(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)rr(t[n])}}function tn(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t.f&16384?null:t;t=t.parent}return null}function nn(e){var t,n=F;_r(tn(e));try{e.f&=~Se,en(e),t=jr(e)}finally{_r(n)}return t}function rn(e){var t=e.v,n=nn(e);if(!e.equals(n)&&(e.wv=Or(),(!k?.is_fork||e.deps===null)&&(e.v=n,k?.capture(e,t),e.deps===null))){gt(e,de);return}pr||(Et===null?_t(e):(Vn()||k?.is_fork)&&Et.set(e,n))}function an(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ke),t.teardown=oe,t.ac=null,Nr(t,0),tr(t))}function on(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&Pr(t)}var sn=new Set,cn=new Map,ln=!1;function un(e,t){return{f:0,v:e,reactions:null,equals:Qe,rv:0,wv:0}}function M(e,t){let n=un(e,t);return yr(n),n}function dn(e,t=!1,n=!0){let r=un(e);return t||(r.equals=$e),tt&&n&&O!==null&&O.l!==null&&(O.l.s??=[]).push(r),r}function N(e,t,n=!1){return P!==null&&(!hr||P.f&131072)&&ct()&&P.f&4325394&&(vr===null||!_.call(vr,e))&&He(),fn(e,n?gn(t):t,jt)}function fn(e,t,n=null){if(!e.equals(t)){var r=e.v;pr?cn.set(e,t):cn.set(e,r),e.v=t;var i=Pt.ensure();if(i.capture(e,r),e.f&2){let t=e;e.f&2048&&nn(t),Et===null&&_t(t)}e.wv=Or(),hn(e,fe,n),ct()&&F!==null&&F.f&1024&&!(F.f&96)&&(Sr===null?Cr([e]):Sr.push(e)),!i.is_fork&&sn.size>0&&!ln&&pn()}return t}function pn(){ln=!1;for(let e of sn)e.f&1024&&gt(e,pe),kr(e)&&Pr(e);sn.clear()}function mn(e){N(e,e.v+1)}function hn(e,t,n){var r=e.reactions;if(r!==null)for(var i=ct(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===F)){var l=(c&fe)===0;if(l&&gt(s,t),c&2){var u=s;Et?.delete(u),c&65536||(c&512&&(s.f|=Se),hn(u,pe,n))}else if(l){var d=s;c&16&&It!==null&&It.add(d),n===null?Bt(d):n.push(d)}}}}function gn(e){if(typeof e!=`object`||!e||Ee in e)return e;let t=re(e);if(t!==te&&t!==ne)return e;var n=new Map,r=h(e),i=M(0),a=null,o=Er,s=e=>{if(Er===o)return e();var t=P,n=Er;gr(null),Dr(o);var r=e();return gr(t),Dr(n),r};return r&&n.set(`length`,M(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Be();var i=n.get(t);return i===void 0?s(()=>{var e=M(r.value,a);return n.set(t,e),e}):N(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>M(d,a));n.set(t,e),mn(i)}}else N(r,d),mn(i);return!0},get(t,r,i){if(r===Ee)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||b(t,r)?.writable)&&(o=s(()=>M(gn(c?t[r]:d),a)),n.set(r,o)),o!==void 0){var l=I(o);return l===d?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=I(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==d)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Ee)return!0;var r=n.get(t),i=r!==void 0&&r.v!==d||Reflect.has(e,t);return(r!==void 0||F!==null&&(!i||b(e,t)?.writable))&&(r===void 0&&(r=s(()=>M(i?gn(e[t]):d,a)),n.set(t,r)),I(r)===d)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var f=o;f<l.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=s(()=>M(d,a)),n.set(f+``,p)):N(p,d)}if(l===void 0)(!u||b(e,t)?.writable)&&(l=s(()=>M(void 0,a)),N(l,gn(o)),n.set(t,l));else{u=l.v!==d;var m=s(()=>gn(o));N(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,o),!u){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&N(g,_+1)}mn(i)}return!0},ownKeys(e){I(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==d});for(var[r,a]of n)a.v!==d&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Ve()}})}function _n(e){try{if(typeof e==`object`&&e&&Ee in e)return e[Ee]}catch{}return e}function vn(e,t){return Object.is(_n(e),_n(t))}var yn,bn,xn,Sn;function Cn(){if(yn===void 0){yn=window,bn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;xn=b(t,`firstChild`).get,Sn=b(t,`nextSibling`).get,ie(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ie(n)&&(n.__t=void 0)}}function wn(e=``){return document.createTextNode(e)}function Tn(e){return xn.call(e)}function En(e){return Sn.call(e)}function Dn(e,t){if(!C)return Tn(e);var n=Tn(T);if(n===null)n=T.appendChild(wn());else if(t&&n.nodeType!==3){var r=wn();return n?.before(r),E(r),r}return t&&Nn(n),E(n),n}function On(e,t=!1){if(!C){var n=Tn(e);return n instanceof Comment&&n.data===``?En(n):n}if(t){if(T?.nodeType!==3){var r=wn();return T?.before(r),E(r),r}Nn(T)}return T}function kn(e,t=1,n=!1){let r=C?T:e;for(var i;t--;)i=r,r=En(r);if(!C)return r;if(n){if(r?.nodeType!==3){var a=wn();return r===null?i?.after(a):r.before(a),E(a),a}Nn(r)}return E(r),r}function An(e){e.textContent=``}function jn(){return!et||It!==null?!1:(F.f&ge)!==0}function Mn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function Nn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Pn(e,t){if(t){let t=document.body;e.autofocus=!0,dt(()=>{document.activeElement===t&&e.focus()})}}var Fn=!1;function In(){Fn||(Fn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ln(e){var t=P,n=F;gr(null),_r(null);try{return e()}finally{gr(t),_r(n)}}function Rn(e){F===null&&(P===null&&Ie(e),Fe()),pr&&Pe(e)}function zn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Bn(e,t){var n=F;n!==null&&n.f&8192&&(e|=me);var r={ctx:O,deps:null,nodes:null,f:e|fe|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if(e&4)At===null?Pt.ensure().schedule(r):At.push(r);else if(t!==null){try{Pr(r)}catch(e){throw rr(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ve))}if(i!==null&&(i.parent=n,n!==null&&zn(i,n),P!==null&&P.f&2&&!(e&64))){var a=P;(a.effects??=[]).push(i)}return r}function Vn(){return P!==null&&!hr}function Hn(e){let t=Bn(8,null);return gt(t,de),t.teardown=e,t}function Un(e){Rn(`$effect`);var t=F.f;if(!P&&t&32&&!(t&32768)){var n=O;(n.e??=[]).push(e)}else return Wn(e)}function Wn(e){return Bn(4|be,e)}function Gn(e){Pt.ensure();let t=Bn(64|ye,e);return()=>{rr(t)}}function Kn(e){Pt.ensure();let t=Bn(64|ye,e);return(e={})=>new Promise(n=>{e.outro?or(t,()=>{rr(t),n(void 0)}):(rr(t),n(void 0))})}function qn(e){return Bn(4,e)}function Jn(e){return Bn(we|ye,e)}function Yn(e,t=0){return Bn(8|t,e)}function Xn(e,t=[],n=[],r=[]){qt(r,t,n,t=>{Bn(8,()=>e(...t.map(I)))})}function Zn(e,t=0){return Bn(16|t,e)}function Qn(e,t=0){return Bn(ue|t,e)}function $n(e){return Bn(32|ye,e)}function er(e){var t=e.teardown;if(t!==null){let e=pr,n=P;mr(!0),gr(null);try{t.call(null)}finally{mr(e),gr(n)}}}function tr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Ln(()=>{e.abort(ke)});var r=n.next;n.f&64?n.parent=null:rr(n,t),n=r}}function nr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||rr(t),t=n}}function rr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(ir(e.nodes.start,e.nodes.end),n=!0),gt(e,_e),tr(e,t&&!n),Nr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();er(e),e.f^=_e,e.f|=he;var i=e.parent;i!==null&&i.first!==null&&ar(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function ir(e,t){for(;e!==null;){var n=e===t?null:En(e);e.remove(),e=n}}function ar(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function or(e,t,n=!0){var r=[];sr(e,r,!0);var i=()=>{n&&rr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function sr(e,t,n){if(!(e.f&8192)){e.f^=me;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;sr(i,t,o?n:!1),i=a}}}function cr(e){lr(e,!0)}function lr(e,t){if(e.f&8192){e.f^=me,e.f&1024||(gt(e,fe),Pt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;lr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function ur(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:En(n);t.append(n),n=i}}var dr=null,fr=!1,pr=!1;function mr(e){pr=e}var P=null,hr=!1;function gr(e){P=e}var F=null;function _r(e){F=e}var vr=null;function yr(e){P!==null&&(!et||P.f&2)&&(vr===null?vr=[e]:vr.push(e))}var br=null,xr=0,Sr=null;function Cr(e){Sr=e}var wr=1,Tr=0,Er=Tr;function Dr(e){Er=e}function Or(){return++wr}function kr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~Se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(kr(a)&&rn(a),a.wv>e.wv)return!0}t&512&&Et===null&&gt(e,de)}return!1}function Ar(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!et&&vr!==null&&_.call(vr,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Ar(a,t,!1):t===a&&(n?gt(a,fe):a.f&1024&&gt(a,pe),Bt(a))}}function jr(e){var t=br,n=xr,r=Sr,i=P,a=vr,o=O,s=hr,c=Er,l=e.f;br=null,xr=0,Sr=null,P=l&96?null:e,vr=null,at(e.ctx),hr=!1,Er=++Tr,e.ac!==null&&(Ln(()=>{e.ac.abort(ke)}),e.ac=null);try{e.f|=Ce;var u=e.fn,d=u();e.f|=ge;var f=e.deps,p=k?.is_fork;if(br!==null){var m;if(p||Nr(e,xr),f!==null&&xr>0)for(f.length=xr+br.length,m=0;m<br.length;m++)f[xr+m]=br[m];else e.deps=f=br;if(Vn()&&e.f&512)for(m=xr;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&xr<f.length&&(Nr(e,xr),f.length=xr);if(ct()&&Sr!==null&&!hr&&f!==null&&!(e.f&6146))for(m=0;m<Sr.length;m++)Ar(Sr[m],e);if(i!==null&&i!==e){if(Tr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Tr;if(t!==null)for(let e of t)e.rv=Tr;Sr!==null&&(r===null?r=Sr:r.push(...Sr))}return e.f&8388608&&(e.f^=Te),d}catch(e){return pt(e)}finally{e.f^=Ce,br=t,xr=n,Sr=r,P=i,vr=a,at(o),hr=s,Er=c}}function Mr(e,t){let n=t.reactions;if(n!==null){var r=g.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(br===null||!_.call(br,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~Se),_t(a),an(a),Nr(a,0)}}function Nr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Mr(e,n[r])}function Pr(e){var t=e.f;if(!(t&16384)){gt(e,de);var n=F,r=fr;F=e,fr=!0;try{t&16777232?nr(e):tr(e),er(e);var i=jr(e);e.teardown=typeof i==`function`?i:null,e.wv=wr}finally{fr=r,F=n}}}async function Fr(){if(et)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),A()}function I(e){var t=(e.f&2)!=0;if(dr?.add(e),P!==null&&!hr&&!(F!==null&&F.f&16384)&&(vr===null||!_.call(vr,e))){var n=P.deps;if(P.f&2097152)e.rv<Tr&&(e.rv=Tr,br===null&&n!==null&&n[xr]===e?xr++:br===null?br=[e]:br.push(e));else{(P.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[P]:_.call(r,P)||r.push(P)}}if(pr&&cn.has(e))return cn.get(e);if(t){var i=e;if(pr){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Lr(i))&&(a=nn(i)),cn.set(i,a),a}var o=(i.f&512)==0&&!hr&&P!==null&&(fr||(P.f&512)!=0),s=(i.f&ge)===0;kr(i)&&(o&&(i.f|=512),rn(i)),o&&!s&&(on(i),Ir(i))}if(Et?.has(e))return Et.get(e);if(e.f&8388608)throw e.v;return e.v}function Ir(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(on(t),Ir(t))}function Lr(e){if(e.v===d)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(cn.has(t)||t.f&2&&Lr(t))return!0;return!1}function Rr(e){var t=hr;try{return hr=!0,e()}finally{hr=t}}function zr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(Ee in e)Br(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&Ee in n&&Br(n)}}}function Br(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Br(e[n],t)}catch{}let n=re(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=x(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}var Vr=Symbol(`events`),Hr=new Set,Ur=new Set;function Wr(e,t,n,r={}){function i(e){if(r.capture||Yr.call(t,e),!e.cancelBubble)return Ln(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?dt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Gr(e,t,n,r,i){var a={capture:r,passive:i},o=Wr(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Hn(()=>{t.removeEventListener(e,o,a)})}function Kr(e,t,n){(t[Vr]??={})[e]=n}function qr(e){for(var t=0;t<e.length;t++)Hr.add(e[t]);for(var n of Ur)n(e)}var Jr=null;function Yr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;Jr=e;var o=0,s=Jr===e&&e[Vr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Vr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){y(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=P,d=F;gr(null),_r(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[Vr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble||m===t||m===null)break;a=m}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[Vr]=t,delete e.currentTarget,gr(u),_r(d)}}}var Xr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Zr(e){return Xr?.createHTML(e)??e}function Qr(e){var t=Mn(`template`);return t.innerHTML=Zr(e.replaceAll(`<!>`,`<!---->`)),t.content}function $r(e,t){var n=F;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ei(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(C)return $r(T,null),T;i===void 0&&(i=Qr(a?e:`<!>`+e),n||(i=Tn(i)));var t=r||bn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Tn(t),s=t.lastChild;$r(o,s)}else $r(t,t);return t}}function ti(){if(C)return $r(T,null),T;var e=document.createDocumentFragment(),t=document.createComment(``),n=wn();return e.append(t,n),$r(t,n),e}function L(e,t){if(C){var n=F;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=T),qe();return}e!==null&&e.before(t)}function ni(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var ri=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function ii(e){return ri.includes(e)}var ai=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),oi={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function si(e){return e=e.toLowerCase(),oi[e]??e}[...ai];var ci=[`touchstart`,`touchmove`];function li(e){return ci.includes(e)}var ui=[`textarea`,`script`,`style`,`title`];function di(e){return ui.includes(e)}function fi(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function pi(e,t){return gi(e,t)}function mi(e,t){Cn(),t.intro=t.intro??!1;let n=t.target,r=C,i=T;try{for(var a=Tn(n);a&&(a.nodeType!==8||a.data!==`[`);)a=En(a);if(!a)throw u;w(!0),E(a);let r=gi(e,{...t,anchor:a});return w(!1),r}catch(r){if(r instanceof Error&&r.message.split(`
2
- `).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw r;return r!==u&&console.warn(`Failed to hydrate: `,r),t.recover===!1&&Re(),Cn(),An(n),w(!1),pi(e,t)}finally{w(r),E(i)}}var hi=new Map;function gi(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){Cn();var c=void 0,l=Kn(()=>{var o=n??t.appendChild(wn());Gt(o,{pending:()=>{}},t=>{ot({});var n=O;if(a&&(n.c=a),i&&(r.$$events=i),C&&$r(t,null),c=e(t,r)||{},C&&(F.nodes.end=T,T===null||T.nodeType!==8||T.data!==`]`))throw We(),u;st()},s);var l=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=li(r);for(let e of[t,document]){var a=hi.get(e);a===void 0&&(a=new Map,hi.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Yr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(ee(Hr)),Ur.add(d),()=>{for(var e of l)for(let n of[t,document]){var r=hi.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Yr),r.delete(e),r.size===0&&hi.delete(n)):r.set(e,i)}Ur.delete(d),o!==n&&o.parentNode?.removeChild(o)}});return _i.set(c,l),c}var _i=new WeakMap;function vi(e,t){let n=_i.get(e);return n?(_i.delete(e),n(t)):Promise.resolve()}var yi=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)cr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(rr(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();ur(r,t),t.append(wn()),this.#n.set(e,{effect:r,fragment:t})}else rr(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),or(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(rr(n.effect),this.#n.delete(e))};ensure(e,t){var n=k,r=jn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=wn();i.append(a),this.#n.set(e,{effect:$n(()=>t(a)),fragment:i})}else this.#t.set(e,$n(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else C&&(this.anchor=T),this.#a(n)}};function bi(e,t,...n){var r=new yi(e);Zn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ve)}function xi(e){O===null&&je(`onMount`),tt&&O.l!==null?Ci(O).m.push(e):Un(()=>{let t=Rr(e);if(typeof t==`function`)return t})}function Si(e){O===null&&je(`onDestroy`),xi(()=>()=>Rr(e))}function Ci(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var wi=0,Ti=1,Ei=2;function Di(e,t,n,r,i){C&&qe();var a=ct(),o=d,s=a?un(o):dn(o,!1,!1),c=a?un(o):dn(o,!1,!1),l=new yi(e);Zn(()=>{var a=k;a.deactivate();var o=t();a.activate();var u=!1;let d=C&&se(o)===(e.data===`[!`);if(d&&(E(Xe()),w(!1)),se(o)){var f=Jt(),p=!1;let e=e=>{if(!u){p=!0,f(!1),Pt.ensure(),C&&w(!1);try{e()}finally{Yt(!1),Ot||A()}}};o.then(t=>{e(()=>{fn(s,t),l.ensure(Ti,r&&(e=>r(e,s)))})},t=>{e(()=>{if(fn(c,t),l.ensure(Ei,i&&(e=>i(e,c))),!i)throw c.v})}),C?l.ensure(wi,n):dt(()=>{p||e(()=>{l.ensure(wi,n)})})}else fn(s,o),l.ensure(Ti,r&&(e=>r(e,s)));return d&&w(!0),()=>{u=!0}})}function Oi(e,t,n=!1){var r;C&&(r=T,qe());var i=new yi(e),a=n?ve:0;function o(e,t){if(C){var n=Ze(r);if(e!==parseInt(n.substring(1))){var a=Xe();E(a),i.anchor=a,w(!1),i.ensure(e,t),w(!0);return}}i.ensure(e,t)}Zn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function ki(e,t){return t}function Ai(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];or(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;ji(e,ee(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;An(u),u.append(l),e.items.clear()}ji(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function ji(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=xe,ur(a,document.createDocumentFragment())):rr(t[i],n)}}var Mi;function Ni(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=C?E(Tn(c)):c.appendChild(wn())}C&&qe();var l=null,u=$t(()=>{var e=n();return h(e)?e:e==null?[]:ee(e)}),d,f=new Map,p=!0;function m(e){_.effect.f&16384||(_.pending.delete(e),_.fallback=l,Fi(_,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=xe,Li(l,null,o)):cr(l):or(l,()=>{l=null})))}function g(e){_.pending.delete(e)}var _={effect:Zn(()=>{d=I(u);var e=d.length;let c=!1;C&&Ze(o)===`[!`!=(e===0)&&(o=Xe(),E(o),w(!1),c=!0);for(var h=new Set,_=k,ee=jn(),v=0;v<e;v+=1){C&&T.nodeType===8&&T.data===`]`&&(o=T,c=!0,w(!1));var y=d[v],b=r(y,v),x=p?null:s.get(b);x?(x.v&&fn(x.v,y),x.i&&fn(x.i,v),ee&&_.unskip_effect(x.e)):(x=Ii(s,p?o:Mi??=wn(),y,b,v,i,t,n),p||(x.e.f|=xe),s.set(b,x)),h.add(b)}if(e===0&&a&&!l&&(p?l=$n(()=>a(o)):(l=$n(()=>a(Mi??=wn())),l.f|=xe)),e>h.size&&Ne(``,``,``),C&&e>0&&E(Xe()),!p)if(f.set(_,h),ee){for(let[e,t]of s)h.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(g)}else m(_);c&&w(!0),I(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,C&&(o=T)}function Pi(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Fi(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=Pi(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a)for(_=0;_<o;_+=1)m=t[_],h=i(m,_),g=s.get(h).e,g.f&33554432||(g.nodes?.a?.measure(),(d??=new Set).add(g));for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if(g.f&8192&&(cr(g),a&&(g.nodes?.a?.unfix(),(d??=new Set).delete(g))),g.f&33554432)if(g.f^=xe,g===c)Li(g,null,n);else{var v=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Ri(e,u,g),Ri(e,g,v),Li(g,v,n),u=g,f=[],p=[],c=Pi(u.next);continue}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var y=p[0],b;u=y.prev;var x=f[0],te=f[f.length-1];for(b=0;b<f.length;b+=1)Li(f[b],y,n);for(b=0;b<p.length;b+=1)l.delete(p[b]);Ri(e,x.prev,te.next),Ri(e,u,x),Ri(e,te,y),c=y,u=te,--_,f=[],p=[]}else l.delete(g),Li(g,c,n),Ri(e,g.prev,g.next),Ri(e,g,u===null?e.effect.first:u.next),Ri(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=Pi(c.next);if(c===null)continue}g.f&33554432||f.push(g),u=g,c=Pi(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(ji(e,ee(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var ne=[];if(l!==void 0)for(g of l)g.f&8192||ne.push(g);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&ne.push(c),c=Pi(c.next);var re=ne.length;if(re>0){var ie=r&4&&o===0?n:null;if(a){for(_=0;_<re;_+=1)ne[_].nodes?.a?.measure();for(_=0;_<re;_+=1)ne[_].nodes?.a?.fix()}Ai(e,ne,ie)}}a&&dt(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function Ii(e,t,n,r,i,a,o,s){var c=o&1?o&16?un(n):dn(n,!1,!1):null,l=o&2?un(i):null;return{v:c,i:l,e:$n(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Li(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=En(r);if(a.before(r),r===i)return;r=o}}function Ri(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function zi(e,t,n=!1,r=!1,i=!1,a=!1){var o=e,s=``;if(n){var c=e;C&&(o=E(Tn(c)))}Xn(()=>{var e=F;if(s===(s=t()??``)){C&&qe();return}if(n&&!C){e.nodes=null,c.innerHTML=s,s!==``&&$r(Tn(c),c.lastChild);return}if(e.nodes!==null&&(ir(e.nodes.start,e.nodes.end),e.nodes=null),s!==``){if(C){for(var a=T.data,l=qe(),d=l;l!==null&&(l.nodeType!==8||l.data!==``);)d=l,l=En(l);if(l===null)throw We(),u;$r(T,d),o=E(l);return}var f=Mn(r?`svg`:i?`math`:`template`,r?p:i?m:void 0);f.innerHTML=s;var h=r||i?f:f.content;if($r(Tn(h),h.lastChild),r||i)for(;Tn(h);)o.before(Tn(h));else o.before(h)}})}function Bi(e,t,n,r,i,a){let o=C;C&&qe();var s=null;C&&T.nodeType===1&&(s=T,qe());var c=C?T:e,l=new yi(c,!1);Zn(()=>{let e=t()||null;var a=i?i():n||e===`svg`?p:void 0;if(e===null){l.ensure(null,null);return}return l.ensure(e,t=>{if(e){if(s=C?s:Mn(e,a),$r(s,s),r){C&&di(e)&&s.append(document.createComment(``));var n=C?Tn(s):s.appendChild(wn());C&&(n===null?w(!1):E(n)),r(s,n)}F.nodes.end=s,t.before(s)}C&&E(t)}),()=>{}},ve),Hn(()=>{}),o&&(w(!0),E(c))}function Vi(e,t){let n=null,r=C;var i;if(C){n=T;for(var a=Tn(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=En(a);if(a===null)w(!1);else{var o=En(a);a.remove(),E(o)}}C||(i=document.head.appendChild(wn()));try{Zn(()=>t(i),S|ye)}finally{r&&(w(!0),E(n))}}function Hi(e,t){qn(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=Mn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function Ui(e,t,n){qn(()=>{var r=Rr(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};Yn(()=>{var e=n();zr(e),i&&D(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Wi(e,t){var n=void 0,r;Qn(()=>{n!==(n=t())&&(r&&=(rr(r),null),n&&(r=$n(()=>{qn(()=>n(e))})))})}function Gi(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Gi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ki(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Gi(e))&&(r&&(r+=` `),r+=t);return r}function qi(e){return typeof e==`object`?Ki(e):e??``}var Ji=[...`
3
- \r\f\xA0\v`];function Yi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Ji.includes(r[o-1]))&&(s===r.length||Ji.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Xi(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Zi(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Qi(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Zi)),i&&c.push(...Object.keys(i).map(Zi));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Zi(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Xi(r)),i&&(n+=Xi(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function $i(e,t,n,r,i,a){var o=e.__className;if(C||o!==n||o===void 0){var s=Yi(n,r,a);(!C||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function ea(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function ta(e,t,n,r){var i=e.__style;if(C||i!==t){var a=Qi(t,r);(!C||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(ea(e,n?.[0],r[0]),ea(e,n?.[1],r[1],`important`)):ea(e,n,r));return r}function na(e,t,n=!1){if(e.multiple){if(t==null)return;if(!h(t))return Ge();for(var r of e.options)r.selected=t.includes(ia(r));return}for(r of e.options)if(vn(ia(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function ra(e){var t=new MutationObserver(()=>{na(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Hn(()=>{t.disconnect()})}function ia(e){return`__value`in e?e.__value:e.value}var aa=Symbol(`class`),oa=Symbol(`style`),sa=Symbol(`is custom element`),ca=Symbol(`is html`),la=Ae?`link`:`LINK`,ua=Ae?`input`:`INPUT`,da=Ae?`option`:`OPTION`,fa=Ae?`select`:`SELECT`;function pa(e){if(C){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;ha(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;ha(e,`checked`,null),e.checked=r}}};e.__on_r=n,dt(n),In()}}function ma(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function ha(e,t,n,r){var i=va(e);C&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===la)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[Oe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ba(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ga(e,t,n,r,i=!1,a=!1){if(C&&i&&e.nodeName===ua){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||pa(o)}var s=va(e),c=s[sa],l=!s[ca];let u=C&&c;u&&w(!1);var f=t||{},p=e.nodeName===da;for(var m in t)m in n||(n[m]=null);n.class?n.class=qi(n.class):(r||n[aa])&&(n.class=null),n[oa]&&(n.style??=null);var h=ba(e);for(let i in n){let o=n[i];if(p&&i===`value`&&o==null){e.value=e.__value=``,f[i]=o;continue}if(i===`class`){$i(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[aa],n[aa]),f[i]=o,f[aa]=n[aa];continue}if(i===`style`){ta(e,o,t?.[oa],n[oa]),f[i]=o,f[oa]=n[oa];continue}var g=f[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){f[i]=o;var _=i[0]+i[1];if(_!==`$$`)if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var ee=ii(r);if(ni(r)&&(r=r.slice(0,-7),t.capture=!0),!ee&&g){if(o!=null)continue;e.removeEventListener(r,f[n],t),f[n]=null}if(ee)Kr(r,e,o),qr([r]);else if(o!=null){function a(e){f[i].call(this,e)}f[n]=Wr(r,e,a,t)}}else if(i===`style`)ha(e,i,o);else if(i===`autofocus`)Pn(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&p)ma(e,o);else{var v=i;l||(v=si(v));var y=v===`defaultValue`||v===`defaultChecked`;if(o==null&&!c&&!y)if(s[i]=null,v===`value`||v===`checked`){let n=e,r=t===void 0;if(v===`value`){let e=n.defaultValue;n.removeAttribute(v),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(v),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else y||h.includes(v)&&(c||typeof o!=`string`)?(e[v]=o,v in s&&(s[v]=d)):typeof o!=`function`&&ha(e,v,o,a)}}}return u&&w(!0),f}function _a(e,t,n=[],r=[],i=[],a,o=!1,s=!1){qt(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===fa,l=!1;if(Qn(()=>{var u=t(...n.map(I)),d=ga(e,r,u,a,o,s);l&&c&&`value`in u&&na(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||rr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&rr(i[t]),i[t]=$n(()=>Wi(e,()=>f))),d[t]=f}r=d}),c){var u=e;qn(()=>{na(u,r.value,!0),ra(u)})}l=!0})}function va(e){return e.__attributes??={[sa]:e.nodeName.includes(`-`),[ca]:e.namespaceURI===f}}var ya=new Map;function ba(e){var t=e.getAttribute(`is`)||e.nodeName,n=ya.get(t);if(n)return n;ya.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=x(i),r)r[o].set&&n.push(o);i=re(i)}return n}function xa(e,t){return e===t||e?.[Ee]===t}function Sa(e={},t,n,r){var i=O.r,a=F;return qn(()=>{var o,s;return Yn(()=>{o=s,s=r?.()||[],Rr(()=>{e!==n(...s)&&(t(e,...s),o&&xa(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&xa(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Ca={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function wa(e,t,n){return new Proxy({props:e,exclude:t},Ca)}var Ta={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(ae(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];ae(i)&&(i=i());let a=b(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(ae(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=b(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===Ee||t===De)return!1;for(let n of e.props)if(ae(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(ae(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function Ea(...e){return new Proxy({props:e},Ta)}function R(e,t,n,r){var i=!tt||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?Rr(r):r),s);let u;if(a){var d=Ee in e||De in e;u=b(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=wt(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&ze(t),u(f)));var m=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return m;if(u){var h=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||h||p)&&u(t?m():e),e):m()})}var g=!1,_=(n&1?Zt:$t)(()=>(g=!1,m()));a&&I(_);var ee=F;return(function(e,t){if(arguments.length>0){let n=t?I(_):i&&a?gn(e):e;return N(_,n),g=!0,s!==void 0&&(s=n),e}return pr&&g||ee.f&16384?_.v:I(_)})}function Da(e){return new Oa(e)}var Oa=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=dn(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return I(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===De?!0:(I(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return N(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?mi:pi)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!et&&(!e?.props?.$$host||e.sync===!1)&&A(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||y(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{vi(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},ka;typeof HTMLElement==`function`&&(ka=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=Mn(`slot`);e!==`default`&&(n.name=e),L(t,n)}}let t={},n=ja(this);for(let r of this.$$s)r in n&&(r===`default`&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=Aa(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=Da({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Gn(()=>{Yn(()=>{this.$$r=!0;for(let e of v(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=Aa(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Aa(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return v(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Aa(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function ja(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function Ma(e,t,n,r,i,a){let o=class extends ka{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return v(t).map(e=>(t[e].attribute||e).toLowerCase())}};return v(t).forEach(e=>{y(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=Aa(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(b(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{y(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var Na=ei(`<div class="chat-app__container"><div class="error-message svelte-14mj70v">Server is unreachable, please try later... <button class="error-message__retry-button svelte-14mj70v">Retry</button></div></div>`),Pa=ei(` <!>`,1),Fa={hash:`svelte-14mj70v`,code:`
1
+ var LiipGPTButton=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var u={},d=Symbol(),f=`http://www.w3.org/1999/xhtml`,p=`http://www.w3.org/2000/svg`,m=`http://www.w3.org/1998/Math/MathML`,h=Array.isArray,g=Array.prototype.indexOf,_=Array.prototype.includes,ee=Array.from,v=Object.keys,te=Object.defineProperty,y=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyDescriptors,ne=Object.prototype,re=Array.prototype,ie=Object.getPrototypeOf,ae=Object.isExtensible;function oe(e){return typeof e==`function`}var se=()=>{};function ce(e){return typeof e?.then==`function`}function le(e){for(var t=0;t<e.length;t++)e[t]()}function ue(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var de=1<<24,fe=1024,pe=2048,me=4096,he=8192,ge=16384,_e=32768,ve=1<<25,ye=65536,be=1<<18,xe=1<<19,Se=1<<20,Ce=1<<25,we=65536,Te=1<<21,Ee=1<<22,De=1<<23,Oe=Symbol(`$state`),ke=Symbol(`legacy props`),Ae=Symbol(``),je=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Me=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function Ne(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Pe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Fe(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ie(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Le(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Re(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function ze(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Be(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Ve(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function He(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ue(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function We(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ge(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function Ke(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function qe(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Je(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var x=!1;function S(e){x=e}var C;function w(e){if(e===null)throw Ke(),u;return C=e}function Ye(){return w(Cn(C))}function Xe(e){if(x){if(Cn(C)!==null)throw Ke(),u;C=e}}function Ze(e=1){if(x){for(var t=e,n=C;t--;)n=Cn(n);C=n}}function Qe(e=!0){for(var t=0,n=C;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Cn(n);e&&n.remove(),n=i}}function $e(e){if(!e||e.nodeType!==8)throw Ke(),u;return e.data}function et(e){return e===this.v}function tt(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function nt(e){return!tt(e,this.v)}var rt=!1,it=!1,T=null;function at(e){T=e}function ot(e,t=!1,n){T={p:T,i:!1,c:null,e:null,s:e,x:null,r:P,l:it&&!t?{s:null,u:null,$:[]}:null}}function st(e){var t=T,n=t.e;if(n!==null){t.e=null;for(var r of n)Vn(r)}return e!==void 0&&(t.x=e),t.i=!0,T=t.p,e??{}}function ct(){return!it||T!==null&&T.l===null}var lt=[];function ut(){var e=lt;lt=[],le(e)}function dt(e){if(lt.length===0&&!Tt){var t=lt;queueMicrotask(()=>{t===lt&&ut()})}lt.push(e)}function ft(){for(;lt.length>0;)ut()}function pt(e){var t=P;if(t===null)return N.f|=De,e;if(!(t.f&32768)&&!(t.f&4))throw e;mt(e,t)}function mt(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var ht=~(pe|me|fe);function E(e,t){e.f=e.f&ht|t}function gt(e){e.f&512||e.deps===null?E(e,fe):E(e,me)}function _t(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=we,_t(t.deps))}function vt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),_t(e.deps),E(e,fe)}var yt=!1,bt=!1;function xt(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}var St=new Set,D=null,Ct=null,wt=null,Tt=!1,Et=!1,Dt=null,Ot=null,kt=0,At=1,jt=class e{id=At++;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#r=0;#i=null;#a=[];#o=new Set;#s=new Set;#c=new Map;is_fork=!1;#l=!1;#u(){return this.is_fork||this.#r>0}skip_effect(e){this.#c.has(e)||this.#c.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#c.get(e);if(t){this.#c.delete(e);for(var n of t.d)E(n,pe),this.schedule(n);for(n of t.m)E(n,me),this.schedule(n)}}#d(){if(kt++>1e3&&(St.delete(this),Mt()),!this.#u()){for(let e of this.#o)this.#s.delete(e),E(e,pe),this.schedule(e);for(let e of this.#s)E(e,me),this.schedule(e)}let t=this.#a;this.#a=[],this.apply();var n=Dt=[],r=[],i=Ot=[];for(let e of t)try{this.#f(e,n,r)}catch(t){throw zt(e),t}if(D=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Dt=null,Ot=null,this.#u()){this.#p(r),this.#p(n);for(let[e,t]of this.#c)Rt(e,t)}else{this.#n===0&&St.delete(this),this.#o.clear(),this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),Pt(r),Pt(n),this.#i?.resolve()}var o=D;if(this.#a.length>0){let e=o??=this;e.#a.push(...this.#a.filter(t=>!e.#a.includes(t)))}o!==null&&(St.add(o),o.#d()),St.has(this)||this.#m()}#f(e,t,n){e.f^=fe;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#c.has(r))&&r.fn!==null){a?r.f^=fe:i&4?t.push(r):rt&&i&16777224?n.push(r):Tr(r)&&(i&16&&this.#s.add(r),Ar(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#p(e){for(var t=0;t<e.length;t+=1)vt(e[t],this.#o,this.#s)}capture(e,t){t!==d&&!this.previous.has(e)&&this.previous.set(e,t),e.f&8388608||(this.current.set(e,e.v),Ct?.set(e,e.v))}activate(){D=this}deactivate(){D=null,Ct=null}flush(){try{Et=!0,D=this,this.#d()}finally{kt=0,wt=null,Dt=null,Ot=null,Et=!1,D=null,Ct=null,an.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear(),St.delete(this)}#m(){for(let s of St){var e=s.id<this.id,t=[];for(let[n,r]of this.current){if(s.current.has(n))if(e&&r!==s.current.get(n))s.current.set(n,r);else continue;t.push(n)}var n=[...s.current.keys()].filter(e=>!this.current.has(e));if(n.length===0)e&&s.discard();else if(t.length>0){s.activate();var r=new Set,i=new Map;for(var a of t)Ft(a,n,r,i);if(s.#a.length>0){s.apply();for(var o of s.#a)s.#f(o,[],[]);s.#a=[]}s.deactivate()}}}increment(e){this.#n+=1,e&&(this.#r+=1)}decrement(e,t){--this.#n,e&&--this.#r,!(this.#l||t)&&(this.#l=!0,dt(()=>{this.#l=!1,this.flush()}))}transfer_effects(e,t){for(let t of e)this.#o.add(t);for(let e of t)this.#s.add(e);e.clear(),t.clear()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=ue()).promise}static ensure(){if(D===null){let t=D=new e;Et||(St.add(D),Tt||dt(()=>{D===t&&t.flush()}))}return D}apply(){if(!rt||!this.is_fork&&St.size===1){Ct=null;return}Ct=new Map(this.current);for(let e of St)if(!(e===this||e.is_fork))for(let[t,n]of e.previous)Ct.has(t)||Ct.set(t,n)}schedule(e){if(wt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Dt!==null&&t===P&&(rt||(N===null||!(N.f&2))&&!yt))return;if(n&96){if(!(n&1024))return;t.f^=fe}}this.#a.push(t)}};function O(e){var t=Tt;Tt=!0;try{var n;for(e&&(D!==null&&!D.is_fork&&D.flush(),n=e());;){if(ft(),D===null)return n;D.flush()}}finally{Tt=t}}function Mt(){try{ze()}catch(e){mt(e,wt)}}var Nt=null;function Pt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Tr(r)&&(Nt=new Set,Ar(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&tr(r),Nt?.size>0)){an.clear();for(let e of Nt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Nt.has(n)&&(Nt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Ar(n)}}Nt.clear()}}Nt=null}}function Ft(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Ft(i,t,n,r):e&4194320&&!(e&2048)&&It(i,t,r)&&(E(i,pe),Lt(i))}}function It(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(_.call(t,r))return!0;if(r.f&2&&It(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Lt(e){D.schedule(e)}function Rt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),E(e,fe);for(var n=e.first;n!==null;)Rt(n,t),n=n.next}}function zt(e){E(e,fe);for(var t=e.first;t!==null;)zt(t),t=t.next}function Bt(e){let t=0,n=sn(0),r;return()=>{Rn()&&(F(n),Kn(()=>(t===0&&(r=Pr(()=>e(()=>dn(n)))),t+=1,()=>{dt(()=>{--t,t===0&&(r?.(),r=void 0,dn(n))})})))}}var Vt=ye|xe;function Ht(e,t,n,r){new Ut(e,t,n,r)}var Ut=class{parent;is_pending=!1;transform_error;#e;#t=x?C:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Bt(()=>(this.#m=sn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=P;t.b=this,t.f|=128,n(e)},this.parent=P.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Jn(()=>{if(x){let e=this.#t;Ye();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Vt),x&&(this.#e=C)}#g(){try{this.#a=Xn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=Xn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Xn(()=>e(this.#e)),dt(()=>{var e=this.#c=document.createDocumentFragment(),t=xn();e.append(t),this.#a=this.#x(()=>Xn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,nr(this.#o,()=>{this.#o=null}),this.#b(D))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Xn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();or(this.#a,e);let t=this.#n.pending;this.#o=Xn(()=>t(this.#e))}else this.#b(D)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){vt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=P,n=N,r=T;pr(this.#i),fr(this.#i),at(this.#i.ctx);try{return jt.ensure(),e()}catch(e){return pt(e),null}finally{pr(t),fr(n),at(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&nr(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,dt(()=>{this.#d=!1,this.#m&&ln(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),F(this.#m)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#a&&=(M(this.#a),null),this.#o&&=(M(this.#o),null),this.#s&&=(M(this.#s),null),x&&(w(this.#t),Ze(),w(Qe()));var r=!1,i=!1;let a=()=>{if(r){Je();return}r=!0,i&&Ge(),this.#s!==null&&nr(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){mt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return Xn(()=>{var t=P;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return mt(e,this.#i.parent),null}}))};dt(()=>{var t;try{t=this.transform_error(e)}catch(e){mt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>mt(e,this.#i&&this.#i.parent)):o(t)})}};function Wt(e,t,n,r){let i=ct()?Jt:Xt;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=P,s=Gt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){o.f&16384||mt(e,o)}Kt()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=qt();function d(){Promise.all(n.map(e=>Yt(e))).then(e=>l([...t.map(i),...e])).catch(e=>mt(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),Kt()}):d()}function Gt(){var e=P,t=N,n=T,r=D;return function(i=!0){pr(e),fr(t),at(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Kt(e=!0){pr(null),fr(null),at(null),e&&D?.deactivate()}function qt(){var e=P.b,t=D,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}function Jt(e){var t=2|pe,n=N!==null&&N.f&2?N:null;return P!==null&&(P.f|=xe),{ctx:T,deps:null,effects:null,equals:et,f:t,fn:e,reactions:null,rv:0,v:d,wv:0,parent:n??P,ac:null}}function Yt(e,t,n){let r=P;r===null&&Pe();var i=void 0,a=sn(d),o=!N,s=new Map;return Gn(()=>{var t=P,n=ue();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(Kt)}catch(e){n.reject(e),Kt()}var c=D;if(o){if(t.f&32768)var l=qt();if(r.b.is_rendered())s.get(c)?.reject(je),s.delete(c);else{for(let e of s.values())e.reject(je);s.clear()}s.set(c,n)}let u=(e,n=void 0)=>{if(l&&l(n===je),!(n===je||t.f&16384)){if(c.activate(),n)a.f|=De,ln(a,n);else{a.f&8388608&&(a.f^=De),ln(a,e);for(let[e,t]of s){if(s.delete(e),e===c)break;t.reject(je)}}c.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),zn(()=>{for(let e of s.values())e.reject(je)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function k(e){let t=Jt(e);return rt||hr(t),t}function Xt(e){let t=Jt(e);return t.equals=nt,t}function Zt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)M(t[n])}}function Qt(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t.f&16384?null:t;t=t.parent}return null}function $t(e){var t,n=P;pr(Qt(e));try{e.f&=~we,Zt(e),t=Dr(e)}finally{pr(n)}return t}function en(e){var t=e.v,n=$t(e);if(!e.equals(n)&&(e.wv=wr(),(!D?.is_fork||e.deps===null)&&(e.v=n,D?.capture(e,t),e.deps===null))){E(e,fe);return}lr||(Ct===null?gt(e):(Rn()||D?.is_fork)&&Ct.set(e,n))}function tn(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(je),t.teardown=se,t.ac=null,kr(t,0),Qn(t))}function nn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&Ar(t)}var rn=new Set,an=new Map,on=!1;function sn(e,t){return{f:0,v:e,reactions:null,equals:et,rv:0,wv:0}}function A(e,t){let n=sn(e,t);return hr(n),n}function cn(e,t=!1,n=!0){let r=sn(e);return t||(r.equals=nt),it&&n&&T!==null&&T.l!==null&&(T.l.s??=[]).push(r),r}function j(e,t,n=!1){return N!==null&&(!dr||N.f&131072)&&ct()&&N.f&4325394&&(mr===null||!_.call(mr,e))&&We(),ln(e,n?pn(t):t,Ot)}function ln(e,t,n=null){if(!e.equals(t)){var r=e.v;lr?an.set(e,t):an.set(e,r),e.v=t;var i=jt.ensure();if(i.capture(e,r),e.f&2){let t=e;e.f&2048&&$t(t),Ct===null&&gt(t)}e.wv=wr(),fn(e,pe,n),ct()&&P!==null&&P.f&1024&&!(P.f&96)&&(vr===null?yr([e]):vr.push(e)),!i.is_fork&&rn.size>0&&!on&&un()}return t}function un(){on=!1;for(let e of rn)e.f&1024&&E(e,me),Tr(e)&&Ar(e);rn.clear()}function dn(e){j(e,e.v+1)}function fn(e,t,n){var r=e.reactions;if(r!==null)for(var i=ct(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===P)){var l=(c&pe)===0;if(l&&E(s,t),c&2){var u=s;Ct?.delete(u),c&65536||(c&512&&(s.f|=we),fn(u,me,n))}else if(l){var d=s;c&16&&Nt!==null&&Nt.add(d),n===null?Lt(d):n.push(d)}}}}function pn(e){if(typeof e!=`object`||!e||Oe in e)return e;let t=ie(e);if(t!==ne&&t!==re)return e;var n=new Map,r=h(e),i=A(0),a=null,o=Sr,s=e=>{if(Sr===o)return e();var t=N,n=Sr;fr(null),Cr(o);var r=e();return fr(t),Cr(n),r};return r&&n.set(`length`,A(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&He();var i=n.get(t);return i===void 0?s(()=>{var e=A(r.value,a);return n.set(t,e),e}):j(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>A(d,a));n.set(t,e),dn(i)}}else j(r,d),dn(i);return!0},get(t,r,i){if(r===Oe)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||y(t,r)?.writable)&&(o=s(()=>A(pn(c?t[r]:d),a)),n.set(r,o)),o!==void 0){var l=F(o);return l===d?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=F(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==d)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Oe)return!0;var r=n.get(t),i=r!==void 0&&r.v!==d||Reflect.has(e,t);return(r!==void 0||P!==null&&(!i||y(e,t)?.writable))&&(r===void 0&&(r=s(()=>A(i?pn(e[t]):d,a)),n.set(t,r)),F(r)===d)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var f=o;f<l.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=s(()=>A(d,a)),n.set(f+``,p)):j(p,d)}if(l===void 0)(!u||y(e,t)?.writable)&&(l=s(()=>A(void 0,a)),j(l,pn(o)),n.set(t,l));else{u=l.v!==d;var m=s(()=>pn(o));j(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,o),!u){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&j(g,_+1)}dn(i)}return!0},ownKeys(e){F(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==d});for(var[r,a]of n)a.v!==d&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Ue()}})}function mn(e){try{if(typeof e==`object`&&e&&Oe in e)return e[Oe]}catch{}return e}function hn(e,t){return Object.is(mn(e),mn(t))}var gn,_n,vn,yn;function bn(){if(gn===void 0){gn=window,_n=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;vn=y(t,`firstChild`).get,yn=y(t,`nextSibling`).get,ae(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ae(n)&&(n.__t=void 0)}}function xn(e=``){return document.createTextNode(e)}function Sn(e){return vn.call(e)}function Cn(e){return yn.call(e)}function wn(e,t){if(!x)return Sn(e);var n=Sn(C);if(n===null)n=C.appendChild(xn());else if(t&&n.nodeType!==3){var r=xn();return n?.before(r),w(r),r}return t&&An(n),w(n),n}function Tn(e,t=!1){if(!x){var n=Sn(e);return n instanceof Comment&&n.data===``?Cn(n):n}if(t){if(C?.nodeType!==3){var r=xn();return C?.before(r),w(r),r}An(C)}return C}function En(e,t=1,n=!1){let r=x?C:e;for(var i;t--;)i=r,r=Cn(r);if(!x)return r;if(n){if(r?.nodeType!==3){var a=xn();return r===null?i?.after(a):r.before(a),w(a),a}An(r)}return w(r),r}function Dn(e){e.textContent=``}function On(){return!rt||Nt!==null?!1:(P.f&_e)!==0}function kn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function An(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function jn(e,t){if(t){let t=document.body;e.autofocus=!0,dt(()=>{document.activeElement===t&&e.focus()})}}var Mn=!1;function Nn(){Mn||(Mn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Pn(e){var t=N,n=P;fr(null),pr(null);try{return e()}finally{fr(t),pr(n)}}function Fn(e){P===null&&(N===null&&Re(e),Le()),lr&&Ie(e)}function In(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Ln(e,t){var n=P;n!==null&&n.f&8192&&(e|=he);var r={ctx:T,deps:null,nodes:null,f:e|pe|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if(e&4)Dt===null?jt.ensure().schedule(r):Dt.push(r);else if(t!==null){try{Ar(r)}catch(e){throw M(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ye))}if(i!==null&&(i.parent=n,n!==null&&In(i,n),N!==null&&N.f&2&&!(e&64))){var a=N;(a.effects??=[]).push(i)}return r}function Rn(){return N!==null&&!dr}function zn(e){let t=Ln(8,null);return E(t,fe),t.teardown=e,t}function Bn(e){Fn(`$effect`);var t=P.f;if(!N&&t&32&&!(t&32768)){var n=T;(n.e??=[]).push(e)}else return Vn(e)}function Vn(e){return Ln(4|Se,e)}function Hn(e){jt.ensure();let t=Ln(64|xe,e);return()=>{M(t)}}function Un(e){jt.ensure();let t=Ln(64|xe,e);return(e={})=>new Promise(n=>{e.outro?nr(t,()=>{M(t),n(void 0)}):(M(t),n(void 0))})}function Wn(e){return Ln(4,e)}function Gn(e){return Ln(Ee|xe,e)}function Kn(e,t=0){return Ln(8|t,e)}function qn(e,t=[],n=[],r=[]){Wt(r,t,n,t=>{Ln(8,()=>e(...t.map(F)))})}function Jn(e,t=0){return Ln(16|t,e)}function Yn(e,t=0){return Ln(de|t,e)}function Xn(e){return Ln(32|xe,e)}function Zn(e){var t=e.teardown;if(t!==null){let e=lr,n=N;ur(!0),fr(null);try{t.call(null)}finally{ur(e),fr(n)}}}function Qn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Pn(()=>{e.abort(je)});var r=n.next;n.f&64?n.parent=null:M(n,t),n=r}}function $n(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||M(t),t=n}}function M(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(er(e.nodes.start,e.nodes.end),n=!0),E(e,ve),Qn(e,t&&!n),kr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Zn(e),e.f^=ve,e.f|=ge;var i=e.parent;i!==null&&i.first!==null&&tr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function er(e,t){for(;e!==null;){var n=e===t?null:Cn(e);e.remove(),e=n}}function tr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function nr(e,t,n=!0){var r=[];rr(e,r,!0);var i=()=>{n&&M(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function rr(e,t,n){if(!(e.f&8192)){e.f^=he;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;rr(i,t,o?n:!1),i=a}}}function ir(e){ar(e,!0)}function ar(e,t){if(e.f&8192){e.f^=he,e.f&1024||(E(e,pe),jt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;ar(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function or(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Cn(n);t.append(n),n=i}}var sr=null,cr=!1,lr=!1;function ur(e){lr=e}var N=null,dr=!1;function fr(e){N=e}var P=null;function pr(e){P=e}var mr=null;function hr(e){N!==null&&(!rt||N.f&2)&&(mr===null?mr=[e]:mr.push(e))}var gr=null,_r=0,vr=null;function yr(e){vr=e}var br=1,xr=0,Sr=xr;function Cr(e){Sr=e}function wr(){return++br}function Tr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~we),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Tr(a)&&en(a),a.wv>e.wv)return!0}t&512&&Ct===null&&E(e,fe)}return!1}function Er(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!rt&&mr!==null&&_.call(mr,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Er(a,t,!1):t===a&&(n?E(a,pe):a.f&1024&&E(a,me),Lt(a))}}function Dr(e){var t=gr,n=_r,r=vr,i=N,a=mr,o=T,s=dr,c=Sr,l=e.f;gr=null,_r=0,vr=null,N=l&96?null:e,mr=null,at(e.ctx),dr=!1,Sr=++xr,e.ac!==null&&(Pn(()=>{e.ac.abort(je)}),e.ac=null);try{e.f|=Te;var u=e.fn,d=u();e.f|=_e;var f=e.deps,p=D?.is_fork;if(gr!==null){var m;if(p||kr(e,_r),f!==null&&_r>0)for(f.length=_r+gr.length,m=0;m<gr.length;m++)f[_r+m]=gr[m];else e.deps=f=gr;if(Rn()&&e.f&512)for(m=_r;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&_r<f.length&&(kr(e,_r),f.length=_r);if(ct()&&vr!==null&&!dr&&f!==null&&!(e.f&6146))for(m=0;m<vr.length;m++)Er(vr[m],e);if(i!==null&&i!==e){if(xr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=xr;if(t!==null)for(let e of t)e.rv=xr;vr!==null&&(r===null?r=vr:r.push(...vr))}return e.f&8388608&&(e.f^=De),d}catch(e){return pt(e)}finally{e.f^=Te,gr=t,_r=n,vr=r,N=i,mr=a,at(o),dr=s,Sr=c}}function Or(e,t){let n=t.reactions;if(n!==null){var r=g.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(gr===null||!_.call(gr,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~we),gt(a),tn(a),kr(a,0)}}function kr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Or(e,n[r])}function Ar(e){var t=e.f;if(!(t&16384)){E(e,fe);var n=P,r=cr;P=e,cr=!0;try{t&16777232?$n(e):Qn(e),Zn(e);var i=Dr(e);e.teardown=typeof i==`function`?i:null,e.wv=br}finally{cr=r,P=n}}}async function jr(){if(rt)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),O()}function F(e){var t=(e.f&2)!=0;if(sr?.add(e),N!==null&&!dr&&!(P!==null&&P.f&16384)&&(mr===null||!_.call(mr,e))){var n=N.deps;if(N.f&2097152)e.rv<xr&&(e.rv=xr,gr===null&&n!==null&&n[_r]===e?_r++:gr===null?gr=[e]:gr.push(e));else{(N.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[N]:_.call(r,N)||r.push(N)}}if(lr&&an.has(e))return an.get(e);if(t){var i=e;if(lr){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Nr(i))&&(a=$t(i)),an.set(i,a),a}var o=(i.f&512)==0&&!dr&&N!==null&&(cr||(N.f&512)!=0),s=(i.f&_e)===0;Tr(i)&&(o&&(i.f|=512),en(i)),o&&!s&&(nn(i),Mr(i))}if(Ct?.has(e))return Ct.get(e);if(e.f&8388608)throw e.v;return e.v}function Mr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(nn(t),Mr(t))}function Nr(e){if(e.v===d)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(an.has(t)||t.f&2&&Nr(t))return!0;return!1}function Pr(e){var t=dr;try{return dr=!0,e()}finally{dr=t}}function Fr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(Oe in e)Ir(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&Oe in n&&Ir(n)}}}function Ir(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ir(e[n],t)}catch{}let n=ie(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=b(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}var Lr=Symbol(`events`),Rr=new Set,zr=new Set;function Br(e,t,n,r={}){function i(e){if(r.capture||Gr.call(t,e),!e.cancelBubble)return Pn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?dt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Vr(e,t,n,r,i){var a={capture:r,passive:i},o=Br(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&zn(()=>{t.removeEventListener(e,o,a)})}function Hr(e,t,n){(t[Lr]??={})[e]=n}function Ur(e){for(var t=0;t<e.length;t++)Rr.add(e[t]);for(var n of zr)n(e)}var Wr=null;function Gr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;Wr=e;var o=0,s=Wr===e&&e[Lr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Lr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){te(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=N,d=P;fr(null),pr(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[Lr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble||m===t||m===null)break;a=m}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[Lr]=t,delete e.currentTarget,fr(u),pr(d)}}}var Kr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function qr(e){return Kr?.createHTML(e)??e}function Jr(e){var t=kn(`template`);return t.innerHTML=qr(e.replaceAll(`<!>`,`<!---->`)),t.content}function Yr(e,t){var n=P;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Xr(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(x)return Yr(C,null),C;i===void 0&&(i=Jr(a?e:`<!>`+e),n||(i=Sn(i)));var t=r||_n?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Sn(t),s=t.lastChild;Yr(o,s)}else Yr(t,t);return t}}function Zr(){if(x)return Yr(C,null),C;var e=document.createDocumentFragment(),t=document.createComment(``),n=xn();return e.append(t,n),Yr(t,n),e}function I(e,t){if(x){var n=P;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=C),Ye();return}e!==null&&e.before(t)}function Qr(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var $r=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function ei(e){return $r.includes(e)}var ti=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),ni={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function ri(e){return e=e.toLowerCase(),ni[e]??e}[...ti];var ii=[`touchstart`,`touchmove`];function ai(e){return ii.includes(e)}var oi=[`textarea`,`script`,`style`,`title`];function si(e){return oi.includes(e)}function ci(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function li(e,t){return fi(e,t)}function ui(e,t){bn(),t.intro=t.intro??!1;let n=t.target,r=x,i=C;try{for(var a=Sn(n);a&&(a.nodeType!==8||a.data!==`[`);)a=Cn(a);if(!a)throw u;S(!0),w(a);let r=fi(e,{...t,anchor:a});return S(!1),r}catch(r){if(r instanceof Error&&r.message.split(`
2
+ `).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw r;return r!==u&&console.warn(`Failed to hydrate: `,r),t.recover===!1&&Be(),bn(),Dn(n),S(!1),li(e,t)}finally{S(r),w(i)}}var di=new Map;function fi(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){bn();var c=void 0,l=Un(()=>{var o=n??t.appendChild(xn());Ht(o,{pending:()=>{}},t=>{ot({});var n=T;if(a&&(n.c=a),i&&(r.$$events=i),x&&Yr(t,null),c=e(t,r)||{},x&&(P.nodes.end=C,C===null||C.nodeType!==8||C.data!==`]`))throw Ke(),u;st()},s);var l=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=ai(r);for(let e of[t,document]){var a=di.get(e);a===void 0&&(a=new Map,di.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Gr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(ee(Rr)),zr.add(d),()=>{for(var e of l)for(let n of[t,document]){var r=di.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Gr),r.delete(e),r.size===0&&di.delete(n)):r.set(e,i)}zr.delete(d),o!==n&&o.parentNode?.removeChild(o)}});return pi.set(c,l),c}var pi=new WeakMap;function mi(e,t){let n=pi.get(e);return n?(pi.delete(e),n(t)):Promise.resolve()}var hi=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)ir(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(M(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();or(r,t),t.append(xn()),this.#n.set(e,{effect:r,fragment:t})}else M(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),nr(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(M(n.effect),this.#n.delete(e))};ensure(e,t){var n=D,r=On();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=xn();i.append(a),this.#n.set(e,{effect:Xn(()=>t(a)),fragment:i})}else this.#t.set(e,Xn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else x&&(this.anchor=C),this.#a(n)}};function gi(e,t,...n){var r=new hi(e);Jn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ye)}function _i(e){T===null&&Ne(`onMount`),it&&T.l!==null?yi(T).m.push(e):Bn(()=>{let t=Pr(e);if(typeof t==`function`)return t})}function vi(e){T===null&&Ne(`onDestroy`),_i(()=>()=>Pr(e))}function yi(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var bi=0,xi=1,Si=2;function Ci(e,t,n,r,i){x&&Ye();var a=ct(),o=d,s=a?sn(o):cn(o,!1,!1),c=a?sn(o):cn(o,!1,!1),l=new hi(e);Jn(()=>{var a=D;a.deactivate();var o=t();a.activate();var u=!1;let d=x&&ce(o)===(e.data===`[!`);if(d&&(w(Qe()),S(!1)),ce(o)){var f=Gt(),p=!1;let e=e=>{if(!u){p=!0,f(!1),jt.ensure(),x&&S(!1);try{e()}finally{Kt(!1),Tt||O()}}};o.then(t=>{e(()=>{ln(s,t),l.ensure(xi,r&&(e=>r(e,s)))})},t=>{e(()=>{if(ln(c,t),l.ensure(Si,i&&(e=>i(e,c))),!i)throw c.v})}),x?l.ensure(bi,n):dt(()=>{p||e(()=>{l.ensure(bi,n)})})}else ln(s,o),l.ensure(xi,r&&(e=>r(e,s)));return d&&S(!0),()=>{u=!0}})}function wi(e,t,n=!1){var r;x&&(r=C,Ye());var i=new hi(e),a=n?ye:0;function o(e,t){if(x){var n=$e(r);if(e!==parseInt(n.substring(1))){var a=Qe();w(a),i.anchor=a,S(!1),i.ensure(e,t),S(!0);return}}i.ensure(e,t)}Jn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Ti(e,t){return t}function Ei(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];nr(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Di(e,ee(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;Dn(u),u.append(l),e.items.clear()}Di(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Di(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=Ce,or(a,document.createDocumentFragment())):M(t[i],n)}}var Oi;function ki(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=x?w(Sn(c)):c.appendChild(xn())}x&&Ye();var l=null,u=Xt(()=>{var e=n();return h(e)?e:e==null?[]:ee(e)}),d,f=new Map,p=!0;function m(e){_.effect.f&16384||(_.pending.delete(e),_.fallback=l,ji(_,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=Ce,Ni(l,null,o)):ir(l):nr(l,()=>{l=null})))}function g(e){_.pending.delete(e)}var _={effect:Jn(()=>{d=F(u);var e=d.length;let c=!1;x&&$e(o)===`[!`!=(e===0)&&(o=Qe(),w(o),S(!1),c=!0);for(var h=new Set,_=D,ee=On(),v=0;v<e;v+=1){x&&C.nodeType===8&&C.data===`]`&&(o=C,c=!0,S(!1));var te=d[v],y=r(te,v),b=p?null:s.get(y);b?(b.v&&ln(b.v,te),b.i&&ln(b.i,v),ee&&_.unskip_effect(b.e)):(b=Mi(s,p?o:Oi??=xn(),te,y,v,i,t,n),p||(b.e.f|=Ce),s.set(y,b)),h.add(y)}if(e===0&&a&&!l&&(p?l=Xn(()=>a(o)):(l=Xn(()=>a(Oi??=xn())),l.f|=Ce)),e>h.size&&Fe(``,``,``),x&&e>0&&w(Qe()),!p)if(f.set(_,h),ee){for(let[e,t]of s)h.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(g)}else m(_);c&&S(!0),F(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,x&&(o=C)}function Ai(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function ji(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=Ai(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a)for(_=0;_<o;_+=1)m=t[_],h=i(m,_),g=s.get(h).e,g.f&33554432||(g.nodes?.a?.measure(),(d??=new Set).add(g));for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if(g.f&8192&&(ir(g),a&&(g.nodes?.a?.unfix(),(d??=new Set).delete(g))),g.f&33554432)if(g.f^=Ce,g===c)Ni(g,null,n);else{var v=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Pi(e,u,g),Pi(e,g,v),Ni(g,v,n),u=g,f=[],p=[],c=Ai(u.next);continue}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var te=p[0],y;u=te.prev;var b=f[0],ne=f[f.length-1];for(y=0;y<f.length;y+=1)Ni(f[y],te,n);for(y=0;y<p.length;y+=1)l.delete(p[y]);Pi(e,b.prev,ne.next),Pi(e,u,b),Pi(e,ne,te),c=te,u=ne,--_,f=[],p=[]}else l.delete(g),Ni(g,c,n),Pi(e,g.prev,g.next),Pi(e,g,u===null?e.effect.first:u.next),Pi(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=Ai(c.next);if(c===null)continue}g.f&33554432||f.push(g),u=g,c=Ai(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Di(e,ee(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var re=[];if(l!==void 0)for(g of l)g.f&8192||re.push(g);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&re.push(c),c=Ai(c.next);var ie=re.length;if(ie>0){var ae=r&4&&o===0?n:null;if(a){for(_=0;_<ie;_+=1)re[_].nodes?.a?.measure();for(_=0;_<ie;_+=1)re[_].nodes?.a?.fix()}Ei(e,re,ae)}}a&&dt(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function Mi(e,t,n,r,i,a,o,s){var c=o&1?o&16?sn(n):cn(n,!1,!1):null,l=o&2?sn(i):null;return{v:c,i:l,e:Xn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ni(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Cn(r);if(a.before(r),r===i)return;r=o}}function Pi(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Fi(e,t,n=!1,r=!1,i=!1,a=!1){var o=e,s=``;if(n){var c=e;x&&(o=w(Sn(c)))}qn(()=>{var e=P;if(s===(s=t()??``)){x&&Ye();return}if(n&&!x){e.nodes=null,c.innerHTML=s,s!==``&&Yr(Sn(c),c.lastChild);return}if(e.nodes!==null&&(er(e.nodes.start,e.nodes.end),e.nodes=null),s!==``){if(x){for(var a=C.data,l=Ye(),d=l;l!==null&&(l.nodeType!==8||l.data!==``);)d=l,l=Cn(l);if(l===null)throw Ke(),u;Yr(C,d),o=w(l);return}var f=kn(r?`svg`:i?`math`:`template`,r?p:i?m:void 0);f.innerHTML=s;var h=r||i?f:f.content;if(Yr(Sn(h),h.lastChild),r||i)for(;Sn(h);)o.before(Sn(h));else o.before(h)}})}function Ii(e,t,n,r,i,a){let o=x;x&&Ye();var s=null;x&&C.nodeType===1&&(s=C,Ye());var c=x?C:e,l=new hi(c,!1);Jn(()=>{let e=t()||null;var a=i?i():n||e===`svg`?p:void 0;if(e===null){l.ensure(null,null);return}return l.ensure(e,t=>{if(e){if(s=x?s:kn(e,a),Yr(s,s),r){x&&si(e)&&s.append(document.createComment(``));var n=x?Sn(s):s.appendChild(xn());x&&(n===null?S(!1):w(n)),r(s,n)}P.nodes.end=s,t.before(s)}x&&w(t)}),()=>{}},ye),zn(()=>{}),o&&(S(!0),w(c))}function Li(e,t){let n=null,r=x;var i;if(x){n=C;for(var a=Sn(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=Cn(a);if(a===null)S(!1);else{var o=Cn(a);a.remove(),w(o)}}x||(i=document.head.appendChild(xn()));try{Jn(()=>t(i),be|xe)}finally{r&&(S(!0),w(n))}}function Ri(e,t){Wn(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=kn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function zi(e,t,n){Wn(()=>{var r=Pr(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};Kn(()=>{var e=n();Fr(e),i&&tt(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Bi(e,t){var n=void 0,r;Yn(()=>{n!==(n=t())&&(r&&=(M(r),null),n&&(r=Xn(()=>{Wn(()=>n(e))})))})}function Vi(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Vi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Hi(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Vi(e))&&(r&&(r+=` `),r+=t);return r}function Ui(e){return typeof e==`object`?Hi(e):e??``}var Wi=[...`
3
+ \r\f\xA0\v`];function Gi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Wi.includes(r[o-1]))&&(s===r.length||Wi.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Ki(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function qi(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Ji(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(qi)),i&&c.push(...Object.keys(i).map(qi));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=qi(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Ki(r)),i&&(n+=Ki(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Yi(e,t,n,r,i,a){var o=e.__className;if(x||o!==n||o===void 0){var s=Gi(n,r,a);(!x||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Xi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Zi(e,t,n,r){var i=e.__style;if(x||i!==t){var a=Ji(t,r);(!x||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(Xi(e,n?.[0],r[0]),Xi(e,n?.[1],r[1],`important`)):Xi(e,n,r));return r}function Qi(e,t,n=!1){if(e.multiple){if(t==null)return;if(!h(t))return qe();for(var r of e.options)r.selected=t.includes(ea(r));return}for(r of e.options)if(hn(ea(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function $i(e){var t=new MutationObserver(()=>{Qi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),zn(()=>{t.disconnect()})}function ea(e){return`__value`in e?e.__value:e.value}var ta=Symbol(`class`),na=Symbol(`style`),ra=Symbol(`is custom element`),ia=Symbol(`is html`),aa=Me?`link`:`LINK`,oa=Me?`input`:`INPUT`,sa=Me?`option`:`OPTION`,ca=Me?`select`:`SELECT`;function la(e){if(x){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;da(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;da(e,`checked`,null),e.checked=r}}};e.__on_r=n,dt(n),Nn()}}function ua(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function da(e,t,n,r){var i=ma(e);x&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===aa)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[Ae]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ga(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function fa(e,t,n,r,i=!1,a=!1){if(x&&i&&e.nodeName===oa){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||la(o)}var s=ma(e),c=s[ra],l=!s[ia];let u=x&&c;u&&S(!1);var f=t||{},p=e.nodeName===sa;for(var m in t)m in n||(n[m]=null);n.class?n.class=Ui(n.class):(r||n[ta])&&(n.class=null),n[na]&&(n.style??=null);var h=ga(e);for(let i in n){let o=n[i];if(p&&i===`value`&&o==null){e.value=e.__value=``,f[i]=o;continue}if(i===`class`){Yi(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[ta],n[ta]),f[i]=o,f[ta]=n[ta];continue}if(i===`style`){Zi(e,o,t?.[na],n[na]),f[i]=o,f[na]=n[na];continue}var g=f[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){f[i]=o;var _=i[0]+i[1];if(_!==`$$`)if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var ee=ei(r);if(Qr(r)&&(r=r.slice(0,-7),t.capture=!0),!ee&&g){if(o!=null)continue;e.removeEventListener(r,f[n],t),f[n]=null}if(ee)Hr(r,e,o),Ur([r]);else if(o!=null){function a(e){f[i].call(this,e)}f[n]=Br(r,e,a,t)}}else if(i===`style`)da(e,i,o);else if(i===`autofocus`)jn(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&p)ua(e,o);else{var v=i;l||(v=ri(v));var te=v===`defaultValue`||v===`defaultChecked`;if(o==null&&!c&&!te)if(s[i]=null,v===`value`||v===`checked`){let n=e,r=t===void 0;if(v===`value`){let e=n.defaultValue;n.removeAttribute(v),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(v),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else te||h.includes(v)&&(c||typeof o!=`string`)?(e[v]=o,v in s&&(s[v]=d)):typeof o!=`function`&&da(e,v,o,a)}}}return u&&S(!0),f}function pa(e,t,n=[],r=[],i=[],a,o=!1,s=!1){Wt(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===ca,l=!1;if(Yn(()=>{var u=t(...n.map(F)),d=fa(e,r,u,a,o,s);l&&c&&`value`in u&&Qi(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||M(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&M(i[t]),i[t]=Xn(()=>Bi(e,()=>f))),d[t]=f}r=d}),c){var u=e;Wn(()=>{Qi(u,r.value,!0),$i(u)})}l=!0})}function ma(e){return e.__attributes??={[ra]:e.nodeName.includes(`-`),[ia]:e.namespaceURI===f}}var ha=new Map;function ga(e){var t=e.getAttribute(`is`)||e.nodeName,n=ha.get(t);if(n)return n;ha.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=b(i),r)r[o].set&&n.push(o);i=ie(i)}return n}function _a(e,t){return e===t||e?.[Oe]===t}function va(e={},t,n,r){var i=T.r,a=P;return Wn(()=>{var o,s;return Kn(()=>{o=s,s=r?.()||[],Pr(()=>{e!==n(...s)&&(t(e,...s),o&&_a(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&_a(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var ya={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function ba(e,t,n){return new Proxy({props:e,exclude:t},ya)}var xa={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(oe(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];oe(i)&&(i=i());let a=y(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(oe(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=y(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===Oe||t===ke)return!1;for(let n of e.props)if(oe(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(oe(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function Sa(...e){return new Proxy({props:e},xa)}function L(e,t,n,r){var i=!it||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?Pr(r):r),s);let u;if(a){var d=Oe in e||ke in e;u=y(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=xt(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&Ve(t),u(f)));var m=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return m;if(u){var h=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||h||p)&&u(t?m():e),e):m()})}var g=!1,_=(n&1?Jt:Xt)(()=>(g=!1,m()));a&&F(_);var ee=P;return(function(e,t){if(arguments.length>0){let n=t?F(_):i&&a?pn(e):e;return j(_,n),g=!0,s!==void 0&&(s=n),e}return lr&&g||ee.f&16384?_.v:F(_)})}function Ca(e){return new wa(e)}var wa=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=cn(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return F(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===ke?!0:(F(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return j(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?ui:li)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!rt&&(!e?.props?.$$host||e.sync===!1)&&O(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||te(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{mi(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},Ta;typeof HTMLElement==`function`&&(Ta=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=kn(`slot`);e!==`default`&&(n.name=e),I(t,n)}}let t={},n=Da(this);for(let r of this.$$s)r in n&&(r===`default`&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=Ea(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=Ca({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Hn(()=>{Kn(()=>{this.$$r=!0;for(let e of v(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=Ea(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ea(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return v(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ea(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function Da(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function Oa(e,t,n,r,i,a){let o=class extends Ta{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return v(t).map(e=>(t[e].attribute||e).toLowerCase())}};return v(t).forEach(e=>{te(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=Ea(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(y(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{te(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var ka=Xr(`<div class="chat-app__container"><div class="error-message svelte-14mj70v">Server is unreachable, please try later... <button class="error-message__retry-button svelte-14mj70v">Retry</button></div></div>`),Aa=Xr(` <!>`,1),ja={hash:`svelte-14mj70v`,code:`
4
4
  /* These styles are inline, because at this point theme loading has failed. */.error-message.svelte-14mj70v {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,
5
5
  BlinkMacSystemFont,
6
6
  avenir next,
@@ -13,66 +13,10 @@ var LiipGPTButton=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value
13
13
  roboto,
14
14
  noto,
15
15
  arial,
16
- sans-serif;}.error-message__retry-button.svelte-14mj70v {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function Ia(e,t){ot(t,!0),Hi(e,Fa);let n=(e,t=oe,n=oe)=>{Ye();var r=Pa(),a=On(r),o=kn(a),s=e=>{},c=e=>{var t=Na(),r=Dn(t),i=kn(Dn(r));Je(r),Je(t),Kr(`click`,i,()=>n()()),L(e,t)};Oi(o,e=>{i()?e(s):e(c,-1)}),Xn(e=>fi(a,`${e??``} `),[()=>console.error(`Panic, uncaught error:
17
- `,t())??``]),L(e,r)},r=R(t,`body`,7),i=R(t,`silent`,7),a=M(void 0),o=e=>{N(a,{error:e},!0)};var s={get body(){return r()},set body(e){r(e),A()},get silent(){return i()},set silent(e){i(e),A()}},c=ti();return Gt(On(c),{get failed(){return n}},e=>{var t=ti(),i=On(t),s=e=>{n(e,()=>I(a).error,()=>()=>{N(a,void 0)})},c=e=>{var t=ti();bi(On(t),r,()=>o),L(e,t)};Oi(i,e=>{I(a)?e(s):e(c,-1)}),L(e,t)}),L(e,c),st(s)}qr([`click`]),Ma(Ia,{body:{},silent:{}},[],[],{mode:`open`});var{entries:La,setPrototypeOf:Ra,isFrozen:za,getPrototypeOf:Ba,getOwnPropertyDescriptor:Va}=Object,{freeze:Ha,seal:Ua,create:Wa}=Object,{apply:Ga,construct:Ka}=typeof Reflect<`u`&&Reflect;Ha||=function(e){return e},Ua||=function(e){return e},Ga||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},Ka||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var qa=so(Array.prototype.forEach),Ja=so(Array.prototype.lastIndexOf),Ya=so(Array.prototype.pop),Xa=so(Array.prototype.push),Za=so(Array.prototype.splice),Qa=so(String.prototype.toLowerCase),$a=so(String.prototype.toString),eo=so(String.prototype.match),to=so(String.prototype.replace),no=so(String.prototype.indexOf),ro=so(String.prototype.trim),io=so(Object.prototype.hasOwnProperty),ao=so(RegExp.prototype.test),oo=co(TypeError);function so(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Ga(e,t,r)}}function co(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ka(e,n)}}function z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qa;Ra&&Ra(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(za(t)||(t[r]=e),i=e)}e[i]=!0}return e}function lo(e){for(let t=0;t<e.length;t++)io(e,t)||(e[t]=null);return e}function uo(e){let t=Wa(null);for(let[n,r]of La(e))io(e,n)&&(Array.isArray(r)?t[n]=lo(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=uo(r):t[n]=r);return t}function fo(e,t){for(;e!==null;){let n=Va(e,t);if(n){if(n.get)return so(n.get);if(typeof n.value==`function`)return so(n.value)}e=Ba(e)}function n(){return null}return n}var po=Ha(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),mo=Ha(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),ho=Ha([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),go=Ha([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),_o=Ha(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),vo=Ha([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),yo=Ha([`#text`]),bo=Ha(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),xo=Ha(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),So=Ha(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Co=Ha([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),wo=Ua(/\{\{[\w\W]*|[\w\W]*\}\}/gm),To=Ua(/<%[\w\W]*|[\w\W]*%>/gm),Eo=Ua(/\$\{[\w\W]*/gm),Do=Ua(/^data-[\-\w.\u00B7-\uFFFF]+$/),Oo=Ua(/^aria-[\-\w]+$/),ko=Ua(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ao=Ua(/^(?:\w+script|data):/i),jo=Ua(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Mo=Ua(/^html$/i),No=Ua(/^[a-z][.\w]*(-[.\w]+)+$/i),Po=Object.freeze({__proto__:null,ARIA_ATTR:Oo,ATTR_WHITESPACE:jo,CUSTOM_ELEMENT:No,DATA_ATTR:Do,DOCTYPE_NAME:Mo,ERB_EXPR:To,IS_ALLOWED_URI:ko,IS_SCRIPT_OR_DATA:Ao,MUSTACHE_EXPR:wo,TMPLIT_EXPR:Eo}),Fo={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Io=function(){return typeof window>`u`?null:window},Lo=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ro=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function zo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Io(),t=e=>zo(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==Fo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=fo(m,`cloneNode`),g=fo(m,`remove`),_=fo(m,`nextSibling`),ee=fo(m,`childNodes`),v=fo(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,b=``,{implementation:x,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=n,{importNode:ie}=r,ae=Ro();t.isSupported=typeof La==`function`&&typeof v==`function`&&x&&x.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:oe,ERB_EXPR:se,TMPLIT_EXPR:ce,DATA_ATTR:le,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:pe}=Po,{IS_ALLOWED_URI:me}=Po,he=null,ge=z({},[...po,...mo,...ho,..._o,...yo]),_e=null,ve=z({},[...bo,...xo,...So,...Co]),S=Object.seal(Wa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ye=null,be=null,xe=Object.seal(Wa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Se=!0,Ce=!0,we=!1,Te=!0,Ee=!1,De=!0,Oe=!1,ke=!1,Ae=!1,je=!1,Me=!1,Ne=!1,Pe=!0,Fe=!1,Ie=!0,Le=!1,Re={},ze=null,Be=z({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ve=null,He=z({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ue=null,We=z({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ge=`http://www.w3.org/1998/Math/MathML`,Ke=`http://www.w3.org/2000/svg`,C=`http://www.w3.org/1999/xhtml`,w=C,T=!1,E=null,qe=z({},[Ge,Ke,C],$a),Je=z({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ye=z({},[`annotation-xml`]),Xe=z({},[`title`,`style`,`font`,`a`,`script`]),Ze=null,Qe=[`application/xhtml+xml`,`text/html`],D=null,$e=null,et=n.createElement(`form`),tt=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!($e&&$e===e)){if((!e||typeof e!=`object`)&&(e={}),e=uo(e),Ze=Qe.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,D=Ze===`application/xhtml+xml`?$a:Qa,he=io(e,`ALLOWED_TAGS`)?z({},e.ALLOWED_TAGS,D):ge,_e=io(e,`ALLOWED_ATTR`)?z({},e.ALLOWED_ATTR,D):ve,E=io(e,`ALLOWED_NAMESPACES`)?z({},e.ALLOWED_NAMESPACES,$a):qe,Ue=io(e,`ADD_URI_SAFE_ATTR`)?z(uo(We),e.ADD_URI_SAFE_ATTR,D):We,Ve=io(e,`ADD_DATA_URI_TAGS`)?z(uo(He),e.ADD_DATA_URI_TAGS,D):He,ze=io(e,`FORBID_CONTENTS`)?z({},e.FORBID_CONTENTS,D):Be,ye=io(e,`FORBID_TAGS`)?z({},e.FORBID_TAGS,D):uo({}),be=io(e,`FORBID_ATTR`)?z({},e.FORBID_ATTR,D):uo({}),Re=io(e,`USE_PROFILES`)?e.USE_PROFILES:!1,Se=e.ALLOW_ARIA_ATTR!==!1,Ce=e.ALLOW_DATA_ATTR!==!1,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ee=e.SAFE_FOR_TEMPLATES||!1,De=e.SAFE_FOR_XML!==!1,Oe=e.WHOLE_DOCUMENT||!1,je=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Ae=e.FORCE_BODY||!1,Pe=e.SANITIZE_DOM!==!1,Fe=e.SANITIZE_NAMED_PROPS||!1,Ie=e.KEEP_CONTENT!==!1,Le=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||ko,w=e.NAMESPACE||C,Je=e.MATHML_TEXT_INTEGRATION_POINTS||Je,Ye=e.HTML_INTEGRATION_POINTS||Ye,S=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(S.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(S.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(S.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(Ce=!1),Me&&(je=!0),Re&&(he=z({},yo),_e=Wa(null),Re.html===!0&&(z(he,po),z(_e,bo)),Re.svg===!0&&(z(he,mo),z(_e,xo),z(_e,Co)),Re.svgFilters===!0&&(z(he,ho),z(_e,xo),z(_e,Co)),Re.mathMl===!0&&(z(he,_o),z(_e,So),z(_e,Co))),io(e,`ADD_TAGS`)||(xe.tagCheck=null),io(e,`ADD_ATTR`)||(xe.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?xe.tagCheck=e.ADD_TAGS:(he===ge&&(he=uo(he)),z(he,e.ADD_TAGS,D))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?xe.attributeCheck=e.ADD_ATTR:(_e===ve&&(_e=uo(_e)),z(_e,e.ADD_ATTR,D))),e.ADD_URI_SAFE_ATTR&&z(Ue,e.ADD_URI_SAFE_ATTR,D),e.FORBID_CONTENTS&&(ze===Be&&(ze=uo(ze)),z(ze,e.FORBID_CONTENTS,D)),e.ADD_FORBID_CONTENTS&&(ze===Be&&(ze=uo(ze)),z(ze,e.ADD_FORBID_CONTENTS,D)),Ie&&(he[`#text`]=!0),Oe&&z(he,[`html`,`head`,`body`]),he.table&&(z(he,[`tbody`]),delete ye.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw oo(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw oo(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);y=e.TRUSTED_TYPES_POLICY,b=y.createHTML(``)}else y===void 0&&(y=Lo(p,i)),y!==null&&typeof b==`string`&&(b=y.createHTML(``));Ha&&Ha(e),$e=e}},rt=z({},[...mo,...ho,...go]),it=z({},[..._o,...vo]),O=function(e){let t=v(e);(!t||!t.tagName)&&(t={namespaceURI:w,tagName:`template`});let n=Qa(e.tagName),r=Qa(t.tagName);return E[e.namespaceURI]?e.namespaceURI===Ke?t.namespaceURI===C?n===`svg`:t.namespaceURI===Ge?n===`svg`&&(r===`annotation-xml`||Je[r]):!!rt[n]:e.namespaceURI===Ge?t.namespaceURI===C?n===`math`:t.namespaceURI===Ke?n===`math`&&Ye[r]:!!it[n]:e.namespaceURI===C?t.namespaceURI===Ke&&!Ye[r]||t.namespaceURI===Ge&&!Je[r]?!1:!it[n]&&(Xe[n]||!rt[n]):!!(Ze===`application/xhtml+xml`&&E[e.namespaceURI]):!1},at=function(e){Xa(t.removed,{element:e});try{v(e).removeChild(e)}catch{g(e)}},ot=function(e,n){try{Xa(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Xa(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(je||Me)try{at(n)}catch{}else try{n.setAttribute(e,``)}catch{}},st=function(e){let t=null,r=null;if(Ae)e=`<remove></remove>`+e;else{let t=eo(e,/^[\r\n\t ]+/);r=t&&t[0]}Ze===`application/xhtml+xml`&&w===C&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?y.createHTML(e):e;if(w===C)try{t=new f().parseFromString(i,Ze)}catch{}if(!t||!t.documentElement){t=x.createDocument(w,`template`,null);try{t.documentElement.innerHTML=T?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),w===C?re.call(t,Oe?`html`:`body`)[0]:Oe?t.documentElement:a},ct=function(e){return te.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},lt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},ut=function(e){return typeof s==`function`&&e instanceof s};function dt(e,n,r){qa(e,e=>{e.call(t,n,r,$e)})}let ft=function(e){let n=null;if(dt(ae.beforeSanitizeElements,e,null),lt(e))return at(e),!0;let r=D(e.nodeName);if(dt(ae.uponSanitizeElement,e,{tagName:r,allowedTags:he}),De&&e.hasChildNodes()&&!ut(e.firstElementChild)&&ao(/<[/\w!]/g,e.innerHTML)&&ao(/<[/\w!]/g,e.textContent)||e.nodeType===Fo.progressingInstruction||De&&e.nodeType===Fo.comment&&ao(/<[/\w]/g,e.data))return at(e),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(r))&&(!he[r]||ye[r])){if(!ye[r]&&mt(r)&&(S.tagNameCheck instanceof RegExp&&ao(S.tagNameCheck,r)||S.tagNameCheck instanceof Function&&S.tagNameCheck(r)))return!1;if(Ie&&!ze[r]){let t=v(e)||e.parentNode,n=ee(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return at(e),!0}return e instanceof c&&!O(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&ao(/<\/no(script|embed|frames)/i,e.innerHTML)?(at(e),!0):(Ee&&e.nodeType===Fo.text&&(n=e.textContent,qa([oe,se,ce],e=>{n=to(n,e,` `)}),e.textContent!==n&&(Xa(t.removed,{element:e.cloneNode()}),e.textContent=n)),dt(ae.afterSanitizeElements,e,null),!1)},pt=function(e,t,r){if(be[t]||Pe&&(t===`id`||t===`name`)&&(r in n||r in et))return!1;if(!(Ce&&!be[t]&&ao(le,t))&&!(Se&&ao(ue,t))&&!(xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e))){if(!_e[t]||be[t]){if(!(mt(e)&&(S.tagNameCheck instanceof RegExp&&ao(S.tagNameCheck,e)||S.tagNameCheck instanceof Function&&S.tagNameCheck(e))&&(S.attributeNameCheck instanceof RegExp&&ao(S.attributeNameCheck,t)||S.attributeNameCheck instanceof Function&&S.attributeNameCheck(t,e))||t===`is`&&S.allowCustomizedBuiltInElements&&(S.tagNameCheck instanceof RegExp&&ao(S.tagNameCheck,r)||S.tagNameCheck instanceof Function&&S.tagNameCheck(r))))return!1}else if(!Ue[t]&&!ao(me,to(r,fe,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&no(r,`data:`)===0&&Ve[e])&&!(we&&!ao(de,to(r,fe,``)))&&r)return!1}return!0},mt=function(e){return e!==`annotation-xml`&&eo(e,pe)},ht=function(e){dt(ae.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||lt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:_e,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=D(a),l=s,u=a===`value`?l:ro(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,dt(ae.uponSanitizeAttribute,e,r),u=r.attrValue,Fe&&(c===`id`||c===`name`)&&(ot(a,e),u=`user-content-`+u),De&&ao(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){ot(a,e);continue}if(c===`attributename`&&eo(u,`href`)){ot(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){ot(a,e);continue}if(!Te&&ao(/\/>/i,u)){ot(a,e);continue}Ee&&qa([oe,se,ce],e=>{u=to(u,e,` `)});let d=D(e.nodeName);if(!pt(d,c,u)){ot(a,e);continue}if(y&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=y.createHTML(u);break;case`TrustedScriptURL`:u=y.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),lt(e)?at(e):Ya(t.removed)}catch{ot(a,e)}}dt(ae.afterSanitizeAttributes,e,null)},gt=function e(t){let n=null,r=ct(t);for(dt(ae.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)dt(ae.uponSanitizeShadowNode,n,null),ft(n),ht(n),n.content instanceof a&&e(n.content);dt(ae.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(T=!e,T&&(e=`<!-->`),typeof e!=`string`&&!ut(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw oo(`dirty is not a string, aborting`)}else throw oo(`toString is not a function`);if(!t.isSupported)return e;if(ke||nt(n),t.removed=[],typeof e==`string`&&(Le=!1),Le){if(e.nodeName){let t=D(e.nodeName);if(!he[t]||ye[t])throw oo(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=st(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===Fo.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!je&&!Ee&&!Oe&&e.indexOf(`<`)===-1)return y&&Ne?y.createHTML(e):e;if(i=st(e),!i)return je?null:Ne?b:``}i&&Ae&&at(i.firstChild);let u=ct(Le?e:i);for(;c=u.nextNode();)ft(c),ht(c),c.content instanceof a&&gt(c.content);if(Le)return e;if(je){if(Me)for(l=ne.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(_e.shadowroot||_e.shadowrootmode)&&(l=ie.call(r,l,!0)),l}let d=Oe?i.outerHTML:i.innerHTML;return Oe&&he[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ao(Mo,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
18
- `+d),Ee&&qa([oe,se,ce],e=>{d=to(d,e,` `)}),y&&Ne?y.createHTML(d):d},t.setConfig=function(){nt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),ke=!0},t.clearConfig=function(){$e=null,ke=!1},t.isValidAttribute=function(e,t,n){return $e||nt({}),pt(D(e),D(t),n)},t.addHook=function(e,t){typeof t==`function`&&Xa(ae[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Ja(ae[e],t);return n===-1?void 0:Za(ae[e],n,1)[0]}return Ya(ae[e])},t.removeHooks=function(e){ae[e]=[]},t.removeAllHooks=function(){ae=Ro()},t}var Bo=zo();function Vo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ho=Vo();function Uo(e){Ho=e}var Wo={exec:()=>null};function B(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Go.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Go={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Ko=/^(?:[ \t]*(?:\n|$))+/,qo=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Jo=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Yo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xo=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zo=/(?:[*+-]|\d{1,9}[.)])/,Qo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$o=B(Qo).replace(/bull/g,Zo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),es=B(Qo).replace(/bull/g,Zo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ts=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ns=/^[^\n]+/,rs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,is=B(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,rs).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),as=B(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zo).getRegex(),os=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,ss=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,cs=B(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,ss).replace(`tag`,os).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ls=B(ts).replace(`hr`,Yo).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,os).getRegex(),us={blockquote:B(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,ls).getRegex(),code:qo,def:is,fences:Jo,heading:Xo,hr:Yo,html:cs,lheading:$o,list:as,newline:Ko,paragraph:ls,table:Wo,text:ns},ds=B(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Yo).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,os).getRegex(),fs={...us,lheading:es,table:ds,paragraph:B(ts).replace(`hr`,Yo).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,ds).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,os).getRegex()},ps={...us,html:B(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,ss).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Wo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:B(ts).replace(`hr`,Yo).replace(`heading`,` *#{1,6} *[^
19
- ]`).replace(`lheading`,$o).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},ms=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gs=/^( {2,}|\\)\n(?!\s*$)/,_s=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vs=/[\p{P}\p{S}]/u,ys=/[\s\p{P}\p{S}]/u,bs=/[^\s\p{P}\p{S}]/u,xs=B(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,ys).getRegex(),Ss=/(?!~)[\p{P}\p{S}]/u,Cs=/(?!~)[\s\p{P}\p{S}]/u,ws=/(?:[^\s\p{P}\p{S}]|~)/u,Ts=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Es=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ds=B(Es,`u`).replace(/punct/g,vs).getRegex(),Os=B(Es,`u`).replace(/punct/g,Ss).getRegex(),ks=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,As=B(ks,`gu`).replace(/notPunctSpace/g,bs).replace(/punctSpace/g,ys).replace(/punct/g,vs).getRegex(),js=B(ks,`gu`).replace(/notPunctSpace/g,ws).replace(/punctSpace/g,Cs).replace(/punct/g,Ss).getRegex(),Ms=B(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,bs).replace(/punctSpace/g,ys).replace(/punct/g,vs).getRegex(),Ns=B(/\\(punct)/,`gu`).replace(/punct/g,vs).getRegex(),Ps=B(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Fs=B(ss).replace(`(?:-->|$)`,`-->`).getRegex(),Is=B(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Fs).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ls=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Rs=B(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,Ls).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),zs=B(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Ls).replace(`ref`,rs).getRegex(),Bs=B(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,rs).getRegex(),Vs={_backpedal:Wo,anyPunctuation:Ns,autolink:Ps,blockSkip:Ts,br:gs,code:hs,del:Wo,emStrongLDelim:Ds,emStrongRDelimAst:As,emStrongRDelimUnd:Ms,escape:ms,link:Rs,nolink:Bs,punctuation:xs,reflink:zs,reflinkSearch:B(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,zs).replace(`nolink`,Bs).getRegex(),tag:Is,text:_s,url:Wo},Hs={...Vs,link:B(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Ls).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Ls).getRegex()},Us={...Vs,emStrongRDelimAst:js,emStrongLDelim:Os,url:B(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,`i`).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ws={...Us,br:B(gs).replace(`{2,}`,`*`).getRegex(),text:B(Us.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Gs={normal:us,gfm:fs,pedantic:ps},Ks={normal:Vs,gfm:Us,breaks:Ws,pedantic:Hs},qs={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Js=e=>qs[e];function Ys(e,t){if(t){if(Go.escapeTest.test(e))return e.replace(Go.escapeReplace,Js)}else if(Go.escapeTestNoEncode.test(e))return e.replace(Go.escapeReplaceNoEncode,Js);return e}function Xs(e){try{e=encodeURI(e).replace(Go.percentDecode,`%`)}catch{return null}return e}function Zs(e,t){let n=e.replace(Go.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Go.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(Go.slashPipe,`|`);return n}function Qs(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function $s(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function ec(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function tc(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
20
- `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
21
- `)}var nc=class{options;rules;lexer;constructor(e){this.options=e||Ho}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Qs(e,`
22
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=tc(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Qs(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Qs(t[0],`
23
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Qs(t[0],`
24
- `).split(`
25
- `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
26
- `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
27
- $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
28
- ${s}`:s,r=r?`${r}
29
- ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
30
- `+e.join(`
31
- `),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
32
- `+e.join(`
33
- `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
34
- `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
35
- `,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(`
36
- `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
37
- `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(`
38
- `,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
39
- `+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
40
- `+l}!u&&!l.trim()&&(u=!0),r+=f+`
41
- `,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Zs(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
42
- `):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Zs(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
43
- `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Qs(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=$s(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),ec(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return ec(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&!(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},rc=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ho,this.options.tokenizer=this.options.tokenizer||new nc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Go,block:Gs.normal,inline:Ks.normal};this.options.pedantic?(t.block=Gs.pedantic,t.inline=Ks.pedantic):this.options.gfm&&(t.block=Gs.gfm,this.options.breaks?t.inline=Ks.breaks:t.inline=Ks.gfm),this.tokenizer.rules=t}static get rules(){return{block:Gs,inline:Ks}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Go.carriageReturn,`
44
- `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(Go.tabCharGlobal,` `).replace(Go.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
45
- `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=`
46
- `+r.raw,n.text+=`
47
- `+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=`
48
- `+r.raw,n.text+=`
49
- `+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=`
50
- `+r.raw,a.text+=`
51
- `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=`
52
- `+r.raw,n.text+=`
53
- `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a=``;for(;e;){i||(a=``),i=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,a)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(a=r.raw.slice(-1)),i=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},ic=class{options;parser;constructor(e){this.options=e||Ho}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Go.notSpaceStart)?.[0],i=e.replace(Go.endingNewline,``)+`
54
- `;return r?`<pre><code class="language-`+Ys(r)+`">`+(n?i:Ys(i,!0))+`</code></pre>
55
- `:`<pre><code>`+(n?i:Ys(i,!0))+`</code></pre>
56
- `}blockquote({tokens:e}){return`<blockquote>
57
- ${this.parser.parse(e)}</blockquote>
58
- `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
59
- `}hr(e){return`<hr>
60
- `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
61
- `+r+`</`+i+`>
62
- `}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+Ys(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
63
- `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
64
- `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
65
- <thead>
66
- `+t+`</thead>
67
- `+r+`</table>
68
- `}tablerow({text:e}){return`<tr>
69
- ${e}</tr>
70
- `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
71
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ys(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Xs(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Ys(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Xs(e);if(i===null)return Ys(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Ys(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Ys(e.text)}},ac=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},oc=class e{options;renderer;textRenderer;constructor(e){this.options=e||Ho,this.options.renderer=this.options.renderer||new ic,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ac}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=`
72
- `+this.renderer.text(i);t?n+=this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):n+=o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},sc=class{options;block;constructor(e){this.options=e||Ho}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?rc.lex:rc.lexInline}provideParser(){return this.block?oc.parse:oc.parseInline}},cc=class{defaults=Vo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=oc;Renderer=ic;TextRenderer=ac;Lexer=rc;Tokenizer=nc;Hooks=sc;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new ic(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new nc(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new sc;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];sc.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>a.call(t,e));let n=i.call(t,e);return a.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return rc.lex(e,t??this.defaults)}parser(e,t){return oc.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(t==null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?rc.lex:rc.lexInline,s=i.hooks?i.hooks.provideParser():e?oc.parse:oc.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>o(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
73
- Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Ys(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},lc=new cc;function V(e,t){return lc.parse(e,t)}V.options=V.setOptions=function(e){return lc.setOptions(e),V.defaults=lc.defaults,Uo(V.defaults),V},V.getDefaults=Vo,V.defaults=Ho,V.use=function(...e){return lc.use(...e),V.defaults=lc.defaults,Uo(V.defaults),V},V.walkTokens=function(e,t){return lc.walkTokens(e,t)},V.parseInline=lc.parseInline,V.Parser=oc,V.parser=oc.parse,V.Renderer=ic,V.TextRenderer=ac,V.Lexer=rc,V.lexer=rc.lex,V.Tokenizer=nc,V.Hooks=sc,V.parse=V,V.options,V.setOptions,V.use,V.walkTokens,V.parseInline,oc.parse,rc.lex;var uc=e=>(Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t];n&&typeof n==`object`&&uc(n)}),Object.freeze(e)),dc=uc({all:[],used:[],unused:[]}),fc=(e,t)=>{let n=Bo(e);return n.addHook(`uponSanitizeElement`,function(e,t){let n=t.tagName||e.nodeName.toLowerCase();n.startsWith(`liipgpt-`)&&(t.allowedTags[n]=!0)}),n.addHook(`afterSanitizeAttributes`,function(e){if(e.tagName!==`A`||!e.getAttribute(`href`)?.startsWith(`http`)||(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`),!t||e.querySelector(`.sr-only`)))return;let n=e.ownerDocument.createElement(`span`);n.className=`sr-only`,n.textContent=` ${t}`,e.appendChild(n)}),n},pc=class{marked;currentReferences=dc;lastUsedIndex=0;DomPurity;constructor(e={}){this.marked=new cc({async:!1,breaks:!0}).use(this.createFootnoteExtension(),...e.extensions??[]),this.DomPurity=fc(e.window,e.newTabSrText)}createFootnoteExtension=()=>{let e=this;return{extensions:[{name:`footnote`,level:`inline`,start(e){return e.match(/\[\^(\d+)\]/)?.index},tokenizer(e){let t=/^\[\^(\d+)\]/.exec(e);if(t){let[e,n]=t;return{type:`footnote`,raw:e,refNumber:n}}},renderer(t){if(t.type===`footnote`){let n=parseInt(t.refNumber)-1,r=e.currentReferences.all[n];if(!r)return console.error(`Could not find ref with index:`,n),``;let i;return r?.referenceIndex.used?i=r.referenceIndex.used:(e.currentReferences.used.push(r),e.lastUsedIndex++,i=e.lastUsedIndex,r.referenceIndex.used=i),` <liipgpt-reference-number data-all-index="${n}" data-used-index="${i}" data-source="${JSON.stringify(r).replace(/"/g,`&quot;`)}"></liipgpt-reference-number>`}}}]}};parse(e){return this.DomPurity.sanitize(this.marked.parse(e),{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0,mathMl:!0},FORBID_TAGS:[`hr`],ADD_ATTR:[`target`]})}toHTML(e,t){this.currentReferences=t;let n=this.parse(e);return this.currentReferences=dc,n}};function mc(){let e,t;return{promise:new Promise((n,r)=>{t=n,e=r}),reject:e,resolve:t}}var hc=class{promise;resolve;reject;constructor(){let{promise:e,resolve:t,reject:n}=mc();this.promise=e,this.resolve=t,this.reject=n}then(e,t){return this.promise.then(e,t)}catch(e){return this.promise.catch(e)}finally(e){return this.promise.finally(e)}toPromise(){return this.promise}[Symbol.toStringTag]=`Flag`},gc=class{hasValue=new hc;currentValue;setValue(e){this.currentValue=e,this.hasValue.resolve()}cleanup(e){this.hasValue.reject(e)}getCurrentValue(){return this.currentValue}async toPromise(){return await this.hasValue,this.currentValue}then(e,t){return this.toPromise().then(e,t)}catch(e){return this.toPromise().catch(e)}finally(e){return this.toPromise().finally(e)}[Symbol.toStringTag]=`FutureValue`},_c=e=>{try{return new URL(e).hostname}catch{return e}};function vc(e){return e.replace(/<[^>]*>/g,``).replace(/&nbsp;/g,` `).replace(/&amp;/g,`&`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).replace(/&quot;/g,`"`)}var yc=({url:e,considered:t,title:n,description:r,summary:i})=>{let a=_c(e);return{url:e,considered:t,referenceIndex:{},score:0,metadata:{},display:{card:{title:n,description:r||i,badge:e},listItem:{title:n,badge:a}}}},bc=class{store;content=new gc;backendSendsMappedRefs=!1;constructor(e){this.options=e,this.store=xt({id:e.id,state:`loading`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:``,html:``,text:``},references:{all:[],used:[],unused:[]},retrievalQuestion:e.userQuestion})}pushError(e){this.options.onError?.(e),this.store.update(t=>({...t,errors:[...t.errors,e]}))}updateRequestId(e){this.store.update(t=>({...t,id:e}))}updateText(e){this.store.update(t=>{let n=t.message.markdown+e,r=this.options.markdownRenderer.toHTML(n,t.references);return{...t,state:`streaming`,message:{markdown:n,html:r,text:``}}})}finishMessage(){this.store.update(e=>{let t={...e,state:`done`};return t.references.unused=t.references.all.filter(e=>e.referenceIndex.used===void 0),t.message.text=vc(t.message.html),this.options?.onFinish?.(t),this.content.setValue(t),t})}addReference(e){this.store.update(t=>{let n=t.references.all,r=n.length,i=[...n,{...e,referenceIndex:{all:r}}];return{...t,references:{used:t.references.used,all:i}}})}addMappedReference(e){this.backendSendsMappedRefs=!0,this.addReference(e)}addOldReference(e){this.backendSendsMappedRefs||this.addReference(yc(e))}updateRetrievalQuestion(e){this.store.update(t=>({...t,retrievalQuestion:e}))}setNoFeedback(){this.store.update(e=>({...e,noFeedback:!0}))}getReadableStore(){return{subscribe:this.store.subscribe}}getPromise(){return this.content.toPromise()}};Object.freeze({status:`aborted`});function H(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var xc=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Sc=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},Cc={};function wc(e){return e&&Object.assign(Cc,e),Cc}function Tc(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Ec(e,t){return typeof t==`bigint`?t.toString():t}function Dc(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function Oc(e){return e==null}function kc(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ac(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var jc=Symbol(`evaluating`);function U(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==jc)return r===void 0&&(r=jc,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Mc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Nc(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Pc(e){return JSON.stringify(e)}function Fc(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Ic=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Lc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Rc=Dc(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function zc(e){if(Lc(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Lc(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Bc(e){return zc(e)?{...e}:Array.isArray(e)?[...e]:e}var Vc=new Set([`string`,`number`,`symbol`]);function Hc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Uc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function W(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Wc(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Gc={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Kc(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Uc(e,Nc(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Mc(this,`shape`,e),e},checks:[]}))}function qc(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Uc(e,Nc(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Mc(this,`shape`,r),r},checks:[]}))}function Jc(e,t){if(!zc(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Uc(e,Nc(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Mc(this,`shape`,n),n}}))}function Yc(e,t){if(!zc(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Uc(e,Nc(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Mc(this,`shape`,n),n}}))}function Xc(e,t){return Uc(e,Nc(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Mc(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Zc(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Uc(t,Nc(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Mc(this,`shape`,i),i},checks:[]}))}function Qc(e,t,n){return Uc(t,Nc(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Mc(this,`shape`,i),i}}))}function $c(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function el(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function tl(e){return typeof e==`string`?e:e?.message}function nl(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=tl(e.inst?._zod.def?.error?.(e))??tl(t?.error?.(e))??tl(n.customError?.(e))??tl(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function rl(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function il(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var al=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ec,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},ol=H(`$ZodError`,al),sl=H(`$ZodError`,al,{Parent:Error});function cl(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ll(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var ul=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new xc;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>nl(e,a,wc())));throw Ic(t,i?.callee),t}return o.value},dl=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>nl(e,a,wc())));throw Ic(t,i?.callee),t}return o.value},fl=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new xc;return a.issues.length?{success:!1,error:new(e??ol)(a.issues.map(e=>nl(e,i,wc())))}:{success:!0,data:a.value}},pl=fl(sl),ml=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>nl(e,i,wc())))}:{success:!0,data:a.value}},hl=ml(sl),gl=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ul(e)(t,n,i)},_l=e=>(t,n,r)=>ul(e)(t,n,r),vl=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return dl(e)(t,n,i)},yl=e=>async(t,n,r)=>dl(e)(t,n,r),bl=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return fl(e)(t,n,i)},xl=e=>(t,n,r)=>fl(e)(t,n,r),Sl=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ml(e)(t,n,i)},Cl=e=>async(t,n,r)=>ml(e)(t,n,r),wl=/^[cC][^\s-]{8,}$/,Tl=/^[0-9a-z]+$/,El=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Dl=/^[0-9a-vA-V]{20}$/,Ol=/^[A-Za-z0-9]{27}$/,kl=/^[a-zA-Z0-9_-]{21}$/,Al=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jl=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ml=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Nl=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Pl=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Fl(){return new RegExp(Pl,`u`)}var Il=/^(?:(?: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])$/,Ll=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Rl=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,zl=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Bl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Vl=/^[A-Za-z0-9_-]*$/,Hl=/^\+[1-9]\d{6,14}$/,Ul=`(?:(?:\\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])))`,Wl=RegExp(`^${Ul}$`);function Gl(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kl(e){return RegExp(`^${Gl(e)}$`)}function ql(e){let t=Gl({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Ul}T(?:${r})$`)}var Jl=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Yl=/^-?\d+$/,Xl=/^-?\d+(?:\.\d+)?$/,Zl=/^(?:true|false)$/i,Ql=/^[^A-Z]*$/,$l=/^[^a-z]*$/,eu=H(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),tu={number:`number`,bigint:`bigint`,object:`date`},nu=H(`$ZodCheckLessThan`,(e,t)=>{eu.init(e,t);let n=tu[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ru=H(`$ZodCheckGreaterThan`,(e,t)=>{eu.init(e,t);let n=tu[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),iu=H(`$ZodCheckMultipleOf`,(e,t)=>{eu.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Ac(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),au=H(`$ZodCheckNumberFormat`,(e,t)=>{eu.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Gc[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Yl)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ou=H(`$ZodCheckMaxLength`,(e,t)=>{var n;eu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Oc(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=rl(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),su=H(`$ZodCheckMinLength`,(e,t)=>{var n;eu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Oc(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=rl(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),cu=H(`$ZodCheckLengthEquals`,(e,t)=>{var n;eu.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Oc(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=rl(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),lu=H(`$ZodCheckStringFormat`,(e,t)=>{var n,r;eu.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),uu=H(`$ZodCheckRegex`,(e,t)=>{lu.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),du=H(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Ql,lu.init(e,t)}),fu=H(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=$l,lu.init(e,t)}),pu=H(`$ZodCheckIncludes`,(e,t)=>{eu.init(e,t);let n=Hc(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),mu=H(`$ZodCheckStartsWith`,(e,t)=>{eu.init(e,t);let n=RegExp(`^${Hc(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hu=H(`$ZodCheckEndsWith`,(e,t)=>{eu.init(e,t);let n=RegExp(`.*${Hc(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),gu=H(`$ZodCheckOverwrite`,(e,t)=>{eu.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),_u=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
16
+ sans-serif;}.error-message__retry-button.svelte-14mj70v {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function Ma(e,t){ot(t,!0),Ri(e,ja);let n=(e,t=se,n=se)=>{Ze();var r=Aa(),a=Tn(r),o=En(a),s=e=>{},c=e=>{var t=ka(),r=wn(t),i=En(wn(r));Xe(r),Xe(t),Hr(`click`,i,()=>n()()),I(e,t)};wi(o,e=>{i()?e(s):e(c,-1)}),qn(e=>ci(a,`${e??``} `),[()=>console.error(`Panic, uncaught error:
17
+ `,t())??``]),I(e,r)},r=L(t,`body`,7),i=L(t,`silent`,7),a=A(void 0),o=e=>{j(a,{error:e},!0)};var s={get body(){return r()},set body(e){r(e),O()},get silent(){return i()},set silent(e){i(e),O()}},c=Zr();return Ht(Tn(c),{get failed(){return n}},e=>{var t=Zr(),i=Tn(t),s=e=>{n(e,()=>F(a).error,()=>()=>{j(a,void 0)})},c=e=>{var t=Zr();gi(Tn(t),r,()=>o),I(e,t)};wi(i,e=>{F(a)?e(s):e(c,-1)}),I(e,t)}),I(e,c),st(s)}Ur([`click`]),Oa(Ma,{body:{},silent:{}},[],[],{mode:`open`});var Na={de:{aborted:`Verbindung zum Server wurde unerwartet unterbrochen. Bitte versuchen Sie es erneut.`,"client-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,"server-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,"sse-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,blocked:`Ihre Anfrage wurde blockiert.`,"pii-detected":`Es wurden persönliche Daten erkannt. Bitte entfernen Sie diese und versuchen Sie es erneut.`,"incomplete-error":`Ein unbekannter Fehler ist aufgetreten. Die Antwort könnte unvollständig sein.`,"unexpected-call":`Ein unbekannter Fehler ist aufgetreten. Die Antwort könnte unvollständig sein.`,"quota-reached":`Kontingent überschritten. Bitte versuchen Sie es später erneut.`,"rate-limit":`Kontingent überschritten. Bitte versuchen Sie es später erneut.`,maintenance:`Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.`,"too-long":`Ihre Frage war zu lang, versuchen Sie es mit einer Kürzeren.`,"too-short":`Ihre Frage war zu kurz, versuchen Sie es mit einer Längeren.`,"feedback-failed":`Feedback senden fehlgeschlagen. Bitte versuchen Sie es erneut.`,"answer-form-failed":`Formular konnte nicht gesendet werden. Bitte versuchen Sie es erneut.`,"speech-not-supported":`Spracherkennung wird nicht unterstützt.`,"speech-transcription-failed":`Sprachtranskription fehlgeschlagen.`,"speech-no-text-detected":`Kein Text in der Spracheingabe erkannt.`,"speech-microphone-access-denied":`Mikrofonzugriff verweigert.`},en:{aborted:`Connection to the server was unexpectedly interrupted. Please try again.`,"client-error":`An unknown error has occurred. Please try again.`,"server-error":`An unknown error has occurred. Please try again.`,"sse-error":`An unknown error has occurred. Please try again.`,blocked:`Your request has been blocked.`,"pii-detected":`Personal data has been detected. Please remove it and try again.`,"incomplete-error":`An unknown error has occurred. The response might be incomplete.`,"unexpected-call":`An unknown error has occurred. The response might be incomplete.`,"quota-reached":`Quota exceeded. Please try again later.`,"rate-limit":`Quota exceeded. Please try again later.`,maintenance:`The chat is currently unavailable. Please try again later.`,"too-long":`Your question was too long, try a shorter one.`,"too-short":`Your question was too short, try a longer one.`,"feedback-failed":`Failed to send feedback. Please try again.`,"answer-form-failed":`Failed to send the form. Please try again.`,"speech-not-supported":`Speech recognition is not supported.`,"speech-transcription-failed":`Speech transcription failed.`,"speech-no-text-detected":`No text detected in speech input.`,"speech-microphone-access-denied":`Microphone access denied.`},it:{aborted:`La connessione al server è stata interrotta inaspettatamente. Si prega di riprovare.`,"client-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,"server-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,"sse-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,blocked:`La tua richiesta è stata bloccata.`,"pii-detected":`Sono stati rilevati dati personali. Si prega di rimuoverli e riprovare.`,"incomplete-error":`Si è verificato un errore sconosciuto. La risposta potrebbe essere incompleta.`,"unexpected-call":`Si è verificato un errore sconosciuto. La risposta potrebbe essere incompleta.`,"quota-reached":`Quota superata. Si prega di riprovare più tardi.`,"rate-limit":`Quota superata. Si prega di riprovare più tardi.`,maintenance:`La chat non è attualmente disponibile. Si prega di riprovare più tardi.`,"too-long":`La tua domanda era troppo lunga, prova con una più breve.`,"too-short":`La tua domanda era troppo breve, prova con una più lunga.`,"feedback-failed":`Invio del feedback non riuscito. Si prega di riprovare.`,"answer-form-failed":`Invio del modulo non riuscito. Si prega di riprovare.`,"speech-not-supported":`Il riconoscimento vocale non è supportato.`,"speech-transcription-failed":`Trascrizione vocale fallita.`,"speech-no-text-detected":`Nessun testo rilevato nell'input vocale.`,"speech-microphone-access-denied":`Accesso al microfono negato.`},fr:{aborted:`La connexion au serveur a été interrompue de façon inattendue. Veuillez réessayer.`,"client-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"server-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"sse-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"pii-detected":`Des données personnelles ont été détectées. Veuillez les supprimer et réessayer.`,blocked:`Votre demande a été bloquée.`,"incomplete-error":`Une erreur inconnue s'est produite. La réponse pourrait être incomplète.`,"unexpected-call":`Une erreur inconnue s'est produite. La réponse pourrait être incomplète.`,"quota-reached":`Quota dépassé. Veuillez réessayer plus tard.`,"rate-limit":`Quota dépassé. Veuillez réessayer plus tard.`,maintenance:`Le chat est actuellement indisponible. Veuillez réessayer plus tard.`,"too-long":`Votre question était trop longue, essayez d'en poser une plus courte.`,"too-short":`Votre question était trop courte, essayez d'en poser une plus longue.`,"feedback-failed":`Échec de l'envoi du feedback. Veuillez réessayer.`,"answer-form-failed":`Échec de l'envoi du formulaire. Veuillez réessayer.`,"speech-not-supported":`La reconnaissance vocale n'est pas prise en charge.`,"speech-transcription-failed":`Échec de la transcription vocale.`,"speech-no-text-detected":`Aucun texte détecté dans l'entrée vocale.`,"speech-microphone-access-denied":`Accès au microphone refusé.`}},Pa={de:{email:`Bitte keine E-Mail Adressen eingeben`,creditCard:`Bitte keine Kreditkarteninformationen eingeben`,ahv:`Bitte keine AHV-Nummern eingeben`,phoneSwiss:`Bitte keine Telefonnummern eingeben`,phoneInternational:`Bitte keine Telefonnummern eingeben`,swissPassport:`Bitte keine Passinformationen eingeben`,longNumber:`Bitte keine langen Nummern eingeben`},en:{email:`Please do not enter email addresses`,creditCard:`Please do not enter credit card information`,ahv:`Please do not enter AHV numbers`,phoneSwiss:`Please do not enter phone numbers`,phoneInternational:`Please do not enter phone numbers`,swissPassport:`Please do not enter passport information`,longNumber:`Please do not enter long numbers`},it:{email:`Si prega di non inserire indirizzi email`,creditCard:`Si prega di non inserire informazioni sulla carta di credito`,ahv:`Si prega di non inserire numeri AVS`,phoneSwiss:`Si prega di non inserire numeri di telefono`,phoneInternational:`Si prega di non inserire numeri di telefono`,swissPassport:`Si prega di non inserire informazioni sul passaporto`,longNumber:`Si prega di non inserire numeri lunghi`},fr:{email:`Veuillez ne pas saisir d'adresses e-mail`,creditCard:`Veuillez ne pas saisir d'informations de carte de crédit`,ahv:`Veuillez ne pas saisir de numéros AVS`,phoneSwiss:`Veuillez ne pas saisir de numéros de téléphone`,phoneInternational:`Veuillez ne pas saisir de numéros de téléphone`,swissPassport:`Veuillez ne pas saisir d'informations de passeport`,longNumber:`Veuillez ne pas saisir de longs numéros`}};Object.freeze({status:`aborted`});function R(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var Fa=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ia=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},La={};function Ra(e){return e&&Object.assign(La,e),La}function za(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Ba(e,t){return typeof t==`bigint`?t.toString():t}function Va(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function Ha(e){return e==null}function Ua(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Wa(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var Ga=Symbol(`evaluating`);function z(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ga)return r===void 0&&(r=Ga,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ka(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qa(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Ja(e){return JSON.stringify(e)}function Ya(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Xa=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Za(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Qa=Va(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function $a(e){if(Za(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Za(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function eo(e){return $a(e)?{...e}:Array.isArray(e)?[...e]:e}var to=new Set([`string`,`number`,`symbol`]);function no(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ro(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function B(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function io(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ao={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function oo(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return ro(e,qa(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Ka(this,`shape`,e),e},checks:[]}))}function so(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return ro(e,qa(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Ka(this,`shape`,r),r},checks:[]}))}function co(e,t){if(!$a(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ro(e,qa(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ka(this,`shape`,n),n}}))}function lo(e,t){if(!$a(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ro(e,qa(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ka(this,`shape`,n),n}}))}function uo(e,t){return ro(e,qa(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Ka(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function fo(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return ro(t,qa(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Ka(this,`shape`,i),i},checks:[]}))}function po(e,t,n){return ro(t,qa(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Ka(this,`shape`,i),i}}))}function mo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ho(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function go(e){return typeof e==`string`?e:e?.message}function _o(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=go(e.inst?._zod.def?.error?.(e))??go(t?.error?.(e))??go(n.customError?.(e))??go(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function vo(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function yo(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var bo=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ba,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},xo=R(`$ZodError`,bo),So=R(`$ZodError`,bo,{Parent:Error});function Co(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function wo(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var To=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Fa;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>_o(e,a,Ra())));throw Xa(t,i?.callee),t}return o.value},Eo=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>_o(e,a,Ra())));throw Xa(t,i?.callee),t}return o.value},Do=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Fa;return a.issues.length?{success:!1,error:new(e??xo)(a.issues.map(e=>_o(e,i,Ra())))}:{success:!0,data:a.value}},Oo=Do(So),ko=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>_o(e,i,Ra())))}:{success:!0,data:a.value}},Ao=ko(So),jo=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return To(e)(t,n,i)},Mo=e=>(t,n,r)=>To(e)(t,n,r),No=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Eo(e)(t,n,i)},Po=e=>async(t,n,r)=>Eo(e)(t,n,r),Fo=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Do(e)(t,n,i)},Io=e=>(t,n,r)=>Do(e)(t,n,r),Lo=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ko(e)(t,n,i)},Ro=e=>async(t,n,r)=>ko(e)(t,n,r),zo=/^[cC][^\s-]{8,}$/,Bo=/^[0-9a-z]+$/,Vo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ho=/^[0-9a-vA-V]{20}$/,Uo=/^[A-Za-z0-9]{27}$/,Wo=/^[a-zA-Z0-9_-]{21}$/,Go=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ko=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,qo=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Jo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Yo=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Xo(){return new RegExp(Yo,`u`)}var Zo=/^(?:(?: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])$/,Qo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$o=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,es=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ts=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ns=/^[A-Za-z0-9_-]*$/,rs=/^\+[1-9]\d{6,14}$/,is=`(?:(?:\\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])))`,as=RegExp(`^${is}$`);function os(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ss(e){return RegExp(`^${os(e)}$`)}function cs(e){let t=os({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${is}T(?:${r})$`)}var ls=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},us=/^-?\d+$/,ds=/^-?\d+(?:\.\d+)?$/,fs=/^(?:true|false)$/i,ps=/^[^A-Z]*$/,ms=/^[^a-z]*$/,hs=R(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gs={number:`number`,bigint:`bigint`,object:`date`},_s=R(`$ZodCheckLessThan`,(e,t)=>{hs.init(e,t);let n=gs[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vs=R(`$ZodCheckGreaterThan`,(e,t)=>{hs.init(e,t);let n=gs[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ys=R(`$ZodCheckMultipleOf`,(e,t)=>{hs.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Wa(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),bs=R(`$ZodCheckNumberFormat`,(e,t)=>{hs.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ao[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=us)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),xs=R(`$ZodCheckMaxLength`,(e,t)=>{var n;hs.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ha(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=vo(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ss=R(`$ZodCheckMinLength`,(e,t)=>{var n;hs.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ha(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=vo(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cs=R(`$ZodCheckLengthEquals`,(e,t)=>{var n;hs.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ha(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=vo(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ws=R(`$ZodCheckStringFormat`,(e,t)=>{var n,r;hs.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ts=R(`$ZodCheckRegex`,(e,t)=>{ws.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Es=R(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ps,ws.init(e,t)}),Ds=R(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ms,ws.init(e,t)}),Os=R(`$ZodCheckIncludes`,(e,t)=>{hs.init(e,t);let n=no(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ks=R(`$ZodCheckStartsWith`,(e,t)=>{hs.init(e,t);let n=RegExp(`^${no(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),As=R(`$ZodCheckEndsWith`,(e,t)=>{hs.init(e,t);let n=RegExp(`.*${no(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),js=R(`$ZodCheckOverwrite`,(e,t)=>{hs.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Ms=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
74
18
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
75
- `))}},vu={major:4,minor:3,patch:6},G=H(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=vu;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=$c(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new xc;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=$c(e,t))});else{if(e.issues.length===t)continue;r||=$c(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if($c(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new xc;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new xc;return o.then(e=>t(e,r,a))}return t(o,r,a)}}U(e,`~standard`,()=>({validate:t=>{try{let n=pl(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return hl(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),yu=H(`$ZodString`,(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Jl(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),K=H(`$ZodStringFormat`,(e,t)=>{lu.init(e,t),yu.init(e,t)}),bu=H(`$ZodGUID`,(e,t)=>{t.pattern??=jl,K.init(e,t)}),xu=H(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ml(e)}else t.pattern??=Ml();K.init(e,t)}),Su=H(`$ZodEmail`,(e,t)=>{t.pattern??=Nl,K.init(e,t)}),Cu=H(`$ZodURL`,(e,t)=>{K.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),wu=H(`$ZodEmoji`,(e,t)=>{t.pattern??=Fl(),K.init(e,t)}),Tu=H(`$ZodNanoID`,(e,t)=>{t.pattern??=kl,K.init(e,t)}),Eu=H(`$ZodCUID`,(e,t)=>{t.pattern??=wl,K.init(e,t)}),Du=H(`$ZodCUID2`,(e,t)=>{t.pattern??=Tl,K.init(e,t)}),Ou=H(`$ZodULID`,(e,t)=>{t.pattern??=El,K.init(e,t)}),ku=H(`$ZodXID`,(e,t)=>{t.pattern??=Dl,K.init(e,t)}),Au=H(`$ZodKSUID`,(e,t)=>{t.pattern??=Ol,K.init(e,t)}),ju=H(`$ZodISODateTime`,(e,t)=>{t.pattern??=ql(t),K.init(e,t)}),Mu=H(`$ZodISODate`,(e,t)=>{t.pattern??=Wl,K.init(e,t)}),Nu=H(`$ZodISOTime`,(e,t)=>{t.pattern??=Kl(t),K.init(e,t)}),Pu=H(`$ZodISODuration`,(e,t)=>{t.pattern??=Al,K.init(e,t)}),Fu=H(`$ZodIPv4`,(e,t)=>{t.pattern??=Il,K.init(e,t),e._zod.bag.format=`ipv4`}),Iu=H(`$ZodIPv6`,(e,t)=>{t.pattern??=Ll,K.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Lu=H(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Rl,K.init(e,t)}),Ru=H(`$ZodCIDRv6`,(e,t)=>{t.pattern??=zl,K.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function zu(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Bu=H(`$ZodBase64`,(e,t)=>{t.pattern??=Bl,K.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{zu(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Vu(e){if(!Vl.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return zu(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Hu=H(`$ZodBase64URL`,(e,t)=>{t.pattern??=Vl,K.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Vu(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Uu=H(`$ZodE164`,(e,t)=>{t.pattern??=Hl,K.init(e,t)});function Wu(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Gu=H(`$ZodJWT`,(e,t)=>{K.init(e,t),e._zod.check=n=>{Wu(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Ku=H(`$ZodNumber`,(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??Xl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),qu=H(`$ZodNumberFormat`,(e,t)=>{au.init(e,t),Ku.init(e,t)}),Ju=H(`$ZodBoolean`,(e,t)=>{G.init(e,t),e._zod.pattern=Zl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Yu=H(`$ZodUnknown`,(e,t)=>{G.init(e,t),e._zod.parse=e=>e}),Xu=H(`$ZodNever`,(e,t)=>{G.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Zu(e,t,n){e.issues.length&&t.issues.push(...el(n,e.issues)),t.value[n]=e.value}var Qu=H(`$ZodArray`,(e,t)=>{G.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Zu(t,n,e))):Zu(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function $u(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...el(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function ed(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Wc(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function td(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>$u(e,n,i,t,u))):$u(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var nd=H(`$ZodObject`,(e,t)=>{if(G.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=Dc(()=>ed(t));U(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Lc,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>$u(n,t,e,s,r))):$u(i,t,e,s,r)}return i?td(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),rd=H(`$ZodObjectJIT`,(e,t)=>{nd.init(e,t);let n=e._zod.parse,r=Dc(()=>ed(t)),i=e=>{let t=new _u([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Pc(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Pc(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
19
+ `))}},Ns={major:4,minor:3,patch:6},V=R(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ns;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=mo(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Fa;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=mo(e,t))});else{if(e.issues.length===t)continue;r||=mo(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(mo(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Fa;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Fa;return o.then(e=>t(e,r,a))}return t(o,r,a)}}z(e,`~standard`,()=>({validate:t=>{try{let n=Oo(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ao(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ps=R(`$ZodString`,(e,t)=>{V.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ls(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),H=R(`$ZodStringFormat`,(e,t)=>{ws.init(e,t),Ps.init(e,t)}),Fs=R(`$ZodGUID`,(e,t)=>{t.pattern??=Ko,H.init(e,t)}),Is=R(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=qo(e)}else t.pattern??=qo();H.init(e,t)}),Ls=R(`$ZodEmail`,(e,t)=>{t.pattern??=Jo,H.init(e,t)}),Rs=R(`$ZodURL`,(e,t)=>{H.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),zs=R(`$ZodEmoji`,(e,t)=>{t.pattern??=Xo(),H.init(e,t)}),Bs=R(`$ZodNanoID`,(e,t)=>{t.pattern??=Wo,H.init(e,t)}),Vs=R(`$ZodCUID`,(e,t)=>{t.pattern??=zo,H.init(e,t)}),Hs=R(`$ZodCUID2`,(e,t)=>{t.pattern??=Bo,H.init(e,t)}),Us=R(`$ZodULID`,(e,t)=>{t.pattern??=Vo,H.init(e,t)}),Ws=R(`$ZodXID`,(e,t)=>{t.pattern??=Ho,H.init(e,t)}),Gs=R(`$ZodKSUID`,(e,t)=>{t.pattern??=Uo,H.init(e,t)}),Ks=R(`$ZodISODateTime`,(e,t)=>{t.pattern??=cs(t),H.init(e,t)}),qs=R(`$ZodISODate`,(e,t)=>{t.pattern??=as,H.init(e,t)}),Js=R(`$ZodISOTime`,(e,t)=>{t.pattern??=ss(t),H.init(e,t)}),Ys=R(`$ZodISODuration`,(e,t)=>{t.pattern??=Go,H.init(e,t)}),Xs=R(`$ZodIPv4`,(e,t)=>{t.pattern??=Zo,H.init(e,t),e._zod.bag.format=`ipv4`}),Zs=R(`$ZodIPv6`,(e,t)=>{t.pattern??=Qo,H.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Qs=R(`$ZodCIDRv4`,(e,t)=>{t.pattern??=$o,H.init(e,t)}),$s=R(`$ZodCIDRv6`,(e,t)=>{t.pattern??=es,H.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function ec(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var tc=R(`$ZodBase64`,(e,t)=>{t.pattern??=ts,H.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{ec(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function nc(e){if(!ns.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return ec(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var rc=R(`$ZodBase64URL`,(e,t)=>{t.pattern??=ns,H.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{nc(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ic=R(`$ZodE164`,(e,t)=>{t.pattern??=rs,H.init(e,t)});function ac(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var oc=R(`$ZodJWT`,(e,t)=>{H.init(e,t),e._zod.check=n=>{ac(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),sc=R(`$ZodNumber`,(e,t)=>{V.init(e,t),e._zod.pattern=e._zod.bag.pattern??ds,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),cc=R(`$ZodNumberFormat`,(e,t)=>{bs.init(e,t),sc.init(e,t)}),lc=R(`$ZodBoolean`,(e,t)=>{V.init(e,t),e._zod.pattern=fs,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),uc=R(`$ZodUnknown`,(e,t)=>{V.init(e,t),e._zod.parse=e=>e}),dc=R(`$ZodNever`,(e,t)=>{V.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function fc(e,t,n){e.issues.length&&t.issues.push(...ho(n,e.issues)),t.value[n]=e.value}var pc=R(`$ZodArray`,(e,t)=>{V.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>fc(t,n,e))):fc(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function mc(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...ho(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function hc(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=io(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function gc(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>mc(e,n,i,t,u))):mc(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var _c=R(`$ZodObject`,(e,t)=>{if(V.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=Va(()=>hc(t));z(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Za,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>mc(n,t,e,s,r))):mc(i,t,e,s,r)}return i?gc(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),vc=R(`$ZodObjectJIT`,(e,t)=>{_c.init(e,t);let n=e._zod.parse,r=Va(()=>hc(t)),i=e=>{let t=new Ms([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Ja(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Ja(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
76
20
  if (${n}.issues.length) {
77
21
  if (${o} in input) {
78
22
  payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
@@ -106,13 +50,9 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
106
50
  newResult[${o}] = ${n}.value;
107
51
  }
108
52
 
109
- `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Lc,s=!Cc.jitless,c=s&&Rc.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?td([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function id(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!$c(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>nl(e,r,wc())))}),t)}var ad=H(`$ZodUnion`,(e,t)=>{G.init(e,t),U(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),U(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),U(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),U(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>kc(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>id(t,i,e,a)):id(s,i,e,a)}}),od=H(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,ad.init(e,t);let n=e._zod.parse;U(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Dc(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Lc(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),sd=H(`$ZodIntersection`,(e,t)=>{G.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ld(e,t,n)):ld(e,i,a)}});function cd(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(zc(e)&&zc(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=cd(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=cd(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ld(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),$c(e))return e;let o=cd(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var ud=H(`$ZodRecord`,(e,t)=>{G.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!zc(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...el(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...el(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Xl.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>nl(e,r,wc())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...el(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...el(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),dd=H(`$ZodEnum`,(e,t)=>{G.init(e,t);let n=Tc(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Vc.has(typeof e)).map(e=>typeof e==`string`?Hc(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),fd=H(`$ZodLiteral`,(e,t)=>{if(G.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Hc(e):e?Hc(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),pd=H(`$ZodTransform`,(e,t)=>{G.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Sc(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new xc;return n.value=i,n}});function md(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var hd=H(`$ZodOptional`,(e,t)=>{G.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,U(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),U(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${kc(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>md(t,e.value)):md(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),gd=H(`$ZodExactOptional`,(e,t)=>{hd.init(e,t),U(e._zod,`values`,()=>t.innerType._zod.values),U(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),_d=H(`$ZodNullable`,(e,t)=>{G.init(e,t),U(e._zod,`optin`,()=>t.innerType._zod.optin),U(e._zod,`optout`,()=>t.innerType._zod.optout),U(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${kc(e.source)}|null)$`):void 0}),U(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),vd=H(`$ZodDefault`,(e,t)=>{G.init(e,t),e._zod.optin=`optional`,U(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>yd(e,t)):yd(r,t)}});function yd(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bd=H(`$ZodPrefault`,(e,t)=>{G.init(e,t),e._zod.optin=`optional`,U(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),xd=H(`$ZodNonOptional`,(e,t)=>{G.init(e,t),U(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Sd(t,e)):Sd(i,e)}});function Sd(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Cd=H(`$ZodCatch`,(e,t)=>{G.init(e,t),U(e._zod,`optin`,()=>t.innerType._zod.optin),U(e._zod,`optout`,()=>t.innerType._zod.optout),U(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>nl(e,n,wc()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>nl(e,n,wc()))},input:e.value}),e.issues=[]),e)}}),wd=H(`$ZodPipe`,(e,t)=>{G.init(e,t),U(e._zod,`values`,()=>t.in._zod.values),U(e._zod,`optin`,()=>t.in._zod.optin),U(e._zod,`optout`,()=>t.out._zod.optout),U(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Td(e,t.in,n)):Td(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Td(e,t.out,n)):Td(r,t.out,n)}});function Td(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Ed=H(`$ZodReadonly`,(e,t)=>{G.init(e,t),U(e._zod,`propValues`,()=>t.innerType._zod.propValues),U(e._zod,`values`,()=>t.innerType._zod.values),U(e._zod,`optin`,()=>t.innerType?._zod?.optin),U(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Dd):Dd(r)}});function Dd(e){return e.value=Object.freeze(e.value),e}var Od=H(`$ZodCustom`,(e,t)=>{eu.init(e,t),G.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>kd(t,n,r,e));kd(i,n,r,e)}});function kd(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(il(e))}}var Ad,jd=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Md(){return new jd}(Ad=globalThis).__zod_globalRegistry??(Ad.__zod_globalRegistry=Md());var Nd=globalThis.__zod_globalRegistry;function Pd(e,t){return new e({type:`string`,...W(t)})}function Fd(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...W(t)})}function Id(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...W(t)})}function Ld(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...W(t)})}function Rd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...W(t)})}function zd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...W(t)})}function Bd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...W(t)})}function Vd(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...W(t)})}function Hd(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...W(t)})}function Ud(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...W(t)})}function Wd(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...W(t)})}function Gd(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...W(t)})}function Kd(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...W(t)})}function qd(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...W(t)})}function Jd(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...W(t)})}function Yd(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...W(t)})}function Xd(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...W(t)})}function Zd(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...W(t)})}function Qd(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...W(t)})}function $d(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...W(t)})}function ef(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...W(t)})}function tf(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...W(t)})}function nf(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...W(t)})}function rf(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...W(t)})}function af(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...W(t)})}function of(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...W(t)})}function sf(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...W(t)})}function cf(e,t){return new e({type:`number`,checks:[],...W(t)})}function lf(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...W(t)})}function uf(e,t){return new e({type:`boolean`,...W(t)})}function df(e){return new e({type:`unknown`})}function ff(e,t){return new e({type:`never`,...W(t)})}function pf(e,t){return new nu({check:`less_than`,...W(t),value:e,inclusive:!1})}function mf(e,t){return new nu({check:`less_than`,...W(t),value:e,inclusive:!0})}function hf(e,t){return new ru({check:`greater_than`,...W(t),value:e,inclusive:!1})}function gf(e,t){return new ru({check:`greater_than`,...W(t),value:e,inclusive:!0})}function _f(e,t){return new iu({check:`multiple_of`,...W(t),value:e})}function vf(e,t){return new ou({check:`max_length`,...W(t),maximum:e})}function yf(e,t){return new su({check:`min_length`,...W(t),minimum:e})}function bf(e,t){return new cu({check:`length_equals`,...W(t),length:e})}function xf(e,t){return new uu({check:`string_format`,format:`regex`,...W(t),pattern:e})}function Sf(e){return new du({check:`string_format`,format:`lowercase`,...W(e)})}function Cf(e){return new fu({check:`string_format`,format:`uppercase`,...W(e)})}function wf(e,t){return new pu({check:`string_format`,format:`includes`,...W(t),includes:e})}function Tf(e,t){return new mu({check:`string_format`,format:`starts_with`,...W(t),prefix:e})}function Ef(e,t){return new hu({check:`string_format`,format:`ends_with`,...W(t),suffix:e})}function Df(e){return new gu({check:`overwrite`,tx:e})}function Of(e){return Df(t=>t.normalize(e))}function kf(){return Df(e=>e.trim())}function Af(){return Df(e=>e.toLowerCase())}function jf(){return Df(e=>e.toUpperCase())}function Mf(){return Df(e=>Fc(e))}function Nf(e,t,n){return new e({type:`array`,element:t,...W(n)})}function Pf(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...W(n)})}function Ff(e){let t=If(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(il(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(il(r))}},e(n.value,n)));return t}function If(e,t){let n=new eu({check:`custom`,...W(t)});return n._zod.check=e,n}function Lf(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Nd,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Rf(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Rf(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&Vf(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function zf(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
53
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Za,s=!La.jitless,c=s&&Qa.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?gc([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function yc(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!mo(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>_o(e,r,Ra())))}),t)}var bc=R(`$ZodUnion`,(e,t)=>{V.init(e,t),z(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),z(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),z(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),z(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Ua(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>yc(t,i,e,a)):yc(s,i,e,a)}}),xc=R(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,bc.init(e,t);let n=e._zod.parse;z(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Va(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Za(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),Sc=R(`$ZodIntersection`,(e,t)=>{V.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>wc(e,t,n)):wc(e,i,a)}});function Cc(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($a(e)&&$a(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Cc(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Cc(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function wc(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),mo(e))return e;let o=Cc(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Tc=R(`$ZodRecord`,(e,t)=>{V.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!$a(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...ho(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...ho(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&ds.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>_o(e,r,Ra())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...ho(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...ho(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Ec=R(`$ZodEnum`,(e,t)=>{V.init(e,t);let n=za(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>to.has(typeof e)).map(e=>typeof e==`string`?no(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Dc=R(`$ZodLiteral`,(e,t)=>{if(V.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?no(e):e?no(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Oc=R(`$ZodTransform`,(e,t)=>{V.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ia(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Fa;return n.value=i,n}});function kc(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Ac=R(`$ZodOptional`,(e,t)=>{V.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,z(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),z(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ua(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>kc(t,e.value)):kc(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),jc=R(`$ZodExactOptional`,(e,t)=>{Ac.init(e,t),z(e._zod,`values`,()=>t.innerType._zod.values),z(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Mc=R(`$ZodNullable`,(e,t)=>{V.init(e,t),z(e._zod,`optin`,()=>t.innerType._zod.optin),z(e._zod,`optout`,()=>t.innerType._zod.optout),z(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ua(e.source)}|null)$`):void 0}),z(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Nc=R(`$ZodDefault`,(e,t)=>{V.init(e,t),e._zod.optin=`optional`,z(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Pc(e,t)):Pc(r,t)}});function Pc(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Fc=R(`$ZodPrefault`,(e,t)=>{V.init(e,t),e._zod.optin=`optional`,z(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ic=R(`$ZodNonOptional`,(e,t)=>{V.init(e,t),z(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Lc(t,e)):Lc(i,e)}});function Lc(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Rc=R(`$ZodCatch`,(e,t)=>{V.init(e,t),z(e._zod,`optin`,()=>t.innerType._zod.optin),z(e._zod,`optout`,()=>t.innerType._zod.optout),z(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>_o(e,n,Ra()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>_o(e,n,Ra()))},input:e.value}),e.issues=[]),e)}}),zc=R(`$ZodPipe`,(e,t)=>{V.init(e,t),z(e._zod,`values`,()=>t.in._zod.values),z(e._zod,`optin`,()=>t.in._zod.optin),z(e._zod,`optout`,()=>t.out._zod.optout),z(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Bc(e,t.in,n)):Bc(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Bc(e,t.out,n)):Bc(r,t.out,n)}});function Bc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Vc=R(`$ZodReadonly`,(e,t)=>{V.init(e,t),z(e._zod,`propValues`,()=>t.innerType._zod.propValues),z(e._zod,`values`,()=>t.innerType._zod.values),z(e._zod,`optin`,()=>t.innerType?._zod?.optin),z(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Hc):Hc(r)}});function Hc(e){return e.value=Object.freeze(e.value),e}var Uc=R(`$ZodCustom`,(e,t)=>{hs.init(e,t),V.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Wc(t,n,r,e));Wc(i,n,r,e)}});function Wc(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(yo(e))}}var Gc,Kc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function qc(){return new Kc}(Gc=globalThis).__zod_globalRegistry??(Gc.__zod_globalRegistry=qc());var Jc=globalThis.__zod_globalRegistry;function Yc(e,t){return new e({type:`string`,...B(t)})}function Xc(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...B(t)})}function Zc(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...B(t)})}function Qc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...B(t)})}function $c(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...B(t)})}function el(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...B(t)})}function tl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...B(t)})}function nl(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...B(t)})}function rl(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...B(t)})}function il(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...B(t)})}function al(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...B(t)})}function ol(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...B(t)})}function sl(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...B(t)})}function cl(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...B(t)})}function ll(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...B(t)})}function ul(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...B(t)})}function dl(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...B(t)})}function fl(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...B(t)})}function pl(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...B(t)})}function ml(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...B(t)})}function hl(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...B(t)})}function gl(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...B(t)})}function _l(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...B(t)})}function vl(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...B(t)})}function yl(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...B(t)})}function bl(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...B(t)})}function xl(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...B(t)})}function Sl(e,t){return new e({type:`number`,checks:[],...B(t)})}function Cl(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...B(t)})}function wl(e,t){return new e({type:`boolean`,...B(t)})}function Tl(e){return new e({type:`unknown`})}function El(e,t){return new e({type:`never`,...B(t)})}function Dl(e,t){return new _s({check:`less_than`,...B(t),value:e,inclusive:!1})}function Ol(e,t){return new _s({check:`less_than`,...B(t),value:e,inclusive:!0})}function kl(e,t){return new vs({check:`greater_than`,...B(t),value:e,inclusive:!1})}function Al(e,t){return new vs({check:`greater_than`,...B(t),value:e,inclusive:!0})}function jl(e,t){return new ys({check:`multiple_of`,...B(t),value:e})}function Ml(e,t){return new xs({check:`max_length`,...B(t),maximum:e})}function Nl(e,t){return new Ss({check:`min_length`,...B(t),minimum:e})}function Pl(e,t){return new Cs({check:`length_equals`,...B(t),length:e})}function Fl(e,t){return new Ts({check:`string_format`,format:`regex`,...B(t),pattern:e})}function Il(e){return new Es({check:`string_format`,format:`lowercase`,...B(e)})}function Ll(e){return new Ds({check:`string_format`,format:`uppercase`,...B(e)})}function Rl(e,t){return new Os({check:`string_format`,format:`includes`,...B(t),includes:e})}function zl(e,t){return new ks({check:`string_format`,format:`starts_with`,...B(t),prefix:e})}function Bl(e,t){return new As({check:`string_format`,format:`ends_with`,...B(t),suffix:e})}function Vl(e){return new js({check:`overwrite`,tx:e})}function Hl(e){return Vl(t=>t.normalize(e))}function Ul(){return Vl(e=>e.trim())}function Wl(){return Vl(e=>e.toLowerCase())}function Gl(){return Vl(e=>e.toUpperCase())}function Kl(){return Vl(e=>Ya(e))}function ql(e,t,n){return new e({type:`array`,element:t,...B(n)})}function Jl(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...B(n)})}function Yl(e){let t=Xl(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(yo(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(yo(r))}},e(n.value,n)));return t}function Xl(e,t){let n=new hs({check:`custom`,...B(t)});return n._zod.check=e,n}function Zl(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Jc,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function U(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,U(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&W(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ql(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
110
54
 
111
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Bf(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Uf(t,`input`,e.processors),output:Uf(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Vf(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Vf(r.element,n);if(r.type===`set`)return Vf(r.valueType,n);if(r.type===`lazy`)return Vf(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return Vf(r.innerType,n);if(r.type===`intersection`)return Vf(r.left,n)||Vf(r.right,n);if(r.type===`record`||r.type===`map`)return Vf(r.keyType,n)||Vf(r.valueType,n);if(r.type===`pipe`)return Vf(r.in,n)||Vf(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Vf(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Vf(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Vf(e,n))return!0;return!!(r.rest&&Vf(r.rest,n))}return!1}var Hf=(e,t={})=>n=>{let r=Lf({...n,processors:t});return Rf(e,r),zf(r,e),Bf(r,e)},Uf=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Lf({...i??{},target:a,io:t,processors:n});return Rf(e,o),zf(o,e),Bf(o,e)},Wf={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Gf=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Wf[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Kf=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},qf=(e,t,n,r)=>{n.type=`boolean`},Jf=(e,t,n,r)=>{n.not={}},Yf=(e,t,n,r)=>{let i=e._zod.def,a=Tc(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Xf=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Zf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Qf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},$f=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Rf(a.element,t,{...r,path:[...r.path,`items`]})},ep=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Rf(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Rf(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},tp=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Rf(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},np=(e,t,n,r)=>{let i=e._zod.def,a=Rf(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Rf(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},rp=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Rf(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Rf(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Rf(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},ip=(e,t,n,r)=>{let i=e._zod.def,a=Rf(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ap=(e,t,n,r)=>{let i=e._zod.def;Rf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},op=(e,t,n,r)=>{let i=e._zod.def;Rf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},sp=(e,t,n,r)=>{let i=e._zod.def;Rf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},cp=(e,t,n,r)=>{let i=e._zod.def;Rf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},lp=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;Rf(a,t,r);let o=t.seen.get(e);o.ref=a},up=(e,t,n,r)=>{let i=e._zod.def;Rf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},dp=(e,t,n,r)=>{let i=e._zod.def;Rf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},fp=H(`ZodISODateTime`,(e,t)=>{ju.init(e,t),Y.init(e,t)});function pp(e){return rf(fp,e)}var mp=H(`ZodISODate`,(e,t)=>{Mu.init(e,t),Y.init(e,t)});function hp(e){return af(mp,e)}var gp=H(`ZodISOTime`,(e,t)=>{Nu.init(e,t),Y.init(e,t)});function _p(e){return of(gp,e)}var vp=H(`ZodISODuration`,(e,t)=>{Pu.init(e,t),Y.init(e,t)});function yp(e){return sf(vp,e)}var bp=(e,t)=>{ol.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ll(e,t)},flatten:{value:t=>cl(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ec,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ec,2)}},isEmpty:{get(){return e.issues.length===0}}})};H(`ZodError`,bp);var xp=H(`ZodError`,bp,{Parent:Error}),Sp=ul(xp),Cp=dl(xp),wp=fl(xp),Tp=ml(xp),Ep=gl(xp),Dp=_l(xp),Op=vl(xp),kp=yl(xp),Ap=bl(xp),jp=xl(xp),Mp=Sl(xp),Np=Cl(xp),q=H(`ZodType`,(e,t)=>(G.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Uf(e,`input`),output:Uf(e,`output`)}}),e.toJSONSchema=Hf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(Nc(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Uc(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Sp(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>wp(e,t,n),e.parseAsync=async(t,n)=>Cp(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Tp(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ep(e,t,n),e.decode=(t,n)=>Dp(e,t,n),e.encodeAsync=async(t,n)=>Op(e,t,n),e.decodeAsync=async(t,n)=>kp(e,t,n),e.safeEncode=(t,n)=>Ap(e,t,n),e.safeDecode=(t,n)=>jp(e,t,n),e.safeEncodeAsync=async(t,n)=>Mp(e,t,n),e.safeDecodeAsync=async(t,n)=>Np(e,t,n),e.refine=(t,n)=>e.check(Km(t,n)),e.superRefine=t=>e.check(qm(t)),e.overwrite=t=>e.check(Df(t)),e.optional=()=>Om(e),e.exactOptional=()=>Am(e),e.nullable=()=>Mm(e),e.nullish=()=>Om(Mm(e)),e.nonoptional=t=>Rm(e,t),e.array=()=>Z(e),e.or=t=>pm([e,t]),e.and=t=>_m(e,t),e.transform=t=>Hm(e,Em(t)),e.default=t=>Pm(e,t),e.prefault=t=>Im(e,t),e.catch=t=>Bm(e,t),e.pipe=t=>Hm(e,t),e.readonly=()=>Wm(e),e.describe=t=>{let n=e.clone();return Nd.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return Nd.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Nd.get(e);let n=e.clone();return Nd.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Pp=H(`_ZodString`,(e,t)=>{yu.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gf(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(xf(...t)),e.includes=(...t)=>e.check(wf(...t)),e.startsWith=(...t)=>e.check(Tf(...t)),e.endsWith=(...t)=>e.check(Ef(...t)),e.min=(...t)=>e.check(yf(...t)),e.max=(...t)=>e.check(vf(...t)),e.length=(...t)=>e.check(bf(...t)),e.nonempty=(...t)=>e.check(yf(1,...t)),e.lowercase=t=>e.check(Sf(t)),e.uppercase=t=>e.check(Cf(t)),e.trim=()=>e.check(kf()),e.normalize=(...t)=>e.check(Of(...t)),e.toLowerCase=()=>e.check(Af()),e.toUpperCase=()=>e.check(jf()),e.slugify=()=>e.check(Mf())}),Fp=H(`ZodString`,(e,t)=>{yu.init(e,t),Pp.init(e,t),e.email=t=>e.check(Fd(Ip,t)),e.url=t=>e.check(Vd(zp,t)),e.jwt=t=>e.check(nf(em,t)),e.emoji=t=>e.check(Hd(Bp,t)),e.guid=t=>e.check(Id(Lp,t)),e.uuid=t=>e.check(Ld(Rp,t)),e.uuidv4=t=>e.check(Rd(Rp,t)),e.uuidv6=t=>e.check(zd(Rp,t)),e.uuidv7=t=>e.check(Bd(Rp,t)),e.nanoid=t=>e.check(Ud(Vp,t)),e.guid=t=>e.check(Id(Lp,t)),e.cuid=t=>e.check(Wd(Hp,t)),e.cuid2=t=>e.check(Gd(Up,t)),e.ulid=t=>e.check(Kd(Wp,t)),e.base64=t=>e.check($d(Zp,t)),e.base64url=t=>e.check(ef(Qp,t)),e.xid=t=>e.check(qd(Gp,t)),e.ksuid=t=>e.check(Jd(Kp,t)),e.ipv4=t=>e.check(Yd(qp,t)),e.ipv6=t=>e.check(Xd(Jp,t)),e.cidrv4=t=>e.check(Zd(Yp,t)),e.cidrv6=t=>e.check(Qd(Xp,t)),e.e164=t=>e.check(tf($p,t)),e.datetime=t=>e.check(pp(t)),e.date=t=>e.check(hp(t)),e.time=t=>e.check(_p(t)),e.duration=t=>e.check(yp(t))});function J(e){return Pd(Fp,e)}var Y=H(`ZodStringFormat`,(e,t)=>{K.init(e,t),Pp.init(e,t)}),Ip=H(`ZodEmail`,(e,t)=>{Su.init(e,t),Y.init(e,t)}),Lp=H(`ZodGUID`,(e,t)=>{bu.init(e,t),Y.init(e,t)}),Rp=H(`ZodUUID`,(e,t)=>{xu.init(e,t),Y.init(e,t)}),zp=H(`ZodURL`,(e,t)=>{Cu.init(e,t),Y.init(e,t)}),Bp=H(`ZodEmoji`,(e,t)=>{wu.init(e,t),Y.init(e,t)}),Vp=H(`ZodNanoID`,(e,t)=>{Tu.init(e,t),Y.init(e,t)}),Hp=H(`ZodCUID`,(e,t)=>{Eu.init(e,t),Y.init(e,t)}),Up=H(`ZodCUID2`,(e,t)=>{Du.init(e,t),Y.init(e,t)}),Wp=H(`ZodULID`,(e,t)=>{Ou.init(e,t),Y.init(e,t)}),Gp=H(`ZodXID`,(e,t)=>{ku.init(e,t),Y.init(e,t)}),Kp=H(`ZodKSUID`,(e,t)=>{Au.init(e,t),Y.init(e,t)}),qp=H(`ZodIPv4`,(e,t)=>{Fu.init(e,t),Y.init(e,t)}),Jp=H(`ZodIPv6`,(e,t)=>{Iu.init(e,t),Y.init(e,t)}),Yp=H(`ZodCIDRv4`,(e,t)=>{Lu.init(e,t),Y.init(e,t)}),Xp=H(`ZodCIDRv6`,(e,t)=>{Ru.init(e,t),Y.init(e,t)}),Zp=H(`ZodBase64`,(e,t)=>{Bu.init(e,t),Y.init(e,t)}),Qp=H(`ZodBase64URL`,(e,t)=>{Hu.init(e,t),Y.init(e,t)}),$p=H(`ZodE164`,(e,t)=>{Uu.init(e,t),Y.init(e,t)}),em=H(`ZodJWT`,(e,t)=>{Gu.init(e,t),Y.init(e,t)}),tm=H(`ZodNumber`,(e,t)=>{Ku.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kf(e,t,n,r),e.gt=(t,n)=>e.check(hf(t,n)),e.gte=(t,n)=>e.check(gf(t,n)),e.min=(t,n)=>e.check(gf(t,n)),e.lt=(t,n)=>e.check(pf(t,n)),e.lte=(t,n)=>e.check(mf(t,n)),e.max=(t,n)=>e.check(mf(t,n)),e.int=t=>e.check(im(t)),e.safe=t=>e.check(im(t)),e.positive=t=>e.check(hf(0,t)),e.nonnegative=t=>e.check(gf(0,t)),e.negative=t=>e.check(pf(0,t)),e.nonpositive=t=>e.check(mf(0,t)),e.multipleOf=(t,n)=>e.check(_f(t,n)),e.step=(t,n)=>e.check(_f(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function nm(e){return cf(tm,e)}var rm=H(`ZodNumberFormat`,(e,t)=>{qu.init(e,t),tm.init(e,t)});function im(e){return lf(rm,e)}var am=H(`ZodBoolean`,(e,t)=>{Ju.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qf(e,t,n,r)});function X(e){return uf(am,e)}var om=H(`ZodUnknown`,(e,t)=>{Yu.init(e,t),q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function sm(){return df(om)}var cm=H(`ZodNever`,(e,t)=>{Xu.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jf(e,t,n,r)});function lm(e){return ff(cm,e)}var um=H(`ZodArray`,(e,t)=>{Qu.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$f(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(yf(t,n)),e.nonempty=t=>e.check(yf(1,t)),e.max=(t,n)=>e.check(vf(t,n)),e.length=(t,n)=>e.check(bf(t,n)),e.unwrap=()=>e.element});function Z(e,t){return Nf(um,e,t)}var dm=H(`ZodObject`,(e,t)=>{rd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ep(e,t,n,r),U(e,`shape`,()=>t.shape),e.keyof=()=>Sm(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:sm()}),e.loose=()=>e.clone({...e._zod.def,catchall:sm()}),e.strict=()=>e.clone({...e._zod.def,catchall:lm()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Jc(e,t),e.safeExtend=t=>Yc(e,t),e.merge=t=>Xc(e,t),e.pick=t=>Kc(e,t),e.omit=t=>qc(e,t),e.partial=(...t)=>Zc(Dm,e,t[0]),e.required=(...t)=>Qc(Lm,e,t[0])});function Q(e,t){return new dm({type:`object`,shape:e??{},...W(t)})}var fm=H(`ZodUnion`,(e,t)=>{ad.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tp(e,t,n,r),e.options=t.options});function pm(e,t){return new fm({type:`union`,options:e,...W(t)})}var mm=H(`ZodDiscriminatedUnion`,(e,t)=>{fm.init(e,t),od.init(e,t)});function hm(e,t,n){return new mm({type:`union`,options:t,discriminator:e,...W(n)})}var gm=H(`ZodIntersection`,(e,t)=>{sd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>np(e,t,n,r)});function _m(e,t){return new gm({type:`intersection`,left:e,right:t})}var vm=H(`ZodRecord`,(e,t)=>{ud.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rp(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function ym(e,t,n){return new vm({type:`record`,keyType:e,valueType:t,...W(n)})}function bm(e,t,n){let r=Uc(e);return r._zod.values=void 0,new vm({type:`record`,keyType:r,valueType:t,...W(n)})}var xm=H(`ZodEnum`,(e,t)=>{dd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yf(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new xm({...t,checks:[],...W(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new xm({...t,checks:[],...W(r),entries:i})}});function Sm(e,t){return new xm({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...W(t)})}var Cm=H(`ZodLiteral`,(e,t)=>{fd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xf(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function wm(e,t){return new Cm({type:`literal`,values:Array.isArray(e)?e:[e],...W(t)})}var Tm=H(`ZodTransform`,(e,t)=>{pd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qf(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Sc(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(il(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(il(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Em(e){return new Tm({type:`transform`,transform:e})}var Dm=H(`ZodOptional`,(e,t)=>{hd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Om(e){return new Dm({type:`optional`,innerType:e})}var km=H(`ZodExactOptional`,(e,t)=>{gd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Am(e){return new km({type:`optional`,innerType:e})}var jm=H(`ZodNullable`,(e,t)=>{_d.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ip(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mm(e){return new jm({type:`nullable`,innerType:e})}var Nm=H(`ZodDefault`,(e,t)=>{vd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>op(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Pm(e,t){return new Nm({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Bc(t)}})}var Fm=H(`ZodPrefault`,(e,t)=>{bd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Im(e,t){return new Fm({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Bc(t)}})}var Lm=H(`ZodNonOptional`,(e,t)=>{xd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ap(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Rm(e,t){return new Lm({type:`nonoptional`,innerType:e,...W(t)})}var zm=H(`ZodCatch`,(e,t)=>{Cd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Bm(e,t){return new zm({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Vm=H(`ZodPipe`,(e,t)=>{wd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lp(e,t,n,r),e.in=t.in,e.out=t.out});function Hm(e,t){return new Vm({type:`pipe`,in:e,out:t})}var Um=H(`ZodReadonly`,(e,t)=>{Ed.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>up(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Wm(e){return new Um({type:`readonly`,innerType:e})}var Gm=H(`ZodCustom`,(e,t)=>{Od.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zf(e,t,n,r)});function Km(e,t={}){return Pf(Gm,e,t)}function qm(e){return Ff(e)}var Jm=Q({blocked:J(),maintenance:J(),"rate-limit":J(),"server-error":J(),"too-short":J(),"too-long":J(),"quota-reached":J(),aborted:J(),"sse-error":J(),"client-error":J(),"unexpected-call":J(),"incomplete-error":J(),"feedback-failed":J(),"answer-form-failed":J(),"speech-not-supported":J(),"speech-transcription-failed":J(),"speech-no-text-detected":J(),"speech-microphone-access-denied":J(),"pii-detected":J()}),Ym=Q({email:J(),creditCard:J(),ahv:J(),phoneSwiss:J(),phoneInternational:J(),swissPassport:J(),longNumber:J()}),Xm=Q({name:J(),namePlural:J().optional(),intro:J().optional(),placeholder:J(),values:ym(J(),J())}),Zm=Q({action:J(),label:J(),type:Sm([`primary`,`secondary`]).optional()}),Qm=Q({hash:J(),title:J(),content:J(),actions:Z(Zm).optional()}),$m=Q({introductionTitle:J(),introductionDisclaimer:J().optional(),termsInvitationToConsent:J().optional(),chatInputPlaceholder:J(),chatInputPlaceholderListening:J().optional(),chatInputSubmit:J(),chatInputAbort:J(),chatInputStartListening:J(),chatInputStopListening:J(),referenceLink:J(),referencesDisplay:J(),referencesHide:J(),referencesTitle:J(),referencesFurtherTitle:J(),newChat:J(),maintenanceModeError:J(),messageBotLoading:J(),messageBotError:J(),messageBotDefaultError:J(),noResultsFound:J(),chatFooterText:J().optional(),scrollToBottom:J(),openButtonTitle:J().optional(),openButtonDescription:J().optional(),openMenu:J(),openInfo:J(),aboutThisChat:J().optional(),closeMenu:J(),closeChat:J(),close:J(),send:J(),thankYouForFeedback:J(),answerFormThankYou:J(),giveFeedback:J(),sendFeedback:J(),feedbackFormTitle:J(),feedbackFormMessage:J(),feedbackFormMessagePlaceholder:J(),feedbackFormEmail:J(),feedbackFormEmailPlaceholder:J(),askQuestionAgain:J(),answerGood:J(),answerBad:J(),classificationSubmit:J(),classificationThankYou:J(),classificationTitle:J(),selectLanguage:J(),languageChanged:J(),selectColorTheme:J(),lightMode:J(),darkMode:J(),ariaMainNavigation:J(),ariaMainNavigationInfo:J(),ariaMainNavigationLinks:J(),ariaMainNavigationLanguageSwitch:J(),ariaMainNavigationColorMode:J(),ariaGotoMainNavigation:J(),ariaAskQuestion:J(),ariaAskQuestionRegion:J(),ariaNotifications:J(),ariaPredefinedQuestions:J(),ariaPredefinedQuestionsRegion:J(),ariaChatHistory:J(),ariaOpenChat:J(),ariaQuestionFromYou:J(),ariaAnswerFromBot:J(),ariaLastAnswerNavigation:J(),ariaQuestionSent:J(),ariaAnswerReady:J(),ariaAnswerFinished:J(),ariaAnswerFinishedWithSelectedTopic:J(),ariaAskQuestionAgain:J(),ariaAnswerGood:J(),ariaAnswerBad:J(),ariaReferenceSource:J(),ariaGiveFeedback:J(),ariaAnswerForm:J(),ariaLanguageChanged:J(),ariaLightSelected:J(),ariaDarkSelected:J(),ariaSettings:J(),ariaSettingsRegion:J(),ariaReferencesRegion:J(),ariaOpensInNewTab:J(),ariaPageTitle:J(),ariaCloseWithEsc:J(),ariaInfoTitle:J(),ariaFlyoutRegion:J(),ariaSelected:J(),ariaUnselected:J(),ariaAllSelected:J(),ariaAllUnselected:J(),ariaAllReseted:J(),ariaChangeTopic:J(),popups:Z(Qm).optional(),termsAcceptButton:J().optional(),termsReadButton:J().optional(),selectors:ym(J(),Xm).optional(),hideSettings:J(),showSettings:J(),chooseAtLeastOneOption:J(),selectAll:J(),selectNone:J(),resetToDefaults:J(),messageTooLong:J(),selectedTopic:J(),changeTopic:J(),searchSummaryExpand:J(),searchSummaryCollapse:J(),searchSummaryOptInDefault:J(),searchSummaryOptOut:J(),searchSummaryError:J(),searchSummaryDisclaimer:J().optional(),searchSummaryLoading:J(),searchSummaryFollowUpPlaceholder:J(),searchSummaryFollowUpSubmit:J(),ariaSearchSummaryExpand:J(),ariaSearchSummaryCollapse:J(),ariaSearchSummaryOptOut:J(),ariaSearchSummaryFollowUpInput:J(),jsonLdEventDate:J(),jsonLdEventLocation:J(),jsonLdEventDescription:J(),jsonLdEventCtaLabel:J(),jsonLdCtaLabel:J(),jsonLdMapOpenMap:J(),ariaJsonLdMapCanvas:J(),ariaJsonLdEventCard:J(),ariaJsonLdMapCard:J(),ariaJsonLdCtaCard:J()}),eh=[`en`,`de`,`fr`,`it`],th=Sm(eh),nh=bm(th,$m.partial().extend({selectors:ym(J(),Xm).optional()}));ym(th,Jm),ym(th,Ym);var rh=bm(th,J()),ih=Q({componentName:wm(`buttons`),data:Q({caption:J().optional(),buttons:Z(Q({label:J(),href:J().url().optional(),value:J(),variant:Sm([`primary`,`secondary`,`tertiary`]).optional(),icon:J().optional(),target:J().optional()}))})}),ah=Q({componentName:wm(`combobox`),data:Q({caption:rh.optional(),placeholder:rh,values:Z(Q({label:rh,value:J(),metadata:ym(J(),sm()).optional()})),removeComponentAfterValueSelection:X().optional(),selectorKey:J().optional()})}),oh=Q({componentName:wm(`alva-init`),data:Q({})}),sh=Q({componentName:wm(`alva-score-survey`),data:Q({})}),ch=Q({type:wm(`component`),id:J().optional(),time:J().optional(),hideAvatar:X().optional(),noSectionPadding:X().optional(),hideChatInput:X().optional()}),lh=_m(hm(`componentName`,[ih,ah,oh,sh]),ch),uh=pm([J(),nm(),X(),Z(J()),Z(nm()),Z(X())]),dh=Q({title:J(),description:J().optional(),badge:J().optional(),breadcrumbs:Z(J()).optional(),previewImage:J().optional(),date:J().datetime().optional()}),fh=Q({url:J().url(),score:nm(),metadata:ym(J(),uh),language:J().optional()}).extend(dh.shape);Sm([`start`,`chat`]),hm(`name`,[Q({name:wm(`start-page`),prefill:J().optional()}),Q({name:wm(`consent-page`)}),Q({name:wm(`chat-page`),query:J().optional(),predefinedQuestionId:J().optional(),switchQuestionId:J().optional()})]);var ph=Q({type:wm(`user`),time:J(),message:J(),id:J().optional()});Sm([`idle`,`searching`,`answering`]);var mh=pm([J(),nm(),X(),Z(J()),Z(nm()),Z(X())]),hh=Q({url:J(),score:nm(),metadata:ym(J(),mh),considered:X(),display:Q({card:dh,listItem:dh})}).extend({referenceIndex:Q({all:nm(),used:nm().optional()})}),gh=Q({all:Z(hh),used:Z(hh),unused:Z(hh)}),_h=pm([Sm([`pii-detected`,`blocked`,`maintenance`,`rate-limit`,`server-error`,`too-short`,`too-long`,`quota-reached`,`aborted`]),wm(`sse-error`),wm(`client-error`),wm(`unexpected-call`)]),vh=Q({type:wm(`bot`),time:J(),id:J(),message:Q({markdown:J(),html:J(),text:J()}),references:gh,errors:Z(_h),retrievalQuestion:J().optional(),noFeedback:X().optional(),feedback:Sm([`up`,`down`]).optional()}),yh=vh.extend({state:Sm([`streaming`,`done`])}),bh=pm([pm([vh.extend({state:wm(`loading`)}),yh]),ph,lh]),xh=Z(Q({question:J(),answer:J()})),Sh={inherit:`inherit`,current:`currentcolor`,transparent:`transparent`,black:`#000`,white:`#fff`,slate:{50:`oklch(98.4% 0.003 247.858)`,100:`oklch(96.8% 0.007 247.896)`,200:`oklch(92.9% 0.013 255.508)`,300:`oklch(86.9% 0.022 252.894)`,400:`oklch(70.4% 0.04 256.788)`,500:`oklch(55.4% 0.046 257.417)`,600:`oklch(44.6% 0.043 257.281)`,700:`oklch(37.2% 0.044 257.287)`,800:`oklch(27.9% 0.041 260.031)`,900:`oklch(20.8% 0.042 265.755)`,950:`oklch(12.9% 0.042 264.695)`},gray:{50:`oklch(98.5% 0.002 247.839)`,100:`oklch(96.7% 0.003 264.542)`,200:`oklch(92.8% 0.006 264.531)`,300:`oklch(87.2% 0.01 258.338)`,400:`oklch(70.7% 0.022 261.325)`,500:`oklch(55.1% 0.027 264.364)`,600:`oklch(44.6% 0.03 256.802)`,700:`oklch(37.3% 0.034 259.733)`,800:`oklch(27.8% 0.033 256.848)`,900:`oklch(21% 0.034 264.665)`,950:`oklch(13% 0.028 261.692)`},zinc:{50:`oklch(98.5% 0 0)`,100:`oklch(96.7% 0.001 286.375)`,200:`oklch(92% 0.004 286.32)`,300:`oklch(87.1% 0.006 286.286)`,400:`oklch(70.5% 0.015 286.067)`,500:`oklch(55.2% 0.016 285.938)`,600:`oklch(44.2% 0.017 285.786)`,700:`oklch(37% 0.013 285.805)`,800:`oklch(27.4% 0.006 286.033)`,900:`oklch(21% 0.006 285.885)`,950:`oklch(14.1% 0.005 285.823)`},neutral:{50:`oklch(98.5% 0 0)`,100:`oklch(97% 0 0)`,200:`oklch(92.2% 0 0)`,300:`oklch(87% 0 0)`,400:`oklch(70.8% 0 0)`,500:`oklch(55.6% 0 0)`,600:`oklch(43.9% 0 0)`,700:`oklch(37.1% 0 0)`,800:`oklch(26.9% 0 0)`,900:`oklch(20.5% 0 0)`,950:`oklch(14.5% 0 0)`},stone:{50:`oklch(98.5% 0.001 106.423)`,100:`oklch(97% 0.001 106.424)`,200:`oklch(92.3% 0.003 48.717)`,300:`oklch(86.9% 0.005 56.366)`,400:`oklch(70.9% 0.01 56.259)`,500:`oklch(55.3% 0.013 58.071)`,600:`oklch(44.4% 0.011 73.639)`,700:`oklch(37.4% 0.01 67.558)`,800:`oklch(26.8% 0.007 34.298)`,900:`oklch(21.6% 0.006 56.043)`,950:`oklch(14.7% 0.004 49.25)`},mauve:{50:`oklch(98.5% 0 0)`,100:`oklch(96% 0.003 325.6)`,200:`oklch(92.2% 0.005 325.62)`,300:`oklch(86.5% 0.012 325.68)`,400:`oklch(71.1% 0.019 323.02)`,500:`oklch(54.2% 0.034 322.5)`,600:`oklch(43.5% 0.029 321.78)`,700:`oklch(36.4% 0.029 323.89)`,800:`oklch(26.3% 0.024 320.12)`,900:`oklch(21.2% 0.019 322.12)`,950:`oklch(14.5% 0.008 326)`},olive:{50:`oklch(98.8% 0.003 106.5)`,100:`oklch(96.6% 0.005 106.5)`,200:`oklch(93% 0.007 106.5)`,300:`oklch(88% 0.011 106.6)`,400:`oklch(73.7% 0.021 106.9)`,500:`oklch(58% 0.031 107.3)`,600:`oklch(46.6% 0.025 107.3)`,700:`oklch(39.4% 0.023 107.4)`,800:`oklch(28.6% 0.016 107.4)`,900:`oklch(22.8% 0.013 107.4)`,950:`oklch(15.3% 0.006 107.1)`},mist:{50:`oklch(98.7% 0.002 197.1)`,100:`oklch(96.3% 0.002 197.1)`,200:`oklch(92.5% 0.005 214.3)`,300:`oklch(87.2% 0.007 219.6)`,400:`oklch(72.3% 0.014 214.4)`,500:`oklch(56% 0.021 213.5)`,600:`oklch(45% 0.017 213.2)`,700:`oklch(37.8% 0.015 216)`,800:`oklch(27.5% 0.011 216.9)`,900:`oklch(21.8% 0.008 223.9)`,950:`oklch(14.8% 0.004 228.8)`},taupe:{50:`oklch(98.6% 0.002 67.8)`,100:`oklch(96% 0.002 17.2)`,200:`oklch(92.2% 0.005 34.3)`,300:`oklch(86.8% 0.007 39.5)`,400:`oklch(71.4% 0.014 41.2)`,500:`oklch(54.7% 0.021 43.1)`,600:`oklch(43.8% 0.017 39.3)`,700:`oklch(36.7% 0.016 35.7)`,800:`oklch(26.8% 0.011 36.5)`,900:`oklch(21.4% 0.009 43.1)`,950:`oklch(14.7% 0.004 49.3)`},red:{50:`oklch(97.1% 0.013 17.38)`,100:`oklch(93.6% 0.032 17.717)`,200:`oklch(88.5% 0.062 18.334)`,300:`oklch(80.8% 0.114 19.571)`,400:`oklch(70.4% 0.191 22.216)`,500:`oklch(63.7% 0.237 25.331)`,600:`oklch(57.7% 0.245 27.325)`,700:`oklch(50.5% 0.213 27.518)`,800:`oklch(44.4% 0.177 26.899)`,900:`oklch(39.6% 0.141 25.723)`,950:`oklch(25.8% 0.092 26.042)`},orange:{50:`oklch(98% 0.016 73.684)`,100:`oklch(95.4% 0.038 75.164)`,200:`oklch(90.1% 0.076 70.697)`,300:`oklch(83.7% 0.128 66.29)`,400:`oklch(75% 0.183 55.934)`,500:`oklch(70.5% 0.213 47.604)`,600:`oklch(64.6% 0.222 41.116)`,700:`oklch(55.3% 0.195 38.402)`,800:`oklch(47% 0.157 37.304)`,900:`oklch(40.8% 0.123 38.172)`,950:`oklch(26.6% 0.079 36.259)`},amber:{50:`oklch(98.7% 0.022 95.277)`,100:`oklch(96.2% 0.059 95.617)`,200:`oklch(92.4% 0.12 95.746)`,300:`oklch(87.9% 0.169 91.605)`,400:`oklch(82.8% 0.189 84.429)`,500:`oklch(76.9% 0.188 70.08)`,600:`oklch(66.6% 0.179 58.318)`,700:`oklch(55.5% 0.163 48.998)`,800:`oklch(47.3% 0.137 46.201)`,900:`oklch(41.4% 0.112 45.904)`,950:`oklch(27.9% 0.077 45.635)`},yellow:{50:`oklch(98.7% 0.026 102.212)`,100:`oklch(97.3% 0.071 103.193)`,200:`oklch(94.5% 0.129 101.54)`,300:`oklch(90.5% 0.182 98.111)`,400:`oklch(85.2% 0.199 91.936)`,500:`oklch(79.5% 0.184 86.047)`,600:`oklch(68.1% 0.162 75.834)`,700:`oklch(55.4% 0.135 66.442)`,800:`oklch(47.6% 0.114 61.907)`,900:`oklch(42.1% 0.095 57.708)`,950:`oklch(28.6% 0.066 53.813)`},lime:{50:`oklch(98.6% 0.031 120.757)`,100:`oklch(96.7% 0.067 122.328)`,200:`oklch(93.8% 0.127 124.321)`,300:`oklch(89.7% 0.196 126.665)`,400:`oklch(84.1% 0.238 128.85)`,500:`oklch(76.8% 0.233 130.85)`,600:`oklch(64.8% 0.2 131.684)`,700:`oklch(53.2% 0.157 131.589)`,800:`oklch(45.3% 0.124 130.933)`,900:`oklch(40.5% 0.101 131.063)`,950:`oklch(27.4% 0.072 132.109)`},green:{50:`oklch(98.2% 0.018 155.826)`,100:`oklch(96.2% 0.044 156.743)`,200:`oklch(92.5% 0.084 155.995)`,300:`oklch(87.1% 0.15 154.449)`,400:`oklch(79.2% 0.209 151.711)`,500:`oklch(72.3% 0.219 149.579)`,600:`oklch(62.7% 0.194 149.214)`,700:`oklch(52.7% 0.154 150.069)`,800:`oklch(44.8% 0.119 151.328)`,900:`oklch(39.3% 0.095 152.535)`,950:`oklch(26.6% 0.065 152.934)`},emerald:{50:`oklch(97.9% 0.021 166.113)`,100:`oklch(95% 0.052 163.051)`,200:`oklch(90.5% 0.093 164.15)`,300:`oklch(84.5% 0.143 164.978)`,400:`oklch(76.5% 0.177 163.223)`,500:`oklch(69.6% 0.17 162.48)`,600:`oklch(59.6% 0.145 163.225)`,700:`oklch(50.8% 0.118 165.612)`,800:`oklch(43.2% 0.095 166.913)`,900:`oklch(37.8% 0.077 168.94)`,950:`oklch(26.2% 0.051 172.552)`},teal:{50:`oklch(98.4% 0.014 180.72)`,100:`oklch(95.3% 0.051 180.801)`,200:`oklch(91% 0.096 180.426)`,300:`oklch(85.5% 0.138 181.071)`,400:`oklch(77.7% 0.152 181.912)`,500:`oklch(70.4% 0.14 182.503)`,600:`oklch(60% 0.118 184.704)`,700:`oklch(51.1% 0.096 186.391)`,800:`oklch(43.7% 0.078 188.216)`,900:`oklch(38.6% 0.063 188.416)`,950:`oklch(27.7% 0.046 192.524)`},cyan:{50:`oklch(98.4% 0.019 200.873)`,100:`oklch(95.6% 0.045 203.388)`,200:`oklch(91.7% 0.08 205.041)`,300:`oklch(86.5% 0.127 207.078)`,400:`oklch(78.9% 0.154 211.53)`,500:`oklch(71.5% 0.143 215.221)`,600:`oklch(60.9% 0.126 221.723)`,700:`oklch(52% 0.105 223.128)`,800:`oklch(45% 0.085 224.283)`,900:`oklch(39.8% 0.07 227.392)`,950:`oklch(30.2% 0.056 229.695)`},sky:{50:`oklch(97.7% 0.013 236.62)`,100:`oklch(95.1% 0.026 236.824)`,200:`oklch(90.1% 0.058 230.902)`,300:`oklch(82.8% 0.111 230.318)`,400:`oklch(74.6% 0.16 232.661)`,500:`oklch(68.5% 0.169 237.323)`,600:`oklch(58.8% 0.158 241.966)`,700:`oklch(50% 0.134 242.749)`,800:`oklch(44.3% 0.11 240.79)`,900:`oklch(39.1% 0.09 240.876)`,950:`oklch(29.3% 0.066 243.157)`},blue:{50:`oklch(97% 0.014 254.604)`,100:`oklch(93.2% 0.032 255.585)`,200:`oklch(88.2% 0.059 254.128)`,300:`oklch(80.9% 0.105 251.813)`,400:`oklch(70.7% 0.165 254.624)`,500:`oklch(62.3% 0.214 259.815)`,600:`oklch(54.6% 0.245 262.881)`,700:`oklch(48.8% 0.243 264.376)`,800:`oklch(42.4% 0.199 265.638)`,900:`oklch(37.9% 0.146 265.522)`,950:`oklch(28.2% 0.091 267.935)`},indigo:{50:`oklch(96.2% 0.018 272.314)`,100:`oklch(93% 0.034 272.788)`,200:`oklch(87% 0.065 274.039)`,300:`oklch(78.5% 0.115 274.713)`,400:`oklch(67.3% 0.182 276.935)`,500:`oklch(58.5% 0.233 277.117)`,600:`oklch(51.1% 0.262 276.966)`,700:`oklch(45.7% 0.24 277.023)`,800:`oklch(39.8% 0.195 277.366)`,900:`oklch(35.9% 0.144 278.697)`,950:`oklch(25.7% 0.09 281.288)`},violet:{50:`oklch(96.9% 0.016 293.756)`,100:`oklch(94.3% 0.029 294.588)`,200:`oklch(89.4% 0.057 293.283)`,300:`oklch(81.1% 0.111 293.571)`,400:`oklch(70.2% 0.183 293.541)`,500:`oklch(60.6% 0.25 292.717)`,600:`oklch(54.1% 0.281 293.009)`,700:`oklch(49.1% 0.27 292.581)`,800:`oklch(43.2% 0.232 292.759)`,900:`oklch(38% 0.189 293.745)`,950:`oklch(28.3% 0.141 291.089)`},purple:{50:`oklch(97.7% 0.014 308.299)`,100:`oklch(94.6% 0.033 307.174)`,200:`oklch(90.2% 0.063 306.703)`,300:`oklch(82.7% 0.119 306.383)`,400:`oklch(71.4% 0.203 305.504)`,500:`oklch(62.7% 0.265 303.9)`,600:`oklch(55.8% 0.288 302.321)`,700:`oklch(49.6% 0.265 301.924)`,800:`oklch(43.8% 0.218 303.724)`,900:`oklch(38.1% 0.176 304.987)`,950:`oklch(29.1% 0.149 302.717)`},fuchsia:{50:`oklch(97.7% 0.017 320.058)`,100:`oklch(95.2% 0.037 318.852)`,200:`oklch(90.3% 0.076 319.62)`,300:`oklch(83.3% 0.145 321.434)`,400:`oklch(74% 0.238 322.16)`,500:`oklch(66.7% 0.295 322.15)`,600:`oklch(59.1% 0.293 322.896)`,700:`oklch(51.8% 0.253 323.949)`,800:`oklch(45.2% 0.211 324.591)`,900:`oklch(40.1% 0.17 325.612)`,950:`oklch(29.3% 0.136 325.661)`},pink:{50:`oklch(97.1% 0.014 343.198)`,100:`oklch(94.8% 0.028 342.258)`,200:`oklch(89.9% 0.061 343.231)`,300:`oklch(82.3% 0.12 346.018)`,400:`oklch(71.8% 0.202 349.761)`,500:`oklch(65.6% 0.241 354.308)`,600:`oklch(59.2% 0.249 0.584)`,700:`oklch(52.5% 0.223 3.958)`,800:`oklch(45.9% 0.187 3.815)`,900:`oklch(40.8% 0.153 2.432)`,950:`oklch(28.4% 0.109 3.907)`},rose:{50:`oklch(96.9% 0.015 12.422)`,100:`oklch(94.1% 0.03 12.58)`,200:`oklch(89.2% 0.058 10.001)`,300:`oklch(81% 0.117 11.638)`,400:`oklch(71.2% 0.194 13.428)`,500:`oklch(64.5% 0.246 16.439)`,600:`oklch(58.6% 0.253 17.585)`,700:`oklch(51.4% 0.222 16.935)`,800:`oklch(45.5% 0.188 13.697)`,900:`oklch(41% 0.159 10.272)`,950:`oklch(27.1% 0.105 12.094)`}},Ch=Q({minRem:nm(),maxRem:nm()}).or(J()),wh=Q({0:J().optional(),50:J(),100:J(),200:J(),300:J(),400:J(),500:J(),600:J(),700:J(),800:J(),900:J(),950:J(),1e3:J().optional()}),Th=Q({color:J().optional(),background:J().optional(),borderWidth:J().optional(),borderColor:J().optional(),boxShadow:J().optional()}),Eh=_m(Q({borderRadius:Ch.optional(),custom:ym(J(),pm([J(),nm()])).optional(),hover:Th.optional(),focus:Th.optional()}),Th),Dh=Q({family:J().optional()}),Oh=Sm(`predefinedQuestion.edit.newConversation.voteUp.voteDown.retry.message.messageLoading.thread.submit.abort.expand.help.attach.record.reward.share.audio.copy.dismiss.menu.info.menuClose.chevronDown.chevronUp.chevronTopDown.chevronDownSmall.internalLink.externalLink.liip.avatar.avatarLarge.openChat.speechInput.listUnordered.lightMode.darkMode.settings.settingsClose.sources.model.checkbox.warning.topic.headerLogo.embedAvatar.forward.phone.email`.split(`.`)),kh=ym(Oh,J()),Ah=bm(Oh,J()),jh=Q({font:Dh.optional(),colors:Q({brand:wh,accent:wh.optional(),highlight:wh,grey:wh}),base:Q({fontSizeXs:Ch.optional(),fontSizeSm:Ch.optional(),fontSizeBody:Ch.optional(),fontSizeH3:Ch.optional(),fontSizeH2:Ch.optional(),fontSizeH1:Ch.optional(),fontWeightNormal:J().optional(),fontWeightBold:J().optional(),fontWeightTitle:J().optional(),lineHeightDefault:J().optional(),lineHeightSnug:J().optional(),lineHeightTight:J().optional(),borderRadius:Ch.optional(),lineColor:J().optional(),boxShadow:J().optional()}),components:ym(J(),Eh),svgs:kh}),Mh=Q({customCSS:J().optional(),fontCSS:J().optional(),fontURLs:J().array().optional(),tokens:jh});Q({light:Mh,dark:Mh});var Nh=Q({font:Dh.optional(),colors:Q({brand:wh.partial().optional(),accent:wh.partial().optional(),highlight:wh.partial().optional(),grey:wh.partial().optional()}).optional(),base:Q({fontSizeXs:Ch.optional(),fontSizeSm:Ch.optional(),fontSizeBody:Ch.optional(),fontSizeH3:Ch.optional(),fontSizeH2:Ch.optional(),fontSizeH1:Ch.optional(),fontWeightNormal:J().optional(),fontWeightBold:J().optional(),fontWeightTitle:J().optional(),lineHeightDefault:J().optional(),lineHeightSnug:J().optional(),lineHeightTight:J().optional(),borderRadius:Ch.optional(),lineColor:J().optional(),boxShadow:J().optional()}).optional(),components:ym(J(),Eh).optional(),svgs:Ah.optional()}),Ph=Q({customCSS:J().optional(),fontCSS:J().optional(),fontURLs:J().array().optional(),tokens:Nh.optional()}),Fh=Q({light:Ph.optional(),dark:Ph.optional()}),Ih=Q({50:J(),100:J(),200:J(),300:J(),400:J(),500:J(),600:J(),700:J(),800:J(),900:J(),950:J()}),Lh=Sm([`slate`,`gray`,`zinc`,`neutral`,`stone`,`red`,`orange`,`amber`,`yellow`,`lime`,`green`,`emerald`,`teal`,`cyan`,`sky`,`blue`,`indigo`,`violet`,`purple`,`fuchsia`,`pink`,`rose`]),Rh=pm([Ih,Lh]),zh=pm([_m(Ih,Q({0:J(),1e3:J()})),Lh]),Bh=Q({avatarImageUrl:J().optional(),colors:Q({brand:Rh.optional(),highlight:Rh.optional(),grey:zh.optional(),background:J().optional(),text:J().optional(),anchor:Q({default:J().optional(),hover:J().optional()}).optional()}).optional(),font:Q({family:J().optional(),urls:Z(J()).optional(),sizeXs:Ch.optional(),sizeSm:Ch.optional(),sizeBody:Ch.optional(),sizeH3:Ch.optional(),sizeH2:Ch.optional(),sizeH1:Ch.optional(),weightNormal:J().optional(),weightBold:J().optional(),weightTitle:J().optional()}).optional(),borderRadius:Ch.optional(),fineGrained:Fh.optional()}),Vh=Q({label:J(),options:Z(Q({label:J(),value:nm()}))}),Hh=Q({label:J(),icon:J(),url:J(),target:Sm([`_blank`,`_self`]).optional()}),Uh=Q({id:J().optional(),label:J().nullable(),question:J(),switchQuestionId:J().optional()}),Wh=Q({impact:Vh.optional(),quality:Vh.optional()});Q({classification:Wh.optional()});var Gh=Q({predefinedQuestions:Z(Uh)}),Kh=pm([Q({maintenance:wm(!0)}),Q({id:J(),cID:J()})]);ym(th,$m),Q({label:J(),placeholder:J(),locked:X().optional()});var qh=Q({settingName:J(),iconName:J(),settingIntro:J().optional(),type:Sm([`single-select`,`multi-select`]),allowEmpty:X(),values:Z(J()),defaultValues:Z(J()).optional()}),Jh=Q({type:Sm([`text`,`select`,`checkbox`,`radio`]),name:J(),label:rh,placeholder:rh.optional(),required:X().optional(),options:Z(Q({value:J(),label:rh})).optional()}),Yh=Q({receiverEmail:J(),triggerLabel:rh,title:rh.optional(),caption:rh.optional(),submitLabel:rh,fields:Z(Jh)}),Xh=Q({before:Z(bh).optional(),after:Z(bh).optional()}),Zh=Q({init:Z(bh).optional(),bot:Xh.optional(),user:Xh.optional()}),Qh=_m(Q({forcePredefinedQuestions:X().optional(),forceChatPage:X().optional(),showOverallFeedbackButton:X(),showOverallFeedbackEmail:X(),showCloseChatButton:X(),showContextMenu:X(),showContextInfo:X(),showReferencesByDefault:X(),showExpandedSelectors:X(),showTextFeedback:X(),inlineLayout:X(),allowAudioInput:X(),blockPII:X(),questionPrefix:J(),menu:bm(th,Z(Hh)).optional(),supportedLanguages:Z(th),classification:Wh.optional(),answerForm:Yh.optional(),theme:Bh,translations:nh,buttonHref:J().optional(),addQueryToUrlParams:X().optional(),addRetrievalQuestionToUrlParams:X().optional(),renderKatex:X().optional(),reflectLanguageInPath:X().optional(),sendReferrer:Sm([`all`,`own`,`none`,`location`]).optional(),selectorsConfig:Z(qh).default([]),questionLengthLimit:nm().optional(),forceConsent:X().optional(),askQuestionAgain:X(),enableBackdrop:X().optional(),parentPageContext:Q({extractSelectors:J().array().optional()}),messageAdditions:Zh.optional(),contextVersion:nm().optional(),selectedTopicResetPredefinedQuestionId:J().optional()}).partial(),Q({theme:Q({name:J().optional()}).optional()})),$h=class{id;constructor(e){this.chatResponseData=e,this.id=this.chatResponseData.id}async isReadyForFeedback(){return await this.chatResponseData.readyForFeedback.toPromise(),!0}subscribe(e,t){return this.chatResponseData.readableStore.subscribe(e,t)}getContent(){return this.chatResponseData.content.toPromise()}abort(){return this.chatResponseData.abort()}async thumbsUp(){await this.isReadyForFeedback(),await this.chatResponseData.liipgptClientPrimitive.thumbsUp(this.id,this.chatResponseData.question)}async thumbsDown(){await this.isReadyForFeedback(),await this.chatResponseData.liipgptClientPrimitive.thumbsDown(this.id,this.chatResponseData.question)}async feedback(e){await this.isReadyForFeedback(),await this.chatResponseData.liipgptClientPrimitive.feedback(this.id,this.chatResponseData.question,e)}},eg=[];for(let e=0;e<256;++e)eg.push((e+256).toString(16).slice(1));function tg(e,t=0){return(eg[e[t+0]]+eg[e[t+1]]+eg[e[t+2]]+eg[e[t+3]]+`-`+eg[e[t+4]]+eg[e[t+5]]+`-`+eg[e[t+6]]+eg[e[t+7]]+`-`+eg[e[t+8]]+eg[e[t+9]]+`-`+eg[e[t+10]]+eg[e[t+11]]+eg[e[t+12]]+eg[e[t+13]]+eg[e[t+14]]+eg[e[t+15]]).toLowerCase()}var ng,rg=new Uint8Array(16);function ig(){if(!ng){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);ng=crypto.getRandomValues.bind(crypto)}return ng(rg)}var ag={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function og(e,t,n){e||={};let r=e.random??e.rng?.()??ig();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return tg(r)}function sg(e,t,n){return ag.randomUUID&&!t&&!e?ag.randomUUID():og(e,t,n)}var cg={};function lg(e,t,n){let r;if(e)r=dg(e.random??e.rng?.()??ig(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=ig();ug(cg,e,i),r=dg(i,cg.msecs,cg.seq,t,n)}return t??tg(r)}function ug(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function dg(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}var fg=new Map,pg=class{get length(){return fg.size}clear(){fg.clear()}getItem(e){return fg.get(e)||null}key(e){return Array.from(fg.keys())[e]||null}removeItem(e){fg.delete(e)}setItem(e,t){fg.set(e,String(t))}},mg=globalThis.localStorage??new pg,hg=async(e,t)=>{try{let n=mg.getItem(`liipgpt:uID`)||mg.getItem(`uID`),r={method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:JSON.stringify({referrer:globalThis?.document?.referrer||null,uID:n,...t?{startParameters:t}:{}})},i=await e.fetchData(`/login`,Kh,{},r).catch(t=>(console.log(`Failed to /login use /log`,t),e.fetchData(`/log`,Kh,{},r)));if(`maintenance`in i&&i.maintenance)return{mode:`maintenance`};if(!(`id`in i))throw Error(`Invalid response format: missing user id`);return mg.setItem(`liipgpt:uID`,i.id),{mode:`ready`,userId:i.id}}catch(e){throw console.error(`Failed to fetch user data:`,e),e}},gg=function(e,t){if(!(this instanceof gg))return new gg(e,t);this.url=e,t||={},this.headers=t.headers||{},this.payload=t.payload===void 0?``:t.payload,this.method=t.method||this.payload&&`POST`||`GET`,this.withCredentials=!!t.withCredentials,this.debug=!!t.debug,this.autoReconnect=t.autoReconnect===void 0?!1:t.autoReconnect,this.reconnectDelay=t.reconnectDelay===void 0?3e3:t.reconnectDelay,this.maxRetries=t.maxRetries===void 0?null:t.maxRetries,this.retryCount=0,this.reconnectTimer=null,this.useLastEventId=t.useLastEventId===void 0?!0:t.useLastEventId,this.FIELD_SEPARATOR=`:`,this.listeners={},this.xhr=null,this.readyState=gg.INITIALIZING,this.progress=0,this.chunk=``,this.lastEventId=``,this._hasParsedBom=!1,this.addEventListener=function(e,t){this.listeners[e]===void 0&&(this.listeners[e]=[]),this.listeners[e].indexOf(t)===-1&&this.listeners[e].push(t)},this.removeEventListener=function(e,t){if(this.listeners[e]===void 0)return;let n=[];this.listeners[e].forEach(function(e){e!==t&&n.push(e)}),n.length===0?delete this.listeners[e]:this.listeners[e]=n},this.dispatchEvent=function(e){if(!e)return!0;this.debug&&console.debug(e),e.source=this;let t=`on`+e.type;return this.hasOwnProperty(t)&&(this[t].call(this,e),e.defaultPrevented)?!1:this.listeners[e.type]?this.listeners[e.type].every(function(t){return t(e),!e.defaultPrevented}):!0},this._markClosed=function(){if(this.xhr=null,this.progress=0,this.chunk=``,this._setReadyState(gg.CLOSED),this.autoReconnect){if(this.maxRetries!==null&&this.retryCount>=this.maxRetries){this.debug&&console.debug(`SSE max retries (${this.maxRetries}) reached, stopping reconnection attempts`),this.autoReconnect=!1,this.close();return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.debug&&console.debug(`SSE will attempt to reconnect in ${this.reconnectDelay}ms (attempt ${this.retryCount+1}${this.maxRetries?`/`+this.maxRetries:``})`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.retryCount++,this.stream()},this.reconnectDelay)}},this._setReadyState=function(e){let t=new CustomEvent(`readystatechange`);t.readyState=e,this.readyState=e,this.dispatchEvent(t)},this._onStreamFailure=function(e){let t=new CustomEvent(`error`);t.responseCode=e.currentTarget.status,t.data=e.currentTarget.response,this.dispatchEvent(t),this._markClosed()},this._onStreamAbort=function(){this.dispatchEvent(new CustomEvent(`abort`)),this._markClosed()},this._onStreamProgress=function(e){if(!this.xhr)return;if(this.xhr.status<200||this.xhr.status>=300){this._onStreamFailure(e);return}this.retryCount=0;let t=this.xhr.responseText.substring(this.progress);this.progress+=t.length,!this._hasParsedBom&&this.chunk.length===0&&(t.charCodeAt(0)===65279&&(t=t.substring(1)),this._hasParsedBom=!0);let n=(this.chunk+t).split(/(\r\n\r\n|\r\r|\n\n)/g),r=n.pop();n.forEach(function(e){e.trim().length>0&&this.dispatchEvent(this._parseEventChunk(e))}.bind(this)),this.chunk=r},this._onStreamLoaded=function(e){this._onStreamProgress(e),this.dispatchEvent(this._parseEventChunk(this.chunk)),this.chunk=``,this._markClosed()},this._parseEventChunk=function(e){if(!e||e.length===0)return null;this.debug&&console.debug(e);let t={id:null,retry:null,data:null,event:null};if(e.split(/\n|\r\n|\r/).forEach(function(e){let n=e.indexOf(this.FIELD_SEPARATOR),r,i;if(n>0){let t=e[n+1]===` `?2:1;r=e.substring(0,n),i=e.substring(n+t)}else if(n<0)r=e,i=``;else return;r in t&&(r===`data`&&t[r]!==null?t.data+=`
112
- `+i:t[r]=i)}.bind(this)),t.id!==null&&t.id.indexOf(`\0`)===-1&&(this.lastEventId=t.id),t.retry!==null&&/^[0-9]+$/.test(t.retry)&&(this.reconnectDelay=parseInt(t.retry,10)),t.data===null)return null;let n=new CustomEvent(t.event||`message`);return n.id=t.id,n.data=t.data||``,n.lastEventId=this.lastEventId,n},this._onReadyStateChange=function(){if(this.xhr&&this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED){let e={},t=this.xhr.getAllResponseHeaders().trim().split(`\r
113
- `);for(let n of t){let[t,...r]=n.split(`:`),i=r.join(`:`).trim();e[t.trim().toLowerCase()]=e[t.trim().toLowerCase()]||[],e[t.trim().toLowerCase()].push(i)}let n=new CustomEvent(`open`);n.responseCode=this.xhr.status,n.headers=e,this.dispatchEvent(n),this._setReadyState(gg.OPEN)}},this.stream=function(){if(!this.xhr){this._setReadyState(gg.CONNECTING),this.xhr=new XMLHttpRequest,this.xhr.addEventListener(`progress`,this._onStreamProgress.bind(this)),this.xhr.addEventListener(`load`,this._onStreamLoaded.bind(this)),this.xhr.addEventListener(`readystatechange`,this._onReadyStateChange.bind(this)),this.xhr.addEventListener(`error`,this._onStreamFailure.bind(this)),this.xhr.addEventListener(`abort`,this._onStreamAbort.bind(this)),this.xhr.open(this.method,this.url);for(let e in this.headers)this.xhr.setRequestHeader(e,this.headers[e]);this.useLastEventId&&this.lastEventId.length>0&&this.xhr.setRequestHeader(`Last-Event-ID`,this.lastEventId),this.xhr.withCredentials=this.withCredentials,this.xhr.send(this.payload)}},this.close=function(){this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null),this.autoReconnect=!1,this.xhr&&this.xhr.abort()},(t.start===void 0||t.start)&&this.stream()};gg.INITIALIZING=-1,gg.CONNECTING=0,gg.OPEN=1,gg.CLOSED=2;var _g=class{eventSource;triggeredOnClose=!1;constructor(e,t,n){this.options=t,this.payload=n;let r={headers:{"content-type":`application/json`}};n&&(r.payload=JSON.stringify(n)),t.apiKey&&(r.headers[`api-key`]=t.apiKey),this.eventSource=new(t.EventSource??gg)(e,r),this.eventSource.onmessage=e=>{try{let n=JSON.parse(e.data);t.onMessage(n)}catch(e){t.onError(new CustomEvent(`parse-error`,{detail:e}))}},this.eventSource.onerror=e=>{t.onError(e),this.isClosed()&&this.close()}}isClosed(){return this.eventSource.readyState===EventSource.CLOSED}close(){this.isClosed()||this.eventSource.close(),this.triggeredOnClose||(this.triggeredOnClose=!0,this.options.onClose())}},vg=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>t!=null)),yg=class{constructor(e){this.options=e}getDefaultHeaders(e={}){let t={"Content-Type":`application/json`,...e};return this.options.apiKey&&(t[`api-key`]=this.options.apiKey),t}get speechRecognitionApiKey(){return this.options.speechRecognitionApiKey}async subscribeSse(e,t={},n){let r=vg(t);return this.options.apiKey&&(n.apiKey=this.options.apiKey),new _g(`${this.options.apiUrl}${e}`,n,r)}async fetchData(e,t,n={},r={}){let i=`${this.options.apiUrl}${e}?${new URLSearchParams(vg(n)).toString()}`,a={...r,headers:this.getDefaultHeaders(r?.headers)},o=await fetch(i,a);if(!o.ok){let e=await o.text();throw Error(`API request failed: ${o.status} - ${e}`)}let s=await o.json(),{success:c,data:l,error:u}=t.safeParse(s);if(this.options.strict){if(!c)throw console.error(`Server response has wrong type:
114
- `,{error:u,url:i,opts:a,data:s}),Error(`Server response has wrong type: ${u.message}`);return l}else return c||console.warn(`Server response has wrong type:
115
- `,{error:u,url:i,opts:a,data:s}),s}async postData(e,t){let n=await fetch(`${this.options.apiUrl}${e}`,{method:`POST`,headers:this.getDefaultHeaders(),body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw Error(`${n.status} - ${e}`)}return n}async postFormData(e,t){let n=await fetch(`${this.options.apiUrl}${e}`,{method:`POST`,body:t});if(!n.ok){let e=await n.text();throw Error(`${n.status} - ${e}`)}return n}},bg=Q({links:Z(Q({url:J().url().optional(),title:J().optional(),considered:X().optional(),orgMetadata:Q({authors:Z(J()).optional()}).optional(),type:J().optional(),date:J().datetime().optional(),similarity:nm().optional(),content:J().optional(),fromFullTextSearch:X().optional(),rerank:Q({index:nm().int().optional(),adjustment:nm().optional(),score:nm().optional(),similarityOld:nm().optional()}).optional()}).or(fh))}),xg=e=>{if(`metadata`in e)return e;console.warn(`Please upgrade your backend you are currently using an old api feature.`);let t=e.orgMetadata??{};e?.fromFullTextSearch&&(t.fromFullTextSearch=e?.fromFullTextSearch),e?.rerank&&(t.rerank=e?.rerank);let n=[],r=e.title??``;if(e.title&&e.title.includes(` > `)){let t=e.title.split(` > `);r=t.pop()??``,n=t}return{url:e.url??``,title:r,score:e.similarity||0,breadcrumbs:n,metadata:t,description:e.content,date:e.date}},Sg=7,Cg=8,wg=160,Tg=e=>{let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===`<`){let r=e.indexOf(`>`,n);if(r!==-1){t.push({type:`tag`,value:e.slice(n,r+1)}),n=r+1;continue}}if(/\s/.test(r)){let r=n;for(;r<e.length&&/\s/.test(e[r]);)r++;t.push({type:`space`,value:e.slice(n,r)}),n=r;continue}let i=n;for(;i<e.length&&!/\s/.test(e[i])&&e[i]!==`<`;)i++;t.push({type:`word`,value:e.slice(n,i)}),n=i}return t},Eg=e=>{let t=Tg(e),n=[],r=``,i=!1;for(let e of t)e.type===`space`&&i?(n.push(r),r=e.value,i=!1):(r+=e.value,e.type===`word`&&(i=!0));return r&&n.push(r),n},Dg=e=>Math.max(Cg,Math.min(wg,e.length*Sg)),Og=class{queue=[];timeoutId=null;isProcessing=!1;constructor(e){this.onText=e}ingestText(e){let t=Eg(e);if(t.length>=5){for(let e of t)this.queue.push({kind:`text`,chunk:e,delayMs:Dg(e)});this.kickoff();return}this.runAfterTyping(()=>this.onText(e))}runAfterTyping(e){if(this.queue.length===0&&!this.isProcessing){e();return}this.queue.push({kind:`fn`,fn:e}),this.kickoff()}runWithWarmup(e){this.queue.push({kind:`fn`,fn:e}),this.kickoff()}clear(){this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.queue=[],this.isProcessing=!1}kickoff(){this.isProcessing||this.timeoutId!==null||(this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.processNext()},750))}processNext(){let e=this.queue.shift();if(!e){this.isProcessing=!1;return}this.isProcessing=!0,e.kind===`text`?(this.onText(e.chunk),this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.processNext()},e.delayMs)):(e.fn(),this.processNext())}},kg=class{constructor(e){this.results=e}},Ag=class{internalData;renderers=new Map;markedExtensions=[];_newTabSrText;constructor(e){let t=new yg({apiUrl:e.apiUrl,apiKey:e.apiKey,speechRecognitionApiKey:e.speechRecognitionApiKey,strict:e.strict??!1,EventSource:e.EventSource??EventSource});this.internalData={restClient:t,metadata:hg(t,e.startParameters),searchResponseMap:new Map,chatResponseMap:new Map,conversationMap:new Map}}setMarkedExtensions(...e){this.markedExtensions=e}setNewTabSrText(e){this._newTabSrText=e}getMetadata(){return this.internalData.metadata}createConversationId(){let e=lg();return this.renderers.set(e,new pc({extensions:this.markedExtensions,newTabSrText:this._newTabSrText})),e}chat(e,t,n={}){let r=new gc,i=lg(),a=new hc,o=new bc({id:i,onError:e=>{n.onError?.(e)},onFinish:e=>{r.setValue(e)},markdownRenderer:this.renderers.get(e)??new pc({extensions:this.markedExtensions,newTabSrText:this._newTabSrText}),userQuestion:t}),s=async()=>{await a,(await c).close()},c=new gc,l=new Og(e=>o.updateText(e));(async()=>{let s=await this.internalData.metadata;if(s.mode===`maintenance`)throw Error(`Can not chat in maintenance mode`);let u=await this.internalData.restClient.subscribeSse(`/assistant/sse`,{query:t,uID:s.userId,cID:e,rID:i,lang:n.lang,feature:n.features?.join(`,`),referrer:n.referrer,source:n.source,...n.selectorValues??{},...n.mode?{mode:n.mode}:{},...n.cache?{cache:!0}:{},...n.predefinedQuestionId?{predefinedQuestionId:n.predefinedQuestionId}:{},...n.switchQuestionId?{switchQuestionId:n.switchQuestionId}:{},chat:`true`,version:`2`},{onClose:()=>{l.clear(),o.finishMessage(),a.resolve(),r.cleanup()},onMessage:t=>{let r=t;switch(r.type){case`error`:l.runAfterTyping(()=>o.pushError(r.error));break;case`id`:r.for===`request`&&i!==r.id&&console.warn(`Unexpected request id "${r.id}" expected "${i}"`),r.for===`conversation`&&e!==r.id&&console.warn(`Unexpected conversation id "${r.id}" expected "${e}"`);break;case`state`:r.state===`history-entry-initialized`&&a.resolve();break;case`text`:l.ingestText(r.text);break;case`done`:case`answer-done`:l.runAfterTyping(()=>{o.finishMessage(),a.resolve(),c.then(e=>e.close())});break;case`unexpected-call`:l.runAfterTyping(()=>{console.error(`unexpected-call:`,r),o.pushError(`unexpected-call`)});break;case`jsonld-component`:case`mapped-reference`:l.runAfterTyping(()=>o.addMappedReference(r.reference));break;case`reference`:l.runAfterTyping(()=>o.addOldReference(r.reference));break;case`retrieval-question`:l.runAfterTyping(()=>o.updateRetrievalQuestion(r.question));break;case`no-feedback`:l.runAfterTyping(()=>o.setNoFeedback());break;case`component`:l.runWithWarmup(()=>n.onEmbed?.(r));break}l.runAfterTyping(()=>n.onMessage?.(r))},onError:e=>{console.error(` sse-error:`,e),!(`data`in e&&!e.data&&`responseCode`in e&&e.responseCode===0)&&o.pushError(`sse-error`)}});c.setValue(u)})();let u=new $h({question:t,id:i,content:r,readableStore:o.getReadableStore(),readyForFeedback:a,abort:s,liipgptClientPrimitive:this});return this.internalData.chatResponseMap.set(u.id,u),u}async thumbs(e,t,n){if((await this.internalData.metadata).mode!==`ready`)throw Error(`Can not post feedback unless we are in ready mode`);let r={feedback:n,rID:e,query:t};await this.internalData.restClient.postData(`/quickfeedback`,r)}thumbsUp(e,t){return this.thumbs(e,t,`positive`)}thumbsDown(e,t){return this.thumbs(e,t,`negative`)}async feedback(e,t,n){let r=await this.internalData.metadata;if(r.mode!==`ready`)throw Error(`Can not post feedback unless we are in ready mode`);if(n.message){let i={body:n.message,email:n.email,rID:e,uID:r.userId,query:t};await this.internalData.restClient.postData(`/feedback`,i)}n.classification&&await this.internalData.restClient.postData(`/classification`,{impact:n.classification.impact,quality:n.classification.quality,rID:e})}async submitAnswerForm(e){let t=await this.internalData.metadata;if(t.mode!==`ready`)throw Error(`Can not submit the answer form unless we are in ready mode`);let n={receiverEmail:e.receiverEmail,fields:e.fields,query:e.question,answer:e.answer,rID:e.requestId,uID:t.userId,lang:e.lang};await this.internalData.restClient.postData(`/customform`,n)}async userAction(e,t={}){let n=await this.internalData.metadata;if(n.mode!==`ready`)throw Error(`Can not post user action unless we are in ready mode`);let r={uID:n.userId,cID:t.conversationId,lang:t.lang,userAction:e};await this.internalData.restClient.postData(`/assistant/userAction`,r)}async search(e,t={}){let n=await this.internalData.metadata,r=n.mode===`ready`?n.userId:void 0,{links:i}=await this.internalData.restClient.fetchData(`/assistant/search`,bg,{modelId:t.model,lang:t.language,query:e,mapResults:`true`,uID:r});return new kg(i.map(xg))}async getChatConfig(){return this.internalData.restClient.fetchData(`/chatconfig`,Qh)}async getChatHistory(e,t){try{let n=await this.internalData.restClient.postData(`/chathistory`,{cID:e,uID:t}),r=xh.safeParse(await n.json());return r.success?r.data:[]}catch(e){return console.error(`Failed to load chat history:`,e),[]}}async getPredefinedQuestions(e){return(await this.internalData.restClient.fetchData(`/topics/questions`,Gh,e)).predefinedQuestions}async transcribeAudio(e,t={}){let n=await this.internalData.metadata,r=t.lang||`de-CH`;if(n.mode===`maintenance`)throw Error(`Can not transcribe audio in maintenance mode`);try{let t=(e=>e.includes(`mp4`)?`mp4`:e.includes(`webm`)?`webm`:(e.includes(`wav`),`wav`))(e.type),n=new FormData;return n.append(`file`,e,`audio.${t}`),n.append(`lang`,r),n.append(`type`,e.type),{transcript:await(await this.internalData.restClient.postFormData(`/speech?key=${this.internalData.restClient.speechRecognitionApiKey||``}&lang=${r}`,n)).text()||``,error:void 0}}catch(e){return console.error(`Error transcribing audio:`,e),{transcript:``,error:e instanceof Error?e.message:`Unknown error`}}}},jg=l(s(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(p(e,i)&&n.isMergeableObject(t[i])?r[i]=u(i,n)(e[i],t[i],n):r[i]=c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))(),1),Mg=e=>typeof e!=`object`||!e,Ng=e=>{if(Mg(e))return e;if(Array.isArray(e))return e.map(Ng);let t=Object.entries(e).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Ng(t)]);return Object.fromEntries(t)},Pg=(e,t)=>(0,jg.default)(e,Ng(t)),Fg={tokens:{font:{family:`-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif`},colors:{brand:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`},highlight:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`},grey:{0:`#ffffff`,50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`,1e3:`#000000`}},base:{fontSizeXs:{minRem:.75,maxRem:.875},fontSizeSm:{minRem:1,maxRem:1},fontSizeBody:{minRem:1,maxRem:1.25},fontSizeH3:{minRem:1.125,maxRem:1.5},fontSizeH2:{minRem:1.25,maxRem:1.75},fontSizeH1:{minRem:1.5,maxRem:2},fontWeightNormal:`400`,fontWeightBold:`700`,fontWeightTitle:`700`,lineHeightDefault:`1.5`,lineHeightSnug:`1.375`,lineHeightTight:`1.25`,borderRadius:{minRem:.5,maxRem:.75},lineColor:`color-mix(in srgb, var(--color-brand-950) 20%, transparent)`,boxShadow:`0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},components:{body:{background:`var(--color-grey-0)`,color:`var(--color-grey-900)`,focus:{color:`var(--color-highlight-500)`},custom:{selectionColor:`var(--color-grey-0)`,selectionBackground:`var(--color-brand-700)`,focusWidth:`var(--spacer-3)`,focusOffset:`var(--spacer-2)`,focusStyle:`solid`}},container:{custom:{maxWidth:`1024px`}},avatar:{color:`var(--color-brand-400)`,background:`var(--color-grey-100)`},anchor:{color:`var(--color-brand-700)`,hover:{color:`var(--color-brand-950)`}},btnPrimary:{color:`var(--color-grey-0)`,background:`var(--color-brand-700)`,borderRadius:`var(--base-border-radius)`,hover:{background:`var(--color-brand-900)`}},btnSecondary:{color:`var(--color-brand-700)`,background:`var(--color-brand-100)`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--color-grey-1000)`,background:`var(--color-brand-200)`}},btnTertiary:{color:`var(--anchor-color)`,background:`transparent`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--anchor-hover-color)`}},card:{color:`var(--color-grey-900)`,background:`var(--color-grey-100)`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,hover:{color:`var(--color-grey-1000)`,background:`var(--color-brand-100)`},custom:{iconColor:`var(--anchor-color)`,iconHoverColor:`var(--anchor-hover-color)`}},input:{background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,custom:{padding:`var(--spacer-r-16) var(--spacer-r-20)`,placeholderColor:`var(--color-grey-500)`,placeholderOpacity:`1`}},label:{color:`var(--color-grey-900)`,custom:{fontWeight:`var(--base-font-weight-bold)`}},hr:{color:`var(--base-line-color)`},checkbox:{color:`transparent`,background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,borderRadius:`0.2em`,custom:{checkedColor:`var(--btn-primary-color)`,checkedBorderColor:`var(--color-brand-700)`,checkedBackground:`var(--color-brand-700)`}},radio:{color:`transparent`,background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,custom:{checkedColor:`var(--btn-primary-color)`,checkedBorderColor:`var(--color-brand-700)`,checkedBackground:`var(--color-brand-700)`}},contextBox:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--base-box-shadow)`,custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:`var(--color-grey-1000)`,titleFontWeight:`var(--base-font-weight-bold)`,separatorColor:`var(--base-line-color)`,errorColor:`var(--message-error-color)`}},contextBoxMenuItem:{background:`transparent`,color:`var(--body-color)`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--btn-secondary-hover-color)`,background:`var(--btn-secondary-hover-background)`},custom:{activeColor:`var(--btn-secondary-hover-color)`,activeBackground:`var(--btn-secondary-hover-background)`}},chatFooter:{color:`var(--color-grey-400)`,background:`var(--body-background)`,borderRadius:`var(--base-border-radius)`,boxShadow:`0px -10px 20px 5px color-mix(in srgb, var(--body-background) 100%, transparent)`},chatInput:{color:`var(--color-grey-700)`,background:`var(--card-background)`,borderRadius:`var(--base-border-radius)`,borderColor:`transparent`,borderWidth:`3px`,hover:{background:`var(--card-hover-background)`},focus:{borderColor:`var(--body-focus-color)`}},chatInputSubmit:{color:`var(--btn-primary-color)`,background:`var(--btn-primary-background)`,borderRadius:`calc(var(--base-border-radius) / 1.25)`,hover:{color:`var(--btn-primary-hover-color)`,background:`var(--btn-primary-hover-background)`},custom:{strokeWidth:`2`,deactivatedBackground:`var(--color-grey-500)`,deactivatedOpacity:`0.25`,deactivatedScale:`0.8`,deactivatedBorderColor:`var(--color-grey-500)`}},chatInputNotification:{background:`#DD135A`,color:`var(--color-grey-0)`,borderColor:`#DD135A`,borderWidth:`1px`,borderRadius:`var(--chat-input-border-radius)`},selectedTopic:{color:`var(--body-color)`,background:`var(--color-brand-100)`,borderColor:`var(--body-background)`,borderWidth:`2px`,borderRadius:`var(--base-border-radius)`,custom:{padding:`var(--spacer-10) var(--spacer-20)`,separatorWidth:`var(--spacer-2)`,labelGap:`var(--spacer-12)`,btnColor:`var(--btn-tertiary-color)`,btnHoverColor:`var(--btn-tertiary-hover-color)`}},dialog:{background:`var(--card-background)`,color:`var(--body-color)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--base-box-shadow)`,custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:`rgba(0, 0, 0, 0.25)`,headerBorderBottomColor:`var(--base-line-color)`}},aside:{background:`var(--card-background)`,custom:{width:`400px`,containerWidthForMobileLayout:1024,backgroundOverlay:`rgba(0, 0, 0, 0.4)`,headerColor:`var(--card-color)`,headerBorderColor:`var(--base-line-color)`,headerBorderWidth:`1px`}},message:{color:`var(--body-color)`,custom:{errorColor:`#C91658`,transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:`var(--base-line-color)`,borderWidth:`1px`,custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageJsonLdMap:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`,custom:{markerColor:`#6658c8`,tileUrl:`https://tile.openstreetmap.org/{z}/{x}/{y}.png`}},messageJsonLdEvent:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`},messageJsonLdCta:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`},messageUser:{color:`var(--body-color)`,background:`var(--card-background)`,boxShadow:`var(--card-box-shadow)`,borderRadius:`var(--card-border-radius)`},openButton:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-background)`,borderWidth:`0`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--card-hover-color)`,background:`var(--card-hover-background)`},custom:{hideTitleWhenCollapsed:0,autoExpandScrollThreshold:0,autoCollapseDelay:0,autoExpandOnce:0}},referencesToggle:{color:`var(--color-brand-700)`,hover:{color:`var(--anchor-hover-color)`}},referenceNumberTrigger:{color:`var(--btn-secondary-color)`,background:`var(--btn-secondary-background)`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--btn-secondary-hover-color)`,background:`var(--btn-secondary-hover-background)`},custom:{padding:`0.25em`}},referenceDomain:{color:`var(--color-brand-700)`,hover:{color:`var(--color-brand-800)`},custom:{padding:`0px`}},referenceNumberContent:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,hover:{color:`var(--card-hover-color)`,background:`var(--card-hover-background)`,borderColor:`var(--card-hover-border-color)`,borderWidth:`var(--card-hover-border-width)`},boxShadow:`var(--base-box-shadow)`,custom:{width:`95cqi`,maxWidth:`450px`,transitionDuration:200,transitionDelay:200,transitionY:8}},reference:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,hover:{color:`var(--card-hover-color)`,background:`var(--body-background)`,borderColor:`var(--card-hover-border-color)`,borderWidth:`var(--card-hover-border-width)`}},referenceDescription:{color:`var(--reference-color)`,hover:{color:`var(--reference-hover-color)`}},referenceNumber:{color:`var(--reference-number-trigger-color)`,background:`var(--body-background)`,borderColor:`var(--reference-number-trigger-border-color)`,borderWidth:`var(--reference-number-trigger-border-width)`,borderRadius:`var(--reference-number-trigger-border-radius)`,hover:{color:`var(--reference-number-trigger-color)`,background:`var(--reference-number-trigger-background)`,borderColor:`var(--reference-number-trigger-border-color)`,borderWidth:`var(--reference-number-trigger-border-width)`},custom:{padding:`var(--reference-number-trigger-padding)`}},toast:{background:`var(--card-background)`,color:`var(--body-color)`,boxShadow:`var(--base-box-shadow)`,borderRadius:`var(--card-border-radius)`,custom:{iconSuccessColor:`#22c55e`,iconErrorColor:`#ef4444`,iconWarningColor:`#f97316`,iconInfoColor:`#3b82f6`}},tooltip:{background:`var(--color-grey-200)`,color:`var(--body-color)`,borderRadius:`calc(var(--base-border-radius) / 2)`},flyout:{custom:{backdropColor:`var(--color-brand-800)`,backdropOpacity:`0.4`,backdropDelayIn:`0`,backdropDurationIn:`200`,backdropDelayOut:`0`,backdropDurationOut:`150`,backdropBaseScaleIn:`1`,backdropBaseScaleOut:`1`,backdropTransformOrigin:`center`,backdropScaleDirection:`scale`}},searchSummary:{color:`var(--card-color)`,background:`var(--color-grey-50)`,borderColor:`var(--color-grey-100)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,custom:{padding:`clamp(0.75rem, 0.6364rem + 0.5682cqw, 1rem)`,linkColor:`var(--anchor-color)`,referenceListColor:`var(--anchor-color)`,referenceListFontSize:`1em`,disclaimerLinkColor:`var(--anchor-color)`,errorColor:`var(--message-error-color)`,footerBackground:`var(--search-summary-footer-background)`}}},svgs:{predefinedQuestion:`
55
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function $l(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:tu(t,`input`,e.processors),output:tu(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function W(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return W(r.element,n);if(r.type===`set`)return W(r.valueType,n);if(r.type===`lazy`)return W(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return W(r.innerType,n);if(r.type===`intersection`)return W(r.left,n)||W(r.right,n);if(r.type===`record`||r.type===`map`)return W(r.keyType,n)||W(r.valueType,n);if(r.type===`pipe`)return W(r.in,n)||W(r.out,n);if(r.type===`object`){for(let e in r.shape)if(W(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(W(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(W(e,n))return!0;return!!(r.rest&&W(r.rest,n))}return!1}var eu=(e,t={})=>n=>{let r=Zl({...n,processors:t});return U(e,r),Ql(r,e),$l(r,e)},tu=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Zl({...i??{},target:a,io:t,processors:n});return U(e,o),Ql(o,e),$l(o,e)},nu={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ru=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=nu[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},iu=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},au=(e,t,n,r)=>{n.type=`boolean`},ou=(e,t,n,r)=>{n.not={}},su=(e,t,n,r)=>{let i=e._zod.def,a=za(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},cu=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},lu=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},uu=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},du=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=U(a.element,t,{...r,path:[...r.path,`items`]})},fu=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=U(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=U(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},pu=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>U(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},mu=(e,t,n,r)=>{let i=e._zod.def,a=U(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=U(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},hu=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=U(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=U(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=U(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},gu=(e,t,n,r)=>{let i=e._zod.def,a=U(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},_u=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},vu=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},yu=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},bu=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},xu=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;U(a,t,r);let o=t.seen.get(e);o.ref=a},Su=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Cu=(e,t,n,r)=>{let i=e._zod.def;U(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},wu=R(`ZodISODateTime`,(e,t)=>{Ks.init(e,t),q.init(e,t)});function Tu(e){return vl(wu,e)}var Eu=R(`ZodISODate`,(e,t)=>{qs.init(e,t),q.init(e,t)});function Du(e){return yl(Eu,e)}var Ou=R(`ZodISOTime`,(e,t)=>{Js.init(e,t),q.init(e,t)});function ku(e){return bl(Ou,e)}var Au=R(`ZodISODuration`,(e,t)=>{Ys.init(e,t),q.init(e,t)});function ju(e){return xl(Au,e)}var Mu=(e,t)=>{xo.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>wo(e,t)},flatten:{value:t=>Co(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ba,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ba,2)}},isEmpty:{get(){return e.issues.length===0}}})};R(`ZodError`,Mu);var Nu=R(`ZodError`,Mu,{Parent:Error}),Pu=To(Nu),Fu=Eo(Nu),Iu=Do(Nu),Lu=ko(Nu),Ru=jo(Nu),zu=Mo(Nu),Bu=No(Nu),Vu=Po(Nu),Hu=Fo(Nu),Uu=Io(Nu),Wu=Lo(Nu),Gu=Ro(Nu),G=R(`ZodType`,(e,t)=>(V.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:tu(e,`input`),output:tu(e,`output`)}}),e.toJSONSchema=eu(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(qa(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>ro(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Pu(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Iu(e,t,n),e.parseAsync=async(t,n)=>Fu(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Lu(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ru(e,t,n),e.decode=(t,n)=>zu(e,t,n),e.encodeAsync=async(t,n)=>Bu(e,t,n),e.decodeAsync=async(t,n)=>Vu(e,t,n),e.safeEncode=(t,n)=>Hu(e,t,n),e.safeDecode=(t,n)=>Uu(e,t,n),e.safeEncodeAsync=async(t,n)=>Wu(e,t,n),e.safeDecodeAsync=async(t,n)=>Gu(e,t,n),e.refine=(t,n)=>e.check(rf(t,n)),e.superRefine=t=>e.check(af(t)),e.overwrite=t=>e.check(Vl(t)),e.optional=()=>zd(e),e.exactOptional=()=>Vd(e),e.nullable=()=>Ud(e),e.nullish=()=>zd(Ud(e)),e.nonoptional=t=>Yd(e,t),e.array=()=>Y(e),e.or=t=>Td([e,t]),e.and=t=>kd(e,t),e.transform=t=>$d(e,Ld(t)),e.default=t=>Gd(e,t),e.prefault=t=>qd(e,t),e.catch=t=>Zd(e,t),e.pipe=t=>$d(e,t),e.readonly=()=>tf(e),e.describe=t=>{let n=e.clone();return Jc.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return Jc.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Jc.get(e);let n=e.clone();return Jc.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Ku=R(`_ZodString`,(e,t)=>{Ps.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ru(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Fl(...t)),e.includes=(...t)=>e.check(Rl(...t)),e.startsWith=(...t)=>e.check(zl(...t)),e.endsWith=(...t)=>e.check(Bl(...t)),e.min=(...t)=>e.check(Nl(...t)),e.max=(...t)=>e.check(Ml(...t)),e.length=(...t)=>e.check(Pl(...t)),e.nonempty=(...t)=>e.check(Nl(1,...t)),e.lowercase=t=>e.check(Il(t)),e.uppercase=t=>e.check(Ll(t)),e.trim=()=>e.check(Ul()),e.normalize=(...t)=>e.check(Hl(...t)),e.toLowerCase=()=>e.check(Wl()),e.toUpperCase=()=>e.check(Gl()),e.slugify=()=>e.check(Kl())}),qu=R(`ZodString`,(e,t)=>{Ps.init(e,t),Ku.init(e,t),e.email=t=>e.check(Xc(Ju,t)),e.url=t=>e.check(nl(Zu,t)),e.jwt=t=>e.check(_l(fd,t)),e.emoji=t=>e.check(rl(Qu,t)),e.guid=t=>e.check(Zc(Yu,t)),e.uuid=t=>e.check(Qc(Xu,t)),e.uuidv4=t=>e.check($c(Xu,t)),e.uuidv6=t=>e.check(el(Xu,t)),e.uuidv7=t=>e.check(tl(Xu,t)),e.nanoid=t=>e.check(il($u,t)),e.guid=t=>e.check(Zc(Yu,t)),e.cuid=t=>e.check(al(ed,t)),e.cuid2=t=>e.check(ol(td,t)),e.ulid=t=>e.check(sl(nd,t)),e.base64=t=>e.check(ml(ld,t)),e.base64url=t=>e.check(hl(ud,t)),e.xid=t=>e.check(cl(rd,t)),e.ksuid=t=>e.check(ll(id,t)),e.ipv4=t=>e.check(ul(ad,t)),e.ipv6=t=>e.check(dl(od,t)),e.cidrv4=t=>e.check(fl(sd,t)),e.cidrv6=t=>e.check(pl(cd,t)),e.e164=t=>e.check(gl(dd,t)),e.datetime=t=>e.check(Tu(t)),e.date=t=>e.check(Du(t)),e.time=t=>e.check(ku(t)),e.duration=t=>e.check(ju(t))});function K(e){return Yc(qu,e)}var q=R(`ZodStringFormat`,(e,t)=>{H.init(e,t),Ku.init(e,t)}),Ju=R(`ZodEmail`,(e,t)=>{Ls.init(e,t),q.init(e,t)}),Yu=R(`ZodGUID`,(e,t)=>{Fs.init(e,t),q.init(e,t)}),Xu=R(`ZodUUID`,(e,t)=>{Is.init(e,t),q.init(e,t)}),Zu=R(`ZodURL`,(e,t)=>{Rs.init(e,t),q.init(e,t)}),Qu=R(`ZodEmoji`,(e,t)=>{zs.init(e,t),q.init(e,t)}),$u=R(`ZodNanoID`,(e,t)=>{Bs.init(e,t),q.init(e,t)}),ed=R(`ZodCUID`,(e,t)=>{Vs.init(e,t),q.init(e,t)}),td=R(`ZodCUID2`,(e,t)=>{Hs.init(e,t),q.init(e,t)}),nd=R(`ZodULID`,(e,t)=>{Us.init(e,t),q.init(e,t)}),rd=R(`ZodXID`,(e,t)=>{Ws.init(e,t),q.init(e,t)}),id=R(`ZodKSUID`,(e,t)=>{Gs.init(e,t),q.init(e,t)}),ad=R(`ZodIPv4`,(e,t)=>{Xs.init(e,t),q.init(e,t)}),od=R(`ZodIPv6`,(e,t)=>{Zs.init(e,t),q.init(e,t)}),sd=R(`ZodCIDRv4`,(e,t)=>{Qs.init(e,t),q.init(e,t)}),cd=R(`ZodCIDRv6`,(e,t)=>{$s.init(e,t),q.init(e,t)}),ld=R(`ZodBase64`,(e,t)=>{tc.init(e,t),q.init(e,t)}),ud=R(`ZodBase64URL`,(e,t)=>{rc.init(e,t),q.init(e,t)}),dd=R(`ZodE164`,(e,t)=>{ic.init(e,t),q.init(e,t)}),fd=R(`ZodJWT`,(e,t)=>{oc.init(e,t),q.init(e,t)}),pd=R(`ZodNumber`,(e,t)=>{sc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iu(e,t,n,r),e.gt=(t,n)=>e.check(kl(t,n)),e.gte=(t,n)=>e.check(Al(t,n)),e.min=(t,n)=>e.check(Al(t,n)),e.lt=(t,n)=>e.check(Dl(t,n)),e.lte=(t,n)=>e.check(Ol(t,n)),e.max=(t,n)=>e.check(Ol(t,n)),e.int=t=>e.check(gd(t)),e.safe=t=>e.check(gd(t)),e.positive=t=>e.check(kl(0,t)),e.nonnegative=t=>e.check(Al(0,t)),e.negative=t=>e.check(Dl(0,t)),e.nonpositive=t=>e.check(Ol(0,t)),e.multipleOf=(t,n)=>e.check(jl(t,n)),e.step=(t,n)=>e.check(jl(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function md(e){return Sl(pd,e)}var hd=R(`ZodNumberFormat`,(e,t)=>{cc.init(e,t),pd.init(e,t)});function gd(e){return Cl(hd,e)}var _d=R(`ZodBoolean`,(e,t)=>{lc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>au(e,t,n,r)});function J(e){return wl(_d,e)}var vd=R(`ZodUnknown`,(e,t)=>{uc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function yd(){return Tl(vd)}var bd=R(`ZodNever`,(e,t)=>{dc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ou(e,t,n,r)});function xd(e){return El(bd,e)}var Sd=R(`ZodArray`,(e,t)=>{pc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>du(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Nl(t,n)),e.nonempty=t=>e.check(Nl(1,t)),e.max=(t,n)=>e.check(Ml(t,n)),e.length=(t,n)=>e.check(Pl(t,n)),e.unwrap=()=>e.element});function Y(e,t){return ql(Sd,e,t)}var Cd=R(`ZodObject`,(e,t)=>{vc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fu(e,t,n,r),z(e,`shape`,()=>t.shape),e.keyof=()=>Z(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yd()}),e.loose=()=>e.clone({...e._zod.def,catchall:yd()}),e.strict=()=>e.clone({...e._zod.def,catchall:xd()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>co(e,t),e.safeExtend=t=>lo(e,t),e.merge=t=>uo(e,t),e.pick=t=>oo(e,t),e.omit=t=>so(e,t),e.partial=(...t)=>fo(Rd,e,t[0]),e.required=(...t)=>po(Jd,e,t[0])});function X(e,t){return new Cd({type:`object`,shape:e??{},...B(t)})}var wd=R(`ZodUnion`,(e,t)=>{bc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pu(e,t,n,r),e.options=t.options});function Td(e,t){return new wd({type:`union`,options:e,...B(t)})}var Ed=R(`ZodDiscriminatedUnion`,(e,t)=>{wd.init(e,t),xc.init(e,t)});function Dd(e,t,n){return new Ed({type:`union`,options:t,discriminator:e,...B(n)})}var Od=R(`ZodIntersection`,(e,t)=>{Sc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mu(e,t,n,r)});function kd(e,t){return new Od({type:`intersection`,left:e,right:t})}var Ad=R(`ZodRecord`,(e,t)=>{Tc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hu(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function jd(e,t,n){return new Ad({type:`record`,keyType:e,valueType:t,...B(n)})}function Md(e,t,n){let r=ro(e);return r._zod.values=void 0,new Ad({type:`record`,keyType:r,valueType:t,...B(n)})}var Nd=R(`ZodEnum`,(e,t)=>{Ec.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>su(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Nd({...t,checks:[],...B(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Nd({...t,checks:[],...B(r),entries:i})}});function Z(e,t){return new Nd({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(t)})}var Pd=R(`ZodLiteral`,(e,t)=>{Dc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cu(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Fd(e,t){return new Pd({type:`literal`,values:Array.isArray(e)?e:[e],...B(t)})}var Id=R(`ZodTransform`,(e,t)=>{Oc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uu(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ia(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(yo(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(yo(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ld(e){return new Id({type:`transform`,transform:e})}var Rd=R(`ZodOptional`,(e,t)=>{Ac.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zd(e){return new Rd({type:`optional`,innerType:e})}var Bd=R(`ZodExactOptional`,(e,t)=>{jc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vd(e){return new Bd({type:`optional`,innerType:e})}var Hd=R(`ZodNullable`,(e,t)=>{Mc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ud(e){return new Hd({type:`nullable`,innerType:e})}var Wd=R(`ZodDefault`,(e,t)=>{Nc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gd(e,t){return new Wd({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():eo(t)}})}var Kd=R(`ZodPrefault`,(e,t)=>{Fc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qd(e,t){return new Kd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():eo(t)}})}var Jd=R(`ZodNonOptional`,(e,t)=>{Ic.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_u(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yd(e,t){return new Jd({type:`nonoptional`,innerType:e,...B(t)})}var Xd=R(`ZodCatch`,(e,t)=>{Rc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zd(e,t){return new Xd({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Qd=R(`ZodPipe`,(e,t)=>{zc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xu(e,t,n,r),e.in=t.in,e.out=t.out});function $d(e,t){return new Qd({type:`pipe`,in:e,out:t})}var ef=R(`ZodReadonly`,(e,t)=>{Vc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Su(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tf(e){return new ef({type:`readonly`,innerType:e})}var nf=R(`ZodCustom`,(e,t)=>{Uc.init(e,t),G.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lu(e,t,n,r)});function rf(e,t={}){return Jl(nf,e,t)}function af(e){return Yl(e)}var of=X({blocked:K(),maintenance:K(),"rate-limit":K(),"server-error":K(),"too-short":K(),"too-long":K(),"quota-reached":K(),aborted:K(),"sse-error":K(),"client-error":K(),"unexpected-call":K(),"incomplete-error":K(),"feedback-failed":K(),"answer-form-failed":K(),"speech-not-supported":K(),"speech-transcription-failed":K(),"speech-no-text-detected":K(),"speech-microphone-access-denied":K(),"pii-detected":K()}),sf=X({email:K(),creditCard:K(),ahv:K(),phoneSwiss:K(),phoneInternational:K(),swissPassport:K(),longNumber:K()}),cf=X({name:K(),namePlural:K().optional(),intro:K().optional(),placeholder:K(),values:jd(K(),K())}),lf=X({action:K(),label:K(),type:Z([`primary`,`secondary`]).optional()}),uf=X({hash:K(),title:K(),content:K(),actions:Y(lf).optional()}),df=X({introductionTitle:K(),introductionDisclaimer:K().optional(),termsInvitationToConsent:K().optional(),chatInputPlaceholder:K(),chatInputPlaceholderListening:K().optional(),chatInputSubmit:K(),chatInputAbort:K(),chatInputStartListening:K(),chatInputStopListening:K(),referenceLink:K(),referencesDisplay:K(),referencesHide:K(),referencesTitle:K(),referencesFurtherTitle:K(),newChat:K(),maintenanceModeError:K(),messageBotLoading:K(),messageBotError:K(),messageBotDefaultError:K(),noResultsFound:K(),chatFooterText:K().optional(),scrollToBottom:K(),openButtonTitle:K().optional(),openButtonDescription:K().optional(),openMenu:K(),openInfo:K(),aboutThisChat:K().optional(),closeMenu:K(),closeChat:K(),close:K(),send:K(),thankYouForFeedback:K(),answerFormThankYou:K(),giveFeedback:K(),sendFeedback:K(),feedbackFormTitle:K(),feedbackFormMessage:K(),feedbackFormMessagePlaceholder:K(),feedbackFormEmail:K(),feedbackFormEmailPlaceholder:K(),askQuestionAgain:K(),answerGood:K(),answerBad:K(),classificationSubmit:K(),classificationThankYou:K(),classificationTitle:K(),selectLanguage:K(),languageChanged:K(),selectColorTheme:K(),lightMode:K(),darkMode:K(),ariaMainNavigation:K(),ariaMainNavigationInfo:K(),ariaMainNavigationLinks:K(),ariaMainNavigationLanguageSwitch:K(),ariaMainNavigationColorMode:K(),ariaGotoMainNavigation:K(),ariaAskQuestion:K(),ariaAskQuestionRegion:K(),ariaNotifications:K(),ariaPredefinedQuestions:K(),ariaPredefinedQuestionsRegion:K(),ariaChatHistory:K(),ariaOpenChat:K(),ariaQuestionFromYou:K(),ariaAnswerFromBot:K(),ariaLastAnswerNavigation:K(),ariaQuestionSent:K(),ariaAnswerReady:K(),ariaAnswerFinished:K(),ariaAnswerFinishedWithSelectedTopic:K(),ariaAskQuestionAgain:K(),ariaAnswerGood:K(),ariaAnswerBad:K(),ariaReferenceSource:K(),ariaGiveFeedback:K(),ariaAnswerForm:K(),ariaLanguageChanged:K(),ariaLightSelected:K(),ariaDarkSelected:K(),ariaSettings:K(),ariaSettingsRegion:K(),ariaReferencesRegion:K(),ariaOpensInNewTab:K(),ariaPageTitle:K(),ariaCloseWithEsc:K(),ariaInfoTitle:K(),ariaFlyoutRegion:K(),ariaSelected:K(),ariaUnselected:K(),ariaAllSelected:K(),ariaAllUnselected:K(),ariaAllReseted:K(),ariaChangeTopic:K(),popups:Y(uf).optional(),termsAcceptButton:K().optional(),termsReadButton:K().optional(),selectors:jd(K(),cf).optional(),hideSettings:K(),showSettings:K(),chooseAtLeastOneOption:K(),selectAll:K(),selectNone:K(),resetToDefaults:K(),messageTooLong:K(),selectedTopic:K(),changeTopic:K(),searchSummaryExpand:K(),searchSummaryCollapse:K(),searchSummaryOptInDefault:K(),searchSummaryOptOut:K(),searchSummaryError:K(),searchSummaryDisclaimer:K().optional(),searchSummaryLoading:K(),searchSummaryFollowUpPlaceholder:K(),searchSummaryFollowUpSubmit:K(),ariaSearchSummaryExpand:K(),ariaSearchSummaryCollapse:K(),ariaSearchSummaryOptOut:K(),ariaSearchSummaryFollowUpInput:K(),jsonLdEventDate:K(),jsonLdEventLocation:K(),jsonLdEventDescription:K(),jsonLdEventCtaLabel:K(),jsonLdCtaLabel:K(),jsonLdMapOpenMap:K(),ariaJsonLdMapCanvas:K(),ariaJsonLdEventCard:K(),ariaJsonLdMapCard:K(),ariaJsonLdCtaCard:K()}),ff=[`en`,`de`,`fr`,`it`],pf=Z(ff),mf=Md(pf,df.partial().extend({selectors:jd(K(),cf).optional()}));jd(pf,of),jd(pf,sf);var hf=(e,t)=>t.includes(e),gf=(e,t)=>{if(hf(e,t))return e;let n=_f();return hf(n,t)?n:`en`},_f=()=>navigator.language.split(`-`)[0],vf=e=>gf(localStorage.getItem(`liipgpt:selectedLanguage`),e),yf=(e,t)=>Array.from(new Set([e,...t,`en`,...ff])),bf=(e,t,n,r)=>{for(let i of yf(n,r)){let n=e[i]?.selectors?.[t];if(n)return n}},xf=new class{#e=A(pn({}));get data(){return F(this.#e)}set data(e){j(this.#e,e,!0)}#t=A(pn({}));get targets(){return F(this.#t)}set targets(e){j(this.#t,e,!0)}#n=A(!1);get initialized(){return F(this.#n)}set initialized(e){j(this.#n,e,!0)}#r=A(0);get currentAudioVolume(){return F(this.#r)}set currentAudioVolume(e){j(this.#r,e,!0)}ariaLiveMessagesClearingTimeoutDuration=350;#i=A(null);get currentAudioRecorder(){return F(this.#i)}set currentAudioRecorder(e){j(this.#i,e,!0)}#a=A(!1);get isTranscribing(){return F(this.#a)}set isTranscribing(e){j(this.#a,e,!0)}#o=k(()=>{if(!this.initialized)return[];let e=this.data.chatConfig.menu;return e?e[this.data.language]??[]:[]});get menu(){return F(this.#o)}set menu(e){j(this.#o,e)}#s=k(()=>this.initialized?this.data.chatConfig.translations[this.data.language]??{}:{});get t(){return F(this.#s)}set t(e){j(this.#s,e)}#c=k(()=>this.initialized?Na[this.data.language]??{}:Na.en??{});get errorTranslations(){return F(this.#c)}set errorTranslations(e){j(this.#c,e)}#l=k(()=>this.initialized?Pa[this.data.language]??{}:Pa.en??{});get piiTranslations(){return F(this.#l)}set piiTranslations(e){j(this.#l,e)}#u=k(()=>this.initialized?this.data.currentColorScheme:`light`);get colorScheme(){return F(this.#u)}set colorScheme(e){j(this.#u,e)}#d=k(()=>this.initialized?this.data.chatConfig.fullTheme[this.data.currentColorScheme]:{});get themeBase(){return F(this.#d)}set themeBase(e){j(this.#d,e)}#f=k(()=>this.themeBase.tokens);get theme(){return F(this.#f)}set theme(e){j(this.#f,e)}#p=k(()=>{if(!this.initialized)return[];let e=[];for(let t of this.data.chatConfig.selectorsConfig)t.allowEmpty||(this.data.selectorValues[t.settingName]||[]).length===0&&e.push(t.settingName);return e});get selectorsWithErrors(){return F(this.#p)}set selectorsWithErrors(e){j(this.#p,e)}#m=k(()=>{if(!this.initialized)return{};let e=this.data.chatConfig,t={};for(let n of e.selectorsConfig){let r=bf(e.translations,n.settingName,this.data.language,e.supportedLanguages);r||console.error(`Missing translation for setting ${n.settingName} in all languages`),t[n.settingName]=r??{name:n.settingName,placeholder:``,values:{}}}return t});get selectorTranslations(){return F(this.#m)}set selectorTranslations(e){j(this.#m,e)}#h=k(()=>{if(!this.initialized)return!1;let e=this.data.chatConfig;return this.data.route.name===`chat-page`&&!e.forceChatPage||e.showContextInfo||e.showContextMenu||e.showCloseChatButton||this.data.props.flyout});get hasMainNavigationContent(){return F(this.#h)}set hasMainNavigationContent(e){j(this.#h,e)}#g=k(()=>{if(!this.initialized)return``;let e=this.t,t=this.data.chatConfig,n=this.data.route.name===`chat-page`&&!t.forceChatPage,r=[];return n&&r.push(e.newChat),t.showContextInfo&&r.push(e.ariaMainNavigationInfo),t.showContextMenu&&(this.menu.length>0&&r.push(e.ariaMainNavigationLinks),t.supportedLanguages.length>0&&r.push(e.ariaMainNavigationLanguageSwitch),this.data.has2ColorSchemes&&r.push(e.ariaMainNavigationColorMode)),(t.showCloseChatButton||this.data.props.flyout)&&r.push(e.closeChat),r.length===0?e.ariaMainNavigation:`${e.ariaMainNavigation}: ${r.join(`, `)}`});get ariaMainNavigationRegion(){return F(this.#g)}set ariaMainNavigationRegion(e){j(this.#g,e)}},Sf=`@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.chat-app{--spacer-1:.0625rem;--spacer-2:.125rem;--spacer-3:.1875rem;--spacer-4:.25rem;--spacer-5:.3125rem;--spacer-6:.375rem;--spacer-8:.5rem;--spacer-10:.625rem;--spacer-12:.75rem;--spacer-16:1rem;--spacer-20:1.25rem;--spacer-24:1.5rem;--spacer-28:1.75rem;--spacer-32:2rem;--spacer-40:2.5rem;--spacer-48:3rem;--spacer-56:3.5rem;--spacer-64:4rem;--spacer-72:4.5rem;--spacer-80:5rem;--spacer-120:7.5rem;--spacer-r-8:clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12:clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16:clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20:clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24:clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28:clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32:clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40:clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48:clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56:clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64:clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80:clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96:clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120:clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--default-transition-duration:.2s;--default-transition-timing-function:ease-in-out;--z-index-flyout:10000;--z-index-dialog:600;--z-index-loader:500;--z-index-reference-number:400;--z-index-footer:300;--z-index-header:200;--z-index-tooltip:100;--z-index-tooltip-hover:101;--z-index-local-overlay:10;--z-index-below:-10;--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--fly-in-id:0;--btn-padding-x:var(--spacer-r-20);--btn-padding-y:var(--spacer-r-8);--btn-icon-size:var(--spacer-24);--btn-submit-size:2.5em;--last-bot-message-min-height:0}.chat-app :where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){font-weight:var(--base-font-weight-title);line-height:var(--base-line-height-tight)}.chat-app :where(b,strong){font-weight:var(--base-font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea,select){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow,none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea,select)::placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:var(--body-focus-style);outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app ::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:0 0}.chat-app ::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:4px;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:#0000004d transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app :hover::-webkit-scrollbar-thumb{visibility:visible}.chat-app :active::-webkit-scrollbar-thumb{visibility:visible}.chat-app :focus::-webkit-scrollbar-thumb{visibility:visible}.svg{width:var(--spacer-r-24);height:auto}.svg svg{width:100%;height:auto;display:block;overflow:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{content:"";background-color:#0000;position:absolute;inset:0}.chat-app :where(.sr-only){clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.skip-link){width:0;height:0;color:var(--anchor-color);font-weight:700;font-size:var(--base-font-size-xs);position:absolute;overflow:hidden}.chat-app :where(.skip-link):focus-visible{width:auto;height:auto;position:static}.chat-app :where(.fly-in){--fly-in-id:0;--fly-in-duration:.4s;--fly-out-duration:.2s;--fly-in-delay:.3s;--fly-in-delay-additional:.1s;--fly-in-y:var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease, var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration);transform:translateY(0)}.chat-app :where(.truncate){text-overflow:ellipsis;white-space:nowrap;display:inline-block;overflow:hidden}.chat-app :where(.line-clamp){-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--6){-webkit-line-clamp:6}.chat-app :where(.container){width:100%;max-width:var(--container-max-width,1024px);padding-right:var(--spacer-16);padding-left:var(--spacer-16);margin:0 auto}@container chat-container (width>=640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (width>=768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(h1){font-size:var(--base-font-size-h1)}.chat-app :where(h2){font-size:var(--base-font-size-h2)}.chat-app :where(h3){font-size:var(--base-font-size-h3)}.chat-app :where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.h1){font-size:var(--base-font-size-h1)}.chat-app :where(.h2){font-size:var(--base-font-size-h2)}.chat-app :where(.h3){font-size:var(--base-font-size-h3)}.chat-app :where(.h4,.h5,.h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){margin-bottom:var(--spacer-r-24);display:block}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-type:decimal;list-style-position:outside}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){padding-left:1em;position:relative}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{content:"•";font-size:.9em;position:absolute;top:0;left:0}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;background-color:var(--color-grey-700);background-color:var(--hr-color);border:none}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight,var(--base-font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration,underline);text-decoration:var(--anchor-text-decoration,underline);text-underline-offset:var(--anchor-text-underline-offset,.15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container) :where(table){border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch;width:100%;display:block;overflow-x:auto}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--base-line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.text-container) :where(:first-child){margin-top:0}.chat-app :where(.text-container) :where(:last-child){margin-bottom:0}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}.chat-app :where(.display-contents){display:contents}.chat-app :where(.absolute){position:absolute!important}}@layer components{.chat-app{display:contents}.chat-app__container{height:100%;display:flex;overflow:hidden;transform:translateZ(0);container:chat-container/inline-size}.chat-app__container>:where(*){color:var(--body-color);font-style:normal;font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-body);line-height:var(--base-line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app__container.chat-app__container--inline-layout-contained{height:90svh;scroll-margin-top:10svh}@media (width>=768px){.chat-app__container.chat-app__container--inline-layout-contained{height:100svh;scroll-margin-top:0}}.chat-app__main{overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y;flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden auto;container:chat-inner-container/inline-size}.chat-app__container--inline-layout .chat-app__main{overscroll-behavior-y:auto}.chat-app__loader-container{z-index:var(--z-index-loader);justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);background:var(--body-background);position:sticky;top:0}.chat-app__header--unsticked{position:relative}.chat-app__header-content{--btn-padding-x:var(--btn-padding-y);column-gap:var(--spacer-r-12);min-height:calc(var(--btn-padding-y) * 2 + var(--btn-icon-size) + var(--spacer-10) * 2);margin-right:calc(var(--btn-padding-x) * -1);margin-left:calc(var(--btn-padding-x) * -1);padding-top:var(--spacer-10);padding-bottom:var(--spacer-10);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex;position:relative}.chat-app__header-content>:where(*){z-index:0;pointer-events:auto;position:relative}.chat-app__header-content:after{right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);content:"";border-bottom:1px solid #0000;transition:border-color .1s ease-in-out;position:absolute}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__header-new-conversation{margin-right:auto;position:relative}@container chat-container (width>=640px){.chat-app__header-new-conversation .tooltip{display:none}}.chat-app__header--with-logo :where(.chat-app__header-content){margin-left:0}.chat-app__header--with-logo :where(.chat-app__header-new-conversation){margin-right:unset;margin-left:auto}.chat-app__header-logo{margin-right:auto}.chat-app__header-logo :where(svg){width:auto;height:var(--spacer-28)}.chat-app__body{flex-direction:column;flex-grow:1;width:100%;display:flex;position:relative}.chat-app__page-transition{flex-direction:column;flex-grow:1;width:100%;height:100%;display:flex}.chat-app__aside{--duration-in:.65s;--duration-out:.5s;visibility:hidden;width:0;transition-delay:0s, var(--duration-out);transition-duration:var(--duration-out), 0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart), linear;flex-grow:1;position:relative;top:0;bottom:0}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in), 0s;transition-timing-function:var(--ease-out-quart), linear}.chat-app__aside .tooltip{--background-color:var(--btn-secondary-hover-background)}.chat-app__aside-container{width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:relative;overflow-y:auto}.chat-app__container--inline-layout .chat-app__aside-container{overscroll-behavior-y:auto}.chat-app__aside-header,.chat-app__sheet-header{z-index:var(--z-index-header);flex-wrap:no-wrap;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);justify-content:space-between;align-items:center;gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color);display:flex;position:sticky;top:0}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);background:var(--aside-background-overlay);position:fixed;inset:0}.chat-app__sheet-content{z-index:var(--z-index-flyout);width:100%;max-width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:fixed;top:0;right:0;overflow-y:auto}.chat-app__container--inline-layout .chat-app__sheet-content{overscroll-behavior-y:auto}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:#0000}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}.chat-app__close-button{z-index:var(--z-index-flyout)}.open-button{--open-button-avatar-height:var(--spacer-r-80);--open-button-avatar-width:var(--spacer-r-80);--open-button-duration:.4s;--open-button-delay:.3s;--open-button-ease:ease-in-out;cursor:pointer;flex-direction:row;align-items:flex-end;transition:opacity .15s ease-out;display:flex}.open-button--expanded{opacity:0;pointer-events:none}.open-button__text{margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);flex-direction:column;justify-content:center;align-items:flex-start;padding-left:0;display:flex;position:absolute;bottom:50%;right:100%;overflow:hidden;transform:translateY(50%);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__text{background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);transform:translateY(0)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);white-space:pre;font-weight:700}.open-button__mask{width:0;height:0;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), height var(--open-button-duration) var(--open-button-ease);overflow:hidden}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease), height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance;position:relative}.open-button__avatar{z-index:var(--z-index-local-overlay);width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);border-radius:var(--spacer-r-80);filter:drop-shadow(0 4px 6px #00000026);transition:transform .2s var(--open-button-ease);position:relative;overflow:clip}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color);display:none;position:absolute;right:0}:where(.open-button--standalone){right:var(--spacer-r-16);bottom:var(--spacer-r-16);position:fixed}@media (prefers-reduced-motion:reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}.open-button--hide-title-when-collapsed .open-button__text{visibility:hidden;opacity:0;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), visibility 0s linear calc(var(--open-button-duration) + var(--open-button-delay))}.open-button--hide-title-when-collapsed:is(:hover,.open-button--programmatic-expand) .open-button__text{visibility:visible;background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-ease), visibility 0s linear 0s;transform:translateY(0)}}@value container-xs, container-sm, container-md, container-lg, container-inner-xs, container-inner-sm, container-inner-md, container-inner-lg from "./viewports.css";`,Cf=()=>{let e=localStorage.getItem(`liipgpt-color-scheme`);return e===`light`||e===`dark`?e:`system`},wf=e=>{let t=Cf();return t===`system`&&(t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`),e.includes(t)?t:e[0]??`light`},Tf=RegExp(`([\\p{Ll}\\d])(\\p{Lu})`,`gu`),Ef=RegExp(`(\\p{Lu})([\\p{Lu}][\\p{Ll}])`,`gu`),Df=RegExp(`(\\d)(\\p{Ll})`,`gu`),Of=RegExp(`(\\p{L})(\\d)`,`gu`),kf=/[^\p{L}\d]+/giu,Af=`$1\0$2`,jf=``;function Mf(e,t){let n=e.trim();n=n.replace(Tf,Af).replace(Ef,Af),t?.separateNumbers&&(n=n.replace(Df,Af).replace(Of,Af)),n=n.replace(kf,`\0`);let r=0,i=n.length;for(;n.charAt(r)===`\0`;)r++;if(r===i)return[];for(;n.charAt(i-1)===`\0`;)i--;return n.slice(r,i).split(/\0/g)}function Nf(e,t){return Jf(e,t?.prefixCharacters)+Mf(e,t).map(Wf(t?.locale)).join(t?.delimiter??` `)}function Pf(e,t){let n=Jf(e,t?.prefixCharacters),r=Wf(t?.locale),i=Gf(t?.locale),a=t?.mergeAmbiguousCharacters?Kf(r,i):qf(r,i);return n+Mf(e,t).map((e,t)=>t===0?r(e):a(e,t)).join(t?.delimiter??``)}function Ff(e,t){let n=Jf(e,t?.prefixCharacters),r=Wf(t?.locale),i=Gf(t?.locale),a=t?.mergeAmbiguousCharacters?Kf(r,i):qf(r,i);return n+Mf(e,t).map(a).join(t?.delimiter??``)}function If(e,t){let n=Jf(e,t?.prefixCharacters),r=Wf(t?.locale),i=Gf(t?.locale);return n+Mf(e,t).map(Kf(r,i)).join(t?.delimiter??` `)}function Lf(e,t){return Jf(e,t?.prefixCharacters)+Mf(e,t).map(Gf(t?.locale)).join(t?.delimiter??`_`)}function Rf(e,t){return Nf(e,{delimiter:`.`,...t})}function zf(e,t){return Nf(e,{delimiter:`-`,...t})}function Bf(e,t){return Nf(e,{delimiter:`/`,...t})}function Vf(e,t){let n=Jf(e,t?.prefixCharacters),r=Wf(t?.locale),i=Kf(r,Gf(t?.locale));return n+Mf(e,t).map((e,t)=>t===0?i(e):r(e)).join(t?.delimiter??` `)}function Hf(e,t){return Nf(e,{delimiter:`_`,...t})}function Uf(e,t){return If(e,{delimiter:`-`,...t})}function Wf(e){return e===!1?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function Gf(e){return e===!1?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function Kf(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function qf(e,t){return(n,r)=>{let i=n[0];return(r>0&&i>=`0`&&i<=`9`?`_`+i:t(i))+e(n.slice(1))}}function Jf(e,t=jf){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(t.includes(i))n+=i;else break}return n}function Yf(e,t){let n=``;for(let r of e)n+=Math.random()>.5?r.toLocaleUpperCase(t):r.toLocaleLowerCase(t);return n}function Xf(e,t){let n=``;for(let r of e){let e=r.toLocaleLowerCase(t);n+=r===e?r.toLocaleUpperCase(t):e}return n}var Zf=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,Qf=/[^\s:–—-]+|./g,$f=/\s/,ep=/.(?=[A-Z]|\..)/,tp=/[A-Za-z0-9\u00C0-\u00FF]/;function np(e){for(var t=``,n;(n=Qf.exec(e))!==null;){var r=n[0],i=n.index;if(!ep.test(r)&&(!Zf.test(r)||i===0||i+r.length===e.length)&&(e.charAt(i+r.length)!==`:`||$f.test(e.charAt(i+r.length+1)))){t+=r.replace(tp,function(e){return e.toUpperCase()});continue}t+=r}return t}var rp=Pf,ip=If,ap=Lf,op=Rf,sp=Nf,cp=Ff,lp=Bf,up=Vf,dp=Hf,fp=Uf,pp=zf,mp=Yf,hp=Xf,gp=np,_p=e=>e.toUpperCase(),vp=(e,t)=>e.toLocaleUpperCase(t),yp=e=>e.toLowerCase(),bp=(e,t)=>e.toLocaleLowerCase(t),xp=e=>e.charAt(0).toLowerCase()+e.slice(1),Sp=e=>e.charAt(0).toUpperCase()+e.slice(1),Cp=e=>e===e.toUpperCase(),wp=e=>e===e.toLowerCase(),Q=class{};Q.camel=rp,Q.capital=ip,Q.constant=ap,Q.dot=op,Q.kebab=pp,Q.lower=yp,Q.lowerFirst=xp,Q.localeLower=bp,Q.localeUpper=vp,Q.no=sp,Q.pascal=cp,Q.path=lp,Q.sentence=up,Q.snake=dp,Q.sponge=mp,Q.swap=hp,Q.title=gp,Q.train=fp,Q.upper=_p,Q.upperFirst=Sp,Q.isUpper=Cp,Q.isLower=wp;var Tp=640,Ep=1024,Dp=null,Op=()=>{if(Dp)return Dp;if(!globalThis.document)return 16;let e=globalThis.document.querySelector(`:root`);return Dp=Number(getComputedStyle(e).fontSize.slice(0,-2)),Dp},kp=({minRem:e,maxRem:t})=>{let n=Op(),r=Tp/n,i=Ep/n,a=(t-e)/(i-r);return`clamp( ${e}rem, ${-r*a+e}rem + ${a*100}cqw, ${t}rem )`},$=X({minRem:md(),maxRem:md()}).or(K()),Ap=X({0:K().optional(),50:K(),100:K(),200:K(),300:K(),400:K(),500:K(),600:K(),700:K(),800:K(),900:K(),950:K(),1e3:K().optional()}),jp=X({color:K().optional(),background:K().optional(),borderWidth:K().optional(),borderColor:K().optional(),boxShadow:K().optional()}),Mp=kd(X({borderRadius:$.optional(),custom:jd(K(),Td([K(),md()])).optional(),hover:jp.optional(),focus:jp.optional()}),jp),Np=X({family:K().optional()}),Pp=Z(`predefinedQuestion.edit.newConversation.voteUp.voteDown.retry.message.messageLoading.thread.submit.abort.expand.help.attach.record.reward.share.audio.copy.dismiss.menu.info.menuClose.chevronDown.chevronUp.chevronTopDown.chevronDownSmall.internalLink.externalLink.liip.avatar.avatarLarge.openChat.speechInput.listUnordered.lightMode.darkMode.settings.settingsClose.sources.model.checkbox.warning.topic.headerLogo.embedAvatar.forward.phone.email`.split(`.`)),Fp=jd(Pp,K()),Ip=Md(Pp,K()),Lp=X({font:Np.optional(),colors:X({brand:Ap,accent:Ap.optional(),highlight:Ap,grey:Ap}),base:X({fontSizeXs:$.optional(),fontSizeSm:$.optional(),fontSizeBody:$.optional(),fontSizeH3:$.optional(),fontSizeH2:$.optional(),fontSizeH1:$.optional(),fontWeightNormal:K().optional(),fontWeightBold:K().optional(),fontWeightTitle:K().optional(),lineHeightDefault:K().optional(),lineHeightSnug:K().optional(),lineHeightTight:K().optional(),borderRadius:$.optional(),lineColor:K().optional(),boxShadow:K().optional()}),components:jd(K(),Mp),svgs:Fp}),Rp=X({customCSS:K().optional(),fontCSS:K().optional(),fontURLs:K().array().optional(),tokens:Lp});X({light:Rp,dark:Rp});var zp=X({font:Np.optional(),colors:X({brand:Ap.partial().optional(),accent:Ap.partial().optional(),highlight:Ap.partial().optional(),grey:Ap.partial().optional()}).optional(),base:X({fontSizeXs:$.optional(),fontSizeSm:$.optional(),fontSizeBody:$.optional(),fontSizeH3:$.optional(),fontSizeH2:$.optional(),fontSizeH1:$.optional(),fontWeightNormal:K().optional(),fontWeightBold:K().optional(),fontWeightTitle:K().optional(),lineHeightDefault:K().optional(),lineHeightSnug:K().optional(),lineHeightTight:K().optional(),borderRadius:$.optional(),lineColor:K().optional(),boxShadow:K().optional()}).optional(),components:jd(K(),Mp).optional(),svgs:Ip.optional()}),Bp=X({customCSS:K().optional(),fontCSS:K().optional(),fontURLs:K().array().optional(),tokens:zp.optional()}),Vp=X({light:Bp.optional(),dark:Bp.optional()}),Hp=e=>typeof e==`string`?e:typeof e==`number`?String(e):typeof e==`object`?e.minRem===e.maxRem?`${e.minRem}rem`:kp(e):``,Up=(e,t,n,r=!1)=>{let i=``;return n.forEach(n=>{let a=t[n];r&&!a&&n===`borderWidth`&&(a=`0px`),r&&!a&&n===`borderColor`&&(a=`transparent`),a&&(i+=`--${pp(e)}-${pp(n)}:${Hp(a)}; `)}),i},Wp=(e,t)=>Object.entries(t).map(([t,n])=>`--${e}-${pp(t)}:${Hp(n)}`).join(`; `)+`; `,Gp=(e,t)=>{let n=``;return n+=Up(e,t,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`borderRadius`,`color`],!0),t.hover&&(n+=Up(`${e}-hover`,t.hover,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`color`])),t.focus&&(n+=Up(`${e}-focus`,t.focus,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`color`])),t.custom&&(n+=Wp(e,t.custom)),n},Kp=(e,t)=>Object.entries(t).map(([t,n])=>`--color-${e}-${t}:${n}`).join(`; `)+`; `,qp=e=>`--font-family: ${e?.family||`inherit`};`,Jp=(e,t={})=>`${t.root??`.chat-app`} {${qp(e.font)} ${Object.entries(e.colors).map(([e,t])=>Kp(e,t)).join(``)} ${Wp(`base`,e.base)} ${Object.entries(e.components).map(([e,t])=>Gp(pp(e),t)).join(``)}};`,Yp=Md(pf,K()),Xp=X({componentName:Fd(`buttons`),data:X({caption:K().optional(),buttons:Y(X({label:K(),href:K().url().optional(),value:K(),variant:Z([`primary`,`secondary`,`tertiary`]).optional(),icon:K().optional(),target:K().optional()}))})}),Zp=X({componentName:Fd(`combobox`),data:X({caption:Yp.optional(),placeholder:Yp,values:Y(X({label:Yp,value:K(),metadata:jd(K(),yd()).optional()})),removeComponentAfterValueSelection:J().optional(),selectorKey:K().optional()})}),Qp=X({componentName:Fd(`alva-init`),data:X({})}),$p=X({componentName:Fd(`alva-score-survey`),data:X({})}),em=X({type:Fd(`component`),id:K().optional(),time:K().optional(),hideAvatar:J().optional(),noSectionPadding:J().optional(),hideChatInput:J().optional()}),tm=kd(Dd(`componentName`,[Xp,Zp,Qp,$p]),em),nm=Td([K(),md(),J(),Y(K()),Y(md()),Y(J())]),rm=X({title:K(),description:K().optional(),badge:K().optional(),breadcrumbs:Y(K()).optional(),previewImage:K().optional(),date:K().datetime().optional()});X({url:K().url(),score:md(),metadata:jd(K(),nm),language:K().optional()}).extend(rm.shape),Z([`start`,`chat`]),Dd(`name`,[X({name:Fd(`start-page`),prefill:K().optional()}),X({name:Fd(`consent-page`)}),X({name:Fd(`chat-page`),query:K().optional(),predefinedQuestionId:K().optional(),switchQuestionId:K().optional()})]);var im=X({type:Fd(`user`),time:K(),message:K(),id:K().optional()});Z([`idle`,`searching`,`answering`]);var am=Td([K(),md(),J(),Y(K()),Y(md()),Y(J())]),om=X({url:K(),score:md(),metadata:jd(K(),am),considered:J(),display:X({card:rm,listItem:rm})}).extend({referenceIndex:X({all:md(),used:md().optional()})}),sm=X({all:Y(om),used:Y(om),unused:Y(om)}),cm=Td([Z([`pii-detected`,`blocked`,`maintenance`,`rate-limit`,`server-error`,`too-short`,`too-long`,`quota-reached`,`aborted`]),Fd(`sse-error`),Fd(`client-error`),Fd(`unexpected-call`)]),lm=X({type:Fd(`bot`),time:K(),id:K(),message:X({markdown:K(),html:K(),text:K()}),references:sm,errors:Y(cm),retrievalQuestion:K().optional(),noFeedback:J().optional(),feedback:Z([`up`,`down`]).optional()}),um=lm.extend({state:Z([`streaming`,`done`])}),dm=Td([Td([lm.extend({state:Fd(`loading`)}),um]),im,tm]);X({question:K(),answer:K()});var fm={inherit:`inherit`,current:`currentcolor`,transparent:`transparent`,black:`#000`,white:`#fff`,slate:{50:`oklch(98.4% 0.003 247.858)`,100:`oklch(96.8% 0.007 247.896)`,200:`oklch(92.9% 0.013 255.508)`,300:`oklch(86.9% 0.022 252.894)`,400:`oklch(70.4% 0.04 256.788)`,500:`oklch(55.4% 0.046 257.417)`,600:`oklch(44.6% 0.043 257.281)`,700:`oklch(37.2% 0.044 257.287)`,800:`oklch(27.9% 0.041 260.031)`,900:`oklch(20.8% 0.042 265.755)`,950:`oklch(12.9% 0.042 264.695)`},gray:{50:`oklch(98.5% 0.002 247.839)`,100:`oklch(96.7% 0.003 264.542)`,200:`oklch(92.8% 0.006 264.531)`,300:`oklch(87.2% 0.01 258.338)`,400:`oklch(70.7% 0.022 261.325)`,500:`oklch(55.1% 0.027 264.364)`,600:`oklch(44.6% 0.03 256.802)`,700:`oklch(37.3% 0.034 259.733)`,800:`oklch(27.8% 0.033 256.848)`,900:`oklch(21% 0.034 264.665)`,950:`oklch(13% 0.028 261.692)`},zinc:{50:`oklch(98.5% 0 0)`,100:`oklch(96.7% 0.001 286.375)`,200:`oklch(92% 0.004 286.32)`,300:`oklch(87.1% 0.006 286.286)`,400:`oklch(70.5% 0.015 286.067)`,500:`oklch(55.2% 0.016 285.938)`,600:`oklch(44.2% 0.017 285.786)`,700:`oklch(37% 0.013 285.805)`,800:`oklch(27.4% 0.006 286.033)`,900:`oklch(21% 0.006 285.885)`,950:`oklch(14.1% 0.005 285.823)`},neutral:{50:`oklch(98.5% 0 0)`,100:`oklch(97% 0 0)`,200:`oklch(92.2% 0 0)`,300:`oklch(87% 0 0)`,400:`oklch(70.8% 0 0)`,500:`oklch(55.6% 0 0)`,600:`oklch(43.9% 0 0)`,700:`oklch(37.1% 0 0)`,800:`oklch(26.9% 0 0)`,900:`oklch(20.5% 0 0)`,950:`oklch(14.5% 0 0)`},stone:{50:`oklch(98.5% 0.001 106.423)`,100:`oklch(97% 0.001 106.424)`,200:`oklch(92.3% 0.003 48.717)`,300:`oklch(86.9% 0.005 56.366)`,400:`oklch(70.9% 0.01 56.259)`,500:`oklch(55.3% 0.013 58.071)`,600:`oklch(44.4% 0.011 73.639)`,700:`oklch(37.4% 0.01 67.558)`,800:`oklch(26.8% 0.007 34.298)`,900:`oklch(21.6% 0.006 56.043)`,950:`oklch(14.7% 0.004 49.25)`},mauve:{50:`oklch(98.5% 0 0)`,100:`oklch(96% 0.003 325.6)`,200:`oklch(92.2% 0.005 325.62)`,300:`oklch(86.5% 0.012 325.68)`,400:`oklch(71.1% 0.019 323.02)`,500:`oklch(54.2% 0.034 322.5)`,600:`oklch(43.5% 0.029 321.78)`,700:`oklch(36.4% 0.029 323.89)`,800:`oklch(26.3% 0.024 320.12)`,900:`oklch(21.2% 0.019 322.12)`,950:`oklch(14.5% 0.008 326)`},olive:{50:`oklch(98.8% 0.003 106.5)`,100:`oklch(96.6% 0.005 106.5)`,200:`oklch(93% 0.007 106.5)`,300:`oklch(88% 0.011 106.6)`,400:`oklch(73.7% 0.021 106.9)`,500:`oklch(58% 0.031 107.3)`,600:`oklch(46.6% 0.025 107.3)`,700:`oklch(39.4% 0.023 107.4)`,800:`oklch(28.6% 0.016 107.4)`,900:`oklch(22.8% 0.013 107.4)`,950:`oklch(15.3% 0.006 107.1)`},mist:{50:`oklch(98.7% 0.002 197.1)`,100:`oklch(96.3% 0.002 197.1)`,200:`oklch(92.5% 0.005 214.3)`,300:`oklch(87.2% 0.007 219.6)`,400:`oklch(72.3% 0.014 214.4)`,500:`oklch(56% 0.021 213.5)`,600:`oklch(45% 0.017 213.2)`,700:`oklch(37.8% 0.015 216)`,800:`oklch(27.5% 0.011 216.9)`,900:`oklch(21.8% 0.008 223.9)`,950:`oklch(14.8% 0.004 228.8)`},taupe:{50:`oklch(98.6% 0.002 67.8)`,100:`oklch(96% 0.002 17.2)`,200:`oklch(92.2% 0.005 34.3)`,300:`oklch(86.8% 0.007 39.5)`,400:`oklch(71.4% 0.014 41.2)`,500:`oklch(54.7% 0.021 43.1)`,600:`oklch(43.8% 0.017 39.3)`,700:`oklch(36.7% 0.016 35.7)`,800:`oklch(26.8% 0.011 36.5)`,900:`oklch(21.4% 0.009 43.1)`,950:`oklch(14.7% 0.004 49.3)`},red:{50:`oklch(97.1% 0.013 17.38)`,100:`oklch(93.6% 0.032 17.717)`,200:`oklch(88.5% 0.062 18.334)`,300:`oklch(80.8% 0.114 19.571)`,400:`oklch(70.4% 0.191 22.216)`,500:`oklch(63.7% 0.237 25.331)`,600:`oklch(57.7% 0.245 27.325)`,700:`oklch(50.5% 0.213 27.518)`,800:`oklch(44.4% 0.177 26.899)`,900:`oklch(39.6% 0.141 25.723)`,950:`oklch(25.8% 0.092 26.042)`},orange:{50:`oklch(98% 0.016 73.684)`,100:`oklch(95.4% 0.038 75.164)`,200:`oklch(90.1% 0.076 70.697)`,300:`oklch(83.7% 0.128 66.29)`,400:`oklch(75% 0.183 55.934)`,500:`oklch(70.5% 0.213 47.604)`,600:`oklch(64.6% 0.222 41.116)`,700:`oklch(55.3% 0.195 38.402)`,800:`oklch(47% 0.157 37.304)`,900:`oklch(40.8% 0.123 38.172)`,950:`oklch(26.6% 0.079 36.259)`},amber:{50:`oklch(98.7% 0.022 95.277)`,100:`oklch(96.2% 0.059 95.617)`,200:`oklch(92.4% 0.12 95.746)`,300:`oklch(87.9% 0.169 91.605)`,400:`oklch(82.8% 0.189 84.429)`,500:`oklch(76.9% 0.188 70.08)`,600:`oklch(66.6% 0.179 58.318)`,700:`oklch(55.5% 0.163 48.998)`,800:`oklch(47.3% 0.137 46.201)`,900:`oklch(41.4% 0.112 45.904)`,950:`oklch(27.9% 0.077 45.635)`},yellow:{50:`oklch(98.7% 0.026 102.212)`,100:`oklch(97.3% 0.071 103.193)`,200:`oklch(94.5% 0.129 101.54)`,300:`oklch(90.5% 0.182 98.111)`,400:`oklch(85.2% 0.199 91.936)`,500:`oklch(79.5% 0.184 86.047)`,600:`oklch(68.1% 0.162 75.834)`,700:`oklch(55.4% 0.135 66.442)`,800:`oklch(47.6% 0.114 61.907)`,900:`oklch(42.1% 0.095 57.708)`,950:`oklch(28.6% 0.066 53.813)`},lime:{50:`oklch(98.6% 0.031 120.757)`,100:`oklch(96.7% 0.067 122.328)`,200:`oklch(93.8% 0.127 124.321)`,300:`oklch(89.7% 0.196 126.665)`,400:`oklch(84.1% 0.238 128.85)`,500:`oklch(76.8% 0.233 130.85)`,600:`oklch(64.8% 0.2 131.684)`,700:`oklch(53.2% 0.157 131.589)`,800:`oklch(45.3% 0.124 130.933)`,900:`oklch(40.5% 0.101 131.063)`,950:`oklch(27.4% 0.072 132.109)`},green:{50:`oklch(98.2% 0.018 155.826)`,100:`oklch(96.2% 0.044 156.743)`,200:`oklch(92.5% 0.084 155.995)`,300:`oklch(87.1% 0.15 154.449)`,400:`oklch(79.2% 0.209 151.711)`,500:`oklch(72.3% 0.219 149.579)`,600:`oklch(62.7% 0.194 149.214)`,700:`oklch(52.7% 0.154 150.069)`,800:`oklch(44.8% 0.119 151.328)`,900:`oklch(39.3% 0.095 152.535)`,950:`oklch(26.6% 0.065 152.934)`},emerald:{50:`oklch(97.9% 0.021 166.113)`,100:`oklch(95% 0.052 163.051)`,200:`oklch(90.5% 0.093 164.15)`,300:`oklch(84.5% 0.143 164.978)`,400:`oklch(76.5% 0.177 163.223)`,500:`oklch(69.6% 0.17 162.48)`,600:`oklch(59.6% 0.145 163.225)`,700:`oklch(50.8% 0.118 165.612)`,800:`oklch(43.2% 0.095 166.913)`,900:`oklch(37.8% 0.077 168.94)`,950:`oklch(26.2% 0.051 172.552)`},teal:{50:`oklch(98.4% 0.014 180.72)`,100:`oklch(95.3% 0.051 180.801)`,200:`oklch(91% 0.096 180.426)`,300:`oklch(85.5% 0.138 181.071)`,400:`oklch(77.7% 0.152 181.912)`,500:`oklch(70.4% 0.14 182.503)`,600:`oklch(60% 0.118 184.704)`,700:`oklch(51.1% 0.096 186.391)`,800:`oklch(43.7% 0.078 188.216)`,900:`oklch(38.6% 0.063 188.416)`,950:`oklch(27.7% 0.046 192.524)`},cyan:{50:`oklch(98.4% 0.019 200.873)`,100:`oklch(95.6% 0.045 203.388)`,200:`oklch(91.7% 0.08 205.041)`,300:`oklch(86.5% 0.127 207.078)`,400:`oklch(78.9% 0.154 211.53)`,500:`oklch(71.5% 0.143 215.221)`,600:`oklch(60.9% 0.126 221.723)`,700:`oklch(52% 0.105 223.128)`,800:`oklch(45% 0.085 224.283)`,900:`oklch(39.8% 0.07 227.392)`,950:`oklch(30.2% 0.056 229.695)`},sky:{50:`oklch(97.7% 0.013 236.62)`,100:`oklch(95.1% 0.026 236.824)`,200:`oklch(90.1% 0.058 230.902)`,300:`oklch(82.8% 0.111 230.318)`,400:`oklch(74.6% 0.16 232.661)`,500:`oklch(68.5% 0.169 237.323)`,600:`oklch(58.8% 0.158 241.966)`,700:`oklch(50% 0.134 242.749)`,800:`oklch(44.3% 0.11 240.79)`,900:`oklch(39.1% 0.09 240.876)`,950:`oklch(29.3% 0.066 243.157)`},blue:{50:`oklch(97% 0.014 254.604)`,100:`oklch(93.2% 0.032 255.585)`,200:`oklch(88.2% 0.059 254.128)`,300:`oklch(80.9% 0.105 251.813)`,400:`oklch(70.7% 0.165 254.624)`,500:`oklch(62.3% 0.214 259.815)`,600:`oklch(54.6% 0.245 262.881)`,700:`oklch(48.8% 0.243 264.376)`,800:`oklch(42.4% 0.199 265.638)`,900:`oklch(37.9% 0.146 265.522)`,950:`oklch(28.2% 0.091 267.935)`},indigo:{50:`oklch(96.2% 0.018 272.314)`,100:`oklch(93% 0.034 272.788)`,200:`oklch(87% 0.065 274.039)`,300:`oklch(78.5% 0.115 274.713)`,400:`oklch(67.3% 0.182 276.935)`,500:`oklch(58.5% 0.233 277.117)`,600:`oklch(51.1% 0.262 276.966)`,700:`oklch(45.7% 0.24 277.023)`,800:`oklch(39.8% 0.195 277.366)`,900:`oklch(35.9% 0.144 278.697)`,950:`oklch(25.7% 0.09 281.288)`},violet:{50:`oklch(96.9% 0.016 293.756)`,100:`oklch(94.3% 0.029 294.588)`,200:`oklch(89.4% 0.057 293.283)`,300:`oklch(81.1% 0.111 293.571)`,400:`oklch(70.2% 0.183 293.541)`,500:`oklch(60.6% 0.25 292.717)`,600:`oklch(54.1% 0.281 293.009)`,700:`oklch(49.1% 0.27 292.581)`,800:`oklch(43.2% 0.232 292.759)`,900:`oklch(38% 0.189 293.745)`,950:`oklch(28.3% 0.141 291.089)`},purple:{50:`oklch(97.7% 0.014 308.299)`,100:`oklch(94.6% 0.033 307.174)`,200:`oklch(90.2% 0.063 306.703)`,300:`oklch(82.7% 0.119 306.383)`,400:`oklch(71.4% 0.203 305.504)`,500:`oklch(62.7% 0.265 303.9)`,600:`oklch(55.8% 0.288 302.321)`,700:`oklch(49.6% 0.265 301.924)`,800:`oklch(43.8% 0.218 303.724)`,900:`oklch(38.1% 0.176 304.987)`,950:`oklch(29.1% 0.149 302.717)`},fuchsia:{50:`oklch(97.7% 0.017 320.058)`,100:`oklch(95.2% 0.037 318.852)`,200:`oklch(90.3% 0.076 319.62)`,300:`oklch(83.3% 0.145 321.434)`,400:`oklch(74% 0.238 322.16)`,500:`oklch(66.7% 0.295 322.15)`,600:`oklch(59.1% 0.293 322.896)`,700:`oklch(51.8% 0.253 323.949)`,800:`oklch(45.2% 0.211 324.591)`,900:`oklch(40.1% 0.17 325.612)`,950:`oklch(29.3% 0.136 325.661)`},pink:{50:`oklch(97.1% 0.014 343.198)`,100:`oklch(94.8% 0.028 342.258)`,200:`oklch(89.9% 0.061 343.231)`,300:`oklch(82.3% 0.12 346.018)`,400:`oklch(71.8% 0.202 349.761)`,500:`oklch(65.6% 0.241 354.308)`,600:`oklch(59.2% 0.249 0.584)`,700:`oklch(52.5% 0.223 3.958)`,800:`oklch(45.9% 0.187 3.815)`,900:`oklch(40.8% 0.153 2.432)`,950:`oklch(28.4% 0.109 3.907)`},rose:{50:`oklch(96.9% 0.015 12.422)`,100:`oklch(94.1% 0.03 12.58)`,200:`oklch(89.2% 0.058 10.001)`,300:`oklch(81% 0.117 11.638)`,400:`oklch(71.2% 0.194 13.428)`,500:`oklch(64.5% 0.246 16.439)`,600:`oklch(58.6% 0.253 17.585)`,700:`oklch(51.4% 0.222 16.935)`,800:`oklch(45.5% 0.188 13.697)`,900:`oklch(41% 0.159 10.272)`,950:`oklch(27.1% 0.105 12.094)`}},pm=X({50:K(),100:K(),200:K(),300:K(),400:K(),500:K(),600:K(),700:K(),800:K(),900:K(),950:K()}),mm=Z([`slate`,`gray`,`zinc`,`neutral`,`stone`,`red`,`orange`,`amber`,`yellow`,`lime`,`green`,`emerald`,`teal`,`cyan`,`sky`,`blue`,`indigo`,`violet`,`purple`,`fuchsia`,`pink`,`rose`]),hm=Td([pm,mm]),gm=Td([kd(pm,X({0:K(),1e3:K()})),mm]),_m=X({avatarImageUrl:K().optional(),colors:X({brand:hm.optional(),highlight:hm.optional(),grey:gm.optional(),background:K().optional(),text:K().optional(),anchor:X({default:K().optional(),hover:K().optional()}).optional()}).optional(),font:X({family:K().optional(),urls:Y(K()).optional(),sizeXs:$.optional(),sizeSm:$.optional(),sizeBody:$.optional(),sizeH3:$.optional(),sizeH2:$.optional(),sizeH1:$.optional(),weightNormal:K().optional(),weightBold:K().optional(),weightTitle:K().optional()}).optional(),borderRadius:$.optional(),fineGrained:Vp.optional()}),vm=X({label:K(),options:Y(X({label:K(),value:md()}))}),ym=X({label:K(),icon:K(),url:K(),target:Z([`_blank`,`_self`]).optional()}),bm=X({id:K().optional(),label:K().nullable(),question:K(),switchQuestionId:K().optional()}),xm=X({impact:vm.optional(),quality:vm.optional()});X({classification:xm.optional()}),X({predefinedQuestions:Y(bm)}),Td([X({maintenance:Fd(!0)}),X({id:K(),cID:K()})]),jd(pf,df),X({label:K(),placeholder:K(),locked:J().optional()});var Sm=X({settingName:K(),iconName:K(),settingIntro:K().optional(),type:Z([`single-select`,`multi-select`]),allowEmpty:J(),values:Y(K()),defaultValues:Y(K()).optional()}),Cm=X({type:Z([`text`,`select`,`checkbox`,`radio`]),name:K(),label:Yp,placeholder:Yp.optional(),required:J().optional(),options:Y(X({value:K(),label:Yp})).optional()}),wm=X({receiverEmail:K(),triggerLabel:Yp,title:Yp.optional(),caption:Yp.optional(),submitLabel:Yp,fields:Y(Cm)}),Tm=X({before:Y(dm).optional(),after:Y(dm).optional()}),Em=X({init:Y(dm).optional(),bot:Tm.optional(),user:Tm.optional()}),Dm=kd(X({forcePredefinedQuestions:J().optional(),forceChatPage:J().optional(),showOverallFeedbackButton:J(),showOverallFeedbackEmail:J(),showCloseChatButton:J(),showContextMenu:J(),showContextInfo:J(),showReferencesByDefault:J(),showExpandedSelectors:J(),showTextFeedback:J(),inlineLayout:J(),allowAudioInput:J(),blockPII:J(),questionPrefix:K(),menu:Md(pf,Y(ym)).optional(),supportedLanguages:Y(pf),classification:xm.optional(),answerForm:wm.optional(),theme:_m,translations:mf,buttonHref:K().optional(),addQueryToUrlParams:J().optional(),addRetrievalQuestionToUrlParams:J().optional(),renderKatex:J().optional(),reflectLanguageInPath:J().optional(),sendReferrer:Z([`all`,`own`,`none`,`location`]).optional(),selectorsConfig:Y(Sm).default([]),questionLengthLimit:md().optional(),forceConsent:J().optional(),askQuestionAgain:J(),enableBackdrop:J().optional(),parentPageContext:X({extractSelectors:K().array().optional()}),messageAdditions:Em.optional(),contextVersion:md().optional(),selectedTopicResetPredefinedQuestionId:K().optional()}).partial(),X({theme:X({name:K().optional()}).optional()})),Om=l(s(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(p(e,i)&&n.isMergeableObject(t[i])?r[i]=u(i,n)(e[i],t[i],n):r[i]=c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))(),1),km=e=>typeof e!=`object`||!e,Am=e=>{if(km(e))return e;if(Array.isArray(e))return e.map(Am);let t=Object.entries(e).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Am(t)]);return Object.fromEntries(t)},jm=(e,t)=>(0,Om.default)(e,Am(t)),Mm={tokens:{font:{family:`-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif`},colors:{brand:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`},highlight:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`},grey:{0:`#ffffff`,50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`,1e3:`#000000`}},base:{fontSizeXs:{minRem:.75,maxRem:.875},fontSizeSm:{minRem:1,maxRem:1},fontSizeBody:{minRem:1,maxRem:1.25},fontSizeH3:{minRem:1.125,maxRem:1.5},fontSizeH2:{minRem:1.25,maxRem:1.75},fontSizeH1:{minRem:1.5,maxRem:2},fontWeightNormal:`400`,fontWeightBold:`700`,fontWeightTitle:`700`,lineHeightDefault:`1.5`,lineHeightSnug:`1.375`,lineHeightTight:`1.25`,borderRadius:{minRem:.5,maxRem:.75},lineColor:`color-mix(in srgb, var(--color-brand-950) 20%, transparent)`,boxShadow:`0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},components:{body:{background:`var(--color-grey-0)`,color:`var(--color-grey-900)`,focus:{color:`var(--color-highlight-500)`},custom:{selectionColor:`var(--color-grey-0)`,selectionBackground:`var(--color-brand-700)`,focusWidth:`var(--spacer-3)`,focusOffset:`var(--spacer-2)`,focusStyle:`solid`}},container:{custom:{maxWidth:`1024px`}},avatar:{color:`var(--color-brand-400)`,background:`var(--color-grey-100)`},anchor:{color:`var(--color-brand-700)`,hover:{color:`var(--color-brand-950)`}},btnPrimary:{color:`var(--color-grey-0)`,background:`var(--color-brand-700)`,borderRadius:`var(--base-border-radius)`,hover:{background:`var(--color-brand-900)`}},btnSecondary:{color:`var(--color-brand-700)`,background:`var(--color-brand-100)`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--color-grey-1000)`,background:`var(--color-brand-200)`}},btnTertiary:{color:`var(--anchor-color)`,background:`transparent`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--anchor-hover-color)`}},card:{color:`var(--color-grey-900)`,background:`var(--color-grey-100)`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,hover:{color:`var(--color-grey-1000)`,background:`var(--color-brand-100)`},custom:{iconColor:`var(--anchor-color)`,iconHoverColor:`var(--anchor-hover-color)`}},input:{background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,custom:{padding:`var(--spacer-r-16) var(--spacer-r-20)`,placeholderColor:`var(--color-grey-500)`,placeholderOpacity:`1`}},label:{color:`var(--color-grey-900)`,custom:{fontWeight:`var(--base-font-weight-bold)`}},hr:{color:`var(--base-line-color)`},checkbox:{color:`transparent`,background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,borderRadius:`0.2em`,custom:{checkedColor:`var(--btn-primary-color)`,checkedBorderColor:`var(--color-brand-700)`,checkedBackground:`var(--color-brand-700)`}},radio:{color:`transparent`,background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,custom:{checkedColor:`var(--btn-primary-color)`,checkedBorderColor:`var(--color-brand-700)`,checkedBackground:`var(--color-brand-700)`}},contextBox:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--base-box-shadow)`,custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:`var(--color-grey-1000)`,titleFontWeight:`var(--base-font-weight-bold)`,separatorColor:`var(--base-line-color)`,errorColor:`var(--message-error-color)`}},contextBoxMenuItem:{background:`transparent`,color:`var(--body-color)`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--btn-secondary-hover-color)`,background:`var(--btn-secondary-hover-background)`},custom:{activeColor:`var(--btn-secondary-hover-color)`,activeBackground:`var(--btn-secondary-hover-background)`}},chatFooter:{color:`var(--color-grey-400)`,background:`var(--body-background)`,borderRadius:`var(--base-border-radius)`,boxShadow:`0px -10px 20px 5px color-mix(in srgb, var(--body-background) 100%, transparent)`},chatInput:{color:`var(--color-grey-700)`,background:`var(--card-background)`,borderRadius:`var(--base-border-radius)`,borderColor:`transparent`,borderWidth:`3px`,hover:{background:`var(--card-hover-background)`},focus:{borderColor:`var(--body-focus-color)`}},chatInputSubmit:{color:`var(--btn-primary-color)`,background:`var(--btn-primary-background)`,borderRadius:`calc(var(--base-border-radius) / 1.25)`,hover:{color:`var(--btn-primary-hover-color)`,background:`var(--btn-primary-hover-background)`},custom:{strokeWidth:`2`,deactivatedBackground:`var(--color-grey-500)`,deactivatedOpacity:`0.25`,deactivatedScale:`0.8`,deactivatedBorderColor:`var(--color-grey-500)`}},chatInputNotification:{background:`#DD135A`,color:`var(--color-grey-0)`,borderColor:`#DD135A`,borderWidth:`1px`,borderRadius:`var(--chat-input-border-radius)`},selectedTopic:{color:`var(--body-color)`,background:`var(--color-brand-100)`,borderColor:`var(--body-background)`,borderWidth:`2px`,borderRadius:`var(--base-border-radius)`,custom:{padding:`var(--spacer-10) var(--spacer-20)`,separatorWidth:`var(--spacer-2)`,labelGap:`var(--spacer-12)`,btnColor:`var(--btn-tertiary-color)`,btnHoverColor:`var(--btn-tertiary-hover-color)`}},dialog:{background:`var(--card-background)`,color:`var(--body-color)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--base-box-shadow)`,custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:`rgba(0, 0, 0, 0.25)`,headerBorderBottomColor:`var(--base-line-color)`}},aside:{background:`var(--card-background)`,custom:{width:`400px`,containerWidthForMobileLayout:1024,backgroundOverlay:`rgba(0, 0, 0, 0.4)`,headerColor:`var(--card-color)`,headerBorderColor:`var(--base-line-color)`,headerBorderWidth:`1px`}},message:{color:`var(--body-color)`,custom:{errorColor:`#C91658`,transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:`var(--base-line-color)`,borderWidth:`1px`,custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageJsonLdMap:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`,custom:{markerColor:`#6658c8`,tileUrl:`https://tile.openstreetmap.org/{z}/{x}/{y}.png`}},messageJsonLdEvent:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`},messageJsonLdCta:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--card-box-shadow)`},messageUser:{color:`var(--body-color)`,background:`var(--card-background)`,boxShadow:`var(--card-box-shadow)`,borderRadius:`var(--card-border-radius)`},openButton:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-background)`,borderWidth:`0`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--card-hover-color)`,background:`var(--card-hover-background)`},custom:{hideTitleWhenCollapsed:0,autoExpandScrollThreshold:0,autoCollapseDelay:0,autoExpandOnce:0}},referencesToggle:{color:`var(--color-brand-700)`,hover:{color:`var(--anchor-hover-color)`}},referenceNumberTrigger:{color:`var(--btn-secondary-color)`,background:`var(--btn-secondary-background)`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--btn-secondary-hover-color)`,background:`var(--btn-secondary-hover-background)`},custom:{padding:`0.25em`}},referenceDomain:{color:`var(--color-brand-700)`,hover:{color:`var(--color-brand-800)`},custom:{padding:`0px`}},referenceNumberContent:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,hover:{color:`var(--card-hover-color)`,background:`var(--card-hover-background)`,borderColor:`var(--card-hover-border-color)`,borderWidth:`var(--card-hover-border-width)`},boxShadow:`var(--base-box-shadow)`,custom:{width:`95cqi`,maxWidth:`450px`,transitionDuration:200,transitionDelay:200,transitionY:8}},reference:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,hover:{color:`var(--card-hover-color)`,background:`var(--body-background)`,borderColor:`var(--card-hover-border-color)`,borderWidth:`var(--card-hover-border-width)`}},referenceDescription:{color:`var(--reference-color)`,hover:{color:`var(--reference-hover-color)`}},referenceNumber:{color:`var(--reference-number-trigger-color)`,background:`var(--body-background)`,borderColor:`var(--reference-number-trigger-border-color)`,borderWidth:`var(--reference-number-trigger-border-width)`,borderRadius:`var(--reference-number-trigger-border-radius)`,hover:{color:`var(--reference-number-trigger-color)`,background:`var(--reference-number-trigger-background)`,borderColor:`var(--reference-number-trigger-border-color)`,borderWidth:`var(--reference-number-trigger-border-width)`},custom:{padding:`var(--reference-number-trigger-padding)`}},toast:{background:`var(--card-background)`,color:`var(--body-color)`,boxShadow:`var(--base-box-shadow)`,borderRadius:`var(--card-border-radius)`,custom:{iconSuccessColor:`#22c55e`,iconErrorColor:`#ef4444`,iconWarningColor:`#f97316`,iconInfoColor:`#3b82f6`}},tooltip:{background:`var(--color-grey-200)`,color:`var(--body-color)`,borderRadius:`calc(var(--base-border-radius) / 2)`},flyout:{custom:{backdropColor:`var(--color-brand-800)`,backdropOpacity:`0.4`,backdropDelayIn:`0`,backdropDurationIn:`200`,backdropDelayOut:`0`,backdropDurationOut:`150`,backdropBaseScaleIn:`1`,backdropBaseScaleOut:`1`,backdropTransformOrigin:`center`,backdropScaleDirection:`scale`}},searchSummary:{color:`var(--card-color)`,background:`var(--color-grey-50)`,borderColor:`var(--color-grey-100)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,custom:{padding:`clamp(0.75rem, 0.6364rem + 0.5682cqw, 1rem)`,linkColor:`var(--anchor-color)`,referenceListColor:`var(--anchor-color)`,referenceListFontSize:`1em`,disclaimerLinkColor:`var(--anchor-color)`,errorColor:`var(--message-error-color)`,footerBackground:`var(--search-summary-footer-background)`}}},svgs:{predefinedQuestion:`
116
56
  <svg viewBox="0 0 24 24" >
117
57
  <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>
118
58
  <path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
@@ -409,14 +349,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
409
349
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="m11.1 19.7001 8.1 -7.8 -8.1 -7.8v4.40002H8.89999c-4.5 0 -8.200001 3.69998 -8.200001 8.19998v2.7c0 0.3 0.2 0.5 0.500001 0.5h0.09999c0.2 0 0.40001 -0.2 0.40001 -0.4 0.2 -2.3 2.1 -4.2001 4.5 -4.2001H11v4.4001h0.1Z" stroke-width="1"></path>
410
350
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="m15.1 19.7001 8.2 -7.8 -8.2 -7.8" stroke-width="1"></path>
411
351
  </svg>
412
- `,embedAvatar:``,phone:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z"/></svg>`,email:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m2 7 10 7 10-7"/></svg>`,headerLogo:``}}},Ig={fineGrained:{light:Fg,dark:Pg(Fg,{tokens:{base:{lineColor:`color-mix(in srgb, var(--color-brand-100) 20%, transparent)`},components:{body:{background:`var(--color-grey-900)`,color:`var(--color-grey-100)`,focus:{color:`var(--color-highlight-400)`},custom:{selectionColor:`var(--color-grey-1000)`,selectionBackground:`var(--color-brand-400)`}},avatar:{color:`var(--color-brand-200)`,background:`var(--color-grey-800)`},anchor:{color:`var(--color-brand-300)`,hover:{color:`var(--color-brand-50)`}},btnPrimary:{color:`var(--color-grey-1000)`,background:`var(--color-brand-300)`,hover:{background:`var(--color-brand-100)`}},btnSecondary:{color:`var(--color-brand-100)`,background:`var(--color-brand-900)`,hover:{color:`var(--color-grey-0)`,background:`var(--color-brand-800)`}},btnTertiary:{color:`var(--anchor-color)`,background:`transparent`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--anchor-hover-color)`}},card:{color:`var(--body-color)`,background:`var(--color-grey-800)`,hover:{color:`var(--color-grey-0)`,background:`var(--color-brand-900)`}},input:{background:`var(--color-grey-900)`,borderColor:`var(--color-grey-700)`,custom:{placeholderColor:`var(--color-grey-400)`}},label:{color:`var(--color-grey-50)`},checkbox:{background:`var(--color-grey-700)`,borderColor:`var(--color-grey-500)`,custom:{checkedColor:`var(--color-grey-900)`,checkedBorderColor:`var(--color-brand-300)`,checkedBackground:`var(--color-brand-300)`}},radio:{background:`var(--color-grey-700)`,borderColor:`var(--color-grey-500)`,custom:{checkedColor:`var(--color-grey-900)`,checkedBorderColor:`var(--color-brand-300)`,checkedBackground:`var(--color-brand-300)`}},contextBox:{custom:{titleColor:`var(--color-grey-50)`}},referenceDescription:{color:`var(--color-grey-300)`,hover:{color:`var(--color-grey-300)`}},chatFooter:{color:`var(--color-grey-500)`},chatInput:{color:`var(--color-grey-100)`},chatInputSubmit:{custom:{deactivatedBackground:`var(--color-grey-400)`,deactivatedBorderColor:`var(--color-grey-400)`}},dialog:{custom:{backgroundOverlay:`rgba(0, 0, 0, 0.5)`}},tooltip:{background:`var(--color-grey-1000)`},searchSummary:{color:`var(--body-color)`,background:`var(--color-grey-800)`,borderColor:`var(--color-grey-700)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,custom:{padding:`clamp(0.75rem, 0.6364rem + 0.5682cqw, 1rem)`,linkColor:`var(--anchor-color)`,referenceListColor:`var(--anchor-color)`,referenceListFontSize:`1em`,disclaimerLinkColor:`var(--anchor-color)`,errorColor:`var(--message-error-color)`,footerBackground:`var(--search-summary-background)`}},messageJsonLdMap:{custom:{markerColor:`#6658c8`,mapStyleUrl:`https://tiles.openfreemap.org/styles/fiord`}}}}})}},Lg=e=>typeof e==`string`?Sh[e]:e,Rg=e=>{let t=Lg(e?.colors?.brand||Sh.gray),n=Lg(e?.colors?.highlight||t),r={0:`#ffffff`,1e3:`#000000`,...Lg(e?.colors?.grey||Sh.gray)},i;return i=e.avatarImageUrl?`<img src="${e.avatarImageUrl}" alt="Avatar" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%; aspect-ratio: 1 / 1; display: block; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.1));" />`:Ig.fineGrained.light.tokens.svgs.avatar,{fontURLs:e.font?.urls,tokens:{font:{family:e.font?.family},colors:{brand:t,highlight:n,grey:r},base:{fontSizeXs:e.font?.sizeXs,fontSizeSm:e.font?.sizeSm,fontSizeBody:e.font?.sizeBody,fontSizeH3:e.font?.sizeH3,fontSizeH2:e.font?.sizeH2,fontSizeH1:e.font?.sizeH1,fontWeightNormal:e.font?.weightBold,fontWeightBold:e.font?.weightNormal,fontWeightTitle:e.font?.weightTitle,borderRadius:e.borderRadius},components:{body:{background:e.colors?.background,color:e.colors?.text},anchor:{color:e.colors?.anchor?.default,hover:{color:e.colors?.anchor?.hover}}},svgs:{avatar:i}}}},zg=e=>{let t=Rg(e);return{light:Pg(Ig.fineGrained.light,t)}},Bg=e=>{let t={};return e.dark&&(t.dark=Pg(Ig.fineGrained.dark,e.dark)),e.light&&(t.light=Pg(Ig.fineGrained.light,e.light)),!e.dark&&!e.light&&(t.light=e.light),t},Vg={de:{askQuestionAgain:`Frage erneut stellen`,answerGood:`Gute Antwort`,answerBad:`Schlechte Antwort`,chatInputPlaceholder:`Fragen Sie mich etwas`,chatInputPlaceholderListening:`Ich höre zu...`,chatInputSubmit:`Aufforderung senden`,chatInputAbort:`Antwort unterbrechen`,chatInputStartListening:`Spracherkennung starten`,chatInputStopListening:`Spracherkennung beenden`,introductionTitle:`Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?`,newChat:`Neuer Chat`,maintenanceModeError:`Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.`,messageBotLoading:`Lass mich nachdenken`,messageBotError:`Es ist ein Fehler aufgetreten:`,messageBotDefaultError:`Unbekannter Fehler`,referenceLink:`Link zur Referenz`,referencesDisplay:`Referenzen anzeigen`,referencesHide:`Referenzen ausblenden`,referencesTitle:`Referenzen`,referencesFurtherTitle:`Weitere Referenzen`,chatFooterText:``,scrollToBottom:`Nach unten scrollen`,openMenu:`Menü öffnen`,closeMenu:`Menü schließen`,closeChat:`Chat schließen`,close:`Schließen`,openInfo:`Info öffnen`,send:`Abschicken`,thankYouForFeedback:`Danke für Dein Feedback!`,answerFormThankYou:`Vielen Dank, Ihre Anfrage wurde gesendet.`,giveFeedback:`Feedback geben`,sendFeedback:`Feedback senden`,feedbackFormTitle:`Feedback geben, um unseren Chatbot zu verbessern`,feedbackFormMessage:`Ihre Nachricht`,feedbackFormMessagePlaceholder:`Schreiben Sie hier Ihre Nachricht...`,feedbackFormEmail:`E-Mail`,feedbackFormEmailPlaceholder:`Ihre E-Mail eingeben...`,classificationSubmit:`Abschicken`,classificationThankYou:`Danke für Dein Feedback!`,classificationTitle:`Bitte bewerten Sie den Einfluss und die Qualität der Antwort`,selectLanguage:`Sprache auswählen`,languageChanged:`Sprache auf Deutsch geändert.`,selectColorTheme:`Farbmodus wählen`,lightMode:`Hell`,darkMode:`Dunkel`,noResultsFound:`Keine Ergebnisse gefunden`,aboutThisChat:`
352
+ `,embedAvatar:``,phone:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z"/></svg>`,email:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m2 7 10 7 10-7"/></svg>`,headerLogo:``}}},Nm={fineGrained:{light:Mm,dark:jm(Mm,{tokens:{base:{lineColor:`color-mix(in srgb, var(--color-brand-100) 20%, transparent)`},components:{body:{background:`var(--color-grey-900)`,color:`var(--color-grey-100)`,focus:{color:`var(--color-highlight-400)`},custom:{selectionColor:`var(--color-grey-1000)`,selectionBackground:`var(--color-brand-400)`}},avatar:{color:`var(--color-brand-200)`,background:`var(--color-grey-800)`},anchor:{color:`var(--color-brand-300)`,hover:{color:`var(--color-brand-50)`}},btnPrimary:{color:`var(--color-grey-1000)`,background:`var(--color-brand-300)`,hover:{background:`var(--color-brand-100)`}},btnSecondary:{color:`var(--color-brand-100)`,background:`var(--color-brand-900)`,hover:{color:`var(--color-grey-0)`,background:`var(--color-brand-800)`}},btnTertiary:{color:`var(--anchor-color)`,background:`transparent`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--anchor-hover-color)`}},card:{color:`var(--body-color)`,background:`var(--color-grey-800)`,hover:{color:`var(--color-grey-0)`,background:`var(--color-brand-900)`}},input:{background:`var(--color-grey-900)`,borderColor:`var(--color-grey-700)`,custom:{placeholderColor:`var(--color-grey-400)`}},label:{color:`var(--color-grey-50)`},checkbox:{background:`var(--color-grey-700)`,borderColor:`var(--color-grey-500)`,custom:{checkedColor:`var(--color-grey-900)`,checkedBorderColor:`var(--color-brand-300)`,checkedBackground:`var(--color-brand-300)`}},radio:{background:`var(--color-grey-700)`,borderColor:`var(--color-grey-500)`,custom:{checkedColor:`var(--color-grey-900)`,checkedBorderColor:`var(--color-brand-300)`,checkedBackground:`var(--color-brand-300)`}},contextBox:{custom:{titleColor:`var(--color-grey-50)`}},referenceDescription:{color:`var(--color-grey-300)`,hover:{color:`var(--color-grey-300)`}},chatFooter:{color:`var(--color-grey-500)`},chatInput:{color:`var(--color-grey-100)`},chatInputSubmit:{custom:{deactivatedBackground:`var(--color-grey-400)`,deactivatedBorderColor:`var(--color-grey-400)`}},dialog:{custom:{backgroundOverlay:`rgba(0, 0, 0, 0.5)`}},tooltip:{background:`var(--color-grey-1000)`},searchSummary:{color:`var(--body-color)`,background:`var(--color-grey-800)`,borderColor:`var(--color-grey-700)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,custom:{padding:`clamp(0.75rem, 0.6364rem + 0.5682cqw, 1rem)`,linkColor:`var(--anchor-color)`,referenceListColor:`var(--anchor-color)`,referenceListFontSize:`1em`,disclaimerLinkColor:`var(--anchor-color)`,errorColor:`var(--message-error-color)`,footerBackground:`var(--search-summary-background)`}},messageJsonLdMap:{custom:{markerColor:`#6658c8`,mapStyleUrl:`https://tiles.openfreemap.org/styles/fiord`}}}}})}},Pm=e=>typeof e==`string`?fm[e]:e,Fm=e=>{let t=Pm(e?.colors?.brand||fm.gray),n=Pm(e?.colors?.highlight||t),r={0:`#ffffff`,1e3:`#000000`,...Pm(e?.colors?.grey||fm.gray)},i;return i=e.avatarImageUrl?`<img src="${e.avatarImageUrl}" alt="Avatar" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%; aspect-ratio: 1 / 1; display: block; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.1));" />`:Nm.fineGrained.light.tokens.svgs.avatar,{fontURLs:e.font?.urls,tokens:{font:{family:e.font?.family},colors:{brand:t,highlight:n,grey:r},base:{fontSizeXs:e.font?.sizeXs,fontSizeSm:e.font?.sizeSm,fontSizeBody:e.font?.sizeBody,fontSizeH3:e.font?.sizeH3,fontSizeH2:e.font?.sizeH2,fontSizeH1:e.font?.sizeH1,fontWeightNormal:e.font?.weightBold,fontWeightBold:e.font?.weightNormal,fontWeightTitle:e.font?.weightTitle,borderRadius:e.borderRadius},components:{body:{background:e.colors?.background,color:e.colors?.text},anchor:{color:e.colors?.anchor?.default,hover:{color:e.colors?.anchor?.hover}}},svgs:{avatar:i}}}},Im=e=>{let t=Fm(e);return{light:jm(Nm.fineGrained.light,t)}},Lm=e=>{let t={};return e.dark&&(t.dark=jm(Nm.fineGrained.dark,e.dark)),e.light&&(t.light=jm(Nm.fineGrained.light,e.light)),!e.dark&&!e.light&&(t.light=e.light),t},Rm={de:{askQuestionAgain:`Frage erneut stellen`,answerGood:`Gute Antwort`,answerBad:`Schlechte Antwort`,chatInputPlaceholder:`Fragen Sie mich etwas`,chatInputPlaceholderListening:`Ich höre zu...`,chatInputSubmit:`Aufforderung senden`,chatInputAbort:`Antwort unterbrechen`,chatInputStartListening:`Spracherkennung starten`,chatInputStopListening:`Spracherkennung beenden`,introductionTitle:`Ich bin <span class="liipgpt-gradient-text">LiipGPT</span>. Wie kann ich Ihnen heute helfen?`,newChat:`Neuer Chat`,maintenanceModeError:`Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.`,messageBotLoading:`Lass mich nachdenken`,messageBotError:`Es ist ein Fehler aufgetreten:`,messageBotDefaultError:`Unbekannter Fehler`,referenceLink:`Link zur Referenz`,referencesDisplay:`Referenzen anzeigen`,referencesHide:`Referenzen ausblenden`,referencesTitle:`Referenzen`,referencesFurtherTitle:`Weitere Referenzen`,chatFooterText:``,scrollToBottom:`Nach unten scrollen`,openMenu:`Menü öffnen`,closeMenu:`Menü schliessen`,closeChat:`Chat schliessen`,close:`Schliessen`,openInfo:`Info öffnen`,send:`Abschicken`,thankYouForFeedback:`Danke für Dein Feedback!`,answerFormThankYou:`Vielen Dank, Ihre Anfrage wurde gesendet.`,giveFeedback:`Feedback geben`,sendFeedback:`Feedback senden`,feedbackFormTitle:`Feedback geben, um unseren Chatbot zu verbessern`,feedbackFormMessage:`Ihre Nachricht`,feedbackFormMessagePlaceholder:`Schreiben Sie hier Ihre Nachricht...`,feedbackFormEmail:`E-Mail`,feedbackFormEmailPlaceholder:`Ihre E-Mail eingeben...`,classificationSubmit:`Abschicken`,classificationThankYou:`Danke für Dein Feedback!`,classificationTitle:`Bitte bewerten Sie den Einfluss und die Qualität der Antwort`,selectLanguage:`Sprache auswählen`,languageChanged:`Sprache auf Deutsch geändert.`,selectColorTheme:`Farbmodus wählen`,lightMode:`Hell`,darkMode:`Dunkel`,noResultsFound:`Keine Ergebnisse gefunden`,aboutThisChat:`
413
353
  <p>
414
354
  <strong>Dies ist ein Platzhaltertext, um dem Chatbot Kontext zu geben</strong>
415
355
  </p>
416
356
  <p>
417
357
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris diam, vestibulum vitae cursus et, hendrerit sed dolor. Sed quis nisl quis ipsum tempus hendrerit. <a href="https://www.liipgpt.ch/" target="_blank">Weitere Informationen <span class="sr-only">, (öffnet in einem neuen Tab)</span></a>
418
358
  </p>
419
- `,ariaMainNavigation:`Hauptnavigation`,ariaMainNavigationInfo:`Über diesen Chat`,ariaMainNavigationLinks:`Links`,ariaMainNavigationLanguageSwitch:`Sprachwechsel`,ariaMainNavigationColorMode:`Farbmodus`,ariaGotoMainNavigation:`Zur Hauptnavigation springen`,ariaAskQuestion:`Texteingabe`,ariaAskQuestionRegion:`Stellen Sie eine Frage`,ariaNotifications:`Benachrichtigungen`,ariaPredefinedQuestions:`Vordefinierte Fragen`,ariaPredefinedQuestionsRegion:`Probieren Sie unsere Beispielfragen`,ariaChatHistory:`Chatverlauf`,ariaOpenChat:`Chat öffnen`,ariaQuestionFromYou:`Ihre Frage:`,ariaAnswerFromBot:`Antwort {n} vom Assistenten:`,ariaLastAnswerNavigation:`Navigation und Optionen für die letzte Antwort`,ariaQuestionSent:`Frage gesendet. Antwort wird generiert.`,ariaAnswerReady:`Antwort bereit.`,ariaAnswerFinished:`Antwort abgeschlossen. Stellen Sie eine weitere Frage oder navigieren Sie zurück, um den Chat-Verlauf zu überprüfen, Feedback zu geben oder Referenzen zur Antwort anzuzeigen.`,ariaAnswerFinishedWithSelectedTopic:`Antwort abgeschlossen. Stellen Sie eine weitere Frage oder navigieren Sie zurück, um das gewählte Thema zu ändern, den Chat-Verlauf zu überprüfen, Feedback zu geben oder Referenzen zur Antwort anzuzeigen.`,ariaAskQuestionAgain:`Letzte Frage in das Chat-Eingabefeld kopieren, um sie erneut zu stellen`,ariaAnswerGood:`Diese Antwort als gut bewerten`,ariaAnswerBad:`Diese Antwort als schlecht bewerten`,ariaReferenceSource:`Quelle:`,ariaGiveFeedback:`Detailliertes Feedback zur Antwort geben`,ariaAnswerForm:`Formular zu dieser Antwort öffnen`,ariaLanguageChanged:`Sprache auf Deutsch geändert.`,ariaLightSelected:`Hellmodus aktiviert.`,ariaDarkSelected:`Dunkelmodus aktiviert.`,ariaSettings:`Chateinstellungen`,ariaSettingsRegion:`Passen Sie Ihre Chat-Präferenzen an`,ariaReferencesRegion:`Referenzen zur aktuellen Frage`,ariaOpensInNewTab:`(öffnet in neuem Tab)`,ariaPageTitle:`Chatbot`,ariaCloseWithEsc:`Diesen Inhalt mit der Escape-Taste schließen`,ariaInfoTitle:`Über diesen Chatbot`,ariaFlyoutRegion:`Chatbot`,ariaSelected:`ausgewählt`,ariaUnselected:`nicht ausgewählt`,ariaAllSelected:`Alle Elemente ausgewählt`,ariaAllUnselected:`Alle Elemente nicht ausgewählt`,ariaAllReseted:`Standardelemente ausgewählt`,ariaChangeTopic:`Thema ändern`,hideSettings:`Einstellungen ausblenden`,showSettings:`Einstellungen`,chooseAtLeastOneOption:`Wählen Sie mindestens eine Option`,selectAll:`Alle auswählen`,selectNone:`Alle abwählen`,resetToDefaults:`Zurücksetzen`,messageTooLong:`Ihre Nachricht muss kürzer als {questionLengthLimit} Zeichen sein. Aktuell ist sie {questionLength} Zeichen lang`,selectedTopic:`Ausgewähltes Thema`,changeTopic:`Thema ändern`,searchSummaryExpand:`Gesamte Antwort`,searchSummaryCollapse:`Weniger anzeigen`,searchSummaryOptInDefault:`KI-Suche aktivieren`,searchSummaryOptOut:`KI-Suche deaktivieren`,searchSummaryError:`Etwas ist schiefgelaufen.`,searchSummaryDisclaimer:`<p><strong>Ich bin ein KI-Assistent.</strong></p><p>Meine Antworten werden von einer künstlichen Intelligenz generiert und sind deshalb nicht immer korrekt. Wenn Sie mich aktivieren, unterstütze ich Sie bei der Suche nach den richtigen Informationen.</p>`,searchSummaryLoading:`Antwort wird generiert…`,searchSummaryFollowUpPlaceholder:`Stellen Sie eine Folgefrage…`,searchSummaryFollowUpSubmit:`Im Chat fortfahren`,ariaSearchSummaryExpand:`Vollständige Antwort anzeigen`,ariaSearchSummaryCollapse:`Antwort einklappen`,ariaSearchSummaryOptOut:`KI-Suche deaktivieren`,ariaSearchSummaryFollowUpInput:`Frage stellen`,jsonLdEventDate:`Datum`,jsonLdEventLocation:`Ort`,jsonLdEventDescription:`Infos`,jsonLdEventCtaLabel:`Zum Event`,jsonLdCtaLabel:`Mehr erfahren`,jsonLdMapOpenMap:`Karte öffnen`,ariaJsonLdMapCanvas:`Karte`,ariaJsonLdEventCard:`Veranstaltung`,ariaJsonLdMapCard:`Standort`,ariaJsonLdCtaCard:`Link`},en:{askQuestionAgain:`Ask question again`,answerGood:`Good answer`,answerBad:`Bad answer`,chatInputPlaceholder:`Ask me something`,chatInputPlaceholderListening:`I'm listening...`,chatInputSubmit:`Send prompt`,chatInputAbort:`Stop response`,chatInputStartListening:`Start speech recognition`,chatInputStopListening:`Stop speech recognition`,introductionTitle:`I am <span class="liipgpt-gradient-text">LiipGPT</span>. How can I help you out today?`,newChat:`New discussion`,maintenanceModeError:`The chat is currently not available. Please try again later.`,messageBotLoading:`Let me think`,messageBotError:`An error occurred:`,messageBotDefaultError:`Unknown error`,referenceLink:`Link to reference`,referencesDisplay:`Show references`,referencesHide:`Hide references`,referencesTitle:`References`,referencesFurtherTitle:`More references`,chatFooterText:``,scrollToBottom:`Scroll to bottom`,openMenu:`Open menu`,closeMenu:`Close menu`,closeChat:`Close chat`,openInfo:`Open info`,close:`Close`,send:`Send`,thankYouForFeedback:`Thank you for your feedback!`,answerFormThankYou:`Thank you, your request has been sent.`,giveFeedback:`Give feedback`,sendFeedback:`Send feedback`,feedbackFormTitle:`Give feedback to improve our Chatbot`,feedbackFormMessage:`Your message`,feedbackFormMessagePlaceholder:`Write your message here...`,feedbackFormEmail:`E-Mail`,feedbackFormEmailPlaceholder:`Enter your E-Mail`,classificationSubmit:`Submit`,classificationThankYou:`Thank you for your feedback!`,classificationTitle:`Please rate the impact and quality of the answer`,selectLanguage:`Select language`,languageChanged:`Language changed to English.`,selectColorTheme:`Choose color mode`,lightMode:`Light`,darkMode:`Dark`,noResultsFound:`No results found`,aboutThisChat:`
359
+ `,ariaMainNavigation:`Hauptnavigation`,ariaMainNavigationInfo:`Über diesen Chat`,ariaMainNavigationLinks:`Links`,ariaMainNavigationLanguageSwitch:`Sprachwechsel`,ariaMainNavigationColorMode:`Farbmodus`,ariaGotoMainNavigation:`Zur Hauptnavigation springen`,ariaAskQuestion:`Texteingabe`,ariaAskQuestionRegion:`Stellen Sie eine Frage`,ariaNotifications:`Benachrichtigungen`,ariaPredefinedQuestions:`Vordefinierte Fragen`,ariaPredefinedQuestionsRegion:`Probieren Sie unsere Beispielfragen`,ariaChatHistory:`Chatverlauf`,ariaOpenChat:`Chat öffnen`,ariaQuestionFromYou:`Ihre Frage:`,ariaAnswerFromBot:`Antwort {n} vom Assistenten:`,ariaLastAnswerNavigation:`Navigation und Optionen für die letzte Antwort`,ariaQuestionSent:`Frage gesendet. Antwort wird generiert.`,ariaAnswerReady:`Antwort bereit.`,ariaAnswerFinished:`Antwort abgeschlossen. Stellen Sie eine weitere Frage oder navigieren Sie zurück, um den Chat-Verlauf zu überprüfen, Feedback zu geben oder Referenzen zur Antwort anzuzeigen.`,ariaAnswerFinishedWithSelectedTopic:`Antwort abgeschlossen. Stellen Sie eine weitere Frage oder navigieren Sie zurück, um das gewählte Thema zu ändern, den Chat-Verlauf zu überprüfen, Feedback zu geben oder Referenzen zur Antwort anzuzeigen.`,ariaAskQuestionAgain:`Letzte Frage in das Chat-Eingabefeld kopieren, um sie erneut zu stellen`,ariaAnswerGood:`Diese Antwort als gut bewerten`,ariaAnswerBad:`Diese Antwort als schlecht bewerten`,ariaReferenceSource:`Quelle:`,ariaGiveFeedback:`Detailliertes Feedback zur Antwort geben`,ariaAnswerForm:`Formular zu dieser Antwort öffnen`,ariaLanguageChanged:`Sprache auf Deutsch geändert.`,ariaLightSelected:`Hellmodus aktiviert.`,ariaDarkSelected:`Dunkelmodus aktiviert.`,ariaSettings:`Chateinstellungen`,ariaSettingsRegion:`Passen Sie Ihre Chat-Präferenzen an`,ariaReferencesRegion:`Referenzen zur aktuellen Frage`,ariaOpensInNewTab:`(öffnet in neuem Tab)`,ariaPageTitle:`Chatbot`,ariaCloseWithEsc:`Diesen Inhalt mit der Escape-Taste schliessen`,ariaInfoTitle:`Über diesen Chatbot`,ariaFlyoutRegion:`Chatbot`,ariaSelected:`ausgewählt`,ariaUnselected:`nicht ausgewählt`,ariaAllSelected:`Alle Elemente ausgewählt`,ariaAllUnselected:`Alle Elemente nicht ausgewählt`,ariaAllReseted:`Standardelemente ausgewählt`,ariaChangeTopic:`Thema ändern`,hideSettings:`Einstellungen ausblenden`,showSettings:`Einstellungen`,chooseAtLeastOneOption:`Wählen Sie mindestens eine Option`,selectAll:`Alle auswählen`,selectNone:`Alle abwählen`,resetToDefaults:`Zurücksetzen`,messageTooLong:`Ihre Nachricht muss kürzer als {questionLengthLimit} Zeichen sein. Aktuell ist sie {questionLength} Zeichen lang`,selectedTopic:`Ausgewähltes Thema`,changeTopic:`Thema ändern`,searchSummaryExpand:`Gesamte Antwort`,searchSummaryCollapse:`Weniger anzeigen`,searchSummaryOptInDefault:`KI-Suche aktivieren`,searchSummaryOptOut:`KI-Suche deaktivieren`,searchSummaryError:`Etwas ist schiefgelaufen.`,searchSummaryDisclaimer:`<p><strong>Ich bin ein KI-Assistent.</strong></p><p>Meine Antworten werden von einer künstlichen Intelligenz generiert und sind deshalb nicht immer korrekt. Wenn Sie mich aktivieren, unterstütze ich Sie bei der Suche nach den richtigen Informationen.</p>`,searchSummaryLoading:`Antwort wird generiert…`,searchSummaryFollowUpPlaceholder:`Stellen Sie eine Folgefrage…`,searchSummaryFollowUpSubmit:`Im Chat fortfahren`,ariaSearchSummaryExpand:`Vollständige Antwort anzeigen`,ariaSearchSummaryCollapse:`Antwort einklappen`,ariaSearchSummaryOptOut:`KI-Suche deaktivieren`,ariaSearchSummaryFollowUpInput:`Frage stellen`,jsonLdEventDate:`Datum`,jsonLdEventLocation:`Ort`,jsonLdEventDescription:`Infos`,jsonLdEventCtaLabel:`Zum Event`,jsonLdCtaLabel:`Mehr erfahren`,jsonLdMapOpenMap:`Karte öffnen`,ariaJsonLdMapCanvas:`Karte`,ariaJsonLdEventCard:`Veranstaltung`,ariaJsonLdMapCard:`Standort`,ariaJsonLdCtaCard:`Link`},en:{askQuestionAgain:`Ask question again`,answerGood:`Good answer`,answerBad:`Bad answer`,chatInputPlaceholder:`Ask me something`,chatInputPlaceholderListening:`I'm listening...`,chatInputSubmit:`Send prompt`,chatInputAbort:`Stop response`,chatInputStartListening:`Start speech recognition`,chatInputStopListening:`Stop speech recognition`,introductionTitle:`I am <span class="liipgpt-gradient-text">LiipGPT</span>. How can I help you out today?`,newChat:`New discussion`,maintenanceModeError:`The chat is currently not available. Please try again later.`,messageBotLoading:`Let me think`,messageBotError:`An error occurred:`,messageBotDefaultError:`Unknown error`,referenceLink:`Link to reference`,referencesDisplay:`Show references`,referencesHide:`Hide references`,referencesTitle:`References`,referencesFurtherTitle:`More references`,chatFooterText:``,scrollToBottom:`Scroll to bottom`,openMenu:`Open menu`,closeMenu:`Close menu`,closeChat:`Close chat`,openInfo:`Open info`,close:`Close`,send:`Send`,thankYouForFeedback:`Thank you for your feedback!`,answerFormThankYou:`Thank you, your request has been sent.`,giveFeedback:`Give feedback`,sendFeedback:`Send feedback`,feedbackFormTitle:`Give feedback to improve our Chatbot`,feedbackFormMessage:`Your message`,feedbackFormMessagePlaceholder:`Write your message here...`,feedbackFormEmail:`E-Mail`,feedbackFormEmailPlaceholder:`Enter your E-Mail`,classificationSubmit:`Submit`,classificationThankYou:`Thank you for your feedback!`,classificationTitle:`Please rate the impact and quality of the answer`,selectLanguage:`Select language`,languageChanged:`Language changed to English.`,selectColorTheme:`Choose color mode`,lightMode:`Light`,darkMode:`Dark`,noResultsFound:`No results found`,aboutThisChat:`
420
360
  <p>
421
361
  <strong>This is a placeholder text to give context to the chat-bot</strong>
422
362
  </p>
@@ -437,4 +377,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
437
377
  <p>
438
378
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mauris diam, vestibulum vitae cursus et, hendrerit sed dolor. Sed quis nisl quis ipsum tempus hendrerit. <a href="https://www.liipgpt.ch/" target="_blank">Plus d'informations <span class="sr-only">, (ouvre dans un nouvel onglet)</span></a>
439
379
  </p>
440
- `,ariaMainNavigation:`Navigation principale`,ariaMainNavigationInfo:`À propos de ce chat`,ariaMainNavigationLinks:`Liens`,ariaMainNavigationLanguageSwitch:`Changement de langue`,ariaMainNavigationColorMode:`Mode couleur`,ariaGotoMainNavigation:`Aller à la navigation principale`,ariaAskQuestion:`Saisie texte`,ariaAskQuestionRegion:`Poser une question`,ariaNotifications:`Notifications`,ariaPredefinedQuestions:`Questions prédéfinies`,ariaPredefinedQuestionsRegion:`Essayez nos questions d'exemple`,ariaChatHistory:`Historique du chat`,ariaOpenChat:`Ouvrir le chat`,ariaQuestionFromYou:`Votre question:`,ariaAnswerFromBot:`Réponse {n} de l'Assistant:`,ariaLastAnswerNavigation:`Navigation et options pour la dernière réponse`,ariaQuestionSent:`Question envoyée. Génération de la réponse en cours...`,ariaAnswerReady:`Réponse prête.`,ariaAnswerFinished:`Réponse terminée. Posez une autre question ou naviguez en arrière pour consulter l'historique du chat, donner un avis ou voir les références liées à la réponse.`,ariaAnswerFinishedWithSelectedTopic:`Réponse terminée. Posez une autre question ou naviguez en arrière pour changer le sujet sélectionné, consulter l'historique du chat, donner un avis ou voir les références liées à la réponse.`,ariaAskQuestionAgain:`Copier la dernière question dans le champ de saisie pour la reposer`,ariaAnswerGood:`Évaluer cette réponse comme bonne`,ariaAnswerBad:`Évaluer cette réponse comme mauvaise`,ariaReferenceSource:`Source:`,ariaGiveFeedback:`Donner un feedback détaillé sur la réponse`,ariaAnswerForm:`Ouvrir le formulaire pour cette réponse`,ariaLanguageChanged:`Langue française sélectionnée.`,ariaLightSelected:`Mode clair activé.`,ariaDarkSelected:`Mode sombre activé.`,ariaSettings:`Paramètres du chat`,ariaSettingsRegion:`Ajustez vos préférences de chat`,ariaReferencesRegion:`Références pour la question actuelle`,ariaOpensInNewTab:`(ouvre dans un nouvel onglet)`,ariaPageTitle:`Chatbot`,ariaCloseWithEsc:`Fermer ce contenu en appuyant sur la touche Échap`,ariaInfoTitle:`À propos de ce chatbot`,ariaFlyoutRegion:`Chatbot`,ariaSelected:`sélectionné`,ariaUnselected:`non sélectionné`,ariaAllSelected:`Tous les éléments sélectionnés`,ariaAllUnselected:`Tous les éléments non sélectionnés`,ariaAllReseted:`Éléments par défaut sélectionnés`,ariaChangeTopic:`Changer de sujet`,hideSettings:`Masquer les paramètres`,showSettings:`Paramètres`,chooseAtLeastOneOption:`Veuillez choisir au moins une option`,selectAll:`Tout sélectionner`,selectNone:`Tout désélectionner`,resetToDefaults:`Réinitialiser`,messageTooLong:`Votre message doit être plus court que {questionLengthLimit} caractères. Actuellement, il fait {questionLength} caractères`,selectedTopic:`Sujet sélectionné`,changeTopic:`Changer de sujet`,searchSummaryExpand:`Réponse complète`,searchSummaryCollapse:`Afficher moins`,searchSummaryOptInDefault:`Activer la recherche IA`,searchSummaryOptOut:`Désactiver la recherche IA`,searchSummaryError:`Une erreur s'est produite.`,searchSummaryDisclaimer:`<p><strong>Je suis un assistant IA.</strong></p><p>Mes réponses sont générées par l'intelligence artificielle et peuvent ne pas toujours être correctes.</p>`,searchSummaryLoading:`Génération de la réponse…`,searchSummaryFollowUpPlaceholder:`Posez une question de suivi…`,searchSummaryFollowUpSubmit:`Continuer dans le chat`,ariaSearchSummaryExpand:`Afficher la réponse complète`,ariaSearchSummaryCollapse:`Réduire la réponse`,ariaSearchSummaryOptOut:`Désactiver la recherche IA`,ariaSearchSummaryFollowUpInput:`Poser une question de suivi`,jsonLdEventDate:`Date`,jsonLdEventLocation:`Lieu`,jsonLdEventDescription:`Infos`,jsonLdEventCtaLabel:`Voir l'événement`,jsonLdCtaLabel:`En savoir plus`,jsonLdMapOpenMap:`Ouvrir la carte`,ariaJsonLdMapCanvas:`Carte`,ariaJsonLdEventCard:`Événement`,ariaJsonLdMapCard:`Localisation`,ariaJsonLdCtaCard:`Lien`}},Hg=e=>(e??=Vg,{de:(0,jg.default)(Vg.de,e.de??{}),en:(0,jg.default)(Vg.en,e.en??{}),fr:(0,jg.default)(Vg.fr,e.fr??{}),it:(0,jg.default)(Vg.it,e.it??{})}),Ug=e=>({init:e?.init??[],bot:{before:e?.bot?.before??[],after:e?.bot?.after??[]},user:{before:e?.user?.before??[],after:e?.user?.after??[]}}),Wg=e=>{let t;t=e.theme?.fineGrained?Bg(e.theme?.fineGrained):zg(e?.theme??{});let n=Hg(e?.translations),r={...e,forcePredefinedQuestions:e.forcePredefinedQuestions??!1,forceChatPage:e.forceChatPage??!1,showOverallFeedbackButton:e.showOverallFeedbackButton??!1,showOverallFeedbackEmail:e.showOverallFeedbackEmail??!0,showCloseChatButton:e.showCloseChatButton??!1,showContextInfo:e.showContextInfo??!1,showContextMenu:e.showContextMenu??!1,showReferencesByDefault:e.showReferencesByDefault??!1,showTextFeedback:e.showTextFeedback??!0,showExpandedSelectors:e.showExpandedSelectors??!1,inlineLayout:e.inlineLayout??!1,questionPrefix:e.questionPrefix??``,blockPII:e.blockPII??!1,allowAudioInput:e.allowAudioInput??!1,supportedLanguages:e.supportedLanguages??Object.keys(n),fullTheme:t,translations:n,buttonHref:e.buttonHref,addQueryToUrlParams:e.addQueryToUrlParams??!0,addRetrievalQuestionToUrlParams:e.addRetrievalQuestionToUrlParams??!1,renderKatex:e.renderKatex??!1,sendReferrer:e.sendReferrer??`all`,selectorsConfig:e.selectorsConfig??[],questionLengthLimit:e.questionLengthLimit??600,forceConsent:e.forceConsent??!1,askQuestionAgain:e.askQuestionAgain??!1,enableBackdrop:e.enableBackdrop??!1,parentPageContext:e.parentPageContext??{},messageAdditions:Ug(e.messageAdditions??{}),contextVersion:e.contextVersion??0};return e.classification&&(r.classification=e.classification),e.menu&&(r.menu=e.menu),e.answerForm&&(r.answerForm=e.answerForm),r},Gg={de:{aborted:`Verbindung zum Server wurde unerwartet unterbrochen. Bitte versuchen Sie es erneut.`,"client-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,"server-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,"sse-error":`Ein unbekannter Fehler ist aufgetreten. Bitte versuchen Sie es erneut.`,blocked:`Ihre Anfrage wurde blockiert.`,"pii-detected":`Es wurden persönliche Daten erkannt. Bitte entfernen Sie diese und versuchen Sie es erneut.`,"incomplete-error":`Ein unbekannter Fehler ist aufgetreten. Die Antwort könnte unvollständig sein.`,"unexpected-call":`Ein unbekannter Fehler ist aufgetreten. Die Antwort könnte unvollständig sein.`,"quota-reached":`Kontingent überschritten. Bitte versuchen Sie es später erneut.`,"rate-limit":`Kontingent überschritten. Bitte versuchen Sie es später erneut.`,maintenance:`Der Chat ist derzeit nicht verfügbar. Bitte versuchen Sie es später erneut.`,"too-long":`Ihre Frage war zu lang, versuchen Sie es mit einer Kürzeren.`,"too-short":`Ihre Frage war zu kurz, versuchen Sie es mit einer Längeren.`,"feedback-failed":`Feedback senden fehlgeschlagen. Bitte versuchen Sie es erneut.`,"answer-form-failed":`Formular konnte nicht gesendet werden. Bitte versuchen Sie es erneut.`,"speech-not-supported":`Spracherkennung wird nicht unterstützt.`,"speech-transcription-failed":`Sprachtranskription fehlgeschlagen.`,"speech-no-text-detected":`Kein Text in der Spracheingabe erkannt.`,"speech-microphone-access-denied":`Mikrofonzugriff verweigert.`},en:{aborted:`Connection to the server was unexpectedly interrupted. Please try again.`,"client-error":`An unknown error has occurred. Please try again.`,"server-error":`An unknown error has occurred. Please try again.`,"sse-error":`An unknown error has occurred. Please try again.`,blocked:`Your request has been blocked.`,"pii-detected":`Personal data has been detected. Please remove it and try again.`,"incomplete-error":`An unknown error has occurred. The response might be incomplete.`,"unexpected-call":`An unknown error has occurred. The response might be incomplete.`,"quota-reached":`Quota exceeded. Please try again later.`,"rate-limit":`Quota exceeded. Please try again later.`,maintenance:`The chat is currently unavailable. Please try again later.`,"too-long":`Your question was too long, try a shorter one.`,"too-short":`Your question was too short, try a longer one.`,"feedback-failed":`Failed to send feedback. Please try again.`,"answer-form-failed":`Failed to send the form. Please try again.`,"speech-not-supported":`Speech recognition is not supported.`,"speech-transcription-failed":`Speech transcription failed.`,"speech-no-text-detected":`No text detected in speech input.`,"speech-microphone-access-denied":`Microphone access denied.`},it:{aborted:`La connessione al server è stata interrotta inaspettatamente. Si prega di riprovare.`,"client-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,"server-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,"sse-error":`Si è verificato un errore sconosciuto. Si prega di riprovare.`,blocked:`La tua richiesta è stata bloccata.`,"pii-detected":`Sono stati rilevati dati personali. Si prega di rimuoverli e riprovare.`,"incomplete-error":`Si è verificato un errore sconosciuto. La risposta potrebbe essere incompleta.`,"unexpected-call":`Si è verificato un errore sconosciuto. La risposta potrebbe essere incompleta.`,"quota-reached":`Quota superata. Si prega di riprovare più tardi.`,"rate-limit":`Quota superata. Si prega di riprovare più tardi.`,maintenance:`La chat non è attualmente disponibile. Si prega di riprovare più tardi.`,"too-long":`La tua domanda era troppo lunga, prova con una più breve.`,"too-short":`La tua domanda era troppo breve, prova con una più lunga.`,"feedback-failed":`Invio del feedback non riuscito. Si prega di riprovare.`,"answer-form-failed":`Invio del modulo non riuscito. Si prega di riprovare.`,"speech-not-supported":`Il riconoscimento vocale non è supportato.`,"speech-transcription-failed":`Trascrizione vocale fallita.`,"speech-no-text-detected":`Nessun testo rilevato nell'input vocale.`,"speech-microphone-access-denied":`Accesso al microfono negato.`},fr:{aborted:`La connexion au serveur a été interrompue de façon inattendue. Veuillez réessayer.`,"client-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"server-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"sse-error":`Une erreur inconnue s'est produite. Veuillez réessayer.`,"pii-detected":`Des données personnelles ont été détectées. Veuillez les supprimer et réessayer.`,blocked:`Votre demande a été bloquée.`,"incomplete-error":`Une erreur inconnue s'est produite. La réponse pourrait être incomplète.`,"unexpected-call":`Une erreur inconnue s'est produite. La réponse pourrait être incomplète.`,"quota-reached":`Quota dépassé. Veuillez réessayer plus tard.`,"rate-limit":`Quota dépassé. Veuillez réessayer plus tard.`,maintenance:`Le chat est actuellement indisponible. Veuillez réessayer plus tard.`,"too-long":`Votre question était trop longue, essayez d'en poser une plus courte.`,"too-short":`Votre question était trop courte, essayez d'en poser une plus longue.`,"feedback-failed":`Échec de l'envoi du feedback. Veuillez réessayer.`,"answer-form-failed":`Échec de l'envoi du formulaire. Veuillez réessayer.`,"speech-not-supported":`La reconnaissance vocale n'est pas prise en charge.`,"speech-transcription-failed":`Échec de la transcription vocale.`,"speech-no-text-detected":`Aucun texte détecté dans l'entrée vocale.`,"speech-microphone-access-denied":`Accès au microphone refusé.`}},Kg={de:{email:`Bitte keine E-Mail Adressen eingeben`,creditCard:`Bitte keine Kreditkarteninformationen eingeben`,ahv:`Bitte keine AHV-Nummern eingeben`,phoneSwiss:`Bitte keine Telefonnummern eingeben`,phoneInternational:`Bitte keine Telefonnummern eingeben`,swissPassport:`Bitte keine Passinformationen eingeben`,longNumber:`Bitte keine langen Nummern eingeben`},en:{email:`Please do not enter email addresses`,creditCard:`Please do not enter credit card information`,ahv:`Please do not enter AHV numbers`,phoneSwiss:`Please do not enter phone numbers`,phoneInternational:`Please do not enter phone numbers`,swissPassport:`Please do not enter passport information`,longNumber:`Please do not enter long numbers`},it:{email:`Si prega di non inserire indirizzi email`,creditCard:`Si prega di non inserire informazioni sulla carta di credito`,ahv:`Si prega di non inserire numeri AVS`,phoneSwiss:`Si prega di non inserire numeri di telefono`,phoneInternational:`Si prega di non inserire numeri di telefono`,swissPassport:`Si prega di non inserire informazioni sul passaporto`,longNumber:`Si prega di non inserire numeri lunghi`},fr:{email:`Veuillez ne pas saisir d'adresses e-mail`,creditCard:`Veuillez ne pas saisir d'informations de carte de crédit`,ahv:`Veuillez ne pas saisir de numéros AVS`,phoneSwiss:`Veuillez ne pas saisir de numéros de téléphone`,phoneInternational:`Veuillez ne pas saisir de numéros de téléphone`,swissPassport:`Veuillez ne pas saisir d'informations de passeport`,longNumber:`Veuillez ne pas saisir de longs numéros`}},qg=(e,t)=>t.includes(e),Jg=(e,t)=>{if(qg(e,t))return e;let n=Yg();return qg(n,t)?n:`en`},Yg=()=>navigator.language.split(`-`)[0],Xg=(e,t)=>{localStorage.setItem(`liipgpt:selectedLanguage`,e),t&&(t.lang=e)},Zg=e=>Jg(localStorage.getItem(`liipgpt:selectedLanguage`),e),Qg=(e,t)=>Array.from(new Set([e,...t,`en`,...eh])),$g=(e,t,n,r)=>{for(let i of Qg(n,r)){let n=e[i]?.selectors?.[t];if(n)return n}},e_=s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),t_=typeof document<`u`,n_=0,r_=class{#e=M(gn([]));get toasts(){return I(this.#e)}set toasts(e){N(this.#e,e,!0)}#t=M(gn([]));get heights(){return I(this.#t)}set heights(e){N(this.#t,e,!0)}#n=e=>{let t=this.toasts.findIndex(t=>t.id===e);return t===-1?null:t};addToast=e=>{t_&&this.toasts.unshift(e)};updateToast=({id:e,data:t,type:n,message:r})=>{let i=this.toasts.findIndex(t=>t.id===e),a=this.toasts[i];this.toasts[i]={...a,...t,id:e,title:r,type:n,updated:!0}};create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id&&e.id?.length>0?e.id:n_++,i=e.dismissible===void 0?e.dismissable===void 0?!0:e.dismissable:e.dismissible,a=e.type===void 0?`default`:e.type;return Rr(()=>{this.toasts.find(e=>e.id===r)?this.updateToast({id:r,data:e,type:a,message:t,dismissible:i}):this.addToast({...n,id:r,title:t,dismissible:i,type:a})}),r};dismiss=e=>(Rr(()=>{if(e===void 0){this.toasts=this.toasts.map(e=>({...e,dismiss:!0}));return}let t=this.toasts.findIndex(t=>t.id===e);this.toasts[t]&&(this.toasts[t]={...this.toasts[t],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}let t=this.#n(e);if(t!==null)return this.toasts.splice(t,1),e};message=(e,t)=>this.create({...t,type:`default`,message:e});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:typeof t.loading==`string`?t.loading:t.loading()}));let r=e instanceof Promise?e:e(),i=n!==void 0;return r.then(e=>{if(typeof e==`object`&&e&&`ok`in e&&typeof e.ok==`boolean`&&!e.ok){i=!1;let t=i_(e);this.create({id:n,type:`error`,message:t})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?t.success(e):t.success;this.create({id:n,type:`success`,message:r})}}).catch(e=>{if(t.error!==void 0){i=!1;let r=typeof t.error==`function`?t.error(e):t.error;this.create({id:n,type:`error`,message:r})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),n};custom=(e,t)=>{let n=t?.id||n_++;return this.create({component:e,id:n,...t}),n};removeHeight=e=>{this.heights=this.heights.filter(t=>t.toastId!==e)};setHeight=e=>{let t=this.#n(e.toastId);if(t===null){this.heights.push(e);return}this.heights[t]=e};reset=()=>{this.toasts=[],this.heights=[]}};function i_(e){return e&&typeof e==`object`&&`status`in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}var a_=new r_;function o_(e,t){return a_.create({message:e,...t})}var s_=Object.assign(o_,{success:a_.success,info:a_.info,warning:a_.warning,error:a_.error,custom:a_.custom,message:a_.message,promise:a_.promise,dismiss:a_.dismiss,loading:a_.loading,getActiveToasts:()=>a_.toasts.filter(e=>!e.dismiss)}),c_=e=>{let t=new Set;Object.getOwnPropertyNames(e).forEach(e=>t.add(e));let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).forEach(e=>t.add(e)),n=Object.getPrototypeOf(n);return Array.from(t)},l_=(e,t)=>{let n={};return t.forEach(t=>{n[t]=e[t]}),n},u_=console.warn,d_=()=>{},f_=(e,t)=>Rr(()=>{console.warn=d_;let n=rt(t?l_(e,t):e);return console.warn=u_,n}),p_=e=>e&&typeof e.then==`function`,m_=class{config;self;devtools;stateKeys;constructor(e,t){this.config=e,this.self=t,typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&(this.stateKeys=c_(this.config.state),this.devtools=window.__REDUX_DEVTOOLS_EXTENSION__.connect({name:this.config.name??`updatelogic`}),this.devtools.init(this.createStateSnapshot()),this.devtools.subscribe(e=>{e.type===`DISPATCH`&&e.state}))}createStateSnapshot(){return f_(this.config.state,this.stateKeys)}sendStart(e,t){this.devtools.send({type:`→ ${e}`,args:t},this.createStateSnapshot())}sendError(e,t,n){this.devtools.send({type:`❌ ${e}`,args:t,error:n},this.createStateSnapshot())}sendSuccess(e,t,n){this.devtools.send({type:`✓ ${e}`,args:t,return:n},this.createStateSnapshot())}isIncluded(e){return this.config.excludeInDevTools?!this.config.excludeInDevTools.includes(e):!0}createProxyFunction(e,t){let n=this.devtools&&this.isIncluded(e);return typeof t==`function`?(...r)=>{if(!n)return Rr(()=>t.call(this.self,...r));let i=f_(r);this.sendStart(e,i);try{let n=Rr(()=>t.call(this.self,...r));return p_(n)?n.then(t=>(this.sendSuccess(e,i,t),t),t=>{throw this.sendError(e,i,t),t}):(this.sendSuccess(e,i,n),n)}catch(t){throw this.sendError(e,i,t),t}}:t}},h_=(e,t)=>{let n={},r=new m_(e,n);return Object.keys(t).forEach(e=>{if(e===`state`||e===`name`)return;let i=t[e];n[e]=r.createProxyFunction(e,i)}),n},g_=l(e_(),1);async function __(){if(typeof navigator>`u`||!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return!1;try{return(await navigator.mediaDevices.enumerateDevices()).some(e=>e.kind===`audioinput`)}catch(e){return console.error(`Error checking for microphone:`,e),!1}}function v_(){return typeof window>`u`||!window.MediaRecorder?null:MediaRecorder.isTypeSupported(`audio/mp4`)?`audio/mp4`:MediaRecorder.isTypeSupported(`audio/webm`)?`audio/webm`:MediaRecorder.isTypeSupported(`audio/wav`)?`audio/wav`:null}function y_(){return typeof window>`u`?!1:!!(window.MediaRecorder&&v_())}var b_=class{mediaRecorder=null;audioChunks=[];started=!1;starting=!1;stream=null;options;audioContext=null;analyser=null;dataArray=null;volumeUpdateInterval=null;constructor(e={}){this.options=e}async start(){if(this.started||this.starting){console.warn(`AudioRecorder: Start already in progress or already started`);return}if(!y_()||!navigator.mediaDevices){let e=Error(`MediaRecorder not supported or no microphone access`);throw this.options.onError?.(e),e}try{if(this.starting=!0,this.stream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},video:!1}),!this.starting){this.stopStream(this.stream);return}this.mediaRecorder&&this.mediaRecorder.state!==`inactive`&&(console.warn(`AudioRecorder: MediaRecorder already active, stopping previous recording`),this.mediaRecorder.stop(),this.cleanup()),this.started=!0,this.starting=!1;let e=v_();if(!e)throw Error(`No supported media type found`);let t={mimeType:e};this.mediaRecorder=new MediaRecorder(this.stream,t),this.audioChunks=[],this.mediaRecorder.ondataavailable=e=>{e.data.size>0&&this.audioChunks.push(e.data)},this.mediaRecorder.onstop=async()=>{let t=this.audioChunks.length>0?new Blob(this.audioChunks,{type:e}):null;await this.options.onDataAvailable?.(t),this.options.onStop?.(),this.cleanup()},this.mediaRecorder.onerror=e=>{let t=Error(`MediaRecorder error: ${e}`);this.options.onError?.(t),this.cleanup()},this.mediaRecorder.start(),this.setupVolumeAnalysis(this.stream),this.options.onStart?.()}catch(e){this.started=!1,this.starting=!1;let t=e instanceof Error?e:Error(String(e));throw this.options.onError?.(t),t}}stop(){this.started=!1,this.starting=!1,this.volumeUpdateInterval&&=(clearInterval(this.volumeUpdateInterval),null),this.mediaRecorder&&this.mediaRecorder.state!==`inactive`?this.mediaRecorder.stop():(this.stream&&this.stopStream(this.stream),this.cleanup())}setupVolumeAnalysis(e){if(this.options.onVolumeChange)try{this.audioContext=new AudioContext,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=256,this.analyser.smoothingTimeConstant=.8;let t=this.analyser.frequencyBinCount;this.dataArray=new Uint8Array(t),this.audioContext.createMediaStreamSource(e).connect(this.analyser),this.startVolumeMonitoring()}catch(e){console.warn(`Failed to set up volume analysis:`,e)}}startVolumeMonitoring(){!this.analyser||!this.dataArray||!this.options.onVolumeChange||(this.volumeUpdateInterval=window.setInterval(()=>{if(!this.analyser||!this.dataArray||!this.started)return;this.analyser.getByteFrequencyData(this.dataArray);let e=0;for(let t=0;t<this.dataArray.length;t++)e+=this.dataArray[t]*this.dataArray[t];let t=Math.sqrt(e/this.dataArray.length)/255;t=(t*3)**.7;let n=Math.min(100,Math.max(0,Math.round(t*100)));this.options.onVolumeChange?.(n)},100))}get recording(){return this.started&&this.mediaRecorder?.state===`recording`}get isStarting(){return this.starting}stopStream(e){e.getTracks().forEach(e=>e.stop())}cleanup(){this.volumeUpdateInterval&&=(clearInterval(this.volumeUpdateInterval),null),this.audioContext&&=(this.audioContext.close().catch(console.warn),null),this.analyser=null,this.dataArray=null,this.stream&&=(this.stopStream(this.stream),null),this.mediaRecorder=null,this.audioChunks=[],this.started=!1,this.starting=!1}static isSupported(){return y_()}static getSupportedMediaType(){return v_()}},x_=e=>(localStorage.setItem(`liipgpt-color-scheme`,e),C_([`light`,`dark`])),S_=()=>{let e=localStorage.getItem(`liipgpt-color-scheme`);return e===`light`||e===`dark`?e:`system`},C_=e=>{let t=S_();return t===`system`&&(t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`),e.includes(t)?t:e[0]??`light`},w_=Bo(),T_=(e,t)=>{if(e instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement){t.textContent=e.value;return}if(e instanceof HTMLSelectElement&&t instanceof HTMLSelectElement){Array.from(e.options).forEach((e,n)=>{t.options[n]&&(t.options[n].selected=e.selected)});return}e instanceof HTMLInputElement&&t instanceof HTMLInputElement&&(t.setAttribute(`value`,e.value),(e.type===`checkbox`||e.type===`radio`)&&(e.checked?t.setAttribute(`checked`,`checked`):t.removeAttribute(`checked`)))},E_=e=>{let t=e.cloneNode(!0);if(!(t instanceof Element))return``;let n=`input, textarea, select`,r=e.querySelectorAll(n),i=t.querySelectorAll(n);return r.forEach((e,t)=>{let n=i[t];n&&T_(e,n)}),w_.sanitize(t.outerHTML,{FORBID_TAGS:[`style`,`script`],FORBID_ATTR:[`style`,`class`]})},D_=e=>{if(!e?.length)return[];let t=e.join(`,`),n=document.querySelectorAll(t);return Array.from(n,E_)},O_=`liipgpt:context`,k_=()=>localStorage.getItem(O_),A_=[{type:`email`,check:e=>/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b/.test(e)},{type:`creditCard`,check:e=>/\b(?:\d[ -]*?){13,16}\b/.test(e)},{type:`ahv`,check:e=>/\b756\.\d{4}\.\d{4}\.\d{2}\b/.test(e)},{type:`phoneSwiss`,check:e=>/\b0(?:\s*\d){2}(?:\s*\/\s*)?(?:\s*\d){7,}\b/.test(e)},{type:`phoneInternational`,check:e=>/(?:\+|00)(?:\s*\d){10,}\b/.test(e)},{type:`swissPassport`,check:e=>/\b[A-HJ-NP-Z](?=.*\d)[A-HJ-NP-Z0-9]{7}\b/.test(e)},{type:`longNumber`,check:e=>/\b\d{9,}\b/.test(e)}],j_=e=>{for(let t of A_)if(t.check(e))return t.type},M_=`liipgpt:selectorValues`,N_=`liipgpt:selectorKnownDefaults`,P_=()=>{try{let e=mg.getItem(M_),t=mg.getItem(N_);return e?{values:JSON.parse(e),knownDefaults:t?JSON.parse(t):{}}:null}catch{return null}},F_=e=>{let t={};for(let n of e)t[n.settingName]=n.defaultValues??(n.allowEmpty?[]:[n.values[0]]).filter(Boolean);return t},I_=(e,t)=>{try{let n=F_(t);mg.setItem(M_,JSON.stringify(e)),mg.setItem(N_,JSON.stringify(n))}catch(e){console.error(`Failed to save selector values:`,e)}},L_=e=>{try{let t=P_();if(!t)return;delete t.values[e],delete t.knownDefaults[e],mg.setItem(M_,JSON.stringify(t.values)),mg.setItem(N_,JSON.stringify(t.knownDefaults))}catch(e){console.error(`Failed to clear selector saved state:`,e)}},R_=e=>{let t=P_(),n=e.map(e=>{let n=e.defaultValues??(e.allowEmpty?[]:[e.values[0]]).filter(Boolean);if(!t?.values[e.settingName])return[e.settingName,n];let r=t.values[e.settingName],i=t.knownDefaults[e.settingName]||[],a=r.filter(t=>e.values.includes(t)),o=i.filter(e=>!n.includes(e)),s=a.filter(e=>!o.includes(e)),c=n.filter(e=>!i.includes(e)&&!s.includes(e)),l=[...s,...c];return l.length===0&&!e.allowEmpty?[e.settingName,n]:[e.settingName,l]});return Object.fromEntries(n)},z_=class extends Error{constructor(e){super(e),this.name=`UnreachableError`}},B_=(e,t)=>{if(!e)return;let n=t.find(t=>t.id===e);return n||console.warn(`autofire-predefined-question-id="${e}" did not match any loaded predefined question. Falling back to default routing.`),n},V_=(e,t,n,r,i)=>{if(e&&!t)return{name:`consent-page`};let a=new URLSearchParams(window.location.search),o=a.get(`q`),s=a.get(`id`)??void 0,c=a.get(`sid`)??void 0;return o?{name:`chat-page`,query:o,predefinedQuestionId:s,switchQuestionId:c}:i?{name:`chat-page`,query:i}:r?{name:`chat-page`,query:r.question,predefinedQuestionId:r.id}:n?{name:`chat-page`}:{name:`start-page`}},H_=`follow-up-q`,U_=e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e),W_=()=>{let e=new URLSearchParams(window.location.hash.replace(/^#/,``)).get(`cID`)??void 0;return{cID:e&&U_(e)?e:void 0,followUpQuestion:new URLSearchParams(window.location.search).get(H_)?.trim()||void 0}},G_=()=>{let e=new URLSearchParams(window.location.search);if(!e.has(H_))return;e.delete(H_);let t=e.toString();history.replaceState(null,``,`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`)},K_=e=>{if(e)try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return t;console.warn(`additional-start-parameters must be a JSON object. Received: ${e}`);return}catch(t){console.warn(`Failed to parse additional-start-parameters as JSON: ${e}`,t);return}},q_=e=>{let t=K_(e);return t?(e=>Array.isArray(e)?e.map(String):typeof e==`string`?e.split(`,`).map(e=>e.trim()).filter(Boolean):[])(t.scopeAvailableSlugs).length===1:!1},J_=e=>e?e.map(e=>({id:sg(),...e})):[],$=new class{#e=M(gn({}));get data(){return I(this.#e)}set data(e){N(this.#e,e,!0)}#t=M(gn({}));get targets(){return I(this.#t)}set targets(e){N(this.#t,e,!0)}#n=M(!1);get initialized(){return I(this.#n)}set initialized(e){N(this.#n,e,!0)}#r=M(0);get currentAudioVolume(){return I(this.#r)}set currentAudioVolume(e){N(this.#r,e,!0)}ariaLiveMessagesClearingTimeoutDuration=350;#i=M(null);get currentAudioRecorder(){return I(this.#i)}set currentAudioRecorder(e){N(this.#i,e,!0)}#a=M(!1);get isTranscribing(){return I(this.#a)}set isTranscribing(e){N(this.#a,e,!0)}#o=j(()=>{if(!this.initialized)return[];let e=this.data.chatConfig.menu;return e?e[this.data.language]??[]:[]});get menu(){return I(this.#o)}set menu(e){N(this.#o,e)}#s=j(()=>this.initialized?this.data.chatConfig.translations[this.data.language]??{}:{});get t(){return I(this.#s)}set t(e){N(this.#s,e)}#c=j(()=>this.initialized?Gg[this.data.language]??{}:Gg.en??{});get errorTranslations(){return I(this.#c)}set errorTranslations(e){N(this.#c,e)}#l=j(()=>this.initialized?Kg[this.data.language]??{}:Kg.en??{});get piiTranslations(){return I(this.#l)}set piiTranslations(e){N(this.#l,e)}#u=j(()=>this.initialized?this.data.currentColorScheme:`light`);get colorScheme(){return I(this.#u)}set colorScheme(e){N(this.#u,e)}#d=j(()=>this.initialized?this.data.chatConfig.fullTheme[this.data.currentColorScheme]:{});get themeBase(){return I(this.#d)}set themeBase(e){N(this.#d,e)}#f=j(()=>this.themeBase.tokens);get theme(){return I(this.#f)}set theme(e){N(this.#f,e)}#p=j(()=>{if(!this.initialized)return[];let e=[];for(let t of this.data.chatConfig.selectorsConfig)t.allowEmpty||(this.data.selectorValues[t.settingName]||[]).length===0&&e.push(t.settingName);return e});get selectorsWithErrors(){return I(this.#p)}set selectorsWithErrors(e){N(this.#p,e)}#m=j(()=>{if(!this.initialized)return{};let e=this.data.chatConfig,t={};for(let n of e.selectorsConfig){let r=$g(e.translations,n.settingName,this.data.language,e.supportedLanguages);r||console.error(`Missing translation for setting ${n.settingName} in all languages`),t[n.settingName]=r??{name:n.settingName,placeholder:``,values:{}}}return t});get selectorTranslations(){return I(this.#m)}set selectorTranslations(e){N(this.#m,e)}#h=j(()=>{if(!this.initialized)return!1;let e=this.data.chatConfig;return this.data.route.name===`chat-page`&&!e.forceChatPage||e.showContextInfo||e.showContextMenu||e.showCloseChatButton||this.data.props.flyout});get hasMainNavigationContent(){return I(this.#h)}set hasMainNavigationContent(e){N(this.#h,e)}#g=j(()=>{if(!this.initialized)return``;let e=this.t,t=this.data.chatConfig,n=this.data.route.name===`chat-page`&&!t.forceChatPage,r=[];return n&&r.push(e.newChat),t.showContextInfo&&r.push(e.ariaMainNavigationInfo),t.showContextMenu&&(this.menu.length>0&&r.push(e.ariaMainNavigationLinks),t.supportedLanguages.length>0&&r.push(e.ariaMainNavigationLanguageSwitch),this.data.has2ColorSchemes&&r.push(e.ariaMainNavigationColorMode)),(t.showCloseChatButton||this.data.props.flyout)&&r.push(e.closeChat),r.length===0?e.ariaMainNavigation:`${e.ariaMainNavigation}: ${r.join(`, `)}`});get ariaMainNavigationRegion(){return I(this.#g)}set ariaMainNavigationRegion(e){N(this.#g,e)}},Y_,X_,Z_;h_({name:`chat-logic`,state:$,excludeInDevTools:[`onInput`]},{async init(e){X_=e;let t=X_.speechRecognitionApiKey||void 0;Y_=new Ag({apiUrl:X_.apiUrl,apiKey:X_.apiKey,speechRecognitionApiKey:t,strict:!0,startParameters:K_(X_.additionalStartParameters)});try{let e=await Y_.getChatConfig();window.CHAT_CONFIG_OVERRIDE&&Object.assign(e,window.CHAT_CONFIG_OVERRIDE);let t=(await Y_.getMetadata()).mode===`maintenance`;t&&this.showErrorToast(`maintenance`);let n=Wg(e);X_.inlineLayout!==void 0&&(n.inlineLayout=X_.inlineLayout),X_.forceChatPage!==void 0&&(n.forceChatPage=X_.forceChatPage);let r;r=X_.lang?Jg(X_.lang,n.supportedLanguages):Zg(n.supportedLanguages),Xg(r,$.targets.mainElement);let i=await this.getPredefinedQuestions(r),a=n.translations[r]?.ariaOpensInNewTab;a&&Y_.setNewTabSrText(a);let o=[];if(n.renderKatex){let e=await import(`https://esm.sh/marked-katex-extension@5.1.5`).catch(e=>{console.error(`Couldn't load marked-katex-extension:`,e)});e&&(Y_.setMarkedExtensions(e.default({nonStandard:!0,output:`mathml`})),o.push(`https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.css`))}let s=Object.keys(n.fullTheme),c=!1;if(n.forceConsent)try{c=mg.getItem(`liipgpt:termsAccepted`)===`true`}catch(e){console.warn(`Failed to load terms acceptance from storage:`,e)}let l=B_(X_.autofirePredefinedQuestionId,i);$.data={currentConversationState:`idle`,chatConfig:n,language:r,predefinedQuestions:i,isInMaintenance:t,history:J_(n.messageAdditions.init),selectedColorScheme:S_(),has2ColorSchemes:s.length===2,currentColorScheme:C_(s),conversationFeedbackId:void 0,conversationFeedbackIsOpen:!1,answerFormMessageId:void 0,openedPopup:void 0,props:X_,flyoutIsOpen:!1,questionHasPii:void 0,chatInputValue:``,selectorValues:R_(n.selectorsConfig),selectorsIsOpen:!1,predefinedQuestionId:void 0,switchQuestionId:void 0,currentReferencesAsideId:void 0,ariaLiveStatusMessage:void 0,ariaLiveStatusMessageClearingTimeout:void 0,wasReferencesAsideClosed:!1,isAsideMobile:!0,route:V_(n.forceConsent??!1,c,n.forceChatPage??!1,l,X_.question),additionalStylesheets:o,hasOpenedOverlays:!1,isInlineLayoutContained:!1,termsAccepted:c,selectedTopic:void 0},window.LIIPGPT_LISTENERS?.route?.($.data.route),window.LIIPGPT_LISTENERS?.conversation?.($.data.currentConversationState),$.data.selectorsIsOpen=$.data.chatConfig.showExpandedSelectors??!1,$.initialized=!0,this.checkForOpenedPopup(),window.addEventListener(`hashchange`,()=>{this.checkForOpenedPopup()}),await this.startFromHandoverOrRoute(()=>this.goto(V_(n.forceConsent??!1,c,n.forceChatPage??!1,l,X_.question),!0))}catch(e){throw s_.error(e instanceof Error?e.message:`Failed to load the chatbot. Please reload the page.`,{duration:1e4,unstyled:!0,classes:{toast:`toast`}}),e}},setTarget(e,t){$.targets[e]=t},goto(e,t=!1){if(!(!t&&(0,g_.default)($.data.route,e)))switch($.data.route=e,window.LIIPGPT_LISTENERS?.route?.(e),e.name){case`consent-page`:break;case`start-page`:e.prefill&&($.data.chatInputValue=e.prefill);break;case`chat-page`:if($.data.chatInputValue=e.query??``,$.data.predefinedQuestionId=e.predefinedQuestionId,$.data.switchQuestionId=e.switchQuestionId,e.query&&(this.onSubmit(),$.data.chatConfig.addQueryToUrlParams)){let t=new URLSearchParams(window.location.search);t.set(`q`,e.query),e.predefinedQuestionId?t.set(`id`,e.predefinedQuestionId):t.delete(`id`),e.switchQuestionId?t.set(`sid`,e.switchQuestionId):t.delete(`sid`),history.pushState(null,``,`?${t.toString()}${window.location.hash}`)}break}},getSelectorConfig(e){let t=$.data.chatConfig.selectorsConfig.find(t=>t.settingName===e);if(!t)throw Error(`Setting ${e} not found`);return t},getPrettifiedSelectorValues(){let e=Object.entries($.data.selectorValues).map(([e,t])=>{let n;try{n=this.getSelectorConfig(e)}catch(t){console.error(`Error getting selector config for ${e}: ${t}`);return}return n.type===`single-select`?[e,t[0]]:[e,t]}).filter(e=>!!e);return Object.fromEntries(e)},setSelectorValue(e,t){let n=this.getSelectorConfig(e);if(!n){console.warn(`Trying to set setting ${e} but it is not defined in the chat config`);return}if(n.type===`single-select`&&t.length>1){console.warn(`Trying to set multiple values for single-select setting ${e}`);return}$.data.selectorValues[e]=t,I_($.data.selectorValues,$.data.chatConfig.selectorsConfig)},resetSelectorToDefaults(e){let t=this.getSelectorConfig(e);if(!t){console.warn(`Trying to reset setting ${e} but it is not defined in the chat config`);return}let n=t.defaultValues??(t.allowEmpty?[]:[t.values[0]]).filter(Boolean);return L_(e),$.data.selectorValues[e]=n,I_($.data.selectorValues,$.data.chatConfig.selectorsConfig),n},async getPredefinedQuestions(e){if(X_?.hidePredefinedQuestions)return[];try{return Y_.getPredefinedQuestions({url:window.location.origin+window.location.pathname,language:e})}catch(e){return console.warn(`Failed to load predefined questions:`,e),[]}},setColorScheme(e){$.data.selectedColorScheme=e,$.data.currentColorScheme=x_(e),this.setAriaLiveStatusMessage(e===`dark`?$.t.ariaDarkSelected:$.t.ariaLightSelected)},async abort(){await Z_?.abort()},changeConversationState(e){$.data.currentConversationState=e,window.LIIPGPT_LISTENERS?.conversation?.(e)},onInput(e){$.data.chatConfig.blockPII&&($.data.questionHasPii=j_(e)),$.data.chatInputValue=e,$.data.predefinedQuestionId=void 0,$.data.switchQuestionId=void 0},onSubmit(e=!1,t,n=!1){let r=D_($.data.chatConfig.parentPageContext?.extractSelectors);if($.data.questionHasPii){console.warn(`Question contains PII, not submitting:`,$.data.questionHasPii);return}let i=$.data.chatConfig.questionPrefix?`${$.data.chatConfig.questionPrefix} ${$.data.chatInputValue}`:$.data.chatInputValue;n||($.data.history.push(...J_($.data.chatConfig.messageAdditions.user.before)),$.data.history.push({type:`user`,time:new Date().toISOString(),message:$.data.chatInputValue}),$.data.history.push(...J_($.data.chatConfig.messageAdditions.user.after)));let a=$.data.history.push(...J_($.data.chatConfig.messageAdditions.bot.before));$.data.history.push({id:`UNRESOLVED`,state:`loading`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:``,html:``,text:``},references:{all:[],used:[],unused:[]}});let o=!1,s=!1,c={features:X_.features?X_.features.trim().split(`,`):[`formatting`],mode:X_.mode||void 0,cache:X_.cache||void 0,onError:e=>{this.showErrorToast(e),window.LIIPGPT_LISTENERS?.error?.(e),(e===`pii-detected`||e===`blocked`)&&this.editLatestQuestion()},onMessage:e=>{e.type===`topic-selected`&&($.data.selectedTopic={label:e.label,placeholder:e.placeholder,locked:q_(X_.additionalStartParameters)}),e.type===`state`&&e.state!==`history-entry-initialized`&&!s&&(s=!0,this.setAriaLiveStatusMessage($.t.ariaQuestionSent))},lang:$.data.language,selectorValues:{...this.getPrettifiedSelectorValues(),context:k_(),...t},predefinedQuestionId:$.data.predefinedQuestionId,switchQuestionId:$.data.switchQuestionId,onEmbed:e=>{let t=$.data.history[a];t&&t.type===`bot`&&!t.message.markdown?($.data.history[a]={...e,id:t.id??sg()},o=!0):$.data.history.push({...e,id:sg()})}};$.data.predefinedQuestionId=void 0,$.data.switchQuestionId=void 0,r.length&&(c.selectorValues.parentPageContextHtml=r);let l=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.origin===r.origin&&n.pathname===r.pathname}catch{return!1}},u=$.data.chatConfig.sendReferrer??`all`;if([`all`,`own`,`location`].includes(u)){let e=u===`location`||$.data.props.flyout,t;t=e?`${window.location.protocol}//${window.location.host}${window.location.pathname}`:l(document.referrer,window.location.href)?null:document.referrer;let n=u===`own`&&!$.data.props.flyout&&t&&!t.startsWith(window.location.origin);c.referrer=t&&!n?t:void 0}$.data.props.source?c.source=$.data.props.source:$.data.props.flyout&&(c.source=`flyout`),$.data.currentConversationId||($.data.currentConversationId=Y_.createConversationId());let d=Y_.chat($.data.currentConversationId,i,c);Z_=d,$.data.lastChatResponseId=d.id,$.data.currentConversationState!==`searching`&&this.changeConversationState(`searching`);let f=!1,p,m=!!$.data.currentReferencesAsideId;(e&&m||!e&&$.data.chatConfig.showReferencesByDefault)&&($.data.isAsideMobile||this.openReferencesAside(d.id)),d.subscribe(e=>{if(!o&&$.data.history[a]&&($.data.history[a]={question:$.data.chatInputValue,...e}),$.data.chatConfig.addRetrievalQuestionToUrlParams&&e.retrievalQuestion){let t=new URLSearchParams(window.location.search);t.get(`search`)!==e.retrievalQuestion&&(t.set(`search`,e.retrievalQuestion),history.replaceState(null,``,`?${t.toString()}${window.location.hash}`))}$.data.chatConfig.showReferencesByDefault&&!$.data.wasReferencesAsideClosed&&$.data.currentReferencesAsideId!==e.id&&!$.data.isAsideMobile&&this.openReferencesAside(e.id),e.state===`streaming`&&$.data.currentConversationState!==`answering`&&this.changeConversationState(`answering`),e.state===`done`&&(this.changeConversationState(`idle`),f||(f=!0,this.setAriaLiveStatusMessage(`${$.t.ariaAnswerReady} ... ${e.message.text} ... ${$.data.selectedTopic?$.t.ariaAnswerFinishedWithSelectedTopic:$.t.ariaAnswerFinished}`),$.data.history.push(...J_($.data.chatConfig.messageAdditions.bot.after))),$.data.currentReferencesAsideId&&e.references.used.length>0?(clearTimeout(p),p=setTimeout(()=>{this.openReferencesAside(e.id)},100)):this.closeReferencesAside())}),$.data.chatInputValue=``},async onStartSpeechRecognition(){try{if(!await __()){this.showErrorToast(`speech-not-supported`);return}if(await navigator.mediaDevices.getUserMedia({audio:!0}),b_.isSupported())$.data.chatInputValue=``,$.currentAudioRecorder=new b_({onDataAvailable:async e=>{$.isTranscribing=!0,await this.handleTranscription(e)},onError:()=>{this.showErrorToast(`speech-microphone-access-denied`),$.currentAudioRecorder=null,$.isTranscribing=!1},onVolumeChange:e=>{$.currentAudioVolume=e}}),$.currentAudioRecorder.start();else{this.showErrorToast(`speech-not-supported`);return}}catch(e){throw this.showErrorToast(`speech-microphone-access-denied`),$.currentAudioRecorder=null,$.isTranscribing=!1,e}},editLatestQuestion(){let e=$.data.history.findLastIndex(e=>e?.type===`user`);if(e===-1){console.error(`No last user question, available`);return}let t=$.data.history.splice(e)[0];$.data.chatInputValue=t.message},onStopSpeechRecognition(){if($.currentAudioRecorder){let e=$.currentAudioRecorder;$.currentAudioRecorder=null,e.stop()}$.currentAudioVolume=0},async handleTranscription(e){if(!e){console.warn(`No audio data received`);return}try{let t=await Y_.transcribeAudio(e,{lang:$.data.language});if(t.error){this.showErrorToast(`speech-transcription-failed`);return}if(t.transcript.trim()){if($.data.chatConfig.blockPII&&($.data.questionHasPii=j_(t.transcript.trim()),$.data.questionHasPii))return;$.data.chatInputValue=t.transcript.trim()}else this.showErrorToast(`speech-no-text-detected`)}catch(e){console.error(`Speech transcription error:`,e),this.showErrorToast(`speech-transcription-failed`)}finally{$.currentAudioRecorder=null,$.isTranscribing=!1,$.currentAudioVolume=0}},async startFromHandoverOrRoute(e){let{cID:t,followUpQuestion:n}=W_();if(!t){e();return}let r=await this.rehydrateFromSearchSummaryHandover(t);n?($.data.route={name:`chat-page`},$.data.chatInputValue=n,this.onSubmit(!0)):r||e(),G_()},async rehydrateFromSearchSummaryHandover(e){$.data.currentConversationId=e;let t=await Y_.getMetadata(),n=t.mode===`ready`?t.userId:void 0,r=n?await Y_.getChatHistory(e,n):[];if(r.length===0)return $.data.currentConversationId=void 0,!1;let i={all:[],used:[],unused:[]},a=new pc({newTabSrText:$.t.ariaOpensInNewTab}),o=[];for(let{question:e,answer:t}of r)o.push({type:`user`,time:new Date().toISOString(),message:e,id:sg()}),o.push({id:sg(),state:`done`,errors:[],type:`bot`,time:new Date().toISOString(),message:{markdown:t,html:a.toHTML(t,i),text:t},references:{all:[],used:[],unused:[]}});return $.data.history=[...J_($.data.chatConfig.messageAdditions.init),...o],$.data.route={name:`chat-page`},!0},async onStartConversation(e,t,n){await this.abort(),$.data.history=J_($.data.chatConfig.messageAdditions.init),$.data.currentConversationId=Y_.createConversationId(),this.goto({name:`chat-page`,query:e,predefinedQuestionId:t,switchQuestionId:n})},async onNewConversation(){await this.abort();let e=$.data.currentConversationId;if($.data.currentConversationId=void 0,$.data.currentReferencesAsideId=void 0,$.data.history=J_($.data.chatConfig.messageAdditions.init),$.data.predefinedQuestionId=void 0,$.data.switchQuestionId=void 0,$.data.selectedTopic=void 0,$.data.chatConfig.addQueryToUrlParams){let e=new URLSearchParams(window.location.search);e.delete(`q`),e.delete(`id`),e.delete(`sid`),history.pushState(null,``,`?${e.toString()}${window.location.hash}`)}this.goto({name:`start-page`}),e&&Y_.userAction(`newDiscussion`,{conversationId:e,lang:$.data.language}).catch(e=>{console.error(`Failed to notify backend of new discussion:`,e)})},async onChangeTopic(){let e=$.data.chatConfig.selectedTopicResetPredefinedQuestionId;if(!e){console.warn("No selectedTopicResetPredefinedQuestionId available to reset the selected topic. Set it in the `Config DB` in the backend, in a `generalConfig` default set.");return}await this.abort(),$.data.selectedTopic=void 0,$.data.predefinedQuestionId=e,$.data.switchQuestionId=void 0,$.data.chatInputValue=``,this.onSubmit(!0,void 0,!0)},showSuccessToast(e){s_.success($.t[e],{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},showErrorToast(e){s_.error($.errorTranslations[e],{unstyled:!0,duration:3e3,classes:{toast:`toast`}})},async submitFeedback(e){try{let t=$.data.conversationFeedbackId||$.data.lastChatResponseId;if(!t)throw new z_(`Tried to give feedback with no id.`);let n=$.data.history.find(e=>e.type===`bot`&&e.id===t);await Y_.feedback(t,n?.question??``,e),setTimeout(()=>{this.showSuccessToast(`thankYouForFeedback`)},500)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},toggleReferencesAside(e){$.data.currentReferencesAsideId===e?this.closeReferencesAside():this.openReferencesAside(e)},openReferencesAside(e){$.data.currentReferencesAsideId=e,this.setOpenOverlay(!0)},closeReferencesAside(){$.data.currentReferencesAsideId=void 0,$.data.wasReferencesAsideClosed=!0,this.setOpenOverlay(!1)},setAsideMobile(e){$.data.isAsideMobile=e},openFlyout(){$.data.flyoutIsOpen=!0},closeFlyout(){$.data.flyoutIsOpen=!1},openConversationFeedback(){$.data.conversationFeedbackIsOpen=!0,this.setOpenOverlay(!0)},openMessageFeedback(e){$.data.conversationFeedbackId=e},closeFeedback(){$.data.conversationFeedbackIsOpen=!1,$.data.conversationFeedbackId=void 0,this.setOpenOverlay(!1)},openAnswerForm(e){$.data.answerFormMessageId=e,this.setOpenOverlay(!0)},closeAnswerForm(){$.data.answerFormMessageId=void 0,this.setOpenOverlay(!1)},async submitAnswerForm(e){try{let t=$.data.chatConfig.answerForm,n=$.data.answerFormMessageId;if(!t)throw new z_(`Tried to submit the answer form with no answerForm config.`);if(!n)throw new z_(`Tried to submit the answer form with no message id.`);let r=$.data.history.findIndex(e=>e.type===`bot`&&e.id===n),i=r===-1?void 0:$.data.history[r],a=$.data.history.slice(0,r===-1?void 0:r).findLast(e=>e.type===`user`)?.message,o=i?.question||a||(i?.type===`bot`?i.retrievalQuestion??``:``);await Y_.submitAnswerForm({receiverEmail:t.receiverEmail,fields:t.fields.map(t=>({name:t.name,value:e[t.name]??``})),question:o,answer:i?.type===`bot`?i.message.text:``,requestId:n,lang:$.data.language}),setTimeout(()=>{this.showSuccessToast(`answerFormThankYou`)},500)}catch(e){console.error(`Answer form submission failed:`,e),this.showErrorToast(`answer-form-failed`)}},setOpenOverlay(e){$.data.hasOpenedOverlays=e},setAriaLiveStatusMessage(e){$.data.ariaLiveStatusMessage=e,clearTimeout($.data.ariaLiveStatusMessageClearingTimeout),$.data.ariaLiveStatusMessageClearingTimeout=setTimeout(()=>{$.data.ariaLiveStatusMessage=``},$.ariaLiveMessagesClearingTimeoutDuration)},closePopup(){window.location.hash=``},checkForOpenedPopup(){let e=window.location.hash.slice(1),t=$.t.popups?.find(t=>t.hash===e);t?$.data.openedPopup=t:$.data.openedPopup=void 0},async thumbs(e,t){try{let n=$.data.history.find(t=>t.type===`bot`&&t.id===e),r=n?.type===`bot`?n:void 0;if(r?.feedback===t)return;t===`up`?await Y_.thumbsUp(e,n?.question??``):await Y_.thumbsDown(e,n?.question??``);let i=!r?.feedback;r&&(r.feedback=t),i&&this.showSuccessToast(`thankYouForFeedback`)}catch(e){console.error(`Feedback failed:`,e),this.showErrorToast(`feedback-failed`)}},async onLanguageChange(e){if($.data.language=Jg(e,$.data.chatConfig.supportedLanguages),Xg($.data.language,$.targets.mainElement),$.data.predefinedQuestions=await this.getPredefinedQuestions($.data.language),this.setAriaLiveStatusMessage($.t.ariaLanguageChanged),$.data.chatConfig.reflectLanguageInPath){let e=new URL(window.location.href);e.pathname=`/${$.data.language}`,window.history.replaceState({},``,e.toString())}},async acceptTerms(){$.data.termsAccepted=!0;try{mg.setItem(`liipgpt:termsAccepted`,`true`)}catch(e){console.warn(`Failed to save terms acceptance to storage:`,e)}this.closePopup(),await Fr(),this.goto(V_($.data.chatConfig.forceConsent??!1,!0,$.data.chatConfig.forceChatPage??!1,B_($.data.props.autofirePredefinedQuestionId,$.data.predefinedQuestions),$.data.props.question))},updateChatInput(e){$.data.chatInputValue=e}});var Q_=`@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.chat-app{--spacer-1:.0625rem;--spacer-2:.125rem;--spacer-3:.1875rem;--spacer-4:.25rem;--spacer-5:.3125rem;--spacer-6:.375rem;--spacer-8:.5rem;--spacer-10:.625rem;--spacer-12:.75rem;--spacer-16:1rem;--spacer-20:1.25rem;--spacer-24:1.5rem;--spacer-28:1.75rem;--spacer-32:2rem;--spacer-40:2.5rem;--spacer-48:3rem;--spacer-56:3.5rem;--spacer-64:4rem;--spacer-72:4.5rem;--spacer-80:5rem;--spacer-120:7.5rem;--spacer-r-8:clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12:clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16:clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20:clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24:clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28:clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32:clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40:clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48:clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56:clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64:clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80:clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96:clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120:clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--default-transition-duration:.2s;--default-transition-timing-function:ease-in-out;--z-index-flyout:10000;--z-index-dialog:600;--z-index-loader:500;--z-index-reference-number:400;--z-index-footer:300;--z-index-header:200;--z-index-tooltip:100;--z-index-tooltip-hover:101;--z-index-local-overlay:10;--z-index-below:-10;--ease-out-quart:cubic-bezier(.165, .84, .44, 1);--ease-in-quart:cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart:cubic-bezier(.77, 0, .175, 1);--fly-in-id:0;--btn-padding-x:var(--spacer-r-20);--btn-padding-y:var(--spacer-r-8);--btn-icon-size:var(--spacer-24);--btn-submit-size:2.5em;--last-bot-message-min-height:0}.chat-app :where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){font-weight:var(--base-font-weight-title);line-height:var(--base-line-height-tight)}.chat-app :where(b,strong){font-weight:var(--base-font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea,select){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow,none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea,select)::placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:var(--body-focus-style);outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app ::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:0 0}.chat-app ::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:4px;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:#0000004d transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app :hover::-webkit-scrollbar-thumb{visibility:visible}.chat-app :active::-webkit-scrollbar-thumb{visibility:visible}.chat-app :focus::-webkit-scrollbar-thumb{visibility:visible}.svg{width:var(--spacer-r-24);height:auto}.svg svg{width:100%;height:auto;display:block;overflow:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{content:"";background-color:#0000;position:absolute;inset:0}.chat-app :where(.sr-only){clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.skip-link){width:0;height:0;color:var(--anchor-color);font-weight:700;font-size:var(--base-font-size-xs);position:absolute;overflow:hidden}.chat-app :where(.skip-link):focus-visible{width:auto;height:auto;position:static}.chat-app :where(.fly-in){--fly-in-id:0;--fly-in-duration:.4s;--fly-out-duration:.2s;--fly-in-delay:.3s;--fly-in-delay-additional:.1s;--fly-in-y:var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease, var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration);transform:translateY(0)}.chat-app :where(.truncate){text-overflow:ellipsis;white-space:nowrap;display:inline-block;overflow:hidden}.chat-app :where(.line-clamp){-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--6){-webkit-line-clamp:6}.chat-app :where(.container){width:100%;max-width:var(--container-max-width,1024px);padding-right:var(--spacer-16);padding-left:var(--spacer-16);margin:0 auto}@container chat-container (width>=640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (width>=768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(h1){font-size:var(--base-font-size-h1)}.chat-app :where(h2){font-size:var(--base-font-size-h2)}.chat-app :where(h3){font-size:var(--base-font-size-h3)}.chat-app :where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.h1){font-size:var(--base-font-size-h1)}.chat-app :where(.h2){font-size:var(--base-font-size-h2)}.chat-app :where(.h3){font-size:var(--base-font-size-h3)}.chat-app :where(.h4,.h5,.h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){margin-bottom:var(--spacer-r-24);display:block}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-type:decimal;list-style-position:outside}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){padding-left:1em;position:relative}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{content:"•";font-size:.9em;position:absolute;top:0;left:0}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;background-color:var(--color-grey-700);background-color:var(--hr-color);border:none}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight,var(--base-font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration,underline);text-decoration:var(--anchor-text-decoration,underline);text-underline-offset:var(--anchor-text-underline-offset,.15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container) :where(table){border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch;width:100%;display:block;overflow-x:auto}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--base-line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.text-container) :where(:first-child){margin-top:0}.chat-app :where(.text-container) :where(:last-child){margin-bottom:0}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}.chat-app :where(.display-contents){display:contents}.chat-app :where(.absolute){position:absolute!important}}@layer components{.chat-app{display:contents}.chat-app__container{height:100%;display:flex;overflow:hidden;transform:translateZ(0);container:chat-container/inline-size}.chat-app__container>:where(*){color:var(--body-color);font-style:normal;font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-body);line-height:var(--base-line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app__container.chat-app__container--inline-layout-contained{height:90svh;scroll-margin-top:10svh}@media (width>=768px){.chat-app__container.chat-app__container--inline-layout-contained{height:100svh;scroll-margin-top:0}}.chat-app__main{overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y;flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden auto;container:chat-inner-container/inline-size}.chat-app__container--inline-layout .chat-app__main{overscroll-behavior-y:auto}.chat-app__loader-container{z-index:var(--z-index-loader);justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);background:var(--body-background);position:sticky;top:0}.chat-app__header--unsticked{position:relative}.chat-app__header-content{--btn-padding-x:var(--btn-padding-y);column-gap:var(--spacer-r-12);min-height:calc(var(--btn-padding-y) * 2 + var(--btn-icon-size) + var(--spacer-10) * 2);margin-right:calc(var(--btn-padding-x) * -1);margin-left:calc(var(--btn-padding-x) * -1);padding-top:var(--spacer-10);padding-bottom:var(--spacer-10);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex;position:relative}.chat-app__header-content>:where(*){z-index:0;pointer-events:auto;position:relative}.chat-app__header-content:after{right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);content:"";border-bottom:1px solid #0000;transition:border-color .1s ease-in-out;position:absolute}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__header-new-conversation{margin-right:auto;position:relative}@container chat-container (width>=640px){.chat-app__header-new-conversation .tooltip{display:none}}.chat-app__header--with-logo :where(.chat-app__header-content){margin-left:0}.chat-app__header--with-logo :where(.chat-app__header-new-conversation){margin-right:unset;margin-left:auto}.chat-app__header-logo{margin-right:auto}.chat-app__header-logo :where(svg){width:auto;height:var(--spacer-28)}.chat-app__body{flex-direction:column;flex-grow:1;width:100%;display:flex;position:relative}.chat-app__page-transition{flex-direction:column;flex-grow:1;width:100%;height:100%;display:flex}.chat-app__aside{--duration-in:.65s;--duration-out:.5s;visibility:hidden;width:0;transition-delay:0s, var(--duration-out);transition-duration:var(--duration-out), 0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart), linear;flex-grow:1;position:relative;top:0;bottom:0}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in), 0s;transition-timing-function:var(--ease-out-quart), linear}.chat-app__aside .tooltip{--background-color:var(--btn-secondary-hover-background)}.chat-app__aside-container{width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:relative;overflow-y:auto}.chat-app__container--inline-layout .chat-app__aside-container{overscroll-behavior-y:auto}.chat-app__aside-header,.chat-app__sheet-header{z-index:var(--z-index-header);flex-wrap:no-wrap;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);justify-content:space-between;align-items:center;gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color);display:flex;position:sticky;top:0}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);background:var(--aside-background-overlay);position:fixed;inset:0}.chat-app__sheet-content{z-index:var(--z-index-flyout);width:100%;max-width:var(--aside-width);overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable;height:100%;position:fixed;top:0;right:0;overflow-y:auto}.chat-app__container--inline-layout .chat-app__sheet-content{overscroll-behavior-y:auto}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:#0000}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}.chat-app__close-button{z-index:var(--z-index-flyout)}.open-button{--open-button-avatar-height:var(--spacer-r-80);--open-button-avatar-width:var(--spacer-r-80);--open-button-duration:.4s;--open-button-delay:.3s;--open-button-ease:ease-in-out;cursor:pointer;flex-direction:row;align-items:flex-end;transition:opacity .15s ease-out;display:flex}.open-button--expanded{opacity:0;pointer-events:none}.open-button__text{margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);flex-direction:column;justify-content:center;align-items:flex-start;padding-left:0;display:flex;position:absolute;bottom:50%;right:100%;overflow:hidden;transform:translateY(50%);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__text{background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease);transform:translateY(0)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);white-space:pre;font-weight:700}.open-button__mask{width:0;height:0;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), height var(--open-button-duration) var(--open-button-ease);overflow:hidden}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease), height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance;position:relative}.open-button__avatar{z-index:var(--z-index-local-overlay);width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);border-radius:var(--spacer-r-80);filter:drop-shadow(0 4px 6px #00000026);transition:transform .2s var(--open-button-ease);position:relative;overflow:clip}.open-button:is(:hover,.open-button--programmatic-expand) .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color);display:none;position:absolute;right:0}:where(.open-button--standalone){right:var(--spacer-r-16);bottom:var(--spacer-r-16);position:fixed}@media (prefers-reduced-motion:reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}.open-button--hide-title-when-collapsed .open-button__text{visibility:hidden;opacity:0;transition:transform var(--open-button-duration) var(--open-button-ease), padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), visibility 0s linear calc(var(--open-button-duration) + var(--open-button-delay))}.open-button--hide-title-when-collapsed:is(:hover,.open-button--programmatic-expand) .open-button__text{visibility:visible;background:var(--open-button-hover-background,var(--open-button-background));color:var(--open-button-hover-color,var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease), opacity var(--open-button-duration) var(--open-button-ease), visibility 0s linear 0s;transform:translateY(0)}}@value container-xs, container-sm, container-md, container-lg, container-inner-xs, container-inner-sm, container-inner-md, container-inner-lg from "./viewports.css";`,$_=RegExp(`([\\p{Ll}\\d])(\\p{Lu})`,`gu`),ev=RegExp(`(\\p{Lu})([\\p{Lu}][\\p{Ll}])`,`gu`),tv=RegExp(`(\\d)(\\p{Ll})`,`gu`),nv=RegExp(`(\\p{L})(\\d)`,`gu`),rv=/[^\p{L}\d]+/giu,iv=`$1\0$2`,av=``;function ov(e,t){let n=e.trim();n=n.replace($_,iv).replace(ev,iv),t?.separateNumbers&&(n=n.replace(tv,iv).replace(nv,iv)),n=n.replace(rv,`\0`);let r=0,i=n.length;for(;n.charAt(r)===`\0`;)r++;if(r===i)return[];for(;n.charAt(i-1)===`\0`;)i--;return n.slice(r,i).split(/\0/g)}function sv(e,t){return Sv(e,t?.prefixCharacters)+ov(e,t).map(vv(t?.locale)).join(t?.delimiter??` `)}function cv(e,t){let n=Sv(e,t?.prefixCharacters),r=vv(t?.locale),i=yv(t?.locale),a=t?.mergeAmbiguousCharacters?bv(r,i):xv(r,i);return n+ov(e,t).map((e,t)=>t===0?r(e):a(e,t)).join(t?.delimiter??``)}function lv(e,t){let n=Sv(e,t?.prefixCharacters),r=vv(t?.locale),i=yv(t?.locale),a=t?.mergeAmbiguousCharacters?bv(r,i):xv(r,i);return n+ov(e,t).map(a).join(t?.delimiter??``)}function uv(e,t){let n=Sv(e,t?.prefixCharacters),r=vv(t?.locale),i=yv(t?.locale);return n+ov(e,t).map(bv(r,i)).join(t?.delimiter??` `)}function dv(e,t){return Sv(e,t?.prefixCharacters)+ov(e,t).map(yv(t?.locale)).join(t?.delimiter??`_`)}function fv(e,t){return sv(e,{delimiter:`.`,...t})}function pv(e,t){return sv(e,{delimiter:`-`,...t})}function mv(e,t){return sv(e,{delimiter:`/`,...t})}function hv(e,t){let n=Sv(e,t?.prefixCharacters),r=vv(t?.locale),i=bv(r,yv(t?.locale));return n+ov(e,t).map((e,t)=>t===0?i(e):r(e)).join(t?.delimiter??` `)}function gv(e,t){return sv(e,{delimiter:`_`,...t})}function _v(e,t){return uv(e,{delimiter:`-`,...t})}function vv(e){return e===!1?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function yv(e){return e===!1?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function bv(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function xv(e,t){return(n,r)=>{let i=n[0];return(r>0&&i>=`0`&&i<=`9`?`_`+i:t(i))+e(n.slice(1))}}function Sv(e,t=av){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(t.includes(i))n+=i;else break}return n}function Cv(e,t){let n=``;for(let r of e)n+=Math.random()>.5?r.toLocaleUpperCase(t):r.toLocaleLowerCase(t);return n}function wv(e,t){let n=``;for(let r of e){let e=r.toLocaleLowerCase(t);n+=r===e?r.toLocaleUpperCase(t):e}return n}var Tv=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,Ev=/[^\s:–—-]+|./g,Dv=/\s/,Ov=/.(?=[A-Z]|\..)/,kv=/[A-Za-z0-9\u00C0-\u00FF]/;function Av(e){for(var t=``,n;(n=Ev.exec(e))!==null;){var r=n[0],i=n.index;if(!Ov.test(r)&&(!Tv.test(r)||i===0||i+r.length===e.length)&&(e.charAt(i+r.length)!==`:`||Dv.test(e.charAt(i+r.length+1)))){t+=r.replace(kv,function(e){return e.toUpperCase()});continue}t+=r}return t}var jv=cv,Mv=uv,Nv=dv,Pv=fv,Fv=sv,Iv=lv,Lv=mv,Rv=hv,zv=gv,Bv=_v,Vv=pv,Hv=Cv,Uv=wv,Wv=Av,Gv=e=>e.toUpperCase(),Kv=(e,t)=>e.toLocaleUpperCase(t),qv=e=>e.toLowerCase(),Jv=(e,t)=>e.toLocaleLowerCase(t),Yv=e=>e.charAt(0).toLowerCase()+e.slice(1),Xv=e=>e.charAt(0).toUpperCase()+e.slice(1),Zv=e=>e===e.toUpperCase(),Qv=e=>e===e.toLowerCase(),$v=class{};$v.camel=jv,$v.capital=Mv,$v.constant=Nv,$v.dot=Pv,$v.kebab=Vv,$v.lower=qv,$v.lowerFirst=Yv,$v.localeLower=Jv,$v.localeUpper=Kv,$v.no=Fv,$v.pascal=Iv,$v.path=Lv,$v.sentence=Rv,$v.snake=zv,$v.sponge=Hv,$v.swap=Uv,$v.title=Wv,$v.train=Bv,$v.upper=Gv,$v.upperFirst=Xv,$v.isUpper=Zv,$v.isLower=Qv;var ey=640,ty=1024,ny=null,ry=()=>{if(ny)return ny;if(!globalThis.document)return 16;let e=globalThis.document.querySelector(`:root`);return ny=Number(getComputedStyle(e).fontSize.slice(0,-2)),ny},iy=({minRem:e,maxRem:t})=>{let n=ry(),r=ey/n,i=ty/n,a=(t-e)/(i-r);return`clamp( ${e}rem, ${-r*a+e}rem + ${a*100}cqw, ${t}rem )`},ay=e=>typeof e==`string`?e:typeof e==`number`?String(e):typeof e==`object`?e.minRem===e.maxRem?`${e.minRem}rem`:iy(e):``,oy=(e,t,n,r=!1)=>{let i=``;return n.forEach(n=>{let a=t[n];r&&!a&&n===`borderWidth`&&(a=`0px`),r&&!a&&n===`borderColor`&&(a=`transparent`),a&&(i+=`--${Vv(e)}-${Vv(n)}:${ay(a)}; `)}),i},sy=(e,t)=>Object.entries(t).map(([t,n])=>`--${e}-${Vv(t)}:${ay(n)}`).join(`; `)+`; `,cy=(e,t)=>{let n=``;return n+=oy(e,t,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`borderRadius`,`color`],!0),t.hover&&(n+=oy(`${e}-hover`,t.hover,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`color`])),t.focus&&(n+=oy(`${e}-focus`,t.focus,[`background`,`borderWidth`,`borderColor`,`boxShadow`,`color`])),t.custom&&(n+=sy(e,t.custom)),n},ly=(e,t)=>Object.entries(t).map(([t,n])=>`--color-${e}-${t}:${n}`).join(`; `)+`; `,uy=e=>`--font-family: ${e?.family||`inherit`};`,dy=(e,t={})=>`${t.root??`.chat-app`} {${uy(e.font)} ${Object.entries(e.colors).map(([e,t])=>ly(e,t)).join(``)} ${sy(`base`,e.base)} ${Object.entries(e.components).map(([e,t])=>cy(Vv(e),t)).join(``)}};`,fy=typeof window<`u`?window:{screen:{},navigator:{}},py=(fy.matchMedia||(function(){return{matches:!1}})).bind(fy),my={get passive(){return!0}},hy=function(){};fy.addEventListener&&fy.addEventListener(`p`,hy,my),fy.removeEventListener&&fy.removeEventListener(`p`,hy,!1),`PointerEvent`in fy;var gy=`ontouchstart`in fy,_y=`TouchEvent`in fy,vy=gy||_y&&py(`(any-pointer: coarse)`).matches,yy=(fy.navigator.maxTouchPoints||0)>0||vy,by=fy.navigator.userAgent||``,xy=py(`(pointer: coarse)`).matches&&/iPad|Macintosh/.test(by)&&Math.min(fy.screen.width||0,fy.screen.height||0)>=768,Sy=(py(`(pointer: coarse)`).matches||!py(`(pointer: fine)`).matches&&gy)&&!/Windows.*Firefox/.test(by),Cy=py(`(any-pointer: fine)`).matches||py(`(any-hover: hover)`).matches||xy||!gy,wy=yy&&(Cy||!Sy)?`hybrid`:yy?`touchOnly`:`mouseOnly`,Ty=wy===`mouseOnly`?`mouse`:wy===`touchOnly`||Sy?`touch`:`mouse`;function Ey(e,t){ot(t,!0);let n=R(t,`href`,7),r=R(t,`target`,7),i=R(t,`onclick`,7),a=R(t,`className`,23,()=>[]),o=R(t,`isStandalone`,7,!1),s=R(t,`children`,7),c=R(t,`type`,7,`button`),l=R(t,`use`,7),u=R(t,`class`,7),d=wa(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`href`,`target`,`onclick`,`className`,`isStandalone`,`children`,`type`,`use`,`class`]),f=j(()=>n()?`a`:`button`),p=j(()=>[...Array.isArray(a())?a():a()?[a()]:[],...u()?[u()]:[]]),m=()=>({}),h=j(()=>l()??m);var g={get href(){return n()},set href(e){n(e),A()},get target(){return r()},set target(e){r(e),A()},get onclick(){return i()},set onclick(e){i(e),A()},get className(){return a()},set className(e=[]){a(e),A()},get isStandalone(){return o()},set isStandalone(e=!1){o(e),A()},get children(){return s()},set children(e){s(e),A()},get type(){return c()},set type(e=`button`){c(e),A()},get use(){return l()},set use(e){l(e),A()},get class(){return u()},set class(e){u(e),A()}},_=ti();return Bi(On(_),()=>I(f),!1,(e,t)=>{Ui(e,e=>I(h)?.(e)),_a(e,()=>({...d,onclick:n()?void 0:i(),type:n()?void 0:c(),href:n(),role:n()?`link`:`button`,target:n()?r():void 0,class:I(p),[aa]:{"open-button--standalone":o()}}));var a=ti();bi(On(a),s),L(t,a)}),L(e,_),st(g)}Ma(Ey,{href:{},target:{},onclick:{},className:{},isStandalone:{},children:{},type:{},use:{},class:{}},[],[],{mode:`open`});function Dy(e,t){ot(t,!0);let n=R(t,`css`,7),r=wa(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`css`]),i=e=>{Un(()=>{n()&&(e.innerHTML=n())})};var a={get css(){return n()},set css(e){n(e),A()}},o=ti(),s=On(o),c=e=>{var t=ti();Bi(On(t),()=>`style`,!1,(e,t)=>{Ui(e,e=>i?.(e)),_a(e,()=>({...r}))}),L(e,t)};return Oi(s,e=>{n()&&e(c)}),L(e,o),st(a)}Ma(Dy,{css:{}},[],[],{mode:`open`});var Oy=ei(`<div class="open-button__title"></div>`),ky=ei(`<div class="open-button__mask"><div class="open-button__description"></div></div>`),Ay=ei(`<div class="open-button__text"><!> <!></div>`),jy=ei(`<div class="sr-only"> </div>`),My=ei(`<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"></div>`,1),Ny=ei(`<link rel="stylesheet"/>`),Py=ei(`<!> <!>`,1),Fy=ei(`<!> <!> <!> <main class="chat-app"><!></main>`,1);function Iy(e,t){ot(t,!0);let n=(e,n)=>{let r=()=>n?.().chatConfig,i=()=>n?.().language,a=()=>n?.().colorScheme,c=j(()=>{let{openButtonTitle:e,openButtonDescription:t}=r().translations[i()];return{openButtonTitle:e,openButtonDescription:t}}),l=j(()=>r().fullTheme[a()].tokens.svgs),u=j(()=>r().fullTheme[a()]?.tokens.components.openButton?.custom),d=j(()=>!!I(u)?.hideTitleWhenCollapsed);{let n=j(()=>r().buttonHref?void 0:s()?`true`:`false`),i=j(()=>r().buttonHref?void 0:`true`),a=j(()=>r().buttonHref?void 0:o()),u=j(()=>[`open-button`,t.buttonClass,$.data.flyoutIsOpen?`open-button--expanded`:void 0,I(d)?`open-button--hide-title-when-collapsed`:void 0]);Ey(e,{get href(){return r().buttonHref},onclick:me,onmouseenter:fe,onmouseleave:pe,use:oe,get"aria-expanded"(){return I(n)},get"aria-haspopup"(){return I(i)},get"aria-controls"(){return I(a)},get style(){return t.buttonStyle},get className(){return I(u)},get isStandalone(){return I(f)},children:(e,t)=>{var n=My(),r=On(n),i=e=>{var t=Ay(),n=Dn(t),r=e=>{var t=Oy();zi(t,()=>I(c).openButtonTitle,!0),Je(t),L(e,t)};Oi(n,e=>{I(c).openButtonTitle&&e(r)});var i=kn(n,2),a=e=>{var t=ky(),n=Dn(t);zi(n,()=>I(c).openButtonDescription,!0),Je(n),Sa(n,e=>N(ee,e),()=>I(ee)),Je(t),Sa(t,e=>N(_,e),()=>I(_)),L(e,t)};Oi(i,e=>{I(c).openButtonDescription&&Ty===`mouse`&&e(a)}),Je(t),L(e,t)},a=e=>{var t=jy(),n=Dn(t,!0);Je(t),Xn(()=>fi(n,$.t.ariaOpenChat)),L(e,t)};Oi(r,e=>{I(c).openButtonTitle||I(c).openButtonDescription?e(i):e(a,-1)});var o=kn(r,2);zi(o,()=>I(l).avatar,!0),Je(o),L(e,n)},$$slots:{default:!0}})}},r=M(`light`),i=R(t,`host`,7),a=R(t,`onError`,7),o=R(t,`flyoutId`,7),s=R(t,`flyoutIsOpen`,7),c=wa(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`host`,`onError`,`flyoutId`,`flyoutIsOpen`]),l=async e=>{let t=await(await fetch(`${e}/chatconfig`)).json();return Qh.parse(t)},u=async({forceTheme:e,lang:t,apiUrl:n})=>{let r=Wg(window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await l(n)),i;i=t?Jg(t,r.supportedLanguages):Zg(r.supportedLanguages);let a=C_(Object.keys(r.fullTheme));return{chatConfig:r,language:i,colorScheme:a}},d=(e,t)=>{if(e==null)return t;if(typeof e==`string`){let t=e.trim().toLowerCase();return!(t===``||t===`0`||t===`false`||t===`no`)}return typeof e==`number`?e!==0:typeof e==`boolean`?e:t},f=j(()=>!!i()),p=M(!1),m=M(!1),h=M(!1),g=M(void 0),_=M(void 0),ee=M(void 0),v=j(()=>I(ee)?.offsetWidth??0),y=j(()=>I(ee)?.offsetHeight??0),b=M(void 0),x=M(!1),te,ne=M(!0);function re(){return I(b)?(clearTimeout(I(b)),N(b,void 0),!0):!1}async function ie(e){N(r,e.colorScheme,!0),te?.(),re(),N(x,!1);let n=e.chatConfig.fullTheme[I(r)]?.tokens.components.openButton?.custom??{},i=n.autoExpandScrollThreshold,a=Number(n.autoCollapseDelay??0),o=Number.isNaN(a)?0:Math.max(0,a),c=d(n.autoExpandOnce,!1),l=(()=>{if(i==null)return 100;if(typeof i==`string`){if(i.trim().toLowerCase()===`none`)return 0;let e=Number(i);return Number.isNaN(e)?100:e}let e=Number(i);return Number.isNaN(e)?100:e})();if(Number.isNaN(l)||l<=0)return;let u=`liipgpt-auto-expand-${t.apiUrl}`,f=!1;if(typeof window<`u`)try{f=window.localStorage.getItem(u)===`true`}catch(e){console.warn(`LiipGPT: unable to read auto-expand flag`,e)}N(h,f,!0);let p=()=>{if(!(window.scrollY/window.innerHeight*100>=l)){N(ne,!0);return}if(!(I(m)||s())&&!(c&&(f||I(h)))&&I(ne)){if(N(ne,!1),N(m,!0),N(h,!0),ue(),c&&typeof window<`u`)try{window.localStorage.setItem(u,`true`)}catch(e){console.warn(`LiipGPT: unable to persist auto-expand flag`,e)}N(b,setTimeout(()=>{I(x)||(de(),N(m,!1)),N(b,void 0)},o),!0)}};window.addEventListener(`scroll`,p,{passive:!0}),l===0&&(await Fr(),p()),te=()=>{window.removeEventListener(`scroll`,p)}}function ae(){re(),N(m,!1),N(x,!1)}function oe(e){N(g,e,!0)}function se(){te?.(),re()}Si(se);function ce(){!I(ee)||!I(_)||(I(_).style.width=`${I(v)}px`,I(_).style.height=`${I(y)}px`)}function le(){I(_)&&(I(_).style.width=`0`,I(_).style.height=`0`)}function ue(){I(g)&&(I(g).classList.add(`open-button--programmatic-expand`),ce())}function de(){I(g)&&(I(g).classList.remove(`open-button--programmatic-expand`),le())}function fe(){re()&&N(x,!0),ce()}function pe(){re(),I(x)&&(N(m,!1),N(x,!1),I(g)?.classList.remove(`open-button--programmatic-expand`)),I(p)||le()}function me(e){ae(),t.onclick?.(e)}let he=j(()=>u(c).then(async e=>(await ie(e),e)).catch(e=>a()(e)));var ge={get host(){return i()},set host(e){i(e),A()},get onError(){return a()},set onError(e){a(e),A()},get flyoutId(){return o()},set flyoutId(e){o(e),A()},get flyoutIsOpen(){return s()},set flyoutIsOpen(e){s(e),A()}},_e=ti();return Gr(`beforeunload`,yn,se),Vi(`1k415fq`,e=>{var t=ti(),n=On(t),r=e=>{var t=ti();Di(On(t),()=>I(he),null,(e,t)=>{let n=j(()=>I(t).chatConfig.fullTheme[I(t).colorScheme]);var r=Py(),i=On(r);Ni(i,17,()=>I(n).fontURLs??[],ki,(e,t)=>{var n=Ny();Xn(()=>ha(n,`href`,I(t))),L(e,n)}),Dy(kn(i,2),{id:`font-css`,get css(){return I(n).fontCSS}}),L(e,r)}),L(e,t)};Oi(n,e=>{I(f)&&e(r)}),L(e,t)}),Di(On(_e),()=>I(he),e=>{},(e,t)=>{let i=j(()=>I(t).chatConfig.fullTheme[I(r)]);var a=ti(),o=On(a),s=e=>{var r=Fy(),a=On(r);{let e=j(()=>dy(I(i).tokens));Dy(a,{id:`theme-css`,get css(){return I(e)}})}var o=kn(a,2);Dy(o,{id:`app-css`,get css(){return Q_}});var s=kn(o,2);Dy(s,{id:`custom-css`,get css(){return I(i).customCSS}});var c=kn(s,2);n(Dn(c),()=>I(t)),Je(c),L(e,r)},c=e=>{n(e,()=>I(t))};Oi(o,e=>{I(f)?e(s):e(c,-1)}),L(e,a)}),L(e,_e),st(ge)}Ma(Iy,{host:{},onError:{},flyoutId:{},flyoutIsOpen:{}},[],[],{mode:`open`});function Ly(e,t){ot(t,!0);let n=R(t,`onclick`,7),r=R(t,`buttonClass`,7),i=R(t,`buttonStyle`,7),a=R(t,`apiUrl`,7),o=R(t,`forceTheme`,7),s=R(t,`lang`,7),c=j(()=>({onclick:n(),buttonClass:r(),buttonStyle:i(),apiUrl:a(),forceTheme:o(),lang:s()}));return Ia(e,{silent:!0,body:(e,n=oe)=>{Iy(e,Ea({host:t.$$host,get onError(){return n()}},()=>I(c)))},$$slots:{body:!0}}),st({get onclick(){return n()},set onclick(e){n(e),A()},get buttonClass(){return r()},set buttonClass(e){r(e),A()},get buttonStyle(){return i()},set buttonStyle(e){i(e),A()},get apiUrl(){return a()},set apiUrl(e){a(e),A()},get forceTheme(){return o()},set forceTheme(e){o(e),A()},get lang(){return s()},set lang(e){s(e),A()}})}return customElements.define(`liipgpt-button`,Ma(Ly,{forceTheme:{attribute:`force-theme`,type:`String`},buttonClass:{attribute:`button-class`,type:`String`},buttonStyle:{attribute:`button-style`,type:`String`},apiUrl:{attribute:`api-url`,type:`String`},lang:{attribute:`lang`,type:`String`},onclick:{}},[],[],{mode:`open`})),e.LiipGPTButton=Ly,e})({});
380
+ `,ariaMainNavigation:`Navigation principale`,ariaMainNavigationInfo:`À propos de ce chat`,ariaMainNavigationLinks:`Liens`,ariaMainNavigationLanguageSwitch:`Changement de langue`,ariaMainNavigationColorMode:`Mode couleur`,ariaGotoMainNavigation:`Aller à la navigation principale`,ariaAskQuestion:`Saisie texte`,ariaAskQuestionRegion:`Poser une question`,ariaNotifications:`Notifications`,ariaPredefinedQuestions:`Questions prédéfinies`,ariaPredefinedQuestionsRegion:`Essayez nos questions d'exemple`,ariaChatHistory:`Historique du chat`,ariaOpenChat:`Ouvrir le chat`,ariaQuestionFromYou:`Votre question:`,ariaAnswerFromBot:`Réponse {n} de l'Assistant:`,ariaLastAnswerNavigation:`Navigation et options pour la dernière réponse`,ariaQuestionSent:`Question envoyée. Génération de la réponse en cours...`,ariaAnswerReady:`Réponse prête.`,ariaAnswerFinished:`Réponse terminée. Posez une autre question ou naviguez en arrière pour consulter l'historique du chat, donner un avis ou voir les références liées à la réponse.`,ariaAnswerFinishedWithSelectedTopic:`Réponse terminée. Posez une autre question ou naviguez en arrière pour changer le sujet sélectionné, consulter l'historique du chat, donner un avis ou voir les références liées à la réponse.`,ariaAskQuestionAgain:`Copier la dernière question dans le champ de saisie pour la reposer`,ariaAnswerGood:`Évaluer cette réponse comme bonne`,ariaAnswerBad:`Évaluer cette réponse comme mauvaise`,ariaReferenceSource:`Source:`,ariaGiveFeedback:`Donner un feedback détaillé sur la réponse`,ariaAnswerForm:`Ouvrir le formulaire pour cette réponse`,ariaLanguageChanged:`Langue française sélectionnée.`,ariaLightSelected:`Mode clair activé.`,ariaDarkSelected:`Mode sombre activé.`,ariaSettings:`Paramètres du chat`,ariaSettingsRegion:`Ajustez vos préférences de chat`,ariaReferencesRegion:`Références pour la question actuelle`,ariaOpensInNewTab:`(ouvre dans un nouvel onglet)`,ariaPageTitle:`Chatbot`,ariaCloseWithEsc:`Fermer ce contenu en appuyant sur la touche Échap`,ariaInfoTitle:`À propos de ce chatbot`,ariaFlyoutRegion:`Chatbot`,ariaSelected:`sélectionné`,ariaUnselected:`non sélectionné`,ariaAllSelected:`Tous les éléments sélectionnés`,ariaAllUnselected:`Tous les éléments non sélectionnés`,ariaAllReseted:`Éléments par défaut sélectionnés`,ariaChangeTopic:`Changer de sujet`,hideSettings:`Masquer les paramètres`,showSettings:`Paramètres`,chooseAtLeastOneOption:`Veuillez choisir au moins une option`,selectAll:`Tout sélectionner`,selectNone:`Tout désélectionner`,resetToDefaults:`Réinitialiser`,messageTooLong:`Votre message doit être plus court que {questionLengthLimit} caractères. Actuellement, il fait {questionLength} caractères`,selectedTopic:`Sujet sélectionné`,changeTopic:`Changer de sujet`,searchSummaryExpand:`Réponse complète`,searchSummaryCollapse:`Afficher moins`,searchSummaryOptInDefault:`Activer la recherche IA`,searchSummaryOptOut:`Désactiver la recherche IA`,searchSummaryError:`Une erreur s'est produite.`,searchSummaryDisclaimer:`<p><strong>Je suis un assistant IA.</strong></p><p>Mes réponses sont générées par l'intelligence artificielle et peuvent ne pas toujours être correctes.</p>`,searchSummaryLoading:`Génération de la réponse…`,searchSummaryFollowUpPlaceholder:`Posez une question de suivi…`,searchSummaryFollowUpSubmit:`Continuer dans le chat`,ariaSearchSummaryExpand:`Afficher la réponse complète`,ariaSearchSummaryCollapse:`Réduire la réponse`,ariaSearchSummaryOptOut:`Désactiver la recherche IA`,ariaSearchSummaryFollowUpInput:`Poser une question de suivi`,jsonLdEventDate:`Date`,jsonLdEventLocation:`Lieu`,jsonLdEventDescription:`Infos`,jsonLdEventCtaLabel:`Voir l'événement`,jsonLdCtaLabel:`En savoir plus`,jsonLdMapOpenMap:`Ouvrir la carte`,ariaJsonLdMapCanvas:`Carte`,ariaJsonLdEventCard:`Événement`,ariaJsonLdMapCard:`Localisation`,ariaJsonLdCtaCard:`Lien`}},zm=e=>(e??=Rm,{de:(0,Om.default)(Rm.de,e.de??{}),en:(0,Om.default)(Rm.en,e.en??{}),fr:(0,Om.default)(Rm.fr,e.fr??{}),it:(0,Om.default)(Rm.it,e.it??{})}),Bm=e=>({init:e?.init??[],bot:{before:e?.bot?.before??[],after:e?.bot?.after??[]},user:{before:e?.user?.before??[],after:e?.user?.after??[]}}),Vm=e=>{let t;t=e.theme?.fineGrained?Lm(e.theme?.fineGrained):Im(e?.theme??{});let n=zm(e?.translations),r={...e,forcePredefinedQuestions:e.forcePredefinedQuestions??!1,forceChatPage:e.forceChatPage??!1,showOverallFeedbackButton:e.showOverallFeedbackButton??!1,showOverallFeedbackEmail:e.showOverallFeedbackEmail??!0,showCloseChatButton:e.showCloseChatButton??!1,showContextInfo:e.showContextInfo??!1,showContextMenu:e.showContextMenu??!1,showReferencesByDefault:e.showReferencesByDefault??!1,showTextFeedback:e.showTextFeedback??!0,showExpandedSelectors:e.showExpandedSelectors??!1,inlineLayout:e.inlineLayout??!1,questionPrefix:e.questionPrefix??``,blockPII:e.blockPII??!1,allowAudioInput:e.allowAudioInput??!1,supportedLanguages:e.supportedLanguages??Object.keys(n),fullTheme:t,translations:n,buttonHref:e.buttonHref,addQueryToUrlParams:e.addQueryToUrlParams??!0,addRetrievalQuestionToUrlParams:e.addRetrievalQuestionToUrlParams??!1,renderKatex:e.renderKatex??!1,sendReferrer:e.sendReferrer??`all`,selectorsConfig:e.selectorsConfig??[],questionLengthLimit:e.questionLengthLimit??600,forceConsent:e.forceConsent??!1,askQuestionAgain:e.askQuestionAgain??!1,enableBackdrop:e.enableBackdrop??!1,parentPageContext:e.parentPageContext??{},messageAdditions:Bm(e.messageAdditions??{}),contextVersion:e.contextVersion??0};return e.classification&&(r.classification=e.classification),e.menu&&(r.menu=e.menu),e.answerForm&&(r.answerForm=e.answerForm),r},Hm=typeof window<`u`?window:{screen:{},navigator:{}},Um=(Hm.matchMedia||(function(){return{matches:!1}})).bind(Hm),Wm={get passive(){return!0}},Gm=function(){};Hm.addEventListener&&Hm.addEventListener(`p`,Gm,Wm),Hm.removeEventListener&&Hm.removeEventListener(`p`,Gm,!1),`PointerEvent`in Hm;var Km=`ontouchstart`in Hm,qm=`TouchEvent`in Hm,Jm=Km||qm&&Um(`(any-pointer: coarse)`).matches,Ym=(Hm.navigator.maxTouchPoints||0)>0||Jm,Xm=Hm.navigator.userAgent||``,Zm=Um(`(pointer: coarse)`).matches&&/iPad|Macintosh/.test(Xm)&&Math.min(Hm.screen.width||0,Hm.screen.height||0)>=768,Qm=(Um(`(pointer: coarse)`).matches||!Um(`(pointer: fine)`).matches&&Km)&&!/Windows.*Firefox/.test(Xm),$m=Um(`(any-pointer: fine)`).matches||Um(`(any-hover: hover)`).matches||Zm||!Km,eh=Ym&&($m||!Qm)?`hybrid`:Ym?`touchOnly`:`mouseOnly`,th=eh===`mouseOnly`?`mouse`:eh===`touchOnly`||Qm?`touch`:`mouse`;function nh(e,t){ot(t,!0);let n=L(t,`href`,7),r=L(t,`target`,7),i=L(t,`onclick`,7),a=L(t,`className`,23,()=>[]),o=L(t,`isStandalone`,7,!1),s=L(t,`children`,7),c=L(t,`type`,7,`button`),l=L(t,`use`,7),u=L(t,`class`,7),d=ba(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`href`,`target`,`onclick`,`className`,`isStandalone`,`children`,`type`,`use`,`class`]),f=k(()=>n()?`a`:`button`),p=k(()=>[...Array.isArray(a())?a():a()?[a()]:[],...u()?[u()]:[]]),m=()=>({}),h=k(()=>l()??m);var g={get href(){return n()},set href(e){n(e),O()},get target(){return r()},set target(e){r(e),O()},get onclick(){return i()},set onclick(e){i(e),O()},get className(){return a()},set className(e=[]){a(e),O()},get isStandalone(){return o()},set isStandalone(e=!1){o(e),O()},get children(){return s()},set children(e){s(e),O()},get type(){return c()},set type(e=`button`){c(e),O()},get use(){return l()},set use(e){l(e),O()},get class(){return u()},set class(e){u(e),O()}},_=Zr();return Ii(Tn(_),()=>F(f),!1,(e,t)=>{zi(e,e=>F(h)?.(e)),pa(e,()=>({...d,onclick:n()?void 0:i(),type:n()?void 0:c(),href:n(),role:n()?`link`:`button`,target:n()?r():void 0,class:F(p),[ta]:{"open-button--standalone":o()}}));var a=Zr();gi(Tn(a),s),I(t,a)}),I(e,_),st(g)}Oa(nh,{href:{},target:{},onclick:{},className:{},isStandalone:{},children:{},type:{},use:{},class:{}},[],[],{mode:`open`});function rh(e,t){ot(t,!0);let n=L(t,`css`,7),r=ba(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`css`]),i=e=>{Bn(()=>{n()&&(e.innerHTML=n())})};var a={get css(){return n()},set css(e){n(e),O()}},o=Zr(),s=Tn(o),c=e=>{var t=Zr();Ii(Tn(t),()=>`style`,!1,(e,t)=>{zi(e,e=>i?.(e)),pa(e,()=>({...r}))}),I(e,t)};return wi(s,e=>{n()&&e(c)}),I(e,o),st(a)}Oa(rh,{css:{}},[],[],{mode:`open`});var ih=Xr(`<div class="open-button__title"></div>`),ah=Xr(`<div class="open-button__mask"><div class="open-button__description"></div></div>`),oh=Xr(`<div class="open-button__text"><!> <!></div>`),sh=Xr(`<div class="sr-only"> </div>`),ch=Xr(`<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"></div>`,1),lh=Xr(`<link rel="stylesheet"/>`),uh=Xr(`<!> <!>`,1),dh=Xr(`<!> <!> <!> <main class="chat-app"><!></main>`,1);function fh(e,t){ot(t,!0);let n=(e,n)=>{let r=()=>n?.().chatConfig,i=()=>n?.().language,a=()=>n?.().colorScheme,c=k(()=>{let{openButtonTitle:e,openButtonDescription:t}=r().translations[i()];return{openButtonTitle:e,openButtonDescription:t}}),l=k(()=>r().fullTheme[a()].tokens.svgs),u=k(()=>r().fullTheme[a()]?.tokens.components.openButton?.custom),d=k(()=>!!F(u)?.hideTitleWhenCollapsed);{let n=k(()=>r().buttonHref?void 0:s()?`true`:`false`),i=k(()=>r().buttonHref?void 0:`true`),a=k(()=>r().buttonHref?void 0:o()),u=k(()=>[`open-button`,t.buttonClass,xf.data.flyoutIsOpen?`open-button--expanded`:void 0,F(d)?`open-button--hide-title-when-collapsed`:void 0]);nh(e,{get href(){return r().buttonHref},onclick:he,onmouseenter:pe,onmouseleave:me,use:se,get"aria-expanded"(){return F(n)},get"aria-haspopup"(){return F(i)},get"aria-controls"(){return F(a)},get style(){return t.buttonStyle},get className(){return F(u)},get isStandalone(){return F(f)},children:(e,t)=>{var n=ch(),r=Tn(n),i=e=>{var t=oh(),n=wn(t),r=e=>{var t=ih();Fi(t,()=>F(c).openButtonTitle,!0),Xe(t),I(e,t)};wi(n,e=>{F(c).openButtonTitle&&e(r)});var i=En(n,2),a=e=>{var t=ah(),n=wn(t);Fi(n,()=>F(c).openButtonDescription,!0),Xe(n),va(n,e=>j(ee,e),()=>F(ee)),Xe(t),va(t,e=>j(_,e),()=>F(_)),I(e,t)};wi(i,e=>{F(c).openButtonDescription&&th===`mouse`&&e(a)}),Xe(t),I(e,t)},a=e=>{var t=sh(),n=wn(t,!0);Xe(t),qn(()=>ci(n,xf.t.ariaOpenChat)),I(e,t)};wi(r,e=>{F(c).openButtonTitle||F(c).openButtonDescription?e(i):e(a,-1)});var o=En(r,2);Fi(o,()=>F(l).avatar,!0),Xe(o),I(e,n)},$$slots:{default:!0}})}},r=A(`light`),i=L(t,`host`,7),a=L(t,`onError`,7),o=L(t,`flyoutId`,7),s=L(t,`flyoutIsOpen`,7),c=ba(t,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`host`,`onError`,`flyoutId`,`flyoutIsOpen`]),l=async e=>{let t=await(await fetch(`${e}/chatconfig`)).json();return Dm.parse(t)},u=async({forceTheme:e,lang:t,apiUrl:n})=>{let r=Vm(window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await l(n)),i;i=t?gf(t,r.supportedLanguages):vf(r.supportedLanguages);let a=wf(Object.keys(r.fullTheme));return{chatConfig:r,language:i,colorScheme:a}},d=(e,t)=>{if(e==null)return t;if(typeof e==`string`){let t=e.trim().toLowerCase();return!(t===``||t===`0`||t===`false`||t===`no`)}return typeof e==`number`?e!==0:typeof e==`boolean`?e:t},f=k(()=>!!i()),p=A(!1),m=A(!1),h=A(!1),g=A(void 0),_=A(void 0),ee=A(void 0),v=k(()=>F(ee)?.offsetWidth??0),te=k(()=>F(ee)?.offsetHeight??0),y=A(void 0),b=A(!1),ne,re=A(!0);function ie(){return F(y)?(clearTimeout(F(y)),j(y,void 0),!0):!1}async function ae(e){j(r,e.colorScheme,!0),ne?.(),ie(),j(b,!1);let n=e.chatConfig.fullTheme[F(r)]?.tokens.components.openButton?.custom??{},i=n.autoExpandScrollThreshold,a=Number(n.autoCollapseDelay??0),o=Number.isNaN(a)?0:Math.max(0,a),c=d(n.autoExpandOnce,!1),l=(()=>{if(i==null)return 100;if(typeof i==`string`){if(i.trim().toLowerCase()===`none`)return 0;let e=Number(i);return Number.isNaN(e)?100:e}let e=Number(i);return Number.isNaN(e)?100:e})();if(Number.isNaN(l)||l<=0)return;let u=`liipgpt-auto-expand-${t.apiUrl}`,f=!1;if(typeof window<`u`)try{f=window.localStorage.getItem(u)===`true`}catch(e){console.warn(`LiipGPT: unable to read auto-expand flag`,e)}j(h,f,!0);let p=()=>{if(!(window.scrollY/window.innerHeight*100>=l)){j(re,!0);return}if(!(F(m)||s())&&!(c&&(f||F(h)))&&F(re)){if(j(re,!1),j(m,!0),j(h,!0),de(),c&&typeof window<`u`)try{window.localStorage.setItem(u,`true`)}catch(e){console.warn(`LiipGPT: unable to persist auto-expand flag`,e)}j(y,setTimeout(()=>{F(b)||(fe(),j(m,!1)),j(y,void 0)},o),!0)}};window.addEventListener(`scroll`,p,{passive:!0}),l===0&&(await jr(),p()),ne=()=>{window.removeEventListener(`scroll`,p)}}function oe(){ie(),j(m,!1),j(b,!1)}function se(e){j(g,e,!0)}function ce(){ne?.(),ie()}vi(ce);function le(){!F(ee)||!F(_)||(F(_).style.width=`${F(v)}px`,F(_).style.height=`${F(te)}px`)}function ue(){F(_)&&(F(_).style.width=`0`,F(_).style.height=`0`)}function de(){F(g)&&(F(g).classList.add(`open-button--programmatic-expand`),le())}function fe(){F(g)&&(F(g).classList.remove(`open-button--programmatic-expand`),ue())}function pe(){ie()&&j(b,!0),le()}function me(){ie(),F(b)&&(j(m,!1),j(b,!1),F(g)?.classList.remove(`open-button--programmatic-expand`)),F(p)||ue()}function he(e){oe(),t.onclick?.(e)}let ge=k(()=>u(c).then(async e=>(await ae(e),e)).catch(e=>a()(e)));var _e={get host(){return i()},set host(e){i(e),O()},get onError(){return a()},set onError(e){a(e),O()},get flyoutId(){return o()},set flyoutId(e){o(e),O()},get flyoutIsOpen(){return s()},set flyoutIsOpen(e){s(e),O()}},ve=Zr();return Vr(`beforeunload`,gn,ce),Li(`1k415fq`,e=>{var t=Zr(),n=Tn(t),r=e=>{var t=Zr();Ci(Tn(t),()=>F(ge),null,(e,t)=>{let n=k(()=>F(t).chatConfig.fullTheme[F(t).colorScheme]);var r=uh(),i=Tn(r);ki(i,17,()=>F(n).fontURLs??[],Ti,(e,t)=>{var n=lh();qn(()=>da(n,`href`,F(t))),I(e,n)}),rh(En(i,2),{id:`font-css`,get css(){return F(n).fontCSS}}),I(e,r)}),I(e,t)};wi(n,e=>{F(f)&&e(r)}),I(e,t)}),Ci(Tn(ve),()=>F(ge),e=>{},(e,t)=>{let i=k(()=>F(t).chatConfig.fullTheme[F(r)]);var a=Zr(),o=Tn(a),s=e=>{var r=dh(),a=Tn(r);{let e=k(()=>Jp(F(i).tokens));rh(a,{id:`theme-css`,get css(){return F(e)}})}var o=En(a,2);rh(o,{id:`app-css`,get css(){return Sf}});var s=En(o,2);rh(s,{id:`custom-css`,get css(){return F(i).customCSS}});var c=En(s,2);n(wn(c),()=>F(t)),Xe(c),I(e,r)},c=e=>{n(e,()=>F(t))};wi(o,e=>{F(f)?e(s):e(c,-1)}),I(e,a)}),I(e,ve),st(_e)}Oa(fh,{host:{},onError:{},flyoutId:{},flyoutIsOpen:{}},[],[],{mode:`open`});function ph(e,t){ot(t,!0);let n=L(t,`onclick`,7),r=L(t,`buttonClass`,7),i=L(t,`buttonStyle`,7),a=L(t,`apiUrl`,7),o=L(t,`forceTheme`,7),s=L(t,`lang`,7),c=k(()=>({onclick:n(),buttonClass:r(),buttonStyle:i(),apiUrl:a(),forceTheme:o(),lang:s()}));return Ma(e,{silent:!0,body:(e,n=se)=>{fh(e,Sa({host:t.$$host,get onError(){return n()}},()=>F(c)))},$$slots:{body:!0}}),st({get onclick(){return n()},set onclick(e){n(e),O()},get buttonClass(){return r()},set buttonClass(e){r(e),O()},get buttonStyle(){return i()},set buttonStyle(e){i(e),O()},get apiUrl(){return a()},set apiUrl(e){a(e),O()},get forceTheme(){return o()},set forceTheme(e){o(e),O()},get lang(){return s()},set lang(e){s(e),O()}})}return customElements.define(`liipgpt-button`,Oa(ph,{forceTheme:{attribute:`force-theme`,type:`String`},buttonClass:{attribute:`button-class`,type:`String`},buttonStyle:{attribute:`button-style`,type:`String`},apiUrl:{attribute:`api-url`,type:`String`},lang:{attribute:`lang`,type:`String`},onclick:{}},[],[],{mode:`open`})),e.LiipGPTButton=ph,e})({});