@fleek-platform/agents-ui
Version:
The Fleek Platform Agents UI provides a simple interface for deploying, monitoring, and configuring your agents––making management straightforward
53 lines • 138 kB
JavaScript
import{M as nt,T as Oe,R as j,C as I,a as fe,O as K,b as re,E as q,c as lo}from"./index-DnKc5Nw5.js";import{n as co,o as uo,g as ho}from"./index-BRPOmvLY.js";/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const rt=window,_n=rt.ShadowRoot&&(rt.ShadyCSS===void 0||rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,En=Symbol(),Nn=new WeakMap;let Mr=class{constructor(e,n,o){if(this._$cssResult$=!0,o!==En)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(_n&&e===void 0){const o=n!==void 0&&n.length===1;o&&(e=Nn.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Nn.set(n,e))}return e}toString(){return this.cssText}};const fo=t=>new Mr(typeof t=="string"?t:t+"",void 0,En),B=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((o,r,i)=>o+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1],t[0]);return new Mr(n,t,En)},mo=(t,e)=>{_n?t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):e.forEach(n=>{const o=document.createElement("style"),r=rt.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=n.cssText,t.appendChild(o)})},Bn=_n?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const o of e.cssRules)n+=o.cssText;return fo(n)})(t):t;/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/var xt;const ot=window,Wn=ot.trustedTypes,go=Wn?Wn.emptyScript:"",kn=ot.reactiveElementPolyfillSupport,nn={toAttribute(t,e){switch(e){case Boolean:t=t?go:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},Rr=(t,e)=>e!==t&&(e==e||t==t),$t={attribute:!0,type:String,converter:nn,reflect:!1,hasChanged:Rr},rn="finalized";let Ce=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var n;this.finalize(),((n=this.h)!==null&&n!==void 0?n:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((n,o)=>{const r=this._$Ep(o,n);r!==void 0&&(this._$Ev.set(r,o),e.push(r))}),e}static createProperty(e,n=$t){if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(e,n),!n.noAccessor&&!this.prototype.hasOwnProperty(e)){const o=typeof e=="symbol"?Symbol():"__"+e,r=this.getPropertyDescriptor(e,o,n);r!==void 0&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,n,o){return{get(){return this[n]},set(r){const i=this[e];this[n]=r,this.requestUpdate(e,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||$t}static finalize(){if(this.hasOwnProperty(rn))return!1;this[rn]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const n=this.properties,o=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(const r of o)this.createProperty(r,n[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const r of o)n.unshift(Bn(r))}else e!==void 0&&n.push(Bn(e));return n}static _$Ep(e,n){const o=n.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(n=>n(this))}addController(e){var n,o;((n=this._$ES)!==null&&n!==void 0?n:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)===null||o===void 0||o.call(e))}removeController(e){var n;(n=this._$ES)===null||n===void 0||n.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,n)=>{this.hasOwnProperty(n)&&(this._$Ei.set(n,this[n]),delete this[n])})}createRenderRoot(){var e;const n=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return mo(n,this.constructor.elementStyles),n}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var o;return(o=n.hostConnected)===null||o===void 0?void 0:o.call(n)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var o;return(o=n.hostDisconnected)===null||o===void 0?void 0:o.call(n)})}attributeChangedCallback(e,n,o){this._$AK(e,o)}_$EO(e,n,o=$t){var r;const i=this.constructor._$Ep(e,o);if(i!==void 0&&o.reflect===!0){const s=(((r=o.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?o.converter:nn).toAttribute(n,o.type);this._$El=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$El=null}}_$AK(e,n){var o;const r=this.constructor,i=r._$Ev.get(e);if(i!==void 0&&this._$El!==i){const s=r.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((o=s.converter)===null||o===void 0?void 0:o.fromAttribute)!==void 0?s.converter:nn;this._$El=i,this[i]=a.fromAttribute(n,s.type),this._$El=null}}requestUpdate(e,n,o){let r=!0;e!==void 0&&(((o=o||this.constructor.getPropertyOptions(e)).hasChanged||Rr)(this[e],n)?(this._$AL.has(e)||this._$AL.set(e,n),o.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,o))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,i)=>this[i]=r),this._$Ei=void 0);let n=!1;const o=this._$AL;try{n=this.shouldUpdate(o),n?(this.willUpdate(o),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostUpdate)===null||i===void 0?void 0:i.call(r)}),this.update(o)):this._$Ek()}catch(r){throw n=!1,this._$Ek(),r}n&&this._$AE(o)}willUpdate(e){}_$AE(e){var n;(n=this._$ES)===null||n===void 0||n.forEach(o=>{var r;return(r=o.hostUpdated)===null||r===void 0?void 0:r.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((n,o)=>this._$EO(o,this[o],n)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Ce[rn]=!0,Ce.elementProperties=new Map,Ce.elementStyles=[],Ce.shadowRootOptions={mode:"open"},kn==null||kn({ReactiveElement:Ce}),((xt=ot.reactiveElementVersions)!==null&&xt!==void 0?xt:ot.reactiveElementVersions=[]).push("1.6.3");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/var Ct;const it=window,Ie=it.trustedTypes,Un=Ie?Ie.createPolicy("lit-html",{createHTML:t=>t}):void 0,on="$lit$",ne=`lit$${(Math.random()+"").slice(9)}$`,Sr="?"+ne,po=`<${Sr}>`,me=document,je=()=>me.createComment(""),He=t=>t===null||typeof t!="object"&&typeof t!="function",Dr=Array.isArray,wo=t=>Dr(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",_t=`[
\f\r]`,Be=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,jn=/-->/g,Hn=/>/g,de=RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),zn=/'/g,qn=/"/g,Lr=/^(?:script|style|textarea|title)$/i,Nr=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),f=Nr(1),U=Nr(2),ge=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),Fn=new WeakMap,ue=me.createTreeWalker(me,129,null,!1);function Br(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Un!==void 0?Un.createHTML(e):e}const vo=(t,e)=>{const n=t.length-1,o=[];let r,i=e===2?"<svg>":"",s=Be;for(let a=0;a<n;a++){const l=t[a];let c,h,w=-1,d=0;for(;d<l.length&&(s.lastIndex=d,h=s.exec(l),h!==null);)d=s.lastIndex,s===Be?h[1]==="!--"?s=jn:h[1]!==void 0?s=Hn:h[2]!==void 0?(Lr.test(h[2])&&(r=RegExp("</"+h[2],"g")),s=de):h[3]!==void 0&&(s=de):s===de?h[0]===">"?(s=r??Be,w=-1):h[1]===void 0?w=-2:(w=s.lastIndex-h[2].length,c=h[1],s=h[3]===void 0?de:h[3]==='"'?qn:zn):s===qn||s===zn?s=de:s===jn||s===Hn?s=Be:(s=de,r=void 0);const u=s===de&&t[a+1].startsWith("/>")?" ":"";i+=s===Be?l+po:w>=0?(o.push(c),l.slice(0,w)+on+l.slice(w)+ne+u):l+ne+(w===-2?(o.push(void 0),a):u)}return[Br(t,i+(t[n]||"<?>")+(e===2?"</svg>":"")),o]};class ze{constructor({strings:e,_$litType$:n},o){let r;this.parts=[];let i=0,s=0;const a=e.length-1,l=this.parts,[c,h]=vo(e,n);if(this.el=ze.createElement(c,o),ue.currentNode=this.el.content,n===2){const w=this.el.content,d=w.firstChild;d.remove(),w.append(...d.childNodes)}for(;(r=ue.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes()){const w=[];for(const d of r.getAttributeNames())if(d.endsWith(on)||d.startsWith(ne)){const u=h[s++];if(w.push(d),u!==void 0){const b=r.getAttribute(u.toLowerCase()+on).split(ne),p=/([.?@])?(.*)/.exec(u);l.push({type:1,index:i,name:p[2],strings:b,ctor:p[1]==="."?yo:p[1]==="?"?$o:p[1]==="@"?Co:mt})}else l.push({type:6,index:i})}for(const d of w)r.removeAttribute(d)}if(Lr.test(r.tagName)){const w=r.textContent.split(ne),d=w.length-1;if(d>0){r.textContent=Ie?Ie.emptyScript:"";for(let u=0;u<d;u++)r.append(w[u],je()),ue.nextNode(),l.push({type:2,index:++i});r.append(w[d],je())}}}else if(r.nodeType===8)if(r.data===Sr)l.push({type:2,index:i});else{let w=-1;for(;(w=r.data.indexOf(ne,w+1))!==-1;)l.push({type:7,index:i}),w+=ne.length-1}i++}}static createElement(e,n){const o=me.createElement("template");return o.innerHTML=e,o}}function Pe(t,e,n=t,o){var r,i,s,a;if(e===ge)return e;let l=o!==void 0?(r=n._$Co)===null||r===void 0?void 0:r[o]:n._$Cl;const c=He(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((i=l==null?void 0:l._$AO)===null||i===void 0||i.call(l,!1),c===void 0?l=void 0:(l=new c(t),l._$AT(t,n,o)),o!==void 0?((s=(a=n)._$Co)!==null&&s!==void 0?s:a._$Co=[])[o]=l:n._$Cl=l),l!==void 0&&(e=Pe(t,l._$AS(t,e.values),l,o)),e}class bo{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var n;const{el:{content:o},parts:r}=this._$AD,i=((n=e==null?void 0:e.creationScope)!==null&&n!==void 0?n:me).importNode(o,!0);ue.currentNode=i;let s=ue.nextNode(),a=0,l=0,c=r[0];for(;c!==void 0;){if(a===c.index){let h;c.type===2?h=new Ye(s,s.nextSibling,this,e):c.type===1?h=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(h=new _o(s,this,e)),this._$AV.push(h),c=r[++l]}a!==(c==null?void 0:c.index)&&(s=ue.nextNode(),a++)}return ue.currentNode=me,i}v(e){let n=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,n),n+=o.strings.length-2):o._$AI(e[n])),n++}}class Ye{constructor(e,n,o,r){var i;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=o,this.options=r,this._$Cp=(i=r==null?void 0:r.isConnected)===null||i===void 0||i}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Pe(this,e,n),He(e)?e===H||e==null||e===""?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==ge&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):wo(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==H&&He(this._$AH)?this._$AA.nextSibling.data=e:this.$(me.createTextNode(e)),this._$AH=e}g(e){var n;const{values:o,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=ze.createElement(Br(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===i)this._$AH.v(o);else{const s=new bo(i,this),a=s.u(this.options);s.v(o),this.$(a),this._$AH=s}}_$AC(e){let n=Fn.get(e.strings);return n===void 0&&Fn.set(e.strings,n=new ze(e)),n}T(e){Dr(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let o,r=0;for(const i of e)r===n.length?n.push(o=new Ye(this.k(je()),this.k(je()),this,this.options)):o=n[r],o._$AI(i),r++;r<n.length&&(this._$AR(o&&o._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var o;for((o=this._$AP)===null||o===void 0||o.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this._$Cp=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class mt{constructor(e,n,o,r,i){this.type=1,this._$AH=H,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,o,r){const i=this.strings;let s=!1;if(i===void 0)e=Pe(this,e,n,0),s=!He(e)||e!==this._$AH&&e!==ge,s&&(this._$AH=e);else{const a=e;let l,c;for(e=i[0],l=0;l<i.length-1;l++)c=Pe(this,a[o+l],n,l),c===ge&&(c=this._$AH[l]),s||(s=!He(c)||c!==this._$AH[l]),c===H?e=H:e!==H&&(e+=(c??"")+i[l+1]),this._$AH[l]=c}s&&!r&&this.j(e)}j(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class yo extends mt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===H?void 0:e}}const xo=Ie?Ie.emptyScript:"";class $o extends mt{constructor(){super(...arguments),this.type=4}j(e){e&&e!==H?this.element.setAttribute(this.name,xo):this.element.removeAttribute(this.name)}}class Co extends mt{constructor(e,n,o,r,i){super(e,n,o,r,i),this.type=5}_$AI(e,n=this){var o;if((e=(o=Pe(this,e,n,0))!==null&&o!==void 0?o:H)===ge)return;const r=this._$AH,i=e===H&&r!==H||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==H&&(r===H||i);i&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,o;typeof this._$AH=="function"?this._$AH.call((o=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&o!==void 0?o:this.element,e):this._$AH.handleEvent(e)}}class _o{constructor(e,n,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){Pe(this,e)}}const Vn=it.litHtmlPolyfillSupport;Vn==null||Vn(ze,Ye),((Ct=it.litHtmlVersions)!==null&&Ct!==void 0?Ct:it.litHtmlVersions=[]).push("2.8.0");const Eo=(t,e,n)=>{var o,r;const i=(o=n==null?void 0:n.renderBefore)!==null&&o!==void 0?o:e;let s=i._$litPart$;if(s===void 0){const a=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:null;i._$litPart$=s=new Ye(e.insertBefore(je(),a),a,void 0,n??{})}return s._$AI(t),s};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/var Et,At;class S extends Ce{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,n;const o=super.createRenderRoot();return(e=(n=this.renderOptions).renderBefore)!==null&&e!==void 0||(n.renderBefore=o.firstChild),o}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Eo(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return ge}}S.finalized=!0,S._$litElement$=!0,(Et=globalThis.litElementHydrateSupport)===null||Et===void 0||Et.call(globalThis,{LitElement:S});const Zn=globalThis.litElementPolyfillSupport;Zn==null||Zn({LitElement:S});((At=globalThis.litElementVersions)!==null&&At!==void 0?At:globalThis.litElementVersions=[]).push("3.3.3");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const N=t=>e=>typeof e=="function"?((n,o)=>(customElements.define(n,o),o))(t,e):((n,o)=>{const{kind:r,elements:i}=o;return{kind:r,elements:i,finisher(s){customElements.define(n,s)}}})(t,e);/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Ao=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,t)}},Oo=(t,e,n)=>{e.constructor.createProperty(n,t)};function R(t){return(e,n)=>n!==void 0?Oo(t,e,n):Ao(t,e)}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function F(t){return R({...t,state:!0})}/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/var Ot;((Ot=window.HTMLSlotElement)===null||Ot===void 0?void 0:Ot.prototype.assignedElements)!=null;/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Io={ATTRIBUTE:1},Po=t=>(...e)=>({_$litDirective$:t,values:e});class To{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,o){this._$Ct=e,this._$AM=n,this._$Ci=o}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const X=Po(class extends To{constructor(t){var e;if(super(t),t.type!==Io.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var n,o;if(this.it===void 0){this.it=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(const i in e)e[i]&&!(!((n=this.nt)===null||n===void 0)&&n.has(i))&&this.it.add(i);return this.render(e)}const r=t.element.classList;this.it.forEach(i=>{i in e||(r.remove(i),this.it.delete(i))});for(const i in e){const s=!!e[i];s===this.it.has(i)||!((o=this.nt)===null||o===void 0)&&o.has(i)||(s?(r.add(i),this.it.add(i)):(r.remove(i),this.it.delete(i)))}return ge}});function Mo(t,e){t.indexOf(e)===-1&&t.push(e)}const Wr=(t,e,n)=>Math.min(Math.max(n,t),e),V={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},st=t=>typeof t=="number",Ee=t=>Array.isArray(t)&&!st(t[0]),Ro=(t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t};function So(t,e){return Ee(t)?t[Ro(0,t.length,e)]:t}const kr=(t,e,n)=>-n*t+n*e+t,Ur=()=>{},oe=t=>t,An=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function jr(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=An(0,e,o);t.push(kr(n,1,r))}}function Do(t){const e=[0];return jr(e,t-1),e}function Lo(t,e=Do(t.length),n=oe){const o=t.length,r=o-e.length;return r>0&&jr(e,r),i=>{let s=0;for(;s<o-2&&!(i<e[s+1]);s++);let a=Wr(0,1,An(e[s],e[s+1],i));return a=So(n,s)(a),kr(t[s],t[s+1],a)}}const Hr=t=>Array.isArray(t)&&st(t[0]),sn=t=>typeof t=="object"&&!!t.createAnimation,Te=t=>typeof t=="function",No=t=>typeof t=="string",Ue={ms:t=>t*1e3,s:t=>t/1e3},zr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Bo=1e-7,Wo=12;function ko(t,e,n,o,r){let i,s,a=0;do s=e+(n-e)/2,i=zr(s,o,r)-t,i>0?n=s:e=s;while(Math.abs(i)>Bo&&++a<Wo);return s}function ke(t,e,n,o){if(t===e&&n===o)return oe;const r=i=>ko(i,0,1,t,n);return i=>i===0||i===1?i:zr(r(i),e,o)}const Uo=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const o=n*t,r=e==="end"?Math.floor(o):Math.ceil(o);return Wr(0,1,r/t)},jo={ease:ke(.25,.1,.25,1),"ease-in":ke(.42,0,1,1),"ease-in-out":ke(.42,0,.58,1),"ease-out":ke(0,0,.58,1)},Ho=/\((.*?)\)/;function Kn(t){if(Te(t))return t;if(Hr(t))return ke(...t);const e=jo[t];if(e)return e;if(t.startsWith("steps")){const n=Ho.exec(t);if(n){const o=n[1].split(",");return Uo(parseFloat(o[0]),o[1].trim())}}return oe}class qr{constructor(e,n=[0,1],{easing:o,duration:r=V.duration,delay:i=V.delay,endDelay:s=V.endDelay,repeat:a=V.repeat,offset:l,direction:c="normal",autoplay:h=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=oe,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((d,u)=>{this.resolve=d,this.reject=u}),o=o||V.easing,sn(o)){const d=o.createAnimation(n);o=d.easing,n=d.keyframes||n,r=d.duration||r}this.repeat=a,this.easing=Ee(o)?oe:Kn(o),this.updateDuration(r);const w=Lo(n,l,Ee(o)?o.map(Kn):oe);this.tick=d=>{var u;i=i;let b=0;this.pauseTime!==void 0?b=this.pauseTime:b=(d-this.startTime)*this.rate,this.t=b,b/=1e3,b=Math.max(b-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(b=this.totalDuration);const p=b/this.duration;let D=Math.floor(p),g=p%1;!g&&p>=1&&(g=1),g===1&&D--;const E=D%2;(c==="reverse"||c==="alternate"&&E||c==="alternate-reverse"&&!E)&&(g=1-g);const y=b>=this.totalDuration?1:Math.min(g,1),$=w(this.easing(y));e($),this.pauseTime===void 0&&(this.playState==="finished"||b>=this.totalDuration+s)?(this.playState="finished",(u=this.resolve)===null||u===void 0||u.call(this,$)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},h&&this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class zo{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const It=new WeakMap;function Fr(t){return It.has(t)||It.set(t,{transforms:[],values:new Map}),It.get(t)}function qo(t,e){return t.has(e)||t.set(e,new zo),t.get(e)}const Fo=["","X","Y","Z"],Vo=["translate","scale","rotate","skew"],at={x:"translateX",y:"translateY",z:"translateZ"},Yn={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},Zo={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Yn,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:oe},skew:Yn},qe=new Map,On=t=>`--motion-${t}`,lt=["x","y","z"];Vo.forEach(t=>{Fo.forEach(e=>{lt.push(t+e),qe.set(On(t+e),Zo[t])})});const Ko=(t,e)=>lt.indexOf(t)-lt.indexOf(e),Yo=new Set(lt),Vr=t=>Yo.has(t),Go=(t,e)=>{at[e]&&(e=at[e]);const{transforms:n}=Fr(t);Mo(n,e),t.style.transform=Qo(n)},Qo=t=>t.sort(Ko).reduce(Jo,"").trim(),Jo=(t,e)=>`${t} ${e}(var(${On(e)}))`,an=t=>t.startsWith("--"),Gn=new Set;function Xo(t){if(!Gn.has(t)){Gn.add(t);try{const{syntax:e,initialValue:n}=qe.has(t)?qe.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch{}}}const Pt=(t,e)=>document.createElement("div").animate(t,e),Qn={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Pt({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Pt({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Pt({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Tt={},_e={};for(const t in Qn)_e[t]=()=>(Tt[t]===void 0&&(Tt[t]=Qn[t]()),Tt[t]);const ei=.015,ti=(t,e)=>{let n="";const o=Math.round(e/ei);for(let r=0;r<o;r++)n+=t(An(0,o-1,r))+", ";return n.substring(0,n.length-2)},Jn=(t,e)=>Te(t)?_e.linearEasing()?`linear(${ti(t,e)})`:V.easing:Hr(t)?ni(t):t,ni=([t,e,n,o])=>`cubic-bezier(${t}, ${e}, ${n}, ${o})`;function ri(t,e){for(let n=0;n<t.length;n++)t[n]===null&&(t[n]=n?t[n-1]:e());return t}const oi=t=>Array.isArray(t)?t:[t];function ln(t){return at[t]&&(t=at[t]),Vr(t)?On(t):t}const et={get:(t,e)=>{e=ln(e);let n=an(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!==0){const o=qe.get(e);o&&(n=o.initialValue)}return n},set:(t,e,n)=>{e=ln(e),an(e)?t.style.setProperty(e,n):t.style[e]=n}};function Zr(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function ii(t,e){var n;let o=(e==null?void 0:e.toDefaultUnit)||oe;const r=t[t.length-1];if(No(r)){const i=((n=r.match(/(-?[\d.]+)([a-z%]*)/))===null||n===void 0?void 0:n[2])||"";i&&(o=s=>s+i)}return o}function si(){return window.__MOTION_DEV_TOOLS_RECORD}function ai(t,e,n,o={},r){const i=si(),s=o.record!==!1&&i;let a,{duration:l=V.duration,delay:c=V.delay,endDelay:h=V.endDelay,repeat:w=V.repeat,easing:d=V.easing,persist:u=!1,direction:b,offset:p,allowWebkitAcceleration:D=!1,autoplay:g=!0}=o;const E=Fr(t),y=Vr(e);let $=_e.waapi();y&&Go(t,e);const W=ln(e),x=qo(E.values,W),_=qe.get(W);return Zr(x.animation,!(sn(d)&&x.generator)&&o.record!==!1),()=>{const A=()=>{var v,O;return(O=(v=et.get(t,W))!==null&&v!==void 0?v:_==null?void 0:_.initialValue)!==null&&O!==void 0?O:0};let m=ri(oi(n),A);const P=ii(m,_);if(sn(d)){const v=d.createAnimation(m,e!=="opacity",A,W,x);d=v.easing,m=v.keyframes||m,l=v.duration||l}if(an(W)&&(_e.cssRegisterProperty()?Xo(W):$=!1),y&&!_e.linearEasing()&&(Te(d)||Ee(d)&&d.some(Te))&&($=!1),$){_&&(m=m.map(C=>st(C)?_.toDefaultUnit(C):C)),m.length===1&&(!_e.partialKeyframes()||s)&&m.unshift(A());const v={delay:Ue.ms(c),duration:Ue.ms(l),endDelay:Ue.ms(h),easing:Ee(d)?void 0:Jn(d,l),direction:b,iterations:w+1,fill:"both"};a=t.animate({[W]:m,offset:p,easing:Ee(d)?d.map(C=>Jn(C,l)):void 0},v),a.finished||(a.finished=new Promise((C,M)=>{a.onfinish=C,a.oncancel=M}));const O=m[m.length-1];a.finished.then(()=>{u||(et.set(t,W,O),a.cancel())}).catch(Ur),D||(a.playbackRate=1.000001)}else if(r&&y)m=m.map(v=>typeof v=="string"?parseFloat(v):v),m.length===1&&m.unshift(parseFloat(A())),a=new r(v=>{et.set(t,W,P?P(v):v)},m,Object.assign(Object.assign({},o),{duration:l,easing:d}));else{const v=m[m.length-1];et.set(t,W,_&&st(v)?_.toDefaultUnit(v):v)}return s&&i(t,e,m,{duration:l,delay:c,easing:d,repeat:w,offset:p},"motion-one"),x.setAnimation(a),a&&!g&&a.pause(),a}}const li=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function ci(t,e){return typeof t=="string"?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const di=t=>t(),Kr=(t,e,n=V.duration)=>new Proxy({animations:t.map(di).filter(Boolean),duration:n,options:e},hi),ui=t=>t.animations[0],hi={get:(t,e)=>{const n=ui(t);switch(e){case"duration":return t.duration;case"currentTime":return Ue.s((n==null?void 0:n[e])||0);case"playbackRate":case"playState":return n==null?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(fi)).catch(Ur)),t.finished;case"stop":return()=>{t.animations.forEach(o=>Zr(o))};case"forEachNative":return o=>{t.animations.forEach(r=>o(r,t))};default:return typeof(n==null?void 0:n[e])>"u"?void 0:()=>t.animations.forEach(o=>o[e]())}},set:(t,e,n)=>{switch(e){case"currentTime":n=Ue.ms(n);case"playbackRate":for(let o=0;o<t.animations.length;o++)t.animations[o][e]=n;return!0}return!1}},fi=t=>t.finished;function mi(t,e,n){return Te(t)?t(e,n):t}function gi(t){return function(n,o,r={}){n=ci(n);const i=n.length,s=[];for(let a=0;a<i;a++){const l=n[a];for(const c in o){const h=li(r,c);h.delay=mi(h.delay,a,i);const w=ai(l,c,o[c],h,t);s.push(w)}}return Kr(s,r,r.duration)}}const pi=gi(qr);function wi(t,e={}){return Kr([()=>{const n=new qr(t,[0,1],e);return n.finished.catch(()=>{}),n}],e,e.duration)}function he(t,e,n){return(Te(t)?wi:pi)(t,e,n)}/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const z=t=>t??H;var $e={},Mt,Xn;function vi(){return Xn||(Xn=1,Mt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Mt}var Rt={},te={},er;function be(){if(er)return te;er=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return te.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},te.getSymbolTotalCodewords=function(o){return e[o]},te.getBCHDigit=function(n){let o=0;for(;n!==0;)o++,n>>>=1;return o},te.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');t=o},te.isKanjiModeEnabled=function(){return typeof t<"u"},te.toSJIS=function(o){return t(o)},te}var St={},tr;function In(){return tr||(tr=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,r){if(t.isValid(o))return o;try{return e(o)}catch{return r}}}(St)),St}var Dt,nr;function bi(){if(nr)return Dt;nr=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let o=0;o<n;o++)this.putBit((e>>>n-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Dt=t,Dt}var Lt,rr;function yi(){if(rr)return Lt;rr=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,o,r){const i=e*this.size+n;this.data[i]=o,r&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,o){this.data[e*this.size+n]^=o},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},Lt=t,Lt}var Nt={},or;function xi(){return or||(or=1,function(t){const e=be().getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const r=Math.floor(o/7)+2,i=e(o),s=i===145?26:Math.ceil((i-13)/(2*r-2))*2,a=[i-7];for(let l=1;l<r-1;l++)a[l]=a[l-1]-s;return a.push(6),a.reverse()},t.getPositions=function(o){const r=[],i=t.getRowColCoords(o),s=i.length;for(let a=0;a<s;a++)for(let l=0;l<s;l++)a===0&&l===0||a===0&&l===s-1||a===s-1&&l===0||r.push([i[a],i[l]]);return r}}(Nt)),Nt}var Bt={},ir;function $i(){if(ir)return Bt;ir=1;const t=be().getSymbolSize,e=7;return Bt.getPositions=function(o){const r=t(o);return[[0,0],[r-e,0],[0,r-e]]},Bt}var Wt={},sr;function Ci(){return sr||(sr=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(r){const i=r.size;let s=0,a=0,l=0,c=null,h=null;for(let w=0;w<i;w++){a=l=0,c=h=null;for(let d=0;d<i;d++){let u=r.get(w,d);u===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=u,a=1),u=r.get(d,w),u===h?l++:(l>=5&&(s+=e.N1+(l-5)),h=u,l=1)}a>=5&&(s+=e.N1+(a-5)),l>=5&&(s+=e.N1+(l-5))}return s},t.getPenaltyN2=function(r){const i=r.size;let s=0;for(let a=0;a<i-1;a++)for(let l=0;l<i-1;l++){const c=r.get(a,l)+r.get(a,l+1)+r.get(a+1,l)+r.get(a+1,l+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(r){const i=r.size;let s=0,a=0,l=0;for(let c=0;c<i;c++){a=l=0;for(let h=0;h<i;h++)a=a<<1&2047|r.get(c,h),h>=10&&(a===1488||a===93)&&s++,l=l<<1&2047|r.get(h,c),h>=10&&(l===1488||l===93)&&s++}return s*e.N3},t.getPenaltyN4=function(r){let i=0;const s=r.data.length;for(let l=0;l<s;l++)i+=r.data[l];return Math.abs(Math.ceil(i*100/s/5)-10)*e.N4};function n(o,r,i){switch(o){case t.Patterns.PATTERN000:return(r+i)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return i%3===0;case t.Patterns.PATTERN011:return(r+i)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(i/3))%2===0;case t.Patterns.PATTERN101:return r*i%2+r*i%3===0;case t.Patterns.PATTERN110:return(r*i%2+r*i%3)%2===0;case t.Patterns.PATTERN111:return(r*i%3+(r+i)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}t.applyMask=function(r,i){const s=i.size;for(let a=0;a<s;a++)for(let l=0;l<s;l++)i.isReserved(l,a)||i.xor(l,a,n(r,l,a))},t.getBestMask=function(r,i){const s=Object.keys(t.Patterns).length;let a=0,l=1/0;for(let c=0;c<s;c++){i(c),t.applyMask(c,r);const h=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(c,r),h<l&&(l=h,a=c)}return a}}(Wt)),Wt}var tt={},ar;function Yr(){if(ar)return tt;ar=1;const t=In(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return tt.getBlocksCount=function(r,i){switch(i){case t.L:return e[(r-1)*4+0];case t.M:return e[(r-1)*4+1];case t.Q:return e[(r-1)*4+2];case t.H:return e[(r-1)*4+3];default:return}},tt.getTotalCodewordsCount=function(r,i){switch(i){case t.L:return n[(r-1)*4+0];case t.M:return n[(r-1)*4+1];case t.Q:return n[(r-1)*4+2];case t.H:return n[(r-1)*4+3];default:return}},tt}var kt={},We={},lr;function _i(){if(lr)return We;lr=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let o=1;for(let r=0;r<255;r++)t[r]=o,e[o]=r,o<<=1,o&256&&(o^=285);for(let r=255;r<512;r++)t[r]=t[r-255]}(),We.log=function(o){if(o<1)throw new Error("log("+o+")");return e[o]},We.exp=function(o){return t[o]},We.mul=function(o,r){return o===0||r===0?0:t[e[o]+e[r]]},We}var cr;function Ei(){return cr||(cr=1,function(t){const e=_i();t.mul=function(o,r){const i=new Uint8Array(o.length+r.length-1);for(let s=0;s<o.length;s++)for(let a=0;a<r.length;a++)i[s+a]^=e.mul(o[s],r[a]);return i},t.mod=function(o,r){let i=new Uint8Array(o);for(;i.length-r.length>=0;){const s=i[0];for(let l=0;l<r.length;l++)i[l]^=e.mul(r[l],s);let a=0;for(;a<i.length&&i[a]===0;)a++;i=i.slice(a)}return i},t.generateECPolynomial=function(o){let r=new Uint8Array([1]);for(let i=0;i<o;i++)r=t.mul(r,new Uint8Array([1,e.exp(i)]));return r}}(kt)),kt}var Ut,dr;function Ai(){if(dr)return Ut;dr=1;const t=Ei();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(o){this.degree=o,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(o.length+this.degree);r.set(o);const i=t.mod(r,this.genPoly),s=this.degree-i.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(i,s),a}return i},Ut=e,Ut}var jt={},Ht={},zt={},ur;function Gr(){return ur||(ur=1,zt.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),zt}var Z={},hr;function Qr(){if(hr)return Z;hr=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
]))+`;Z.KANJI=new RegExp(n,"g"),Z.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Z.BYTE=new RegExp(o,"g"),Z.NUMERIC=new RegExp(t,"g"),Z.ALPHANUMERIC=new RegExp(e,"g");const r=new RegExp("^"+n+"$"),i=new RegExp("^"+t+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Z.testKanji=function(l){return r.test(l)},Z.testNumeric=function(l){return i.test(l)},Z.testAlphanumeric=function(l){return s.test(l)},Z}var fr;function ye(){return fr||(fr=1,function(t){const e=Gr(),n=Qr();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},t.getBestModeForData=function(i){return n.testNumeric(i)?t.NUMERIC:n.testAlphanumeric(i)?t.ALPHANUMERIC:n.testKanji(i)?t.KANJI:t.BYTE},t.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},t.isValid=function(i){return i&&i.bit&&i.ccBits};function o(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+r)}}t.from=function(i,s){if(t.isValid(i))return i;try{return o(i)}catch{return s}}}(Ht)),Ht}var mr;function Oi(){return mr||(mr=1,function(t){const e=be(),n=Yr(),o=In(),r=ye(),i=Gr(),s=7973,a=e.getBCHDigit(s);function l(d,u,b){for(let p=1;p<=40;p++)if(u<=t.getCapacity(p,b,d))return p}function c(d,u){return r.getCharCountIndicator(d,u)+4}function h(d,u){let b=0;return d.forEach(function(p){const D=c(p.mode,u);b+=D+p.getBitsLength()}),b}function w(d,u){for(let b=1;b<=40;b++)if(h(d,b)<=t.getCapacity(b,u,r.MIXED))return b}t.from=function(u,b){return i.isValid(u)?parseInt(u,10):b},t.getCapacity=function(u,b,p){if(!i.isValid(u))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=r.BYTE);const D=e.getSymbolTotalCodewords(u),g=n.getTotalCodewordsCount(u,b),E=(D-g)*8;if(p===r.MIXED)return E;const y=E-c(p,u);switch(p){case r.NUMERIC:return Math.floor(y/10*3);case r.ALPHANUMERIC:return Math.floor(y/11*2);case r.KANJI:return Math.floor(y/13);case r.BYTE:default:return Math.floor(y/8)}},t.getBestVersionForData=function(u,b){let p;const D=o.from(b,o.M);if(Array.isArray(u)){if(u.length>1)return w(u,D);if(u.length===0)return 1;p=u[0]}else p=u;return l(p.mode,p.getLength(),D)},t.getEncodedBits=function(u){if(!i.isValid(u)||u<7)throw new Error("Invalid QR Code version");let b=u<<12;for(;e.getBCHDigit(b)-a>=0;)b^=s<<e.getBCHDigit(b)-a;return u<<12|b}}(jt)),jt}var qt={},gr;function Ii(){if(gr)return qt;gr=1;const t=be(),e=1335,n=21522,o=t.getBCHDigit(e);return qt.getEncodedBits=function(i,s){const a=i.bit<<3|s;let l=a<<10;for(;t.getBCHDigit(l)-o>=0;)l^=e<<t.getBCHDigit(l)-o;return(a<<10|l)^n},qt}var Ft={},Vt,pr;function Pi(){if(pr)return Vt;pr=1;const t=ye();function e(n){this.mode=t.NUMERIC,this.data=n.toString()}return e.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(o){let r,i,s;for(r=0;r+3<=this.data.length;r+=3)i=this.data.substr(r,3),s=parseInt(i,10),o.put(s,10);const a=this.data.length-r;a>0&&(i=this.data.substr(r),s=parseInt(i,10),o.put(s,a*3+1))},Vt=e,Vt}var Zt,wr;function Ti(){if(wr)return Zt;wr=1;const t=ye(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(o){this.mode=t.ALPHANUMERIC,this.data=o}return n.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let i;for(i=0;i+2<=this.data.length;i+=2){let s=e.indexOf(this.data[i])*45;s+=e.indexOf(this.data[i+1]),r.put(s,11)}this.data.length%2&&r.put(e.indexOf(this.data[i]),6)},Zt=n,Zt}var Kt,vr;function Mi(){if(vr)return Kt;vr=1;const t=co(),e=ye();function n(o){this.mode=e.BYTE,typeof o=="string"&&(o=t(o)),this.data=new Uint8Array(o)}return n.getBitsLength=function(r){return r*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){for(let r=0,i=this.data.length;r<i;r++)o.put(this.data[r],8)},Kt=n,Kt}var Yt,br;function Ri(){if(br)return Yt;br=1;const t=ye(),e=be();function n(o){this.mode=t.KANJI,this.data=o}return n.getBitsLength=function(r){return r*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let r;for(r=0;r<this.data.length;r++){let i=e.toSJIS(this.data[r]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+`
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},Yt=n,Yt}var yr;function Si(){return yr||(yr=1,function(t){const e=ye(),n=Pi(),o=Ti(),r=Mi(),i=Ri(),s=Qr(),a=be(),l=uo();function c(g){return unescape(encodeURIComponent(g)).length}function h(g,E,y){const $=[];let W;for(;(W=g.exec(y))!==null;)$.push({data:W[0],index:W.index,mode:E,length:W[0].length});return $}function w(g){const E=h(s.NUMERIC,e.NUMERIC,g),y=h(s.ALPHANUMERIC,e.ALPHANUMERIC,g);let $,W;return a.isKanjiModeEnabled()?($=h(s.BYTE,e.BYTE,g),W=h(s.KANJI,e.KANJI,g)):($=h(s.BYTE_KANJI,e.BYTE,g),W=[]),E.concat(y,$,W).sort(function(_,A){return _.index-A.index}).map(function(_){return{data:_.data,mode:_.mode,length:_.length}})}function d(g,E){switch(E){case e.NUMERIC:return n.getBitsLength(g);case e.ALPHANUMERIC:return o.getBitsLength(g);case e.KANJI:return i.getBitsLength(g);case e.BYTE:return r.getBitsLength(g)}}function u(g){return g.reduce(function(E,y){const $=E.length-1>=0?E[E.length-1]:null;return $&&$.mode===y.mode?(E[E.length-1].data+=y.data,E):(E.push(y),E)},[])}function b(g){const E=[];for(let y=0;y<g.length;y++){const $=g[y];switch($.mode){case e.NUMERIC:E.push([$,{data:$.data,mode:e.ALPHANUMERIC,length:$.length},{data:$.data,mode:e.BYTE,length:$.length}]);break;case e.ALPHANUMERIC:E.push([$,{data:$.data,mode:e.BYTE,length:$.length}]);break;case e.KANJI:E.push([$,{data:$.data,mode:e.BYTE,length:c($.data)}]);break;case e.BYTE:E.push([{data:$.data,mode:e.BYTE,length:c($.data)}])}}return E}function p(g,E){const y={},$={start:{}};let W=["start"];for(let x=0;x<g.length;x++){const _=g[x],A=[];for(let m=0;m<_.length;m++){const P=_[m],v=""+x+m;A.push(v),y[v]={node:P,lastCount:0},$[v]={};for(let O=0;O<W.length;O++){const C=W[O];y[C]&&y[C].node.mode===P.mode?($[C][v]=d(y[C].lastCount+P.length,P.mode)-d(y[C].lastCount,P.mode),y[C].lastCount+=P.length):(y[C]&&(y[C].lastCount=P.length),$[C][v]=d(P.length,P.mode)+4+e.getCharCountIndicator(P.mode,E))}}W=A}for(let x=0;x<W.length;x++)$[W[x]].end=0;return{map:$,table:y}}function D(g,E){let y;const $=e.getBestModeForData(g);if(y=e.from(E,$),y!==e.BYTE&&y.bit<$.bit)throw new Error('"'+g+'" cannot be encoded with mode '+e.toString(y)+`.
Suggested mode is: `+e.toString($));switch(y===e.KANJI&&!a.isKanjiModeEnabled()&&(y=e.BYTE),y){case e.NUMERIC:return new n(g);case e.ALPHANUMERIC:return new o(g);case e.KANJI:return new i(g);case e.BYTE:return new r(g)}}t.fromArray=function(E){return E.reduce(function(y,$){return typeof $=="string"?y.push(D($,null)):$.data&&y.push(D($.data,$.mode)),y},[])},t.fromString=function(E,y){const $=w(E,a.isKanjiModeEnabled()),W=b($),x=p(W,y),_=l.find_path(x.map,"start","end"),A=[];for(let m=1;m<_.length-1;m++)A.push(x.table[_[m]].node);return t.fromArray(u(A))},t.rawSplit=function(E){return t.fromArray(w(E,a.isKanjiModeEnabled()))}}(Ft)),Ft}var xr;function Di(){if(xr)return Rt;xr=1;const t=be(),e=In(),n=bi(),o=yi(),r=xi(),i=$i(),s=Ci(),a=Yr(),l=Ai(),c=Oi(),h=Ii(),w=ye(),d=Si();function u(x,_){const A=x.size,m=i.getPositions(_);for(let P=0;P<m.length;P++){const v=m[P][0],O=m[P][1];for(let C=-1;C<=7;C++)if(!(v+C<=-1||A<=v+C))for(let M=-1;M<=7;M++)O+M<=-1||A<=O+M||(C>=0&&C<=6&&(M===0||M===6)||M>=0&&M<=6&&(C===0||C===6)||C>=2&&C<=4&&M>=2&&M<=4?x.set(v+C,O+M,!0,!0):x.set(v+C,O+M,!1,!0))}}function b(x){const _=x.size;for(let A=8;A<_-8;A++){const m=A%2===0;x.set(A,6,m,!0),x.set(6,A,m,!0)}}function p(x,_){const A=r.getPositions(_);for(let m=0;m<A.length;m++){const P=A[m][0],v=A[m][1];for(let O=-2;O<=2;O++)for(let C=-2;C<=2;C++)O===-2||O===2||C===-2||C===2||O===0&&C===0?x.set(P+O,v+C,!0,!0):x.set(P+O,v+C,!1,!0)}}function D(x,_){const A=x.size,m=c.getEncodedBits(_);let P,v,O;for(let C=0;C<18;C++)P=Math.floor(C/3),v=C%3+A-8-3,O=(m>>C&1)===1,x.set(P,v,O,!0),x.set(v,P,O,!0)}function g(x,_,A){const m=x.size,P=h.getEncodedBits(_,A);let v,O;for(v=0;v<15;v++)O=(P>>v&1)===1,v<6?x.set(v,8,O,!0):v<8?x.set(v+1,8,O,!0):x.set(m-15+v,8,O,!0),v<8?x.set(8,m-v-1,O,!0):v<9?x.set(8,15-v-1+1,O,!0):x.set(8,15-v-1,O,!0);x.set(m-8,8,1,!0)}function E(x,_){const A=x.size;let m=-1,P=A-1,v=7,O=0;for(let C=A-1;C>0;C-=2)for(C===6&&C--;;){for(let M=0;M<2;M++)if(!x.isReserved(P,C-M)){let ee=!1;O<_.length&&(ee=(_[O]>>>v&1)===1),x.set(P,C-M,ee),v--,v===-1&&(O++,v=7)}if(P+=m,P<0||A<=P){P-=m,m=-m;break}}}function y(x,_,A){const m=new n;A.forEach(function(M){m.put(M.mode.bit,4),m.put(M.getLength(),w.getCharCountIndicator(M.mode,x)),M.write(m)});const P=t.getSymbolTotalCodewords(x),v=a.getTotalCodewordsCount(x,_),O=(P-v)*8;for(m.getLengthInBits()+4<=O&&m.put(0,4);m.getLengthInBits()%8!==0;)m.putBit(0);const C=(O-m.getLengthInBits())/8;for(let M=0;M<C;M++)m.put(M%2?17:236,8);return $(m,x,_)}function $(x,_,A){const m=t.getSymbolTotalCodewords(_),P=a.getTotalCodewordsCount(_,A),v=m-P,O=a.getBlocksCount(_,A),C=m%O,M=O-C,ee=Math.floor(m/O),Ne=Math.floor(v/O),io=Ne+1,Sn=ee-Ne,so=new l(Sn);let wt=0;const Xe=new Array(O),Dn=new Array(O);let vt=0;const ao=new Uint8Array(x.buffer);for(let xe=0;xe<O;xe++){const yt=xe<M?Ne:io;Xe[xe]=ao.slice(wt,wt+yt),Dn[xe]=so.encode(Xe[xe]),wt+=yt,vt=Math.max(vt,yt)}const bt=new Uint8Array(m);let Ln=0,G,Q;for(G=0;G<vt;G++)for(Q=0;Q<O;Q++)G<Xe[Q].length&&(bt[Ln++]=Xe[Q][G]);for(G=0;G<Sn;G++)for(Q=0;Q<O;Q++)bt[Ln++]=Dn[Q][G];return bt}function W(x,_,A,m){let P;if(Array.isArray(x))P=d.fromArray(x);else if(typeof x=="string"){let ee=_;if(!ee){const Ne=d.rawSplit(x);ee=c.getBestVersionForData(Ne,A)}P=d.fromString(x,ee||40)}else throw new Error("Invalid data");const v=c.getBestVersionForData(P,A);if(!v)throw new Error("The amount of data is too big to be stored in a QR Code");if(!_)_=v;else if(_<v)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+v+`.
`);const O=y(_,A,P),C=t.getSymbolSize(_),M=new o(C);return u(M,_),b(M),p(M,_),g(M,A,0),_>=7&&D(M,_),E(M,O),isNaN(m)&&(m=s.getBestMask(M,g.bind(null,M,A))),s.applyMask(m,M),g(M,A,m),{modules:M,version:_,errorCorrectionLevel:A,maskPattern:m,segments:P}}return Rt.create=function(_,A){if(typeof _>"u"||_==="")throw new Error("No input text");let m=e.M,P,v;return typeof A<"u"&&(m=e.from(A.errorCorrectionLevel,e.M),P=c.from(A.version),v=s.from(A.maskPattern),A.toSJISFunc&&t.setToSJISFunction(A.toSJISFunc)),W(_,P,m,v)},Rt}var Gt={},Qt={},$r;function Jr(){return $r||($r=1,function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let o=n.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+n);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const r=parseInt(o.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+o.slice(0,6).join("")}}t.getOptions=function(o){o||(o={}),o.color||(o.color={});const r=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:i,scale:i?4:s,margin:r,color:{dark:e(o.color.dark||"#000000ff"),light:e(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},t.getScale=function(o,r){return r.width&&r.width>=o+r.margin*2?r.width/(o+r.margin*2):r.scale},t.getImageWidth=function(o,r){const i=t.getScale(o,r);return Math.floor((o+r.margin*2)*i)},t.qrToImageData=function(o,r,i){const s=r.modules.size