@liip/liipgpt 2.6.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chat/liipgpt-chat.iife.js +1 -1
- package/config/index.d.ts +1 -0
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/{TWfn4Mjt.js → 1dD7WPXn.js} +1 -1
- package/configurator/_app/immutable/chunks/{CDyF3I-R.js → BKW66Lfr.js} +1 -1
- package/configurator/_app/immutable/chunks/{CINpBRIH.js → BWlPVxXO.js} +1 -1
- package/configurator/_app/immutable/chunks/{DI_o4WBM.js → BmSehLEh.js} +1 -1
- package/configurator/_app/immutable/chunks/{DMgZYjm1.js → C99KO4nD.js} +20 -20
- package/configurator/_app/immutable/chunks/{CgW772az.js → Df9MUm2j.js} +1 -1
- package/configurator/_app/immutable/chunks/{BGpncrce.js → m7522vkh.js} +1 -1
- package/configurator/_app/immutable/chunks/{8TcJpisj.js → tN9GciFC.js} +1 -1
- package/configurator/_app/immutable/chunks/{Db7eKOlV.js → xZHK-ZHf.js} +1 -1
- package/configurator/_app/immutable/entry/{app.Dtjsvakf.js → app.CZ0SH_Vk.js} +2 -2
- package/configurator/_app/immutable/entry/start.BV7l4dkK.js +1 -0
- package/configurator/_app/immutable/nodes/{0.C-cvK_ce.js → 0.CbZBO6K-.js} +1 -1
- package/configurator/_app/immutable/nodes/{1.CvDriItE.js → 1.RxzCcgx-.js} +1 -1
- package/configurator/_app/immutable/nodes/{2.Dxnj0UYZ.js → 2.Cfyy-seW.js} +3 -3
- package/configurator/_app/immutable/nodes/{3.Bo206tbP.js → 3.BoGEz7-s.js} +1 -1
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +6 -6
- package/configurator/sidebar.html +6 -6
- package/index.cjs +4 -1
- package/index.js +4 -1
- package/package.json +1 -1
- package/configurator/_app/immutable/entry/start.CeJq9Ug0.js +0 -1
|
@@ -59,7 +59,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const n="<p>An err
|
|
|
59
59
|
`+c:n[s]=c)}).bind(this)),n.data===null)return null;n.id!==null&&(this.lastEventId=n.id);const o=new CustomEvent(n.event||"message");return o.id=n.id,o.data=n.data||"",o.lastEventId=this.lastEventId,o},this._onReadyStateChange=function(){if(this.xhr&&this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED){const r={},n=this.xhr.getAllResponseHeaders().trim().split(`\r
|
|
60
60
|
`);for(const i of n){const[a,...s]=i.split(":"),c=s.join(":").trim();r[a.trim().toLowerCase()]=r[a.trim().toLowerCase()]||[],r[a.trim().toLowerCase()].push(c)}const o=new CustomEvent("open");o.responseCode=this.xhr.status,o.headers=r,this.dispatchEvent(o),this._setReadyState(Cr.OPEN)}},this.stream=function(){if(!this.xhr){this._setReadyState(Cr.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 r in this.headers)this.xhr.setRequestHeader(r,this.headers[r]);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.readyState!==Cr.CLOSED&&(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.autoReconnect=!1,this.xhr.abort())},(e.start===void 0||e.start)&&this.stream()};Cr.INITIALIZING=-1,Cr.CONNECTING=0,Cr.OPEN=1,Cr.CLOSED=2,typeof oi<"u"&&(oi.SSE=Cr);class B0{constructor(e,r,n){this.options=r,this.payload=n;const o={headers:{"content-type":"application/json"}};n&&(o.payload=JSON.stringify(n)),r.apiKey&&(o.headers["api-key"]=r.apiKey),this.eventSource=new(r.EventSource??Cr)(e,o),this.eventSource.onmessage=i=>{try{const a=JSON.parse(i.data);r.onMessage(a)}catch(a){r.onError(new CustomEvent("parse-error",{detail:a}))}},this.eventSource.onerror=i=>{r.onError(i),this.isClosed()&&this.close()}}eventSource;triggeredOnClose=!1;isClosed(){return this.eventSource.readyState===EventSource.CLOSED}close(){this.isClosed()||this.eventSource.close(),this.triggeredOnClose||(this.triggeredOnClose=!0,this.options.onClose())}}const af=t=>Object.fromEntries(Object.entries(t).filter(([e,r])=>r!=null));class j0{constructor(e){this.options=e}getDefaultHeaders(e={}){const r={"Content-Type":"application/json",...e};return this.options.apiKey&&(r["api-key"]=this.options.apiKey),r}get speechRecognitionApiKey(){return this.options.speechRecognitionApiKey}async subscribeSse(e,r={},n){const o=af(r);return this.options.apiKey&&(n.apiKey=this.options.apiKey),new B0(`${this.options.apiUrl}${e}`,n,o)}async fetchData(e,r,n={},o={}){const i=`${this.options.apiUrl}${e}?${new URLSearchParams(af(n)).toString()}`,a={...o,headers:this.getDefaultHeaders(o?.headers)},s=await fetch(i,a);if(!s.ok){const f=await s.text();throw new Error(`API request failed: ${s.status} - ${f}`)}const c=await s.json(),{success:l,data:d,error:h}=r.safeParse(c);if(this.options.strict){if(!l)throw console.error(`Server response has wrong type:
|
|
61
61
|
`,{error:h,url:i,opts:a,data:c}),new Error(`Server response has wrong type: ${h.message}`);return d}else return l||console.warn(`Server response has wrong type:
|
|
62
|
-
`,{error:h,url:i,opts:a,data:c}),c}async postData(e,r){const n=await fetch(`${this.options.apiUrl}${e}`,{method:"POST",headers:this.getDefaultHeaders(),body:JSON.stringify(r)});if(!n.ok){const o=await n.text();throw new Error(`${n.status} - ${o}`)}return n}async postFormData(e,r){const n=await fetch(`${this.options.apiUrl}${e}`,{method:"POST",body:r});if(!n.ok){const o=await n.text();throw new Error(`${n.status} - ${o}`)}return n}}const U0=Oi([M(),Lr(),$t(),Sr(M()),Sr(Lr()),Sr($t())]),H0=Me({title:M(),description:M().optional(),badge:M().optional(),breadcrumbs:Sr(M()).optional(),previewImage:M().optional(),date:M().datetime().optional()}),q0=Me({url:M().url(),score:Lr(),metadata:Sn(M(),U0)}).merge(H0),V0=Me({url:M().url(),title:M(),considered:$t(),orgMetadata:Me({authors:Sr(M())}),type:M(),date:M().datetime(),similarity:Lr(),content:M(),fromFullTextSearch:$t(),rerank:Me({index:Lr().int(),adjustment:Lr(),score:Lr(),similarityOld:Lr()})}).deepPartial().or(q0),W0=Me({links:Sr(V0)}),$0=t=>{if("metadata"in t)return t;console.warn("Please upgrade your backend you are currently using an old api feature.");const e=t.orgMetadata??{};t?.fromFullTextSearch&&(e.fromFullTextSearch=t?.fromFullTextSearch),t?.rerank&&(e.rerank=t?.rerank);let r=[],n=t.title??"";if(t.title&&t.title.includes(" > ")){const o=t.title.split(" > ");n=o.pop()??"",r=o}return{url:t.url??"",title:n,score:t.similarity||0,breadcrumbs:r,metadata:e,description:t.content,date:t.date}};class Z0{constructor(e){this.results=e}}class K0{internalData;renderers=new Map;markedExtensions=[];constructor(e){const r={apiUrl:e.apiUrl,apiKey:e.apiKey,speechRecognitionApiKey:e.speechRecognitionApiKey,strict:e.strict??!1,EventSource:e.EventSource??EventSource},n=new j0(r);this.internalData={restClient:n,metadata:z0(n),searchResponseMap:new Map,chatResponseMap:new Map,conversationMap:new Map}}setMarkedExtensions(...e){this.markedExtensions=e}getMetadata(){return this.internalData.metadata}createConversationId(){const e=crypto.randomUUID();return this.renderers.set(e,new Oh({extensions:this.markedExtensions})),e}chat(e,r,n={}){const o=new Nl,i=crypto.randomUUID(),a=new Ph,s=this.renderers.get(e)??new Oh({extensions:this.markedExtensions}),c=new Qb({id:i,onError:f=>{n.onError?.(f)},onFinish:f=>{o.setValue(f)},markdownRenderer:s}),l=async()=>{await a,(await d).close()},d=new Nl;(async()=>{const f=await this.internalData.metadata;if(f.mode==="maintenance")throw new Error("Can not chat in maintenance mode");const y=await this.internalData.restClient.subscribeSse("/assistant/sse",{query:r,uID:f.userId,cID:e,rID:i,lang:n.lang,model:n.model,feature:n.features?.join(","),referrer:n.referrer,chat:"true",version:"2"},{onClose:()=>{c.finishMessage(),a.resolve(),o.cleanup()},onMessage:p=>{const g=p;switch(g.type){case"error":c.pushError(g.error);break;case"id":g.for==="request"&&i!==g.id&&console.warn(`Unexpected request id "${g.id}" expected "${i}"`),g.for==="conversation"&&e!==g.id&&console.warn(`Unexpected conversation id "${g.id}" expected "${e}"`);break;case"state":g.state==="history-entry-initialized"&&a.resolve();break;case"text":c.updateText(g.text);break;case"done":case"answer-done":c.finishMessage(),a.resolve(),d.then(x=>x.close());break;case"unexpected-call":console.error("unexpected-call:",g),c.pushError("unexpected-call");break;case"mapped-reference":c.addMappedReference(g.reference);break;case"reference":c.addOldReference(g.reference);break}n.onMessage?.(g)},onError:p=>{console.error("sse-error:",p),c.pushError("sse-error")}});d.setValue(y)})();const h=new D0({question:r,id:i,content:o,readableStore:c.getReadableStore(),readyForFeedback:a,abort:l,liipgptClientPrimitive:this});return this.internalData.chatResponseMap.set(h.id,h),h}async thumbs(e,r,n){if((await this.internalData.metadata).mode!=="ready")throw new Error("Can not post feedback unless we are in ready mode");const i={feedback:n,rID:e,query:r};await this.internalData.restClient.postData("/quickfeedback",i)}thumbsUp(e,r){return this.thumbs(e,r,"positive")}thumbsDown(e,r){return this.thumbs(e,r,"negative")}async feedback(e,r,n){const o=await this.internalData.metadata;if(o.mode!=="ready")throw new Error("Can not post feedback unless we are in ready mode");if(n.message){const i={body:n.message,email:n.email,rID:e,uID:o.userId,query:r};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 search(e,r={}){const{links:n}=await this.internalData.restClient.fetchData("/assistant/search",W0,{modelId:r.model,lang:r.language,query:e,mapResults:"true"}),o=n.map($0);return new Z0(o)}async getChatConfig(){return this.internalData.restClient.fetchData("/chatconfig",nf)}async getPredefinedQuestions(e){return(await this.internalData.restClient.fetchData("/topics/questions",M0,e)).predefinedQuestions}async transcribeAudio(e,r={}){const n=await this.internalData.metadata,o=r.lang||"de-CH";if(n.mode==="maintenance")throw new Error("Can not transcribe audio in maintenance mode");try{const a=(d=>d.includes("mp4")?"mp4":d.includes("webm")?"webm":(d.includes("wav"),"wav"))(e.type),s=new FormData;return s.append("file",e,`audio.${a}`),s.append("lang",o),s.append("type",e.type),{transcript:await(await this.internalData.restClient.postFormData(`/speech?key=${this.internalData.restClient.speechRecognitionApiKey||""}&lang=${o}`,s)).text()||"",error:void 0}}catch(i){return console.error("Error transcribing audio:",i),{transcript:"",error:i instanceof Error?i.message:"Unknown error"}}}}function Wl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $l,sf;function G0(){if(sf)return $l;sf=1;var t=function(w){return e(w)&&!r(w)};function e(b){return!!b&&typeof b=="object"}function r(b){var w=Object.prototype.toString.call(b);return w==="[object RegExp]"||w==="[object Date]"||i(b)}var n=typeof Symbol=="function"&&Symbol.for,o=n?Symbol.for("react.element"):60103;function i(b){return b.$$typeof===o}function a(b){return Array.isArray(b)?[]:{}}function s(b,w){return w.clone!==!1&&w.isMergeableObject(b)?g(a(b),b,w):b}function c(b,w,_){return b.concat(w).map(function(k){return s(k,_)})}function l(b,w){if(!w.customMerge)return g;var _=w.customMerge(b);return typeof _=="function"?_:g}function d(b){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(b).filter(function(w){return Object.propertyIsEnumerable.call(b,w)}):[]}function h(b){return Object.keys(b).concat(d(b))}function f(b,w){try{return w in b}catch{return!1}}function y(b,w){return f(b,w)&&!(Object.hasOwnProperty.call(b,w)&&Object.propertyIsEnumerable.call(b,w))}function p(b,w,_){var k={};return _.isMergeableObject(b)&&h(b).forEach(function(T){k[T]=s(b[T],_)}),h(w).forEach(function(T){y(b,T)||(f(b,T)&&_.isMergeableObject(w[T])?k[T]=l(T,_)(b[T],w[T],_):k[T]=s(w[T],_))}),k}function g(b,w,_){_=_||{},_.arrayMerge=_.arrayMerge||c,_.isMergeableObject=_.isMergeableObject||t,_.cloneUnlessOtherwiseSpecified=s;var k=Array.isArray(w),T=Array.isArray(b),A=k===T;return A?k?_.arrayMerge(b,w,_):p(b,w,_):s(w,_)}g.all=function(w,_){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(k,T){return g(k,T,_)},{})};var x=g;return $l=x,$l}var Y0=G0();const Pi=Wl(Y0),Q0=t=>t===null||typeof t!="object",Zl=t=>{if(Q0(t))return t;if(Array.isArray(t))return t.map(Zl);const e=Object.entries(t).filter(([r,n])=>n!==void 0).map(([r,n])=>[r,Zl(n)]);return Object.fromEntries(e)},Wa=(t,e)=>{const r=Zl(e);return Pi(t,r)},lf={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)"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",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:"inherit",background:"var(--color-grey-100)",borderRadius:"var(--base-border-radius)",boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"var(--base-border-radius)",custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)",placeholderOpacity:"1"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},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)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:"var(--base-border-radius)",boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:"var(--base-border-radius)",borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:"calc(var(--base-border-radius) / 1.25)",hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:"calc(var(--base-border-radius) / 2)"},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:768,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--base-line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--base-line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:"var(--card-border-radius)"},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesToggle:{color:"var(--anchor-color)",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(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",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)"}},svgs:{predefinedQuestion:`
|
|
62
|
+
`,{error:h,url:i,opts:a,data:c}),c}async postData(e,r){const n=await fetch(`${this.options.apiUrl}${e}`,{method:"POST",headers:this.getDefaultHeaders(),body:JSON.stringify(r)});if(!n.ok){const o=await n.text();throw new Error(`${n.status} - ${o}`)}return n}async postFormData(e,r){const n=await fetch(`${this.options.apiUrl}${e}`,{method:"POST",body:r});if(!n.ok){const o=await n.text();throw new Error(`${n.status} - ${o}`)}return n}}const U0=Oi([M(),Lr(),$t(),Sr(M()),Sr(Lr()),Sr($t())]),H0=Me({title:M(),description:M().optional(),badge:M().optional(),breadcrumbs:Sr(M()).optional(),previewImage:M().optional(),date:M().datetime().optional()}),q0=Me({url:M().url(),score:Lr(),metadata:Sn(M(),U0)}).merge(H0),V0=Me({url:M().url(),title:M(),considered:$t(),orgMetadata:Me({authors:Sr(M())}),type:M(),date:M().datetime(),similarity:Lr(),content:M(),fromFullTextSearch:$t(),rerank:Me({index:Lr().int(),adjustment:Lr(),score:Lr(),similarityOld:Lr()})}).deepPartial().or(q0),W0=Me({links:Sr(V0)}),$0=t=>{if("metadata"in t)return t;console.warn("Please upgrade your backend you are currently using an old api feature.");const e=t.orgMetadata??{};t?.fromFullTextSearch&&(e.fromFullTextSearch=t?.fromFullTextSearch),t?.rerank&&(e.rerank=t?.rerank);let r=[],n=t.title??"";if(t.title&&t.title.includes(" > ")){const o=t.title.split(" > ");n=o.pop()??"",r=o}return{url:t.url??"",title:n,score:t.similarity||0,breadcrumbs:r,metadata:e,description:t.content,date:t.date}};class Z0{constructor(e){this.results=e}}class K0{internalData;renderers=new Map;markedExtensions=[];constructor(e){const r={apiUrl:e.apiUrl,apiKey:e.apiKey,speechRecognitionApiKey:e.speechRecognitionApiKey,strict:e.strict??!1,EventSource:e.EventSource??EventSource},n=new j0(r);this.internalData={restClient:n,metadata:z0(n),searchResponseMap:new Map,chatResponseMap:new Map,conversationMap:new Map}}setMarkedExtensions(...e){this.markedExtensions=e}getMetadata(){return this.internalData.metadata}createConversationId(){const e=crypto.randomUUID();return this.renderers.set(e,new Oh({extensions:this.markedExtensions})),e}chat(e,r,n={}){const o=new Nl,i=crypto.randomUUID(),a=new Ph,s=this.renderers.get(e)??new Oh({extensions:this.markedExtensions}),c=new Qb({id:i,onError:f=>{n.onError?.(f)},onFinish:f=>{o.setValue(f)},markdownRenderer:s}),l=async()=>{await a,(await d).close()},d=new Nl;(async()=>{const f=await this.internalData.metadata;if(f.mode==="maintenance")throw new Error("Can not chat in maintenance mode");const y=await this.internalData.restClient.subscribeSse("/assistant/sse",{query:r,uID:f.userId,cID:e,rID:i,lang:n.lang,model:n.model,feature:n.features?.join(","),referrer:n.referrer,chat:"true",version:"2"},{onClose:()=>{c.finishMessage(),a.resolve(),o.cleanup()},onMessage:p=>{const g=p;switch(g.type){case"error":c.pushError(g.error);break;case"id":g.for==="request"&&i!==g.id&&console.warn(`Unexpected request id "${g.id}" expected "${i}"`),g.for==="conversation"&&e!==g.id&&console.warn(`Unexpected conversation id "${g.id}" expected "${e}"`);break;case"state":g.state==="history-entry-initialized"&&a.resolve();break;case"text":c.updateText(g.text);break;case"done":case"answer-done":c.finishMessage(),a.resolve(),d.then(x=>x.close());break;case"unexpected-call":console.error("unexpected-call:",g),c.pushError("unexpected-call");break;case"mapped-reference":c.addMappedReference(g.reference);break;case"reference":c.addOldReference(g.reference);break}n.onMessage?.(g)},onError:p=>{console.error(" sse-error:",p),!("data"in p&&!p.data&&"responseCode"in p&&p.responseCode===0)&&c.pushError("sse-error")}});d.setValue(y)})();const h=new D0({question:r,id:i,content:o,readableStore:c.getReadableStore(),readyForFeedback:a,abort:l,liipgptClientPrimitive:this});return this.internalData.chatResponseMap.set(h.id,h),h}async thumbs(e,r,n){if((await this.internalData.metadata).mode!=="ready")throw new Error("Can not post feedback unless we are in ready mode");const i={feedback:n,rID:e,query:r};await this.internalData.restClient.postData("/quickfeedback",i)}thumbsUp(e,r){return this.thumbs(e,r,"positive")}thumbsDown(e,r){return this.thumbs(e,r,"negative")}async feedback(e,r,n){const o=await this.internalData.metadata;if(o.mode!=="ready")throw new Error("Can not post feedback unless we are in ready mode");if(n.message){const i={body:n.message,email:n.email,rID:e,uID:o.userId,query:r};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 search(e,r={}){const{links:n}=await this.internalData.restClient.fetchData("/assistant/search",W0,{modelId:r.model,lang:r.language,query:e,mapResults:"true"}),o=n.map($0);return new Z0(o)}async getChatConfig(){return this.internalData.restClient.fetchData("/chatconfig",nf)}async getPredefinedQuestions(e){return(await this.internalData.restClient.fetchData("/topics/questions",M0,e)).predefinedQuestions}async transcribeAudio(e,r={}){const n=await this.internalData.metadata,o=r.lang||"de-CH";if(n.mode==="maintenance")throw new Error("Can not transcribe audio in maintenance mode");try{const a=(d=>d.includes("mp4")?"mp4":d.includes("webm")?"webm":(d.includes("wav"),"wav"))(e.type),s=new FormData;return s.append("file",e,`audio.${a}`),s.append("lang",o),s.append("type",e.type),{transcript:await(await this.internalData.restClient.postFormData(`/speech?key=${this.internalData.restClient.speechRecognitionApiKey||""}&lang=${o}`,s)).text()||"",error:void 0}}catch(i){return console.error("Error transcribing audio:",i),{transcript:"",error:i instanceof Error?i.message:"Unknown error"}}}}function Wl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $l,sf;function G0(){if(sf)return $l;sf=1;var t=function(w){return e(w)&&!r(w)};function e(b){return!!b&&typeof b=="object"}function r(b){var w=Object.prototype.toString.call(b);return w==="[object RegExp]"||w==="[object Date]"||i(b)}var n=typeof Symbol=="function"&&Symbol.for,o=n?Symbol.for("react.element"):60103;function i(b){return b.$$typeof===o}function a(b){return Array.isArray(b)?[]:{}}function s(b,w){return w.clone!==!1&&w.isMergeableObject(b)?g(a(b),b,w):b}function c(b,w,_){return b.concat(w).map(function(k){return s(k,_)})}function l(b,w){if(!w.customMerge)return g;var _=w.customMerge(b);return typeof _=="function"?_:g}function d(b){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(b).filter(function(w){return Object.propertyIsEnumerable.call(b,w)}):[]}function h(b){return Object.keys(b).concat(d(b))}function f(b,w){try{return w in b}catch{return!1}}function y(b,w){return f(b,w)&&!(Object.hasOwnProperty.call(b,w)&&Object.propertyIsEnumerable.call(b,w))}function p(b,w,_){var k={};return _.isMergeableObject(b)&&h(b).forEach(function(T){k[T]=s(b[T],_)}),h(w).forEach(function(T){y(b,T)||(f(b,T)&&_.isMergeableObject(w[T])?k[T]=l(T,_)(b[T],w[T],_):k[T]=s(w[T],_))}),k}function g(b,w,_){_=_||{},_.arrayMerge=_.arrayMerge||c,_.isMergeableObject=_.isMergeableObject||t,_.cloneUnlessOtherwiseSpecified=s;var k=Array.isArray(w),T=Array.isArray(b),A=k===T;return A?k?_.arrayMerge(b,w,_):p(b,w,_):s(w,_)}g.all=function(w,_){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(k,T){return g(k,T,_)},{})};var x=g;return $l=x,$l}var Y0=G0();const Pi=Wl(Y0),Q0=t=>t===null||typeof t!="object",Zl=t=>{if(Q0(t))return t;if(Array.isArray(t))return t.map(Zl);const e=Object.entries(t).filter(([r,n])=>n!==void 0).map(([r,n])=>[r,Zl(n)]);return Object.fromEntries(e)},Wa=(t,e)=>{const r=Zl(e);return Pi(t,r)},lf={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)"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",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:"inherit",background:"var(--color-grey-100)",borderRadius:"var(--base-border-radius)",boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"var(--base-border-radius)",custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)",placeholderOpacity:"1"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},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)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:"var(--base-border-radius)",boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:"var(--base-border-radius)",borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:"calc(var(--base-border-radius) / 1.25)",hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:"calc(var(--base-border-radius) / 2)"},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:768,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--base-line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--base-line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:"var(--card-border-radius)"},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesToggle:{color:"var(--anchor-color)",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(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",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)"}},svgs:{predefinedQuestion:`
|
|
63
63
|
<svg viewBox="0 0 24 24" >
|
|
64
64
|
<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>
|
|
65
65
|
<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>
|
package/config/index.d.ts
CHANGED
|
@@ -13761,6 +13761,7 @@ export type ReferenceContent = {
|
|
|
13761
13761
|
export type SearchResult = {
|
|
13762
13762
|
url: string;
|
|
13763
13763
|
score: number;
|
|
13764
|
+
language?: string | null;
|
|
13764
13765
|
metadata: Record<string, MetadataValue>;
|
|
13765
13766
|
} & ReferenceContent;
|
|
13766
13767
|
type Theme$1 = SimplifyDeep<Theme>;
|
package/configurator/_app/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const env={"PUBLIC_API_URL":"https://liipgpt.api.dev.genai.liip.ch/liipgpt","PUBLIC_CI_COMMIT_TAG":"2.6.
|
|
1
|
+
export const env={"PUBLIC_API_URL":"https://liipgpt.api.dev.genai.liip.ch/liipgpt","PUBLIC_CI_COMMIT_TAG":"2.6.2"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{o as De,s as mt}from"./Bu5Euvdy.js";import{bB as Ee,K as T,G as x,O as P}from"./DC-s52-u.js";class le{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Re extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function _t(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function wt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function vt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function bt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function At(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}const kt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&q.delete(Ie(e)),kt(e,t));const q=new Map;function Et(e,t){const n=Ie(e,t),r=document.querySelector(n);if(r?.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&q.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=At(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function St(e,t,n){if(q.size>0){const r=Ie(e,n),a=q.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);q.delete(r)}}return window.fetch(t,n)}function Ie(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${bt(...a)}"]`}return r}const Rt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function It(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Lt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const d=Rt.exec(c),[,h,u,l,p]=d;return t.push({name:l,matcher:p,optional:!!h,rest:!!u,chained:u?f===1&&i[0]==="":!1}),u?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return _e(c)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return!/^\([^)]+\)$/.test(e)}function Lt(e){return e.slice(1).split("/").filter(Ut)}function Tt(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let f=a[o-i];if(c.chained&&c.rest&&i&&(f=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function xt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,f,d]])=>{const{pattern:h,params:u}=It(o),l={id:o,exec:p=>{const _=h.exec(p);if(_)return Tt(_,u,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...f||[]].map(i),leaf:s(c)};return l.errors.length=l.layouts.length=Math.max(l.errors.length,l.layouts.length),l});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Be(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const U=globalThis.__sveltekit_4d5tcr?.base??"/configurator",Pt=globalThis.__sveltekit_4d5tcr?.assets??U,Ct="1760094552771",Je="sveltekit:snapshot",ze="sveltekit:scroll",Xe="sveltekit:states",Ot="sveltekit:pageurl",F="sveltekit:history",Y="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Ue(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function fe(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Fe={...j,"":j.hover};function Ze(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Qe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Ze(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function te(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=Ze(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Fe[r??"off"],preload_data:Fe[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ve(e){const t=Ee(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const et={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Ee(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Pt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ct;return i&&(e(!0),et.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Z||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function vn(e){}function Ge(e){const t=$t(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const jt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function $t(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=jt.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Dt=-1,Bt=-2,Ft=-3,Vt=-4,Gt=-5,Mt=-6;function qt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Dt)return;if(s===Ft)return NaN;if(s===Vt)return 1/0;if(s===Gt)return-1/0;if(s===Mt)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=t?.[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let l=1;l<o.length;l+=1)d.add(a(o[l]));break;case"Map":const h=new Map;r[s]=h;for(let l=1;l<o.length;l+=2)h.set(a(o[l]),a(o[l+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const u=Object.create(null);r[s]=u;for(let l=1;l<o.length;l+=2)u[o[l]]=a(o[l+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const l=globalThis[c],p=o[1],_=Ge(p),m=new l(_);r[s]=m;break}case"ArrayBuffer":{const l=o[1],p=Ge(l);r[s]=p;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let f=0;f<o.length;f+=1){const d=o[f];d!==Bt&&(c[f]=a(d))}}else{const c={};r[s]=c;for(const f in o){const d=o[f];c[f]=a(d)}}return r[s]}return a(0)}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const Kt=new Set([...tt]);[...Kt];function Ht(e){return e.filter(t=>t!=null)}const Wt="x-sveltekit-invalidated",Yt="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Re?e.status:500}function Jt(e){return e instanceof Re?e.text:"Internal Error"}let E,J,ye;const zt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());zt?(E={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ye={current:!1}):(E=new class{#e=T({});get data(){return x(this.#e)}set data(t){P(this.#e,t)}#t=T(null);get form(){return x(this.#t)}set form(t){P(this.#t,t)}#n=T(null);get error(){return x(this.#n)}set error(t){P(this.#n,t)}#r=T({});get params(){return x(this.#r)}set params(t){P(this.#r,t)}#a=T({id:null});get route(){return x(this.#a)}set route(t){P(this.#a,t)}#o=T({});get state(){return x(this.#o)}set state(t){P(this.#o,t)}#s=T(-1);get status(){return x(this.#s)}set status(t){P(this.#s,t)}#i=T(new URL("https://example.com"));get url(){return x(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=T(null);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},ye=new class{#e=T(!1);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},et.v=()=>ye.current=!0);function Xt(e){Object.assign(E,e)}const Zt="/__data.json",Qt=".html__data.json";function en(e){return e.endsWith(".html")?e.replace(/\.html$/,Qt):e.replace(/\/$/,"")+Zt}const{tick:tn}=mt,nn=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Ye(ze)??{},z=Ye(Je)??{},N={url:Ve({}),page:Ve({}),navigating:Ee(null),updated:Nt()};function Le(e){D[e]=fe()}function rn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function G(e){return location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}function Me(){}let Te,be,re,C,Ae,v;const ae=[],oe=[];let O=null;const ee=new Map,rt=new Set,an=new Set,K=new Set;let w={branch:[],error:null,url:null},xe=!1,se=!1,qe=!0,X=!1,M=!1,at=!1,Pe=!1,ot,A,I,$;const H=new Set;async function En(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Te=xt(e),C=document.documentElement,Ae=t,be=e.nodes[0],re=e.nodes[1],be(),re(),A=history.state?.[F],I=history.state?.[Y],A||(A=I=Date.now(),history.replaceState({...history.state,[F]:A,[Y]:I},""));const r=D[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await gn(Ae,n)):(await W({type:"enter",url:Ue(v.hash?_n(new URL(location.href)):location.href),replace_state:!0}),a()),pn()}function on(){ae.length=0,Pe=!1}function st(e){oe.some(t=>t?.snapshot)&&(z[e]=oe.map(t=>t?.snapshot?.capture()))}function it(e){z[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function Ke(){Le(A),Be(ze,D),st(I),Be(Je,z)}async function Ce(e,t,n,r){return W({type:"goto",url:Ue(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0),t.invalidate&&t.invalidate.forEach(hn)}})}async function sn(e){if(e.id!==O?.id){const t={};H.add(t),O={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(H.delete(t),n.type==="loaded"&&n.state.error&&(O=null),n))}}return O.promise}async function we(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function ct(e,t,n){w=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(E,e.props.page),ot=new v.root({target:t,props:{...e.props,stores:N,components:oe},hydrate:n,sync:!1}),it(I),n){const a={from:null,to:{params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};K.forEach(s=>s(a))}se=!0}function ie({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(U&&(e.pathname===U||e.pathname===U+"/"))o="always";else for(const l of n)l?.slash!==void 0&&(o=l.slash);e.pathname=_t(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:Ht(n).map(l=>l.node.component),page:$e(E)}};i!==void 0&&(c.props.form=i);let f={},d=!E,h=0;for(let l=0;l<Math.max(n.length,w.branch.length);l+=1){const p=n[l],_=w.branch[l];p?.data!==_?.data&&(d=!0),p&&(f={...f,...p.data},d&&(c.props[`data_${h}`]=f),h+=1)}return(!w.url||e.href!==w.url.href||w.error!==a||i!==void 0&&i!==E.form||d)&&(c.props.page={error:a,params:t,route:{id:s?.id??null},state:{},status:r,url:new URL(e),form:i??null,data:d?f:E.data}),c}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await e();if(f.universal?.load){let d=function(...u){for(const l of u){const{href:p}=new URL(l,n);c.dependencies.add(p)}};const h={route:new Proxy(a,{get:(u,l)=>(o&&(c.route=!0),u[l])}),params:new Proxy(r,{get:(u,l)=>(o&&c.params.add(l),u[l])}),data:s?.data??null,url:vt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},v.hash),async fetch(u,l){u instanceof Request&&(l={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...l});const{resolved:p,promise:_}=lt(u,l,n);return o&&d(p.href),_},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await f.universal.load.call(null,h)??null}return{node:f,loader:e,server:s,universal:f.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:f.universal?.trailingSlash??s?.slash}}function lt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=se?St(r,a.href,t):Et(r,t);return{resolved:a,promise:s}}function He(e,t,n,r,a,s){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==w.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Ne(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function cn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function We({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(E),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(O?.id===e)return H.delete(O.token),O.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(g=>g?.().catch(()=>{})),f.forEach(g=>g?.[1]().catch(()=>{}));let d=null;const h=w.url?e!==ce(w.url):!1,u=w.route?a.id!==w.route.id:!1,l=cn(w.url,n);let p=!1;const _=f.map((g,y)=>{const b=w.branch[y],k=!!g?.[0]&&(b?.loader!==g[1]||He(p,u,h,l,b.server?.uses,r));return k&&(p=!0),k});if(_.some(Boolean)){try{d=await ht(n,_)}catch(g){const y=await V(g,{url:n,params:r,route:{id:e}});return H.has(s)?We({error:y,url:n,params:r,route:a}):de({status:ne(g),error:y,url:n,route:a})}if(d.type==="redirect")return d}const m=d?.nodes;let R=!1;const S=f.map(async(g,y)=>{if(!g)return;const b=w.branch[y],k=m?.[y];if((!k||k.type==="skip")&&g[1]===b?.loader&&!He(R,u,h,l,b.universal?.uses,r))return b;if(R=!0,k?.type==="error")throw k;return Oe({loader:g[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge<y;ge+=1)Object.assign(pe,(await S[ge])?.data);return pe},server_data_node:Ne(k===void 0&&g[0]?{type:"skip"}:k??null,g[0]?b?.server:void 0)})});for(const g of S)g.catch(()=>{});const L=[];for(let g=0;g<f.length;g+=1)if(f[g])try{L.push(await S[g])}catch(y){if(y instanceof Se)return{type:"redirect",location:y.location};if(H.has(s))return We({error:await V(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=ne(y),k;if(m?.includes(y))b=y.status??b,k=y.error;else if(y instanceof le)k=y.body;else{if(await N.updated.check())return await nt(),await G(n);k=await V(y,{params:r,url:n,route:{id:a.id}})}const Q=await ln(g,L,i);return Q?ie({url:n,params:r,branch:L.slice(0,Q.idx).concat(Q.node),status:b,error:k,route:a}):await dt(n,{id:a.id},k,b)}else L.push(void 0);return ie({url:n,params:r,branch:L,status:200,error:null,route:a,form:t?void 0:null})}async function ln(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function de({status:e,error:t,url:n,route:r}){const a={};let s=null;if(v.server_loads[0]===0)try{const o=await ht(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==Z||n.pathname!==location.pathname||xe)&&await G(n)}try{const o=await Oe({loader:be,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ne(s)}),c={node:await re(),loader:re,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return Ce(new URL(o.location,location.href),{},0);throw o}}async function fn(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>lt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function he(e,t){if(e&&!ue(e,U,v.hash)){const n=await fn(e);if(!n)return;const r=un(n);for(const a of Te){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:wt(s),url:e}}}}function un(e){return yt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:r}){let a=!1;const s=je(w,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return X||rt.forEach(o=>o(i)),a?null:s}async function W({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=Me,block:d=Me}){const h=$;$=c;const u=await he(t,!1),l=e==="enter"?je(w,u,t,e):ut({url:t,type:e,delta:n?.delta,intent:u});if(!l){d(),$===c&&($=h);return}const p=A,_=I;f(),X=!0,se&&l.navigation.type!=="enter"&&N.navigating.set(J.current=l.navigation);let m=u&&await ft(u);if(!m){if(ue(t,U,v.hash))return await G(t);m=await dt(t,{id:null},await V(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=u?.url||t,$!==c)return l.reject(new Error("navigation aborted")),!1;if(m.type==="redirect")if(o>=20)m=await de({status:500,error:await V(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await Ce(new URL(m.location,t).href,{},o+1,c),!1;else m.props.page.status>=400&&await N.updated.check()&&(await nt(),await G(t));if(on(),Le(p),st(_),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,y={[F]:A+=g,[Y]:I+=g,[Xe]:i};(s?history.replaceState:history.pushState).call(history,y,"",t),s||rn(A,I)}if(O=null,m.props.page.state=i,se){w=m.state,m.props.page&&(m.props.page.url=t);const g=(await Promise.all(Array.from(an,y=>y(l.navigation)))).filter(y=>typeof y=="function");if(g.length>0){let y=function(){g.forEach(b=>{K.delete(b)})};g.push(y),g.forEach(b=>{K.add(b)})}ot.$set(m.props),Xt(m.props.page),at=!0}else ct(m,Ae,!1);const{activeElement:R}=document;await tn();const S=n?n.scroll:a?fe():null;if(qe){const g=t.hash&&document.getElementById(gt(t));S?scrollTo(S.x,S.y):g?g.scrollIntoView():scrollTo(0,0)}const L=document.activeElement!==R&&document.activeElement!==document.body;!r&&!L&&mn(t),qe=!0,m.props.page&&Object.assign(E,m.props.page),X=!1,e==="popstate"&&it(I),l.fulfil(void 0),K.forEach(g=>g(l.navigation)),N.navigating.set(J.current=null)}async function dt(e,t,n,r){return e.origin===Z&&e.pathname===location.pathname&&!xe?await de({status:r,error:n,url:e,route:t}):await G(e)}function dn(){let e,t,n;C.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(we(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const f=Qe(o,C),d=f===t&&c>=n;if(!f||d)return;const{url:h,external:u,download:l}=ve(f,U,v.hash);if(u||l)return;const p=te(f),_=h&&ce(w.url)===ce(h);if(!(p.reload||_))if(c<=p.preload_data){t=f,n=j.tap;const m=await he(h,!1);if(!m)return;sn(m)}else c<=p.preload_code&&(t=f,n=c,we(h))}function i(){a.disconnect();for(const o of C.querySelectorAll("a")){const{url:c,external:f,download:d}=ve(o,U,v.hash);if(f||d)continue;const h=te(o);h.reload||(h.preload_code===j.viewport&&a.observe(o),h.preload_code===j.eager&&we(c))}}K.add(i),i()}function V(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Jt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Sn(e,t={}){return e=new URL(Ue(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):Ce(e,t,0)}function hn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function pn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ke(),!X){const r=je(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ke()}),navigator.connection?.saveData||dn(),C.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Qe(t.composedPath()[0],C);if(!n)return;const{url:r,external:a,target:s,download:i}=ve(n,U,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[f,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),h=f===me(location);if(a||o.reload&&(!h||!d)){ut({url:r,type:"link"})?X=!0:t.preventDefault();return}if(d!==void 0&&h){const[,u]=w.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const l=n.ownerDocument.getElementById(decodeURIComponent(d));l&&(l.scrollIntoView(),l.focus())}return}if(M=!0,Le(A),e(r),!o.replace_state)return;M=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await W({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),C.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(i,U,!1))return;const o=t.target,c=te(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(o),d=r?.getAttribute("name");d&&f.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(f).toString(),W({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[F]){const n=t.state[F];if($={},n===A)return;const r=D[n],a=t.state[Xe]??{},s=new URL(t.state[Ot]??location.href),i=t.state[Y],o=w.url?me(location)===me(w.url):!1;if(i===I&&(at||o)){a!==E.state&&(E.state=a),e(s),D[A]=fe(),r&&scrollTo(r.x,r.y),A=n;return}const f=n-A;await W({type:"popstate",url:s,popped:{state:a,scroll:r,delta:f},accept:()=>{A=n,I=i},block:()=>{history.go(-f)},nav_token:$})}else if(!M){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[F]:++A,[Y]:I},"",location.href))});for(const t of document.querySelectorAll("link"))nn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&N.navigating.set(J.current=null)});function e(t){w.url=E.url=t,N.page.set($e(E)),N.page.notify()}}async function gn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){xe=!0;const f=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(f,!1)||{}),d=Te.find(({id:l})=>l===s.id);let h,u=!0;try{const l=r.map(async(_,m)=>{const R=o[m];return R?.uses&&(R.uses=pt(R.uses)),Oe({loader:v.nodes[_],url:f,params:a,route:s,parent:async()=>{const S={};for(let L=0;L<m;L+=1)Object.assign(S,(await l[L]).data);return S},server_data_node:Ne(R)})}),p=await Promise.all(l);if(d){const _=d.layouts;for(let m=0;m<_.length;m++)_[m]||p.splice(m,0,void 0)}h=ie({url:f,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(l){if(l instanceof Se){await G(new URL(l.location,location.href));return}h=await de({status:ne(l),error:await V(l,{url:f,params:a,route:s}),url:f,route:s}),e.textContent="",u=!1}h.props.page&&(h.props.page.state={}),ct(h,e,u)}async function ht(e,t){const n=new URL(e);n.pathname=en(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(Yt,"1"),n.searchParams.append(Wt,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new le(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader(),c=new TextDecoder;function f(h){return qt(h,{...v.decoders,Promise:u=>new Promise((l,p)=>{i.set(u,{fulfil:l,reject:p})})})}let d="";for(;;){const{done:h,value:u}=await o.read();if(h&&!d)break;for(d+=!u&&d?`
|
|
1
|
+
import{o as De,s as mt}from"./Bu5Euvdy.js";import{bB as Ee,K as T,G as x,O as P}from"./DC-s52-u.js";class le{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Re extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function _t(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function wt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function vt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function bt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function At(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}const kt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&q.delete(Ie(e)),kt(e,t));const q=new Map;function Et(e,t){const n=Ie(e,t),r=document.querySelector(n);if(r?.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&q.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=At(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function St(e,t,n){if(q.size>0){const r=Ie(e,n),a=q.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);q.delete(r)}}return window.fetch(t,n)}function Ie(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${bt(...a)}"]`}return r}const Rt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function It(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Lt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const d=Rt.exec(c),[,h,u,l,p]=d;return t.push({name:l,matcher:p,optional:!!h,rest:!!u,chained:u?f===1&&i[0]==="":!1}),u?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return _e(c)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return!/^\([^)]+\)$/.test(e)}function Lt(e){return e.slice(1).split("/").filter(Ut)}function Tt(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let f=a[o-i];if(c.chained&&c.rest&&i&&(f=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function xt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,f,d]])=>{const{pattern:h,params:u}=It(o),l={id:o,exec:p=>{const _=h.exec(p);if(_)return Tt(_,u,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...f||[]].map(i),leaf:s(c)};return l.errors.length=l.layouts.length=Math.max(l.errors.length,l.layouts.length),l});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Be(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const U=globalThis.__sveltekit_10or78?.base??"/configurator",Pt=globalThis.__sveltekit_10or78?.assets??U,Ct="1760366246121",Je="sveltekit:snapshot",ze="sveltekit:scroll",Xe="sveltekit:states",Ot="sveltekit:pageurl",F="sveltekit:history",Y="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Ue(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function fe(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Fe={...j,"":j.hover};function Ze(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Qe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Ze(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function te(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=Ze(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Fe[r??"off"],preload_data:Fe[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ve(e){const t=Ee(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const et={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Ee(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Pt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ct;return i&&(e(!0),et.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Z||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function vn(e){}function Ge(e){const t=$t(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const jt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function $t(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=jt.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Dt=-1,Bt=-2,Ft=-3,Vt=-4,Gt=-5,Mt=-6;function qt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Dt)return;if(s===Ft)return NaN;if(s===Vt)return 1/0;if(s===Gt)return-1/0;if(s===Mt)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=t?.[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let l=1;l<o.length;l+=1)d.add(a(o[l]));break;case"Map":const h=new Map;r[s]=h;for(let l=1;l<o.length;l+=2)h.set(a(o[l]),a(o[l+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const u=Object.create(null);r[s]=u;for(let l=1;l<o.length;l+=2)u[o[l]]=a(o[l+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const l=globalThis[c],p=o[1],_=Ge(p),m=new l(_);r[s]=m;break}case"ArrayBuffer":{const l=o[1],p=Ge(l);r[s]=p;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let f=0;f<o.length;f+=1){const d=o[f];d!==Bt&&(c[f]=a(d))}}else{const c={};r[s]=c;for(const f in o){const d=o[f];c[f]=a(d)}}return r[s]}return a(0)}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const Kt=new Set([...tt]);[...Kt];function Ht(e){return e.filter(t=>t!=null)}const Wt="x-sveltekit-invalidated",Yt="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Re?e.status:500}function Jt(e){return e instanceof Re?e.text:"Internal Error"}let E,J,ye;const zt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());zt?(E={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ye={current:!1}):(E=new class{#e=T({});get data(){return x(this.#e)}set data(t){P(this.#e,t)}#t=T(null);get form(){return x(this.#t)}set form(t){P(this.#t,t)}#n=T(null);get error(){return x(this.#n)}set error(t){P(this.#n,t)}#r=T({});get params(){return x(this.#r)}set params(t){P(this.#r,t)}#a=T({id:null});get route(){return x(this.#a)}set route(t){P(this.#a,t)}#o=T({});get state(){return x(this.#o)}set state(t){P(this.#o,t)}#s=T(-1);get status(){return x(this.#s)}set status(t){P(this.#s,t)}#i=T(new URL("https://example.com"));get url(){return x(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=T(null);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},ye=new class{#e=T(!1);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},et.v=()=>ye.current=!0);function Xt(e){Object.assign(E,e)}const Zt="/__data.json",Qt=".html__data.json";function en(e){return e.endsWith(".html")?e.replace(/\.html$/,Qt):e.replace(/\/$/,"")+Zt}const{tick:tn}=mt,nn=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Ye(ze)??{},z=Ye(Je)??{},N={url:Ve({}),page:Ve({}),navigating:Ee(null),updated:Nt()};function Le(e){D[e]=fe()}function rn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function G(e){return location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}function Me(){}let Te,be,re,C,Ae,v;const ae=[],oe=[];let O=null;const ee=new Map,rt=new Set,an=new Set,K=new Set;let w={branch:[],error:null,url:null},xe=!1,se=!1,qe=!0,X=!1,M=!1,at=!1,Pe=!1,ot,A,I,$;const H=new Set;async function En(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Te=xt(e),C=document.documentElement,Ae=t,be=e.nodes[0],re=e.nodes[1],be(),re(),A=history.state?.[F],I=history.state?.[Y],A||(A=I=Date.now(),history.replaceState({...history.state,[F]:A,[Y]:I},""));const r=D[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await gn(Ae,n)):(await W({type:"enter",url:Ue(v.hash?_n(new URL(location.href)):location.href),replace_state:!0}),a()),pn()}function on(){ae.length=0,Pe=!1}function st(e){oe.some(t=>t?.snapshot)&&(z[e]=oe.map(t=>t?.snapshot?.capture()))}function it(e){z[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function Ke(){Le(A),Be(ze,D),st(I),Be(Je,z)}async function Ce(e,t,n,r){return W({type:"goto",url:Ue(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0),t.invalidate&&t.invalidate.forEach(hn)}})}async function sn(e){if(e.id!==O?.id){const t={};H.add(t),O={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(H.delete(t),n.type==="loaded"&&n.state.error&&(O=null),n))}}return O.promise}async function we(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function ct(e,t,n){w=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(E,e.props.page),ot=new v.root({target:t,props:{...e.props,stores:N,components:oe},hydrate:n,sync:!1}),it(I),n){const a={from:null,to:{params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};K.forEach(s=>s(a))}se=!0}function ie({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(U&&(e.pathname===U||e.pathname===U+"/"))o="always";else for(const l of n)l?.slash!==void 0&&(o=l.slash);e.pathname=_t(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:Ht(n).map(l=>l.node.component),page:$e(E)}};i!==void 0&&(c.props.form=i);let f={},d=!E,h=0;for(let l=0;l<Math.max(n.length,w.branch.length);l+=1){const p=n[l],_=w.branch[l];p?.data!==_?.data&&(d=!0),p&&(f={...f,...p.data},d&&(c.props[`data_${h}`]=f),h+=1)}return(!w.url||e.href!==w.url.href||w.error!==a||i!==void 0&&i!==E.form||d)&&(c.props.page={error:a,params:t,route:{id:s?.id??null},state:{},status:r,url:new URL(e),form:i??null,data:d?f:E.data}),c}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await e();if(f.universal?.load){let d=function(...u){for(const l of u){const{href:p}=new URL(l,n);c.dependencies.add(p)}};const h={route:new Proxy(a,{get:(u,l)=>(o&&(c.route=!0),u[l])}),params:new Proxy(r,{get:(u,l)=>(o&&c.params.add(l),u[l])}),data:s?.data??null,url:vt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},v.hash),async fetch(u,l){u instanceof Request&&(l={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...l});const{resolved:p,promise:_}=lt(u,l,n);return o&&d(p.href),_},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await f.universal.load.call(null,h)??null}return{node:f,loader:e,server:s,universal:f.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:f.universal?.trailingSlash??s?.slash}}function lt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=se?St(r,a.href,t):Et(r,t);return{resolved:a,promise:s}}function He(e,t,n,r,a,s){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==w.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Ne(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function cn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function We({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(E),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(O?.id===e)return H.delete(O.token),O.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(g=>g?.().catch(()=>{})),f.forEach(g=>g?.[1]().catch(()=>{}));let d=null;const h=w.url?e!==ce(w.url):!1,u=w.route?a.id!==w.route.id:!1,l=cn(w.url,n);let p=!1;const _=f.map((g,y)=>{const b=w.branch[y],k=!!g?.[0]&&(b?.loader!==g[1]||He(p,u,h,l,b.server?.uses,r));return k&&(p=!0),k});if(_.some(Boolean)){try{d=await ht(n,_)}catch(g){const y=await V(g,{url:n,params:r,route:{id:e}});return H.has(s)?We({error:y,url:n,params:r,route:a}):de({status:ne(g),error:y,url:n,route:a})}if(d.type==="redirect")return d}const m=d?.nodes;let R=!1;const S=f.map(async(g,y)=>{if(!g)return;const b=w.branch[y],k=m?.[y];if((!k||k.type==="skip")&&g[1]===b?.loader&&!He(R,u,h,l,b.universal?.uses,r))return b;if(R=!0,k?.type==="error")throw k;return Oe({loader:g[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge<y;ge+=1)Object.assign(pe,(await S[ge])?.data);return pe},server_data_node:Ne(k===void 0&&g[0]?{type:"skip"}:k??null,g[0]?b?.server:void 0)})});for(const g of S)g.catch(()=>{});const L=[];for(let g=0;g<f.length;g+=1)if(f[g])try{L.push(await S[g])}catch(y){if(y instanceof Se)return{type:"redirect",location:y.location};if(H.has(s))return We({error:await V(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=ne(y),k;if(m?.includes(y))b=y.status??b,k=y.error;else if(y instanceof le)k=y.body;else{if(await N.updated.check())return await nt(),await G(n);k=await V(y,{params:r,url:n,route:{id:a.id}})}const Q=await ln(g,L,i);return Q?ie({url:n,params:r,branch:L.slice(0,Q.idx).concat(Q.node),status:b,error:k,route:a}):await dt(n,{id:a.id},k,b)}else L.push(void 0);return ie({url:n,params:r,branch:L,status:200,error:null,route:a,form:t?void 0:null})}async function ln(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function de({status:e,error:t,url:n,route:r}){const a={};let s=null;if(v.server_loads[0]===0)try{const o=await ht(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==Z||n.pathname!==location.pathname||xe)&&await G(n)}try{const o=await Oe({loader:be,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ne(s)}),c={node:await re(),loader:re,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return Ce(new URL(o.location,location.href),{},0);throw o}}async function fn(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>lt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function he(e,t){if(e&&!ue(e,U,v.hash)){const n=await fn(e);if(!n)return;const r=un(n);for(const a of Te){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:wt(s),url:e}}}}function un(e){return yt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:r}){let a=!1;const s=je(w,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return X||rt.forEach(o=>o(i)),a?null:s}async function W({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=Me,block:d=Me}){const h=$;$=c;const u=await he(t,!1),l=e==="enter"?je(w,u,t,e):ut({url:t,type:e,delta:n?.delta,intent:u});if(!l){d(),$===c&&($=h);return}const p=A,_=I;f(),X=!0,se&&l.navigation.type!=="enter"&&N.navigating.set(J.current=l.navigation);let m=u&&await ft(u);if(!m){if(ue(t,U,v.hash))return await G(t);m=await dt(t,{id:null},await V(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=u?.url||t,$!==c)return l.reject(new Error("navigation aborted")),!1;if(m.type==="redirect")if(o>=20)m=await de({status:500,error:await V(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await Ce(new URL(m.location,t).href,{},o+1,c),!1;else m.props.page.status>=400&&await N.updated.check()&&(await nt(),await G(t));if(on(),Le(p),st(_),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,y={[F]:A+=g,[Y]:I+=g,[Xe]:i};(s?history.replaceState:history.pushState).call(history,y,"",t),s||rn(A,I)}if(O=null,m.props.page.state=i,se){w=m.state,m.props.page&&(m.props.page.url=t);const g=(await Promise.all(Array.from(an,y=>y(l.navigation)))).filter(y=>typeof y=="function");if(g.length>0){let y=function(){g.forEach(b=>{K.delete(b)})};g.push(y),g.forEach(b=>{K.add(b)})}ot.$set(m.props),Xt(m.props.page),at=!0}else ct(m,Ae,!1);const{activeElement:R}=document;await tn();const S=n?n.scroll:a?fe():null;if(qe){const g=t.hash&&document.getElementById(gt(t));S?scrollTo(S.x,S.y):g?g.scrollIntoView():scrollTo(0,0)}const L=document.activeElement!==R&&document.activeElement!==document.body;!r&&!L&&mn(t),qe=!0,m.props.page&&Object.assign(E,m.props.page),X=!1,e==="popstate"&&it(I),l.fulfil(void 0),K.forEach(g=>g(l.navigation)),N.navigating.set(J.current=null)}async function dt(e,t,n,r){return e.origin===Z&&e.pathname===location.pathname&&!xe?await de({status:r,error:n,url:e,route:t}):await G(e)}function dn(){let e,t,n;C.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(we(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const f=Qe(o,C),d=f===t&&c>=n;if(!f||d)return;const{url:h,external:u,download:l}=ve(f,U,v.hash);if(u||l)return;const p=te(f),_=h&&ce(w.url)===ce(h);if(!(p.reload||_))if(c<=p.preload_data){t=f,n=j.tap;const m=await he(h,!1);if(!m)return;sn(m)}else c<=p.preload_code&&(t=f,n=c,we(h))}function i(){a.disconnect();for(const o of C.querySelectorAll("a")){const{url:c,external:f,download:d}=ve(o,U,v.hash);if(f||d)continue;const h=te(o);h.reload||(h.preload_code===j.viewport&&a.observe(o),h.preload_code===j.eager&&we(c))}}K.add(i),i()}function V(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Jt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Sn(e,t={}){return e=new URL(Ue(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):Ce(e,t,0)}function hn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function pn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ke(),!X){const r=je(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ke()}),navigator.connection?.saveData||dn(),C.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Qe(t.composedPath()[0],C);if(!n)return;const{url:r,external:a,target:s,download:i}=ve(n,U,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[f,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),h=f===me(location);if(a||o.reload&&(!h||!d)){ut({url:r,type:"link"})?X=!0:t.preventDefault();return}if(d!==void 0&&h){const[,u]=w.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const l=n.ownerDocument.getElementById(decodeURIComponent(d));l&&(l.scrollIntoView(),l.focus())}return}if(M=!0,Le(A),e(r),!o.replace_state)return;M=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await W({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),C.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(i,U,!1))return;const o=t.target,c=te(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(o),d=r?.getAttribute("name");d&&f.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(f).toString(),W({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[F]){const n=t.state[F];if($={},n===A)return;const r=D[n],a=t.state[Xe]??{},s=new URL(t.state[Ot]??location.href),i=t.state[Y],o=w.url?me(location)===me(w.url):!1;if(i===I&&(at||o)){a!==E.state&&(E.state=a),e(s),D[A]=fe(),r&&scrollTo(r.x,r.y),A=n;return}const f=n-A;await W({type:"popstate",url:s,popped:{state:a,scroll:r,delta:f},accept:()=>{A=n,I=i},block:()=>{history.go(-f)},nav_token:$})}else if(!M){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[F]:++A,[Y]:I},"",location.href))});for(const t of document.querySelectorAll("link"))nn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&N.navigating.set(J.current=null)});function e(t){w.url=E.url=t,N.page.set($e(E)),N.page.notify()}}async function gn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){xe=!0;const f=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(f,!1)||{}),d=Te.find(({id:l})=>l===s.id);let h,u=!0;try{const l=r.map(async(_,m)=>{const R=o[m];return R?.uses&&(R.uses=pt(R.uses)),Oe({loader:v.nodes[_],url:f,params:a,route:s,parent:async()=>{const S={};for(let L=0;L<m;L+=1)Object.assign(S,(await l[L]).data);return S},server_data_node:Ne(R)})}),p=await Promise.all(l);if(d){const _=d.layouts;for(let m=0;m<_.length;m++)_[m]||p.splice(m,0,void 0)}h=ie({url:f,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(l){if(l instanceof Se){await G(new URL(l.location,location.href));return}h=await de({status:ne(l),error:await V(l,{url:f,params:a,route:s}),url:f,route:s}),e.textContent="",u=!1}h.props.page&&(h.props.page.state={}),ct(h,e,u)}async function ht(e,t){const n=new URL(e);n.pathname=en(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(Yt,"1"),n.searchParams.append(Wt,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new le(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader(),c=new TextDecoder;function f(h){return qt(h,{...v.decoders,Promise:u=>new Promise((l,p)=>{i.set(u,{fulfil:l,reject:p})})})}let d="";for(;;){const{done:h,value:u}=await o.read();if(h&&!d)break;for(d+=!u&&d?`
|
|
2
2
|
`:c.decode(u,{stream:!0});;){const l=d.indexOf(`
|
|
3
3
|
`);if(l===-1)break;const p=JSON.parse(d.slice(0,l));if(d=d.slice(l+1),p.type==="redirect")return s(p);if(p.type==="data")p.nodes?.forEach(_=>{_?.type==="data"&&(_.uses=pt(_.uses),_.data=f(_.data))}),s(p);else if(p.type==="chunk"){const{id:_,data:m,error:R}=p,S=i.get(_);i.delete(_),R?S.reject(f(R)):S.fulfil(f(m))}}}})}function pt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ke=!1;function mn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=gt(e);if(n&&document.getElementById(n)){const{x:a,y:s}=fe();setTimeout(()=>{const i=history.state;ke=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),ke=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function je(e,t,n,r){let a,s;const i=new Promise((c,f)=>{a=c,s=f});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function $e(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function _n(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function gt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{En as a,Sn as g,vn as l,E as p,N as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./NZTpNUN0.js";import{p as J,I as b,a as d,J as K,b as n,d as L,v as k,G as x,K as N,F as q,L as O,M as P,c as R,N as T,f as B,s as E,t as U,g as j,O as S,e as w,r as z}from"./DC-s52-u.js";import{i as F}from"./Buwjqn5O.js";import{a as A}from"./
|
|
1
|
+
import"./NZTpNUN0.js";import{p as J,I as b,a as d,J as K,b as n,d as L,v as k,G as x,K as N,F as q,L as O,M as P,c as R,N as T,f as B,s as E,t as U,g as j,O as S,e as w,r as z}from"./DC-s52-u.js";import{i as F}from"./Buwjqn5O.js";import{a as A}from"./C99KO4nD.js";import{p as M}from"./M-YrVFI7.js";var D=(u,a)=>a()(),H=B('<div class="chat-app__container"><div class="error-message svelte-4thrqu">Server is unreachable, please try later... <button class="error-message__retry-button svelte-4thrqu">Retry</button></div></div>'),Q=B(" <!>",1);const V={hash:"svelte-4thrqu",code:`
|
|
2
2
|
/* These styles are inline, because at this point theme loading has failed. */.error-message.svelte-4thrqu {display:table;z-index:1000;width:auto;margin:2rem auto;padding:2rem;border-radius:2px;background:white;color:oklch(27.8% 0.033 256.848);font-family:-apple-system,
|
|
3
3
|
BlinkMacSystemFont,
|
|
4
4
|
avenir next,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const Wt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Ft="2.6.0";function Xe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var se,we;function Qe(){if(we)return se;we=1;var r=function(k){return e(k)&&!t(k)};function e(v){return!!v&&typeof v=="object"}function t(v){var k=Object.prototype.toString.call(v);return k==="[object RegExp]"||k==="[object Date]"||o(v)}var a=typeof Symbol=="function"&&Symbol.for,n=a?Symbol.for("react.element"):60103;function o(v){return v.$$typeof===n}function s(v){return Array.isArray(v)?[]:{}}function i(v,k){return k.clone!==!1&&k.isMergeableObject(v)?D(s(v),v,k):v}function f(v,k,w){return v.concat(k).map(function(A){return i(A,w)})}function p(v,k){if(!k.customMerge)return D;var w=k.customMerge(v);return typeof w=="function"?w:D}function _(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(k){return Object.propertyIsEnumerable.call(v,k)}):[]}function E(v){return Object.keys(v).concat(_(v))}function J(v,k){try{return k in v}catch{return!1}}function Ge(v,k){return J(v,k)&&!(Object.hasOwnProperty.call(v,k)&&Object.propertyIsEnumerable.call(v,k))}function qe(v,k,w){var A={};return w.isMergeableObject(v)&&E(v).forEach(function(j){A[j]=i(v[j],w)}),E(k).forEach(function(j){Ge(v,j)||(J(v,j)&&w.isMergeableObject(k[j])?A[j]=p(j,w)(v[j],k[j],w):A[j]=i(k[j],w))}),A}function D(v,k,w){w=w||{},w.arrayMerge=w.arrayMerge||f,w.isMergeableObject=w.isMergeableObject||r,w.cloneUnlessOtherwiseSpecified=i;var A=Array.isArray(k),j=Array.isArray(v),Je=A===j;return Je?A?w.arrayMerge(v,k,w):qe(v,k,w):i(k,w)}D.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(A,j){return D(A,j,w)},{})};var Ye=D;return se=Ye,se}var Ke=Qe();const et=Xe(Ke),tt=r=>r===null||typeof r!="object",ce=r=>{if(tt(r))return r;if(Array.isArray(r))return r.map(ce);const e=Object.entries(r).filter(([t,a])=>a!==void 0).map(([t,a])=>[t,ce(a)]);return Object.fromEntries(e)},rt=(r,e)=>{const t=ce(e);return et(r,t)},Le={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},base:{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)"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",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:"inherit",background:"var(--color-grey-100)",borderRadius:"var(--base-border-radius)",boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"var(--base-border-radius)",custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)",placeholderOpacity:"1"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},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)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:"var(--base-border-radius)",boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:"var(--base-border-radius)",borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:"calc(var(--base-border-radius) / 1.25)",hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:"calc(var(--base-border-radius) / 2)"},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:768,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--base-line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--base-line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:"var(--card-border-radius)"},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesToggle:{color:"var(--anchor-color)",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(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",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)"}},svgs:{predefinedQuestion:`
|
|
1
|
+
const Wt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Ft="2.6.2";function Xe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var se,we;function Qe(){if(we)return se;we=1;var r=function(k){return e(k)&&!t(k)};function e(v){return!!v&&typeof v=="object"}function t(v){var k=Object.prototype.toString.call(v);return k==="[object RegExp]"||k==="[object Date]"||o(v)}var a=typeof Symbol=="function"&&Symbol.for,n=a?Symbol.for("react.element"):60103;function o(v){return v.$$typeof===n}function s(v){return Array.isArray(v)?[]:{}}function i(v,k){return k.clone!==!1&&k.isMergeableObject(v)?D(s(v),v,k):v}function f(v,k,w){return v.concat(k).map(function(A){return i(A,w)})}function p(v,k){if(!k.customMerge)return D;var w=k.customMerge(v);return typeof w=="function"?w:D}function _(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(k){return Object.propertyIsEnumerable.call(v,k)}):[]}function E(v){return Object.keys(v).concat(_(v))}function J(v,k){try{return k in v}catch{return!1}}function Ge(v,k){return J(v,k)&&!(Object.hasOwnProperty.call(v,k)&&Object.propertyIsEnumerable.call(v,k))}function qe(v,k,w){var A={};return w.isMergeableObject(v)&&E(v).forEach(function(j){A[j]=i(v[j],w)}),E(k).forEach(function(j){Ge(v,j)||(J(v,j)&&w.isMergeableObject(k[j])?A[j]=p(j,w)(v[j],k[j],w):A[j]=i(k[j],w))}),A}function D(v,k,w){w=w||{},w.arrayMerge=w.arrayMerge||f,w.isMergeableObject=w.isMergeableObject||r,w.cloneUnlessOtherwiseSpecified=i;var A=Array.isArray(k),j=Array.isArray(v),Je=A===j;return Je?A?w.arrayMerge(v,k,w):qe(v,k,w):i(k,w)}D.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(A,j){return D(A,j,w)},{})};var Ye=D;return se=Ye,se}var Ke=Qe();const et=Xe(Ke),tt=r=>r===null||typeof r!="object",ce=r=>{if(tt(r))return r;if(Array.isArray(r))return r.map(ce);const e=Object.entries(r).filter(([t,a])=>a!==void 0).map(([t,a])=>[t,ce(a)]);return Object.fromEntries(e)},rt=(r,e)=>{const t=ce(e);return et(r,t)},Le={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},base:{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)"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",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:"inherit",background:"var(--color-grey-100)",borderRadius:"var(--base-border-radius)",boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"var(--base-border-radius)",custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)",placeholderOpacity:"1"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},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)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:"var(--base-border-radius)",boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:"var(--base-border-radius)",borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:"calc(var(--base-border-radius) / 1.25)",hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:"calc(var(--base-border-radius) / 2)"},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:768,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--base-line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--base-line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:"var(--card-border-radius)"},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesToggle:{color:"var(--anchor-color)",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(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",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)"}},svgs:{predefinedQuestion:`
|
|
2
2
|
<svg viewBox="0 0 24 24" >
|
|
3
3
|
<path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
4
4
|
<path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./NZTpNUN0.js";import{aC as Oe,ae as Me,aD as he,aj as ue,aE as ae,_ as ve,P as be,ax as Ne,a0 as me,aF as fe,aG as ge,h as Ae,al as we,ah as re,am as oe,v as pe,an as $,aq as Be,ar as De,as as He,at as ye,ao as Pe,au as Re,p as We,I as Z,aH as Fe,a as S,G as e,H as v,b as h,d as Ge,f as L,s as M,K,e as N,r as A,c as Ye,O as ne,t as Ue}from"./DC-s52-u.js";import{i as G,b as xe}from"./Buwjqn5O.js";import{e as Ve,i as $e,I as J,c as Ze,B as Ke,h as ie,b as Je,d as Qe,g as Xe,f as et,j as tt,s as at}from"./DMgZYjm1.js";import{p as _e,r as rt}from"./M-YrVFI7.js";import"./CINpBRIH.js";const se=0,Q=1,ce=2;function ke(X,b,z,C,D){$&&Pe();var p=X,Y=Oe(),ee=Ae,l=ue,d,w,n,m=Y?ve(void 0):be(void 0,!1,!1),U=Y?ve(void 0):be(void 0,!1,!1),H=!1;function j(r,f){H=!0,f&&(me(V),fe(V),ge(ee));try{r===se&&z&&(d?we(d):d=re(()=>z(p))),r===Q&&C&&(w?we(w):w=re(()=>C(p,m))),r!==se&&d&&oe(d,()=>d=null),r!==Q&&w&&oe(w,()=>w=null),r!==ce&&n&&oe(n,()=>n=null)}finally{f&&(ge(null),fe(null),me(null),pe())}}var V=Me(()=>{if(l===(l=b()))return;let r=$&&he(l)===(p.data===Be);if(r&&(p=De(),He(p),ye(!1),r=!0),he(l)){var f=l;H=!1,f.then(P=>{f===l&&(ae(m,P),j(Q,!0))},P=>{if(f===l)throw ae(U,P),j(ce,!0),U.v}),$?z&&(d=re(()=>z(p))):Ne(()=>{H||j(se,!0)})}else ae(m,l),j(Q,!1);return r&&ye(!0),()=>l=ue});$&&(p=Re)}const ot='@layer base,utilities,components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}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{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}: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}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{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,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer base{.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-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;--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);--last-bot-message-min-height: 0}}@value container-sm,container-md,container-lg from "./viewports.css";@layer base{.chat-app :where(h1,h2,h3,h4,h5,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){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)::-moz-placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::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:solid;outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.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:transparent}.chat-app ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0000004d;-webkit-transition:background-color .2s;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:rgba(0,0,0,.3) transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app *:hover::-webkit-scrollbar-thumb,.chat-app *:active::-webkit-scrollbar-thumb,.chat-app *:focus::-webkit-scrollbar-thumb{visibility:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;inset:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.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(.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){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.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);margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-container (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (min-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){display:block;margin-bottom:var(--spacer-r-24)}.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-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.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):first-child{margin-top:0}.chat-app :where(.text-container):last-child{margin-bottom:0}.chat-app :where(.text-container) :where(table){display:block;width:100%;overflow-x:auto;border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch}.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(.animated-height){transition:height .5s var(--ease-in-out-quart)}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.chat-app{display:contents}.chat-app__container{container-name:chat-container;container-type:inline-size;display:flex;align-items:flex-start;height:100%;overflow:hidden;transform:translateZ(0)}.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__main{display:flex;flex-direction:column;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y}.chat-app__loader-container{display:flex;z-index:var(--z-index-loader);position:relative;align-items:center;justify-content:center;width:100%;height:100%}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);position:sticky;top:0;background:var(--body-background)}.chat-app__header-content{--btn-padding-x: var(--btn-padding-y);display:flex;position:relative;-moz-column-gap:var(--spacer-r-12);column-gap:var(--spacer-r-12);flex-wrap:wrap;align-items:flex-end;justify-content:flex-end;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)}.chat-app__header-content>:where(*){z-index:0;position:relative;pointer-events:auto}.chat-app__header-content:after{position:absolute;right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);border-bottom:1px solid transparent;content:"";transition:border-color .1s ease-in-out}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__body{display:flex;position:relative;flex-grow:1;flex-direction:column;width:100%}.chat-app__page-transition{display:flex;flex-grow:1;flex-direction:column;width:100%;height:100%}.chat-app__aside{--duration-in: .65s;--duration-out: .5s;visibility:hidden;flex-grow:1;width:0;height:100%;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}.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-container{position:relative;width:var(--aside-width);height:100%;overflow-y:auto;overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}.chat-app__aside-header,.chat-app__sheet-header{display:flex;z-index:var(--z-index-header);position:sticky;top:0;flex-wrap:no-wrap;align-items:center;justify-content:space-between;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);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)}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);position:fixed;inset:0;background:var(--aside-background-overlay)}.chat-app__sheet-content{z-index:var(--z-index-flyout);position:fixed;top:0;right:0;width:100%;max-width:var(--aside-width);height:100%;overflow-y:auto;overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:transparent}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}}@layer components{.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;display:flex;flex-direction:row;align-items:flex-end;cursor:pointer}.open-button__text{display:flex;position:absolute;right:100%;bottom:50%;flex-direction:column;align-items:flex-start;justify-content:center;margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);padding-left:0;overflow:hidden;transform:translateY(50%);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);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;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)}.open-button:hover .open-button__text{transform:translateY(0);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)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);font-weight:700;white-space:pre}.open-button__mask{width:0;height:0;overflow:hidden;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease),height var(--open-button-duration) var(--open-button-ease)}.open-button:hover .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{position:relative;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}.open-button__avatar{z-index:var(--z-index-local-overlay);position:relative;width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);overflow:clip;border-radius:var(--spacer-r-80);filter:drop-shadow(0 0 8px rgba(0,0,0,.2));transition:transform .2s var(--open-button-ease)}.open-button:hover .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{display:none;position:absolute;right:0;width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color)}:where(.open-button--standalone){position:fixed;right:var(--spacer-r-16);bottom:var(--spacer-r-16)}@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}}}';var c=typeof window<"u"?window:{screen:{},navigator:{}},B=(c.matchMedia||function(){return{matches:!1}}).bind(c),nt={get passive(){return!0}},Ee=function(){};c.addEventListener&&c.addEventListener("p",Ee,nt);c.removeEventListener&&c.removeEventListener("p",Ee,!1);var le="ontouchstart"in c,it="TouchEvent"in c,st=le||it&&B("(any-pointer: coarse)").matches,ze=(c.navigator.maxTouchPoints||0)>0||st,Te=c.navigator.userAgent||"",ct=B("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Te)&&Math.min(c.screen.width||0,c.screen.height||0)>=768,qe=(B("(pointer: coarse)").matches||!B("(pointer: fine)").matches&&le)&&!/Windows.*Firefox/.test(Te),pt=B("(any-pointer: fine)").matches||B("(any-hover: hover)").matches||ct||!le,Ce=ze&&(pt||!qe)?"hybrid":ze?"touchOnly":"mouseOnly",lt=Ce==="mouseOnly"?"mouse":Ce==="touchOnly"||qe?"touch":"mouse",dt=L('<div class="open-button__title"><!></div>'),ht=L('<div class="open-button__mask"><div class="open-button__description"><!></div></div>'),ut=L('<div class="open-button__text"><!> <!></div>'),vt=L('<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"><!></div>',1),bt=L('<link rel="stylesheet"/>'),mt=L("<!> <!>",1),ft=L('<!> <!> <!> <main class="chat-app"><!></main>',1);function gt(X,b){We(b,!0);const z=(a,o)=>{let i=()=>o?.().chatConfig,y=()=>o?.().language;const t=v(()=>{const{openButtonTitle:g,openButtonDescription:s}=i().translations[y()];return{openButtonTitle:g,openButtonDescription:s}}),u=v(()=>i().fullTheme[e(C)].tokens.svgs);{let g=v(()=>["open-button",b.buttonClass]);Ke(a,{get href(){return i().buttonHref},get onclick(){return b.onclick},onmouseenter:j,onmouseleave:V,get style(){return b.buttonStyle},get className(){return e(g)},get isStandalone(){return e(d)},children:(s,R)=>{var x=vt(),_=S(x);{var E=q=>{var O=ut(),de=N(O);{var Ie=I=>{var k=dt(),F=N(k);ie(F,()=>e(t).openButtonTitle),A(k),h(I,k)};G(de,I=>{e(t).openButtonTitle&&I(Ie)})}var Se=M(de,2);{var Le=I=>{var k=ht(),F=N(k),je=N(F);ie(je,()=>e(t).openButtonDescription),A(F),xe(F,te=>ne(m,te),()=>e(m)),A(k),xe(k,te=>ne(n,te),()=>e(n)),h(I,k)};G(Se,I=>{e(t).openButtonDescription&<==="mouse"&&I(Le)})}A(O),h(q,O)};G(_,q=>{(e(t).openButtonTitle||e(t).openButtonDescription)&&q(E)})}var T=M(_,2),W=N(T);ie(W,()=>e(u).avatar),A(T),h(s,x)},$$slots:{default:!0}})}};let C=K("light"),D=_e(b,"host",7),p=_e(b,"onError",7),Y=rt(b,["$$slots","$$events","$$legacy","$$host","host","onError"]);const ee=async a=>{const i=await(await fetch(`${a}/chatconfig`)).json();return tt.parse(i)},l=async({forceTheme:a,lang:o,apiUrl:i})=>{const y=window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await ee(i),t=Je(y);let u;o?u=Qe(o,t.supportedLanguages):u=Xe(t.supportedLanguages);const g=Object.keys(t.fullTheme);return ne(C,et(g),!0),{chatConfig:t,language:u}};let d=v(()=>!!D()),w=K(!1),n=K(void 0),m=K(void 0),U=v(()=>e(m)?.offsetWidth??0),H=v(()=>e(m)?.offsetHeight??0);function j(){!e(m)||!e(n)||(e(n).style.width=`${e(U)}px`,e(n).style.height=`${e(H)}px`)}function V(){!e(w)&&e(n)&&(e(n).style.width="0",e(n).style.height="0")}let r=v(()=>l(Y).catch(a=>p()(a)));var f=Z();Fe(a=>{var o=Z(),i=S(o);{var y=t=>{var u=Z(),g=S(u);ke(g,()=>e(r),null,(s,R)=>{var x=mt();const _=v(()=>e(R).chatConfig.fullTheme[e(C)]);var E=S(x);Ve(E,17,()=>e(_).fontURLs??[],$e,(W,q)=>{var O=bt();Ue(()=>at(O,"href",e(q))),h(W,O)});var T=M(E,2);J(T,{id:"font-css",get css(){return e(_).fontCSS}}),h(s,x)}),h(t,u)};G(i,t=>{e(d)&&t(y)})}h(a,o)});var P=S(f);return ke(P,()=>e(r),a=>{},(a,o)=>{var i=Z();const y=v(()=>e(o).chatConfig.fullTheme[e(C)]);var t=S(i);{var u=s=>{var R=ft(),x=S(R);{let q=v(()=>Ze(e(y).tokens));J(x,{id:"theme-css",get css(){return e(q)}})}var _=M(x,2);J(_,{id:"app-css",get css(){return ot}});var E=M(_,2);J(E,{id:"custom-css",get css(){return e(y).customCSS}});var T=M(E,2),W=N(T);z(W,()=>e(o)),A(T),h(s,R)},g=s=>{z(s,()=>e(o))};G(t,s=>{e(d)?s(u):s(g,!1)})}h(a,i)}),h(X,f),Ge({get host(){return D()},set host(a){D(a),pe()},get onError(){return p()},set onError(a){p(a),pe()}})}Ye(gt,{host:{},onError:{}},[],[],!0);export{gt as O};
|
|
1
|
+
import"./NZTpNUN0.js";import{aC as Oe,ae as Me,aD as he,aj as ue,aE as ae,_ as ve,P as be,ax as Ne,a0 as me,aF as fe,aG as ge,h as Ae,al as we,ah as re,am as oe,v as pe,an as $,aq as Be,ar as De,as as He,at as ye,ao as Pe,au as Re,p as We,I as Z,aH as Fe,a as S,G as e,H as v,b as h,d as Ge,f as L,s as M,K,e as N,r as A,c as Ye,O as ne,t as Ue}from"./DC-s52-u.js";import{i as G,b as xe}from"./Buwjqn5O.js";import{e as Ve,i as $e,I as J,c as Ze,B as Ke,h as ie,b as Je,d as Qe,g as Xe,f as et,j as tt,s as at}from"./C99KO4nD.js";import{p as _e,r as rt}from"./M-YrVFI7.js";import"./BWlPVxXO.js";const se=0,Q=1,ce=2;function ke(X,b,z,C,D){$&&Pe();var p=X,Y=Oe(),ee=Ae,l=ue,d,w,n,m=Y?ve(void 0):be(void 0,!1,!1),U=Y?ve(void 0):be(void 0,!1,!1),H=!1;function j(r,f){H=!0,f&&(me(V),fe(V),ge(ee));try{r===se&&z&&(d?we(d):d=re(()=>z(p))),r===Q&&C&&(w?we(w):w=re(()=>C(p,m))),r!==se&&d&&oe(d,()=>d=null),r!==Q&&w&&oe(w,()=>w=null),r!==ce&&n&&oe(n,()=>n=null)}finally{f&&(ge(null),fe(null),me(null),pe())}}var V=Me(()=>{if(l===(l=b()))return;let r=$&&he(l)===(p.data===Be);if(r&&(p=De(),He(p),ye(!1),r=!0),he(l)){var f=l;H=!1,f.then(P=>{f===l&&(ae(m,P),j(Q,!0))},P=>{if(f===l)throw ae(U,P),j(ce,!0),U.v}),$?z&&(d=re(()=>z(p))):Ne(()=>{H||j(se,!0)})}else ae(m,l),j(Q,!1);return r&&ye(!0),()=>l=ue});$&&(p=Re)}const ot='@layer base,utilities,components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}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{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}: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}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{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,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer base{.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-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;--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);--last-bot-message-min-height: 0}}@value container-sm,container-md,container-lg from "./viewports.css";@layer base{.chat-app :where(h1,h2,h3,h4,h5,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){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)::-moz-placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::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:solid;outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.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:transparent}.chat-app ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0000004d;-webkit-transition:background-color .2s;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:rgba(0,0,0,.3) transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app *:hover::-webkit-scrollbar-thumb,.chat-app *:active::-webkit-scrollbar-thumb,.chat-app *:focus::-webkit-scrollbar-thumb{visibility:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;inset:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.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(.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){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.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);margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-container (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (min-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){display:block;margin-bottom:var(--spacer-r-24)}.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-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.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):first-child{margin-top:0}.chat-app :where(.text-container):last-child{margin-bottom:0}.chat-app :where(.text-container) :where(table){display:block;width:100%;overflow-x:auto;border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch}.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(.animated-height){transition:height .5s var(--ease-in-out-quart)}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.chat-app{display:contents}.chat-app__container{container-name:chat-container;container-type:inline-size;display:flex;align-items:flex-start;height:100%;overflow:hidden;transform:translateZ(0)}.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__main{display:flex;flex-direction:column;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y}.chat-app__loader-container{display:flex;z-index:var(--z-index-loader);position:relative;align-items:center;justify-content:center;width:100%;height:100%}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);position:sticky;top:0;background:var(--body-background)}.chat-app__header-content{--btn-padding-x: var(--btn-padding-y);display:flex;position:relative;-moz-column-gap:var(--spacer-r-12);column-gap:var(--spacer-r-12);flex-wrap:wrap;align-items:flex-end;justify-content:flex-end;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)}.chat-app__header-content>:where(*){z-index:0;position:relative;pointer-events:auto}.chat-app__header-content:after{position:absolute;right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);border-bottom:1px solid transparent;content:"";transition:border-color .1s ease-in-out}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__body{display:flex;position:relative;flex-grow:1;flex-direction:column;width:100%}.chat-app__page-transition{display:flex;flex-grow:1;flex-direction:column;width:100%;height:100%}.chat-app__aside{--duration-in: .65s;--duration-out: .5s;visibility:hidden;flex-grow:1;width:0;height:100%;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}.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-container{position:relative;width:var(--aside-width);height:100%;overflow-y:auto;overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}.chat-app__aside-header,.chat-app__sheet-header{display:flex;z-index:var(--z-index-header);position:sticky;top:0;flex-wrap:no-wrap;align-items:center;justify-content:space-between;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);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)}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);position:fixed;inset:0;background:var(--aside-background-overlay)}.chat-app__sheet-content{z-index:var(--z-index-flyout);position:fixed;top:0;right:0;width:100%;max-width:var(--aside-width);height:100%;overflow-y:auto;overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:transparent}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}}@layer components{.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;display:flex;flex-direction:row;align-items:flex-end;cursor:pointer}.open-button__text{display:flex;position:absolute;right:100%;bottom:50%;flex-direction:column;align-items:flex-start;justify-content:center;margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);padding-left:0;overflow:hidden;transform:translateY(50%);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);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;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)}.open-button:hover .open-button__text{transform:translateY(0);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)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);font-weight:700;white-space:pre}.open-button__mask{width:0;height:0;overflow:hidden;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease),height var(--open-button-duration) var(--open-button-ease)}.open-button:hover .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{position:relative;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}.open-button__avatar{z-index:var(--z-index-local-overlay);position:relative;width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);overflow:clip;border-radius:var(--spacer-r-80);filter:drop-shadow(0 0 8px rgba(0,0,0,.2));transition:transform .2s var(--open-button-ease)}.open-button:hover .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{display:none;position:absolute;right:0;width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color)}:where(.open-button--standalone){position:fixed;right:var(--spacer-r-16);bottom:var(--spacer-r-16)}@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}}}';var c=typeof window<"u"?window:{screen:{},navigator:{}},B=(c.matchMedia||function(){return{matches:!1}}).bind(c),nt={get passive(){return!0}},Ee=function(){};c.addEventListener&&c.addEventListener("p",Ee,nt);c.removeEventListener&&c.removeEventListener("p",Ee,!1);var le="ontouchstart"in c,it="TouchEvent"in c,st=le||it&&B("(any-pointer: coarse)").matches,ze=(c.navigator.maxTouchPoints||0)>0||st,Te=c.navigator.userAgent||"",ct=B("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Te)&&Math.min(c.screen.width||0,c.screen.height||0)>=768,qe=(B("(pointer: coarse)").matches||!B("(pointer: fine)").matches&&le)&&!/Windows.*Firefox/.test(Te),pt=B("(any-pointer: fine)").matches||B("(any-hover: hover)").matches||ct||!le,Ce=ze&&(pt||!qe)?"hybrid":ze?"touchOnly":"mouseOnly",lt=Ce==="mouseOnly"?"mouse":Ce==="touchOnly"||qe?"touch":"mouse",dt=L('<div class="open-button__title"><!></div>'),ht=L('<div class="open-button__mask"><div class="open-button__description"><!></div></div>'),ut=L('<div class="open-button__text"><!> <!></div>'),vt=L('<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"><!></div>',1),bt=L('<link rel="stylesheet"/>'),mt=L("<!> <!>",1),ft=L('<!> <!> <!> <main class="chat-app"><!></main>',1);function gt(X,b){We(b,!0);const z=(a,o)=>{let i=()=>o?.().chatConfig,y=()=>o?.().language;const t=v(()=>{const{openButtonTitle:g,openButtonDescription:s}=i().translations[y()];return{openButtonTitle:g,openButtonDescription:s}}),u=v(()=>i().fullTheme[e(C)].tokens.svgs);{let g=v(()=>["open-button",b.buttonClass]);Ke(a,{get href(){return i().buttonHref},get onclick(){return b.onclick},onmouseenter:j,onmouseleave:V,get style(){return b.buttonStyle},get className(){return e(g)},get isStandalone(){return e(d)},children:(s,R)=>{var x=vt(),_=S(x);{var E=q=>{var O=ut(),de=N(O);{var Ie=I=>{var k=dt(),F=N(k);ie(F,()=>e(t).openButtonTitle),A(k),h(I,k)};G(de,I=>{e(t).openButtonTitle&&I(Ie)})}var Se=M(de,2);{var Le=I=>{var k=ht(),F=N(k),je=N(F);ie(je,()=>e(t).openButtonDescription),A(F),xe(F,te=>ne(m,te),()=>e(m)),A(k),xe(k,te=>ne(n,te),()=>e(n)),h(I,k)};G(Se,I=>{e(t).openButtonDescription&<==="mouse"&&I(Le)})}A(O),h(q,O)};G(_,q=>{(e(t).openButtonTitle||e(t).openButtonDescription)&&q(E)})}var T=M(_,2),W=N(T);ie(W,()=>e(u).avatar),A(T),h(s,x)},$$slots:{default:!0}})}};let C=K("light"),D=_e(b,"host",7),p=_e(b,"onError",7),Y=rt(b,["$$slots","$$events","$$legacy","$$host","host","onError"]);const ee=async a=>{const i=await(await fetch(`${a}/chatconfig`)).json();return tt.parse(i)},l=async({forceTheme:a,lang:o,apiUrl:i})=>{const y=window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await ee(i),t=Je(y);let u;o?u=Qe(o,t.supportedLanguages):u=Xe(t.supportedLanguages);const g=Object.keys(t.fullTheme);return ne(C,et(g),!0),{chatConfig:t,language:u}};let d=v(()=>!!D()),w=K(!1),n=K(void 0),m=K(void 0),U=v(()=>e(m)?.offsetWidth??0),H=v(()=>e(m)?.offsetHeight??0);function j(){!e(m)||!e(n)||(e(n).style.width=`${e(U)}px`,e(n).style.height=`${e(H)}px`)}function V(){!e(w)&&e(n)&&(e(n).style.width="0",e(n).style.height="0")}let r=v(()=>l(Y).catch(a=>p()(a)));var f=Z();Fe(a=>{var o=Z(),i=S(o);{var y=t=>{var u=Z(),g=S(u);ke(g,()=>e(r),null,(s,R)=>{var x=mt();const _=v(()=>e(R).chatConfig.fullTheme[e(C)]);var E=S(x);Ve(E,17,()=>e(_).fontURLs??[],$e,(W,q)=>{var O=bt();Ue(()=>at(O,"href",e(q))),h(W,O)});var T=M(E,2);J(T,{id:"font-css",get css(){return e(_).fontCSS}}),h(s,x)}),h(t,u)};G(i,t=>{e(d)&&t(y)})}h(a,o)});var P=S(f);return ke(P,()=>e(r),a=>{},(a,o)=>{var i=Z();const y=v(()=>e(o).chatConfig.fullTheme[e(C)]);var t=S(i);{var u=s=>{var R=ft(),x=S(R);{let q=v(()=>Ze(e(y).tokens));J(x,{id:"theme-css",get css(){return e(q)}})}var _=M(x,2);J(_,{id:"app-css",get css(){return ot}});var E=M(_,2);J(E,{id:"custom-css",get css(){return e(y).customCSS}});var T=M(E,2),W=N(T);z(W,()=>e(o)),A(T),h(s,R)},g=s=>{z(s,()=>e(o))};G(t,s=>{e(d)?s(u):s(g,!1)})}h(a,i)}),h(X,f),Ge({get host(){return D()},set host(a){D(a),pe()},get onError(){return p()},set onError(a){p(a),pe()}})}Ye(gt,{host:{},onError:{}},[],[],!0);export{gt as O};
|