const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sdInterface-DNz2eSv3.js","assets/ExpertModeTutorials-CzEc8FrW.js","assets/ExpertModeTutorials-Djj15vdU.css","assets/warning-CcNw31-v.js","assets/sdInterface-nlhZuKLO.css","assets/ProfileEdit-864Sp6I7.js","assets/ProfileEdit-C7l9muDZ.css"])))=>i.map(i=>d[i]);
var A6=Object.defineProperty;var E6=(t,e,n)=>e in t?A6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Xn=(t,e,n)=>E6(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();/**
* @vue/shared v3.5.0
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function a0(t,e){const n=new Set(t.split(","));return r=>n.has(r)}const gt={},Bs=[],nr=()=>{},$6=()=>!1,ua=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),m1=t=>t.startsWith("onUpdate:"),Ot=Object.assign,v1=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},T6=Object.prototype.hasOwnProperty,bt=(t,e)=>T6.call(t,e),Ne=Array.isArray,Fs=t=>eo(t)==="[object Map]",Zi=t=>eo(t)==="[object Set]",ef=t=>eo(t)==="[object Date]",P6=t=>eo(t)==="[object RegExp]",qe=t=>typeof t=="function",Mt=t=>typeof t=="string",Cr=t=>typeof t=="symbol",Et=t=>t!==null&&typeof t=="object",_1=t=>(Et(t)||qe(t))&&qe(t.then)&&qe(t.catch),Hg=Object.prototype.toString,eo=t=>Hg.call(t),D6=t=>eo(t).slice(8,-1),l0=t=>eo(t)==="[object Object]",b1=t=>Mt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Is=a0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),c0=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},B6=/-(\w)/g,En=c0(t=>t.replace(B6,(e,n)=>n?n.toUpperCase():"")),F6=/\B([A-Z])/g,Dn=c0(t=>t.replace(F6,"-$1").toLowerCase()),u0=c0(t=>t.charAt(0).toUpperCase()+t.slice(1)),dl=c0(t=>t?`on${u0(t)}`:""),An=(t,e)=>!Object.is(t,e),Rs=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},Vg=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},Tl=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Pl=t=>{const e=Mt(t)?Number(t):NaN;return isNaN(e)?t:e};let tf;const Gg=()=>tf||(tf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),I6="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",R6=a0(I6);function xn(t){if(Ne(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],i=Mt(r)?N6(r):xn(r);if(i)for(const s in i)e[s]=i[s]}return e}else if(Mt(t)||Et(t))return t}const O6=/;(?![^(]*\))/g,M6=/:([^]+)/,L6=/\/\*[^]*?\*\//g;function N6(t){const e={};return t.replace(L6,"").split(O6).forEach(n=>{if(n){const r=n.split(M6);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function ze(t){let e="";if(Mt(t))e=t;else if(Ne(t))for(let n=0;n<t.length;n++){const r=ze(t[n]);r&&(e+=r+" ")}else if(Et(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function kr(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Mt(e)&&(t.class=ze(e)),n&&(t.style=xn(n)),t}const U6="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",z6=a0(U6);function Wg(t){return!!t||t===""}function j6(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=ai(t[r],e[r]);return n}function ai(t,e){if(t===e)return!0;let n=ef(t),r=ef(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Cr(t),r=Cr(e),n||r)return t===e;if(n=Ne(t),r=Ne(e),n||r)return n&&r?j6(t,e):!1;if(n=Et(t),r=Et(e),n||r){if(!n||!r)return!1;const i=Object.keys(t).length,s=Object.keys(e).length;if(i!==s)return!1;for(const o in t){const a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!ai(t[o],e[o]))return!1}}return String(t)===String(e)}function d0(t,e){return t.findIndex(n=>ai(n,e))}const qg=t=>!!(t&&t.__v_isRef===!0),ve=t=>Mt(t)?t:t==null?"":Ne(t)||Et(t)&&(t.toString===Hg||!qe(t.toString))?qg(t)?ve(t.value):JSON.stringify(t,Kg,2):String(t),Kg=(t,e)=>qg(e)?Kg(t,e.value):Fs(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,i],s)=>(n[Hc(r,s)+" =>"]=i,n),{})}:Zi(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Hc(n))}:Cr(e)?Hc(e):Et(e)&&!Ne(e)&&!l0(e)?String(e):e,Hc=(t,e="")=>{var n;return Cr(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
* @vue/reactivity v3.5.0
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Sn;class Zg{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Sn,!e&&Sn&&(this.index=(Sn.scopes||(Sn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=Sn;try{return Sn=this,e()}finally{Sn=n}}}on(){Sn=this}off(){Sn=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function Yg(t){return new Zg(t)}function x1(){return Sn}function Xg(t,e=!1){Sn&&Sn.cleanups.push(t)}let It;const Vc=new WeakSet;class Dl{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,Sn&&Sn.active&&Sn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Vc.has(this)&&(Vc.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||(this.flags|=8,this.nextEffect=Ro,Ro=this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,nf(this),Jg(this);const e=It,n=rr;It=this,rr=!0;try{return this.fn()}finally{e3(this),It=e,rr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)C1(e);this.deps=this.depsTail=void 0,nf(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Vc.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){hd(this)&&this.run()}get dirty(){return hd(this)}}let Qg=0,Ro;function y1(){Qg++}function w1(){if(--Qg>0)return;let t;for(;Ro;){let e=Ro;for(Ro=void 0;e;){const n=e.nextEffect;if(e.nextEffect=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function Jg(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function e3(t){let e,n=t.depsTail;for(let r=n;r;r=r.prevDep)r.version===-1?(r===n&&(n=r.prevDep),C1(r),H6(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0;t.deps=e,t.depsTail=n}function hd(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&t3(e.dep.computed)===!1||e.dep.version!==e.version)return!0;return!!t._dirty}function t3(t){if(t.flags&2)return!1;if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Wo))return;t.globalVersion=Wo;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&!hd(t)){t.flags&=-3;return}const n=It,r=rr;It=t,rr=!0;try{Jg(t);const i=t.fn();(e.version===0||An(i,t._value))&&(t._value=i,e.version++)}catch(i){throw e.version++,i}finally{It=n,rr=r,e3(t),t.flags&=-3}}function C1(t){const{dep:e,prevSub:n,nextSub:r}=t;if(n&&(n.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=n,t.nextSub=void 0),e.subs===t&&(e.subs=n),!e.subs&&e.computed){e.computed.flags&=-5;for(let i=e.computed.deps;i;i=i.nextDep)C1(i)}}function H6(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function Yj(t,e){t.effect instanceof Dl&&(t=t.effect.fn);const n=new Dl(t);e&&Ot(n,e);try{n.run()}catch(i){throw n.stop(),i}const r=n.run.bind(n);return r.effect=n,r}function Xj(t){t.effect.stop()}let rr=!0;const n3=[];function vi(){n3.push(rr),rr=!1}function _i(){const t=n3.pop();rr=t===void 0?!0:t}function nf(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=It;It=void 0;try{e()}finally{It=n}}}let Wo=0;class f0{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0}track(e){if(!It||!rr)return;let n=this.activeLink;if(n===void 0||n.sub!==It)n=this.activeLink={dep:this,sub:It,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},It.deps?(n.prevDep=It.depsTail,It.depsTail.nextDep=n,It.depsTail=n):It.deps=It.depsTail=n,It.flags&4&&r3(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=It.depsTail,n.nextDep=void 0,It.depsTail.nextDep=n,It.depsTail=n,It.deps===n&&(It.deps=r)}return n}trigger(e){this.version++,Wo++,this.notify(e)}notify(e){y1();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{w1()}}}function r3(t){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)r3(r)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}const Bl=new WeakMap,Mi=Symbol(""),pd=Symbol(""),qo=Symbol("");function yn(t,e,n){if(rr&&It){let r=Bl.get(t);r||Bl.set(t,r=new Map);let i=r.get(n);i||r.set(n,i=new f0),i.track()}}function Nr(t,e,n,r,i,s){const o=Bl.get(t);if(!o){Wo++;return}let a=[];if(e==="clear")a=[...o.values()];else{const l=Ne(t),c=l&&b1(n);if(l&&n==="length"){const u=Number(r);o.forEach((h,p)=>{(p==="length"||p===qo||!Cr(p)&&p>=u)&&a.push(h)})}else{const u=h=>h&&a.push(h);switch(n!==void 0&&u(o.get(n)),c&&u(o.get(qo)),e){case"add":l?c&&u(o.get("length")):(u(o.get(Mi)),Fs(t)&&u(o.get(pd)));break;case"delete":l||(u(o.get(Mi)),Fs(t)&&u(o.get(pd)));break;case"set":Fs(t)&&u(o.get(Mi));break}}}y1();for(const l of a)l.trigger();w1()}function V6(t,e){var n;return(n=Bl.get(t))==null?void 0:n.get(e)}function _s(t){const e=ft(t);return e===t?e:(yn(e,"iterate",qo),ir(t)?e:e.map(_n))}function h0(t){return yn(t=ft(t),"iterate",qo),t}const G6={__proto__:null,[Symbol.iterator](){return Gc(this,Symbol.iterator,_n)},concat(...t){return _s(this).concat(...t.map(e=>_s(e)))},entries(){return Gc(this,"entries",t=>(t[1]=_n(t[1]),t))},every(t,e){return Dr(this,"every",t,e,void 0,arguments)},filter(t,e){return Dr(this,"filter",t,e,n=>n.map(_n),arguments)},find(t,e){return Dr(this,"find",t,e,_n,arguments)},findIndex(t,e){return Dr(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Dr(this,"findLast",t,e,_n,arguments)},findLastIndex(t,e){return Dr(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Dr(this,"forEach",t,e,void 0,arguments)},includes(...t){return Wc(this,"includes",t)},indexOf(...t){return Wc(this,"indexOf",t)},join(t){return _s(this).join(t)},lastIndexOf(...t){return Wc(this,"lastIndexOf",t)},map(t,e){return Dr(this,"map",t,e,void 0,arguments)},pop(){return bo(this,"pop")},push(...t){return bo(this,"push",t)},reduce(t,...e){return rf(this,"reduce",t,e)},reduceRight(t,...e){return rf(this,"reduceRight",t,e)},shift(){return bo(this,"shift")},some(t,e){return Dr(this,"some",t,e,void 0,arguments)},splice(...t){return bo(this,"splice",t)},toReversed(){return _s(this).toReversed()},toSorted(t){return _s(this).toSorted(t)},toSpliced(...t){return _s(this).toSpliced(...t)},unshift(...t){return bo(this,"unshift",t)},values(){return Gc(this,"values",_n)}};function Gc(t,e,n){const r=h0(t),i=r[e]();return r!==t&&!ir(t)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=n(s.value)),s}),i}const W6=Array.prototype;function Dr(t,e,n,r,i,s){const o=h0(t),a=o!==t&&!ir(t),l=o[e];if(l!==W6[e]){const h=l.apply(t,s);return a?_n(h):h}let c=n;o!==t&&(a?c=function(h,p){return n.call(this,_n(h),p,t)}:n.length>2&&(c=function(h,p){return n.call(this,h,p,t)}));const u=l.call(o,c,r);return a&&i?i(u):u}function rf(t,e,n,r){const i=h0(t);let s=n;return i!==t&&(ir(t)?n.length>3&&(s=function(o,a,l){return n.call(this,o,a,l,t)}):s=function(o,a,l){return n.call(this,o,_n(a),l,t)}),i[e](s,...r)}function Wc(t,e,n){const r=ft(t);yn(r,"iterate",qo);const i=r[e](...n);return(i===-1||i===!1)&&S1(n[0])?(n[0]=ft(n[0]),r[e](...n)):i}function bo(t,e,n=[]){vi(),y1();const r=ft(t)[e].apply(t,n);return w1(),_i(),r}const q6=a0("__proto__,__v_isRef,__isVue"),i3=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Cr));function K6(t){Cr(t)||(t=String(t));const e=ft(this);return yn(e,"has",t),e.hasOwnProperty(t)}class s3{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){const i=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(i?s?d3:u3:s?c3:l3).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const o=Ne(e);if(!i){let l;if(o&&(l=G6[n]))return l;if(n==="hasOwnProperty")return K6}const a=Reflect.get(e,n,Nt(e)?e:r);return(Cr(n)?i3.has(n):q6(n))||(i||yn(e,"get",n),s)?a:Nt(a)?o&&b1(n)?a:a.value:Et(a)?i?m0(a):Pt(a):a}}class o3 extends s3{constructor(e=!1){super(!1,e)}set(e,n,r,i){let s=e[n];if(!this._isShallow){const l=zi(s);if(!ir(r)&&!zi(r)&&(s=ft(s),r=ft(r)),!Ne(e)&&Nt(s)&&!Nt(r))return l?!1:(s.value=r,!0)}const o=Ne(e)&&b1(n)?Number(n)<e.length:bt(e,n),a=Reflect.set(e,n,r,Nt(e)?e:i);return e===ft(i)&&(o?An(r,s)&&Nr(e,"set",n,r):Nr(e,"add",n,r)),a}deleteProperty(e,n){const r=bt(e,n);e[n];const i=Reflect.deleteProperty(e,n);return i&&r&&Nr(e,"delete",n,void 0),i}has(e,n){const r=Reflect.has(e,n);return(!Cr(n)||!i3.has(n))&&yn(e,"has",n),r}ownKeys(e){return yn(e,"iterate",Ne(e)?"length":Mi),Reflect.ownKeys(e)}}class a3 extends s3{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const Z6=new o3,Y6=new a3,X6=new o3(!0),Q6=new a3(!0),k1=t=>t,p0=t=>Reflect.getPrototypeOf(t);function La(t,e,n=!1,r=!1){t=t.__v_raw;const i=ft(t),s=ft(e);n||(An(e,s)&&yn(i,"get",e),yn(i,"get",s));const{has:o}=p0(i),a=r?k1:n?A1:_n;if(o.call(i,e))return a(t.get(e));if(o.call(i,s))return a(t.get(s));t!==i&&t.get(e)}function Na(t,e=!1){const n=this.__v_raw,r=ft(n),i=ft(t);return e||(An(t,i)&&yn(r,"has",t),yn(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function Ua(t,e=!1){return t=t.__v_raw,!e&&yn(ft(t),"iterate",Mi),Reflect.get(t,"size",t)}function sf(t,e=!1){!e&&!ir(t)&&!zi(t)&&(t=ft(t));const n=ft(this);return p0(n).has.call(n,t)||(n.add(t),Nr(n,"add",t,t)),this}function of(t,e,n=!1){!n&&!ir(e)&&!zi(e)&&(e=ft(e));const r=ft(this),{has:i,get:s}=p0(r);let o=i.call(r,t);o||(t=ft(t),o=i.call(r,t));const a=s.call(r,t);return r.set(t,e),o?An(e,a)&&Nr(r,"set",t,e):Nr(r,"add",t,e),this}function af(t){const e=ft(this),{has:n,get:r}=p0(e);let i=n.call(e,t);i||(t=ft(t),i=n.call(e,t)),r&&r.call(e,t);const s=e.delete(t);return i&&Nr(e,"delete",t,void 0),s}function lf(){const t=ft(this),e=t.size!==0,n=t.clear();return e&&Nr(t,"clear",void 0,void 0),n}function za(t,e){return function(r,i){const s=this,o=s.__v_raw,a=ft(o),l=e?k1:t?A1:_n;return!t&&yn(a,"iterate",Mi),o.forEach((c,u)=>r.call(i,l(c),l(u),s))}}function ja(t,e,n){return function(...r){const i=this.__v_raw,s=ft(i),o=Fs(s),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=i[t](...r),u=n?k1:e?A1:_n;return!e&&yn(s,"iterate",l?pd:Mi),{next(){const{value:h,done:p}=c.next();return p?{value:h,done:p}:{value:a?[u(h[0]),u(h[1])]:u(h),done:p}},[Symbol.iterator](){return this}}}}function Kr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function J6(){const t={get(s){return La(this,s)},get size(){return Ua(this)},has:Na,add:sf,set:of,delete:af,clear:lf,forEach:za(!1,!1)},e={get(s){return La(this,s,!1,!0)},get size(){return Ua(this)},has:Na,add(s){return sf.call(this,s,!0)},set(s,o){return of.call(this,s,o,!0)},delete:af,clear:lf,forEach:za(!1,!0)},n={get(s){return La(this,s,!0)},get size(){return Ua(this,!0)},has(s){return Na.call(this,s,!0)},add:Kr("add"),set:Kr("set"),delete:Kr("delete"),clear:Kr("clear"),forEach:za(!0,!1)},r={get(s){return La(this,s,!0,!0)},get size(){return Ua(this,!0)},has(s){return Na.call(this,s,!0)},add:Kr("add"),set:Kr("set"),delete:Kr("delete"),clear:Kr("clear"),forEach:za(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=ja(s,!1,!1),n[s]=ja(s,!0,!1),e[s]=ja(s,!1,!0),r[s]=ja(s,!0,!0)}),[t,n,e,r]}const[em,tm,nm,rm]=J6();function g0(t,e){const n=e?t?rm:nm:t?tm:em;return(r,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?r:Reflect.get(bt(n,i)&&i in r?n:r,i,s)}const im={get:g0(!1,!1)},sm={get:g0(!1,!0)},om={get:g0(!0,!1)},am={get:g0(!0,!0)},l3=new WeakMap,c3=new WeakMap,u3=new WeakMap,d3=new WeakMap;function lm(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function cm(t){return t.__v_skip||!Object.isExtensible(t)?0:lm(D6(t))}function Pt(t){return zi(t)?t:v0(t,!1,Z6,im,l3)}function f3(t){return v0(t,!1,X6,sm,c3)}function m0(t){return v0(t,!0,Y6,om,u3)}function bs(t){return v0(t,!0,Q6,am,d3)}function v0(t,e,n,r,i){if(!Et(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=i.get(t);if(s)return s;const o=cm(t);if(o===0)return t;const a=new Proxy(t,o===2?r:n);return i.set(t,a),a}function yr(t){return zi(t)?yr(t.__v_raw):!!(t&&t.__v_isReactive)}function zi(t){return!!(t&&t.__v_isReadonly)}function ir(t){return!!(t&&t.__v_isShallow)}function S1(t){return t?!!t.__v_raw:!1}function ft(t){const e=t&&t.__v_raw;return e?ft(e):t}function Jt(t){return Object.isExtensible(t)&&Vg(t,"__v_skip",!0),t}const _n=t=>Et(t)?Pt(t):t,A1=t=>Et(t)?m0(t):t;function Nt(t){return t?t.__v_isRef===!0:!1}function re(t){return h3(t,!1)}function Yi(t){return h3(t,!0)}function h3(t,e){return Nt(t)?t:new um(t,e)}class um{constructor(e,n){this.dep=new f0,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:ft(e),this._value=n?e:_n(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,r=this.__v_isShallow||ir(e)||zi(e);e=r?e:ft(e),An(e,n)&&(this._rawValue=e,this._value=r?e:_n(e),this.dep.trigger())}}function p3(t){t.dep.trigger()}function de(t){return Nt(t)?t.value:t}function Qj(t){return qe(t)?t():de(t)}const dm={get:(t,e,n)=>de(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const i=t[e];return Nt(i)&&!Nt(n)?(i.value=n,!0):Reflect.set(t,e,n,r)}};function g3(t){return yr(t)?t:new Proxy(t,dm)}class fm{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new f0,{get:r,set:i}=e(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=i}get value(){return this._value=this._get()}set value(e){this._set(e)}}function m3(t){return new fm(t)}function v3(t){const e=Ne(t)?new Array(t.length):{};for(const n in t)e[n]=_3(t,n);return e}class hm{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return V6(ft(this._object),this._key)}}class pm{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function gm(t,e,n){return Nt(t)?t:qe(t)?new pm(t):Et(t)&&arguments.length>1?_3(t,e,n):re(t)}function _3(t,e,n){const r=t[e];return Nt(r)?r:new hm(t,e,n)}class mm{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new f0(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Wo-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){It!==this&&(this.flags|=16,this.dep.notify())}get value(){const e=this.dep.track();return t3(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function vm(t,e,n=!1){let r,i;return qe(t)?r=t:(r=t.get,i=t.set),new mm(r,i,n)}const Jj={GET:"get",HAS:"has",ITERATE:"iterate"},eH={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Ha={},Fl=new WeakMap;let ti;function tH(){return ti}function _m(t,e=!1,n=ti){if(n){let r=Fl.get(n);r||Fl.set(n,r=[]),r.push(t)}}function bm(t,e,n=gt){const{immediate:r,deep:i,once:s,scheduler:o,augmentJob:a,call:l}=n,c=b=>i?b:ir(b)||i===!1||i===0?Mr(b,1):Mr(b);let u,h,p,d,g=!1,v=!1;if(Nt(t)?(h=()=>t.value,g=ir(t)):yr(t)?(h=()=>c(t),g=!0):Ne(t)?(v=!0,g=t.some(b=>yr(b)||ir(b)),h=()=>t.map(b=>{if(Nt(b))return b.value;if(yr(b))return c(b);if(qe(b))return l?l(b,2):b()})):qe(t)?e?h=l?()=>l(t,2):t:h=()=>{if(p){vi();try{p()}finally{_i()}}const b=ti;ti=u;try{return l?l(t,3,[d]):t(d)}finally{ti=b}}:h=nr,e&&i){const b=h,w=i===!0?1/0:i;h=()=>Mr(b(),w)}const x=x1(),y=()=>{u.stop(),x&&v1(x.effects,u)};if(s)if(e){const b=e;e=(...w)=>{b(...w),y()}}else{const b=h;h=()=>{b(),y()}}let _=v?new Array(t.length).fill(Ha):Ha;const f=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(e){const w=u.run();if(i||g||(v?w.some((k,P)=>An(k,_[P])):An(w,_))){p&&p();const k=ti;ti=u;try{const P=[w,_===Ha?void 0:v&&_[0]===Ha?[]:_,d];l?l(e,3,P):e(...P),_=w}finally{ti=k}}}else u.run()};return a&&a(f),u=new Dl(h),u.scheduler=o?()=>o(f,!1):f,d=b=>_m(b,!1,u),p=u.onStop=()=>{const b=Fl.get(u);if(b){if(l)l(b,4);else for(const w of b)w();Fl.delete(u)}},e?r?f(!0):_=u.run():o?o(f.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function Mr(t,e=1/0,n){if(e<=0||!Et(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Nt(t))Mr(t.value,e,n);else if(Ne(t))for(let r=0;r<t.length;r++)Mr(t[r],e,n);else if(Zi(t)||Fs(t))t.forEach(r=>{Mr(r,e,n)});else if(l0(t)){for(const r in t)Mr(t[r],e,n);for(const r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Mr(t[r],e,n)}return t}/**
* @vue/runtime-core v3.5.0
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function nH(t,e){}const rH={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},xm={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function da(t,e,n,r){try{return r?t(...r):t()}catch(i){to(i,e,n)}}function ar(t,e,n,r){if(qe(t)){const i=da(t,e,n,r);return i&&_1(i)&&i.catch(s=>{to(s,e,n)}),i}if(Ne(t)){const i=[];for(let s=0;s<t.length;s++)i.push(ar(t[s],e,n,r));return i}}function to(t,e,n,r=!0){const i=e?e.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||gt;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](t,l,c)===!1)return}a=a.parent}if(s){vi(),da(s,null,10,[t,l,c]),_i();return}}ym(t,n,i,r,o)}function ym(t,e,n,r=!0,i=!1){if(i)throw t;console.error(t)}let Ko=!1,gd=!1;const Mn=[];let Fi=0;const Os=[];let ni=null,As=0;const b3=Promise.resolve();let E1=null;function li(t){const e=E1||b3;return t?e.then(this?t.bind(this):t):e}function wm(t){let e=Ko?Fi+1:0,n=Mn.length;for(;e<n;){const r=e+n>>>1,i=Mn[r],s=Zo(i);s<t||s===t&&i.flags&2?e=r+1:n=r}return e}function _0(t){if(!(t.flags&1)){const e=Zo(t),n=Mn[Mn.length-1];!n||!(t.flags&2)&&e>=Zo(n)?Mn.push(t):Mn.splice(wm(e),0,t),t.flags&4||(t.flags|=1),x3()}}function x3(){!Ko&&!gd&&(gd=!0,E1=b3.then(y3))}function md(t){Ne(t)?Os.push(...t):ni&&t.id===-1?ni.splice(As+1,0,t):t.flags&1||(Os.push(t),t.flags&4||(t.flags|=1)),x3()}function cf(t,e,n=Ko?Fi+1:0){for(;n<Mn.length;n++){const r=Mn[n];if(r&&r.flags&2){if(t&&r.id!==t.uid)continue;Mn.splice(n,1),n--,r(),r.flags&=-2}}}function Il(t){if(Os.length){const e=[...new Set(Os)].sort((n,r)=>Zo(n)-Zo(r));if(Os.length=0,ni){ni.push(...e);return}for(ni=e,As=0;As<ni.length;As++){const n=ni[As];n.flags&8||n(),n.flags&=-2}ni=null,As=0}}const Zo=t=>t.id==null?t.flags&2?-1:1/0:t.id;function y3(t){gd=!1,Ko=!0;try{for(Fi=0;Fi<Mn.length;Fi++){const e=Mn[Fi];e&&!(e.flags&8)&&(da(e,e.i,e.i?15:14),e.flags&=-2)}}finally{Fi=0,Mn.length=0,Il(),Ko=!1,E1=null,(Mn.length||Os.length)&&y3()}}let Es,Va=[];function w3(t,e){var n,r;Es=t,Es?(Es.enabled=!0,Va.forEach(({event:i,args:s})=>Es.emit(i,...s)),Va=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{w3(s,e)}),setTimeout(()=>{Es||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Va=[])},3e3)):Va=[]}let nn=null,b0=null;function Yo(t){const e=nn;return nn=t,b0=t&&t.type.__scopeId||null,e}function iH(t){b0=t}function sH(){b0=null}const oH=t=>mt;function mt(t,e=nn,n){if(!e||t._n)return t;const r=(...i)=>{r._d&&wf(-1);const s=Yo(e);let o;try{o=t(...i)}finally{Yo(s),r._d&&wf(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Fe(t,e){if(nn===null)return t;const n=_a(nn),r=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[s,o,a,l=gt]=e[i];s&&(qe(s)&&(s={mounted:s,updated:s}),s.deep&&Mr(o),r.push({dir:s,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return t}function _r(t,e,n,r){const i=t.dirs,s=e&&e.dirs;for(let o=0;o<i.length;o++){const a=i[o];s&&(a.oldValue=s[o].value);let l=a.dir[r];l&&(vi(),ar(l,n,8,[t.el,a,t,e]),_i())}}const C3=Symbol("_vte"),k3=t=>t.__isTeleport,Oo=t=>t&&(t.disabled||t.disabled===""),Cm=t=>t&&(t.defer||t.defer===""),uf=t=>typeof SVGElement<"u"&&t instanceof SVGElement,df=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,vd=(t,e)=>{const n=t&&t.to;return Mt(n)?e?e(n):null:n},km={name:"Teleport",__isTeleport:!0,process(t,e,n,r,i,s,o,a,l,c){const{mc:u,pc:h,pbc:p,o:{insert:d,querySelector:g,createText:v,createComment:x}}=c,y=Oo(e.props);let{shapeFlag:_,children:f,dynamicChildren:b}=e;if(t==null){const w=e.el=v(""),k=e.anchor=v("");d(w,n,r),d(k,n,r);const P=(D,S)=>{_&16&&u(f,D,S,i,s,o,a,l)},$=()=>{const D=e.target=vd(e.props,g),S=A3(D,e,v,d);D&&(o!=="svg"&&uf(D)?o="svg":o!=="mathml"&&df(D)&&(o="mathml"),y||(P(D,S),fl(e)))};y&&(P(n,k),fl(e)),Cm(e.props)?on($,s):$()}else{e.el=t.el,e.targetStart=t.targetStart;const w=e.anchor=t.anchor,k=e.target=t.target,P=e.targetAnchor=t.targetAnchor,$=Oo(t.props),D=$?n:k,S=$?w:P;if(o==="svg"||uf(k)?o="svg":(o==="mathml"||df(k))&&(o="mathml"),b?(p(t.dynamicChildren,b,D,i,s,o,a),O1(t,e,!0)):l||h(t,e,D,S,i,s,o,a,!1),y)$?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Ga(e,n,w,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const F=e.target=vd(e.props,g);F&&Ga(e,F,null,c,0)}else $&&Ga(e,k,P,c,1);fl(e)}},remove(t,e,n,{um:r,o:{remove:i}},s){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:h,props:p}=t;if(h&&(i(c),i(u)),s&&i(l),o&16){const d=s||!Oo(p);for(let g=0;g<a.length;g++){const v=a[g];r(v,e,n,d,!!v.dynamicChildren)}}},move:Ga,hydrate:Sm};function Ga(t,e,n,{o:{insert:r},m:i},s=2){s===0&&r(t.targetAnchor,e,n);const{el:o,anchor:a,shapeFlag:l,children:c,props:u}=t,h=s===2;if(h&&r(o,e,n),(!h||Oo(u))&&l&16)for(let p=0;p<c.length;p++)i(c[p],e,n,2);h&&r(a,e,n)}function Sm(t,e,n,r,i,s,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:c,createText:u}},h){const p=e.target=vd(e.props,l);if(p){const d=p._lpa||p.firstChild;if(e.shapeFlag&16)if(Oo(e.props))e.anchor=h(o(t),e,a(t),n,r,i,s),e.targetStart=d,e.targetAnchor=d&&o(d);else{e.anchor=o(t);let g=d;for(;g;){if(g&&g.nodeType===8){if(g.data==="teleport start anchor")e.targetStart=g;else if(g.data==="teleport anchor"){e.targetAnchor=g,p._lpa=e.targetAnchor&&o(e.targetAnchor);break}}g=o(g)}e.targetAnchor||A3(p,e,u,c),h(d&&o(d),e,p,n,r,i,s)}fl(e)}return e.anchor&&o(e.anchor)}const S3=km;function fl(t){const e=t.ctx;if(e&&e.ut){let n=t.targetStart;for(;n&&n!==t.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",e.uid),n=n.nextSibling;e.ut()}}function A3(t,e,n,r){const i=e.targetStart=n(""),s=e.targetAnchor=n("");return i[C3]=s,t&&(r(i,t),r(s,t)),s}const ri=Symbol("_leaveCb"),Wa=Symbol("_enterCb");function E3(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ut(()=>{t.isMounted=!0}),Nn(()=>{t.isUnmounting=!0}),t}const Hn=[Function,Array],$3={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Hn,onEnter:Hn,onAfterEnter:Hn,onEnterCancelled:Hn,onBeforeLeave:Hn,onLeave:Hn,onAfterLeave:Hn,onLeaveCancelled:Hn,onBeforeAppear:Hn,onAppear:Hn,onAfterAppear:Hn,onAppearCancelled:Hn},T3=t=>{const e=t.subTree;return e.component?T3(e.component):e},Am={name:"BaseTransition",props:$3,setup(t,{slots:e}){const n=Ct(),r=E3();return()=>{const i=e.default&&$1(e.default(),!0);if(!i||!i.length)return;const s=P3(i),o=ft(t),{mode:a}=o;if(r.isLeaving)return qc(s);const l=ff(s);if(!l)return qc(s);let c=Xo(l,o,r,n,p=>c=p);ji(l,c);const u=n.subTree,h=u&&ff(u);if(h&&h.type!==an&&!er(l,h)&&T3(n).type!==an){const p=Xo(h,o,r,n);if(ji(h,p),a==="out-in"&&l.type!==an)return r.isLeaving=!0,p.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update()},qc(s);a==="in-out"&&l.type!==an&&(p.delayLeave=(d,g,v)=>{const x=D3(r,h);x[String(h.key)]=h,d[ri]=()=>{g(),d[ri]=void 0,delete c.delayedLeave},c.delayedLeave=v})}return s}}};function P3(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==an){e=n;break}}return e}const Em=Am;function D3(t,e){const{leavingVNodes:n}=t;let r=n.get(e.type);return r||(r=Object.create(null),n.set(e.type,r)),r}function Xo(t,e,n,r,i){const{appear:s,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:h,onBeforeLeave:p,onLeave:d,onAfterLeave:g,onLeaveCancelled:v,onBeforeAppear:x,onAppear:y,onAfterAppear:_,onAppearCancelled:f}=e,b=String(t.key),w=D3(n,t),k=(D,S)=>{D&&ar(D,r,9,S)},P=(D,S)=>{const F=S[1];k(D,S),Ne(D)?D.every(A=>A.length<=1)&&F():D.length<=1&&F()},$={mode:o,persisted:a,beforeEnter(D){let S=l;if(!n.isMounted)if(s)S=x||l;else return;D[ri]&&D[ri](!0);const F=w[b];F&&er(t,F)&&F.el[ri]&&F.el[ri](),k(S,[D])},enter(D){let S=c,F=u,A=h;if(!n.isMounted)if(s)S=y||c,F=_||u,A=f||h;else return;let E=!1;const T=D[Wa]=L=>{E||(E=!0,L?k(A,[D]):k(F,[D]),$.delayedLeave&&$.delayedLeave(),D[Wa]=void 0)};S?P(S,[D,T]):T()},leave(D,S){const F=String(t.key);if(D[Wa]&&D[Wa](!0),n.isUnmounting)return S();k(p,[D]);let A=!1;const E=D[ri]=T=>{A||(A=!0,S(),T?k(v,[D]):k(g,[D]),D[ri]=void 0,w[F]===t&&delete w[F])};w[F]=t,d?P(d,[D,E]):E()},clone(D){const S=Xo(D,e,n,r,i);return i&&i(S),S}};return $}function qc(t){if(fa(t))return t=lr(t),t.children=null,t}function ff(t){if(!fa(t))return k3(t.type)&&t.children?P3(t.children):t;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&qe(n.default))return n.default()}}function ji(t,e){t.shapeFlag&6&&t.component?ji(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function $1(t,e=!1,n){let r=[],i=0;for(let s=0;s<t.length;s++){let o=t[s];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:s);o.type===Se?(o.patchFlag&128&&i++,r=r.concat($1(o.children,e,a))):(e||o.type!==an)&&r.push(a!=null?lr(o,{key:a}):o)}if(i>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Ae(t,e){return qe(t)?Ot({name:t.name},e,{setup:t}):t}function aH(){const t=Ct();if(t)return(t.appContext.config.idPrefix||"v")+":"+t.ids[0]+t.ids[1]++}function T1(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function Rl(t,e,n,r,i=!1){if(Ne(t)){t.forEach((p,d)=>Rl(p,e&&(Ne(e)?e[d]:e),n,r,i));return}if(oi(r)&&!i)return;const s=r.shapeFlag&4?_a(r.component):r.el,o=i?null:s,{i:a,r:l}=t,c=e&&e.r,u=a.refs===gt?a.refs={}:a.refs,h=a.setupState;if(c!=null&&c!==l&&(Mt(c)?(u[c]=null,bt(h,c)&&(h[c]=null)):Nt(c)&&(c.value=null)),qe(l))da(l,a,12,[o,u]);else{const p=Mt(l),d=Nt(l);if(p||d){const g=()=>{if(t.f){const v=p?bt(h,l)?h[l]:u[l]:l.value;i?Ne(v)&&v1(v,s):Ne(v)?v.includes(s)||v.push(s):p?(u[l]=[s],bt(h,l)&&(h[l]=u[l])):(l.value=[s],t.k&&(u[t.k]=l.value))}else p?(u[l]=o,bt(h,l)&&(h[l]=o)):d&&(l.value=o,t.k&&(u[t.k]=o))};o?(g.id=-1,on(g,n)):g()}}}let hf=!1;const xs=()=>{hf||(console.error("Hydration completed but contains mismatches."),hf=!0)},$m=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",Tm=t=>t.namespaceURI.includes("MathML"),qa=t=>{if(t.nodeType===1){if($m(t))return"svg";if(Tm(t))return"mathml"}},Ds=t=>t.nodeType===8;function Pm(t){const{mt:e,p:n,o:{patchProp:r,createText:i,nextSibling:s,parentNode:o,remove:a,insert:l,createComment:c}}=t,u=(f,b)=>{if(!b.hasChildNodes()){n(null,f,b),Il(),b._vnode=f;return}h(b.firstChild,f,null,null,null),Il(),b._vnode=f},h=(f,b,w,k,P,$=!1)=>{$=$||!!b.dynamicChildren;const D=Ds(f)&&f.data==="[",S=()=>v(f,b,w,k,P,D),{type:F,ref:A,shapeFlag:E,patchFlag:T}=b;let L=f.nodeType;b.el=f,T===-2&&($=!1,b.dynamicChildren=null);let X=null;switch(F){case Ni:L!==3?b.children===""?(l(b.el=i(""),o(f),f),X=f):X=S():(f.data!==b.children&&(xs(),f.data=b.children),X=s(f));break;case an:_(f)?(X=s(f),y(b.el=f.content.firstChild,f,w)):L!==8||D?X=S():X=s(f);break;case Ns:if(D&&(f=s(f),L=f.nodeType),L===1||L===3){X=f;const J=!b.children.length;for(let ne=0;ne<b.staticCount;ne++)J&&(b.children+=X.nodeType===1?X.outerHTML:X.data),ne===b.staticCount-1&&(b.anchor=X),X=s(X);return D?s(X):X}else S();break;case Se:D?X=g(f,b,w,k,P,$):X=S();break;default:if(E&1)(L!==1||b.type.toLowerCase()!==f.tagName.toLowerCase())&&!_(f)?X=S():X=p(f,b,w,k,P,$);else if(E&6){b.slotScopeIds=P;const J=o(f);if(D?X=x(f):Ds(f)&&f.data==="teleport start"?X=x(f,f.data,"teleport end"):X=s(f),e(b,J,null,w,k,qa(J),$),oi(b)){let ne;D?(ne=le(Se),ne.anchor=X?X.previousSibling:J.lastChild):ne=f.nodeType===3?He(""):le("div"),ne.el=f,b.component.subTree=ne}}else E&64?L!==8?X=S():X=b.type.hydrate(f,b,w,k,P,$,t,d):E&128&&(X=b.type.hydrate(f,b,w,k,qa(o(f)),P,$,t,h))}return A!=null&&Rl(A,null,k,b),X},p=(f,b,w,k,P,$)=>{$=$||!!b.dynamicChildren;const{type:D,props:S,patchFlag:F,shapeFlag:A,dirs:E,transition:T}=b,L=D==="input"||D==="option";if(L||F!==-1){E&&_r(b,null,w,"created");let X=!1;if(_(f)){X=K3(k,T)&&w&&w.vnode.props&&w.vnode.props.appear;const ne=f.content.firstChild;X&&T.beforeEnter(ne),y(ne,f,w),b.el=f=ne}if(A&16&&!(S&&(S.innerHTML||S.textContent))){let ne=d(f.firstChild,b,f,w,k,P,$);for(;ne;){Ka(f,1)||xs();const se=ne;ne=ne.nextSibling,a(se)}}else A&8&&f.textContent!==b.children&&(Ka(f,0)||xs(),f.textContent=b.children);if(S){if(L||!$||F&48){const ne=f.tagName.includes("-");for(const se in S)(L&&(se.endsWith("value")||se==="indeterminate")||ua(se)&&!Is(se)||se[0]==="."||ne)&&r(f,se,null,S[se],void 0,w)}else if(S.onClick)r(f,"onClick",null,S.onClick,void 0,w);else if(F&4&&yr(S.style))for(const ne in S.style)S.style[ne]}let J;(J=S&&S.onVnodeBeforeMount)&&Tn(J,w,b),E&&_r(b,null,w,"beforeMount"),((J=S&&S.onVnodeMounted)||E||X)&&e4(()=>{J&&Tn(J,w,b),X&&T.enter(f),E&&_r(b,null,w,"mounted")},k)}return f.nextSibling},d=(f,b,w,k,P,$,D)=>{D=D||!!b.dynamicChildren;const S=b.children,F=S.length;for(let A=0;A<F;A++){const E=D?S[A]:S[A]=Pn(S[A]),T=E.type===Ni;f?(T&&!D&&A+1<F&&Pn(S[A+1]).type===Ni&&(l(i(f.data.slice(E.children.length)),w,s(f)),f.data=E.children),f=h(f,E,k,P,$,D)):T&&!E.children?l(E.el=i(""),w):(Ka(w,1)||xs(),n(null,E,w,null,k,P,qa(w),$))}return f},g=(f,b,w,k,P,$)=>{const{slotScopeIds:D}=b;D&&(P=P?P.concat(D):D);const S=o(f),F=d(s(f),b,S,w,k,P,$);return F&&Ds(F)&&F.data==="]"?s(b.anchor=F):(xs(),l(b.anchor=c("]"),S,F),F)},v=(f,b,w,k,P,$)=>{if(Ka(f.parentElement,1)||xs(),b.el=null,$){const F=x(f);for(;;){const A=s(f);if(A&&A!==F)a(A);else break}}const D=s(f),S=o(f);return a(f),n(null,b,S,D,w,k,qa(S),P),D},x=(f,b="[",w="]")=>{let k=0;for(;f;)if(f=s(f),f&&Ds(f)&&(f.data===b&&k++,f.data===w)){if(k===0)return s(f);k--}return f},y=(f,b,w)=>{const k=b.parentNode;k&&k.replaceChild(f,b);let P=w;for(;P;)P.vnode.el===b&&(P.vnode.el=P.subTree.el=f),P=P.parent},_=f=>f.nodeType===1&&f.tagName.toLowerCase()==="template";return[u,h]}const pf="data-allow-mismatch",Dm={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Ka(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(pf);)t=t.parentElement;const n=t&&t.getAttribute(pf);if(n==null)return!1;if(n==="")return!0;{const r=n.split(",");return e===0&&r.includes("children")?!0:n.split(",").includes(Dm[e])}}const lH=(t=1e4)=>e=>{const n=requestIdleCallback(e,{timeout:t});return()=>cancelIdleCallback(n)},cH=t=>(e,n)=>{const r=new IntersectionObserver(i=>{for(const s of i)if(s.isIntersecting){r.disconnect(),e();break}},t);return n(i=>r.observe(i)),()=>r.disconnect()},uH=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},dH=(t=[])=>(e,n)=>{Mt(t)&&(t=[t]);let r=!1;const i=o=>{r||(r=!0,s(),e(),o.target.dispatchEvent(new o.constructor(o.type,o)))},s=()=>{n(o=>{for(const a of t)o.removeEventListener(a,i)})};return n(o=>{for(const a of t)o.addEventListener(a,i,{once:!0})}),s};function Bm(t,e){if(Ds(t)&&t.data==="["){let n=1,r=t.nextSibling;for(;r;){if(r.nodeType===1)e(r);else if(Ds(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else e(t)}const oi=t=>!!t.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function fH(t){qe(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:s,timeout:o,suspensible:a=!0,onError:l}=t;let c=null,u,h=0;const p=()=>(h++,c=null,d()),d=()=>{let g;return c||(g=c=e().catch(v=>{if(v=v instanceof Error?v:new Error(String(v)),l)return new Promise((x,y)=>{l(v,()=>x(p()),()=>y(v),h+1)});throw v}).then(v=>g!==c&&c?c:(v&&(v.__esModule||v[Symbol.toStringTag]==="Module")&&(v=v.default),u=v,v)))};return Ae({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(g,v,x){const y=s?()=>{const _=s(x,f=>Bm(g,f));_&&(v.bum||(v.bum=[])).push(_)}:x;u?y():d().then(()=>!v.isUnmounted&&y())},get __asyncResolved(){return u},setup(){const g=tn;if(T1(g),u)return()=>Kc(u,g);const v=f=>{c=null,to(f,g,13,!r)};if(a&&g.suspense||va)return d().then(f=>()=>Kc(f,g)).catch(f=>(v(f),()=>r?le(r,{error:f}):null));const x=re(!1),y=re(),_=re(!!i);return i&&setTimeout(()=>{_.value=!1},i),o!=null&&setTimeout(()=>{if(!x.value&&!y.value){const f=new Error(`Async component timed out after ${o}ms.`);v(f),y.value=f}},o),d().then(()=>{x.value=!0,g.parent&&fa(g.parent.vnode)&&_0(g.parent.update)}).catch(f=>{v(f),y.value=f}),()=>{if(x.value&&u)return Kc(u,g);if(y.value&&r)return le(r,{error:y.value});if(n&&!_.value)return le(n)}}})}function Kc(t,e){const{ref:n,props:r,children:i,ce:s}=e.vnode,o=le(t,r,i);return o.ref=n,o.ce=s,delete e.vnode.ce,o}const fa=t=>t.type.__isKeepAlive,Fm={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=Ct(),r=n.ctx;if(!r.renderer)return()=>{const _=e.default&&e.default();return _&&_.length===1?_[0]:_};const i=new Map,s=new Set;let o=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:h}}}=r,p=h("div");r.activate=(_,f,b,w,k)=>{const P=_.component;c(_,f,b,0,a),l(P.vnode,_,f,b,P,a,w,_.slotScopeIds,k),on(()=>{P.isDeactivated=!1,P.a&&Rs(P.a);const $=_.props&&_.props.onVnodeMounted;$&&Tn($,P.parent,_)},a)},r.deactivate=_=>{const f=_.component;Ml(f.m),Ml(f.a),c(_,p,null,1,a),on(()=>{f.da&&Rs(f.da);const b=_.props&&_.props.onVnodeUnmounted;b&&Tn(b,f.parent,_),f.isDeactivated=!0},a)};function d(_){Zc(_),u(_,n,a,!0)}function g(_){i.forEach((f,b)=>{const w=$d(f.type);w&&!_(w)&&v(b)})}function v(_){const f=i.get(_);f&&(!o||!er(f,o))?d(f):o&&Zc(o),i.delete(_),s.delete(_)}at(()=>[t.include,t.exclude],([_,f])=>{_&&g(b=>Do(_,b)),f&&g(b=>!Do(f,b))},{flush:"post",deep:!0});let x=null;const y=()=>{x!=null&&(Ll(n.subTree.type)?on(()=>{i.set(x,Za(n.subTree))},n.subTree.suspense):i.set(x,Za(n.subTree)))};return ut(y),ha(y),Nn(()=>{i.forEach(_=>{const{subTree:f,suspense:b}=n,w=Za(f);if(_.type===w.type&&_.key===w.key){Zc(w);const k=w.component.da;k&&on(k,b);return}d(_)})}),()=>{if(x=null,!e.default)return null;const _=e.default(),f=_[0];if(_.length>1)return o=null,_;if(!ui(f)||!(f.shapeFlag&4)&&!(f.shapeFlag&128))return o=null,f;let b=Za(f);if(b.type===an)return o=null,b;const w=b.type,k=$d(oi(b)?b.type.__asyncResolved||{}:w),{include:P,exclude:$,max:D}=t;if(P&&(!k||!Do(P,k))||$&&k&&Do($,k))return b.shapeFlag&=-257,o=b,f;const S=b.key==null?w:b.key,F=i.get(S);return b.el&&(b=lr(b),f.shapeFlag&128&&(f.ssContent=b)),x=S,F?(b.el=F.el,b.component=F.component,b.transition&&ji(b,b.transition),b.shapeFlag|=512,s.delete(S),s.add(S)):(s.add(S),D&&s.size>parseInt(D,10)&&v(s.values().next().value)),b.shapeFlag|=256,o=b,Ll(f.type)?f:b}}},hH=Fm;function Do(t,e){return Ne(t)?t.some(n=>Do(n,e)):Mt(t)?t.split(",").includes(e):P6(t)?(t.lastIndex=0,t.test(e)):!1}function Im(t,e){B3(t,"a",e)}function Rm(t,e){B3(t,"da",e)}function B3(t,e,n=tn){const r=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(x0(e,r,n),n){let i=n.parent;for(;i&&i.parent;)fa(i.parent.vnode)&&Om(r,e,n,i),i=i.parent}}function Om(t,e,n,r){const i=x0(e,t,r,!0);bi(()=>{v1(r[e],i)},n)}function Zc(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function Za(t){return t.shapeFlag&128?t.ssContent:t}function x0(t,e,n=tn,r=!1){if(n){const i=n[t]||(n[t]=[]),s=e.__weh||(e.__weh=(...o)=>{vi();const a=Vi(n),l=ar(e,n,t,o);return a(),_i(),l});return r?i.unshift(s):i.push(s),s}}const zr=t=>(e,n=tn)=>{(!va||t==="sp")&&x0(t,(...r)=>e(...r),n)},F3=zr("bm"),ut=zr("m"),Mm=zr("bu"),ha=zr("u"),Nn=zr("bum"),bi=zr("um"),Lm=zr("sp"),Nm=zr("rtg"),Um=zr("rtc");function zm(t,e=tn){x0("ec",t,e)}const P1="components",jm="directives";function xr(t,e){return D1(P1,t,!0,e)||t}const I3=Symbol.for("v-ndc");function Vs(t){return Mt(t)?D1(P1,t,!1)||t:t||I3}function pa(t){return D1(jm,t)}function D1(t,e,n=!0,r=!1){const i=nn||tn;if(i){const s=i.type;if(t===P1){const a=$d(s,!1);if(a&&(a===e||a===En(e)||a===u0(En(e))))return s}const o=gf(i[t]||s[t],e)||gf(i.appContext[t],e);return!o&&r?s:o}}function gf(t,e){return t&&(t[e]||t[En(e)]||t[u0(En(e))])}function Ye(t,e,n,r){let i;const s=n&&n[r],o=Ne(t);if(o||Mt(t)){const a=o&&yr(t);a&&(t=h0(t)),i=new Array(t.length);for(let l=0,c=t.length;l<c;l++)i[l]=e(a?_n(t[l]):t[l],l,void 0,s&&s[l])}else if(typeof t=="number"){i=new Array(t);for(let a=0;a<t;a++)i[a]=e(a+1,a,void 0,s&&s[a])}else if(Et(t))if(t[Symbol.iterator])i=Array.from(t,(a,l)=>e(a,l,void 0,s&&s[l]));else{const a=Object.keys(t);i=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];i[l]=e(t[u],u,l,s&&s[l])}}else i=[];return n&&(n[r]=i),i}function pH(t,e){for(let n=0;n<e.length;n++){const r=e[n];if(Ne(r))for(let i=0;i<r.length;i++)t[r[i].name]=r[i].fn;else r&&(t[r.name]=r.key?(...i)=>{const s=r.fn(...i);return s&&(s.key=r.key),s}:r.fn)}return t}function Ms(t,e,n={},r,i){if(nn.ce||nn.parent&&oi(nn.parent)&&nn.parent.ce)return e!=="default"&&(n.name=e),U(),Xe(Se,null,[le("slot",n,r&&r())],64);let s=t[e];s&&s._c&&(s._d=!1),U();const o=s&&B1(s(n)),a=Xe(Se,{key:(n.key||o&&o.key||`_${e}`)+(!o&&r?"_fb":"")},o||(r?r():[]),o&&t._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function B1(t){return t.some(e=>ui(e)?!(e.type===an||e.type===Se&&!B1(e.children)):!0)?t:null}function gH(t,e){const n={};for(const r in t)n[e&&/[A-Z]/.test(r)?`on:${r}`:dl(r)]=t[r];return n}const _d=t=>t?s4(t)?_a(t):_d(t.parent):null,Mo=Ot(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>_d(t.parent),$root:t=>_d(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>I1(t),$forceUpdate:t=>t.f||(t.f=()=>{_0(t.update)}),$nextTick:t=>t.n||(t.n=li.bind(t.proxy)),$watch:t=>d9.bind(t)}),Yc=(t,e)=>t!==gt&&!t.__isScriptSetup&&bt(t,e),bd={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:s,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return r[e];case 2:return i[e];case 4:return n[e];case 3:return s[e]}else{if(Yc(r,e))return o[e]=1,r[e];if(i!==gt&&bt(i,e))return o[e]=2,i[e];if((c=t.propsOptions[0])&&bt(c,e))return o[e]=3,s[e];if(n!==gt&&bt(n,e))return o[e]=4,n[e];xd&&(o[e]=0)}}const u=Mo[e];let h,p;if(u)return e==="$attrs"&&yn(t.attrs,"get",""),u(t);if((h=a.__cssModules)&&(h=h[e]))return h;if(n!==gt&&bt(n,e))return o[e]=4,n[e];if(p=l.config.globalProperties,bt(p,e))return p[e]},set({_:t},e,n){const{data:r,setupState:i,ctx:s}=t;return Yc(i,e)?(i[e]=n,!0):r!==gt&&bt(r,e)?(r[e]=n,!0):bt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:i,propsOptions:s}},o){let a;return!!n[o]||t!==gt&&bt(t,o)||Yc(e,o)||(a=s[0])&&bt(a,o)||bt(r,o)||bt(Mo,o)||bt(i.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:bt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},Hm=Ot({},bd,{get(t,e){if(e!==Symbol.unscopables)return bd.get(t,e,t)},has(t,e){return e[0]!=="_"&&!R6(e)}});function mH(){return null}function vH(){return null}function _H(t){}function bH(t){}function xH(){return null}function yH(){}function wH(t,e){return null}function CH(){return R3().slots}function kH(){return R3().attrs}function R3(){const t=Ct();return t.setupContext||(t.setupContext=l4(t))}function Qo(t){return Ne(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function F1(t,e){const n=Qo(t);for(const r in e){if(r.startsWith("__skip"))continue;let i=n[r];i?Ne(i)||qe(i)?i=n[r]={type:i,default:e[r]}:i.default=e[r]:i===null&&(i=n[r]={default:e[r]}),i&&e[`__skip_${r}`]&&(i.skipFactory=!0)}return n}function SH(t,e){return!t||!e?t||e:Ne(t)&&Ne(e)?t.concat(e):Ot({},Qo(t),Qo(e))}function AH(t,e){const n={};for(const r in t)e.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>t[r]});return n}function ci(t){const e=Ct();let n=t();return Sd(),_1(n)&&(n=n.catch(r=>{throw Vi(e),r})),[n,()=>Vi(e)]}let xd=!0;function Vm(t){const e=I1(t),n=t.proxy,r=t.ctx;xd=!1,e.beforeCreate&&mf(e.beforeCreate,t,"bc");const{data:i,computed:s,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:h,mounted:p,beforeUpdate:d,updated:g,activated:v,deactivated:x,beforeDestroy:y,beforeUnmount:_,destroyed:f,unmounted:b,render:w,renderTracked:k,renderTriggered:P,errorCaptured:$,serverPrefetch:D,expose:S,inheritAttrs:F,components:A,directives:E,filters:T}=e;if(c&&Gm(c,r,null),o)for(const J in o){const ne=o[J];qe(ne)&&(r[J]=ne.bind(n))}if(i){const J=i.call(n,n);Et(J)&&(t.data=Pt(J))}if(xd=!0,s)for(const J in s){const ne=s[J],se=qe(ne)?ne.bind(n,n):qe(ne.get)?ne.get.bind(n,n):nr,ce=!qe(ne)&&qe(ne.set)?ne.set.bind(n):nr,j=Le({get:se,set:ce});Object.defineProperty(r,J,{enumerable:!0,configurable:!0,get:()=>j.value,set:V=>j.value=V})}if(a)for(const J in a)O3(a[J],r,n,J);if(l){const J=qe(l)?l.call(n):l;Reflect.ownKeys(J).forEach(ne=>{mn(ne,J[ne])})}u&&mf(u,t,"c");function X(J,ne){Ne(ne)?ne.forEach(se=>J(se.bind(n))):ne&&J(ne.bind(n))}if(X(F3,h),X(ut,p),X(Mm,d),X(ha,g),X(Im,v),X(Rm,x),X(zm,$),X(Um,k),X(Nm,P),X(Nn,_),X(bi,b),X(Lm,D),Ne(S))if(S.length){const J=t.exposed||(t.exposed={});S.forEach(ne=>{Object.defineProperty(J,ne,{get:()=>n[ne],set:se=>n[ne]=se})})}else t.exposed||(t.exposed={});w&&t.render===nr&&(t.render=w),F!=null&&(t.inheritAttrs=F),A&&(t.components=A),E&&(t.directives=E),D&&T1(t)}function Gm(t,e,n=nr){Ne(t)&&(t=yd(t));for(const r in t){const i=t[r];let s;Et(i)?"default"in i?s=vt(i.from||r,i.default,!0):s=vt(i.from||r):s=vt(i),Nt(s)?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[r]=s}}function mf(t,e,n){ar(Ne(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function O3(t,e,n,r){let i=r.includes(".")?Y3(n,r):()=>n[r];if(Mt(t)){const s=e[t];qe(s)&&at(i,s)}else if(qe(t))at(i,t.bind(n));else if(Et(t))if(Ne(t))t.forEach(s=>O3(s,e,n,r));else{const s=qe(t.handler)?t.handler.bind(n):e[t.handler];qe(s)&&at(i,s,t)}}function I1(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,a=s.get(e);let l;return a?l=a:!i.length&&!n&&!r?l=e:(l={},i.length&&i.forEach(c=>Ol(l,c,o,!0)),Ol(l,e,o)),Et(e)&&s.set(e,l),l}function Ol(t,e,n,r=!1){const{mixins:i,extends:s}=e;s&&Ol(t,s,n,!0),i&&i.forEach(o=>Ol(t,o,n,!0));for(const o in e)if(!(r&&o==="expose")){const a=Wm[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const Wm={data:vf,props:_f,emits:_f,methods:Bo,computed:Bo,beforeCreate:kn,created:kn,beforeMount:kn,mounted:kn,beforeUpdate:kn,updated:kn,beforeDestroy:kn,beforeUnmount:kn,destroyed:kn,unmounted:kn,activated:kn,deactivated:kn,errorCaptured:kn,serverPrefetch:kn,components:Bo,directives:Bo,watch:Km,provide:vf,inject:qm};function vf(t,e){return e?t?function(){return Ot(qe(t)?t.call(this,this):t,qe(e)?e.call(this,this):e)}:e:t}function qm(t,e){return Bo(yd(t),yd(e))}function yd(t){if(Ne(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function kn(t,e){return t?[...new Set([].concat(t,e))]:e}function Bo(t,e){return t?Ot(Object.create(null),t,e):e}function _f(t,e){return t?Ne(t)&&Ne(e)?[...new Set([...t,...e])]:Ot(Object.create(null),Qo(t),Qo(e??{})):e}function Km(t,e){if(!t)return e;if(!e)return t;const n=Ot(Object.create(null),t);for(const r in e)n[r]=kn(t[r],e[r]);return n}function M3(){return{app:null,config:{isNativeTag:$6,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Zm=0;function Ym(t,e){return function(r,i=null){qe(r)||(r=Ot({},r)),i!=null&&!Et(i)&&(i=null);const s=M3(),o=new WeakSet,a=[];let l=!1;const c=s.app={_uid:Zm++,_component:r,_props:i,_container:null,_context:s,_instance:null,version:P9,get config(){return s.config},set config(u){},use(u,...h){return o.has(u)||(u&&qe(u.install)?(o.add(u),u.install(c,...h)):qe(u)&&(o.add(u),u(c,...h))),c},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),c},component(u,h){return h?(s.components[u]=h,c):s.components[u]},directive(u,h){return h?(s.directives[u]=h,c):s.directives[u]},mount(u,h,p){if(!l){const d=c._ceVNode||le(r,i);return d.appContext=s,p===!0?p="svg":p===!1&&(p=void 0),h&&e?e(d,u):t(d,u,p),l=!0,c._container=u,u.__vue_app__=c,_a(d.component)}},onUnmount(u){a.push(u)},unmount(){l&&(ar(a,c._instance,16),t(null,c._container),delete c._container.__vue_app__)},provide(u,h){return s.provides[u]=h,c},runWithContext(u){const h=Li;Li=c;try{return u()}finally{Li=h}}};return c}}let Li=null;function mn(t,e){if(tn){let n=tn.provides;const r=tn.parent&&tn.parent.provides;r===n&&(n=tn.provides=Object.create(r)),n[t]=e}}function vt(t,e,n=!1){const r=tn||nn;if(r||Li){const i=Li?Li._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&t in i)return i[t];if(arguments.length>1)return n&&qe(e)?e.call(r&&r.proxy):e}}function Xm(){return!!(tn||nn||Li)}const L3={},N3=()=>Object.create(L3),U3=t=>Object.getPrototypeOf(t)===L3;function Qm(t,e,n,r=!1){const i={},s=N3();t.propsDefaults=Object.create(null),z3(t,e,i,s);for(const o in t.propsOptions[0])o in i||(i[o]=void 0);n?t.props=r?i:f3(i):t.type.props?t.props=i:t.props=s,t.attrs=s}function Jm(t,e,n,r){const{props:i,attrs:s,vnode:{patchFlag:o}}=t,a=ft(i),[l]=t.propsOptions;let c=!1;if((r||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let h=0;h<u.length;h++){let p=u[h];if(y0(t.emitsOptions,p))continue;const d=e[p];if(l)if(bt(s,p))d!==s[p]&&(s[p]=d,c=!0);else{const g=En(p);i[g]=wd(l,a,g,d,t,!1)}else d!==s[p]&&(s[p]=d,c=!0)}}}else{z3(t,e,i,s)&&(c=!0);let u;for(const h in a)(!e||!bt(e,h)&&((u=Dn(h))===h||!bt(e,u)))&&(l?n&&(n[h]!==void 0||n[u]!==void 0)&&(i[h]=wd(l,a,h,void 0,t,!0)):delete i[h]);if(s!==a)for(const h in s)(!e||!bt(e,h))&&(delete s[h],c=!0)}c&&Nr(t.attrs,"set","")}function z3(t,e,n,r){const[i,s]=t.propsOptions;let o=!1,a;if(e)for(let l in e){if(Is(l))continue;const c=e[l];let u;i&&bt(i,u=En(l))?!s||!s.includes(u)?n[u]=c:(a||(a={}))[u]=c:y0(t.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,o=!0)}if(s){const l=ft(n),c=a||gt;for(let u=0;u<s.length;u++){const h=s[u];n[h]=wd(i,l,h,c[h],t,!bt(c,h))}}return o}function wd(t,e,n,r,i,s){const o=t[n];if(o!=null){const a=bt(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&qe(l)){const{propsDefaults:c}=i;if(n in c)r=c[n];else{const u=Vi(i);r=c[n]=l.call(null,e),u()}}else r=l;i.ce&&i.ce._setProp(n,r)}o[0]&&(s&&!a?r=!1:o[1]&&(r===""||r===Dn(n))&&(r=!0))}return r}const e9=new WeakMap;function j3(t,e,n=!1){const r=n?e9:e.propsCache,i=r.get(t);if(i)return i;const s=t.props,o={},a=[];let l=!1;if(!qe(t)){const u=h=>{l=!0;const[p,d]=j3(h,e,!0);Ot(o,p),d&&a.push(...d)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!s&&!l)return Et(t)&&r.set(t,Bs),Bs;if(Ne(s))for(let u=0;u<s.length;u++){const h=En(s[u]);bf(h)&&(o[h]=gt)}else if(s)for(const u in s){const h=En(u);if(bf(h)){const p=s[u],d=o[h]=Ne(p)||qe(p)?{type:p}:Ot({},p),g=d.type;let v=!1,x=!0;if(Ne(g))for(let y=0;y<g.length;++y){const _=g[y],f=qe(_)&&_.name;if(f==="Boolean"){v=!0;break}else f==="String"&&(x=!1)}else v=qe(g)&&g.name==="Boolean";d[0]=v,d[1]=x,(v||bt(d,"default"))&&a.push(h)}}const c=[o,a];return Et(t)&&r.set(t,c),c}function bf(t){return t[0]!=="$"&&!Is(t)}const H3=t=>t[0]==="_"||t==="$stable",R1=t=>Ne(t)?t.map(Pn):[Pn(t)],t9=(t,e,n)=>{if(e._n)return e;const r=mt((...i)=>R1(e(...i)),n);return r._c=!1,r},V3=(t,e,n)=>{const r=t._ctx;for(const i in t){if(H3(i))continue;const s=t[i];if(qe(s))e[i]=t9(i,s,r);else if(s!=null){const o=R1(s);e[i]=()=>o}}},G3=(t,e)=>{const n=R1(e);t.slots.default=()=>n},W3=(t,e,n)=>{for(const r in e)(n||r!=="_")&&(t[r]=e[r])},n9=(t,e,n)=>{const r=t.slots=N3();if(t.vnode.shapeFlag&32){const i=e._;i?(W3(r,e,n),n&&Vg(r,"_",i,!0)):V3(e,r)}else e&&G3(t,e)},r9=(t,e,n)=>{const{vnode:r,slots:i}=t;let s=!0,o=gt;if(r.shapeFlag&32){const a=e._;a?n&&a===1?s=!1:W3(i,e,n):(s=!e.$stable,V3(e,i)),o=e}else e&&(G3(t,e),o={default:1});if(s)for(const a in i)!H3(a)&&o[a]==null&&delete i[a]},on=e4;function i9(t){return q3(t)}function s9(t){return q3(t,Pm)}function q3(t,e){const n=Gg();n.__VUE__=!0;const{insert:r,remove:i,patchProp:s,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:h,nextSibling:p,setScopeId:d=nr,insertStaticContent:g}=t,v=(z,C,O,H=null,I=null,R=null,Y=void 0,te=null,K=!!C.dynamicChildren)=>{if(z===C)return;z&&!er(z,C)&&(H=M(z),V(z,I,R,!0),z=null),C.patchFlag===-2&&(K=!1,C.dynamicChildren=null);const{type:G,ref:ie,shapeFlag:he}=C;switch(G){case Ni:x(z,C,O,H);break;case an:y(z,C,O,H);break;case Ns:z==null&&_(C,O,H,Y);break;case Se:A(z,C,O,H,I,R,Y,te,K);break;default:he&1?w(z,C,O,H,I,R,Y,te,K):he&6?E(z,C,O,H,I,R,Y,te,K):(he&64||he&128)&&G.process(z,C,O,H,I,R,Y,te,K,ue)}ie!=null&&I&&Rl(ie,z&&z.ref,R,C||z,!C)},x=(z,C,O,H)=>{if(z==null)r(C.el=a(C.children),O,H);else{const I=C.el=z.el;C.children!==z.children&&c(I,C.children)}},y=(z,C,O,H)=>{z==null?r(C.el=l(C.children||""),O,H):C.el=z.el},_=(z,C,O,H)=>{[z.el,z.anchor]=g(z.children,C,O,H,z.el,z.anchor)},f=({el:z,anchor:C},O,H)=>{let I;for(;z&&z!==C;)I=p(z),r(z,O,H),z=I;r(C,O,H)},b=({el:z,anchor:C})=>{let O;for(;z&&z!==C;)O=p(z),i(z),z=O;i(C)},w=(z,C,O,H,I,R,Y,te,K)=>{C.type==="svg"?Y="svg":C.type==="math"&&(Y="mathml"),z==null?k(C,O,H,I,R,Y,te,K):D(z,C,I,R,Y,te,K)},k=(z,C,O,H,I,R,Y,te)=>{let K,G;const{props:ie,shapeFlag:he,transition:ge,dirs:be}=z;if(K=z.el=o(z.type,R,ie&&ie.is,ie),he&8?u(K,z.children):he&16&&$(z.children,K,null,H,I,Xc(z,R),Y,te),be&&_r(z,null,H,"created"),P(K,z,z.scopeId,Y,H),ie){for(const Be in ie)Be!=="value"&&!Is(Be)&&s(K,Be,null,ie[Be],R,H);"value"in ie&&s(K,"value",null,ie.value,R),(G=ie.onVnodeBeforeMount)&&Tn(G,H,z)}be&&_r(z,null,H,"beforeMount");const $e=K3(I,ge);$e&&ge.beforeEnter(K),r(K,C,O),((G=ie&&ie.onVnodeMounted)||$e||be)&&on(()=>{G&&Tn(G,H,z),$e&&ge.enter(K),be&&_r(z,null,H,"mounted")},I)},P=(z,C,O,H,I)=>{if(O&&d(z,O),H)for(let R=0;R<H.length;R++)d(z,H[R]);if(I){let R=I.subTree;if(C===R||Ll(R.type)&&(R.ssContent===C||R.ssFallback===C)){const Y=I.vnode;P(z,Y,Y.scopeId,Y.slotScopeIds,I.parent)}}},$=(z,C,O,H,I,R,Y,te,K=0)=>{for(let G=K;G<z.length;G++){const ie=z[G]=te?ii(z[G]):Pn(z[G]);v(null,ie,C,O,H,I,R,Y,te)}},D=(z,C,O,H,I,R,Y)=>{const te=C.el=z.el;let{patchFlag:K,dynamicChildren:G,dirs:ie}=C;K|=z.patchFlag&16;const he=z.props||gt,ge=C.props||gt;let be;if(O&&Ti(O,!1),(be=ge.onVnodeBeforeUpdate)&&Tn(be,O,C,z),ie&&_r(C,z,O,"beforeUpdate"),O&&Ti(O,!0),(he.innerHTML&&ge.innerHTML==null||he.textContent&&ge.textContent==null)&&u(te,""),G?S(z.dynamicChildren,G,te,O,H,Xc(C,I),R):Y||ne(z,C,te,null,O,H,Xc(C,I),R,!1),K>0){if(K&16)F(te,he,ge,O,I);else if(K&2&&he.class!==ge.class&&s(te,"class",null,ge.class,I),K&4&&s(te,"style",he.style,ge.style,I),K&8){const $e=C.dynamicProps;for(let Be=0;Be<$e.length;Be++){const De=$e[Be],Qe=he[De],Ge=ge[De];(Ge!==Qe||De==="value")&&s(te,De,Qe,Ge,I,O)}}K&1&&z.children!==C.children&&u(te,C.children)}else!Y&&G==null&&F(te,he,ge,O,I);((be=ge.onVnodeUpdated)||ie)&&on(()=>{be&&Tn(be,O,C,z),ie&&_r(C,z,O,"updated")},H)},S=(z,C,O,H,I,R,Y)=>{for(let te=0;te<C.length;te++){const K=z[te],G=C[te],ie=K.el&&(K.type===Se||!er(K,G)||K.shapeFlag&70)?h(K.el):O;v(K,G,ie,null,H,I,R,Y,!0)}},F=(z,C,O,H,I)=>{if(C!==O){if(C!==gt)for(const R in C)!Is(R)&&!(R in O)&&s(z,R,C[R],null,I,H);for(const R in O){if(Is(R))continue;const Y=O[R],te=C[R];Y!==te&&R!=="value"&&s(z,R,te,Y,I,H)}"value"in O&&s(z,"value",C.value,O.value,I)}},A=(z,C,O,H,I,R,Y,te,K)=>{const G=C.el=z?z.el:a(""),ie=C.anchor=z?z.anchor:a("");let{patchFlag:he,dynamicChildren:ge,slotScopeIds:be}=C;be&&(te=te?te.concat(be):be),z==null?(r(G,O,H),r(ie,O,H),$(C.children||[],O,ie,I,R,Y,te,K)):he>0&&he&64&&ge&&z.dynamicChildren?(S(z.dynamicChildren,ge,O,I,R,Y,te),(C.key!=null||I&&C===I.subTree)&&O1(z,C,!0)):ne(z,C,O,ie,I,R,Y,te,K)},E=(z,C,O,H,I,R,Y,te,K)=>{C.slotScopeIds=te,z==null?C.shapeFlag&512?I.ctx.activate(C,O,H,Y,K):T(C,O,H,I,R,Y,K):L(z,C,K)},T=(z,C,O,H,I,R,Y)=>{const te=z.component=i4(z,H,I);if(fa(z)&&(te.ctx.renderer=ue),o4(te,!1,Y),te.asyncDep){if(I&&I.registerDep(te,X,Y),!z.el){const K=te.subTree=le(an);y(null,K,C,O)}}else X(te,z,C,O,I,R,Y)},L=(z,C,O)=>{const H=C.component=z.component;if(m9(z,C,O))if(H.asyncDep&&!H.asyncResolved){J(H,C,O);return}else H.next=C,H.update();else C.el=z.el,H.vnode=C},X=(z,C,O,H,I,R,Y)=>{const te=()=>{if(z.isMounted){let{next:he,bu:ge,u:be,parent:$e,vnode:Be}=z;{const Je=Z3(z);if(Je){he&&(he.el=Be.el,J(z,he,Y)),Je.asyncDep.then(()=>{z.isUnmounted||te()});return}}let De=he,Qe;Ti(z,!1),he?(he.el=Be.el,J(z,he,Y)):he=Be,ge&&Rs(ge),(Qe=he.props&&he.props.onVnodeBeforeUpdate)&&Tn(Qe,$e,he,Be),Ti(z,!0);const Ge=hl(z),_t=z.subTree;z.subTree=Ge,v(_t,Ge,h(_t.el),M(_t),z,I,R),he.el=Ge.el,De===null&&M1(z,Ge.el),be&&on(be,I),(Qe=he.props&&he.props.onVnodeUpdated)&&on(()=>Tn(Qe,$e,he,Be),I)}else{let he;const{el:ge,props:be}=C,{bm:$e,m:Be,parent:De,root:Qe,type:Ge}=z,_t=oi(C);if(Ti(z,!1),$e&&Rs($e),!_t&&(he=be&&be.onVnodeBeforeMount)&&Tn(he,De,C),Ti(z,!0),ge&&xe){const Je=()=>{z.subTree=hl(z),xe(ge,z.subTree,z,I,null)};_t?Ge.__asyncHydrate(ge,z,Je):Je()}else{Qe.ce&&Qe.ce._injectChildStyle(Ge);const Je=z.subTree=hl(z);v(null,Je,O,H,z,I,R),C.el=Je.el}if(Be&&on(Be,I),!_t&&(he=be&&be.onVnodeMounted)){const Je=C;on(()=>Tn(he,De,Je),I)}(C.shapeFlag&256||De&&oi(De.vnode)&&De.vnode.shapeFlag&256)&&z.a&&on(z.a,I),z.isMounted=!0,C=O=H=null}};z.scope.on();const K=z.effect=new Dl(te);z.scope.off();const G=z.update=K.run.bind(K),ie=z.job=K.runIfDirty.bind(K);ie.i=z,ie.id=z.uid,K.scheduler=()=>_0(ie),Ti(z,!0),G()},J=(z,C,O)=>{C.component=z;const H=z.vnode.props;z.vnode=C,z.next=null,Jm(z,C.props,H,O),r9(z,C.children,O),vi(),cf(z),_i()},ne=(z,C,O,H,I,R,Y,te,K=!1)=>{const G=z&&z.children,ie=z?z.shapeFlag:0,he=C.children,{patchFlag:ge,shapeFlag:be}=C;if(ge>0){if(ge&128){ce(G,he,O,H,I,R,Y,te,K);return}else if(ge&256){se(G,he,O,H,I,R,Y,te,K);return}}be&8?(ie&16&&fe(G,I,R),he!==G&&u(O,he)):ie&16?be&16?ce(G,he,O,H,I,R,Y,te,K):fe(G,I,R,!0):(ie&8&&u(O,""),be&16&&$(he,O,H,I,R,Y,te,K))},se=(z,C,O,H,I,R,Y,te,K)=>{z=z||Bs,C=C||Bs;const G=z.length,ie=C.length,he=Math.min(G,ie);let ge;for(ge=0;ge<he;ge++){const be=C[ge]=K?ii(C[ge]):Pn(C[ge]);v(z[ge],be,O,null,I,R,Y,te,K)}G>ie?fe(z,I,R,!0,!1,he):$(C,O,H,I,R,Y,te,K,he)},ce=(z,C,O,H,I,R,Y,te,K)=>{let G=0;const ie=C.length;let he=z.length-1,ge=ie-1;for(;G<=he&&G<=ge;){const be=z[G],$e=C[G]=K?ii(C[G]):Pn(C[G]);if(er(be,$e))v(be,$e,O,null,I,R,Y,te,K);else break;G++}for(;G<=he&&G<=ge;){const be=z[he],$e=C[ge]=K?ii(C[ge]):Pn(C[ge]);if(er(be,$e))v(be,$e,O,null,I,R,Y,te,K);else break;he--,ge--}if(G>he){if(G<=ge){const be=ge+1,$e=be<ie?C[be].el:H;for(;G<=ge;)v(null,C[G]=K?ii(C[G]):Pn(C[G]),O,$e,I,R,Y,te,K),G++}}else if(G>ge)for(;G<=he;)V(z[G],I,R,!0),G++;else{const be=G,$e=G,Be=new Map;for(G=$e;G<=ge;G++){const rt=C[G]=K?ii(C[G]):Pn(C[G]);rt.key!=null&&Be.set(rt.key,G)}let De,Qe=0;const Ge=ge-$e+1;let _t=!1,Je=0;const Gt=new Array(Ge);for(G=0;G<Ge;G++)Gt[G]=0;for(G=be;G<=he;G++){const rt=z[G];if(Qe>=Ge){V(rt,I,R,!0);continue}let $t;if(rt.key!=null)$t=Be.get(rt.key);else for(De=$e;De<=ge;De++)if(Gt[De-$e]===0&&er(rt,C[De])){$t=De;break}$t===void 0?V(rt,I,R,!0):(Gt[$t-$e]=G+1,$t>=Je?Je=$t:_t=!0,v(rt,C[$t],O,null,I,R,Y,te,K),Qe++)}const hn=_t?o9(Gt):Bs;for(De=hn.length-1,G=Ge-1;G>=0;G--){const rt=$e+G,$t=C[rt],Cn=rt+1<ie?C[rt+1].el:H;Gt[G]===0?v(null,$t,O,Cn,I,R,Y,te,K):_t&&(De<0||G!==hn[De]?j($t,O,Cn,2):De--)}}},j=(z,C,O,H,I=null)=>{const{el:R,type:Y,transition:te,children:K,shapeFlag:G}=z;if(G&6){j(z.component.subTree,C,O,H);return}if(G&128){z.suspense.move(C,O,H);return}if(G&64){Y.move(z,C,O,ue);return}if(Y===Se){r(R,C,O);for(let he=0;he<K.length;he++)j(K[he],C,O,H);r(z.anchor,C,O);return}if(Y===Ns){f(z,C,O);return}if(H!==2&&G&1&&te)if(H===0)te.beforeEnter(R),r(R,C,O),on(()=>te.enter(R),I);else{const{leave:he,delayLeave:ge,afterLeave:be}=te,$e=()=>r(R,C,O),Be=()=>{he(R,()=>{$e(),be&&be()})};ge?ge(R,$e,Be):Be()}else r(R,C,O)},V=(z,C,O,H=!1,I=!1)=>{const{type:R,props:Y,ref:te,children:K,dynamicChildren:G,shapeFlag:ie,patchFlag:he,dirs:ge,cacheIndex:be}=z;if(he===-2&&(I=!1),te!=null&&Rl(te,null,O,z,!0),be!=null&&(C.renderCache[be]=void 0),ie&256){C.ctx.deactivate(z);return}const $e=ie&1&&ge,Be=!oi(z);let De;if(Be&&(De=Y&&Y.onVnodeBeforeUnmount)&&Tn(De,C,z),ie&6)Q(z.component,O,H);else{if(ie&128){z.suspense.unmount(O,H);return}$e&&_r(z,null,C,"beforeUnmount"),ie&64?z.type.remove(z,C,O,ue,H):G&&!G.hasOnce&&(R!==Se||he>0&&he&64)?fe(G,C,O,!1,!0):(R===Se&&he&384||!I&&ie&16)&&fe(K,C,O),H&&oe(z)}(Be&&(De=Y&&Y.onVnodeUnmounted)||$e)&&on(()=>{De&&Tn(De,C,z),$e&&_r(z,null,C,"unmounted")},O)},oe=z=>{const{type:C,el:O,anchor:H,transition:I}=z;if(C===Se){N(O,H);return}if(C===Ns){b(z);return}const R=()=>{i(O),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(z.shapeFlag&1&&I&&!I.persisted){const{leave:Y,delayLeave:te}=I,K=()=>Y(O,R);te?te(z.el,R,K):K()}else R()},N=(z,C)=>{let O;for(;z!==C;)O=p(z),i(z),z=O;i(C)},Q=(z,C,O)=>{const{bum:H,scope:I,job:R,subTree:Y,um:te,m:K,a:G}=z;Ml(K),Ml(G),H&&Rs(H),I.stop(),R&&(R.flags|=8,V(Y,z,C,O)),te&&on(te,C),on(()=>{z.isUnmounted=!0},C),C&&C.pendingBranch&&!C.isUnmounted&&z.asyncDep&&!z.asyncResolved&&z.suspenseId===C.pendingId&&(C.deps--,C.deps===0&&C.resolve())},fe=(z,C,O,H=!1,I=!1,R=0)=>{for(let Y=R;Y<z.length;Y++)V(z[Y],C,O,H,I)},M=z=>{if(z.shapeFlag&6)return M(z.component.subTree);if(z.shapeFlag&128)return z.suspense.next();const C=p(z.anchor||z.el),O=C&&C[C3];return O?p(O):C};let q=!1;const ee=(z,C,O)=>{z==null?C._vnode&&V(C._vnode,null,null,!0):v(C._vnode||null,z,C,null,null,null,O),C._vnode=z,q||(q=!0,cf(),Il(),q=!1)},ue={p:v,um:V,m:j,r:oe,mt:T,mc:$,pc:ne,pbc:S,n:M,o:t};let me,xe;return e&&([me,xe]=e(ue)),{render:ee,hydrate:me,createApp:Ym(ee,me)}}function Xc({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Ti({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function K3(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function O1(t,e,n=!1){const r=t.children,i=e.children;if(Ne(r)&&Ne(i))for(let s=0;s<r.length;s++){const o=r[s];let a=i[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[s]=ii(i[s]),a.el=o.el),!n&&a.patchFlag!==-2&&O1(o,a)),a.type===Ni&&(a.el=o.el)}}function o9(t){const e=t.slice(),n=[0];let r,i,s,o,a;const l=t.length;for(r=0;r<l;r++){const c=t[r];if(c!==0){if(i=n[n.length-1],t[i]<c){e[r]=i,n.push(r);continue}for(s=0,o=n.length-1;s<o;)a=s+o>>1,t[n[a]]<c?s=a+1:o=a;c<t[n[s]]&&(s>0&&(e[r]=n[s-1]),n[s]=r)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=e[o];return n}function Z3(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Z3(e)}function Ml(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}const a9=Symbol.for("v-scx"),l9=()=>vt(a9);function EH(t,e){return ga(t,null,e)}function c9(t,e){return ga(t,null,{flush:"post"})}function u9(t,e){return ga(t,null,{flush:"sync"})}function at(t,e,n){return ga(t,e,n)}function ga(t,e,n=gt){const{immediate:r,deep:i,flush:s,once:o}=n,a=Ot({},n);let l;if(va)if(s==="sync"){const p=l9();l=p.__watcherHandles||(p.__watcherHandles=[])}else if(!e||r)a.once=!0;else return{stop:nr,resume:nr,pause:nr};const c=tn;a.call=(p,d,g)=>ar(p,c,d,g);let u=!1;s==="post"?a.scheduler=p=>{on(p,c&&c.suspense)}:s!=="sync"&&(u=!0,a.scheduler=(p,d)=>{d?p():_0(p)}),a.augmentJob=p=>{e&&(p.flags|=4),u&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const h=bm(t,e,a);return l&&l.push(h),h}function d9(t,e,n){const r=this.proxy,i=Mt(t)?t.includes(".")?Y3(r,t):()=>r[t]:t.bind(r,r);let s;qe(e)?s=e:(s=e.handler,n=e);const o=Vi(this),a=ga(i,s.bind(r),n);return o(),a}function Y3(t,e){const n=e.split(".");return()=>{let r=t;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function $H(t,e,n=gt){const r=Ct(),i=En(e),s=Dn(e),o=X3(t,e),a=m3((l,c)=>{let u,h=gt,p;return u9(()=>{const d=t[e];An(u,d)&&(u=d,c())}),{get(){return l(),n.get?n.get(u):u},set(d){const g=n.set?n.set(d):d;if(!An(g,u)&&!(h!==gt&&An(d,h)))return;const v=r.vnode.props;v&&(e in v||i in v||s in v)&&(`onUpdate:${e}`in v||`onUpdate:${i}`in v||`onUpdate:${s}`in v)||(u=d,c()),r.emit(`update:${e}`,g),An(d,g)&&An(d,h)&&!An(g,p)&&c(),h=d,p=g}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||gt:a,done:!1}:{done:!0}}}},a}const X3=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${En(e)}Modifiers`]||t[`${Dn(e)}Modifiers`];function f9(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||gt;let i=n;const s=e.startsWith("update:"),o=s&&X3(r,e.slice(7));o&&(o.trim&&(i=n.map(u=>Mt(u)?u.trim():u)),o.number&&(i=n.map(Tl)));let a,l=r[a=dl(e)]||r[a=dl(En(e))];!l&&s&&(l=r[a=dl(Dn(e))]),l&&ar(l,t,6,i);const c=r[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,ar(c,t,6,i)}}function Q3(t,e,n=!1){const r=e.emitsCache,i=r.get(t);if(i!==void 0)return i;const s=t.emits;let o={},a=!1;if(!qe(t)){const l=c=>{const u=Q3(c,e,!0);u&&(a=!0,Ot(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!s&&!a?(Et(t)&&r.set(t,null),null):(Ne(s)?s.forEach(l=>o[l]=null):Ot(o,s),Et(t)&&r.set(t,o),o)}function y0(t,e){return!t||!ua(e)?!1:(e=e.slice(2).replace(/Once$/,""),bt(t,e[0].toLowerCase()+e.slice(1))||bt(t,Dn(e))||bt(t,e))}function hl(t){const{type:e,vnode:n,proxy:r,withProxy:i,propsOptions:[s],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:h,data:p,setupState:d,ctx:g,inheritAttrs:v}=t,x=Yo(t);let y,_;try{if(n.shapeFlag&4){const b=i||r,w=b;y=Pn(c.call(w,b,u,h,d,p,g)),_=a}else{const b=e;y=Pn(b.length>1?b(h,{attrs:a,slots:o,emit:l}):b(h,null)),_=e.props?a:p9(a)}}catch(b){Lo.length=0,to(b,t,1),y=le(an)}let f=y;if(_&&v!==!1){const b=Object.keys(_),{shapeFlag:w}=f;b.length&&w&7&&(s&&b.some(m1)&&(_=g9(_,s)),f=lr(f,_,!1,!0))}return n.dirs&&(f=lr(f,null,!1,!0),f.dirs=f.dirs?f.dirs.concat(n.dirs):n.dirs),n.transition&&(f.transition=n.transition),y=f,Yo(x),y}function h9(t,e=!0){let n;for(let r=0;r<t.length;r++){const i=t[r];if(ui(i)){if(i.type!==an||i.children==="v-if"){if(n)return;n=i}}else return}return n}const p9=t=>{let e;for(const n in t)(n==="class"||n==="style"||ua(n))&&((e||(e={}))[n]=t[n]);return e},g9=(t,e)=>{const n={};for(const r in t)(!m1(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function m9(t,e,n){const{props:r,children:i,component:s}=t,{props:o,children:a,patchFlag:l}=e,c=s.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?xf(r,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let h=0;h<u.length;h++){const p=u[h];if(o[p]!==r[p]&&!y0(c,p))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?xf(r,o,c):!0:!!o;return!1}function xf(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let i=0;i<r.length;i++){const s=r[i];if(e[s]!==t[s]&&!y0(n,s))return!0}return!1}function M1({vnode:t,parent:e},n){for(;e;){const r=e.subTree;if(r.suspense&&r.suspense.activeBranch===t&&(r.el=t.el),r===t)(t=e.vnode).el=n,e=e.parent;else break}}const Ll=t=>t.__isSuspense;let Cd=0;const v9={name:"Suspense",__isSuspense:!0,process(t,e,n,r,i,s,o,a,l,c){if(t==null)_9(e,n,r,i,s,o,a,l,c);else{if(s&&s.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}b9(t,e,n,r,i,o,a,l,c)}},hydrate:x9,normalize:y9},Er=v9;function Jo(t,e){const n=t.props&&t.props[e];qe(n)&&n()}function _9(t,e,n,r,i,s,o,a,l){const{p:c,o:{createElement:u}}=l,h=u("div"),p=t.suspense=J3(t,i,r,e,h,n,s,o,a,l);c(null,p.pendingBranch=t.ssContent,h,null,r,p,s,o),p.deps>0?(Jo(t,"onPending"),Jo(t,"onFallback"),c(null,t.ssFallback,e,n,r,null,s,o),Ls(p,t.ssFallback)):p.resolve(!1,!0)}function b9(t,e,n,r,i,s,o,a,{p:l,um:c,o:{createElement:u}}){const h=e.suspense=t.suspense;h.vnode=e,e.el=t.el;const p=e.ssContent,d=e.ssFallback,{activeBranch:g,pendingBranch:v,isInFallback:x,isHydrating:y}=h;if(v)h.pendingBranch=p,er(p,v)?(l(v,p,h.hiddenContainer,null,i,h,s,o,a),h.deps<=0?h.resolve():x&&(y||(l(g,d,n,r,i,null,s,o,a),Ls(h,d)))):(h.pendingId=Cd++,y?(h.isHydrating=!1,h.activeBranch=v):c(v,i,h),h.deps=0,h.effects.length=0,h.hiddenContainer=u("div"),x?(l(null,p,h.hiddenContainer,null,i,h,s,o,a),h.deps<=0?h.resolve():(l(g,d,n,r,i,null,s,o,a),Ls(h,d))):g&&er(p,g)?(l(g,p,n,r,i,h,s,o,a),h.resolve(!0)):(l(null,p,h.hiddenContainer,null,i,h,s,o,a),h.deps<=0&&h.resolve()));else if(g&&er(p,g))l(g,p,n,r,i,h,s,o,a),Ls(h,p);else if(Jo(e,"onPending"),h.pendingBranch=p,p.shapeFlag&512?h.pendingId=p.component.suspenseId:h.pendingId=Cd++,l(null,p,h.hiddenContainer,null,i,h,s,o,a),h.deps<=0)h.resolve();else{const{timeout:_,pendingId:f}=h;_>0?setTimeout(()=>{h.pendingId===f&&h.fallback(d)},_):_===0&&h.fallback(d)}}function J3(t,e,n,r,i,s,o,a,l,c,u=!1){const{p:h,m:p,um:d,n:g,o:{parentNode:v,remove:x}}=c;let y;const _=w9(t);_&&e&&e.pendingBranch&&(y=e.pendingId,e.deps++);const f=t.props?Pl(t.props.timeout):void 0,b=s,w={vnode:t,parent:e,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:Cd++,timeout:typeof f=="number"?f:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(k=!1,P=!1){const{vnode:$,activeBranch:D,pendingBranch:S,pendingId:F,effects:A,parentComponent:E,container:T}=w;let L=!1;w.isHydrating?w.isHydrating=!1:k||(L=D&&S.transition&&S.transition.mode==="out-in",L&&(D.transition.afterLeave=()=>{F===w.pendingId&&(p(S,T,s===b?g(D):s,0),md(A))}),D&&(v(D.el)!==w.hiddenContainer&&(s=g(D)),d(D,E,w,!0)),L||p(S,T,s,0)),Ls(w,S),w.pendingBranch=null,w.isInFallback=!1;let X=w.parent,J=!1;for(;X;){if(X.pendingBranch){X.effects.push(...A),J=!0;break}X=X.parent}!J&&!L&&md(A),w.effects=[],_&&e&&e.pendingBranch&&y===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),Jo($,"onResolve")},fallback(k){if(!w.pendingBranch)return;const{vnode:P,activeBranch:$,parentComponent:D,container:S,namespace:F}=w;Jo(P,"onFallback");const A=g($),E=()=>{w.isInFallback&&(h(null,k,S,A,D,null,F,a,l),Ls(w,k))},T=k.transition&&k.transition.mode==="out-in";T&&($.transition.afterLeave=E),w.isInFallback=!0,d($,D,null,!0),T||E()},move(k,P,$){w.activeBranch&&p(w.activeBranch,k,P,$),w.container=k},next(){return w.activeBranch&&g(w.activeBranch)},registerDep(k,P,$){const D=!!w.pendingBranch;D&&w.deps++;const S=k.vnode.el;k.asyncDep.catch(F=>{to(F,k,0)}).then(F=>{if(k.isUnmounted||w.isUnmounted||w.pendingId!==k.suspenseId)return;k.asyncResolved=!0;const{vnode:A}=k;Ad(k,F,!1),S&&(A.el=S);const E=!S&&k.subTree.el;P(k,A,v(S||k.subTree.el),S?null:g(k.subTree),w,o,$),E&&x(E),M1(k,A.el),D&&--w.deps===0&&w.resolve()})},unmount(k,P){w.isUnmounted=!0,w.activeBranch&&d(w.activeBranch,n,k,P),w.pendingBranch&&d(w.pendingBranch,n,k,P)}};return w}function x9(t,e,n,r,i,s,o,a,l){const c=e.suspense=J3(e,r,n,t.parentNode,document.createElement("div"),null,i,s,o,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,s,o);return c.deps===0&&c.resolve(!1,!0),u}function y9(t){const{shapeFlag:e,children:n}=t,r=e&32;t.ssContent=yf(r?n.default:n),t.ssFallback=r?yf(n.fallback):le(an)}function yf(t){let e;if(qe(t)){const n=Hi&&t._c;n&&(t._d=!1,U()),t=t(),n&&(t._d=!0,e=bn,t4())}return Ne(t)&&(t=h9(t)),t=Pn(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function e4(t,e){e&&e.pendingBranch?Ne(t)?e.effects.push(...t):e.effects.push(t):md(t)}function Ls(t,e){t.activeBranch=e;const{vnode:n,parentComponent:r}=t;let i=e.el;for(;!i&&e.component;)e=e.component.subTree,i=e.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,M1(r,i))}function w9(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const Se=Symbol.for("v-fgt"),Ni=Symbol.for("v-txt"),an=Symbol.for("v-cmt"),Ns=Symbol.for("v-stc"),Lo=[];let bn=null;function U(t=!1){Lo.push(bn=t?null:[])}function t4(){Lo.pop(),bn=Lo[Lo.length-1]||null}let Hi=1;function wf(t){Hi+=t,t<0&&bn&&(bn.hasOnce=!0)}function n4(t){return t.dynamicChildren=Hi>0?bn||Bs:null,t4(),Hi>0&&bn&&bn.push(t),t}function Z(t,e,n,r,i,s){return n4(m(t,e,n,r,i,s,!0))}function Xe(t,e,n,r,i){return n4(le(t,e,n,r,i,!0))}function ui(t){return t?t.__v_isVNode===!0:!1}function er(t,e){return t.type===e.type&&t.key===e.key}function TH(t){}const r4=({key:t})=>t??null,pl=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Mt(t)||Nt(t)||qe(t)?{i:nn,r:t,k:e,f:!!n}:t:null);function m(t,e=null,n=null,r=0,i=null,s=t===Se?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&r4(e),ref:e&&pl(e),scopeId:b0,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nn};return a?(L1(l,n),s&128&&t.normalize(l)):n&&(l.shapeFlag|=Mt(n)?8:16),Hi>0&&!o&&bn&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&bn.push(l),l}const le=C9;function C9(t,e=null,n=null,r=0,i=null,s=!1){if((!t||t===I3)&&(t=an),ui(t)){const a=lr(t,e,!0);return n&&L1(a,n),Hi>0&&!s&&bn&&(a.shapeFlag&6?bn[bn.indexOf(t)]=a:bn.push(a)),a.patchFlag=-2,a}if($9(t)&&(t=t.__vccOpts),e){e=$r(e);let{class:a,style:l}=e;a&&!Mt(a)&&(e.class=ze(a)),Et(l)&&(S1(l)&&!Ne(l)&&(l=Ot({},l)),e.style=xn(l))}const o=Mt(t)?1:Ll(t)?128:k3(t)?64:Et(t)?4:qe(t)?2:0;return m(t,e,n,r,i,o,s,!0)}function $r(t){return t?S1(t)||U3(t)?Ot({},t):t:null}function lr(t,e,n=!1,r=!1){const{props:i,ref:s,patchFlag:o,children:a,transition:l}=t,c=e?Ui(i||{},e):i,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&r4(c),ref:e&&e.ref?n&&s?Ne(s)?s.concat(pl(e)):[s,pl(e)]:pl(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Se?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&lr(t.ssContent),ssFallback:t.ssFallback&&lr(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&ji(u,l.clone(u)),u}function He(t=" ",e=0){return le(Ni,null,t,e)}function ma(t,e){const n=le(Ns,null,t);return n.staticCount=e,n}function we(t="",e=!1){return e?(U(),Xe(an,null,t)):le(an,null,t)}function Pn(t){return t==null||typeof t=="boolean"?le(an):Ne(t)?le(Se,null,t.slice()):typeof t=="object"?ii(t):le(Ni,null,String(t))}function ii(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:lr(t)}function L1(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(Ne(e))n=16;else if(typeof e=="object")if(r&65){const i=e.default;i&&(i._c&&(i._d=!1),L1(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!U3(e)?e._ctx=nn:i===3&&nn&&(nn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else qe(e)?(e={default:e,_ctx:nn},n=32):(e=String(e),r&64?(n=16,e=[He(e)]):n=8);t.children=e,t.shapeFlag|=n}function Ui(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const i in r)if(i==="class")e.class!==r.class&&(e.class=ze([e.class,r.class]));else if(i==="style")e.style=xn([e.style,r.style]);else if(ua(i)){const s=e[i],o=r[i];o&&s!==o&&!(Ne(s)&&s.includes(o))&&(e[i]=s?[].concat(s,o):o)}else i!==""&&(e[i]=r[i])}return e}function Tn(t,e,n,r=null){ar(t,e,7,[n,r])}const k9=M3();let S9=0;function i4(t,e,n){const r=t.type,i=(e?e.appContext:t.appContext)||k9,s={uid:S9++,vnode:t,type:r,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Zg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:j3(r,i),emitsOptions:Q3(r,i),emit:null,emitted:null,propsDefaults:gt,inheritAttrs:r.inheritAttrs,ctx:gt,data:gt,props:gt,attrs:gt,slots:gt,refs:gt,setupState:gt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=e?e.root:s,s.emit=f9.bind(null,s),t.ce&&t.ce(s),s}let tn=null;const Ct=()=>tn||nn;let Nl,kd;{const t=Gg(),e=(n,r)=>{let i;return(i=t[n])||(i=t[n]=[]),i.push(r),s=>{i.length>1?i.forEach(o=>o(s)):i[0](s)}};Nl=e("__VUE_INSTANCE_SETTERS__",n=>tn=n),kd=e("__VUE_SSR_SETTERS__",n=>va=n)}const Vi=t=>{const e=tn;return Nl(t),t.scope.on(),()=>{t.scope.off(),Nl(e)}},Sd=()=>{tn&&tn.scope.off(),Nl(null)};function s4(t){return t.vnode.shapeFlag&4}let va=!1;function o4(t,e=!1,n=!1){e&&kd(e);const{props:r,children:i}=t.vnode,s=s4(t);Qm(t,r,s,e),n9(t,i,n);const o=s?A9(t,e):void 0;return e&&kd(!1),o}function A9(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,bd);const{setup:r}=n;if(r){const i=t.setupContext=r.length>1?l4(t):null,s=Vi(t);vi();const o=da(r,t,0,[t.props,i]);if(_i(),s(),_1(o)){if(oi(t)||T1(t),o.then(Sd,Sd),e)return o.then(a=>{Ad(t,a,e)}).catch(a=>{to(a,t,0)});t.asyncDep=o}else Ad(t,o,e)}else a4(t,e)}function Ad(t,e,n){qe(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Et(e)&&(t.setupState=g3(e)),a4(t,n)}let Ul,Ed;function PH(t){Ul=t,Ed=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Hm))}}const DH=()=>!Ul;function a4(t,e,n){const r=t.type;if(!t.render){if(!e&&Ul&&!r.render){const i=r.template||I1(t).template;if(i){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=r,c=Ot(Ot({isCustomElement:s,delimiters:a},o),l);r.render=Ul(i,c)}}t.render=r.render||nr,Ed&&Ed(t)}{const i=Vi(t);vi();try{Vm(t)}finally{_i(),i()}}}const E9={get(t,e){return yn(t,"get",""),t[e]}};function l4(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,E9),slots:t.slots,emit:t.emit,expose:e}}function _a(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(g3(Jt(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Mo)return Mo[n](t)},has(e,n){return n in e||n in Mo}})):t.proxy}function $d(t,e=!0){return qe(t)?t.displayName||t.name:t.name||e&&t.__name}function $9(t){return qe(t)&&"__vccOpts"in t}const Le=(t,e)=>vm(t,e,va);function BH(t){const e=Ct(),n=Yi(null);if(e){const r=e.refs===gt?e.refs={}:e.refs;Object.defineProperty(r,t,{enumerable:!0,get:()=>n.value,set:i=>n.value=i})}return n}function Zt(t,e,n){const r=arguments.length;return r===2?Et(e)&&!Ne(e)?ui(e)?le(t,null,[e]):le(t,e):le(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ui(n)&&(n=[n]),le(t,e,n))}function FH(){}function IH(t,e,n,r){const i=n[r];if(i&&T9(i,t))return i;const s=e();return s.memo=t.slice(),s.cacheIndex=r,n[r]=s}function T9(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(An(n[r],e[r]))return!1;return Hi>0&&bn&&bn.push(t),!0}const P9="3.5.0",RH=nr,OH=xm,MH=Es,LH=w3,D9={createComponentInstance:i4,setupComponent:o4,renderComponentRoot:hl,setCurrentRenderingInstance:Yo,isVNode:ui,normalizeVNode:Pn,getComponentPublicInstance:_a,ensureValidVNode:B1},NH=D9,UH=null,zH=null,jH=null;/**
* @vue/runtime-dom v3.5.0
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Td;const Cf=typeof window<"u"&&window.trustedTypes;if(Cf)try{Td=Cf.createPolicy("vue",{createHTML:t=>t})}catch{}const c4=Td?t=>Td.createHTML(t):t=>t,B9="http://www.w3.org/2000/svg",F9="http://www.w3.org/1998/Math/MathML",Or=typeof document<"u"?document:null,kf=Or&&Or.createElement("template"),I9={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const i=e==="svg"?Or.createElementNS(B9,t):e==="mathml"?Or.createElementNS(F9,t):n?Or.createElement(t,{is:n}):Or.createElement(t);return t==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:t=>Or.createTextNode(t),createComment:t=>Or.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Or.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,i,s){const o=n?n.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{kf.innerHTML=c4(r==="svg"?`<svg>${t}</svg>`:r==="mathml"?`<math>${t}</math>`:t);const a=kf.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Zr="transition",xo="animation",Gs=Symbol("_vtc"),sr=(t,{slots:e})=>Zt(Em,d4(t),e);sr.displayName="Transition";const u4={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},R9=sr.props=Ot({},$3,u4),Pi=(t,e=[])=>{Ne(t)?t.forEach(n=>n(...e)):t&&t(...e)},Sf=t=>t?Ne(t)?t.some(e=>e.length>1):t.length>1:!1;function d4(t){const e={};for(const A in t)A in u4||(e[A]=t[A]);if(t.css===!1)return e;const{name:n="v",type:r,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=t,g=O9(i),v=g&&g[0],x=g&&g[1],{onBeforeEnter:y,onEnter:_,onEnterCancelled:f,onLeave:b,onLeaveCancelled:w,onBeforeAppear:k=y,onAppear:P=_,onAppearCancelled:$=f}=e,D=(A,E,T)=>{Qr(A,E?u:a),Qr(A,E?c:o),T&&T()},S=(A,E)=>{A._isLeaving=!1,Qr(A,h),Qr(A,d),Qr(A,p),E&&E()},F=A=>(E,T)=>{const L=A?P:_,X=()=>D(E,A,T);Pi(L,[E,X]),Af(()=>{Qr(E,A?l:s),Ir(E,A?u:a),Sf(L)||Ef(E,r,v,X)})};return Ot(e,{onBeforeEnter(A){Pi(y,[A]),Ir(A,s),Ir(A,o)},onBeforeAppear(A){Pi(k,[A]),Ir(A,l),Ir(A,c)},onEnter:F(!1),onAppear:F(!0),onLeave(A,E){A._isLeaving=!0;const T=()=>S(A,E);Ir(A,h),Ir(A,p),h4(),Af(()=>{A._isLeaving&&(Qr(A,h),Ir(A,d),Sf(b)||Ef(A,r,x,T))}),Pi(b,[A,T])},onEnterCancelled(A){D(A,!1),Pi(f,[A])},onAppearCancelled(A){D(A,!0),Pi($,[A])},onLeaveCancelled(A){S(A),Pi(w,[A])}})}function O9(t){if(t==null)return null;if(Et(t))return[Qc(t.enter),Qc(t.leave)];{const e=Qc(t);return[e,e]}}function Qc(t){return Pl(t)}function Ir(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[Gs]||(t[Gs]=new Set)).add(e)}function Qr(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const n=t[Gs];n&&(n.delete(e),n.size||(t[Gs]=void 0))}function Af(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let M9=0;function Ef(t,e,n,r){const i=t._endId=++M9,s=()=>{i===t._endId&&r()};if(n)return setTimeout(s,n);const{type:o,timeout:a,propCount:l}=f4(t,e);if(!o)return r();const c=o+"end";let u=0;const h=()=>{t.removeEventListener(c,p),s()},p=d=>{d.target===t&&++u>=l&&h()};setTimeout(()=>{u<l&&h()},a+1),t.addEventListener(c,p)}function f4(t,e){const n=window.getComputedStyle(t),r=g=>(n[g]||"").split(", "),i=r(`${Zr}Delay`),s=r(`${Zr}Duration`),o=$f(i,s),a=r(`${xo}Delay`),l=r(`${xo}Duration`),c=$f(a,l);let u=null,h=0,p=0;e===Zr?o>0&&(u=Zr,h=o,p=s.length):e===xo?c>0&&(u=xo,h=c,p=l.length):(h=Math.max(o,c),u=h>0?o>c?Zr:xo:null,p=u?u===Zr?s.length:l.length:0);const d=u===Zr&&/\b(transform|all)(,|$)/.test(r(`${Zr}Property`).toString());return{type:u,timeout:h,propCount:p,hasTransform:d}}function $f(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,r)=>Tf(n)+Tf(t[r])))}function Tf(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function h4(){return document.body.offsetHeight}function L9(t,e,n){const r=t[Gs];r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const zl=Symbol("_vod"),p4=Symbol("_vsh"),et={beforeMount(t,{value:e},{transition:n}){t[zl]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):yo(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),yo(t,!0),r.enter(t)):r.leave(t,()=>{yo(t,!1)}):yo(t,e))},beforeUnmount(t,{value:e}){yo(t,e)}};function yo(t,e){t.style.display=e?t[zl]:"none",t[p4]=!e}function N9(){et.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const g4=Symbol("");function HH(t){const e=Ct();if(!e)return;const n=e.ut=(i=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(s=>jl(s,i))},r=()=>{const i=t(e.proxy);e.ce?jl(e.ce,i):Pd(e.subTree,i),n(i)};F3(()=>{c9(r)}),ut(()=>{const i=new MutationObserver(r);i.observe(e.subTree.el.parentNode,{childList:!0}),bi(()=>i.disconnect())})}function Pd(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Pd(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)jl(t.el,e);else if(t.type===Se)t.children.forEach(n=>Pd(n,e));else if(t.type===Ns){let{el:n,anchor:r}=t;for(;n&&(jl(n,e),n!==r);)n=n.nextSibling}}function jl(t,e){if(t.nodeType===1){const n=t.style;let r="";for(const i in e)n.setProperty(`--${i}`,e[i]),r+=`--${i}: ${e[i]};`;n[g4]=r}}const U9=/(^|;)\s*display\s*:/;function z9(t,e,n){const r=t.style,i=Mt(n);let s=!1;if(n&&!i){if(e)if(Mt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&gl(r,a,"")}else for(const o in e)n[o]==null&&gl(r,o,"");for(const o in n)o==="display"&&(s=!0),gl(r,o,n[o])}else if(i){if(e!==n){const o=r[g4];o&&(n+=";"+o),r.cssText=n,s=U9.test(n)}}else e&&t.removeAttribute("style");zl in t&&(t[zl]=s?r.display:"",t[p4]&&(r.display="none"))}const Pf=/\s*!important$/;function gl(t,e,n){if(Ne(n))n.forEach(r=>gl(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=j9(t,e);Pf.test(n)?t.setProperty(Dn(r),n.replace(Pf,""),"important"):t[r]=n}}const Df=["Webkit","Moz","ms"],Jc={};function j9(t,e){const n=Jc[e];if(n)return n;let r=En(e);if(r!=="filter"&&r in t)return Jc[e]=r;r=u0(r);for(let i=0;i<Df.length;i++){const s=Df[i]+r;if(s in t)return Jc[e]=s}return e}const Bf="http://www.w3.org/1999/xlink";function Ff(t,e,n,r,i,s=z6(e)){r&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(Bf,e.slice(6,e.length)):t.setAttributeNS(Bf,e,n):n==null||s&&!Wg(n)?t.removeAttribute(e):t.setAttribute(e,s?"":Cr(n)?String(n):n)}function H9(t,e,n,r){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?c4(n):n);return}const i=t.tagName;if(e==="value"&&i!=="PROGRESS"&&!i.includes("-")){const o=i==="OPTION"?t.getAttribute("value")||"":t.value,a=n==null?t.type==="checkbox"?"on":"":String(n);(o!==a||!("_value"in t))&&(t.value=a),n==null&&t.removeAttribute(e),t._value=n;return}let s=!1;if(n===""||n==null){const o=typeof t[e];o==="boolean"?n=Wg(n):n==null&&o==="string"?(n="",s=!0):o==="number"&&(n=0,s=!0)}try{t[e]=n}catch{}s&&t.removeAttribute(e)}function Lr(t,e,n,r){t.addEventListener(e,n,r)}function V9(t,e,n,r){t.removeEventListener(e,n,r)}const If=Symbol("_vei");function G9(t,e,n,r,i=null){const s=t[If]||(t[If]={}),o=s[e];if(r&&o)o.value=r;else{const[a,l]=W9(e);if(r){const c=s[e]=Z9(r,i);Lr(t,a,c,l)}else o&&(V9(t,a,o,l),s[e]=void 0)}}const Rf=/(?:Once|Passive|Capture)$/;function W9(t){let e;if(Rf.test(t)){e={};let r;for(;r=t.match(Rf);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Dn(t.slice(2)),e]}let eu=0;const q9=Promise.resolve(),K9=()=>eu||(q9.then(()=>eu=0),eu=Date.now());function Z9(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;ar(Y9(r,n.value),e,5,[r])};return n.value=t,n.attached=K9(),n}function Y9(t,e){if(Ne(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>i=>!i._stopped&&r&&r(i))}else return e}const Of=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,X9=(t,e,n,r,i,s)=>{const o=i==="svg";e==="class"?L9(t,r,o):e==="style"?z9(t,n,r):ua(e)?m1(e)||G9(t,e,n,r,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Q9(t,e,r,o))?(H9(t,e,r),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Ff(t,e,r,o,s,e!=="value")):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),Ff(t,e,r,o))};function Q9(t,e,n,r){if(r)return!!(e==="innerHTML"||e==="textContent"||e in t&&Of(e)&&qe(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Of(e)&&Mt(n)?!1:!!(e in t||t._isVueCE&&(/[A-Z]/.test(e)||!Mt(n)))}const Mf={};/*! #__NO_SIDE_EFFECTS__ */function J9(t,e,n){const r=Ae(t,e);l0(r)&&Ot(r,e);class i extends N1{constructor(o){super(r,o,n)}}return i.def=r,i}/*! #__NO_SIDE_EFFECTS__ */const VH=(t,e)=>J9(t,e,gv),ev=typeof HTMLElement<"u"?HTMLElement:class{};class N1 extends ev{constructor(e,n={},r=Dd){super(),this._def=e,this._props=n,this._createApp=r,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&r!==Dd?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof N1){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,li(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance.ce=void 0,this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const i of r)this._setAttr(i.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(r,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:s,styles:o}=r;let a;if(s&&!Ne(s))for(const l in s){const c=s[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Pl(this._props[l])),(a||(a=Object.create(null)))[En(l)]=!0)}this._numberProps=a,i&&this._resolveProps(r),this.shadowRoot&&this._applyStyles(o),this._mount(r)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(r=>e(this._def=r,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const r in n)bt(this,r)||Object.defineProperty(this,r,{get:()=>de(n[r])})}_resolveProps(e){const{props:n}=e,r=Ne(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&r.includes(i)&&this._setProp(i,this[i]);for(const i of r.map(En))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(s){this._setProp(i,s,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let r=n?this.getAttribute(e):Mf;const i=En(e);n&&this._numberProps&&this._numberProps[i]&&(r=Pl(r)),this._setProp(i,r,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,r=!0,i=!1){n!==this._props[e]&&(n===Mf?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),i&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(Dn(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Dn(e),n+""):n||this.removeAttribute(Dn(e))))}_update(){pv(this._createVNode(),this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=le(this._def,Ot(e,this._props));return this._instance||(n.ce=r=>{this._instance=r,r.ce=this,r.isCE=!0;const i=(s,o)=>{this.dispatchEvent(new CustomEvent(s,l0(o[0])?Ot({detail:o},o[0]):{detail:o}))};r.emit=(s,...o)=>{i(s,o),Dn(s)!==s&&i(Dn(s),o)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const r=this._nonce;for(let i=e.length-1;i>=0;i--){const s=document.createElement("style");r&&s.setAttribute("nonce",r),s.textContent=e[i],this.shadowRoot.prepend(s)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const r=n.nodeType===1&&n.getAttribute("slot")||"default";(e[r]||(e[r]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=this.querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let r=0;r<e.length;r++){const i=e[r],s=i.getAttribute("name")||"default",o=this._slots[s],a=i.parentNode;if(o)for(const l of o){if(n&&l.nodeType===1){const c=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let h;for(;h=u.nextNode();)h.setAttribute(c,"")}a.insertBefore(l,i)}else for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}function tv(t){const e=Ct(),n=e&&e.ce;return n||null}function GH(){const t=tv();return t&&t.shadowRoot}function WH(t="$style"){{const e=Ct();if(!e)return gt;const n=e.type.__cssModules;if(!n)return gt;const r=n[t];return r||gt}}const m4=new WeakMap,v4=new WeakMap,Hl=Symbol("_moveCb"),Lf=Symbol("_enterCb"),_4={name:"TransitionGroup",props:Ot({},R9,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Ct(),r=E3();let i,s;return ha(()=>{if(!i.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!ov(i[0].el,n.vnode.el,o))return;i.forEach(rv),i.forEach(iv);const a=i.filter(sv);h4(),a.forEach(l=>{const c=l.el,u=c.style;Ir(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const h=c[Hl]=p=>{p&&p.target!==c||(!p||/transform$/.test(p.propertyName))&&(c.removeEventListener("transitionend",h),c[Hl]=null,Qr(c,o))};c.addEventListener("transitionend",h)})}),()=>{const o=ft(t),a=d4(o);let l=o.tag||Se;if(i=[],s)for(let c=0;c<s.length;c++){const u=s[c];u.el&&u.el instanceof Element&&(i.push(u),ji(u,Xo(u,a,r,n)),m4.set(u,u.el.getBoundingClientRect()))}s=e.default?$1(e.default()):[];for(let c=0;c<s.length;c++){const u=s[c];u.key!=null&&ji(u,Xo(u,a,r,n))}return le(l,null,s)}}},nv=t=>delete t.mode;_4.props;const b4=_4;function rv(t){const e=t.el;e[Hl]&&e[Hl](),e[Lf]&&e[Lf]()}function iv(t){v4.set(t,t.el.getBoundingClientRect())}function sv(t){const e=m4.get(t),n=v4.get(t),r=e.left-n.left,i=e.top-n.top;if(r||i){const s=t.el.style;return s.transform=s.webkitTransform=`translate(${r}px,${i}px)`,s.transitionDuration="0s",t}}function ov(t,e,n){const r=t.cloneNode(),i=t[Gs];i&&i.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const s=e.nodeType===1?e:e.parentNode;s.appendChild(r);const{hasTransform:o}=f4(r);return s.removeChild(r),o}const di=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ne(e)?n=>Rs(e,n):e};function av(t){t.target.composing=!0}function Nf(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const qn=Symbol("_assign"),dn={created(t,{modifiers:{lazy:e,trim:n,number:r}},i){t[qn]=di(i);const s=r||i.props&&i.props.type==="number";Lr(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),s&&(a=Tl(a)),t[qn](a)}),n&&Lr(t,"change",()=>{t.value=t.value.trim()}),e||(Lr(t,"compositionstart",av),Lr(t,"compositionend",Nf),Lr(t,"change",Nf))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:r,trim:i,number:s}},o){if(t[qn]=di(o),t.composing)return;const a=(s||t.type==="number")&&!/^0\d/.test(t.value)?Tl(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(r&&e===n||i&&t.value.trim()===l)||(t.value=l))}},w0={deep:!0,created(t,e,n){t[qn]=di(n),Lr(t,"change",()=>{const r=t._modelValue,i=Ws(t),s=t.checked,o=t[qn];if(Ne(r)){const a=d0(r,i),l=a!==-1;if(s&&!l)o(r.concat(i));else if(!s&&l){const c=[...r];c.splice(a,1),o(c)}}else if(Zi(r)){const a=new Set(r);s?a.add(i):a.delete(i),o(a)}else o(y4(t,s))})},mounted:Uf,beforeUpdate(t,e,n){t[qn]=di(n),Uf(t,e,n)}};function Uf(t,{value:e,oldValue:n},r){t._modelValue=e;let i;Ne(e)?i=d0(e,r.props.value)>-1:Zi(e)?i=e.has(r.props.value):i=ai(e,y4(t,!0)),t.checked!==i&&(t.checked=i)}const x4={created(t,{value:e},n){t.checked=ai(e,n.props.value),t[qn]=di(n),Lr(t,"change",()=>{t[qn](Ws(t))})},beforeUpdate(t,{value:e,oldValue:n},r){t[qn]=di(r),e!==n&&(t.checked=ai(e,r.props.value))}},lv={deep:!0,created(t,{value:e,modifiers:{number:n}},r){const i=Zi(e);Lr(t,"change",()=>{const s=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?Tl(Ws(o)):Ws(o));t[qn](t.multiple?i?new Set(s):s:s[0]),t._assigning=!0,li(()=>{t._assigning=!1})}),t[qn]=di(r)},mounted(t,{value:e,modifiers:{number:n}}){zf(t,e)},beforeUpdate(t,e,n){t[qn]=di(n)},updated(t,{value:e,modifiers:{number:n}}){t._assigning||zf(t,e)}};function zf(t,e,n){const r=t.multiple,i=Ne(e);if(!(r&&!i&&!Zi(e))){for(let s=0,o=t.options.length;s<o;s++){const a=t.options[s],l=Ws(a);if(r)if(i){const c=typeof l;c==="string"||c==="number"?a.selected=e.some(u=>String(u)===String(l)):a.selected=d0(e,l)>-1}else a.selected=e.has(l);else if(ai(Ws(a),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!r&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Ws(t){return"_value"in t?t._value:t.value}function y4(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const cv={created(t,e,n){Ya(t,e,n,null,"created")},mounted(t,e,n){Ya(t,e,n,null,"mounted")},beforeUpdate(t,e,n,r){Ya(t,e,n,r,"beforeUpdate")},updated(t,e,n,r){Ya(t,e,n,r,"updated")}};function w4(t,e){switch(t){case"SELECT":return lv;case"TEXTAREA":return dn;default:switch(e){case"checkbox":return w0;case"radio":return x4;default:return dn}}}function Ya(t,e,n,r,i){const o=w4(t.tagName,n.props&&n.props.type)[i];o&&o(t,e,n,r)}function uv(){dn.getSSRProps=({value:t})=>({value:t}),x4.getSSRProps=({value:t},e)=>{if(e.props&&ai(e.props.value,t))return{checked:!0}},w0.getSSRProps=({value:t},e)=>{if(Ne(t)){if(e.props&&d0(t,e.props.value)>-1)return{checked:!0}}else if(Zi(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},cv.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=w4(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const dv=["ctrl","shift","alt","meta"],fv={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>dv.some(n=>t[`${n}Key`]&&!e.includes(n))},Ee=(t,e)=>{const n=t._withMods||(t._withMods={}),r=e.join(".");return n[r]||(n[r]=(i,...s)=>{for(let o=0;o<e.length;o++){const a=fv[e[o]];if(a&&a(i,e))return}return t(i,...s)})},hv={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},qH=(t,e)=>{const n=t._withKeys||(t._withKeys={}),r=e.join(".");return n[r]||(n[r]=i=>{if(!("key"in i))return;const s=Dn(i.key);if(e.some(o=>o===s||hv[o]===s))return t(i)})},C4=Ot({patchProp:X9},I9);let No,jf=!1;function k4(){return No||(No=i9(C4))}function S4(){return No=jf?No:s9(C4),jf=!0,No}const pv=(...t)=>{k4().render(...t)},KH=(...t)=>{S4().hydrate(...t)},Dd=(...t)=>{const e=k4().createApp(...t),{mount:n}=e;return e.mount=r=>{const i=E4(r);if(!i)return;const s=e._component;!qe(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const o=n(i,!1,A4(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e},gv=(...t)=>{const e=S4().createApp(...t),{mount:n}=e;return e.mount=r=>{const i=E4(r);if(i)return n(i,!0,A4(i))},e};function A4(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function E4(t){return Mt(t)?document.querySelector(t):t}let Hf=!1;const ZH=()=>{Hf||(Hf=!0,uv(),N9())};var mv=!1;/*!
 * pinia v2.2.2
 * (c) 2024 Eduardo San Martin Morote
 * @license MIT
 */let $4;const C0=t=>$4=t,T4=Symbol();function Bd(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Uo;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Uo||(Uo={}));function vv(){const t=Yg(!0),e=t.run(()=>re({}));let n=[],r=[];const i=Jt({install(s){C0(i),i._a=s,s.provide(T4,i),s.config.globalProperties.$pinia=i,r.forEach(o=>n.push(o)),r=[]},use(s){return!this._a&&!mv?r.push(s):n.push(s),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}const P4=()=>{};function Vf(t,e,n,r=P4){t.push(e);const i=()=>{const s=t.indexOf(e);s>-1&&(t.splice(s,1),r())};return!n&&x1()&&Xg(i),i}function ys(t,...e){t.slice().forEach(n=>{n(...e)})}const _v=t=>t(),Gf=Symbol(),tu=Symbol();function Fd(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,r)=>t.set(r,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n],i=t[n];Bd(i)&&Bd(r)&&t.hasOwnProperty(n)&&!Nt(r)&&!yr(r)?t[n]=Fd(i,r):t[n]=r}return t}const bv=Symbol();function xv(t){return!Bd(t)||!t.hasOwnProperty(bv)}const{assign:Jr}=Object;function yv(t){return!!(Nt(t)&&t.effect)}function wv(t,e,n,r){const{state:i,actions:s,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=i?i():{});const u=v3(n.state.value[t]);return Jr(u,s,Object.keys(o||{}).reduce((h,p)=>(h[p]=Jt(Le(()=>{C0(n);const d=n._s.get(t);return o[p].call(d,d)})),h),{}))}return l=D4(t,c,e,n,r,!0),l}function D4(t,e,n={},r,i,s){let o;const a=Jr({actions:{}},n),l={deep:!0};let c,u,h=[],p=[],d;const g=r.state.value[t];!s&&!g&&(r.state.value[t]={}),re({});let v;function x($){let D;c=u=!1,typeof $=="function"?($(r.state.value[t]),D={type:Uo.patchFunction,storeId:t,events:d}):(Fd(r.state.value[t],$),D={type:Uo.patchObject,payload:$,storeId:t,events:d});const S=v=Symbol();li().then(()=>{v===S&&(c=!0)}),u=!0,ys(h,D,r.state.value[t])}const y=s?function(){const{state:D}=n,S=D?D():{};this.$patch(F=>{Jr(F,S)})}:P4;function _(){o.stop(),h=[],p=[],r._s.delete(t)}const f=($,D="")=>{if(Gf in $)return $[tu]=D,$;const S=function(){C0(r);const F=Array.from(arguments),A=[],E=[];function T(J){A.push(J)}function L(J){E.push(J)}ys(p,{args:F,name:S[tu],store:w,after:T,onError:L});let X;try{X=$.apply(this&&this.$id===t?this:w,F)}catch(J){throw ys(E,J),J}return X instanceof Promise?X.then(J=>(ys(A,J),J)).catch(J=>(ys(E,J),Promise.reject(J))):(ys(A,X),X)};return S[Gf]=!0,S[tu]=D,S},b={_p:r,$id:t,$onAction:Vf.bind(null,p),$patch:x,$reset:y,$subscribe($,D={}){const S=Vf(h,$,D.detached,()=>F()),F=o.run(()=>at(()=>r.state.value[t],A=>{(D.flush==="sync"?u:c)&&$({storeId:t,type:Uo.direct,events:d},A)},Jr({},l,D)));return S},$dispose:_},w=Pt(b);r._s.set(t,w);const P=(r._a&&r._a.runWithContext||_v)(()=>r._e.run(()=>(o=Yg()).run(()=>e({action:f}))));for(const $ in P){const D=P[$];if(Nt(D)&&!yv(D)||yr(D))s||(g&&xv(D)&&(Nt(D)?D.value=g[$]:Fd(D,g[$])),r.state.value[t][$]=D);else if(typeof D=="function"){const S=f(D,$);P[$]=S,a.actions[$]=D}}return Jr(w,P),Jr(ft(w),P),Object.defineProperty(w,"$state",{get:()=>r.state.value[t],set:$=>{x(D=>{Jr(D,$)})}}),r._p.forEach($=>{Jr(w,o.run(()=>$({store:w,app:r._a,pinia:r,options:a})))}),g&&s&&n.hydrate&&n.hydrate(w.$state,g),c=!0,u=!0,w}function no(t,e,n){let r,i;const s=typeof e=="function";typeof t=="string"?(r=t,i=s?n:e):(i=t,r=t.id);function o(a,l){const c=Xm();return a=a||(c?vt(T4,null):null),a&&C0(a),a=$4,a._s.has(r)||(s?D4(r,e,i,a):wv(r,i,a)),a._s.get(r)}return o.$id=r,o}function Cv(t){{t=ft(t);const e={};for(const n in t){const r=t[n];(Nt(r)||yr(r))&&(e[n]=gm(t,n))}return e}}function kv(t){return typeof t=="object"&&t!==null}function Wf(t,e){return t=kv(t)?t:Object.create(null),new Proxy(t,{get(n,r,i){return r==="key"?Reflect.get(n,r,i):Reflect.get(n,r,i)||Reflect.get(e,r,i)}})}function Sv(t,e){return e.reduce((n,r)=>n==null?void 0:n[r],t)}function Av(t,e,n){return e.slice(0,-1).reduce((r,i)=>/^(__proto__)$/.test(i)?{}:r[i]=r[i]||{},t)[e[e.length-1]]=n,t}function Ev(t,e){return e.reduce((n,r)=>{const i=r.split(".");return Av(n,i,Sv(t,i))},{})}function $v(t,e){return n=>{var r;try{const{storage:i=localStorage,beforeRestore:s=void 0,afterRestore:o=void 0,serializer:a={serialize:JSON.stringify,deserialize:JSON.parse},key:l=e.$id,paths:c=null,debug:u=!1}=n;return{storage:i,beforeRestore:s,afterRestore:o,serializer:a,key:((r=t.key)!=null?r:h=>h)(typeof l=="string"?l:l(e.$id)),paths:c,debug:u}}catch(i){return n.debug&&console.error("[pinia-plugin-persistedstate]",i),null}}}function qf(t,{storage:e,serializer:n,key:r,debug:i}){try{const s=e==null?void 0:e.getItem(r);s&&t.$patch(n==null?void 0:n.deserialize(s))}catch(s){i&&console.error("[pinia-plugin-persistedstate]",s)}}function Kf(t,{storage:e,serializer:n,key:r,paths:i,debug:s}){try{const o=Array.isArray(i)?Ev(t,i):t;e.setItem(r,n.serialize(o))}catch(o){s&&console.error("[pinia-plugin-persistedstate]",o)}}function Tv(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:r=n},store:i,pinia:s}=e;if(!r)return;if(!(i.$id in s.state.value)){const a=s._s.get(i.$id.replace("__hot:",""));a&&Promise.resolve().then(()=>a.$persist());return}const o=(Array.isArray(r)?r.map(a=>Wf(a,t)):[Wf(r,t)]).map($v(t,i)).filter(Boolean);i.$persist=()=>{o.forEach(a=>{Kf(i.$state,a)})},i.$hydrate=({runHooks:a=!0}={})=>{o.forEach(l=>{const{beforeRestore:c,afterRestore:u}=l;a&&(c==null||c(e)),qf(i,l),a&&(u==null||u(e))})},o.forEach(a=>{const{beforeRestore:l,afterRestore:c}=a;l==null||l(e),qf(i,a),c==null||c(e),i.$subscribe((u,h)=>{Kf(h,a)},{detached:!0})})}}var Pv=Tv();function Dv(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(i){i(n)}),(r=t.get("*"))&&r.slice().map(function(i){i(e,n)})}}}var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function k0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Bv(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var B4={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(typeof self<"u"?self:Ke,function(){return function(n){var r={};function i(s){if(r[s])return r[s].exports;var o=r[s]={i:s,l:!1,exports:{}};return n[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=n,i.c=r,i.d=function(s,o,a){i.o(s,o)||Object.defineProperty(s,o,{enumerable:!0,get:a})},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,o){if(1&o&&(s=i(s)),8&o||4&o&&typeof s=="object"&&s&&s.__esModule)return s;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:s}),2&o&&typeof s!="string")for(var l in s)i.d(a,l,(function(c){return s[c]}).bind(null,l));return a},i.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(o,"a",o),o},i.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},i.p="",i(i.s=1)}([function(n,r,i){(function(s){function o(K,G){const ie=Object.create(null),he=K.split(",");for(let ge=0;ge<he.length;ge++)ie[he[ge]]=!0;return G?ge=>!!ie[ge.toLowerCase()]:ge=>!!ie[ge]}i.d(r,"a",function(){return b}),i.d(r,"b",function(){return f}),i.d(r,"c",function(){return k}),i.d(r,"d",function(){return w}),i.d(r,"e",function(){return ue}),i.d(r,"f",function(){return z}),i.d(r,"g",function(){return I}),i.d(r,"h",function(){return S}),i.d(r,"i",function(){return te}),i.d(r,"j",function(){return O}),i.d(r,"k",function(){return E}),i.d(r,"l",function(){return xe}),i.d(r,"m",function(){return H}),i.d(r,"n",function(){return T}),i.d(r,"o",function(){return ne}),i.d(r,"p",function(){return a}),i.d(r,"q",function(){return v}),i.d(r,"r",function(){return fe}),i.d(r,"s",function(){return L}),i.d(r,"t",function(){return D}),i.d(r,"u",function(){return j}),i.d(r,"v",function(){return $}),i.d(r,"w",function(){return V}),i.d(r,"x",function(){return M}),i.d(r,"y",function(){return x}),i.d(r,"z",function(){return X}),i.d(r,"A",function(){return c}),i.d(r,"B",function(){return se}),i.d(r,"C",function(){return ce}),i.d(r,"D",function(){return y}),i.d(r,"E",function(){return _}),i.d(r,"F",function(){return o}),i.d(r,"G",function(){return g}),i.d(r,"H",function(){return u}),i.d(r,"I",function(){return F}),i.d(r,"J",function(){return C}),i.d(r,"K",function(){return R}),i.d(r,"L",function(){return Q});const a=o("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),l="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",c=o(l);function u(K){if(T(K)){const G={};for(let ie=0;ie<K.length;ie++){const he=K[ie],ge=u(se(he)?d(he):he);if(ge)for(const be in ge)G[be]=ge[be]}return G}if(j(K))return K}const h=/;(?![^(]*\))/g,p=/:(.+)/;function d(K){const G={};return K.split(h).forEach(ie=>{if(ie){const he=ie.split(p);he.length>1&&(G[he[0].trim()]=he[1].trim())}}),G}function g(K){let G="";if(se(K))G=K;else if(T(K))for(let ie=0;ie<K.length;ie++){const he=g(K[ie]);he&&(G+=he+" ")}else if(j(K))for(const ie in K)K[ie]&&(G+=ie+" ");return G.trim()}const v=o("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),x=o("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view");function y(K,G){if(K===G)return!0;let ie=J(K),he=J(G);if(ie||he)return!(!ie||!he)&&K.getTime()===G.getTime();if(ie=T(K),he=T(G),ie||he)return!(!ie||!he)&&function(ge,be){if(ge.length!==be.length)return!1;let $e=!0;for(let Be=0;$e&&Be<ge.length;Be++)$e=y(ge[Be],be[Be]);return $e}(K,G);if(ie=j(K),he=j(G),ie||he){if(!ie||!he||Object.keys(K).length!==Object.keys(G).length)return!1;for(const ge in K){const be=K.hasOwnProperty(ge),$e=G.hasOwnProperty(ge);if(be&&!$e||!be&&$e||!y(K[ge],G[ge]))return!1}}return String(K)===String(G)}function _(K,G){return K.findIndex(ie=>y(ie,G))}const f={},b=[],w=()=>{},k=()=>!1,P=/^on[^a-z]/,$=K=>P.test(K),D=K=>K.startsWith("onUpdate:"),S=Object.assign,F=(K,G)=>{const ie=K.indexOf(G);ie>-1&&K.splice(ie,1)},A=Object.prototype.hasOwnProperty,E=(K,G)=>A.call(K,G),T=Array.isArray,L=K=>N(K)==="[object Map]",X=K=>N(K)==="[object Set]",J=K=>K instanceof Date,ne=K=>typeof K=="function",se=K=>typeof K=="string",ce=K=>typeof K=="symbol",j=K=>K!==null&&typeof K=="object",V=K=>j(K)&&ne(K.then)&&ne(K.catch),oe=Object.prototype.toString,N=K=>oe.call(K),Q=K=>N(K).slice(8,-1),fe=K=>se(K)&&K!=="NaN"&&K[0]!=="-"&&""+parseInt(K,10)===K,M=o(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),q=K=>{const G=Object.create(null);return ie=>G[ie]||(G[ie]=K(ie))},ee=/-(\w)/g,ue=q(K=>K.replace(ee,(G,ie)=>ie?ie.toUpperCase():"")),me=/\B([A-Z])/g,xe=q(K=>K.replace(me,"-$1").toLowerCase()),z=q(K=>K.charAt(0).toUpperCase()+K.slice(1)),C=q(K=>K?"on"+z(K):""),O=(K,G)=>K!==G&&(K==K||G==G),H=(K,G)=>{for(let ie=0;ie<K.length;ie++)K[ie](G)},I=(K,G,ie)=>{Object.defineProperty(K,G,{configurable:!0,enumerable:!1,value:ie})},R=K=>{const G=parseFloat(K);return isNaN(G)?K:G};let Y;const te=()=>Y||(Y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:s!==void 0?s:{})}).call(this,i(2))},function(n,r,i){n.exports=i(3)},function(n,r){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}n.exports=i},function(n,r,i){i.r(r),i.d(r,"ShareNetwork",function(){return zc});var s=i(0);const o=new WeakMap,a=[];let l;const c=Symbol(""),u=Symbol("");function h(B,W=s.b){(function(pe){return pe&&pe._isEffect===!0})(B)&&(B=B.raw);const ae=function(pe,_e){const ye=function(){if(!ye.active)return _e.scheduler?void 0:pe();if(!a.includes(ye)){g(ye);try{return x.push(v),v=!0,a.push(ye),l=ye,pe()}finally{a.pop(),_(),l=a[a.length-1]}}};return ye.id=d++,ye.allowRecurse=!!_e.allowRecurse,ye._isEffect=!0,ye.active=!0,ye.raw=pe,ye.deps=[],ye.options=_e,ye}(B,W);return W.lazy||ae(),ae}function p(B){B.active&&(g(B),B.options.onStop&&B.options.onStop(),B.active=!1)}let d=0;function g(B){const{deps:W}=B;if(W.length){for(let ae=0;ae<W.length;ae++)W[ae].delete(B);W.length=0}}let v=!0;const x=[];function y(){x.push(v),v=!1}function _(){const B=x.pop();v=B===void 0||B}function f(B,W,ae){if(!v||l===void 0)return;let pe=o.get(B);pe||o.set(B,pe=new Map);let _e=pe.get(ae);_e||pe.set(ae,_e=new Set),_e.has(l)||(_e.add(l),l.deps.push(_e))}function b(B,W,ae,pe,_e,ye){const Ce=o.get(B);if(!Ce)return;const Te=new Set,Re=ke=>{ke&&ke.forEach(Pe=>{(Pe!==l||Pe.allowRecurse)&&Te.add(Pe)})};if(W==="clear")Ce.forEach(Re);else if(ae==="length"&&Object(s.n)(B))Ce.forEach((ke,Pe)=>{(Pe==="length"||Pe>=pe)&&Re(ke)});else switch(ae!==void 0&&Re(Ce.get(ae)),W){case"add":Object(s.n)(B)?Object(s.r)(ae)&&Re(Ce.get("length")):(Re(Ce.get(c)),Object(s.s)(B)&&Re(Ce.get(u)));break;case"delete":Object(s.n)(B)||(Re(Ce.get(c)),Object(s.s)(B)&&Re(Ce.get(u)));break;case"set":Object(s.s)(B)&&Re(Ce.get(c))}Te.forEach(ke=>{ke.options.scheduler?ke.options.scheduler(ke):ke()})}const w=Object(s.F)("__proto__,__v_isRef,__isVue"),k=new Set(Object.getOwnPropertyNames(Symbol).map(B=>Symbol[B]).filter(s.C)),P=A(),$=A(!1,!0),D=A(!0),S=A(!0,!0),F={};function A(B=!1,W=!1){return function(ae,pe,_e){if(pe==="__v_isReactive")return!B;if(pe==="__v_isReadonly")return B;if(pe==="__v_raw"&&_e===(B?W?G:K:W?te:Y).get(ae))return ae;const ye=Object(s.n)(ae);if(!B&&ye&&Object(s.k)(F,pe))return Reflect.get(F,pe,_e);const Ce=Reflect.get(ae,pe,_e);return(Object(s.C)(pe)?k.has(pe):w(pe))||(B||f(ae,0,pe),W)?Ce:Qe(Ce)?!ye||!Object(s.r)(pe)?Ce.value:Ce:Object(s.u)(Ce)?B?he(Ce):ie(Ce):Ce}}["includes","indexOf","lastIndexOf"].forEach(B=>{const W=Array.prototype[B];F[B]=function(...ae){const pe=De(this);for(let ye=0,Ce=this.length;ye<Ce;ye++)f(pe,0,ye+"");const _e=W.apply(pe,ae);return _e===-1||_e===!1?W.apply(pe,ae.map(De)):_e}}),["push","pop","shift","unshift","splice"].forEach(B=>{const W=Array.prototype[B];F[B]=function(...ae){y();const pe=W.apply(this,ae);return _(),pe}});const E=L(),T=L(!0);function L(B=!1){return function(W,ae,pe,_e){let ye=W[ae];if(!B&&(pe=De(pe),ye=De(ye),!Object(s.n)(W)&&Qe(ye)&&!Qe(pe)))return ye.value=pe,!0;const Ce=Object(s.n)(W)&&Object(s.r)(ae)?Number(ae)<W.length:Object(s.k)(W,ae),Te=Reflect.set(W,ae,pe,_e);return W===De(_e)&&(Ce?Object(s.j)(pe,ye)&&b(W,"set",ae,pe):b(W,"add",ae,pe)),Te}}const X={get:P,set:E,deleteProperty:function(B,W){const ae=Object(s.k)(B,W),pe=(B[W],Reflect.deleteProperty(B,W));return pe&&ae&&b(B,"delete",W,void 0),pe},has:function(B,W){const ae=Reflect.has(B,W);return Object(s.C)(W)&&k.has(W)||f(B,0,W),ae},ownKeys:function(B){return f(B,0,Object(s.n)(B)?"length":c),Reflect.ownKeys(B)}},J={get:D,set:(B,W)=>!0,deleteProperty:(B,W)=>!0},ne=(Object(s.h)({},X,{get:$,set:T}),Object(s.h)({},J,{get:S}),B=>Object(s.u)(B)?ie(B):B),se=B=>Object(s.u)(B)?he(B):B,ce=B=>B,j=B=>Reflect.getPrototypeOf(B);function V(B,W,ae=!1,pe=!1){const _e=De(B=B.__v_raw),ye=De(W);W!==ye&&!ae&&f(_e,0,W),!ae&&f(_e,0,ye);const{has:Ce}=j(_e),Te=pe?ce:ae?se:ne;return Ce.call(_e,W)?Te(B.get(W)):Ce.call(_e,ye)?Te(B.get(ye)):void 0}function oe(B,W=!1){const ae=this.__v_raw,pe=De(ae),_e=De(B);return B!==_e&&!W&&f(pe,0,B),!W&&f(pe,0,_e),B===_e?ae.has(B):ae.has(B)||ae.has(_e)}function N(B,W=!1){return B=B.__v_raw,!W&&f(De(B),0,c),Reflect.get(B,"size",B)}function Q(B){B=De(B);const W=De(this);return j(W).has.call(W,B)||(W.add(B),b(W,"add",B,B)),this}function fe(B,W){W=De(W);const ae=De(this),{has:pe,get:_e}=j(ae);let ye=pe.call(ae,B);ye||(B=De(B),ye=pe.call(ae,B));const Ce=_e.call(ae,B);return ae.set(B,W),ye?Object(s.j)(W,Ce)&&b(ae,"set",B,W):b(ae,"add",B,W),this}function M(B){const W=De(this),{has:ae,get:pe}=j(W);let _e=ae.call(W,B);_e||(B=De(B),_e=ae.call(W,B)),pe&&pe.call(W,B);const ye=W.delete(B);return _e&&b(W,"delete",B,void 0),ye}function q(){const B=De(this),W=B.size!==0,ae=B.clear();return W&&b(B,"clear",void 0,void 0),ae}function ee(B,W){return function(ae,pe){const _e=this,ye=_e.__v_raw,Ce=De(ye),Te=W?ce:B?se:ne;return!B&&f(Ce,0,c),ye.forEach((Re,ke)=>ae.call(pe,Te(Re),Te(ke),_e))}}function ue(B,W,ae){return function(...pe){const _e=this.__v_raw,ye=De(_e),Ce=Object(s.s)(ye),Te=B==="entries"||B===Symbol.iterator&&Ce,Re=B==="keys"&&Ce,ke=_e[B](...pe),Pe=ae?ce:W?se:ne;return!W&&f(ye,0,Re?u:c),{next(){const{value:Ie,done:Me}=ke.next();return Me?{value:Ie,done:Me}:{value:Te?[Pe(Ie[0]),Pe(Ie[1])]:Pe(Ie),done:Me}},[Symbol.iterator](){return this}}}}function me(B){return function(...W){return B!=="delete"&&this}}const xe={get(B){return V(this,B)},get size(){return N(this)},has:oe,add:Q,set:fe,delete:M,clear:q,forEach:ee(!1,!1)},z={get(B){return V(this,B,!1,!0)},get size(){return N(this)},has:oe,add:Q,set:fe,delete:M,clear:q,forEach:ee(!1,!0)},C={get(B){return V(this,B,!0)},get size(){return N(this,!0)},has(B){return oe.call(this,B,!0)},add:me("add"),set:me("set"),delete:me("delete"),clear:me("clear"),forEach:ee(!0,!1)},O={get(B){return V(this,B,!0,!0)},get size(){return N(this,!0)},has(B){return oe.call(this,B,!0)},add:me("add"),set:me("set"),delete:me("delete"),clear:me("clear"),forEach:ee(!0,!0)};function H(B,W){const ae=W?B?O:z:B?C:xe;return(pe,_e,ye)=>_e==="__v_isReactive"?!B:_e==="__v_isReadonly"?B:_e==="__v_raw"?pe:Reflect.get(Object(s.k)(ae,_e)&&_e in pe?ae:pe,_e,ye)}["keys","values","entries",Symbol.iterator].forEach(B=>{xe[B]=ue(B,!1,!1),C[B]=ue(B,!0,!1),z[B]=ue(B,!1,!0),O[B]=ue(B,!0,!0)});const I={get:H(!1,!1)},R={get:H(!0,!1)},Y=new WeakMap,te=new WeakMap,K=new WeakMap,G=new WeakMap;function ie(B){return B&&B.__v_isReadonly?B:ge(B,!1,X,I,Y)}function he(B){return ge(B,!0,J,R,K)}function ge(B,W,ae,pe,_e){if(!Object(s.u)(B)||B.__v_raw&&(!W||!B.__v_isReactive))return B;const ye=_e.get(B);if(ye)return ye;const Ce=(Te=B).__v_skip||!Object.isExtensible(Te)?0:function(ke){switch(ke){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(Object(s.L)(Te));var Te;if(Ce===0)return B;const Re=new Proxy(B,Ce===2?pe:ae);return _e.set(B,Re),Re}function be(B){return $e(B)?be(B.__v_raw):!(!B||!B.__v_isReactive)}function $e(B){return!(!B||!B.__v_isReadonly)}function Be(B){return be(B)||$e(B)}function De(B){return B&&De(B.__v_raw)||B}function Qe(B){return!!(B&&B.__v_isRef===!0)}function Ge(B,W,ae,pe){let _e;try{_e=pe?B(...pe):B()}catch(ye){Je(ye,W,ae)}return _e}function _t(B,W,ae,pe){if(Object(s.o)(B)){const ye=Ge(B,W,ae,pe);return ye&&Object(s.w)(ye)&&ye.catch(Ce=>{Je(Ce,W,ae)}),ye}const _e=[];for(let ye=0;ye<B.length;ye++)_e.push(_t(B[ye],W,ae,pe));return _e}function Je(B,W,ae,pe=!0){if(W&&W.vnode,W){let _e=W.parent;const ye=W.proxy,Ce=ae;for(;_e;){const Re=_e.ec;if(Re){for(let ke=0;ke<Re.length;ke++)if(Re[ke](B,ye,Ce)===!1)return}_e=_e.parent}const Te=W.appContext.config.errorHandler;if(Te)return void Ge(Te,null,10,[B,ye,Ce])}(function(_e,ye,Ce,Te=!0){console.error(_e)})(B,0,0,pe)}let Gt=!1,hn=!1;const rt=[];let $t=0;const Cn=[];let hr=null,Zn=0;const pr=[];let cn=null,In=0;const $a=Promise.resolve();let ho=null,ds=null;function Tc(B){const W=ho||$a;return B?W.then(this?B.bind(this):B):W}function Pc(B){if(!(rt.length&&rt.includes(B,Gt&&B.allowRecurse?$t+1:$t)||B===ds)){const W=function(ae){let pe=$t+1,_e=rt.length;const ye=Pr(ae);for(;pe<_e;){const Ce=pe+_e>>>1;Pr(rt[Ce])<ye?pe=Ce+1:_e=Ce}return pe}(B);W>-1?rt.splice(W,0,B):rt.push(B),po()}}function po(){Gt||hn||(hn=!0,ho=$a.then(Da))}function Ta(B,W,ae,pe){Object(s.n)(B)?ae.push(...B):W&&W.includes(B,B.allowRecurse?pe+1:pe)||ae.push(B),po()}function Pa(B){Ta(B,cn,pr,In)}function pn(B,W=null){if(Cn.length){for(ds=W,hr=[...new Set(Cn)],Cn.length=0,Zn=0;Zn<hr.length;Zn++)hr[Zn]();hr=null,Zn=0,ds=null,pn(B,W)}}function gr(B){if(pr.length){const W=[...new Set(pr)];if(pr.length=0,cn)return void cn.push(...W);for(cn=W,cn.sort((ae,pe)=>Pr(ae)-Pr(pe)),In=0;In<cn.length;In++)cn[In]();cn=null,In=0}}const Pr=B=>B.id==null?1/0:B.id;function Da(B){hn=!1,Gt=!0,pn(B),rt.sort((W,ae)=>Pr(W)-Pr(ae));try{for($t=0;$t<rt.length;$t++){const W=rt[$t];W&&Ge(W,null,14)}}finally{$t=0,rt.length=0,gr(),Gt=!1,ho=null,(rt.length||pr.length)&&Da(B)}}let Q8=0;const E2=B=>Q8+=B;let fs=null,J8=null;function e6(B){let W;for(let ae=0;ae<B.length;ae++){const pe=B[ae];if(!Ba(pe))return;if(pe.type!==ps||pe.children==="v-if"){if(W)return;W=pe}}return W}function Dc(B){return Object(s.o)(B)&&(B=B()),Object(s.n)(B)&&(B=e6(B)),U2(B)}function t6(B,W){W&&W.pendingBranch?Object(s.n)(B)?W.effects.push(...B):W.effects.push(B):Pa(B)}function n6(B,W,ae=gs,pe=!1){if(ae){const _e=ae[B]||(ae[B]=[]),ye=W.__weh||(W.__weh=(...Ce)=>{if(ae.isUnmounted)return;y(),H2(ae);const Te=_t(W,ae,B,Ce);return H2(null),_(),Te});return pe?_e.unshift(ye):_e.push(ye),ye}}const $2=B=>(W,ae=gs)=>n6(B,W,ae),r6=$2("m"),i6=$2("bum"),T2={};function s6(B,W,{immediate:ae,deep:pe,flush:_e,onTrack:ye,onTrigger:Ce}=s.b,Te=gs){let Re,ke,Pe=!1;if(Qe(B)?(Re=()=>B.value,Pe=!!B._shallow):be(B)?(Re=()=>B,pe=!0):Re=Object(s.n)(B)?()=>B.map(xt=>Qe(xt)?xt.value:be(xt)?hs(xt):Object(s.o)(xt)?Ge(xt,Te,2,[Te&&Te.proxy]):void 0):Object(s.o)(B)?W?()=>Ge(B,Te,2,[Te&&Te.proxy]):()=>{if(!Te||!Te.isUnmounted)return ke&&ke(),_t(B,Te,3,[Ie])}:s.d,W&&pe){const xt=Re;Re=()=>hs(xt())}let Ie=xt=>{ke=Ft.options.onStop=()=>{Ge(xt,Te,4)}},Me=Object(s.n)(B)?[]:T2;const ot=()=>{if(Ft.active)if(W){const xt=Ft();(pe||Pe||Object(s.j)(xt,Me))&&(ke&&ke(),_t(W,Te,3,[xt,Me===T2?void 0:Me,Ie]),Me=xt)}else Ft()};let Wt;ot.allowRecurse=!!W,Wt=_e==="sync"?ot:_e==="post"?()=>I2(ot,Te&&Te.suspense):()=>{!Te||Te.isMounted?function(xt){Ta(xt,hr,Cn,Zn)}(ot):ot()};const Ft=h(Re,{lazy:!0,onTrack:ye,onTrigger:Ce,scheduler:Wt});return g6(Ft,Te),W?ae?ot():Me=Ft():_e==="post"?I2(Ft,Te&&Te.suspense):Ft(),()=>{p(Ft),Te&&Object(s.I)(Te.effects,Ft)}}function o6(B,W,ae){const pe=this.proxy;return s6(Object(s.B)(B)?()=>pe[B]:B.bind(pe),W.bind(pe),ae,this)}function hs(B,W=new Set){if(!Object(s.u)(B)||W.has(B))return B;if(W.add(B),Qe(B))hs(B.value,W);else if(Object(s.n)(B))for(let ae=0;ae<B.length;ae++)hs(B[ae],W);else if(Object(s.z)(B)||Object(s.s)(B))B.forEach(ae=>{hs(ae,W)});else for(const ae in B)hs(B[ae],W);return B}function a6(){const B={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return r6(()=>{B.isMounted=!0}),i6(()=>{B.isUnmounting=!0}),B}const Un=[Function,Array],l6={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Un,onEnter:Un,onAfterEnter:Un,onEnterCancelled:Un,onBeforeLeave:Un,onLeave:Un,onAfterLeave:Un,onLeaveCancelled:Un,onBeforeAppear:Un,onAppear:Un,onAfterAppear:Un,onAppearCancelled:Un},setup(B,{slots:W}){const ae=h6(),pe=a6();let _e;return()=>{const ye=W.default&&B2(W.default(),!0);if(!ye||!ye.length)return;const Ce=De(B),{mode:Te}=Ce,Re=ye[0];if(pe.isLeaving)return Fc(Re);const ke=D2(Re);if(!ke)return Fc(Re);const Pe=Bc(ke,Ce,pe,ae);Ic(ke,Pe);const Ie=ae.subTree,Me=Ie&&D2(Ie);let ot=!1;const{getTransitionKey:Wt}=ke.type;if(Wt){const Ft=Wt();_e===void 0?_e=Ft:Ft!==_e&&(_e=Ft,ot=!0)}if(Me&&Me.type!==ps&&(!M2(ke,Me)||ot)){const Ft=Bc(Me,Ce,pe,ae);if(Ic(Me,Ft),Te==="out-in")return pe.isLeaving=!0,Ft.afterLeave=()=>{pe.isLeaving=!1,ae.update()},Fc(Re);Te==="in-out"&&ke.type!==ps&&(Ft.delayLeave=(xt,mo,ms)=>{P2(pe,Me)[String(Me.key)]=Me,xt._leaveCb=()=>{mo(),xt._leaveCb=void 0,delete Pe.delayedLeave},Pe.delayedLeave=ms})}return Re}}};function P2(B,W){const{leavingVNodes:ae}=B;let pe=ae.get(W.type);return pe||(pe=Object.create(null),ae.set(W.type,pe)),pe}function Bc(B,W,ae,pe){const{appear:_e,mode:ye,persisted:Ce=!1,onBeforeEnter:Te,onEnter:Re,onAfterEnter:ke,onEnterCancelled:Pe,onBeforeLeave:Ie,onLeave:Me,onAfterLeave:ot,onLeaveCancelled:Wt,onBeforeAppear:Ft,onAppear:xt,onAfterAppear:mo,onAppearCancelled:ms}=W,k6=String(B.key),Oa=P2(ae,B),Ma=(qt,jn)=>{qt&&_t(qt,pe,9,jn)},jc={mode:ye,persisted:Ce,beforeEnter(qt){let jn=Te;if(!ae.isMounted){if(!_e)return;jn=Ft||Te}qt._leaveCb&&qt._leaveCb(!0);const Yn=Oa[k6];Yn&&M2(B,Yn)&&Yn.el._leaveCb&&Yn.el._leaveCb(),Ma(jn,[qt])},enter(qt){let jn=Re,Yn=ke,vo=Pe;if(!ae.isMounted){if(!_e)return;jn=xt||Re,Yn=mo||ke,vo=ms||Pe}let vs=!1;const _o=qt._enterCb=S6=>{vs||(vs=!0,Ma(S6?vo:Yn,[qt]),jc.delayedLeave&&jc.delayedLeave(),qt._enterCb=void 0)};jn?(jn(qt,_o),jn.length<=1&&_o()):_o()},leave(qt,jn){const Yn=String(B.key);if(qt._enterCb&&qt._enterCb(!0),ae.isUnmounting)return jn();Ma(Ie,[qt]);let vo=!1;const vs=qt._leaveCb=_o=>{vo||(vo=!0,jn(),Ma(_o?Wt:ot,[qt]),qt._leaveCb=void 0,Oa[Yn]===B&&delete Oa[Yn])};Oa[Yn]=B,Me?(Me(qt,vs),Me.length<=1&&vs()):vs()},clone:qt=>Bc(qt,W,ae,pe)};return jc}function Fc(B){if(F2(B))return(B=go(B)).children=null,B}function D2(B){return F2(B)?B.children?B.children[0]:void 0:B}function Ic(B,W){6&B.shapeFlag&&B.component?Ic(B.component.subTree,W):128&B.shapeFlag?(B.ssContent.transition=W.clone(B.ssContent),B.ssFallback.transition=W.clone(B.ssFallback)):B.transition=W}function B2(B,W=!1){let ae=[],pe=0;for(let _e=0;_e<B.length;_e++){const ye=B[_e];ye.type===Rc?(128&ye.patchFlag&&pe++,ae=ae.concat(B2(ye.children,W))):(W||ye.type!==ps)&&ae.push(ye)}if(pe>1)for(let _e=0;_e<ae.length;_e++)ae[_e].patchFlag=-2;return ae}const F2=B=>B.type.__isKeepAlive;function c6(){return{app:null,config:{isNativeTag:s.c,performance:!1,globalProperties:{},optionMergeStrategies:{},isCustomElement:s.c,errorHandler:void 0,warnHandler:void 0},mixins:[],components:{},directives:{},provides:Object.create(null)}}const I2=t6,u6=Symbol(),Rc=Symbol(void 0),R2=Symbol(void 0),ps=Symbol(void 0);let O2=null;function Ba(B){return!!B&&B.__v_isVNode===!0}function M2(B,W){return B.type===W.type&&B.key===W.key}const L2="__vInternal",N2=({key:B})=>B??null,Fa=({ref:B})=>B!=null?Object(s.B)(B)||Qe(B)||Object(s.o)(B)?{i:fs,r:B}:B:null,qr=d6;function d6(B,W=null,ae=null,pe=0,_e=null,ye=!1){if(B&&B!==u6||(B=ps),Ba(B)){const Re=go(B,W,!0);return ae&&Oc(Re,ae),Re}if(m6(B)&&(B=B.__vccOpts),W){(Be(W)||L2 in W)&&(W=Object(s.h)({},W));let{class:Re,style:ke}=W;Re&&!Object(s.B)(Re)&&(W.class=Object(s.G)(Re)),Object(s.u)(ke)&&(Be(ke)&&!Object(s.n)(ke)&&(ke=Object(s.h)({},ke)),W.style=Object(s.H)(ke))}const Ce=Object(s.B)(B)?1:(Re=>Re.__isSuspense)(B)?128:(Re=>Re.__isTeleport)(B)?64:Object(s.u)(B)?4:Object(s.o)(B)?2:0,Te={__v_isVNode:!0,__v_skip:!0,type:B,props:W,key:W&&N2(W),ref:W&&Fa(W),scopeId:J8,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:Ce,patchFlag:pe,dynamicProps:_e,dynamicChildren:null,appContext:null};if(Oc(Te,ae),128&Ce){const{content:Re,fallback:ke}=function(Pe){const{shapeFlag:Ie,children:Me}=Pe;let ot,Wt;return 32&Ie?(ot=Dc(Me.default),Wt=Dc(Me.fallback)):(ot=Dc(Me),Wt=U2(null)),{content:ot,fallback:Wt}}(Te);Te.ssContent=Re,Te.ssFallback=ke}return!ye&&O2&&(pe>0||6&Ce)&&pe!==32&&O2.push(Te),Te}function go(B,W,ae=!1){const{props:pe,ref:_e,patchFlag:ye,children:Ce}=B,Te=W?function(...Re){const ke=Object(s.h)({},Re[0]);for(let Pe=1;Pe<Re.length;Pe++){const Ie=Re[Pe];for(const Me in Ie)if(Me==="class")ke.class!==Ie.class&&(ke.class=Object(s.G)([ke.class,Ie.class]));else if(Me==="style")ke.style=Object(s.H)([ke.style,Ie.style]);else if(Object(s.v)(Me)){const ot=ke[Me],Wt=Ie[Me];ot!==Wt&&(ke[Me]=ot?[].concat(ot,Ie[Me]):Wt)}else Me!==""&&(ke[Me]=Ie[Me])}return ke}(pe||{},W):pe;return{__v_isVNode:!0,__v_skip:!0,type:B.type,props:Te,key:Te&&N2(Te),ref:W&&W.ref?ae&&_e?Object(s.n)(_e)?_e.concat(Fa(W)):[_e,Fa(W)]:Fa(W):_e,scopeId:B.scopeId,slotScopeIds:B.slotScopeIds,children:Ce,target:B.target,targetAnchor:B.targetAnchor,staticCount:B.staticCount,shapeFlag:B.shapeFlag,patchFlag:W&&B.type!==Rc?ye===-1?16:16|ye:ye,dynamicProps:B.dynamicProps,dynamicChildren:B.dynamicChildren,appContext:B.appContext,dirs:B.dirs,transition:B.transition,component:B.component,suspense:B.suspense,ssContent:B.ssContent&&go(B.ssContent),ssFallback:B.ssFallback&&go(B.ssFallback),el:B.el,anchor:B.anchor}}function f6(B=" ",W=0){return qr(R2,null,B,W)}function U2(B){return B==null||typeof B=="boolean"?qr(ps):Object(s.n)(B)?qr(Rc,null,B):typeof B=="object"?B.el===null?B:go(B):qr(R2,null,String(B))}function Oc(B,W){let ae=0;const{shapeFlag:pe}=B;if(W==null)W=null;else if(Object(s.n)(W))ae=16;else if(typeof W=="object"){if(1&pe||64&pe){const _e=W.default;return void(_e&&(_e._c&&E2(1),Oc(B,_e()),_e._c&&E2(-1)))}{ae=32;const _e=W._;_e||L2 in W?_e===3&&fs&&(1024&fs.vnode.patchFlag?(W._=2,B.patchFlag|=1024):W._=1):W._ctx=fs}}else Object(s.o)(W)?(W={default:W,_ctx:fs},ae=32):(W=String(W),64&pe?(ae=16,W=[f6(W)]):ae=8);B.children=W,B.shapeFlag|=ae}function Ia(B,W,ae){const pe=ae.appContext.config.optionMergeStrategies,{mixins:_e,extends:ye}=W;ye&&Ia(B,ye,ae),_e&&_e.forEach(Ce=>Ia(B,Ce,ae));for(const Ce in W)pe&&Object(s.k)(pe,Ce)?B[Ce]=pe[Ce](B[Ce],W[Ce],ae.proxy,Ce):B[Ce]=W[Ce]}const Mc=B=>B?p6(B)?B.exposed?B.exposed:B.proxy:Mc(B.parent):null,z2=Object(s.h)(Object.create(null),{$:B=>B,$el:B=>B.vnode.el,$data:B=>B.data,$props:B=>B.props,$attrs:B=>B.attrs,$slots:B=>B.slots,$refs:B=>B.refs,$parent:B=>Mc(B.parent),$root:B=>Mc(B.root),$emit:B=>B.emit,$options:B=>function(W){const ae=W.type,{__merged:pe,mixins:_e,extends:ye}=ae;if(pe)return pe;const Ce=W.appContext.mixins;if(!Ce.length&&!_e&&!ye)return ae;const Te={};return Ce.forEach(Re=>Ia(Te,Re,W)),Ia(Te,ae,W),ae.__merged=Te}(B),$forceUpdate:B=>()=>Pc(B.update),$nextTick:B=>Tc.bind(B.proxy),$watch:B=>o6.bind(B)}),j2={get({_:B},W){const{ctx:ae,setupState:pe,data:_e,props:ye,accessCache:Ce,type:Te,appContext:Re}=B;if(W==="__v_skip")return!0;let ke;if(W[0]!=="$"){const ot=Ce[W];if(ot!==void 0)switch(ot){case 0:return pe[W];case 1:return _e[W];case 3:return ae[W];case 2:return ye[W]}else{if(pe!==s.b&&Object(s.k)(pe,W))return Ce[W]=0,pe[W];if(_e!==s.b&&Object(s.k)(_e,W))return Ce[W]=1,_e[W];if((ke=B.propsOptions[0])&&Object(s.k)(ke,W))return Ce[W]=2,ye[W];if(ae!==s.b&&Object(s.k)(ae,W))return Ce[W]=3,ae[W];Ce[W]=4}}const Pe=z2[W];let Ie,Me;return Pe?(W==="$attrs"&&f(B,0,W),Pe(B)):(Ie=Te.__cssModules)&&(Ie=Ie[W])?Ie:ae!==s.b&&Object(s.k)(ae,W)?(Ce[W]=3,ae[W]):(Me=Re.config.globalProperties,Object(s.k)(Me,W)?Me[W]:void 0)},set({_:B},W,ae){const{data:pe,setupState:_e,ctx:ye}=B;if(_e!==s.b&&Object(s.k)(_e,W))_e[W]=ae;else if(pe!==s.b&&Object(s.k)(pe,W))pe[W]=ae;else if(Object(s.k)(B.props,W))return!1;return(W[0]!=="$"||!(W.slice(1)in B))&&(ye[W]=ae,!0)},has({_:{data:B,setupState:W,accessCache:ae,ctx:pe,appContext:_e,propsOptions:ye}},Ce){let Te;return ae[Ce]!==void 0||B!==s.b&&Object(s.k)(B,Ce)||W!==s.b&&Object(s.k)(W,Ce)||(Te=ye[0])&&Object(s.k)(Te,Ce)||Object(s.k)(pe,Ce)||Object(s.k)(z2,Ce)||Object(s.k)(_e.config.globalProperties,Ce)}};Object(s.h)({},j2,{get(B,W){if(W!==Symbol.unscopables)return j2.get(B,W,B)},has:(B,W)=>W[0]!=="_"&&!Object(s.p)(W)}),c6();let gs=null;const h6=()=>gs||fs,H2=B=>{gs=B};function p6(B){return 4&B.vnode.shapeFlag}function g6(B,W=gs){W&&(W.effects||(W.effects=[])).push(B)}function m6(B){return Object(s.o)(B)&&"__vccOpts"in B}function v6(B,W,ae){const pe=arguments.length;return pe===2?Object(s.u)(W)&&!Object(s.n)(W)?Ba(W)?qr(B,null,[W]):qr(B,W):qr(B,null,W):(pe>3?ae=Array.prototype.slice.call(arguments,2):pe===3&&Ba(ae)&&(ae=[ae]),qr(B,W,ae))}const V2="http://www.w3.org/2000/svg",$i=typeof document<"u"?document:null;let G2,W2;const q2={insert:(B,W,ae)=>{W.insertBefore(B,ae||null)},remove:B=>{const W=B.parentNode;W&&W.removeChild(B)},createElement:(B,W,ae,pe)=>{const _e=W?$i.createElementNS(V2,B):$i.createElement(B,ae?{is:ae}:void 0);return B==="select"&&pe&&pe.multiple!=null&&_e.setAttribute("multiple",pe.multiple),_e},createText:B=>$i.createTextNode(B),createComment:B=>$i.createComment(B),setText:(B,W)=>{B.nodeValue=W},setElementText:(B,W)=>{B.textContent=W},parentNode:B=>B.parentNode,nextSibling:B=>B.nextSibling,querySelector:B=>$i.querySelector(B),setScopeId(B,W){B.setAttribute(W,"")},cloneNode(B){const W=B.cloneNode(!0);return"_value"in B&&(W._value=B._value),W},insertStaticContent(B,W,ae,pe){const _e=pe?W2||(W2=$i.createElementNS(V2,"svg")):G2||(G2=$i.createElement("div"));_e.innerHTML=B;const ye=_e.firstChild;let Ce=ye,Te=Ce;for(;Ce;)Te=Ce,q2.insert(Ce,W,ae),Ce=_e.firstChild;return[ye,Te]}},K2=/\s*!important$/;function Lc(B,W,ae){if(Object(s.n)(ae))ae.forEach(pe=>Lc(B,W,pe));else if(W.startsWith("--"))B.setProperty(W,ae);else{const pe=function(_e,ye){const Ce=Nc[ye];if(Ce)return Ce;let Te=Object(s.e)(ye);if(Te!=="filter"&&Te in _e)return Nc[ye]=Te;Te=Object(s.f)(Te);for(let Re=0;Re<Z2.length;Re++){const ke=Z2[Re]+Te;if(ke in _e)return Nc[ye]=ke}return ye}(B,W);K2.test(ae)?B.setProperty(Object(s.l)(pe),ae.replace(K2,""),"important"):B[pe]=ae}}const Z2=["Webkit","Moz","ms"],Nc={},Y2="http://www.w3.org/1999/xlink";let Ra=Date.now,X2=!1;if(typeof window<"u"){Ra()>document.createEvent("Event").timeStamp&&(Ra=()=>performance.now());const B=navigator.userAgent.match(/firefox\/(\d+)/i);X2=!!(B&&Number(B[1])<=53)}let Uc=0;const _6=Promise.resolve(),b6=()=>{Uc=0};function x6(B,W,ae,pe){B.addEventListener(W,ae,pe)}function y6(B,W,ae,pe,_e=null){const ye=B._vei||(B._vei={}),Ce=ye[W];if(pe&&Ce)Ce.value=pe;else{const[Te,Re]=function(ke){let Pe;if(Q2.test(ke)){let Ie;for(Pe={};Ie=ke.match(Q2);)ke=ke.slice(0,ke.length-Ie[0].length),Pe[Ie[0].toLowerCase()]=!0}return[Object(s.l)(ke.slice(2)),Pe]}(W);pe?x6(B,Te,ye[W]=function(ke,Pe){const Ie=Me=>{const ot=Me.timeStamp||Ra();(X2||ot>=Ie.attached-1)&&_t(function(Wt,Ft){if(Object(s.n)(Ft)){const xt=Wt.stopImmediatePropagation;return Wt.stopImmediatePropagation=()=>{xt.call(Wt),Wt._stopped=!0},Ft.map(mo=>ms=>!ms._stopped&&mo(ms))}return Ft}(Me,Ie.value),Pe,5,[Me])};return Ie.value=ke,Ie.attached=Uc||(_6.then(b6),Uc=Ra()),Ie}(pe,_e),Re):Ce&&(function(ke,Pe,Ie,Me){ke.removeEventListener(Pe,Ie,Me)}(B,Te,Ce,Re),ye[W]=void 0)}}const Q2=/(?:Once|Passive|Capture)$/,J2=/^on[a-z]/,w6={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Object(s.h)({},l6.props,w6),Object(s.h)({patchProp:(B,W,ae,pe,_e=!1,ye,Ce,Te,Re)=>{switch(W){case"class":(function(ke,Pe,Ie){if(Pe==null&&(Pe=""),Ie)ke.setAttribute("class",Pe);else{const Me=ke._vtc;Me&&(Pe=(Pe?[Pe,...Me]:[...Me]).join(" ")),ke.className=Pe}})(B,pe,_e);break;case"style":(function(ke,Pe,Ie){const Me=ke.style;if(Ie)if(Object(s.B)(Ie)){if(Pe!==Ie){const ot=Me.display;Me.cssText=Ie,"_vod"in ke&&(Me.display=ot)}}else{for(const ot in Ie)Lc(Me,ot,Ie[ot]);if(Pe&&!Object(s.B)(Pe))for(const ot in Pe)Ie[ot]==null&&Lc(Me,ot,"")}else ke.removeAttribute("style")})(B,ae,pe);break;default:Object(s.v)(W)?Object(s.t)(W)||y6(B,W,0,pe,Ce):function(ke,Pe,Ie,Me){return Me?Pe==="innerHTML"||!!(Pe in ke&&J2.test(Pe)&&Object(s.o)(Ie)):Pe==="spellcheck"||Pe==="draggable"||Pe==="form"||Pe==="list"&&ke.tagName==="INPUT"||Pe==="type"&&ke.tagName==="TEXTAREA"||J2.test(Pe)&&Object(s.B)(Ie)?!1:Pe in ke}(B,W,pe,_e)?function(ke,Pe,Ie,Me,ot,Wt,Ft){if(Pe==="innerHTML"||Pe==="textContent")return Me&&Ft(Me,ot,Wt),void(ke[Pe]=Ie??"");if(Pe!=="value"||ke.tagName==="PROGRESS"){if(Ie===""||Ie==null){const xt=typeof ke[Pe];if(Ie===""&&xt==="boolean")return void(ke[Pe]=!0);if(Ie==null&&xt==="string")return ke[Pe]="",void ke.removeAttribute(Pe);if(xt==="number")return ke[Pe]=0,void ke.removeAttribute(Pe)}try{ke[Pe]=Ie}catch{}}else{ke._value=Ie;const xt=Ie??"";ke.value!==xt&&(ke.value=xt)}}(B,W,pe,ye,Ce,Te,Re):(W==="true-value"?B._trueValue=pe:W==="false-value"&&(B._falseValue=pe),function(ke,Pe,Ie,Me){if(Me&&Pe.startsWith("xlink:"))Ie==null?ke.removeAttributeNS(Y2,Pe.slice(6,Pe.length)):ke.setAttributeNS(Y2,Pe,Ie);else{const ot=Object(s.A)(Pe);Ie==null||ot&&Ie===!1?ke.removeAttribute(Pe):ke.setAttribute(Pe,ot?"":Ie)}}(B,W,pe,_e))}},forcePatchProp:(B,W)=>W==="value"},q2);var C6={baidu:"http://cang.baidu.com/do/add?iu=@u&it=@t",buffer:"https://bufferapp.com/add?text=@t&url=@u",email:"mailto:?subject=@t&body=@u%0D%0A@d",evernote:"https://www.evernote.com/clip.action?url=@u&title=@t",facebook:"https://www.facebook.com/sharer/sharer.php?u=@u&title=@t&description=@d&quote=@q&hashtag=@h",flipboard:"https://share.flipboard.com/bookmarklet/popout?v=2&url=@u&title=@t",hackernews:"https://news.ycombinator.com/submitlink?u=@u&t=@t",instapaper:"http://www.instapaper.com/edit?url=@u&title=@t&description=@d",line:"http://line.me/R/msg/text/?@t%0D%0A@u%0D%0A@d",linkedin:"https://www.linkedin.com/shareArticle?url=@u",messenger:"fb-messenger://share/?link=@u",odnoklassniki:"https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=@u&st.comments=@t",pinterest:"https://pinterest.com/pin/create/button/?url=@u&media=@m&description=@t",pocket:"https://getpocket.com/save?url=@u&title=@t",quora:"https://www.quora.com/share?url=@u&title=@t",reddit:"https://www.reddit.com/submit?url=@u&title=@t",skype:"https://web.skype.com/share?url=@t%0D%0A@u%0D%0A@d",sms:"sms:?body=@t%0D%0A@u%0D%0A@d",stumbleupon:"https://www.stumbleupon.com/submit?url=@u&title=@t",telegram:"https://t.me/share/url?url=@u&text=@t%0D%0A@d",tumblr:"https://www.tumblr.com/share/link?url=@u&name=@t&description=@d",twitter:"https://twitter.com/intent/tweet?text=@t&url=@u&hashtags=@h@tu",viber:"viber://forward?text=@t%0D%0A@u%0D%0A@d",vk:"https://vk.com/share.php?url=@u&title=@t&description=@d&image=@m&noparse=true",weibo:"http://service.weibo.com/share/share.php?url=@u&title=@t&pic=@m",whatsapp:"https://api.whatsapp.com/send?text=@t%0D%0A@u%0D%0A@d",wordpress:"https://wordpress.com/press-this.php?u=@u&t=@t&s=@d&i=@m",xing:"https://www.xing.com/social/share/spi?op=share&url=@u&title=@t",yammer:"https://www.yammer.com/messages/new?login=true&status=@t%0D%0A@u%0D%0A@d"},zn=typeof window<"u"?window:null,zc={name:"ShareNetwork",props:{network:{type:String,required:!0},url:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},media:{type:String,default:""},tag:{type:String,default:"a"},popup:{type:Object,default:function(){return{width:626,height:436}}},options:{type:Object,default:function(){return{networks:null}}}},data:function(){return{popupTop:0,popupLeft:0,popupWindow:void 0,popupInterval:null}},computed:{networks:function(){return Object.assign(C6,this.options.networks||{})},key:function(){return this.network.toLowerCase()},rawLink:function(){var B=navigator.userAgent.toLowerCase();return this.key==="sms"&&(B.indexOf("iphone")>-1||B.indexOf("ipad")>-1)?this.networks[this.key].replace(":?",":&"):this.networks[this.key]},shareLink:function(){var B=this.rawLink;return this.key==="twitter"&&(this.hashtags.length||(B=B.replace("&hashtags=@h","")),this.twitterUser.length||(B=B.replace("@tu",""))),B.replace(/@tu/g,"&via="+encodeURIComponent(this.twitterUser)).replace(/@u/g,encodeURIComponent(this.url)).replace(/@t/g,encodeURIComponent(this.title)).replace(/@d/g,encodeURIComponent(this.description)).replace(/@q/g,encodeURIComponent(this.quote)).replace(/@h/g,this.encodedHashtags).replace(/@m/g,encodeURIComponent(this.media))},encodedHashtags:function(){return this.key==="facebook"&&this.hashtags.length?"%23"+this.hashtags.split(",")[0]:this.hashtags}},render:function(){var B=this;if(!this.networks.hasOwnProperty(this.key))throw new Error("Network "+this.key+" does not exist");var W={class:"share-network-"+this.key,onclick:function(){return B[B.rawLink.substring(0,4)==="http"?"share":"touch"]()}};return this.tag==="a"&&(W.href="javascript:void(0)"),v6(this.tag,W,typeof this.$slots.default=="function"?this.$slots.default():null)},methods:{resizePopup:function(){var B=zn.innerWidth||document.documentElement.clientWidth||zn.screenX,W=zn.innerHeight||document.documentElement.clientHeight||zn.screenY,ae=B/zn.screen.availWidth;this.popupLeft=(B-this.popup.width)/2/ae+(zn.screenLeft!==void 0?zn.screenLeft:zn.screenX),this.popupTop=(W-this.popup.height)/2/ae+(zn.screenTop!==void 0?zn.screenTop:zn.screenY)},share:function(){var B=this;this.resizePopup(),this.popupWindow&&this.popupInterval&&(clearInterval(this.popupInterval),this.popupWindow.close(),this.emit("change")),this.popupWindow=zn.open(this.shareLink,"sharer-"+this.key,",height="+this.popup.height+",width="+this.popup.width+",left="+this.popupLeft+",top="+this.popupTop+",screenX="+this.popupLeft+",screenY="+this.popupTop),this.popupWindow&&(this.popupWindow.focus(),this.popupInterval=setInterval(function(){B.popupWindow&&!B.popupWindow.closed||(clearInterval(B.popupInterval),B.popupWindow=null,B.emit("close"))},500),this.emit("open"))},touch:function(){window.open(this.shareLink,"_blank"),this.emit("open")},emit:function(B){this.$root.$emit("share_network_"+B,this.key,this.url),this.$emit(B,this.key,this.url)}}};r.default={install:function(B,W){B.component(zc.name,zc)}}}])})})(B4);var Fv=B4.exports;const F4=k0(Fv);var Iv={exports:{}};function Fo(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var nu={exports:{}};const Rv={},Ov=Object.freeze(Object.defineProperty({__proto__:null,default:Rv},Symbol.toStringTag,{value:"Module"})),Mv=Bv(Ov);var Zf;function ht(){return Zf||(Zf=1,function(t,e){(function(n,r){t.exports=r()})(Ke,function(){var n=n||function(r,i){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof Ke<"u"&&Ke.crypto&&(s=Ke.crypto),!s&&typeof Fo=="function")try{s=Mv}catch{}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function _(){}return function(f){var b;return _.prototype=f,b=new _,_.prototype=null,b}}(),l={},c=l.lib={},u=c.Base=function(){return{extend:function(_){var f=a(this);return _&&f.mixIn(_),(!f.hasOwnProperty("init")||this.init===f.init)&&(f.init=function(){f.$super.init.apply(this,arguments)}),f.init.prototype=f,f.$super=this,f},create:function(){var _=this.extend();return _.init.apply(_,arguments),_},init:function(){},mixIn:function(_){for(var f in _)_.hasOwnProperty(f)&&(this[f]=_[f]);_.hasOwnProperty("toString")&&(this.toString=_.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=c.WordArray=u.extend({init:function(_,f){_=this.words=_||[],f!=i?this.sigBytes=f:this.sigBytes=_.length*4},toString:function(_){return(_||d).stringify(this)},concat:function(_){var f=this.words,b=_.words,w=this.sigBytes,k=_.sigBytes;if(this.clamp(),w%4)for(var P=0;P<k;P++){var $=b[P>>>2]>>>24-P%4*8&255;f[w+P>>>2]|=$<<24-(w+P)%4*8}else for(var D=0;D<k;D+=4)f[w+D>>>2]=b[D>>>2];return this.sigBytes+=k,this},clamp:function(){var _=this.words,f=this.sigBytes;_[f>>>2]&=4294967295<<32-f%4*8,_.length=r.ceil(f/4)},clone:function(){var _=u.clone.call(this);return _.words=this.words.slice(0),_},random:function(_){for(var f=[],b=0;b<_;b+=4)f.push(o());return new h.init(f,_)}}),p=l.enc={},d=p.Hex={stringify:function(_){for(var f=_.words,b=_.sigBytes,w=[],k=0;k<b;k++){var P=f[k>>>2]>>>24-k%4*8&255;w.push((P>>>4).toString(16)),w.push((P&15).toString(16))}return w.join("")},parse:function(_){for(var f=_.length,b=[],w=0;w<f;w+=2)b[w>>>3]|=parseInt(_.substr(w,2),16)<<24-w%8*4;return new h.init(b,f/2)}},g=p.Latin1={stringify:function(_){for(var f=_.words,b=_.sigBytes,w=[],k=0;k<b;k++){var P=f[k>>>2]>>>24-k%4*8&255;w.push(String.fromCharCode(P))}return w.join("")},parse:function(_){for(var f=_.length,b=[],w=0;w<f;w++)b[w>>>2]|=(_.charCodeAt(w)&255)<<24-w%4*8;return new h.init(b,f)}},v=p.Utf8={stringify:function(_){try{return decodeURIComponent(escape(g.stringify(_)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(_){return g.parse(unescape(encodeURIComponent(_)))}},x=c.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(_){typeof _=="string"&&(_=v.parse(_)),this._data.concat(_),this._nDataBytes+=_.sigBytes},_process:function(_){var f,b=this._data,w=b.words,k=b.sigBytes,P=this.blockSize,$=P*4,D=k/$;_?D=r.ceil(D):D=r.max((D|0)-this._minBufferSize,0);var S=D*P,F=r.min(S*4,k);if(S){for(var A=0;A<S;A+=P)this._doProcessBlock(w,A);f=w.splice(0,S),b.sigBytes-=F}return new h.init(f,F)},clone:function(){var _=u.clone.call(this);return _._data=this._data.clone(),_},_minBufferSize:0});c.Hasher=x.extend({cfg:u.extend(),init:function(_){this.cfg=this.cfg.extend(_),this.reset()},reset:function(){x.reset.call(this),this._doReset()},update:function(_){return this._append(_),this._process(),this},finalize:function(_){_&&this._append(_);var f=this._doFinalize();return f},blockSize:16,_createHelper:function(_){return function(f,b){return new _.init(b).finalize(f)}},_createHmacHelper:function(_){return function(f,b){return new y.HMAC.init(_,b).finalize(f)}}});var y=l.algo={};return l}(Math);return n})}(nu)),nu.exports}var ru={exports:{}},Yf;function S0(){return Yf||(Yf=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){return function(r){var i=n,s=i.lib,o=s.Base,a=s.WordArray,l=i.x64={};l.Word=o.extend({init:function(c,u){this.high=c,this.low=u}}),l.WordArray=o.extend({init:function(c,u){c=this.words=c||[],u!=r?this.sigBytes=u:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,u=c.length,h=[],p=0;p<u;p++){var d=c[p];h.push(d.high),h.push(d.low)}return a.create(h,this.sigBytes)},clone:function(){for(var c=o.clone.call(this),u=c.words=this.words.slice(0),h=u.length,p=0;p<h;p++)u[p]=u[p].clone();return c}})}(),n})}(ru)),ru.exports}var iu={exports:{}},Xf;function Lv(){return Xf||(Xf=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,s=i.WordArray,o=s.init,a=s.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray<"u"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var c=l.byteLength,u=[],h=0;h<c;h++)u[h>>>2]|=l[h]<<24-h%4*8;o.call(this,u,c)}else o.apply(this,arguments)};a.prototype=s}}(),n.lib.WordArray})}(iu)),iu.exports}var su={exports:{}},Qf;function Nv(){return Qf||(Qf=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.enc;o.Utf16=o.Utf16BE={stringify:function(l){for(var c=l.words,u=l.sigBytes,h=[],p=0;p<u;p+=2){var d=c[p>>>2]>>>16-p%4*8&65535;h.push(String.fromCharCode(d))}return h.join("")},parse:function(l){for(var c=l.length,u=[],h=0;h<c;h++)u[h>>>1]|=l.charCodeAt(h)<<16-h%2*16;return s.create(u,c*2)}},o.Utf16LE={stringify:function(l){for(var c=l.words,u=l.sigBytes,h=[],p=0;p<u;p+=2){var d=a(c[p>>>2]>>>16-p%4*8&65535);h.push(String.fromCharCode(d))}return h.join("")},parse:function(l){for(var c=l.length,u=[],h=0;h<c;h++)u[h>>>1]|=a(l.charCodeAt(h)<<16-h%2*16);return s.create(u,c*2)}};function a(l){return l<<8&4278255360|l>>>8&16711935}}(),n.enc.Utf16})}(su)),su.exports}var ou={exports:{}},Jf;function Xi(){return Jf||(Jf=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.enc;o.Base64={stringify:function(l){var c=l.words,u=l.sigBytes,h=this._map;l.clamp();for(var p=[],d=0;d<u;d+=3)for(var g=c[d>>>2]>>>24-d%4*8&255,v=c[d+1>>>2]>>>24-(d+1)%4*8&255,x=c[d+2>>>2]>>>24-(d+2)%4*8&255,y=g<<16|v<<8|x,_=0;_<4&&d+_*.75<u;_++)p.push(h.charAt(y>>>6*(3-_)&63));var f=h.charAt(64);if(f)for(;p.length%4;)p.push(f);return p.join("")},parse:function(l){var c=l.length,u=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var p=0;p<u.length;p++)h[u.charCodeAt(p)]=p}var d=u.charAt(64);if(d){var g=l.indexOf(d);g!==-1&&(c=g)}return a(l,c,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(l,c,u){for(var h=[],p=0,d=0;d<c;d++)if(d%4){var g=u[l.charCodeAt(d-1)]<<d%4*2,v=u[l.charCodeAt(d)]>>>6-d%4*2,x=g|v;h[p>>>2]|=x<<24-p%4*8,p++}return s.create(h,p)}}(),n.enc.Base64})}(ou)),ou.exports}var au={exports:{}},eh;function Uv(){return eh||(eh=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.enc;o.Base64url={stringify:function(l,c){c===void 0&&(c=!0);var u=l.words,h=l.sigBytes,p=c?this._safe_map:this._map;l.clamp();for(var d=[],g=0;g<h;g+=3)for(var v=u[g>>>2]>>>24-g%4*8&255,x=u[g+1>>>2]>>>24-(g+1)%4*8&255,y=u[g+2>>>2]>>>24-(g+2)%4*8&255,_=v<<16|x<<8|y,f=0;f<4&&g+f*.75<h;f++)d.push(p.charAt(_>>>6*(3-f)&63));var b=p.charAt(64);if(b)for(;d.length%4;)d.push(b);return d.join("")},parse:function(l,c){c===void 0&&(c=!0);var u=l.length,h=c?this._safe_map:this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var d=0;d<h.length;d++)p[h.charCodeAt(d)]=d}var g=h.charAt(64);if(g){var v=l.indexOf(g);v!==-1&&(u=v)}return a(l,u,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(l,c,u){for(var h=[],p=0,d=0;d<c;d++)if(d%4){var g=u[l.charCodeAt(d-1)]<<d%4*2,v=u[l.charCodeAt(d)]>>>6-d%4*2,x=g|v;h[p>>>2]|=x<<24-p%4*8,p++}return s.create(h,p)}}(),n.enc.Base64url})}(au)),au.exports}var lu={exports:{}},th;function Qi(){return th||(th=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){return function(r){var i=n,s=i.lib,o=s.WordArray,a=s.Hasher,l=i.algo,c=[];(function(){for(var v=0;v<64;v++)c[v]=r.abs(r.sin(v+1))*4294967296|0})();var u=l.MD5=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,x){for(var y=0;y<16;y++){var _=x+y,f=v[_];v[_]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var b=this._hash.words,w=v[x+0],k=v[x+1],P=v[x+2],$=v[x+3],D=v[x+4],S=v[x+5],F=v[x+6],A=v[x+7],E=v[x+8],T=v[x+9],L=v[x+10],X=v[x+11],J=v[x+12],ne=v[x+13],se=v[x+14],ce=v[x+15],j=b[0],V=b[1],oe=b[2],N=b[3];j=h(j,V,oe,N,w,7,c[0]),N=h(N,j,V,oe,k,12,c[1]),oe=h(oe,N,j,V,P,17,c[2]),V=h(V,oe,N,j,$,22,c[3]),j=h(j,V,oe,N,D,7,c[4]),N=h(N,j,V,oe,S,12,c[5]),oe=h(oe,N,j,V,F,17,c[6]),V=h(V,oe,N,j,A,22,c[7]),j=h(j,V,oe,N,E,7,c[8]),N=h(N,j,V,oe,T,12,c[9]),oe=h(oe,N,j,V,L,17,c[10]),V=h(V,oe,N,j,X,22,c[11]),j=h(j,V,oe,N,J,7,c[12]),N=h(N,j,V,oe,ne,12,c[13]),oe=h(oe,N,j,V,se,17,c[14]),V=h(V,oe,N,j,ce,22,c[15]),j=p(j,V,oe,N,k,5,c[16]),N=p(N,j,V,oe,F,9,c[17]),oe=p(oe,N,j,V,X,14,c[18]),V=p(V,oe,N,j,w,20,c[19]),j=p(j,V,oe,N,S,5,c[20]),N=p(N,j,V,oe,L,9,c[21]),oe=p(oe,N,j,V,ce,14,c[22]),V=p(V,oe,N,j,D,20,c[23]),j=p(j,V,oe,N,T,5,c[24]),N=p(N,j,V,oe,se,9,c[25]),oe=p(oe,N,j,V,$,14,c[26]),V=p(V,oe,N,j,E,20,c[27]),j=p(j,V,oe,N,ne,5,c[28]),N=p(N,j,V,oe,P,9,c[29]),oe=p(oe,N,j,V,A,14,c[30]),V=p(V,oe,N,j,J,20,c[31]),j=d(j,V,oe,N,S,4,c[32]),N=d(N,j,V,oe,E,11,c[33]),oe=d(oe,N,j,V,X,16,c[34]),V=d(V,oe,N,j,se,23,c[35]),j=d(j,V,oe,N,k,4,c[36]),N=d(N,j,V,oe,D,11,c[37]),oe=d(oe,N,j,V,A,16,c[38]),V=d(V,oe,N,j,L,23,c[39]),j=d(j,V,oe,N,ne,4,c[40]),N=d(N,j,V,oe,w,11,c[41]),oe=d(oe,N,j,V,$,16,c[42]),V=d(V,oe,N,j,F,23,c[43]),j=d(j,V,oe,N,T,4,c[44]),N=d(N,j,V,oe,J,11,c[45]),oe=d(oe,N,j,V,ce,16,c[46]),V=d(V,oe,N,j,P,23,c[47]),j=g(j,V,oe,N,w,6,c[48]),N=g(N,j,V,oe,A,10,c[49]),oe=g(oe,N,j,V,se,15,c[50]),V=g(V,oe,N,j,S,21,c[51]),j=g(j,V,oe,N,J,6,c[52]),N=g(N,j,V,oe,$,10,c[53]),oe=g(oe,N,j,V,L,15,c[54]),V=g(V,oe,N,j,k,21,c[55]),j=g(j,V,oe,N,E,6,c[56]),N=g(N,j,V,oe,ce,10,c[57]),oe=g(oe,N,j,V,F,15,c[58]),V=g(V,oe,N,j,ne,21,c[59]),j=g(j,V,oe,N,D,6,c[60]),N=g(N,j,V,oe,X,10,c[61]),oe=g(oe,N,j,V,P,15,c[62]),V=g(V,oe,N,j,T,21,c[63]),b[0]=b[0]+j|0,b[1]=b[1]+V|0,b[2]=b[2]+oe|0,b[3]=b[3]+N|0},_doFinalize:function(){var v=this._data,x=v.words,y=this._nDataBytes*8,_=v.sigBytes*8;x[_>>>5]|=128<<24-_%32;var f=r.floor(y/4294967296),b=y;x[(_+64>>>9<<4)+15]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,x[(_+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,v.sigBytes=(x.length+1)*4,this._process();for(var w=this._hash,k=w.words,P=0;P<4;P++){var $=k[P];k[P]=($<<8|$>>>24)&16711935|($<<24|$>>>8)&4278255360}return w},clone:function(){var v=a.clone.call(this);return v._hash=this._hash.clone(),v}});function h(v,x,y,_,f,b,w){var k=v+(x&y|~x&_)+f+w;return(k<<b|k>>>32-b)+x}function p(v,x,y,_,f,b,w){var k=v+(x&_|y&~_)+f+w;return(k<<b|k>>>32-b)+x}function d(v,x,y,_,f,b,w){var k=v+(x^y^_)+f+w;return(k<<b|k>>>32-b)+x}function g(v,x,y,_,f,b,w){var k=v+(y^(x|~_))+f+w;return(k<<b|k>>>32-b)+x}i.MD5=a._createHelper(u),i.HmacMD5=a._createHmacHelper(u)}(Math),n.MD5})}(lu)),lu.exports}var cu={exports:{}},nh;function I4(){return nh||(nh=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=i.Hasher,a=r.algo,l=[],c=a.SHA1=o.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(u,h){for(var p=this._hash.words,d=p[0],g=p[1],v=p[2],x=p[3],y=p[4],_=0;_<80;_++){if(_<16)l[_]=u[h+_]|0;else{var f=l[_-3]^l[_-8]^l[_-14]^l[_-16];l[_]=f<<1|f>>>31}var b=(d<<5|d>>>27)+y+l[_];_<20?b+=(g&v|~g&x)+1518500249:_<40?b+=(g^v^x)+1859775393:_<60?b+=(g&v|g&x|v&x)-1894007588:b+=(g^v^x)-899497514,y=x,x=v,v=g<<30|g>>>2,g=d,d=b}p[0]=p[0]+d|0,p[1]=p[1]+g|0,p[2]=p[2]+v|0,p[3]=p[3]+x|0,p[4]=p[4]+y|0},_doFinalize:function(){var u=this._data,h=u.words,p=this._nDataBytes*8,d=u.sigBytes*8;return h[d>>>5]|=128<<24-d%32,h[(d+64>>>9<<4)+14]=Math.floor(p/4294967296),h[(d+64>>>9<<4)+15]=p,u.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var u=o.clone.call(this);return u._hash=this._hash.clone(),u}});r.SHA1=o._createHelper(c),r.HmacSHA1=o._createHmacHelper(c)}(),n.SHA1})}(cu)),cu.exports}var uu={exports:{}},rh;function U1(){return rh||(rh=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){return function(r){var i=n,s=i.lib,o=s.WordArray,a=s.Hasher,l=i.algo,c=[],u=[];(function(){function d(y){for(var _=r.sqrt(y),f=2;f<=_;f++)if(!(y%f))return!1;return!0}function g(y){return(y-(y|0))*4294967296|0}for(var v=2,x=0;x<64;)d(v)&&(x<8&&(c[x]=g(r.pow(v,1/2))),u[x]=g(r.pow(v,1/3)),x++),v++})();var h=[],p=l.SHA256=a.extend({_doReset:function(){this._hash=new o.init(c.slice(0))},_doProcessBlock:function(d,g){for(var v=this._hash.words,x=v[0],y=v[1],_=v[2],f=v[3],b=v[4],w=v[5],k=v[6],P=v[7],$=0;$<64;$++){if($<16)h[$]=d[g+$]|0;else{var D=h[$-15],S=(D<<25|D>>>7)^(D<<14|D>>>18)^D>>>3,F=h[$-2],A=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;h[$]=S+h[$-7]+A+h[$-16]}var E=b&w^~b&k,T=x&y^x&_^y&_,L=(x<<30|x>>>2)^(x<<19|x>>>13)^(x<<10|x>>>22),X=(b<<26|b>>>6)^(b<<21|b>>>11)^(b<<7|b>>>25),J=P+X+E+u[$]+h[$],ne=L+T;P=k,k=w,w=b,b=f+J|0,f=_,_=y,y=x,x=J+ne|0}v[0]=v[0]+x|0,v[1]=v[1]+y|0,v[2]=v[2]+_|0,v[3]=v[3]+f|0,v[4]=v[4]+b|0,v[5]=v[5]+w|0,v[6]=v[6]+k|0,v[7]=v[7]+P|0},_doFinalize:function(){var d=this._data,g=d.words,v=this._nDataBytes*8,x=d.sigBytes*8;return g[x>>>5]|=128<<24-x%32,g[(x+64>>>9<<4)+14]=r.floor(v/4294967296),g[(x+64>>>9<<4)+15]=v,d.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var d=a.clone.call(this);return d._hash=this._hash.clone(),d}});i.SHA256=a._createHelper(p),i.HmacSHA256=a._createHmacHelper(p)}(Math),n.SHA256})}(uu)),uu.exports}var du={exports:{}},ih;function zv(){return ih||(ih=1,function(t,e){(function(n,r,i){t.exports=r(ht(),U1())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=r.algo,a=o.SHA256,l=o.SHA224=a.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=a._doFinalize.call(this);return c.sigBytes-=4,c}});r.SHA224=a._createHelper(l),r.HmacSHA224=a._createHmacHelper(l)}(),n.SHA224})}(du)),du.exports}var fu={exports:{}},sh;function R4(){return sh||(sh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),S0())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.Hasher,o=r.x64,a=o.Word,l=o.WordArray,c=r.algo;function u(){return a.create.apply(a,arguments)}var h=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],p=[];(function(){for(var g=0;g<80;g++)p[g]=u()})();var d=c.SHA512=s.extend({_doReset:function(){this._hash=new l.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(g,v){for(var x=this._hash.words,y=x[0],_=x[1],f=x[2],b=x[3],w=x[4],k=x[5],P=x[6],$=x[7],D=y.high,S=y.low,F=_.high,A=_.low,E=f.high,T=f.low,L=b.high,X=b.low,J=w.high,ne=w.low,se=k.high,ce=k.low,j=P.high,V=P.low,oe=$.high,N=$.low,Q=D,fe=S,M=F,q=A,ee=E,ue=T,me=L,xe=X,z=J,C=ne,O=se,H=ce,I=j,R=V,Y=oe,te=N,K=0;K<80;K++){var G,ie,he=p[K];if(K<16)ie=he.high=g[v+K*2]|0,G=he.low=g[v+K*2+1]|0;else{var ge=p[K-15],be=ge.high,$e=ge.low,Be=(be>>>1|$e<<31)^(be>>>8|$e<<24)^be>>>7,De=($e>>>1|be<<31)^($e>>>8|be<<24)^($e>>>7|be<<25),Qe=p[K-2],Ge=Qe.high,_t=Qe.low,Je=(Ge>>>19|_t<<13)^(Ge<<3|_t>>>29)^Ge>>>6,Gt=(_t>>>19|Ge<<13)^(_t<<3|Ge>>>29)^(_t>>>6|Ge<<26),hn=p[K-7],rt=hn.high,$t=hn.low,Cn=p[K-16],hr=Cn.high,Zn=Cn.low;G=De+$t,ie=Be+rt+(G>>>0<De>>>0?1:0),G=G+Gt,ie=ie+Je+(G>>>0<Gt>>>0?1:0),G=G+Zn,ie=ie+hr+(G>>>0<Zn>>>0?1:0),he.high=ie,he.low=G}var pr=z&O^~z&I,cn=C&H^~C&R,In=Q&M^Q&ee^M&ee,$a=fe&q^fe&ue^q&ue,ho=(Q>>>28|fe<<4)^(Q<<30|fe>>>2)^(Q<<25|fe>>>7),ds=(fe>>>28|Q<<4)^(fe<<30|Q>>>2)^(fe<<25|Q>>>7),Tc=(z>>>14|C<<18)^(z>>>18|C<<14)^(z<<23|C>>>9),Pc=(C>>>14|z<<18)^(C>>>18|z<<14)^(C<<23|z>>>9),po=h[K],Ta=po.high,Pa=po.low,pn=te+Pc,gr=Y+Tc+(pn>>>0<te>>>0?1:0),pn=pn+cn,gr=gr+pr+(pn>>>0<cn>>>0?1:0),pn=pn+Pa,gr=gr+Ta+(pn>>>0<Pa>>>0?1:0),pn=pn+G,gr=gr+ie+(pn>>>0<G>>>0?1:0),Pr=ds+$a,Da=ho+In+(Pr>>>0<ds>>>0?1:0);Y=I,te=R,I=O,R=H,O=z,H=C,C=xe+pn|0,z=me+gr+(C>>>0<xe>>>0?1:0)|0,me=ee,xe=ue,ee=M,ue=q,M=Q,q=fe,fe=pn+Pr|0,Q=gr+Da+(fe>>>0<pn>>>0?1:0)|0}S=y.low=S+fe,y.high=D+Q+(S>>>0<fe>>>0?1:0),A=_.low=A+q,_.high=F+M+(A>>>0<q>>>0?1:0),T=f.low=T+ue,f.high=E+ee+(T>>>0<ue>>>0?1:0),X=b.low=X+xe,b.high=L+me+(X>>>0<xe>>>0?1:0),ne=w.low=ne+C,w.high=J+z+(ne>>>0<C>>>0?1:0),ce=k.low=ce+H,k.high=se+O+(ce>>>0<H>>>0?1:0),V=P.low=V+R,P.high=j+I+(V>>>0<R>>>0?1:0),N=$.low=N+te,$.high=oe+Y+(N>>>0<te>>>0?1:0)},_doFinalize:function(){var g=this._data,v=g.words,x=this._nDataBytes*8,y=g.sigBytes*8;v[y>>>5]|=128<<24-y%32,v[(y+128>>>10<<5)+30]=Math.floor(x/4294967296),v[(y+128>>>10<<5)+31]=x,g.sigBytes=v.length*4,this._process();var _=this._hash.toX32();return _},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g},blockSize:1024/32});r.SHA512=s._createHelper(d),r.HmacSHA512=s._createHmacHelper(d)}(),n.SHA512})}(fu)),fu.exports}var hu={exports:{}},oh;function jv(){return oh||(oh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),S0(),R4())})(Ke,function(n){return function(){var r=n,i=r.x64,s=i.Word,o=i.WordArray,a=r.algo,l=a.SHA512,c=a.SHA384=l.extend({_doReset:function(){this._hash=new o.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var u=l._doFinalize.call(this);return u.sigBytes-=16,u}});r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c)}(),n.SHA384})}(hu)),hu.exports}var pu={exports:{}},ah;function Hv(){return ah||(ah=1,function(t,e){(function(n,r,i){t.exports=r(ht(),S0())})(Ke,function(n){return function(r){var i=n,s=i.lib,o=s.WordArray,a=s.Hasher,l=i.x64,c=l.Word,u=i.algo,h=[],p=[],d=[];(function(){for(var x=1,y=0,_=0;_<24;_++){h[x+5*y]=(_+1)*(_+2)/2%64;var f=y%5,b=(2*x+3*y)%5;x=f,y=b}for(var x=0;x<5;x++)for(var y=0;y<5;y++)p[x+5*y]=y+(2*x+3*y)%5*5;for(var w=1,k=0;k<24;k++){for(var P=0,$=0,D=0;D<7;D++){if(w&1){var S=(1<<D)-1;S<32?$^=1<<S:P^=1<<S-32}w&128?w=w<<1^113:w<<=1}d[k]=c.create(P,$)}})();var g=[];(function(){for(var x=0;x<25;x++)g[x]=c.create()})();var v=u.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var x=this._state=[],y=0;y<25;y++)x[y]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(x,y){for(var _=this._state,f=this.blockSize/2,b=0;b<f;b++){var w=x[y+2*b],k=x[y+2*b+1];w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360;var P=_[b];P.high^=k,P.low^=w}for(var $=0;$<24;$++){for(var D=0;D<5;D++){for(var S=0,F=0,A=0;A<5;A++){var P=_[D+5*A];S^=P.high,F^=P.low}var E=g[D];E.high=S,E.low=F}for(var D=0;D<5;D++)for(var T=g[(D+4)%5],L=g[(D+1)%5],X=L.high,J=L.low,S=T.high^(X<<1|J>>>31),F=T.low^(J<<1|X>>>31),A=0;A<5;A++){var P=_[D+5*A];P.high^=S,P.low^=F}for(var ne=1;ne<25;ne++){var S,F,P=_[ne],se=P.high,ce=P.low,j=h[ne];j<32?(S=se<<j|ce>>>32-j,F=ce<<j|se>>>32-j):(S=ce<<j-32|se>>>64-j,F=se<<j-32|ce>>>64-j);var V=g[p[ne]];V.high=S,V.low=F}var oe=g[0],N=_[0];oe.high=N.high,oe.low=N.low;for(var D=0;D<5;D++)for(var A=0;A<5;A++){var ne=D+5*A,P=_[ne],Q=g[ne],fe=g[(D+1)%5+5*A],M=g[(D+2)%5+5*A];P.high=Q.high^~fe.high&M.high,P.low=Q.low^~fe.low&M.low}var P=_[0],q=d[$];P.high^=q.high,P.low^=q.low}},_doFinalize:function(){var x=this._data,y=x.words;this._nDataBytes*8;var _=x.sigBytes*8,f=this.blockSize*32;y[_>>>5]|=1<<24-_%32,y[(r.ceil((_+1)/f)*f>>>5)-1]|=128,x.sigBytes=y.length*4,this._process();for(var b=this._state,w=this.cfg.outputLength/8,k=w/8,P=[],$=0;$<k;$++){var D=b[$],S=D.high,F=D.low;S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,P.push(F),P.push(S)}return new o.init(P,w)},clone:function(){for(var x=a.clone.call(this),y=x._state=this._state.slice(0),_=0;_<25;_++)y[_]=y[_].clone();return x}});i.SHA3=a._createHelper(v),i.HmacSHA3=a._createHmacHelper(v)}(Math),n.SHA3})}(pu)),pu.exports}var gu={exports:{}},lh;function Vv(){return lh||(lh=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){/** @preserve
			(c) 2012 by Cédric Mesnil. All rights reserved.

			Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

			    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
			    - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

			THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
			*/return function(r){var i=n,s=i.lib,o=s.WordArray,a=s.Hasher,l=i.algo,c=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),h=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),p=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=o.create([0,1518500249,1859775393,2400959708,2840853838]),g=o.create([1352829926,1548603684,1836072691,2053994217,0]),v=l.RIPEMD160=a.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(k,P){for(var $=0;$<16;$++){var D=P+$,S=k[D];k[D]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}var F=this._hash.words,A=d.words,E=g.words,T=c.words,L=u.words,X=h.words,J=p.words,ne,se,ce,j,V,oe,N,Q,fe,M;oe=ne=F[0],N=se=F[1],Q=ce=F[2],fe=j=F[3],M=V=F[4];for(var q,$=0;$<80;$+=1)q=ne+k[P+T[$]]|0,$<16?q+=x(se,ce,j)+A[0]:$<32?q+=y(se,ce,j)+A[1]:$<48?q+=_(se,ce,j)+A[2]:$<64?q+=f(se,ce,j)+A[3]:q+=b(se,ce,j)+A[4],q=q|0,q=w(q,X[$]),q=q+V|0,ne=V,V=j,j=w(ce,10),ce=se,se=q,q=oe+k[P+L[$]]|0,$<16?q+=b(N,Q,fe)+E[0]:$<32?q+=f(N,Q,fe)+E[1]:$<48?q+=_(N,Q,fe)+E[2]:$<64?q+=y(N,Q,fe)+E[3]:q+=x(N,Q,fe)+E[4],q=q|0,q=w(q,J[$]),q=q+M|0,oe=M,M=fe,fe=w(Q,10),Q=N,N=q;q=F[1]+ce+fe|0,F[1]=F[2]+j+M|0,F[2]=F[3]+V+oe|0,F[3]=F[4]+ne+N|0,F[4]=F[0]+se+Q|0,F[0]=q},_doFinalize:function(){var k=this._data,P=k.words,$=this._nDataBytes*8,D=k.sigBytes*8;P[D>>>5]|=128<<24-D%32,P[(D+64>>>9<<4)+14]=($<<8|$>>>24)&16711935|($<<24|$>>>8)&4278255360,k.sigBytes=(P.length+1)*4,this._process();for(var S=this._hash,F=S.words,A=0;A<5;A++){var E=F[A];F[A]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return S},clone:function(){var k=a.clone.call(this);return k._hash=this._hash.clone(),k}});function x(k,P,$){return k^P^$}function y(k,P,$){return k&P|~k&$}function _(k,P,$){return(k|~P)^$}function f(k,P,$){return k&$|P&~$}function b(k,P,$){return k^(P|~$)}function w(k,P){return k<<P|k>>>32-P}i.RIPEMD160=a._createHelper(v),i.HmacRIPEMD160=a._createHmacHelper(v)}(),n.RIPEMD160})}(gu)),gu.exports}var mu={exports:{}},ch;function z1(){return ch||(ch=1,function(t,e){(function(n,r){t.exports=r(ht())})(Ke,function(n){(function(){var r=n,i=r.lib,s=i.Base,o=r.enc,a=o.Utf8,l=r.algo;l.HMAC=s.extend({init:function(c,u){c=this._hasher=new c.init,typeof u=="string"&&(u=a.parse(u));var h=c.blockSize,p=h*4;u.sigBytes>p&&(u=c.finalize(u)),u.clamp();for(var d=this._oKey=u.clone(),g=this._iKey=u.clone(),v=d.words,x=g.words,y=0;y<h;y++)v[y]^=1549556828,x[y]^=909522486;d.sigBytes=g.sigBytes=p,this.reset()},reset:function(){var c=this._hasher;c.reset(),c.update(this._iKey)},update:function(c){return this._hasher.update(c),this},finalize:function(c){var u=this._hasher,h=u.finalize(c);u.reset();var p=u.finalize(this._oKey.clone().concat(h));return p}})})()})}(mu)),mu.exports}var vu={exports:{}},uh;function Gv(){return uh||(uh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),U1(),z1())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.Base,o=i.WordArray,a=r.algo,l=a.SHA256,c=a.HMAC,u=a.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:l,iterations:25e4}),init:function(h){this.cfg=this.cfg.extend(h)},compute:function(h,p){for(var d=this.cfg,g=c.create(d.hasher,h),v=o.create(),x=o.create([1]),y=v.words,_=x.words,f=d.keySize,b=d.iterations;y.length<f;){var w=g.update(p).finalize(x);g.reset();for(var k=w.words,P=k.length,$=w,D=1;D<b;D++){$=g.finalize($),g.reset();for(var S=$.words,F=0;F<P;F++)k[F]^=S[F]}v.concat(w),_[0]++}return v.sigBytes=f*4,v}});r.PBKDF2=function(h,p,d){return u.create(d).compute(h,p)}}(),n.PBKDF2})}(vu)),vu.exports}var _u={exports:{}},dh;function xi(){return dh||(dh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),I4(),z1())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.Base,o=i.WordArray,a=r.algo,l=a.MD5,c=a.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:l,iterations:1}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,h){for(var p,d=this.cfg,g=d.hasher.create(),v=o.create(),x=v.words,y=d.keySize,_=d.iterations;x.length<y;){p&&g.update(p),p=g.update(u).finalize(h),g.reset();for(var f=1;f<_;f++)p=g.finalize(p),g.reset();v.concat(p)}return v.sigBytes=y*4,v}});r.EvpKDF=function(u,h,p){return c.create(p).compute(u,h)}}(),n.EvpKDF})}(_u)),_u.exports}var bu={exports:{}},fh;function ln(){return fh||(fh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),xi())})(Ke,function(n){n.lib.Cipher||function(r){var i=n,s=i.lib,o=s.Base,a=s.WordArray,l=s.BufferedBlockAlgorithm,c=i.enc;c.Utf8;var u=c.Base64,h=i.algo,p=h.EvpKDF,d=s.Cipher=l.extend({cfg:o.extend(),createEncryptor:function(S,F){return this.create(this._ENC_XFORM_MODE,S,F)},createDecryptor:function(S,F){return this.create(this._DEC_XFORM_MODE,S,F)},init:function(S,F,A){this.cfg=this.cfg.extend(A),this._xformMode=S,this._key=F,this.reset()},reset:function(){l.reset.call(this),this._doReset()},process:function(S){return this._append(S),this._process()},finalize:function(S){S&&this._append(S);var F=this._doFinalize();return F},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function S(F){return typeof F=="string"?D:k}return function(F){return{encrypt:function(A,E,T){return S(E).encrypt(F,A,E,T)},decrypt:function(A,E,T){return S(E).decrypt(F,A,E,T)}}}}()});s.StreamCipher=d.extend({_doFinalize:function(){var S=this._process(!0);return S},blockSize:1});var g=i.mode={},v=s.BlockCipherMode=o.extend({createEncryptor:function(S,F){return this.Encryptor.create(S,F)},createDecryptor:function(S,F){return this.Decryptor.create(S,F)},init:function(S,F){this._cipher=S,this._iv=F}}),x=g.CBC=function(){var S=v.extend();S.Encryptor=S.extend({processBlock:function(A,E){var T=this._cipher,L=T.blockSize;F.call(this,A,E,L),T.encryptBlock(A,E),this._prevBlock=A.slice(E,E+L)}}),S.Decryptor=S.extend({processBlock:function(A,E){var T=this._cipher,L=T.blockSize,X=A.slice(E,E+L);T.decryptBlock(A,E),F.call(this,A,E,L),this._prevBlock=X}});function F(A,E,T){var L,X=this._iv;X?(L=X,this._iv=r):L=this._prevBlock;for(var J=0;J<T;J++)A[E+J]^=L[J]}return S}(),y=i.pad={},_=y.Pkcs7={pad:function(S,F){for(var A=F*4,E=A-S.sigBytes%A,T=E<<24|E<<16|E<<8|E,L=[],X=0;X<E;X+=4)L.push(T);var J=a.create(L,E);S.concat(J)},unpad:function(S){var F=S.words[S.sigBytes-1>>>2]&255;S.sigBytes-=F}};s.BlockCipher=d.extend({cfg:d.cfg.extend({mode:x,padding:_}),reset:function(){var S;d.reset.call(this);var F=this.cfg,A=F.iv,E=F.mode;this._xformMode==this._ENC_XFORM_MODE?S=E.createEncryptor:(S=E.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==S?this._mode.init(this,A&&A.words):(this._mode=S.call(E,this,A&&A.words),this._mode.__creator=S)},_doProcessBlock:function(S,F){this._mode.processBlock(S,F)},_doFinalize:function(){var S,F=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(F.pad(this._data,this.blockSize),S=this._process(!0)):(S=this._process(!0),F.unpad(S)),S},blockSize:128/32});var f=s.CipherParams=o.extend({init:function(S){this.mixIn(S)},toString:function(S){return(S||this.formatter).stringify(this)}}),b=i.format={},w=b.OpenSSL={stringify:function(S){var F,A=S.ciphertext,E=S.salt;return E?F=a.create([1398893684,1701076831]).concat(E).concat(A):F=A,F.toString(u)},parse:function(S){var F,A=u.parse(S),E=A.words;return E[0]==1398893684&&E[1]==1701076831&&(F=a.create(E.slice(2,4)),E.splice(0,4),A.sigBytes-=16),f.create({ciphertext:A,salt:F})}},k=s.SerializableCipher=o.extend({cfg:o.extend({format:w}),encrypt:function(S,F,A,E){E=this.cfg.extend(E);var T=S.createEncryptor(A,E),L=T.finalize(F),X=T.cfg;return f.create({ciphertext:L,key:A,iv:X.iv,algorithm:S,mode:X.mode,padding:X.padding,blockSize:S.blockSize,formatter:E.format})},decrypt:function(S,F,A,E){E=this.cfg.extend(E),F=this._parse(F,E.format);var T=S.createDecryptor(A,E).finalize(F.ciphertext);return T},_parse:function(S,F){return typeof S=="string"?F.parse(S,this):S}}),P=i.kdf={},$=P.OpenSSL={execute:function(S,F,A,E,T){if(E||(E=a.random(64/8)),T)var L=p.create({keySize:F+A,hasher:T}).compute(S,E);else var L=p.create({keySize:F+A}).compute(S,E);var X=a.create(L.words.slice(F),A*4);return L.sigBytes=F*4,f.create({key:L,iv:X,salt:E})}},D=s.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:$}),encrypt:function(S,F,A,E){E=this.cfg.extend(E);var T=E.kdf.execute(A,S.keySize,S.ivSize,E.salt,E.hasher);E.iv=T.iv;var L=k.encrypt.call(this,S,F,T.key,E);return L.mixIn(T),L},decrypt:function(S,F,A,E){E=this.cfg.extend(E),F=this._parse(F,E.format);var T=E.kdf.execute(A,S.keySize,S.ivSize,F.salt,E.hasher);E.iv=T.iv;var L=k.decrypt.call(this,S,F,T.key,E);return L}})}()})}(bu)),bu.exports}var xu={exports:{}},hh;function Wv(){return hh||(hh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.mode.CFB=function(){var r=n.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,l=a.blockSize;i.call(this,s,o,l,a),this._prevBlock=s.slice(o,o+l)}}),r.Decryptor=r.extend({processBlock:function(s,o){var a=this._cipher,l=a.blockSize,c=s.slice(o,o+l);i.call(this,s,o,l,a),this._prevBlock=c}});function i(s,o,a,l){var c,u=this._iv;u?(c=u.slice(0),this._iv=void 0):c=this._prevBlock,l.encryptBlock(c,0);for(var h=0;h<a;h++)s[o+h]^=c[h]}return r}(),n.mode.CFB})}(xu)),xu.exports}var yu={exports:{}},ph;function qv(){return ph||(ph=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.mode.CTR=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,l=a.blockSize,c=this._iv,u=this._counter;c&&(u=this._counter=c.slice(0),this._iv=void 0);var h=u.slice(0);a.encryptBlock(h,0),u[l-1]=u[l-1]+1|0;for(var p=0;p<l;p++)s[o+p]^=h[p]}});return r.Decryptor=i,r}(),n.mode.CTR})}(yu)),yu.exports}var wu={exports:{}},gh;function Kv(){return gh||(gh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){/** @preserve
 * Counter block mode compatible with  Dr Brian Gladman fileenc.c
 * derived from CryptoJS.mode.CTR
 * Jan Hruby jhruby.web@gmail.com
 */return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function i(a){if((a>>24&255)===255){var l=a>>16&255,c=a>>8&255,u=a&255;l===255?(l=0,c===255?(c=0,u===255?u=0:++u):++c):++l,a=0,a+=l<<16,a+=c<<8,a+=u}else a+=1<<24;return a}function s(a){return(a[0]=i(a[0]))===0&&(a[1]=i(a[1])),a}var o=r.Encryptor=r.extend({processBlock:function(a,l){var c=this._cipher,u=c.blockSize,h=this._iv,p=this._counter;h&&(p=this._counter=h.slice(0),this._iv=void 0),s(p);var d=p.slice(0);c.encryptBlock(d,0);for(var g=0;g<u;g++)a[l+g]^=d[g]}});return r.Decryptor=o,r}(),n.mode.CTRGladman})}(wu)),wu.exports}var Cu={exports:{}},mh;function Zv(){return mh||(mh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,l=a.blockSize,c=this._iv,u=this._keystream;c&&(u=this._keystream=c.slice(0),this._iv=void 0),a.encryptBlock(u,0);for(var h=0;h<l;h++)s[o+h]^=u[h]}});return r.Decryptor=i,r}(),n.mode.OFB})}(Cu)),Cu.exports}var ku={exports:{}},vh;function Yv(){return vh||(vh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,s){this._cipher.encryptBlock(i,s)}}),r.Decryptor=r.extend({processBlock:function(i,s){this._cipher.decryptBlock(i,s)}}),r}(),n.mode.ECB})}(ku)),ku.exports}var Su={exports:{}},_h;function Xv(){return _h||(_h=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.pad.AnsiX923={pad:function(r,i){var s=r.sigBytes,o=i*4,a=o-s%o,l=s+a-1;r.clamp(),r.words[l>>>2]|=a<<24-l%4*8,r.sigBytes+=a},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Ansix923})}(Su)),Su.exports}var Au={exports:{}},bh;function Qv(){return bh||(bh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.pad.Iso10126={pad:function(r,i){var s=i*4,o=s-r.sigBytes%s;r.concat(n.lib.WordArray.random(o-1)).concat(n.lib.WordArray.create([o<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Iso10126})}(Au)),Au.exports}var Eu={exports:{}},xh;function Jv(){return xh||(xh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.pad.Iso97971={pad:function(r,i){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,i)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(Eu)),Eu.exports}var $u={exports:{}},yh;function e7(){return yh||(yh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.pad.ZeroPadding={pad:function(r,i){var s=i*4;r.clamp(),r.sigBytes+=s-(r.sigBytes%s||s)},unpad:function(r){for(var i=r.words,s=r.sigBytes-1,s=r.sigBytes-1;s>=0;s--)if(i[s>>>2]>>>24-s%4*8&255){r.sigBytes=s+1;break}}},n.pad.ZeroPadding})}($u)),$u.exports}var Tu={exports:{}},wh;function t7(){return wh||(wh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(Tu)),Tu.exports}var Pu={exports:{}},Ch;function n7(){return Ch||(Ch=1,function(t,e){(function(n,r,i){t.exports=r(ht(),ln())})(Ke,function(n){return function(r){var i=n,s=i.lib,o=s.CipherParams,a=i.enc,l=a.Hex,c=i.format;c.Hex={stringify:function(u){return u.ciphertext.toString(l)},parse:function(u){var h=l.parse(u);return o.create({ciphertext:h})}}}(),n.format.Hex})}(Pu)),Pu.exports}var Du={exports:{}},kh;function r7(){return kh||(kh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),Xi(),Qi(),xi(),ln())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.BlockCipher,o=r.algo,a=[],l=[],c=[],u=[],h=[],p=[],d=[],g=[],v=[],x=[];(function(){for(var f=[],b=0;b<256;b++)b<128?f[b]=b<<1:f[b]=b<<1^283;for(var w=0,k=0,b=0;b<256;b++){var P=k^k<<1^k<<2^k<<3^k<<4;P=P>>>8^P&255^99,a[w]=P,l[P]=w;var $=f[w],D=f[$],S=f[D],F=f[P]*257^P*16843008;c[w]=F<<24|F>>>8,u[w]=F<<16|F>>>16,h[w]=F<<8|F>>>24,p[w]=F;var F=S*16843009^D*65537^$*257^w*16843008;d[P]=F<<24|F>>>8,g[P]=F<<16|F>>>16,v[P]=F<<8|F>>>24,x[P]=F,w?(w=$^f[f[f[S^$]]],k^=f[f[k]]):w=k=1}})();var y=[0,1,2,4,8,16,32,64,128,27,54],_=o.AES=s.extend({_doReset:function(){var f;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var b=this._keyPriorReset=this._key,w=b.words,k=b.sigBytes/4,P=this._nRounds=k+6,$=(P+1)*4,D=this._keySchedule=[],S=0;S<$;S++)S<k?D[S]=w[S]:(f=D[S-1],S%k?k>6&&S%k==4&&(f=a[f>>>24]<<24|a[f>>>16&255]<<16|a[f>>>8&255]<<8|a[f&255]):(f=f<<8|f>>>24,f=a[f>>>24]<<24|a[f>>>16&255]<<16|a[f>>>8&255]<<8|a[f&255],f^=y[S/k|0]<<24),D[S]=D[S-k]^f);for(var F=this._invKeySchedule=[],A=0;A<$;A++){var S=$-A;if(A%4)var f=D[S];else var f=D[S-4];A<4||S<=4?F[A]=f:F[A]=d[a[f>>>24]]^g[a[f>>>16&255]]^v[a[f>>>8&255]]^x[a[f&255]]}}},encryptBlock:function(f,b){this._doCryptBlock(f,b,this._keySchedule,c,u,h,p,a)},decryptBlock:function(f,b){var w=f[b+1];f[b+1]=f[b+3],f[b+3]=w,this._doCryptBlock(f,b,this._invKeySchedule,d,g,v,x,l);var w=f[b+1];f[b+1]=f[b+3],f[b+3]=w},_doCryptBlock:function(f,b,w,k,P,$,D,S){for(var F=this._nRounds,A=f[b]^w[0],E=f[b+1]^w[1],T=f[b+2]^w[2],L=f[b+3]^w[3],X=4,J=1;J<F;J++){var ne=k[A>>>24]^P[E>>>16&255]^$[T>>>8&255]^D[L&255]^w[X++],se=k[E>>>24]^P[T>>>16&255]^$[L>>>8&255]^D[A&255]^w[X++],ce=k[T>>>24]^P[L>>>16&255]^$[A>>>8&255]^D[E&255]^w[X++],j=k[L>>>24]^P[A>>>16&255]^$[E>>>8&255]^D[T&255]^w[X++];A=ne,E=se,T=ce,L=j}var ne=(S[A>>>24]<<24|S[E>>>16&255]<<16|S[T>>>8&255]<<8|S[L&255])^w[X++],se=(S[E>>>24]<<24|S[T>>>16&255]<<16|S[L>>>8&255]<<8|S[A&255])^w[X++],ce=(S[T>>>24]<<24|S[L>>>16&255]<<16|S[A>>>8&255]<<8|S[E&255])^w[X++],j=(S[L>>>24]<<24|S[A>>>16&255]<<16|S[E>>>8&255]<<8|S[T&255])^w[X++];f[b]=ne,f[b+1]=se,f[b+2]=ce,f[b+3]=j},keySize:256/32});r.AES=s._createHelper(_)}(),n.AES})}(Du)),Du.exports}var Bu={exports:{}},Sh;function i7(){return Sh||(Sh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),Xi(),Qi(),xi(),ln())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.WordArray,o=i.BlockCipher,a=r.algo,l=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],h=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],p=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=o.extend({_doReset:function(){for(var y=this._key,_=y.words,f=[],b=0;b<56;b++){var w=l[b]-1;f[b]=_[w>>>5]>>>31-w%32&1}for(var k=this._subKeys=[],P=0;P<16;P++){for(var $=k[P]=[],D=u[P],b=0;b<24;b++)$[b/6|0]|=f[(c[b]-1+D)%28]<<31-b%6,$[4+(b/6|0)]|=f[28+(c[b+24]-1+D)%28]<<31-b%6;$[0]=$[0]<<1|$[0]>>>31;for(var b=1;b<7;b++)$[b]=$[b]>>>(b-1)*4+3;$[7]=$[7]<<5|$[7]>>>27}for(var S=this._invSubKeys=[],b=0;b<16;b++)S[b]=k[15-b]},encryptBlock:function(y,_){this._doCryptBlock(y,_,this._subKeys)},decryptBlock:function(y,_){this._doCryptBlock(y,_,this._invSubKeys)},_doCryptBlock:function(y,_,f){this._lBlock=y[_],this._rBlock=y[_+1],g.call(this,4,252645135),g.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),g.call(this,1,1431655765);for(var b=0;b<16;b++){for(var w=f[b],k=this._lBlock,P=this._rBlock,$=0,D=0;D<8;D++)$|=h[D][((P^w[D])&p[D])>>>0];this._lBlock=P,this._rBlock=k^$}var S=this._lBlock;this._lBlock=this._rBlock,this._rBlock=S,g.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),y[_]=this._lBlock,y[_+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(y,_){var f=(this._lBlock>>>y^this._rBlock)&_;this._rBlock^=f,this._lBlock^=f<<y}function v(y,_){var f=(this._rBlock>>>y^this._lBlock)&_;this._lBlock^=f,this._rBlock^=f<<y}r.DES=o._createHelper(d);var x=a.TripleDES=o.extend({_doReset:function(){var y=this._key,_=y.words;if(_.length!==2&&_.length!==4&&_.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var f=_.slice(0,2),b=_.length<4?_.slice(0,2):_.slice(2,4),w=_.length<6?_.slice(0,2):_.slice(4,6);this._des1=d.createEncryptor(s.create(f)),this._des2=d.createEncryptor(s.create(b)),this._des3=d.createEncryptor(s.create(w))},encryptBlock:function(y,_){this._des1.encryptBlock(y,_),this._des2.decryptBlock(y,_),this._des3.encryptBlock(y,_)},decryptBlock:function(y,_){this._des3.decryptBlock(y,_),this._des2.encryptBlock(y,_),this._des1.decryptBlock(y,_)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=o._createHelper(x)}(),n.TripleDES})}(Bu)),Bu.exports}var Fu={exports:{}},Ah;function s7(){return Ah||(Ah=1,function(t,e){(function(n,r,i){t.exports=r(ht(),Xi(),Qi(),xi(),ln())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.StreamCipher,o=r.algo,a=o.RC4=s.extend({_doReset:function(){for(var u=this._key,h=u.words,p=u.sigBytes,d=this._S=[],g=0;g<256;g++)d[g]=g;for(var g=0,v=0;g<256;g++){var x=g%p,y=h[x>>>2]>>>24-x%4*8&255;v=(v+d[g]+y)%256;var _=d[g];d[g]=d[v],d[v]=_}this._i=this._j=0},_doProcessBlock:function(u,h){u[h]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var u=this._S,h=this._i,p=this._j,d=0,g=0;g<4;g++){h=(h+1)%256,p=(p+u[h])%256;var v=u[h];u[h]=u[p],u[p]=v,d|=u[(u[h]+u[p])%256]<<24-g*8}return this._i=h,this._j=p,d}r.RC4=s._createHelper(a);var c=o.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var u=this.cfg.drop;u>0;u--)l.call(this)}});r.RC4Drop=s._createHelper(c)}(),n.RC4})}(Fu)),Fu.exports}var Iu={exports:{}},Eh;function o7(){return Eh||(Eh=1,function(t,e){(function(n,r,i){t.exports=r(ht(),Xi(),Qi(),xi(),ln())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.StreamCipher,o=r.algo,a=[],l=[],c=[],u=o.Rabbit=s.extend({_doReset:function(){for(var p=this._key.words,d=this.cfg.iv,g=0;g<4;g++)p[g]=(p[g]<<8|p[g]>>>24)&16711935|(p[g]<<24|p[g]>>>8)&4278255360;var v=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],x=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var g=0;g<4;g++)h.call(this);for(var g=0;g<8;g++)x[g]^=v[g+4&7];if(d){var y=d.words,_=y[0],f=y[1],b=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,w=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,k=b>>>16|w&4294901760,P=w<<16|b&65535;x[0]^=b,x[1]^=k,x[2]^=w,x[3]^=P,x[4]^=b,x[5]^=k,x[6]^=w,x[7]^=P;for(var g=0;g<4;g++)h.call(this)}},_doProcessBlock:function(p,d){var g=this._X;h.call(this),a[0]=g[0]^g[5]>>>16^g[3]<<16,a[1]=g[2]^g[7]>>>16^g[5]<<16,a[2]=g[4]^g[1]>>>16^g[7]<<16,a[3]=g[6]^g[3]>>>16^g[1]<<16;for(var v=0;v<4;v++)a[v]=(a[v]<<8|a[v]>>>24)&16711935|(a[v]<<24|a[v]>>>8)&4278255360,p[d+v]^=a[v]},blockSize:128/32,ivSize:64/32});function h(){for(var p=this._X,d=this._C,g=0;g<8;g++)l[g]=d[g];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<l[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<l[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<l[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<l[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<l[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<l[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<l[6]>>>0?1:0)|0,this._b=d[7]>>>0<l[7]>>>0?1:0;for(var g=0;g<8;g++){var v=p[g]+d[g],x=v&65535,y=v>>>16,_=((x*x>>>17)+x*y>>>15)+y*y,f=((v&4294901760)*v|0)+((v&65535)*v|0);c[g]=_^f}p[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,p[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,p[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,p[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,p[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,p[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,p[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,p[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.Rabbit=s._createHelper(u)}(),n.Rabbit})}(Iu)),Iu.exports}var Ru={exports:{}},$h;function a7(){return $h||($h=1,function(t,e){(function(n,r,i){t.exports=r(ht(),Xi(),Qi(),xi(),ln())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.StreamCipher,o=r.algo,a=[],l=[],c=[],u=o.RabbitLegacy=s.extend({_doReset:function(){var p=this._key.words,d=this.cfg.iv,g=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],v=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var x=0;x<4;x++)h.call(this);for(var x=0;x<8;x++)v[x]^=g[x+4&7];if(d){var y=d.words,_=y[0],f=y[1],b=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,w=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,k=b>>>16|w&4294901760,P=w<<16|b&65535;v[0]^=b,v[1]^=k,v[2]^=w,v[3]^=P,v[4]^=b,v[5]^=k,v[6]^=w,v[7]^=P;for(var x=0;x<4;x++)h.call(this)}},_doProcessBlock:function(p,d){var g=this._X;h.call(this),a[0]=g[0]^g[5]>>>16^g[3]<<16,a[1]=g[2]^g[7]>>>16^g[5]<<16,a[2]=g[4]^g[1]>>>16^g[7]<<16,a[3]=g[6]^g[3]>>>16^g[1]<<16;for(var v=0;v<4;v++)a[v]=(a[v]<<8|a[v]>>>24)&16711935|(a[v]<<24|a[v]>>>8)&4278255360,p[d+v]^=a[v]},blockSize:128/32,ivSize:64/32});function h(){for(var p=this._X,d=this._C,g=0;g<8;g++)l[g]=d[g];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<l[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<l[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<l[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<l[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<l[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<l[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<l[6]>>>0?1:0)|0,this._b=d[7]>>>0<l[7]>>>0?1:0;for(var g=0;g<8;g++){var v=p[g]+d[g],x=v&65535,y=v>>>16,_=((x*x>>>17)+x*y>>>15)+y*y,f=((v&4294901760)*v|0)+((v&65535)*v|0);c[g]=_^f}p[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,p[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,p[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,p[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,p[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,p[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,p[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,p[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.RabbitLegacy=s._createHelper(u)}(),n.RabbitLegacy})}(Ru)),Ru.exports}var Ou={exports:{}},Th;function l7(){return Th||(Th=1,function(t,e){(function(n,r,i){t.exports=r(ht(),Xi(),Qi(),xi(),ln())})(Ke,function(n){return function(){var r=n,i=r.lib,s=i.BlockCipher,o=r.algo;const a=16,l=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function h(x,y){let _=y>>24&255,f=y>>16&255,b=y>>8&255,w=y&255,k=x.sbox[0][_]+x.sbox[1][f];return k=k^x.sbox[2][b],k=k+x.sbox[3][w],k}function p(x,y,_){let f=y,b=_,w;for(let k=0;k<a;++k)f=f^x.pbox[k],b=h(x,f)^b,w=f,f=b,b=w;return w=f,f=b,b=w,b=b^x.pbox[a],f=f^x.pbox[a+1],{left:f,right:b}}function d(x,y,_){let f=y,b=_,w;for(let k=a+1;k>1;--k)f=f^x.pbox[k],b=h(x,f)^b,w=f,f=b,b=w;return w=f,f=b,b=w,b=b^x.pbox[1],f=f^x.pbox[0],{left:f,right:b}}function g(x,y,_){for(let P=0;P<4;P++){x.sbox[P]=[];for(let $=0;$<256;$++)x.sbox[P][$]=c[P][$]}let f=0;for(let P=0;P<a+2;P++)x.pbox[P]=l[P]^y[f],f++,f>=_&&(f=0);let b=0,w=0,k=0;for(let P=0;P<a+2;P+=2)k=p(x,b,w),b=k.left,w=k.right,x.pbox[P]=b,x.pbox[P+1]=w;for(let P=0;P<4;P++)for(let $=0;$<256;$+=2)k=p(x,b,w),b=k.left,w=k.right,x.sbox[P][$]=b,x.sbox[P][$+1]=w;return!0}var v=o.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var x=this._keyPriorReset=this._key,y=x.words,_=x.sigBytes/4;g(u,y,_)}},encryptBlock:function(x,y){var _=p(u,x[y],x[y+1]);x[y]=_.left,x[y+1]=_.right},decryptBlock:function(x,y){var _=d(u,x[y],x[y+1]);x[y]=_.left,x[y+1]=_.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=s._createHelper(v)}(),n.Blowfish})}(Ou)),Ou.exports}(function(t,e){(function(n,r,i){t.exports=r(ht(),S0(),Lv(),Nv(),Xi(),Uv(),Qi(),I4(),U1(),zv(),R4(),jv(),Hv(),Vv(),z1(),Gv(),xi(),ln(),Wv(),qv(),Kv(),Zv(),Yv(),Xv(),Qv(),Jv(),e7(),t7(),n7(),r7(),i7(),s7(),o7(),a7(),l7())})(Ke,function(n){return n})})(Iv);class c7{static account(e){return`accounts·email\\\\${e}`}static aiModel(e){return`aimodels·${e}`}static workflowStep(e,n){return`${e}·steps·${n}`}static workflowStepInput(e,n,r){return`${e}·steps·${n}·inputs·${r}`}static artifact(e,n){return`${e}·artifacts·${n}`}}const Sr=Object.create(null);Sr.open="0";Sr.close="1";Sr.ping="2";Sr.pong="3";Sr.message="4";Sr.upgrade="5";Sr.noop="6";const ml=Object.create(null);Object.keys(Sr).forEach(t=>{ml[Sr[t]]=t});const Id={type:"error",data:"parser error"},O4=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",M4=typeof ArrayBuffer=="function",L4=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,j1=({type:t,data:e},n,r)=>O4&&e instanceof Blob?n?r(e):Ph(e,r):M4&&(e instanceof ArrayBuffer||L4(e))?n?r(e):Ph(new Blob([e]),r):r(Sr[t]+(e||"")),Ph=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function Dh(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Mu;function u7(t,e){if(O4&&t.data instanceof Blob)return t.data.arrayBuffer().then(Dh).then(e);if(M4&&(t.data instanceof ArrayBuffer||L4(t.data)))return e(Dh(t.data));j1(t,!1,n=>{Mu||(Mu=new TextEncoder),e(Mu.encode(n))})}const Bh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Io=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Bh.length;t++)Io[Bh.charCodeAt(t)]=t;const d7=t=>{let e=t.length*.75,n=t.length,r,i=0,s,o,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const c=new ArrayBuffer(e),u=new Uint8Array(c);for(r=0;r<n;r+=4)s=Io[t.charCodeAt(r)],o=Io[t.charCodeAt(r+1)],a=Io[t.charCodeAt(r+2)],l=Io[t.charCodeAt(r+3)],u[i++]=s<<2|o>>4,u[i++]=(o&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},f7=typeof ArrayBuffer=="function",H1=(t,e)=>{if(typeof t!="string")return{type:"message",data:N4(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:h7(t.substring(1),e)}:ml[n]?t.length>1?{type:ml[n],data:t.substring(1)}:{type:ml[n]}:Id},h7=(t,e)=>{if(f7){const n=d7(t);return N4(n,e)}else return{base64:!0,data:t}},N4=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},U4="",p7=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((s,o)=>{j1(s,!1,a=>{r[o]=a,++i===n&&e(r.join(U4))})})},g7=(t,e)=>{const n=t.split(U4),r=[];for(let i=0;i<n.length;i++){const s=H1(n[i],e);if(r.push(s),s.type==="error")break}return r};function m7(){return new TransformStream({transform(t,e){u7(t,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let Lu;function Xa(t){return t.reduce((e,n)=>e+n.length,0)}function Qa(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function v7(t,e){Lu||(Lu=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(Xa(n)<1)break;const l=Qa(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Xa(n)<2)break;const l=Qa(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Xa(n)<8)break;const l=Qa(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),u=c.getUint32(0);if(u>Math.pow(2,21)-1){a.enqueue(Id);break}i=u*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Xa(n)<i)break;const l=Qa(n,i);a.enqueue(H1(s?l:Lu.decode(l),e)),r=0}if(i===0||i>t){a.enqueue(Id);break}}}})}const z4=4;function Yt(t){if(t)return _7(t)}function _7(t){for(var e in Yt.prototype)t[e]=Yt.prototype[e];return t}Yt.prototype.on=Yt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Yt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};Yt.prototype.off=Yt.prototype.removeListener=Yt.prototype.removeAllListeners=Yt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this};Yt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this};Yt.prototype.emitReserved=Yt.prototype.emit;Yt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Yt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Wn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function j4(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const b7=Wn.setTimeout,x7=Wn.clearTimeout;function A0(t,e){e.useNativeTimers?(t.setTimeoutFn=b7.bind(Wn),t.clearTimeoutFn=x7.bind(Wn)):(t.setTimeoutFn=Wn.setTimeout.bind(Wn),t.clearTimeoutFn=Wn.clearTimeout.bind(Wn))}const y7=1.33;function w7(t){return typeof t=="string"?C7(t):Math.ceil((t.byteLength||t.size)*y7)}function C7(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function k7(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function S7(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}class A7 extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class V1 extends Yt{constructor(e){super(),this.writable=!1,A0(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new A7(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=H1(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=k7(e);return n.length?"?"+n:""}}const H4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Rd=64,E7={};let Fh=0,Ja=0,Ih;function Rh(t){let e="";do e=H4[t%Rd]+e,t=Math.floor(t/Rd);while(t>0);return e}function V4(){const t=Rh(+new Date);return t!==Ih?(Fh=0,Ih=t):t+"."+Rh(Fh++)}for(;Ja<Rd;Ja++)E7[H4[Ja]]=Ja;let G4=!1;try{G4=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const $7=G4;function W4(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||$7))return new XMLHttpRequest}catch{}if(!e)try{return new Wn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function T7(){}const P7=function(){return new W4({xdomain:!1}).responseType!=null}();class D7 extends V1{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const n=e&&e.forceBase64;this.supportsBinary=P7&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};g7(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,p7(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=V4()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new wr(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class wr extends Yt{constructor(e,n){super(),A0(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=j4(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new W4(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=wr.requestsCount++,wr.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=T7,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete wr.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}wr.requestsCount=0;wr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Oh);else if(typeof addEventListener=="function"){const t="onpagehide"in Wn?"pagehide":"unload";addEventListener(t,Oh,!1)}}function Oh(){for(let t in wr.requests)wr.requests.hasOwnProperty(t)&&wr.requests[t].abort()}const G1=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),el=Wn.WebSocket||Wn.MozWebSocket,Mh=!0,B7="arraybuffer",Lh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class F7 extends V1{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=Lh?{}:j4(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Mh&&!Lh?n?new el(e,n):new el(e):new el(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;j1(r,this.supportsBinary,s=>{const o={};try{Mh&&this.ws.send(s)}catch{}i&&G1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=V4()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!el}}class I7 extends V1{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=v7(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=m7();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;this.writer.write(r).then(()=>{i&&G1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const R7={websocket:F7,webtransport:I7,polling:D7},O7=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,M7=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Od(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=O7.exec(t||""),s={},o=14;for(;o--;)s[M7[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=L7(s,s.path),s.queryKey=N7(s,s.query),s}function L7(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function N7(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}let q4=class $s extends Yt{constructor(e,n={}){super(),this.binaryType=B7,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Od(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Od(n.host).host),A0(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=S7(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=z4,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new R7[e](r)}open(){let e;if(this.opts.rememberUpgrade&&$s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;$s.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;$s.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function s(){r||(r=!0,u(),n.close(),n=null)}const o=h=>{const p=new Error("probe error: "+h);p.transport=n.name,s(),this.emitReserved("upgradeError",p)};function a(){o("transport closed")}function l(){o("socket closed")}function c(h){n&&h.name!==n.name&&s()}const u=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",$s.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=w7(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:e,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){$s.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}};q4.protocol=z4;function U7(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Od(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const z7=typeof ArrayBuffer=="function",j7=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,K4=Object.prototype.toString,H7=typeof Blob=="function"||typeof Blob<"u"&&K4.call(Blob)==="[object BlobConstructor]",V7=typeof File=="function"||typeof File<"u"&&K4.call(File)==="[object FileConstructor]";function W1(t){return z7&&(t instanceof ArrayBuffer||j7(t))||H7&&t instanceof Blob||V7&&t instanceof File}function vl(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(vl(t[n]))return!0;return!1}if(W1(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return vl(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&vl(t[n]))return!0;return!1}function G7(t){const e=[],n=t.data,r=t;return r.data=Md(n,e),r.attachments=e.length,{packet:r,buffers:e}}function Md(t,e){if(!t)return t;if(W1(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=Md(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=Md(t[r],e));return n}return t}function W7(t,e){return t.data=Ld(t.data,e),delete t.attachments,t}function Ld(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Ld(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Ld(t[n],e));return t}const q7=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],K7=5;var dt;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(dt||(dt={}));class Z7{constructor(e){this.replacer=e}encode(e){return(e.type===dt.EVENT||e.type===dt.ACK)&&vl(e)?this.encodeAsBinary({type:e.type===dt.EVENT?dt.BINARY_EVENT:dt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===dt.BINARY_EVENT||e.type===dt.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=G7(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Nh(t){return Object.prototype.toString.call(t)==="[object Object]"}class q1 extends Yt{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===dt.BINARY_EVENT;r||n.type===dt.BINARY_ACK?(n.type=r?dt.EVENT:dt.ACK,this.reconstructor=new Y7(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(W1(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(dt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===dt.BINARY_EVENT||r.type===dt.BINARY_ACK){const s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const o=e.substring(s,n);if(o!=Number(o)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(e.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(s,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=e.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===e.length)break}r.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){const s=this.tryParse(e.substr(n));if(q1.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case dt.CONNECT:return Nh(n);case dt.DISCONNECT:return n===void 0;case dt.CONNECT_ERROR:return typeof n=="string"||Nh(n);case dt.EVENT:case dt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&q7.indexOf(n[0])===-1);case dt.ACK:case dt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Y7{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=W7(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const X7=Object.freeze(Object.defineProperty({__proto__:null,Decoder:q1,Encoder:Z7,get PacketType(){return dt},protocol:K7},Symbol.toStringTag,{value:"Module"}));function Jn(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Q7=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Z4 extends Yt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Jn(e,"open",this.onopen.bind(this)),Jn(e,"packet",this.onpacket.bind(this)),Jn(e,"error",this.onerror.bind(this)),Jn(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(Q7.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:dt.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,a=n.pop();this._registerAckCallback(o,a),r.id=o}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:dt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case dt.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case dt.EVENT:case dt.BINARY_EVENT:this.onevent(e);break;case dt.ACK:case dt.BINARY_ACK:this.onack(e);break;case dt.DISCONNECT:this.ondisconnect();break;case dt.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:dt.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:dt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function ro(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}ro.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0};ro.prototype.reset=function(){this.attempts=0};ro.prototype.setMin=function(t){this.ms=t};ro.prototype.setMax=function(t){this.max=t};ro.prototype.setJitter=function(t){this.jitter=t};class Nd extends Yt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,A0(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ro({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||X7;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new q4(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Jn(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=Jn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Jn(e,"ping",this.onping.bind(this)),Jn(e,"data",this.ondata.bind(this)),Jn(e,"error",this.onerror.bind(this)),Jn(e,"close",this.onclose.bind(this)),Jn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){G1(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Z4(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const wo={};function _l(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=U7(t,e.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=wo[i]&&s in wo[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let l;return a?l=new Nd(r,e):(wo[i]||(wo[i]=new Nd(r,e)),l=wo[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(_l,{Manager:Nd,Socket:Z4,io:_l,connect:_l});/**
  postmate - A powerful, simple, promise-based postMessage library
  @version v1.5.2
  @link https://github.com/dollarshaveclub/postmate
  @author Jacob Kelley <jakie8@gmail.com>
  @license MIT
**/var Gi="application/x-postmate-v1+json",J7=5,e_=0,t_=function(){return++e_},n_=function(e){var n=document.createElement("a");n.href=e;var r=n.protocol.length>4?n.protocol:window.location.protocol,i=n.host.length?n.port==="80"||n.port==="443"?n.hostname:n.host:window.location.host;return n.origin||r+"//"+i},r_={handshake:1,"handshake-reply":1,call:1,emit:1,reply:1,request:1},K1=function(e,n){return!(typeof n=="string"&&e.origin!==n||!e.data||typeof e.data=="object"&&!("postmate"in e.data)||e.data.type!==Gi||!r_[e.data.postmate])},i_=function(e,n){var r=typeof e[n]=="function"?e[n]():e[n];return Wi.Promise.resolve(r)},s_=function(){function t(n){var r=this;this.parent=n.parent,this.frame=n.frame,this.child=n.child,this.childOrigin=n.childOrigin,this.events={},this.listener=function(i){if(!K1(i,r.childOrigin))return!1;var s=((i||{}).data||{}).value||{},o=s.data,a=s.name;i.data.postmate==="emit"&&a in r.events&&r.events[a].call(r,o)},this.parent.addEventListener("message",this.listener,!1)}var e=t.prototype;return e.get=function(r){var i=this;return new Wi.Promise(function(s){var o=t_(),a=function l(c){c.data.uid===o&&c.data.postmate==="reply"&&(i.parent.removeEventListener("message",l,!1),s(c.data.value))};i.parent.addEventListener("message",a,!1),i.child.postMessage({postmate:"request",type:Gi,property:r,uid:o},i.childOrigin)})},e.call=function(r,i){this.child.postMessage({postmate:"call",type:Gi,property:r,data:i},this.childOrigin)},e.on=function(r,i){this.events[r]=i},e.destroy=function(){window.removeEventListener("message",this.listener,!1),this.frame.parentNode.removeChild(this.frame)},t}(),o_=function(){function t(n){var r=this;this.model=n.model,this.parent=n.parent,this.parentOrigin=n.parentOrigin,this.child=n.child,this.child.addEventListener("message",function(i){if(K1(i,r.parentOrigin)){var s=i.data,o=s.property,a=s.uid,l=s.data;if(i.data.postmate==="call"){o in r.model&&typeof r.model[o]=="function"&&r.model[o](l);return}i_(r.model,o).then(function(c){return i.source.postMessage({property:o,postmate:"reply",type:Gi,uid:a,value:c},i.origin)})}})}var e=t.prototype;return e.emit=function(r,i){this.parent.postMessage({postmate:"emit",type:Gi,value:{name:r,data:i}},this.parentOrigin)},t}(),Wi=function(){function t(n){var r=n.container,i=r===void 0?typeof i<"u"?i:document.body:r,s=n.model,o=n.url,a=n.name,l=n.classListArray,c=l===void 0?[]:l;return this.parent=window,this.frame=document.createElement("iframe"),this.frame.name=a||"",this.frame.classList.add.apply(this.frame.classList,c),i.appendChild(this.frame),this.child=this.frame.contentWindow||this.frame.contentDocument.parentWindow,this.model=s||{},this.sendHandshake(o)}var e=t.prototype;return e.sendHandshake=function(r){var i=this,s=n_(r),o=0,a;return new t.Promise(function(l,c){var u=function d(g){return K1(g,s)?g.data.postmate==="handshake-reply"?(clearInterval(a),i.parent.removeEventListener("message",d,!1),i.childOrigin=g.origin,l(new s_(i))):c("Failed handshake"):!1};i.parent.addEventListener("message",u,!1);var h=function(){o++,i.child.postMessage({postmate:"handshake",type:Gi,model:i.model},s),o===J7&&clearInterval(a)},p=function(){h(),a=setInterval(h,500)};i.frame.attachEvent?i.frame.attachEvent("onload",p):i.frame.onload=p,i.frame.src=r})},t}();Wi.debug=!1;Wi.Promise=function(){try{return window?window.Promise:Promise}catch{return null}}();Wi.Model=function(){function t(n){return this.child=window,this.model=n,this.parent=this.child.parent,this.sendHandshakeReply()}var e=t.prototype;return e.sendHandshakeReply=function(){var r=this;return new Wi.Promise(function(i,s){var o=function a(l){if(l.data.postmate){if(l.data.postmate==="handshake"){r.child.removeEventListener("message",a,!1),l.source.postMessage({postmate:"handshake-reply",type:Gi},l.origin),r.parentOrigin=l.origin;var c=l.data.model;return c&&Object.keys(c).forEach(function(u){r.model[u]=c[u]}),i(new o_(r))}return s("Handshake Reply Failed")}};r.child.addEventListener("message",o,!1)})},t}();const E0="https://id.cogniwerk.ai",Uh=window.location,Y4=`${Uh.protocol}//${Uh.host}`;let X4,Bn;async function Q4(t){var n;if(localStorage.setItem("prev-session-token",t),await Bn.loadAccount(`session/${t}`,{},!0),!((n=Bn==null?void 0:Bn.account)!=null&&n.email))return;const e=localStorage.getItem("login-return-path");if(e){localStorage.removeItem("login-return-path");let r=e;e.startsWith("http")&&(r=new URL(e).pathname),setTimeout(function(){X4.replace(r)},500)}}async function zh(){let t;try{t=new Wi({container:document.getElementById("__auth"),url:`${E0}/echo-cookies`,name:"__auth_frame"})}catch(i){return console.debug("iframe handshake failed",i),null}const e=await t,n=await e.get("requestCookies");e.destroy();let r;try{const i=JSON.parse(n);for(const s of i){const o=s.match(/ory_kratos_session=([^;]+)/);o&&(r=o[1])}}catch(i){console.error("failed to search for a session cookie",i)}return r}async function a_(t,e){window.getAuthframeSessionToken=zh,X4=t,Bn=e,window.$cogniwerk=Bn;const n=localStorage.getItem("forced-session-token")||await zh();n&&await Q4(n)}async function l_(){window.location.href=`${E0}/self-service/registration/browser?return_to=${Y4}`}async function c_(){window.location.href=`${E0}/self-service/login/browser?return_to=${Y4}`}async function u_(){localStorage.removeItem("__session"),localStorage.removeItem("rightsidebar"),localStorage.removeItem("workspace"),localStorage.removeItem("leftsidebar"),Bn.account=null;const t=document.getElementById("__signout-iframe");t.onload=function(){setTimeout(function(){Bn.account=null,window.location="/"},2e3)},t.src=`${E0}/logout`,document.body.classList.add("blocked")}function d_(){var t;return!!((t=Bn==null?void 0:Bn.account)!=null&&t.email)}const Ud={startup:a_,signUp:l_,signIn:c_,signOut:u_,isAuthenticated:d_,idsrvAuth:!1,mgr:{getUser:function(){return Bn==null?void 0:Bn.account}},applySessionToken:Q4};let nt="",Ii="";const Nu="https://assets-cogniwerk.b-cdn.net";if(typeof window>"u")nt="https://cwapi.cogniwerk.ai",Ii="https://cwai-genai.b-cdn.net";else{nt="https://cwapi.cogniwerk.ai",Ii="https://cw-genai-staging.b-cdn.net";const t=window.location.host;t==="cogniwerk.ai"&&(nt="https://cwapi.cogniwerk.ai",Ii="https://cwai-genai.b-cdn.net"),t.endsWith(".env.cogniwerk.ai")&&(nt=`https://${t}/api`,Ii="https://cw-genai-staging.b-cdn.net"),t==="cogniwerk.localhost:5173"&&(nt="https://staging.env.cogniwerk.ai/api",Ii="https://cw-genai-staging.b-cdn.net");const e=localStorage.getItem("BACKEND_URL");e&&(console.debug("overriding backend url to",e),nt=e)}const Ri=class Ri{constructor(){Xn(this,"account",null);Xn(this,"CMS",null);Xn(this,"UID",c7);Xn(this,"socket",null);Xn(this,"_workflows",null);Xn(this,"role");Xn(this,"pollingInterval",null)}static getInstance(){return Ri.instance||(Ri.instance=new Ri),Ri.instance}async pollAuthAPI(e){try{const r=await(await fetch(`${nt}/account/auth`,{method:"POST",body:JSON.stringify({access_token:e}),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store"}})).json();(!r||r===null)&&(localStorage.removeItem("__session"),this.account=null,localStorage.setItem("login-return-path",window.location.pathname),Ud.signIn(),this.stopPollingAuth())}catch(n){console.error("Error fetching /auth API:",n),this.stopPollingAuth()}}startPollingAuth(e){this.pollingInterval&&clearInterval(this.pollingInterval),this.pollingInterval=setInterval(()=>{this.pollAuthAPI(e)},15e3)}stopPollingAuth(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null)}async loadAccount(e,n,r,i=0){var o,a,l;if(this.account!=null&&!r)return;const s={access_token:e,defaultValues:n};try{const u=await(await fetch(`${nt}/account/auth`,{method:"POST",body:JSON.stringify(s),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store"}})).json();console.log(u),this.account=u==null?void 0:u.account,this.role=u==null?void 0:u.role,localStorage.getItem("SIMULATE_USER_UNVERIFIED")==="1"&&(this.account.additionalInfo.verified=!1),this.startPollingAuth(e)}catch{i<5&&setTimeout(()=>{this.loadAccount(e,n,r,++i)},1e3);return}if((o=this.account)!=null&&o.email){if(this.account.access_token=e,((a=window==null?void 0:window.location)==null?void 0:a.host)==="cogniwerk.ai"){let c=null;try{c=_l("wss://ws.cogniwerk.ai",{secure:!0,transports:["websocket"],path:"/socket.io",auth:{token:e}}),c.on("connect_failed",h=>console.error("socket connect_failed",h));const u=this;c.on("updateMessage",function(){console.debug("updateMessage received from websocket!"),u._workflows=null}),this.socket=c}catch(u){console.debug("error creating a web socket",u)}}if((l=this.account)!=null&&l.pictureUri){const c=this.account.pictureUri.split("/").pop(),u=Math.round(new Date/1e3/5)*5;this.account.pictureUri=`https://cwbefiles.b-cdn.net/cogniwerk-profile-assets/${c}?_t=${u}`}}}async updateAccount(e,n){return await(await fetch(`${nt}/account/`,{method:"PUT",body:JSON.stringify(n),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async getWorkflows(e,n,r){return this._workflows=await this.fetchWorkflows(e,n,r),this._workflows}async fetchWorkflows(e,n,r){const i=new URLSearchParams({arg:Math.random(),pageNo:n||"",pageSize:r||""});return await(await fetch(`${nt}/workflow/?${i}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`}})).json()}async getWorkflowsCount(e){return await(await fetch(`${nt}/workflow/count`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`}})).json()}async fetchCreditRequests(e){return await(await fetch(`${nt}/account/credit-updates`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`}})).json()}async getArtifact(e,n){return await(await fetch(`${nt}/artifact/${n}`,{method:"GET",headers:{Accept:"image/x-png",Authorization:`Bearer ${e}`}})).blob()}async deleteArtifact(e,n){return await(await fetch(`${nt}/artifact/${n}`,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async deleteWorkflow(e,n){return await(await fetch(`${nt}/workflow/${n}`,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async deleteMultipleArtifacts(e,n){return await(await fetch(`${nt}/artifact/${n.join(",")}`,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async renameArtifact(e,n,r){return await(await fetch(`${nt}/artifact/${n}`,{method:"PUT",body:JSON.stringify({fileName:r}),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async executeStableDiffusion(e,n){const r=await fetch(`${nt}/workflow/`,{method:"POST",body:JSON.stringify(n),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}});if(!r.ok){let i={};if(r.status===401)throw new Error("Unauthorized");try{i=await r.json()}catch{i={errorMessage:"General error"}}throw new Error(i.errorMessage)}return await r.json()}async imageUpload(e,n){const r=await fetch(`${nt}/workflow/artifact`,{method:"POST",body:JSON.stringify(n),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}});if(!r.ok){let i={};try{i=await r.json()}catch{i={errorMessage:"General error"}}throw new Error(i.errorMessage)}return await r.json()}async sendFeedback(e,n,r){return await(await fetch("https://cms.cogniwerk.ai/items/feedback",{method:"POST",body:JSON.stringify({message:e,name:r,email:n}),headers:{Accept:"application/json","Content-Type":"application/json"}})).json()}async registerNewsletter(e,n){return await(await fetch(`${nt}/mailchimp/subscribe`,{method:"POST",body:JSON.stringify({email:e,lang:n||"en"}),headers:{"Content-Type":"application/json","Cache-Control":"no-store"}})).json()}async triggerCustomerJourney(e){return await(await fetch(`${nt}/account/trigger-customer-journey`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json","Cache-Control":"no-store"}})).json()}async getWorkflowStatus(e,n){var s,o;const i=await(await fetch(`${nt}/workflow/${n}/genai-status`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json();return((o=(s=i==null?void 0:i.result)==null?void 0:s.progress)==null?void 0:o.percentage)===100&&(this._workflows=null),i}async getModelData(e){const n=/models\/(\d+)/.exec(e);if(!n)throw new Error("Invalid url. Expected something like: civitai.com/models/123451/model-name");const r=n[1],s=await(await fetch(`https://api.civitai.com/v1/models/${r}`)).json();if(console.debug("received model data",s),s.type.toLowerCase()!=="lora")throw new Error(`Unsupported model type (${s.type}), only LORA models are supported currently.`);let o=null;const a=s.modelVersions;a.sort((x,y)=>y.createdAt.localeCompare(x.createdAt));for(const x of a){const y=x.baseModel.toLowerCase();if(["sd 1.5","sdxl 1.0","flux.1 s"].includes(y.toLowerCase())===!0){o=x;break}}if(!o)throw new Error("Unsupported base model. We only support SD 1.5, SDXL 1.0 and FLUX.1 S currently.");let l=!1;for(const x of o.files)if(!(x.metadata.format.toLowerCase()!="safetensor"||(x.metadata.size||"").toLowerCase()=="pruned")){l=!0;break}if(!l)throw new Error("Unsupported file format. We only support non-pruned models in safetensor format.");const c=new Set(s.allowCommercialUse),u=(x,y="allowed")=>x?y:"not {t}",h=`Run on external service ${u(c.has("Rent"))}.
                     Selling images is ${u(c.has("Image"))}.
                     Crediting model creator is ${u(s.allowNoCredit,"required")}`,p=[];for(const x of(o==null?void 0:o.trainedWords)||[])p.push(...x.split(","));const d=p.filter(x=>{var y;return!!((y=x==null?void 0:x.trim())!=null&&y.length)}),g=`civitai-model-${r}`;return{base_model:o.baseModel,trigger_words:d,type:s.type,use_prompt_embedding:!1,slug:g,description:o.description||s.description||"",author:`${s.creator.username} at civitai`,architecture:"Diffusion",publish_year:o.publishedAt.split("-")[0],license:h,name:s.name,teaser:`model ${s.name} from civitai.  Base Model: ${o.baseModel}. ${d!=null&&d.length?"Trigger words: "+d.join(", "):""}`,small_image:o.images.length>1?o.images[1].url:o.images[0].url,recommended_settings:`{
    "width": 1024,
    "height": 1024,
    "variant": "${g}",
    "scheduler": "K_EULER_ANCESTRAL",
    "guidance_scale": 5,
    "num_inference_steps": 20,
     "promptTemplate": "",
    "negativePromptTemplate": ""
}`}}async getQualityBoosterTags(e){if(!e.trim().length)return{prompt_tags:[],negative_prompt_tags:[]};const r=await(await fetch(`${Ii}/prompt-analysis`,{method:"POST",body:JSON.stringify({prompt:e}),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store"}})).json();return{prompt_tags:r.boosters.positive.filter(i=>i.trim().length>0),negative_prompt_tags:r.boosters.negative.filter(i=>i.trim().length>0)}}async getPromptHelperTags(e){var i;return(i=e==null?void 0:e.trim())!=null&&i.length?(await(await fetch(`${Ii}/prompt-analysis`,{method:"POST",body:JSON.stringify({prompt:e}),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store"}})).json()).helpers.map(s=>({name:s,type:"normal"})):[]}async transformImage(e,n){return await(await fetch(`${nt}/ai/image-transform/${e}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({image:n})})).json()}async executeCreditRequest(e,n){return await fetch(`${nt}/account/credit-request/`,{method:"POST",body:JSON.stringify(n),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})}async executeCreditUpdate(e,n){return await await fetch(`${nt}/account/credits/`,{method:"PUT",body:JSON.stringify(n),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})}async fetchSharedImage(e){return await(await fetch(`${nt}/share/${e}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store"}})).json()}async createArtifactShareLink(e,n){return(await fetch(`${nt}/share/`,{method:"POST",body:JSON.stringify(n),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async deleteArtifactShareLink(e,n){return(await fetch(`${nt}/share/${n}`,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async addPeset(e,n){return await(await fetch(`${nt}/account/preset`,{method:"POST",body:JSON.stringify({presetData:n}),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async deletePreset(e,n){return await(await fetch(`${nt}/account/preset/${n}`,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async importModel(e,n){return await(await fetch(`${nt}/account/civitai-model`,{method:"POST",body:JSON.stringify({civitaiModelData:n}),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async deleteCivitaiModel(e,n){const r=n.startsWith("userlora--")?`finetuning-task/${n.split("--")[1]}`:`account/civitai-model/${n}`;return await(await fetch(`${nt}/${r}`,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async executeTrainModel(e,n,r,i,s){delete n.enable_bucket,delete n.flip_aug;const o={config:{model_settings:n,images:r},status:s};return await(await fetch(`${nt}/finetuning-task${i?"/"+i:""}`,{method:i?"PUT":"POST",body:JSON.stringify(o),headers:{Accept:"application/json",Authorization:`Bearer ${e}`,"Content-Type":"application/json"}})).json()}async retryTrainingModel(e,n){return await(await fetch(`${nt}/finetuning-task/${n}`,{method:"PUT",body:JSON.stringify({status:"retry"}),headers:{Accept:"application/json",Authorization:`Bearer ${e}`,"Content-Type":"application/json"}})).json()}async getTrainingModelsForIds(e,n){return await(await fetch(`${nt}/finetuning-task/${n}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`}})).json()}async sendVerificationEmail(e){return(await fetch(`${nt}/account/resend-verification`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async getFinetuningModels(e){return await(await fetch(`${nt}/finetuning-task`,{method:"GET",headers:{Authorization:`Bearer ${e}`}})).json()}async getAccountVariables(e,n){return await(await fetch(`${nt}/account/variables?variable_types=${n}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async addAccountVariable(e,n){return await(await fetch(`${nt}/account/variables`,{method:"POST",body:JSON.stringify(n),headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}})).json()}async deleteAccountVariable(e,n){const r=await fetch(`${nt}/account/variables/${n}`,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"no-store",Authorization:`Bearer ${e}`}});if(!r.ok)throw Error;return r}async getCivitai(){return await(await fetch(`${Nu}/genai/civitai/230526`)).json()}async uploadImageForTraining(e,n,r){var l,c,u;const s=await(await fetch(r.url)).blob(),o=((u=(c=(l=r==null?void 0:r.metaData)==null?void 0:l.name)==null?void 0:c.split("."))==null?void 0:u.pop())||"png";return await fetch(`${Nu}/finetuning-data/${n}/image/${r.id}.${o}`,{method:"POST",body:s,headers:{"Content-Type":s.type,Authorization:`Bearer ${e}`}})}async uploadTrainingConfig(e,n,r,i){const s={model_settings:r,images:i},o={image_captions:{},model_settings:s.model_settings};for(const p of s.images){const d=p.trigger_words.filter(g=>g.enabled);d.length===0&&!p.caption?o.image_captions[p.id]="":o.image_captions[p.id]=p.trigger_words?[...d.map(g=>g.caption)].join(", ")+", "+(p.caption||""):p.caption||""}const a=JSON.stringify(o),l=new Blob([a],{type:"application/json"}),c=new File([l],"config.json",{type:"application/json"}),u=new FormData;return u.set("config",c,"config.json"),await fetch(`${Nu}/finetuning-data/${n}/config`,{method:"POST",body:u,headers:{Authorization:`Bearer ${e}`}})}async log(e){}};Xn(Ri,"instance");let ea=Ri;/*!
  * vue-router v4.4.3
  * (c) 2024 Eduardo San Martin Morote
  * @license MIT
  */const Ts=typeof document<"u";function f_(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const kt=Object.assign;function Uu(t,e){const n={};for(const r in e){const i=e[r];n[r]=cr(i)?i.map(t):t(i)}return n}const zo=()=>{},cr=Array.isArray,J4=/#/g,h_=/&/g,p_=/\//g,g_=/=/g,m_=/\?/g,e5=/\+/g,v_=/%5B/g,__=/%5D/g,t5=/%5E/g,b_=/%60/g,n5=/%7B/g,x_=/%7C/g,r5=/%7D/g,y_=/%20/g;function Z1(t){return encodeURI(""+t).replace(x_,"|").replace(v_,"[").replace(__,"]")}function w_(t){return Z1(t).replace(n5,"{").replace(r5,"}").replace(t5,"^")}function zd(t){return Z1(t).replace(e5,"%2B").replace(y_,"+").replace(J4,"%23").replace(h_,"%26").replace(b_,"`").replace(n5,"{").replace(r5,"}").replace(t5,"^")}function C_(t){return zd(t).replace(g_,"%3D")}function k_(t){return Z1(t).replace(J4,"%23").replace(m_,"%3F")}function S_(t){return t==null?"":k_(t).replace(p_,"%2F")}function ta(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const A_=/\/$/,E_=t=>t.replace(A_,"");function zu(t,e,n="/"){let r,i={},s="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=e.slice(0,l),s=e.slice(l+1,a>-1?a:e.length),i=t(s)),a>-1&&(r=r||e.slice(0,a),o=e.slice(a,e.length)),r=D_(r??e,n),{fullPath:r+(s&&"?")+s+o,path:r,query:i,hash:ta(o)}}function $_(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function jh(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function T_(t,e,n){const r=e.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&qs(e.matched[r],n.matched[i])&&i5(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function qs(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function i5(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!P_(t[n],e[n]))return!1;return!0}function P_(t,e){return cr(t)?Hh(t,e):cr(e)?Hh(e,t):t===e}function Hh(t,e){return cr(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t.length===1&&t[0]===e}function D_(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/"),i=r[r.length-1];(i===".."||i===".")&&r.push("");let s=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(o).join("/")}const Yr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var na;(function(t){t.pop="pop",t.push="push"})(na||(na={}));var jo;(function(t){t.back="back",t.forward="forward",t.unknown=""})(jo||(jo={}));function B_(t){if(!t)if(Ts){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),E_(t)}const F_=/^[^#]+#/;function I_(t,e){return t.replace(F_,"#")+e}function R_(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{behavior:e.behavior,left:r.left-n.left-(e.left||0),top:r.top-n.top-(e.top||0)}}const $0=()=>({left:window.scrollX,top:window.scrollY});function O_(t){let e;if("el"in t){const n=t.el,r=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=R_(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function Vh(t,e){return(history.state?history.state.position-e:-1)+t}const jd=new Map;function M_(t,e){jd.set(t,e)}function L_(t){const e=jd.get(t);return jd.delete(t),e}let N_=()=>location.protocol+"//"+location.host;function s5(t,e){const{pathname:n,search:r,hash:i}=e,s=t.indexOf("#");if(s>-1){let a=i.includes(t.slice(s))?t.slice(s).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),jh(l,"")}return jh(n,t)+r+i}function U_(t,e,n,r){let i=[],s=[],o=null;const a=({state:p})=>{const d=s5(t,location),g=n.value,v=e.value;let x=0;if(p){if(n.value=d,e.value=p,o&&o===g){o=null;return}x=v?p.position-v.position:0}else r(d);i.forEach(y=>{y(n.value,g,{delta:x,type:na.pop,direction:x?x>0?jo.forward:jo.back:jo.unknown})})};function l(){o=n.value}function c(p){i.push(p);const d=()=>{const g=i.indexOf(p);g>-1&&i.splice(g,1)};return s.push(d),d}function u(){const{history:p}=window;p.state&&p.replaceState(kt({},p.state,{scroll:$0()}),"")}function h(){for(const p of s)p();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:h}}function Gh(t,e,n,r=!1,i=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:i?$0():null}}function z_(t){const{history:e,location:n}=window,r={value:s5(t,n)},i={value:e.state};i.value||s(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(l,c,u){const h=t.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?t:t.slice(h))+l:N_()+t+l;try{e[u?"replaceState":"pushState"](c,"",p),i.value=c}catch(d){console.error(d),n[u?"replace":"assign"](p)}}function o(l,c){const u=kt({},e.state,Gh(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});s(l,u,!0),r.value=l}function a(l,c){const u=kt({},i.value,e.state,{forward:l,scroll:$0()});s(u.current,u,!0);const h=kt({},Gh(r.value,l,null),{position:u.position+1},c);s(l,h,!1),r.value=l}return{location:r,state:i,push:a,replace:o}}function j_(t){t=B_(t);const e=z_(t),n=U_(t,e.state,e.location,e.replace);function r(s,o=!0){o||n.pauseListeners(),history.go(s)}const i=kt({location:"",base:t,go:r,createHref:I_.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function H_(t){return typeof t=="string"||t&&typeof t=="object"}function o5(t){return typeof t=="string"||typeof t=="symbol"}const a5=Symbol("");var Wh;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(Wh||(Wh={}));function Ks(t,e){return kt(new Error,{type:t,[a5]:!0},e)}function Br(t,e){return t instanceof Error&&a5 in t&&(e==null||!!(t.type&e))}const qh="[^/]+?",V_={sensitive:!1,strict:!1,start:!0,end:!0},G_=/[.+*?^${}()[\]/\\]/g;function W_(t,e){const n=kt({},V_,e),r=[];let i=n.start?"^":"";const s=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let h=0;h<c.length;h++){const p=c[h];let d=40+(n.sensitive?.25:0);if(p.type===0)h||(i+="/"),i+=p.value.replace(G_,"\\$&"),d+=40;else if(p.type===1){const{value:g,repeatable:v,optional:x,regexp:y}=p;s.push({name:g,repeatable:v,optional:x});const _=y||qh;if(_!==qh){d+=10;try{new RegExp(`(${_})`)}catch(b){throw new Error(`Invalid custom RegExp for param "${g}" (${_}): `+b.message)}}let f=v?`((?:${_})(?:/(?:${_}))*)`:`(${_})`;h||(f=x&&c.length<2?`(?:/${f})`:"/"+f),x&&(f+="?"),i+=f,d+=20,x&&(d+=-8),v&&(d+=-20),_===".*"&&(d+=-50)}u.push(d)}r.push(u)}if(n.strict&&n.end){const c=r.length-1;r[c][r[c].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const o=new RegExp(i,n.sensitive?"":"i");function a(c){const u=c.match(o),h={};if(!u)return null;for(let p=1;p<u.length;p++){const d=u[p]||"",g=s[p-1];h[g.name]=d&&g.repeatable?d.split("/"):d}return h}function l(c){let u="",h=!1;for(const p of t){(!h||!u.endsWith("/"))&&(u+="/"),h=!1;for(const d of p)if(d.type===0)u+=d.value;else if(d.type===1){const{value:g,repeatable:v,optional:x}=d,y=g in c?c[g]:"";if(cr(y)&&!v)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const _=cr(y)?y.join("/"):y;if(!_)if(x)p.length<2&&(u.endsWith("/")?u=u.slice(0,-1):h=!0);else throw new Error(`Missing required param "${g}"`);u+=_}}return u||"/"}return{re:o,score:r,keys:s,parse:a,stringify:l}}function q_(t,e){let n=0;for(;n<t.length&&n<e.length;){const r=e[n]-t[n];if(r)return r;n++}return t.length<e.length?t.length===1&&t[0]===80?-1:1:t.length>e.length?e.length===1&&e[0]===80?1:-1:0}function l5(t,e){let n=0;const r=t.score,i=e.score;for(;n<r.length&&n<i.length;){const s=q_(r[n],i[n]);if(s)return s;n++}if(Math.abs(i.length-r.length)===1){if(Kh(r))return 1;if(Kh(i))return-1}return i.length-r.length}function Kh(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const K_={type:0,value:""},Z_=/[a-zA-Z0-9_]/;function Y_(t){if(!t)return[[]];if(t==="/")return[[K_]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(d){throw new Error(`ERR (${n})/"${c}": ${d}`)}let n=0,r=n;const i=[];let s;function o(){s&&i.push(s),s=[]}let a=0,l,c="",u="";function h(){c&&(n===0?s.push({type:0,value:c}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function p(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(c&&h(),o()):l===":"?(h(),n=1):p();break;case 4:p(),n=r;break;case 1:l==="("?n=2:Z_.test(l)?p():(h(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:h(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return n===2&&e(`Unfinished custom RegExp for param "${c}"`),h(),o(),i}function X_(t,e,n){const r=W_(Y_(t.path),n),i=kt(r,{record:t,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function Q_(t,e){const n=[],r=new Map;e=Xh({strict:!1,end:!0,sensitive:!1},e);function i(h){return r.get(h)}function s(h,p,d){const g=!d,v=J_(h);v.aliasOf=d&&d.record;const x=Xh(e,h),y=[v];if("alias"in h){const b=typeof h.alias=="string"?[h.alias]:h.alias;for(const w of b)y.push(kt({},v,{components:d?d.record.components:v.components,path:w,aliasOf:d?d.record:v}))}let _,f;for(const b of y){const{path:w}=b;if(p&&w[0]!=="/"){const k=p.record.path,P=k[k.length-1]==="/"?"":"/";b.path=p.record.path+(w&&P+w)}if(_=X_(b,p,x),d?d.alias.push(_):(f=f||_,f!==_&&f.alias.push(_),g&&h.name&&!Yh(_)&&o(h.name)),c5(_)&&l(_),v.children){const k=v.children;for(let P=0;P<k.length;P++)s(k[P],_,d&&d.children[P])}d=d||_}return f?()=>{o(f)}:zo}function o(h){if(o5(h)){const p=r.get(h);p&&(r.delete(h),n.splice(n.indexOf(p),1),p.children.forEach(o),p.alias.forEach(o))}else{const p=n.indexOf(h);p>-1&&(n.splice(p,1),h.record.name&&r.delete(h.record.name),h.children.forEach(o),h.alias.forEach(o))}}function a(){return n}function l(h){const p=nb(h,n);n.splice(p,0,h),h.record.name&&!Yh(h)&&r.set(h.record.name,h)}function c(h,p){let d,g={},v,x;if("name"in h&&h.name){if(d=r.get(h.name),!d)throw Ks(1,{location:h});x=d.record.name,g=kt(Zh(p.params,d.keys.filter(f=>!f.optional).concat(d.parent?d.parent.keys.filter(f=>f.optional):[]).map(f=>f.name)),h.params&&Zh(h.params,d.keys.map(f=>f.name))),v=d.stringify(g)}else if(h.path!=null)v=h.path,d=n.find(f=>f.re.test(v)),d&&(g=d.parse(v),x=d.record.name);else{if(d=p.name?r.get(p.name):n.find(f=>f.re.test(p.path)),!d)throw Ks(1,{location:h,currentLocation:p});x=d.record.name,g=kt({},p.params,h.params),v=d.stringify(g)}const y=[];let _=d;for(;_;)y.unshift(_.record),_=_.parent;return{name:x,path:v,params:g,matched:y,meta:tb(y)}}t.forEach(h=>s(h));function u(){n.length=0,r.clear()}return{addRoute:s,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:i}}function Zh(t,e){const n={};for(const r of e)r in t&&(n[r]=t[r]);return n}function J_(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:eb(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function eb(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const r in t.components)e[r]=typeof n=="object"?n[r]:n;return e}function Yh(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function tb(t){return t.reduce((e,n)=>kt(e,n.meta),{})}function Xh(t,e){const n={};for(const r in t)n[r]=r in e?e[r]:t[r];return n}function nb(t,e){let n=0,r=e.length;for(;n!==r;){const s=n+r>>1;l5(t,e[s])<0?r=s:n=s+1}const i=rb(t);return i&&(r=e.lastIndexOf(i,r-1)),r}function rb(t){let e=t;for(;e=e.parent;)if(c5(e)&&l5(t,e)===0)return e}function c5({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function ib(t){const e={};if(t===""||t==="?")return e;const r=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;i<r.length;++i){const s=r[i].replace(e5," "),o=s.indexOf("="),a=ta(o<0?s:s.slice(0,o)),l=o<0?null:ta(s.slice(o+1));if(a in e){let c=e[a];cr(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function Qh(t){let e="";for(let n in t){const r=t[n];if(n=C_(n),r==null){r!==void 0&&(e+=(e.length?"&":"")+n);continue}(cr(r)?r.map(s=>s&&zd(s)):[r&&zd(r)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+n,s!=null&&(e+="="+s))})}return e}function sb(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=cr(r)?r.map(i=>i==null?null:""+i):r==null?r:""+r)}return e}const ob=Symbol(""),Jh=Symbol(""),T0=Symbol(""),Y1=Symbol(""),Hd=Symbol("");function Co(){let t=[];function e(r){return t.push(r),()=>{const i=t.indexOf(r);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function si(t,e,n,r,i,s=o=>o()){const o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((a,l)=>{const c=p=>{p===!1?l(Ks(4,{from:n,to:e})):p instanceof Error?l(p):H_(p)?l(Ks(2,{from:e,to:p})):(o&&r.enterCallbacks[i]===o&&typeof p=="function"&&o.push(p),a())},u=s(()=>t.call(r&&r.instances[i],e,n,c));let h=Promise.resolve(u);t.length<3&&(h=h.then(c)),h.catch(p=>l(p))})}function ju(t,e,n,r,i=s=>s()){const s=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(ab(l)){const u=(l.__vccOpts||l)[e];u&&s.push(si(u,n,r,o,a,i))}else{let c=l();s.push(()=>c.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const h=f_(u)?u.default:u;o.components[a]=h;const d=(h.__vccOpts||h)[e];return d&&si(d,n,r,o,a,i)()}))}}return s}function ab(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function ep(t){const e=vt(T0),n=vt(Y1),r=Le(()=>{const l=de(t.to);return e.resolve(l)}),i=Le(()=>{const{matched:l}=r.value,{length:c}=l,u=l[c-1],h=n.matched;if(!u||!h.length)return-1;const p=h.findIndex(qs.bind(null,u));if(p>-1)return p;const d=tp(l[c-2]);return c>1&&tp(u)===d&&h[h.length-1].path!==d?h.findIndex(qs.bind(null,l[c-2])):p}),s=Le(()=>i.value>-1&&db(n.params,r.value.params)),o=Le(()=>i.value>-1&&i.value===n.matched.length-1&&i5(n.params,r.value.params));function a(l={}){return ub(l)?e[de(t.replace)?"replace":"push"](de(t.to)).catch(zo):Promise.resolve()}return{route:r,href:Le(()=>r.value.href),isActive:s,isExactActive:o,navigate:a}}const lb=Ae({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ep,setup(t,{slots:e}){const n=Pt(ep(t)),{options:r}=vt(T0),i=Le(()=>({[np(t.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[np(t.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=e.default&&e.default(n);return t.custom?s:Zt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},s)}}}),cb=lb;function ub(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function db(t,e){for(const n in e){const r=e[n],i=t[n];if(typeof r=="string"){if(r!==i)return!1}else if(!cr(i)||i.length!==r.length||r.some((s,o)=>s!==i[o]))return!1}return!0}function tp(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const np=(t,e,n)=>t??e??n,fb=Ae({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const r=vt(Hd),i=Le(()=>t.route||r.value),s=vt(Jh,0),o=Le(()=>{let c=de(s);const{matched:u}=i.value;let h;for(;(h=u[c])&&!h.components;)c++;return c}),a=Le(()=>i.value.matched[o.value]);mn(Jh,Le(()=>o.value+1)),mn(ob,a),mn(Hd,i);const l=re();return at(()=>[l.value,a.value,t.name],([c,u,h],[p,d,g])=>{u&&(u.instances[h]=c,d&&d!==u&&c&&c===p&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!qs(u,d)||!p)&&(u.enterCallbacks[h]||[]).forEach(v=>v(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,h=a.value,p=h&&h.components[u];if(!p)return rp(n.default,{Component:p,route:c});const d=h.props[u],g=d?d===!0?c.params:typeof d=="function"?d(c):d:null,x=Zt(p,kt({},g,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(h.instances[u]=null)},ref:l}));return rp(n.default,{Component:x,route:c})||x}}});function rp(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const u5=fb;function hb(t){const e=Q_(t.routes,t),n=t.parseQuery||ib,r=t.stringifyQuery||Qh,i=t.history,s=Co(),o=Co(),a=Co(),l=Yi(Yr);let c=Yr;Ts&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Uu.bind(null,M=>""+M),h=Uu.bind(null,S_),p=Uu.bind(null,ta);function d(M,q){let ee,ue;return o5(M)?(ee=e.getRecordMatcher(M),ue=q):ue=M,e.addRoute(ue,ee)}function g(M){const q=e.getRecordMatcher(M);q&&e.removeRoute(q)}function v(){return e.getRoutes().map(M=>M.record)}function x(M){return!!e.getRecordMatcher(M)}function y(M,q){if(q=kt({},q||l.value),typeof M=="string"){const C=zu(n,M,q.path),O=e.resolve({path:C.path},q),H=i.createHref(C.fullPath);return kt(C,O,{params:p(O.params),hash:ta(C.hash),redirectedFrom:void 0,href:H})}let ee;if(M.path!=null)ee=kt({},M,{path:zu(n,M.path,q.path).path});else{const C=kt({},M.params);for(const O in C)C[O]==null&&delete C[O];ee=kt({},M,{params:h(C)}),q.params=h(q.params)}const ue=e.resolve(ee,q),me=M.hash||"";ue.params=u(p(ue.params));const xe=$_(r,kt({},M,{hash:w_(me),path:ue.path})),z=i.createHref(xe);return kt({fullPath:xe,hash:me,query:r===Qh?sb(M.query):M.query||{}},ue,{redirectedFrom:void 0,href:z})}function _(M){return typeof M=="string"?zu(n,M,l.value.path):kt({},M)}function f(M,q){if(c!==M)return Ks(8,{from:q,to:M})}function b(M){return P(M)}function w(M){return b(kt(_(M),{replace:!0}))}function k(M){const q=M.matched[M.matched.length-1];if(q&&q.redirect){const{redirect:ee}=q;let ue=typeof ee=="function"?ee(M):ee;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=_(ue):{path:ue},ue.params={}),kt({query:M.query,hash:M.hash,params:ue.path!=null?{}:M.params},ue)}}function P(M,q){const ee=c=y(M),ue=l.value,me=M.state,xe=M.force,z=M.replace===!0,C=k(ee);if(C)return P(kt(_(C),{state:typeof C=="object"?kt({},me,C.state):me,force:xe,replace:z}),q||ee);const O=ee;O.redirectedFrom=q;let H;return!xe&&T_(r,ue,ee)&&(H=Ks(16,{to:O,from:ue}),j(ue,ue,!0,!1)),(H?Promise.resolve(H):S(O,ue)).catch(I=>Br(I)?Br(I,2)?I:ce(I):ne(I,O,ue)).then(I=>{if(I){if(Br(I,2))return P(kt({replace:z},_(I.to),{state:typeof I.to=="object"?kt({},me,I.to.state):me,force:xe}),q||O)}else I=A(O,ue,!0,z,me);return F(O,ue,I),I})}function $(M,q){const ee=f(M,q);return ee?Promise.reject(ee):Promise.resolve()}function D(M){const q=N.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(M):M()}function S(M,q){let ee;const[ue,me,xe]=pb(M,q);ee=ju(ue.reverse(),"beforeRouteLeave",M,q);for(const C of ue)C.leaveGuards.forEach(O=>{ee.push(si(O,M,q))});const z=$.bind(null,M,q);return ee.push(z),fe(ee).then(()=>{ee=[];for(const C of s.list())ee.push(si(C,M,q));return ee.push(z),fe(ee)}).then(()=>{ee=ju(me,"beforeRouteUpdate",M,q);for(const C of me)C.updateGuards.forEach(O=>{ee.push(si(O,M,q))});return ee.push(z),fe(ee)}).then(()=>{ee=[];for(const C of xe)if(C.beforeEnter)if(cr(C.beforeEnter))for(const O of C.beforeEnter)ee.push(si(O,M,q));else ee.push(si(C.beforeEnter,M,q));return ee.push(z),fe(ee)}).then(()=>(M.matched.forEach(C=>C.enterCallbacks={}),ee=ju(xe,"beforeRouteEnter",M,q,D),ee.push(z),fe(ee))).then(()=>{ee=[];for(const C of o.list())ee.push(si(C,M,q));return ee.push(z),fe(ee)}).catch(C=>Br(C,8)?C:Promise.reject(C))}function F(M,q,ee){a.list().forEach(ue=>D(()=>ue(M,q,ee)))}function A(M,q,ee,ue,me){const xe=f(M,q);if(xe)return xe;const z=q===Yr,C=Ts?history.state:{};ee&&(ue||z?i.replace(M.fullPath,kt({scroll:z&&C&&C.scroll},me)):i.push(M.fullPath,me)),l.value=M,j(M,q,ee,z),ce()}let E;function T(){E||(E=i.listen((M,q,ee)=>{if(!Q.listening)return;const ue=y(M),me=k(ue);if(me){P(kt(me,{replace:!0}),ue).catch(zo);return}c=ue;const xe=l.value;Ts&&M_(Vh(xe.fullPath,ee.delta),$0()),S(ue,xe).catch(z=>Br(z,12)?z:Br(z,2)?(P(z.to,ue).then(C=>{Br(C,20)&&!ee.delta&&ee.type===na.pop&&i.go(-1,!1)}).catch(zo),Promise.reject()):(ee.delta&&i.go(-ee.delta,!1),ne(z,ue,xe))).then(z=>{z=z||A(ue,xe,!1),z&&(ee.delta&&!Br(z,8)?i.go(-ee.delta,!1):ee.type===na.pop&&Br(z,20)&&i.go(-1,!1)),F(ue,xe,z)}).catch(zo)}))}let L=Co(),X=Co(),J;function ne(M,q,ee){ce(M);const ue=X.list();return ue.length?ue.forEach(me=>me(M,q,ee)):console.error(M),Promise.reject(M)}function se(){return J&&l.value!==Yr?Promise.resolve():new Promise((M,q)=>{L.add([M,q])})}function ce(M){return J||(J=!M,T(),L.list().forEach(([q,ee])=>M?ee(M):q()),L.reset()),M}function j(M,q,ee,ue){const{scrollBehavior:me}=t;if(!Ts||!me)return Promise.resolve();const xe=!ee&&L_(Vh(M.fullPath,0))||(ue||!ee)&&history.state&&history.state.scroll||null;return li().then(()=>me(M,q,xe)).then(z=>z&&O_(z)).catch(z=>ne(z,M,q))}const V=M=>i.go(M);let oe;const N=new Set,Q={currentRoute:l,listening:!0,addRoute:d,removeRoute:g,clearRoutes:e.clearRoutes,hasRoute:x,getRoutes:v,resolve:y,options:t,push:b,replace:w,go:V,back:()=>V(-1),forward:()=>V(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:X.add,isReady:se,install(M){const q=this;M.component("RouterLink",cb),M.component("RouterView",u5),M.config.globalProperties.$router=q,Object.defineProperty(M.config.globalProperties,"$route",{enumerable:!0,get:()=>de(l)}),Ts&&!oe&&l.value===Yr&&(oe=!0,b(i.location).catch(me=>{}));const ee={};for(const me in Yr)Object.defineProperty(ee,me,{get:()=>l.value[me],enumerable:!0});M.provide(T0,q),M.provide(Y1,f3(ee)),M.provide(Hd,l);const ue=M.unmount;N.add(M),M.unmount=function(){N.delete(M),N.size<1&&(c=Yr,E&&E(),E=null,l.value=Yr,oe=!1,J=!1),ue()}}};function fe(M){return M.reduce((q,ee)=>q.then(()=>D(ee)),Promise.resolve())}return Q}function pb(t,e){const n=[],r=[],i=[],s=Math.max(e.matched.length,t.matched.length);for(let o=0;o<s;o++){const a=e.matched[o];a&&(t.matched.find(c=>qs(c,a))?r.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>qs(c,l))||i.push(l))}return[n,r,i]}function $n(){return vt(T0)}function fn(t){return vt(Y1)}var gb=Object.defineProperty,mb=Object.defineProperties,vb=Object.getOwnPropertyDescriptors,Vl=Object.getOwnPropertySymbols,d5=Object.prototype.hasOwnProperty,f5=Object.prototype.propertyIsEnumerable,ip=(t,e,n)=>e in t?gb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e)=>{for(var n in e||(e={}))d5.call(e,n)&&ip(t,n,e[n]);if(Vl)for(var n of Vl(e))f5.call(e,n)&&ip(t,n,e[n]);return t},Rt=(t,e)=>mb(t,vb(e)),_b=(t,e)=>{var n={};for(var r in t)d5.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Vl)for(var r of Vl(t))e.indexOf(r)<0&&f5.call(t,r)&&(n[r]=t[r]);return n};const Rn="Notivue__",bb=6e3,ct={SUCCESS:"success",ERROR:"error",WARNING:"warning",INFO:"info",PROMISE:"promise",PROMISE_RESOLVE:"promise-resolve",PROMISE_REJECT:"promise-reject"},ra={title:"",message:"",duration:bb,ariaLive:"polite",ariaRole:"status"},Vd=Rt(Ze({},ra),{ariaLive:"assertive",ariaRole:"alert"}),xb=Rt(Ze({},ra),{duration:1/0}),yb=Rt(Ze({},Vd),{ariaLive:"polite"}),wb=Ze({},ra),Cb={[ct.SUCCESS]:ra,[ct.ERROR]:Vd,[ct.WARNING]:yb,[ct.INFO]:wb,[ct.PROMISE]:xb,[ct.PROMISE_RESOLVE]:ra,[ct.PROMISE_REJECT]:Vd},h5={pauseOnHover:!0,pauseOnTouch:!0,pauseOnTabChange:!0,enqueue:!1,position:"top-center",teleportTo:"body",notifications:Cb,limit:1/0,avoidDuplicates:!1,transition:"transform 0.35s cubic-bezier(0.5, 1, 0.25, 1)",animations:{enter:Rn+"enter",leave:Rn+"leave",clearAll:Rn+"clearAll"}},St=g5();function Hu(t){Object.assign(St,t)}function p5(t){let e=0;function n(r,i,s=`${e++}`){return typeof de(r)=="string"&&(r={message:r}),t.push(Rt(Ze({},r),{id:s,type:i})),{id:s,clear:()=>t.clear(s),destroy:()=>t.clear(s,{isDestroy:!0})}}return{success:r=>n(r,ct.SUCCESS),error:r=>n(r,ct.ERROR),warning:r=>n(r,ct.WARNING),info:r=>n(r,ct.INFO),promise:r=>{const{id:i,clear:s,destroy:o}=n(r,ct.PROMISE);return{resolve:a=>n(a,ct.PROMISE_RESOLVE,i),reject:a=>n(a,ct.PROMISE_REJECT,i),success:a=>n(a,ct.PROMISE_RESOLVE,i),error:a=>n(a,ct.PROMISE_REJECT,i),clear:s,destroy:o}},load(r){return this.promise(r)},clearAll:()=>t.clearAll(),destroyAll:()=>t.destroyAll()}}function g5(){const t=new Proxy({},{get:()=>()=>{}});return p5(t)}const m5=typeof window>"u";function X1(t,e){const n=Ze({},t);for(const r in e)e.hasOwnProperty(r)&&(Sb(e[r])?n[r]=X1(t[r],e[r]):n[r]=e[r]);return n}function kb(t,e){return e.props||(e.props={}),Ze(Ze(Ze(Ze({},t[e.type]),t.global),e),e.type==="promise"?{duration:1/0}:{})}function Sb(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null}function Ab(t,e,n){const r=X1(t,e);function i(s){return m3((o,a)=>({get(){return o(),s},set(l){n.value&&(s=l,a())}}))}for(const s in r)r[s]=i(r[s]);return r}function Eb(t){return Object.entries(t).reduce((e,[n,{value:r}])=>Rt(Ze({},e),{[n]:ft(r)}),{})}const $b=t=>t===ct.SUCCESS||t===ct.ERROR||t===ct.WARNING||t===ct.INFO,Tb=["timeout","resumedAt","remaining","animationAttrs","positionStyles"];function v5(t){return Object.fromEntries(Object.entries(t).filter(([e])=>!Tb.includes(e)))}function Pb(t,e){const n=Db(t,e),r=Bb(),i=Fb(n,r),s=Ib(),o=Rb(n,i,r,s),a=Ob(i,o);return{config:n,queue:r,items:i,elements:s,animations:o,timeouts:a}}function Db(t,e){const n=Ab(h5,t,e);function r(i){if(e.value){typeof i=="function"&&(i=i(Eb(n)));for(const s in i)typeof n[s].value=="object"?n[s].value=X1(n[s].value,i[s]):n[s].value=i[s]}}return Rt(Ze({},n),{update:r})}function Bb(){return{entries:Yi([]),get length(){return this.entries.value.length},add(t){this.entries.value.push(t),this.triggerRef()},get(t){return this.entries.value.find(e=>e.id===t)},update(t,e){const n=this.get(t);n&&Object.assign(n,e)},remove(t){this.entries.value=this.entries.value.filter(e=>e.id!==t)},triggerRef(){p3(this.entries)},clear(){this.entries.value=[]}}}function Fb(t,e){return{entries:Yi([]),get length(){return this.entries.value.length},lifecycleEventsCount:re(0),addLifecycleEvent(){this.lifecycleEventsCount.value++},clearLifecycleEvents(){this.lifecycleEventsCount.value=0},add(n){this.entries.value.unshift(n),this.triggerRef(),this.addLifecycleEvent()},addFromQueue(){const n=Rt(Ze({},e.entries.value[0]),{timeout:e.entries.value[0].timeout(),createdAt:Date.now()});e.remove(n.id),this.add(n)},findDupe(n){return this.entries.value.find(r=>de(r.message).replace(/\uFEFF/g,"")===de(n.message).replace(/\uFEFF/g,"")&&de(r.title)===de(n.title)&&r.type===n.type)},get(n){return this.entries.value.find(r=>r.id===n)},update(n,r){const i=this.get(n);i&&Object.assign(i,r)},triggerRef(){p3(this.entries)},updateAll(n){this.entries.value=this.entries.value.map(n)},remove(n){this.entries.value=this.entries.value.filter(i=>i.id!==n),e.length>0&&this.length<t.limit.value&&this.addFromQueue()},clear(){this.entries.value=[]}}}function Ib(){return{root:re(null),rootAttrs:Yi({}),setRootAttrs(t){this.rootAttrs.value=t},items:re([]),getSortedItems(){return this.items.value.sort((t,e)=>+e.dataset.notivueItem-+t.dataset.notivueItem)},containers:re([])}}function Rb(t,e,n,r){return{isReducedMotion:re(!1),setReducedMotion(i){this.isReducedMotion.value=i},playLeave(i,{isDestroy:s=!1,isUserTriggered:o=!1}={}){const{leave:a=""}=t.animations.value,l=e.get(i);window.clearTimeout(l==null?void 0:l.timeout);const c=u=>{var h;u&&u.currentTarget!==u.target||((h=l==null?void 0:l[o?"onManualClear":"onAutoClear"])==null||h.call(l,v5(l)),e.remove(i))};if(!l||!a||s||this.isReducedMotion.value)return e.addLifecycleEvent(),c();e.update(i,{positionStyles:Rt(Ze({},l.positionStyles),{zIndex:-1}),animationAttrs:{class:a,onAnimationend:c}}),e.addLifecycleEvent()},playClearAll(){e.entries.value.forEach(o=>window.clearTimeout(o.timeout));const{clearAll:i=""}=t.animations.value,s=()=>{n.clear(),e.clear()};if(!i||this.isReducedMotion.value)return s();r.setRootAttrs({class:i,onAnimationend:s})},updatePositions({isImmediate:i=!1}={}){const s=this.isReducedMotion.value||i,o=t.position.value.indexOf("top")===0,a=t.animations.value.leave;let l=0;for(const c of r.getSortedItems()){const u=c.dataset.notivueItem,h=e.get(u);!c||!h||h.animationAttrs.class===a||(e.update(u,{positionStyles:{transform:`translate3d(0, ${l}px, 0)`,transition:s?"none":t.transition.value}}),l+=(o?1:-1)*c.clientHeight)}e.triggerRef()}}}function Ob(t,e){return{isStreamPaused:re(!1),isStreamFocused:re(!1),debounceTimeout:void 0,setStreamPause(n=!0){this.isStreamPaused.value=n},setStreamFocus(n=!0){this.isStreamFocused.value=n},clearDebounceTimeout(){window.clearTimeout(this.debounceTimeout)},reset(){this.clearDebounceTimeout(),this.setStreamPause(!1),this.setStreamFocus(!1)},create(n,r){if(!this.isStreamPaused.value&&Number.isFinite(r)&&r>0)return window.setTimeout(()=>e.playLeave(n),r)},pause(){t.length===0||this.isStreamPaused.value||(this.setStreamPause(),t.updateAll(n=>{var r;if(window.clearTimeout(n.timeout),n.duration===1/0)return n;let i=0;return n.remaining==null?i=n.duration-(Date.now()-((r=n.resumedAt)!=null?r:n.createdAt)):i=n.remaining-(Date.now()-n.resumedAt),Rt(Ze({},n),{remaining:i})}))},resume(){t.length===0||!this.isStreamPaused.value||(this.setStreamPause(!1),t.updateAll(n=>{var r;return window.clearTimeout(n.timeout),n.duration===1/0?n:Rt(Ze({},n),{timeout:this.create(n.id,(r=n.remaining)!=null?r:n.duration),resumedAt:Date.now()})}))},resumeWithDebounce(n){this.debounceTimeout=window.setTimeout(()=>{this.resume()},n)}}}function Mb({config:t,items:e,queue:n,animations:r,timeouts:i}){return{destroyAll(){n.clear(),e.clear()},clearAll(){r.playClearAll()},clear(s,{isDestroy:o=!1}={}){var a;((a=e.entries.value[e.entries.value.length-1])==null?void 0:a.id)===s&&i.resume(),r.playLeave(s,{isUserTriggered:!0,isDestroy:o})},push(s){const o=kb(t.notifications.value,s),a=Date.now();if(t.avoidDuplicates.value&&$b(o.type)){const c=e.findDupe(o);c&&(window.clearTimeout(c.timeout),e.update(c.id,{createdAt:a,duration:o.duration,remaining:void 0,timeout:i.create(c.id,o.duration),duplicateCount:c.duplicateCount+1}),Nt(c.message)?c.message.value+="\uFEFF":c.message+="\uFEFF",e.triggerRef());const u=e.findDupe.call(n,o);if(u&&(n.update(u.id,{duration:o.duration,createdAt:a,duplicateCount:u.duplicateCount+1}),n.triggerRef()),u||c)return}const l=()=>i.create(o.id,o.duration);if(s.type===ct.PROMISE_RESOLVE||s.type===ct.PROMISE_REJECT)n.get(o.id)?(n.update(o.id,Rt(Ze({},o),{createdAt:a,timeout:l})),n.triggerRef()):(e.update(o.id,Rt(Ze({},o),{createdAt:a,timeout:l()})),e.triggerRef());else{const c=t.enqueue.value,u=e.length>=t.limit.value,h=!c&&u,p=c&&!s.skipQueue&&u;h&&e.entries.value.slice(t.limit.value-1).forEach(g=>i.create(g.id,1));const d=Rt(Ze({},o),{createdAt:a,duplicateCount:0,animationAttrs:{class:r.isReducedMotion.value?"":t.animations.value.enter,onAnimationend(){d.animationAttrs.class===t.animations.value.enter&&e.update(o.id,{animationAttrs:{class:"",onAnimationend:()=>{}}})}},timeout:p?l:l(),clear:()=>this.clear(o.id),destroy:()=>this.clear(o.id,{isDestroy:!0})});p?n.add(d):e.add(d)}}}}const _5=Symbol(),b5=Symbol();function Lb(t){return[at(t.items.lifecycleEventsCount,()=>{t.animations.updatePositions()},{flush:"post"}),at(t.config.position,()=>{t.animations.updatePositions({isImmediate:!0})},{flush:"post"}),at(()=>t.items.length===0&&t.queue.length===0,e=>{e&&(t.timeouts.reset(),t.elements.setRootAttrs({}))},{flush:"post"})]}function Nb(t){const e=re(t),n=m0(e);function r(i,s){const o=()=>Lb(i);t&&Hu(s);let a=t?o():[()=>{}];return{isRunning:n,startInstance(){e.value||(Hu(s),a=o(),e.value=!0)},stopInstance(){e.value&&(i.items.clear(),i.queue.clear(),i.items.clearLifecycleEvents(),Hu(g5()),a.forEach(c=>c()),e.value=!1)}}}return{isRunning:n,setupInstance:r}}function Ub(t,e){const{setupInstance:n,isRunning:r}=Nb(t),i=Pb(e,r),s=Mb(i),o=Object.freeze(p5(s)),a=n(i,o);return{store:i,instance:a,push:o}}function x5(t={}){return{install(e){var n;const r=t,{startOnCreation:i=!0}=r,s=_b(r,["startOnCreation"]),{store:o,instance:a,push:l}=Ub(i,s);e.provide(_5,a),e.provide(b5,o),(n=e.config.globalProperties).$push||(n.$push=l)}}}function Ji(){return vt(b5)}function zb(){return m5?{isRunning:re(!0),startInstance:()=>{},stopInstance:()=>{}}:vt(_5)}function jb(){if(m5)return Rt(Ze({},v3(Pt(h5))),{update:()=>{},isTopAlign:Le(()=>!0),isStreamPaused:re(!1)});const t=Ji();return Rt(Ze({},t.config),{isStreamPaused:m0(t.timeouts.isStreamPaused),isTopAlign:Le(()=>t.config.position.value.indexOf("top")===0)})}const y5={listAriaLabel:"Notifications"},Hb=Ae({setup(t,{slots:e,attrs:n}){const r=re(!1);return ut(()=>r.value=!0),()=>{var i;return r.value?(i=e.default)==null?void 0:i.call(e):Z("span",n,"")}}}),Gd=t=>t.pointerType==="mouse";function w5(t){return`${t.title?`${t.title}: `:""}${t.message}`}const Vb=["role","aria-live"],Gb=Ae({__name:"AriaLive",props:{item:{}},setup(t){const e=t,n={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"};return(r,i)=>(U(),Z("div",{style:n,role:e.item.ariaRole,"aria-live":e.item.ariaLive,key:`${r.item.id}_${r.item.type}`,"aria-atomic":"true"},ve(de(w5)(e.item)),9,Vb))}});function Wb(){const{timeouts:t,config:e}=Ji();function n(i){Gd(i)&&t.pause()}function r(i){Gd(i)&&t.resume()}return Le(()=>e.pauseOnHover.value&&!t.isStreamFocused.value?{onPointerenter:n,onPointerleave:r}:{})}function qb(){const{timeouts:t,config:e}=Ji();function n(r){Gd(r)||(t.clearDebounceTimeout(),t.pause(),t.resumeWithDebounce(2e3))}return Nn(()=>{t.clearDebounceTimeout()}),Le(()=>e.pauseOnTouch.value&&!t.isStreamFocused.value?{onPointerdown:n}:{})}const Vu={boxSizing:"border-box"},Gu={list:Rt(Ze({},Vu),{display:"flex",justifyContent:"center",listStyle:"none",margin:"0 auto",maxWidth:"var(--nv-root-width, 100%)",padding:"0",pointerEvents:"none",position:"fixed",zIndex:"var(--nv-z, 500)"}),listItem:Rt(Ze({},Vu),{display:"flex",margin:"0",position:"absolute",transitionProperty:"transform",width:"100%"}),itemContainer:Rt(Ze({},Vu),{maxWidth:"100%",padding:"0 0 var(--nv-gap, 0.75rem) 0",pointerEvents:"auto"})};function Kb(){const{isTopAlign:t,position:e}=jb(),n=Le(()=>{const i=t.value,s=[`var(--nv-root-top, ${i?"1.25rem":"0px"})`,"var(--nv-root-right, 1.25rem)",`var(--nv-root-bottom, ${i?"0px":"1.25rem"})`,"var(--nv-root-left, 1.25rem)"],o=s.map(a=>`calc(-1 * ${a})`);return i?o.splice(2,1,"0px"):o.splice(0,1,"0px"),{inset:s.join(" "),clipPath:`inset(${o.join(" ")})`}}),r=Le(()=>({[t.value?"top":"bottom"]:"0",justifyContent:`var(--nv-root-x-align, ${e.value.endsWith("left")?"flex-start":e.value.endsWith("right")?"flex-end":"center"})`}));return Le(()=>({list:Ze(Ze({},Gu.list),n.value),listItem:Ze(Ze({},Gu.listItem),r.value),itemContainer:Gu.itemContainer}))}function Zb(t){function e(){window.matchMedia("(max-width: 1100px)").matches&&t()}ut(()=>{window.addEventListener("resize",e)}),Nn(()=>{window.removeEventListener("resize",e)})}function Yb(t,e){let n;const r=new WeakSet;ut(()=>{n=new ResizeObserver((i,s)=>{for(const o of i)r.has(o.target)?Object.values(o.contentRect.toJSON()).every(a=>a===0)?(r.delete(o.target),s.unobserve(o.target)):(e(),r.delete(o.target),s.unobserve(o.target)):r.add(o.target)})}),at(t,i=>{i.length>0&&i.forEach(s=>n==null?void 0:n.observe(s))},{flush:"post"}),Nn(()=>{n==null||n.disconnect()})}function Xb(){const{elements:t,animations:e}=Ji();Zb(()=>e.updatePositions({isImmediate:!0})),Yb(t.items.value,()=>e.updatePositions())}function Qb(){const{config:t,timeouts:e}=Ji();function n(){e.isStreamFocused.value||t.pauseOnTabChange.value&&e.resume()}function r(){e.isStreamFocused.value||t.pauseOnTabChange.value&&e.pause()}ut(()=>{window.addEventListener("focus",n),window.addEventListener("blur",r)}),Nn(()=>{window.removeEventListener("focus",n),window.removeEventListener("blur",r)})}function Jb(){const{animations:t}=Ji(),e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>t.setReducedMotion(e.matches);ut(()=>{var r;n(),(r=e.addEventListener)==null||r.call(e,"change",n)}),Nn(()=>{var r;(r=e.removeEventListener)==null||r.call(e,"change",n)})}const ex=["data-notivue-align","aria-label"],tx=["data-notivue-item","aria-setsize","aria-posinset"],nx=["aria-label","tabindex","data-notivue-container"],rx=Ae({__name:"NotivueImpl",props:F1({class:{},containersTabIndex:{},listAriaLabel:{},styles:{}},y5),setup(t){const e=t,{config:n,items:r,elements:i}=Ji(),s=Kb(),o=Wb(),a=qb();return Jb(),Qb(),Xb(),(l,c)=>{var u;return U(),Xe(S3,{to:de(n).teleportTo.value===!1?void 0:de(n).teleportTo.value,disabled:de(n).teleportTo.value===!1},[de(r).entries.value.length>0?(U(),Z("ol",Ui({key:0},Ze(Ze(Ze({},de(o)),de(a)),de(i).rootAttrs.value),{"data-notivue-align":de(n).position.value.split("-")[0],"aria-label":e.listAriaLabel,ref:de(i).root,class:e.class,style:Ze(Ze({},de(s).list),(u=e.styles)==null?void 0:u.list)}),[(U(!0),Z(Se,null,Ye(de(r).entries.value,(h,p)=>{var d,g,v,x;return U(),Z("li",{tabindex:"-1",key:h.id,"data-notivue-item":h.id,"aria-setsize":de(r).length,"aria-posinset":p+1,ref_for:!0,ref:de(i).items,style:xn(Ze(Ze(Ze({},de(s).listItem),h.positionStyles),(d=e.styles)==null?void 0:d.listItem))},[h.ariaLiveOnly?(U(),Xe(Gb,{key:0,item:h},null,8,["item"])):(U(),Z("div",Ui({key:1,ref_for:!0},h.animationAttrs,{"aria-label":de(w5)(h),tabindex:(v=(g=l.containersTabIndex)==null?void 0:g[h.id])!=null?v:-1,"data-notivue-container":h.id,ref_for:!0,ref:de(i).containers,style:Ze(Ze({},de(s).itemContainer),(x=e.styles)==null?void 0:x.itemContainer)}),[Ms(l.$slots,"default",Ui({ref_for:!0},de(v5)(h)))],16,nx))],12,tx)}),128))],16,ex)):we("",!0)],8,["to","disabled"])}}}),ix=Ae({__name:"Notivue",props:F1({class:{},containersTabIndex:{},listAriaLabel:{},styles:{}},y5),setup(t){const e=t,{isRunning:n}=zb();return(r,i)=>(U(),Xe(de(Hb),null,{default:mt(()=>[de(n)?(U(),Xe(rx,kr(Ui({key:0},e)),{default:mt(s=>[Ms(r.$slots,"default",kr($r(s)))]),_:3},16)):we("",!0)]),_:3}))}}),sx=m("path",{d:"M6,-0c-3.308,-0 -6,2.692 -6,6c-0,3.308 2.692,6 6,6c3.308,-0 6,-2.692 6,-6c-0,-3.308 -2.692,-6 -6,-6Zm3.123,3.989l-3.877,4.616c-0.086,0.102 -0.213,0.162 -0.346,0.164l-0.008,0c-0.131,0 -0.256,-0.055 -0.343,-0.153l-1.662,-1.846c-0.081,-0.085 -0.126,-0.199 -0.126,-0.316c0,-0.254 0.209,-0.462 0.462,-0.462c0.135,0 0.263,0.059 0.35,0.161l1.307,1.451l3.536,-4.209c0.087,-0.101 0.215,-0.159 0.349,-0.159c0.253,-0 0.461,0.208 0.461,0.461c0,0.107 -0.036,0.21 -0.103,0.292Z"},null,-1),ox=[sx],sp=Ae({__name:"SuccessIcon",setup(t){return(e,n)=>(U(),Z("svg",kr($r(de(io))),ox,16))}}),ax=m("path",{d:"M6,-0c-3.308,-0 -6,2.692 -6,6c-0,3.308 2.692,6 6,6c3.308,-0 6,-2.692 6,-6c-0,-3.308 -2.692,-6 -6,-6Zm-0,9.228c-0.316,0 -0.577,-0.26 -0.577,-0.577c0,-0.316 0.261,-0.577 0.577,-0.577c0.316,0 0.577,0.261 0.577,0.577c-0,0.317 -0.261,0.577 -0.577,0.577Zm0.627,-5.802l-0.166,3.519c-0,0.253 -0.208,0.462 -0.462,0.462c-0.253,-0 -0.461,-0.209 -0.461,-0.462l-0.166,-3.518l0,-0.001c-0,-0.009 -0,-0.018 -0,-0.027c-0,-0.344 0.283,-0.627 0.627,-0.627c0.344,0 0.627,0.283 0.627,0.627c-0,0.009 -0,0.018 -0.001,0.027l0.002,-0Z"},null,-1),lx=[ax],Wu=Ae({__name:"ErrorIcon",setup(t){return(e,n)=>(U(),Z("svg",kr($r(de(io))),lx,16))}}),cx=m("path",{d:"M6,0c-3.308,0 -6,2.692 -6,6c0,3.308 2.692,6 6,6c3.308,0 6,-2.692 6,-6c0,-3.308 -2.692,-6 -6,-6Zm0,2.46c0.428,0 0.78,0.352 0.78,0.78c-0,0.428 -0.352,0.78 -0.78,0.78c-0.428,0 -0.78,-0.352 -0.78,-0.78c0,-0.428 0.352,-0.78 0.78,-0.78Zm1.44,6.78l-2.64,0c-0.263,0 -0.48,-0.217 -0.48,-0.48c0,-0.263 0.217,-0.48 0.48,-0.48l0.84,0l0,-2.64l-0.48,0c-0.263,0 -0.48,-0.217 -0.48,-0.48c0,-0.263 0.217,-0.48 0.48,-0.48l0.96,0c0.263,0 0.48,0.217 0.48,0.48l0,3.12l0.84,0c0.263,0 0.48,0.217 0.48,0.48c0,0.263 -0.217,0.48 -0.48,0.48Z"},null,-1),ux=[cx],dx=Ae({__name:"InfoIcon",setup(t){return(e,n)=>(U(),Z("svg",kr($r(de(io))),ux,16))}}),fx=m("path",{d:"M11.963,6.037c-0,3.292 -2.671,5.963 -5.963,5.963c-3.292,0 -5.963,-2.671 -5.963,-5.963c0,-3.292 2.671,-5.962 5.963,-5.962c3.292,-0 5.963,2.67 5.963,5.962Zm-0.918,0c0,-2.785 -2.26,-5.045 -5.045,-5.045c-2.785,0 -5.045,2.26 -5.045,5.045c-0,2.786 2.26,5.046 5.045,5.046c2.785,-0 5.045,-2.26 5.045,-5.046Z"},null,-1),hx=m("path",{d:"M8.401,3.449c0.163,-0.194 0.452,-0.219 0.646,-0.056c0.194,0.163 0.219,0.452 0.056,0.646l-3.853,4.587c-0.085,0.101 -0.21,0.161 -0.343,0.163c-0.133,0.003 -0.26,-0.053 -0.349,-0.151l-1.651,-1.835c-0.169,-0.188 -0.154,-0.479 0.034,-0.648c0.188,-0.169 0.479,-0.154 0.648,0.034l1.298,1.443l3.514,-4.183Z"},null,-1),px=[fx,hx],op=Ae({__name:"SuccessOutlineIcon",setup(t){return(e,n)=>(U(),Z("svg",kr($r(de(io))),px,16))}}),gx=m("path",{d:"M12, 6c0, 3.313 -2.687, 6 -6, 6c-3.313,-0 -6,-2.688 -6,-6c0,-3.313 2.688,-6 6,-6c3.313,-0 6,2.687 6,6Zm-0.923,-0c-0,-2.803 -2.274,-5.077 -5.077,-5.077c-2.803,0 -5.077,2.274 -5.077,5.077c0,2.803 2.274,5.077 5.077,5.077c2.803,-0 5.077,-2.274 5.077,-5.077Z"},null,-1),mx=m("path",{d:"M5.373,3.426c-0,-0.009 -0,-0.019 -0,-0.028c-0,-0.342 0.279,-0.624 0.621,-0.627c0.002,-0 0.004,-0 0.006,-0c0.344,-0 0.627,0.283 0.627,0.627c-0,0.009 -0,0.019 -0.001,0.028l0,0.001l-0.165,3.518c-0.012,0.246 -0.215,0.44 -0.461,0.44c-0.246,-0 -0.449,-0.194 -0.461,-0.44l-0.166,-3.518l0,-0.001Z"},null,-1),vx=m("path",{d:"M6,9.228c-0.316,0 -0.577,-0.26 -0.577,-0.577c0,-0.316 0.261,-0.577 0.577,-0.577c0.316,0 0.577,0.261 0.577,0.577c-0,0.317 -0.261,0.577 -0.577,0.577Z"},null,-1),_x=[gx,mx,vx],qu=Ae({__name:"ErrorOutlineIcon",setup(t){return(e,n)=>(U(),Z("svg",kr($r(de(io))),_x,16))}}),bx=m("path",{d:"M6, 0c3.313, 0 6, 2.687 6, 6c-0, 3.313 -2.687, 6 -6, 6c-3.313,-0 -6,-2.687 -6,-6c0,-3.313 2.687,-6 6,-6Zm0, 0.96c-2.783, 0 -5.04, 2.257 -5.04, 5.04c0, 2.783 2.257, 5.04 5.04, 5.04c2.783, 0 5.04,-2.257 5.04,-5.04c-0,-2.783 -2.257,-5.04 -5.04,-5.04Z"},null,-1),xx=m("path",{d:"M6.6, 8.28l0.84, 0c0.265, 0 0.48, 0.215 0.48, 0.48c-0, 0.265 -0.215, 0.48 -0.48, 0.48l-2.64,-0c-0.265, 0 -0.48,-0.215 -0.48,-0.48c-0,-0.265 0.215,-0.48 0.48,-0.48l0.84, 0l-0,-2.64l-0.48, 0c-0.265, 0 -0.48,-0.215 -0.48,-0.48c-0,-0.265 0.215,-0.48 0.48,-0.48l0.96, 0c0.265, 0 0.48, 0.215 0.48, 0.48l-0, 3.12Z"},null,-1),yx=m("path",{d:"M6, 2.46c-0.428, 0 -0.78, 0.352 -0.78, 0.78c-0, 0.428 0.352, 0.78 0.78, 0.78c0.428, 0 0.78,-0.352 0.78,-0.78c-0,-0.428 -0.352,-0.78 -0.78,-0.78Z"},null,-1),wx=[bx,xx,yx],Cx=Ae({__name:"InfoOutlineIcon",setup(t){return(e,n)=>(U(),Z("svg",kr($r(de(io))),wx,16))}}),kx=m("path",{d:"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",opacity:".25"},null,-1),Sx=m("path",{d:"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",class:"Notivue__spinner"},null,-1),Ax=[kx,Sx],C5=Ae({__name:"PromiseIcon",setup(t){return(e,n)=>(U(),Z("svg",kr($r(Rt(Ze({},de(Q1)),{width:28,height:28,fill:"currentColor"}))),Ax,16))}}),Ex=m("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),$x=m("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1),Tx=[Ex,$x],k5=Ae({__name:"CloseIcon",setup(t){return(e,n)=>(U(),Z("svg",kr($r(de(Px))),Tx,16))}}),Q1={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},io=Rt(Ze({},Q1),{fill:"currentColor",viewBox:"0 0 12 12"}),Px=Rt(Ze({},Q1),{stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}),Dx={[ct.SUCCESS]:Jt(sp),[ct.ERROR]:Jt(Wu),[ct.INFO]:Jt(dx),[ct.WARNING]:Jt(Wu),[ct.PROMISE]:Jt(C5),[ct.PROMISE_RESOLVE]:Jt(sp),[ct.PROMISE_REJECT]:Jt(Wu),close:Jt(k5)};ct.SUCCESS+"",Jt(op),ct.ERROR+"",Jt(qu),ct.INFO+"",Jt(Cx),ct.WARNING+"",Jt(qu),ct.PROMISE+"",Jt(C5),ct.PROMISE_RESOLVE+"",Jt(op),ct.PROMISE_REJECT+"",Jt(qu),Jt(k5);const ba={"--nv-width":"350px","--nv-spacing":"0.625rem","--nv-radius":"0.625rem","--nv-icon-size":"1.25rem","--nv-title-size":"0.925rem","--nv-message-size":"0.925rem","--nv-y-align":"center"},J1={"--nv-shadow":"rgba(0, 0, 0, 0.06) 0px 4px 6px -1px, rgba(0, 0, 0, 0.03) 0px 2px 4px -1px"},Bx=Rt(Ze(Ze({},ba),J1),{"--nv-global-bg":"#FFF","--nv-global-fg":"#171717","--nv-success-accent":"#28B780","--nv-error-accent":"#E74C3C","--nv-warning-accent":"#F59E0B","--nv-info-accent":"#3E8EFF","--nv-promise-accent":"#171717"}),Fx=Rt(Ze(Ze({},ba),J1),{"--nv-success-bg":"#E9FAEF","--nv-success-accent":"#059669","--nv-success-fg":"#057452","--nv-error-bg":"#FEEFEF","--nv-error-accent":"#E6523C","--nv-error-fg":"#C5412C","--nv-warning-bg":"#FFF0D8","--nv-warning-accent":"#F48533","--nv-warning-fg":"#81471D","--nv-info-bg":"#DEF0FA","--nv-info-accent":"#1F70AC","--nv-info-fg":"#1F70AC","--nv-promise-bg":"#FFF","--nv-promise-accent":"#334155","--nv-promise-fg":"#334155"});Rt(Ze(Ze({},ba),J1),{"--nv-global-accent":"#FFF","--nv-global-fg":"#FFF","--nv-success-bg":"#178570","--nv-error-bg":"#C94430","--nv-info-bg":"#117AAE","--nv-warning-bg":"#FFE556","--nv-warning-fg":"#4F5358","--nv-warning-accent":"#4F5358","--nv-promise-bg":"#FFF","--nv-promise-fg":"#334155","--nv-promise-accent":"#64748B"});Rt(Ze({},ba),{"--nv-border-width":"1px","--nv-global-bg":"#1F1F1F","--nv-global-border":"#414141","--nv-global-fg":"#D0D0D0","--nv-success-accent":"#8EF997","--nv-error-accent":"#FF7777","--nv-warning-accent":"#FFE554","--nv-info-accent":"#5FD4FF","--nv-promise-accent":"#D0D0D0"});Rt(Ze({},ba),{"--nv-border-width":"1px","--nv-global-bg":"#20252E","--nv-global-border":"#353b45","--nv-global-fg":"#dfdfdf","--nv-success-accent":"#34D399","--nv-error-accent":"#FF7777","--nv-warning-accent":"#FFE554","--nv-info-accent":"#5FD4FF","--nv-promise-accent":"#D0D0D0"});const mr={NOTIFICATION:Rn+"notification",ICON:Rn+"icon",CONTENT:Rn+"content",TITLE:Rn+"content-title",MESSAGE:Rn+"content-message",CLOSE:Rn+"close",CLOSE_ICON:Rn+"close-icon",TRANSITION:Rn+"transition",PROGRESS:Rn+"progress",DUPLICATE:Rn+"duplicate"},Ix={icons:()=>Dx,theme:()=>Bx,hideClose:!1,closeAriaLabel:"Close"},Rx=["data-notivue","data-notivue-has-title"],Ox=["aria-live","role"],Mx=["textContent"],Lx=["textContent"],Nx=["aria-label"],Ux=["textContent"],zx=Ae({__name:"Notification",props:F1({item:{},icons:{},theme:{},closeAriaLabel:{},hideClose:{type:Boolean}},Ix),setup(t){const e=t,n=Yi(e.icons[e.item.type]),r=e.icons.close;return at(()=>e.item.type,i=>n.value=e.icons[i],{flush:"sync"}),(i,s)=>(U(),Z("div",{class:ze([de(mr).NOTIFICATION,{[de(mr).DUPLICATE]:i.item.duplicateCount>0}]),key:i.item.duplicateCount,"data-notivue":i.item.type,"data-notivue-has-title":!!i.item.title,style:xn(i.theme)},[n.value?(U(),Z(Se,{key:0},[typeof n.value=="object"?(U(),Xe(sr,{key:0,name:de(mr).TRANSITION,mode:"out-in"},{default:mt(()=>[typeof n.value=="object"?(U(),Xe(Vs(n.value),{key:0,class:ze(de(mr).ICON),"aria-hidden":"true"},null,8,["class"])):we("",!0)]),_:1},8,["name"])):typeof n.value=="string"?(U(),Z("div",{key:1,class:ze(de(mr).ICON),"aria-hidden":"true"},ve(n.value),3)):we("",!0)],64)):we("",!0),m("div",{class:ze(de(mr).CONTENT),"aria-live":i.item.ariaLive,role:i.item.ariaRole,"aria-atomic":"true"},[i.item.title?(U(),Z("h3",{key:0,class:ze(de(mr).TITLE),textContent:ve(de(i.item.title))},null,10,Mx)):we("",!0),m("p",{class:ze(de(mr).MESSAGE),textContent:ve(de(i.item.message))},null,10,Lx)],10,Ox),!e.hideClose&&de(r)&&i.item.type!=="promise"?(U(),Z("button",{key:1,class:ze(de(mr).CLOSE),"aria-label":i.closeAriaLabel,type:"button",tabindex:"-1",onClick:s[0]||(s[0]=(...o)=>i.item.clear&&i.item.clear(...o))},[typeof de(r)=="object"?(U(),Xe(Vs(de(r)),{key:0,class:ze(de(mr).CLOSE_ICON)},null,8,["class"])):typeof de(r)=="string"?(U(),Z("div",{key:1,"aria-hidden":"true",textContent:ve(de(r))},null,8,Ux)):we("",!0)],10,Nx)):we("",!0),Ms(i.$slots,"default")],14,Rx))}}),jx={key:0,class:"cookie-banner"},Hx={class:"cookie-text"},Vx=Ae({__name:"CookieBanner",props:{initialConsent:Boolean},setup(t){const e=t,{emit:n}=Ct(),r=()=>{n("update-consent",!0)},i=()=>{n("update-consent",!1)};return(s,o)=>{const a=xr("footnote");return e.initialConsent?(U(),Z("div",jx,[m("div",Hx,[o[1]||(o[1]=m("p",null,[m("strong",null,"Hey there!")],-1)),o[2]||(o[2]=m("br",null,null,-1)),o[3]||(o[3]=m("p",null,[He(" We use cookies to ensure that you have the best experience on our website. By clicking Accept, you agree to our use of cookies. "),m("br")],-1)),le(a,null,{default:mt(()=>o[0]||(o[0]=[He("Collected data is strictly for internal processing and never shared with external entities.")])),_:1})]),m("div",{class:"button-group"},[m("button",{onClick:r,class:"agree-button"},"Accept"),m("a",{onClick:i,class:"reject-button"},"decline")])])):we("",!0)}}}),je=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},S5=je(Vx,[["__scopeId","data-v-82cdc0b1"]]),Gx={key:0,id:"popup-wrapper",class:"verify-modal"},Wx={id:"popup-warning",class:"verify-modal-warning"},qx={id:"popup-button-wrapper"},tl="cw-cookie-accepted-20230625",Kx=Ae({__name:"App",setup(t){const e=re(!1),n=Ct(),r=Pt({accepted:!1,showNotice:!1});function i(){const h=localStorage.getItem(tl);h=="1"?(s(!0),r.accepted=!0,r.showNotice=!1):h=="2"?(r.showNotice=!1,s(!1)):(s(!1),r.showNotice=!0)}i();function s(h){if(typeof window!="object"||!window.location.host.endsWith("cogniwerk.ai"))return;typeof window._paq=="object"||function(){const g=[],v="https://analytics.cogniwerk.ai/";g.push(["setTrackerUrl",v+"matomo.php"]),g.push(["setSiteId",1]);const x=document,y=x.createElement("script"),_=x.getElementsByTagName("script")[0];y.type="text/javascript",y.async=!0,y.src=v+"matomo.js",_.parentNode.insertBefore(y,_),g.push(["enableHeartBeatTimer"]),window._paq=g}();const d=window._paq;d.push(["setDocumentTitle",document.title]),d.push(["trackPageView"]),h?d.push(["rememberCookieConsentGiven"]):d.push(["forgetCookieConsentGiven"])}function o(h){typeof localStorage=="object"&&(h?(localStorage.setItem(tl,"1"),s(h)):(localStorage.setItem(tl,"2"),r.showNotice=!1),localStorage.getItem(tl)&&(r.accepted=!0,r.showNotice=!1))}function a(h){const p=n==null?void 0:n.appContext.config.globalProperties.$cogniwerk;h=`${h}.User agent: ${navigator.userAgent}`,console.error("cogniwerk error:",h,p),p.log(h)}typeof window=="object"&&location.hostname!=="cogniwerk.localhost"&&(window.addEventListener("unhandledrejection",function(h){a(`frontent::unhandledrejection - ${h.reason}`)}),window.onerror=function(h,p,d,g,v){a(`frontent::error - @${d}:${g}. ${p}. ${h}. ${v}`)});const l=async()=>{var h;if(sessionStorage.getItem("dontShowVerificationModal")==="true")e.value=!1;else{const p=await(n==null?void 0:n.appContext.config.globalProperties.$oidc.mgr.getUser());e.value=((h=p==null?void 0:p.additionalInfo)==null?void 0:h.verified)===!1}},c=()=>{sessionStorage.setItem("dontShowVerificationModal","true"),e.value=!1},u=async()=>{const h=n==null?void 0:n.appContext.config.globalProperties.$cogniwerk,p=await(n==null?void 0:n.appContext.config.globalProperties.$oidc.mgr.getUser()),d=await h.sendVerificationEmail(p.access_token);d.message==="Verification Token sent to Email"?(St.success(`Verification Email is sent to your registered Email - ${p.email}`),e.value=!1):(console.error(d.message),St.error(d.message),e.value=!1),sessionStorage.setItem("dontShowVerificationModal","true")};return ut(()=>{l()}),(h,p)=>(U(),Z(Se,null,[le(de(ix),null,{default:mt(d=>[le(de(zx),{item:d,theme:de(Fx)},null,8,["item","theme"])]),_:1}),le(de(u5),null,{default:mt(({Component:d,route:g})=>[le(sr,{name:"fade"},{default:mt(()=>[(U(),Xe(Er,null,{default:mt(()=>[(U(),Z("div",{key:g.path},[(U(),Xe(Vs(d),{key:g.path}))]))]),_:2},1024))]),_:2},1024)]),_:1}),le(S5,{initialConsent:r.showNotice,onUpdateConsent:o},null,8,["initialConsent"]),e.value?(U(),Z("div",Gx,[m("div",Wx,[p[0]||(p[0]=m("div",{id:"popup-warning-title",class:"verify-modal-title"}," Verify Your Account ",-1)),p[1]||(p[1]=m("div",null,[m("p",null," In order to experience all of CogniWerk, please verify your account. ")],-1)),m("div",qx,[m("button",{onClick:Ee(c,["prevent"]),class:"verify-dismiss-btn"}," Dismiss "),m("button",{onClick:Ee(u,["prevent"])},"Verify Account")])])])):we("",!0)],64))}}),Zx=je(Kx,[["__scopeId","data-v-28cebd40"]]),Yx="modulepreload",Xx=function(t){return"/"+t},ap={},Ho=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(n.map(a=>{if(a=Xx(a),a in ap)return;ap[a]=!0;const l=a.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${c}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":Yx,l||(u.as="script"),u.crossOrigin="",u.href=a,o&&u.setAttribute("nonce",o),document.head.appendChild(u),l)return new Promise((h,p)=>{u.addEventListener("load",h),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},Qx="data:image/svg+xml,%3csvg%20width='34'%20height='11'%20viewBox='0%200%2034%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%202L26%202'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'/%3e%3cpath%20d='M2%209L32%209'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'/%3e%3c/svg%3e",Jx="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.44%203.09961C14.63%203.09961%2013.01%203.97961%2012%205.32961C10.99%203.97961%209.37%203.09961%207.56%203.09961C4.49%203.09961%202%205.59961%202%208.68961C2%209.87961%202.19%2010.9796%202.52%2011.9996C4.1%2016.9996%208.97%2019.9896%2011.38%2020.8096C11.72%2020.9296%2012.28%2020.9296%2012.62%2020.8096C15.03%2019.9896%2019.9%2016.9996%2021.48%2011.9996C21.81%2010.9796%2022%209.87961%2022%208.68961C22%205.59961%2019.51%203.09961%2016.44%203.09961Z'%20fill='%23292D32'/%3e%3c/svg%3e",ey="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.1391%202.95907L7.10914%205.95907C1.03914%207.98907%201.03914%2011.2991%207.10914%2013.3191L9.78914%2014.2091L10.6791%2016.8891C12.6991%2022.9591%2016.0191%2022.9591%2018.0391%2016.8891L21.0491%207.86907C22.3891%203.81907%2020.1891%201.60907%2016.1391%202.95907ZM16.4591%208.33907L12.6591%2012.1591C12.5091%2012.3091%2012.3191%2012.3791%2012.1291%2012.3791C11.9391%2012.3791%2011.7491%2012.3091%2011.5991%2012.1591C11.3091%2011.8691%2011.3091%2011.3891%2011.5991%2011.0991L15.3991%207.27907C15.6891%206.98907%2016.1691%206.98907%2016.4591%207.27907C16.7491%207.56907%2016.7491%208.04907%2016.4591%208.33907Z'%20fill='%23292D32'/%3e%3c/svg%3e",Wd="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20width='25'%20height='25'%20viewBox='0%200%2025%2025'%20version='1.1'%20id='svg4'%20sodipodi:docname='close.svg'%20inkscape:version='1.2%20(dc2aedaf03,%202022-05-15)'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:svg='http://www.w3.org/2000/svg'%3e%3cdefs%20id='defs8'%20/%3e%3csodipodi:namedview%20id='namedview6'%20pagecolor='%23505050'%20bordercolor='%23eeeeee'%20borderopacity='1'%20inkscape:showpageshadow='0'%20inkscape:pageopacity='0'%20inkscape:pagecheckerboard='0'%20inkscape:deskcolor='%23505050'%20showgrid='false'%20inkscape:zoom='31.02431'%20inkscape:cx='12.876999'%20inkscape:cy='15.649018'%20inkscape:window-width='2560'%20inkscape:window-height='1361'%20inkscape:window-x='2551'%20inkscape:window-y='-9'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4'%20/%3e%3cg%20id='g926'%20transform='translate(0.12393205,0.3974363)'%3e%3cpath%20style='fill:none;stroke:%23000000;stroke-width:1.03373px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1'%20d='M%206.3656608,6.0921564%2018.386476,18.112972'%20id='path345'%20/%3e%3cpath%20style='fill:none;stroke:%23000000;stroke-width:1.03373px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1'%20d='M%2018.386476,6.0921563%206.3656608,18.112972'%20id='path345-8'%20/%3e%3c/g%3e%3c/svg%3e",ty="data:image/svg+xml,%3csvg%20id='copy-link-img'%20xmlns='http://www.w3.org/2000/svg'%20width='29.297'%20height='29.297'%20viewBox='0%200%2029.297%2029.297'%20%3e%3cpath%20id='Path_52'%20data-name='Path%2052'%20d='M17.3,20.01a6.107,6.107,0,0,0-8.636,0L4.342,24.328a6.107,6.107,0,0,0,8.636,8.636l2.159-2.159m-2.159-6.477a6.107,6.107,0,0,0,8.636,0l4.318-4.318A6.107,6.107,0,0,0,17.3,11.374l-2.159,2.159'%20transform='translate(-0.489%20-7.52)'%20fill='none'%20stroke='%23000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='4.13'%20/%3e%3c/svg%3e",ny="data:image/svg+xml,%3csvg%20class='share-link-img'%20id='Group_2'%20data-name='Group%202'%20xmlns='http://www.w3.org/2000/svg'%20width='47.331'%20height='47.331'%20viewBox='0%200%2047.331%2047.331'%20%3e%3cpath%20id='Path_7'%20data-name='Path%207'%20d='M47.317,0H.014A.014.014,0,0,0,0,.014v47.3a.014.014,0,0,0,.014.014h47.3a.014.014,0,0,0,.014-.014V.014A.014.014,0,0,0,47.317,0Z'%20fill='%231da1f2'%20/%3e%3cpath%20id='Path_8'%20data-name='Path%208'%20d='M40.4,14.051a6.657,6.657,0,0,1-3.7,1.109,6.656,6.656,0,0,0,2.958-3.7,6.656,6.656,0,0,1-4.16,1.571A6.656,6.656,0,0,0,24.22,19.043a18.489,18.489,0,0,1-13.4-6.841,6.656,6.656,0,0,0,2.034,8.69,6.656,6.656,0,0,1-2.958-.647,6.656,6.656,0,0,0,5.177,6.378,6.654,6.654,0,0,1-2.958.093A6.656,6.656,0,0,0,18.3,31.338,18.489,18.489,0,0,1,8.6,34.019,18.488,18.488,0,0,0,37.162,17.472,18.485,18.485,0,0,0,40.4,14.051Z'%20fill='%23fff'%20/%3e%3c/svg%3e",ry="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='42.769'%20height='42.769'%20viewBox='0%200%2042.769%2042.769'%20%3e%3cg%20id='Group_9'%20data-name='Group%209'%20transform='translate(-1645.82%20-434.873)'%20%3e%3cpath%20id='Path_40'%20data-name='Path%2040'%20d='M433.756,0H391.013A.013.013,0,0,0,391,.013V42.756a.013.013,0,0,0,.013.013h42.743a.013.013,0,0,0,.013-.013V.013A.013.013,0,0,0,433.756,0Z'%20transform='translate(1254.82%20434.873)'%20fill='%23f40'%20/%3e%3cpath%20id='Path_41'%20data-name='Path%2041'%20d='M412.384,35.418c7.659,0,13.867-4.376,13.867-9.773s-6.208-9.773-13.867-9.773-13.866,4.376-13.866,9.773S404.726,35.418,412.384,35.418Z'%20transform='translate(1254.82%20434.873)'%20fill='%23fff'%20/%3e%3cpath%20id='Path_42'%20data-name='Path%2042'%20d='M399.855,24.893a3.508,3.508,0,1,0-3.509-3.508A3.508,3.508,0,0,0,399.855,24.893Z'%20transform='translate(1254.82%20434.873)'%20fill='%23fff'%20/%3e%3cpath%20id='Path_43'%20data-name='Path%2043'%20d='M425,24.893a3.508,3.508,0,1,0-3.508-3.508A3.508,3.508,0,0,0,425,24.893Z'%20transform='translate(1254.82%20434.873)'%20fill='%23fff'%20/%3e%3cpath%20id='Path_44'%20data-name='Path%2044'%20d='M422.325,12.2a2.673,2.673,0,1,0-2.673-2.673A2.673,2.673,0,0,0,422.325,12.2Z'%20transform='translate(1254.82%20434.873)'%20fill='%23fff'%20/%3e%3cpath%20id='Path_45'%20data-name='Path%2045'%20d='M412.384,16.372l1.922-8.437,6.1,1.253'%20transform='translate(1254.82%20434.873)'%20fill='none'%20stroke='%23fff'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='0.85'%20/%3e%3cpath%20id='Path_46'%20data-name='Path%2046'%20d='M406.955,29.989c2.756,2.088,8.1,2.172,10.859,0'%20transform='translate(1254.82%20434.873)'%20fill='none'%20stroke='%23f40'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='0.691'%20/%3e%3cpath%20id='Path_47'%20data-name='Path%2047'%20d='M406.955,26.564a2.59,2.59,0,1,0-2.59-2.59A2.589,2.589,0,0,0,406.955,26.564Z'%20transform='translate(1254.82%20434.873)'%20fill='%23f40'%20/%3e%3cpath%20id='Path_48'%20data-name='Path%2048'%20d='M417.814,26.564a2.59,2.59,0,1,0-2.59-2.59A2.59,2.59,0,0,0,417.814,26.564Z'%20transform='translate(1254.82%20434.873)'%20fill='%23f40'%20/%3e%3c/g%3e%3c/svg%3e",iy=no({id:"mainTabSelected",state:()=>({tab:"filter"}),actions:{setTab(t){this.tab=t}}}),xa=no("filter",()=>{const t=re({search:"",page:0,from:[],to:[],process:[],tags:[],darkMode:!1,serviceType:[]}),e=()=>{var X;const E=new URLSearchParams(window.location.href.replace(window.location.origin+window.location.pathname,"")),T=window.location.pathname,L=/\/models\/search\/process-(?<process>.+)\/from-(?<from>.+)\/to-(?<to>.+)\/tags-(?<tags>.+)/.exec(T);if((X=L==null?void 0:L.groups)!=null&&X.process){for(const J of["process","from","to","tags"])J==="tags"?t.value[J]=decodeURIComponent(L.groups[J]).split(","):t.value[J]=L.groups[J].split(",").filter(ne=>ne!=="all");t.value.search=E.get("query")||"",t.value.page===0&&(t.value.page=1)}},n=()=>{let E="";if(t.value.search.length===0&&t.value.from.length===0&&t.value.process.length===0&&t.value.to.length===0&&t.value.tags.length===0?E="/discover":(E+="/models/search",E+="/process-"+(t.value.process.length===0||t.value.process.length===3?"all":t.value.process.map(encodeURIComponent).sort().join(",")),E+="/from-"+(t.value.from.length===0||t.value.from.length===5?"all":t.value.from.map(encodeURIComponent).sort().join(",")),E+="/to-"+(t.value.to.length===0||t.value.to.length===5?"all":t.value.to.map(encodeURIComponent).sort().join(",")),E+="/tags-"+(t.value.tags.length>0?t.value.tags.map(encodeURIComponent).sort().join(","):"all"),t.value.search.length>0&&(E+="?query="+encodeURIComponent(t.value.search))),window.location.pathname==="/")return E;const L=window.location.origin+E;return console.debug("fixLocation new href=",L,t.value),window.location.href===L||window.history.pushState(new Object,"",L),E},r=E=>{t.value.search=E,n()},i=E=>{x(E)||(t.value.process.push(E),n())},s=E=>{y(E)||(t.value.from.push(E),n())},o=E=>{_(E)||(t.value.to.push(E),n())},a=()=>{const E=[...t.value.to];t.value.to=[...t.value.from],t.value.from=E,n()},l=E=>{if(console.debug("addTag",E,t.value.tags),!f(E))return t.value.tags.push(E),n()},c=E=>{if(!b(E))return t.value.serviceType.push(E),n()},u=E=>{t.value.process.splice(t.value.process.indexOf(E),1),n()},h=E=>{t.value.from.splice(t.value.from.indexOf(E),1),n()},p=E=>{t.value.to.splice(t.value.to.indexOf(E),1),n()},d=E=>{t.value.tags.splice(t.value.tags.indexOf(E),1),n()},g=E=>{t.value.serviceType.splice(t.value.serviceType.indexOf(E),1),n()},v=()=>{t.value.tags=[],n()},x=E=>t.value.process.includes(E),y=E=>t.value.from.includes(E),_=E=>t.value.to.includes(E),f=E=>t.value.tags.includes(E),b=E=>t.value.serviceType.includes(E);return{filter:t,setSearch:r,addProcess:i,addProcessFrom:s,addProcessTo:o,addTag:l,removeProcess:u,removeProcessFrom:h,removeProcessTo:p,removeTag:d,removeTags:v,isSelectedProcess:x,isSelectedProcessFrom:y,isSelectedProcessTo:_,isSelectedTag:f,toggleProcess:E=>{x(E)?u(E):i(E)},toggleProcessTo:E=>{_(E)?p(E):o(E)},toggleProcessFrom:E=>{y(E)?h(E):s(E)},toggleTag:E=>{f(E)?d(E):l(E)},setPage:E=>{t.value.page=E,n()},setDarkMode:E=>{t.value.darkMode=E,n()},reset:()=>{t.value.from=[],t.value.to=[],t.value.process=[],t.value.tags=[],t.value.search="",n()},loadFromUrl:e,swapProcessToAndFrom:a,toggleServiceType:E=>{b(E)?g(E):c(E)},isSelectedServiceType:b,fixLocation:n}}),zt="https://cms.cogniwerk.ai",Oi=class Oi{constructor(){}timeCachBuster(){return Math.round(Date.now()/1e3/300)}static getInstance(){return Oi.instance||(Oi.instance=new Oi),Oi.instance}async fetchData(e){try{return(await(await fetch(`${zt}${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),{}}}async getBlogs(e,n){const r=new URLSearchParams({_cb:this.timeCachBuster(),fields:n?n.join(","):"",...e});return await this.fetchData(`/items/blog?${r}`)}async getBlogBySlug(e,n){const r=new URLSearchParams({_cb:this.timeCachBuster(),fields:n?n.join(","):"","filter[blog_url][_eq]":e,"filter[status][_eq]":"published"});return await this.fetchData(`/items/blog?${r}`)}async getModels(e,n){const r=new URLSearchParams({_cb:this.timeCachBuster(),"filter[status][_eq]":"published",fields:n??"",...e});return await this.fetchData(`/items/models?${r}`)}async getModelBySlug(e,n){n||(n=["id","slug","description"]);const r=new URLSearchParams({_cb:this.timeCachBuster(),"filter[slug][_in]":e,fields:n.join(",")});try{return(await(await fetch(`${zt}/items/models?${r}`,{cache:"no-cache"})).json()).data}catch(i){return console.error(i),{}}}async getNewlyCreatedModels(){const e=new URLSearchParams({_cb:this.timeCachBuster(),sort:"-date_created",limit:12,"filter[status][_eq]":"published",fields:"webservice_url,slug,usability,images.directus_files_id.*,tags.tags_id.*,teaser,description,name"});try{return(await(await fetch(`${zt}/items/models?${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),{}}}async getUITexts(e){const n=new URLSearchParams({_cb:this.timeCachBuster(),"filter[identifier][_in]":e,fields:"content"});try{return(await(await fetch(`${zt}/items/ui_texts?${n}`,{cache:"force-cache"})).json()).data}catch(r){return console.error(r),{}}}async getAbout(){const e=["title","content_new"],n=new URLSearchParams({_cb:this.timeCachBuster(),fields:e.join(",")});try{const i=(await(await fetch(`${zt}/items/about?${n}`,{cache:"force-cache"})).json()).data;return i.content=i.content_new,i}catch(r){return console.error(r),r}}async getImprint(){const e=["title","content"],n=new URLSearchParams({_cb:this.timeCachBuster(),fields:e.join(",")});try{return(await(await fetch(`${zt}/items/imprint?${n}`,{cache:"force-cache"})).json()).data}catch(r){return console.error(r),r}}async getPrivacy(){const e=["title","content"],n=new URLSearchParams({_cb:this.timeCachBuster(),fields:e.join(",")});try{return(await(await fetch(`${zt}/items/privacy?${n}`,{cache:"force-cache"})).json()).data}catch(r){return console.error(r),r}}async getInterfaceById(e){const n=["*.*.*.*.*.*"],r=new URLSearchParams({_cb:this.timeCachBuster(),"filter[id][_eq]":e,fields:n.join(",")});try{return(await(await fetch(`${zt}/items/interfaceV2/${e}/?${r}`,{cache:"force-cache"})).json()).data}catch(i){return console.error(i),{}}}async getInterface(){const e=new URLSearchParams({_cb:this.timeCachBuster()});try{return(await(await fetch(`${zt}/items/input_typesV2?${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),{}}}async getLeftSideTooltips(){const e=new URLSearchParams({_cb:this.timeCachBuster()});try{return(await(await fetch(`${zt}/items/leftside_tooltips?${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),{}}}async getErrorValues(){const e=new URLSearchParams({_cb:this.timeCachBuster()});try{return(await(await fetch(`${zt}/items/errors?${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),{}}}async getPathOG(e){const n=new URLSearchParams({_cb:this.timeCachBuster(),"filter[path][_eq]":e});try{return(await(await fetch(`${zt}/items/opengraph_meta_tags?${n}`)).json()).data}catch(r){return console.error(r),{}}}async getProcess(){const e=["id","name","slug"],n=new URLSearchParams({_cb:this.timeCachBuster(),fields:e.join(",")});try{return(await(await fetch(`${zt}/items/process?${n}`,{cache:"force-cache"})).json()).data}catch(r){return console.error(r),[]}}async getProcessIo(){const e=["id","name","slug"],n=new URLSearchParams({_cb:this.timeCachBuster(),fields:e.join(",")});try{return(await(await fetch(`${zt}/items/process_io?${n}`,{cache:"force-cache"})).json()).data}catch(r){return console.error(r),[]}}async getTags(){const e=new URLSearchParams({_cb:this.timeCachBuster(),sort:"tag"});try{return(await(await fetch(`${zt}/items/tags?${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),[]}}async getFineTuningSettings(){const e=["*.*.*.*.*.*"],n=new URLSearchParams({_cb:this.timeCachBuster(),fields:e.join(",")});try{return(await(await fetch(`${zt}/items/input_types_training?${n}`,{cache:"force-cache"})).json()).data}catch(r){return console.error(r),[]}}async getCogniwerkPresets(){const e=new URLSearchParams({_cb:this.timeCachBuster(),fields:"*,model.slug,model.small_image"});try{return(await(await fetch(`${zt}/items/Presets?${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),[]}}async getFinetuningTutorialContent(){const e=new URLSearchParams({_cb:this.timeCachBuster(),"filter[identifier][_eq]":"finetuning-tutorial-1",fields:"*"});try{return(await(await fetch(`${zt}/items/tutorials?${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),[]}}async getExpertModeCards(){const e=new URLSearchParams({_cb:this.timeCachBuster(),fields:"*,expertmode_tutorial.id, expertmode_tutorial.blog_url "});try{return(await(await fetch(`${zt}/items/expertmode_cards?${e}`,{cache:"force-cache"})).json()).data}catch(n){return console.error(n),[]}}async getMainPageData(){try{const e=new URLSearchParams({_cb:this.timeCachBuster(),fields:"*,feature_showcase.*.*,interface_showcase.*.*"});return(await(await fetch(`${zt}/items/mainpage?${e}`,{})).json()).data}catch(e){return console.error(e),[]}}async getNewFeaturesData(){try{const e=new URLSearchParams({_cb:this.timeCachBuster().toString(),fields:"*,content.new_features_content_id.*,content.new_features_content_id.medium.filename_disk,content.new_features_content_id.medium.type"});return(await(await fetch(`${zt}/items/new_features?${e}`,{})).json()).data}catch(e){return console.error(e),[]}}async getMainPageClaimImages(){const e=new URLSearchParams({_cb:this.timeCachBuster(),"filter[folder][_in]":"7834a4ab-68dd-468a-9746-beb0d9fe443c"});try{return(await(await fetch(`${zt}/files?${e}`,{})).json()).data}catch(n){return console.error(n),[]}}async getMainPageHeroImages(){const e=new URLSearchParams({_cb:this.timeCachBuster(),"filter[folder][_in]":"31019830-c8c2-4443-acbf-cf4f5dea8fa2"});try{return(await(await fetch(`${zt}/files?${e}`,{})).json()).data}catch(n){return console.error(n),[]}}};Xn(Oi,"instance");let Tt=Oi;var Gl=(t=>(t.FILTER="filter",t.SEARCH="search",t))(Gl||{});const sy=no("tab",()=>{const t=re(Gl.FILTER);return{tab:t,change:n=>{console.debug("changing tab store to",n),t.value=n,xa().reset()}}}),oy=["innerHTML"],jr=Ae({__name:"MetaTagsEmbedded",props:{tags:{},canonicalPath:{}},async setup(t){let e,n;const r=t,i=re(([e,n]=ci(()=>s()),e=await e,n(),e));async function s(){const a=r.canonicalPath?await Tt.getInstance().getPathOG(r.canonicalPath):[{}];a.length==0&&a.push({});const l=a[0]||{};l.Description&&(l.description=l.Description,delete l.Description),l.image&&r.canonicalPath!=="/share"&&(l.image=`https://cms.cogniwerk.ai/assets/${l.image}?width=1200&format=png&quality=100&fit=outside`);for(const c of["title","description","image","type"])l[c]&&(l[`og:${c}`]=l[c],l[`twitter:${c}`]=l[c]);return l}const o=Le(()=>{const a=[{name:"author",content:"CogniWerk"},{property:"og:type",content:"website"},{property:"og:image:type",content:"image/png"},{property:"og:image:width",content:"1198"},{property:"og:image:height",content:"627"},{property:"og:image:alt",content:"cogniwerk"}];a.push(...r.tags||[]);const l=r.canonicalPath;l&&!l.startsWith("https://cogniwerk.ai/share")&&(a.push({property:"og:url",content:`https://cogniwerk.ai${l}`}),a.push({property:"twitter:url",content:`https://cogniwerk.ai${l}`}));for(const[h,p]of Object.entries(i.value)){if(h==="id"||h==="path")continue;const d=a.filter(v=>v.name===h||v.property===h);console.assert(d.length<=1,h,d);const g=d.length?d[0]:{};g.content=p,d.length===0&&(h==="description"||h==="title"?g.name=h:g.property=h,a.push(g))}function c(h){const p=h[0],d=h[1].replace(/"/g,"＂");return`${p}="${d}"`}let u=a.map(h=>"<meta "+Object.entries(h).map(c).join(" ")+" />").join(`
`);return l&&!l.startsWith("https://cogniwerk.ai/share")?u+=`
<link rel="canonical" href="https://cogniwerk.ai${l}" />`:l&&l.startsWith("https://cogniwerk.ai/share")&&(u+=`
<link rel="canonical" href="${l}" />`),u});return(a,l)=>(U(),Z("span",{class:"seo-meta-tags",innerHTML:o.value},null,8,oy))}}),ay="data:image/svg+xml,%3csvg%20viewBox='0%200%2077%2077'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M38.5%2077C59.752%2077%2077%2059.752%2077%2038.5C77%2017.248%2059.752%20-1.50787e-06%2038.5%20-3.36578e-06C17.248%20-5.22369e-06%205.22369e-06%2017.248%203.36578e-06%2038.5C1.50787e-06%2059.752%2017.248%2077%2038.5%2077ZM25.025%2035.6125L45.0065%2035.6125L38.3845%2028.9905C37.268%2027.874%2037.268%2026.026%2038.3845%2024.9095C38.962%2024.332%2039.6935%2024.0625%2040.425%2024.0625C41.1565%2024.0625%2041.888%2024.332%2042.4655%2024.9095L54.0155%2036.4595C55.132%2037.576%2055.132%2039.424%2054.0155%2040.5405L42.4655%2052.0905C41.349%2053.207%2039.501%2053.207%2038.3845%2052.0905C37.268%2050.974%2037.268%2049.126%2038.3845%2048.0095L45.0065%2041.3875L25.025%2041.3875C23.4465%2041.3875%2022.1375%2040.0785%2022.1375%2038.5C22.1375%2036.9215%2023.4465%2035.6125%2025.025%2035.6125Z'%20fill='white'/%3e%3c/svg%3e",ly="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='45'%20height='45'%20viewBox='0%200%2045%2045'%20fill='none'%3e%3cg%20clip-path='url(%23clip0_3441_1669)'%3e%3cpath%20d='M16.1366%2032.1187H16.4828V31.7725V17.7974V17.4512H16.1366H11.7699H11.4238V17.7974V31.7725V32.1187H11.7699H16.1366ZM16.8416%2013.6209L16.8417%2013.6209L16.8415%2013.6144C16.8219%2012.8411%2016.5339%2012.1451%2016.0084%2011.6425C15.4825%2011.1395%2014.743%2010.853%2013.8614%2010.853C12.9809%2010.853%2012.2257%2011.1387%2011.6874%2011.6391C11.1479%2012.1406%2010.8462%2012.8398%2010.8462%2013.6232C10.8462%2015.1835%2012.038%2016.3934%2013.8001%2016.3934H13.8352C14.7347%2016.3934%2015.491%2016.0979%2016.024%2015.5915C16.5571%2015.085%2016.8466%2014.3858%2016.8416%2013.6209ZM33.6034%2032.1187H33.9496V31.7725V24.0017C33.9496%2021.7759%2033.3223%2020.0976%2032.2491%2018.9737C31.1752%2017.8491%2029.6929%2017.3199%2028.0641%2017.3199C26.7489%2017.3199%2025.668%2017.6789%2024.8718%2018.1752C24.5557%2018.3722%2024.2802%2018.5938%2024.0523%2018.8265V17.7974V17.4512H23.7062H18.7969H18.432L18.4512%2017.8155C18.4812%2018.385%2018.4814%2021.8635%2018.4737%2025.2206C18.4699%2026.8945%2018.4641%2028.5321%2018.4593%2029.7512C18.4569%2030.3608%2018.4548%2030.8657%2018.4532%2031.2182L18.4514%2031.6268L18.4509%2031.7341L18.4508%2031.7616L18.4507%2031.7685L18.4507%2031.7703L18.4507%2031.7707C18.4507%2031.7708%2018.4507%2031.7709%2018.7969%2031.7725L18.4507%2031.7709L18.4491%2032.1187H18.7969H23.7062H24.0523V31.7725V24.2205C24.0523%2024.1684%2024.0521%2024.1179%2024.0519%2024.0688C24.0512%2023.9058%2024.0505%2023.758%2024.0584%2023.6174C24.0686%2023.4348%2024.0921%2023.3012%2024.1313%2023.206L24.1313%2023.206L24.1331%2023.2016C24.4355%2022.4374%2025.0641%2021.7052%2026.1739%2021.7052C26.9275%2021.7052%2027.4374%2021.9845%2027.7717%2022.4459C28.1184%2022.9244%2028.3042%2023.6383%2028.3042%2024.5443V31.7725V32.1187H28.6504H33.6034ZM0.346189%2022.4003C0.346189%2010.2178%2010.2197%200.344236%2022.4023%200.344236C34.5848%200.344236%2044.4584%2010.2178%2044.4584%2022.4003C44.4584%2034.5829%2034.5848%2044.4564%2022.4023%2044.4564C10.2197%2044.4564%200.346189%2034.5829%200.346189%2022.4003Z'%20fill='white'%20stroke='black'%20stroke-width='0.692378'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3441_1669'%3e%3crect%20width='44.8045'%20height='44.8045'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",cy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='46'%20height='45'%20viewBox='0%200%2046%2045'%20fill='none'%3e%3cg%20clip-path='url(%23clip0_3441_1663)'%3e%3cpath%20d='M23.2026%2026.3347C25.3728%2026.3347%2027.1493%2024.567%2027.1493%2022.3881C27.1493%2021.5305%2026.8692%2020.7341%2026.4054%2020.0866C25.6879%2019.0977%2024.524%2018.4414%2023.2114%2018.4414C21.8987%2018.4414%2020.7349%2019.089%2020.0173%2020.0866C19.5535%2020.7341%2019.2735%2021.5305%2019.2735%2022.3881C19.2647%2024.567%2021.0324%2026.3347%2023.2026%2026.3347Z'%20fill='white'/%3e%3cpath%20d='M31.8116%2017.5772V14.2693V13.7793H31.3215L28.0137%2013.788L28.0312%2017.5859L31.8116%2017.5772Z'%20fill='white'/%3e%3cpath%20d='M29.3285%2022.3991C29.3285%2025.777%2026.5807%2028.5248%2023.2029%2028.5248C19.825%2028.5248%2017.0772%2025.777%2017.0772%2022.3991C17.0772%2021.5853%2017.2435%2020.8065%2017.5323%2020.0977H14.1895V29.2686C14.1895%2030.45%2015.1521%2031.4126%2016.3334%2031.4126H30.0723C31.2537%2031.4126%2032.2163%2030.45%2032.2163%2029.2686V20.0977H28.8734C29.171%2020.8065%2029.3285%2021.5853%2029.3285%2022.3991Z'%20fill='white'/%3e%3cpath%20d='M23.2031%20-0.00390625C10.8293%20-0.00390625%200.800781%2010.0246%200.800781%2022.3984C0.800781%2034.7721%2010.8293%2044.8006%2023.2031%2044.8006C35.5768%2044.8006%2045.6053%2034.7721%2045.6053%2022.3984C45.6053%2010.0246%2035.5768%20-0.00390625%2023.2031%20-0.00390625ZM34.4042%2020.0969V29.2678C34.4042%2031.6568%2032.4615%2033.5995%2030.0725%2033.5995H16.3336C13.9446%2033.5995%2012.0019%2031.6568%2012.0019%2029.2678V20.0969V15.5202C12.0019%2013.1312%2013.9446%2011.1885%2016.3336%2011.1885H30.0725C32.4615%2011.1885%2034.4042%2013.1312%2034.4042%2015.5202V20.0969Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3441_1663'%3e%3crect%20width='44.8045'%20height='44.8045'%20fill='white'%20transform='translate(0.804688)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",uy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%3e%3cg%20clip-path='url(%23clip0_3441_1661)'%3e%3cpath%20d='M23.1165%20-0.00193097C28.3245%20-0.00341966%2033.3719%201.80105%2037.3986%205.10399C41.4252%208.40693%2044.182%2013.004%2045.1991%2018.1117C46.2162%2023.2194%2045.4307%2028.5218%2042.9764%2033.1153C40.5221%2037.7088%2036.551%2041.3091%2031.7397%2043.3027C26.9283%2045.2964%2021.5746%2045.56%2016.5907%2044.0486C11.6068%2042.5373%207.30114%2039.3445%204.4075%2035.0143C1.51386%2030.6841%200.211265%2025.4845%200.721682%2020.3016C1.2321%2015.1187%203.52394%2010.2731%207.20667%206.59054C9.29309%204.49716%2011.7729%202.83702%2014.5033%201.70563C17.2337%200.57423%2020.1609%20-0.00608581%2023.1165%20-0.00193097ZM12.4147%2029.0745L19.6957%2021.7752L12.4147%2015.8383V29.0745ZM20.4978%2022.4271L12.9897%2029.9535H33.1773L26.0062%2022.4271L23.6402%2024.4451C23.5473%2024.5213%2023.4308%2024.5629%2023.3106%2024.5629C23.1904%2024.5629%2023.0739%2024.5213%2022.981%2024.4451L20.4978%2022.4198V22.4271ZM26.79%2021.7605L33.8183%2029.1331V15.7724L26.79%2021.7605ZM13.0666%2015.0472L23.285%2023.383L33.0821%2015.0472H13.0666Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3441_1661'%3e%3crect%20width='45.0046'%20height='45.0046'%20fill='white'%20transform='translate(0.609375)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",dy={class:"footer"},fy={class:"feedback"},hy={class:"feedback-send"},py={class:"footer-links"},gy=["href","onClick"],my=Ae({__name:"FooterPrimary",setup(t){const e=[{href:"/blog",title:"Blog"},{href:"/about",title:"About"},{href:"/feedback",title:"Contact"},{href:"/privacy",title:"Terms of Use and Privacy Statement"},{href:"/imprint",title:"Imprint"}];return(n,r)=>(U(),Z("footer",dy,[m("div",null,[m("div",fy,[r[1]||(r[1]=m("div",{class:"not-found"},[m("p",null,"Couldn't find what you were looking for?")],-1)),r[2]||(r[2]=m("div",{class:"feedback-text flex-center"},"Send Feedback",-1)),m("div",hy,[m("button",null,[m("img",{src:ay,onClick:r[0]||(r[0]=i=>n.$router.push("/feedback")),alt:"right"})])])]),m("div",py,[(U(),Z(Se,null,Ye(e,i=>m("a",{key:i.href,class:"footer-link",href:i.href,onClick:Ee(s=>n.$router.push(i.href),["prevent","stop"])},ve(i.title),9,gy)),64))]),r[3]||(r[3]=ma('<p class="partner-text" data-v-ac8248d0> CogniWerk.ai cooperates with the Facebook group <a href="https://www.facebook.com/groups/midjourney.unofficial/" target="_blank" class="partner-link" data-v-ac8248d0>“Midjourney, Stable Diffusion, Adobe Firefly Deutsch | DACH | Unofficial”</a></p><hr data-v-ac8248d0><div class="social-links" data-v-ac8248d0><a class="social-link" rel="noopener noreferrer" href="https://www.linkedin.com/company/cogniwerk/" data-v-ac8248d0><img src="'+ly+'" target="_blank" alt="linkedin" data-v-ac8248d0></a><a class="social-link" rel="noopener noreferrer" href="https://www.instagram.com/cogniwerk/" data-v-ac8248d0><img src="'+cy+'" alt="instagram" data-v-ac8248d0></a><a class="social-link" rel="noopener noreferrer" href="mailto:contact@cogniwerk.ai" data-v-ac8248d0><img src="'+uy+'" alt="mail" data-v-ac8248d0></a></div><p class="copyright" data-v-ac8248d0>© Copyright. All rights reserved.</p>',4))])]))}}),P0=je(my,[["__scopeId","data-v-ac8248d0"]]),vy=["innerHTML"],_y=Ae({__name:"ModelAbout",props:["model"],setup(t){return(e,n)=>(U(),Z("div",{class:"model-description",innerHTML:t.model.description},null,8,vy))}}),by=je(_y,[["__scopeId","data-v-a1649c9a"]]),xy={class:"container"},yy={class:"detail-title"},wy={class:"detail-value"},Cy=Ae({__name:"ModelTechDetails",props:["model"],setup(t){const e=Le(()=>[{title:"Author:",value:t.model.author},{title:"Published in:",value:t.model.publish_year},{title:"Architecture:",value:t.model.architecture},{title:"License:",value:t.model.license},{title:"Input Type:",value:t.model.process_from.map(n=>n.process_io_id.name).join(", ")},{title:"Output Type:",value:t.model.process_to.map(n=>n.process_io_id.name).join(", ")}]);return(n,r)=>(U(),Z("div",xy,[(U(!0),Z(Se,null,Ye(e.value,i=>(U(),Z("div",{key:i.title,class:"detail-row"},[m("div",yy,ve(i.title),1),m("div",wy,ve(i.value),1)]))),128))]))}}),ky=je(Cy,[["__scopeId","data-v-7476123c"]]),Sy={width:"30",height:"30",viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ay=["fill"],Ey=Ae({__name:"ReadyToUseIcon",props:{fill:String},setup(t){return(e,n)=>(U(),Z("svg",Sy,[m("path",{d:"M23.6107 2.91797H11.3899C6.08158 2.91797 2.91699 6.08255 2.91699 11.3909V23.5971C2.91699 28.9201 6.08158 32.0846 11.3899 32.0846H23.5962C28.9045 32.0846 32.0691 28.9201 32.0691 23.6117V11.3909C32.0837 6.08255 28.9191 2.91797 23.6107 2.91797ZM12.3962 9.30547C13.8982 9.30547 15.1378 10.5305 15.1378 12.0471C15.1378 13.5638 13.9128 14.7888 12.3962 14.7888C10.8795 14.7888 9.65449 13.5346 9.65449 12.0326C9.65449 10.5305 10.8941 9.30547 12.3962 9.30547ZM17.5003 27.8263C13.5774 27.8263 10.3837 24.6326 10.3837 20.7096C10.3837 19.6888 11.2149 18.843 12.2357 18.843H22.7357C23.7566 18.843 24.5878 19.6742 24.5878 20.7096C24.617 24.6326 21.4232 27.8263 17.5003 27.8263ZM22.6045 14.7596C21.1024 14.7596 19.8628 13.5346 19.8628 12.018C19.8628 10.5013 21.0878 9.2763 22.6045 9.2763C24.1212 9.2763 25.3462 10.5013 25.3462 12.018C25.3462 13.5346 24.1066 14.7596 22.6045 14.7596Z",fill:t.fill||"#292D32"},null,8,Ay)]))}}),$y={width:"30",height:"30",viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ty=["fill"],Py=["fill"],Dy=Ae({__name:"PaidIcon",props:{fill:String},setup(t){return(e,n)=>(U(),Z("svg",$y,[m("path",{d:"M32.0836 8.32653V22.2974C32.0836 26.3224 28.817 29.589 24.792 29.589H10.2086C9.5378 29.589 8.89613 29.5015 8.26905 29.3265C7.36488 29.0786 7.07321 27.9265 7.74405 27.2557L23.2461 11.7536C23.567 11.4328 24.0482 11.3599 24.5003 11.4474C24.967 11.5349 25.4774 11.4036 25.842 11.0536L29.5899 7.29111C30.9607 5.92028 32.0836 6.37236 32.0836 8.32653Z",fill:t.fill||"#292D32"},null,8,Ty),m("path",{d:"M21.3503 10.7328L6.08158 26.0016C5.38158 26.7016 4.21491 26.5266 3.74824 25.6516C3.20866 24.6599 2.91699 23.5078 2.91699 22.2974V8.32656C2.91699 6.3724 4.03991 5.92031 5.41074 7.29115L9.17324 11.0682C9.74199 11.6224 10.6753 11.6224 11.2441 11.0682L16.4649 5.83281C17.0337 5.26406 17.967 5.26406 18.5357 5.83281L21.3649 8.66198C21.9191 9.23073 21.9191 10.1641 21.3503 10.7328Z",fill:t.fill||"#292D32"},null,8,Py)]))}}),By={width:"30",height:"30",viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Fy=["fill"],Iy=Ae({__name:"DiyIcon",props:{fill:String},setup(t){return(e,n)=>(U(),Z("svg",By,[m("path",{d:"M23.6107 2.91797H11.3899C6.08158 2.91797 2.91699 6.08255 2.91699 11.3909V23.5971C2.91699 28.9201 6.08158 32.0846 11.3899 32.0846H23.5962C28.9045 32.0846 32.0691 28.9201 32.0691 23.6117V11.3909C32.0837 6.08255 28.9191 2.91797 23.6107 2.91797ZM14.7732 21.1471C15.1962 21.5701 15.1962 22.2701 14.7732 22.693C14.5545 22.9117 14.2774 23.0138 14.0003 23.0138C13.7232 23.0138 13.4462 22.9117 13.2274 22.693L9.59616 19.0617C8.73574 18.2013 8.73574 16.8159 9.59616 15.9555L13.2274 12.3242C13.6503 11.9013 14.3503 11.9013 14.7732 12.3242C15.1962 12.7471 15.1962 13.4471 14.7732 13.8701L11.142 17.5013L14.7732 21.1471ZM25.4045 19.0471L21.7732 22.6784C21.5545 22.8971 21.2774 22.9992 21.0003 22.9992C20.7232 22.9992 20.4462 22.8971 20.2274 22.6784C19.8045 22.2555 19.8045 21.5555 20.2274 21.1326L23.8587 17.5013L20.2274 13.8555C19.8045 13.4326 19.8045 12.7326 20.2274 12.3096C20.6503 11.8867 21.3503 11.8867 21.7732 12.3096L25.4045 15.9409C26.2649 16.8013 26.2649 18.2013 25.4045 19.0471Z",fill:t.fill||"#292D32"},null,8,Fy)]))}}),Ry={width:"30",height:"30",viewBox:"0 0 35 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Oy=["fill"],My=Ae({__name:"FreemiumIcon",props:{fill:String},setup(t){return(e,n)=>(U(),Z("svg",Ry,[m("path",{d:"M23.6107 3.66797H11.3899C6.08158 3.66797 2.91699 6.83255 2.91699 12.1409V24.3471C2.91699 29.6701 6.08158 32.8346 11.3899 32.8346H23.5962C28.9045 32.8346 32.0691 29.6701 32.0691 24.3617V12.1409C32.0837 6.83255 28.9191 3.66797 23.6107 3.66797ZM9.43574 12.0096C9.85866 11.5867 10.5587 11.5867 10.9816 12.0096C12.017 13.0451 13.7087 13.0451 14.7441 12.0096C15.167 11.5867 15.867 11.5867 16.2899 12.0096C16.7128 12.4326 16.7128 13.1326 16.2899 13.5555C15.342 14.5034 14.1024 14.9701 12.8628 14.9701C11.6232 14.9701 10.3837 14.5034 9.43574 13.5555C9.01283 13.118 9.01283 12.4326 9.43574 12.0096ZM17.5003 28.1388C13.5774 28.1388 10.3837 24.9451 10.3837 21.0221C10.3837 20.0013 11.2149 19.1555 12.2357 19.1555H22.7357C23.7566 19.1555 24.5878 19.9867 24.5878 21.0221C24.617 24.9451 21.4232 28.1388 17.5003 28.1388ZM25.5649 13.5555C24.617 14.5034 23.3774 14.9701 22.1378 14.9701C20.8982 14.9701 19.6587 14.5034 18.7107 13.5555C18.2878 13.1326 18.2878 12.4326 18.7107 12.0096C19.1337 11.5867 19.8337 11.5867 20.2566 12.0096C21.292 13.0451 22.9837 13.0451 24.0191 12.0096C24.442 11.5867 25.142 11.5867 25.5649 12.0096C25.9878 12.4326 25.9878 13.118 25.5649 13.5555Z",fill:t.fill||"#292D32"},null,8,Oy)]))}}),Ly={width:"30",height:"30",viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ny=["fill"],Uy=Ae({__name:"UnderReviewIcon",props:{fill:String},setup(t){return(e,n)=>(U(),Z("svg",Ly,[m("path",{d:"M23.6107 2.91797H11.3899C6.08158 2.91797 2.91699 6.08255 2.91699 11.3909V23.5971C2.91699 28.9201 6.08158 32.0846 11.3899 32.0846H23.5962C28.9045 32.0846 32.0691 28.9201 32.0691 23.6117V11.3909C32.0837 6.08255 28.9191 2.91797 23.6107 2.91797ZM16.7712 25.1576C16.7712 25.6826 16.2462 26.0325 15.7649 25.8284C14.0003 25.07 11.6962 24.3701 10.092 24.1659L9.81491 24.1367C8.92533 24.0201 8.19616 23.1888 8.19616 22.2846V11.0555C8.19616 9.93255 9.10033 9.1013 10.2087 9.1888C12.0316 9.33464 14.7295 10.2096 16.4212 11.1721C16.6545 11.3034 16.7712 11.5513 16.7712 11.7992V25.1576ZM26.8045 22.2701C26.8045 23.1742 26.0753 24.0055 25.1857 24.1221L24.8795 24.1513C23.2899 24.3701 21.0003 25.0555 19.2357 25.7992C18.7545 26.0034 18.2295 25.6534 18.2295 25.1284V11.7846C18.2295 11.5221 18.3607 11.2742 18.5941 11.143C20.2857 10.1951 22.9253 9.34922 24.7191 9.1888H24.7774C25.9003 9.1888 26.8045 10.093 26.8045 11.2159V22.2701Z",fill:t.fill||"#292D32"},null,8,Ny)]))}}),e2=Ae({__name:"ServiceTypeIcon",props:{fill:String,usability:String},setup(t){const e=t;function n(){switch(e.usability){case"ready_to_use":case"Free Service":return Ey;case"Paid Service":return Dy;case"do_it_yourself":return Iy;case"Freemium":return My;case"under_review":return Uy;default:return null}}return(r,i)=>(U(),Xe(Vs(n()),{fill:t.fill},null,8,["fill"]))}});var t2=(t=>(t.HumanPose="pose",t.SoftEdge="softedge",t["Text in Image"]="textinimage",t.FaceId="faceid",t))(t2||{}),zy=(t=>(t.CREATE="create",t.VIEW="view",t.EDIT="edit",t))(zy||{}),Wl=(t=>(t.Left="left",t.Center="center",t.Right="right",t))(Wl||{}),ql=(t=>(t.Top="top",t.Center="center",t.Bottom="bottom",t))(ql||{});const qd=Math.min,Us=Math.max,Kl=Math.round,fi=t=>({x:t,y:t}),jy={left:"right",right:"left",bottom:"top",top:"bottom"},Hy={start:"end",end:"start"};function lp(t,e,n){return Us(t,qd(e,n))}function D0(t,e){return typeof t=="function"?t(e):t}function qi(t){return t.split("-")[0]}function B0(t){return t.split("-")[1]}function A5(t){return t==="x"?"y":"x"}function E5(t){return t==="y"?"height":"width"}function Zs(t){return["top","bottom"].includes(qi(t))?"y":"x"}function $5(t){return A5(Zs(t))}function Vy(t,e,n){n===void 0&&(n=!1);const r=B0(t),i=$5(t),s=E5(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Zl(o)),[o,Zl(o)]}function Gy(t){const e=Zl(t);return[Kd(t),e,Kd(e)]}function Kd(t){return t.replace(/start|end/g,e=>Hy[e])}function Wy(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function qy(t,e,n,r){const i=B0(t);let s=Wy(qi(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Kd)))),s}function Zl(t){return t.replace(/left|right|bottom|top/g,e=>jy[e])}function Ky(t){return{top:0,right:0,bottom:0,left:0,...t}}function Zy(t){return typeof t!="number"?Ky(t):{top:t,right:t,bottom:t,left:t}}function Yl(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function cp(t,e,n){let{reference:r,floating:i}=t;const s=Zs(e),o=$5(e),a=E5(o),l=qi(e),c=s==="y",u=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let d;switch(l){case"top":d={x:u,y:r.y-i.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:h};break;case"left":d={x:r.x-i.width,y:h};break;default:d={x:r.x,y:r.y}}switch(B0(e)){case"start":d[o]-=p*(n&&c?-1:1);break;case"end":d[o]+=p*(n&&c?-1:1);break}return d}const Yy=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:h}=cp(c,r,l),p=r,d={},g=0;for(let v=0;v<a.length;v++){const{name:x,fn:y}=a[v],{x:_,y:f,data:b,reset:w}=await y({x:u,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:c,platform:o,elements:{reference:t,floating:e}});u=_??u,h=f??h,d={...d,[x]:{...d[x],...b}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):w.rects),{x:u,y:h}=cp(c,p,l)),v=-1)}return{x:u,y:h,placement:p,strategy:i,middlewareData:d}};async function T5(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:d=0}=D0(e,t),g=Zy(d),x=a[p?h==="floating"?"reference":"floating":h],y=Yl(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),_=h==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,f=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(f))?await(s.getScale==null?void 0:s.getScale(f))||{x:1,y:1}:{x:1,y:1},w=Yl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:f,strategy:l}):_);return{top:(y.top-w.top+g.top)/b.y,bottom:(w.bottom-y.bottom+g.bottom)/b.y,left:(y.left-w.left+g.left)/b.x,right:(w.right-y.right+g.right)/b.x}}const Xy=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...x}=D0(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=qi(i),_=Zs(a),f=qi(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=p||(f||!v?[Zl(a)]:Gy(a)),k=g!=="none";!p&&k&&w.push(...qy(a,v,g,b));const P=[a,...w],$=await T5(e,x),D=[];let S=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&D.push($[y]),h){const T=Vy(i,o,b);D.push($[T[0]],$[T[1]])}if(S=[...S,{placement:i,overflows:D}],!D.every(T=>T<=0)){var F,A;const T=(((F=s.flip)==null?void 0:F.index)||0)+1,L=P[T];if(L)return{data:{index:T,overflows:S},reset:{placement:L}};let X=(A=S.filter(J=>J.overflows[0]<=0).sort((J,ne)=>J.overflows[1]-ne.overflows[1])[0])==null?void 0:A.placement;if(!X)switch(d){case"bestFit":{var E;const J=(E=S.filter(ne=>{if(k){const se=Zs(ne.placement);return se===_||se==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(se=>se>0).reduce((se,ce)=>se+ce,0)]).sort((ne,se)=>ne[1]-se[1])[0])==null?void 0:E[0];J&&(X=J);break}case"initialPlacement":X=a;break}if(i!==X)return{reset:{placement:X}}}return{}}}};async function Qy(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=qi(n),a=B0(n),l=Zs(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,h=D0(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof g=="number"&&(d=a==="end"?g*-1:g),l?{x:d*u,y:p*c}:{x:p*c,y:d*u}}const Jy=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await Qy(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},ew=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:y,y:_}=x;return{x:y,y:_}}},...l}=D0(t,e),c={x:n,y:r},u=await T5(e,l),h=Zs(qi(i)),p=A5(h);let d=c[p],g=c[h];if(s){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",_=d+u[x],f=d-u[y];d=lp(_,d,f)}if(o){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",_=g+u[x],f=g-u[y];g=lp(_,g,f)}const v=a.fn({...e,[p]:d,[h]:g});return{...v,data:{x:v.x-n,y:v.y-r}}}}};function es(t){return n2(t)?(t.nodeName||"").toLowerCase():"#document"}function Ln(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function yi(t){var e;return(e=(n2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function n2(t){return t instanceof Node||t instanceof Ln(t).Node}function ur(t){return t instanceof Element||t instanceof Ln(t).Element}function Ar(t){return t instanceof HTMLElement||t instanceof Ln(t).HTMLElement}function up(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ln(t).ShadowRoot}function ya(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=dr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function tw(t){return["table","td","th"].includes(es(t))}function F0(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function r2(t){const e=i2(),n=ur(t)?dr(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function nw(t){let e=hi(t);for(;Ar(e)&&!Ys(e);){if(r2(e))return e;if(F0(e))return null;e=hi(e)}return null}function i2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ys(t){return["html","body","#document"].includes(es(t))}function dr(t){return Ln(t).getComputedStyle(t)}function I0(t){return ur(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function hi(t){if(es(t)==="html")return t;const e=t.assignedSlot||t.parentNode||up(t)&&t.host||yi(t);return up(e)?e.host:e}function P5(t){const e=hi(t);return Ys(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ar(e)&&ya(e)?e:P5(e)}function Zd(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=P5(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Ln(i);if(s){const a=Yd(o);return e.concat(o,o.visualViewport||[],ya(i)?i:[],a&&n?Zd(a):[])}return e.concat(i,Zd(i,[],n))}function Yd(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function D5(t){const e=dr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Ar(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=Kl(n)!==s||Kl(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function B5(t){return ur(t)?t:t.contextElement}function zs(t){const e=B5(t);if(!Ar(e))return fi(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=D5(e);let o=(s?Kl(n.width):n.width)/r,a=(s?Kl(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const rw=fi(0);function F5(t){const e=Ln(t);return!i2()||!e.visualViewport?rw:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function iw(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ln(t)?!1:e}function ia(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=B5(t);let o=fi(1);e&&(r?ur(r)&&(o=zs(r)):o=zs(t));const a=iw(s,n,r)?F5(s):fi(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,h=i.height/o.y;if(s){const p=Ln(s),d=r&&ur(r)?Ln(r):r;let g=p,v=Yd(g);for(;v&&r&&d!==g;){const x=zs(v),y=v.getBoundingClientRect(),_=dr(v),f=y.left+(v.clientLeft+parseFloat(_.paddingLeft))*x.x,b=y.top+(v.clientTop+parseFloat(_.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,h*=x.y,l+=f,c+=b,g=Ln(v),v=Yd(g)}}return Yl({width:u,height:h,x:l,y:c})}function sw(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=yi(r),a=e?F0(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=fi(1);const u=fi(0),h=Ar(r);if((h||!h&&!s)&&((es(r)!=="body"||ya(o))&&(l=I0(r)),Ar(r))){const p=ia(r);c=zs(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function ow(t){return Array.from(t.getClientRects())}function I5(t){return ia(yi(t)).left+I0(t).scrollLeft}function aw(t){const e=yi(t),n=I0(t),r=t.ownerDocument.body,i=Us(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Us(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+I5(t);const a=-n.scrollTop;return dr(r).direction==="rtl"&&(o+=Us(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function lw(t,e){const n=Ln(t),r=yi(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=i2();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function cw(t,e){const n=ia(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Ar(t)?zs(t):fi(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function dp(t,e,n){let r;if(e==="viewport")r=lw(t,n);else if(e==="document")r=aw(yi(t));else if(ur(e))r=cw(e,n);else{const i=F5(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return Yl(r)}function R5(t,e){const n=hi(t);return n===e||!ur(n)||Ys(n)?!1:dr(n).position==="fixed"||R5(n,e)}function uw(t,e){const n=e.get(t);if(n)return n;let r=Zd(t,[],!1).filter(a=>ur(a)&&es(a)!=="body"),i=null;const s=dr(t).position==="fixed";let o=s?hi(t):t;for(;ur(o)&&!Ys(o);){const a=dr(o),l=r2(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ya(o)&&!l&&R5(t,o))?r=r.filter(u=>u!==o):i=a,o=hi(o)}return e.set(t,r),r}function dw(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?F0(e)?[]:uw(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const h=dp(e,u,i);return c.top=Us(h.top,c.top),c.right=qd(h.right,c.right),c.bottom=qd(h.bottom,c.bottom),c.left=Us(h.left,c.left),c},dp(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function fw(t){const{width:e,height:n}=D5(t);return{width:e,height:n}}function hw(t,e,n){const r=Ar(e),i=yi(e),s=n==="fixed",o=ia(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=fi(0);if(r||!r&&!s)if((es(e)!=="body"||ya(i))&&(a=I0(e)),r){const h=ia(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=I5(i));const c=o.left+a.scrollLeft-l.x,u=o.top+a.scrollTop-l.y;return{x:c,y:u,width:o.width,height:o.height}}function Ku(t){return dr(t).position==="static"}function fp(t,e){return!Ar(t)||dr(t).position==="fixed"?null:e?e(t):t.offsetParent}function O5(t,e){const n=Ln(t);if(F0(t))return n;if(!Ar(t)){let i=hi(t);for(;i&&!Ys(i);){if(ur(i)&&!Ku(i))return i;i=hi(i)}return n}let r=fp(t,e);for(;r&&tw(r)&&Ku(r);)r=fp(r,e);return r&&Ys(r)&&Ku(r)&&!r2(r)?n:r||nw(t)||n}const pw=async function(t){const e=this.getOffsetParent||O5,n=this.getDimensions,r=await n(t.floating);return{reference:hw(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gw(t){return dr(t).direction==="rtl"}const mw={convertOffsetParentRelativeRectToViewportRelativeRect:sw,getDocumentElement:yi,getClippingRect:dw,getOffsetParent:O5,getElementRects:pw,getClientRects:ow,getDimensions:fw,getScale:zs,isElement:ur,isRTL:gw},vw=Jy,M5=ew,_w=Xy,L5=(t,e,n)=>{const r=new Map,i={platform:mw,...n},s={...i.platform,_c:r};return Yy(t,e,{...i,platform:s})};function bw(t){return t!=null&&typeof t=="object"&&"$el"in t}function hp(t){if(bw(t)){const e=t.$el;return n2(e)&&es(e)==="#comment"?null:e}return t}function ko(t){return typeof t=="function"?t():de(t)}function N5(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pp(t,e){const n=N5(t);return Math.round(e*n)/n}function xw(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=Le(()=>{var P;return(P=ko(n.open))!=null?P:!0}),s=Le(()=>ko(n.middleware)),o=Le(()=>{var P;return(P=ko(n.placement))!=null?P:"bottom"}),a=Le(()=>{var P;return(P=ko(n.strategy))!=null?P:"absolute"}),l=Le(()=>{var P;return(P=ko(n.transform))!=null?P:!0}),c=Le(()=>hp(t.value)),u=Le(()=>hp(e.value)),h=re(0),p=re(0),d=re(a.value),g=re(o.value),v=Yi({}),x=re(!1),y=Le(()=>{const P={position:d.value,left:"0",top:"0"};if(!u.value)return P;const $=pp(u.value,h.value),D=pp(u.value,p.value);return l.value?{...P,transform:"translate("+$+"px, "+D+"px)",...N5(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:$+"px",top:D+"px"}});let _;function f(){c.value==null||u.value==null||L5(c.value,u.value,{middleware:s.value,placement:o.value,strategy:a.value}).then(P=>{h.value=P.x,p.value=P.y,d.value=P.strategy,g.value=P.placement,v.value=P.middlewareData,x.value=!0})}function b(){typeof _=="function"&&(_(),_=void 0)}function w(){if(b(),r===void 0){f();return}if(c.value!=null&&u.value!=null){_=r(c.value,u.value,f);return}}function k(){i.value||(x.value=!1)}return at([s,o,a],f,{flush:"sync"}),at([c,u],w,{flush:"sync"}),at(i,k,{flush:"sync"}),x1()&&Xg(b),{x:bs(h),y:bs(p),strategy:bs(d),placement:bs(g),middlewareData:bs(v),isPositioned:bs(x),floatingStyles:y,update:f}}const Xd=["3D","Animation","Architecture","Asset","Augmentation","Avatar","Blender","Body","Bodyrig","Bootstrap","Characterdesign","Chatbot","Classification","Coaching","Code","Color","Command","Creaturedesign","CSS","Deepfake","Depthmap","Diffusion","Drawing","Editing","Effect","Enhancing","Experiment","Face","Finetuning","Generative Adverserial Network (GAN)","GPT","Graphic Design","Hires","HTML","Illustration","Inpainting","Interior Design","Keypoints","Landscape","Language","Line Art","Logo Design","Marketing","Masking","Mockup","Modeling","Movement","Music","Outpainting","Photo","Photoediting","Programming","Recognition","Segmentation","Song","Sound","Speech","Styletransfer","Summarization","Superresolution","SVG","Texture","Transcription","Transformer","Translation","Typography","Upscaling","Video","Virtual Reality (VR)","Workflow","Writing"],yt={Text2Image:"text2image",Image2Image:"image2image",Inpaint:"inpaint",Upscale:"upscale",Controlnet:"controlnet",Removebg:"removebg"},yw="sdxl",YH="K_EULER_ANCESTRAL",Qd=["normal","sdxl","analog","van-gogh","amused","papercut","vintedois","wavy","animagine","sd3","sd3-2b","flux-schnell","flux-dev"],ww=["sdxl","flux-dev","sd3","flux-schnell","normal","amused"],Cw=["sdxl","normal","flux-dev"],sa="image2image",oa=["esrgan","aura-sr"],kw="aura-sr",aa="realistic-vision@inpaint",gp="controlnet",js="removebg",XH=["controlnet-humanpose","controlnet-text","controlnet-softedge","controlnet-face"],QH={pose_json_url:"",edge_image:"",pose_image:"",control_mode:"Balanced",resize_mode:"scale-to-fit",control_type:t2.HumanPose,control_weight:1,starting_control_step:0,ending_control_step:1,preprocessor_resolution:512,controlnet_enabled:!1,style_fidelity:.5,enabled_auto_detection:!0,description:"",horizontal_alignment:Wl.Left,vertical_alignment:ql.Top,font_family:"Poppins, sans",font_size:100,text_in_image_preview:"",text_in_image_preprocessed_image:""},JH={width:1024,height:1024,num_outputs:1,denoising_strength:85,num_inference_steps:25,guidance_scale:7,composition:Math.floor(Math.random()*999999),model_weight:.9,enabled_image_refiner:!0,creativity_scale:45,resizing_value:1.5},eV={num_outputs:1,num_inference_steps:25,guidance_scale:7,composition:Math.floor(Math.random()*999999),image_weight:75},tV={scale_by:2},nV={removebg_type:"general"},rV="https://cw-imageserver.b-cdn.net",iV="https://cms.cogniwerk.ai/assets/",sV="/src/assets/interface/models/model-placeholder.svg",Zu=300,Sw=["DDIM","PNDM","K_EULER","K_EULER_ANCESTRAL","KLMS","DPMSolverMultistep"],mp=[512,768,1024],vp=[{name:"General",value:"general"},{name:"Humans",value:"humans"},{name:"Anime",value:"anime"}],_p="civitai-",U5="userlora--",Aw="img2img-",Ew="removebg-",wi=[["studio-lighting","230526","studio lighting,key light,fill light,rim light,back light","sdxl"],["analog-photography","84662","90s flash photo,light leak,lomography,analog photo,90s photo","sdxl"],["product-design","58247","emauromin style","sd15"],["text-logo-lora","176555","text logo","sdxl"],["childrens-picture-book","363556","j_drawing","sdxl"],["flat-style","188798","Flat style","sdxl"],["illustration-style","184681","illustrStyle","sdxl"],["3d-packages-design","263530","","sdxl"],["architecture-sketch","373505","Architecture sketch","sdxl"],["architectural-marker-sketches","34384","marker painting,handsketch","sd15"],["nighttime","99957","","sd15"]],$w=new Set(wi.map(t=>t[0])),Jd=()=>wi.map(t=>t[0]),so={"stable-diffusion":"normal","amused-diffusion":"amused",sdxl:"sdxl","van-gogh-diffusion":"van-gogh","analog-diffusion":"analog","papercut-diffusion":"papercut","vintedois-diffusion":"vintedois",wavyfusion:"wavy","animagine-xl":"animagine",esrgan:"esrgan",img2img:"image2image",sd3:"sd3","sd3-2b":"sd3-2b","realistic-vision-inpainting":"realistic-vision@inpaint",controlnet:"controlnet","remove-bg":"removebg","aura-sr":"aura-sr","flux-schnell":"flux-schnell","flux-dev":"flux-dev","flux1-1-api":"flux1-1-api"};for(const t of wi)so[t[0]]=t[0];const z5=Object.fromEntries(Object.entries(so).map(t=>[t[1],t[0]])),Tw=Jd(),j5=[...ww,...Tw],oV=[sa],aV=[aa],lV=oa,cV=[js],Pw=()=>{if(typeof window>"u")return;const t=localStorage.getItem("imported-models");if(t){let e={};try{e=JSON.parse(t)}catch{localStorage.removeItem("imported-models");return}Object.keys(e).forEach(r=>{const i=e[r].slug;so[i]=r,z5[r]=i})}};Pw();function uV(t){return console.debug("checking if model supports controlnet",t),Cw.includes(t)||t.startsWith("civitai-model-")||t.startsWith(U5)||$w.has(t)}const Dw=t=>t&&t[0].toUpperCase()+t.slice(1)||"";async function dV(t){return new Promise(async e=>{const r=await(await fetch(t)).blob(),i=new FileReader;i.readAsDataURL(r),i.onloadend=function(){e(i.result)}})}function fV(t,e){const n=t.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let s=i.length;const o=new Uint8Array(s);for(;s--;)o[s]=i.charCodeAt(s);return new File([o],e,{type:r})}const Bw=(t,e,n)=>{const r=document.querySelector(t),i=document.querySelector(e);r&&i&&L5(r,i,{placement:"top",middleware:[_w(),M5({padding:10})],strategy:"fixed",...n}).then(({x:s,y:o})=>{Object.assign(i.style,{left:`${s}px`,top:`${o}px`,visibility:"visible"})})};function Fw(t){t.width=t.width||768,t.height=t.height||768,t.num_inference_steps=t.num_inference_steps||50,t.guidance_scale=t.guidance_scale||7,t.negative_prompt=t.negative_prompt||t.negativePrompt||""}function Iw(t,e){let n=e==null?void 0:e.prompt;return(n==null?void 0:n.length)>0?n=`"${n} ⋯"`:n="user-upload",`${n}`.replaceAll(/\s+/g," ")}function s2(t){return t&&t!=="undefined"?t.replace('⋯"',"").replace('"',""):""}function bl(t=[]){const e=[];return t.forEach((n,r)=>{n.steps.forEach((s,o)=>{const a=n.executionLog[0].inputs;a&&Fw(a);const l=s.aiModelCWUID.split("·").pop(),c=s.artifacts;(c.length>1&&(l.endsWith("upscale")||l.endsWith("inpaint"))||l.endsWith("user-upload"))&&(c[c.length-1].aiModel="user-upload");let u="";if(s.status.includes("error")){const h=n.executionLog.filter(p=>p.eventType.endsWith("-error")).map(p=>{var d;return(d=p==null?void 0:p.data)==null?void 0:d.error}).join(`
`).toLowerCase();h.includes("out of memory")?u="Try smaller parameters.":h.includes("nsfw")?u="Change any potentially NSFW text.":u="General error"}if(s.status==="executing")e.push({dbId:n.id,id:r+o+1,stage:"running",errorHint:"",lastStepUrl:"",artifactsCount:c.filter(h=>!h.isDeleted).length,lastArtifact:{createdAt:n.createdAt,aiModel:l,inputs:a}});else if(s.status.includes("error")&&!(c!=null&&c.length))e.push({dbId:n.id,id:r+o+1,stage:"error",errorHint:u,artifactsCount:c.filter(h=>!h.isDeleted).length,lastStepUrl:"",lastArtifact:{createdAt:n.createdAt,aiModel:l,inputs:a}});else{const h=c.filter(p=>p.url.includes("INVALID-ARTIFACT-FOR-STEP")&&!p.isDeleted?!0:p.isDeleted!==!0);h.length&&h.map(d=>({aiModel:d.aiModel||l,createdAt:d.createdAt,fileName:d.fileName||Iw(n,a),id:d.id,workflowId:n.id,isDeleted:d.isDeleted,updatedAt:d.updatedAt,url:d.url,inputs:a,artifactShare:d.artifactShare})).forEach(d=>{e.push({dbId:n.id,id:d.id,stage:s.status,errorHint:u,lastStepUrl:d.url,lastArtifact:d})})}})}),e}function vn(){if(typeof window>"u")return!1;const t="ontouchstart"in window||navigator.maxTouchPoints>0,e=navigator.userAgent||navigator.vendor||window.opera;return t||/mobi|android|tablet|ipad|iphone/i.test(e)}function Vo(t){return t==="normal"?"SD 1.5":t.split("@")[0].replace(/-/g," ")}function H5(t){let e=t;return e=e.replace(/ˍˍ/g," "),e=e.replace(/_/g," "),e=e.replace(/\s+TW::/g,". "),e=e.replace(/\s+PH::/g,". "),e=e.replace(/\s+QB::/g,". "),e}function V5(t){let e=t;return e=e.replace(/ˍˍ/g," "),e=e.replace(/_/g," "),e.startsWith("QB::")?e=e.replace(/QB::/g,""):e=e.replace(/\s+QB::/g,". "),e}function hV(t){const e=t.match(/^(.*?)(?:TW::|PH::|QB::|$)/);return e?e[1].trim():t}function pV(t){const e=t.match(/^(.*?)(?:QB::|$)/);return e?e[1].trim():t}function gV(t){const e=/TW::(.*?)(?=(PH::|QB::|\.|$))/,n=t.match(e);return n!=null&&n.length?n[1].trim().split(",").map(i=>({name:i.replace(/ˍˍ/g," "),type:"triggerword"})):[]}function mV(t){const e=/PH::(.*?)(?=(QB::|\.|$))/,n=t.match(e);return n!=null&&n.length?n[1].trim().split(",").map(i=>({name:i.replace(/ˍˍ/g," "),type:"normal"})):[]}function vV(t){const e=/QB::(.*?)(?=(\.|$))/,n=t.match(e);return n!=null&&n.length?n[1].trim().split(",").map(i=>i.replace(/ˍˍ/g," ")):[]}function _V(t,e,n,r,i){const s=document.createElement("canvas"),o=s.getContext("2d");if(!o)return;s.width=512,s.height=512,o.fillStyle="white",o.fillRect(0,0,s.width,s.height),o.fillStyle="black",o.font=`${n}px ${e}`,o.textBaseline="top",o.textAlign="left";const a=t.split(`
`),l=parseInt(o.font,10)*1.2,c=a.length*l;let u=0;a.forEach(d=>{const g=o.measureText(d).width;g>u&&(u=g)});let h,p;switch(r){case Wl.Left:h=20;break;case Wl.Right:h=s.width-u-20;break;default:h=(s.width-u)/2}switch(i){case ql.Top:p=20;break;case ql.Bottom:p=s.height-c-20;break;default:p=(s.height-c)/2}return a.forEach((d,g)=>{const v=p+g*l;o.fillText(d,h,v)}),s.toDataURL()}const ws={};async function bV(t){const e=ws[t];if(e!==void 0){if(e===!0||e===!1)return e;if(e>=3)return!1}ws[t]=ws[t]||1;try{let n=!1;const r=()=>{n=!0},i=await fetch(t,{method:"HEAD"}).catch(r);return!n&&(""+i.status)[0]!=="2"&&(n=!0),n?ws[t]++:ws[t]=!0,!n}catch{return ws[t]++,!1}}const e1="/assets/logo-Bni1bEBk.svg",bp="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2012C14.7614%2012%2017%209.76142%2017%207C17%204.23858%2014.7614%202%2012%202C9.23858%202%207%204.23858%207%207C7%209.76142%209.23858%2012%2012%2012Z'%20stroke='%23FC5113'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.59%2022C20.59%2018.13%2016.74%2015%2012%2015C7.26%2015%203.41%2018.13%203.41%2022'%20stroke='%23FC5113'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Rw=["width","height"],Ow=["fill"],Mw=["fill"],Lw=["fill"],Nw=["fill"],Uw=Ae({__name:"galleryIcon",props:{fill:String,width:Number,height:Number},setup(t){return(e,n)=>(U(),Z("svg",{width:t.width||24,height:t.height||24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m("path",{d:"M9.59998 18.7503C7.19998 18.7503 5.25 16.8003 5.25 14.4003C5.25 12.4403 6.57002 10.7103 8.46002 10.2003C8.83002 10.1003 9.20998 10.2903 9.34998 10.6503C9.67998 11.4803 10.39 12.1203 11.25 12.3503C11.72 12.4803 12.28 12.4803 12.75 12.3503C13.12 12.2503 13.51 12.4403 13.65 12.7903C13.85 13.3003 13.95 13.8403 13.95 14.3903C13.95 15.6303 13.42 16.8103 12.5 17.6303C11.71 18.3503 10.68 18.7503 9.59998 18.7503ZM8.28998 11.8703C7.35998 12.3503 6.75 13.3203 6.75 14.4003C6.75 15.9703 8.02998 17.2503 9.59998 17.2503C10.3 17.2503 10.98 16.9903 11.5 16.5203C12.11 15.9803 12.45 15.2103 12.45 14.4003C12.45 14.2403 12.44 14.0903 12.41 13.9303C11.88 13.9803 11.34 13.9303 10.85 13.7903C9.77998 13.5003 8.85998 12.8003 8.28998 11.8703Z",fill:t.fill||"black"},null,8,Ow),m("path",{d:"M12.0002 13.9498C11.6002 13.9498 11.2102 13.8998 10.8502 13.7998C9.54016 13.4398 8.46021 12.4698 7.96021 11.2098C7.76021 10.6998 7.66016 10.1598 7.66016 9.60977C7.66016 7.20977 9.61019 5.25977 12.0102 5.25977C14.4102 5.25977 16.3602 7.20977 16.3602 9.60977C16.3602 10.1598 16.2602 10.6998 16.0602 11.2098C15.5602 12.4798 14.4702 13.4498 13.1602 13.7998C12.7902 13.8998 12.4002 13.9498 12.0002 13.9498ZM12.0002 6.74977C10.4302 6.74977 9.15021 8.02977 9.15021 9.59977C9.15021 9.95977 9.22016 10.3198 9.35016 10.6498C9.68016 11.4798 10.3902 12.1198 11.2502 12.3498C11.7202 12.4798 12.2802 12.4798 12.7502 12.3498C13.6202 12.1098 14.3302 11.4798 14.6502 10.6498C14.7802 10.3198 14.8502 9.95977 14.8502 9.59977C14.8502 8.02977 13.5702 6.74977 12.0002 6.74977Z",fill:t.fill||"black"},null,8,Mw),m("path",{d:"M14.4 18.7496C13.32 18.7496 12.29 18.3496 11.5 17.6296C11.34 17.4896 11.25 17.2796 11.25 17.0696C11.25 16.8596 11.34 16.6496 11.5 16.5096C12.1 15.9796 12.45 15.2096 12.45 14.3996C12.45 14.0396 12.38 13.6796 12.25 13.3496C12.17 13.1496 12.18 12.9296 12.28 12.7396C12.37 12.5496 12.55 12.4096 12.75 12.3496C13.61 12.1096 14.32 11.4796 14.65 10.6496C14.79 10.2996 15.17 10.0996 15.54 10.1996C17.43 10.7096 18.75 12.4396 18.75 14.3996C18.75 16.7996 16.8 18.7496 14.4 18.7496ZM13.12 16.9496C13.51 17.1496 13.95 17.2496 14.4 17.2496C15.97 17.2496 17.25 15.9696 17.25 14.3996C17.25 13.3196 16.64 12.3496 15.71 11.8696C15.27 12.5896 14.62 13.1696 13.86 13.5296C13.92 13.8096 13.95 14.0996 13.95 14.3996C13.95 15.3196 13.66 16.2096 13.12 16.9496Z",fill:t.fill||"black"},null,8,Lw),m("path",{d:"M15 22.75H9C3.57 22.75 1.25 20.43 1.25 15V9C1.25 3.57 3.57 1.25 9 1.25H15C20.43 1.25 22.75 3.57 22.75 9V15C22.75 20.43 20.43 22.75 15 22.75ZM9 2.75C4.39 2.75 2.75 4.39 2.75 9V15C2.75 19.61 4.39 21.25 9 21.25H15C19.61 21.25 21.25 19.61 21.25 15V9C21.25 4.39 19.61 2.75 15 2.75H9Z",fill:t.fill||"black"},null,8,Nw)],8,Rw))}}),zw={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jw=["fill"],Hw=Ae({__name:"arrowRightIcon",props:{fill:String},setup(t){return(e,n)=>(U(),Z("svg",zw,[m("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM16.03 12.53L13.03 15.53C12.88 15.68 12.69 15.75 12.5 15.75C12.31 15.75 12.12 15.68 11.97 15.53C11.68 15.24 11.68 14.76 11.97 14.47L13.69 12.75H8.5C8.09 12.75 7.75 12.41 7.75 12C7.75 11.59 8.09 11.25 8.5 11.25H13.69L11.97 9.53C11.68 9.24 11.68 8.76 11.97 8.47C12.26 8.18 12.74 8.18 13.03 8.47L16.03 11.47C16.32 11.76 16.32 12.24 16.03 12.53Z",fill:t.fill||"white"},null,8,jw)]))}});function xp(t,e){if(!t)return;const n=r=>{r.composedPath().includes(t.value)||typeof e=="function"&&e()};return ut(()=>{window.addEventListener("click",n)}),Nn(()=>{window.removeEventListener("click",n)}),{listener:n}}const Vw=["width","height"],Gw=["fill"],yp=Ae({__name:"SettingsBoldIcon",props:{fill:String,width:Number,height:Number},setup(t){return(e,n)=>(U(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width||20,height:t.height||20,viewBox:"0 0 20 20",fill:"none"},[m("path",{d:"M16.75 7.682c-1.508 0-2.125-1.067-1.375-2.375a1.58 1.58 0 0 0-.583-2.158l-1.442-.825c-.658-.392-1.508-.159-1.9.5l-.092.158c-.75 1.308-1.983 1.308-2.741 0l-.092-.158a1.368 1.368 0 0 0-1.883-.5L5.2 3.149a1.59 1.59 0 0 0-.583 2.166c.758 1.3.141 2.367-1.367 2.367-.867 0-1.583.708-1.583 1.583v1.467c0 .867.708 1.583 1.583 1.583 1.508 0 2.125 1.067 1.367 2.375A1.58 1.58 0 0 0 5.2 16.85l1.442.825c.658.391 1.508.158 1.9-.5l.091-.159c.75-1.308 1.984-1.308 2.742 0l.092.159c.391.658 1.241.891 1.9.5l1.441-.825a1.583 1.583 0 0 0 .584-2.159c-.759-1.308-.142-2.375 1.366-2.375.867 0 1.584-.708 1.584-1.583V9.265a1.6 1.6 0 0 0-1.592-1.583zM10 12.707a2.714 2.714 0 0 1-2.708-2.708A2.714 2.714 0 0 1 10 7.29 2.714 2.714 0 0 1 12.708 10 2.714 2.714 0 0 1 10 12.707z",fill:t.fill||"#525E68"},null,8,Gw)],8,Vw))}}),Ww=["width","height"],qw=["fill"],wp=Ae({__name:"LogoutBoldIcon",props:{fill:String,width:Number,height:Number},setup(t){return(e,n)=>(U(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width||20,height:t.height||20,viewBox:"0 0 20 20",fill:"none"},[m("path",{d:"M14 1.664h-2.167C9.167 1.664 7.5 3.331 7.5 5.997v3.375h3.7L9.475 7.647a.618.618 0 0 1-.183-.441c0-.159.058-.317.183-.442a.629.629 0 0 1 .883 0l2.792 2.792a.629.629 0 0 1 0 .883l-2.792 2.792a.629.629 0 0 1-.883 0 .629.629 0 0 1 0-.884l1.725-1.725H7.5v3.375c0 2.667 1.667 4.334 4.333 4.334h2.159c2.666 0 4.333-1.667 4.333-4.334v-8c.008-2.666-1.658-4.333-4.325-4.333zM2.292 9.375a.63.63 0 0 0-.625.625.63.63 0 0 0 .625.625H7.5v-1.25H2.292z",fill:t.fill||"#525E68"},null,8,qw)],8,Ww))}}),Kw={class:"nav-container-desktop"},Zw={id:"nav-tab",class:"desktop-nav left-nav",role:"tablist"},Yw={id:"nav-tab",class:"desktop-nav right-nav",role:"tablist"},Xw=["title"],Qw={class:"img-container"},Jw={key:0,class:"hexagon-container"},eC=["src","alt"],tC={key:1,class:"placeholder-container"},nC={key:0,id:"user-menu",role:"tablist"},rC={class:"user-menu-item no-hover"},iC=["title"],sC={key:0,class:"auth-btns"},oC={class:"footer-nav-element-mobile"},aC={class:"nav-container-mobile-footer-nav"},lC={id:"nav-tab",class:"desktop-nav",role:"tablist"},cC=["title"],uC={class:"img-container"},dC={key:0,class:"hexagon-container"},fC=["src","alt"],hC={key:1,class:"placeholder-container"},pC={key:0,id:"user-menu"},gC=Ae({__name:"NewNav",props:{currentTab:{}},emits:["toggleTab"],setup(t){const e=Ct(),n=fn(),r=$n(),i=re(!1),s=re(0);function o(){return e==null?void 0:e.appContext.config.globalProperties.$oidc.isAuthenticated()}function a(){window.location.replace("/")}const l=re(null),c=()=>{s.value=window.scrollY};bi(()=>{document.removeEventListener("scroll",c)}),ut(async()=>{l.value=await(e==null?void 0:e.appContext.config.globalProperties.$oidc.mgr.getUser()),console.log(window.innerWidth),window.innerWidth>900&&!o()&&document.addEventListener("scroll",c),document.addEventListener("visibilitychange",async()=>{if(document.visibilityState=="visible")try{const _=localStorage.getItem("forced-session-token")||await window.getAuthframeSessionToken();_&&!o()?(await(e==null?void 0:e.appContext.config.globalProperties.$oidc.applySessionToken(_)),l.value=await(e==null?void 0:e.appContext.config.globalProperties.$oidc.mgr.getUser())):!_&&o()&&(e==null||e.appContext.config.globalProperties.$oidc.signOut())}catch{console.debug("failed to update account status")}})});const u=re(),h=re(!1),p=re();xp(u,()=>{i.value&&(i.value=!1)}),xp(p,()=>{h.value&&(h.value=!1)});function g(){localStorage.setItem("login-return-path",window.location.pathname),e==null||e.appContext.config.globalProperties.$oidc.signUp()}function v(){localStorage.setItem("login-return-path",window.location.pathname),e==null||e.appContext.config.globalProperties.$oidc.signIn()}function x(){r.push("/discover")}function y(_,f){if(_.length>f){const b=Math.round(f)-2;_=_.substring(0,b)+"…"+_.substring(_.length-b),_.includes("@")||(_=_.replace("…","…@"))}return _}return(_,f)=>{var b,w,k,P,$,D,S,F,A;return U(),Z(Se,null,[(U(),Z("nav",{class:ze(["head-element",{"sticky-header":s.value>60&&!o(),"non-sticky-header":s.value<=60&&!o()&&de(n).fullPath==="/"}]),key:(b=l.value)==null?void 0:b.email},[m("div",Kw,[m("div",Zw,[m("div",{class:"head-img-wrapper",onClick:f[0]||(f[0]=E=>a()),role:"tab"},f[22]||(f[22]=[m("img",{class:"logo-img",src:e1,alt:"CogniWerk.ai"},null,-1)])),f[23]||(f[23]=m("p",{class:"claim-text"},"Your Ultimate Creative Co-Pilot",-1))]),m("div",Yw,[m("button",{class:"nav-item",role:"tab",id:"nav-tab-blog",onClick:f[1]||(f[1]=Ee(E=>_.$router.push("/discover"),["prevent"]))},f[24]||(f[24]=[m("div",null,"Discover",-1)])),m("button",{class:"nav-item",role:"tab",id:"nav-tab-blog",onClick:f[2]||(f[2]=Ee(E=>_.$router.push("/blog"),["prevent"]))},f[25]||(f[25]=[m("div",null,"Blog",-1)])),o()?(U(),Z("button",{key:0,class:"nav-item",role:"tab",id:"nav-tab-blog",onClick:f[3]||(f[3]=Ee(E=>_.$router.push("/profile"),["prevent"]))},f[26]||(f[26]=[m("div",null,"Storage",-1)]))):we("",!0),m("button",{class:"nav-item",role:"tab",id:"nav-tab-blog",onClick:f[4]||(f[4]=Ee(E=>_.$router.push("/run-model/sdxl"),["prevent"]))},f[27]||(f[27]=[m("div",null,"Create",-1)])),o()?we("",!0):(U(),Z("button",{key:1,class:"sign-up-btn",role:"tab",id:"nav-tab-create",onClick:f[5]||(f[5]=Ee(E=>g(),["prevent"]))},f[28]||(f[28]=[m("div",{class:"create-btn"},"Sign Up",-1)]))),o()?we("",!0):(U(),Z("button",{key:2,class:"login-btn",role:"tab",onClick:f[6]||(f[6]=Ee(E=>v(),["prevent"]))},f[29]||(f[29]=[m("div",null,"Login",-1)]))),o()?(U(),Z("div",{key:3,class:"nav-item user-menu-nav",role:"tabpanel",id:"nav-tab-profile-menu",ref_key:"component",ref:u,onClick:f[9]||(f[9]=Ee(E=>i.value=!i.value,["prevent"])),title:"Hi, "+((w=l.value)==null?void 0:w.firstName)},[m("div",Qw,[(k=l.value)!=null&&k.pictureUri?(U(),Z("div",Jw,[m("img",{src:(P=l.value)==null?void 0:P.pictureUri,alt:`${($=l.value)==null?void 0:$.firstName}'s profile`,class:"profile-pic"},null,8,eC)])):(U(),Z("div",tC,f[30]||(f[30]=[m("img",{src:bp,alt:"profile picture"},null,-1)])))]),i.value?(U(),Z("div",nC,[m("div",rC,[m("div",{title:l.value.email,style:{"padding-left":"0px"}},ve(y(l.value.email,12)),9,iC)]),m("div",{role:"tab",class:"user-menu-item",onClick:f[7]||(f[7]=Ee(E=>_.$router.push("/settings"),["prevent"]))},[le(yp),f[31]||(f[31]=m("div",null,"Settings",-1))]),m("div",{role:"tab",class:"user-menu-item",onClick:f[8]||(f[8]=Ee(E=>{var T;(T=de(e))==null||T.appContext.config.globalProperties.$oidc.signOut(),i.value=!1},["prevent"]))},[le(wp),f[32]||(f[32]=m("div",null,"Log out",-1))])])):we("",!0)],8,Xw)):we("",!0)])]),m("div",{class:ze(["nav-container-mobile-header-nav",{"mobile-auth-header":o()}])},[m("div",{class:"head-img-wrapper",onClick:f[10]||(f[10]=E=>a())},f[33]||(f[33]=[m("img",{class:"logo-img",src:e1,alt:"CogniWerk.ai"},null,-1)])),o()?we("",!0):(U(),Z("div",sC,[m("button",{class:"sign-up-btn",id:"nav-tab-create",onClick:f[11]||(f[11]=Ee(E=>g(),["prevent"]))},f[34]||(f[34]=[m("div",{class:"create-btn"},"Sign Up",-1)])),m("button",{class:"login-btn",onClick:f[12]||(f[12]=Ee(E=>v(),["prevent"]))},f[35]||(f[35]=[m("div",null,"Login",-1)]))]))],2)],2)),m("nav",oC,[m("div",aC,[m("div",lC,[m("button",{role:"tab",class:"nav-item blog-nav-item",id:"nav-tab-blog",onClick:f[13]||(f[13]=Ee(E=>_.$router.push("/feedback"),["prevent"]))},f[36]||(f[36]=[m("div",null,"Contact",-1)])),m("button",{role:"tab",class:"nav-item blog-nav-item",id:"nav-tab-blog",onClick:f[14]||(f[14]=Ee(E=>_.$router.push("/"),["prevent"]))},f[37]||(f[37]=[m("div",null,"Home",-1)])),m("button",{role:"tab",class:"nav-item blog-nav-item",id:"nav-tab-blog",onClick:f[15]||(f[15]=Ee(E=>_.$router.push("/blog"),["prevent"]))},f[38]||(f[38]=[m("div",null,"Blog",-1)])),m("button",{role:"tab",class:"nav-item blog-nav-item",id:"nav-tab-create",onClick:f[16]||(f[16]=Ee(E=>de(vn)()?_.$router.push("/run-model-mobile/sdxl"):_.$router.push("/run-model/sdxl"),["prevent"]))},f[39]||(f[39]=[m("div",{class:"create-btn"},"Create",-1)])),o()?(U(),Z("div",{key:0,class:"nav-item user-menu-nav",id:"nav-tab-profile-menu",onClick:f[20]||(f[20]=Ee(E=>h.value=!h.value,["prevent"])),title:"Hi, "+((D=l.value)==null?void 0:D.firstName),ref_key:"mobileMenuComp",ref:p},[m("div",uC,[(S=l.value)!=null&&S.pictureUri?(U(),Z("div",dC,[m("img",{src:(F=l.value)==null?void 0:F.pictureUri,alt:`${(A=l.value)==null?void 0:A.firstName}'s profile`,class:"profile-pic"},null,8,fC)])):(U(),Z("div",hC,f[40]||(f[40]=[m("img",{src:bp,alt:"profile picture"},null,-1)])))]),h.value?(U(),Z("div",pC,[m("div",{role:"tab",class:"user-menu-item",onClick:f[17]||(f[17]=E=>{_.$router.push("/profile"),h.value=!1})},[le(Uw,{width:20,height:20}),f[41]||(f[41]=m("div",null,"Storage",-1))]),m("div",{role:"tab",class:"user-menu-item",onClick:f[18]||(f[18]=Ee(E=>_.$router.push("/settings"),["prevent"]))},[le(yp),f[42]||(f[42]=m("div",null,"Settings",-1))]),m("div",{role:"tab",class:"user-menu-item",onClick:f[19]||(f[19]=Ee(E=>{var T;(T=de(e))==null||T.appContext.config.globalProperties.$oidc.signOut(),h.value=!1},["prevent"]))},[le(wp),f[43]||(f[43]=m("div",null,"Log out",-1))])])):we("",!0)],8,cC)):we("",!0)]),m("button",{class:"tab-switch-btn",onClick:f[21]||(f[21]=E=>{_.$emit("toggleTab"),_.currentTab||x()})},[He(ve(_.currentTab==="create"||!_.currentTab?"Or discover over 300+ AI Models":"Or create your AI Image")+" ",1),le(Hw,{fill:"#FE8149"})])])])],64)}}}),Fn=je(gC,[["__scopeId","data-v-68bf55e0"]]),mC={class:"body"},vC={class:"parent"},_C={key:0,style:{height:"100%"}},bC={class:"content-block model-block"},xC={class:"left-block"},yC={class:"img-container"},wC=["src"],CC={class:"usability"},kC={class:"tags"},SC=["onClick"],AC={class:"btns-container"},EC={class:"right-block"},$C={style:{display:"flex","flex-direction":"column",flex:"1 auto","min-height":"0px"}},TC={class:"title"},PC={class:"subtitle"},DC={class:"tabs-layout"},BC={class:"tab-header"},FC={class:"tab-items-container"},IC={class:"use-btn-container"},RC={key:0},OC={key:1},MC={class:"footer"},LC={key:0,id:"popup-wrapper"},NC={id:"newsletter"},UC={id:"popup-button-wrapper"},zC={key:0,id:"popup-wrapper"},jC={id:"newsletter",class:"share-popup"},HC={id:"popup-button-wrapper"},VC={key:0,class:"notfound"},Yu="https://cms.cogniwerk.ai/assets/",GC=Ae({__name:"ModelView",async setup(t){let e,n;const{ShareNetwork:r}=F4,i=xa(),s=sy(),o=re(!1),a=re([]),l=re(0),c={result:re({})},u=["tags.tags_id.tag","id","slug","description","input_types","images.directus_files_id.id","author","architecture","process_from.process_io_id.name","process_to.process_io_id.name","publish_year","license","name","teaser","usability","webservice_url"],h=([e,n]=ci(()=>Tt.getInstance().getModelBySlug([fn().params.id],u)),e=await e,n(),e);c.result.value={models:h};const p=iy(),d=fn().fullPath,g=re(null),v=Ct(),x=re(null),y=re({}),_=re(!1),f=async()=>{var N;if(x.value=await(v==null?void 0:v.appContext.config.globalProperties.$oidc.mgr.getUser()),(N=x.value)!=null&&N.access_token){const Q=await(v==null?void 0:v.appContext.config.globalProperties.$cogniwerk);await Q.loadAccount(x.value.access_token,x.value.profile),y.value.account=Q.account}};[e,n]=ci(()=>b()),await e,n(),ut(async()=>{window.scrollTo({top:0}),f()});async function b(){var M,q,ee,ue,me,xe;{const z=document.querySelectorAll("img.big-img");for(const C of z)C.style.setProperty("filter",i.filter.darkMode?"invert(1)":"none")}const N=(M=c.result.value)==null?void 0:M.models[0];if(!N){o.value=!0;return}const Q=N.images.length>0?N.images[0].directus_files_id.id:"6e822bcb-f7fd-4295-865c-cc88e0bb34e7";a.value=[{name:"title",content:"CogniWerk - "+N.name},{name:"description",content:((q=N==null?void 0:N.description)==null?void 0:q.replace(/<\/?[^>]+(>|$)/g,"").replace(/\n|\r/g,""))??""},{name:"keywords",content:((ee=N.tags)==null?void 0:ee.map(z=>{var C;return(C=z==null?void 0:z.tags_id)==null?void 0:C.tag}).join(","))??""},{name:"robots",content:"all"},{property:"og:title",content:"CogniWerk - "+(N==null?void 0:N.name)},{property:"og:image",content:Yu+Q+"?width=1200&format=png&quality=100&fit=outside"},{property:"og:description",content:(ue=N.description)==null?void 0:ue.replace(/<\/?[^>]+(>|$)/g,"").replace(/\n|\r/g,"")},{property:"twitter:card",content:"summary"},{property:"twitter:title",content:"CogniWerk - "+(N==null?void 0:N.name)},{property:"twitter:image",content:Yu+Q},{property:"twitter:description",content:(me=N.description)==null?void 0:me.replace(/<\/?[^>]+(>|$)/g,"").replace(/\n|\r/g,"")}];const fe=(xe=c.result.value)==null?void 0:xe.models[0];await w(fe)}async function w(N){var Q;if(N)try{if(await f(),!y.value.account){g.value=!1;return}const fe=JSON.parse((Q=y.value.account)==null?void 0:Q.likedEntities)||[],M=$cogniwerk.UID.aiModel(N.slug);g.value=fe.includes(M)}catch(fe){console.log(fe)}}at(i.filter,()=>{const N=document.querySelectorAll("img.big-img");for(const Q of N)Q.style.setProperty("filter",i.filter.darkMode?"invert(1)":"none")});function k(N){switch(N){case"do_it_yourself":return"Do It Yourself";case"external_service":return"External Service";case"ready_to_use":return"Ready To Use";case"under_review":return"Under Review"}return N}function P(N){return N===void 0&&(N=""),N.replace(/[_-]+/g," ")}async function $(N){var Q;g.value=N;try{const fe=(Q=c.result.value)==null?void 0:Q.models[0],M=await(v==null?void 0:v.appContext.config.globalProperties.$cogniwerk),q=new Set(JSON.parse(y.value.account.likedEntities)||[]),ee=M.UID.aiModel(fe.slug);N?q.add(ee):q.delete(ee);const ue=JSON.stringify([...q]);await M.updateAccount(x.value.access_token,{likedEntities:ue}),M.account.likedEntities=ue,c.refetch()}catch(fe){console.log("error updating likes",fe)}}const D=re(!1),S=re(!1),F=$n();function A(){return window.location.href}const E=re(!1),T=re(null);function L(N){navigator.clipboard.writeText(N),E.value=!0,T.value&&clearTimeout(T.value),T.value=setTimeout(()=>E.value=!1,2500)}const X=$n(),J=re(!0),ne=re(),se=re();function ce(){J.value=!1,ne.value=c.result._value.models[0].slug,se.value=c.result._value.models}function j(){if(c.result._value.models[0].usability!=="ready_to_use")window.open(c.result._value.models[0].webservice_url);else{ce();const N=c.result._value.models[0].slug;vn()?X.push(`/run-model-mobile/${N}`):X.push(`/run-model/${N}`)}}const V=Le(()=>{var N;return(N=c.result.value)==null?void 0:N.models[0]}),oe=Le(()=>vn()?j5.includes(c.result._value.models[0].slug):!0);return(N,Q)=>{var fe,M,q,ee,ue,me,xe,z;return U(),Z("div",mC,[m("header",null,[le(Fn)]),m("div",vC,[m("main",null,[J.value&&((M=(fe=c.result.value)==null?void 0:fe.models)==null?void 0:M.length)>0?(U(),Z("div",_C,[m("div",bC,[m("div",xC,[m("div",yC,[V.value.images.length>0?(U(),Z("img",{key:0,class:"big-img",src:Yu+((ee=(q=V.value.images[0])==null?void 0:q.directus_files_id)==null?void 0:ee.id),alt:"selected model image"},null,8,wC)):we("",!0),m("div",{class:ze(_.value?"show-tags-card tags-card":"tags-card")},[m("button",{class:"drag-btn",onClick:Q[0]||(Q[0]=C=>_.value=!_.value)},Q[10]||(Q[10]=[m("img",{src:Qx,alt:"usability-drag-arrow svg"},null,-1)])),m("h2",CC,[le(e2,{usability:(ue=V.value)==null?void 0:ue.usability},null,8,["usability"]),m("span",null,ve(k((me=V.value)==null?void 0:me.usability)),1)]),m("div",kC,[(U(!0),Z(Se,null,Ye((z=(xe=V.value)==null?void 0:xe.tags)==null?void 0:z.slice(0,6),(C,O)=>{var H;return U(),Z("button",{class:"tag",onClick:I=>{var R;de(s).change(de(Gl).SEARCH),N.href=de(i).addTag((R=C==null?void 0:C.tags_id)==null?void 0:R.tag),de(p).setTab(de(Gl).SEARCH),de(F).push(N.href)},key:O},ve("#"+P((H=C==null?void 0:C.tags_id)==null?void 0:H.tag)),9,SC)}),128))]),m("div",AC,[x.value?(U(),Z("button",{key:0,class:"btn",onClick:Q[1]||(Q[1]=Ee(C=>$(!g.value),["prevent"]))},[Q[11]||(Q[11]=m("img",{src:Jx,alt:"like icon"},null,-1)),m("span",null,ve(g.value?"Unlike":"Like & Save"),1)])):we("",!0),m("button",{class:"btn",onClick:Q[2]||(Q[2]=Ee(()=>x.value?S.value=!0:D.value=!0,["prevent"]))},Q[12]||(Q[12]=[m("img",{src:ey,alt:"share icon"},null,-1),m("span",null,"Share",-1)]))])],2)])]),m("div",EC,[m("div",$C,[m("h1",TC,ve(V.value.name),1),m("h2",PC,ve(V.value.teaser),1),m("div",DC,[m("div",BC,[m("button",{class:ze(`tab-btn ${l.value===0?"active":""}`),onClick:Q[3]||(Q[3]=()=>l.value=0)}," About ",2),m("button",{class:ze(`tab-btn ${l.value===1?"active":""}`),onClick:Q[4]||(Q[4]=()=>l.value=1)}," Technical details ",2)]),m("div",FC,[l.value===0?(U(),Xe(by,{key:0,model:V.value},null,8,["model"])):(U(),Xe(ky,{key:1,model:V.value},null,8,["model"]))])])]),m("div",IC,[m("button",{class:"use-btn",onClick:Q[5]||(Q[5]=Ee(C=>j(),["stop","prevent"]))},[V.value.usability==="ready_to_use"&&oe.value?(U(),Z("span",RC,"Use now")):(U(),Z("span",OC,"Visit"))])])])])])):we("",!0)]),m("section",MC,[le(P0)])]),le(sr,null,{default:mt(()=>[D.value?(U(),Z("div",LC,[m("div",NC,[m("img",{src:Wd,onClick:Q[6]||(Q[6]=C=>D.value=!1),alt:"close",class:"close-btn"}),Q[13]||(Q[13]=m("div",{id:"title"},[He(" Please "),m("span",{class:"newsletter-bold"},"sign in"),He(" or "),m("span",{class:"newsletter-bold"},"create an account"),He(" to save this AI model! ")],-1)),m("div",UC,[m("button",{onClick:Q[7]||(Q[7]=C=>de(F).push("/login")),class:"modal-btn"}," Sign In ")])])])):we("",!0)]),_:1}),le(sr,null,{default:mt(()=>{var C,O,H,I,R,Y,te,K;return[S.value?(U(),Z("div",zC,[m("div",jC,[m("img",{src:Wd,onClick:Q[8]||(Q[8]=G=>S.value=!1),alt:"close",class:"close-btn"}),Q[17]||(Q[17]=m("div",{id:"title"},"Share this model with your friends!",-1)),m("div",HC,[m("div",{id:"copy-link",onClick:Q[9]||(Q[9]=G=>L(A()))},[Q[14]||(Q[14]=m("img",{src:ty,alt:"link",id:"copy-link-img"},null,-1)),He(" "+ve(E.value?"Copied!":"Copy link"),1)]),le(de(r),{network:"twitter",url:A(),title:((C=c.result.value)==null?void 0:C.models[0].name)??"",description:((O=c.result.value)==null?void 0:O.models[0].description)??"",hashtags:((I=(H=c.result.value)==null?void 0:H.models[0].tags)==null?void 0:I.map(G=>{var ie,he;return(he=(ie=G==null?void 0:G.tags_id)==null?void 0:ie.tag)==null?void 0:he.replace(" ","")}).join(","))??""},{default:mt(()=>Q[15]||(Q[15]=[m("a",{class:"share-link"},[m("img",{src:ny,alt:"Twitter",class:"share-link-img",id:"Group_2"})],-1)])),_:1},8,["url","title","description","hashtags"]),le(de(r),{network:"reddit",url:A(),title:((R=c.result.value)==null?void 0:R.models[0].name)??"",description:((Y=c.result.value)==null?void 0:Y.models[0].description)??"",hashtags:((K=(te=c.result.value)==null?void 0:te.models[0].tags)==null?void 0:K.map(G=>{var ie,he;return(he=(ie=G==null?void 0:G.tags_id)==null?void 0:ie.tag)==null?void 0:he.replace(" ","")}).join(","))??""},{default:mt(()=>Q[16]||(Q[16]=[m("a",{class:"share-link"},[m("img",{src:ry,alt:"reddit",class:"share-link-img"})],-1)])),_:1},8,["url","title","description","hashtags"])])])])):we("",!0)]}),_:1}),o.value?(U(),Z("span",VC)):we("",!0),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:a.value,canonicalPath:de(d)},null,8,["tags","canonicalPath"])]),_:1}))])}}}),WC=je(GC,[["__scopeId","data-v-4c969b44"]]),qC={class:"content-block last-block imprint-block"},KC={id:"headline"},ZC=["innerHTML"],YC=Ae({__name:"ImprintView",setup(t){const e=fn().fullPath,n=[{property:"title",content:"Imprint"},{name:"description",content:"Your Ultimate Creative Co-Pilot."},{name:"robots",content:"all"},{name:"keywords",content:"Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{property:"og:title",content:"Imprint"},{property:"og:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"og:description",content:"Your Ultimate Creative Co-Pilot."}],r=re(null);return ut(()=>{Tt.getInstance().getImprint().then(i=>{r.value=i[0]})}),(i,s)=>{var o,a;return U(),Z(Se,null,[m("header",null,[le(Fn)]),m("main",null,[m("div",qC,[m("div",KC,ve((o=r.value)==null?void 0:o.title),1),m("pre",{innerHTML:(a=r.value)==null?void 0:a.content},null,8,ZC)])]),le(P0),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:n,canonicalPath:de(e)},null,8,["canonicalPath"])]),_:1}))],64)}}}),XC=je(YC,[["__scopeId","data-v-b877acc1"]]),QC={class:"content-block feedback-content"},JC={class:"feedback-block"},ek={id:"input-wrapper"},tk=["disabled"],nk=["disabled"],rk=Ae({__name:"FeedbackView",setup(t){const e=[{property:"title",content:"Our Privacy Statement"},{name:"description",content:"Your Ultimate Creative Co-Pilot."},{name:"robots",content:"all"},{name:"keywords",content:"Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{property:"og:title",content:"Our Privacy Statement"},{property:"og:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"og:description",content:"Your Ultimate Creative Co-Pilot."}],n=re(""),r=re(""),i=re(""),s=fn().fullPath,o=re(""),a=Ct(),l=a==null?void 0:a.appContext.config.globalProperties.$cogniwerk,c=re(!1);async function u(){try{await l.sendFeedback(n.value,r.value,i.value),n.value="",i.value="",r.value="",setTimeout(()=>alert("Your feedback has been submitted!"),10)}catch(d){alert("There was an error while submitting your feedback, try again."),console.log(d)}}async function h(){try{const d=await l.registerNewsletter(o.value,"en");d.status=="exists"?St.info("Email already registered"):d.status=="ok"&&St.success("Email Added to Newsletter")}catch(d){console.log(d)}}function p(){const d=document.getElementById("feedback-textarea");d&&(d.style.height="auto",d.style.height=`${d.scrollHeight}px`)}return(d,g)=>(U(),Z(Se,null,[m("header",null,[le(Fn)]),m("main",null,[m("div",QC,[m("div",JC,[g[10]||(g[10]=m("div",{class:"title"},"Thank you for your Feedback!",-1)),g[11]||(g[11]=m("div",{class:"subtitle"},[He(" We are constantly working on improving your experience with us. "),m("br"),He("Let us know if you have any other suggestions."),m("br")],-1)),m("form",{onSubmit:g[3]||(g[3]=Ee(v=>u(),["prevent"]))},[m("div",ek,[Fe(m("input",{class:"feedback-field",type:"text",name:"name","onUpdate:modelValue":g[0]||(g[0]=v=>i.value=v),placeholder:"Name",required:"",disabled:c.value},null,8,tk),[[dn,i.value]]),Fe(m("input",{class:"feedback-field",type:"email",name:"email","onUpdate:modelValue":g[1]||(g[1]=v=>r.value=v),placeholder:"Your Email",required:"",disabled:c.value},null,8,nk),[[dn,r.value]])]),Fe(m("textarea",{name:"feedback","onUpdate:modelValue":g[2]||(g[2]=v=>n.value=v),placeholder:"Your Message",required:"",id:"feedback-textarea",onInput:p},null,544),[[dn,n.value]]),g[6]||(g[6]=m("br",null,null,-1)),g[7]||(g[7]=m("input",{type:"submit",value:"Send Message"},null,-1))],32),g[12]||(g[12]=m("div",{class:"newsletter-add"}," Stay in the loop, get every bit of exciting news first and sign up to our newsletter: ",-1)),m("form",{onSubmit:g[5]||(g[5]=Ee(v=>h(),["prevent"])),class:"newsletter-container"},[Fe(m("input",{class:"feedback-field newsletter-email",type:"text",name:"email",id:"email",placeholder:"Your Email Address","onUpdate:modelValue":g[4]||(g[4]=v=>o.value=v),required:""},null,512),[[dn,o.value]]),g[8]||(g[8]=m("br",null,null,-1)),g[9]||(g[9]=m("input",{type:"submit",value:"Join Newsletter"},null,-1))],32)])])]),le(P0),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:e,canonicalPath:de(s)},null,8,["canonicalPath"])]),_:1}))],64))}}),ik=je(rk,[["__scopeId","data-v-ce05d475"]]),sk={id:"login-view"},ok=Ae({__name:"LoginView",setup(t){const e=Ct();return ut(()=>{e==null||e.appContext.config.globalProperties.$oidc.signIn()}),(n,r)=>(U(),Z("div",sk))}}),ak={key:0,class:"modal__backdrop"},lk={class:"modal__container"},ck={class:"modal__header"},uk=["src","alt"],dk={class:"modal__heading"},fk={class:"modal__body"},hk={class:"modal__text"},pk=["href"],gk={class:"modal__footer"},mk=["onClick"],vk=Ae({__name:"error-modal",props:{visible:{type:Boolean,required:!0},heading:{type:String,default:""},text:{type:String,default:""},buttons:{type:Array,default:()=>[{label:"OK",type:"primary",action:"default"}]},link:{type:String||null,default:null},showFeedback:{type:Boolean,default:!1},icon:{type:String,default:"warning"}},emits:["close"],setup(t,{emit:e}){const n=t,r=e,i=re(""),s=re(""),o={warning:()=>Ho(()=>import("./warning-CcNw31-v.js"),[]),danger:()=>Ho(()=>import("./danger-Djde97Gg.js"),[]),ok:()=>Ho(()=>import("./tick-lgGaAhhj.js"),[])},a=async()=>{var g;try{const v=await((g=o[n.icon])==null?void 0:g.call(o));s.value=(v==null?void 0:v.default)||""}catch(v){console.error("Icon not found:",v),s.value=""}};ut(()=>{a(),n.buttons.forEach(g=>{g.onClick=l[g.action]||l.default})}),at(()=>n.icon,a),at(()=>n.buttons,g=>{g.forEach(v=>{v.onClick=l[v.action]||l.default})},{immediate:!0}),at(()=>n.visible,g=>{g||(i.value="")});const l={share:()=>{window.open("https://cogniwerk.ai","_blank")},cancel:()=>{r("close")},default:()=>({}),sendFeedback:()=>{p(),r("close")},verify:async()=>{await d(),r("close")}},c=()=>{window.location.href="https://cogniwerk.ai/feedback"},u=Ct(),h=u==null?void 0:u.appContext.config.globalProperties.$cogniwerk,p=async()=>{try{const g=u==null?void 0:u.appContext.config.globalProperties.$oidc.mgr.getUser();await h.sendFeedback(`error popup - ${i.value}`,g.email,g.firstName+g.lastName),i.value=""}catch(g){alert("There was an error while submitting your feedback, try again."),console.error(g)}},d=async()=>{const g=await(u==null?void 0:u.appContext.config.globalProperties.$oidc.mgr.getUser()),v=await h.sendVerificationEmail(g.access_token);if(v.message==="Verification Token sent to Email"){alert(v.message);return}else console.error(v.message),alert(v.message)};return(g,v)=>t.visible?(U(),Z("div",ak,[m("div",lk,[m("div",ck,[m("img",{src:s.value,alt:`${t.icon} Icon`,class:"modal__icon--warning"},null,8,uk),m("h2",dk,ve(t.heading),1)]),m("div",fk,[m("p",hk,ve(t.text),1),t.showFeedback?Fe((U(),Z("textarea",{key:0,"onUpdate:modelValue":v[0]||(v[0]=x=>i.value=x),placeholder:"Your feedback here...",class:"modal__feedback-textarea"},null,512)),[[dn,i.value]]):we("",!0),t.link?(U(),Z("a",{key:1,href:t.link,onClick:Ee(c,["prevent"]),class:"modal__link",target:"_blank"}," Report a bug or hand in feedback ",8,pk)):we("",!0)]),m("div",gk,[(U(!0),Z(Se,null,Ye(t.buttons,(x,y)=>(U(),Z("button",{key:y,class:ze(["modal__button",`modal__button--${x.type}`]),onClick:x.onClick},ve(x.label),11,mk))),128))])])])):we("",!0)}}),G5=je(vk,[["__scopeId","data-v-b1694029"]]),Cp="data:image/svg+xml,%3csvg%20width='19'%20height='21'%20viewBox='0%200%2019%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.7088%205.17676C17.6899%205.17676%2017.6616%205.17676%2017.6332%205.17676C12.638%204.67629%207.65212%204.48743%202.71348%204.9879L0.787136%205.17676C0.390536%205.21453%200.0411498%204.93125%200.00337835%204.53465C-0.0343931%204.13805%200.248893%203.7981%200.63605%203.76033L2.56239%203.57147C7.58602%203.06156%2012.6757%203.25986%2017.7749%203.76033C18.162%203.7981%2018.4453%204.14749%2018.4075%204.53465C18.3792%204.90292%2018.0676%205.17676%2017.7088%205.17676Z'%20fill='white'/%3e%3cpath%20d='M5.90227%204.22096C5.8645%204.22096%205.82673%204.22096%205.77952%204.21152C5.4018%204.14542%205.1374%203.77714%205.2035%203.39943L5.41125%202.16242C5.56233%201.2559%205.77007%200%207.97022%200H10.4443C12.6539%200%2012.8616%201.30311%2013.0033%202.17186L13.211%203.39943C13.2771%203.78659%2013.0127%204.15486%2012.635%204.21152C12.2478%204.27762%2011.8796%204.01322%2011.8229%203.6355L11.6152%202.40793C11.483%201.5864%2011.4546%201.42587%2010.4537%201.42587H7.97967C6.97876%201.42587%206.95988%201.55807%206.81823%202.39849L6.60105%203.62606C6.54439%203.97544%206.24222%204.22096%205.90227%204.22096Z'%20fill='white'/%3e%3cpath%20d='M12.2447%2020.303H6.18241C2.88685%2020.303%202.75465%2018.4805%202.65078%2017.0075L2.037%207.49847C2.00867%207.11131%202.31084%206.77138%202.698%206.74305C3.0946%206.72417%203.4251%207.01689%203.45343%207.40405L4.06721%2016.913C4.17108%2018.3483%204.20885%2018.8866%206.18241%2018.8866H12.2447C14.2277%2018.8866%2014.2655%2018.3483%2014.3599%2016.913L14.9737%207.40405C15.0021%207.01689%2015.342%206.72417%2015.7292%206.74305C16.1163%206.77138%2016.4185%207.10187%2016.3902%207.49847L15.7764%2017.0075C15.6725%2018.4805%2015.5403%2020.303%2012.2447%2020.303Z'%20fill='white'/%3e%3cpath%20d='M10.7804%2015.1078H7.63597C7.24879%2015.1078%206.92773%2014.7868%206.92773%2014.3996C6.92773%2014.0125%207.24879%2013.6914%207.63597%2013.6914H10.7804C11.1676%2013.6914%2011.4887%2014.0125%2011.4887%2014.3996C11.4887%2014.7868%2011.1676%2015.1078%2010.7804%2015.1078Z'%20fill='white'/%3e%3cpath%20d='M11.5742%2011.3305H6.85275C6.46559%2011.3305%206.14453%2011.0094%206.14453%2010.6223C6.14453%2010.2351%206.46559%209.91406%206.85275%209.91406H11.5742C11.9613%209.91406%2012.2824%2010.2351%2012.2824%2010.6223C12.2824%2011.0094%2011.9613%2011.3305%2011.5742%2011.3305Z'%20fill='white'/%3e%3c/svg%3e",Xl="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2022c5.51%200%2010-4.49%2010-10S17.51%202%2012%202%202%206.49%202%2012s4.49%2010%2010%2010zm.75-6c0%20.41-.34.75-.75.75s-.75-.34-.75-.75v-5c0-.41.34-.75.75-.75s.75.34.75.75v5zm-1.67-8.38c.05-.13.12-.23.21-.33.1-.09.21-.16.33-.21.12-.05.25-.08.38-.08s.26.03.38.08.23.12.33.21c.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38-.12.23-.21.33c-.1.09-.21.16-.33.21a1%201%200%200%201-.76%200c-.12-.05-.23-.12-.33-.21-.09-.1-.16-.21-.21-.33A.995.995%200%200%201%2011%208c0-.13.03-.26.08-.38z'%20fill='%23fff'/%3e%3c/svg%3e",_k="data:image/svg+xml,%3csvg%20width='88'%20height='97'%20viewBox='0%200%2088%2097'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%2025.7511C3%2012.1004%209.82533%203%2025.7511%203H62.1529C78.0787%203%2084.904%2012.1004%2084.904%2025.7511V71.2533C84.904%2084.904%2078.0787%2094.0044%2062.1529%2094.0044H25.7511C9.82533%2094.0044%203%2084.904%203%2071.2533V44.043'%20stroke='%239D9D9D'%20stroke-width='5.09'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M55.3242%2014.3789V23.4793C55.3242%2028.4846%2059.4194%2032.5798%2064.4247%2032.5798H73.5251'%20stroke='%239D9D9D'%20stroke-width='5.09'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M25.7441%2053.0488H43.945'%20stroke='%239D9D9D'%20stroke-width='5.09'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M25.7441%2071.25H62.1459'%20stroke='%239D9D9D'%20stroke-width='5.09'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",bk={props:{size:{type:String,default:"30px"},color:{type:String,default:"#fff"}}};function xk(t,e,n,r,i,s){return U(),Z("div",{class:"circular-progress",style:xn({width:n.size,height:n.size})},[m("div",{class:"spinner",style:xn({borderColor:n.color+" transparent transparent transparent"})},null,4)],4)}const Ql=je(bk,[["render",xk],["__scopeId","data-v-274bad05"]]),yk=["fill"],kp=Ae({__name:"refreshIcon",props:{fill:String},setup(t){return(e,n)=>(U(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:t.fill||"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-rotate-cw"},n[0]||(n[0]=[m("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"},null,-1),m("path",{d:"M21 3v5h-5"},null,-1)]),8,yk))}}),wk="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.493%201.66797H6.50964C3.4763%201.66797%201.66797%203.4763%201.66797%206.50964V13.4846C1.66797%2016.5263%203.4763%2018.3346%206.50964%2018.3346H13.4846C16.518%2018.3346%2018.3263%2016.5263%2018.3263%2013.493V6.50964C18.3346%203.4763%2016.5263%201.66797%2013.493%201.66797ZM7.05964%209.1513C7.3013%208.90964%207.7013%208.90964%207.94297%209.1513L9.3763%2010.5846V5.4263C9.3763%205.08464%209.65964%204.8013%2010.0013%204.8013C10.343%204.8013%2010.6263%205.08464%2010.6263%205.4263V10.5846L12.0596%209.1513C12.3013%208.90964%2012.7013%208.90964%2012.943%209.1513C13.1846%209.39297%2013.1846%209.79297%2012.943%2010.0346L10.443%2012.5346C10.3846%2012.593%2010.318%2012.6346%2010.243%2012.668C10.168%2012.7013%2010.0846%2012.718%2010.0013%2012.718C9.91797%2012.718%209.84297%2012.7013%209.75963%2012.668C9.68464%2012.6346%209.61797%2012.593%209.55964%2012.5346L7.05964%2010.0346C6.81797%209.79297%206.81797%209.4013%207.05964%209.1513ZM15.2013%2014.3513C13.5263%2014.9096%2011.768%2015.193%2010.0013%2015.193C8.23464%2015.193%206.4763%2014.9096%204.8013%2014.3513C4.4763%2014.243%204.3013%2013.8846%204.40964%2013.5596C4.51797%2013.2346%204.86797%2013.0513%205.2013%2013.168C8.3013%2014.2013%2011.7096%2014.2013%2014.8096%2013.168C15.1346%2013.0596%2015.493%2013.2346%2015.6013%2013.5596C15.7013%2013.893%2015.5263%2014.243%2015.2013%2014.3513Z'%20fill='%23292D32'/%3e%3c/svg%3e",Ck="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.49%201.664H6.505c-3.034%200-4.842%201.808-4.842%204.842v6.975c0%203.041%201.808%204.85%204.842%204.85h6.975c3.033%200%204.841-1.809%204.841-4.842V6.506c.009-3.034-1.8-4.842-4.833-4.842zm-6.293%209.008%203.65-3.65H8.822a.63.63%200%200%201-.625-.625.63.63%200%200%201%20.625-.625h3.534c.083%200%20.158.017.241.05.15.067.275.184.342.342.033.075.05.158.05.242v3.533a.63.63%200%200%201-.625.625.63.63%200%200%201-.625-.625V7.914l-3.658%203.642a.618.618%200%200%201-.442.183.618.618%200%200%201-.442-.183.629.629%200%200%201%200-.884zm8%203.675a16.454%2016.454%200%200%201-5.2.842c-1.766%200-3.525-.283-5.2-.842a.628.628%200%200%201-.391-.791.618.618%200%200%201%20.791-.392%2015.278%2015.278%200%200%200%209.609%200%20.628.628%200%200%201%20.791.392.636.636%200%200%201-.4.791z'%20fill='%23292D32'/%3e%3c/svg%3e",Hs="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.914%2010.96h-1.808a2.69%202.69%200%200%201-2.692-2.69V6.46a.624.624%200%200%200-.625-.624H5.147c-1.925%200-3.483%201.25-3.483%203.483v5.534c0%202.233%201.558%203.483%203.483%203.483h4.909c1.925%200%203.483-1.25%203.483-3.483v-3.267a.624.624%200%200%200-.625-.625z'%20fill='%23292D32'/%3e%3cpath%20d='M14.852%201.664H9.944c-1.884%200-3.409%201.2-3.475%203.342.05%200%20.091-.009.141-.009h4.909c1.925%200%203.483%201.25%203.483%203.484v5.541c0%20.05-.008.092-.008.134%201.858-.059%203.341-1.292%203.341-3.467V5.147c0-2.233-1.558-3.483-3.483-3.483z'%20fill='%23292D32'/%3e%3cpath%20d='M9.981%205.96c-.258-.26-.7-.084-.7.274v2.183c0%20.917.775%201.667%201.725%201.667.592.008%201.417.008%202.125.008.359%200%20.542-.416.292-.666A680.14%20680.14%200%200%201%209.98%205.959z'%20fill='%23292D32'/%3e%3c/svg%3e",Jl="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.96%201.664H8.044c-.867%200-1.575.7-1.575%201.567v.783c0%20.867.7%201.567%201.566%201.567h3.925c.867%200%201.567-.7%201.567-1.567v-.783a1.56%201.56%200%200%200-1.567-1.567z'%20fill='%23292D32'/%3e%3cpath%20d='M14.367%204.02a2.415%202.415%200%200%201-2.408%202.41H8.042a2.415%202.415%200%200%201-2.408-2.41c0-.466-.5-.758-.917-.54a3.726%203.726%200%200%200-1.975%203.29v7.843a3.734%203.734%200%200%200%203.725%203.724h7.067a3.734%203.734%200%200%200%203.725-3.724V6.77c0-1.425-.8-2.667-1.975-3.292-.417-.217-.917.075-.917.542zm-2.258%209.893a.618.618%200%200%201-.442.183.618.618%200%200%201-.441-.184l-1.209-1.208-1.241%201.242a.618.618%200%200%201-.442.183.618.618%200%200%201-.442-.183.629.629%200%200%201%200-.883l1.242-1.242-1.208-1.208a.629.629%200%200%201%200-.884.629.629%200%200%201%20.883%200l1.208%201.209%201.167-1.167a.629.629%200%200%201%20.883%200%20.629.629%200%200%201%200%20.883L10.9%2011.821l1.209%201.208a.629.629%200%200%201%200%20.883z'%20fill='%23292D32'/%3e%3c/svg%3e",kk="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.5574%204.35964C16.2157%204.2263%2014.8741%204.1263%2013.5241%204.0513V4.04297L13.3407%202.95964C13.2157%202.19297%2013.0324%201.04297%2011.0824%201.04297H8.89907C6.95741%201.04297%206.77407%202.14297%206.64074%202.9513L6.46574%204.01797C5.69074%204.06797%204.91574%204.11797%204.14074%204.19297L2.44074%204.35964C2.09074%204.39297%201.84074%204.7013%201.87407%205.04297C1.90741%205.38464%202.20741%205.63463%202.55741%205.6013L4.25741%205.43464C8.62407%205.0013%2013.0241%205.16797%2017.4407%205.60964C17.4657%205.60964%2017.4824%205.60964%2017.5074%205.60964C17.8241%205.60964%2018.0991%205.36797%2018.1324%205.04297C18.1574%204.7013%2017.9074%204.39297%2017.5574%204.35964Z'%20fill='%23292D32'/%3e%3cpath%20d='M16.0264%206.78203C15.8264%206.5737%2015.5514%206.45703%2015.2681%206.45703H4.73475C4.45142%206.45703%204.16809%206.5737%203.97642%206.78203C3.78475%206.99036%203.67642%207.2737%203.69309%207.56536L4.20975%2016.1154C4.30142%2017.382%204.41809%2018.9654%207.32642%2018.9654H12.6764C15.5848%2018.9654%2015.7014%2017.3904%2015.7931%2016.1154L16.3098%207.5737C16.3264%207.2737%2016.2181%206.99036%2016.0264%206.78203ZM11.3848%2014.7904H8.60975C8.26809%2014.7904%207.98475%2014.507%207.98475%2014.1654C7.98475%2013.8237%208.26809%2013.5404%208.60975%2013.5404H11.3848C11.7264%2013.5404%2012.0098%2013.8237%2012.0098%2014.1654C12.0098%2014.507%2011.7264%2014.7904%2011.3848%2014.7904ZM12.0848%2011.457H7.91809C7.57642%2011.457%207.29309%2011.1737%207.29309%2010.832C7.29309%2010.4904%207.57642%2010.207%207.91809%2010.207H12.0848C12.4264%2010.207%2012.7098%2010.4904%2012.7098%2010.832C12.7098%2011.1737%2012.4264%2011.457%2012.0848%2011.457Z'%20fill='%23292D32'/%3e%3c/svg%3e",So="data:image/svg+xml,%3csvg%20width='12'%20height='6'%20viewBox='0%200%2012%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.4391%200.132812H5.76658H1.55908C0.839079%200.132812%200.479079%201.00281%200.989079%201.51281L4.87408%205.39781C5.49658%206.02031%206.50908%206.02031%207.13158%205.39781L8.60908%203.92031L11.0166%201.51281C11.5191%201.00281%2011.1591%200.132812%2010.4391%200.132812Z'%20fill='%23292D32'/%3e%3c/svg%3e",Sk=Ae({__name:"autosize-textarea",props:{value:{type:String,default:""},placeholder:{type:String},disabled:{type:Boolean,default:!1}},emits:["input"],setup(t,{emit:e}){const n=t,r=e,i=re(null);function s(a){i.value&&(i.value.style.height="auto",i.value.style.height=i.value.scrollHeight+"px"),a&&r("input",a)}function o(){s()}return ut(()=>{s(),addEventListener("resize",o,!0)}),bi(()=>{removeEventListener("resize",o,!0)}),(a,l)=>(U(),Z("textarea",Ui(n,{onInput:s,ref_key:"textarea",ref:i,style:{resize:"none",overflow:"hidden","min-height":"30px"},rows:"1"}),null,16))}}),nl=je(Sk,[["__scopeId","data-v-353dc311"]]),Di=ea.getInstance(),o2=no("leftsidebar",{state:()=>({selectedModel:yw,savedPresets:[],cogniwerkPresets:[],modelInfo:{}}),getters:{currentMode(){if(Qd.includes(this.selectedModel)||this.selectedModel.startsWith(_p)||Jd().includes(this.selectedModel)||this.selectedModel.startsWith(U5))return yt.Text2Image;if(oa.includes(this.selectedModel))return yt.Upscale;switch(this.selectedModel){case sa:return yt.Image2Image;case aa:return yt.Inpaint;case gp:return yt.Controlnet;case js:return yt.Removebg;default:return""}},modelSupportsImageRefiner(){return!!["sdxl","normal"].includes(this.selectedModel)},isLoraFluxModel(){var t,e,n;return!!((n=(e=(t=this.modelInfo[this.selectedModel])==null?void 0:t.base_model)==null?void 0:e.toLowerCase())!=null&&n.includes("flux"))}},actions:{updateSelectedModel(t){this.selectedModel=t},getMode(t){if(Qd.includes(t)||t.startsWith(_p)||Jd().includes(t))return yt.Text2Image;if(oa.includes(t))return yt.Upscale;switch(t){case sa:return yt.Image2Image;case aa:return yt.Inpaint;case gp:return yt.Controlnet;case js:return yt.Removebg;default:return yt.Text2Image}},initializePresets(){var e,n;const t=(n=(e=Di==null?void 0:Di.account)==null?void 0:e.additionalInfo)==null?void 0:n.presets;t&&t.length&&(this.savedPresets=t)},async initCogniwerkPresets(){const e=await Tt.getInstance().getCogniwerkPresets();this.cogniwerkPresets=e.map(n=>{const r=n.model,i={...n,variant:so[r.slug],num_inference_steps:+(n==null?void 0:n.time_image_quality)||25,num_outputs:+(n==null?void 0:n.num_outputs)||1,guidance_scale:(n==null?void 0:n.human_ai_collaboration)||7,control_type:(n==null?void 0:n.controltype)==="openpose"?t2.HumanPose:n==null?void 0:n.controltype,controlnet_enabled:n==null?void 0:n.enable_controlnet,enabled_auto_detection:n==null?void 0:n.autodetection};return n.height&&(i.height=+n.height,i.width=+n.width),{...n,type:"cogniwerkPreset",slug:r.slug,small_image:r.small_image,recommended_settings:i}})},async addPreset(t){await Di.addPeset(Di.account.access_token,t),this.savedPresets=[...this.savedPresets,t]},async deletePreset(t){await Di.deletePreset(Di.account.access_token,t.id),this.savedPresets=this.savedPresets.filter(e=>e.id!==t.id)}},persist:!0});function en(t,e,n="mousedown",r=[]){const i=s=>{try{const o=Array.isArray(t.value)?t.value[0]:t.value;if(o&&o.contains(s.target)||r&&r.some(a=>{var l;return(l=a.value)==null?void 0:l.contains(s.target)}))return;e(s)}catch(o){console.error("error on click",o)}};ut(()=>{document.addEventListener(n,i)}),Nn(()=>{document.removeEventListener(n,i)})}const Ak=["min","max","value","step"],Ek=Ae({__name:"input-slider",props:{min:{type:Number,default:0},max:{type:Number,default:100},value:{type:Number,default:0},step:{type:Number,default:1}},emits:["input"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=re(null),o=re(0);at(r,()=>{o.value=(r.value-r.min)/(r.max-r.min)*100},{immediate:!0});const l=c=>{i("input",Number(c.target.value))};return e({inputRef:s}),(c,u)=>(U(),Z("input",{type:"range",ref_key:"inputRef",ref:s,min:r.min,max:r.max,value:r.value,step:r.step,onInput:l,class:"custom-range",style:xn({background:`linear-gradient(to right, #fe8149 ${o.value}%, #f4f6f7 ${o.value}%)`})},null,44,Ak))}}),$k=je(Ek,[["__scopeId","data-v-cc465f23"]]);let rl;const Tk=new Uint8Array(16);function Pk(){if(!rl&&(rl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rl(Tk)}const un=[];for(let t=0;t<256;++t)un.push((t+256).toString(16).slice(1));function Dk(t,e=0){return un[t[e+0]]+un[t[e+1]]+un[t[e+2]]+un[t[e+3]]+"-"+un[t[e+4]]+un[t[e+5]]+"-"+un[t[e+6]]+un[t[e+7]]+"-"+un[t[e+8]]+un[t[e+9]]+"-"+un[t[e+10]]+un[t[e+11]]+un[t[e+12]]+un[t[e+13]]+un[t[e+14]]+un[t[e+15]]}const Bk=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sp={randomUUID:Bk};function Fk(t,e,n){if(Sp.randomUUID&&!e&&!t)return Sp.randomUUID();t=t||{};const r=t.random||(t.rng||Pk)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Dk(r)}const Ik={class:"modal-window shown"},Rk={class:"container"},Ok={class:"headline-container"},Mk={class:"settings-container"},Lk={class:"row"},Nk={class:"column2"},Uk={class:"row"},zk={class:"column2"},jk={class:"m-0 one-line-text uppercase-text",style:{"font-size":"15px","font-style":"normal",color:"#292d32"}},Hk={key:0,class:"popup-container"},Vk=["onClick"],Gk={class:"row"},Wk={class:"column2"},qk={class:"row"},Kk={class:"column2"},Zk={class:"row"},Yk={class:"column2"},Xk={class:"form-group"},Qk={class:"row"},Jk={class:"column2"},eS={class:"m-0 one-line-text",style:{"font-size":"15px","font-style":"normal",color:"#292d32"}},tS={key:0,class:"popup-container"},nS=["onClick"],rS={key:0,class:"row"},iS={class:"column2 dimensions-container"},sS={class:"m-0 one-line-text",style:{"font-size":"15px","font-style":"normal",color:"#292d32"}},oS={key:0,class:"popup-container"},aS=["onClick"],lS={class:"width-container"},cS={class:"m-0 one-line-text",style:{"font-size":"15px","font-style":"normal",color:"#292d32"}},uS={key:0,class:"popup-container"},dS=["onClick"],fS={key:1,class:"row"},hS={class:"column2"},pS={class:"row"},gS={class:"column2"},mS={class:"row"},vS={class:"column2"},_S={class:"row"},bS={class:"column2"},xS={class:"row"},yS={class:"column2 d-flex flex-wrap output-container"},wS=["onClick","id"],CS={key:2,class:"row"},kS={class:"column2"},SS={class:"d-flex align-items-center flex-fill",style:{"margin-top":"6px"}},AS={class:"d-flex align-items-center flex-fill",style:{"max-width":"200px"}},ES={class:"bg-white-bordered rounded mx-1 mb-0 upscale-value-text",id:"preset-slider-scale-by-value-text"},$S={key:3,class:"row",style:{"margin-bottom":"150px"}},TS={class:"column2"},PS={class:"m-0 one-line-text",style:{"font-size":"15px","font-style":"normal",color:"#292d32","text-transform":"capitalize"}},DS={key:0,class:"popup-container"},BS=["onClick"],FS={class:"save-preset-button-container"},IS={key:0,class:"error-msg"},RS=Ae({__name:"preset-modal",props:{artifact:{}},emits:["close"],setup(t,{emit:e}){const n=t,r=e,i=vt("showErrorModal"),s=["sdxl","sd3","normal","amused",sa,aa,...oa,js],o=o2(),{modelInfo:a}=Cv(o),l=re({name:"",slug:"sdxl",small_image:"4e114d41-3044-4b6b-a05e-ac1ece9d267e",type:"preset",id:Fk(),recommended_settings:{enabled_quality_booster:!1,width:1024,height:1024,variant:"sdxl",num_outputs:1,guidance_scale:7,num_inference_steps:25,artisan:"K_EULER_ANCESTRAL",composition:void 0,prompt:"",negative_prompt:"",denoising_strength:85,image_weight:75,scale_by:2,removebg_type:"general"},artifact:void 0}),c=re(yt.Text2Image),u=re(""),h=re(null),p=re(null),d=re(null),g=re(!1);en(d,()=>{g.value=!1});const v=re(null),x=re(!1);en(v,()=>{x.value=!1});const y=re(null),_=re(!1);en(y,()=>{_.value=!1});const f=re(null),b=re(!1);en(f,()=>{b.value=!1});const w=re(null),k=re(!1);en(w,()=>{k.value=!1});const P=re(null),$=re(!1);en(P,()=>{$.value=!1});const D=A=>{let E=A;if(A!=null&&A.startsWith(Aw))E=sa;else if(A!=null&&A.startsWith(Ew))E=js;else if(A!=null&&A.includes("upscale"))E=kw;else if(A!=null&&A.includes("inpaint"))E=aa;else if(A!=null&&A.startsWith("civitai")){const T=A.split("-")[2],L=wi.find(X=>X.includes(T));L&&(E=L[0])}return E};ut(()=>{var A,E,T,L,X,J;if(n.artifact){const ne=Object.assign({},(A=n.artifact)==null?void 0:A.inputs);if(!ne.composition&&ne.seed&&(ne.composition=ne.seed,delete ne.seed),ne.variant=D(ne.variant),a.value[ne.variant]){const se=o.getMode(ne.variant);c.value=se;const ce=a.value[ne.variant];l.value.slug=ce.slug,l.value.small_image=ce.small_image;for(const j in ne)l.value.recommended_settings[j]=ne[j];if(ne.variant===js){const j=((L=(T=(E=n.artifact)==null?void 0:E.inputs)==null?void 0:T.variant)==null?void 0:L.split("-")[1])||vp[0].value;l.value.recommended_settings.removebg_type=j}l.value.artifact=n.artifact,((X=ne==null?void 0:ne.prompt)!=null&&X.includes("QB::")||(J=ne==null?void 0:ne.negative_prompt)!=null&&J.includes("QB::"))&&(l.value.recommended_settings.enabled_quality_booster=!0),console.log(l.value)}else i("CWES525"),r("close")}}),at(x,A=>{A&&(console.log(A),Bw("#models-dropdown","#models-dropdown-popover",{placement:"bottom-start",middleware:[M5({padding:10}),vw({mainAxis:-30,crossAxis:120})]}))});const S=A=>{const E=a.value[A];if(l.value.slug=E.slug,l.value.small_image=E.small_image,E!=null&&E.recommended_settings)for(const L in E.recommended_settings)l.value.recommended_settings[L]=E.recommended_settings[L];l.value.recommended_settings.variant=A;const T=o.getMode(A);c.value=T,x.value=!1},F=()=>{l.value.name.trim()?((c.value===yt.Text2Image||c.value===yt.Image2Image)&&(delete l.value.recommended_settings.image_weight,delete l.value.recommended_settings.scale_by,delete l.value.recommended_settings.removebg_type),c.value===yt.Text2Image&&delete l.value.recommended_settings.denoising_strength,c.value===yt.Inpaint&&(delete l.value.recommended_settings.width,delete l.value.recommended_settings.height,delete l.value.recommended_settings.denoising_strength,delete l.value.recommended_settings.scale_by,delete l.value.recommended_settings.removebg_type),c.value===yt.Upscale&&(l.value.recommended_settings={variant:l.value.recommended_settings.variant,scale_by:l.value.recommended_settings.scale_by}),c.value===yt.Removebg&&(l.value.recommended_settings={variant:l.value.recommended_settings.variant,removebg_type:l.value.recommended_settings.removebg_type}),o.addPreset(l.value),r("close"),St.success("Successfully saved preset!")):u.value="Please enter preset name"};return(A,E)=>(U(),Z("div",Ik,[m("div",{class:"modal-content",onClick:E[21]||(E[21]=Ee(T=>T,["stop"]))},[m("div",Rk,[m("div",Ok,[E[23]||(E[23]=m("p",{class:"save-preset"},"Save Preset",-1)),m("button",{class:"close-button",onClick:E[0]||(E[0]=Ee(T=>r("close"),["stop"]))},E[22]||(E[22]=[m("img",{src:Wd,alt:"close"},null,-1)]))]),m("div",Mk,[Object.values(de(yt)).includes(c.value)?(U(),Z(Se,{key:0},[m("div",Lk,[E[24]||(E[24]=m("div",{class:"column1"},[m("p",null,"Name:")],-1)),m("div",Nk,[le(nl,{value:l.value.name,placeholder:"Please enter preset name",onInput:E[1]||(E[1]=T=>l.value.name=T.target.value)},null,8,["value"])])]),m("div",Uk,[E[26]||(E[26]=m("div",{class:"column1"},[m("p",null,"Model:")],-1)),m("div",zk,[A.artifact?(U(),Xe(nl,{key:0,value:de(Vo)(l.value.recommended_settings.variant),disabled:!0,class:"uppercase-text"},null,8,["value"])):(U(),Z("div",{key:1,class:"dropdown-container",onClick:E[2]||(E[2]=Ee(T=>x.value=!x.value,["stop"])),ref_key:"modelsPopupRef",ref:v,id:"models-dropdown"},[m("p",jk,ve(de(Vo)(l.value.recommended_settings.variant)),1),E[25]||(E[25]=m("img",{src:So,class:"d-block c-arrow down-arrow p-0 m-0",alt:"down"},null,-1)),m("div",{class:"position-fixed",style:{"z-index":"1000",visibility:"hidden",top:"-99999px",left:"-99999px",width:"70%"},ref_key:"popoverRef",ref:p,id:"models-dropdown-popover"},[x.value?(U(),Z("div",Hk,[(U(),Z(Se,null,Ye(s,T=>m("p",{key:T,class:"popup-text uppercase-text",onClick:Ee(L=>S(T),["stop"])},ve(de(Vo)(T)),9,Vk)),64))])):we("",!0)],512)],512))])])],64)):we("",!0),c.value===de(yt).Text2Image||c.value===de(yt).Image2Image||c.value===de(yt).Inpaint?(U(),Z(Se,{key:1},[m("div",Gk,[E[27]||(E[27]=m("div",{class:"column1"},[m("p",null,"Prompt:")],-1)),m("div",Wk,[le(nl,{value:l.value.recommended_settings.prompt,onInput:E[3]||(E[3]=T=>l.value.recommended_settings.prompt=T.target.value)},null,8,["value"])])]),m("div",qk,[E[28]||(E[28]=m("div",{class:"column1"},[m("p",null,"Negative Prompt:")],-1)),m("div",Kk,[le(nl,{value:l.value.recommended_settings.negative_prompt,onInput:E[4]||(E[4]=T=>l.value.recommended_settings.negative_prompt=T.target.value)},null,8,["value"])])]),m("div",Zk,[E[30]||(E[30]=m("div",{class:"column1"},[m("p",null,"Quality Booster:")],-1)),m("div",Yk,[m("div",Xk,[Fe(m("input",{type:"checkbox",id:"preset-quality-booster","onUpdate:modelValue":E[5]||(E[5]=T=>l.value.recommended_settings.enabled_quality_booster=T)},null,512),[[w0,l.value.recommended_settings.enabled_quality_booster]]),E[29]||(E[29]=m("label",{for:"preset-quality-booster"},null,-1))])])]),m("div",Qk,[E[32]||(E[32]=m("div",{class:"column1"},[m("p",null,"Sampler:")],-1)),m("div",Jk,[m("div",{class:"dropdown-container",onClick:E[6]||(E[6]=Ee(T=>g.value=!g.value,["stop"])),ref_key:"samplerPopupRef",ref:d},[m("p",eS,ve(l.value.recommended_settings.artisan),1),E[31]||(E[31]=m("img",{src:So,class:"d-block c-arrow down-arrow p-0 m-0",alt:"down"},null,-1)),g.value?(U(),Z("div",tS,[(U(!0),Z(Se,null,Ye(de(Sw),T=>(U(),Z("p",{key:"preset"+T,class:"popup-text",onClick:Ee(L=>{l.value.recommended_settings.artisan=T,g.value=!1},["stop"])},ve(T),9,nS))),128))])):we("",!0)],512)])]),c.value!==de(yt).Inpaint?(U(),Z("div",rS,[E[36]||(E[36]=m("div",{class:"column1"},[m("p",null,"Height:")],-1)),m("div",iS,[m("div",{class:"dropdown-container dimensions-popup-container",onClick:E[7]||(E[7]=Ee(T=>_.value=!_.value,["stop"])),ref_key:"heightPopupRef",ref:y},[m("p",sS,ve(l.value.recommended_settings.height)+" px ",1),E[33]||(E[33]=m("img",{src:So,class:"d-block c-arrow down-arrow p-0 m-0",alt:"down"},null,-1)),_.value?(U(),Z("div",oS,[(U(!0),Z(Se,null,Ye(de(mp),T=>(U(),Z("p",{key:"height-"+T,class:"popup-text",onClick:Ee(L=>{l.value.recommended_settings.height=T,_.value=!1},["stop"])},ve(T)+" px ",9,aS))),128))])):we("",!0)],512),m("div",lS,[E[35]||(E[35]=m("p",{class:"width-text"},"Width:",-1)),m("div",{class:"dropdown-container",onClick:E[8]||(E[8]=Ee(T=>b.value=!b.value,["stop"])),ref_key:"widthPopupRef",ref:f},[m("p",cS,ve(l.value.recommended_settings.width)+" px ",1),E[34]||(E[34]=m("img",{src:So,class:"d-block c-arrow down-arrow p-0 m-0",alt:"down"},null,-1)),b.value?(U(),Z("div",uS,[(U(!0),Z(Se,null,Ye(de(mp),T=>(U(),Z("p",{key:"width-"+T,class:"popup-text",onClick:Ee(L=>{l.value.recommended_settings.width=T,b.value=!1},["stop"])},ve(T)+" px ",9,dS))),128))])):we("",!0)],512)])])])):we("",!0),c.value===de(yt).Image2Image||c.value===de(yt).Inpaint?(U(),Z("div",fS,[E[37]||(E[37]=m("div",{class:"column1"},[m("p",null,"Image Weight:")],-1)),m("div",hS,[c.value===de(yt).Image2Image?Fe((U(),Z("input",{key:0,type:"number","onUpdate:modelValue":E[9]||(E[9]=T=>l.value.recommended_settings.denoising_strength=T),onInput:E[10]||(E[10]=T=>{var X;const L=parseInt((X=T.target)==null?void 0:X.value);l.value.recommended_settings.denoising_strength=Math.min(Math.max(L,1),100)}),class:"number-input",min:1,max:100},null,544)),[[dn,l.value.recommended_settings.denoising_strength]]):Fe((U(),Z("input",{key:1,type:"number","onUpdate:modelValue":E[11]||(E[11]=T=>l.value.recommended_settings.image_weight=T),onInput:E[12]||(E[12]=T=>{var X;const L=parseInt((X=T.target)==null?void 0:X.value);l.value.recommended_settings.image_weight=Math.min(Math.max(L,1),100)}),class:"number-input",min:1,max:100},null,544)),[[dn,l.value.recommended_settings.image_weight]])])])):we("",!0),m("div",pS,[E[38]||(E[38]=m("div",{class:"column1"},[m("p",null,"Time - Image Quality:")],-1)),m("div",gS,[Fe(m("input",{type:"number","onUpdate:modelValue":E[13]||(E[13]=T=>l.value.recommended_settings.num_inference_steps=T),onInput:E[14]||(E[14]=T=>{var X;const L=parseInt((X=T.target)==null?void 0:X.value);l.value.recommended_settings.num_inference_steps=Math.min(Math.max(L,1),100)}),class:"number-input",min:1,max:100},null,544),[[dn,l.value.recommended_settings.num_inference_steps]])])]),m("div",mS,[E[39]||(E[39]=m("div",{class:"column1"},[m("p",null,"Guidance Weight:")],-1)),m("div",vS,[Fe(m("input",{type:"number","onUpdate:modelValue":E[15]||(E[15]=T=>l.value.recommended_settings.guidance_scale=T),onInput:E[16]||(E[16]=T=>{var X;const L=parseInt((X=T.target)==null?void 0:X.value);l.value.recommended_settings.guidance_scale=Math.min(Math.max(L,1),20)}),class:"number-input",min:1,max:20},null,544),[[dn,l.value.recommended_settings.guidance_scale]])])]),m("div",_S,[E[40]||(E[40]=m("div",{class:"column1"},[m("p",null,"Seed:")],-1)),m("div",bS,[Fe(m("input",{type:"number","onUpdate:modelValue":E[17]||(E[17]=T=>l.value.recommended_settings.composition=T),onInput:E[18]||(E[18]=T=>{var X;const L=parseInt((X=T.target)==null?void 0:X.value);l.value.recommended_settings.composition=Math.min(Math.max(L,1),999999)}),class:"number-input",min:1,max:999999},null,544),[[dn,l.value.recommended_settings.composition]])])]),m("div",xS,[E[41]||(E[41]=m("div",{class:"column1"},[m("p",null,"Number of Images:")],-1)),m("div",yS,[(U(!0),Z(Se,null,Ye(c.value===de(yt).Inpaint?1:2,T=>(U(),Z("div",{class:ze(["output-number-btn px-1 rounded",l.value.recommended_settings.num_outputs==T?"bg-dark text-white bordered":"bg-white-bordered"]),key:T,onClick:L=>l.value.recommended_settings.num_outputs=T,id:`preset-output-number-images-${T}`},ve(T),11,wS))),128))])])],64)):c.value===de(yt).Upscale?(U(),Z("div",CS,[E[42]||(E[42]=m("div",{class:"column1"},[m("p",null,"Scale by:")],-1)),m("div",kS,[m("div",SS,[m("div",AS,[le($k,{min:1,max:4,step:.2,ref_key:"scaleBySlideRef",ref:h,id:"presed-slider-scale-by",value:l.value.recommended_settings.scale_by,onInput:E[19]||(E[19]=T=>{let L=T;+L==1&&(h.value.inputRef.value=1.2,L=1.2),l.value.recommended_settings.scale_by=+L})},null,8,["value"])]),m("div",ES,ve(l.value.recommended_settings.scale_by)+"x ",1)])])])):c.value===de(yt).Removebg?(U(),Z("div",$S,[E[44]||(E[44]=m("div",{class:"column1"},[m("p",null,"Removal Type:")],-1)),m("div",TS,[m("div",{class:"dropdown-container",onClick:E[20]||(E[20]=Ee(T=>$.value=!$.value,["stop"])),ref_key:"removalTypePopupRef",ref:P},[m("p",PS,ve(l.value.recommended_settings.removebg_type),1),E[43]||(E[43]=m("img",{src:So,class:"d-block c-arrow down-arrow p-0 m-0",alt:"down"},null,-1)),$.value?(U(),Z("div",DS,[(U(!0),Z(Se,null,Ye(de(vp),T=>(U(),Z("p",{class:"popup-text",key:"preset-"+T.name,onClick:Ee(L=>{l.value.recommended_settings.removebg_type=T.value,$.value=!1},["stop"])},ve(T.name),9,BS))),128))])):we("",!0)],512)])])):we("",!0)]),m("div",FS,[m("button",{class:"save-preset-button",onClick:Ee(F,["stop"])}," Save "),u.value?(U(),Z("p",IS,ve(u.value),1)):we("",!0)])])])]))}}),OS=je(RS,[["__scopeId","data-v-6a5c76aa"]]),MS={},LS={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function NS(t,e){return U(),Z("svg",LS,e[0]||(e[0]=[m("path",{d:"M9.16986 15.5794C8.97986 15.5794 8.78986 15.5094 8.63986 15.3594C8.34986 15.0694 8.34986 14.5894 8.63986 14.2994L14.2999 8.63938C14.5899 8.34938 15.0699 8.34938 15.3599 8.63938C15.6499 8.92937 15.6499 9.40937 15.3599 9.69937L9.69986 15.3594C9.55986 15.5094 9.35986 15.5794 9.16986 15.5794Z",fill:"#292D32"},null,-1),m("path",{d:"M14.8299 15.5794C14.6399 15.5794 14.4499 15.5094 14.2999 15.3594L8.63986 9.69937C8.34986 9.40937 8.34986 8.92937 8.63986 8.63938C8.92986 8.34938 9.40986 8.34938 9.69986 8.63938L15.3599 14.2994C15.6499 14.5894 15.6499 15.0694 15.3599 15.3594C15.2099 15.5094 15.0199 15.5794 14.8299 15.5794Z",fill:"#292D32"},null,-1),m("path",{d:"M15 22.75H9C3.57 22.75 1.25 20.43 1.25 15V9C1.25 3.57 3.57 1.25 9 1.25H15C20.43 1.25 22.75 3.57 22.75 9V15C22.75 20.43 20.43 22.75 15 22.75ZM9 2.75C4.39 2.75 2.75 4.39 2.75 9V15C2.75 19.61 4.39 21.25 9 21.25H15C19.61 21.25 21.25 19.61 21.25 15V9C21.25 4.39 19.61 2.75 15 2.75H9Z",fill:"#292D32"},null,-1)]))}const wa=je(MS,[["render",NS]]),US={class:"d-flex justify-content-between align-items-center"},zS={class:"d-flex align-items-sm-end"},jS={class:"mb-0",style:{"font-size":"14px","margin-left":"8px"}},HS=Ae({__name:"user-upload-inspector",props:{mainImageArtifact:Object,modelName:String},emits:["closePopup","toggleDropdown"],setup(t,{emit:e}){const n=e;return(r,i)=>{var s;return U(),Z("div",US,[m("div",zS,[i[1]||(i[1]=m("p",{class:"mb-0 font-bold",style:{"font-size":"16px","font-weight":"700"}}," Uploaded on: ",-1)),m("p",jS,ve((s=t.mainImageArtifact)==null?void 0:s.createdAt.split("T")[0]),1)]),m("button",{class:"text-black btn close-btn",onClick:i[0]||(i[0]=Ee(()=>{n("toggleDropdown"),n("closePopup")},["stop"]))},[le(wa)])])}}}),VS={class:"d-flex justify-content-between align-items-center mb-3"},GS={class:"text-black mb-0 font-bold two-lines-text title"},WS={class:"mb-2 d-flex justify-content-between align-items-center"},qS={class:"py-1 px-2 col-8 text-black info-item font-bold"},KS={class:"mb-3 d-flex justify-content-between align-items-center"},ZS={class:"py-1 px-2 text-center info-item text-black font-bold"},YS=Ae({__name:"upscale-inspector",props:{mainImageArtifact:Object,modelName:String,source:String},emits:["closePopup","toggleDropdown","useGenerationData","renameWorkflow","savePreset"],setup(t,{emit:e}){const r=re(t.mainImageArtifact),i=e;return(s,o)=>{var a,l,c,u;return U(),Z(Se,null,[m("div",VS,[m("p",GS,ve(`upscaled ${(l=(a=r.value)==null?void 0:a.inputs)==null?void 0:l.scale_by}x`),1),m("button",{class:"text-black btn close-btn",onClick:o[0]||(o[0]=Ee(()=>{i("toggleDropdown"),i("closePopup")},["stop"]))},[le(wa)])]),m("div",WS,[o[4]||(o[4]=m("p",{class:"mb-0 text-black font-bold"},"Model",-1)),m("div",qS,ve(t.modelName),1)]),m("div",KS,[o[5]||(o[5]=m("p",{class:"mb-0 text-black font-bold"},"Scale by",-1)),m("div",ZS,ve((u=(c=r.value)==null?void 0:c.inputs)==null?void 0:u.scale_by)+"x ",1)]),Fe(m("button",{class:"inspector-btn",onClick:o[1]||(o[1]=h=>i("renameWorkflow"))}," Rename ",512),[[et,t.source==="user-profile"]]),m("button",{class:"inspector-btn",onClick:o[2]||(o[2]=h=>{i("useGenerationData"),i("closePopup")}),id:"use-generation-button"}," Use generation data "),m("button",{class:"inspector-btn",onClick:o[3]||(o[3]=h=>i("savePreset")),id:"save-preset-button"}," Save as Preset ")],64)}}}),XS=je(YS,[["__scopeId","data-v-9d3a20eb"]]),QS={class:"d-flex justify-content-between align-items-center mb-3"},JS={class:"text-black mb-0 font-bold two-lines-text title"},eA={class:"mb-2 d-flex justify-content-between align-items-center"},tA={class:"py-1 px-2 col-8 text-black info-item font-bold"},nA={class:"mb-3 d-flex justify-content-between align-items-center"},rA={class:"info-item py-1 px-2 text-center text-white capitalize font-bold"},iA=Ae({__name:"removebg-inspector",props:{mainImageArtifact:Object,modelName:String,source:String},emits:["closePopup","toggleDropdown","useGenerationData","renameWorkflow","savePreset"],setup(t,{emit:e}){const r=re(t.mainImageArtifact),i=e;return(s,o)=>{var a,l,c,u;return U(),Z(Se,null,[m("div",QS,[m("p",JS,ve(de(s2)((a=r.value)==null?void 0:a.fileName)),1),m("button",{class:"text-black btn close-btn",onClick:o[0]||(o[0]=Ee(()=>{i("toggleDropdown"),i("closePopup")},["stop"]))},[le(wa)])]),m("div",eA,[o[4]||(o[4]=m("p",{class:"mb-0 text-black font-bold"},"Model",-1)),m("div",tA,ve(t.modelName),1)]),m("div",nA,[o[5]||(o[5]=m("p",{class:"mb-0 text-white font-bold"},"Removal Type",-1)),m("div",rA,ve(((u=(c=(l=r.value)==null?void 0:l.inputs)==null?void 0:c.variant)==null?void 0:u.split("-")[1])||"General"),1)]),Fe(m("button",{class:"inspector-btn",onClick:o[1]||(o[1]=h=>i("renameWorkflow"))}," Rename ",512),[[et,t.source==="user-profile"]]),m("button",{class:"inspector-btn",onClick:o[2]||(o[2]=h=>{i("useGenerationData"),i("closePopup")}),id:"use-generation-button"}," Use generation data "),m("button",{class:"inspector-btn",onClick:o[3]||(o[3]=h=>i("savePreset")),id:"save-preset-button"}," Save as Preset ")],64)}}}),sA=je(iA,[["__scopeId","data-v-ed6ff842"]]),oA={class:"d-flex justify-content-between align-items-center mb-3"},aA={class:"text-black mb-0 font-bold two-lines-text title"},lA={class:"mb-2"},cA={class:"prompt-sec p-2 text-black"},uA={class:"mb-2"},dA={class:"prompt-sec text-black p-2"},fA={class:"mb-2 d-flex justify-content-between align-items-center"},hA={class:"py-1 px-2 col-8 text-black info-item font-bold"},pA={class:"mb-2 d-flex justify-content-between align-items-center"},gA={class:"py-1 px-2 col-8 text-black info-item font-bold"},mA={class:"mb-2 d-flex justify-content-between align-items-center"},vA={class:"py-1 px-2 text-center info-item text-black font-bold"},_A={key:0,class:"mb-2 d-flex justify-content-between align-items-center"},bA={class:"py-1 px-2 col-2 text-center info-item text-black font-bold",style:{"text-align":"center"}},xA={class:"mb-2 d-flex justify-content-between align-items-center"},yA={class:"py-1 px-4 col-2 text-center info-item text-black font-bold"},wA={class:"mb-2 d-flex justify-content-between align-items-center"},CA={class:"py-1 px-2 text-center info-item text-black seed-value font-bold"},kA={class:"mb-2 d-flex justify-content-between align-items-center"},SA={class:"py-1 px-2 text-center info-item text-black font-bold"},AA={class:"mb-2 d-flex justify-content-between align-items-center"},EA={class:"py-1 px-2 text-center info-item text-black"},$A={class:"mb-2 d-flex justify-content-between align-items-center"},TA={class:"py-1 px-2 text-center info-item text-black"},PA={class:"mb-2 d-flex justify-content-between align-items-center"},DA={class:"py-1 px-2 text-center info-item text-black"},BA={class:"mb-2 d-flex justify-content-between align-items-center"},FA={class:"py-1 px-2 text-center info-item text-black"},IA={class:"mb-2 d-flex justify-content-between align-items-center d-none"},RA={class:"py-1 px-2 text-center info-item text-black"},OA={class:"mb-2 d-flex justify-content-between align-items-center d-none"},MA={class:"py-1 px-2 text-center info-item text-black"},LA={class:"mb-2 d-flex justify-content-between align-items-center d-none"},NA={class:"py-1 px-2 text-center info-item text-black"},UA=Ae({__name:"default-inspector",props:{mainImageArtifact:Object,modelName:String,source:String},emits:["closePopup","toggleDropdown","useGenerationData","renameWorkflow","savePreset"],setup(t,{emit:e}){const n=t,r=Ct(),i=re(null),s=re(n.mainImageArtifact),o=re(n.modelName),a=e;return at(()=>n.modelName,async l=>{var c,u,h;if(l.startsWith("civitai")){i.value=await(r==null?void 0:r.appContext.config.globalProperties.$oidc.mgr.getUser());const p=((u=(c=i.value)==null?void 0:c.additionalInfo)==null?void 0:u.civitai)||{},d=(h=n==null?void 0:n.mainImageArtifact)==null?void 0:h.aiModel;let g=l;p.forEach(v=>{var x;v[d]&&(console.log(v[d]),g=((x=v[d])==null?void 0:x.name)||l)}),o.value=g}else o.value=l},{immediate:!0}),(l,c)=>{var u,h,p,d,g,v,x,y,_,f,b,w,k,P,$,D,S,F,A,E,T,L,X,J,ne,se,ce,j,V,oe,N,Q,fe,M,q,ee,ue,me,xe,z,C,O,H,I,R,Y,te,K;return U(),Z(Se,null,[m("div",oA,[m("p",aA,ve(de(s2)((u=s.value)==null?void 0:u.fileName)),1),m("button",{class:"text-black btn close-btn",onClick:c[0]||(c[0]=Ee(()=>{a("toggleDropdown"),a("closePopup")},["stop"]))},[le(wa)])]),m("div",lA,[c[4]||(c[4]=m("p",{class:"mb-1 text-black font-bold"},"Prompt",-1)),m("div",cA,ve(de(H5)(((p=(h=s.value)==null?void 0:h.inputs)==null?void 0:p.prompt)||"")),1)]),m("div",uA,[c[5]||(c[5]=m("p",{class:"mb-1 text-black font-bold"},"Negative Prompt",-1)),m("div",dA,ve(de(V5)((g=(d=s.value)==null?void 0:d.inputs)==null?void 0:g.negative_prompt)),1)]),m("div",fA,[c[6]||(c[6]=m("p",{class:"mb-0 text-black font-bold"},"Model",-1)),m("div",hA,ve(o.value),1)]),m("div",pA,[c[7]||(c[7]=m("p",{class:"mb-0 text-black font-bold"},"Artisan",-1)),m("div",gA,ve(((x=(v=s.value)==null?void 0:v.inputs)==null?void 0:x.artisan)||"DPMSolverMultistep"),1)]),m("div",mA,[c[8]||(c[8]=m("p",{class:"mb-0 text-black font-bold"},"Time-Image Quality",-1)),m("div",vA,ve((_=(y=s.value)==null?void 0:y.inputs)==null?void 0:_.num_inference_steps),1)]),(b=(f=s.value)==null?void 0:f.inputs)!=null&&b.denoising_strength?(U(),Z("div",_A,[c[9]||(c[9]=m("p",{class:"mb-0 text-black font-bold"},"Denoising Strength",-1)),m("div",bA,ve((k=(w=s.value)==null?void 0:w.inputs)==null?void 0:k.denoising_strength),1)])):we("",!0),m("div",xA,[c[10]||(c[10]=m("p",{class:"mb-0 text-black font-bold"},"Human-AI Quality",-1)),m("div",yA,ve(($=(P=s.value)==null?void 0:P.inputs)==null?void 0:$.guidance_scale),1)]),m("div",wA,[c[11]||(c[11]=m("p",{class:"mb-0 text-black font-bold"},"Seed",-1)),m("div",CA,ve((S=(D=s.value)==null?void 0:D.inputs)!=null&&S.seed?(A=(F=s.value)==null?void 0:F.inputs)==null?void 0:A.seed:(T=(E=s.value)==null?void 0:E.inputs)==null?void 0:T.composition),1)]),m("div",kA,[c[12]||(c[12]=m("p",{class:"mb-0 text-black font-bold"},"Image Dimensions",-1)),m("div",SA,ve((X=(L=s.value)==null?void 0:L.inputs)==null?void 0:X.width)+" x "+ve((ne=(J=s.value)==null?void 0:J.inputs)==null?void 0:ne.height),1)]),(ce=(se=s.value)==null?void 0:se.inputs)!=null&&ce.controlnet?(U(),Z(Se,{key:1},[m("div",AA,[c[13]||(c[13]=m("p",{class:"mb-0 text-black font-bold"},"Control Type",-1)),m("div",EA,ve((oe=(V=(j=s.value)==null?void 0:j.inputs)==null?void 0:V.controlnet)==null?void 0:oe.control_type),1)]),m("div",$A,[c[14]||(c[14]=m("p",{class:"mb-0 text-black font-bold"},"Control Weight",-1)),m("div",TA,ve((fe=(Q=(N=s.value)==null?void 0:N.inputs)==null?void 0:Q.controlnet)==null?void 0:fe.control_weight),1)]),m("div",PA,[c[15]||(c[15]=m("p",{class:"mb-0 text-black font-bold"},"Starting Control Step",-1)),m("div",DA,ve((ee=(q=(M=s.value)==null?void 0:M.inputs)==null?void 0:q.controlnet)==null?void 0:ee.starting_control_step),1)]),m("div",BA,[c[16]||(c[16]=m("p",{class:"mb-0 text-black font-bold"},"Ending Control Step",-1)),m("div",FA,ve((xe=(me=(ue=s.value)==null?void 0:ue.inputs)==null?void 0:me.controlnet)==null?void 0:xe.ending_control_step),1)]),m("div",IA,[c[17]||(c[17]=m("p",{class:"mb-0 text-black font-bold"},"Preprocessor Resolution",-1)),m("div",RA,ve((O=(C=(z=s.value)==null?void 0:z.inputs)==null?void 0:C.controlnet)==null?void 0:O.preprocessor_resolution),1)]),m("div",OA,[c[18]||(c[18]=m("p",{class:"mb-0 text-black font-bold"},"Control Mode",-1)),m("div",MA,ve((R=(I=(H=s.value)==null?void 0:H.inputs)==null?void 0:I.controlnet)==null?void 0:R.control_mode),1)]),m("div",LA,[c[19]||(c[19]=m("p",{class:"mb-0 text-black font-bold"},"Resize Mode",-1)),m("div",NA,ve((K=(te=(Y=s.value)==null?void 0:Y.inputs)==null?void 0:te.controlnet)==null?void 0:K.resize_mode),1)])],64)):we("",!0),Fe(m("button",{class:"inspector-btn",onClick:c[1]||(c[1]=G=>a("renameWorkflow"))}," Rename ",512),[[et,t.source==="user-profile"]]),m("button",{class:"inspector-btn",onClick:c[2]||(c[2]=G=>{a("useGenerationData"),a("closePopup")}),id:"use-generation-button"}," Use generation data "),m("button",{class:"inspector-btn",onClick:c[3]||(c[3]=G=>a("savePreset")),id:"save-preset-button"}," Save as Preset ")],64)}}}),zA=je(UA,[["__scopeId","data-v-dfe09ea0"]]),jA={class:"image-info"},HA={class:"buttons-container"},VA={class:"dropdown"},GA={class:"dropdown-content"},WA={class:"terms-modal"},qA={class:"modal-content"},KA={class:"btn-section"},ZA=Ae({__name:"artifact-inspector",props:{mainImageArtifact:Object,source:String,workflow:Object},emits:["closePopup","useGenerationData","renameWorkflow","refetchWorkflows","clearImage","removeWorkflow"],setup(t,{emit:e}){const n=t,r=vt("showErrorModal"),i=Le(()=>{var F;const S=(F=n.mainImageArtifact)==null?void 0:F.aiModel;return S!=null&&S.endsWith("-upload")?HS:S!=null&&S.endsWith("-removebg")?sA:S!=null&&S.endsWith("-upscale")||S!=null&&S.endsWith("aura-sr")?XS:zA}),s=re(null),o=Ct();s.value=o==null?void 0:o.appContext.config.globalProperties.$oidc.mgr.getUser();const a=o==null?void 0:o.appContext.config.globalProperties.$cogniwerk,l=e,c=o2(),u=vt("updateArtifactShare"),h=re(!1),p=re(!1),d=re(null),g=re(!1),v=re(null),x=()=>{g.value=!1},y=()=>{h.value=!h.value},_=()=>{d.value={...n.mainImageArtifact},p.value=!0},f=async S=>{try{g.value=!0,await new Promise(L=>{const X=()=>{g.value=!1,L()};v.value&&v.value.addEventListener("click",X)});let A="";const E=async()=>{var ne;const L=await a.createArtifactShareLink(s.value.access_token,{artifactId:(ne=n==null?void 0:n.mainImageArtifact)==null?void 0:ne.id,expertShare:S}),X=window.location.host,J=`${window.location.protocol}//${X}/share/${L.artifactLink}`;return A=L.artifactLink,J};if(navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<=-1){const L=new ClipboardItem({"text/plain":E()});navigator.clipboard.write([L])}else{const L=await E();navigator.clipboard.writeText(L)}St.success("Image link copied to clipboard"),u(n.workflow.id,{isShared:!0,linkId:A,expertShare:S}),y(),l("closePopup")}catch(F){console.log(F),r("CWES508")}},b=async()=>{g.value=!0,await new Promise(A=>{const E=()=>{g.value=!1,A()};v.value&&v.value.addEventListener("click",E)});const F=window.location.host;await navigator.clipboard.writeText(`${window.location.protocol}://${F}/share/${n.mainImageArtifact.artifactShare.linkId}`),St.success("Image link copied to clipboard"),y(),l("closePopup")},w=async()=>{var S;try{await a.deleteArtifactShareLink(s.value.access_token,(S=n==null?void 0:n.mainImageArtifact)==null?void 0:S.artifactShare.linkId),St.success("Image link Successfully Deleted"),u(n.workflow.id,{...n.mainImageArtifact.artifactShare,isShared:!1}),y(),l("closePopup")}catch(F){console.log(F),r("CWES501")}};async function k(){var A,E,T,L,X;if(!window.confirm("Are you sure you want to delete this creation?"))return;if((A=n==null?void 0:n.mainImageArtifact)!=null&&A.isUploadedImg){l("clearImage");return}const F=(E=n.mainImageArtifact)==null?void 0:E.id;try{const J=await(o==null?void 0:o.appContext.config.globalProperties.$oidc.mgr.getUser());["running","error"].includes((T=n==null?void 0:n.workflow)==null?void 0:T.stage)&&((L=n==null?void 0:n.workflow)==null?void 0:L.artifactsCount)===0?await a.deleteWorkflow(J.access_token,(X=n==null?void 0:n.workflow)==null?void 0:X.dbId):await a.deleteArtifact(J.access_token,F),St.success("deleted creation successfully"),l("refetchWorkflows"),l("removeWorkflow",F),y(),l("closePopup"),l("clearImage")}catch(J){console.log(J),r("CWES505");return}}function P(){var F,A;let S=`Cogniwerk-${(F=n.mainImageArtifact)==null?void 0:F.fileName.slice(0,200)}`;S=S.replace(/([^a-zA-Z0-9_]|\.)+/g,"-").replace(/^-+/,"").replace(/-+$/,"")+".png",fetch((A=n.mainImageArtifact)==null?void 0:A.url).then(E=>E.blob()).then(E=>{const T=document.createElement("a");T.href=URL.createObjectURL(E),T.setAttribute("download",S),document.body.appendChild(T),T.click()})}at(()=>n.mainImageArtifact,(S,F)=>{S!==F&&(h.value=!1)});const $=Le(()=>{var F;let S=(F=n.mainImageArtifact)==null?void 0:F.aiModel;return S.endsWith("-diffusion")&&(S=S.replace("-diffusion","")),S.endsWith("-upscale")&&(S=S.replace("-upscale","")),console.debug("getting model type",S),S!=null&&S.startsWith("civitai")?"civitai":S!=null&&S.startsWith("img2img-")?"image2image":S!=null&&S.startsWith("userlora")?"userlora":Qd.includes(S)?"text2image":oa.includes(S)?"upscale":S!=null&&S.endsWith("-removebg")?"removebg":S!=null&&S.endsWith("-inpaint")?"text2image":"user-upload"}),D=Le(()=>{var F,A,E;let S=(F=n.mainImageArtifact)==null?void 0:F.aiModel;if(S!=null&&S.startsWith("civitai")){const T=S.split("-")[2],L=wi.find(X=>X.includes(T));L?S=L[0]:S=((A=c.modelInfo[S])==null?void 0:A.name)??S}else S.startsWith("userlora-")&&(S=((E=c.modelInfo[S])==null?void 0:E.name)??S);return S==null?void 0:S.replaceAll("-"," ")});return(S,F)=>{var A,E,T,L,X,J,ne,se,ce,j,V,oe,N,Q,fe,M,q,ee,ue,me,xe,z,C,O,H,I,R,Y,te,K,G,ie,he,ge,be,$e,Be,De,Qe;return U(),Z(Se,null,[m("div",jA,[(U(),Xe(Vs(i.value),{mainImageArtifact:t.mainImageArtifact,modelName:D.value,source:t.source,onClosePopup:F[0]||(F[0]=Ge=>S.$emit("closePopup")),onToggleDropdown:y,onUseGenerationData:F[1]||(F[1]=Ge=>S.$emit("useGenerationData")),onRenameWorkflow:F[2]||(F[2]=Ge=>S.$emit("renameWorkflow")),onSavePreset:_},null,40,["mainImageArtifact","modelName","source"])),p.value&&d.value?(U(),Xe(OS,{key:0,onClose:F[3]||(F[3]=Ge=>{p.value=!1,y(),l("closePopup")}),artifact:d.value},null,8,["artifact"])):we("",!0),m("div",HA,[m("button",{onClick:F[4]||(F[4]=Ge=>P())},F[8]||(F[8]=[m("img",{src:wk,alt:"download",title:"Download Image"},null,-1)])),Fe(m("div",VA,[m("button",{onClick:y},F[9]||(F[9]=[m("img",{src:Ck,alt:"Share",title:"Share Image"},null,-1)])),Fe(m("div",GA,[Fe(m("button",{onClick:F[5]||(F[5]=Ge=>f(!1))},F[10]||(F[10]=[m("div",{class:"button-content"},[m("img",{src:Hs,alt:"icon"}),m("span",null,"Create Simple Link")],-1)]),512),[[et,((E=(A=t.mainImageArtifact)==null?void 0:A.artifactShare)==null?void 0:E.linkId)&&((L=(T=t.mainImageArtifact)==null?void 0:T.artifactShare)==null?void 0:L.isShared)&&((J=(X=t.mainImageArtifact)==null?void 0:X.artifactShare)==null?void 0:J.expertShare)||!((ne=t.mainImageArtifact)!=null&&ne.artifactShare)&&!((ce=(se=t.mainImageArtifact)==null?void 0:se.artifactShare)!=null&&ce.isShared)||((j=t.mainImageArtifact)==null?void 0:j.artifactShare.linkId)&&!((oe=(V=t.mainImageArtifact)==null?void 0:V.artifactShare)!=null&&oe.isShared)]]),Fe(m("button",{onClick:w},F[11]||(F[11]=[m("div",{class:"button-content"},[m("img",{src:Jl,alt:"icon"}),m("span",null,"Delete Simple Link")],-1)]),512),[[et,((N=t.mainImageArtifact)==null?void 0:N.artifactShare)&&((fe=(Q=t.mainImageArtifact)==null?void 0:Q.artifactShare)==null?void 0:fe.isShared)&&!((q=(M=t.mainImageArtifact)==null?void 0:M.artifactShare)!=null&&q.expertShare)]]),Fe(m("button",{onClick:w},F[12]||(F[12]=[m("div",{class:"button-content"},[m("img",{src:Jl,alt:"icon"}),m("span",null,"Delete Expert Link")],-1)]),512),[[et,((ee=t.mainImageArtifact)==null?void 0:ee.artifactShare)&&((me=(ue=t.mainImageArtifact)==null?void 0:ue.artifactShare)==null?void 0:me.isShared)&&((z=(xe=t.mainImageArtifact)==null?void 0:xe.artifactShare)==null?void 0:z.expertShare)]]),Fe(m("button",{onClick:b},F[13]||(F[13]=[m("div",{class:"button-content"},[m("img",{src:Hs,alt:"icon"}),m("span",null,"Copy URL")],-1)]),512),[[et,((C=t.mainImageArtifact)==null?void 0:C.artifactShare)&&((H=(O=t.mainImageArtifact)==null?void 0:O.artifactShare)==null?void 0:H.isShared)]]),Fe(m("button",{onClick:F[6]||(F[6]=Ge=>f(!0))},F[14]||(F[14]=[m("div",{class:"button-content"},[m("img",{src:Hs,alt:"icon"}),m("span",null,"Create Expert Link")],-1)]),512),[[et,((R=(I=t.mainImageArtifact)==null?void 0:I.artifactShare)==null?void 0:R.linkId)&&((te=(Y=t.mainImageArtifact)==null?void 0:Y.artifactShare)==null?void 0:te.isShared)&&!((G=(K=t.mainImageArtifact)==null?void 0:K.artifactShare)!=null&&G.expertShare)||!((ie=t.mainImageArtifact)!=null&&ie.artifactShare)&&!((ge=(he=t.mainImageArtifact)==null?void 0:he.artifactShare)!=null&&ge.isShared)||(($e=(be=t.mainImageArtifact)==null?void 0:be.artifactShare)==null?void 0:$e.linkId)&&!((De=(Be=t.mainImageArtifact)==null?void 0:Be.artifactShare)!=null&&De.isShared)]])],512),[[et,h.value]])],512),[[et,((Qe=n==null?void 0:n.workflow)==null?void 0:Qe.stage)==="completed"&&$.value!=="user-upload"]]),m("button",{onClick:F[7]||(F[7]=Ge=>k())},F[15]||(F[15]=[m("img",{src:kk,alt:"delete",title:"Delete Image"},null,-1)]))])]),Fe(m("div",WA,[m("div",qA,[F[16]||(F[16]=m("h2",{class:"terms-modal-header"},"Important!",-1)),F[17]||(F[17]=m("p",{class:"terms-modal-text"},[He(" Please make sure that you have read the "),m("a",{target:"_blank",href:"https://cogniwerk.ai/privacy"},"Terms of Use"),He(". Only share created content if you have made sure that the content complies with the relevant laws and standards. ")],-1)),m("div",KA,[m("button",{onClick:x,ref_key:"agreeRef",ref:v},"Understood",512)])])],512),[[et,g.value]])],64)}}}),t1=je(ZA,[["__scopeId","data-v-a804e5d3"]]),YA={class:"user-profile-models flex-fill"},XA={key:0},QA=["id"],JA={style:{display:"grid","grid-template-columns":"repeat(auto-fill, minmax(190px, 1fr))","grid-gap":"2rem","grid-auto-columns":"210px"}},eE=["set"],tE=["onClick"],nE={key:0,class:ze(["progress-background","col-xl-3","col-lg-4","col-sm-6","col-12","border-10"]),style:{height:"210px"}},rE={key:0,class:"progress"},iE=["onClick"],sE={class:"line1"},oE={class:"line2"},aE=["onClick"],lE={key:1,style:{height:"100%",width:"100%","background-color":"#e4e8e9","border-radius":"10px"}},cE=["onClick"],uE={class:"info-button position-absolute",style:{top:"5px",right:"5px"}},dE=["onClick"],fE=["set","onClick"],hE=["onClick"],pE={key:0,class:ze(["progress-background","col-xl-3","col-lg-4","col-sm-6","col-12","border-10"])},gE={key:0,class:"progress"},mE={key:1,class:"progress-else"},vE={class:"line1"},_E={class:"line2"},bE=["onClick"],xE={key:1,style:{width:"100%",height:"100%","background-color":"#e4e8e9","border-radius":"10px"}},yE=["onClick"],wE={class:"info-button position-absolute",style:{top:"5px",right:"5px"}},CE=["onClick"],kE={class:"w-100"},il="https://cw-imageserver.b-cdn.net",SE=Ae({__name:"user-profile-models",props:["CWAccount","currentTab","isMultiSelectMode","selectedArtifacts","closeFocusMode","isSortingMode"],emits:["showWorkflow","renameWorkflow","deleteArtifact","downloadArtifact","toggleSelectedArtifact","removeWorkflow"],setup(t,{emit:e}){const n=t,r=e,i=$n(),s=n.CWAccount,o=Pt({currentImg:null,gallaryView:!0,settingsMenu:!1,edittingSettings:!1,sharingSettings:!1,mousePosition:{x:0,y:0},showInsepctorEditOptions:!1,imgField:null});function a(x){r("deleteArtifact",x)}function l(x,y,_){s.sortField!=="none"?r("showWorkflow",x,y,_):r("showWorkflow",x,h.value[x])}function c(x,y,_){const f=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),b=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0);o.mousePosition.x=x.clientX/f,o.mousePosition.y=x.clientY/b,o.imgField=_,o.currentImg=y}function u(x,y){r("renameWorkflow",x,y),o.currentImg=null,o.imgField=null}const h=Le(()=>{let x;if(s.sortField=="date"||s.sortField=="name"||s.sortField=="model")switch(x=s!=null&&s.filteredWfs?JSON.parse(JSON.stringify(s.filteredWfs)):{},n.currentTab){case"uploads":for(const[y,_]of Object.entries(x)){let f=_;f=f.filter(b=>{if(b.lastArtifact.aiModel=="user-upload")return b}),x[y]=f,x[y].length<1&&delete x[y]}return x;case"creations":for(const y in x)y&&(x[y]=x[y].filter(_=>_.lastArtifact.aiModel!=="user-upload"),x[y].length<1&&delete x[y]);return x;default:return x}else switch(x=s!=null&&s.workflows?JSON.parse(JSON.stringify(s.workflows)):[],n.currentTab){case"uploads":return x==null?void 0:x.filter(y=>y.lastArtifact.aiModel==="user-upload");case"creations":return x==null?void 0:x.filter(y=>y.lastArtifact.aiModel!=="user-upload");default:return x}});function p(x,y){s.sortField!="none"?(localStorage.setItem("gallery-selected-artifact",JSON.stringify(h.value[y][x].lastArtifact)),i.push("/run-model/stable-diffusion?from=gallery")):(localStorage.setItem("gallery-selected-artifact",JSON.stringify(h.value[x].lastArtifact)),i.push("/run-model/stable-diffusion?from=gallery"))}function d(x){var y;(x.stage=="completed"||x.stage=="error")&&(x.lastArtifact.id?r("toggleSelectedArtifact",(y=x.lastArtifact)==null?void 0:y.id):r("toggleSelectedArtifact",-x.dbId))}const g=Le(()=>{let x="";return x+=o.mousePosition.x>.5?"POS-L":"POS-R",x+=" ",x+=o.mousePosition.y>.5?"POS-U":"POS-D",x});at(o,x=>{x.currentImg===null&&(o.showInsepctorEditOptions=!1)}),at(()=>n.isSortingMode,x=>{x&&(o.currentImg=null)});const v=re(null);return en(v,()=>{o.currentImg=null,o.imgField=null},"click"),(x,y)=>{const _=pa("lazyload");return U(),Z("div",YA,[o.currentImg!==null?(U(),Z("div",{key:0,class:"backdrop position-absolute",onClick:y[0]||(y[0]=f=>o.currentImg=null)})):we("",!0),de(s).sortField!=="none"?(U(),Z("div",{key:1,class:ze(["gallary-view1",o.gallaryView?"show-first-sec":"d-none"])},[de(s).sortField=="date"||de(s).sortField=="name"||de(s).sortField=="model"?(U(),Z("div",XA,[(U(!0),Z(Se,null,Ye(h.value,(f,b)=>(U(),Z("div",{key:b,style:{"grid-column-start":"1"}},[m("p",{id:b,class:"field-style"},ve(b),9,QA),m("div",JA,[(U(!0),Z(Se,null,Ye(f,(w,k)=>{var P;return U(),Z("div",{key:k,set:x.lastArtifact=w.lastArtifact,style:{position:"relative"}},[Fe(m("button",{class:ze(["multi-select-btn",{"multi-select-btn-active":t.isMultiSelectMode&&((P=t.selectedArtifacts)==null?void 0:P.some($=>{var D,S;return w.stage!=="error"&&$===((D=w.lastArtifact)==null?void 0:D.id)||w.stage==="error"&&w.lastArtifact.id&&$===((S=w.lastArtifact)==null?void 0:S.id)||w.stage==="error"&&$===-w.dbId})),"multi-select-white":w.stage=="error"}]),onClick:Ee($=>d(w),["stop"])},null,10,tE),[[et,t.isMultiSelectMode]]),w.stage!=="completed"?(U(),Z("div",nE,[w.stage=="running"||w.stage=="created"?(U(),Z("div",rE,[le(Ql,{size:"30px",color:"white"}),y[11]||(y[11]=m("p",{style:{"font-size":"16px","line-height":"1.1em","margin-top":"0.5em"}}," Creating your output... ",-1))])):we("",!0),w.stage=="error"?(U(),Z("div",{key:1,class:"progress-else",onClick:Ee($=>t.isMultiSelectMode?d(w):()=>{},["stop"])},[m("p",sE,"Error: "+ve(w.errorHint),1),m("p",oE,[m("button",{class:"try-btn",onClick:y[1]||(y[1]=$=>x.$router.push("/run-model/sdxl"))},[le(kp),y[12]||(y[12]=m("span",null,"try again",-1))])]),Fe(m("button",{class:"delete-button",onClick:$=>a(w)},y[13]||(y[13]=[m("img",{src:Cp,alt:"delete"},null,-1)]),8,aE),[[et,!t.isMultiSelectMode]])],8,iE)):we("",!0)])):(U(),Z("div",lE,[Fe((U(),Z("img",{class:"middle-img border-10",onClick:Ee($=>t.isMultiSelectMode?d(w):l(k,w,b),["stop"]),classses:"img col-3 ",key:il+"/250,sc,png,q85/"+w.lastStepUrl+t.currentTab,style:{height:"210px"},alt:"generated image"},null,8,cE)),[[_,il+"/250,sc,png,q85/"+w.lastStepUrl]])])),m("div",uE,[Fe(m("div",{onClick:Ee($=>c($,k,b),["stop"])},y[14]||(y[14]=[m("img",{src:Xl,class:"info-svg",alt:"settings"},null,-1)]),8,dE),[[et,!t.isMultiSelectMode]]),k===o.currentImg&&b==o.imgField?(U(),Z("div",{key:0,class:ze([g.value,"inspector-container context-menu"]),onClick:y[5]||(y[5]=$=>$.stopPropagation()),ref_for:!0,ref_key:"popoverRef",ref:v},[le(t1,{source:"user-profile",onRenameWorkflow:$=>u(k,w),mainImageArtifact:x.lastArtifact,workflow:w,onClosePopup:y[2]||(y[2]=$=>o.currentImg=null),onUseGenerationData:y[3]||(y[3]=$=>p(o.currentImg,o.imgField)),onRemoveWorkflow:y[4]||(y[4]=$=>{r("removeWorkflow",$)})},null,8,["onRenameWorkflow","mainImageArtifact","workflow"])],2)):we("",!0)])],8,eE)}),128))])]))),128))])):we("",!0)],2)):(U(),Z("div",{key:2,class:ze(["gallary-view",o.gallaryView?"show-first-sec":"d-none"])},[(U(!0),Z(Se,null,Ye(h.value,(f,b)=>{var w;return U(),Z("div",{class:"gallery-thumbnail position-relative",key:b,set:x.lastArtifact=f.lastArtifact,onClick:k=>t.isMultiSelectMode?d(f):()=>{}},[Fe(m("button",{class:ze(["multi-select-btn",{"multi-select-btn-active":t.isMultiSelectMode&&((w=t.selectedArtifacts)==null?void 0:w.some(k=>{var P,$;return f.stage!=="error"&&k===((P=f.lastArtifact)==null?void 0:P.id)||f.stage==="error"&&f.lastArtifact.id&&k===(($=f.lastArtifact)==null?void 0:$.id)||f.stage==="error"&&k===-f.dbId})),"multi-select-white":f.stage=="error"}]),onClick:Ee(k=>d(f),["stop"])},null,10,hE),[[et,t.isMultiSelectMode]]),f.stage!=="completed"?(U(),Z("div",pE,[f.stage=="running"||f.stage=="created"?(U(),Z("div",gE,[le(Ql,{size:"32px",color:"white"}),y[15]||(y[15]=m("p",{style:{"font-size":"16px","line-height":"1.1em","margin-top":"0.5em"}}," Creating your output... ",-1))])):we("",!0),f.stage=="error"?(U(),Z("div",mE,[m("p",vE," Error: "+ve(f.errorHint),1),m("p",_E,[m("button",{class:"try-btn",onClick:y[6]||(y[6]=k=>x.$router.push("/run-model/sdxl"))},[le(kp),y[16]||(y[16]=m("span",null,"try again",-1))])]),Fe(m("button",{class:"delete-button",onClick:k=>a(f)},y[17]||(y[17]=[m("img",{src:Cp,alt:"delete"},null,-1)]),8,bE),[[et,!t.isMultiSelectMode]])])):we("",!0)])):(U(),Z("div",xE,[Fe((U(),Z("img",{class:"middle-img border-10",onClick:Ee(k=>t.isMultiSelectMode?d(f):l(b,f),["stop"]),key:il+"/250,sc,png,q85/"+f.lastStepUrl+t.currentTab,alt:"generated image"},null,8,yE)),[[_,il+"/250,sc,png,q85/"+f.lastStepUrl]])])),m("div",wE,[Fe(m("div",{class:ze(["pointer",`artifact-info-${f.id}`]),onClick:Ee(k=>c(k,b),["stop"])},y[18]||(y[18]=[m("img",{src:Xl,class:"info-svg",alt:"settings"},null,-1)]),10,CE),[[et,!t.isMultiSelectMode]]),b===o.currentImg?(U(),Z("div",{key:0,class:ze([g.value,"inspector-container context-menu"]),onClick:y[10]||(y[10]=k=>k.stopPropagation()),ref_for:!0,ref_key:"popoverRef",ref:v},[le(t1,{source:"user-profile",onRenameWorkflow:k=>u(b,f),mainImageArtifact:x.lastArtifact,onClosePopup:y[7]||(y[7]=k=>o.currentImg=null),onUseGenerationData:y[8]||(y[8]=k=>p(o.currentImg)),onRemoveWorkflow:y[9]||(y[9]=k=>{r("removeWorkflow",k)}),workflow:f},null,8,["onRenameWorkflow","mainImageArtifact","workflow"])],2)):we("",!0)])],8,fE)}),128))],2)),m("div",{class:ze(["list-view",o.gallaryView?"d-none":"show-second-sec"])},[m("table",kE,[y[20]||(y[20]=m("thead",null,[m("tr",null,[m("th",{class:"text-left text-muted fw-light",style:{width:"40px"}}),m("th",{class:"text-left text-muted fw-light",style:{width:"50px"}}," Kind "),m("th",{class:"text-left text-muted fw-light",style:{width:"400px"}}," Name "),m("th",{class:"text-left text-muted fw-light"},"Last Modified"),m("th",{class:"text-left text-muted fw-light"},"Size")])],-1)),m("tbody",null,[(U(),Z(Se,null,Ye(10,f=>m("tr",{key:f},y[19]||(y[19]=[m("td",{class:"border-bottom py-2"},[m("div",null,[m("div",{class:"border border-dark p-1",style:{width:"18px",height:"18px","border-radius":"5px !important"}})])],-1),m("td",{class:"border-bottom py-2"},[m("img",{style:{height:"25px"},src:_k,alt:"File"})],-1),m("td",{class:"border-bottom py-2"},"File Name",-1),m("td",{class:"border-bottom py-2"},"3 Jan 2023 at 15:33",-1),m("td",{class:"border-bottom py-2"},"2.5 GB",-1)]))),64))])])],2)])}}}),AE=je(SE,[["__scopeId","data-v-896b35c4"]]),Ap="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m3.061%206.716%204.89%204.89a1.49%201.49%200%200%200%202.1%200l4.89-4.89'%20stroke='%23525E68'%20stroke-width='1.8'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ts="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2011%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%203.83L3.83%206.66L9.5%201'%20stroke='%23FE8149'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",EE="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.492%201.664H6.508c-3.033%200-4.841%201.808-4.841%204.842v6.975c0%203.041%201.808%204.85%204.841%204.85h6.975c3.034%200%204.842-1.809%204.842-4.842V6.506c.008-3.034-1.8-4.842-4.833-4.842zM9.125%2014.59c-.242.242-.7.475-1.033.525l-2.05.292c-.075.008-.15.016-.225.016-.342%200-.659-.116-.884-.341-.275-.275-.391-.675-.325-1.117l.292-2.05c.05-.342.275-.792.525-1.033l3.717-3.717a6.286%206.286%200%200%200%20.5%201.075c.083.142.175.275.25.375.091.142.2.275.266.35.042.058.075.1.092.117.208.25.45.483.658.658.059.058.092.092.109.1.125.1.25.2.358.275.133.1.267.192.408.267.167.1.35.191.534.283.191.083.366.158.541.217l-3.733%203.708zm5.35-5.35-.767.775a.259.259%200%200%201-.183.075c-.025%200-.058%200-.075-.008a5.168%205.168%200%200%201-3.525-3.525.248.248%200%200%201%20.067-.25l.775-.775c1.266-1.267%202.475-1.242%203.716%200%20.634.633.942%201.241.942%201.875-.008.6-.317%201.2-.95%201.833z'%20fill='%23383D41'/%3e%3c/svg%3e",$E="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.558%204.356a92.768%2092.768%200%200%200-4.033-.309V4.04l-.183-1.083c-.125-.767-.309-1.917-2.259-1.917H8.9c-1.942%200-2.125%201.1-2.258%201.908l-.175%201.067c-.775.05-1.55.1-2.325.175l-1.7.167a.626.626%200%200%200-.567.683.62.62%200%200%200%20.683.558l1.7-.166c4.367-.434%208.767-.267%2013.184.175h.066a.631.631%200%200%200%20.625-.567.639.639%200%200%200-.575-.683zM16.025%206.786a1.054%201.054%200%200%200-.758-.325H4.733a1.04%201.04%200%200%200-1.041%201.108l.516%208.55c.092%201.267.209%202.85%203.117%202.85h5.35c2.908%200%203.025-1.575%203.117-2.85l.516-8.541a1.08%201.08%200%200%200-.283-.792zm-4.642%208.008H8.608a.63.63%200%200%201-.625-.625.63.63%200%200%201%20.625-.625h2.775a.63.63%200%200%201%20.625.625.63.63%200%200%201-.625.625zm.7-3.333H7.917a.63.63%200%200%201-.625-.625.63.63%200%200%201%20.625-.625h4.166a.63.63%200%200%201%20.625.625.63.63%200%200%201-.625.625z'%20fill='%23383D41'/%3e%3c/svg%3e",TE="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.492%201.664H6.508c-3.033%200-4.841%201.808-4.841%204.842v6.975c0%203.041%201.808%204.85%204.841%204.85h6.975c3.034%200%204.842-1.809%204.842-4.842V6.506c.008-3.034-1.8-4.842-4.833-4.842zM7.058%209.147a.629.629%200%200%201%20.884%200l1.433%201.434V5.422A.63.63%200%200%201%2010%204.797a.63.63%200%200%201%20.625.625v5.159l1.433-1.434a.629.629%200%200%201%20.884%200%20.629.629%200%200%201%200%20.884l-2.5%202.5a.646.646%200%200%201-.442.183.628.628%200%200%201-.442-.183l-2.5-2.5a.629.629%200%200%201%200-.884zm8.142%205.2a16.454%2016.454%200%200%201-5.2.842c-1.767%200-3.525-.283-5.2-.842a.628.628%200%200%201-.392-.791.618.618%200%200%201%20.792-.392%2015.278%2015.278%200%200%200%209.608%200%20.627.627%200%200%201%20.792.392.636.636%200%200%201-.4.791z'%20fill='%23383D41'/%3e%3c/svg%3e",PE="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%201.664c-4.592%200-8.333%203.742-8.333%208.333%200%204.592%203.741%208.334%208.333%208.334%204.592%200%208.333-3.742%208.333-8.334%200-4.591-3.741-8.333-8.333-8.333zm2.8%2010.25a.629.629%200%200%201%200%20.883.618.618%200%200%201-.442.184.618.618%200%200%201-.441-.184L10%2010.881l-1.917%201.916a.618.618%200%200%201-.441.184.618.618%200%200%201-.442-.184.629.629%200%200%201%200-.883l1.917-1.917L7.2%208.081a.629.629%200%200%201%200-.884.629.629%200%200%201%20.883%200L10%209.114l1.917-1.917a.629.629%200%200%201%20.883%200%20.629.629%200%200%201%200%20.884l-1.917%201.916%201.917%201.917z'%20fill='%23383D41'/%3e%3c/svg%3e",DE={data(){return{alphabet:Array.from({length:26},(t,e)=>String.fromCharCode(65+e)),scrollOffset:100,selectedLetter:null}},methods:{navigateTo(t){const e=document.getElementById(t);if(e){const n=e.offsetTop-this.scrollOffset;window.scrollTo({top:n,behavior:"smooth"}),this.selectedLetter=t}},handleScroll(){const t=window.scrollY+this.scrollOffset;if(t<150){this.selectedLetter=null;return}for(let e=0;e<this.alphabet.length;e++){const n=this.alphabet[e],r=document.getElementById(n);if(r){const i=r.offsetTop-100,s=i+r.clientHeight;if(t>=i&&t<=s){this.selectedLetter=n;break}}}}},mounted(){window.addEventListener("scroll",this.handleScroll)},beforeUnmount(){window.removeEventListener("scroll",this.handleScroll)}},BE={class:"alphabet-navigation"},FE=["onClick"];function IE(t,e,n,r,i,s){return U(),Z("div",BE,[m("ul",null,[(U(!0),Z(Se,null,Ye(i.alphabet,o=>(U(),Z("li",{key:o,onClick:a=>s.navigateTo(o),class:ze({selected:i.selectedLetter===o})},ve(o),11,FE))),128)),(U(),Z("li",{key:"#",onClick:e[0]||(e[0]=o=>s.navigateTo("#")),class:ze({selected:i.selectedLetter==="#"})}," # ",2))])])}const RE=je(DE,[["render",IE],["__scopeId","data-v-f146f57a"]]),OE={class:"user-profile-topbar flex-fill mb-1"},ME={class:"top-menu mt-2"},LE={class:"d-flex justify-content-between align-items-center"},NE={class:"dropdown"},UE={class:"dropdown-content"},zE={key:0,src:ts,style:{width:"11px"}},jE={key:0,src:ts,style:{width:"11px"}},HE={key:0,src:ts,style:{width:"11px"}},VE={key:0,src:ts,style:{width:"11px"}},GE={class:"dropdown mx-5"},WE={class:"dropdown-content"},qE={key:0,src:ts,style:{width:"11px"}},KE={key:0,src:ts,style:{width:"11px"}},ZE={key:0,src:ts,style:{width:"11px"}},YE={key:0,class:"d-flex align-items-center",style:{position:"relative"}},XE={class:"position-relative",style:{height:"20px"}},QE={class:"horizontal-menu"},JE={class:"menu-item"},e$={class:"btn-title mx-1"},t$=Ae({__name:"user-profile-topbar",props:["CWAccount","isMultiSelectMode","selectedArtifacts"],emits:["updateTab","updateSort","updateMultiSelectMode","toggleSelectAll","deleteMultipleArtifacts","downloadMultipleArtifacts"],setup(t,{emit:e}){const n=t,r=e,i=n.CWAccount,s=Pt({gallaryView:!0,settingsMenu:!1,edittingSettings:!1,sharingSettings:!1,mousePosition:{x:0,y:0},showMultiSelectMenu:!1}),o=$n(),a=re({creations:!0,uploads:!1}),l=re({creations:"All",uploads:"none"}),c=Le(()=>{var d;return(d=i==null?void 0:i.workflows)==null?void 0:d.every(g=>{var v,x;return g.stage!=="error"&&g.stage!=="running"?n.selectedArtifacts.includes((v=g.lastArtifact)==null?void 0:v.id):g.stage==="error"&&g.lastArtifact.id?n.selectedArtifacts.includes((x=g.lastArtifact)==null?void 0:x.id):g.stage==="error"&&g.lastArtifact.id==null?n.selectedArtifacts.includes(-g.dbId):!0})});function u(d){a.value[d]=!a.value[d],d==="creations"?a.value.uploads=!1:d==="uploads"&&(a.value.creations=!1)}function h(d){return a.value[d]}function p(d,g){d==="creations"?(a.value.creations=!1,a.value.uploads=!1,l.value.creations=g,l.value.uploads=""):d==="uploads"&&(a.value.uploads=!1,a.value.creations=!1,l.value.creations="",l.value.uploads=g),r("updateTab",d),r("updateSort",g)}return p("creations","none"),(d,g)=>(U(),Z("div",OE,[m("div",ME,[m("div",LE,[m("p",{class:"pointer create-btn",onClick:g[0]||(g[0]=Ee(v=>de(o).push("/run-model/sdxl"),["stop"]))}," Create "),m("div",NE,[m("p",{class:"pointer tab-btn",onClick:g[1]||(g[1]=Ee(v=>u("creations"),["stop"]))},g[16]||(g[16]=[He(" Creation "),m("img",{src:Ap,class:"dropdown-arrow",alt:"Dropdown Arrow"},null,-1)])),Fe(m("div",UE,[m("a",{class:ze({"dropdown-option":!0}),onClick:g[2]||(g[2]=v=>p("creations","none"))},[g[17]||(g[17]=m("span",{class:"dropdown-text"},"All",-1)),l.value.creations==="none"&&a.value.creations==!0?(U(),Z("img",zE)):we("",!0)]),m("a",{class:ze({"dropdown-option":!0}),onClick:g[3]||(g[3]=v=>p("creations","name"))},[g[18]||(g[18]=m("span",{class:"dropdown-text"},"Name",-1)),l.value.creations==="name"&&a.value.creations==!0?(U(),Z("img",jE)):we("",!0)]),m("a",{class:ze({"dropdown-option":!0}),onClick:g[4]||(g[4]=v=>p("creations","date"))},[g[19]||(g[19]=m("span",{class:"dropdown-text"},"Date",-1)),l.value.creations==="date"&&a.value.creations==!0?(U(),Z("img",HE)):we("",!0)]),m("a",{class:ze({"dropdown-option":!0}),onClick:g[5]||(g[5]=v=>p("creations","model"))},[g[20]||(g[20]=m("span",{class:"dropdown-text"},"Model",-1)),l.value.creations==="model"&&a.value.creations==!0?(U(),Z("img",VE)):we("",!0)])],512),[[et,h("creations")]])]),m("div",GE,[m("p",{class:"pointer tab-btn",onClick:g[6]||(g[6]=Ee(v=>u("uploads"),["stop"]))},g[21]||(g[21]=[He(" Uploads "),m("img",{src:Ap,class:"dropdown-arrow",alt:"Dropdown Arrow"},null,-1)])),Fe(m("div",WE,[m("a",{class:ze({"dropdown-option":!0}),onClick:g[7]||(g[7]=v=>p("uploads","none"))},[g[22]||(g[22]=m("span",{class:"dropdown-text"},"All",-1)),l.value.uploads==="none"&&a.value.uploads==!0?(U(),Z("img",qE)):we("",!0)]),m("a",{class:ze({"dropdown-option":!0}),onClick:g[8]||(g[8]=v=>p("uploads","name"))},[g[23]||(g[23]=m("span",{class:"dropdown-text"},"Name",-1)),l.value.uploads==="name"&&a.value.uploads==!0?(U(),Z("img",KE)):we("",!0)]),m("a",{class:ze({"dropdown-option":!0}),onClick:g[9]||(g[9]=v=>p("uploads","date"))},[g[24]||(g[24]=m("span",{class:"dropdown-text"},"Date",-1)),l.value.uploads==="date"&&a.value.uploads==!0?(U(),Z("img",ZE)):we("",!0)])],512),[[et,h("uploads")]])]),m("p",{class:ze(["pointer tab-btn mx-3 ms-2",de(i).currentTab==="favourite-models"?" tab-active":""]),onClick:g[10]||(g[10]=Ee(v=>r("updateTab","favourite-models"),["stop"]))}," | Favourite Models ",2)]),de(i).currentTab!=="favourite-models"?(U(),Z("div",YE,[Fe(m("div",XE,[m("div",QE,[m("div",JE,[He(ve(n.selectedArtifacts.length>0?n.selectedArtifacts.length:"0")+" ",1),g[25]||(g[25]=m("div",{class:"btn-title mx-1"},"Selected",-1))]),g[30]||(g[30]=m("span",{style:{"font-size":"20px"}},"|",-1)),m("div",{class:"menu-item",onClick:g[11]||(g[11]=v=>r("toggleSelectAll"))},[g[26]||(g[26]=m("img",{src:EE,class:"",alt:"Select All"},null,-1)),m("div",e$,ve(c.value?"Unselect All":"Select All"),1)]),g[31]||(g[31]=m("span",{style:{"font-size":"20px"}},"|",-1)),m("div",{class:"menu-item",onClick:g[12]||(g[12]=v=>r("deleteMultipleArtifacts"))},g[27]||(g[27]=[m("img",{src:$E,class:"",alt:"Delete"},null,-1),m("div",{class:"btn-title mx-1"},"Delete",-1)])),g[32]||(g[32]=m("span",{style:{"font-size":"20px"}},"|",-1)),m("div",{class:"menu-item",onClick:g[13]||(g[13]=v=>r("downloadMultipleArtifacts"))},g[28]||(g[28]=[m("img",{src:TE,class:"",alt:"Download"},null,-1),m("div",{class:"btn-title mx-1"},"Download",-1)])),g[33]||(g[33]=m("span",{style:{"font-size":"20px"}},"|",-1)),m("div",{class:"menu-item",onClick:g[14]||(g[14]=v=>r("updateMultiSelectMode",!t.isMultiSelectMode))},g[29]||(g[29]=[m("img",{src:PE,class:"",alt:"Cancel"},null,-1),m("div",{class:"btn-title mx-1"},"Cancel",-1)]))])],512),[[et,t.isMultiSelectMode]]),Fe(m("button",{onClick:g[15]||(g[15]=v=>{r("updateMultiSelectMode",!t.isMultiSelectMode),s.showMultiSelectMenu=!1}),class:"bulk-btn"}," Bulk Edit ",512),[[et,!t.isMultiSelectMode]])])):we("",!0)]),Fe(le(RE,null,null,512),[[et,de(i).sortField=="name"]])]))}}),n$=je(t$,[["__scopeId","data-v-6108d3b2"]]),r$="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7352_131419)'%3e%3cpath%20d='M7.46471%200C3.34055%200%20-0.00195312%203.3425%20-0.00195312%207.46667C-0.00195312%2011.5908%203.34055%2014.9333%207.46471%2014.9333C11.5889%2014.9333%2014.9314%2011.5908%2014.9314%207.46667C14.9314%203.3425%2011.5889%200%207.46471%200ZM5.37638%2010.5904H3.92096V5.9325H5.37638V10.5904ZM4.6093%205.34917H4.59763C4.06971%205.34917%203.72846%204.99333%203.72846%204.54125C3.72846%204.08042%204.08138%203.73333%204.61805%203.73333C5.15471%203.73333%205.4843%204.08042%205.49596%204.54125C5.49888%204.99042%205.15763%205.34917%204.6093%205.34917ZM11.198%2010.5904H9.54721V8.18125C9.54721%207.55125%209.29055%207.11958%208.7218%207.11958C8.28721%207.11958%208.04513%207.41125%207.9343%207.69125C7.89346%207.79042%207.8993%207.93042%207.8993%208.07333V10.5904H6.26305C6.26305%2010.5904%206.28346%206.32042%206.26305%205.9325H7.8993V6.66458C7.99555%206.34375%208.51763%205.88875%209.3518%205.88875C10.3872%205.88875%2011.198%206.55958%2011.198%208.00042V10.5904Z'%20fill='%23666666'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7352_131419'%3e%3crect%20width='14.9333'%20height='14.9333'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",i$="data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7352_131413)'%3e%3cpath%20d='M8.39748%208.77927C9.12082%208.77927%209.7129%208.1901%209.7129%207.46385C9.7129%207.17802%209.61957%206.9126%209.46498%206.69677C9.22582%206.36719%208.8379%206.14844%208.4004%206.14844C7.9629%206.14844%207.57498%206.36427%207.33582%206.69677C7.18123%206.9126%207.0879%207.17802%207.0879%207.46385C7.08498%208.1901%207.67415%208.77927%208.39748%208.77927Z'%20fill='%23666666'/%3e%3cpath%20d='M11.2678%205.85958V4.75708V4.59375H11.1045L10.002%204.59667L10.0078%205.8625L11.2678%205.85958Z'%20fill='%23666666'/%3e%3cpath%20d='M10.4384%207.47021C10.4384%208.59604%209.52258%209.51187%208.39674%209.51187C7.27091%209.51187%206.35508%208.59604%206.35508%207.47021C6.35508%207.19896%206.41049%206.93938%206.50674%206.70312H5.39258V9.75979C5.39258%2010.1535%205.71341%2010.4744%206.10716%2010.4744H10.6863C11.0801%2010.4744%2011.4009%2010.1535%2011.4009%209.75979V6.70312H10.2867C10.3859%206.93938%2010.4384%207.19896%2010.4384%207.47021Z'%20fill='%23666666'/%3e%3cpath%20d='M8.39831%200C4.27414%200%200.931641%203.3425%200.931641%207.46667C0.931641%2011.5908%204.27414%2014.9333%208.39831%2014.9333C12.5225%2014.9333%2015.865%2011.5908%2015.865%207.46667C15.865%203.3425%2012.5225%200%208.39831%200ZM12.1316%206.69958V9.75625C12.1316%2010.5525%2011.4841%2011.2%2010.6879%2011.2H6.10872C5.31247%2011.2%204.66497%2010.5525%204.66497%209.75625V6.69958V5.17417C4.66497%204.37792%205.31247%203.73042%206.10872%203.73042H10.6879C11.4841%203.73042%2012.1316%204.37792%2012.1316%205.17417V6.69958Z'%20fill='%23666666'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7352_131413'%3e%3crect%20width='14.9333'%20height='14.9333'%20fill='white'%20transform='translate(0.929688)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",s$="data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7352_131411)'%3e%3cpath%20d='M8.35578%207.38365e-06C10.0916%20-0.000488794%2011.7739%200.600941%2013.116%201.70181C14.4581%202.80268%2015.3769%204.33486%2015.7159%206.03727C16.0549%207.73968%2015.7931%209.50696%2014.9751%2011.038C14.1571%2012.569%2012.8335%2013.769%2011.2299%2014.4334C9.62626%2015.0979%207.84185%2015.1858%206.18072%2014.682C4.51959%2014.1783%203.08453%2013.1141%202.12008%2011.6709C1.15563%2010.2277%200.721477%208.49464%200.891599%206.76717C1.06172%205.03969%201.82559%203.42466%203.05304%202.19727C3.74845%201.49955%204.57495%200.946229%205.485%200.569135C6.39506%200.192041%207.37069%20-0.00137742%208.35578%207.38365e-06ZM4.78888%209.69117L7.21564%207.25831L4.78888%205.27955V9.69117ZM7.48298%207.47559L4.98053%209.98414H11.7091L9.31891%207.47559L8.53034%208.1482C8.49935%208.17359%208.46053%208.18746%208.42048%208.18746C8.38042%208.18746%208.3416%208.17359%208.31061%208.1482L7.48298%207.47315V7.47559ZM9.58014%207.25343L11.9227%209.7107V5.25758L9.58014%207.25343ZM5.00617%205.01588L8.41193%207.7942L11.6773%205.01588H5.00617Z'%20fill='%23666666'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7352_131411'%3e%3crect%20width='15'%20height='15'%20fill='white'%20transform='translate(0.859375)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",o$={},a$={class:"footer"};function l$(t,e){return U(),Z("footer",a$,e[0]||(e[0]=[ma('<div class="footer-container" data-v-229a7124><div class="footer-links" data-v-229a7124><a href="/about" data-v-229a7124>About</a><a href="/imprint" data-v-229a7124>Imprint</a><a href="/feedback" data-v-229a7124>Contact</a></div><div class="social-media" data-v-229a7124><a href="https://www.linkedin.com/company/cogniwerk/" target="_blank" aria-label="Linkedin" data-v-229a7124><img src="'+r$+'" target="_blank" alt="linkedin" data-v-229a7124></a><a href="https://www.instagram.com/cogniwerk/" target="_blank" aria-label="Instagram" data-v-229a7124><img src="'+i$+'" alt="instagram" data-v-229a7124></a><a href="mailto:contact@cogniwerk.ai" target="_blank" aria-label="mail" data-v-229a7124><img src="'+s$+'" alt="mail" data-v-229a7124></a></div></div>',1)]))}const c$=je(o$,[["render",l$],["__scopeId","data-v-229a7124"]]);var W5={exports:{}};/*!

JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>

(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/(function(t,e){(function(n){t.exports=n()})(function(){return function n(r,i,s){function o(c,u){if(!i[c]){if(!r[c]){var h=typeof Fo=="function"&&Fo;if(!u&&h)return h(c,!0);if(a)return a(c,!0);var p=new Error("Cannot find module '"+c+"'");throw p.code="MODULE_NOT_FOUND",p}var d=i[c]={exports:{}};r[c][0].call(d.exports,function(g){var v=r[c][1][g];return o(v||g)},d,d.exports,n,r,i,s)}return i[c].exports}for(var a=typeof Fo=="function"&&Fo,l=0;l<s.length;l++)o(s[l]);return o}({1:[function(n,r,i){var s=n("./utils"),o=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var c,u,h,p,d,g,v,x=[],y=0,_=l.length,f=_,b=s.getTypeOf(l)!=="string";y<l.length;)f=_-y,h=b?(c=l[y++],u=y<_?l[y++]:0,y<_?l[y++]:0):(c=l.charCodeAt(y++),u=y<_?l.charCodeAt(y++):0,y<_?l.charCodeAt(y++):0),p=c>>2,d=(3&c)<<4|u>>4,g=1<f?(15&u)<<2|h>>6:64,v=2<f?63&h:64,x.push(a.charAt(p)+a.charAt(d)+a.charAt(g)+a.charAt(v));return x.join("")},i.decode=function(l){var c,u,h,p,d,g,v=0,x=0,y="data:";if(l.substr(0,y.length)===y)throw new Error("Invalid base64 input, it looks like a data url.");var _,f=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&f--,l.charAt(l.length-2)===a.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(_=o.uint8array?new Uint8Array(0|f):new Array(0|f);v<l.length;)c=a.indexOf(l.charAt(v++))<<2|(p=a.indexOf(l.charAt(v++)))>>4,u=(15&p)<<4|(d=a.indexOf(l.charAt(v++)))>>2,h=(3&d)<<6|(g=a.indexOf(l.charAt(v++))),_[x++]=c,d!==64&&(_[x++]=u),g!==64&&(_[x++]=h);return _}},{"./support":30,"./utils":32}],2:[function(n,r,i){var s=n("./external"),o=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),l=n("./stream/DataLengthProbe");function c(u,h,p,d,g){this.compressedSize=u,this.uncompressedSize=h,this.crc32=p,this.compression=d,this.compressedContent=g}c.prototype={getContentWorker:function(){var u=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),h=this;return u.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,h,p){return u.pipe(new a).pipe(new l("uncompressedSize")).pipe(h.compressWorker(p)).pipe(new l("compressedSize")).withStreamInfo("compression",h)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,i){var s=n("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,i){var s=n("./utils"),o=function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var u=0;u<8;u++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l}();r.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?function(c,u,h,p){var d=o,g=p+h;c^=-1;for(var v=p;v<g;v++)c=c>>>8^d[255&(c^u[v])];return-1^c}(0|l,a,a.length,0):function(c,u,h,p){var d=o,g=p+h;c^=-1;for(var v=p;v<g;v++)c=c>>>8^d[255&(c^u.charCodeAt(v))];return-1^c}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(n,r,i){var s=null;s=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:s}},{lie:37}],7:[function(n,r,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=n("pako"),a=n("./utils"),l=n("./stream/GenericWorker"),c=s?"uint8array":"array";function u(h,p){l.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=p,this.meta={}}i.magic="\b\0",a.inherits(u,l),u.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,h.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(p){h.push({data:p,meta:h.meta})}},i.compressWorker=function(h){return new u("Deflate",h)},i.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,i){function s(d,g){var v,x="";for(v=0;v<g;v++)x+=String.fromCharCode(255&d),d>>>=8;return x}function o(d,g,v,x,y,_){var f,b,w=d.file,k=d.compression,P=_!==c.utf8encode,$=a.transformTo("string",_(w.name)),D=a.transformTo("string",c.utf8encode(w.name)),S=w.comment,F=a.transformTo("string",_(S)),A=a.transformTo("string",c.utf8encode(S)),E=D.length!==w.name.length,T=A.length!==S.length,L="",X="",J="",ne=w.dir,se=w.date,ce={crc32:0,compressedSize:0,uncompressedSize:0};g&&!v||(ce.crc32=d.crc32,ce.compressedSize=d.compressedSize,ce.uncompressedSize=d.uncompressedSize);var j=0;g&&(j|=8),P||!E&&!T||(j|=2048);var V=0,oe=0;ne&&(V|=16),y==="UNIX"?(oe=798,V|=function(Q,fe){var M=Q;return Q||(M=fe?16893:33204),(65535&M)<<16}(w.unixPermissions,ne)):(oe=20,V|=function(Q){return 63&(Q||0)}(w.dosPermissions)),f=se.getUTCHours(),f<<=6,f|=se.getUTCMinutes(),f<<=5,f|=se.getUTCSeconds()/2,b=se.getUTCFullYear()-1980,b<<=4,b|=se.getUTCMonth()+1,b<<=5,b|=se.getUTCDate(),E&&(X=s(1,1)+s(u($),4)+D,L+="up"+s(X.length,2)+X),T&&(J=s(1,1)+s(u(F),4)+A,L+="uc"+s(J.length,2)+J);var N="";return N+=`
\0`,N+=s(j,2),N+=k.magic,N+=s(f,2),N+=s(b,2),N+=s(ce.crc32,4),N+=s(ce.compressedSize,4),N+=s(ce.uncompressedSize,4),N+=s($.length,2),N+=s(L.length,2),{fileRecord:h.LOCAL_FILE_HEADER+N+$+L,dirRecord:h.CENTRAL_FILE_HEADER+s(oe,2)+N+s(F.length,2)+"\0\0\0\0"+s(V,4)+s(x,4)+$+L+F}}var a=n("../utils"),l=n("../stream/GenericWorker"),c=n("../utf8"),u=n("../crc32"),h=n("../signature");function p(d,g,v,x){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=v,this.encodeFileName=x,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(p,l),p.prototype.push=function(d){var g=d.meta.percent||0,v=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,l.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:v?(g+100*(v-x-1))/v:100}}))},p.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var g=this.streamFiles&&!d.file.dir;if(g){var v=o(d,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:v.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(d){this.accumulate=!1;var g=this.streamFiles&&!d.file.dir,v=o(d,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(v.dirRecord),g)this.push({data:function(x){return h.DATA_DESCRIPTOR+s(x.crc32,4)+s(x.compressedSize,4)+s(x.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:v.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var d=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var v=this.bytesWritten-d,x=function(y,_,f,b,w){var k=a.transformTo("string",w(b));return h.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(y,2)+s(y,2)+s(_,4)+s(f,4)+s(k.length,2)+k}(this.dirRecords.length,v,d,this.zipComment,this.encodeFileName);this.push({data:x,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(d){this._sources.push(d);var g=this;return d.on("data",function(v){g.processChunk(v)}),d.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),d.on("error",function(v){g.error(v)}),this},p.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(d){var g=this._sources;if(!l.prototype.error.call(this,d))return!1;for(var v=0;v<g.length;v++)try{g[v].error(d)}catch{}return!0},p.prototype.lock=function(){l.prototype.lock.call(this);for(var d=this._sources,g=0;g<d.length;g++)d[g].lock()},r.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,i){var s=n("../compressions"),o=n("./ZipFileWorker");i.generateWorker=function(a,l,c){var u=new o(l.streamFiles,c,l.platform,l.encodeFileName),h=0;try{a.forEach(function(p,d){h++;var g=function(_,f){var b=_||f,w=s[b];if(!w)throw new Error(b+" is not a valid compression method !");return w}(d.options.compression,l.compression),v=d.options.compressionOptions||l.compressionOptions||{},x=d.dir,y=d.date;d._compressWorker(g,v).withStreamInfo("file",{name:p,dir:x,date:y,comment:d.comment||"",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(u)}),u.entriesCount=h}catch(p){u.error(p)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,i){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new s;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(o,a){return new s().loadAsync(o,a)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,i){var s=n("./utils"),o=n("./external"),a=n("./utf8"),l=n("./zipEntries"),c=n("./stream/Crc32Probe"),u=n("./nodejsUtils");function h(p){return new o.Promise(function(d,g){var v=p.decompressed.getContentWorker().pipe(new c);v.on("error",function(x){g(x)}).on("end",function(){v.streamInfo.crc32!==p.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):d()}).resume()})}r.exports=function(p,d){var g=this;return d=s.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),u.isNode&&u.isStream(p)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",p,!0,d.optimizedBinaryString,d.base64).then(function(v){var x=new l(d);return x.load(v),x}).then(function(v){var x=[o.Promise.resolve(v)],y=v.files;if(d.checkCRC32)for(var _=0;_<y.length;_++)x.push(h(y[_]));return o.Promise.all(x)}).then(function(v){for(var x=v.shift(),y=x.files,_=0;_<y.length;_++){var f=y[_],b=f.fileNameStr,w=s.resolve(f.fileNameStr);g.file(w,f.decompressed,{binary:!0,optimizedBinaryString:!0,date:f.date,dir:f.dir,comment:f.fileCommentStr.length?f.fileCommentStr:null,unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions,createFolders:d.createFolders}),f.dir||(g.file(w).unsafeOriginalName=b)}return x.zipComment.length&&(g.comment=x.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,i){var s=n("../utils"),o=n("../stream/GenericWorker");function a(l,c){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}s.inherits(a,o),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(u){c.push({data:u,meta:{percent:0}})}).on("error",function(u){c.isPaused?this.generatedError=u:c.error(u)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,i){var s=n("readable-stream").Readable;function o(a,l,c){s.call(this,l),this._helper=a;var u=this;a.on("data",function(h,p){u.push(h)||u._helper.pause(),c&&c(p)}).on("error",function(h){u.emit("error",h)}).on("end",function(){u.push(null)})}n("../utils").inherits(o,s),o.prototype._read=function(){this._helper.resume()},r.exports=o},{"../utils":32,"readable-stream":16}],14:[function(n,r,i){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,o);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,o)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var o=new Buffer(s);return o.fill(0),o},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(n,r,i){function s(w,k,P){var $,D=a.getTypeOf(k),S=a.extend(P||{},u);S.date=S.date||new Date,S.compression!==null&&(S.compression=S.compression.toUpperCase()),typeof S.unixPermissions=="string"&&(S.unixPermissions=parseInt(S.unixPermissions,8)),S.unixPermissions&&16384&S.unixPermissions&&(S.dir=!0),S.dosPermissions&&16&S.dosPermissions&&(S.dir=!0),S.dir&&(w=y(w)),S.createFolders&&($=x(w))&&_.call(this,$,!0);var F=D==="string"&&S.binary===!1&&S.base64===!1;P&&P.binary!==void 0||(S.binary=!F),(k instanceof h&&k.uncompressedSize===0||S.dir||!k||k.length===0)&&(S.base64=!1,S.binary=!0,k="",S.compression="STORE",D="string");var A=null;A=k instanceof h||k instanceof l?k:g.isNode&&g.isStream(k)?new v(w,k):a.prepareContent(w,k,S.binary,S.optimizedBinaryString,S.base64);var E=new p(w,A,S);this.files[w]=E}var o=n("./utf8"),a=n("./utils"),l=n("./stream/GenericWorker"),c=n("./stream/StreamHelper"),u=n("./defaults"),h=n("./compressedObject"),p=n("./zipObject"),d=n("./generate"),g=n("./nodejsUtils"),v=n("./nodejs/NodejsStreamInputAdapter"),x=function(w){w.slice(-1)==="/"&&(w=w.substring(0,w.length-1));var k=w.lastIndexOf("/");return 0<k?w.substring(0,k):""},y=function(w){return w.slice(-1)!=="/"&&(w+="/"),w},_=function(w,k){return k=k!==void 0?k:u.createFolders,w=y(w),this.files[w]||s.call(this,w,null,{dir:!0,createFolders:k}),this.files[w]};function f(w){return Object.prototype.toString.call(w)==="[object RegExp]"}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(w){var k,P,$;for(k in this.files)$=this.files[k],(P=k.slice(this.root.length,k.length))&&k.slice(0,this.root.length)===this.root&&w(P,$)},filter:function(w){var k=[];return this.forEach(function(P,$){w(P,$)&&k.push($)}),k},file:function(w,k,P){if(arguments.length!==1)return w=this.root+w,s.call(this,w,k,P),this;if(f(w)){var $=w;return this.filter(function(S,F){return!F.dir&&$.test(S)})}var D=this.files[this.root+w];return D&&!D.dir?D:null},folder:function(w){if(!w)return this;if(f(w))return this.filter(function(D,S){return S.dir&&w.test(D)});var k=this.root+w,P=_.call(this,k),$=this.clone();return $.root=P.name,$},remove:function(w){w=this.root+w;var k=this.files[w];if(k||(w.slice(-1)!=="/"&&(w+="/"),k=this.files[w]),k&&!k.dir)delete this.files[w];else for(var P=this.filter(function(D,S){return S.name.slice(0,w.length)===w}),$=0;$<P.length;$++)delete this.files[P[$].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(w){var k,P={};try{if((P=a.extend(w||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=P.type.toLowerCase(),P.compression=P.compression.toUpperCase(),P.type==="binarystring"&&(P.type="string"),!P.type)throw new Error("No output type specified.");a.checkSupport(P.type),P.platform!=="darwin"&&P.platform!=="freebsd"&&P.platform!=="linux"&&P.platform!=="sunos"||(P.platform="UNIX"),P.platform==="win32"&&(P.platform="DOS");var $=P.comment||this.comment||"";k=d.generateWorker(this,P,$)}catch(D){(k=new l("error")).error(D)}return new c(k,P.type||"string",P.mimeType)},generateAsync:function(w,k){return this.generateInternalStream(w).accumulate(k)},generateNodeStream:function(w,k){return(w=w||{}).type||(w.type="nodebuffer"),this.generateInternalStream(w).toNodejsStream(k)}};r.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,i){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,i){var s=n("./DataReader");function o(a){s.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}n("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data[this.zero+a]},o.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),u=a.charCodeAt(2),h=a.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===l&&this.data[p+1]===c&&this.data[p+2]===u&&this.data[p+3]===h)return p-this.zero;return-1},o.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),u=a.charCodeAt(2),h=a.charCodeAt(3),p=this.readData(4);return l===p[0]&&c===p[1]&&u===p[2]&&h===p[3]},o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./DataReader":18}],18:[function(n,r,i){var s=n("../utils");function o(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=o},{"../utils":32}],19:[function(n,r,i){var s=n("./Uint8ArrayReader");function o(a){s.call(this,a)}n("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,i){var s=n("./DataReader");function o(a){s.call(this,a)}n("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(n,r,i){var s=n("./ArrayReader");function o(a){s.call(this,a)}n("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,i){var s=n("../utils"),o=n("../support"),a=n("./ArrayReader"),l=n("./StringReader"),c=n("./NodeBufferReader"),u=n("./Uint8ArrayReader");r.exports=function(h){var p=s.getTypeOf(h);return s.checkSupport(p),p!=="string"||o.uint8array?p==="nodebuffer"?new c(h):o.uint8array?new u(s.transformTo("uint8array",h)):new a(s.transformTo("array",h)):new l(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,i){var s=n("./GenericWorker"),o=n("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,i){var s=n("./GenericWorker"),o=n("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,i){var s=n("../utils"),o=n("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}o.prototype.processChunk.call(this,l)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,i){var s=n("../utils"),o=n("./GenericWorker");function a(l){o.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=s.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,i){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,a)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var a=this;return o.on("data",function(l){a.processChunk(l)}),o.on("end",function(){a.end()}),o.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,a){return this.extraStreamInfo[o]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},r.exports=s},{}],29:[function(n,r,i){var s=n("../utils"),o=n("./ConvertWorker"),a=n("./GenericWorker"),l=n("../base64"),c=n("../support"),u=n("../external"),h=null;if(c.nodestream)try{h=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(g,v){return new u.Promise(function(x,y){var _=[],f=g._internalType,b=g._outputType,w=g._mimeType;g.on("data",function(k,P){_.push(k),v&&v(P)}).on("error",function(k){_=[],y(k)}).on("end",function(){try{var k=function(P,$,D){switch(P){case"blob":return s.newBlob(s.transformTo("arraybuffer",$),D);case"base64":return l.encode($);default:return s.transformTo(P,$)}}(b,function(P,$){var D,S=0,F=null,A=0;for(D=0;D<$.length;D++)A+=$[D].length;switch(P){case"string":return $.join("");case"array":return Array.prototype.concat.apply([],$);case"uint8array":for(F=new Uint8Array(A),D=0;D<$.length;D++)F.set($[D],S),S+=$[D].length;return F;case"nodebuffer":return Buffer.concat($);default:throw new Error("concat : unsupported type '"+P+"'")}}(f,_),w);x(k)}catch(P){y(P)}_=[]}).resume()})}function d(g,v,x){var y=v;switch(v){case"blob":case"arraybuffer":y="uint8array";break;case"base64":y="string"}try{this._internalType=y,this._outputType=v,this._mimeType=x,s.checkSupport(y),this._worker=g.pipe(new o(y)),g.lock()}catch(_){this._worker=new a("error"),this._worker.error(_)}}d.prototype={accumulate:function(g){return p(this,g)},on:function(g,v){var x=this;return g==="data"?this._worker.on(g,function(y){v.call(x,y.data,y.meta)}):this._worker.on(g,function(){s.delay(v,arguments,x)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new h(this,{objectMode:this._outputType!=="nodebuffer"},g)}},r.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!n("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,i){for(var s=n("./utils"),o=n("./support"),a=n("./nodejsUtils"),l=n("./stream/GenericWorker"),c=new Array(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;c[254]=c[254]=1;function h(){l.call(this,"utf-8 decode"),this.leftOver=null}function p(){l.call(this,"utf-8 encode")}i.utf8encode=function(d){return o.nodebuffer?a.newBufferFrom(d,"utf-8"):function(g){var v,x,y,_,f,b=g.length,w=0;for(_=0;_<b;_++)(64512&(x=g.charCodeAt(_)))==55296&&_+1<b&&(64512&(y=g.charCodeAt(_+1)))==56320&&(x=65536+(x-55296<<10)+(y-56320),_++),w+=x<128?1:x<2048?2:x<65536?3:4;for(v=o.uint8array?new Uint8Array(w):new Array(w),_=f=0;f<w;_++)(64512&(x=g.charCodeAt(_)))==55296&&_+1<b&&(64512&(y=g.charCodeAt(_+1)))==56320&&(x=65536+(x-55296<<10)+(y-56320),_++),x<128?v[f++]=x:(x<2048?v[f++]=192|x>>>6:(x<65536?v[f++]=224|x>>>12:(v[f++]=240|x>>>18,v[f++]=128|x>>>12&63),v[f++]=128|x>>>6&63),v[f++]=128|63&x);return v}(d)},i.utf8decode=function(d){return o.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):function(g){var v,x,y,_,f=g.length,b=new Array(2*f);for(v=x=0;v<f;)if((y=g[v++])<128)b[x++]=y;else if(4<(_=c[y]))b[x++]=65533,v+=_-1;else{for(y&=_===2?31:_===3?15:7;1<_&&v<f;)y=y<<6|63&g[v++],_--;1<_?b[x++]=65533:y<65536?b[x++]=y:(y-=65536,b[x++]=55296|y>>10&1023,b[x++]=56320|1023&y)}return b.length!==x&&(b.subarray?b=b.subarray(0,x):b.length=x),s.applyFromCharCode(b)}(d=s.transformTo(o.uint8array?"uint8array":"array",d))},s.inherits(h,l),h.prototype.processChunk=function(d){var g=s.transformTo(o.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var v=g;(g=new Uint8Array(v.length+this.leftOver.length)).set(this.leftOver,0),g.set(v,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var x=function(_,f){var b;for((f=f||_.length)>_.length&&(f=_.length),b=f-1;0<=b&&(192&_[b])==128;)b--;return b<0||b===0?f:b+c[_[b]]>f?b:f}(g),y=g;x!==g.length&&(o.uint8array?(y=g.subarray(0,x),this.leftOver=g.subarray(x,g.length)):(y=g.slice(0,x),this.leftOver=g.slice(x,g.length))),this.push({data:i.utf8decode(y),meta:d.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=h,s.inherits(p,l),p.prototype.processChunk=function(d){this.push({data:i.utf8encode(d.data),meta:d.meta})},i.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,i){var s=n("./support"),o=n("./base64"),a=n("./nodejsUtils"),l=n("./external");function c(v){return v}function u(v,x){for(var y=0;y<v.length;++y)x[y]=255&v.charCodeAt(y);return x}n("setimmediate"),i.newBlob=function(v,x){i.checkSupport("blob");try{return new Blob([v],{type:x})}catch{try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return y.append(v),y.getBlob(x)}catch{throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(v,x,y){var _=[],f=0,b=v.length;if(b<=y)return String.fromCharCode.apply(null,v);for(;f<b;)x==="array"||x==="nodebuffer"?_.push(String.fromCharCode.apply(null,v.slice(f,Math.min(f+y,b)))):_.push(String.fromCharCode.apply(null,v.subarray(f,Math.min(f+y,b)))),f+=y;return _.join("")},stringifyByChar:function(v){for(var x="",y=0;y<v.length;y++)x+=String.fromCharCode(v[y]);return x},applyCanBeUsed:{uint8array:function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function p(v){var x=65536,y=i.getTypeOf(v),_=!0;if(y==="uint8array"?_=h.applyCanBeUsed.uint8array:y==="nodebuffer"&&(_=h.applyCanBeUsed.nodebuffer),_)for(;1<x;)try{return h.stringifyByChunk(v,y,x)}catch{x=Math.floor(x/2)}return h.stringifyByChar(v)}function d(v,x){for(var y=0;y<v.length;y++)x[y]=v[y];return x}i.applyFromCharCode=p;var g={};g.string={string:c,array:function(v){return u(v,new Array(v.length))},arraybuffer:function(v){return g.string.uint8array(v).buffer},uint8array:function(v){return u(v,new Uint8Array(v.length))},nodebuffer:function(v){return u(v,a.allocBuffer(v.length))}},g.array={string:p,array:c,arraybuffer:function(v){return new Uint8Array(v).buffer},uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return a.newBufferFrom(v)}},g.arraybuffer={string:function(v){return p(new Uint8Array(v))},array:function(v){return d(new Uint8Array(v),new Array(v.byteLength))},arraybuffer:c,uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return a.newBufferFrom(new Uint8Array(v))}},g.uint8array={string:p,array:function(v){return d(v,new Array(v.length))},arraybuffer:function(v){return v.buffer},uint8array:c,nodebuffer:function(v){return a.newBufferFrom(v)}},g.nodebuffer={string:p,array:function(v){return d(v,new Array(v.length))},arraybuffer:function(v){return g.nodebuffer.uint8array(v).buffer},uint8array:function(v){return d(v,new Uint8Array(v.length))},nodebuffer:c},i.transformTo=function(v,x){if(x=x||"",!v)return x;i.checkSupport(v);var y=i.getTypeOf(x);return g[y][v](x)},i.resolve=function(v){for(var x=v.split("/"),y=[],_=0;_<x.length;_++){var f=x[_];f==="."||f===""&&_!==0&&_!==x.length-1||(f===".."?y.pop():y.push(f))}return y.join("/")},i.getTypeOf=function(v){return typeof v=="string"?"string":Object.prototype.toString.call(v)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(v)?"nodebuffer":s.uint8array&&v instanceof Uint8Array?"uint8array":s.arraybuffer&&v instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(v){if(!s[v.toLowerCase()])throw new Error(v+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(v){var x,y,_="";for(y=0;y<(v||"").length;y++)_+="\\x"+((x=v.charCodeAt(y))<16?"0":"")+x.toString(16).toUpperCase();return _},i.delay=function(v,x,y){setImmediate(function(){v.apply(y||null,x||[])})},i.inherits=function(v,x){function y(){}y.prototype=x.prototype,v.prototype=new y},i.extend=function(){var v,x,y={};for(v=0;v<arguments.length;v++)for(x in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],x)&&y[x]===void 0&&(y[x]=arguments[v][x]);return y},i.prepareContent=function(v,x,y,_,f){return l.Promise.resolve(x).then(function(b){return s.blob&&(b instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(b))!==-1)&&typeof FileReader<"u"?new l.Promise(function(w,k){var P=new FileReader;P.onload=function($){w($.target.result)},P.onerror=function($){k($.target.error)},P.readAsArrayBuffer(b)}):b}).then(function(b){var w=i.getTypeOf(b);return w?(w==="arraybuffer"?b=i.transformTo("uint8array",b):w==="string"&&(f?b=o.decode(b):y&&_!==!0&&(b=function(k){return u(k,s.uint8array?new Uint8Array(k.length):new Array(k.length))}(b))),b):l.Promise.reject(new Error("Can't read the data of '"+v+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,i){var s=n("./reader/readerFor"),o=n("./utils"),a=n("./signature"),l=n("./zipEntry"),c=n("./support");function u(h){this.files=[],this.loadOptions=h}u.prototype={checkSignature:function(h){if(!this.reader.readAndCheckSignature(h)){this.reader.index-=4;var p=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(p)+", expected "+o.pretty(h)+")")}},isSignature:function(h,p){var d=this.reader.index;this.reader.setIndex(h);var g=this.reader.readString(4)===p;return this.reader.setIndex(d),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var h=this.reader.readData(this.zipCommentLength),p=c.uint8array?"uint8array":"array",d=o.transformTo(p,h);this.zipComment=this.loadOptions.decodeFileName(d)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var h,p,d,g=this.zip64EndOfCentralSize-44;0<g;)h=this.reader.readInt(2),p=this.reader.readInt(4),d=this.reader.readData(p),this.zip64ExtensibleData[h]={id:h,length:p,value:d}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var h,p;for(h=0;h<this.files.length;h++)p=this.files[h],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var h;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(h=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(h);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var h=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(h<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(h);var p=h;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(h=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(h),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var g=p-d;if(0<g)this.isSignature(p,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(h){this.reader=s(h)},load:function(h){this.prepareReader(h),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,i){var s=n("./reader/readerFor"),o=n("./utils"),a=n("./compressedObject"),l=n("./crc32"),c=n("./utf8"),u=n("./compressions"),h=n("./support");function p(d,g){this.options=d,this.loadOptions=g}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(d){var g,v;if(d.skip(22),this.fileNameLength=d.readInt(2),v=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.skip(v),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=function(x){for(var y in u)if(Object.prototype.hasOwnProperty.call(u,y)&&u[y].magic===x)return u[y];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,d.readData(this.compressedSize))},readCentralPart:function(d){this.versionMadeBy=d.readInt(2),d.skip(2),this.bitFlag=d.readInt(2),this.compressionMethod=d.readString(2),this.date=d.readDate(),this.crc32=d.readInt(4),this.compressedSize=d.readInt(4),this.uncompressedSize=d.readInt(4);var g=d.readInt(2);if(this.extraFieldsLength=d.readInt(2),this.fileCommentLength=d.readInt(2),this.diskNumberStart=d.readInt(2),this.internalFileAttributes=d.readInt(2),this.externalFileAttributes=d.readInt(4),this.localHeaderOffset=d.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");d.skip(g),this.readExtraFields(d),this.parseZIP64ExtraField(d),this.fileComment=d.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var d=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var g,v,x,y=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4<y;)g=d.readInt(2),v=d.readInt(2),x=d.readData(v),this.extraFields[g]={id:g,length:v,value:x};d.setIndex(y)},handleUTF8:function(){var d=h.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var v=o.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(v)}var x=this.findExtraFieldUnicodeComment();if(x!==null)this.fileCommentStr=x;else{var y=o.transformTo(d,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(y)}}},findExtraFieldUnicodePath:function(){var d=this.extraFields[28789];if(d){var g=s(d.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:c.utf8decode(g.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var g=s(d.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:c.utf8decode(g.readData(d.length-5))}return null}},r.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,i){function s(g,v,x){this.name=g,this.dir=x.dir,this.date=x.date,this.comment=x.comment,this.unixPermissions=x.unixPermissions,this.dosPermissions=x.dosPermissions,this._data=v,this._dataBinary=x.binary,this.options={compression:x.compression,compressionOptions:x.compressionOptions}}var o=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),l=n("./utf8"),c=n("./compressedObject"),u=n("./stream/GenericWorker");s.prototype={internalStream:function(g){var v=null,x="string";try{if(!g)throw new Error("No output type specified.");var y=(x=g.toLowerCase())==="string"||x==="text";x!=="binarystring"&&x!=="text"||(x="string"),v=this._decompressWorker();var _=!this._dataBinary;_&&!y&&(v=v.pipe(new l.Utf8EncodeWorker)),!_&&y&&(v=v.pipe(new l.Utf8DecodeWorker))}catch(f){(v=new u("error")).error(f)}return new o(v,x,"")},async:function(g,v){return this.internalStream(g).accumulate(v)},nodeStream:function(g,v){return this.internalStream(g||"nodebuffer").toNodejsStream(v)},_compressWorker:function(g,v){if(this._data instanceof c&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var x=this._decompressWorker();return this._dataBinary||(x=x.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(x,g,v)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof u?this._data:new a(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<h.length;d++)s.prototype[h[d]]=p;r.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,i){(function(s){var o,a,l=s.MutationObserver||s.WebKitMutationObserver;if(l){var c=0,u=new l(g),h=s.document.createTextNode("");u.observe(h,{characterData:!0}),o=function(){h.data=c=++c%2}}else if(s.setImmediate||s.MessageChannel===void 0)o="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var v=s.document.createElement("script");v.onreadystatechange=function(){g(),v.onreadystatechange=null,v.parentNode.removeChild(v),v=null},s.document.documentElement.appendChild(v)}:function(){setTimeout(g,0)};else{var p=new s.MessageChannel;p.port1.onmessage=g,o=function(){p.port2.postMessage(0)}}var d=[];function g(){var v,x;a=!0;for(var y=d.length;y;){for(x=d,d=[],v=-1;++v<y;)x[v]();y=d.length}a=!1}r.exports=function(v){d.push(v)!==1||a||o()}}).call(this,typeof Ke<"u"?Ke:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,i){var s=n("immediate");function o(){}var a={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];function h(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,y!==o&&v(this,y)}function p(y,_,f){this.promise=y,typeof _=="function"&&(this.onFulfilled=_,this.callFulfilled=this.otherCallFulfilled),typeof f=="function"&&(this.onRejected=f,this.callRejected=this.otherCallRejected)}function d(y,_,f){s(function(){var b;try{b=_(f)}catch(w){return a.reject(y,w)}b===y?a.reject(y,new TypeError("Cannot resolve promise with itself")):a.resolve(y,b)})}function g(y){var _=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof _=="function")return function(){_.apply(y,arguments)}}function v(y,_){var f=!1;function b(P){f||(f=!0,a.reject(y,P))}function w(P){f||(f=!0,a.resolve(y,P))}var k=x(function(){_(w,b)});k.status==="error"&&b(k.value)}function x(y,_){var f={};try{f.value=y(_),f.status="success"}catch(b){f.status="error",f.value=b}return f}(r.exports=h).prototype.finally=function(y){if(typeof y!="function")return this;var _=this.constructor;return this.then(function(f){return _.resolve(y()).then(function(){return f})},function(f){return _.resolve(y()).then(function(){throw f})})},h.prototype.catch=function(y){return this.then(null,y)},h.prototype.then=function(y,_){if(typeof y!="function"&&this.state===c||typeof _!="function"&&this.state===l)return this;var f=new this.constructor(o);return this.state!==u?d(f,this.state===c?y:_,this.outcome):this.queue.push(new p(f,y,_)),f},p.prototype.callFulfilled=function(y){a.resolve(this.promise,y)},p.prototype.otherCallFulfilled=function(y){d(this.promise,this.onFulfilled,y)},p.prototype.callRejected=function(y){a.reject(this.promise,y)},p.prototype.otherCallRejected=function(y){d(this.promise,this.onRejected,y)},a.resolve=function(y,_){var f=x(g,_);if(f.status==="error")return a.reject(y,f.value);var b=f.value;if(b)v(y,b);else{y.state=c,y.outcome=_;for(var w=-1,k=y.queue.length;++w<k;)y.queue[w].callFulfilled(_)}return y},a.reject=function(y,_){y.state=l,y.outcome=_;for(var f=-1,b=y.queue.length;++f<b;)y.queue[f].callRejected(_);return y},h.resolve=function(y){return y instanceof this?y:a.resolve(new this(o),y)},h.reject=function(y){var _=new this(o);return a.reject(_,y)},h.all=function(y){var _=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var f=y.length,b=!1;if(!f)return this.resolve([]);for(var w=new Array(f),k=0,P=-1,$=new this(o);++P<f;)D(y[P],P);return $;function D(S,F){_.resolve(S).then(function(A){w[F]=A,++k!==f||b||(b=!0,a.resolve($,w))},function(A){b||(b=!0,a.reject($,A))})}},h.race=function(y){var _=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var f=y.length,b=!1;if(!f)return this.resolve([]);for(var w=-1,k=new this(o);++w<f;)P=y[w],_.resolve(P).then(function($){b||(b=!0,a.resolve(k,$))},function($){b||(b=!0,a.reject(k,$))});var P;return k}},{immediate:36}],38:[function(n,r,i){var s={};(0,n("./lib/utils/common").assign)(s,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,i){var s=n("./zlib/deflate"),o=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/messages"),c=n("./zlib/zstream"),u=Object.prototype.toString,h=0,p=-1,d=0,g=8;function v(y){if(!(this instanceof v))return new v(y);this.options=o.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},y||{});var _=this.options;_.raw&&0<_.windowBits?_.windowBits=-_.windowBits:_.gzip&&0<_.windowBits&&_.windowBits<16&&(_.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var f=s.deflateInit2(this.strm,_.level,_.method,_.windowBits,_.memLevel,_.strategy);if(f!==h)throw new Error(l[f]);if(_.header&&s.deflateSetHeader(this.strm,_.header),_.dictionary){var b;if(b=typeof _.dictionary=="string"?a.string2buf(_.dictionary):u.call(_.dictionary)==="[object ArrayBuffer]"?new Uint8Array(_.dictionary):_.dictionary,(f=s.deflateSetDictionary(this.strm,b))!==h)throw new Error(l[f]);this._dict_set=!0}}function x(y,_){var f=new v(_);if(f.push(y,!0),f.err)throw f.msg||l[f.err];return f.result}v.prototype.push=function(y,_){var f,b,w=this.strm,k=this.options.chunkSize;if(this.ended)return!1;b=_===~~_?_:_===!0?4:0,typeof y=="string"?w.input=a.string2buf(y):u.call(y)==="[object ArrayBuffer]"?w.input=new Uint8Array(y):w.input=y,w.next_in=0,w.avail_in=w.input.length;do{if(w.avail_out===0&&(w.output=new o.Buf8(k),w.next_out=0,w.avail_out=k),(f=s.deflate(w,b))!==1&&f!==h)return this.onEnd(f),!(this.ended=!0);w.avail_out!==0&&(w.avail_in!==0||b!==4&&b!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(o.shrinkBuf(w.output,w.next_out))):this.onData(o.shrinkBuf(w.output,w.next_out)))}while((0<w.avail_in||w.avail_out===0)&&f!==1);return b===4?(f=s.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===h):b!==2||(this.onEnd(h),!(w.avail_out=0))},v.prototype.onData=function(y){this.chunks.push(y)},v.prototype.onEnd=function(y){y===h&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},i.Deflate=v,i.deflate=x,i.deflateRaw=function(y,_){return(_=_||{}).raw=!0,x(y,_)},i.gzip=function(y,_){return(_=_||{}).gzip=!0,x(y,_)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,i){var s=n("./zlib/inflate"),o=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/constants"),c=n("./zlib/messages"),u=n("./zlib/zstream"),h=n("./zlib/gzheader"),p=Object.prototype.toString;function d(v){if(!(this instanceof d))return new d(v);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},v||{});var x=this.options;x.raw&&0<=x.windowBits&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),!(0<=x.windowBits&&x.windowBits<16)||v&&v.windowBits||(x.windowBits+=32),15<x.windowBits&&x.windowBits<48&&!(15&x.windowBits)&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var y=s.inflateInit2(this.strm,x.windowBits);if(y!==l.Z_OK)throw new Error(c[y]);this.header=new h,s.inflateGetHeader(this.strm,this.header)}function g(v,x){var y=new d(x);if(y.push(v,!0),y.err)throw y.msg||c[y.err];return y.result}d.prototype.push=function(v,x){var y,_,f,b,w,k,P=this.strm,$=this.options.chunkSize,D=this.options.dictionary,S=!1;if(this.ended)return!1;_=x===~~x?x:x===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof v=="string"?P.input=a.binstring2buf(v):p.call(v)==="[object ArrayBuffer]"?P.input=new Uint8Array(v):P.input=v,P.next_in=0,P.avail_in=P.input.length;do{if(P.avail_out===0&&(P.output=new o.Buf8($),P.next_out=0,P.avail_out=$),(y=s.inflate(P,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&D&&(k=typeof D=="string"?a.string2buf(D):p.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,y=s.inflateSetDictionary(this.strm,k)),y===l.Z_BUF_ERROR&&S===!0&&(y=l.Z_OK,S=!1),y!==l.Z_STREAM_END&&y!==l.Z_OK)return this.onEnd(y),!(this.ended=!0);P.next_out&&(P.avail_out!==0&&y!==l.Z_STREAM_END&&(P.avail_in!==0||_!==l.Z_FINISH&&_!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(f=a.utf8border(P.output,P.next_out),b=P.next_out-f,w=a.buf2string(P.output,f),P.next_out=b,P.avail_out=$-b,b&&o.arraySet(P.output,P.output,f,b,0),this.onData(w)):this.onData(o.shrinkBuf(P.output,P.next_out)))),P.avail_in===0&&P.avail_out===0&&(S=!0)}while((0<P.avail_in||P.avail_out===0)&&y!==l.Z_STREAM_END);return y===l.Z_STREAM_END&&(_=l.Z_FINISH),_===l.Z_FINISH?(y=s.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===l.Z_OK):_!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(P.avail_out=0))},d.prototype.onData=function(v){this.chunks.push(v)},d.prototype.onEnd=function(v){v===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},i.Inflate=d,i.inflate=g,i.inflateRaw=function(v,x){return(x=x||{}).raw=!0,g(v,x)},i.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var h in u)u.hasOwnProperty(h)&&(l[h]=u[h])}}return l},i.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var o={arraySet:function(l,c,u,h,p){if(c.subarray&&l.subarray)l.set(c.subarray(u,u+h),p);else for(var d=0;d<h;d++)l[p+d]=c[u+d]},flattenChunks:function(l){var c,u,h,p,d,g;for(c=h=0,u=l.length;c<u;c++)h+=l[c].length;for(g=new Uint8Array(h),c=p=0,u=l.length;c<u;c++)d=l[c],g.set(d,p),p+=d.length;return g}},a={arraySet:function(l,c,u,h,p){for(var d=0;d<h;d++)l[p+d]=c[u+d]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,o)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(s)},{}],42:[function(n,r,i){var s=n("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new s.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function u(h,p){if(p<65537&&(h.subarray&&a||!h.subarray&&o))return String.fromCharCode.apply(null,s.shrinkBuf(h,p));for(var d="",g=0;g<p;g++)d+=String.fromCharCode(h[g]);return d}l[254]=l[254]=1,i.string2buf=function(h){var p,d,g,v,x,y=h.length,_=0;for(v=0;v<y;v++)(64512&(d=h.charCodeAt(v)))==55296&&v+1<y&&(64512&(g=h.charCodeAt(v+1)))==56320&&(d=65536+(d-55296<<10)+(g-56320),v++),_+=d<128?1:d<2048?2:d<65536?3:4;for(p=new s.Buf8(_),v=x=0;x<_;v++)(64512&(d=h.charCodeAt(v)))==55296&&v+1<y&&(64512&(g=h.charCodeAt(v+1)))==56320&&(d=65536+(d-55296<<10)+(g-56320),v++),d<128?p[x++]=d:(d<2048?p[x++]=192|d>>>6:(d<65536?p[x++]=224|d>>>12:(p[x++]=240|d>>>18,p[x++]=128|d>>>12&63),p[x++]=128|d>>>6&63),p[x++]=128|63&d);return p},i.buf2binstring=function(h){return u(h,h.length)},i.binstring2buf=function(h){for(var p=new s.Buf8(h.length),d=0,g=p.length;d<g;d++)p[d]=h.charCodeAt(d);return p},i.buf2string=function(h,p){var d,g,v,x,y=p||h.length,_=new Array(2*y);for(d=g=0;d<y;)if((v=h[d++])<128)_[g++]=v;else if(4<(x=l[v]))_[g++]=65533,d+=x-1;else{for(v&=x===2?31:x===3?15:7;1<x&&d<y;)v=v<<6|63&h[d++],x--;1<x?_[g++]=65533:v<65536?_[g++]=v:(v-=65536,_[g++]=55296|v>>10&1023,_[g++]=56320|1023&v)}return u(_,g)},i.utf8border=function(h,p){var d;for((p=p||h.length)>h.length&&(p=h.length),d=p-1;0<=d&&(192&h[d])==128;)d--;return d<0||d===0?p:d+l[h[d]]>p?d:p}},{"./common":41}],43:[function(n,r,i){r.exports=function(s,o,a,l){for(var c=65535&s|0,u=s>>>16&65535|0,h=0;a!==0;){for(a-=h=2e3<a?2e3:a;u=u+(c=c+o[l++]|0)|0,--h;);c%=65521,u%=65521}return c|u<<16|0}},{}],44:[function(n,r,i){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,i){var s=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var c=0;c<8;c++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();r.exports=function(o,a,l,c){var u=s,h=c+l;o^=-1;for(var p=c;p<h;p++)o=o>>>8^u[255&(o^a[p])];return-1^o}},{}],46:[function(n,r,i){var s,o=n("../utils/common"),a=n("./trees"),l=n("./adler32"),c=n("./crc32"),u=n("./messages"),h=0,p=4,d=0,g=-2,v=-1,x=4,y=2,_=8,f=9,b=286,w=30,k=19,P=2*b+1,$=15,D=3,S=258,F=S+D+1,A=42,E=113,T=1,L=2,X=3,J=4;function ne(C,O){return C.msg=u[O],O}function se(C){return(C<<1)-(4<C?9:0)}function ce(C){for(var O=C.length;0<=--O;)C[O]=0}function j(C){var O=C.state,H=O.pending;H>C.avail_out&&(H=C.avail_out),H!==0&&(o.arraySet(C.output,O.pending_buf,O.pending_out,H,C.next_out),C.next_out+=H,O.pending_out+=H,C.total_out+=H,C.avail_out-=H,O.pending-=H,O.pending===0&&(O.pending_out=0))}function V(C,O){a._tr_flush_block(C,0<=C.block_start?C.block_start:-1,C.strstart-C.block_start,O),C.block_start=C.strstart,j(C.strm)}function oe(C,O){C.pending_buf[C.pending++]=O}function N(C,O){C.pending_buf[C.pending++]=O>>>8&255,C.pending_buf[C.pending++]=255&O}function Q(C,O){var H,I,R=C.max_chain_length,Y=C.strstart,te=C.prev_length,K=C.nice_match,G=C.strstart>C.w_size-F?C.strstart-(C.w_size-F):0,ie=C.window,he=C.w_mask,ge=C.prev,be=C.strstart+S,$e=ie[Y+te-1],Be=ie[Y+te];C.prev_length>=C.good_match&&(R>>=2),K>C.lookahead&&(K=C.lookahead);do if(ie[(H=O)+te]===Be&&ie[H+te-1]===$e&&ie[H]===ie[Y]&&ie[++H]===ie[Y+1]){Y+=2,H++;do;while(ie[++Y]===ie[++H]&&ie[++Y]===ie[++H]&&ie[++Y]===ie[++H]&&ie[++Y]===ie[++H]&&ie[++Y]===ie[++H]&&ie[++Y]===ie[++H]&&ie[++Y]===ie[++H]&&ie[++Y]===ie[++H]&&Y<be);if(I=S-(be-Y),Y=be-S,te<I){if(C.match_start=O,K<=(te=I))break;$e=ie[Y+te-1],Be=ie[Y+te]}}while((O=ge[O&he])>G&&--R!=0);return te<=C.lookahead?te:C.lookahead}function fe(C){var O,H,I,R,Y,te,K,G,ie,he,ge=C.w_size;do{if(R=C.window_size-C.lookahead-C.strstart,C.strstart>=ge+(ge-F)){for(o.arraySet(C.window,C.window,ge,ge,0),C.match_start-=ge,C.strstart-=ge,C.block_start-=ge,O=H=C.hash_size;I=C.head[--O],C.head[O]=ge<=I?I-ge:0,--H;);for(O=H=ge;I=C.prev[--O],C.prev[O]=ge<=I?I-ge:0,--H;);R+=ge}if(C.strm.avail_in===0)break;if(te=C.strm,K=C.window,G=C.strstart+C.lookahead,ie=R,he=void 0,he=te.avail_in,ie<he&&(he=ie),H=he===0?0:(te.avail_in-=he,o.arraySet(K,te.input,te.next_in,he,G),te.state.wrap===1?te.adler=l(te.adler,K,he,G):te.state.wrap===2&&(te.adler=c(te.adler,K,he,G)),te.next_in+=he,te.total_in+=he,he),C.lookahead+=H,C.lookahead+C.insert>=D)for(Y=C.strstart-C.insert,C.ins_h=C.window[Y],C.ins_h=(C.ins_h<<C.hash_shift^C.window[Y+1])&C.hash_mask;C.insert&&(C.ins_h=(C.ins_h<<C.hash_shift^C.window[Y+D-1])&C.hash_mask,C.prev[Y&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=Y,Y++,C.insert--,!(C.lookahead+C.insert<D)););}while(C.lookahead<F&&C.strm.avail_in!==0)}function M(C,O){for(var H,I;;){if(C.lookahead<F){if(fe(C),C.lookahead<F&&O===h)return T;if(C.lookahead===0)break}if(H=0,C.lookahead>=D&&(C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+D-1])&C.hash_mask,H=C.prev[C.strstart&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=C.strstart),H!==0&&C.strstart-H<=C.w_size-F&&(C.match_length=Q(C,H)),C.match_length>=D)if(I=a._tr_tally(C,C.strstart-C.match_start,C.match_length-D),C.lookahead-=C.match_length,C.match_length<=C.max_lazy_match&&C.lookahead>=D){for(C.match_length--;C.strstart++,C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+D-1])&C.hash_mask,H=C.prev[C.strstart&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=C.strstart,--C.match_length!=0;);C.strstart++}else C.strstart+=C.match_length,C.match_length=0,C.ins_h=C.window[C.strstart],C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+1])&C.hash_mask;else I=a._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++;if(I&&(V(C,!1),C.strm.avail_out===0))return T}return C.insert=C.strstart<D-1?C.strstart:D-1,O===p?(V(C,!0),C.strm.avail_out===0?X:J):C.last_lit&&(V(C,!1),C.strm.avail_out===0)?T:L}function q(C,O){for(var H,I,R;;){if(C.lookahead<F){if(fe(C),C.lookahead<F&&O===h)return T;if(C.lookahead===0)break}if(H=0,C.lookahead>=D&&(C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+D-1])&C.hash_mask,H=C.prev[C.strstart&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=C.strstart),C.prev_length=C.match_length,C.prev_match=C.match_start,C.match_length=D-1,H!==0&&C.prev_length<C.max_lazy_match&&C.strstart-H<=C.w_size-F&&(C.match_length=Q(C,H),C.match_length<=5&&(C.strategy===1||C.match_length===D&&4096<C.strstart-C.match_start)&&(C.match_length=D-1)),C.prev_length>=D&&C.match_length<=C.prev_length){for(R=C.strstart+C.lookahead-D,I=a._tr_tally(C,C.strstart-1-C.prev_match,C.prev_length-D),C.lookahead-=C.prev_length-1,C.prev_length-=2;++C.strstart<=R&&(C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+D-1])&C.hash_mask,H=C.prev[C.strstart&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=C.strstart),--C.prev_length!=0;);if(C.match_available=0,C.match_length=D-1,C.strstart++,I&&(V(C,!1),C.strm.avail_out===0))return T}else if(C.match_available){if((I=a._tr_tally(C,0,C.window[C.strstart-1]))&&V(C,!1),C.strstart++,C.lookahead--,C.strm.avail_out===0)return T}else C.match_available=1,C.strstart++,C.lookahead--}return C.match_available&&(I=a._tr_tally(C,0,C.window[C.strstart-1]),C.match_available=0),C.insert=C.strstart<D-1?C.strstart:D-1,O===p?(V(C,!0),C.strm.avail_out===0?X:J):C.last_lit&&(V(C,!1),C.strm.avail_out===0)?T:L}function ee(C,O,H,I,R){this.good_length=C,this.max_lazy=O,this.nice_length=H,this.max_chain=I,this.func=R}function ue(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*P),this.dyn_dtree=new o.Buf16(2*(2*w+1)),this.bl_tree=new o.Buf16(2*(2*k+1)),ce(this.dyn_ltree),ce(this.dyn_dtree),ce(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16($+1),this.heap=new o.Buf16(2*b+1),ce(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*b+1),ce(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function me(C){var O;return C&&C.state?(C.total_in=C.total_out=0,C.data_type=y,(O=C.state).pending=0,O.pending_out=0,O.wrap<0&&(O.wrap=-O.wrap),O.status=O.wrap?A:E,C.adler=O.wrap===2?0:1,O.last_flush=h,a._tr_init(O),d):ne(C,g)}function xe(C){var O=me(C);return O===d&&function(H){H.window_size=2*H.w_size,ce(H.head),H.max_lazy_match=s[H.level].max_lazy,H.good_match=s[H.level].good_length,H.nice_match=s[H.level].nice_length,H.max_chain_length=s[H.level].max_chain,H.strstart=0,H.block_start=0,H.lookahead=0,H.insert=0,H.match_length=H.prev_length=D-1,H.match_available=0,H.ins_h=0}(C.state),O}function z(C,O,H,I,R,Y){if(!C)return g;var te=1;if(O===v&&(O=6),I<0?(te=0,I=-I):15<I&&(te=2,I-=16),R<1||f<R||H!==_||I<8||15<I||O<0||9<O||Y<0||x<Y)return ne(C,g);I===8&&(I=9);var K=new ue;return(C.state=K).strm=C,K.wrap=te,K.gzhead=null,K.w_bits=I,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=R+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+D-1)/D),K.window=new o.Buf8(2*K.w_size),K.head=new o.Buf16(K.hash_size),K.prev=new o.Buf16(K.w_size),K.lit_bufsize=1<<R+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new o.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=O,K.strategy=Y,K.method=H,xe(C)}s=[new ee(0,0,0,0,function(C,O){var H=65535;for(H>C.pending_buf_size-5&&(H=C.pending_buf_size-5);;){if(C.lookahead<=1){if(fe(C),C.lookahead===0&&O===h)return T;if(C.lookahead===0)break}C.strstart+=C.lookahead,C.lookahead=0;var I=C.block_start+H;if((C.strstart===0||C.strstart>=I)&&(C.lookahead=C.strstart-I,C.strstart=I,V(C,!1),C.strm.avail_out===0)||C.strstart-C.block_start>=C.w_size-F&&(V(C,!1),C.strm.avail_out===0))return T}return C.insert=0,O===p?(V(C,!0),C.strm.avail_out===0?X:J):(C.strstart>C.block_start&&(V(C,!1),C.strm.avail_out),T)}),new ee(4,4,8,4,M),new ee(4,5,16,8,M),new ee(4,6,32,32,M),new ee(4,4,16,16,q),new ee(8,16,32,32,q),new ee(8,16,128,128,q),new ee(8,32,128,256,q),new ee(32,128,258,1024,q),new ee(32,258,258,4096,q)],i.deflateInit=function(C,O){return z(C,O,_,15,8,0)},i.deflateInit2=z,i.deflateReset=xe,i.deflateResetKeep=me,i.deflateSetHeader=function(C,O){return C&&C.state?C.state.wrap!==2?g:(C.state.gzhead=O,d):g},i.deflate=function(C,O){var H,I,R,Y;if(!C||!C.state||5<O||O<0)return C?ne(C,g):g;if(I=C.state,!C.output||!C.input&&C.avail_in!==0||I.status===666&&O!==p)return ne(C,C.avail_out===0?-5:g);if(I.strm=C,H=I.last_flush,I.last_flush=O,I.status===A)if(I.wrap===2)C.adler=0,oe(I,31),oe(I,139),oe(I,8),I.gzhead?(oe(I,(I.gzhead.text?1:0)+(I.gzhead.hcrc?2:0)+(I.gzhead.extra?4:0)+(I.gzhead.name?8:0)+(I.gzhead.comment?16:0)),oe(I,255&I.gzhead.time),oe(I,I.gzhead.time>>8&255),oe(I,I.gzhead.time>>16&255),oe(I,I.gzhead.time>>24&255),oe(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),oe(I,255&I.gzhead.os),I.gzhead.extra&&I.gzhead.extra.length&&(oe(I,255&I.gzhead.extra.length),oe(I,I.gzhead.extra.length>>8&255)),I.gzhead.hcrc&&(C.adler=c(C.adler,I.pending_buf,I.pending,0)),I.gzindex=0,I.status=69):(oe(I,0),oe(I,0),oe(I,0),oe(I,0),oe(I,0),oe(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),oe(I,3),I.status=E);else{var te=_+(I.w_bits-8<<4)<<8;te|=(2<=I.strategy||I.level<2?0:I.level<6?1:I.level===6?2:3)<<6,I.strstart!==0&&(te|=32),te+=31-te%31,I.status=E,N(I,te),I.strstart!==0&&(N(I,C.adler>>>16),N(I,65535&C.adler)),C.adler=1}if(I.status===69)if(I.gzhead.extra){for(R=I.pending;I.gzindex<(65535&I.gzhead.extra.length)&&(I.pending!==I.pending_buf_size||(I.gzhead.hcrc&&I.pending>R&&(C.adler=c(C.adler,I.pending_buf,I.pending-R,R)),j(C),R=I.pending,I.pending!==I.pending_buf_size));)oe(I,255&I.gzhead.extra[I.gzindex]),I.gzindex++;I.gzhead.hcrc&&I.pending>R&&(C.adler=c(C.adler,I.pending_buf,I.pending-R,R)),I.gzindex===I.gzhead.extra.length&&(I.gzindex=0,I.status=73)}else I.status=73;if(I.status===73)if(I.gzhead.name){R=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>R&&(C.adler=c(C.adler,I.pending_buf,I.pending-R,R)),j(C),R=I.pending,I.pending===I.pending_buf_size)){Y=1;break}Y=I.gzindex<I.gzhead.name.length?255&I.gzhead.name.charCodeAt(I.gzindex++):0,oe(I,Y)}while(Y!==0);I.gzhead.hcrc&&I.pending>R&&(C.adler=c(C.adler,I.pending_buf,I.pending-R,R)),Y===0&&(I.gzindex=0,I.status=91)}else I.status=91;if(I.status===91)if(I.gzhead.comment){R=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>R&&(C.adler=c(C.adler,I.pending_buf,I.pending-R,R)),j(C),R=I.pending,I.pending===I.pending_buf_size)){Y=1;break}Y=I.gzindex<I.gzhead.comment.length?255&I.gzhead.comment.charCodeAt(I.gzindex++):0,oe(I,Y)}while(Y!==0);I.gzhead.hcrc&&I.pending>R&&(C.adler=c(C.adler,I.pending_buf,I.pending-R,R)),Y===0&&(I.status=103)}else I.status=103;if(I.status===103&&(I.gzhead.hcrc?(I.pending+2>I.pending_buf_size&&j(C),I.pending+2<=I.pending_buf_size&&(oe(I,255&C.adler),oe(I,C.adler>>8&255),C.adler=0,I.status=E)):I.status=E),I.pending!==0){if(j(C),C.avail_out===0)return I.last_flush=-1,d}else if(C.avail_in===0&&se(O)<=se(H)&&O!==p)return ne(C,-5);if(I.status===666&&C.avail_in!==0)return ne(C,-5);if(C.avail_in!==0||I.lookahead!==0||O!==h&&I.status!==666){var K=I.strategy===2?function(G,ie){for(var he;;){if(G.lookahead===0&&(fe(G),G.lookahead===0)){if(ie===h)return T;break}if(G.match_length=0,he=a._tr_tally(G,0,G.window[G.strstart]),G.lookahead--,G.strstart++,he&&(V(G,!1),G.strm.avail_out===0))return T}return G.insert=0,ie===p?(V(G,!0),G.strm.avail_out===0?X:J):G.last_lit&&(V(G,!1),G.strm.avail_out===0)?T:L}(I,O):I.strategy===3?function(G,ie){for(var he,ge,be,$e,Be=G.window;;){if(G.lookahead<=S){if(fe(G),G.lookahead<=S&&ie===h)return T;if(G.lookahead===0)break}if(G.match_length=0,G.lookahead>=D&&0<G.strstart&&(ge=Be[be=G.strstart-1])===Be[++be]&&ge===Be[++be]&&ge===Be[++be]){$e=G.strstart+S;do;while(ge===Be[++be]&&ge===Be[++be]&&ge===Be[++be]&&ge===Be[++be]&&ge===Be[++be]&&ge===Be[++be]&&ge===Be[++be]&&ge===Be[++be]&&be<$e);G.match_length=S-($e-be),G.match_length>G.lookahead&&(G.match_length=G.lookahead)}if(G.match_length>=D?(he=a._tr_tally(G,1,G.match_length-D),G.lookahead-=G.match_length,G.strstart+=G.match_length,G.match_length=0):(he=a._tr_tally(G,0,G.window[G.strstart]),G.lookahead--,G.strstart++),he&&(V(G,!1),G.strm.avail_out===0))return T}return G.insert=0,ie===p?(V(G,!0),G.strm.avail_out===0?X:J):G.last_lit&&(V(G,!1),G.strm.avail_out===0)?T:L}(I,O):s[I.level].func(I,O);if(K!==X&&K!==J||(I.status=666),K===T||K===X)return C.avail_out===0&&(I.last_flush=-1),d;if(K===L&&(O===1?a._tr_align(I):O!==5&&(a._tr_stored_block(I,0,0,!1),O===3&&(ce(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),j(C),C.avail_out===0))return I.last_flush=-1,d}return O!==p?d:I.wrap<=0?1:(I.wrap===2?(oe(I,255&C.adler),oe(I,C.adler>>8&255),oe(I,C.adler>>16&255),oe(I,C.adler>>24&255),oe(I,255&C.total_in),oe(I,C.total_in>>8&255),oe(I,C.total_in>>16&255),oe(I,C.total_in>>24&255)):(N(I,C.adler>>>16),N(I,65535&C.adler)),j(C),0<I.wrap&&(I.wrap=-I.wrap),I.pending!==0?d:1)},i.deflateEnd=function(C){var O;return C&&C.state?(O=C.state.status)!==A&&O!==69&&O!==73&&O!==91&&O!==103&&O!==E&&O!==666?ne(C,g):(C.state=null,O===E?ne(C,-3):d):g},i.deflateSetDictionary=function(C,O){var H,I,R,Y,te,K,G,ie,he=O.length;if(!C||!C.state||(Y=(H=C.state).wrap)===2||Y===1&&H.status!==A||H.lookahead)return g;for(Y===1&&(C.adler=l(C.adler,O,he,0)),H.wrap=0,he>=H.w_size&&(Y===0&&(ce(H.head),H.strstart=0,H.block_start=0,H.insert=0),ie=new o.Buf8(H.w_size),o.arraySet(ie,O,he-H.w_size,H.w_size,0),O=ie,he=H.w_size),te=C.avail_in,K=C.next_in,G=C.input,C.avail_in=he,C.next_in=0,C.input=O,fe(H);H.lookahead>=D;){for(I=H.strstart,R=H.lookahead-(D-1);H.ins_h=(H.ins_h<<H.hash_shift^H.window[I+D-1])&H.hash_mask,H.prev[I&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=I,I++,--R;);H.strstart=I,H.lookahead=D-1,fe(H)}return H.strstart+=H.lookahead,H.block_start=H.strstart,H.insert=H.lookahead,H.lookahead=0,H.match_length=H.prev_length=D-1,H.match_available=0,C.next_in=K,C.input=G,C.avail_in=te,H.wrap=Y,d},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,i){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,i){r.exports=function(s,o){var a,l,c,u,h,p,d,g,v,x,y,_,f,b,w,k,P,$,D,S,F,A,E,T,L;a=s.state,l=s.next_in,T=s.input,c=l+(s.avail_in-5),u=s.next_out,L=s.output,h=u-(o-s.avail_out),p=u+(s.avail_out-257),d=a.dmax,g=a.wsize,v=a.whave,x=a.wnext,y=a.window,_=a.hold,f=a.bits,b=a.lencode,w=a.distcode,k=(1<<a.lenbits)-1,P=(1<<a.distbits)-1;e:do{f<15&&(_+=T[l++]<<f,f+=8,_+=T[l++]<<f,f+=8),$=b[_&k];t:for(;;){if(_>>>=D=$>>>24,f-=D,(D=$>>>16&255)===0)L[u++]=65535&$;else{if(!(16&D)){if(!(64&D)){$=b[(65535&$)+(_&(1<<D)-1)];continue t}if(32&D){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}S=65535&$,(D&=15)&&(f<D&&(_+=T[l++]<<f,f+=8),S+=_&(1<<D)-1,_>>>=D,f-=D),f<15&&(_+=T[l++]<<f,f+=8,_+=T[l++]<<f,f+=8),$=w[_&P];n:for(;;){if(_>>>=D=$>>>24,f-=D,!(16&(D=$>>>16&255))){if(!(64&D)){$=w[(65535&$)+(_&(1<<D)-1)];continue n}s.msg="invalid distance code",a.mode=30;break e}if(F=65535&$,f<(D&=15)&&(_+=T[l++]<<f,(f+=8)<D&&(_+=T[l++]<<f,f+=8)),d<(F+=_&(1<<D)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(_>>>=D,f-=D,(D=u-h)<F){if(v<(D=F-D)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(E=y,(A=0)===x){if(A+=g-D,D<S){for(S-=D;L[u++]=y[A++],--D;);A=u-F,E=L}}else if(x<D){if(A+=g+x-D,(D-=x)<S){for(S-=D;L[u++]=y[A++],--D;);if(A=0,x<S){for(S-=D=x;L[u++]=y[A++],--D;);A=u-F,E=L}}}else if(A+=x-D,D<S){for(S-=D;L[u++]=y[A++],--D;);A=u-F,E=L}for(;2<S;)L[u++]=E[A++],L[u++]=E[A++],L[u++]=E[A++],S-=3;S&&(L[u++]=E[A++],1<S&&(L[u++]=E[A++]))}else{for(A=u-F;L[u++]=L[A++],L[u++]=L[A++],L[u++]=L[A++],2<(S-=3););S&&(L[u++]=L[A++],1<S&&(L[u++]=L[A++]))}break}}break}}while(l<c&&u<p);l-=S=f>>3,_&=(1<<(f-=S<<3))-1,s.next_in=l,s.next_out=u,s.avail_in=l<c?c-l+5:5-(l-c),s.avail_out=u<p?p-u+257:257-(u-p),a.hold=_,a.bits=f}},{}],49:[function(n,r,i){var s=n("../utils/common"),o=n("./adler32"),a=n("./crc32"),l=n("./inffast"),c=n("./inftrees"),u=1,h=2,p=0,d=-2,g=1,v=852,x=592;function y(A){return(A>>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function _(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(A){var E;return A&&A.state?(E=A.state,A.total_in=A.total_out=E.total=0,A.msg="",E.wrap&&(A.adler=1&E.wrap),E.mode=g,E.last=0,E.havedict=0,E.dmax=32768,E.head=null,E.hold=0,E.bits=0,E.lencode=E.lendyn=new s.Buf32(v),E.distcode=E.distdyn=new s.Buf32(x),E.sane=1,E.back=-1,p):d}function b(A){var E;return A&&A.state?((E=A.state).wsize=0,E.whave=0,E.wnext=0,f(A)):d}function w(A,E){var T,L;return A&&A.state?(L=A.state,E<0?(T=0,E=-E):(T=1+(E>>4),E<48&&(E&=15)),E&&(E<8||15<E)?d:(L.window!==null&&L.wbits!==E&&(L.window=null),L.wrap=T,L.wbits=E,b(A))):d}function k(A,E){var T,L;return A?(L=new _,(A.state=L).window=null,(T=w(A,E))!==p&&(A.state=null),T):d}var P,$,D=!0;function S(A){if(D){var E;for(P=new s.Buf32(512),$=new s.Buf32(32),E=0;E<144;)A.lens[E++]=8;for(;E<256;)A.lens[E++]=9;for(;E<280;)A.lens[E++]=7;for(;E<288;)A.lens[E++]=8;for(c(u,A.lens,0,288,P,0,A.work,{bits:9}),E=0;E<32;)A.lens[E++]=5;c(h,A.lens,0,32,$,0,A.work,{bits:5}),D=!1}A.lencode=P,A.lenbits=9,A.distcode=$,A.distbits=5}function F(A,E,T,L){var X,J=A.state;return J.window===null&&(J.wsize=1<<J.wbits,J.wnext=0,J.whave=0,J.window=new s.Buf8(J.wsize)),L>=J.wsize?(s.arraySet(J.window,E,T-J.wsize,J.wsize,0),J.wnext=0,J.whave=J.wsize):(L<(X=J.wsize-J.wnext)&&(X=L),s.arraySet(J.window,E,T-L,X,J.wnext),(L-=X)?(s.arraySet(J.window,E,T-L,L,0),J.wnext=L,J.whave=J.wsize):(J.wnext+=X,J.wnext===J.wsize&&(J.wnext=0),J.whave<J.wsize&&(J.whave+=X))),0}i.inflateReset=b,i.inflateReset2=w,i.inflateResetKeep=f,i.inflateInit=function(A){return k(A,15)},i.inflateInit2=k,i.inflate=function(A,E){var T,L,X,J,ne,se,ce,j,V,oe,N,Q,fe,M,q,ee,ue,me,xe,z,C,O,H,I,R=0,Y=new s.Buf8(4),te=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!A||!A.state||!A.output||!A.input&&A.avail_in!==0)return d;(T=A.state).mode===12&&(T.mode=13),ne=A.next_out,X=A.output,ce=A.avail_out,J=A.next_in,L=A.input,se=A.avail_in,j=T.hold,V=T.bits,oe=se,N=ce,O=p;e:for(;;)switch(T.mode){case g:if(T.wrap===0){T.mode=13;break}for(;V<16;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(2&T.wrap&&j===35615){Y[T.check=0]=255&j,Y[1]=j>>>8&255,T.check=a(T.check,Y,2,0),V=j=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&j)<<8)+(j>>8))%31){A.msg="incorrect header check",T.mode=30;break}if((15&j)!=8){A.msg="unknown compression method",T.mode=30;break}if(V-=4,C=8+(15&(j>>>=4)),T.wbits===0)T.wbits=C;else if(C>T.wbits){A.msg="invalid window size",T.mode=30;break}T.dmax=1<<C,A.adler=T.check=1,T.mode=512&j?10:12,V=j=0;break;case 2:for(;V<16;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(T.flags=j,(255&T.flags)!=8){A.msg="unknown compression method",T.mode=30;break}if(57344&T.flags){A.msg="unknown header flags set",T.mode=30;break}T.head&&(T.head.text=j>>8&1),512&T.flags&&(Y[0]=255&j,Y[1]=j>>>8&255,T.check=a(T.check,Y,2,0)),V=j=0,T.mode=3;case 3:for(;V<32;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}T.head&&(T.head.time=j),512&T.flags&&(Y[0]=255&j,Y[1]=j>>>8&255,Y[2]=j>>>16&255,Y[3]=j>>>24&255,T.check=a(T.check,Y,4,0)),V=j=0,T.mode=4;case 4:for(;V<16;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}T.head&&(T.head.xflags=255&j,T.head.os=j>>8),512&T.flags&&(Y[0]=255&j,Y[1]=j>>>8&255,T.check=a(T.check,Y,2,0)),V=j=0,T.mode=5;case 5:if(1024&T.flags){for(;V<16;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}T.length=j,T.head&&(T.head.extra_len=j),512&T.flags&&(Y[0]=255&j,Y[1]=j>>>8&255,T.check=a(T.check,Y,2,0)),V=j=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(se<(Q=T.length)&&(Q=se),Q&&(T.head&&(C=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),s.arraySet(T.head.extra,L,J,Q,C)),512&T.flags&&(T.check=a(T.check,L,Q,J)),se-=Q,J+=Q,T.length-=Q),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(se===0)break e;for(Q=0;C=L[J+Q++],T.head&&C&&T.length<65536&&(T.head.name+=String.fromCharCode(C)),C&&Q<se;);if(512&T.flags&&(T.check=a(T.check,L,Q,J)),se-=Q,J+=Q,C)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=8;case 8:if(4096&T.flags){if(se===0)break e;for(Q=0;C=L[J+Q++],T.head&&C&&T.length<65536&&(T.head.comment+=String.fromCharCode(C)),C&&Q<se;);if(512&T.flags&&(T.check=a(T.check,L,Q,J)),se-=Q,J+=Q,C)break e}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;V<16;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(j!==(65535&T.check)){A.msg="header crc mismatch",T.mode=30;break}V=j=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),A.adler=T.check=0,T.mode=12;break;case 10:for(;V<32;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}A.adler=T.check=y(j),V=j=0,T.mode=11;case 11:if(T.havedict===0)return A.next_out=ne,A.avail_out=ce,A.next_in=J,A.avail_in=se,T.hold=j,T.bits=V,2;A.adler=T.check=1,T.mode=12;case 12:if(E===5||E===6)break e;case 13:if(T.last){j>>>=7&V,V-=7&V,T.mode=27;break}for(;V<3;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}switch(T.last=1&j,V-=1,3&(j>>>=1)){case 0:T.mode=14;break;case 1:if(S(T),T.mode=20,E!==6)break;j>>>=2,V-=2;break e;case 2:T.mode=17;break;case 3:A.msg="invalid block type",T.mode=30}j>>>=2,V-=2;break;case 14:for(j>>>=7&V,V-=7&V;V<32;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if((65535&j)!=(j>>>16^65535)){A.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&j,V=j=0,T.mode=15,E===6)break e;case 15:T.mode=16;case 16:if(Q=T.length){if(se<Q&&(Q=se),ce<Q&&(Q=ce),Q===0)break e;s.arraySet(X,L,J,Q,ne),se-=Q,J+=Q,ce-=Q,ne+=Q,T.length-=Q;break}T.mode=12;break;case 17:for(;V<14;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(T.nlen=257+(31&j),j>>>=5,V-=5,T.ndist=1+(31&j),j>>>=5,V-=5,T.ncode=4+(15&j),j>>>=4,V-=4,286<T.nlen||30<T.ndist){A.msg="too many length or distance symbols",T.mode=30;break}T.have=0,T.mode=18;case 18:for(;T.have<T.ncode;){for(;V<3;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}T.lens[te[T.have++]]=7&j,j>>>=3,V-=3}for(;T.have<19;)T.lens[te[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,H={bits:T.lenbits},O=c(0,T.lens,0,19,T.lencode,0,T.work,H),T.lenbits=H.bits,O){A.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have<T.nlen+T.ndist;){for(;ee=(R=T.lencode[j&(1<<T.lenbits)-1])>>>16&255,ue=65535&R,!((q=R>>>24)<=V);){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(ue<16)j>>>=q,V-=q,T.lens[T.have++]=ue;else{if(ue===16){for(I=q+2;V<I;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(j>>>=q,V-=q,T.have===0){A.msg="invalid bit length repeat",T.mode=30;break}C=T.lens[T.have-1],Q=3+(3&j),j>>>=2,V-=2}else if(ue===17){for(I=q+3;V<I;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}V-=q,C=0,Q=3+(7&(j>>>=q)),j>>>=3,V-=3}else{for(I=q+7;V<I;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}V-=q,C=0,Q=11+(127&(j>>>=q)),j>>>=7,V-=7}if(T.have+Q>T.nlen+T.ndist){A.msg="invalid bit length repeat",T.mode=30;break}for(;Q--;)T.lens[T.have++]=C}}if(T.mode===30)break;if(T.lens[256]===0){A.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,H={bits:T.lenbits},O=c(u,T.lens,0,T.nlen,T.lencode,0,T.work,H),T.lenbits=H.bits,O){A.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,H={bits:T.distbits},O=c(h,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,H),T.distbits=H.bits,O){A.msg="invalid distances set",T.mode=30;break}if(T.mode=20,E===6)break e;case 20:T.mode=21;case 21:if(6<=se&&258<=ce){A.next_out=ne,A.avail_out=ce,A.next_in=J,A.avail_in=se,T.hold=j,T.bits=V,l(A,N),ne=A.next_out,X=A.output,ce=A.avail_out,J=A.next_in,L=A.input,se=A.avail_in,j=T.hold,V=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;ee=(R=T.lencode[j&(1<<T.lenbits)-1])>>>16&255,ue=65535&R,!((q=R>>>24)<=V);){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(ee&&!(240&ee)){for(me=q,xe=ee,z=ue;ee=(R=T.lencode[z+((j&(1<<me+xe)-1)>>me)])>>>16&255,ue=65535&R,!(me+(q=R>>>24)<=V);){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}j>>>=me,V-=me,T.back+=me}if(j>>>=q,V-=q,T.back+=q,T.length=ue,ee===0){T.mode=26;break}if(32&ee){T.back=-1,T.mode=12;break}if(64&ee){A.msg="invalid literal/length code",T.mode=30;break}T.extra=15&ee,T.mode=22;case 22:if(T.extra){for(I=T.extra;V<I;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}T.length+=j&(1<<T.extra)-1,j>>>=T.extra,V-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;ee=(R=T.distcode[j&(1<<T.distbits)-1])>>>16&255,ue=65535&R,!((q=R>>>24)<=V);){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(!(240&ee)){for(me=q,xe=ee,z=ue;ee=(R=T.distcode[z+((j&(1<<me+xe)-1)>>me)])>>>16&255,ue=65535&R,!(me+(q=R>>>24)<=V);){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}j>>>=me,V-=me,T.back+=me}if(j>>>=q,V-=q,T.back+=q,64&ee){A.msg="invalid distance code",T.mode=30;break}T.offset=ue,T.extra=15&ee,T.mode=24;case 24:if(T.extra){for(I=T.extra;V<I;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}T.offset+=j&(1<<T.extra)-1,j>>>=T.extra,V-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){A.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(ce===0)break e;if(Q=N-ce,T.offset>Q){if((Q=T.offset-Q)>T.whave&&T.sane){A.msg="invalid distance too far back",T.mode=30;break}fe=Q>T.wnext?(Q-=T.wnext,T.wsize-Q):T.wnext-Q,Q>T.length&&(Q=T.length),M=T.window}else M=X,fe=ne-T.offset,Q=T.length;for(ce<Q&&(Q=ce),ce-=Q,T.length-=Q;X[ne++]=M[fe++],--Q;);T.length===0&&(T.mode=21);break;case 26:if(ce===0)break e;X[ne++]=T.length,ce--,T.mode=21;break;case 27:if(T.wrap){for(;V<32;){if(se===0)break e;se--,j|=L[J++]<<V,V+=8}if(N-=ce,A.total_out+=N,T.total+=N,N&&(A.adler=T.check=T.flags?a(T.check,X,N,ne-N):o(T.check,X,N,ne-N)),N=ce,(T.flags?j:y(j))!==T.check){A.msg="incorrect data check",T.mode=30;break}V=j=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;V<32;){if(se===0)break e;se--,j+=L[J++]<<V,V+=8}if(j!==(4294967295&T.total)){A.msg="incorrect length check",T.mode=30;break}V=j=0}T.mode=29;case 29:O=1;break e;case 30:O=-3;break e;case 31:return-4;case 32:default:return d}return A.next_out=ne,A.avail_out=ce,A.next_in=J,A.avail_in=se,T.hold=j,T.bits=V,(T.wsize||N!==A.avail_out&&T.mode<30&&(T.mode<27||E!==4))&&F(A,A.output,A.next_out,N-A.avail_out)?(T.mode=31,-4):(oe-=A.avail_in,N-=A.avail_out,A.total_in+=oe,A.total_out+=N,T.total+=N,T.wrap&&N&&(A.adler=T.check=T.flags?a(T.check,X,N,A.next_out-N):o(T.check,X,N,A.next_out-N)),A.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(oe==0&&N===0||E===4)&&O===p&&(O=-5),O)},i.inflateEnd=function(A){if(!A||!A.state)return d;var E=A.state;return E.window&&(E.window=null),A.state=null,p},i.inflateGetHeader=function(A,E){var T;return A&&A.state&&2&(T=A.state).wrap?((T.head=E).done=!1,p):d},i.inflateSetDictionary=function(A,E){var T,L=E.length;return A&&A.state?(T=A.state).wrap!==0&&T.mode!==11?d:T.mode===11&&o(1,E,L,0)!==T.check?-3:F(A,E,L,L)?(T.mode=31,-4):(T.havedict=1,p):d},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,i){var s=n("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(u,h,p,d,g,v,x,y){var _,f,b,w,k,P,$,D,S,F=y.bits,A=0,E=0,T=0,L=0,X=0,J=0,ne=0,se=0,ce=0,j=0,V=null,oe=0,N=new s.Buf16(16),Q=new s.Buf16(16),fe=null,M=0;for(A=0;A<=15;A++)N[A]=0;for(E=0;E<d;E++)N[h[p+E]]++;for(X=F,L=15;1<=L&&N[L]===0;L--);if(L<X&&(X=L),L===0)return g[v++]=20971520,g[v++]=20971520,y.bits=1,0;for(T=1;T<L&&N[T]===0;T++);for(X<T&&(X=T),A=se=1;A<=15;A++)if(se<<=1,(se-=N[A])<0)return-1;if(0<se&&(u===0||L!==1))return-1;for(Q[1]=0,A=1;A<15;A++)Q[A+1]=Q[A]+N[A];for(E=0;E<d;E++)h[p+E]!==0&&(x[Q[h[p+E]]++]=E);if(P=u===0?(V=fe=x,19):u===1?(V=o,oe-=257,fe=a,M-=257,256):(V=l,fe=c,-1),A=T,k=v,ne=E=j=0,b=-1,w=(ce=1<<(J=X))-1,u===1&&852<ce||u===2&&592<ce)return 1;for(;;){for($=A-ne,S=x[E]<P?(D=0,x[E]):x[E]>P?(D=fe[M+x[E]],V[oe+x[E]]):(D=96,0),_=1<<A-ne,T=f=1<<J;g[k+(j>>ne)+(f-=_)]=$<<24|D<<16|S|0,f!==0;);for(_=1<<A-1;j&_;)_>>=1;if(_!==0?(j&=_-1,j+=_):j=0,E++,--N[A]==0){if(A===L)break;A=h[p+x[E]]}if(X<A&&(j&w)!==b){for(ne===0&&(ne=X),k+=T,se=1<<(J=A-ne);J+ne<L&&!((se-=N[J+ne])<=0);)J++,se<<=1;if(ce+=1<<J,u===1&&852<ce||u===2&&592<ce)return 1;g[b=j&w]=X<<24|J<<16|k-v|0}}return j!==0&&(g[k+j]=A-ne<<24|64<<16|0),y.bits=X,0}},{"../utils/common":41}],51:[function(n,r,i){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,i){var s=n("../utils/common"),o=0,a=1;function l(R){for(var Y=R.length;0<=--Y;)R[Y]=0}var c=0,u=29,h=256,p=h+1+u,d=30,g=19,v=2*p+1,x=15,y=16,_=7,f=256,b=16,w=17,k=18,P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=new Array(2*(p+2));l(F);var A=new Array(2*d);l(A);var E=new Array(512);l(E);var T=new Array(256);l(T);var L=new Array(u);l(L);var X,J,ne,se=new Array(d);function ce(R,Y,te,K,G){this.static_tree=R,this.extra_bits=Y,this.extra_base=te,this.elems=K,this.max_length=G,this.has_stree=R&&R.length}function j(R,Y){this.dyn_tree=R,this.max_code=0,this.stat_desc=Y}function V(R){return R<256?E[R]:E[256+(R>>>7)]}function oe(R,Y){R.pending_buf[R.pending++]=255&Y,R.pending_buf[R.pending++]=Y>>>8&255}function N(R,Y,te){R.bi_valid>y-te?(R.bi_buf|=Y<<R.bi_valid&65535,oe(R,R.bi_buf),R.bi_buf=Y>>y-R.bi_valid,R.bi_valid+=te-y):(R.bi_buf|=Y<<R.bi_valid&65535,R.bi_valid+=te)}function Q(R,Y,te){N(R,te[2*Y],te[2*Y+1])}function fe(R,Y){for(var te=0;te|=1&R,R>>>=1,te<<=1,0<--Y;);return te>>>1}function M(R,Y,te){var K,G,ie=new Array(x+1),he=0;for(K=1;K<=x;K++)ie[K]=he=he+te[K-1]<<1;for(G=0;G<=Y;G++){var ge=R[2*G+1];ge!==0&&(R[2*G]=fe(ie[ge]++,ge))}}function q(R){var Y;for(Y=0;Y<p;Y++)R.dyn_ltree[2*Y]=0;for(Y=0;Y<d;Y++)R.dyn_dtree[2*Y]=0;for(Y=0;Y<g;Y++)R.bl_tree[2*Y]=0;R.dyn_ltree[2*f]=1,R.opt_len=R.static_len=0,R.last_lit=R.matches=0}function ee(R){8<R.bi_valid?oe(R,R.bi_buf):0<R.bi_valid&&(R.pending_buf[R.pending++]=R.bi_buf),R.bi_buf=0,R.bi_valid=0}function ue(R,Y,te,K){var G=2*Y,ie=2*te;return R[G]<R[ie]||R[G]===R[ie]&&K[Y]<=K[te]}function me(R,Y,te){for(var K=R.heap[te],G=te<<1;G<=R.heap_len&&(G<R.heap_len&&ue(Y,R.heap[G+1],R.heap[G],R.depth)&&G++,!ue(Y,K,R.heap[G],R.depth));)R.heap[te]=R.heap[G],te=G,G<<=1;R.heap[te]=K}function xe(R,Y,te){var K,G,ie,he,ge=0;if(R.last_lit!==0)for(;K=R.pending_buf[R.d_buf+2*ge]<<8|R.pending_buf[R.d_buf+2*ge+1],G=R.pending_buf[R.l_buf+ge],ge++,K===0?Q(R,G,Y):(Q(R,(ie=T[G])+h+1,Y),(he=P[ie])!==0&&N(R,G-=L[ie],he),Q(R,ie=V(--K),te),(he=$[ie])!==0&&N(R,K-=se[ie],he)),ge<R.last_lit;);Q(R,f,Y)}function z(R,Y){var te,K,G,ie=Y.dyn_tree,he=Y.stat_desc.static_tree,ge=Y.stat_desc.has_stree,be=Y.stat_desc.elems,$e=-1;for(R.heap_len=0,R.heap_max=v,te=0;te<be;te++)ie[2*te]!==0?(R.heap[++R.heap_len]=$e=te,R.depth[te]=0):ie[2*te+1]=0;for(;R.heap_len<2;)ie[2*(G=R.heap[++R.heap_len]=$e<2?++$e:0)]=1,R.depth[G]=0,R.opt_len--,ge&&(R.static_len-=he[2*G+1]);for(Y.max_code=$e,te=R.heap_len>>1;1<=te;te--)me(R,ie,te);for(G=be;te=R.heap[1],R.heap[1]=R.heap[R.heap_len--],me(R,ie,1),K=R.heap[1],R.heap[--R.heap_max]=te,R.heap[--R.heap_max]=K,ie[2*G]=ie[2*te]+ie[2*K],R.depth[G]=(R.depth[te]>=R.depth[K]?R.depth[te]:R.depth[K])+1,ie[2*te+1]=ie[2*K+1]=G,R.heap[1]=G++,me(R,ie,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],function(Be,De){var Qe,Ge,_t,Je,Gt,hn,rt=De.dyn_tree,$t=De.max_code,Cn=De.stat_desc.static_tree,hr=De.stat_desc.has_stree,Zn=De.stat_desc.extra_bits,pr=De.stat_desc.extra_base,cn=De.stat_desc.max_length,In=0;for(Je=0;Je<=x;Je++)Be.bl_count[Je]=0;for(rt[2*Be.heap[Be.heap_max]+1]=0,Qe=Be.heap_max+1;Qe<v;Qe++)cn<(Je=rt[2*rt[2*(Ge=Be.heap[Qe])+1]+1]+1)&&(Je=cn,In++),rt[2*Ge+1]=Je,$t<Ge||(Be.bl_count[Je]++,Gt=0,pr<=Ge&&(Gt=Zn[Ge-pr]),hn=rt[2*Ge],Be.opt_len+=hn*(Je+Gt),hr&&(Be.static_len+=hn*(Cn[2*Ge+1]+Gt)));if(In!==0){do{for(Je=cn-1;Be.bl_count[Je]===0;)Je--;Be.bl_count[Je]--,Be.bl_count[Je+1]+=2,Be.bl_count[cn]--,In-=2}while(0<In);for(Je=cn;Je!==0;Je--)for(Ge=Be.bl_count[Je];Ge!==0;)$t<(_t=Be.heap[--Qe])||(rt[2*_t+1]!==Je&&(Be.opt_len+=(Je-rt[2*_t+1])*rt[2*_t],rt[2*_t+1]=Je),Ge--)}}(R,Y),M(ie,$e,R.bl_count)}function C(R,Y,te){var K,G,ie=-1,he=Y[1],ge=0,be=7,$e=4;for(he===0&&(be=138,$e=3),Y[2*(te+1)+1]=65535,K=0;K<=te;K++)G=he,he=Y[2*(K+1)+1],++ge<be&&G===he||(ge<$e?R.bl_tree[2*G]+=ge:G!==0?(G!==ie&&R.bl_tree[2*G]++,R.bl_tree[2*b]++):ge<=10?R.bl_tree[2*w]++:R.bl_tree[2*k]++,ie=G,$e=(ge=0)===he?(be=138,3):G===he?(be=6,3):(be=7,4))}function O(R,Y,te){var K,G,ie=-1,he=Y[1],ge=0,be=7,$e=4;for(he===0&&(be=138,$e=3),K=0;K<=te;K++)if(G=he,he=Y[2*(K+1)+1],!(++ge<be&&G===he)){if(ge<$e)for(;Q(R,G,R.bl_tree),--ge!=0;);else G!==0?(G!==ie&&(Q(R,G,R.bl_tree),ge--),Q(R,b,R.bl_tree),N(R,ge-3,2)):ge<=10?(Q(R,w,R.bl_tree),N(R,ge-3,3)):(Q(R,k,R.bl_tree),N(R,ge-11,7));ie=G,$e=(ge=0)===he?(be=138,3):G===he?(be=6,3):(be=7,4)}}l(se);var H=!1;function I(R,Y,te,K){N(R,(c<<1)+(K?1:0),3),function(G,ie,he,ge){ee(G),oe(G,he),oe(G,~he),s.arraySet(G.pending_buf,G.window,ie,he,G.pending),G.pending+=he}(R,Y,te)}i._tr_init=function(R){H||(function(){var Y,te,K,G,ie,he=new Array(x+1);for(G=K=0;G<u-1;G++)for(L[G]=K,Y=0;Y<1<<P[G];Y++)T[K++]=G;for(T[K-1]=G,G=ie=0;G<16;G++)for(se[G]=ie,Y=0;Y<1<<$[G];Y++)E[ie++]=G;for(ie>>=7;G<d;G++)for(se[G]=ie<<7,Y=0;Y<1<<$[G]-7;Y++)E[256+ie++]=G;for(te=0;te<=x;te++)he[te]=0;for(Y=0;Y<=143;)F[2*Y+1]=8,Y++,he[8]++;for(;Y<=255;)F[2*Y+1]=9,Y++,he[9]++;for(;Y<=279;)F[2*Y+1]=7,Y++,he[7]++;for(;Y<=287;)F[2*Y+1]=8,Y++,he[8]++;for(M(F,p+1,he),Y=0;Y<d;Y++)A[2*Y+1]=5,A[2*Y]=fe(Y,5);X=new ce(F,P,h+1,p,x),J=new ce(A,$,0,d,x),ne=new ce(new Array(0),D,0,g,_)}(),H=!0),R.l_desc=new j(R.dyn_ltree,X),R.d_desc=new j(R.dyn_dtree,J),R.bl_desc=new j(R.bl_tree,ne),R.bi_buf=0,R.bi_valid=0,q(R)},i._tr_stored_block=I,i._tr_flush_block=function(R,Y,te,K){var G,ie,he=0;0<R.level?(R.strm.data_type===2&&(R.strm.data_type=function(ge){var be,$e=4093624447;for(be=0;be<=31;be++,$e>>>=1)if(1&$e&&ge.dyn_ltree[2*be]!==0)return o;if(ge.dyn_ltree[18]!==0||ge.dyn_ltree[20]!==0||ge.dyn_ltree[26]!==0)return a;for(be=32;be<h;be++)if(ge.dyn_ltree[2*be]!==0)return a;return o}(R)),z(R,R.l_desc),z(R,R.d_desc),he=function(ge){var be;for(C(ge,ge.dyn_ltree,ge.l_desc.max_code),C(ge,ge.dyn_dtree,ge.d_desc.max_code),z(ge,ge.bl_desc),be=g-1;3<=be&&ge.bl_tree[2*S[be]+1]===0;be--);return ge.opt_len+=3*(be+1)+5+5+4,be}(R),G=R.opt_len+3+7>>>3,(ie=R.static_len+3+7>>>3)<=G&&(G=ie)):G=ie=te+5,te+4<=G&&Y!==-1?I(R,Y,te,K):R.strategy===4||ie===G?(N(R,2+(K?1:0),3),xe(R,F,A)):(N(R,4+(K?1:0),3),function(ge,be,$e,Be){var De;for(N(ge,be-257,5),N(ge,$e-1,5),N(ge,Be-4,4),De=0;De<Be;De++)N(ge,ge.bl_tree[2*S[De]+1],3);O(ge,ge.dyn_ltree,be-1),O(ge,ge.dyn_dtree,$e-1)}(R,R.l_desc.max_code+1,R.d_desc.max_code+1,he+1),xe(R,R.dyn_ltree,R.dyn_dtree)),q(R),K&&ee(R)},i._tr_tally=function(R,Y,te){return R.pending_buf[R.d_buf+2*R.last_lit]=Y>>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&Y,R.pending_buf[R.l_buf+R.last_lit]=255&te,R.last_lit++,Y===0?R.dyn_ltree[2*te]++:(R.matches++,Y--,R.dyn_ltree[2*(T[te]+h+1)]++,R.dyn_dtree[2*V(Y)]++),R.last_lit===R.lit_bufsize-1},i._tr_align=function(R){N(R,2,3),Q(R,f,F),function(Y){Y.bi_valid===16?(oe(Y,Y.bi_buf),Y.bi_buf=0,Y.bi_valid=0):8<=Y.bi_valid&&(Y.pending_buf[Y.pending++]=255&Y.bi_buf,Y.bi_buf>>=8,Y.bi_valid-=8)}(R)}},{"../utils/common":41}],53:[function(n,r,i){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,i){(function(s){(function(o,a){if(!o.setImmediate){var l,c,u,h,p=1,d={},g=!1,v=o.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(o);x=x&&x.setTimeout?x:o,l={}.toString.call(o.process)==="[object process]"?function(b){process.nextTick(function(){_(b)})}:function(){if(o.postMessage&&!o.importScripts){var b=!0,w=o.onmessage;return o.onmessage=function(){b=!1},o.postMessage("","*"),o.onmessage=w,b}}()?(h="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",f,!1):o.attachEvent("onmessage",f),function(b){o.postMessage(h+b,"*")}):o.MessageChannel?((u=new MessageChannel).port1.onmessage=function(b){_(b.data)},function(b){u.port2.postMessage(b)}):v&&"onreadystatechange"in v.createElement("script")?(c=v.documentElement,function(b){var w=v.createElement("script");w.onreadystatechange=function(){_(b),w.onreadystatechange=null,c.removeChild(w),w=null},c.appendChild(w)}):function(b){setTimeout(_,0,b)},x.setImmediate=function(b){typeof b!="function"&&(b=new Function(""+b));for(var w=new Array(arguments.length-1),k=0;k<w.length;k++)w[k]=arguments[k+1];var P={callback:b,args:w};return d[p]=P,l(p),p++},x.clearImmediate=y}function y(b){delete d[b]}function _(b){if(g)setTimeout(_,0,b);else{var w=d[b];if(w){g=!0;try{(function(k){var P=k.callback,$=k.args;switch($.length){case 0:P();break;case 1:P($[0]);break;case 2:P($[0],$[1]);break;case 3:P($[0],$[1],$[2]);break;default:P.apply(a,$)}})(w)}finally{y(b),g=!1}}}}function f(b){b.source===o&&typeof b.data=="string"&&b.data.indexOf(h)===0&&_(+b.data.slice(h.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Ke<"u"?Ke:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(W5);var u$=W5.exports;const d$=k0(u$),Ep="data:image/svg+xml,%3csvg%20viewBox='0%200%2077%2077'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M38.5%2077C59.752%2077%2077%2059.752%2077%2038.5C77%2017.248%2059.752%20-1.50787e-06%2038.5%20-3.36578e-06C17.248%20-5.22369e-06%205.22369e-06%2017.248%203.36578e-06%2038.5C1.50787e-06%2059.752%2017.248%2077%2038.5%2077ZM25.025%2035.6125L45.0065%2035.6125L38.3845%2028.9905C37.268%2027.874%2037.268%2026.026%2038.3845%2024.9095C38.962%2024.332%2039.6935%2024.0625%2040.425%2024.0625C41.1565%2024.0625%2041.888%2024.332%2042.4655%2024.9095L54.0155%2036.4595C55.132%2037.576%2055.132%2039.424%2054.0155%2040.5405L42.4655%2052.0905C41.349%2053.207%2039.501%2053.207%2038.3845%2052.0905C37.268%2050.974%2037.268%2049.126%2038.3845%2048.0095L45.0065%2041.3875L25.025%2041.3875C23.4465%2041.3875%2022.1375%2040.0785%2022.1375%2038.5C22.1375%2036.9215%2023.4465%2035.6125%2025.025%2035.6125Z'%20fill='%23383640'/%3e%3c/svg%3e",f$={width:"20",height:"20",viewBox:"0 0 22 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h$=["stroke"],p$=["stroke"],a2=Ae({__name:"crossIcon",props:{stroke:{}},setup(t){const e=t,n=Le(()=>e.stroke||"white");return(r,i)=>(U(),Z("svg",f$,[m("path",{d:"M2 2L19.7635 18.7374",stroke:n.value,"stroke-width":"3","stroke-linecap":"round"},null,8,h$),m("path",{d:"M19.7635 2L2 18.7374",stroke:n.value,"stroke-width":"3","stroke-linecap":"round"},null,8,p$)]))}}),g$="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.19%202H7.81C4.17%202%202%204.17%202%207.81v8.37C2%2019.83%204.17%2022%207.81%2022h8.37c3.64%200%205.81-2.17%205.81-5.81V7.81C22%204.17%2019.83%202%2016.19%202zm-5.7%2014.72c-.34.34-.79.57-1.34.64l-1.35.15c-.74.08-1.37-.55-1.29-1.3l.15-1.36c.13-1.21%201.14-1.98%202.21-2%20.1-.01.22%200%20.33.01.47.06.92.28%201.3.65.37.37.58.81.64%201.26.01.11.02.22.02.32%200%20.62-.23%201.19-.67%201.63zm6.95-9.17c-.72%201.8-2.37%204.16-3.94%205.7a3.3%203.3%200%200%200-2.8-2.74c1.54-1.58%203.92-3.25%205.73-3.98.32-.12.64-.03.84.17.2.22.3.53.17.85z'%20fill='%23FE8149'/%3e%3c/svg%3e",m$={},v$={width:"18",height:"18",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _$(t,e){return U(),Z("svg",v$,e[0]||(e[0]=[m("path",{d:"M6.08314 10.7155C5.99564 10.7155 5.91397 10.6921 5.83814 10.6396C5.71564 10.558 5.64564 10.4238 5.64564 10.278C5.64564 10.1905 5.6398 10.0971 5.62814 10.0038C5.57564 9.58963 5.38897 9.22796 5.07397 8.91296C4.75897 8.59796 4.36814 8.39963 3.94814 8.34713C3.87814 8.3413 3.77897 8.33546 3.68564 8.3413C3.53397 8.35296 3.39397 8.2888 3.30647 8.1663C3.21897 8.04963 3.19564 7.89213 3.2423 7.75213C3.3298 7.51296 3.45814 7.29713 3.6098 7.12213L4.50814 5.99046C6.05397 4.05963 9.18647 1.73796 11.479 0.816295C11.9631 0.629629 12.4823 0.740462 12.8381 1.09046C13.2056 1.45796 13.3165 1.98296 13.124 2.4613C12.2023 4.75963 9.88647 7.8863 7.95564 9.43213L6.80647 10.3538C6.59064 10.5113 6.41564 10.6105 6.24064 10.6805C6.19397 10.7038 6.13564 10.7155 6.08314 10.7155ZM4.3973 7.54796C4.8873 7.6763 5.3248 7.93296 5.6923 8.30046C6.0598 8.66213 6.3048 9.08213 6.4273 9.5488L7.41314 8.75546C9.2448 7.2913 11.444 4.32213 12.3131 2.14046C12.4006 1.92463 12.2781 1.77296 12.2198 1.72046C12.179 1.67963 12.0273 1.5513 11.794 1.6388C9.62397 2.5138 6.6548 4.71296 5.1848 6.54463L4.3973 7.54796Z",fill:"#3D3D3D"},null,-1),m("path",{d:"M2.38061 13.2693C1.94311 13.2693 1.52311 13.0943 1.20811 12.7793C0.846447 12.4177 0.671447 11.916 0.72978 11.4027L0.88728 9.96765C1.03895 8.54432 2.20561 7.48849 3.65228 7.45932C3.76311 7.45349 3.90895 7.45932 4.04311 7.47099C4.67895 7.55265 5.24478 7.83849 5.69978 8.29349C6.14895 8.74265 6.41728 9.27932 6.49895 9.88015C6.51645 10.0085 6.52811 10.1485 6.52811 10.271C6.52811 11.041 6.23061 11.7585 5.69395 12.301C5.24478 12.7443 4.66728 13.0185 4.01395 13.1002L2.57311 13.2577C2.50895 13.2635 2.44478 13.2693 2.38061 13.2693ZM3.76311 8.34015C3.73978 8.34015 3.71061 8.34015 3.68728 8.34015C2.80645 8.35765 1.87311 8.95849 1.75645 10.0668L1.59895 11.5018C1.56978 11.7468 1.65728 11.986 1.82645 12.161C1.99561 12.3302 2.23478 12.4177 2.47395 12.3885L3.90895 12.231C4.35811 12.1727 4.76061 11.986 5.06395 11.6827C5.43728 11.3093 5.64728 10.8077 5.64728 10.271C5.64728 10.1835 5.64145 10.0902 5.62978 9.99682C5.57728 9.58265 5.39061 9.22099 5.07561 8.90599C4.76061 8.59099 4.36978 8.39265 3.94978 8.34015C3.90311 8.34015 3.83311 8.34015 3.76311 8.34015Z",fill:"#3D3D3D"},null,-1),m("path",{d:"M8.30604 8.87831C8.06687 8.87831 7.86854 8.67997 7.86854 8.44081C7.86854 7.15747 6.82438 6.11914 5.54688 6.11914C5.30771 6.11914 5.10938 5.92081 5.10938 5.68164C5.10938 5.44247 5.30187 5.24414 5.54104 5.24414C7.30271 5.24414 8.73771 6.67914 8.73771 8.44081C8.74354 8.68581 8.54521 8.87831 8.30604 8.87831Z",fill:"#3D3D3D"},null,-1)]))}const b$=je(m$,[["render",_$]]),x$={},y$={width:"18",height:"18",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function w$(t,e){return U(),Z("svg",y$,e[0]||(e[0]=[m("path",{d:"M8.7513 13.2702H8.16797C7.9288 13.2702 7.73047 13.0718 7.73047 12.8327C7.73047 12.5935 7.9288 12.3952 8.16797 12.3952H8.7513C11.4405 12.3952 12.3971 11.4385 12.3971 8.74935V5.24935C12.3971 2.56018 11.4405 1.60352 8.7513 1.60352H5.2513C2.56214 1.60352 1.60547 2.56018 1.60547 5.24935V5.82102C1.60547 6.06018 1.40714 6.25852 1.16797 6.25852C0.928802 6.25852 0.730469 6.06018 0.730469 5.82102V5.24935C0.730469 2.08185 2.0838 0.728516 5.2513 0.728516H8.7513C11.9188 0.728516 13.2721 2.08185 13.2721 5.24935V8.74935C13.2721 11.9169 11.9188 13.2702 8.7513 13.2702Z",fill:"#3D3D3D"},null,-1),m("path",{d:"M7.58448 6.85409C7.47365 6.85409 7.36281 6.81326 7.27531 6.72575C7.10615 6.55659 7.10615 6.27659 7.27531 6.10742L9.45698 3.91992H8.16781C7.92865 3.91992 7.73031 3.72159 7.73031 3.48242C7.73031 3.24326 7.92281 3.04492 8.16781 3.04492H10.507C10.682 3.04492 10.8453 3.14992 10.9095 3.31326C10.9795 3.47659 10.9386 3.66326 10.8161 3.79159L7.89365 6.72575C7.80615 6.81326 7.69531 6.85409 7.58448 6.85409Z",fill:"#3D3D3D"},null,-1),m("path",{d:"M10.5039 6.26492C10.2647 6.26492 10.0664 6.06659 10.0664 5.82742V3.48242C10.0664 3.24326 10.2647 3.04492 10.5039 3.04492C10.7431 3.04492 10.9414 3.24326 10.9414 3.48242V5.82159C10.9414 6.06659 10.7431 6.26492 10.5039 6.26492Z",fill:"#3D3D3D"},null,-1),m("path",{d:"M4.58047 13.2715H3.00547C1.4538 13.2715 0.730469 12.5482 0.730469 10.9965V9.42148C0.730469 7.86982 1.4538 7.14648 3.00547 7.14648H4.58047C6.13214 7.14648 6.85547 7.86982 6.85547 9.42148V10.9965C6.85547 12.5482 6.13214 13.2715 4.58047 13.2715ZM3.00547 8.02148C1.93214 8.02148 1.60547 8.34815 1.60547 9.42148V10.9965C1.60547 12.0698 1.93214 12.3965 3.00547 12.3965H4.58047C5.6538 12.3965 5.98047 12.0698 5.98047 10.9965V9.42148C5.98047 8.34815 5.6538 8.02148 4.58047 8.02148H3.00547Z",fill:"#3D3D3D"},null,-1)]))}const C$=je(x$,[["render",w$]]),k$={},S$={width:"18",height:"18",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A$(t,e){return U(),Z("svg",S$,e[0]||(e[0]=[m("path",{d:"M5.83333 10.7904C5.83333 9.66278 4.91925 8.7487 3.79167 8.7487C2.66409 8.7487 1.75 9.66278 1.75 10.7904C1.75 11.9179 2.66409 12.832 3.79167 12.832C4.91925 12.832 5.83333 11.9179 5.83333 10.7904Z",stroke:"#292D32","stroke-width":"1.05","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),m("path",{d:"M12.2513 10.7904C12.2513 9.66278 11.3372 8.7487 10.2096 8.7487C9.08205 8.7487 8.16797 9.66278 8.16797 10.7904C8.16797 11.9179 9.08205 12.832 10.2096 12.832C11.3372 12.832 12.2513 11.9179 12.2513 10.7904Z",stroke:"#292D32","stroke-width":"1.05","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),m("path",{d:"M3.5 1.16953L9.32167 8.95703",stroke:"#292D32","stroke-width":"1.05","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),m("path",{d:"M10.4798 1.16953L4.65234 8.95703",stroke:"#292D32","stroke-width":"1.05","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const E$=je(k$,[["render",A$]]),$$={},T$={width:"18",height:"18",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P$(t,e){return U(),Z("svg",T$,e[0]||(e[0]=[m("path",{d:"M7 8.75C7.9665 8.75 8.75 7.9665 8.75 7C8.75 6.0335 7.9665 5.25 7 5.25C6.0335 5.25 5.25 6.0335 5.25 7C5.25 7.9665 6.0335 8.75 7 8.75Z",stroke:"#292D32","stroke-width":"0.875","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),m("path",{d:"M1.16797 7.51545V6.48879C1.16797 5.88212 1.6638 5.38045 2.2763 5.38045C3.33214 5.38045 3.7638 4.63379 3.23297 3.71795C2.92964 3.19295 3.11047 2.51045 3.6413 2.20712L4.65047 1.62962C5.1113 1.35545 5.7063 1.51879 5.98047 1.97962L6.04464 2.09045C6.56964 3.00629 7.43297 3.00629 7.9638 2.09045L8.02797 1.97962C8.30214 1.51879 8.89714 1.35545 9.35797 1.62962L10.3671 2.20712C10.898 2.51045 11.0788 3.19295 10.7755 3.71795C10.2446 4.63379 10.6763 5.38045 11.7321 5.38045C12.3388 5.38045 12.8405 5.87629 12.8405 6.48879V7.51545C12.8405 8.12212 12.3446 8.62379 11.7321 8.62379C10.6763 8.62379 10.2446 9.37045 10.7755 10.2863C11.0788 10.8171 10.898 11.4938 10.3671 11.7971L9.35797 12.3746C8.89714 12.6488 8.30214 12.4855 8.02797 12.0246L7.9638 11.9138C7.4388 10.998 6.57547 10.998 6.04464 11.9138L5.98047 12.0246C5.7063 12.4855 5.1113 12.6488 4.65047 12.3746L3.6413 11.7971C3.11047 11.4938 2.92964 10.8113 3.23297 10.2863C3.7638 9.37045 3.33214 8.62379 2.2763 8.62379C1.6638 8.62379 1.16797 8.12212 1.16797 7.51545Z",stroke:"#292D32","stroke-width":"0.875","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const D$=je($$,[["render",P$]]),B$={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F$=Ae({__name:"img2imgIcon",props:{fill:String},setup(t){return(e,n)=>(U(),Z("svg",B$,n[0]||(n[0]=[m("path",{d:"M2.1125 12.3801L2.1 12.3926C1.93125 12.0238 1.825 11.6051 1.78125 11.1426C1.825 11.5988 1.94375 12.0113 2.1125 12.3801Z"},null,-1),m("path",{d:"M6.12422 6.98672C6.94574 6.98672 7.61172 6.32074 7.61172 5.49922C7.61172 4.6777 6.94574 4.01172 6.12422 4.01172C5.3027 4.01172 4.63672 4.6777 4.63672 5.49922C4.63672 6.32074 5.3027 6.98672 6.12422 6.98672Z"},null,-1),m("path",{d:"M10.6188 1.75H5.38125C3.10625 1.75 1.75 3.10625 1.75 5.38125V10.6188C1.75 11.3 1.86875 11.8938 2.1 12.3938C2.6375 13.5813 3.7875 14.25 5.38125 14.25H10.6188C12.8938 14.25 14.25 12.8938 14.25 10.6188V9.1875V5.38125C14.25 3.10625 12.8938 1.75 10.6188 1.75ZM13.2313 8.3125C12.7438 7.89375 11.9562 7.89375 11.4688 8.3125L8.86875 10.5437C8.38125 10.9625 7.59375 10.9625 7.10625 10.5437L6.89375 10.3687C6.45 9.98125 5.74375 9.94375 5.24375 10.2812L2.90625 11.85C2.76875 11.5 2.6875 11.0938 2.6875 10.6188V5.38125C2.6875 3.61875 3.61875 2.6875 5.38125 2.6875H10.6188C12.3813 2.6875 13.3125 3.61875 13.3125 5.38125V8.38125L13.2313 8.3125Z"},null,-1)])))}}),I$={class:"edit-options-card"},R$=Ae({__name:"workspace-reuse-popup",emits:["useArtifactForImageToImage","useArtifactForInpaint","useArtifactForRemoveBackground","useArtifactForUpscale","useArtifactForControlnet"],setup(t){const e=re(!1),n=re(null);return en(n,()=>e.value=!1),(r,i)=>(U(),Z("div",{class:"reuse-menu-container",ref_key:"popupRef",ref:n},[m("button",{class:"workspace-control-btn",onClick:i[0]||(i[0]=Ee(s=>e.value=!e.value,["stop"])),id:"brush-btn-workflow-popup"},[i[6]||(i[6]=m("img",{src:g$,alt:"brush"},null,-1)),m("p",{class:ze(["label-text",{"max-label-text":e.value}])}," Continue Workflow ",2)]),Fe(m("div",I$,[m("button",{class:"btn card-btn",id:"image-to-image-btn-workflow-popup",onClick:i[1]||(i[1]=s=>{r.$emit("useArtifactForImageToImage"),e.value=!1})},[(U(),Xe(Vs(F$),{class:"image-to-image-icon"})),i[7]||(i[7]=He(" Image To Image "))]),m("button",{class:"btn card-btn",id:"inpaint-btn-workflow-popup",onClick:i[2]||(i[2]=s=>{r.$emit("useArtifactForInpaint"),e.value=!1})},[le(b$),i[8]||(i[8]=He(" Inpainting "))]),m("button",{class:"btn card-btn",id:"upscale-btn-workflow-popup",onClick:i[3]||(i[3]=s=>{r.$emit("useArtifactForUpscale"),e.value=!1})},[le(C$),i[9]||(i[9]=He(" Upscaling "))]),m("button",{class:"btn card-btn stroke",onClick:i[4]||(i[4]=s=>{r.$emit("useArtifactForRemoveBackground"),e.value=!1}),id:"removebg-btn-workflow-popup"},[le(E$),i[10]||(i[10]=He(" Background Removal "))]),m("button",{class:"btn card-btn stroke",id:"controlnet-btn-workflow-popup",onClick:i[5]||(i[5]=s=>{r.$emit("useArtifactForControlnet"),e.value=!1})},[le(D$),i[11]||(i[11]=He(" ControlNet "))])],512),[[et,e.value]])],512))}}),O$=je(R$,[["__scopeId","data-v-93961608"]]),M$=["width","height"],L$=["fill"],N$=Ae({__name:"ArtifactDownloadIcon",props:{fill:String,width:String,height:String},setup(t){return(e,n)=>(U(),Z("svg",{width:t.width||"20",height:t.height||"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m("path",{d:"M13.493 1.66797H6.50964C3.4763 1.66797 1.66797 3.4763 1.66797 6.50964V13.4846C1.66797 16.5263 3.4763 18.3346 6.50964 18.3346H13.4846C16.518 18.3346 18.3263 16.5263 18.3263 13.493V6.50964C18.3346 3.4763 16.5263 1.66797 13.493 1.66797ZM7.05964 9.1513C7.3013 8.90964 7.7013 8.90964 7.94297 9.1513L9.3763 10.5846V5.4263C9.3763 5.08464 9.65964 4.8013 10.0013 4.8013C10.343 4.8013 10.6263 5.08464 10.6263 5.4263V10.5846L12.0596 9.1513C12.3013 8.90964 12.7013 8.90964 12.943 9.1513C13.1846 9.39297 13.1846 9.79297 12.943 10.0346L10.443 12.5346C10.3846 12.593 10.318 12.6346 10.243 12.668C10.168 12.7013 10.0846 12.718 10.0013 12.718C9.91797 12.718 9.84297 12.7013 9.75963 12.668C9.68464 12.6346 9.61797 12.593 9.55964 12.5346L7.05964 10.0346C6.81797 9.79297 6.81797 9.4013 7.05964 9.1513ZM15.2013 14.3513C13.5263 14.9096 11.768 15.193 10.0013 15.193C8.23464 15.193 6.4763 14.9096 4.8013 14.3513C4.4763 14.243 4.3013 13.8846 4.40964 13.5596C4.51797 13.2346 4.86797 13.0513 5.2013 13.168C8.3013 14.2013 11.7096 14.2013 14.8096 13.168C15.1346 13.0596 15.493 13.2346 15.6013 13.5596C15.7013 13.893 15.5263 14.243 15.2013 14.3513Z",fill:t.fill||"#292D32"},null,8,L$)],8,M$))}}),U$=Ae({__name:"DownloadArtifact",props:{artifact:{}},setup(t){const e=t;function n(){var i,s;let r=`Cogniwerk-${(i=e.artifact)==null?void 0:i.fileName.slice(0,200)}`;r=r.replace(/([^a-zA-Z0-9_]|\.)+/g,"-").replace(/^-+/,"").replace(/-+$/,"")+".png",fetch((s=e.artifact)==null?void 0:s.url).then(o=>o.blob()).then(o=>{const a=document.createElement("a");a.href=URL.createObjectURL(o),a.setAttribute("download",r),document.body.appendChild(a),a.click()})}return(r,i)=>(U(),Z("button",{class:"download-btn",onClick:i[0]||(i[0]=s=>n())},[le(N$,{fill:"#fff",width:"24",height:"24"}),i[1]||(i[1]=m("p",{class:"label-text"},"Download",-1))]))}}),z$=je(U$,[["__scopeId","data-v-8adfcf78"]]),j$=["width","height"],H$=["fill"],V$=Ae({__name:"ShareIcon",props:{fill:String,width:String,height:String},setup(t){return(e,n)=>(U(),Z("svg",{width:t.width||"20",height:t.height||"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m("path",{d:"M13.49 1.664H6.505c-3.034 0-4.842 1.808-4.842 4.842v6.975c0 3.041 1.808 4.85 4.842 4.85h6.975c3.033 0 4.841-1.809 4.841-4.842V6.506c.009-3.034-1.8-4.842-4.833-4.842zm-6.293 9.008 3.65-3.65H8.822a.63.63 0 0 1-.625-.625.63.63 0 0 1 .625-.625h3.534c.083 0 .158.017.241.05.15.067.275.184.342.342.033.075.05.158.05.242v3.533a.63.63 0 0 1-.625.625.63.63 0 0 1-.625-.625V7.914l-3.658 3.642a.618.618 0 0 1-.442.183.618.618 0 0 1-.442-.183.629.629 0 0 1 0-.884zm8 3.675a16.454 16.454 0 0 1-5.2.842c-1.766 0-3.525-.283-5.2-.842a.628.628 0 0 1-.391-.791.618.618 0 0 1 .791-.392 15.278 15.278 0 0 0 9.609 0 .628.628 0 0 1 .791.392.636.636 0 0 1-.4.791z",fill:t.fill||"#292D32"},null,8,H$)],8,j$))}}),G$={key:0,class:"dropdown-content"},W$={class:"terms-modal"},q$={class:"modal-content"},K$={class:"btn-section"},Z$=Ae({__name:"ShareArtifact",props:{artifact:Object,workflow:Object},setup(t){const e=t,n=re(null),r=vt("showErrorModal"),i=Ct();n.value=i==null?void 0:i.appContext.config.globalProperties.$oidc.mgr.getUser();const s=i==null?void 0:i.appContext.config.globalProperties.$cogniwerk,o=re(!1),a=re(!1),l=re(null),c=re(null),u=vt("updateArtifactShare");en(l,()=>{a.value||(o.value=!1)});const h=()=>{a.value=!1},p=()=>{o.value=!o.value},d=async x=>{try{a.value=!0,await new Promise(w=>{const k=()=>{a.value=!1,w()};c.value&&c.value.addEventListener("click",k)});let _="";const f=async()=>{var $;const w=await s.createArtifactShareLink(n.value.access_token,{artifactId:($=e==null?void 0:e.artifact)==null?void 0:$.id,expertShare:x}),k=window.location.host,P=`${window.location.protocol}//${k}/share/${w.artifactLink}`;return _=w.artifactLink,P};if(navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<=-1){const w=new ClipboardItem({"text/plain":f()});navigator.clipboard.write([w])}else{const w=await f();navigator.clipboard.writeText(w)}St.success("Image link copied to clipboard"),u(e.workflow.id,{isShared:!0,linkId:_,expertShare:x}),p()}catch(y){console.log(y),r("CWES508")}},g=async()=>{a.value=!0,await new Promise(_=>{const f=()=>{a.value=!1,_()};c.value&&c.value.addEventListener("click",f)});const y=window.location.host;await navigator.clipboard.writeText(`${window.location.protocol}://${y}/share/${e.artifact.artifactShare.linkId}`),St.success("Image link copied to clipboard"),p()},v=async()=>{var x;try{console.log(e),await s.deleteArtifactShareLink(n.value.access_token,(x=e==null?void 0:e.artifact)==null?void 0:x.artifactShare.linkId),St.success("Image link Successfully Deleted"),u(e.workflow.id,{...e.artifact.artifactShare,isShared:!1}),p()}catch(y){console.log(y),r("CWES501")}};return(x,y)=>{var _,f,b,w,k,P,$,D,S,F,A,E,T,L,X,J,ne,se,ce,j,V,oe,N,Q,fe,M,q,ee,ue,me,xe,z,C,O,H,I,R,Y;return U(),Z(Se,null,[m("div",{class:"dropdown",ref_key:"dropdownRef",ref:l},[m("button",{class:"share-btn",onClick:p},[le(V$,{fill:"#fff",width:"24",height:"24"}),m("p",{class:ze(["label-text",{"max-label-text":o.value}])}," Share ",2)]),o.value?(U(),Z("div",G$,[Fe(m("button",{onClick:y[0]||(y[0]=te=>d(!1))},y[2]||(y[2]=[m("div",{class:"button-content"},[m("img",{src:Hs,alt:"icon"}),m("span",null,"Create Simple Link")],-1)]),512),[[et,((f=(_=t.artifact)==null?void 0:_.artifactShare)==null?void 0:f.linkId)&&((w=(b=t.artifact)==null?void 0:b.artifactShare)==null?void 0:w.isShared)&&((P=(k=t.artifact)==null?void 0:k.artifactShare)==null?void 0:P.expertShare)||!(($=t.artifact)!=null&&$.artifactShare)&&!((S=(D=t.artifact)==null?void 0:D.artifactShare)!=null&&S.isShared)||((F=t.artifact)==null?void 0:F.artifactShare.linkId)&&!((E=(A=t.artifact)==null?void 0:A.artifactShare)!=null&&E.isShared)]]),Fe(m("button",{onClick:v},y[3]||(y[3]=[m("div",{class:"button-content"},[m("img",{src:Jl,alt:"icon"}),m("span",null,"Delete Simple Link")],-1)]),512),[[et,((T=t.artifact)==null?void 0:T.artifactShare)&&((X=(L=t.artifact)==null?void 0:L.artifactShare)==null?void 0:X.isShared)&&!((ne=(J=t.artifact)==null?void 0:J.artifactShare)!=null&&ne.expertShare)]]),Fe(m("button",{onClick:v},y[4]||(y[4]=[m("div",{class:"button-content"},[m("img",{src:Jl,alt:"icon"}),m("span",null,"Delete Expert Link")],-1)]),512),[[et,((se=t.artifact)==null?void 0:se.artifactShare)&&((j=(ce=t.artifact)==null?void 0:ce.artifactShare)==null?void 0:j.isShared)&&((oe=(V=t.artifact)==null?void 0:V.artifactShare)==null?void 0:oe.expertShare)]]),Fe(m("button",{onClick:g},y[5]||(y[5]=[m("div",{class:"button-content"},[m("img",{src:Hs,alt:"icon"}),m("span",null,"Copy URL")],-1)]),512),[[et,((N=t.artifact)==null?void 0:N.artifactShare)&&((fe=(Q=t.artifact)==null?void 0:Q.artifactShare)==null?void 0:fe.isShared)]]),Fe(m("button",{onClick:y[1]||(y[1]=te=>d(!0))},y[6]||(y[6]=[m("div",{class:"button-content"},[m("img",{src:Hs,alt:"icon"}),m("span",null,"Create Expert Link")],-1)]),512),[[et,((q=(M=t.artifact)==null?void 0:M.artifactShare)==null?void 0:q.linkId)&&((ue=(ee=t.artifact)==null?void 0:ee.artifactShare)==null?void 0:ue.isShared)&&!((xe=(me=t.artifact)==null?void 0:me.artifactShare)!=null&&xe.expertShare)||!((z=t.artifact)!=null&&z.artifactShare)&&!((O=(C=t.artifact)==null?void 0:C.artifactShare)!=null&&O.isShared)||((I=(H=t.artifact)==null?void 0:H.artifactShare)==null?void 0:I.linkId)&&!((Y=(R=t.artifact)==null?void 0:R.artifactShare)!=null&&Y.isShared)]])])):we("",!0)],512),Fe(m("div",W$,[m("div",q$,[y[7]||(y[7]=m("h2",{class:"terms-modal-header"},"Important!",-1)),y[8]||(y[8]=m("p",{class:"terms-modal-text"},[He(" Please make sure that you have read the "),m("a",{target:"_blank",href:"https://cogniwerk.ai/privacy"},"Terms of Use"),He(". Only share created content if you have made sure that the content complies with the relevant laws and standards. ")],-1)),m("div",K$,[m("button",{onClick:h,ref_key:"agreeRef",ref:c},"Understood",512)])])],512),[[et,a.value]])],64)}}}),Y$=je(Z$,[["__scopeId","data-v-af3433b8"]]),X$={class:"enlarged-img"},Q$={class:"img-container"},J$={class:"btns-container"},eT={class:"left-controls"},tT={class:"inspector-popup"},nT={class:"background-image"},rT=["src"],iT=Ae({__name:"FocusedArtifactPopup",props:{artifact:Object,isModalRightArrowButtonDisabled:Boolean,isModalLeftArrowButtonDisabled:Boolean,hideNavigationControls:Boolean,workflow:{type:Object,default:null}},emits:["closeFocusedPopup","useArtifactForImageToImage","useArtifactForInpaint","useArtifactForRemoveBackground","useArtifactForUpscale","useArtifactForControlnet","useGenerationData","clearImage","onShowNextWorkflow","onShowPreviousWorkflow","refetchWorkflows","removeWorkflow"],setup(t){const e=re(null),n=re(!1),r=re(null);return en(r,()=>n.value=!1),ut(()=>{document.body.style.overflow="hidden"}),bi(()=>{document.body.style.overflow="auto"}),(i,s)=>{var o,a;return U(),Z("div",X$,[m("div",Q$,[m("div",J$,[m("div",eT,[le(O$,{onUseArtifactForInpaint:s[0]||(s[0]=l=>{i.$emit("useArtifactForInpaint"),i.$emit("closeFocusedPopup")}),onUseArtifactForImageToImage:s[1]||(s[1]=l=>{i.$emit("useArtifactForImageToImage"),i.$emit("closeFocusedPopup")}),onUseArtifactForUpscale:s[2]||(s[2]=l=>{i.$emit("useArtifactForUpscale"),i.$emit("closeFocusedPopup")}),onUseArtifactForRemoveBackground:s[3]||(s[3]=l=>{i.$emit("useArtifactForRemoveBackground"),i.$emit("closeFocusedPopup")}),onUseArtifactForControlnet:s[4]||(s[4]=l=>{i.$emit("useArtifactForControlnet"),i.$emit("closeFocusedPopup")})}),le(z$,{artifact:t.artifact},null,8,["artifact"]),((o=t.artifact)==null?void 0:o.aiModel)!=="user-upload"?(U(),Xe(Y$,{key:0,artifact:t.artifact,workflow:t.workflow},null,8,["artifact","workflow"])):we("",!0),m("div",{class:"inspector-container",ref_key:"inspectorRef",ref:r},[m("button",{class:"btn inspector-btn",onClick:s[5]||(s[5]=l=>n.value=!n.value),id:"artifact-settings-btn"},[s[14]||(s[14]=m("img",{src:Xl,alt:"settings"},null,-1)),m("p",{class:ze(["label-text",{"max-label-text":n.value}])}," Inspector ",2)]),Fe(m("div",tT,[(U(),Xe(t1,{key:t.artifact.id,mainImageArtifact:t.artifact,onClosePopup:s[6]||(s[6]=l=>n.value=!1),onUseGenerationData:s[7]||(s[7]=l=>{i.$emit("useGenerationData",t.artifact),i.$emit("closeFocusedPopup")}),onClearImage:s[8]||(s[8]=l=>i.$emit("clearImage")),onRefetchWorkflows:s[9]||(s[9]=l=>{i.$emit("refetchWorkflows"),i.$emit("closeFocusedPopup")}),onRemoveWorkflow:s[10]||(s[10]=l=>{i.$emit("removeWorkflow",l)}),workflow:t.workflow},null,8,["mainImageArtifact","workflow"]))],512),[[et,n.value]])],512)]),m("button",{class:"cross-btn btn",onClick:s[11]||(s[11]=l=>i.$emit("closeFocusedPopup"))},[le(a2,{stroke:"#fff"})])]),!t.isModalLeftArrowButtonDisabled&&!t.hideNavigationControls?(U(),Z("button",{key:0,class:"left-arrow-button",onClick:s[12]||(s[12]=l=>i.$emit("onShowPreviousWorkflow"))},s[15]||(s[15]=[m("img",{src:Ep,alt:"right"},null,-1)]))):we("",!0),!t.isModalRightArrowButtonDisabled&&!t.hideNavigationControls?(U(),Z("button",{key:1,class:"right-arrow-button",onClick:s[13]||(s[13]=l=>i.$emit("onShowNextWorkflow"))},s[16]||(s[16]=[m("img",{src:Ep,alt:"right"},null,-1)]))):we("",!0),m("div",nT,[m("img",{src:(a=t.artifact)==null?void 0:a.url,ref_key:"imagePopupRef",ref:e,alt:"image",class:"focused-img"},null,8,rT)])])])}}}),sT=je(iT,[["__scopeId","data-v-b5172f59"]]),oT="data:image/svg+xml,%3csvg%20width='487'%20height='441'%20viewBox='0%200%20487%20441'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M39.074%2040.9825C85.8392%20-8.32751%20161.661%20-8.32751%20208.426%2040.9825L243.5%2077.9651L278.574%2040.9825C325.339%20-8.32751%20401.161%20-8.32751%20447.926%2040.9825C494.691%2090.2926%20494.691%20170.24%20447.926%20219.55L243.5%20435.1L39.074%20219.55C-7.69132%20170.24%20-7.69132%2090.2926%2039.074%2040.9825Z'%20stroke='%237C788E'%20stroke-opacity='0.2'%20stroke-width='7'%20stroke-linecap='round'%20/%3e%3c/svg%3e",aT={};function lT(t,e){return e[0]||(e[0]=ma('<div style="margin-top:2rem;padding:1rem;" data-v-d6261d0b><span class="title" data-v-d6261d0b>You have no favourite model yet</span><br data-v-d6261d0b><a href="/" class="sub-title" data-v-d6261d0b>Explore our Models</a></div><div class="no-favourite" style="max-width:80vw;" data-v-d6261d0b><img src="'+oT+'" alt="favorite" data-v-d6261d0b></div>',2))}const cT=je(aT,[["render",lT],["__scopeId","data-v-d6261d0b"]]),uT=["href"],dT=["title"],fT={class:"model-img",alt:"model image"},hT={class:"model-info"},pT={class:"text-content"},gT=["title"],mT=["innerHTML"],vT={class:"use-btn-container"},_T={key:0},bT={key:1},xT="https://cms.cogniwerk.ai/assets/",yT=Ae({__name:"newModelCard",props:{model:{}},setup(t){const e=t,n=$n(),r=Le(()=>{var u,h,p;return((h=(u=e==null?void 0:e.model)==null?void 0:u.name)==null?void 0:h.length)>35?((p=e.model.name)==null?void 0:p.slice(0,35))+"...":e.model.name});function i(u){window.open(u,"_blank")}function s(u){return u.replace(/(<([^>]+)>)/gi,"")}function o(u){u=s(u);let h=u.slice(0,u.slice(40).indexOf(" ")+40);return h.length<u.length&&(h+=" …"),h}function a(u){switch(u){case"do_it_yourself":return"Do It Yourself";case"external_service":return"External Service";case"ready_to_use":return"Ready To Use";case"under_review":return"Under Review"}return u}function l(){e.model.usability!=="ready_to_use"?window.open(e.model.webservice_url):vn()?n.push(`/run-model-mobile/${e.model.slug}`):n.push(`/run-model/${e.model.slug}`)}const c=Le(()=>vn()?j5.includes(e.model.slug):!0);return(u,h)=>{var d,g;const p=pa("lazyload");return u.model?(U(),Z("a",{key:0,class:"model-card",onClick:h[1]||(h[1]=Ee(v=>u.$router.push(`/model/${u.model.slug}`),["prevent"])),onAuxclick:h[2]||(h[2]=v=>i(`/model/${u.model.slug}`)),href:`/model/${u.model.slug}`},[m("div",{class:"servicetype-icon",title:a(u.model.usability)},[le(e2,{usability:u.model.usability,fill:"#fff"},null,8,["usability"])],8,dT),Fe(m("img",fT,null,512),[[p,`${xT}${(g=(d=u.model.images[0])==null?void 0:d.directus_files_id)==null?void 0:g.id}?width=400`]]),m("div",hT,[m("div",pT,[m("h2",{class:"model-name",title:r.value??""},ve(r.value),9,gT),m("p",{class:"model-subtext",innerHTML:u.model.teaser||o(u.model.description)},null,8,mT)]),m("div",vT,[m("button",{class:"use-btn",onClick:h[0]||(h[0]=Ee(v=>l(),["stop","prevent"]))},[u.model.usability==="ready_to_use"&&c.value?(U(),Z("span",_T,"Use now")):(U(),Z("span",bT,"Visit"))])])])],40,uT)):we("",!0)}}}),q5=je(yT,[["__scopeId","data-v-106165cf"]]),wT=Ae({__name:"FavouriteModels",props:{id:{}},async setup(t){let e,n;const r=t,i=["id","webservice_url","slug","usability","images.directus_files_id.id","tags.tags_id.id","tags.tags_id.tag","teaser","description","name"],s=([e,n]=ci(()=>Tt.getInstance().getModels({"filter[slug][_eq]":r.id},i)),e=await e,n(),e);return console.debug("favourite models",r.id,s),(o,a)=>(U(),Xe(q5,{model:de(s)[0]},null,8,["model"]))}}),CT=je(wT,[["__scopeId","data-v-808fd244"]]),kT={props:["likes","id"],emits:["oncreation"],components:{FavouriteEmpty:cT,FavouriteModels:CT},data(){return{favourite:!0}},mounted(){this.$emit("oncreation")}},ST={class:"row-container"},AT={key:0,class:"row-items"},ET={key:1,style:{position:"relative"},class:"row-items"};function $T(t,e,n,r,i,s){const o=xr("FavouriteModels"),a=xr("FavouriteEmpty");return U(),Z("div",ST,[n.likes.length>0?(U(),Z("div",AT,[(U(!0),Z(Se,null,Ye(n.likes,l=>(U(),Xe(o,{key:l.toString(),id:l.toString()},null,8,["id"]))),128))])):(U(),Z("div",ET,[le(a)]))])}const TT=je(kT,[["render",$T],["__scopeId","data-v-6d706a64"]]),PT={class:"user-profile mb-5 pb-5 px-lg-5 px-3"},DT={id:"popup-wrapper"},BT={id:"newsletter"},FT={id:"popup-button-wrapper"},IT={key:0,class:"d-flex flex-lg-nowrap flex-wrap justify-content-md-start"},RT={class:"tab-container"},OT=Ae({__name:"user-profile",setup(t){const e=Ct(),n=re(null),r=re(!1),i=re(!1),s=re([]),o=Pt({}),a=re(!1),l=re(!1),c=re(!1),u=$n(),h=re([]);o.showProfileEdit=!1,o.filteredWfs={},o.currentTab="all",o.sortField="none",o.sortReversed=!0,o.likedModels=[],o.modal={show:!1,artifactUri:"",workflow:null},o.selectedWorkflowIndices=[],o.sortKey="",o.currentPage=1;const p=o2(),d=Pt({error_code:"",headline:"",text:"",icon:"",feedback:!1,link:null,buttons:[]});function g(N){const Q=s.value.find(fe=>fe.error_code===N);Q&&(Object.assign(d,Q),i.value=!0)}function v(){i.value=!1,Object.assign(d,{error_code:"",headline:"",text:"",icon:"",feedback:!1,link:null,buttons:[]})}mn("showErrorModal",g);function x(){o.modal.show=!1}function y(){e==null||e.appContext.config.globalProperties.$oidc.signOut()}const _=N=>{switch(N.keyCode){case 37:P.value||w();break;case 39:$.value||k();break}};at(o.modal,N=>{N.show?addEventListener("keydown",_,!0):removeEventListener("keydown",_,!0)});function f(N,Q,fe){if(!Q)return;const M=Q.lastArtifact;o.modal.show=!0,o.modal.artifact=M,o.modal.workflow=Q,o.selectedWorkflowIndices=[N],o.sortField!=="none"&&(o.sortKey=fe)}const b=Le(()=>{const N=JSON.parse(JSON.stringify(o==null?void 0:o.workflows))||[];switch(o==null?void 0:o.currentTab){case"uploads":return N==null?void 0:N.filter(Q=>Q.lastArtifact.aiModel==="user-upload");case"creations":return N==null?void 0:N.filter(Q=>Q.lastArtifact.aiModel!=="user-upload");default:return N}});function w(){var N,Q,fe,M;if(o.sortField=="none"){if((N=o==null?void 0:o.selectedWorkflowIndices)!=null&&N.length&&((Q=b==null?void 0:b.value)!=null&&Q.length)){const q=o.selectedWorkflowIndices[0],ee=b.value[q-1];f(q-1,ee)}}else if((fe=o==null?void 0:o.selectedWorkflowIndices)!=null&&fe.length&&((M=b==null?void 0:b.value)!=null&&M.length)){const q=o.selectedWorkflowIndices[0];if(o.filteredWfs[o.sortKey][q-1]){const ee=o.filteredWfs[o.sortKey][q-1];f(q-1,ee,o.sortKey)}}}function k(){var N,Q,fe,M;if(o.sortField=="none"){if((N=o==null?void 0:o.selectedWorkflowIndices)!=null&&N.length&&((Q=b==null?void 0:b.value)!=null&&Q.length)){const q=o.selectedWorkflowIndices[0],ee=b.value[q+1];f(q+1,ee)}}else if((fe=o==null?void 0:o.selectedWorkflowIndices)!=null&&fe.length&&((M=b==null?void 0:b.value)!=null&&M.length)){const q=o.selectedWorkflowIndices[0];if(o.filteredWfs[o.sortKey][q+1]){const ee=o.filteredWfs[o.sortKey][q+1];f(q+1,ee,o.sortKey)}}}const P=Le(()=>{var N,Q,fe;return o.sortField=="none"?(N=o==null?void 0:o.selectedWorkflowIndices)!=null&&N.length?o.selectedWorkflowIndices[0]===0:!0:(Q=o==null?void 0:o.selectedWorkflowIndices)!=null&&Q.length&&((fe=o.filteredWfs[o.sortKey])!=null&&fe.length)?o.selectedWorkflowIndices[0]===0:!0}),$=Le(()=>{var N,Q,fe,M;return o.sortField=="none"?(N=o==null?void 0:o.selectedWorkflowIndices)!=null&&N.length&&((Q=b==null?void 0:b.value)!=null&&Q.length)?o.selectedWorkflowIndices[0]===b.value.length-1:!0:(fe=o==null?void 0:o.selectedWorkflowIndices)!=null&&fe.length&&((M=o.filteredWfs[o.sortKey])!=null&&M.length)?o.selectedWorkflowIndices[0]===o.filteredWfs[o.sortKey].length-1:!0});async function D(N,Q){const fe=window.prompt("Please enter the new name");if(fe)try{await F.renameArtifact(n.value.access_token,Q.lastArtifact.id,fe),St.success("renamed creation successfully");const M=o.workflows.find(q=>q.id===Q.id);M&&(M.lastArtifact.fileName=fe)}catch{g("CWES502");return}}function S(N,Q,fe){if(!o.workflows&&!fe)return;if(N=N||o.sortField,N=="none")return o.sortField=N,o.sortReversed=!0,fe||o.workflows.map(xe=>Object.assign({},xe));Q===!0&&N===o.sortField?o.sortReversed=!o.sortReversed:N!==o.sortField&&(o.sortReversed=!0),o.sortField=N;const M=o.sortReversed,ee=(fe||o.workflows.map(me=>Object.assign({},me))).map(me=>Object.assign({},me))||[];let ue={};if(o.sortField=="name"){ee.forEach(z=>{var O,H,I;let C;if((O=z.artifacts)!=null&&O.length&&((H=z.artifacts[0])!=null&&H.fileName)){let R;z.artifacts[0].fileName[0]=='"'?R=z.artifacts[0].fileName.replace(/^\s*([a-zA-Z\s]+)\s*$/,"$1").split('"')[1].trim()[0]:R=z.artifacts[0].fileName.trim()[0],R?C=R.toUpperCase():C="#"}else{const R=(I=z.lastArtifact.inputs)==null?void 0:I.prompt;let Y;if(R?Y=R.trim()[0]:Y="#",!Y)return;C=Y.toUpperCase()}/^[a-zA-Z]/.test(C)||(C="#"),ue[C]||(ue[C]=[]),ue[C].push(z)});let me;M!=!1?me=Object.keys(ue).sort((z,C)=>z==="#"?1:C==="#"?-1:z.localeCompare(C)):me=Object.keys(ue).sort((z,C)=>z==="#"?1:C==="#"?-1:C.localeCompare(z));const xe={};me.forEach(z=>{xe[z]=ue[z]}),ue=xe}else if(o.sortField=="date"){ee.forEach(me=>{const z=new Date(me.lastArtifact.createdAt).toLocaleDateString();if(z==="Invalid Date"){console.error("failed to find localTime for wf, skipping",me);return}ue[z]||(ue[z]=[]),ue[z].push(me)}),M!=!0&&(ue=Object.fromEntries(Object.entries(ue).reverse()));for(const[me,xe]of Object.entries(ue))Array.isArray(xe)&&(ue[me]=xe.reverse())}else o.sortField=="model"&&(ee.forEach(me=>{let xe=me.lastArtifact.aiModel;xe.startsWith("civitai")&&(xe="civitai"),ue[xe]||(ue[xe]=[]),ue[xe].push(me)}),M!=!0&&(ue=Object.fromEntries(Object.entries(ue).reverse())));return o.filteredWfs=ue,ee}let F,A;ut(async()=>{var Q,fe;if(p.initializePresets(),n.value=await(e==null?void 0:e.appContext.config.globalProperties.$oidc.mgr.getUser()),!n.value){localStorage.setItem("login-return-path","/profile"),window.location.replace("/login");return}F=e==null?void 0:e.appContext.config.globalProperties.$cogniwerk;try{if(await F.loadAccount(n.value.access_token,n.value.profile,!0),!((Q=F.account)!=null&&Q.email)){const M=JSON.stringify(n.value.profile);throw new Error(`failed to load account with profile=${M}`)}}catch(M){console.debug("error loading account",M),F.log(`Error loading account: ${M}`),r.value=!0}o.account=F.account,A=async function(M,q){let ee=(await F.getWorkflows(n.value.access_token,M,q)).workflows;ee=bl(ee);const ue=JSON.stringify(ee.map(me=>{var xe;return(xe=me.lastArtifact)==null?void 0:xe.updatedAt}))+o.sortField;ue!==o.version&&(ee=S(null,!1,ee),o.workflows=ee,o.version=ue)},await A(1,Zu),setInterval(async function(){let q=(await F.getWorkflows(n.value.access_token,1,10)).workflows;if(q=bl(q),o.workflows.length===0&&q.length>0)o.workflows=q;else if(q.length>0&&o.workflows.length>0){const ee=o.workflows.slice(0,10);q.reverse().forEach(ue=>{if(ue.dbId>ee[0].dbId)o.workflows.unshift(ue);else{const me=ee.findIndex(xe=>xe.id===ue.id);me>=0&&(o.workflows[me]=ue)}})}},2e4),console.debug("cogniwerk account and workflows loaded",o),Tt.getInstance().getErrorValues().then(M=>{s.value=M});const N=new Set(JSON.parse(((fe=o.account)==null?void 0:fe.likedEntities)||"null")||[]);N.size>0?o.likedModels=[...N].map(M=>M.split("·").pop()):o.likedModels=[],F.getWorkflowsCount(n.value.access_token).then(async M=>{const q=M.count,ee=Math.ceil(q/Zu);for(;o.currentPage<ee;)try{let ue=(await F.getWorkflows(n.value.access_token,o.currentPage+1,Zu)).workflows;if(ue!=null&&ue.length)ue=bl(ue),o.workflows.push(...ue),o.currentPage+=1;else break}catch{break}}).catch(M=>{console.log(M)})});function E(N){console.log("remove-workflow",N),o.workflows=o.workflows.filter(Q=>Q.id!==N),o.sortField!=="none"&&S(null,!1,o.workflows)}async function T(){if(h.value.length===0){g("CWES504");return}if(window.confirm("Are you sure you want to delete all these artifacts?")){try{await F.deleteMultipleArtifacts(n.value.access_token,h.value);const Q=new Set(h.value);o.workflows=o.workflows.filter(fe=>!Q.has(fe.id)),o.sortField!=="none"&&S(null,!1,o.workflows)}catch(Q){console.log(Q),g("CWES505");return}St.success("Deleted creations successfully"),h.value=[],l.value=!1}}const L=async()=>{if(h.value.length===0){console.error("Please select at least 1 artifact before downloading!");return}const N=new d$,fe=o.workflows.filter(q=>h.value.includes(q.lastArtifact.id)).map(q=>q.lastArtifact).map(async(q,ee)=>{const xe=`Cogniwerk-${q.fileName.replace(/([^a-zA-Z0-9_]|\.)+/g,"-").replace(/^-+/,"").replace(/-+$/,"").substring(0,200)}-${ee}.png`;try{const z=await fetch(q.url);if(!z.ok)throw new Error(`Failed to fetch image ${ee+1}`);const C=await z.blob();N.file(xe,C)}catch(z){console.error(`Failed to fetch or add image ${ee+1}:`,z)}});await Promise.all(fe);const M=new Date;try{const q=await N.generateAsync({type:"blob"}),ee=document.createElement("a");ee.href=URL.createObjectURL(q),ee.setAttribute("download",`cogniwerk_download_${M.toLocaleString()}.zip`),document.body.appendChild(ee),ee.click()}catch(q){console.error("Failed to generate or download zip file:",q)}};async function X(N){if(!N&&!o.modal.artifact){console.error("no artifact is selected");return}if(!window.confirm("Are you sure you want to delete this creation?"))return;let fe;N.stage==="error"&&(fe=-N.dbId);try{await F.deleteArtifact(n.value.access_token,fe)}catch{g("CWES505");return}St.success("deleted creation successfully"),o.modal.show=!1}function J(N){if(!N&&(N=o.modal.artifact,!N)){console.error("no artifact is selected");return}let Q=`Cogniwerk-${N.fileName}`;Q=Q.replace(/([^a-zA-Z0-9_]|\.)+/g,"-").replace(/^-+/,"").replace(/-+$/,"")+".png",fetch(N.url).then(fe=>fe.blob()).then(fe=>{const M=document.createElement("a");M.href=URL.createObjectURL(fe),M.setAttribute("download",Q),document.body.appendChild(M),M.click()})}const ne=N=>{h.value.includes(N)?h.value=h.value.filter(fe=>fe!==N):h.value.push(N)},se=()=>{var fe,M;if((fe=o==null?void 0:o.workflows)==null?void 0:fe.every(q=>{var ee,ue;return q.stage!=="error"&&q.stage!=="running"?h.value.includes((ee=q.lastArtifact)==null?void 0:ee.id):q.stage==="error"&&q.lastArtifact.id?h.value.includes((ue=q.lastArtifact)==null?void 0:ue.id):q.stage==="error"&&!q.lastArtifact.id?h.value.includes(-q.dbId):!0})){h.value=[];return}const Q=(M=o==null?void 0:o.workflows)==null?void 0:M.map(q=>{var ee,ue;if(q.stage!=="error"&&q.stage!=="running")return(ee=q.lastArtifact)==null?void 0:ee.id;if(q.stage==="error"&&q.lastArtifact.id)return(ue=q.lastArtifact)==null?void 0:ue.id;if(q.stage==="error"&&!q.lastArtifact.id)return-q.dbId});h.value=Q},ce=N=>{N.key==="Escape"&&l.value&&(h.value=[],l.value=!1)};function j(N){localStorage.setItem("gallery-selected-artifact",JSON.stringify(N)),u.push("/run-model/stable-diffusion?from=gallery")}function V(N,Q){switch(o.sortField==="none"?N={...N,to:Q}:N={...N,to:Q},localStorage.setItem("gallery-selected-artifact",JSON.stringify(N)),Q){case"image2image":u.push("/run-model/img2img");break;case"inpaint":u.push("/run-model/realistic-vision-inpainting");break;case"upscale":u.push("/run-model/aura-sr");break;case"removeBg":u.push("/run-model/remove-bg");break;case"controlnet":localStorage.setItem("gallery-selected-artifact",JSON.stringify({...N,controlnetImgUrl:N.url})),u.push("/run-model/sdxl");break}}function oe(N,Q){const fe=o.workflows.find(M=>M.id===N);fe&&(fe.lastArtifact.artifactShare=Q,a.value=!a.value)}return mn("updateArtifactShare",oe),(N,Q)=>(U(),Z("div",{onKeydown:ce,tabindex:"0",class:"parent-container"},[le(Fn),m("div",PT,[r.value?(U(),Xe(sr,{key:0},{default:mt(()=>[Fe(m("div",DT,[m("div",BT,[Q[14]||(Q[14]=m("div",{class:"error-container"}," Oops! An error occurred, you might need to sign in again. ",-1)),m("div",FT,[m("button",{onClick:Q[0]||(Q[0]=Ee(fe=>y(),["prevent"]))},"Sign In")])])],512),[[et,!0]])]),_:1})):(U(),Z(Se,{key:1},[o.showProfileEdit?we("",!0):(U(),Z("div",IT,[m("div",RT,[le(n$,{CWAccount:o,onUpdateSort:Q[1]||(Q[1]=fe=>S(fe,!0)),onUpdateTab:Q[2]||(Q[2]=fe=>o.currentTab=fe),isMultiSelectMode:l.value,onUpdateMultiSelectMode:Q[3]||(Q[3]=fe=>{l.value=fe,fe||(h.value=[])}),onToggleSelectAll:se,selectedArtifacts:h.value,onDeleteMultipleArtifacts:T,onDownloadMultipleArtifacts:L,isSortingMode:c.value,onInSortingMode:Q[4]||(Q[4]=()=>c.value=!c.value)},null,8,["CWAccount","isMultiSelectMode","selectedArtifacts","isSortingMode"]),["all","creations","uploads"].includes(o.currentTab)?(U(),Xe(AE,{key:0,CWAccount:o,onShowWorkflow:Q[5]||(Q[5]=(fe,M,q)=>f(fe,M,q)),onRenameWorkflow:Q[6]||(Q[6]=(fe,M)=>D(fe,M)),currentTab:o.currentTab,onDeleteArtifact:Q[7]||(Q[7]=fe=>X(fe)),onDownloadArtifact:J,isMultiSelectMode:l.value,selectedArtifacts:h.value,onToggleSelectedArtifact:ne,onRemoveWorkflow:E,onCloseFocusMode:x,isSortingMode:c.value},null,8,["CWAccount","currentTab","isMultiSelectMode","selectedArtifacts","isSortingMode"])):we("",!0),o.currentTab==="favourite-models"?(U(),Xe(TT,{key:1,class:"d-flex",likes:o.likedModels},null,8,["likes"])):we("",!0)])])),o.modal.show?(U(),Xe(sT,{key:1,artifact:o.modal.artifact,onCloseFocusedPopup:x,onUseArtifactForImageToImage:Q[8]||(Q[8]=fe=>V(o.modal.artifact,"image2image",o.modal.sortField)),onUseArtifactForInpaint:Q[9]||(Q[9]=fe=>V(o.modal.artifact,"inpaint",o.modal.sortField)),onUseArtifactForUpscale:Q[10]||(Q[10]=fe=>V(o.modal.artifact,"upscale",o.modal.sortField)),onUseArtifactForRemoveBackground:Q[11]||(Q[11]=fe=>V(o.modal.artifact,"removeBg",o.modal.sortField)),onUseArtifactForControlnet:Q[12]||(Q[12]=fe=>V(o.modal.artifact,"controlnet",o.modal.sortField)),onUseGenerationData:Q[13]||(Q[13]=fe=>j(o.modal.artifact,o.modal.sortField)),onOnShowPreviousWorkflow:w,onOnShowNextWorkflow:k,onRemoveWorkflow:E,isModalLeftArrowButtonDisabled:P.value,isModalRightArrowButtonDisabled:$.value,workflow:o.modal.workflow},null,8,["artifact","isModalLeftArrowButtonDisabled","isModalRightArrowButtonDisabled","workflow"])):we("",!0)],64)),le(c$)]),d?(U(),Xe(G5,{key:0,class:"error-modal",visible:i.value,heading:d==null?void 0:d.headline,text:d==null?void 0:d.text,buttons:d==null?void 0:d.buttons,link:d==null?void 0:d.link,showFeedback:d==null?void 0:d.feedback,icon:d==null?void 0:d.icon,onClose:v},null,8,["visible","heading","text","buttons","link","showFeedback","icon"])):we("",!0)],32))}}),MT=je(OT,[["__scopeId","data-v-77905107"]]),LT={key:0,id:"feedback"},NT=Ae({__name:"F0F",setup(t){return(e,n)=>(U(),Z(Se,null,[m("header",null,[le(Fn)]),m("main",null,[n[3]||(n[3]=m("div",{class:"content-block last-block imprint-block"},[m("div",{id:"headline"},"404"),m("span",null,[He("Oh no, this page doesn't exist (anymore), but check out our "),m("a",{href:"/"},"home page"),He(" instead :)"),m("br")])],-1)),(U(),Z("div",LT,[n[1]||(n[1]=He(" Didn't find what you are looking for? Send us your suggestions!")),n[2]||(n[2]=m("br",null,null,-1)),m("button",{type:"button",class:"button",onClick:n[0]||(n[0]=r=>e.$router.push("/feedback"))}," Send Feedback ")])),n[4]||(n[4]=m("span",{class:"notfound"},null,-1))])],64))}}),UT=je(NT,[["__scopeId","data-v-8a89e601"]]),zT={id:"newsletter"},jT={key:0,class:"newsletter-inner"},HT={key:1,class:"newsletter-inner stage2"},VT={key:2,class:"newsletter-inner stage2"},GT={key:3,class:"newsletter-inner stage2"},WT=Ae({__name:"NewsletterModal",props:{newsletterStage:Number},emits:["closeNewsletterModal","updateNewsletterStage"],setup(t,{emit:e}){const n=re(""),r=Ct(),i=r==null?void 0:r.appContext.config.globalProperties.$cogniwerk,s=e;async function o(){s("updateNewsletterStage",1);try{const a=await i.registerNewsletter(n.value,"en");a.status=="exists"?(St.info("Email already registered"),await new Promise(l=>setTimeout(l,500)),s("updateNewsletterStage",3)):a.status=="ok"&&(St.success("Email Added to Newsletter"),await new Promise(l=>setTimeout(l,500)),s("updateNewsletterStage",2))}catch(a){console.log(a)}}return(a,l)=>(U(),Xe(sr,null,{default:mt(()=>[Fe(m("div",zT,[m("div",{id:"close",onClick:l[0]||(l[0]=c=>s("closeNewsletterModal"))}),t.newsletterStage==0?(U(),Z("div",jT,[l[8]||(l[8]=m("div",{id:"newsletter-title"},"Join our Newsletter!",-1)),l[9]||(l[9]=m("div",{id:"teaser"}," Be one of first ones to get updated on new AI models joining our collections and future developments from us. ",-1)),m("form",{onSubmit:Ee(o,["prevent"])},[Fe(m("input",{class:"newsletter-email",type:"email",name:"email","onUpdate:modelValue":l[1]||(l[1]=c=>n.value=c),placeholder:"Your Email Address",required:""},null,512),[[dn,n.value]]),l[6]||(l[6]=m("button",{class:"subscribe-btn",type:"submit"},"Subscribe now",-1)),l[7]||(l[7]=m("button",{class:"no-btn",type:"submit"},"No thanks",-1))],32)])):we("",!0),t.newsletterStage==1?(U(),Z("div",HT,l[10]||(l[10]=[m("div",{id:"title"},"Please be patient!",-1),m("div",{id:"teaser"},"Your newletter registration is being processed...",-1)]))):we("",!0),t.newsletterStage==2?(U(),Z("div",VT,[l[11]||(l[11]=m("div",{id:"title"},"Thank you for Subscribing,",-1)),l[12]||(l[12]=m("div",{id:"teaser"}," we are excited to welcome you at Cogniwerk. You will be hearing from us soon. ",-1)),m("button",{onClick:l[2]||(l[2]=c=>s("closeNewsletterModal")),class:"subscribe-btn"}," Create now "),m("button",{onClick:l[3]||(l[3]=c=>s("closeNewsletterModal")),class:"no-btn"}," Discover ")])):we("",!0),t.newsletterStage==3?(U(),Z("div",GT,[l[13]||(l[13]=m("div",{id:"title"},"You are already Subscribed!",-1)),l[14]||(l[14]=m("div",{id:"teaser"}," We appreciate you being so interested in our content and news, Try out our Stable Diffusion Implementation and get creative. ",-1)),m("button",{onClick:l[4]||(l[4]=c=>s("closeNewsletterModal")),class:"subscribe-btn"}," Create now "),m("button",{onClick:l[5]||(l[5]=c=>s("closeNewsletterModal")),class:"no-btn"}," Discover ")])):we("",!0)],512),[[et,!0]])]),_:1}))}}),qT=je(WT,[["__scopeId","data-v-db5bdcd4"]]),KT={id:"footer-link-container"},ZT=["href","onClick"],YT={key:0},XT=Ae({__name:"FooterGlobal",setup(t){const e=re(!1),n=re(0),r=$n(),i=()=>{e.value=!1},s=a=>{n.value=a},o=[{href:"/about",title:"About"},{href:"/feedback",title:"Contact"},{href:"/privacy",title:"Terms of Use and Privacy Statement"},{href:"/imprint",title:"Imprint"}];return(a,l)=>(U(),Z(Se,null,[m("footer",null,[m("div",KT,[m("p",{id:"join-newsletter",class:"footer-link",onClick:l[0]||(l[0]=c=>e.value=!0),style:{margin:"0px"}}," Join Newsletter "),(U(),Z(Se,null,Ye(o,c=>m("a",{key:c.href,class:"footer-link",href:c.href,onClick:Ee(u=>de(r).push(c.href),["prevent","stop"])},ve(c.title),9,ZT)),64))])]),e.value?(U(),Z("div",YT,[le(qT,{onCloseNewsletterModal:i,onUpdateNewsletterStage:s,newsletterStage:n.value},null,8,["newsletterStage"])])):we("",!0)],64))}}),R0=je(XT,[["__scopeId","data-v-909afb79"]]),QT={class:"content-block last-block imprint-block"},JT={id:"headline"},eP=["innerHTML"],tP={key:0,id:"feedback"},nP=Ae({__name:"PrivacyView",setup(t){const e=[{property:"title",content:"Privacy Statement"},{name:"description",content:"Your Ultimate Creative Co-Pilot."},{name:"robots",content:"all"},{name:"keywords",content:"Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{property:"og:title",content:"Privacy Statement"},{property:"og:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"og:description",content:"Your Ultimate Creative Co-Pilot."}],n=fn().fullPath,r=re(null);return ut(()=>{Tt.getInstance().getPrivacy().then(i=>{r.value=i[0]})}),(i,s)=>{var o,a;return U(),Z(Se,null,[m("header",null,[le(Fn)]),m("main",null,[m("div",QT,[m("div",JT,ve((o=r.value)==null?void 0:o.title),1),m("div",{innerHTML:(a=r.value)==null?void 0:a.content},null,8,eP)]),(U(),Z("div",tP,[s[1]||(s[1]=He(" Didn't find what you are looking for? Send us your suggestions!")),s[2]||(s[2]=m("br",null,null,-1)),m("button",{type:"button",class:"button",onClick:s[0]||(s[0]=l=>i.$router.push("/feedback"))}," Send Feedback ")]))]),le(R0),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:e,canonicalPath:de(n)},null,8,["canonicalPath"])]),_:1}))],64)}}}),rP=je(nP,[["__scopeId","data-v-a798b323"]]);function K5(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let ns=K5();function iP(t){ns=t}const Z5=/[&<>"']/,sP=new RegExp(Z5.source,"g"),Y5=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,oP=new RegExp(Y5.source,"g"),aP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$p=t=>aP[t];function gn(t,e){if(e){if(Z5.test(t))return t.replace(sP,$p)}else if(Y5.test(t))return t.replace(oP,$p);return t}const lP=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function X5(t){return t.replace(lP,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const cP=/(^|[^\[])\^/g;function Dt(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(cP,"$1"),t=t.replace(r,i),n),getRegex:()=>new RegExp(t,e)};return n}const uP=/[^\w:]/g,dP=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Tp(t,e,n){if(t){let r;try{r=decodeURIComponent(X5(n)).replace(uP,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}e&&!dP.test(n)&&(n=gP(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const sl={},fP=/^[^:]+:\/*[^/]*$/,hP=/^([^:]+:)[\s\S]*$/,pP=/^([^:]+:\/*[^/]*)[\s\S]*$/;function gP(t,e){sl[" "+t]||(fP.test(t)?sl[" "+t]=t+"/":sl[" "+t]=xl(t,"/",!0)),t=sl[" "+t];const n=t.indexOf(":")===-1;return e.substring(0,2)==="//"?n?e:t.replace(hP,"$1")+e:e.charAt(0)==="/"?n?e:t.replace(pP,"$1")+e:t+e}const e0={exec:function(){}};function Pp(t,e){const n=t.replace(/\|/g,(s,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function xl(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r;){const s=t.charAt(r-i-1);if(s===e&&!n)i++;else if(s!==e&&n)i++;else break}return t.slice(0,r-i)}function mP(t,e){if(t.indexOf(e[1])===-1)return-1;const n=t.length;let r=0,i=0;for(;i<n;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return-1}function vP(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Dp(t,e){if(e<1)return"";let n="";for(;e>1;)e&1&&(n+=t),e>>=1,t+=t;return n+t}function Bp(t,e,n,r){const i=e.href,s=e.title?gn(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:s,text:gn(o)}}function _P(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(`
`).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[o]=s;return o.length>=r.length?i.slice(r.length):i}).join(`
`)}class l2{constructor(e){this.options=e||ns}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:xl(r,`
`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=_P(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=xl(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:s,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r,i,s,o,a,l,c,u,h,p,d,g,v=n[1].trim();const x=v.length>1,y={type:"list",raw:"",ordered:x,start:x?+v.slice(0,-1):"",loose:!1,items:[]};v=x?`\\d{1,9}\\${v.slice(-1)}`:`\\${v}`,this.options.pedantic&&(v=x?v:"[*+-]");const _=new RegExp(`^( {0,3}${v})((?:[	 ][^\\n]*)?(?:\\n|$))`);for(;e&&(g=!1,!(!(n=_.exec(e))||this.rules.block.hr.test(e)));){if(r=n[0],e=e.substring(r.length),u=n[2].split(`
`,1)[0].replace(/^\t+/,b=>" ".repeat(3*b.length)),h=e.split(`
`,1)[0],this.options.pedantic?(o=2,d=u.trimLeft()):(o=n[2].search(/[^ ]/),o=o>4?1:o,d=u.slice(o),o+=n[1].length),l=!1,!u&&/^ *$/.test(h)&&(r+=h+`
`,e=e.substring(h.length+1),g=!0),!g){const b=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),P=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);for(;e&&(p=e.split(`
`,1)[0],h=p,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),!(k.test(h)||P.test(h)||b.test(h)||w.test(e)));){if(h.search(/[^ ]/)>=o||!h.trim())d+=`
`+h.slice(o);else{if(l||u.search(/[^ ]/)>=4||k.test(u)||P.test(u)||w.test(u))break;d+=`
`+h}!l&&!h.trim()&&(l=!0),r+=p+`
`,e=e.substring(p.length+1),u=h.slice(o)}}y.loose||(c?y.loose=!0:/\n *\n *$/.test(r)&&(c=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(d),i&&(s=i[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:d}),y.raw+=r}y.items[y.items.length-1].raw=r.trimRight(),y.items[y.items.length-1].text=d.trimRight(),y.raw=y.raw.trimRight();const f=y.items.length;for(a=0;a<f;a++)if(this.lexer.state.top=!1,y.items[a].tokens=this.lexer.blockTokens(y.items[a].text,[]),!y.loose){const b=y.items[a].tokens.filter(k=>k.type==="space"),w=b.length>0&&b.some(k=>/\n.*\n/.test(k.raw));y.loose=w}if(y.loose)for(a=0;a<f;a++)y.items[a].loose=!0;return y}}html(e){const n=this.rules.block.html.exec(e);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(n[0]):gn(n[0]);r.type="paragraph",r.text=i,r.tokens=this.lexer.inline(i)}return r}}def(e){const n=this.rules.block.def.exec(e);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(e){const n=this.rules.block.table.exec(e);if(n){const r={type:"table",header:Pp(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,s,o,a,l;for(s=0;s<i;s++)/^ *-+: *$/.test(r.align[s])?r.align[s]="right":/^ *:-+: *$/.test(r.align[s])?r.align[s]="center":/^ *:-+ *$/.test(r.align[s])?r.align[s]="left":r.align[s]=null;for(i=r.rows.length,s=0;s<i;s++)r.rows[s]=Pp(r.rows[s],r.header.length).map(c=>({text:c}));for(i=r.header.length,o=0;o<i;o++)r.header[o].tokens=this.lexer.inline(r.header[o].text);for(i=r.rows.length,o=0;o<i;o++)for(l=r.rows[o],a=0;a<l.length;a++)l[a].tokens=this.lexer.inline(l[a].text);return r}}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const r=n[1].charAt(n[1].length-1)===`
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:gn(n[1])}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):gn(n[0]):n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const o=xl(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=mP(n[2],"()");if(o>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),Bp(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return Bp(r,i,r[0],this.lexer)}}emStrong(e,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(e);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const o=i[0].length-1;let a,l,c=o,u=0;const h=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,n=n.slice(-1*e.length+o);(i=h.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=a.length,i[3]||i[4]){c+=l;continue}else if((i[5]||i[6])&&o%3&&!((o+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const p=e.slice(0,o+i.index+(i[0].length-a.length)+l);if(Math.min(o,l)%2){const g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}const d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=gn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e,n){const r=this.rules.inline.autolink.exec(e);if(r){let i,s;return r[2]==="@"?(i=gn(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=gn(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(e,n){let r;if(r=this.rules.inline.url.exec(e)){let i,s;if(r[2]==="@")i=gn(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(o!==r[0]);i=gn(r[0]),r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e,n){const r=this.rules.inline.text.exec(e);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):gn(r[0]):r[0]:i=gn(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const Ve={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:e0,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ve._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ve._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ve.def=Dt(Ve.def).replace("label",Ve._label).replace("title",Ve._title).getRegex();Ve.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ve.listItemStart=Dt(/^( *)(bull) */).replace("bull",Ve.bullet).getRegex();Ve.list=Dt(Ve.list).replace(/bull/g,Ve.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ve.def.source+")").getRegex();Ve._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ve._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;Ve.html=Dt(Ve.html,"i").replace("comment",Ve._comment).replace("tag",Ve._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ve.paragraph=Dt(Ve._paragraph).replace("hr",Ve.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ve._tag).getRegex();Ve.blockquote=Dt(Ve.blockquote).replace("paragraph",Ve.paragraph).getRegex();Ve.normal={...Ve};Ve.gfm={...Ve.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Ve.gfm.table=Dt(Ve.gfm.table).replace("hr",Ve.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ve._tag).getRegex();Ve.gfm.paragraph=Dt(Ve._paragraph).replace("hr",Ve.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ve.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ve._tag).getRegex();Ve.pedantic={...Ve.normal,html:Dt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ve._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:e0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Dt(Ve.normal._paragraph).replace("hr",Ve.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ve.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:e0,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:e0,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Oe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";Oe.punctuation=Dt(Oe.punctuation).replace(/punctuation/g,Oe._punctuation).getRegex();Oe.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;Oe.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;Oe._comment=Dt(Ve._comment).replace("(?:-->|$)","-->").getRegex();Oe.emStrong.lDelim=Dt(Oe.emStrong.lDelim).replace(/punct/g,Oe._punctuation).getRegex();Oe.emStrong.rDelimAst=Dt(Oe.emStrong.rDelimAst,"g").replace(/punct/g,Oe._punctuation).getRegex();Oe.emStrong.rDelimUnd=Dt(Oe.emStrong.rDelimUnd,"g").replace(/punct/g,Oe._punctuation).getRegex();Oe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;Oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;Oe._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;Oe.autolink=Dt(Oe.autolink).replace("scheme",Oe._scheme).replace("email",Oe._email).getRegex();Oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;Oe.tag=Dt(Oe.tag).replace("comment",Oe._comment).replace("attribute",Oe._attribute).getRegex();Oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;Oe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;Oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;Oe.link=Dt(Oe.link).replace("label",Oe._label).replace("href",Oe._href).replace("title",Oe._title).getRegex();Oe.reflink=Dt(Oe.reflink).replace("label",Oe._label).replace("ref",Ve._label).getRegex();Oe.nolink=Dt(Oe.nolink).replace("ref",Ve._label).getRegex();Oe.reflinkSearch=Dt(Oe.reflinkSearch,"g").replace("reflink",Oe.reflink).replace("nolink",Oe.nolink).getRegex();Oe.normal={...Oe};Oe.pedantic={...Oe.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Dt(/^!?\[(label)\]\((.*?)\)/).replace("label",Oe._label).getRegex(),reflink:Dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oe._label).getRegex()};Oe.gfm={...Oe.normal,escape:Dt(Oe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};Oe.gfm.url=Dt(Oe.gfm.url,"i").replace("email",Oe.gfm._extended_email).getRegex();Oe.breaks={...Oe.gfm,br:Dt(Oe.br).replace("{2,}","*").getRegex(),text:Dt(Oe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function bP(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Fp(t){let e="",n,r;const i=t.length;for(n=0;n<i;n++)r=t.charCodeAt(n),Math.random()>.5&&(r="x"+r.toString(16)),e+="&#"+r+";";return e}class pi{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ns,this.options.tokenizer=this.options.tokenizer||new l2,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:Ve.normal,inline:Oe.normal};this.options.pedantic?(n.block=Ve.pedantic,n.inline=Oe.pedantic):this.options.gfm&&(n.block=Ve.gfm,this.options.breaks?n.inline=Oe.breaks:n.inline=Oe.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ve,inline:Oe}}static lex(e,n){return new pi(n).lex(e)}static lexInline(e,n){return new pi(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
`),this.blockTokens(e,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(e,n=[]){this.options.pedantic?e=e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(a,l,c)=>l+"    ".repeat(c.length));let r,i,s,o;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
`:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=e.slice(1);let c;this.options.extensions.startBlock.forEach(function(u){c=u.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(s=e.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){i=n[n.length-1],o&&i.type==="paragraph"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),o=s.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,i,s,o=e,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+Dp("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+Dp("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(o))!=null;)o=o.slice(0,a.index+a[0].length-2)+"++"+o.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(r=u.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,o,c)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e,Fp)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e,Fp))){e=e.substring(r.raw.length),n.push(r);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const h=e.slice(1);let p;this.options.extensions.startInline.forEach(function(d){p=d.call({lexer:this},h),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(s=e.substring(0,u+1))}if(r=this.tokenizer.inlineText(s,bP)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(c=r.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(e){const u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}}class c2{constructor(e){this.options=e||ns}code(e,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(e,i);s!=null&&s!==e&&(r=!0,e=s)}return e=e.replace(/\n$/,"")+`
`,i?'<pre><code class="'+this.options.langPrefix+gn(i)+'">'+(r?e:gn(e,!0))+`</code></pre>
`:"<pre><code>"+(r?e:gn(e,!0))+`</code></pre>
`}blockquote(e){return`<blockquote>
${e}</blockquote>
`}html(e){return e}heading(e,n,r,i){if(this.options.headerIds){const s=this.options.headerPrefix+i.slug(r);return`<h${n} id="${s}">${e}</h${n}>
`}return`<h${n}>${e}</h${n}>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(e,n,r){const i=n?"ol":"ul",s=n&&r!==1?' start="'+r+'"':"";return"<"+i+s+`>
`+e+"</"+i+`>
`}listitem(e){return`<li>${e}</li>
`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>
`}table(e,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+n+`</table>
`}tablerow(e){return`<tr>
${e}</tr>
`}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+`</${r}>
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,n,r){if(e=Tp(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let i='<a href="'+e+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(e,n,r){if(e=Tp(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let i=`<img src="${e}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=this.options.xhtml?"/>":">",i}text(e){return e}}class Q5{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,n,r){return""+r}image(e,n,r){return""+r}br(){return""}}class J5{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,n){let r=e,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[e];do i++,r=e+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[e]=i,this.seen[r]=0),r}slug(e,n={}){const r=this.serialize(e);return this.getNextSafeSlug(r,n.dryrun)}}class gi{constructor(e){this.options=e||ns,this.options.renderer=this.options.renderer||new c2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Q5,this.slugger=new J5}static parse(e,n){return new gi(n).parse(e)}static parseInline(e,n){return new gi(n).parseInline(e)}parse(e,n=!0){let r="",i,s,o,a,l,c,u,h,p,d,g,v,x,y,_,f,b,w,k;const P=e.length;for(i=0;i<P;i++){if(d=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(k=this.options.extensions.renderers[d.type].call({parser:this},d),k!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))){r+=k||"";continue}switch(d.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(d.tokens),d.depth,X5(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(d.text,d.lang,d.escaped);continue}case"table":{for(h="",u="",a=d.header.length,s=0;s<a;s++)u+=this.renderer.tablecell(this.parseInline(d.header[s].tokens),{header:!0,align:d.align[s]});for(h+=this.renderer.tablerow(u),p="",a=d.rows.length,s=0;s<a;s++){for(c=d.rows[s],u="",l=c.length,o=0;o<l;o++)u+=this.renderer.tablecell(this.parseInline(c[o].tokens),{header:!1,align:d.align[o]});p+=this.renderer.tablerow(u)}r+=this.renderer.table(h,p);continue}case"blockquote":{p=this.parse(d.tokens),r+=this.renderer.blockquote(p);continue}case"list":{for(g=d.ordered,v=d.start,x=d.loose,a=d.items.length,p="",s=0;s<a;s++)_=d.items[s],f=_.checked,b=_.task,y="",_.task&&(w=this.renderer.checkbox(f),x?_.tokens.length>0&&_.tokens[0].type==="paragraph"?(_.tokens[0].text=w+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type==="text"&&(_.tokens[0].tokens[0].text=w+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:w}):y+=w),y+=this.parse(_.tokens,x),p+=this.renderer.listitem(y,b,f);r+=this.renderer.list(p,g,v);continue}case"html":{r+=this.renderer.html(d.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(d.tokens));continue}case"text":{for(p=d.tokens?this.parseInline(d.tokens):d.text;i+1<P&&e[i+1].type==="text";)d=e[++i],p+=`
`+(d.tokens?this.parseInline(d.tokens):d.text);r+=n?this.renderer.paragraph(p):p;continue}default:{const $='Token with "'+d.type+'" type was not found.';if(this.options.silent){console.error($);return}else throw new Error($)}}}return r}parseInline(e,n){n=n||this.renderer;let r="",i,s,o;const a=e.length;for(i=0;i<a;i++){if(s=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(o=this.options.extensions.renderers[s.type].call({parser:this},s),o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){r+=o||"";continue}switch(s.type){case"escape":{r+=n.text(s.text);break}case"html":{r+=n.html(s.text);break}case"link":{r+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{r+=n.image(s.href,s.title,s.text);break}case"strong":{r+=n.strong(this.parseInline(s.tokens,n));break}case"em":{r+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{r+=n.codespan(s.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(s.tokens,n));break}case"text":{r+=n.text(s.text);break}default:{const l='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}class t0{constructor(e){this.options=e||ns}preprocess(e){return e}postprocess(e){return e}}Xn(t0,"passThroughHooks",new Set(["preprocess","postprocess"]));function xP(t,e,n){return r=>{if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+gn(r.message+"",!0)+"</pre>";if(e)return Promise.resolve(i);if(n){n(null,i);return}return i}if(e)return Promise.reject(r);if(n){n(r);return}throw r}}function e8(t,e){return(n,r,i)=>{typeof r=="function"&&(i=r,r=null);const s={...r};r={...We.defaults,...s};const o=xP(r.silent,r.async,i);if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(vP(r),r.hooks&&(r.hooks.options=r),i){const a=r.highlight;let l;try{r.hooks&&(n=r.hooks.preprocess(n)),l=t(n,r)}catch(h){return o(h)}const c=function(h){let p;if(!h)try{r.walkTokens&&We.walkTokens(l,r.walkTokens),p=e(l,r),r.hooks&&(p=r.hooks.postprocess(p))}catch(d){h=d}return r.highlight=a,h?o(h):i(null,p)};if(!a||a.length<3||(delete r.highlight,!l.length))return c();let u=0;We.walkTokens(l,function(h){h.type==="code"&&(u++,setTimeout(()=>{a(h.text,h.lang,function(p,d){if(p)return c(p);d!=null&&d!==h.text&&(h.text=d,h.escaped=!0),u--,u===0&&c()})},0))}),u===0&&c();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(a=>t(a,r)).then(a=>r.walkTokens?Promise.all(We.walkTokens(a,r.walkTokens)).then(()=>a):a).then(a=>e(a,r)).then(a=>r.hooks?r.hooks.postprocess(a):a).catch(o);try{r.hooks&&(n=r.hooks.preprocess(n));const a=t(n,r);r.walkTokens&&We.walkTokens(a,r.walkTokens);let l=e(a,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(a){return o(a)}}}function We(t,e,n){return e8(pi.lex,gi.parse)(t,e,n)}We.options=We.setOptions=function(t){return We.defaults={...We.defaults,...t},iP(We.defaults),We};We.getDefaults=K5;We.defaults=ns;We.use=function(...t){const e=We.defaults.extensions||{renderers:{},childTokens:{}};t.forEach(n=>{const r={...n};if(r.async=We.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const s=e.renderers[i.name];s?e.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=s.apply(this,o)),a}:e.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[i.level]?e[i.level].unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),n.renderer){const i=We.defaults.renderer||new c2;for(const s in n.renderer){const o=i[s];i[s]=(...a)=>{let l=n.renderer[s].apply(i,a);return l===!1&&(l=o.apply(i,a)),l}}r.renderer=i}if(n.tokenizer){const i=We.defaults.tokenizer||new l2;for(const s in n.tokenizer){const o=i[s];i[s]=(...a)=>{let l=n.tokenizer[s].apply(i,a);return l===!1&&(l=o.apply(i,a)),l}}r.tokenizer=i}if(n.hooks){const i=We.defaults.hooks||new t0;for(const s in n.hooks){const o=i[s];t0.passThroughHooks.has(s)?i[s]=a=>{if(We.defaults.async)return Promise.resolve(n.hooks[s].call(i,a)).then(c=>o.call(i,c));const l=n.hooks[s].call(i,a);return o.call(i,l)}:i[s]=(...a)=>{let l=n.hooks[s].apply(i,a);return l===!1&&(l=o.apply(i,a)),l}}r.hooks=i}if(n.walkTokens){const i=We.defaults.walkTokens;r.walkTokens=function(s){let o=[];return o.push(n.walkTokens.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}We.setOptions(r)})};We.walkTokens=function(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(We,r)),r.type){case"table":{for(const i of r.header)n=n.concat(We.walkTokens(i.tokens,e));for(const i of r.rows)for(const s of i)n=n.concat(We.walkTokens(s.tokens,e));break}case"list":{n=n.concat(We.walkTokens(r.items,e));break}default:We.defaults.extensions&&We.defaults.extensions.childTokens&&We.defaults.extensions.childTokens[r.type]?We.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(We.walkTokens(r[i],e))}):r.tokens&&(n=n.concat(We.walkTokens(r.tokens,e)))}return n};We.parseInline=e8(pi.lexInline,gi.parseInline);We.Parser=gi;We.parser=gi.parse;We.Renderer=c2;We.TextRenderer=Q5;We.Lexer=pi;We.lexer=pi.lex;We.Tokenizer=l2;We.Slugger=J5;We.Hooks=t0;We.parse=We;We.options;We.setOptions;We.use;We.walkTokens;We.parseInline;gi.parse;pi.lex;const yP={class:"content-block last-block imprint-block"},wP={id:"headline"},CP=["innerHTML"],kP=Ae({__name:"AboutView",setup(t){const e=fn().fullPath,n=re(null),r=[{property:"title",content:"About US"},{name:"description",content:"CogniWerk.ai is meticulously crafted to deliver a user-friendly experience, operating effortlessly within a browser-based interface igx2."},{name:"robots",content:"all"},{name:"keywords",content:"Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{property:"og:title",content:"About US"},{property:"og:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"og:description",content:"CogniWerk.ai is meticulously crafted to deliver a user-friendly experience, operating effortlessly within a browser-based interface"},{property:"twitter:card",content:"summary"},{property:"twitter:title",content:"CogniWerk"},{property:"twitter:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"twitter:description",content:"CogniWerk.ai is meticulously crafted to deliver a user-friendly experience, operating effortlessly within a browser-based interface"}];return ut(()=>{Tt.getInstance().getAbout().then(i=>{n.value=i})}),(i,s)=>{var o,a;return U(),Z(Se,null,[m("header",null,[le(Fn)]),m("main",null,[m("div",yP,[m("div",wP,ve((o=n.value)==null?void 0:o.title),1),m("pre",{innerHTML:de(We)(((a=n.value)==null?void 0:a.content)||"")},null,8,CP)])]),le(P0),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:r,canonicalPath:de(e)},null,8,["canonicalPath"])]),_:1}))],64)}}}),SP=je(kP,[["__scopeId","data-v-ddd8597f"]]),AP=no("blogroot",()=>{const t=e=>{const n=e;if(typeof window<"u")return localStorage.setItem("blogroot",n),n};if(typeof window<"u"){const e=localStorage.getItem("blogroot");return{setBLogs:t,blogroot:e}}}),t8=no({id:"blogFilter",state:()=>({category:"all"}),actions:{setCategory(t){this.category=t}}}),EP={class:"menu-blog-wrap"},$P={class:"menu-blog"},TP={class:"grid-blog-posts"},PP={class:"blog-card-info"},DP={class:"row-btns blog-card-tags"},BP=["href","onClick"],FP={class:"blog-card-info"},IP={class:"blog-card-title"},RP={class:"blog-card-tags"},OP=["onClick"],MP={key:0,class:"feedback"},LP="https://cms.cogniwerk.ai/assets/",NP=Ae({__name:"BlogMainView",async setup(t){let e,n;const r=["id","status","sort","user_created","date_created","user_updated","date_updated","blog_title","category","blog_header_image.id","blog_header_image.title","blog_header_image.storage","blog_header_image.filename_disk","blog_header_image.filename_download","blog_header_image.type","blog_description","blog_url","blog_tags.*.*"],s=re([{name:"title",content:"Cogniwerk AI Blog"},{name:"description",content:"Its all about AI. Find the right AI Service, text-to-image, Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{name:"robots",content:"all"},{name:"keywords",content:"Photoediting,Animation,Video,Movement,Diffusion,Experiment,Graphic Design,Illustration,Editing,Superresolution,Enhancing,Upscaling,Inpainting,Masking,Workflow,Styletransfer,Effect,Drawing,Logo Design,Avatar,Typography,Photo,Face,Body,Augmentation,Color,Command,Line Art,Modeling,Bodyrig,Blender,Characterdesign,3D,Landscape,Depthmap,Architecture"},{property:"og:title",content:"Cogniwerk AI Blog"},{property:"og:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"og:description",content:"Its all about AI. Find the right AI Service, text-to-image, Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{property:"og:url",content:"https://cogniwerk.ai/blog/"},{property:"twitter:card",content:"summary"},{property:"twitter:title",content:"Cogniwerk AI Blog"},{property:"twitter:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"twitter:description",content:"Its all about AI. Find the right AI Service, text-to-image, Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{property:"twitter:url",content:"https://cogniwerk.ai/blog/"}]),o=Pt({isDataLoaded:!1,initialData:[]}),a=$n(),l=Le(()=>{const b=fn().params.tagsSpec;return!b||b.length<12?[]:b.substring(12).split(",")});async function c(){const b={limit:9999,sort:"-date_created"};return b["filter[status][_eq]"]="published",l.value.length>0&&(b["filter[blog_tags][tags_id][tag][_eq]"]=l.value[0]),await Tt.getInstance().getBlogs(b,r)}const u=([e,n]=ci(()=>c()),e=await e,n(),e);o.initialData=u.filter(b=>b.status==="published"),o.isDataLoaded=!0;const h=t8(),p=Le(()=>h.category==="all"?o.initialData:o.initialData.filter(b=>{switch(b.category,h.category,h.category){case"news":case"tutorial":return b.category===h.category;default:return!b.category||b.category==="opinion"}}));ut(()=>{var w;const b=fn();console.log(b.query),b.query.tab&&h.setCategory(((w=b==null?void 0:b.query)==null?void 0:w.tab)||"all"),window.scrollTo(0,0)});const d=b=>{a.push("/blog"),h.setCategory(b)},g=b=>{const[w,k]=[...b];return{"bigger-card":!k,"vertical-card":w.blog_title.length>=74,"white-card":w.category==="news","dark-card":!w.category||w.category==="opinion","multicolor-card":w.category==="tutorial","single-card":p.value.length==1}},v=AP();typeof window<"u"&&(localStorage.removeItem("root"),localStorage.removeItem("tabroot"),localStorage.removeItem("blogroot"));function x(b,w){return w=w||800,`${LP}${b}?width=${w}&format=webp&quality=100&fit=outside`}function y(b,w){const k=w.filter(D=>{var S;return l.value.includes((S=D==null?void 0:D.tags_id)==null?void 0:S.tag)}),P=w.filter(D=>{var S;return!l.value.includes((S=D==null?void 0:D.tags_id)==null?void 0:S.tag)}),$=[...k,...P];return b?[...$.slice(0,3)]:[...$.slice(0,4)]}function _(b){v==null||v.setBLogs(b)}function f(b){var w;if((w=l.value)!=null&&w.includes(b.tag)){a.push("/blog/");return}a.push(`/blog/search/tags-${encodeURIComponent(b.tag)}`)}return(b,w)=>(U(),Z(Se,null,[m("header",null,[le(Fn)]),m("main",null,[m("div",EP,[m("div",$P,[m("button",{class:ze({active:de(h).category==="all"}),onClick:w[0]||(w[0]=k=>d("all"))}," Recent Posts ",2),m("button",{class:ze({active:de(h).category==="news"}),onClick:w[1]||(w[1]=k=>d("news"))}," News ",2),m("button",{class:ze({active:de(h).category==="opinion"}),onClick:w[2]||(w[2]=k=>d("opinion"))}," Opinion ",2),m("button",{class:ze({active:de(h).category==="tutorial"}),onClick:w[3]||(w[3]=k=>d("tutorial"))}," Tutorial ",2)])]),m("div",TP,[le(b4,{name:"fade"},{default:mt(()=>[o.isDataLoaded?(U(!0),Z(Se,{key:1},Ye(p.value,(k,P)=>{var $;return U(),Z("a",{key:k.id,class:ze(["blog-card",g([k,P])]),href:`/blog/${k.blog_url}`,onClick:D=>_(k.id)},[m("div",{class:"blog-card-img",style:xn("background: url("+x(($=k.blog_header_image)==null?void 0:$.filename_disk,P===0?1e3:600)+") no-repeat center #fff; background-size: cover;")},null,4),m("div",FP,[m("p",IP,ve(k.blog_title),1),m("div",RP,[(U(!0),Z(Se,null,Ye(y(P,k.blog_tags),D=>{var S,F;return U(),Z("button",{key:D,class:ze(["a_btn a_btn-tag",{selected:(S=l.value)==null?void 0:S.includes(D.tags_id.tag)}]),onClick:Ee(A=>f(D.tags_id),["prevent"])},ve((F=D==null?void 0:D.tags_id)==null?void 0:F.tag),11,OP)}),128))])])],10,BP)}),128)):(U(),Z(Se,{key:0},Ye(9,(k,P)=>m("div",{key:P,class:ze(["blog-card",{"bigger-card":!P}])},[w[6]||(w[6]=m("div",{class:"blog-card-img block-loader"},null,-1)),m("div",PP,[w[5]||(w[5]=m("div",{class:"blog-card-title block-loader m-b-12"},null,-1)),m("div",DP,[(U(!0),Z(Se,null,Ye(y(P,[1,2,3,4,5]),$=>(U(),Z("div",{key:$,class:"a_btn block-loader"}))),128))])])],2)),64))]),_:1})]),(U(),Z("div",MP,[w[7]||(w[7]=He(" Didn't find what you are looking for? Send us your suggestions!")),w[8]||(w[8]=m("br",null,null,-1)),m("button",{type:"button",class:"feedback-button",onClick:w[4]||(w[4]=k=>b.$router.push("/feedback"))}," Send Feedback ")]))]),le(R0),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:s.value,canonicalPath:"/blog"},null,8,["tags"])]),_:1}))],64))}});/**
 * Vue 3 Carousel 0.3.1
 * (c) 2023
 * @license MIT
 */const Xt={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},Ip={itemsToShow:{default:Xt.itemsToShow,type:Number},itemsToScroll:{default:Xt.itemsToScroll,type:Number},wrapAround:{default:Xt.wrapAround,type:Boolean},throttle:{default:Xt.throttle,type:Number},snapAlign:{default:Xt.snapAlign,validator(t){return["start","end","center","center-even","center-odd"].includes(t)}},transition:{default:Xt.transition,type:Number},breakpoints:{default:Xt.breakpoints,type:Object},autoplay:{default:Xt.autoplay,type:Number},pauseAutoplayOnHover:{default:Xt.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Xt.mouseDrag,type:Boolean},touchDrag:{default:Xt.touchDrag,type:Boolean},dir:{default:Xt.dir,validator(t){return["rtl","ltr"].includes(t)}},i18n:{default:Xt.i18n,type:Object},settings:{default(){return{}},type:Object}};function UP({config:t,slidesCount:e}){const{snapAlign:n,wrapAround:r,itemsToShow:i=1}=t;if(r)return Math.max(e-1,0);let s;switch(n){case"start":s=e-i;break;case"end":s=e-1;break;case"center":case"center-odd":s=e-Math.ceil((i-.5)/2);break;case"center-even":s=e-Math.ceil(i/2);break;default:s=0;break}return Math.max(s,0)}function zP({config:t,slidesCount:e}){const{wrapAround:n,snapAlign:r,itemsToShow:i=1}=t;let s=0;if(n||i>e)return s;switch(r){case"start":s=0;break;case"end":s=i-1;break;case"center":case"center-odd":s=Math.floor((i-1)/2);break;case"center-even":s=Math.floor((i-2)/2);break;default:s=0;break}return s}function n1({val:t,max:e,min:n}){return e<n?t:Math.min(Math.max(t,n),e)}function jP({config:t,currentSlide:e,slidesCount:n}){const{snapAlign:r,wrapAround:i,itemsToShow:s=1}=t;let o=e;switch(r){case"center":case"center-odd":o-=(s-1)/2;break;case"center-even":o-=(s-2)/2;break;case"end":o-=s-1;break}return i?o:n1({val:o,max:n-s,min:0})}function n8(t){return t?t.reduce((e,n)=>{var r;return n.type===Se?[...e,...n8(n.children)]:((r=n.type)===null||r===void 0?void 0:r.name)==="CarouselSlide"?[...e,n]:e},[]):[]}function r1({val:t,max:e,min:n=0}){return t>e?r1({val:t-(e+1),max:e,min:n}):t<n?r1({val:t+(e+1),max:e,min:n}):t}function HP(t,e){let n;return e?function(...r){const i=this;n||(t.apply(i,r),n=!0,setTimeout(()=>n=!1,e))}:t}function VP(t,e){let n;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t(...r),n=null},e)}}function GP(t="",e={}){return Object.entries(e).reduce((n,[r,i])=>n.replace(`{${r}}`,String(i)),t)}var WP=Ae({name:"ARIA",setup(){const t=vt("config",Pt(Object.assign({},Xt))),e=vt("currentSlide",re(0)),n=vt("slidesCount",re(0));return()=>Zt("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},GP(t.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:n.value}))}}),qP=Ae({name:"Carousel",props:Ip,setup(t,{slots:e,emit:n,expose:r}){var i;const s=re(null),o=re([]),a=re(0),l=re(0),c=Pt(Object.assign({},Xt));let u=Object.assign({},Xt),h;const p=re((i=t.modelValue)!==null&&i!==void 0?i:0),d=re(0),g=re(0),v=re(0),x=re(0);let y,_;mn("config",c),mn("slidesCount",l),mn("currentSlide",p),mn("maxSlide",v),mn("minSlide",x),mn("slideWidth",a);function f(){h=Object.assign({},t.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),t),{i18n:Object.assign(Object.assign({},u.i18n),t.i18n),breakpoints:void 0}),w(u)}function b(){if(!h||!Object.keys(h).length)return;const C=Object.keys(h).map(H=>Number(H)).sort((H,I)=>+I-+H);let O=Object.assign({},u);C.some(H=>{const I=window.matchMedia(`(min-width: ${H}px)`).matches;return I&&(O=Object.assign(Object.assign({},O),h[H])),I}),w(O)}function w(C){Object.entries(C).forEach(([O,H])=>c[O]=H)}const k=VP(()=>{b(),P()},16);function P(){if(!s.value)return;const C=s.value.getBoundingClientRect();a.value=C.width/c.itemsToShow}function $(){l.value<=0||(g.value=Math.ceil((l.value-1)/2),v.value=UP({config:c,slidesCount:l.value}),x.value=zP({config:c,slidesCount:l.value}),c.wrapAround||(p.value=n1({val:p.value,max:v.value,min:x.value})))}ut(()=>{li(()=>P()),setTimeout(()=>P(),1e3),b(),ce(),window.addEventListener("resize",k,{passive:!0}),n("init")}),bi(()=>{_&&clearTimeout(_),y&&clearInterval(y),window.removeEventListener("resize",k,{passive:!0})});let D=!1;const S={x:0,y:0},F={x:0,y:0},A=Pt({x:0,y:0}),E=re(!1),T=re(!1),L=()=>{E.value=!0},X=()=>{E.value=!1};function J(C){["INPUT","TEXTAREA","SELECT"].includes(C.target.tagName)||(D=C.type==="touchstart",D||C.preventDefault(),!(!D&&C.button!==0||V.value)&&(S.x=D?C.touches[0].clientX:C.clientX,S.y=D?C.touches[0].clientY:C.clientY,document.addEventListener(D?"touchmove":"mousemove",ne,!0),document.addEventListener(D?"touchend":"mouseup",se,!0)))}const ne=HP(C=>{T.value=!0,F.x=D?C.touches[0].clientX:C.clientX,F.y=D?C.touches[0].clientY:C.clientY;const O=F.x-S.x,H=F.y-S.y;A.y=H,A.x=O},c.throttle);function se(){const C=c.dir==="rtl"?-1:1,O=Math.sign(A.x)*.4,H=Math.round(A.x/a.value+O)*C;if(H&&!D){const I=R=>{R.stopPropagation(),window.removeEventListener("click",I,!0)};window.addEventListener("click",I,!0)}oe(p.value-H),A.x=0,A.y=0,T.value=!1,document.removeEventListener(D?"touchmove":"mousemove",ne,!0),document.removeEventListener(D?"touchend":"mouseup",se,!0)}function ce(){!c.autoplay||c.autoplay<=0||(y=setInterval(()=>{c.pauseAutoplayOnHover&&E.value||N()},c.autoplay))}function j(){y&&(clearInterval(y),y=null),ce()}const V=re(!1);function oe(C){const O=c.wrapAround?C:n1({val:C,max:v.value,min:x.value});p.value===O||V.value||(n("slide-start",{slidingToIndex:C,currentSlideIndex:p.value,prevSlideIndex:d.value,slidesCount:l.value}),V.value=!0,d.value=p.value,p.value=O,_=setTimeout(()=>{if(c.wrapAround){const H=r1({val:O,max:v.value,min:0});H!==p.value&&(p.value=H,n("loop",{currentSlideIndex:p.value,slidingToIndex:C}))}n("update:modelValue",p.value),n("slide-end",{currentSlideIndex:p.value,prevSlideIndex:d.value,slidesCount:l.value}),V.value=!1,j()},c.transition))}function N(){oe(p.value+c.itemsToScroll)}function Q(){oe(p.value-c.itemsToScroll)}const fe={slideTo:oe,next:N,prev:Q};mn("nav",fe),mn("isSliding",V);const M=Le(()=>jP({config:c,currentSlide:p.value,slidesCount:l.value}));mn("slidesToScroll",M);const q=Le(()=>{const C=c.dir==="rtl"?-1:1,O=M.value*a.value*C;return{transform:`translateX(${A.x-O}px)`,transition:`${V.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${l.value*a.value}px`:"",width:"100%"}});function ee(){f(),b(),$(),P(),j()}Object.keys(Ip).forEach(C=>{["modelValue"].includes(C)||at(()=>t[C],ee)}),at(()=>t.modelValue,C=>{C!==p.value&&oe(Number(C))}),at(l,$),n("before-init"),f();const ue={config:c,slidesCount:l,slideWidth:a,next:N,prev:Q,slideTo:oe,currentSlide:p,maxSlide:v,minSlide:x,middleSlide:g};r({updateBreakpointsConfigs:b,updateSlidesData:$,updateSlideWidth:P,initDefaultConfigs:f,restartCarousel:ee,slideTo:oe,next:N,prev:Q,nav:fe,data:ue});const me=e.default||e.slides,xe=e.addons,z=Pt(ue);return()=>{const C=n8(me==null?void 0:me(z)),O=(xe==null?void 0:xe(z))||[];C.forEach((Y,te)=>Y.props.index=te);let H=C;if(c.wrapAround){const Y=C.map((K,G)=>lr(K,{index:-C.length+G,isClone:!0,key:`clone-before-${G}`})),te=C.map((K,G)=>lr(K,{index:C.length+G,isClone:!0,key:`clone-after-${G}`}));H=[...Y,...C,...te]}o.value=C,l.value=Math.max(C.length,1);const I=Zt("ol",{class:"carousel__track",style:q.value,onMousedownCapture:c.mouseDrag?J:null,onTouchstartPassiveCapture:c.touchDrag?J:null},H),R=Zt("div",{class:"carousel__viewport"},I);return Zt("section",{ref:s,class:{carousel:!0,"is-sliding":V.value,"is-dragging":T.value,"is-hover":E.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:L,onMouseleave:X},[R,O,Zt(WP)])}}}),i1;(function(t){t.arrowUp="arrowUp",t.arrowDown="arrowDown",t.arrowRight="arrowRight",t.arrowLeft="arrowLeft"})(i1||(i1={}));const KP={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function ZP(t){return t in i1}const s1=t=>{const e=vt("config",Pt(Object.assign({},Xt))),n=String(t.name),r=`icon${n.charAt(0).toUpperCase()+n.slice(1)}`;if(!n||typeof n!="string"||!ZP(n))return;const i=KP[n],s=Zt("path",{d:i}),o=e.i18n[r]||t.title||n,a=Zt("title",o);return Zt("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":o},[a,s])};s1.props={name:String,title:String};const YP=(t,{slots:e,attrs:n})=>{const{next:r,prev:i}=e||{},s=vt("config",Pt(Object.assign({},Xt))),o=vt("maxSlide",re(1)),a=vt("minSlide",re(1)),l=vt("currentSlide",re(1)),c=vt("nav",{}),{dir:u,wrapAround:h,i18n:p}=s,d=u==="rtl",g=Zt("button",{type:"button",class:["carousel__prev",!h&&l.value<=a.value&&"carousel__prev--disabled",n==null?void 0:n.class],"aria-label":p.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||Zt(s1,{name:d?"arrowRight":"arrowLeft"})),v=Zt("button",{type:"button",class:["carousel__next",!h&&l.value>=o.value&&"carousel__next--disabled",n==null?void 0:n.class],"aria-label":p.ariaNextSlide,onClick:c.next},(r==null?void 0:r())||Zt(s1,{name:d?"arrowLeft":"arrowRight"}));return[g,v]};var XP=Ae({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(t,{slots:e}){const n=vt("config",Pt(Object.assign({},Xt))),r=vt("currentSlide",re(0)),i=vt("slidesToScroll",re(0)),s=vt("isSliding",re(!1)),o=()=>t.index===r.value,a=()=>t.index===r.value-1,l=()=>t.index===r.value+1,c=()=>{const u=Math.floor(i.value),h=Math.ceil(i.value+n.itemsToShow-1);return t.index>=u&&t.index<=h};return()=>{var u;return Zt("li",{style:{width:`${100/n.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":t.isClone,"carousel__slide--visible":c(),"carousel__slide--active":o(),"carousel__slide--prev":a(),"carousel__slide--next":l(),"carousel__slide--sliding":s.value},"aria-hidden":!c()},(u=e.default)===null||u===void 0?void 0:u.call(e))}}});const QP={class:"card-img",alt:"GauGAN2"},JP={class:"card-title-wrapper"},eD={class:"card-title"},tD={class:"card-info"},nD={class:"card-type"},rD=["innerHTML"],iD={class:"card-tag"},sD={class:"ready-to-use"},oD="https://cms.cogniwerk.ai/assets/",aD=Ae({__name:"ModelCard",props:{model:{},realLink:{type:Boolean},small:{type:Boolean}},setup(t){function e(o){switch(o){case"do_it_yourself":return"Do It Yourself";case"external_service":return"External Service";case"ready_to_use":return"Ready To Use";case"under_review":return"Under Review"}return o}function n(o){return o.replace(/(<([^>]+)>)/gi,"")}function r(o){o=n(o);let a=o.slice(0,o.slice(40).indexOf(" ")+40);return a.length<o.length&&(a+=" …"),a}function i(o){window.open(o,"_blank")}function s(o){window.location.assign(o)}return(o,a)=>{var c,u,h,p;const l=pa("lazyload");return o.model?(U(),Z("div",{key:0,onClick:a[1]||(a[1]=Ee(d=>o.realLink?s(`/model/${o.model.slug}`):o.$router.push(`/model/${o.model.slug}`),["prevent"])),onAuxclick:a[2]||(a[2]=d=>i(`/model/${o.model.slug}`)),class:ze(["card",{"card-small":o.small}])},[Fe(m("img",QP,null,512),[[l,`${oD}${(u=(c=o.model.images[0])==null?void 0:c.directus_files_id)==null?void 0:u.id}?width=400`]]),m("div",JP,[m("h2",eD,ve(((h=o.model.name)==null?void 0:h.length)>35?((p=o.model.name)==null?void 0:p.slice(0,35))+"...":o.model.name),1)]),m("div",tD,[m("div",nD,[m("h3",{class:ze(["card-subtitle",{"small-text":o.small,"decrease-clamp":o.model.usability==="ready_to_use"}]),innerHTML:o.model.teaser||r(o.model.description)},null,10,rD),o.model.usability==="ready_to_use"?(U(),Z("button",{key:0,class:"launch-btn",onClick:a[0]||(a[0]=Ee(d=>o.$router.push(`/run-model/${o.model.slug}`),["stop"]))}," Launch AI ")):we("",!0)]),m("div",iD,[m("div",sD,ve(e(o.model.usability)),1)])])],34)):we("",!0)}}}),lD=je(aD,[["__scopeId","data-v-282da409"]]),cD=Ae({name:"CarouselCard",props:{title:{type:String,required:!0},models:{type:Array,required:!0}},components:{Carousel:qP,Slide:XP,Navigation:YP,ModelCard:lD},data(){return{settings:{snapAlign:"center"},breakpoints:{300:{itemsToShow:1,snapAlign:"start"},600:{itemsToShow:2,snapAlign:"start"},900:{itemsToShow:3,snapAlign:"start"},1100:{itemsToShow:4,snapAlign:"start"},1300:{itemsToShow:5,snapAlign:"start"},1600:{itemsToShow:6,snapAlign:"start"},2e3:{itemsToShow:7,snapAlign:"start"}}}},computed:{getDataSlider(){return[...this.models].sort((t,e)=>e.counter-t.counter).filter(t=>t.id!==this.models[0].id)}}}),uD="data:image/svg+xml,%3csvg%20width='18'%20height='22'%20viewBox='0%200%2018%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20d='M16.5%2018.7942L3%2011L16.5%203.20577L16.5%2018.7942Z'%20stroke='black'%20stroke-width='3'%20/%3e%3c/svg%3e",dD="data:image/svg+xml,%3csvg%20width='18'%20height='22'%20viewBox='0%200%2018%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20d='M1.5%203.20577L15%2011L1.5%2018.7942L1.5%203.20577Z'%20stroke='black'%20stroke-width='3'%20/%3e%3c/svg%3e",fD={class:"carousel-context"},hD={class:"carousel-title"};function pD(t,e,n,r,i,s){const o=xr("ModelCard"),a=xr("slide"),l=xr("navigation"),c=xr("carousel");return U(),Z("div",fD,[m("div",hD,ve(t.title),1),le(c,Ui(t.settings,{"wrap-around":!0,breakpoints:t.breakpoints}),{addons:mt(()=>[le(l,null,{prev:mt(()=>e[0]||(e[0]=[m("img",{src:uD,alt:"Previous"},null,-1)])),next:mt(()=>e[1]||(e[1]=[m("img",{src:dD,alt:"Next"},null,-1)])),_:1})]),default:mt(()=>[(U(!0),Z(Se,null,Ye(t.getDataSlider,u=>(U(),Xe(a,{key:u.id},{default:mt(()=>[le(o,{"real-link":!0,model:u,small:!0},null,8,["model"])]),_:2},1024))),128))]),_:1},16,["breakpoints"])])}const gD=je(cD,[["render",pD]]),mD={class:"enlarged-img"},vD={class:"img-container"},_D=["src"],bD={class:"menu-blog-wrap"},xD={class:"menu-blog"},yD={key:0},wD={class:"post-img-wrap"},CD=["src","alt","title"],kD={class:"post-context",style:{position:"relative"}},SD=["innerHTML"],AD={class:"author-details"},ED={class:"p-r-8 p-l-8 m-b-12"},$D={class:"p-r-8 p-l-8 m-b-12"},TD={class:"blog-tags"},PD={class:"blog-card-tags m-r-4 m-l-4 m-b-12",style:{"text-align":"center"}},DD=["onClick"],BD={id:"image-gallery-carousel"},FD=["src","onClick"],ID=["innerHTML"],RD={key:1,class:"p-t-40 p-b-40 m-b-40 block-loader-box"},OD={key:1,class:"feedback"},Rp="https://cms.cogniwerk.ai/assets/",MD=Ae({__name:"BlogView",async setup(t){let e,n;const r=["id","status","sort","user_created","date_created","user_updated","date_updated","blog_title","author","category","blog_header_image.*","blog_description","blog_url","blog_tags.*.*","content.*","content.item.*","content.item.images.*"],i=re(null),s=fn().fullPath,o=Pt({isDataLoaded:!1,blogTextData:"",resultData:{}}),a=$n(),c=fn().params.slug,u=re([]);function h(A){var ne,se;function E(){return window.location.href}const T=()=>{const ce=A.content.map(N=>N.__typename==="blog_content"&&N.item.__typename==="blog_text"?N.item.text:"").join(""),j=/<p[^>]*>(.*?)<\/p>/s,V=ce.match(j);return V&&V[1]?V[1].replace(/<\/?[^>]+(>|$)/g,""):""},X={title:A==null?void 0:A.blog_title,description:T(),keywords:A==null?void 0:A.blog_tags.map(ce=>ce.tags_id.tag).join(),image:{url:Rp+((ne=A==null?void 0:A.blog_header_image)==null?void 0:ne.filename_disk),alt:(se=A==null?void 0:A.blog_header_image)==null?void 0:se.title},url:E()},J=[{name:"title",content:X.title},{name:"description",content:X.description},{name:"robots",content:"all"},{name:"keywords",content:X.keywords},{property:"og:title",content:X.title},{property:"og:image",content:X.image.url},{property:"og:image:alt",content:X.image.alt},{property:"og:description",content:X.description},{property:"twitter:card",content:"summary"},{property:"twitter:title",content:X.title},{property:"twitter:image",content:X.image.url},{property:"twitter:description",content:X.description}];u.value=J}const p=re(null),d=re(),g=re([]),v=async()=>{const A=o==null?void 0:o.resultData;if(!A)return;const E=A.date_updated,T=new Date(E);d.value=T.toISOString().split("T")[0].split("-").reverse().join("."),A.content.forEach(ce=>{if(ce.item.__typename==="blog_image_gallery"){const j=ce.item.images.filter(V=>!!V.directus_files_id.filename_disk).map(V=>`https://cms.cogniwerk.ai/assets/${V.directus_files_id.filename_disk}`);p.value=j}ce.item.__typename==="blog_text"&&(o.blogTextData+=ce.item.text.replace(/https:\/\/admin.v2.cogniwerk.ai\/assets\//g,nt+"/artifact/cms/asset/"))}),o.isDataLoaded=!0;const L=A.blog_tags.map(ce=>ce.tags_id.tag),X=L.length>0?L:["Illustration","Graphic Design","Drawing","Diffusion","Editing","Inpainting","Characterdesign","Creaturedesign"],J={limit:10,page:0,search:"","filter[process][process_id][slug][_in]":["generate","transform","recognize"].join(","),"filter[process_from][process_io_id][slug][_in]":["text","image","audio","sound"].join(","),"filter[process_to][process_io_id][slug][_in]":["text","image","audio","sound"].join(","),"filter[tags][tags_id][tag][_in]":X.join(",")},ne=["id","webservice_url","slug","usability","images.directus_files_id.id","tags.tags_id.id","tags.tags_id.tag","teaser","description","name"],se=await Tt.getInstance().getModels(J,ne);se&&se.forEach(ce=>{g.value.push(ce)})},x=([e,n]=ci(()=>Tt.getInstance().getBlogBySlug(c,r)),e=await e,n(),e);for(const A of x[0].content)switch(A.collection){case"blog_text":A.item.__typename="blog_text";break;case"blog_image_gallery":A.item.__typename="blog_image_gallery";break;default:console.error("unknown blog content collection",A.collection)}console.debug("blog result=",x[0]),o.resultData=x[0],h(o.resultData),o.isDataLoaded=!0,[e,n]=ci(()=>v()),await e,n();const y=Le(()=>{var E,T,L;const A=o.resultData;return{url:`${Rp}/${(E=A.blog_header_image)==null?void 0:E.filename_disk}`,alt:(T=A.blog_header_image)==null?void 0:T.title,title:(L=A.blog_header_image)==null?void 0:L.title}}),_=Le(()=>o.resultData.blog_title),f=Le(()=>!!(o!=null&&o.resultData)),b=t8(),w=re(null);en(w,()=>{i.value=null});const k=A=>{b.setCategory(A),a.push({name:"blog"})},P=()=>{i.value=null},$=A=>{A.target.nodeName.toUpperCase()==="IMG"&&!A.target.classList.contains("gallery-thumbnail")&&(i.value=A.target.src)},D=re({visible:!1,index:0}),S=()=>{D.value.visible=!1},F=A=>{D.value.index=A,D.value.visible=!0};return(A,E)=>{const T=xr("vue-easy-lightbox");return U(),Z(Se,null,[m("header",null,[le(Fn)]),m("main",null,[Fe(m("div",mD,[m("div",vD,[m("button",{class:"cross-btn btn",onClick:P},[le(a2,{stroke:"#000"})]),m("img",{src:i.value||"",ref_key:"imagePopupRef",ref:w,alt:"Selected Image"},null,8,_D)])],512),[[et,i.value]]),m("div",bD,[m("div",xD,[m("button",{onClick:E[0]||(E[0]=L=>k("all"))},"RECENT Posts"),m("button",{onClick:E[1]||(E[1]=L=>k("news"))},"NEWS"),m("button",{onClick:E[2]||(E[2]=L=>k("opinion"))},"OPINION"),m("button",{onClick:E[3]||(E[3]=L=>k("tutorial"))},"TUTORIAL")])]),le(b4,{name:"fade"},{default:mt(()=>{var L;return[o.isDataLoaded&&f.value?(U(),Z("div",yD,[m("div",wD,[m("img",{class:"post-img-title",src:y.value.url,alt:y.value.url,title:y.value.title},null,8,CD)]),m("div",kD,[m("h1",{class:"post-title",innerHTML:_.value},null,8,SD),m("div",AD,[m("div",ED,[E[5]||(E[5]=m("p",null,"Author: ",-1)),m("p",null,[m("span",null,ve(((L=o==null?void 0:o.resultData)==null?void 0:L.author)||"CogniWerk Editor"),1)])]),m("div",$D,"Date: "+ve(d.value),1)]),m("div",TD,[m("div",PD,[(U(!0),Z(Se,null,Ye(o.resultData.blog_tags,X=>(U(),Z("a",{key:X.tags_id.id,style:{display:"inline","font-size":"20px",cursor:"pointer",color:"#666"},onClick:Ee(J=>A.$router.push(`/blog/search/tags-${encodeURIComponent(X.tags_id.tag)}`),["prevent"])}," #"+ve(X.tags_id.tag),9,DD))),128))])]),m("div",{class:"text-area",onClick:$},[le(T,{visible:D.value.visible,index:D.value.index,imgs:p.value,onHide:S,rotateDisabled:!0,loop:!0},null,8,["visible","index","imgs"]),m("div",BD,[(U(!0),Z(Se,null,Ye(p.value,(X,J)=>(U(),Z("img",{key:X,src:"https://cw-imageserver.b-cdn.net/250,sc,png,q85/"+X,class:"gallery-thumbnail",onClick:ne=>F(J),alt:"Blog Images"},null,8,FD))),128))]),m("div",{innerHTML:o.blogTextData,id:"blog-data"},null,8,ID),E[6]||(E[6]=m("div",{class:"back"},[m("a",{class:"back-button invert",href:"/blog"},"Back to blogs")],-1))])])])):(U(),Z("div",RD))]}),_:1}),g.value.length>0?(U(),Xe(gD,{title:"You might also like:",models:g.value,key:g.value.length},null,8,["models"])):we("",!0),(U(),Z("div",OD,[E[7]||(E[7]=He(" Didn't find what you are looking for? Send us your suggestions!")),E[8]||(E[8]=m("br",null,null,-1)),m("button",{type:"button",class:"feedback-button",onClick:E[4]||(E[4]=L=>A.$router.push("/feedback"))}," Send Feedback ")]))]),le(R0),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:u.value,canonicalPath:de(s)},null,8,["tags","canonicalPath"])]),_:1}))],64)}}}),LD=je(MD,[["__scopeId","data-v-50123f9a"]]),ND=Ae({components:{NewNav:Fn,FooterGlobal:R0},setup(){const t=re([]),e=Ct(),n=re(!1);async function r(){try{const o=await(e==null?void 0:e.appContext.config.globalProperties.$oidc.mgr.getUser());o||window.location.replace("/login");const a=e==null?void 0:e.appContext.config.globalProperties.$cogniwerk;await a.loadAccount(o.access_token,o.profile),a.role!=="admin"&&window.location.replace("/"),await i()}catch(o){console.log(o)}}async function i(){try{const o=await(e==null?void 0:e.appContext.config.globalProperties.$oidc.mgr.getUser()),l=await(e==null?void 0:e.appContext.config.globalProperties.$cogniwerk).fetchCreditRequests(o.access_token);t.value=l.requests}catch(o){console.error("Error fetching credit requests:",o)}}async function s(o,a){try{n.value=!0;const l=await(e==null?void 0:e.appContext.config.globalProperties.$oidc.mgr.getUser()),c=e==null?void 0:e.appContext.config.globalProperties.$cogniwerk,u={requestId:o,action:a};await c.executeCreditUpdate(l.access_token,u),a=="approve"?St.success("Request Approved"):St.success("Request Rejected"),n.value=!1,i()}catch(l){n.value=!1,console.error("Error handling action:",l)}}return ut(async()=>{await r()}),{creditRequests:t,handleAction:s,isProcessing:n}}}),UD={class:"request-table"},zD={class:"message-content"},jD=["onClick","disabled"],HD=["onClick","disabled"];function VD(t,e,n,r,i,s){const o=xr("NewNav"),a=xr("FooterGlobal");return U(),Z(Se,null,[m("header",null,[le(o)]),m("main",null,[m("table",UD,[e[0]||(e[0]=m("thead",null,[m("tr",null,[m("th",null,"Email"),m("th",null,"Message"),m("th",null,"Action")])],-1)),m("tbody",null,[(U(!0),Z(Se,null,Ye(t.creditRequests,l=>(U(),Z("tr",{key:l.id},[m("td",null,ve(l.email),1),m("td",null,[m("div",zD,ve(l.message),1)]),m("td",null,[m("button",{class:"approve-btn",onClick:c=>t.handleAction(l.id,"approve"),disabled:t.isProcessing}," Approve ",8,jD),m("button",{class:"reject-btn",onClick:c=>t.handleAction(l.id,"reject"),disabled:t.isProcessing}," Reject ",8,HD)])]))),128))])])]),le(a)],64)}const GD=je(ND,[["render",VD],["__scopeId","data-v-fbe53b6d"]]),WD="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.9219%2022C17.4219%2022%2021.9219%2017.5%2021.9219%2012C21.9219%206.5%2017.4219%202%2011.9219%202C6.42188%202%201.92188%206.5%201.92188%2012C1.92187%2017.5%206.42188%2022%2011.9219%2022Z'%20stroke='%23292D32'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.92188%2012H15.9219'%20stroke='%23292D32'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",qD="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.57687%2019.1675L2.55687%2019.1875C2.28687%2018.5975%202.11688%2017.9275%202.04688%2017.1875C2.11688%2017.9175%202.30687%2018.5775%202.57687%2019.1675Z'%20fill='%23292D32'/%3e%3cpath%20d='M9.005%2010.5334C10.3194%2010.5334%2011.385%209.46788%2011.385%208.15344C11.385%206.839%2010.3194%205.77344%209.005%205.77344C7.69056%205.77344%206.625%206.839%206.625%208.15344C6.625%209.46788%207.69056%2010.5334%209.005%2010.5334Z'%20fill='%23292D32'/%3e%3cpath%20d='M16.19%202.15625H7.81C4.17%202.15625%202%204.32625%202%207.96625V16.3463C2%2017.4363%202.19%2018.3863%202.56%2019.1863C3.42%2021.0863%205.26%2022.1562%207.81%2022.1562H16.19C19.83%2022.1562%2022%2019.9862%2022%2016.3463V14.0562V7.96625C22%204.32625%2019.83%202.15625%2016.19%202.15625ZM20.37%2012.6562C19.59%2011.9862%2018.33%2011.9862%2017.55%2012.6562L13.39%2016.2262C12.61%2016.8962%2011.35%2016.8962%2010.57%2016.2262L10.23%2015.9462C9.52%2015.3263%208.39%2015.2662%207.59%2015.8062L3.85%2018.3162C3.63%2017.7562%203.5%2017.1063%203.5%2016.3463V7.96625C3.5%205.14625%204.99%203.65625%207.81%203.65625H16.19C19.01%203.65625%2020.5%205.14625%2020.5%207.96625V12.7662L20.37%2012.6562Z'%20fill='%23292D32'/%3e%3c/svg%3e",yl="data:image/svg+xml,%3csvg%20width='7'%20height='13'%20viewBox='0%200%207%2013'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.42938%208.63281L3.65119%2010.411C3.44119%2010.621%203.09756%2010.621%202.88756%2010.411L1.10938%208.63281'%20stroke='%23B4B3BA'%20stroke-width='1.1875'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.42938%204.84193L3.65119%203.06375C3.44119%202.85375%203.09756%202.85375%202.88756%203.06375L1.10938%204.84193'%20stroke='%23B4B3BA'%20stroke-width='1.1875'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",wl="data:image/svg+xml,%3csvg%20width='10'%20height='8'%20viewBox='0%200%2010%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.75%203.83L3.58%206.66L9.25%201'%20stroke='%23292D32'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",KD={class:"flex"},ZD={class:"model-text"},YD=["onClick"],XD={class:"dropdown-model-text"},QD=Ae({__name:"MobileModelsSelector",props:{modelsInfo:Object},emits:["updateSelectedModel"],setup(t){const e=re(null),n=re(null),{floatingStyles:r}=xw(e,n,{placement:"bottom-end",middleware:[],transform:!1}),i=fn(),s=re(so[i.params.id||"sdxl"]),o=re(!1),a=["sdxl","flux-dev","sd3","normal","amused","flux-schnell"];for(const l of wi)a.push(l[0]);return en(e,()=>{o.value=!1}),(l,c)=>{var u,h;return U(),Z("div",{class:"selector-container",onClick:c[0]||(c[0]=p=>o.value=!o.value),ref_key:"reference",ref:e},[c[2]||(c[2]=m("div",{class:"flex"},[m("img",{src:qD}),m("span",null,"AI Model")],-1)),m("div",KD,[m("span",ZD,ve(((h=(u=t.modelsInfo)==null?void 0:u.find(p=>p.slug===s.value))==null?void 0:h.name)||de(Vo)(s.value)),1),c[1]||(c[1]=m("img",{src:yl},null,-1))]),o.value?(U(),Z("div",{key:0,class:"popup",ref_key:"floating",ref:n,style:xn(de(r))},[(U(),Z(Se,null,Ye(a,p=>{var d,g;return m("button",{class:"menu-item flex",key:p,onClick:v=>{s.value=p,l.$emit("updateSelectedModel",p)}},[m("img",{src:wl,style:xn({visibility:p===s.value?"visible":"hidden"})},null,4),m("span",XD,ve(((g=(d=t.modelsInfo)==null?void 0:d.find(v=>v.slug===p))==null?void 0:g.name)||de(Vo)(p)),1)],8,YD)}),64))],4)):we("",!0)],512)}}}),JD=je(QD,[["__scopeId","data-v-8aff32e2"]]),eB=["width","height"],tB=["stroke","stroke-width"],nB=["stroke","stroke-width"],rB=["stroke","stroke-width"],iB=Ae({__name:"addCircleIcon",props:{width:{},height:{},stroke:{},strokeWidth:{}},setup(t){return(e,n)=>(U(),Z("svg",{width:e.width||24,height:e.height||24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m("path",{d:"M12 22C17.5 22 22 17.5 22 12C22 6.5 17.5 2 12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22Z",stroke:e.stroke||"#292D32","stroke-width":e.strokeWidth||1.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,tB),m("path",{d:"M8 12H16",stroke:e.stroke||"#292D32","stroke-width":e.strokeWidth||1.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,nB),m("path",{d:"M12 16V8",stroke:e.stroke||"#292D32","stroke-width":e.strokeWidth||1.5,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,rB)],8,eB))}}),sB={class:"container"},oB={class:"prompt-container"},aB={key:0,src:WD},lB={key:0,class:"prompt-container"},cB={class:"flex"},uB=["disabled"],dB="mobile-workflow/sd-main-form",fB=Ae({__name:"MobileCreateInput",emits:["changeToResults"],setup(t,{emit:e}){const n=e,r=vt("showErrorModal"),i=typeof window=="object"?window.history:{},s=Ct(),o=fn(),a=re(!1),l=re([]),c=re(),u=re({prompt:"",negative_prompt:"",variant:so[o.params.id]}),h=re(!1),p=async()=>{const x=["slug","name","recommended_settings"],y=["stable-diffusion","sdxl","amused-diffusion","sd3","flux-schnell","flux-dev"];return Tt.getInstance().getModelBySlug(y,x).then(f=>l.value=f)};ut(async()=>{window.scrollTo({top:0});const x=localStorage.getItem(`${dB}.prompt`);x&&(u.value.prompt=x),p().then(async()=>{const y=localStorage.getItem("create-immediately"),_=await(s==null?void 0:s.appContext.config.globalProperties.$oidc.mgr.getUser());y&&_&&(g(),localStorage.removeItem("create-immediately"))})});const d=x=>{u.value.variant=x,i.pushState({},null,`/run-model-mobile/${z5[x]}`)},g=async()=>{var w,k;if(u.value.prompt===""){r("CWES524");return}const x=JSON.parse((k=(w=l.value)==null?void 0:w.find(P=>P.slug===o.params.id))==null?void 0:k.recommended_settings);x.artisan=x.scheduler,delete x.scheduler;const y=await(s==null?void 0:s.appContext.config.globalProperties.$oidc.mgr.getUser()),_={...x,controlnet:null,...u.value,num_outputs:1,composition:Math.floor(Math.random()*999999)},f=s==null?void 0:s.appContext.config.globalProperties.$cogniwerk;let b;h.value=!0;try{b=await f.executeStableDiffusion(y.access_token,_),c.value=window.setInterval(async()=>{var D,S;let P;try{if(P=await f.getWorkflowStatus(y.access_token,b.workflow.id),(D=P==null?void 0:P.result)!=null&&D.error){h.value=!1;return}}catch(F){console.debug("Error: failed to get workflow status",F),h.value=!1;return}const $=(S=P.result)==null?void 0:S.progress;if(($==null?void 0:$.percentage)==100){n("changeToResults"),h.value=!1;try{clearInterval(c.value)}catch{console.debug("cannot clear interval!",c.value)}St.destroyAll()}},2500)}catch{h.value=!1,clearInterval(c.value),St.destroyAll(),r("CWES513");return}},v=()=>{St.destroyAll(),setTimeout(()=>St.load({duration:3e3,message:"Please wait a second, your output is being generated …"}),500)};return(x,y)=>(U(),Z(Se,null,[h.value?(U(),Z("div",{key:0,class:"loading-overlay",onClick:Ee(v,["stop"])})):we("",!0),m("div",sB,[m("div",oB,[y[3]||(y[3]=m("label",null,"Prompt",-1)),Fe(m("textarea",{class:"prompt-input",placeholder:"Your prompt here...","onUpdate:modelValue":y[0]||(y[0]=_=>u.value.prompt=_)},null,512),[[dn,u.value.prompt]])]),m("button",{class:"add-negative-prompt-btn",onClick:y[1]||(y[1]=Ee(()=>{a.value&&(u.value.negative_prompt=""),a.value=!a.value},["stop"]))},[a.value?(U(),Z("img",aB)):(U(),Xe(iB,{key:1})),y[4]||(y[4]=m("span",null,"Add Negative Prompt",-1))]),a.value?(U(),Z("div",lB,[Fe(m("textarea",{class:"prompt-input",placeholder:"Your negative prompt here...","onUpdate:modelValue":y[2]||(y[2]=_=>u.value.negative_prompt=_)},null,512),[[dn,u.value.negative_prompt]])])):we("",!0),le(JD,{onUpdateSelectedModel:d,modelsInfo:l.value},null,8,["modelsInfo"]),m("div",cB,[m("button",{class:"create-btn",onClick:g,disabled:h.value},[He(ve(h.value?"Generating":"Create")+" ",1),Fe(le(Ql,{size:"26px",color:"white"},null,512),[[et,h.value]])],8,uB)]),y[5]||(y[5]=m("div",{class:"create-text"},[He(" create "),m("br"),He(" something "),m("br"),He(" big with "),m("br"),He(" cogniwerk. ")],-1))])],64))}}),hB=je(fB,[["__scopeId","data-v-8bdd8ce4"]]),pB="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.4969%202.03906H6.51354C3.48021%202.03906%201.67188%203.8474%201.67188%206.88073V13.8557C1.67188%2016.8974%203.48021%2018.7057%206.51354%2018.7057H13.4885C16.5219%2018.7057%2018.3302%2016.8974%2018.3302%2013.8641V6.88073C18.3385%203.8474%2016.5302%202.03906%2013.4969%202.03906ZM7.20521%2011.0474L10.8552%207.3974H8.83021C8.48854%207.3974%208.20521%207.11406%208.20521%206.7724C8.20521%206.43073%208.48854%206.1474%208.83021%206.1474H12.3635C12.4469%206.1474%2012.5219%206.16406%2012.6052%206.1974C12.7552%206.26406%2012.8802%206.38073%2012.9469%206.53906C12.9802%206.61406%2012.9969%206.6974%2012.9969%206.78073V10.3141C12.9969%2010.6557%2012.7135%2010.9391%2012.3719%2010.9391C12.0302%2010.9391%2011.7469%2010.6557%2011.7469%2010.3141V8.28906L8.08854%2011.9307C7.96354%2012.0557%207.80521%2012.1141%207.64687%2012.1141C7.48854%2012.1141%207.33021%2012.0557%207.20521%2011.9307C6.96354%2011.6891%206.96354%2011.2891%207.20521%2011.0474ZM15.2052%2014.7224C13.5302%2015.2807%2011.7719%2015.5641%2010.0052%2015.5641C8.23854%2015.5641%206.48021%2015.2807%204.80521%2014.7224C4.48021%2014.6141%204.30521%2014.2557%204.41354%2013.9307C4.52187%2013.6057%204.87187%2013.4224%205.20521%2013.5391C8.30521%2014.5724%2011.7135%2014.5724%2014.8135%2013.5391C15.1385%2013.4307%2015.4969%2013.6057%2015.6052%2013.9307C15.7052%2014.2641%2015.5302%2014.6141%2015.2052%2014.7224Z'%20fill='white'/%3e%3c/svg%3e",Op="data:image/svg+xml,%3csvg%20width='25'%20height='20'%20viewBox='0%200%2025%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.8429%206.66406C19.2447%206.66406%2020.381%205.54477%2020.381%204.16406C20.381%202.78335%2019.2447%201.66406%2017.8429%201.66406C16.4411%201.66406%2015.3047%202.78335%2015.3047%204.16406C15.3047%205.54477%2016.4411%206.66406%2017.8429%206.66406Z'%20fill='white'/%3e%3cpath%20d='M18.9776%2010.6021H16.1772C15.3904%2010.6021%2014.6881%2011.0354%2014.3328%2011.7188L13.6559%2013.0354C13.4952%2013.3521%2013.1737%2013.5438%2012.8183%2013.5438H10.1871C9.94174%2013.5438%209.57794%2013.4938%209.3495%2013.0271L8.68111%2011.7188C8.32577%2011.0271%207.62354%2010.5938%206.83671%2010.5938H4.01934C3.71475%2010.6021%203.46094%2010.8521%203.46094%2011.1521V13.7271C3.46094%2016.6187%205.21228%2018.3354%208.13964%2018.3354H14.8743C17.6324%2018.3354%2019.333%2016.8438%2019.536%2014.2021V11.1521C19.536%2010.8521%2019.2822%2010.6021%2018.9776%2010.6021Z'%20fill='white'/%3e%3cpath%20d='M19.536%208.66667V9.44167C19.3584%209.38333%2019.1722%209.35%2018.9776%209.35H16.1772C14.9081%209.35%2013.7659%2010.0417%2013.2075%2011.1583L12.6153%2012.3H10.3902L9.81483%2011.1667C9.23951%2010.0417%208.10579%209.35%206.83671%209.35H4.01934C3.82474%209.35%203.63861%209.38333%203.46094%209.44167V7.1C3.46094%204.55833%205.5507%202.5%208.13118%202.5H13.2752C13.8167%202.5%2014.2059%202.98333%2014.1043%203.5C13.969%204.16667%2014.0282%204.89167%2014.3582%205.65833C14.7389%206.525%2015.4496%207.225%2016.3295%207.6C17.1078%207.925%2017.8439%207.98333%2018.5208%207.85C19.0453%207.75%2019.536%208.13333%2019.536%208.66667Z'%20fill='white'/%3e%3c/svg%3e",gB="data:image/svg+xml,%3csvg%20width='22'%20height='20'%20viewBox='0%200%2022%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.2527%203.27918C18.1151%206.00418%2015.5185%209.56251%2013.0435%2011.8875C12.6874%209.73751%2010.8985%208.05418%208.64062%207.75418C11.0722%205.37084%2014.8064%202.84584%2017.6548%201.74584C18.1585%201.56251%2018.6622%201.70418%2018.9748%202.00418C19.3048%202.32084%2019.4611%202.79584%2019.2527%203.27918Z'%20fill='white'/%3e%3cpath%20d='M12.282%2012.5745C12.1083%2012.7161%2011.9346%2012.8578%2011.761%2012.9911L10.2065%2014.1828C10.2065%2014.1578%2010.1978%2014.1245%2010.1978%2014.0911C10.0762%2013.1995%209.64203%2012.3745%208.93861%2011.6995C8.22651%2011.0161%207.34072%2010.5995%206.36809%2010.4828C6.34204%2010.4828%206.3073%2010.4745%206.28125%2010.4745L7.54045%208.94948C7.66203%208.79948%207.7923%208.65781%207.93124%208.50781L8.52177%208.58281C10.3889%208.83281%2011.8912%2010.2411%2012.1865%2012.0245L12.282%2012.5745Z'%20fill='white'/%3e%3cpath%20d='M9.37216%2014.684C9.37216%2015.6007%209.00742%2016.4757%208.31269%2017.134C7.78295%2017.6507%207.07085%2018.0007%206.20243%2018.1007L4.07481%2018.3257C2.91113%2018.4507%201.91245%2017.4923%202.04272%2016.3673L2.27719%2014.3173C2.48561%2012.4923%204.07481%2011.3257%205.75954%2011.2923C5.92454%2011.284%206.10691%2011.2923%206.28059%2011.309C7.01875%2011.4007%207.73085%2011.7257%208.33006%2012.2923C8.9119%2012.8507%209.24189%2013.509%209.33742%2014.2007C9.35479%2014.3673%209.37216%2014.5257%209.37216%2014.684Z'%20fill='white'/%3e%3c/svg%3e",Mp="data:image/svg+xml,%3csvg%20width='21'%20height='20'%20viewBox='0%200%2021%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.2%201.66406H7.21667C4.18333%201.66406%202.375%203.4724%202.375%206.50573V13.4807C2.375%2016.5224%204.18333%2018.3307%207.21667%2018.3307H14.1917C17.225%2018.3307%2019.0333%2016.5224%2019.0333%2013.4891V6.50573C19.0417%203.4724%2017.2333%201.66406%2014.2%201.66406ZM13.5083%2011.9141C13.75%2012.1557%2013.75%2012.5557%2013.5083%2012.7974C13.3833%2012.9224%2013.225%2012.9807%2013.0667%2012.9807C12.9083%2012.9807%2012.75%2012.9224%2012.625%2012.7974L10.7083%2010.8807L8.79167%2012.7974C8.66667%2012.9224%208.50833%2012.9807%208.35%2012.9807C8.19167%2012.9807%208.03333%2012.9224%207.90833%2012.7974C7.66667%2012.5557%207.66667%2012.1557%207.90833%2011.9141L9.825%209.9974L7.90833%208.08073C7.66667%207.83906%207.66667%207.43906%207.90833%207.1974C8.15%206.95573%208.55%206.95573%208.79167%207.1974L10.7083%209.11406L12.625%207.1974C12.8667%206.95573%2013.2667%206.95573%2013.5083%207.1974C13.75%207.43906%2013.75%207.83906%2013.5083%208.08073L11.5917%209.9974L13.5083%2011.9141Z'%20fill='white'/%3e%3c/svg%3e",mB="data:image/svg+xml,%3csvg%20width='29'%20height='29'%20viewBox='0%200%2029%2029'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.6217%2022.5753L10.5964%2019.4994C10.3077%2018.645%209.64183%2017.9791%208.78741%2017.6904L5.7115%2016.6651C3.07163%2015.7812%203.10699%2012.0335%205.76453%2011.2145L7.15518%2010.7902C7.34374%2010.7313%207.54998%2010.7372%207.73854%2010.8079L18.5455%2014.8973C18.9874%2015.0682%2019.2231%2015.5514%2019.0817%2015.9992L17.0606%2022.5105C16.2415%2025.1681%2012.4997%2025.2093%2011.6217%2022.5753Z'%20fill='white'/%3e%3cpath%20d='M18.7973%2013.7283L11.7203%2011.0472C10.9248%2010.7467%2010.9602%209.60353%2011.7733%209.35604L16.9647%207.74738C19.1685%207.06384%2021.2309%209.12623%2020.5473%2011.33L19.9758%2013.1626C19.8167%2013.6517%2019.2746%2013.911%2018.7973%2013.7283Z'%20fill='white'/%3e%3c/svg%3e",vB={class:"wfs-container"},_B={class:"wf-img"},bB={class:"wf-data-container"},xB={class:"field-container"},yB={class:"field-text"},wB={class:"field-container"},CB={class:"field-text"},kB={key:0,class:"field-container"},SB={class:"field-text"},AB=["onClick"],EB={class:"terms-modal"},$B={key:0,class:"control-btns-container"},TB={key:1,class:"popup-container"},PB=["innerHTML"],DB={class:"popup-btns-container"},BB={key:2,class:"popup-container"},FB={class:"input-container field"},IB={class:"popup-btns-container"},RB="https://cw-imageserver.b-cdn.net",OB=Ae({__name:"MobileResults",emits:["handleCreateAgain"],setup(t,{emit:e}){const n=e,r=vt("showErrorModal"),i=Ct(),s=re(""),o=re(!1),a=re([]),l=re(""),c=i==null?void 0:i.appContext.config.globalProperties.$cogniwerk,u=re(!1),h=re(!1),p=re(null),d=()=>{o.value=!1};async function g(){const y=i==null?void 0:i.appContext.config.globalProperties.$cogniwerk,_=await(i==null?void 0:i.appContext.config.globalProperties.$oidc.mgr.getUser());if((_==null?void 0:_.access_token)===void 0)return;let f=(await y.getWorkflows(_.access_token)).workflows;f=bl(f);const b=[];for(const w of f)w.stage!=="completed"&&(w.lastArtifact={createdAt:"",url:""}),b.push(w);b.sort((w,k)=>k.lastArtifact.createdAt.localeCompare(w.lastArtifact.createdAt)),a.value=b==null?void 0:b.filter(w=>w.lastArtifact.aiModel!=="user-upload").slice(0,20)}ut(()=>{g(),Tt.getInstance().getUITexts(["desktop-reminder-popup"]).then(_=>{s.value=_[0].content});const y=sessionStorage.getItem("hideNudgeForDesktop");vn()&&!y&&setTimeout(()=>{h.value=!0,sessionStorage.setItem("hideNudgeForDesktop","true")},5e3)});const v=async y=>{o.value=!0,await new Promise(w=>{p.value=w});const f=i==null?void 0:i.appContext.config.globalProperties.$cogniwerk,b=await(i==null?void 0:i.appContext.config.globalProperties.$oidc.mgr.getUser());try{const w=await f.createArtifactShareLink(b.access_token,{artifactId:y}),k=window.location.host;await navigator.clipboard.writeText(`${k}/share/${w.artifactLink}`),St.success("The link has been copied to your clipboard")}catch{r("CWES508")}};at(o,y=>{!y&&p.value&&(p.value(),p.value=null)});async function x(){if(l.value===""){St.error("Email cannot be empty!");return}try{const f={email:l.value,journey_id:3532,step_id:28866};await c.triggerCustomerJourney(f),St.success("Email added! We'll remind you again in 3 days.")}catch(y){console.log(y),St.error("Something went wrong!")}u.value=!1}return(y,_)=>{const f=pa("lazyload");return U(),Z(Se,null,[m("div",vB,[(U(!0),Z(Se,null,Ye(a.value,b=>{var w,k,P,$,D,S,F,A;return U(),Z("div",{class:"wf-container",key:b.id},[Fe(m("img",_B,null,512),[[f,RB+"/350,sc,png,q85/"+b.lastStepUrl]]),m("div",bB,[m("div",xB,[_[6]||(_[6]=m("p",{class:"field-heading"},"Model",-1)),m("p",yB,ve((k=(w=b==null?void 0:b.lastArtifact)==null?void 0:w.aiModel)==null?void 0:k.replace("-"," ")),1)]),m("div",wB,[_[7]||(_[7]=m("p",{class:"field-heading"},"Prompt",-1)),m("p",CB,ve(de(H5)((($=(P=b==null?void 0:b.lastArtifact)==null?void 0:P.inputs)==null?void 0:$.prompt)||"")),1)]),(S=(D=b==null?void 0:b.lastArtifact)==null?void 0:D.inputs)!=null&&S.negative_prompt?(U(),Z("div",kB,[_[8]||(_[8]=m("p",{class:"field-heading"},"Negative Prompt",-1)),m("p",SB,ve(de(V5)(((A=(F=b==null?void 0:b.lastArtifact)==null?void 0:F.inputs)==null?void 0:A.negative_prompt)||"")),1)])):we("",!0),m("button",{class:"share-btn",onClick:E=>v(b.lastArtifact.id)},_[9]||(_[9]=[m("img",{src:pB},null,-1),He(" Share ")]),8,AB),Fe(m("div",EB,[m("div",{class:"modal-content"},[_[10]||(_[10]=m("h5",{class:"terms-modal-header"},"Important!",-1)),_[11]||(_[11]=m("p",{class:"terms-modal-text"},[He(" Please make sure that you have read the "),m("a",{target:"_blank",href:"https://cogniwerk.ai/privacy"},"Terms of Use"),He(". Only share created content if you have made sure that the content complies with the relevant laws and standards. ")],-1)),m("div",{class:"btn-section"},[m("button",{onClick:d},"Understood")])])],512),[[et,o.value]])])])}),128))]),!h.value&&!u.value?(U(),Z("div",$B,[de(vn)()?(U(),Z("button",{key:0,class:"btn",onClick:_[0]||(_[0]=b=>u.value=!0)},_[12]||(_[12]=[m("img",{src:Op},null,-1),He("Send Reminder ")]))):we("",!0),m("button",{class:"btn create-btn",onClick:_[1]||(_[1]=b=>n("handleCreateAgain"))},_[13]||(_[13]=[m("img",{src:gB},null,-1),He("Create again ")]))])):we("",!0),h.value&&de(vn)()&&s.value?(U(),Z("div",TB,[m("div",{innerHTML:s.value,class:"popup-text-container"},null,8,PB),m("div",DB,[m("button",{class:"btn",onClick:_[2]||(_[2]=b=>h.value=!1)},_[14]||(_[14]=[m("img",{src:Mp},null,-1),He("Close ")])),m("button",{class:"btn create-btn",onClick:_[3]||(_[3]=b=>{u.value=!0,h.value=!1})},_[15]||(_[15]=[m("img",{src:Op},null,-1),He("Remind me ")]))])])):we("",!0),u.value?(U(),Z("div",BB,[_[18]||(_[18]=m("h1",null,[He(" Experience the full suite of "),m("span",{class:"gradient"},"Cogniwerk"),He(" on the Desktop Version. ")],-1)),_[19]||(_[19]=m("p",null," We will send you an email to remind you to check out our full version on desktop. ",-1)),m("div",FB,[Fe(m("input",{type:"email",class:"form-field",placeholder:"Email","onUpdate:modelValue":_[4]||(_[4]=b=>l.value=b),required:""},null,512),[[dn,l.value]])]),m("div",IB,[m("button",{class:"btn",onClick:_[5]||(_[5]=b=>u.value=!1)},_[16]||(_[16]=[m("img",{src:Mp},null,-1),He("Close ")])),m("button",{class:"btn create-btn",onClick:x},_[17]||(_[17]=[m("img",{src:mB,style:{"margin-bottom":"6px","margin-right":"-6px"}},null,-1),He("Send ")]))])])):we("",!0)],64)}}}),MB=je(OB,[["__scopeId","data-v-bdf4b4a9"]]),LB={class:"interface-container"},NB=Ae({__name:"MobileInterfaceView",setup(t){const e=re("interface"),n=$n(),r=fn(),i=Ct(),s=re([]);ut(async()=>{if(Tt.getInstance().getErrorValues().then(h=>{s.value=h}),!vn()){n.push("/run-model/"+r.params.id);return}await(i==null?void 0:i.appContext.config.globalProperties.$oidc.mgr.getUser())?localStorage.removeItem("login-return-path"):(localStorage.setItem("login-return-path",window.location.href),n.push("/login"))});const o=re(!1),a=Pt({error_code:"",headline:"",text:"",icon:"",feedback:!1,link:null,buttons:[]});function l(u){const h=s.value.find(p=>p.error_code===u);h&&(Object.assign(a,h),o.value=!0)}function c(){o.value=!1,Object.assign(a,{error_code:"",headline:"",text:"",icon:"",feedback:!1,link:null,buttons:[]})}return mn("showErrorModal",l),(u,h)=>(U(),Z(Se,null,[m("div",LB,[le(Fn),e.value==="interface"?(U(),Xe(hB,{key:0,onChangeToResults:h[0]||(h[0]=p=>e.value="results")})):e.value==="results"?(U(),Xe(MB,{key:1,onHandleCreateAgain:h[1]||(h[1]=p=>e.value="interface")})):we("",!0)]),a?(U(),Xe(G5,{key:0,class:"error-modal",visible:o.value,heading:a==null?void 0:a.headline,text:a==null?void 0:a.text,buttons:a==null?void 0:a.buttons,link:a==null?void 0:a.link,showFeedback:a==null?void 0:a.feedback,icon:a==null?void 0:a.icon,onClose:c},null,8,["visible","heading","text","buttons","link","showFeedback","icon"])):we("",!0)],64))}}),UB=je(NB,[["__scopeId","data-v-0ce383c6"]]),zB="data:image/svg+xml,%3csvg%20width='22'%20height='20'%20viewBox='0%200%2022%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.312%203.28c-1.138%202.724-3.734%206.283-6.21%208.607-.356-2.15-2.144-3.833-4.402-4.133%202.431-2.383%206.166-4.908%209.014-6.008a1.273%201.273%200%200%201%201.32.258c.33.317.486.792.278%201.275z'%20fill='%23fff'/%3e%3cpath%20d='M12.34%2012.575c-.174.141-.348.283-.521.416l-1.555%201.192c0-.025-.009-.059-.009-.092-.121-.891-.555-1.716-1.259-2.391a4.44%204.44%200%200%200-2.57-1.217c-.026%200-.061-.008-.087-.008l1.26-1.526c.12-.15.25-.291.39-.441l.59.075c1.867.25%203.37%201.658%203.665%203.441l.096.55z'%20fill='%23fff'/%3e%3cpath%20d='M9.43%2014.684c0%20.917-.365%201.792-1.06%202.45-.53.517-1.242.867-2.11.967l-2.128.225c-1.163.125-2.162-.834-2.032-1.959l.235-2.05c.208-1.825%201.797-2.991%203.482-3.025.165-.008.348%200%20.521.017.738.092%201.45.417%202.05.983.582.559.912%201.217%201.007%201.909.017.166.035.325.035.483z'%20fill='%23fff'/%3e%3c/svg%3e",jB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTP///////////////////////7fKAdoAAAAGdFJOUwDfMO+/kKTEoRYAAAA0SURBVBjTY2CgJ1BxQrCZzJIV4BzltDQjhERaGlwKKAGXAknApRjTwMAAzGEVBIMA+vkEAIL+C1oCj0NNAAAAAElFTkSuQmCC",HB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTCksNCksMiksMiotMigtMiktMygvNCktMikuMiktMyktMiAwMCsuMiAwQCswMCktMqF2yFgAAAAQdFJOUwBAkHDvf8Ug399QqhBgEDAAIbDYAAAAbUlEQVQY01WPWQ7AIAhERwQF7OL9T1ttWqJ8EB7DCqxWN0IqrKtaLIGPYGcBzhYsdo8ijSFSZkgU3NVHg/0Tsh1uKRqus/vcqflbp41MULt89WUIlfOvA3064hQHvtc2x5q4xJYfiI3L9mbd6AFTqAKE1S6d6wAAAABJRU5ErkJggg==",VB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA5UExURSguNCouMikuMysuMiktMiAwMCktNCkuMkdwTCktMjAwMCktMiktMyswNSgtMystMiktMiAwQCgsMjdGaNcAAAATdFJOUyCAzzDfEEDfAPEQmL8wUGCvEIBWyKjuAAAAgUlEQVQY02WPSxLEIAhEQY20n0ST+x92AE020wuKfoUtEFQ3uW7rCbh6EVcJw8CQjK2sLSEsX5k55g6qBRvMwigHUdrzp0yGaHZ4fWQHOBZoEdoaOKdIaBsbSBdRbO0DK/SN/gPftxvkYItZ3uju06WrP3ZaiVVLz36tPiOd8gL8ALv6Bu5W7uYSAAAAAElFTkSuQmCC",GB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA2UExURUdwTCktMikuMiksMigtMiktMiAwMCktMigvNSksMiktMyAwQCguMjAwMCkuMyktMyguMyktMqQDMakAAAARdFJOUwCf32Bw3xDvIJBDEIAQz69fYabkswAAAH1JREFUGNNVTosOwyAQwvrgtGrr///s7i7t5ogRIREAgFPgeBk9F9e5P8Y4qlE48EKYgET5Gibc/KHmXHeNQZY/I5H3rjVgyzxTtYAwQ3RP8rxsSGU4fGHUPbJEDzCtOgS92BqVLutumtZZBrv+jj5qkfqI5HrGSfNRpVnJB3ogA1e/4pm5AAAAAElFTkSuQmCC",WB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA8UExURUdwTCotMikuMiktMystMiktMiktMyQwMygwMikuMiotMyktMyksMiouNCktMikuMigsMiktMSktMygtMqaT3JQAAAAUdFJOUwCfcFBg378QIN+vr5BA93+AoM9gpYoaTAAAAIFJREFUGNNtj0kWwzAIQ8HGFp7i6f53Da912k1YIPgLkIjeqhUGSmzP3pOvhfNO/YBLCXWAcB0Q/Vd9/AhkbYJzSrK8GghlkAaeAbSzNQ0GHRNNZ0PSP+ADkIpYY7a552RQ/RJS50ASBW9vzZh56tXuP8ZGkDxzlTB+4WIFZm6vyW8qqAQQGvRR/QAAAABJRU5ErkJggg==",qB={class:"image-info"},KB={class:"d-flex justify-content-between align-items-center mb-3"},ZB={key:0,class:"mb-3 d-flex align-items-sm-end"},YB={class:"mb-0",style:{"font-size":"14px","margin-left":"8px"}},XB={key:1,class:"text-black mb-0 font-bold two-lines-text title"},QB={class:"mb-2"},JB={class:"prompt-sec p-2 text-black"},eF={class:"mb-2"},tF={class:"prompt-sec text-black p-2"},nF={class:"mb-2 d-flex justify-content-between align-items-center"},rF={class:"py-1 px-2 col-8 text-black info-item font-bold"},iF={key:1,class:"mb-3 d-flex justify-content-between align-items-center"},sF={class:"py-1 px-2 text-center info-item text-black font-bold"},oF={key:2,class:"mb-3 d-flex justify-content-between align-items-center"},aF={class:"info-item py-1 px-2 text-center text-white capitalize font-bold"},lF={class:"mb-2 d-flex justify-content-between align-items-center"},cF={class:"py-1 px-2 col-8 text-black info-item font-bold"},uF={class:"mb-2 d-flex justify-content-between align-items-center"},dF={class:"py-1 px-2 text-center info-item text-black font-bold"},fF={key:0,class:"mb-2 d-flex justify-content-between align-items-center"},hF={class:"py-1 px-2 col-2 text-center info-item text-black font-bold",style:{"text-align":"center"}},pF={class:"mb-2 d-flex justify-content-between align-items-center"},gF={class:"py-1 px-4 col-2 text-center info-item text-black font-bold"},mF={class:"mb-2 d-flex justify-content-between align-items-center"},vF={class:"py-1 px-2 text-center info-item text-black seed-value font-bold"},_F={class:"mb-2 d-flex justify-content-between align-items-center"},bF={class:"py-1 px-2 text-center info-item text-black font-bold"},xF={class:"mb-2 d-flex justify-content-between align-items-center"},yF={class:"py-1 px-2 text-center info-item text-black"},wF={class:"mb-2 d-flex justify-content-between align-items-center"},CF={class:"py-1 px-2 text-center info-item text-black"},kF={class:"mb-2 d-flex justify-content-between align-items-center"},SF={class:"py-1 px-2 text-center info-item text-black"},AF={class:"mb-2 d-flex justify-content-between align-items-center"},EF={class:"py-1 px-2 text-center info-item text-black"},$F={class:"mb-2 d-flex justify-content-between align-items-center d-none"},TF={class:"py-1 px-2 text-center info-item text-black"},PF={class:"mb-2 d-flex justify-content-between align-items-center d-none"},DF={class:"py-1 px-2 text-center info-item text-black"},BF={class:"mb-2 d-flex justify-content-between align-items-center d-none"},FF={class:"py-1 px-2 text-center info-item text-black"},IF=Ae({__name:"share-inspector",props:{mainImageArtifact:Object},emits:["closePopup","useGenerationData"],setup(t,{emit:e}){const n=t,r=e,i=Le(()=>{var o;let s=(o=n.mainImageArtifact)==null?void 0:o.aiModel;if(s!=null&&s.startsWith("civitai")){const a=s.split("-")[2],l=wi.find(c=>c.includes(a));l&&(s=l[0])}return s==null?void 0:s.replaceAll("-"," ")});return(s,o)=>{var a,l,c,u,h,p,d,g,v,x,y,_,f,b,w,k,P,$,D,S,F,A,E,T,L,X,J,ne,se,ce,j,V,oe,N,Q,fe,M,q,ee,ue,me,xe,z,C,O,H,I,R,Y,te,K,G,ie,he,ge,be,$e,Be,De,Qe,Ge,_t,Je,Gt,hn,rt,$t,Cn;return U(),Z("div",qB,[m("div",KB,[((a=t.mainImageArtifact)==null?void 0:a.aiModel)==="user-upload"?(U(),Z("div",ZB,[o[2]||(o[2]=m("p",{class:"mb-0 font-bold",style:{"font-size":"16px"}},"Uploaded on:",-1)),m("p",YB,ve((l=t.mainImageArtifact)==null?void 0:l.createdAt.split("T")[0]),1)])):(U(),Z("p",XB,ve(de(s2)((c=t.mainImageArtifact)==null?void 0:c.fileName)),1)),m("button",{class:"text-black btn close-btn",onClick:o[0]||(o[0]=Ee(()=>{r("closePopup")},["stop"]))},[le(wa)])]),((u=t.mainImageArtifact)==null?void 0:u.aiModel)!=="user-upload"?(U(),Z(Se,{key:0},[!((p=(h=t.mainImageArtifact)==null?void 0:h.aiModel)!=null&&p.endsWith("upscale"))&&!((g=(d=t.mainImageArtifact)==null?void 0:d.aiModel)!=null&&g.endsWith("removebg"))?(U(),Z(Se,{key:0},[m("div",QB,[o[3]||(o[3]=m("p",{class:"mb-1 text-black font-bold"},"Prompt",-1)),m("div",JB,ve((x=(v=t.mainImageArtifact)==null?void 0:v.inputs)==null?void 0:x.prompt),1)]),m("div",eF,[o[4]||(o[4]=m("p",{class:"mb-1 text-black font-bold"},"Negative Prompt",-1)),m("div",tF,ve((_=(y=t.mainImageArtifact)==null?void 0:y.inputs)==null?void 0:_.negative_prompt),1)])],64)):we("",!0),m("div",nF,[o[5]||(o[5]=m("p",{class:"mb-0 text-black font-bold"},"Model",-1)),m("div",rF,ve(i.value),1)]),(b=(f=t.mainImageArtifact)==null?void 0:f.aiModel)!=null&&b.endsWith("upscale")?(U(),Z("div",iF,[o[6]||(o[6]=m("p",{class:"mb-0 text-black font-bold"},"Scale by",-1)),m("div",sF,ve((k=(w=t.mainImageArtifact)==null?void 0:w.inputs)==null?void 0:k.scale_by)+"x ",1)])):we("",!0),(P=t.mainImageArtifact)!=null&&P.aiModel.endsWith("removebg")?(U(),Z("div",oF,[o[7]||(o[7]=m("p",{class:"mb-0 text-white font-bold"},"Removal Type",-1)),m("div",aF,ve(((S=(D=($=t.mainImageArtifact)==null?void 0:$.inputs)==null?void 0:D.variant)==null?void 0:S.split("-")[1])||"General"),1)])):we("",!0),!((A=(F=t.mainImageArtifact)==null?void 0:F.aiModel)!=null&&A.endsWith("upscale"))&&!((T=(E=t.mainImageArtifact)==null?void 0:E.aiModel)!=null&&T.endsWith("removebg"))?(U(),Z(Se,{key:3},[m("div",lF,[o[8]||(o[8]=m("p",{class:"mb-0 text-black font-bold"},"Artisan",-1)),m("div",cF,ve(((X=(L=t.mainImageArtifact)==null?void 0:L.inputs)==null?void 0:X.artisan)||"DPMSolverMultistep"),1)]),m("div",uF,[o[9]||(o[9]=m("p",{class:"mb-0 text-black font-bold"},"Time-Image Quality",-1)),m("div",dF,ve((ne=(J=t.mainImageArtifact)==null?void 0:J.inputs)==null?void 0:ne.num_inference_steps),1)]),(ce=(se=t.mainImageArtifact)==null?void 0:se.inputs)!=null&&ce.denoising_strength?(U(),Z("div",fF,[o[10]||(o[10]=m("p",{class:"mb-0 text-black font-bold"},"Denoising Strength",-1)),m("div",hF,ve((V=(j=t.mainImageArtifact)==null?void 0:j.inputs)==null?void 0:V.denoising_strength),1)])):we("",!0),m("div",pF,[o[11]||(o[11]=m("p",{class:"mb-0 text-black font-bold"},"Human-AI Quality",-1)),m("div",gF,ve((N=(oe=t.mainImageArtifact)==null?void 0:oe.inputs)==null?void 0:N.guidance_scale),1)]),m("div",mF,[o[12]||(o[12]=m("p",{class:"mb-0 text-black font-bold"},"Seed",-1)),m("div",vF,ve((fe=(Q=t.mainImageArtifact)==null?void 0:Q.inputs)!=null&&fe.seed?(q=(M=t.mainImageArtifact)==null?void 0:M.inputs)==null?void 0:q.seed:(ue=(ee=t.mainImageArtifact)==null?void 0:ee.inputs)==null?void 0:ue.composition),1)]),m("div",_F,[o[13]||(o[13]=m("p",{class:"mb-0 text-black font-bold"},"Image Dimensions",-1)),m("div",bF,ve((xe=(me=t.mainImageArtifact)==null?void 0:me.inputs)==null?void 0:xe.width)+" x "+ve((C=(z=t.mainImageArtifact)==null?void 0:z.inputs)==null?void 0:C.height),1)]),(H=(O=t.mainImageArtifact)==null?void 0:O.inputs)!=null&&H.controlnet?(U(),Z(Se,{key:1},[m("div",xF,[o[14]||(o[14]=m("p",{class:"mb-0 text-black font-bold"},"Control Type",-1)),m("div",yF,ve((Y=(R=(I=t.mainImageArtifact)==null?void 0:I.inputs)==null?void 0:R.controlnet)==null?void 0:Y.control_type),1)]),m("div",wF,[o[15]||(o[15]=m("p",{class:"mb-0 text-black font-bold"},"Control Weight",-1)),m("div",CF,ve((G=(K=(te=t.mainImageArtifact)==null?void 0:te.inputs)==null?void 0:K.controlnet)==null?void 0:G.control_weight),1)]),m("div",kF,[o[16]||(o[16]=m("p",{class:"mb-0 text-black font-bold"},"Starting Control Step",-1)),m("div",SF,ve((ge=(he=(ie=t.mainImageArtifact)==null?void 0:ie.inputs)==null?void 0:he.controlnet)==null?void 0:ge.starting_control_step),1)]),m("div",AF,[o[17]||(o[17]=m("p",{class:"mb-0 text-black font-bold"},"Ending Control Step",-1)),m("div",EF,ve((Be=($e=(be=t.mainImageArtifact)==null?void 0:be.inputs)==null?void 0:$e.controlnet)==null?void 0:Be.ending_control_step),1)]),m("div",$F,[o[18]||(o[18]=m("p",{class:"mb-0 text-black font-bold"},"Preprocessor Resolution",-1)),m("div",TF,ve((Ge=(Qe=(De=t.mainImageArtifact)==null?void 0:De.inputs)==null?void 0:Qe.controlnet)==null?void 0:Ge.preprocessor_resolution),1)]),m("div",PF,[o[19]||(o[19]=m("p",{class:"mb-0 text-black font-bold"},"Control Mode",-1)),m("div",DF,ve((Gt=(Je=(_t=t.mainImageArtifact)==null?void 0:_t.inputs)==null?void 0:Je.controlnet)==null?void 0:Gt.control_mode),1)]),m("div",BF,[o[20]||(o[20]=m("p",{class:"mb-0 text-black font-bold"},"Resize Mode",-1)),m("div",FF,ve(($t=(rt=(hn=t.mainImageArtifact)==null?void 0:hn.inputs)==null?void 0:rt.controlnet)==null?void 0:$t.resize_mode),1)])],64)):we("",!0)],64)):we("",!0),((Cn=t.mainImageArtifact)==null?void 0:Cn.aiModel)!=="user-upload"?(U(),Z("button",{key:4,class:"inspector-btn",onClick:o[1]||(o[1]=hr=>{r("useGenerationData"),r("closePopup")}),id:"use-generation-button"}," Use generation data ")):we("",!0)],64)):we("",!0)])}}}),RF=je(IF,[["__scopeId","data-v-d99870ca"]]),OF={class:"body"},MF={class:"progress"},LF={key:2,class:"parent"},NF={class:"content-block model-block"},UF={class:"left-block"},zF={class:"img-container"},jF=["src"],HF={class:"info-button position-absolute pointer",style:{top:"10px",left:"25px"}},VF={src:Xl,class:"info-svg",alt:"settings"},GF={class:"button-container"},WF={class:"right-block"},qF={class:"details-container"},KF={class:"details"},ZF=["value"],YF=["value"],XF=["value"],QF=["value"],JF=["value"],eI={class:"details2"},tI={class:"inner-row"},nI=["value"],rI={class:"inner-row"},iI=["value"],sI={class:"inner-row"},oI=["value"],aI={class:"inner-row"},lI=["value"],cI={class:"buttons-container"},uI={class:"menu-container"},dI={key:0,class:"menu"},fI=Ae({__name:"ShareView",async setup(t){let e,n;const r=re(!0),i=re(!1),s=fn(),o=$n(),a=re(null),l=re(null),c=re(!1),u=Pt({imageData:{},linkId:""}),h=Ct(),p=ea.getInstance();async function d(){const w=s.params.linkId;a.value=Array.isArray(w)?w[0]:w,/^[a-z0-9]+$/.test(a.value)||(console.error("Invalid Share Link"),o.push("/"));try{const P=await p.fetchSharedImage(a.value);P.error&&(console.error(P.error),i.value=!0),P.success&&(u.imageData=P==null?void 0:P.imageData,r.value=!1),u.linkId=a}catch(P){console.log(P)}}const g=re(!1),v=()=>{g.value=!g.value},x=w=>{var $,D,S;const k=($=u.imageData)==null?void 0:$.artifact;k.aiModel=(D=u.imageData)==null?void 0:D.aiModel,k.inputs=(S=u.imageData)==null?void 0:S.inputs,k.to=w;let P="";switch(l.value=h==null?void 0:h.appContext.config.globalProperties.$oidc.mgr.getUser(),w){case"inpaint":P="/run-model/realistic-vision-inpainting";break;case"upscale":P="/run-model/aura-sr";break;case"removeBg":P="/run-model/remove-bg";break;case"controlnet":P="/run-model/sdxl",localStorage.setItem("gallery-selected-artifact",JSON.stringify({...k,controlnetImgUrl:k.url}));break}if(localStorage.setItem("gallery-selected-artifact",JSON.stringify(k)),l.value)o.push(P);else{localStorage.setItem("login-return-path",P),window.location.replace("/login");return}},y=([e,n]=ci(async()=>(async()=>{var P,$,D,S;await d();const w=u.imageData;let k=(P=w==null?void 0:w.artifact)==null?void 0:P.url;return k?k=`https://cw-imageserver.b-cdn.net/850,sc,png,q85/${k}`:(console.error("no image loaded!!!"),k="https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"),[{property:"title",content:`Shared Image by ${w.author}`},{name:"description",content:`This Image on Cogniwerk.ai was generated by ${w.author} using the Ai Model ${w==null?void 0:w.aiModel} with the prompt - ${($=w==null?void 0:w.inputs)==null?void 0:$.prompt.slice(0,50)}`},{name:"robots",content:"all"},{name:"keywords",content:"Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{property:"og:title",content:`Shared Image by ${w.author} #madewithcogniwerk`},{property:"og:image",content:k},{property:"og:description",content:`This Image on Cogniwerk.ai was generated by ${w.author} using the Ai Model ${w==null?void 0:w.aiModel} with the prompt - ${(D=w==null?void 0:w.inputs)==null?void 0:D.prompt.slice(0,50)}. #madewithcogniwerk.`},{property:"twitter:card",content:"summary"},{property:"twitter:title",content:"CogniWerk"},{property:"twitter:image",content:k},{property:"twitter:description",content:`This Image on Cogniwerk.ai was generated by ${w.author} using the Ai Model ${w==null?void 0:w.aiModel} with the prompt - ${(S=w==null?void 0:w.inputs)==null?void 0:S.prompt.slice(0,50)}`},{property:"og:url",content:`https://cogniwerk.ai/share/${a.value}`},{property:"twitter:url",content:`https://cogniwerk.ai/share/${a.value}`}]})()),e=await e,n(),e);function _(){var k,P,$;const w=(k=u.imageData)==null?void 0:k.artifact;if(w.aiModel=(P=u.imageData)==null?void 0:P.aiModel,w.inputs=($=u.imageData)==null?void 0:$.inputs,localStorage.setItem("gallery-selected-artifact",JSON.stringify(w)),l.value=h==null?void 0:h.appContext.config.globalProperties.$oidc.mgr.getUser(),l.value)o.push("/run-model/stable-diffusion?from=gallery");else{localStorage.setItem("login-return-path","/run-model/stable-diffusion?from=gallery"),window.location.replace("/login");return}}function f(){c.value=!c.value}const b=re(null);return en(b,()=>{c.value=!1},"click"),(w,k)=>{var P,$,D,S,F,A,E,T,L,X,J,ne,se,ce,j,V,oe,N,Q,fe,M,q,ee,ue,me,xe,z,C,O,H,I;return U(),Z(Se,null,[m("div",OF,[m("header",null,[le(Fn)]),r.value&&!i.value?(U(),Z(Se,{key:0},[k[10]||(k[10]=m("div",null,null,-1)),m("div",MF,[le(Ql,{size:"120px",color:"black"}),k[9]||(k[9]=m("p",{style:{"font-size":"16px","line-height":"1.1em","margin-top":"0.5em"}}," Loading Image.... ",-1))])],64)):we("",!0),r.value&&i.value?(U(),Z(Se,{key:1},[k[11]||(k[11]=m("div",null,null,-1)),k[12]||(k[12]=m("div",{class:"progress"},[m("p",{style:{"font-size":"32px","line-height":"1.1em","margin-top":"0.5em",color:"red"}}," X Please check if link is Valid ")],-1))],64)):we("",!0),!r.value&&!i.value?(U(),Z("div",LF,[m("main",null,[m("div",NF,[m("div",UF,[m("div",zF,[m("div",null,[m("img",{class:"big-img",src:($=(P=u==null?void 0:u.imageData)==null?void 0:P.artifact)==null?void 0:$.url,alt:"Shared Image"},null,8,jF),m("div",HF,[m("div",{onClick:k[0]||(k[0]=Ee(()=>f(),["stop"]))},[Fe(m("img",VF,null,512),[[et,(D=u==null?void 0:u.imageData)==null?void 0:D.inputs]])]),c.value?(U(),Z("div",{key:0,class:"inspector-container context-menu",onClick:k[1]||(k[1]=R=>R.stopPropagation()),ref_key:"popoverRef",ref:b},[le(RF,{mainImageArtifact:u.imageData,onClosePopup:f,onUseGenerationData:_},null,8,["mainImageArtifact"])],512)):we("",!0)])]),m("div",null,[m("h2",null,ve((F=(S=u==null?void 0:u.imageData)==null?void 0:S.artifact)==null?void 0:F.fileName),1)]),m("div",GF,[m("button",{class:"create-something-btn",onClick:k[2]||(k[2]=()=>de(o).push("/run-model/sdxl"))}," Create Something New "),Fe(m("button",{class:"create-with-settings",onClick:_}," Create with these Settings ",512),[[et,(A=u==null?void 0:u.imageData)==null?void 0:A.inputs]])]),Fe(m("button",{class:"create-btn-share",onClick:k[3]||(k[3]=()=>de(o).push("/run-model/sdxl"))},k[13]||(k[13]=[m("img",{src:zB,alt:"Icon",class:"button-icon"},null,-1),He(" Create Image ")]),512),[[et,!((E=u==null?void 0:u.imageData)!=null&&E.inputs)]])])]),Fe(m("div",WF,[m("div",qF,[m("div",KF,[k[14]||(k[14]=m("label",{for:"details1"},"Link Id:",-1)),m("input",{disabled:"",type:"text",id:"details1",name:"details1",value:u.linkId},null,8,ZF),k[15]||(k[15]=m("label",{for:"details2"},"AI Model:",-1)),m("input",{disabled:"",type:"text",id:"details2",name:"details2",value:(T=u.imageData)==null?void 0:T.aiModel},null,8,YF),k[16]||(k[16]=m("label",{for:"details3"},"Prompt:",-1)),m("textarea",{disabled:"",id:"details3",name:"details3",class:"input-textarea",value:(X=(L=u.imageData)==null?void 0:L.inputs)==null?void 0:X.prompt},null,8,XF),k[17]||(k[17]=m("label",{for:"details4"},"Negative Prompt:",-1)),m("input",{disabled:"",type:"text",id:"details4",name:"details4",value:(ne=(J=u.imageData)==null?void 0:J.inputs)!=null&&ne.negative_prompt?(ce=(se=u.imageData)==null?void 0:se.inputs)==null?void 0:ce.negative_prompt:"-"},null,8,QF),k[18]||(k[18]=m("label",{for:"details5"},"Image Dimensions:",-1)),m("input",{disabled:"",type:"text",id:"details5",name:"details5",value:`${(V=(j=u.imageData)==null?void 0:j.inputs)==null?void 0:V.width} x ${(N=(oe=u.imageData)==null?void 0:oe.inputs)==null?void 0:N.height}`},null,8,JF)]),m("div",eI,[m("div",tI,[k[19]||(k[19]=m("label",{for:"details6"},"Time-Image Quality:",-1)),m("input",{disabled:"",type:"text",id:"details6",name:"details6",value:(fe=(Q=u.imageData)==null?void 0:Q.inputs)==null?void 0:fe.num_inference_steps},null,8,nI)]),m("div",rI,[k[20]||(k[20]=m("label",{for:"details7"},"Human-AI Collab:",-1)),m("input",{disabled:"",type:"text",id:"details7",name:"details7",value:(q=(M=u.imageData)==null?void 0:M.inputs)==null?void 0:q.guidance_scale},null,8,iI)]),m("div",sI,[k[21]||(k[21]=m("label",{for:"details8"},"Sampler:",-1)),m("input",{disabled:"",type:"text",id:"details8",name:"details8",value:(ue=(ee=u.imageData)==null?void 0:ee.inputs)==null?void 0:ue.artisan},null,8,oI)]),m("div",aI,[k[22]||(k[22]=m("label",{for:"details9"},"Seed:",-1)),m("input",{disabled:"",type:"text",id:"details9",name:"details9",value:(xe=(me=u.imageData)==null?void 0:me.inputs)!=null&&xe.seed?(C=(z=u.imageData)==null?void 0:z.inputs)==null?void 0:C.seed:(H=(O=u.imageData)==null?void 0:O.inputs)==null?void 0:H.composition},null,8,lI)])])]),m("div",cI,[m("button",{class:"button button1",onClick:k[4]||(k[4]=()=>de(o).push("/run-model/sdxl"))}," Create an Image "),m("div",uI,[m("button",{class:"button button2",onClick:v},k[23]||(k[23]=[m("div",{class:"button-content"},[m("span",null,"Edit Image"),m("img",{src:jB,alt:"icon"})],-1)])),g.value?(U(),Z("div",dI,[m("button",{class:"menu-option",onClick:k[5]||(k[5]=R=>x("inpaint"))},k[24]||(k[24]=[m("span",{class:"option-icon"},[m("img",{src:HB,alt:"icon"})],-1),He(" Inpainting ")])),m("button",{class:"menu-option",onClick:k[6]||(k[6]=R=>x("upscale"))},k[25]||(k[25]=[m("span",{class:"option-icon"},[m("img",{src:VB,alt:"icon"})],-1),He(" Upscaling ")])),m("button",{class:"menu-option",onClick:k[7]||(k[7]=R=>x("removeBg"))},k[26]||(k[26]=[m("span",{class:"option-icon"},[m("img",{src:GB,alt:"icon"})],-1),He(" Background Removal ")])),m("button",{class:"menu-option",onClick:k[8]||(k[8]=R=>x("controlnet"))},k[27]||(k[27]=[m("span",{class:"option-icon"},[m("img",{src:WB,alt:"icon"})],-1),He(" ControlNet ")]))])):we("",!0)]),m("button",{class:"button button3",onClick:_}," Use Generation Data ")])],512),[[et,(I=u==null?void 0:u.imageData)==null?void 0:I.inputs]])])])])):we("",!0)]),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:de(y),canonicalPath:`https://cogniwerk.ai/share/${a.value}`},null,8,["tags","canonicalPath"])]),_:1}))],64)}}}),hI=je(fI,[["__scopeId","data-v-bfaf75db"]]),pI="data:image/svg+xml,%3csvg%20width='38'%20height='34'%20viewBox='0%200%2038%2034'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M35.9414%2017H2.00028'%20stroke='%23292D32'%20stroke-width='2.57143'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.4923%204.55088L35.9414%2017L23.4923%2029.4491'%20stroke='%23292D32'%20stroke-width='2.57143'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",gI="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%201L1%209'%20stroke='%23292D32'%20stroke-width='0.857143'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9%206.86857V1H3.13143'%20stroke='%23292D32'%20stroke-width='0.857143'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",r8="data:image/svg+xml,%3csvg%20width='26'%20height='24'%20viewBox='0%200%2026%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.246%2020C17.4171%2020%2021.6091%2015.9706%2021.6091%2011C21.6091%206.02944%2017.4171%202%2012.246%202C7.07484%202%202.88281%206.02944%202.88281%2011C2.88281%2015.9706%207.07484%2020%2012.246%2020Z'%20stroke='%23878787'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.495%2020.6888C21.0464%2022.2888%2022.3052%2022.4488%2023.2727%2021.0488C24.157%2019.7688%2023.5744%2018.7188%2021.9723%2018.7188C20.7863%2018.7088%2020.1205%2019.5988%2020.495%2020.6888Z'%20stroke='%23878787'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",mI="data:image/svg+xml,%3csvg%20width='26'%20height='24'%20viewBox='0%200%2026%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.447%207.57969H16.6214C16.2143%207.57969%2015.8906%207.26969%2015.8906%206.87969C15.8906%206.48969%2016.2143%206.17969%2016.6214%206.17969H22.447C22.8542%206.17969%2023.1778%206.48969%2023.1778%206.87969C23.1778%207.26969%2022.8542%207.57969%2022.447%207.57969Z'%20fill='%23666666'/%3e%3cpath%20d='M6.91141%207.57969H3.02768C2.62052%207.57969%202.29688%207.26969%202.29688%206.87969C2.29688%206.48969%202.62052%206.17969%203.02768%206.17969H6.91141C7.31858%206.17969%207.64222%206.48969%207.64222%206.87969C7.64222%207.26969%207.30814%207.57969%206.91141%207.57969Z'%20fill='%23666666'/%3e%3cpath%20d='M10.7957%2010.8297C13.0733%2010.8297%2014.9196%209.06121%2014.9196%206.87969C14.9196%204.69816%2013.0733%202.92969%2010.7957%202.92969C8.51819%202.92969%206.67188%204.69816%206.67188%206.87969C6.67188%209.06121%208.51819%2010.8297%2010.7957%2010.8297Z'%20fill='%23666666'/%3e%3cpath%20d='M22.4505%2017.8102H18.5667C18.1596%2017.8102%2017.8359%2017.5002%2017.8359%2017.1102C17.8359%2016.7202%2018.1596%2016.4102%2018.5667%2016.4102H22.4505C22.8576%2016.4102%2023.1813%2016.7202%2023.1813%2017.1102C23.1813%2017.5002%2022.8576%2017.8102%2022.4505%2017.8102Z'%20fill='%23666666'/%3e%3cpath%20d='M8.85328%2017.8102H3.02768C2.62052%2017.8102%202.29688%2017.5002%202.29688%2017.1102C2.29688%2016.7202%202.62052%2016.4102%203.02768%2016.4102H8.85328C9.26044%2016.4102%209.58408%2016.7202%209.58408%2017.1102C9.58408%2017.5002%209.25%2017.8102%208.85328%2017.8102Z'%20fill='%23666666'/%3e%3cpath%20d='M14.6785%2021.0719C16.9561%2021.0719%2018.8024%2019.3034%2018.8024%2017.1219C18.8024%2014.9404%2016.9561%2013.1719%2014.6785%2013.1719C12.401%2013.1719%2010.5547%2014.9404%2010.5547%2017.1219C10.5547%2019.3034%2012.401%2021.0719%2014.6785%2021.0719Z'%20fill='%23666666'/%3e%3c/svg%3e",vI={},_I={xmlns:"http://www.w3.org/2000/svg",width:"38",height:"36",viewBox:"0 0 38 36",fill:"none"};function bI(t,e){return U(),Z("svg",_I,e[0]||(e[0]=[ma('<g filter="url(#filter0_d_5234_26868)"><ellipse cx="18.749" cy="18" rx="14.6162" ry="14" fill="white"></ellipse></g><path d="M16.6562 21.25C16.242 21.25 15.9062 21.5858 15.9062 22C15.9062 22.4142 16.242 22.75 16.6562 22.75V21.25ZM27.6267 22.5303C27.9196 22.2374 27.9196 21.7626 27.6267 21.4697L22.8537 16.6967C22.5608 16.4038 22.086 16.4038 21.7931 16.6967C21.5002 16.9896 21.5002 17.4645 21.7931 17.7574L26.0357 22L21.7931 26.2426C21.5002 26.5355 21.5002 27.0104 21.7931 27.3033C22.086 27.5962 22.5608 27.5962 22.8537 27.3033L27.6267 22.5303ZM16.6562 22.75L27.0964 22.75V21.25L16.6562 21.25V22.75Z" fill="#666666"></path><path d="M19.7891 14.75C20.2033 14.75 20.5391 14.4142 20.5391 14C20.5391 13.5858 20.2033 13.25 19.7891 13.25L19.7891 14.75ZM8.8186 13.4697C8.52571 13.7626 8.52571 14.2374 8.8186 14.5303L13.5916 19.3033C13.8845 19.5962 14.3593 19.5962 14.6522 19.3033C14.9451 19.0104 14.9451 18.5355 14.6522 18.2426L10.4096 14L14.6522 9.75736C14.9451 9.46447 14.9451 8.98959 14.6522 8.6967C14.3593 8.40381 13.8845 8.40381 13.5916 8.6967L8.8186 13.4697ZM19.7891 13.25L9.34893 13.25L9.34893 14.75L19.7891 14.75L19.7891 13.25Z" fill="#666666"></path><defs><filter id="filter0_d_5234_26868" x="0.132812" y="0" width="37.2344" height="36" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5234_26868"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5234_26868" result="shape"></feBlend></filter></defs>',4)]))}const i8=je(vI,[["render",bI]]);function xI(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var s8=xI,yI=typeof Ke=="object"&&Ke&&Ke.Object===Object&&Ke,wI=yI,CI=wI,kI=typeof self=="object"&&self&&self.Object===Object&&self,SI=CI||kI||Function("return this")(),o8=SI,AI=o8,EI=function(){return AI.Date.now()},$I=EI,TI=/\s/;function PI(t){for(var e=t.length;e--&&TI.test(t.charAt(e)););return e}var DI=PI,BI=DI,FI=/^\s+/;function II(t){return t&&t.slice(0,BI(t)+1).replace(FI,"")}var RI=II,OI=o8,MI=OI.Symbol,a8=MI,Lp=a8,l8=Object.prototype,LI=l8.hasOwnProperty,NI=l8.toString,Ao=Lp?Lp.toStringTag:void 0;function UI(t){var e=LI.call(t,Ao),n=t[Ao];try{t[Ao]=void 0;var r=!0}catch{}var i=NI.call(t);return r&&(e?t[Ao]=n:delete t[Ao]),i}var zI=UI,jI=Object.prototype,HI=jI.toString;function VI(t){return HI.call(t)}var GI=VI,Np=a8,WI=zI,qI=GI,KI="[object Null]",ZI="[object Undefined]",Up=Np?Np.toStringTag:void 0;function YI(t){return t==null?t===void 0?ZI:KI:Up&&Up in Object(t)?WI(t):qI(t)}var XI=YI;function QI(t){return t!=null&&typeof t=="object"}var JI=QI,eR=XI,tR=JI,nR="[object Symbol]";function rR(t){return typeof t=="symbol"||tR(t)&&eR(t)==nR}var iR=rR,sR=RI,zp=s8,oR=iR,jp=NaN,aR=/^[-+]0x[0-9a-f]+$/i,lR=/^0b[01]+$/i,cR=/^0o[0-7]+$/i,uR=parseInt;function dR(t){if(typeof t=="number")return t;if(oR(t))return jp;if(zp(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=zp(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=sR(t);var n=lR.test(t);return n||cR.test(t)?uR(t.slice(2),n?2:8):aR.test(t)?jp:+t}var fR=dR,hR=s8,Xu=$I,Hp=fR,pR="Expected a function",gR=Math.max,mR=Math.min;function vR(t,e,n){var r,i,s,o,a,l,c=0,u=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(pR);e=Hp(e)||0,hR(n)&&(u=!!n.leading,h="maxWait"in n,s=h?gR(Hp(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p);function d(k){var P=r,$=i;return r=i=void 0,c=k,o=t.apply($,P),o}function g(k){return c=k,a=setTimeout(y,e),u?d(k):o}function v(k){var P=k-l,$=k-c,D=e-P;return h?mR(D,s-$):D}function x(k){var P=k-l,$=k-c;return l===void 0||P>=e||P<0||h&&$>=s}function y(){var k=Xu();if(x(k))return _(k);a=setTimeout(y,v(k))}function _(k){return a=void 0,p&&r?d(k):(r=i=void 0,o)}function f(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function b(){return a===void 0?o:_(Xu())}function w(){var k=Xu(),P=x(k);if(r=arguments,i=this,l=k,P){if(a===void 0)return g(l);if(h)return clearTimeout(a),a=setTimeout(y,e),d(l)}return a===void 0&&(a=setTimeout(y,e)),o}return w.cancel=f,w.flush=b,w}var _R=vR;const c8=k0(_R),bR={class:"discover-tab-container"},xR={class:"process-reset-container"},yR={class:"process-options"},wR=["onClick"],CR={class:"checkbox"},kR=["name","checked"],SR=["for"],AR={key:0,class:"search-input-container"},ER=["value"],$R={key:1,class:"inputs-container"},TR={class:"input"},PR={class:"input-options"},DR=["onClick"],BR={class:"checkbox"},FR=["name","checked"],IR=["for"],RR={class:"input"},OR={class:"input-options"},MR=["onClick"],LR={class:"checkbox"},NR=["name","checked"],UR=["for"],zR={class:"toggle-container"},jR={class:"input-container"},HR=["checked"],VR={class:"filters-container"},GR={class:"tags-container"},WR={class:"content-wrapper"},qR={class:"search-tag-wrapper all search-wrapper-2"},KR=["onClick"],ZR={class:"search-btns"},YR=["onClick"],XR=["data-text"],QR={class:"filters"},JR=["onClick"],eO={class:"serviceType-options-container"},tO=["onClick"],nO={class:"checkbox"},rO=["checked"],iO={class:"results-text"},sO=Ae({__name:"DesktopDiscoverFilter",props:{isHomePage:{type:Boolean},modelResultLength:{},process:{},processIo:{},tags:{}},emits:["onSearch"],setup(t,{emit:e}){const n=t,r=e,i=$n(),s=[{label:"Ready to Use",value:"ready_to_use"},{label:"Free Service",value:"Free Service"},{label:"Freemium",value:"freemium"},{label:"Paid Service",value:"Paid Service"},{label:"DIY",value:"do_it_yourself"}],o=xa(),a=re(),l=re(""),c=re(!1),u=re(!1),h=re(!1),p=re(!1),d=re(!1),g=re(!1);en(a,()=>{h.value=!1,p.value=!1}),en(g,()=>d.value=!1);const x=c8(_=>{const f=_.target.value.trim();l.value=f,o.setSearch(f)},600),y=()=>{if(n.isHomePage){const _=o.fixLocation();i.push(_)}};return(_,f)=>{var b,w,k,P,$,D;return U(),Z("div",bR,[m("div",xR,[m("div",yR,[(U(!0),Z(Se,null,Ye((b=_.process.result.value)==null?void 0:b.process,(S,F)=>(U(),Z("div",{class:"process-container",key:F,onClick:A=>de(o).toggleProcess(S.slug)},[m("div",CR,[m("input",{"aria-label":"process",type:"checkbox",name:S.name??"",checked:de(o).isSelectedProcess(S.slug)},null,8,kR),f[9]||(f[9]=m("div",{class:"checkbox-outer"},[m("span",{class:"checked-indicator"})],-1))]),m("label",{class:"process-name",for:S.name??""},ve(S.name),9,SR)],8,wR))),128))]),m("button",{class:"reset-btn",onClick:f[0]||(f[0]=S=>de(o).reset())},"Reset")]),m("div",{class:"process-form",ref_key:"clickOutsideRef",ref:a},[c.value?(U(),Z("div",AR,[f[10]||(f[10]=m("div",{class:"input-label"},[m("img",{src:r8,alt:"search icon"})],-1)),m("input",{placeholder:"What are you looking for?",type:"text",onInput:f[1]||(f[1]=(...S)=>de(x)&&de(x)(...S)),value:l.value},null,40,ER)])):(U(),Z("div",$R,[m("button",TR,[f[12]||(f[12]=m("div",{class:"input-label"},"From",-1)),m("div",{class:"input-selector",onClick:f[2]||(f[2]=Ee(S=>h.value=!h.value,["prevent"]))},ve(de(o).filter.from.length?de(o).filter.from.map(S=>{var F,A;return(A=(F=_.processIo)==null?void 0:F.result.value)==null?void 0:A.process_io.find(E=>E.slug===S).name}).join(", "):"Input"),1),Fe(m("div",PR,[(U(!0),Z(Se,null,Ye((w=_.processIo.result.value)==null?void 0:w.process_io,S=>(U(),Z("div",{"aria-label":"process type",class:"checkbox-container",key:S.id,onClick:F=>de(o).toggleProcessFrom(S.slug)},[m("div",BR,[m("input",{"aria-label":"process from",type:"checkbox",name:S.name??"",checked:de(o).isSelectedProcessFrom(S.slug)},null,8,FR),f[11]||(f[11]=m("div",{class:"checkbox-outer"},[m("span",{class:"checked-indicator"})],-1))]),m("label",{for:S.name??""},ve(S.name),9,IR)],8,DR))),128))],512),[[et,h.value]])]),m("button",RR,[f[14]||(f[14]=m("div",{class:"input-label"},"To",-1)),m("div",{class:"input-selector",onClick:f[3]||(f[3]=Ee(S=>p.value=!p.value,["prevent"]))},ve(de(o).filter.to.length?de(o).filter.to.map(S=>{var F,A;return(A=(F=_.processIo)==null?void 0:F.result.value)==null?void 0:A.process_io.find(E=>E.slug===S).name}).join(", "):"Output"),1),Fe(m("div",OR,[(U(!0),Z(Se,null,Ye((k=_.processIo.result.value)==null?void 0:k.process_io,S=>(U(),Z("div",{"aria-label":"process to",class:"checkbox-container",key:S.id,onClick:F=>de(o).toggleProcessTo(S.slug)},[m("div",LR,[m("input",{"aria-label":"process to",type:"checkbox",name:S.name??"",checked:de(o).isSelectedProcessTo(S.slug)},null,8,NR),f[13]||(f[13]=m("div",{class:"checkbox-outer"},[m("span",{class:"checked-indicator"})],-1))]),m("label",{for:S.name??""},ve(S.name),9,UR)],8,MR))),128))],512),[[et,p.value]])]),m("button",{"aria-label":"change types",class:ze(["io-button",{rotate:u.value}]),onClick:f[4]||(f[4]=Ee(S=>{u.value=!u.value,de(o).swapProcessToAndFrom()},["prevent"]))},[le(i8)],2)])),m("div",zR,[f[16]||(f[16]=m("span",{class:"filter-text"},"Filter",-1)),m("div",jR,[Fe(m("input",{"aria-label":"activate search mode",type:"checkbox",id:"switch-desktop",checked:c.value,"onUpdate:modelValue":f[5]||(f[5]=S=>c.value=S)},null,8,HR),[[w0,c.value]]),f[15]||(f[15]=m("label",{for:"switch-desktop"},"Toggle",-1))]),f[17]||(f[17]=m("span",{class:"search-text"},"Search",-1))]),m("button",{class:"search-btn",onClick:f[6]||(f[6]=S=>r("onSearch"))},"Search")],512),m("div",{class:ze(["row-container",{"home-page-filter-styles":!!_.isHomePage}])},[m("div",VR,[m("div",GR,[m("div",{class:"filter-btn-container",onClick:f[7]||(f[7]=Ee(S=>d.value=!d.value,["prevent"])),ref_key:"filterOptionsRef",ref:g},[f[20]||(f[20]=m("button",{class:"filter-btn"},[m("img",{src:mI,alt:"settings"})],-1)),f[21]||(f[21]=m("div",{style:{cursor:"pointer"}},"Tags:",-1)),Fe(m("div",{class:"filters-popup",onClick:Ee(()=>{},["stop","prevent"])},[m("div",WR,[m("div",qR,[(U(!0),Z(Se,null,Ye((P=_.tags.result.value)==null?void 0:P.tags.filter(S=>de(o).isSelectedTag(S.tag)).map(S=>S.tag),S=>(U(),Z("div",{class:"search-tag-active",onClick:Ee(()=>de(o).toggleTag(S),["prevent","stop"]),key:S},[m("button",ZR,[m("span",null,[f[18]||(f[18]=m("span",null,"#",-1)),He(ve(S),1)])])],8,KR))),128)),(U(!0),Z(Se,null,Ye(($=_.tags.result.value)==null?void 0:$.tags.filter(S=>!de(o).isSelectedTag(S.tag)).map(S=>S.tag),S=>(U(),Z("div",{onClick:Ee(()=>de(o).toggleTag(S),["prevent","stop"]),key:S},[m("button",{class:"search-btns","data-text":"#"+S},[m("span",null,[f[19]||(f[19]=m("span",null,"#",-1)),He(ve(S),1)])],8,XR)],8,YR))),128))])])],512),[[et,d.value]])],512),m("div",QR,[(U(!0),Z(Se,null,Ye((D=_.tags.result.value)==null?void 0:D.tags.filter(S=>de(o).isSelectedTag(S.tag)).map(S=>S.tag).slice(0,3),S=>(U(),Z("div",{class:"filter",key:S,onClick:Ee(F=>de(o).toggleTag(S),["prevent","stop"])}," #"+ve(S),9,JR))),128))])]),m("div",eO,[(U(),Z(Se,null,Ye(s,S=>m("div",{class:"serviceType-cb-container",onClick:F=>de(o).toggleServiceType(S.value),key:S.value},[m("div",nO,[m("input",{"aria-label":"select service type",type:"checkbox",checked:de(o).isSelectedServiceType(S.value)},null,8,rO),f[22]||(f[22]=m("div",{class:"checkbox-outer"},[m("span",{class:"checked-indicator"})],-1))]),m("label",null,ve(S.label),1)],8,tO)),64))]),m("button",{class:"search-btn",onClick:f[8]||(f[8]=S=>r("onSearch"))},"Search")]),m("button",{class:"search-button",onClick:y},"Search")],2),m("div",iO,ve(_.modelResultLength)+" AI Tools found",1)])}}}),oO=je(sO,[["__scopeId","data-v-f1c19623"]]),aO="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.4974%2018.3307H12.4974C16.6641%2018.3307%2018.3307%2016.6641%2018.3307%2012.4974V7.4974C18.3307%203.33073%2016.6641%201.66406%2012.4974%201.66406H7.4974C3.33073%201.66406%201.66406%203.33073%201.66406%207.4974V12.4974C1.66406%2016.6641%203.33073%2018.3307%207.4974%2018.3307Z'%20stroke='%23292D32'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.10938%2012.0719L8.09271%209.49687C8.37604%209.13021%208.90104%209.06354%209.26771%209.34687L10.7927%2010.5469C11.1594%2010.8302%2011.6844%2010.7635%2011.9677%2010.4052L13.8927%207.92188'%20stroke='%23292D32'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",lO="data:image/svg+xml,%3csvg%20width='25'%20height='25'%20viewBox='0%200%2025%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.8351%2010.2422H13.4166V13.9122L14.9789%2012.3422C15.2675%2012.0522%2015.7451%2012.0522%2016.0337%2012.3422C16.3223%2012.6322%2016.3223%2013.1122%2016.0337%2013.4022L13.1977%2016.2422C12.9091%2016.5322%2012.4315%2016.5322%2012.1429%2016.2422L9.3069%2013.4022C9.15764%2013.2522%209.08798%2013.0622%209.08798%2012.8722C9.08798%2012.6822%209.16759%2012.4922%209.31685%2012.3422C9.60543%2012.0522%2010.0831%2012.0522%2010.3716%2012.3422L11.924%2013.9022V10.2422H3.64484C3.1672%2010.2422%202.78906%2010.6222%202.78906%2011.1022C2.78906%2016.9922%206.87888%2021.1022%2012.74%2021.1022C18.601%2021.1022%2022.6909%2016.9922%2022.6909%2011.1022C22.6909%2010.6222%2022.3127%2010.2422%2021.8351%2010.2422Z'%20fill='%23292D32'/%3e%3cpath%20d='M13.4223%204.33594C13.4223%203.92594%2013.084%203.58594%2012.676%203.58594C12.268%203.58594%2011.9297%203.92594%2011.9297%204.33594V10.2359H13.4223V4.33594Z'%20fill='%23292D32'/%3e%3c/svg%3e",cO="data:image/svg+xml,%3csvg%20width='25'%20height='25'%20viewBox='0%200%2025%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.8195%2010.2422H13.4707V15.7222C13.4707%2016.1322%2013.1323%2016.4722%2012.7243%2016.4722C12.3164%2016.4722%2011.978%2016.1322%2011.978%2015.7222V10.2422H3.62921C3.15157%2010.2422%202.77344%2010.6222%202.77344%2011.1022C2.77344%2016.9922%206.86326%2021.1022%2012.7243%2021.1022C18.5854%2021.1022%2022.6752%2016.9922%2022.6752%2011.1022C22.6752%2010.6222%2022.2971%2010.2422%2021.8195%2010.2422Z'%20fill='%23292D32'/%3e%3cpath%20d='M13.4771%206.14344L15.0294%207.70344C15.318%207.99344%2015.7956%207.99344%2016.0842%207.70344C16.3728%207.41344%2016.3728%206.93344%2016.0842%206.64344L13.2482%203.80344C12.9596%203.51344%2012.482%203.51344%2012.1934%203.80344L9.36736%206.65344C9.22804%206.80344%209.14844%206.99344%209.14844%207.18344C9.14844%207.37344%209.21809%207.56344%209.36736%207.71344C9.65593%208.00344%2010.1336%208.00344%2010.4222%207.71344L11.9745%206.15344V10.2434H13.4671V6.14344H13.4771Z'%20fill='%23292D32'/%3e%3c/svg%3e",uO="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%2015V12.5'%20stroke='%23292D32'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.39172%202.35053L2.61672%206.97553C1.96672%207.49219%201.55006%208.58386%201.69172%209.40053L2.80006%2016.0339C3.00006%2017.2172%204.13339%2018.1755%205.33339%2018.1755H14.6667C15.8584%2018.1755%2017.0001%2017.2089%2017.2001%2016.0339L18.3084%209.40053C18.4417%208.58386%2018.0251%207.49219%2017.3834%206.97553L11.6084%202.35886C10.7167%201.64219%209.27506%201.64219%208.39172%202.35053Z'%20stroke='%23292D32'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",dO={class:"discover-tab-container"},fO={class:"search-input-container"},hO=["value"],pO={class:"flex"},gO={class:"process-text"},mO={key:0,class:"process-popup"},vO=["onClick"],_O={class:"process-form"},bO={class:"inputs-container"},xO={class:"input-selector"},yO={key:0,class:"process-popup"},wO=["onClick"],CO={class:"input-selector"},kO={key:0,class:"process-popup"},SO=["onClick"],AO={class:"filters-container"},EO={class:"tags-container"},$O=["onClick"],TO=["onClick"],PO={class:"flex"},DO=["checked"],BO={class:"flex justify-content-between w-100"},FO={key:1,class:"results-text"},IO=Ae({__name:"MobileDiscoverFilter",props:{isHomePage:{type:Boolean},modelResultLength:{},process:{},processIo:{},tags:{}},emits:["onSearch"],setup(t,{emit:e}){const n=t,r=e,i=xa(),s=$n(),o=re(""),a=re(!1),l=re(!1),c=re(!1),u=re(!1),h=re(null),p=re(null),d=re(null),g=re(!1);en(g,()=>c.value=!1),en(h,()=>u.value=!1),en(p,()=>a.value=!1),en(d,()=>l.value=!1);const v=c8(y=>{const _=y.target.value.trim();o.value=_,i.setSearch(_)},600),x=()=>{if(n.isHomePage){const y=i.fixLocation();s.push(y)}};return(y,_)=>{var f,b,w,k,P;return U(),Z("div",dO,[m("div",fO,[_[9]||(_[9]=m("div",{class:"input-label"},[m("img",{src:r8,alt:"search icon"})],-1)),m("input",{placeholder:"Search...",type:"text",onInput:_[0]||(_[0]=(...$)=>de(v)&&de(v)(...$)),value:o.value},null,40,hO),o.value?(U(),Z("button",{key:0,class:"search-cross-btn",onClick:_[1]||(_[1]=$=>{o.value="",de(i).setSearch("")})},[le(a2,{stroke:"#B4B3BA"})])):we("",!0)]),m("div",{class:"process-selector-container",ref_key:"processMenuRef",ref:h,onClick:_[2]||(_[2]=$=>u.value=!u.value)},[_[11]||(_[11]=m("div",{class:"flex"},[m("img",{src:aO,alt:"icon: activity"}),m("span",null,"AI Process")],-1)),m("div",pO,[m("span",gO,ve(de(i).filter.process.map($=>de(Dw)($)).join(", ")),1),_[10]||(_[10]=m("img",{src:yl,alt:"icon: search"},null,-1))]),u.value?(U(),Z("div",mO,[(U(!0),Z(Se,null,Ye((f=y.process.result.value)==null?void 0:f.process,$=>(U(),Z("button",{class:"menu-item flex",key:$.slug,onClick:Ee(D=>{de(i).toggleProcess($.slug),u.value=!1},["stop"])},[m("img",{src:wl,alt:"icon: check",style:xn({visibility:de(i).isSelectedProcess($.slug)?"visible":"hidden"})},null,4),m("span",null,ve($.name),1)],8,vO))),128))])):we("",!0)],512),m("div",_O,[m("div",bO,[m("button",{class:"input",onClick:_[3]||(_[3]=Ee($=>a.value=!a.value,["prevent"])),ref_key:"inputMenuRef",ref:p},[_[12]||(_[12]=m("div",{class:"input-label flex"},[m("img",{src:lO,alt:"icon: import"}),m("span",null,"From Input")],-1)),m("div",xO,ve(de(i).filter.from.map($=>{var D,S;return(S=(D=y.processIo)==null?void 0:D.result.value)==null?void 0:S.process_io.find(F=>F.slug===$).name}).join(", ")),1),_[13]||(_[13]=m("div",{class:"select-control-icon"},[m("img",{"data-v-79b1a2b8":"",src:yl,alt:"icon: select control"})],-1)),a.value?(U(),Z("div",yO,[(U(!0),Z(Se,null,Ye((b=y.processIo.result.value)==null?void 0:b.process_io,$=>(U(),Z("button",{class:"menu-item flex",key:$.id,onClick:Ee(D=>{de(i).toggleProcessFrom($.slug),a.value=!1},["stop"])},[m("img",{alt:"icon: check",src:wl,style:xn({visibility:de(i).isSelectedProcessFrom($.slug)?"visible":"hidden"})},null,4),m("span",null,ve($.name),1)],8,wO))),128))])):we("",!0)],512),m("button",{class:"input",ref_key:"outputMenuRef",ref:d,onClick:_[4]||(_[4]=Ee($=>l.value=!l.value,["prevent"]))},[_[14]||(_[14]=m("div",{class:"input-label flex"},[m("img",{src:cO,alt:"icon: export"}),m("span",null,"To Output")],-1)),m("div",CO,ve(de(i).filter.to.map($=>{var D,S;return(S=(D=y.processIo)==null?void 0:D.result.value)==null?void 0:S.process_io.find(F=>F.slug===$).name}).join(", ")),1),_[15]||(_[15]=m("div",{class:"select-control-icon"},[m("img",{"data-v-79b1a2b8":"",alt:"icon: select control",src:yl})],-1)),l.value?(U(),Z("div",kO,[(U(!0),Z(Se,null,Ye((w=y.processIo.result.value)==null?void 0:w.process_io,$=>(U(),Z("button",{class:"menu-item flex",key:$.id,onClick:Ee(D=>{de(i).toggleProcessTo($.slug),l.value=!1},["stop"])},[m("img",{alt:"icon: check",src:wl,style:xn({visibility:de(i).isSelectedProcessTo($.slug)?"visible":"hidden"})},null,4),m("span",null,ve($.name),1)],8,SO))),128))])):we("",!0)],512),m("button",{"aria-label":"change types",class:ze(["io-button",{rotate:y.interchangeTypes}]),onClick:_[5]||(_[5]=Ee($=>{y.interchangeTypes=!y.interchangeTypes,de(i).swapProcessToAndFrom()},["prevent"]))},[le(i8)],2)])]),m("div",AO,[_[20]||(_[20]=m("p",{style:{fontSize:"12px",fontWeight:"700",color:"#292d32"}}," Filter ",-1)),m("div",EO,[(U(!0),Z(Se,null,Ye((k=y.tags.result.value)==null?void 0:k.tags.filter($=>de(i).isSelectedTag($.tag)).map($=>$.tag),$=>(U(),Z("button",{class:"tag-btn active",onClick:Ee(()=>de(i).toggleTag($),["prevent","stop"]),key:$},[m("span",null,[_[16]||(_[16]=m("span",null,"#",-1)),He(ve($),1)])],8,$O))),128)),(U(!0),Z(Se,null,Ye((P=y.tags.result.value)==null?void 0:P.tags.filter($=>!de(i).isSelectedTag($.tag)).map($=>$.tag),$=>(U(),Z("button",{class:"tag-btn",onClick:Ee(()=>de(i).toggleTag($),["prevent","stop"]),key:$},[m("span",null,[_[17]||(_[17]=m("span",null,"#",-1)),He(ve($),1)])],8,TO))),128))]),m("div",{class:"hosted-filter",onClick:_[6]||(_[6]=$=>de(i).toggleServiceType("ready_to_use"))},[_[19]||(_[19]=m("div",{class:"flex"},[m("img",{src:uO,alt:"icon: house"}),m("span",null," Hosted on Cogniwerk")],-1)),m("div",PO,[m("input",{type:"checkbox",id:"switch",checked:de(i).isSelectedServiceType("ready_to_use")},null,8,DO),_[18]||(_[18]=m("label",{for:"switch"},"Toggle",-1))])]),m("button",{class:"search-btn",onClick:_[7]||(_[7]=$=>r("onSearch"))},"Search"),m("div",BO,[m("button",{class:"reset-btn",onClick:_[8]||(_[8]=$=>de(i).reset())},"Reset"),y.isHomePage?(U(),Z("button",{key:0,class:"search-button",onClick:x}," Search ")):(U(),Z("div",FO,ve(y.modelResultLength)+" AI Tools found ",1))])])])}}}),RO=je(IO,[["__scopeId","data-v-cefe8144"]]),OO={key:0},MO={class:"desktop-discover"},LO={class:"mobile-discover"},NO=Ae({__name:"DiscoverTab",props:{modelResultLength:{},isHomePage:{type:Boolean}},emits:["onSearch"],setup(t,{emit:e}){const n=e,r=re(null),i=re(null),s=re(null);return ut(async()=>{try{const o=Tt.getInstance();r.value={result:{value:{process:await o.getProcess()}}},i.value={result:{value:{process_io:await o.getProcessIo()}}},s.value={result:{value:{tags:await o.getTags()}}}}catch(o){console.error("Error fetching data:",o)}}),(o,a)=>r.value&&i.value&&s.value?(U(),Z("div",OO,[m("div",MO,[le(oO,{process:r.value,processIo:i.value,tags:s.value,modelResultLength:o.modelResultLength,isHomePage:o.isHomePage,onOnSearch:a[0]||(a[0]=l=>n("onSearch"))},null,8,["process","processIo","tags","modelResultLength","isHomePage"])]),m("div",LO,[le(RO,{process:r.value,processIo:i.value,tags:s.value,modelResultLength:o.modelResultLength,isHomePage:o.isHomePage,onOnSearch:a[1]||(a[1]=l=>n("onSearch"))},null,8,["process","processIo","tags","modelResultLength","isHomePage"])])])):we("",!0)}}),u8=je(NO,[["__scopeId","data-v-d7b9028a"]]),UO="data:image/svg+xml,%3csvg%20width='38'%20height='34'%20viewBox='0%200%2038%2034'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M35.9414%2017H2.00028'%20stroke='%23fff'%20stroke-width='2.57143'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.4923%204.55088L35.9414%2017L23.4923%2029.4491'%20stroke='%23fff'%20stroke-width='2.57143'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",zO={},jO={class:"footer"};function HO(t,e){return U(),Z("div",jO,e[0]||(e[0]=[ma('<div class="content-container" data-v-339afcfe><div class="logo-claim-container" data-v-339afcfe><img class="logo" src="'+e1+'" alt="CogniWerk.ai" data-v-339afcfe><p class="claim" data-v-339afcfe>Creative AI International GmbH</p></div><div class="links-container desktop-links" data-v-339afcfe><p class="heading" data-v-339afcfe>About</p><a class="link-text" href="/blog" data-v-339afcfe>Blog</a><a class="link-text" href="/feedback" data-v-339afcfe>Feedback</a><a class="link-text" href="/feedback" data-v-339afcfe>Support</a><a class="link-text" href="/feedback" data-v-339afcfe>Contact us</a></div><div class="links-container desktop-links" data-v-339afcfe><p class="heading" data-v-339afcfe>Follow us</p><a class="link-text" href="https://www.linkedin.com/company/cogniwerk/" target="_blank" data-v-339afcfe>Linkedin</a><a class="link-text" href="https://www.instagram.com/cogniwerk/" target="_blank" data-v-339afcfe>Instagram</a><a class="link-text" href="https://www.tiktok.com/@cogniwerk" target="_blank" data-v-339afcfe>Tiktok</a><a class="link-text" href="https://www.reddit.com/user/cogniwerk/" target="_blank" data-v-339afcfe>Reddit</a><a class="link-text" href="https://x.com/cogniwerk" target="_blank" data-v-339afcfe>X (Twitter)</a></div><div class="mobile-links-container" data-v-339afcfe><div class="links-container" data-v-339afcfe><p class="heading" data-v-339afcfe>About</p><a class="link-text" href="/blog" data-v-339afcfe>Blog</a><a class="link-text" href="/feedback" data-v-339afcfe>Feedback</a><a class="link-text" href="/feedback" data-v-339afcfe>Support</a><a class="link-text" href="/feedback" data-v-339afcfe>Contact us</a></div><div class="links-container" data-v-339afcfe><p class="heading" data-v-339afcfe>Follow us</p><a class="link-text" href="https://www.linkedin.com/company/cogniwerk/" target="_blank" data-v-339afcfe>Linkedin</a><a class="link-text" href="https://www.instagram.com/cogniwerk/" target="_blank" data-v-339afcfe>Instagram</a><a class="link-text" href="https://www.tiktok.com/@cogniwerk" target="_blank" data-v-339afcfe>Tiktok</a><a class="link-text" href="https://www.reddit.com/user/cogniwerk/" target="_blank" data-v-339afcfe>Reddit</a><a class="link-text" href="https://x.com/cogniwerk" target="_blank" data-v-339afcfe>X (Twitter)</a></div></div><div class="links-container" data-v-339afcfe><p class="heading lg-heading" data-v-339afcfe>Bring your imagination to life now</p><a href="/run-model/sdxl" data-v-339afcfe><button class="start-creating-btn" data-v-339afcfe> Start creating with Cogniwerk <img src="'+UO+'" alt="icon: right arrow" data-v-339afcfe></button></a></div></div><hr data-v-339afcfe><div class="sub-content-container" data-v-339afcfe><a class="link-text md-link-text" href="/imprint" data-v-339afcfe>Imprint</a><a class="link-text md-link-text" href="/privacy" data-v-339afcfe>Terms of Use</a><a class="link-text md-link-text" href="/privacy" data-v-339afcfe>Privacy Statement</a></div>',3)]))}const d8=je(zO,[["render",HO],["__scopeId","data-v-339afcfe"]]);(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.vue3-marquee{display:flex!important;position:relative}.vue3-marquee.horizontal{overflow-x:hidden!important;flex-direction:row!important;width:100%;height:max-content}.vue3-marquee.vertical{overflow-y:hidden!important;flex-direction:column!important;height:100%;width:max-content}.vue3-marquee:hover>.marquee{animation-play-state:var(--pauseOnHover)}.vue3-marquee:active>.marquee{animation-play-state:var(--pauseOnClick)}.vue3-marquee>.marquee{flex:0 0 auto;min-width:var(--min-width);min-height:var(--min-height);z-index:1;animation:var(--orientation) var(--duration) linear var(--delay) var(--loops);animation-play-state:var(--pauseAnimation);animation-direction:var(--direction)}.vue3-marquee.horizontal>.marquee{display:flex;flex-direction:row;align-items:center}.vue3-marquee.vertical>.marquee{display:flex;flex-direction:column;align-items:center}@keyframes scrollX{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes scrollY{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.vue3-marquee>.overlay{position:absolute;width:100%;height:100%}.vue3-marquee>.transparent-overlay{position:absolute;width:100%;height:100%}.vue3-marquee>.overlay:before,.vue3-marquee>.overlay:after{content:"";position:absolute;z-index:2}.vue3-marquee.horizontal>.overlay:before,.vue3-marquee.horizontal>.overlay:after{background:linear-gradient(to right,var(--gradient-color));height:100%;width:var(--gradient-length)}.vue3-marquee.vertical>.overlay:before,.vue3-marquee.vertical>.overlay:after{background:linear-gradient(to bottom,var(--gradient-color));height:var(--gradient-length);width:100%}.vue3-marquee.horizontal>.overlay:after{transform:rotate(180deg)}.vue3-marquee.vertical>.overlay:after{transform:rotate(-180deg)}.vue3-marquee>.overlay:before{left:0;top:0}.vue3-marquee.horizontal>.overlay:after{right:0;top:0}.vue3-marquee.vertical>.overlay:after{left:0;bottom:0}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var VO=Object.defineProperty,Vp=Object.getOwnPropertySymbols,GO=Object.prototype.hasOwnProperty,WO=Object.prototype.propertyIsEnumerable,Gp=(t,e,n)=>e in t?VO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wp=(t,e)=>{for(var n in e||(e={}))GO.call(e,n)&&Gp(t,n,e[n]);if(Vp)for(var n of Vp(e))WO.call(e,n)&&Gp(t,n,e[n]);return t},qO=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const KO=Ae({props:{vertical:{type:Boolean,default:!1},direction:{type:String,default:"normal"},duration:{type:Number,default:20},delay:{type:Number,default:0},loop:{type:Number,default:0},clone:{type:Boolean,default:!1},gradient:{type:Boolean,default:!1},gradientColor:{type:Array,default:[255,255,255]},gradientWidth:{type:String},gradientLength:{type:String},pauseOnHover:{type:Boolean,default:!1},pauseOnClick:{type:Boolean,default:!1},pause:{type:Boolean,default:!1},animateOnOverflowOnly:{type:Boolean,default:!1}},emits:["onComplete","onLoopComplete","onPause","onResume","onOverflowDetected","onOverflowCleared"],setup(t,{emit:e}){const n=re(0),r=re("100%"),i=re("100%"),s=re(0),o=re(!1),a=re(!0),l=re(0),c=re(0),u=re(0),h=re(0),p=re(!1),d=re(!1),g=re(0),v=re(null),x=re("200px"),y=re(!1),_=re(null),f=re(null),b=async()=>{await w(),s.value++},w=async()=>{t.vertical&&(o.value=!0),setInterval(()=>{if(r.value="0%",i.value="0%",_.value!==null&&f.value!==null&&_.value&&f.value)if(t.vertical&&"clientHeight"in _.value&&"clientHeight"in f.value){h.value=_.value.clientHeight,u.value=f.value.clientHeight;const X=Math.ceil(u.value/h.value);return n.value=t.animateOnOverflowOnly?0:isFinite(X)?X:0,o.value=!1,n.value}else if(!t.vertical&&"clientWidth"in _.value&&"clientWidth"in f.value){if(c.value=_.value.clientWidth,l.value=f.value.clientWidth,t.animateOnOverflowOnly&&y.value)return c.value<=l.value?(a.value=!0,e("onOverflowCleared")):(a.value=!1,e("onOverflowDetected")),0;const X=Math.ceil(l.value/c.value);return n.value=isFinite(X)?X:0,n.value}else return r.value="100%",i.value="100%",0;else return r.value="100%",i.value="100%",0},100)};at(c,async()=>{t.clone&&b()}),at(l,async()=>{(t.clone||t.animateOnOverflowOnly)&&b()}),at(()=>t.pause,(X,J)=>{X!==J&&e(X?"onResume":"onPause")});const k=()=>{t.pauseOnHover&&(e("onPause"),p.value=!0)},P=()=>{t.pauseOnHover&&(e("onResume"),p.value=!1)},$=()=>{t.pauseOnClick&&(e("onPause"),d.value=!0)},D=()=>{t.pauseOnClick&&(e("onResume"),d.value=!1)},S=Le(()=>t.pause||t.vertical&&o.value||t.animateOnOverflowOnly&&a.value?"paused":"running"),F=Le(()=>t.pauseOnHover&&(p.value||d.value)||!t.pauseOnHover&&S.value==="paused"?"paused":"running"),A=Le(()=>t.pauseOnHover&&p.value||t.pauseOnClick&&d.value||!t.pauseOnHover&&S.value==="paused"?"paused":"running"),E=Le(()=>{const X={"--duration":`${t.duration}s`,"--delay":`${t.delay}s`,"--direction":`${t.direction}`,"--pauseOnHover":`${F.value}`,"--pauseOnClick":`${A.value}`,"--pauseAnimation":`${S.value}`,"--loops":`${t.loop===0?"infinite":t.loop}`,"--gradient-color":`rgba(${t.gradientColor[0]}, ${t.gradientColor[1]}, ${t.gradientColor[2]}, 1), rgba(${t.gradientColor[0]}, ${t.gradientColor[1]}, ${t.gradientColor[2]}, 0)`,"--gradient-length":`${x.value}`,"--min-width":`${r.value}`,"--min-height":`${i.value}`},J={"--orientation":"scrollX",orientation:"horizontal"};return t.vertical&&(J["--orientation"]="scrollY"),Wp(Wp({},X),J)}),T=Le(()=>!!t.gradient),L=async()=>{t.vertical?(i.value="100%",r.value="auto",t.animateOnOverflowOnly&&console.warn("The `animateOnOverflowOnly` prop is not supported for vertical marquees.")):(i.value="auto",t.animateOnOverflowOnly?r.value="auto":r.value="100%"),t.gradient&&(t.gradientWidth?(console.warn("The `gradientWidth` prop has been deprecated and will be removed in a future release. Please use `gradientLength` instead."),x.value=t.gradientWidth):t.gradientLength&&(x.value=t.gradientLength)),(t.clone||t.animateOnOverflowOnly)&&(await w(),b()),y.value=!0};return ut(async()=>{L(),v.value=setInterval(()=>{g.value++,t.loop!==0&&g.value===t.loop&&(e("onComplete"),clearInterval(v.value)),e("onLoopComplete")},t.duration*1e3)}),Nn(()=>{clearInterval(v.value)}),{ready:y,contentWidth:c,containerWidth:l,contentHeight:h,containerHeight:u,loopCounter:g,loopInterval:v,mouseOverMarquee:p,mouseDownMarquee:d,minWidth:r,minHeight:i,animateOnOverflowPause:a,marqueeContent:_,marqueeOverlayContainer:f,componentKey:s,showGradient:T,cloneAmount:n,ForcesUpdate:b,checkForClone:w,setupMarquee:L,getCurrentStyle:E,hoverStarted:k,hoverEnded:P,mouseDown:$,mouseUp:D}}}),ZO={class:"transparent-overlay",ref:"marqueeOverlayContainer","aria-hidden":!0},YO={class:"marquee",ref:"marqueeContent"},XO={key:1,"aria-hidden":!0,class:"marquee"};function QO(t,e,n,r,i,s){return t.ready?(U(),Z("div",{class:ze(["vue3-marquee",{vertical:t.vertical,horizontal:!t.vertical}]),style:xn(t.getCurrentStyle),key:t.componentKey,onMouseenter:e[0]||(e[0]=(...o)=>t.hoverStarted&&t.hoverStarted(...o)),onMouseleave:e[1]||(e[1]=(...o)=>t.hoverEnded&&t.hoverEnded(...o)),onMousedown:e[2]||(e[2]=(...o)=>t.mouseDown&&t.mouseDown(...o)),onMouseup:e[3]||(e[3]=(...o)=>t.mouseUp&&t.mouseUp(...o))},[m("div",ZO,null,512),t.showGradient?(U(),Z("div",{key:0,"aria-hidden":!0,class:ze(["overlay",{vertical:t.vertical,horizontal:!t.vertical}])},null,2)):we("",!0),m("div",YO,[Ms(t.$slots,"default")],512),!t.animateOnOverflowOnly||t.animateOnOverflowOnly&&!t.animateOnOverflowPause?(U(),Z("div",XO,[Ms(t.$slots,"default")])):we("",!0),(U(!0),Z(Se,null,Ye(t.cloneAmount,o=>(U(),Z("div",{"aria-hidden":!0,class:"marquee cloned",key:o},[Ms(t.$slots,"default")]))),128))],38)):we("",!0)}var qp=qO(KO,[["render",QO]]);const JO={key:0,class:"main"},eM={class:"sec-1"},tM=["src"],nM={class:"sub-claim"},rM={class:"sec-2"},iM=["src"],sM={class:"sec-3"},oM={class:"cards-container"},aM={class:"sec-3-content"},lM={class:"title"},cM={class:"sub-title"},uM={class:"btns-container"},dM=["aria-label","href"],fM=["onClick"],hM=["alt"],pM={class:"sec-4"},gM={class:"title"},mM={class:"description"},vM={class:"btns-container"},_M=["href"],bM=["href"],xM={class:"cards-main-container"},yM={class:"model-content"},wM={class:"model-description-container"},CM={class:"model-description"},kM=["href"],SM=["alt"],AM={class:"cards-main-container second-row-cards-container"},EM={class:"model-content"},$M={class:"model-description-container"},TM={class:"model-description"},PM=["href"],DM=["alt"],BM={class:"mobile-cards-main-container"},FM={class:"model-content"},IM={class:"model-description-container"},RM={class:"model-description"},OM=["href"],MM=["alt"],LM={class:"sec-5"},NM={class:"title"},UM={class:"sub-title"},zM={class:"btns-container"},jM=["href"],HM=["href"],VM={alt:"showcase image",class:"sec5-img"},GM={key:0,class:"sec-6"},WM={class:"title"},qM={class:"sub-title"},KM={class:"btns-container"},ZM=["href"],YM=["href"],XM={class:"timeline-container"},QM=["onClick"],JM={key:1,class:"sec-7"},eL={class:"main-container"},tL={class:"blog-cards"},nL=["href"],rL=["alt"],iL={class:"blog-title-container"},sL={class:"blog-description"},oL={class:"learn-more-container"},aL=["title"],lL={class:"sec-8"},cL={class:"main-container"},uL={class:"discover-content"},dL={key:0,class:"model-cards"},fL=["href"],hL=["title"],pL=["alt"],gL={class:"content-container"},mL={class:"model-name"},vL={class:"model-description"},_L={class:"discover-more-container"},vr="https://cms.cogniwerk.ai/assets",bL=Ae({__name:"HomeViewV2",setup(t){const e=$n(),r=fn().fullPath,i=[{property:"title",content:"CogniWerk"},{name:"description",content:"Your Ultimate Creative Co-Pilot."},{name:"robots",content:"all"},{name:"keywords",content:"Illustration,Graphic Design,Diffusion,Drawing,Outpainting,Characterdesign,Creaturedesign,Inpainting,AI,Models,machine learning"},{property:"og:title",content:"CogniWerk"},{property:"og:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"og:description",content:"Your Ultimate Creative Co-Pilot."},{property:"twitter:card",content:"summary"},{property:"twitter:title",content:"CogniWerk"},{property:"twitter:image",content:"https://cms.cogniwerk.ai/assets/d5ab00bb-ee34-4ca1-a468-9f47db9a6f6e"},{property:"twitter:description",content:"Your Ultimate Creative Co-Pilot"}],s=re([]),o=re([]),a=re([]),l=re(1),c=re(null),u=re([]),h=re([]),p=async()=>{try{const k=["id","status","sort","user_created","date_created","user_updated","date_updated","blog_title","category","blog_header_image.id","blog_header_image.title","blog_header_image.storage","blog_header_image.filename_disk","blog_header_image.filename_download","blog_header_image.type","blog_description","blog_url","blog_tags.*.*"],P={limit:3,sort:"-date_created"};P["filter[status][_eq]"]="published";const $=await Tt.getInstance().getBlogs(P,k);s.value=$.filter(D=>D.status==="published")}catch(k){console.debug("Mainpage error:",k)}},d=async()=>{try{const k=await Tt.getInstance().getMainPageClaimImages();u.value=k}catch(k){console.debug("Mainpage error:",k)}},g=async()=>{try{const k=await Tt.getInstance().getMainPageHeroImages();h.value=k}catch(k){console.debug("Mainpage error:",k)}},v=async()=>{try{const k=await Tt.getInstance().getMainPageData();c.value=k[0]}catch(k){console.debug("Mainpage error:",k)}},x=async()=>{try{const k=wi.map(D=>D[0]),P=["slug","name","teaser","small_image"],$=await Tt.getInstance().getModelBySlug(k,P);o.value=$}catch(k){console.debug("Mainpage error:",k)}},y=async()=>{const k=["transform","generate","recognize"].join(","),P=["audio","video","text","image","3d"].join(","),$={page:1,limit:4,search:"","filter[process][process_id][slug][_in]":k,"filter[process_from][process_io_id][slug][_in]":P,"filter[process_to][process_io_id][slug][_in]":P,"filter[tags][tags_id][tag][_in]":Xd.join(",")},D=["id","webservice_url","slug","usability","images.directus_files_id.id","tags.tags_id.id","tags.tags_id.tag","teaser","description","name"];Tt.getInstance().getModels($,D).then(S=>{a.value=S}).catch(S=>{console.debug("error fetching models:",S)})};ut(async()=>{d(),g(),v(),x(),p(),y()});function _(k){switch(k){case"do_it_yourself":return"Do It Yourself";case"external_service":return"External Service";case"ready_to_use":return"Ready To Use";case"under_review":return"Under Review"}return k}function f(k){vn()?k.create_now_button_link_mobile?e.push(k.create_now_button_link_mobile):St.warning("Please use Desktop mode for this feature"):e.push(k.create_now_button_link)}const b=Le(()=>u.value.length?u.value[Math.floor(Math.random()*u.value.length)].filename_disk:null),w=Le(()=>h.value.length?h.value[Math.floor(Math.random()*h.value.length)].filename_disk:"74ae1cf7-c1b1-495d-ae6e-0ebc8b5d3cb4.webp");return(k,P)=>{var D,S,F;const $=pa("lazyload");return U(),Z(Se,null,[c.value?(U(),Z("div",JO,[le(Fn),m("div",eM,[m("img",{src:`${vr}/${b.value||c.value._claim_img}?format=webp`,alt:"image with text: Your Ultimate Creative Co-Pilot",class:"hero-img"},null,8,tM),m("p",nM,ve(c.value.subclaim),1),m("button",{class:"get-started-btn",onClick:P[0]||(P[0]=A=>de(vn)()?de(e).push("/run-model-mobile/sdxl"):de(e).push("/run-model/sdxl"))}," Get started for free ")]),m("div",rM,[m("img",{alt:"cogniwerk.ai user interface",class:"sec-2-img",src:`${vr}/${w.value}?format=webp&width=1200&quality=80`},null,8,iM)]),m("div",sM,[m("div",oM,[(U(!0),Z(Se,null,Ye(c.value.feature_showcase,(A,E)=>(U(),Z("div",{key:E,class:ze({card:!0,"row-1-card":E===0||E===1,"row-2-3-card":E!==0&&E!==1})},[m("div",aM,[m("p",lM,ve(A.feature_showcase_id.title),1),m("p",cM,ve(A.feature_showcase_id.subtitle),1),m("div",uM,[A.feature_showcase_id.learn_more_button_link?(U(),Z("a",{key:0,"aria-label":`Tutorial on ${A.feature_showcase_id.title}`,href:A.feature_showcase_id.learn_more_button_link},P[2]||(P[2]=[m("button",{class:"learn-more-btn"},"Learn more",-1)]),8,dM)):we("",!0),m("button",{class:"create-now-btn",onClick:T=>f(A.feature_showcase_id)}," Create now ",8,fM)])]),Fe(m("img",{class:"feature-image",alt:`feature image of ${A.feature_showcase_id.title}`},null,8,hM),[[$,`${vr}/${A.feature_showcase_id.feature_image}?format=webp&width=${E===0||E===1?768:512}`]])],2))),128))])]),m("div",pM,[m("p",gM,ve(c.value.claim_modelshowcase),1),m("p",mM,ve(c.value.subclaim_modelshowcase),1),m("div",vM,[m("a",{href:c.value.learn_more_link_modelshowcase,"aria-label":"see showcase"},P[3]||(P[3]=[m("button",{class:"learn-more-btn"},"Learn more",-1)]),8,_M),m("a",{href:de(vn)()?c.value.explore_now_link_modelshowcase_mobile:c.value.explore_now_link_modelshowcase,"aria-label":"see showcase"},P[4]||(P[4]=[m("button",{class:"explore-now-btn"},"Explore now",-1)]),8,bM)]),o.value.length?(U(),Z(Se,{key:0},[m("div",xM,[le(de(qp),{id:"right-scroll-marquee",pauseOnHover:!0,pauseOnClick:!0,animateOnOverflowOnly:!0,direction:"reverse"},{default:mt(()=>[(U(!0),Z(Se,null,Ye(o.value.filter((A,E)=>E<=5),A=>(U(),Z("div",{class:"ai-model-card",key:A.slug},[m("div",yM,[m("div",wM,[m("p",CM,ve(A.name)+": "+ve(A.teaser),1)]),m("a",{href:de(vn)()?`/run-model-mobile/${A.slug}`:`/run-model/${A.slug}`},P[5]||(P[5]=[m("button",{class:"visit-button"},"Visit",-1)]),8,kM)]),Fe(m("img",{class:"model-image",alt:`image of AI model ${A.name}`},null,8,SM),[[$,`${vr}/${A.small_image}?format=webp&width=256&height=256`]])]))),128))]),_:1})]),m("div",AM,[le(de(qp),{id:"left-scroll-marquee",pauseOnHover:!0,pauseOnClick:!0,animateOnOverflowOnly:!0},{default:mt(()=>[(U(!0),Z(Se,null,Ye(o.value.filter((A,E)=>E>5),A=>(U(),Z("div",{class:"ai-model-card",key:A.slug},[m("div",EM,[m("div",$M,[m("p",TM,ve(A.name)+": "+ve(A.teaser),1)]),m("a",{href:de(vn)()?`/run-model-mobile/${A.slug}`:`/run-model/${A.slug}`},P[6]||(P[6]=[m("button",{class:"visit-button"},"Visit",-1)]),8,PM)]),Fe(m("img",{class:"model-image",alt:`image of AI model ${A.name}`},null,8,DM),[[$,`${vr}/${A.small_image}?format=webp&width=256&height=256`]])]))),128))]),_:1})]),m("div",BM,[(U(!0),Z(Se,null,Ye(o.value.filter((A,E)=>E<4),A=>(U(),Z("div",{class:"ai-model-card",key:A.slug},[m("div",FM,[m("div",IM,[m("p",RM,ve(A.name)+": "+ve(A.teaser),1)]),m("a",{href:de(vn)()?`/run-model-mobile/${A.slug}`:`/run-model/${A.slug}`},P[7]||(P[7]=[m("button",{class:"visit-button"},"Visit",-1)]),8,OM)]),Fe(m("img",{class:"model-image",alt:`image of AI model ${A.name}`},null,8,MM),[[$,`${vr}/${A.small_image}?format=webp&width=256&height=256`]])]))),128))])],64)):we("",!0)]),m("div",LM,[m("p",NM,ve(c.value.claim_unique_showcase),1),m("p",UM,ve(c.value.subclaim_unique_showcase),1),m("div",zM,[c.value.learn_more_link_unique_showcase?(U(),Z("a",{key:0,href:c.value.learn_more_link_unique_showcase},P[8]||(P[8]=[m("button",{class:"learn-more-btn"},"Learn more",-1)]),8,jM)):we("",!0),m("a",{href:c.value.explore_unique_showcase},P[9]||(P[9]=[m("button",{class:"explore-now-btn"},"Explore now",-1)]),8,HM)]),Fe(m("img",VM,null,512),[[$,`${vr}/${c.value.medium_unique_showcase}?format=webp&quality=50&width=720`]])]),(S=(D=c.value)==null?void 0:D.interface_showcase)!=null&&S.length?(U(),Z("div",GM,[m("p",WM,ve(c.value.interface_showcase[l.value-1].interface_showcase_id.claim_interface_showcase),1),m("p",qM,ve(c.value.interface_showcase[l.value-1].interface_showcase_id.subclaim_interface_showcase),1),m("div",KM,[c.value.interface_showcase[l.value-1].interface_showcase_id.learn_more_link_interface_showcase?(U(),Z("a",{key:0,href:c.value.interface_showcase[l.value-1].interface_showcase_id.learn_more_link_interface_showcase},P[10]||(P[10]=[m("button",{class:"learn-more-btn"},"Learn more",-1)]),8,ZM)):we("",!0),m("a",{href:de(vn)()?c.value.interface_showcase[l.value-1].interface_showcase_id.create_now_link_interface_showcase_mobile:c.value.interface_showcase[l.value-1].interface_showcase_id.create_now_link_interface_showcase},P[11]||(P[11]=[m("button",{class:"explore-now-btn"},"Create now",-1)]),8,YM)]),m("div",XM,[(U(),Z(Se,null,Ye([1,2,3,4],A=>m("button",{key:A,class:ze({"timeline-btn":!0,"timeline-btn-selected":A===l.value}),onClick:E=>l.value=A},ve(A),11,QM)),64)),P[12]||(P[12]=m("hr",null,null,-1))]),Fe((U(),Z("img",{alt:"cogniwerk.ai interface showcase",class:"sec-6-img",key:l.value})),[[$,`${vr}/${c.value.interface_showcase[l.value-1].interface_showcase_id.medium_interface_showcase}?format=webp&width=1200`]])])):we("",!0),(F=s.value)!=null&&F.length?(U(),Z("div",JM,[m("div",eL,[P[14]||(P[14]=m("div",{class:"heading-container"},[m("p",{class:"heading"},"Get more insights"),m("img",{src:pI,alt:"icon: heading",class:"heading-icon"})],-1)),P[15]||(P[15]=m("div",{class:"description"}," Our blog provides frequent news on our development. Transparent and engaging. ",-1)),m("div",tL,[(U(!0),Z(Se,null,Ye(s.value,A=>{var E;return U(),Z("a",{class:"blog-card",href:`/blog/${A.blog_url}`,key:A.id},[Fe(m("img",{alt:`feature image of blog ${A.blog_title}`,class:"blog-img"},null,8,rL),[[$,`${vr}/${(E=A.blog_header_image)==null?void 0:E.filename_disk}?width=800&format=webp&quality=100&fit=outside`]]),m("div",iL,[m("p",sL,ve(A.blog_title),1)]),m("div",oL,[m("p",{class:"learn-more-text",title:A.blog_description}," Learn more ",8,aL),P[13]||(P[13]=m("img",{src:gI,alt:"icon: learn more",class:"learn-more-icon"},null,-1))])],8,nL)}),128))])])])):we("",!0),m("div",lL,[m("div",cL,[P[17]||(P[17]=m("p",{class:"heading"},"Discover all of creative AI",-1)),P[18]||(P[18]=m("p",{class:"description"}," Initially, we curated AI tools and, through that expertise, created our own innovative solution. We still keep our library updated to search for the best features to implement. So discover the latest advancements and trends in the world of AI. ",-1)),m("div",uL,[le(u8,{modelResultLength:0,isHomePage:!0})]),a.value.length?(U(),Z("div",dL,[(U(!0),Z(Se,null,Ye(a.value,A=>{var E,T;return U(),Z("a",{class:"model-card",key:A.slug,href:`/model/${A.slug}`},[m("div",{class:"servicetype-icon",title:_("ready_to_use")},[le(e2,{usability:"ready_to_use",fill:"#fff"})],8,hL),Fe(m("img",{alt:`image of AI model ${A.name}`,class:"model-img"},null,8,pL),[[$,`${vr}/${(T=(E=A.images[0])==null?void 0:E.directus_files_id)==null?void 0:T.id}?width=400`]]),m("div",gL,[m("p",mL,ve(A.name),1),m("p",vL,ve(A.teaser),1),P[16]||(P[16]=m("div",{class:"btn-container"},[m("button",{class:"visit-btn"},"Visit")],-1))])],8,fL)}),128))])):we("",!0),m("div",_L,[m("button",{class:"discover-more-btn",onClick:P[1]||(P[1]=A=>de(e).push("/discover"))}," Discover more ")])])]),le(d8),le(S5)])):we("",!0),(U(),Xe(Er,null,{default:mt(()=>[le(jr,{tags:i,canonicalPath:de(r)},null,8,["canonicalPath"])]),_:1}))],64)}}}),xL=je(bL,[["__scopeId","data-v-3537dc93"]]),yL={class:"main"},wL={class:"container"},CL={class:"tabs-content"},kL={class:"models-container"},SL=Ae({__name:"DiscoverView",setup(t){const e=["transform","generate","recognize"].join(","),n=["audio","video","text","image","3d"].join(","),r=["id","webservice_url","slug","usability","images.directus_files_id.id","tags.tags_id.id","tags.tags_id.tag","teaser","description","name"],i=fn(),s=xa(),o=re([]),a=re(0),l=re([[],[],[],[]]),c=re(1),u=re([]),h=re(!1);function p(d){l.value[0]=s.filter.process.length>0?s.filter.process:["transform","generate","recognize"],l.value[1]=s.filter.from.length>0?s.filter.from:["audio","video","text","image","3d","nothing"],l.value[2]=s.filter.to.length>0?s.filter.to:["audio","video","text","image","3d","nothing"],l.value[3]=s.filter.tags.length>0?s.filter.tags:Xd;const g={page:c.value,limit:24,search:s.filter.search.trim()!==""?s.filter.search:"","filter[process][process_id][slug][_in]":l.value[0].join(","),"filter[process_from][process_io_id][slug][_in]":l.value[1].join(","),"filter[process_to][process_io_id][slug][_in]":l.value[2].join(","),"filter[tags][tags_id][tag][_in]":l.value[3].join(","),"filter[usability][_in]":s.filter.serviceType.join(",")};s.filter.serviceType.length===0&&delete g["filter[usability][_in]"],Tt.getInstance().getModels(g,r).then(v=>{o.value=d?v:[...o.value,...v],h.value=!1}),delete g.page,Tt.getInstance().getModels({...g,"aggregate[count]":"*"},r).then(v=>{var x;return a.value=((x=v[0])==null?void 0:x.count)??0})}return s.$subscribe(()=>{c.value=1,p(!0)}),ut(async()=>{var g;window.scrollTo(0,0),(g=i==null?void 0:i.params)!=null&&g.processSpec&&s.loadFromUrl();const d={page:c.value,limit:24,search:s.filter.search.trim()!==""?s.filter.search:"","filter[process][process_id][slug][_in]":e,"filter[process_from][process_io_id][slug][_in]":n,"filter[process_to][process_io_id][slug][_in]":n,"filter[tags][tags_id][tag][_in]":Xd.join(",")};Tt.getInstance().getModels(d,r).then(v=>{var x;o.value=v,((x=u==null?void 0:u.value)==null?void 0:x.length)===0&&(u.value=(v==null?void 0:v.filter(y=>y.usability==="ready_to_use").slice(0,12))??[])}),Tt.getInstance().getModels({...d,"aggregate[count]":"*"},r).then(v=>{var x;return a.value=((x=v[0])==null?void 0:x.count)??0})}),window.addEventListener("scroll",()=>{window.scrollY/document.body.scrollHeight>.35&&!h.value&&(h.value=!0,c.value+=1,console.log(a.value,o.value.length),a.value>o.value.length&&p(!1))}),(d,g)=>(U(),Z("div",yL,[le(Fn),m("main",null,[m("div",wL,[g[0]||(g[0]=m("p",{class:"heading"},"Discover all of creative AI",-1)),g[1]||(g[1]=m("p",{class:"description"}," Initially, we curated AI tools and, through that expertise, created our own innovative solution. We still keep our library updated to search for the best features to implement. So discover the latest advancements and trends in the world of AI. ",-1)),m("div",CL,[le(u8,{modelResultLength:a.value||0},null,8,["modelResultLength"])]),m("div",kL,[(U(!0),Z(Se,null,Ye(o.value,v=>(U(),Xe(q5,{model:v,key:v.name},null,8,["model"]))),128))]),le(d8)])])]))}}),AL=je(SL,[["__scopeId","data-v-59067dec"]]),u2=[{path:"/:pathMatch(.*)*",name:"404",component:UT},{path:"/",name:"home",component:xL},{path:"/:processSpec(models/search/process-.+)?/:fromSpec(from-.+)?/:toSpec(to-.+)?/:tagsSpec(tags-.+)?/:tab(discover)?",name:"discover",component:AL},{path:"/model/:id",name:"model",component:WC,props:!0},{path:"/feedback",name:"Feedback",component:ik},{path:"/login",name:"Login",component:ok},{path:"/profile",name:"Profile",component:MT},{path:"/imprint",name:"Imprint",component:XC},{path:"/privacy",name:"Privacy",component:rP},{path:"/about",name:"About",component:SP},{path:"/blog/:tagsSpec(search/tags-.+)?",name:"blog",component:NP},{path:"/blog/:slug",name:"blog-detail",component:LD,props:!1},{path:"/admin/credit-requests",name:"AdminCreditRequestsView",component:GD,props:!0},{path:"/run-model-mobile/:id",name:"mobileInterface",component:UB},{path:"/share/:linkId",name:"share",component:hI}],EL=()=>Ho(()=>import("./sdInterface-DNz2eSv3.js").then(t=>t.s),__vite__mapDeps([0,1,2,3,4]));u2.push({path:"/run-model/:id",name:"sd-interface",component:EL,props:!0});const $L=()=>Ho(()=>import("./ProfileEdit-864Sp6I7.js"),__vite__mapDeps([5,1,2,6]));u2.push({path:"/settings",name:"settings",component:$L,props:!0});const Cl=hb({history:j_("/"),routes:u2});Cl.afterEach(()=>{if(typeof window<"u"){const t=window==null?void 0:window._paq;t==null||t.push(["trackPageView"])}});/*! vue-countdown v2.1.2 | (c) 2018-present Chen Fengyuan | MIT */const kl=1e3,Sl=60*kl,Al=60*Sl,Kp=24*Al,Zp="abort",Yp="end",Xp="progress",Qp="start",Jp="visibilitychange";var eg=Ae({name:"VueCountdown",props:{autoStart:{type:Boolean,default:!0},emitEvents:{type:Boolean,default:!0},interval:{type:Number,default:1e3,validator:t=>t>=0},now:{type:Function,default:()=>Date.now()},tag:{type:String,default:"span"},time:{type:Number,default:0,validator:t=>t>=0},transform:{type:Function,default:t=>t}},emits:[Zp,Yp,Xp,Qp],data(){return{counting:!1,endTime:0,totalMilliseconds:0,requestId:0}},computed:{days(){return Math.floor(this.totalMilliseconds/Kp)},hours(){return Math.floor(this.totalMilliseconds%Kp/Al)},minutes(){return Math.floor(this.totalMilliseconds%Al/Sl)},seconds(){return Math.floor(this.totalMilliseconds%Sl/kl)},milliseconds(){return Math.floor(this.totalMilliseconds%kl)},totalDays(){return this.days},totalHours(){return Math.floor(this.totalMilliseconds/Al)},totalMinutes(){return Math.floor(this.totalMilliseconds/Sl)},totalSeconds(){return Math.floor(this.totalMilliseconds/kl)}},watch:{$props:{deep:!0,immediate:!0,handler(){this.totalMilliseconds=this.time,this.endTime=this.now()+this.time,this.autoStart&&this.start()}}},mounted(){document.addEventListener(Jp,this.handleVisibilityChange)},beforeUnmount(){document.removeEventListener(Jp,this.handleVisibilityChange),this.pause()},methods:{start(){this.counting||(this.counting=!0,this.autoStart||(this.totalMilliseconds=this.time,this.endTime=this.now()+this.time),this.emitEvents&&this.$emit(Qp),document.visibilityState==="visible"&&this.continue())},continue(){if(!this.counting)return;const t=Math.min(this.totalMilliseconds,this.interval);if(t>0){let e,n;const r=i=>{e||(e=i),n||(n=i);const s=i-e;s>=t||s+(i-n)/2>=t?this.progress():this.requestId=requestAnimationFrame(r),n=i};this.requestId=requestAnimationFrame(r)}else this.end()},pause(){cancelAnimationFrame(this.requestId)},progress(){this.counting&&(this.update(),this.emitEvents&&this.totalMilliseconds>0&&this.$emit(Xp,{days:this.days,hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds,totalDays:this.totalDays,totalHours:this.totalHours,totalMinutes:this.totalMinutes,totalSeconds:this.totalSeconds,totalMilliseconds:this.totalMilliseconds}),this.continue())},abort(){this.counting&&(this.pause(),this.counting=!1,this.emitEvents&&this.$emit(Zp))},end(){this.counting&&(this.pause(),this.totalMilliseconds=0,this.counting=!1,this.emitEvents&&this.$emit(Yp))},update(){this.counting&&(this.totalMilliseconds=Math.max(0,this.endTime-this.now()))},restart(){this.pause(),this.totalMilliseconds=this.time,this.endTime=this.now()+this.time,this.counting=!1,this.start()},handleVisibilityChange(){switch(document.visibilityState){case"visible":this.update(),this.continue();break;case"hidden":this.pause();break}}},render(){return Zt(this.tag,this.$slots.default?[this.$slots.default(this.transform({days:this.days,hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds,totalDays:this.totalDays,totalHours:this.totalHours,totalMinutes:this.totalMinutes,totalSeconds:this.totalSeconds,totalMilliseconds:this.totalMilliseconds}))]:void 0)}}),d2={exports:{}},O0={},f8={},it={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t._registerNode=t.Konva=t.glob=void 0;const e=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}t.glob=typeof Ke<"u"?Ke:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},t.Konva={_global:t.glob,version:"9.3.14",isBrowser:n(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return t.Konva.angleDeg?i*e:i},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return t.Konva.DD.isDragging},isTransforming(){var i;return(i=t.Konva.Transformer)===null||i===void 0?void 0:i.isTransforming()},isDragReady(){return!!t.Konva.DD.node},releaseCanvasOnDestroy:!0,document:t.glob.document,_injectGlobal(i){t.glob.Konva=i}};const r=i=>{t.Konva[i.prototype.getClassName()]=i};t._registerNode=r,t.Konva._injectGlobal(t.Konva)})(it);var jt={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Transform=void 0;const e=it;class n{constructor(b=[1,0,0,1,0,0]){this.dirty=!1,this.m=b&&b.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(b){b.m[0]=this.m[0],b.m[1]=this.m[1],b.m[2]=this.m[2],b.m[3]=this.m[3],b.m[4]=this.m[4],b.m[5]=this.m[5]}point(b){var w=this.m;return{x:w[0]*b.x+w[2]*b.y+w[4],y:w[1]*b.x+w[3]*b.y+w[5]}}translate(b,w){return this.m[4]+=this.m[0]*b+this.m[2]*w,this.m[5]+=this.m[1]*b+this.m[3]*w,this}scale(b,w){return this.m[0]*=b,this.m[1]*=b,this.m[2]*=w,this.m[3]*=w,this}rotate(b){var w=Math.cos(b),k=Math.sin(b),P=this.m[0]*w+this.m[2]*k,$=this.m[1]*w+this.m[3]*k,D=this.m[0]*-k+this.m[2]*w,S=this.m[1]*-k+this.m[3]*w;return this.m[0]=P,this.m[1]=$,this.m[2]=D,this.m[3]=S,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(b,w){var k=this.m[0]+this.m[2]*w,P=this.m[1]+this.m[3]*w,$=this.m[2]+this.m[0]*b,D=this.m[3]+this.m[1]*b;return this.m[0]=k,this.m[1]=P,this.m[2]=$,this.m[3]=D,this}multiply(b){var w=this.m[0]*b.m[0]+this.m[2]*b.m[1],k=this.m[1]*b.m[0]+this.m[3]*b.m[1],P=this.m[0]*b.m[2]+this.m[2]*b.m[3],$=this.m[1]*b.m[2]+this.m[3]*b.m[3],D=this.m[0]*b.m[4]+this.m[2]*b.m[5]+this.m[4],S=this.m[1]*b.m[4]+this.m[3]*b.m[5]+this.m[5];return this.m[0]=w,this.m[1]=k,this.m[2]=P,this.m[3]=$,this.m[4]=D,this.m[5]=S,this}invert(){var b=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),w=this.m[3]*b,k=-this.m[1]*b,P=-this.m[2]*b,$=this.m[0]*b,D=b*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),S=b*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=w,this.m[1]=k,this.m[2]=P,this.m[3]=$,this.m[4]=D,this.m[5]=S,this}getMatrix(){return this.m}decompose(){var b=this.m[0],w=this.m[1],k=this.m[2],P=this.m[3],$=this.m[4],D=this.m[5],S=b*P-w*k;let F={x:$,y:D,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(b!=0||w!=0){var A=Math.sqrt(b*b+w*w);F.rotation=w>0?Math.acos(b/A):-Math.acos(b/A),F.scaleX=A,F.scaleY=S/A,F.skewX=(b*k+w*P)/S,F.skewY=0}else if(k!=0||P!=0){var E=Math.sqrt(k*k+P*P);F.rotation=Math.PI/2-(P>0?Math.acos(-k/E):-Math.acos(k/E)),F.scaleX=S/E,F.scaleY=E,F.skewX=0,F.skewY=(b*k+w*P)/S}return F.rotation=t.Util._getRotation(F.rotation),F}}t.Transform=n;var r="[object Array]",i="[object Number]",s="[object String]",o="[object Boolean]",a=Math.PI/180,l=180/Math.PI,c="#",u="",h="0",p="Konva warning: ",d="Konva error: ",g="rgb(",v={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},x=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,y=[];const _=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(f){setTimeout(f,60)};t.Util={_isElement(f){return!!(f&&f.nodeType==1)},_isFunction(f){return!!(f&&f.constructor&&f.call&&f.apply)},_isPlainObject(f){return!!f&&f.constructor===Object},_isArray(f){return Object.prototype.toString.call(f)===r},_isNumber(f){return Object.prototype.toString.call(f)===i&&!isNaN(f)&&isFinite(f)},_isString(f){return Object.prototype.toString.call(f)===s},_isBoolean(f){return Object.prototype.toString.call(f)===o},isObject(f){return f instanceof Object},isValidSelector(f){if(typeof f!="string")return!1;var b=f[0];return b==="#"||b==="."||b===b.toUpperCase()},_sign(f){return f===0||f>0?1:-1},requestAnimFrame(f){y.push(f),y.length===1&&_(function(){const b=y;y=[],b.forEach(function(w){w()})})},createCanvasElement(){var f=document.createElement("canvas");try{f.style=f.style||{}}catch{}return f},createImageElement(){return document.createElement("img")},_isInDocument(f){for(;f=f.parentNode;)if(f==document)return!0;return!1},_urlToImage(f,b){var w=t.Util.createImageElement();w.onload=function(){b(w)},w.src=f},_rgbToHex(f,b,w){return((1<<24)+(f<<16)+(b<<8)+w).toString(16).slice(1)},_hexToRgb(f){f=f.replace(c,u);var b=parseInt(f,16);return{r:b>>16&255,g:b>>8&255,b:b&255}},getRandomColor(){for(var f=(Math.random()*16777215<<0).toString(16);f.length<6;)f=h+f;return c+f},getRGB(f){var b;return f in v?(b=v[f],{r:b[0],g:b[1],b:b[2]}):f[0]===c?this._hexToRgb(f.substring(1)):f.substr(0,4)===g?(b=x.exec(f.replace(/ /g,"")),{r:parseInt(b[1],10),g:parseInt(b[2],10),b:parseInt(b[3],10)}):{r:0,g:0,b:0}},colorToRGBA(f){return f=f||"black",t.Util._namedColorToRBA(f)||t.Util._hex3ColorToRGBA(f)||t.Util._hex4ColorToRGBA(f)||t.Util._hex6ColorToRGBA(f)||t.Util._hex8ColorToRGBA(f)||t.Util._rgbColorToRGBA(f)||t.Util._rgbaColorToRGBA(f)||t.Util._hslColorToRGBA(f)},_namedColorToRBA(f){var b=v[f.toLowerCase()];return b?{r:b[0],g:b[1],b:b[2],a:1}:null},_rgbColorToRGBA(f){if(f.indexOf("rgb(")===0){f=f.match(/rgb\(([^)]+)\)/)[1];var b=f.split(/ *, */).map(Number);return{r:b[0],g:b[1],b:b[2],a:1}}},_rgbaColorToRGBA(f){if(f.indexOf("rgba(")===0){f=f.match(/rgba\(([^)]+)\)/)[1];var b=f.split(/ *, */).map((w,k)=>w.slice(-1)==="%"?k===3?parseInt(w)/100:parseInt(w)/100*255:Number(w));return{r:b[0],g:b[1],b:b[2],a:b[3]}}},_hex8ColorToRGBA(f){if(f[0]==="#"&&f.length===9)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:parseInt(f.slice(7,9),16)/255}},_hex6ColorToRGBA(f){if(f[0]==="#"&&f.length===7)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:1}},_hex4ColorToRGBA(f){if(f[0]==="#"&&f.length===5)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:parseInt(f[4]+f[4],16)/255}},_hex3ColorToRGBA(f){if(f[0]==="#"&&f.length===4)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:1}},_hslColorToRGBA(f){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(f)){const[b,...w]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(f),k=Number(w[0])/360,P=Number(w[1])/100,$=Number(w[2])/100;let D,S,F;if(P===0)return F=$*255,{r:Math.round(F),g:Math.round(F),b:Math.round(F),a:1};$<.5?D=$*(1+P):D=$+P-$*P;const A=2*$-D,E=[0,0,0];for(let T=0;T<3;T++)S=k+1/3*-(T-1),S<0&&S++,S>1&&S--,6*S<1?F=A+(D-A)*6*S:2*S<1?F=D:3*S<2?F=A+(D-A)*(2/3-S)*6:F=A,E[T]=F*255;return{r:Math.round(E[0]),g:Math.round(E[1]),b:Math.round(E[2]),a:1}}},haveIntersection(f,b){return!(b.x>f.x+f.width||b.x+b.width<f.x||b.y>f.y+f.height||b.y+b.height<f.y)},cloneObject(f){var b={};for(var w in f)this._isPlainObject(f[w])?b[w]=this.cloneObject(f[w]):this._isArray(f[w])?b[w]=this.cloneArray(f[w]):b[w]=f[w];return b},cloneArray(f){return f.slice(0)},degToRad(f){return f*a},radToDeg(f){return f*l},_degToRad(f){return t.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),t.Util.degToRad(f)},_radToDeg(f){return t.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),t.Util.radToDeg(f)},_getRotation(f){return e.Konva.angleDeg?t.Util.radToDeg(f):f},_capitalize(f){return f.charAt(0).toUpperCase()+f.slice(1)},throw(f){throw new Error(d+f)},error(f){console.error(d+f)},warn(f){e.Konva.showWarnings&&console.warn(p+f)},each(f,b){for(var w in f)b(w,f[w])},_inRange(f,b,w){return b<=f&&f<w},_getProjectionToSegment(f,b,w,k,P,$){var D,S,F,A=(f-w)*(f-w)+(b-k)*(b-k);if(A==0)D=f,S=b,F=(P-w)*(P-w)+($-k)*($-k);else{var E=((P-f)*(w-f)+($-b)*(k-b))/A;E<0?(D=f,S=b,F=(f-P)*(f-P)+(b-$)*(b-$)):E>1?(D=w,S=k,F=(w-P)*(w-P)+(k-$)*(k-$)):(D=f+E*(w-f),S=b+E*(k-b),F=(D-P)*(D-P)+(S-$)*(S-$))}return[D,S,F]},_getProjectionToLine(f,b,w){var k=t.Util.cloneObject(f),P=Number.MAX_VALUE;return b.forEach(function($,D){if(!(!w&&D===b.length-1)){var S=b[(D+1)%b.length],F=t.Util._getProjectionToSegment($.x,$.y,S.x,S.y,f.x,f.y),A=F[0],E=F[1],T=F[2];T<P&&(k.x=A,k.y=E,P=T)}}),k},_prepareArrayForTween(f,b,w){var k,P=[],$=[];if(f.length>b.length){var D=b;b=f,f=D}for(k=0;k<f.length;k+=2)P.push({x:f[k],y:f[k+1]});for(k=0;k<b.length;k+=2)$.push({x:b[k],y:b[k+1]});var S=[];return $.forEach(function(F){var A=t.Util._getProjectionToLine(F,P,w);S.push(A.x),S.push(A.y)}),S},_prepareToStringify(f){var b;f.visitedByCircularReferenceRemoval=!0;for(var w in f)if(f.hasOwnProperty(w)&&f[w]&&typeof f[w]=="object"){if(b=Object.getOwnPropertyDescriptor(f,w),f[w].visitedByCircularReferenceRemoval||t.Util._isElement(f[w]))if(b.configurable)delete f[w];else return null;else if(t.Util._prepareToStringify(f[w])===null)if(b.configurable)delete f[w];else return null}return delete f.visitedByCircularReferenceRemoval,f},_assign(f,b){for(var w in b)f[w]=b[w];return f},_getFirstPointerId(f){return f.touches?f.changedTouches[0].identifier:f.pointerId||999},releaseCanvas(...f){e.Konva.releaseCanvasOnDestroy&&f.forEach(b=>{b.width=0,b.height=0})},drawRoundedRectPath(f,b,w,k){let P=0,$=0,D=0,S=0;typeof k=="number"?P=$=D=S=Math.min(k,b/2,w/2):(P=Math.min(k[0]||0,b/2,w/2),$=Math.min(k[1]||0,b/2,w/2),S=Math.min(k[2]||0,b/2,w/2),D=Math.min(k[3]||0,b/2,w/2)),f.moveTo(P,0),f.lineTo(b-$,0),f.arc(b-$,$,$,Math.PI*3/2,0,!1),f.lineTo(b,w-S),f.arc(b-S,w-S,S,0,Math.PI/2,!1),f.lineTo(D,w),f.arc(D,w-D,D,Math.PI/2,Math.PI,!1),f.lineTo(0,P),f.arc(P,P,P,Math.PI,Math.PI*3/2,!1)}}})(jt);var Ut={},st={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.getComponentValidator=Ue.getBooleanValidator=Ue.getNumberArrayValidator=Ue.getFunctionValidator=Ue.getStringOrGradientValidator=Ue.getStringValidator=Ue.getNumberOrAutoValidator=Ue.getNumberOrArrayOfNumbersValidator=Ue.getNumberValidator=Ue.alphaComponent=Ue.RGBComponent=void 0;const Hr=it,Ht=jt;function Vr(t){return Ht.Util._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||Ht.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}function TL(t){return t>255?255:t<0?0:Math.round(t)}Ue.RGBComponent=TL;function PL(t){return t>1?1:t<1e-4?1e-4:t}Ue.alphaComponent=PL;function DL(){if(Hr.Konva.isUnminified)return function(t,e){return Ht.Util._isNumber(t)||Ht.Util.warn(Vr(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}Ue.getNumberValidator=DL;function BL(t){if(Hr.Konva.isUnminified)return function(e,n){let r=Ht.Util._isNumber(e),i=Ht.Util._isArray(e)&&e.length==t;return!r&&!i&&Ht.Util.warn(Vr(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}}Ue.getNumberOrArrayOfNumbersValidator=BL;function FL(){if(Hr.Konva.isUnminified)return function(t,e){var n=Ht.Util._isNumber(t),r=t==="auto";return n||r||Ht.Util.warn(Vr(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}Ue.getNumberOrAutoValidator=FL;function IL(){if(Hr.Konva.isUnminified)return function(t,e){return Ht.Util._isString(t)||Ht.Util.warn(Vr(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}Ue.getStringValidator=IL;function RL(){if(Hr.Konva.isUnminified)return function(t,e){const n=Ht.Util._isString(t),r=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return n||r||Ht.Util.warn(Vr(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}Ue.getStringOrGradientValidator=RL;function OL(){if(Hr.Konva.isUnminified)return function(t,e){return Ht.Util._isFunction(t)||Ht.Util.warn(Vr(t)+' is a not valid value for "'+e+'" attribute. The value should be a function.'),t}}Ue.getFunctionValidator=OL;function ML(){if(Hr.Konva.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(Ht.Util._isArray(t)?t.forEach(function(r){Ht.Util._isNumber(r)||Ht.Util.warn('"'+e+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):Ht.Util.warn(Vr(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}Ue.getNumberArrayValidator=ML;function LL(){if(Hr.Konva.isUnminified)return function(t,e){var n=t===!0||t===!1;return n||Ht.Util.warn(Vr(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}Ue.getBooleanValidator=LL;function NL(t){if(Hr.Konva.isUnminified)return function(e,n){return e==null||Ht.Util.isObject(e)||Ht.Util.warn(Vr(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}Ue.getComponentValidator=NL;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Factory=void 0;const e=jt,n=Ue;var r="get",i="set";t.Factory={addGetterSetter(s,o,a,l,c){t.Factory.addGetter(s,o,a),t.Factory.addSetter(s,o,l,c),t.Factory.addOverloadedGetterSetter(s,o)},addGetter(s,o,a){var l=r+e.Util._capitalize(o);s.prototype[l]=s.prototype[l]||function(){var c=this.attrs[o];return c===void 0?a:c}},addSetter(s,o,a,l){var c=i+e.Util._capitalize(o);s.prototype[c]||t.Factory.overWriteSetter(s,o,a,l)},overWriteSetter(s,o,a,l){var c=i+e.Util._capitalize(o);s.prototype[c]=function(u){return a&&u!==void 0&&u!==null&&(u=a.call(this,u,o)),this._setAttr(o,u),l&&l.call(this),this}},addComponentsGetterSetter(s,o,a,l,c){var u=a.length,h=e.Util._capitalize,p=r+h(o),d=i+h(o),g,v;s.prototype[p]=function(){var y={};for(g=0;g<u;g++)v=a[g],y[v]=this.getAttr(o+h(v));return y};var x=(0,n.getComponentValidator)(a);s.prototype[d]=function(y){var _=this.attrs[o],f;l&&(y=l.call(this,y)),x&&x.call(this,y,o);for(f in y)y.hasOwnProperty(f)&&this._setAttr(o+h(f),y[f]);return y||a.forEach(b=>{this._setAttr(o+h(b),void 0)}),this._fireChangeEvent(o,_,y),c&&c.call(this),this},t.Factory.addOverloadedGetterSetter(s,o)},addOverloadedGetterSetter(s,o){var a=e.Util._capitalize(o),l=i+a,c=r+a;s.prototype[o]=function(){return arguments.length?(this[l](arguments[0]),this):this[c]()}},addDeprecatedGetterSetter(s,o,a,l){e.Util.error("Adding deprecated "+o);var c=r+e.Util._capitalize(o),u=o+" property is deprecated and will be removed soon. Look at Konva change log for more information.";s.prototype[c]=function(){e.Util.error(u);var h=this.attrs[o];return h===void 0?a:h},t.Factory.addSetter(s,o,l,function(){e.Util.error(u)}),t.Factory.addOverloadedGetterSetter(s,o)},backCompat(s,o){e.Util.each(o,function(a,l){var c=s.prototype[l],u=r+e.Util._capitalize(a),h=i+e.Util._capitalize(a);function p(){c.apply(this,arguments),e.Util.error('"'+a+'" method is deprecated and will be removed soon. Use ""'+l+'" instead.')}s.prototype[a]=p,s.prototype[u]=p,s.prototype[h]=p})},afterSetFilter(){this._filterUpToDate=!1}}})(st);var or={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.HitContext=Ur.SceneContext=Ur.Context=void 0;const h8=jt,UL=it;function zL(t){var e=[],n=t.length,r=h8.Util,i,s;for(i=0;i<n;i++)s=t[i],r._isNumber(s)?s=Math.round(s*1e3)/1e3:r._isString(s)||(s=s+""),e.push(s);return e}var tg=",",jL="(",HL=")",VL="([",GL="])",WL=";",qL="()",KL="=",ng=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],ZL=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const YL=100;class M0{constructor(e){this.canvas=e,UL.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,n){var r=this.traceArr,i=r.length,s="",o,a,l,c;for(o=0;o<i;o++)a=r[o],l=a.method,l?(c=a.args,s+=l,e?s+=qL:h8.Util._isArray(c[0])?s+=VL+c.join(tg)+GL:(n&&(c=c.map(u=>typeof u=="number"?Math.floor(u):u)),s+=jL+c.join(tg)+HL)):(s+=a.property,e||(s+=KL+a.val)),s+=WL;return s}clearTrace(){this.traceArr=[]}_trace(e){var n=this.traceArr,r;n.push(e),r=n.length,r>=YL&&n.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var n=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(e){const n=e.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(e){var n=e.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(e){const n=e.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(e,n){this._context[e]=n}arc(e,n,r,i,s,o){this._context.arc(e,n,r,i,s,o)}arcTo(e,n,r,i,s){this._context.arcTo(e,n,r,i,s)}beginPath(){this._context.beginPath()}bezierCurveTo(e,n,r,i,s,o){this._context.bezierCurveTo(e,n,r,i,s,o)}clearRect(e,n,r,i){this._context.clearRect(e,n,r,i)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,n){var r=arguments;if(r.length===2)return this._context.createImageData(e,n);if(r.length===1)return this._context.createImageData(e)}createLinearGradient(e,n,r,i){return this._context.createLinearGradient(e,n,r,i)}createPattern(e,n){return this._context.createPattern(e,n)}createRadialGradient(e,n,r,i,s,o){return this._context.createRadialGradient(e,n,r,i,s,o)}drawImage(e,n,r,i,s,o,a,l,c){var u=arguments,h=this._context;u.length===3?h.drawImage(e,n,r):u.length===5?h.drawImage(e,n,r,i,s):u.length===9&&h.drawImage(e,n,r,i,s,o,a,l,c)}ellipse(e,n,r,i,s,o,a,l){this._context.ellipse(e,n,r,i,s,o,a,l)}isPointInPath(e,n,r,i){return r?this._context.isPointInPath(r,e,n,i):this._context.isPointInPath(e,n,i)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,n,r,i){this._context.fillRect(e,n,r,i)}strokeRect(e,n,r,i){this._context.strokeRect(e,n,r,i)}fillText(e,n,r,i){i?this._context.fillText(e,n,r,i):this._context.fillText(e,n,r)}measureText(e){return this._context.measureText(e)}getImageData(e,n,r,i){return this._context.getImageData(e,n,r,i)}lineTo(e,n){this._context.lineTo(e,n)}moveTo(e,n){this._context.moveTo(e,n)}rect(e,n,r,i){this._context.rect(e,n,r,i)}roundRect(e,n,r,i,s){this._context.roundRect(e,n,r,i,s)}putImageData(e,n,r){this._context.putImageData(e,n,r)}quadraticCurveTo(e,n,r,i){this._context.quadraticCurveTo(e,n,r,i)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,n){this._context.scale(e,n)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,n,r,i,s,o){this._context.setTransform(e,n,r,i,s,o)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,n,r,i){this._context.strokeText(e,n,r,i)}transform(e,n,r,i,s,o){this._context.transform(e,n,r,i,s,o)}translate(e,n){this._context.translate(e,n)}_enableTrace(){var e=this,n=ng.length,r=this.setAttr,i,s,o=function(a){var l=e[a],c;e[a]=function(){return s=zL(Array.prototype.slice.call(arguments,0)),c=l.apply(e,arguments),e._trace({method:a,args:s}),c}};for(i=0;i<n;i++)o(ng[i]);e.setAttr=function(){r.apply(e,arguments);var a=arguments[0],l=arguments[1];(a==="shadowOffsetX"||a==="shadowOffsetY"||a==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),e._trace({property:a,val:l})}}_applyGlobalCompositeOperation(e){const n=e.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}Ur.Context=M0;ZL.forEach(function(t){Object.defineProperty(M0.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class XL extends M0{constructor(e,{willReadFrequently:n=!1}={}){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:n})}_fillColor(e){var n=e.fill();this.setAttr("fillStyle",n),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var n=e._getLinearGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fillRadialGradient(e){const n=e._getRadialGradient();n&&(this.setAttr("fillStyle",n),e._fillFunc(this))}_fill(e){const n=e.fill(),r=e.getFillPriority();if(n&&r==="color"){this._fillColor(e);return}const i=e.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(e);return}const s=e.getFillLinearGradientColorStops();if(s&&r==="linear-gradient"){this._fillLinearGradient(e);return}const o=e.getFillRadialGradientColorStops();if(o&&r==="radial-gradient"){this._fillRadialGradient(e);return}n?this._fillColor(e):i?this._fillPattern(e):s?this._fillLinearGradient(e):o&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const n=e.getStrokeLinearGradientStartPoint(),r=e.getStrokeLinearGradientEndPoint(),i=e.getStrokeLinearGradientColorStops(),s=this.createLinearGradient(n.x,n.y,r.x,r.y);if(i){for(var o=0;o<i.length;o+=2)s.addColorStop(i[o],i[o+1]);this.setAttr("strokeStyle",s)}}_stroke(e){var n=e.dash(),r=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(e),n&&e.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var s=e.getStrokeLinearGradientColorStops();s?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),r||this.restore()}}_applyShadow(e){var n,r,i,s=(n=e.getShadowRGBA())!==null&&n!==void 0?n:"black",o=(r=e.getShadowBlur())!==null&&r!==void 0?r:5,a=(i=e.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},l=e.getAbsoluteScale(),c=this.canvas.getPixelRatio(),u=l.x*c,h=l.y*c;this.setAttr("shadowColor",s),this.setAttr("shadowBlur",o*Math.min(Math.abs(u),Math.abs(h))),this.setAttr("shadowOffsetX",a.x*u),this.setAttr("shadowOffsetY",a.y*h)}}Ur.SceneContext=XL;class QL extends M0{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){const s=e.getStrokeScaleEnabled();if(!s){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(e);var r=e.hitStrokeWidth(),i=r==="auto"?e.strokeWidth():r;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),s||this.restore()}}}Ur.HitContext=QL;Object.defineProperty(or,"__esModule",{value:!0});or.HitCanvas=or.SceneCanvas=or.Canvas=void 0;const n0=jt,p8=Ur,g8=it,JL=st,eN=Ue;var ol;function tN(){if(ol)return ol;var t=n0.Util.createCanvasElement(),e=t.getContext("2d");return ol=function(){var n=g8.Konva._global.devicePixelRatio||1,r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return n/r}(),n0.Util.releaseCanvas(t),ol}class L0{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=e||{},r=n.pixelRatio||g8.Konva.pixelRatio||tN();this.pixelRatio=r,this._canvas=n0.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var n=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,n){this.setWidth(e||0),this.setHeight(n||0)}toDataURL(e,n){try{return this._canvas.toDataURL(e,n)}catch{try{return this._canvas.toDataURL()}catch(i){return n0.Util.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}or.Canvas=L0;JL.Factory.addGetterSetter(L0,"pixelRatio",void 0,(0,eN.getNumberValidator)());class nN extends L0{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new p8.SceneContext(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}}or.SceneCanvas=nN;class rN extends L0{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new p8.HitContext(this),this.setSize(e.width,e.height)}}or.HitCanvas=rN;var N0={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DD=void 0;const e=it,n=jt;t.DD={get isDragging(){var r=!1;return t.DD._dragElements.forEach(i=>{i.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return t.DD._dragElements.forEach(i=>{r=i.node}),r},_dragElements:new Map,_drag(r){const i=[];t.DD._dragElements.forEach((s,o)=>{const{node:a}=s,l=a.getStage();l.setPointersPositions(r),s.pointerId===void 0&&(s.pointerId=n.Util._getFirstPointerId(r));const c=l._changedPointerPositions.find(p=>p.id===s.pointerId);if(c){if(s.dragStatus!=="dragging"){var u=a.dragDistance(),h=Math.max(Math.abs(c.x-s.startPointerPos.x),Math.abs(c.y-s.startPointerPos.y));if(h<u||(a.startDrag({evt:r}),!a.isDragging()))return}a._setDragPosition(r,s),i.push(a)}}),i.forEach(s=>{s.fire("dragmove",{type:"dragmove",target:s,evt:r},!0)})},_endDragBefore(r){const i=[];t.DD._dragElements.forEach(s=>{const{node:o}=s,a=o.getStage();if(r&&a.setPointersPositions(r),!a._changedPointerPositions.find(u=>u.id===s.pointerId))return;(s.dragStatus==="dragging"||s.dragStatus==="stopped")&&(t.DD.justDragged=!0,e.Konva._mouseListenClick=!1,e.Konva._touchListenClick=!1,e.Konva._pointerListenClick=!1,s.dragStatus="stopped");const c=s.node.getLayer()||s.node instanceof e.Konva.Stage&&s.node;c&&i.indexOf(c)===-1&&i.push(c)}),i.forEach(s=>{s.draw()})},_endDragAfter(r){t.DD._dragElements.forEach((i,s)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:r},!0),i.dragStatus!=="dragging"&&t.DD._dragElements.delete(s)})}},e.Konva.isBrowser&&(window.addEventListener("mouseup",t.DD._endDragBefore,!0),window.addEventListener("touchend",t.DD._endDragBefore,!0),window.addEventListener("mousemove",t.DD._drag),window.addEventListener("touchmove",t.DD._drag),window.addEventListener("mouseup",t.DD._endDragAfter,!1),window.addEventListener("touchend",t.DD._endDragAfter,!1))})(N0);Object.defineProperty(Ut,"__esModule",{value:!0});Ut.Node=void 0;const lt=jt,Ca=st,Eo=or,Xr=it,Vn=N0,Kt=Ue;var El="absoluteOpacity",al="allEventListeners",Rr="absoluteTransform",rg="absoluteScale",Bi="canvas",iN="Change",sN="children",oN="konva",o1="listening",ig="mouseenter",sg="mouseleave",og="set",ag="Shape",$l=" ",lg="stage",ei="transform",aN="Stage",a1="visible",lN=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join($l);let cN=1,tt=class l1{constructor(e){this._id=cN++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===ei||e===Rr)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,n){var r=this._cache.get(e),i=e===ei||e===Rr,s=r===void 0||i&&r.dirty===!0;return s&&(r=n.call(this),this._cache.set(e,r)),r}_calculate(e,n,r){if(!this._attachedDepsListeners.get(e)){const i=n.map(s=>s+"Change.konva").join($l);this.on(i,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,r)}_getCanvasCache(){return this._cache.get(Bi)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===Rr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Bi)){const{scene:e,filter:n,hit:r}=this._cache.get(Bi);lt.Util.releaseCanvas(e,n,r),this._cache.delete(Bi)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var n=e||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var i=Math.ceil(n.width||r.width),s=Math.ceil(n.height||r.height),o=n.pixelRatio,a=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,c=n.offset||0,u=n.drawBorder||!1,h=n.hitCanvasPixelRatio||1;if(!i||!s){lt.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const p=Math.abs(Math.round(r.x)-a)>.5?1:0,d=Math.abs(Math.round(r.y)-l)>.5?1:0;i+=c*2+p,s+=c*2+d,a-=c,l-=c;var g=new Eo.SceneCanvas({pixelRatio:o,width:i,height:s}),v=new Eo.SceneCanvas({pixelRatio:o,width:0,height:0,willReadFrequently:!0}),x=new Eo.HitCanvas({pixelRatio:h,width:i,height:s}),y=g.getContext(),_=x.getContext();return x.isCache=!0,g.isCache=!0,this._cache.delete(Bi),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(g.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),y.save(),_.save(),y.translate(-a,-l),_.translate(-a,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(El),this._clearSelfAndDescendantCache(rg),this.drawScene(g,this),this.drawHit(x,this),this._isUnderCache=!1,y.restore(),_.restore(),u&&(y.save(),y.beginPath(),y.rect(0,0,i,s),y.closePath(),y.setAttr("strokeStyle","red"),y.setAttr("lineWidth",5),y.stroke(),y.restore()),this._cache.set(Bi,{scene:g,filter:v,hit:x,x:a,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Bi)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,n){var r=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],i=1/0,s=1/0,o=-1/0,a=-1/0,l=this.getAbsoluteTransform(n);return r.forEach(function(c){var u=l.point(c);i===void 0&&(i=o=u.x,s=a=u.y),i=Math.min(i,u.x),s=Math.min(s,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}),{x:i,y:s,width:o-i,height:a-s}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();e.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;e.drawImage(r._canvas,0,0,r.width/i,r.height/i),e.restore()}_drawCachedHitCanvas(e){var n=this._getCanvasCache(),r=n.hit;e.save(),e.translate(n.x,n.y),e.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,s=i.getContext(),o,a,l,c;if(e){if(!this._filterUpToDate){var u=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(o=e.length,s.clear(),s.drawImage(r._canvas,0,0,r.getWidth()/u,r.getHeight()/u),a=s.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l<o;l++){if(c=e[l],typeof c!="function"){lt.Util.error("Filter should be type of function, but got "+typeof c+" instead. Please check correct filters");continue}c.call(this,a),s.putImageData(a,0,0)}}catch(h){lt.Util.error("Unable to apply filter. "+h.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(e,n){if(this._cache&&this._cache.delete(al),arguments.length===3)return this._delegate.apply(this,arguments);var r=e.split($l),i=r.length,s,o,a,l,c;for(s=0;s<i;s++)o=r[s],a=o.split("."),l=a[0],c=a[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:c,handler:n});return this}off(e,n){var r=(e||"").split($l),i=r.length,s,o,a,l,c,u;if(this._cache&&this._cache.delete(al),!e)for(o in this.eventListeners)this._off(o);for(s=0;s<i;s++)if(a=r[s],l=a.split("."),c=l[0],u=l[1],c)this.eventListeners[c]&&this._off(c,u,n);else for(o in this.eventListeners)this._off(o,u,n);return this}dispatchEvent(e){var n={target:this,type:e.type,evt:e};return this.fire(e.type,n),this}addEventListener(e,n){return this.on(e,function(r){n.call(this,r.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,n,r){var i=this;this.on(e,function(s){for(var o=s.target.findAncestors(n,!0,i),a=0;a<o.length;a++)s=lt.Util.cloneObject(s),s.currentTarget=o[a],r.call(o[a],s)})}remove(){return this.isDragging()&&this.stopDrag(),Vn.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Rr),this._clearSelfAndDescendantCache(El),this._clearSelfAndDescendantCache(rg),this._clearSelfAndDescendantCache(lg),this._clearSelfAndDescendantCache(a1),this._clearSelfAndDescendantCache(o1)}_remove(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(e){var n="get"+lt.Util._capitalize(e);return lt.Util._isFunction(this[n])?this[n]():this.attrs[e]}getAncestors(){for(var e=this.getParent(),n=[];e;)n.push(e),e=e.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var n,r;if(!e)return this;for(n in e)n!==sN&&(r=og+lt.Util._capitalize(n),lt.Util._isFunction(this[r])?this[r](e[n]):this._setAttr(n,e[n]))}),this}isListening(){return this._getCache(o1,this._isListening)}_isListening(e){if(!this.listening())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isListening(e):!0}isVisible(){return this._getCache(a1,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const r=this.getParent();return r&&r!==e&&this!==e?r._isVisible(e):!0}shouldDrawHit(e,n=!1){if(e)return this._isVisible(e)&&this._isListening(e);var r=this.getLayer(),i=!1;Vn.DD._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(o.node.nodeType==="Stage"||o.node.getLayer()===r)&&(i=!0)});var s=!n&&!Xr.Konva.hitOnDragEnabled&&(i||Xr.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!s}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),n=this,r=0,i,s,o,a;function l(u){for(i=[],s=u.length,o=0;o<s;o++)a=u[o],r++,a.nodeType!==ag&&(i=i.concat(a.getChildren().slice())),a._id===n._id&&(o=s);i.length>0&&i[0].getDepth()<=e&&l(i)}const c=this.getStage();return n.nodeType!==aN&&c&&l(c.getChildren()),r}getDepth(){for(var e=0,n=this.parent;n;)e++,n=n.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ei),this._clearSelfAndDescendantCache(Rr)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;var n=e.getPointerPosition();if(!n)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(e){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!e&&(e=!0);var i=this.getAbsoluteTransform(e).getMatrix(),s=new lt.Transform,o=this.offset();return s.m=i.slice(),s.translate(o.x,o.y),s.getTranslation()}setAbsolutePosition(e){const{x:n,y:r,...i}=this._clearTransform();this.attrs.x=n,this.attrs.y=r,this._clearCache(ei);var s=this._getAbsoluteTransform().copy();return s.invert(),s.translate(e.x,e.y),e={x:this.attrs.x+s.getTranslation().x,y:this.attrs.y+s.getTranslation().y},this._setTransform(i),this.setPosition({x:e.x,y:e.y}),this._clearCache(ei),this._clearSelfAndDescendantCache(Rr),this}_setTransform(e){var n;for(n in e)this.attrs[n]=e[n]}_clearTransform(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){var n=e.x,r=e.y,i=this.x(),s=this.y();return n!==void 0&&(i+=n),r!==void 0&&(s+=r),this.setPosition({x:i,y:s}),this}_eachAncestorReverse(e,n){var r=[],i=this.getParent(),s,o;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(s=r.length,o=0;o<s;o++)e(r[o])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return lt.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return lt.Util.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index,n=this.parent.getChildren().length;return e<n-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return lt.Util.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return lt.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return lt.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&lt.Util.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(El,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(e*=n.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e=this.getAttrs(),n,r,i,s,o;const a={attrs:{},className:this.getClassName()};for(n in e)r=e[n],o=lt.Util.isObject(r)&&!lt.Util._isPlainObject(r)&&!lt.Util._isArray(r),!o&&(i=typeof this[n]=="function"&&this[n],delete e[n],s=i?i.call(this):null,e[n]=r,s!==r&&(a.attrs[n]=r));return lt.Util._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,n,r){var i=[];n&&this._isMatch(e)&&i.push(this);for(var s=this.parent;s;){if(s===r)return i;s._isMatch(e)&&i.push(s),s=s.parent}return i}isAncestorOf(e){return!1}findAncestor(e,n,r){return this.findAncestors(e,n,r)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);var n=e.replace(/ /g,"").split(","),r=n.length,i,s;for(i=0;i<r;i++)if(s=n[i],lt.Util.isValidSelector(s)||(lt.Util.warn('Selector "'+s+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),lt.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),lt.Util.warn("Konva is awesome, right?")),s.charAt(0)==="#"){if(this.id()===s.slice(1))return!0}else if(s.charAt(0)==="."){if(this.hasName(s.slice(1)))return!0}else if(this.className===s||this.nodeType===s)return!0;return!1}getLayer(){var e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(lg,this._getStage)}_getStage(){var e=this.getParent();return e?e.getStage():null}fire(e,n={},r){return n.target=n.target||this,r?this._fireAndBubble(e,n):this._fire(e,n),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(Rr,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var n;if(e)return n=new lt.Transform,this._eachAncestorReverse(function(i){var s=i.transformsEnabled();s==="all"?n.multiply(i.getTransform()):s==="position"&&n.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},e),n;n=this._cache.get(Rr)||new lt.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,s=this.attrs.y||0,o=this.attrs.offsetX||0,a=this.attrs.offsetY||0;n.translate(i-o,s-a)}return n.dirty=!1,n}getAbsoluteScale(e){for(var n=this;n;)n._isUnderCache&&(e=n),n=n.getParent();const i=this.getAbsoluteTransform(e).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ei,this._getTransform)}_getTransform(){var e,n,r=this._cache.get(ei)||new lt.Transform;r.reset();var i=this.x(),s=this.y(),o=Xr.Konva.getAngle(this.rotation()),a=(e=this.attrs.scaleX)!==null&&e!==void 0?e:1,l=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,c=this.attrs.skewX||0,u=this.attrs.skewY||0,h=this.attrs.offsetX||0,p=this.attrs.offsetY||0;return(i!==0||s!==0)&&r.translate(i,s),o!==0&&r.rotate(o),(c!==0||u!==0)&&r.skew(c,u),(a!==1||l!==1)&&r.scale(a,l),(h!==0||p!==0)&&r.translate(-1*h,-1*p),r.dirty=!1,r}clone(e){var n=lt.Util.cloneObject(this.attrs),r,i,s,o,a;for(r in e)n[r]=e[r];var l=new this.constructor(n);for(r in this.eventListeners)for(i=this.eventListeners[r],s=i.length,o=0;o<s;o++)a=i[o],a.name.indexOf(oN)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(a));return l}_toKonvaCanvas(e){e=e||{};var n=this.getClientRect(),r=this.getStage(),i=e.x!==void 0?e.x:Math.floor(n.x),s=e.y!==void 0?e.y:Math.floor(n.y),o=e.pixelRatio||1,a=new Eo.SceneCanvas({width:e.width||Math.ceil(n.width)||(r?r.width():0),height:e.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:o}),l=a.getContext();const c=new Eo.SceneCanvas({width:a.width/a.pixelRatio+Math.abs(i),height:a.height/a.pixelRatio+Math.abs(s),pixelRatio:a.pixelRatio});return e.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||s)&&l.translate(-1*i,-1*s),this.drawScene(a,void 0,c),l.restore(),a}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e=e||{};var n=e.mimeType||null,r=e.quality||null,i=this._toKonvaCanvas(e).toDataURL(n,r);return e.callback&&e.callback(i),i}toImage(e){return new Promise((n,r)=>{try{const i=e==null?void 0:e.callback;i&&delete e.callback,lt.Util._urlToImage(this.toDataURL(e),function(s){n(s),i==null||i(s)})}catch(i){r(i)}})}toBlob(e){return new Promise((n,r)=>{try{const i=e==null?void 0:e.callback;i&&delete e.callback,this.toCanvas(e).toBlob(s=>{n(s),i==null||i(s)},e==null?void 0:e.mimeType,e==null?void 0:e.quality)}catch(i){r(i)}})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Xr.Konva.dragDistance}_off(e,n,r){var i=this.eventListeners[e],s,o,a;for(s=0;s<i.length;s++)if(o=i[s].name,a=i[s].handler,(o!=="konva"||n==="konva")&&(!n||o===n)&&(!r||r===a)){if(i.splice(s,1),i.length===0){delete this.eventListeners[e];break}s--}}_fireChangeEvent(e,n,r){this._fire(e+iN,{oldVal:n,newVal:r})}addName(e){if(!this.hasName(e)){var n=this.name(),r=n?n+" "+e:e;this.name(r)}return this}hasName(e){if(!e)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(e)!==-1}removeName(e){var n=(this.name()||"").split(/\s/g),r=n.indexOf(e);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(e,n){var r=this[og+lt.Util._capitalize(e)];return lt.Util._isFunction(r)?r.call(this,n):this._setAttr(e,n),this}_requestDraw(){if(Xr.Konva.autoDrawEnabled){const e=this.getLayer()||this.getStage();e==null||e.batchDraw()}}_setAttr(e,n){var r=this.attrs[e];r===n&&!lt.Util.isObject(n)||(n==null?delete this.attrs[e]:this.attrs[e]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(e,r,n),this._requestDraw())}_setComponentAttr(e,n,r){var i;r!==void 0&&(i=this.attrs[e],i||(this.attrs[e]=this.getAttr(e)),this.attrs[e][n]=r,this._fireChangeEvent(e,i,r))}_fireAndBubble(e,n,r){n&&this.nodeType===ag&&(n.target=this);var i=(e===ig||e===sg)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(e,n);var s=(e===ig||e===sg)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!s&&(r&&r.parent?this._fireAndBubble.call(this.parent,e,n,r):this._fireAndBubble.call(this.parent,e,n))}}_getProtoListeners(e){var n,r,i;const s=(n=this._cache.get(al))!==null&&n!==void 0?n:{};let o=s==null?void 0:s[e];if(o===void 0){o=[];let a=Object.getPrototypeOf(this);for(;a;){const l=(i=(r=a.eventListeners)===null||r===void 0?void 0:r[e])!==null&&i!==void 0?i:[];o.push(...l),a=Object.getPrototypeOf(a)}s[e]=o,this._cache.set(al,s)}return o}_fire(e,n){n=n||{},n.currentTarget=this,n.type=e;const r=this._getProtoListeners(e);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,n);const s=this.eventListeners[e];if(s)for(var i=0;i<s.length;i++)s[i].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){var n=e?e.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition();if(r){var s=r._getPointerById(n)||r._changedPointerPositions[0]||i;Vn.DD._dragElements.set(this._id,{node:this,startPointerPos:s,offset:{x:s.x-i.x,y:s.y-i.y},dragStatus:"ready",pointerId:n})}}startDrag(e,n=!0){Vn.DD._dragElements.has(this._id)||this._createDragElement(e);const r=Vn.DD._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},n)}_setDragPosition(e,n){const r=this.getStage()._getPointerById(n.pointerId);if(r){var i={x:r.x-n.offset.x,y:r.y-n.offset.y},s=this.dragBoundFunc();if(s!==void 0){const o=s.call(this,i,e);o?i=o:lt.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(e){const n=Vn.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),Vn.DD._endDragBefore(e),Vn.DD._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=Vn.DD._dragElements.get(this._id);return e?e.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(e){var n=e.evt.button!==void 0,r=!n||Xr.Konva.dragButtons.indexOf(e.evt.button)>=0;if(r&&!this.isDragging()){var i=!1;Vn.DD._dragElements.forEach(s=>{this.isAncestorOf(s.node)&&(i=!0)}),i||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var e=this.getStage();if(!e)return;const n=Vn.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&Vn.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-e.x,y:-e.y,width:n.width()+2*e.x,height:n.height()+2*e.y};return lt.Util.haveIntersection(r,this.getClientRect())}static create(e,n){return lt.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)}static _createNode(e,n){var r=l1.prototype.getClassName.call(e),i=e.children,s,o,a;n&&(e.attrs.container=n),Xr.Konva[r]||(lt.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=Xr.Konva[r];if(s=new l(e.attrs),i)for(o=i.length,a=0;a<o;a++)s.add(l1._createNode(i[a]));return s}};Ut.Node=tt;tt.prototype.nodeType="Node";tt.prototype._attrsAffectingSize=[];tt.prototype.eventListeners={};tt.prototype.on.call(tt.prototype,lN,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ei),this._clearSelfAndDescendantCache(Rr)});tt.prototype.on.call(tt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(a1)});tt.prototype.on.call(tt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(o1)});tt.prototype.on.call(tt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(El)});const Bt=Ca.Factory.addGetterSetter;Bt(tt,"zIndex");Bt(tt,"absolutePosition");Bt(tt,"position");Bt(tt,"x",0,(0,Kt.getNumberValidator)());Bt(tt,"y",0,(0,Kt.getNumberValidator)());Bt(tt,"globalCompositeOperation","source-over",(0,Kt.getStringValidator)());Bt(tt,"opacity",1,(0,Kt.getNumberValidator)());Bt(tt,"name","",(0,Kt.getStringValidator)());Bt(tt,"id","",(0,Kt.getStringValidator)());Bt(tt,"rotation",0,(0,Kt.getNumberValidator)());Ca.Factory.addComponentsGetterSetter(tt,"scale",["x","y"]);Bt(tt,"scaleX",1,(0,Kt.getNumberValidator)());Bt(tt,"scaleY",1,(0,Kt.getNumberValidator)());Ca.Factory.addComponentsGetterSetter(tt,"skew",["x","y"]);Bt(tt,"skewX",0,(0,Kt.getNumberValidator)());Bt(tt,"skewY",0,(0,Kt.getNumberValidator)());Ca.Factory.addComponentsGetterSetter(tt,"offset",["x","y"]);Bt(tt,"offsetX",0,(0,Kt.getNumberValidator)());Bt(tt,"offsetY",0,(0,Kt.getNumberValidator)());Bt(tt,"dragDistance",null,(0,Kt.getNumberValidator)());Bt(tt,"width",0,(0,Kt.getNumberValidator)());Bt(tt,"height",0,(0,Kt.getNumberValidator)());Bt(tt,"listening",!0,(0,Kt.getBooleanValidator)());Bt(tt,"preventDefault",!0,(0,Kt.getBooleanValidator)());Bt(tt,"filters",null,function(t){return this._filterUpToDate=!1,t});Bt(tt,"visible",!0,(0,Kt.getBooleanValidator)());Bt(tt,"transformsEnabled","all",(0,Kt.getStringValidator)());Bt(tt,"size");Bt(tt,"dragBoundFunc");Bt(tt,"draggable",!1,(0,Kt.getBooleanValidator)());Ca.Factory.backCompat(tt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var rs={};Object.defineProperty(rs,"__esModule",{value:!0});rs.Container=void 0;const oo=st,Qu=Ut,U0=Ue;class is extends Qu.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(i){e(i)&&r.push(i)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(var n=0;n<e.length;n++)this.add(e[n]);return this}const r=e[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var n=this._generalFind(e,!0);return n.length>0?n[0]:void 0}_generalFind(e,n){var r=[];return this._descendants(i=>{const s=i._isMatch(e);return s&&r.push(i),!!(s&&n)}),r}_descendants(e){let n=!1;const r=this.getChildren();for(const i of r){if(n=e(i),n)return!0;if(i.hasChildren()&&(n=i._descendants(e),n))return!0}return!1}toObject(){var e=Qu.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(n=>{e.children.push(n.toObject())}),e}isAncestorOf(e){for(var n=e.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(e){var n=Qu.Node.prototype.clone.call(this,e);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(e){var n=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(e)&&n.push(r)}),n}_clearSelfAndDescendantCache(e){var n;super._clearSelfAndDescendantCache(e),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(e,n,r){var i=this.getLayer(),s=e||i&&i.getCanvas(),o=s&&s.getContext(),a=this._getCanvasCache(),l=a&&a.scene,c=s&&s.isCache;if(!this.isVisible()&&!c)return this;if(l){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",s,n,r);return this}drawHit(e,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=e||r&&r.hitCanvas,s=i&&i.getContext(),o=this._getCanvasCache(),a=o&&o.hit;if(a){s.save();var l=this.getAbsoluteTransform(n).getMatrix();s.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(s),s.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(e,n,r,i){var s,o=n&&n.getContext(),a=this.clipWidth(),l=this.clipHeight(),c=this.clipFunc(),u=typeof a=="number"&&typeof l=="number"||c;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),d=p.getMatrix();o.transform(d[0],d[1],d[2],d[3],d[4],d[5]),o.beginPath();let y;if(c)y=c.call(this,o,this);else{var g=this.clipX(),v=this.clipY();o.rect(g||0,v||0,a,l)}o.clip.apply(o,y),d=p.copy().invert().getMatrix(),o.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var x=!h&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";x&&(o.save(),o._applyGlobalCompositeOperation(this)),(s=this.children)===null||s===void 0||s.forEach(function(y){y[e](n,r,i)}),x&&o.restore(),u&&o.restore()}getClientRect(e={}){var n,r=e.skipTransform,i=e.relativeTo,s,o,a,l,c={x:1/0,y:1/0,width:0,height:0},u=this;(n=this.children)===null||n===void 0||n.forEach(function(v){if(v.visible()){var x=v.getClientRect({relativeTo:u,skipShadow:e.skipShadow,skipStroke:e.skipStroke});x.width===0&&x.height===0||(s===void 0?(s=x.x,o=x.y,a=x.x+x.width,l=x.y+x.height):(s=Math.min(s,x.x),o=Math.min(o,x.y),a=Math.max(a,x.x+x.width),l=Math.max(l,x.y+x.height)))}});for(var h=this.find("Shape"),p=!1,d=0;d<h.length;d++){var g=h[d];if(g._isVisible(this)){p=!0;break}}return p&&s!==void 0?c={x:s,y:o,width:a-s,height:l-o}:c={x:0,y:0,width:0,height:0},r?c:this._transformedRect(c,i)}}rs.Container=is;oo.Factory.addComponentsGetterSetter(is,"clip",["x","y","width","height"]);oo.Factory.addGetterSetter(is,"clipX",void 0,(0,U0.getNumberValidator)());oo.Factory.addGetterSetter(is,"clipY",void 0,(0,U0.getNumberValidator)());oo.Factory.addGetterSetter(is,"clipWidth",void 0,(0,U0.getNumberValidator)());oo.Factory.addGetterSetter(is,"clipHeight",void 0,(0,U0.getNumberValidator)());oo.Factory.addGetterSetter(is,"clipFunc");var m8={},On={};Object.defineProperty(On,"__esModule",{value:!0});On.releaseCapture=On.setPointerCapture=On.hasPointerCapture=On.createEvent=On.getCapturedShape=void 0;const uN=it,la=new Map,v8=uN.Konva._global.PointerEvent!==void 0;function dN(t){return la.get(t)}On.getCapturedShape=dN;function f2(t){return{evt:t,pointerId:t.pointerId}}On.createEvent=f2;function fN(t,e){return la.get(t)===e}On.hasPointerCapture=fN;function hN(t,e){_8(t),e.getStage()&&(la.set(t,e),v8&&e._fire("gotpointercapture",f2(new PointerEvent("gotpointercapture"))))}On.setPointerCapture=hN;function _8(t,e){const n=la.get(t);if(!n)return;const r=n.getStage();r&&r.content,la.delete(t),v8&&n._fire("lostpointercapture",f2(new PointerEvent("lostpointercapture")))}On.releaseCapture=_8;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Stage=t.stages=void 0;const e=jt,n=st,r=rs,i=it,s=or,o=N0,a=it,l=On;var c="Stage",u="string",h="px",p="mouseout",d="mouseleave",g="mouseover",v="mouseenter",x="mousemove",y="mousedown",_="mouseup",f="pointermove",b="pointerdown",w="pointerup",k="pointercancel",P="lostpointercapture",$="pointerout",D="pointerleave",S="pointerover",F="pointerenter",A="contextmenu",E="touchstart",T="touchend",L="touchmove",X="touchcancel",J="wheel",ne=5,se=[[v,"_pointerenter"],[y,"_pointerdown"],[x,"_pointermove"],[_,"_pointerup"],[d,"_pointerleave"],[E,"_pointerdown"],[L,"_pointermove"],[T,"_pointerup"],[X,"_pointercancel"],[g,"_pointerover"],[J,"_wheel"],[A,"_contextmenu"],[b,"_pointerdown"],[f,"_pointermove"],[w,"_pointerup"],[k,"_pointercancel"],[P,"_lostpointercapture"]];const ce={mouse:{[$]:p,[D]:d,[S]:g,[F]:v,[f]:x,[b]:y,[w]:_,[k]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[$]:"touchout",[D]:"touchleave",[S]:"touchover",[F]:"touchenter",[f]:L,[b]:E,[w]:T,[k]:X,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[$]:$,[D]:D,[S]:S,[F]:F,[f]:f,[b]:b,[w]:w,[k]:k,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},j=fe=>fe.indexOf("pointer")>=0?"pointer":fe.indexOf("touch")>=0?"touch":"mouse",V=fe=>{const M=j(fe);if(M==="pointer")return i.Konva.pointerEventsEnabled&&ce.pointer;if(M==="touch")return ce.touch;if(M==="mouse")return ce.mouse};function oe(fe={}){return(fe.clipFunc||fe.clipWidth||fe.clipHeight)&&e.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),fe}const N="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";t.stages=[];class Q extends r.Container{constructor(M){super(oe(M)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),t.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{oe(this.attrs)}),this._checkVisibility()}_validateAdd(M){const q=M.getType()==="Layer",ee=M.getType()==="FastLayer";q||ee||e.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const M=this.visible()?"":"none";this.content.style.display=M}setContainer(M){if(typeof M===u){if(M.charAt(0)==="."){var q=M.slice(1);M=document.getElementsByClassName(q)[0]}else{var ee;M.charAt(0)!=="#"?ee=M:ee=M.slice(1),M=document.getElementById(ee)}if(!M)throw"Can not find container in document with id "+ee}return this._setAttr("container",M),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),M.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var M=this.children,q=M.length,ee;for(ee=0;ee<q;ee++)M[ee].clear();return this}clone(M){return M||(M={}),M.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,M)}destroy(){super.destroy();var M=this.content;M&&e.Util._isInDocument(M)&&this.container().removeChild(M);var q=t.stages.indexOf(this);return q>-1&&t.stages.splice(q,1),e.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const M=this._pointerPositions[0]||this._changedPointerPositions[0];return M?{x:M.x,y:M.y}:(e.Util.warn(N),null)}_getPointerById(M){return this._pointerPositions.find(q=>q.id===M)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(M){M=M||{},M.x=M.x||0,M.y=M.y||0,M.width=M.width||this.width(),M.height=M.height||this.height();var q=new s.SceneCanvas({width:M.width,height:M.height,pixelRatio:M.pixelRatio||1}),ee=q.getContext()._context,ue=this.children;return(M.x||M.y)&&ee.translate(-1*M.x,-1*M.y),ue.forEach(function(me){if(me.isVisible()){var xe=me._toKonvaCanvas(M);ee.drawImage(xe._canvas,M.x,M.y,xe.getWidth()/xe.getPixelRatio(),xe.getHeight()/xe.getPixelRatio())}}),q}getIntersection(M){if(!M)return null;var q=this.children,ee=q.length,ue=ee-1,me;for(me=ue;me>=0;me--){const xe=q[me].getIntersection(M);if(xe)return xe}return null}_resizeDOM(){var M=this.width(),q=this.height();this.content&&(this.content.style.width=M+h,this.content.style.height=q+h),this.bufferCanvas.setSize(M,q),this.bufferHitCanvas.setSize(M,q),this.children.forEach(ee=>{ee.setSize({width:M,height:q}),ee.draw()})}add(M,...q){if(arguments.length>1){for(var ee=0;ee<arguments.length;ee++)this.add(arguments[ee]);return this}super.add(M);var ue=this.children.length;return ue>ne&&e.Util.warn("The stage has "+ue+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),M.setSize({width:this.width(),height:this.height()}),M.draw(),i.Konva.isBrowser&&this.content.appendChild(M.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(M){return l.hasPointerCapture(M,this)}setPointerCapture(M){l.setPointerCapture(M,this)}releaseCapture(M){l.releaseCapture(M,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&se.forEach(([M,q])=>{this.content.addEventListener(M,ee=>{this[q](ee)},{passive:!1})})}_pointerenter(M){this.setPointersPositions(M);const q=V(M.type);q&&this._fire(q.pointerenter,{evt:M,target:this,currentTarget:this})}_pointerover(M){this.setPointersPositions(M);const q=V(M.type);q&&this._fire(q.pointerover,{evt:M,target:this,currentTarget:this})}_getTargetShape(M){let q=this[M+"targetShape"];return q&&!q.getStage()&&(q=null),q}_pointerleave(M){const q=V(M.type),ee=j(M.type);if(q){this.setPointersPositions(M);var ue=this._getTargetShape(ee),me=!(i.Konva.isDragging()||i.Konva.isTransforming())||i.Konva.hitOnDragEnabled;ue&&me?(ue._fireAndBubble(q.pointerout,{evt:M}),ue._fireAndBubble(q.pointerleave,{evt:M}),this._fire(q.pointerleave,{evt:M,target:this,currentTarget:this}),this[ee+"targetShape"]=null):me&&(this._fire(q.pointerleave,{evt:M,target:this,currentTarget:this}),this._fire(q.pointerout,{evt:M,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(M){const q=V(M.type),ee=j(M.type);if(q){this.setPointersPositions(M);var ue=!1;this._changedPointerPositions.forEach(me=>{var xe=this.getIntersection(me);if(o.DD.justDragged=!1,i.Konva["_"+ee+"ListenClick"]=!0,!xe||!xe.isListening()){this[ee+"ClickStartShape"]=void 0;return}i.Konva.capturePointerEventsEnabled&&xe.setPointerCapture(me.id),this[ee+"ClickStartShape"]=xe,xe._fireAndBubble(q.pointerdown,{evt:M,pointerId:me.id}),ue=!0;const z=M.type.indexOf("touch")>=0;xe.preventDefault()&&M.cancelable&&z&&M.preventDefault()}),ue||this._fire(q.pointerdown,{evt:M,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(M){const q=V(M.type),ee=j(M.type);if(!q)return;i.Konva.isDragging()&&o.DD.node.preventDefault()&&M.cancelable&&M.preventDefault(),this.setPointersPositions(M);var ue=!(i.Konva.isDragging()||i.Konva.isTransforming())||i.Konva.hitOnDragEnabled;if(!ue)return;var me={};let xe=!1;var z=this._getTargetShape(ee);this._changedPointerPositions.forEach(C=>{const O=l.getCapturedShape(C.id)||this.getIntersection(C),H=C.id,I={evt:M,pointerId:H};var R=z!==O;if(R&&z&&(z._fireAndBubble(q.pointerout,{...I},O),z._fireAndBubble(q.pointerleave,{...I},O)),O){if(me[O._id])return;me[O._id]=!0}O&&O.isListening()?(xe=!0,R&&(O._fireAndBubble(q.pointerover,{...I},z),O._fireAndBubble(q.pointerenter,{...I},z),this[ee+"targetShape"]=O),O._fireAndBubble(q.pointermove,{...I})):z&&(this._fire(q.pointerover,{evt:M,target:this,currentTarget:this,pointerId:H}),this[ee+"targetShape"]=null)}),xe||this._fire(q.pointermove,{evt:M,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(M){const q=V(M.type),ee=j(M.type);if(!q)return;this.setPointersPositions(M);const ue=this[ee+"ClickStartShape"],me=this[ee+"ClickEndShape"];var xe={};let z=!1;this._changedPointerPositions.forEach(C=>{const O=l.getCapturedShape(C.id)||this.getIntersection(C);if(O){if(O.releaseCapture(C.id),xe[O._id])return;xe[O._id]=!0}const H=C.id,I={evt:M,pointerId:H};let R=!1;i.Konva["_"+ee+"InDblClickWindow"]?(R=!0,clearTimeout(this[ee+"DblTimeout"])):o.DD.justDragged||(i.Konva["_"+ee+"InDblClickWindow"]=!0,clearTimeout(this[ee+"DblTimeout"])),this[ee+"DblTimeout"]=setTimeout(function(){i.Konva["_"+ee+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),O&&O.isListening()?(z=!0,this[ee+"ClickEndShape"]=O,O._fireAndBubble(q.pointerup,{...I}),i.Konva["_"+ee+"ListenClick"]&&ue&&ue===O&&(O._fireAndBubble(q.pointerclick,{...I}),R&&me&&me===O&&O._fireAndBubble(q.pointerdblclick,{...I}))):(this[ee+"ClickEndShape"]=null,i.Konva["_"+ee+"ListenClick"]&&this._fire(q.pointerclick,{evt:M,target:this,currentTarget:this,pointerId:H}),R&&this._fire(q.pointerdblclick,{evt:M,target:this,currentTarget:this,pointerId:H}))}),z||this._fire(q.pointerup,{evt:M,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+ee+"ListenClick"]=!1,M.cancelable&&ee!=="touch"&&M.preventDefault()}_contextmenu(M){this.setPointersPositions(M);var q=this.getIntersection(this.getPointerPosition());q&&q.isListening()?q._fireAndBubble(A,{evt:M}):this._fire(A,{evt:M,target:this,currentTarget:this})}_wheel(M){this.setPointersPositions(M);var q=this.getIntersection(this.getPointerPosition());q&&q.isListening()?q._fireAndBubble(J,{evt:M}):this._fire(J,{evt:M,target:this,currentTarget:this})}_pointercancel(M){this.setPointersPositions(M);const q=l.getCapturedShape(M.pointerId)||this.getIntersection(this.getPointerPosition());q&&q._fireAndBubble(w,l.createEvent(M)),l.releaseCapture(M.pointerId)}_lostpointercapture(M){l.releaseCapture(M.pointerId)}setPointersPositions(M){var q=this._getContentPosition(),ee=null,ue=null;M=M||window.event,M.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(M.touches,me=>{this._pointerPositions.push({id:me.identifier,x:(me.clientX-q.left)/q.scaleX,y:(me.clientY-q.top)/q.scaleY})}),Array.prototype.forEach.call(M.changedTouches||M.touches,me=>{this._changedPointerPositions.push({id:me.identifier,x:(me.clientX-q.left)/q.scaleX,y:(me.clientY-q.top)/q.scaleY})})):(ee=(M.clientX-q.left)/q.scaleX,ue=(M.clientY-q.top)/q.scaleY,this.pointerPos={x:ee,y:ue},this._pointerPositions=[{x:ee,y:ue,id:e.Util._getFirstPointerId(M)}],this._changedPointerPositions=[{x:ee,y:ue,id:e.Util._getFirstPointerId(M)}])}_setPointerPosition(M){e.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(M)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var M=this.content.getBoundingClientRect();return{top:M.top,left:M.left,scaleX:M.width/this.content.clientWidth||1,scaleY:M.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new s.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var M=this.container();if(!M)throw"Stage has no container. A container is required.";M.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),M.appendChild(this.content),this._resizeDOM()}}cache(){return e.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(M){M.batchDraw()}),this}}t.Stage=Q,Q.prototype.nodeType=c,(0,a._registerNode)(Q),n.Factory.addGetterSetter(Q,"container"),i.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{t.stages.forEach(fe=>{fe.batchDraw()})})})(m8);var ka={},rn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=t.shapes=void 0;const e=it,n=jt,r=st,i=Ut,s=Ue,o=it,a=On;var l="hasShadow",c="shadowRGBA",u="patternImage",h="linearGradient",p="radialGradient";let d;function g(){return d||(d=n.Util.createCanvasElement().getContext("2d"),d)}t.shapes={};function v(D){const S=this.attrs.fillRule;S?D.fill(S):D.fill()}function x(D){D.stroke()}function y(D){const S=this.attrs.fillRule;S?D.fill(S):D.fill()}function _(D){D.stroke()}function f(){this._clearCache(l)}function b(){this._clearCache(c)}function w(){this._clearCache(u)}function k(){this._clearCache(h)}function P(){this._clearCache(p)}class $ extends i.Node{constructor(S){super(S);let F;for(;F=n.Util.getRandomColor(),!(F&&!(F in t.shapes)););this.colorKey=F,t.shapes[F]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(l,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(u,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var S=g();const F=S.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(F&&F.setTransform){const A=new n.Transform;A.translate(this.fillPatternX(),this.fillPatternY()),A.rotate(e.Konva.getAngle(this.fillPatternRotation())),A.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),A.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const E=A.getMatrix(),T=typeof DOMMatrix>"u"?{a:E[0],b:E[1],c:E[2],d:E[3],e:E[4],f:E[5]}:new DOMMatrix(E);F.setTransform(T)}return F}}_getLinearGradient(){return this._getCache(h,this.__getLinearGradient)}__getLinearGradient(){var S=this.fillLinearGradientColorStops();if(S){for(var F=g(),A=this.fillLinearGradientStartPoint(),E=this.fillLinearGradientEndPoint(),T=F.createLinearGradient(A.x,A.y,E.x,E.y),L=0;L<S.length;L+=2)T.addColorStop(S[L],S[L+1]);return T}}_getRadialGradient(){return this._getCache(p,this.__getRadialGradient)}__getRadialGradient(){var S=this.fillRadialGradientColorStops();if(S){for(var F=g(),A=this.fillRadialGradientStartPoint(),E=this.fillRadialGradientEndPoint(),T=F.createRadialGradient(A.x,A.y,this.fillRadialGradientStartRadius(),E.x,E.y,this.fillRadialGradientEndRadius()),L=0;L<S.length;L+=2)T.addColorStop(S[L],S[L+1]);return T}}getShadowRGBA(){return this._getCache(c,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var S=n.Util.colorToRGBA(this.shadowColor());if(S)return"rgba("+S.r+","+S.g+","+S.b+","+S.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const S=this.hitStrokeWidth();return S==="auto"?this.hasStroke():this.strokeEnabled()&&!!S}intersects(S){var F=this.getStage();if(!F)return!1;const A=F.bufferHitCanvas;return A.getContext().clear(),this.drawHit(A,void 0,!0),A.context.getImageData(Math.round(S.x),Math.round(S.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(S){var F;if(!((F=this.attrs.perfectDrawEnabled)!==null&&F!==void 0?F:!0))return!1;const E=S||this.hasFill(),T=this.hasStroke(),L=this.getAbsoluteOpacity()!==1;if(E&&T&&L)return!0;const X=this.hasShadow(),J=this.shadowForStrokeEnabled();return!!(E&&T&&X&&J)}setStrokeHitEnabled(S){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),S?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var S=this.size();return{x:this._centroid?-S.width/2:0,y:this._centroid?-S.height/2:0,width:S.width,height:S.height}}getClientRect(S={}){let F=!1,A=this.getParent();for(;A;){if(A.isCached()){F=!0;break}A=A.getParent()}const E=S.skipTransform,T=S.relativeTo||F&&this.getStage()||void 0,L=this.getSelfRect(),J=!S.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,ne=L.width+J,se=L.height+J,ce=!S.skipShadow&&this.hasShadow(),j=ce?this.shadowOffsetX():0,V=ce?this.shadowOffsetY():0,oe=ne+Math.abs(j),N=se+Math.abs(V),Q=ce&&this.shadowBlur()||0,fe=oe+Q*2,M=N+Q*2,q={width:fe,height:M,x:-(J/2+Q)+Math.min(j,0)+L.x,y:-(J/2+Q)+Math.min(V,0)+L.y};return E?q:this._transformedRect(q,T)}drawScene(S,F,A){var E=this.getLayer(),T=S||E.getCanvas(),L=T.getContext(),X=this._getCanvasCache(),J=this.getSceneFunc(),ne=this.hasShadow(),se,ce,j=T.isCache,V=F===this;if(!this.isVisible()&&!V)return this;if(X){L.save();var oe=this.getAbsoluteTransform(F).getMatrix();return L.transform(oe[0],oe[1],oe[2],oe[3],oe[4],oe[5]),this._drawCachedSceneCanvas(L),L.restore(),this}if(!J)return this;if(L.save(),this._useBufferCanvas()&&!j){se=this.getStage();const fe=A||se.bufferCanvas;ce=fe.getContext(),ce.clear(),ce.save(),ce._applyLineJoin(this);var N=this.getAbsoluteTransform(F).getMatrix();ce.transform(N[0],N[1],N[2],N[3],N[4],N[5]),J.call(this,ce,this),ce.restore();var Q=fe.pixelRatio;ne&&L._applyShadow(this),L._applyOpacity(this),L._applyGlobalCompositeOperation(this),L.drawImage(fe._canvas,0,0,fe.width/Q,fe.height/Q)}else{if(L._applyLineJoin(this),!V){var N=this.getAbsoluteTransform(F).getMatrix();L.transform(N[0],N[1],N[2],N[3],N[4],N[5]),L._applyOpacity(this),L._applyGlobalCompositeOperation(this)}ne&&L._applyShadow(this),J.call(this,L,this)}return L.restore(),this}drawHit(S,F,A=!1){if(!this.shouldDrawHit(F,A))return this;var E=this.getLayer(),T=S||E.hitCanvas,L=T&&T.getContext(),X=this.hitFunc()||this.sceneFunc(),J=this._getCanvasCache(),ne=J&&J.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),ne){L.save();var se=this.getAbsoluteTransform(F).getMatrix();return L.transform(se[0],se[1],se[2],se[3],se[4],se[5]),this._drawCachedHitCanvas(L),L.restore(),this}if(!X)return this;if(L.save(),L._applyLineJoin(this),!(this===F)){var j=this.getAbsoluteTransform(F).getMatrix();L.transform(j[0],j[1],j[2],j[3],j[4],j[5])}return X.call(this,L,this),L.restore(),this}drawHitFromCache(S=0){var F=this._getCanvasCache(),A=this._getCachedSceneCanvas(),E=F.hit,T=E.getContext(),L=E.getWidth(),X=E.getHeight(),J,ne,se,ce,j,V;T.clear(),T.drawImage(A._canvas,0,0,L,X);try{for(J=T.getImageData(0,0,L,X),ne=J.data,se=ne.length,ce=n.Util._hexToRgb(this.colorKey),j=0;j<se;j+=4)V=ne[j+3],V>S?(ne[j]=ce.r,ne[j+1]=ce.g,ne[j+2]=ce.b,ne[j+3]=255):ne[j+3]=0;T.putImageData(J,0,0)}catch(oe){n.Util.error("Unable to draw hit graph from cached scene canvas. "+oe.message)}return this}hasPointerCapture(S){return a.hasPointerCapture(S,this)}setPointerCapture(S){a.setPointerCapture(S,this)}releaseCapture(S){a.releaseCapture(S,this)}}t.Shape=$,$.prototype._fillFunc=v,$.prototype._strokeFunc=x,$.prototype._fillFuncHit=y,$.prototype._strokeFuncHit=_,$.prototype._centroid=!1,$.prototype.nodeType="Shape",(0,o._registerNode)($),$.prototype.eventListeners={},$.prototype.on.call($.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",f),$.prototype.on.call($.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",b),$.prototype.on.call($.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",w),$.prototype.on.call($.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",k),$.prototype.on.call($.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",P),r.Factory.addGetterSetter($,"stroke",void 0,(0,s.getStringOrGradientValidator)()),r.Factory.addGetterSetter($,"strokeWidth",2,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter($,"hitStrokeWidth","auto",(0,s.getNumberOrAutoValidator)()),r.Factory.addGetterSetter($,"strokeHitEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter($,"perfectDrawEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter($,"shadowForStrokeEnabled",!0,(0,s.getBooleanValidator)()),r.Factory.addGetterSetter($,"lineJoin"),r.Factory.addGetterSetter($,"lineCap"),r.Factory.addGetterSetter($,"sceneFunc"),r.Factory.addGetterSetter($,"hitFunc"),r.Factory.addGetterSetter($,"dash"),r.Factory.addGetterSetter($,"dashOffset",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"shadowColor",void 0,(0,s.getStringValidator)()),r.Factory.addGetterSetter($,"shadowBlur",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"shadowOpacity",1,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter($,"shadowOffset",["x","y"]),r.Factory.addGetterSetter($,"shadowOffsetX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"shadowOffsetY",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"fillPatternImage"),r.Factory.addGetterSetter($,"fill",void 0,(0,s.getStringOrGradientValidator)()),r.Factory.addGetterSetter($,"fillPatternX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"fillPatternY",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"fillLinearGradientColorStops"),r.Factory.addGetterSetter($,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter($,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter($,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter($,"fillRadialGradientColorStops"),r.Factory.addGetterSetter($,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter($,"fillEnabled",!0),r.Factory.addGetterSetter($,"strokeEnabled",!0),r.Factory.addGetterSetter($,"shadowEnabled",!0),r.Factory.addGetterSetter($,"dashEnabled",!0),r.Factory.addGetterSetter($,"strokeScaleEnabled",!0),r.Factory.addGetterSetter($,"fillPriority","color"),r.Factory.addComponentsGetterSetter($,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter($,"fillPatternOffsetX",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"fillPatternOffsetY",0,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter($,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter($,"fillPatternScaleX",1,(0,s.getNumberValidator)()),r.Factory.addGetterSetter($,"fillPatternScaleY",1,(0,s.getNumberValidator)()),r.Factory.addComponentsGetterSetter($,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter($,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter($,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter($,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter($,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter($,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter($,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter($,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter($,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter($,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter($,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter($,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter($,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter($,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter($,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter($,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter($,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter($,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter($,"fillPatternRotation",0),r.Factory.addGetterSetter($,"fillRule",void 0,(0,s.getStringValidator)()),r.Factory.backCompat($,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(rn);Object.defineProperty(ka,"__esModule",{value:!0});ka.Layer=void 0;const Fr=jt,Ju=rs,Cs=Ut,h2=st,cg=or,pN=Ue,gN=rn,mN=it;var vN="#",_N="beforeDraw",bN="draw",b8=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],xN=b8.length;class ao extends Ju.Container{constructor(e){super(e),this.canvas=new cg.SceneCanvas,this.hitCanvas=new cg.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),e<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[e+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Cs.Node.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var e=Cs.Node.prototype.moveUp.call(this);if(!e)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Cs.Node.prototype.moveDown.call(this)){var e=this.getStage();if(e){var n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Cs.Node.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var n=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return Cs.Node.prototype.remove.call(this),e&&e.parentNode&&Fr.Util._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:n}){return this.canvas.setSize(e,n),this.hitCanvas.setSize(e,n),this._setSmoothEnabled(),this}_validateAdd(e){var n=e.getType();n!=="Group"&&n!=="Shape"&&Fr.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return e=e||{},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x!==void 0?e.x:this.x(),e.y=e.y!==void 0?e.y:this.y(),Cs.Node.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Fr.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Fr.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Fr.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<xN;i++){const s=b8[i],o=this._getIntersection({x:e.x+s.x*n,y:e.y+s.y*n}),a=o.shape;if(a)return a;if(r=!!o.antialiased,!o.antialiased)break}if(r)n+=1;else return null}}_getIntersection(e){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(e.x*n),Math.round(e.y*n),1,1).data,i=r[3];if(i===255){const s=Fr.Util._rgbToHex(r[0],r[1],r[2]),o=gN.shapes[vN+s];return o?{shape:o}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(e,n){var r=this.getLayer(),i=e||r&&r.getCanvas();return this._fire(_N,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Ju.Container.prototype.drawScene.call(this,i,n),this._fire(bN,{node:this}),this}drawHit(e,n){var r=this.getLayer(),i=e||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Ju.Container.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){Fr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return Fr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return Fr.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}ka.Layer=ao;ao.prototype.nodeType="Layer";(0,mN._registerNode)(ao);h2.Factory.addGetterSetter(ao,"imageSmoothingEnabled",!0);h2.Factory.addGetterSetter(ao,"clearBeforeDraw",!0);h2.Factory.addGetterSetter(ao,"hitGraphEnabled",!0,(0,pN.getBooleanValidator)());var z0={};Object.defineProperty(z0,"__esModule",{value:!0});z0.FastLayer=void 0;const yN=jt,wN=ka,CN=it;class p2 extends wN.Layer{constructor(e){super(e),this.listening(!1),yN.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}z0.FastLayer=p2;p2.prototype.nodeType="FastLayer";(0,CN._registerNode)(p2);var lo={};Object.defineProperty(lo,"__esModule",{value:!0});lo.Group=void 0;const kN=jt,SN=rs,AN=it;class g2 extends SN.Container{_validateAdd(e){var n=e.getType();n!=="Group"&&n!=="Shape"&&kN.Util.throw("You may only add groups and shapes to groups.")}}lo.Group=g2;g2.prototype.nodeType="Group";(0,AN._registerNode)(g2);var co={};Object.defineProperty(co,"__esModule",{value:!0});co.Animation=void 0;const ed=it,ug=jt,td=function(){return ed.glob.performance&&ed.glob.performance.now?function(){return ed.glob.performance.now()}:function(){return new Date().getTime()}}();class br{constructor(e,n){this.id=br.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:td(),frameRate:0},this.func=e,this.setLayers(n)}setLayers(e){let n=[];return e&&(n=Array.isArray(e)?e:[e]),this.layers=n,this}getLayers(){return this.layers}addLayer(e){const n=this.layers,r=n.length;for(let i=0;i<r;i++)if(n[i]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){const n=br.animations,r=n.length;for(let i=0;i<r;i++)if(n[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=td(),br._addAnimation(this),this}stop(){return br._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){const n=e.id,r=this.animations,i=r.length;for(let s=0;s<i;s++)if(r[s].id===n){this.animations.splice(s,1);break}}static _runFrames(){const e={},n=this.animations;for(let r=0;r<n.length;r++){const i=n[r],s=i.layers,o=i.func;i._updateFrameObject(td());const a=s.length;let l;if(o?l=o.call(i,i.frame)!==!1:l=!0,!!l)for(let c=0;c<a;c++){const u=s[c];u._id!==void 0&&(e[u._id]=u)}}for(let r in e)e.hasOwnProperty(r)&&e[r].batchDraw()}static _animationLoop(){const e=br;e.animations.length?(e._runFrames(),ug.Util.requestAnimFrame(e._animationLoop)):e.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,ug.Util.requestAnimFrame(this._animationLoop))}}co.Animation=br;br.animations=[];br.animIdCounter=0;br.animRunning=!1;var x8={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Easings=t.Tween=void 0;const e=jt,n=co,r=Ut,i=it;var s={node:1,duration:1,easing:1,onFinish:1,yoyo:1},o=1,a=2,l=3,c=0,u=["fill","stroke","shadowColor"];class h{constructor(g,v,x,y,_,f,b){this.prop=g,this.propFunc=v,this.begin=y,this._pos=y,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=b,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=x,this._change=_-this.begin,this.pause()}fire(g){var v=this[g];v&&v()}setTime(g){g>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():g<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=g,this.update())}getTime(){return this._time}setPosition(g){this.prevPos=this._pos,this.propFunc(g),this._pos=g}getPosition(g){return g===void 0&&(g=this._time),this.func(g,this.begin,this._change,this.duration)}play(){this.state=a,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=l,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(g){this.pause(),this._time=g,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var g=this.getTimer()-this._startTime;this.state===a?this.setTime(g):this.state===l&&this.setTime(this.duration-g)}pause(){this.state=o,this.fire("onPause")}getTimer(){return new Date().getTime()}}class p{constructor(g){var v=this,x=g.node,y=x._id,_,f=g.easing||t.Easings.Linear,b=!!g.yoyo,w;typeof g.duration>"u"?_=.3:g.duration===0?_=.001:_=g.duration,this.node=x,this._id=c++;var k=x.getLayer()||(x instanceof i.Konva.Stage?x.getLayers():null);k||e.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){v.tween.onEnterFrame()},k),this.tween=new h(w,function(P){v._tweenFunc(P)},f,0,1,_*1e3,b),this._addListeners(),p.attrs[y]||(p.attrs[y]={}),p.attrs[y][this._id]||(p.attrs[y][this._id]={}),p.tweens[y]||(p.tweens[y]={});for(w in g)s[w]===void 0&&this._addAttr(w,g[w]);this.reset(),this.onFinish=g.onFinish,this.onReset=g.onReset,this.onUpdate=g.onUpdate}_addAttr(g,v){var x=this.node,y=x._id,_,f,b,w,k,P,$,D;if(b=p.tweens[y][g],b&&delete p.attrs[y][b][g],_=x.getAttr(g),e.Util._isArray(v))if(f=[],k=Math.max(v.length,_.length),g==="points"&&v.length!==_.length&&(v.length>_.length?($=_,_=e.Util._prepareArrayForTween(_,v,x.closed())):(P=v,v=e.Util._prepareArrayForTween(v,_,x.closed()))),g.indexOf("fill")===0)for(w=0;w<k;w++)if(w%2===0)f.push(v[w]-_[w]);else{var S=e.Util.colorToRGBA(_[w]);D=e.Util.colorToRGBA(v[w]),_[w]=S,f.push({r:D.r-S.r,g:D.g-S.g,b:D.b-S.b,a:D.a-S.a})}else for(w=0;w<k;w++)f.push(v[w]-_[w]);else u.indexOf(g)!==-1?(_=e.Util.colorToRGBA(_),D=e.Util.colorToRGBA(v),f={r:D.r-_.r,g:D.g-_.g,b:D.b-_.b,a:D.a-_.a}):f=v-_;p.attrs[y][this._id][g]={start:_,diff:f,end:v,trueEnd:P,trueStart:$},p.tweens[y][g]=this._id}_tweenFunc(g){var v=this.node,x=p.attrs[v._id][this._id],y,_,f,b,w,k,P,$;for(y in x){if(_=x[y],f=_.start,b=_.diff,$=_.end,e.Util._isArray(f))if(w=[],P=Math.max(f.length,$.length),y.indexOf("fill")===0)for(k=0;k<P;k++)k%2===0?w.push((f[k]||0)+b[k]*g):w.push("rgba("+Math.round(f[k].r+b[k].r*g)+","+Math.round(f[k].g+b[k].g*g)+","+Math.round(f[k].b+b[k].b*g)+","+(f[k].a+b[k].a*g)+")");else for(k=0;k<P;k++)w.push((f[k]||0)+b[k]*g);else u.indexOf(y)!==-1?w="rgba("+Math.round(f.r+b.r*g)+","+Math.round(f.g+b.g*g)+","+Math.round(f.b+b.b*g)+","+(f.a+b.a*g)+")":w=f+b*g;v.setAttr(y,w)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var g=this.node,v=p.attrs[g._id][this._id];v.points&&v.points.trueEnd&&g.setAttr("points",v.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var g=this.node,v=p.attrs[g._id][this._id];v.points&&v.points.trueStart&&g.points(v.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(g){return this.tween.seek(g*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var g=this.node._id,v=this._id,x=p.tweens[g],y;this.pause();for(y in x)delete p.tweens[g][y];delete p.attrs[g][v]}}t.Tween=p,p.attrs={},p.tweens={},r.Node.prototype.to=function(d){var g=d.onFinish;d.node=this,d.onFinish=function(){this.destroy(),g&&g()};var v=new p(d);v.play()},t.Easings={BackEaseIn(d,g,v,x){var y=1.70158;return v*(d/=x)*d*((y+1)*d-y)+g},BackEaseOut(d,g,v,x){var y=1.70158;return v*((d=d/x-1)*d*((y+1)*d+y)+1)+g},BackEaseInOut(d,g,v,x){var y=1.70158;return(d/=x/2)<1?v/2*(d*d*(((y*=1.525)+1)*d-y))+g:v/2*((d-=2)*d*(((y*=1.525)+1)*d+y)+2)+g},ElasticEaseIn(d,g,v,x,y,_){var f=0;return d===0?g:(d/=x)===1?g+v:(_||(_=x*.3),!y||y<Math.abs(v)?(y=v,f=_/4):f=_/(2*Math.PI)*Math.asin(v/y),-(y*Math.pow(2,10*(d-=1))*Math.sin((d*x-f)*(2*Math.PI)/_))+g)},ElasticEaseOut(d,g,v,x,y,_){var f=0;return d===0?g:(d/=x)===1?g+v:(_||(_=x*.3),!y||y<Math.abs(v)?(y=v,f=_/4):f=_/(2*Math.PI)*Math.asin(v/y),y*Math.pow(2,-10*d)*Math.sin((d*x-f)*(2*Math.PI)/_)+v+g)},ElasticEaseInOut(d,g,v,x,y,_){var f=0;return d===0?g:(d/=x/2)===2?g+v:(_||(_=x*(.3*1.5)),!y||y<Math.abs(v)?(y=v,f=_/4):f=_/(2*Math.PI)*Math.asin(v/y),d<1?-.5*(y*Math.pow(2,10*(d-=1))*Math.sin((d*x-f)*(2*Math.PI)/_))+g:y*Math.pow(2,-10*(d-=1))*Math.sin((d*x-f)*(2*Math.PI)/_)*.5+v+g)},BounceEaseOut(d,g,v,x){return(d/=x)<1/2.75?v*(7.5625*d*d)+g:d<2/2.75?v*(7.5625*(d-=1.5/2.75)*d+.75)+g:d<2.5/2.75?v*(7.5625*(d-=2.25/2.75)*d+.9375)+g:v*(7.5625*(d-=2.625/2.75)*d+.984375)+g},BounceEaseIn(d,g,v,x){return v-t.Easings.BounceEaseOut(x-d,0,v,x)+g},BounceEaseInOut(d,g,v,x){return d<x/2?t.Easings.BounceEaseIn(d*2,0,v,x)*.5+g:t.Easings.BounceEaseOut(d*2-x,0,v,x)*.5+v*.5+g},EaseIn(d,g,v,x){return v*(d/=x)*d+g},EaseOut(d,g,v,x){return-v*(d/=x)*(d-2)+g},EaseInOut(d,g,v,x){return(d/=x/2)<1?v/2*d*d+g:-v/2*(--d*(d-2)-1)+g},StrongEaseIn(d,g,v,x){return v*(d/=x)*d*d*d*d+g},StrongEaseOut(d,g,v,x){return v*((d=d/x-1)*d*d*d*d+1)+g},StrongEaseInOut(d,g,v,x){return(d/=x/2)<1?v/2*d*d*d*d*d+g:v/2*((d-=2)*d*d*d*d+2)+g},Linear(d,g,v,x){return v*d/x+g}}})(x8);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const e=it,n=jt,r=Ut,i=rs,s=m8,o=ka,a=z0,l=lo,c=N0,u=rn,h=co,p=x8,d=Ur,g=or;t.Konva=n.Util._assign(e.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:i.Container,Stage:s.Stage,stages:s.stages,Layer:o.Layer,FastLayer:a.FastLayer,Group:l.Group,DD:c.DD,Shape:u.Shape,shapes:u.shapes,Animation:h.Animation,Tween:p.Tween,Easings:p.Easings,Context:d.Context,Canvas:g.Canvas}),t.default=t.Konva})(f8);var j0={};Object.defineProperty(j0,"__esModule",{value:!0});j0.Arc=void 0;const H0=st,EN=rn,dg=it,V0=Ue,$N=it;class Gr extends EN.Shape{_sceneFunc(e){var n=dg.Konva.getAngle(this.angle()),r=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,n,r),e.arc(0,0,this.innerRadius(),n,0,!r),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),n=this.outerRadius(),r=this.clockwise(),i=dg.Konva.getAngle(r?360-this.angle():this.angle()),s=Math.cos(Math.min(i,Math.PI)),o=1,a=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),l=Math.sin(Math.min(i,Math.PI/2)),c=s*(s>0?e:n),u=o*n,h=a*(a>0?e:n),p=l*(l>0?n:e);return{x:c,y:r?-1*p:h,width:u-c,height:p-h}}}j0.Arc=Gr;Gr.prototype._centroid=!0;Gr.prototype.className="Arc";Gr.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,$N._registerNode)(Gr);H0.Factory.addGetterSetter(Gr,"innerRadius",0,(0,V0.getNumberValidator)());H0.Factory.addGetterSetter(Gr,"outerRadius",0,(0,V0.getNumberValidator)());H0.Factory.addGetterSetter(Gr,"angle",0,(0,V0.getNumberValidator)());H0.Factory.addGetterSetter(Gr,"clockwise",!1,(0,V0.getBooleanValidator)());var G0={},Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.Line=void 0;const W0=st,TN=rn,y8=Ue,PN=it;function c1(t,e,n,r,i,s,o){var a=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(s-r,2)),c=o*a/(a+l),u=o*l/(a+l),h=n-c*(i-t),p=r-c*(s-e),d=n+u*(i-t),g=r+u*(s-e);return[h,p,d,g]}function fg(t,e){var n=t.length,r=[],i,s;for(i=2;i<n-2;i+=2)s=c1(t[i-2],t[i-1],t[i],t[i+1],t[i+2],t[i+3],e),!isNaN(s[0])&&(r.push(s[0]),r.push(s[1]),r.push(t[i]),r.push(t[i+1]),r.push(s[2]),r.push(s[3]));return r}class Ci extends TN.Shape{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){var n=this.points(),r=n.length,i=this.tension(),s=this.closed(),o=this.bezier(),a,l,c;if(r){if(e.beginPath(),e.moveTo(n[0],n[1]),i!==0&&r>4){for(a=this.getTensionPoints(),l=a.length,c=s?0:4,s||e.quadraticCurveTo(a[0],a[1],a[2],a[3]);c<l-2;)e.bezierCurveTo(a[c++],a[c++],a[c++],a[c++],a[c++],a[c++]);s||e.quadraticCurveTo(a[l-2],a[l-1],n[r-2],n[r-1])}else if(o)for(c=2;c<r;)e.bezierCurveTo(n[c++],n[c++],n[c++],n[c++],n[c++],n[c++]);else for(c=2;c<r;c+=2)e.lineTo(n[c],n[c+1]);s?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():fg(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),n=e.length,r=this.tension(),i=c1(e[n-2],e[n-1],e[0],e[1],e[2],e[3],r),s=c1(e[n-4],e[n-3],e[n-2],e[n-1],e[0],e[1],r),o=fg(e,r),a=[i[2],i[3]].concat(o).concat([s[0],s[1],e[n-2],e[n-1],s[2],s[3],i[0],i[1],e[0],e[1]]);return a}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:e=this.points();for(var n=e[0],r=e[0],i=e[1],s=e[1],o,a,l=0;l<e.length/2;l++)o=e[l*2],a=e[l*2+1],n=Math.min(n,o),r=Math.max(r,o),i=Math.min(i,a),s=Math.max(s,a);return{x:n,y:i,width:r-n,height:s-i}}}Sa.Line=Ci;Ci.prototype.className="Line";Ci.prototype._attrsAffectingSize=["points","bezier","tension"];(0,PN._registerNode)(Ci);W0.Factory.addGetterSetter(Ci,"closed",!1);W0.Factory.addGetterSetter(Ci,"bezier",!1);W0.Factory.addGetterSetter(Ci,"tension",0,(0,y8.getNumberValidator)());W0.Factory.addGetterSetter(Ci,"points",[],(0,y8.getNumberArrayValidator)());var uo={},w8={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.t2length=t.getQuadraticArcLength=t.getCubicArcLength=t.binomialCoefficients=t.cValues=t.tValues=void 0,t.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],t.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],t.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const e=(o,a,l)=>{let c,u,h;c=l/2,u=0;for(let d=0;d<20;d++)h=c*t.tValues[20][d]+c,u+=t.cValues[20][d]*r(o,a,h);return c*u};t.getCubicArcLength=e;const n=(o,a,l)=>{l===void 0&&(l=1);const c=o[0]-2*o[1]+o[2],u=a[0]-2*a[1]+a[2],h=2*o[1]-2*o[0],p=2*a[1]-2*a[0],d=4*(c*c+u*u),g=4*(c*h+u*p),v=h*h+p*p;if(d===0)return l*Math.sqrt(Math.pow(o[2]-o[0],2)+Math.pow(a[2]-a[0],2));const x=g/(2*d),y=v/d,_=l+x,f=y-x*x,b=_*_+f>0?Math.sqrt(_*_+f):0,w=x*x+f>0?Math.sqrt(x*x+f):0,k=x+Math.sqrt(x*x+f)!==0?f*Math.log(Math.abs((_+b)/(x+w))):0;return Math.sqrt(d)/2*(_*b-x*w+k)};t.getQuadraticArcLength=n;function r(o,a,l){const c=i(1,l,o),u=i(1,l,a),h=c*c+u*u;return Math.sqrt(h)}const i=(o,a,l)=>{const c=l.length-1;let u,h;if(c===0)return 0;if(o===0){h=0;for(let p=0;p<=c;p++)h+=t.binomialCoefficients[c][p]*Math.pow(1-a,c-p)*Math.pow(a,p)*l[p];return h}else{u=new Array(c);for(let p=0;p<c;p++)u[p]=c*(l[p+1]-l[p]);return i(o-1,a,u)}},s=(o,a,l)=>{let c=1,u=o/a,h=(o-l(u))/a,p=0;for(;c>.001;){const d=l(u+h),g=Math.abs(o-d)/a;if(g<c)c=g,u+=h;else{const v=l(u-h),x=Math.abs(o-v)/a;x<c?(c=x,u-=h):h/=2}if(p++,p>500)break}return u};t.t2length=s})(w8);Object.defineProperty(uo,"__esModule",{value:!0});uo.Path=void 0;const DN=st,BN=rn,FN=it,ks=w8;class Qt extends BN.Shape{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Qt.parsePathData(this.data()),this.pathLength=Qt.getPathLength(this.dataArray)}_sceneFunc(e){var n=this.dataArray;e.beginPath();for(var r=!1,i=0;i<n.length;i++){var s=n[i].command,o=n[i].points;switch(s){case"L":e.lineTo(o[0],o[1]);break;case"M":e.moveTo(o[0],o[1]);break;case"C":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":e.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var a=o[0],l=o[1],c=o[2],u=o[3],h=o[4],p=o[5],d=o[6],g=o[7],v=c>u?c:u,x=c>u?1:c/u,y=c>u?u/c:1;e.translate(a,l),e.rotate(d),e.scale(x,y),e.arc(0,0,v,h,h+p,1-g),e.scale(1/x,1/y),e.rotate(-d),e.translate(-a,-l);break;case"z":r=!0,e.closePath();break}}!r&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach(function(c){if(c.command==="A"){var u=c.points[4],h=c.points[5],p=c.points[4]+h,d=Math.PI/180;if(Math.abs(u-p)<d&&(d=Math.abs(u-p)),h<0)for(let g=u-d;g>p;g-=d){const v=Qt.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],g,0);e.push(v.x,v.y)}else for(let g=u+d;g<p;g+=d){const v=Qt.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],g,0);e.push(v.x,v.y)}}else if(c.command==="C")for(let g=0;g<=1;g+=.01){const v=Qt.getPointOnCubicBezier(g,c.start.x,c.start.y,c.points[0],c.points[1],c.points[2],c.points[3],c.points[4],c.points[5]);e.push(v.x,v.y)}else e=e.concat(c.points)});for(var n=e[0],r=e[0],i=e[1],s=e[1],o,a,l=0;l<e.length/2;l++)o=e[l*2],a=e[l*2+1],isNaN(o)||(n=Math.min(n,o),r=Math.max(r,o)),isNaN(a)||(i=Math.min(i,a),s=Math.max(s,a));return{x:n,y:i,width:r-n,height:s-i}}getLength(){return this.pathLength}getPointAtLength(e){return Qt.getPointAtLengthOfDataArray(e,this.dataArray)}static getLineLength(e,n,r,i){return Math.sqrt((r-e)*(r-e)+(i-n)*(i-n))}static getPathLength(e){let n=0;for(var r=0;r<e.length;++r)n+=e[r].pathLength;return n}static getPointAtLengthOfDataArray(e,n){var r,i=0,s=n.length;if(!s)return null;for(;i<s&&e>n[i].pathLength;)e-=n[i].pathLength,++i;if(i===s)return r=n[i-1].points.slice(-2),{x:r[0],y:r[1]};if(e<.01)return r=n[i].points.slice(0,2),{x:r[0],y:r[1]};var o=n[i],a=o.points;switch(o.command){case"L":return Qt.getPointOnLine(e,o.start.x,o.start.y,a[0],a[1]);case"C":return Qt.getPointOnCubicBezier((0,ks.t2length)(e,Qt.getPathLength(n),v=>(0,ks.getCubicArcLength)([o.start.x,a[0],a[2],a[4]],[o.start.y,a[1],a[3],a[5]],v)),o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Qt.getPointOnQuadraticBezier((0,ks.t2length)(e,Qt.getPathLength(n),v=>(0,ks.getQuadraticArcLength)([o.start.x,a[0],a[2]],[o.start.y,a[1],a[3]],v)),o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var l=a[0],c=a[1],u=a[2],h=a[3],p=a[4],d=a[5],g=a[6];return p+=d*e/o.pathLength,Qt.getPointOnEllipticalArc(l,c,u,h,p,g)}return null}static getPointOnLine(e,n,r,i,s,o,a){o=o??n,a=a??r;const l=this.getLineLength(n,r,i,s);if(l<1e-10)return{x:n,y:r};if(i===n)return{x:o,y:a+(s>r?e:-e)};const c=(s-r)/(i-n),u=Math.sqrt(e*e/(1+c*c))*(i<n?-1:1),h=c*u;if(Math.abs(a-r-c*(o-n))<1e-10)return{x:o+u,y:a+h};const p=((o-n)*(i-n)+(a-r)*(s-r))/(l*l),d=n+p*(i-n),g=r+p*(s-r),v=this.getLineLength(o,a,d,g),x=Math.sqrt(e*e-v*v),y=Math.sqrt(x*x/(1+c*c))*(i<n?-1:1),_=c*y;return{x:d+y,y:g+_}}static getPointOnCubicBezier(e,n,r,i,s,o,a,l,c){function u(x){return x*x*x}function h(x){return 3*x*x*(1-x)}function p(x){return 3*x*(1-x)*(1-x)}function d(x){return(1-x)*(1-x)*(1-x)}var g=l*u(e)+o*h(e)+i*p(e)+n*d(e),v=c*u(e)+a*h(e)+s*p(e)+r*d(e);return{x:g,y:v}}static getPointOnQuadraticBezier(e,n,r,i,s,o,a){function l(d){return d*d}function c(d){return 2*d*(1-d)}function u(d){return(1-d)*(1-d)}var h=o*l(e)+i*c(e)+n*u(e),p=a*l(e)+s*c(e)+r*u(e);return{x:h,y:p}}static getPointOnEllipticalArc(e,n,r,i,s,o){var a=Math.cos(o),l=Math.sin(o),c={x:r*Math.cos(s),y:i*Math.sin(s)};return{x:e+(c.x*a-c.y*l),y:n+(c.x*l+c.y*a)}}static parsePathData(e){if(!e)return[];var n=e,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)n=n.replace(new RegExp(r[i],"g"),"|"+r[i]);var s=n.split("|"),o=[],a=[],l=0,c=0,u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,h;for(i=1;i<s.length;i++){var p=s[i],d=p.charAt(0);for(p=p.slice(1),a.length=0;h=u.exec(p);)a.push(h[0]);for(var g=[],v=0,x=a.length;v<x;v++){if(a[v]==="00"){g.push(0,0);continue}var y=parseFloat(a[v]);isNaN(y)?g.push(0):g.push(y)}for(;g.length>0&&!isNaN(g[0]);){var _="",f=[],b=l,w=c,k,P,$,D,S,F,A,E,T,L;switch(d){case"l":l+=g.shift(),c+=g.shift(),_="L",f.push(l,c);break;case"L":l=g.shift(),c=g.shift(),f.push(l,c);break;case"m":var X=g.shift(),J=g.shift();if(l+=X,c+=J,_="M",o.length>2&&o[o.length-1].command==="z"){for(var ne=o.length-2;ne>=0;ne--)if(o[ne].command==="M"){l=o[ne].points[0]+X,c=o[ne].points[1]+J;break}}f.push(l,c),d="l";break;case"M":l=g.shift(),c=g.shift(),_="M",f.push(l,c),d="L";break;case"h":l+=g.shift(),_="L",f.push(l,c);break;case"H":l=g.shift(),_="L",f.push(l,c);break;case"v":c+=g.shift(),_="L",f.push(l,c);break;case"V":c=g.shift(),_="L",f.push(l,c);break;case"C":f.push(g.shift(),g.shift(),g.shift(),g.shift()),l=g.shift(),c=g.shift(),f.push(l,c);break;case"c":f.push(l+g.shift(),c+g.shift(),l+g.shift(),c+g.shift()),l+=g.shift(),c+=g.shift(),_="C",f.push(l,c);break;case"S":P=l,$=c,k=o[o.length-1],k.command==="C"&&(P=l+(l-k.points[2]),$=c+(c-k.points[3])),f.push(P,$,g.shift(),g.shift()),l=g.shift(),c=g.shift(),_="C",f.push(l,c);break;case"s":P=l,$=c,k=o[o.length-1],k.command==="C"&&(P=l+(l-k.points[2]),$=c+(c-k.points[3])),f.push(P,$,l+g.shift(),c+g.shift()),l+=g.shift(),c+=g.shift(),_="C",f.push(l,c);break;case"Q":f.push(g.shift(),g.shift()),l=g.shift(),c=g.shift(),f.push(l,c);break;case"q":f.push(l+g.shift(),c+g.shift()),l+=g.shift(),c+=g.shift(),_="Q",f.push(l,c);break;case"T":P=l,$=c,k=o[o.length-1],k.command==="Q"&&(P=l+(l-k.points[0]),$=c+(c-k.points[1])),l=g.shift(),c=g.shift(),_="Q",f.push(P,$,l,c);break;case"t":P=l,$=c,k=o[o.length-1],k.command==="Q"&&(P=l+(l-k.points[0]),$=c+(c-k.points[1])),l+=g.shift(),c+=g.shift(),_="Q",f.push(P,$,l,c);break;case"A":D=g.shift(),S=g.shift(),F=g.shift(),A=g.shift(),E=g.shift(),T=l,L=c,l=g.shift(),c=g.shift(),_="A",f=this.convertEndpointToCenterParameterization(T,L,l,c,A,E,D,S,F);break;case"a":D=g.shift(),S=g.shift(),F=g.shift(),A=g.shift(),E=g.shift(),T=l,L=c,l+=g.shift(),c+=g.shift(),_="A",f=this.convertEndpointToCenterParameterization(T,L,l,c,A,E,D,S,F);break}o.push({command:_||d,points:f,start:{x:b,y:w},pathLength:this.calcLength(b,w,_||d,f)})}(d==="z"||d==="Z")&&o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(e,n,r,i){var s,o,a,l,c=Qt;switch(r){case"L":return c.getLineLength(e,n,i[0],i[1]);case"C":return(0,ks.getCubicArcLength)([e,i[0],i[2],i[4]],[n,i[1],i[3],i[5]],1);case"Q":return(0,ks.getQuadraticArcLength)([e,i[0],i[2]],[n,i[1],i[3]],1);case"A":s=0;var u=i[4],h=i[5],p=i[4]+h,d=Math.PI/180;if(Math.abs(u-p)<d&&(d=Math.abs(u-p)),o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),h<0)for(l=u-d;l>p;l-=d)a=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),s+=c.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(l=u+d;l<p;l+=d)a=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),s+=c.getLineLength(o.x,o.y,a.x,a.y),o=a;return a=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],p,0),s+=c.getLineLength(o.x,o.y,a.x,a.y),s}return 0}static convertEndpointToCenterParameterization(e,n,r,i,s,o,a,l,c){var u=c*(Math.PI/180),h=Math.cos(u)*(e-r)/2+Math.sin(u)*(n-i)/2,p=-1*Math.sin(u)*(e-r)/2+Math.cos(u)*(n-i)/2,d=h*h/(a*a)+p*p/(l*l);d>1&&(a*=Math.sqrt(d),l*=Math.sqrt(d));var g=Math.sqrt((a*a*(l*l)-a*a*(p*p)-l*l*(h*h))/(a*a*(p*p)+l*l*(h*h)));s===o&&(g*=-1),isNaN(g)&&(g=0);var v=g*a*p/l,x=g*-l*h/a,y=(e+r)/2+Math.cos(u)*v-Math.sin(u)*x,_=(n+i)/2+Math.sin(u)*v+Math.cos(u)*x,f=function(S){return Math.sqrt(S[0]*S[0]+S[1]*S[1])},b=function(S,F){return(S[0]*F[0]+S[1]*F[1])/(f(S)*f(F))},w=function(S,F){return(S[0]*F[1]<S[1]*F[0]?-1:1)*Math.acos(b(S,F))},k=w([1,0],[(h-v)/a,(p-x)/l]),P=[(h-v)/a,(p-x)/l],$=[(-1*h-v)/a,(-1*p-x)/l],D=w(P,$);return b(P,$)<=-1&&(D=Math.PI),b(P,$)>=1&&(D=0),o===0&&D>0&&(D=D-2*Math.PI),o===1&&D<0&&(D=D+2*Math.PI),[y,_,a,l,k,D,u,o]}}uo.Path=Qt;Qt.prototype.className="Path";Qt.prototype._attrsAffectingSize=["data"];(0,FN._registerNode)(Qt);DN.Factory.addGetterSetter(Qt,"data");Object.defineProperty(G0,"__esModule",{value:!0});G0.Arrow=void 0;const q0=st,IN=Sa,C8=Ue,RN=it,hg=uo;class ss extends IN.Line{_sceneFunc(e){super._sceneFunc(e);var n=Math.PI*2,r=this.points(),i=r,s=this.tension()!==0&&r.length>4;s&&(i=this.getTensionPoints());var o=this.pointerLength(),a=r.length,l,c;if(s){const p=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[a-2],r[a-1]],d=hg.Path.calcLength(i[i.length-4],i[i.length-3],"C",p),g=hg.Path.getPointOnQuadraticBezier(Math.min(1,1-o/d),p[0],p[1],p[2],p[3],p[4],p[5]);l=r[a-2]-g.x,c=r[a-1]-g.y}else l=r[a-2]-r[a-4],c=r[a-1]-r[a-3];var u=(Math.atan2(c,l)+n)%n,h=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(r[a-2],r[a-1]),e.rotate(u),e.moveTo(0,0),e.lineTo(-o,h/2),e.lineTo(-o,-h/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(r[0],r[1]),s?(l=(i[0]+i[2])/2-r[0],c=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],c=r[3]-r[1]),e.rotate((Math.atan2(-c,-l)+n)%n),e.moveTo(0,0),e.lineTo(-o,h/2),e.lineTo(-o,-h/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),n=this.pointerWidth()/2;return{x:e.x-n,y:e.y-n,width:e.width+n*2,height:e.height+n*2}}}G0.Arrow=ss;ss.prototype.className="Arrow";(0,RN._registerNode)(ss);q0.Factory.addGetterSetter(ss,"pointerLength",10,(0,C8.getNumberValidator)());q0.Factory.addGetterSetter(ss,"pointerWidth",10,(0,C8.getNumberValidator)());q0.Factory.addGetterSetter(ss,"pointerAtBeginning",!1);q0.Factory.addGetterSetter(ss,"pointerAtEnding",!0);var K0={};Object.defineProperty(K0,"__esModule",{value:!0});K0.Circle=void 0;const ON=st,MN=rn,LN=Ue,NN=it;class fo extends MN.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}K0.Circle=fo;fo.prototype._centroid=!0;fo.prototype.className="Circle";fo.prototype._attrsAffectingSize=["radius"];(0,NN._registerNode)(fo);ON.Factory.addGetterSetter(fo,"radius",0,(0,LN.getNumberValidator)());var Z0={};Object.defineProperty(Z0,"__esModule",{value:!0});Z0.Ellipse=void 0;const m2=st,UN=rn,k8=Ue,zN=it;class ki extends UN.Shape{_sceneFunc(e){var n=this.radiusX(),r=this.radiusY();e.beginPath(),e.save(),n!==r&&e.scale(1,r/n),e.arc(0,0,n,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}Z0.Ellipse=ki;ki.prototype.className="Ellipse";ki.prototype._centroid=!0;ki.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,zN._registerNode)(ki);m2.Factory.addComponentsGetterSetter(ki,"radius",["x","y"]);m2.Factory.addGetterSetter(ki,"radiusX",0,(0,k8.getNumberValidator)());m2.Factory.addGetterSetter(ki,"radiusY",0,(0,k8.getNumberValidator)());var Y0={};Object.defineProperty(Y0,"__esModule",{value:!0});Y0.Image=void 0;const nd=jt,os=st,jN=rn,HN=it,Aa=Ue;class Kn extends jN.Shape{constructor(e){super(e),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){const e=!!this.cornerRadius(),n=this.hasShadow();return e&&n?!0:super._useBufferCanvas(!0)}_sceneFunc(e){const n=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),s=this.attrs.image;let o;if(s){const a=this.attrs.cropWidth,l=this.attrs.cropHeight;a&&l?o=[s,this.cropX(),this.cropY(),a,l,0,0,n,r]:o=[s,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(e.beginPath(),i?nd.Util.drawRoundedRectPath(e,n,r,i):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)),s&&(i&&e.clip(),e.drawImage.apply(e,o))}_hitFunc(e){var n=this.width(),r=this.height(),i=this.cornerRadius();e.beginPath(),i?nd.Util.drawRoundedRectPath(e,n,r,i):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,n;return(e=this.attrs.width)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var e,n;return(e=this.attrs.height)!==null&&e!==void 0?e:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(e,n,r=null){var i=nd.Util.createImageElement();i.onload=function(){var s=new Kn({image:i});n(s)},i.onerror=r,i.crossOrigin="Anonymous",i.src=e}}Y0.Image=Kn;Kn.prototype.className="Image";(0,HN._registerNode)(Kn);os.Factory.addGetterSetter(Kn,"cornerRadius",0,(0,Aa.getNumberOrArrayOfNumbersValidator)(4));os.Factory.addGetterSetter(Kn,"image");os.Factory.addComponentsGetterSetter(Kn,"crop",["x","y","width","height"]);os.Factory.addGetterSetter(Kn,"cropX",0,(0,Aa.getNumberValidator)());os.Factory.addGetterSetter(Kn,"cropY",0,(0,Aa.getNumberValidator)());os.Factory.addGetterSetter(Kn,"cropWidth",0,(0,Aa.getNumberValidator)());os.Factory.addGetterSetter(Kn,"cropHeight",0,(0,Aa.getNumberValidator)());var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.Tag=Xs.Label=void 0;const X0=st,VN=rn,GN=lo,v2=Ue,S8=it;var A8=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],WN="Change.konva",qN="none",u1="up",d1="right",f1="down",h1="left",KN=A8.length;class _2 extends GN.Group{constructor(e){super(e),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var n=this,r,i=function(){n._sync()};for(r=0;r<KN;r++)e.on(A8[r]+WN,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),n=this.getTag(),r,i,s,o,a,l,c;if(e&&n){switch(r=e.width(),i=e.height(),s=n.pointerDirection(),o=n.pointerWidth(),c=n.pointerHeight(),a=0,l=0,s){case u1:a=r/2,l=-1*c;break;case d1:a=r+o,l=i/2;break;case f1:a=r/2,l=i+c;break;case h1:a=-1*o,l=i/2;break}n.setAttrs({x:-1*a,y:-1*l,width:r,height:i}),e.setAttrs({x:-1*a,y:-1*l})}}}Xs.Label=_2;_2.prototype.className="Label";(0,S8._registerNode)(_2);class as extends VN.Shape{_sceneFunc(e){var n=this.width(),r=this.height(),i=this.pointerDirection(),s=this.pointerWidth(),o=this.pointerHeight(),a=this.cornerRadius();let l=0,c=0,u=0,h=0;typeof a=="number"?l=c=u=h=Math.min(a,n/2,r/2):(l=Math.min(a[0]||0,n/2,r/2),c=Math.min(a[1]||0,n/2,r/2),h=Math.min(a[2]||0,n/2,r/2),u=Math.min(a[3]||0,n/2,r/2)),e.beginPath(),e.moveTo(l,0),i===u1&&(e.lineTo((n-s)/2,0),e.lineTo(n/2,-1*o),e.lineTo((n+s)/2,0)),e.lineTo(n-c,0),e.arc(n-c,c,c,Math.PI*3/2,0,!1),i===d1&&(e.lineTo(n,(r-o)/2),e.lineTo(n+s,r/2),e.lineTo(n,(r+o)/2)),e.lineTo(n,r-h),e.arc(n-h,r-h,h,0,Math.PI/2,!1),i===f1&&(e.lineTo((n+s)/2,r),e.lineTo(n/2,r+o),e.lineTo((n-s)/2,r)),e.lineTo(u,r),e.arc(u,r-u,u,Math.PI/2,Math.PI,!1),i===h1&&(e.lineTo(0,(r+o)/2),e.lineTo(-1*s,r/2),e.lineTo(0,(r-o)/2)),e.lineTo(0,l),e.arc(l,l,l,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,n=0,r=this.pointerWidth(),i=this.pointerHeight(),s=this.pointerDirection(),o=this.width(),a=this.height();return s===u1?(n-=i,a+=i):s===f1?a+=i:s===h1?(e-=r*1.5,o+=r):s===d1&&(o+=r*1.5),{x:e,y:n,width:o,height:a}}}Xs.Tag=as;as.prototype.className="Tag";(0,S8._registerNode)(as);X0.Factory.addGetterSetter(as,"pointerDirection",qN);X0.Factory.addGetterSetter(as,"pointerWidth",0,(0,v2.getNumberValidator)());X0.Factory.addGetterSetter(as,"pointerHeight",0,(0,v2.getNumberValidator)());X0.Factory.addGetterSetter(as,"cornerRadius",0,(0,v2.getNumberOrArrayOfNumbersValidator)(4));var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.Rect=void 0;const ZN=st,YN=rn,XN=it,QN=jt,JN=Ue;class Q0 extends YN.Shape{_sceneFunc(e){var n=this.cornerRadius(),r=this.width(),i=this.height();e.beginPath(),n?QN.Util.drawRoundedRectPath(e,r,i,n):e.rect(0,0,r,i),e.closePath(),e.fillStrokeShape(this)}}Ea.Rect=Q0;Q0.prototype.className="Rect";(0,XN._registerNode)(Q0);ZN.Factory.addGetterSetter(Q0,"cornerRadius",0,(0,JN.getNumberOrArrayOfNumbersValidator)(4));var J0={};Object.defineProperty(J0,"__esModule",{value:!0});J0.RegularPolygon=void 0;const E8=st,eU=rn,$8=Ue,tU=it;class ls extends eU.Shape{_sceneFunc(e){const n=this._getPoints();e.beginPath(),e.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)e.lineTo(n[r].x,n[r].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,n=this.attrs.radius||0,r=[];for(var i=0;i<e;i++)r.push({x:n*Math.sin(i*2*Math.PI/e),y:-1*n*Math.cos(i*2*Math.PI/e)});return r}getSelfRect(){const e=this._getPoints();var n=e[0].x,r=e[0].y,i=e[0].x,s=e[0].y;return e.forEach(o=>{n=Math.min(n,o.x),r=Math.max(r,o.x),i=Math.min(i,o.y),s=Math.max(s,o.y)}),{x:n,y:i,width:r-n,height:s-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}J0.RegularPolygon=ls;ls.prototype.className="RegularPolygon";ls.prototype._centroid=!0;ls.prototype._attrsAffectingSize=["radius"];(0,tU._registerNode)(ls);E8.Factory.addGetterSetter(ls,"radius",0,(0,$8.getNumberValidator)());E8.Factory.addGetterSetter(ls,"sides",0,(0,$8.getNumberValidator)());var ec={};Object.defineProperty(ec,"__esModule",{value:!0});ec.Ring=void 0;const T8=st,nU=rn,P8=Ue,rU=it;var pg=Math.PI*2;class cs extends nU.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,pg,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),pg,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}ec.Ring=cs;cs.prototype.className="Ring";cs.prototype._centroid=!0;cs.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,rU._registerNode)(cs);T8.Factory.addGetterSetter(cs,"innerRadius",0,(0,P8.getNumberValidator)());T8.Factory.addGetterSetter(cs,"outerRadius",0,(0,P8.getNumberValidator)());var tc={};Object.defineProperty(tc,"__esModule",{value:!0});tc.Sprite=void 0;const us=st,iU=rn,sU=co,D8=Ue,oU=it;class Tr extends iU.Shape{constructor(e){super(e),this._updated=!0,this.anim=new sU.Animation(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(e){var n=this.animation(),r=this.frameIndex(),i=r*4,s=this.animations()[n],o=this.frameOffsets(),a=s[i+0],l=s[i+1],c=s[i+2],u=s[i+3],h=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,c,u),e.closePath(),e.fillStrokeShape(this)),h)if(o){var p=o[n],d=r*2;e.drawImage(h,a,l,c,u,p[d+0],p[d+1],c,u)}else e.drawImage(h,a,l,c,u,0,0,c,u)}_hitFunc(e){var n=this.animation(),r=this.frameIndex(),i=r*4,s=this.animations()[n],o=this.frameOffsets(),a=s[i+2],l=s[i+3];if(e.beginPath(),o){var c=o[n],u=r*2;e.rect(c[u+0],c[u+1],a,l)}else e.rect(0,0,a,l);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],s=i.length/4;e<s-1?this.frameIndex(e+1):this.frameIndex(0)}}tc.Sprite=Tr;Tr.prototype.className="Sprite";(0,oU._registerNode)(Tr);us.Factory.addGetterSetter(Tr,"animation");us.Factory.addGetterSetter(Tr,"animations");us.Factory.addGetterSetter(Tr,"frameOffsets");us.Factory.addGetterSetter(Tr,"image");us.Factory.addGetterSetter(Tr,"frameIndex",0,(0,D8.getNumberValidator)());us.Factory.addGetterSetter(Tr,"frameRate",17,(0,D8.getNumberValidator)());us.Factory.backCompat(Tr,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var nc={};Object.defineProperty(nc,"__esModule",{value:!0});nc.Star=void 0;const b2=st,aU=rn,x2=Ue,lU=it;class Si extends aU.Shape{_sceneFunc(e){var n=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();e.beginPath(),e.moveTo(0,0-r);for(var s=1;s<i*2;s++){var o=s%2===0?r:n,a=o*Math.sin(s*Math.PI/i),l=-1*o*Math.cos(s*Math.PI/i);e.lineTo(a,l)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}nc.Star=Si;Si.prototype.className="Star";Si.prototype._centroid=!0;Si.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,lU._registerNode)(Si);b2.Factory.addGetterSetter(Si,"numPoints",5,(0,x2.getNumberValidator)());b2.Factory.addGetterSetter(Si,"innerRadius",0,(0,x2.getNumberValidator)());b2.Factory.addGetterSetter(Si,"outerRadius",0,(0,x2.getNumberValidator)());var Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.Text=Ki.stringToArray=void 0;const p1=jt,wn=st,cU=rn,rd=it,Ai=Ue,uU=it;function B8(t){return Array.from(t)}Ki.stringToArray=B8;var Ss="auto",dU="center",F8="inherit",$o="justify",fU="Change.konva",hU="2d",gg="-",I8="left",pU="text",gU="Text",mU="top",vU="bottom",mg="middle",R8="normal",_U="px ",ll=" ",bU="right",vg="rtl",xU="word",yU="char",_g="none",id="…",O8=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],wU=O8.length;function CU(t){return t.split(",").map(e=>{e=e.trim();const n=e.indexOf(" ")>=0,r=e.indexOf('"')>=0||e.indexOf("'")>=0;return n&&!r&&(e=`"${e}"`),e}).join(", ")}var cl;function sd(){return cl||(cl=p1.Util.createCanvasElement().getContext(hU),cl)}function kU(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function SU(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function AU(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}class Vt extends cU.Shape{constructor(e){super(AU(e)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<wU;n++)this.on(O8[n]+fU,this._setTextData);this._setTextData()}_sceneFunc(e){var n=this.textArr,r=n.length;if(this.text()){var i=this.padding(),s=this.fontSize(),o=this.lineHeight()*s,a=this.verticalAlign(),l=this.direction(),c=0,u=this.align(),h=this.getWidth(),p=this.letterSpacing(),d=this.fill(),g=this.textDecoration(),v=g.indexOf("underline")!==-1,x=g.indexOf("line-through")!==-1,y;l=l===F8?e.direction:l;var _=o/2,f=mg;if(rd.Konva._fixTextRendering){var b=this.measureSize("M");f="alphabetic",_=(b.fontBoundingBoxAscent-b.fontBoundingBoxDescent)/2+o/2}var w=0,k=0;for(l===vg&&e.setAttr("direction",l),e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",f),e.setAttr("textAlign",I8),a===mg?c=(this.getHeight()-r*o-i*2)/2:a===vU&&(c=this.getHeight()-r*o-i*2),e.translate(i,c+i),y=0;y<r;y++){var w=0,k=0,P=n[y],$=P.text,D=P.width,S=P.lastInParagraph,F,A,E;if(e.save(),u===bU?w+=h-D-i*2:u===dU&&(w+=(h-D-i*2)/2),v){e.save(),e.beginPath();let se=rd.Konva._fixTextRendering?Math.round(s/4):Math.round(s/2);const ce=w,j=_+k+se;e.moveTo(ce,j),F=$.split(" ").length-1,A=F===0,E=u===$o&&!S?h-i*2:D,e.lineTo(ce+Math.round(E),j),e.lineWidth=s/15;const V=this._getLinearGradient();e.strokeStyle=V||d,e.stroke(),e.restore()}if(x){e.save(),e.beginPath();let se=rd.Konva._fixTextRendering?-Math.round(s/4):0;e.moveTo(w,_+k+se),F=$.split(" ").length-1,A=F===0,E=u===$o&&S&&!A?h-i*2:D,e.lineTo(w+Math.round(E),_+k+se),e.lineWidth=s/15;const ce=this._getLinearGradient();e.strokeStyle=ce||d,e.stroke(),e.restore()}if(l!==vg&&(p!==0||u===$o)){F=$.split(" ").length-1;for(var T=B8($),L=0;L<T.length;L++){var X=T[L];X===" "&&!S&&u===$o&&(w+=(h-i*2-D)/F),this._partialTextX=w,this._partialTextY=_+k,this._partialText=X,e.fillStrokeShape(this),w+=this.measureSize(X).width+p}}else p!==0&&e.setAttr("letterSpacing",`${p}px`),this._partialTextX=w,this._partialTextY=_+k,this._partialText=$,e.fillStrokeShape(this);e.restore(),r>1&&(_+=o)}}}_hitFunc(e){var n=this.getWidth(),r=this.getHeight();e.beginPath(),e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}setText(e){var n=p1.Util._isString(e)?e:e==null?"":e+"";return this._setAttr(pU,n),this}getWidth(){var e=this.attrs.width===Ss||this.attrs.width===void 0;return e?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var e=this.attrs.height===Ss||this.attrs.height===void 0;return e?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return p1.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var n,r,i,s,o,a,l,c,u,h,p,d=sd(),g=this.fontSize(),v;d.save(),d.font=this._getContextFont(),v=d.measureText(e),d.restore();const x=g/100;return{actualBoundingBoxAscent:(n=v.actualBoundingBoxAscent)!==null&&n!==void 0?n:71.58203125*x,actualBoundingBoxDescent:(r=v.actualBoundingBoxDescent)!==null&&r!==void 0?r:0,actualBoundingBoxLeft:(i=v.actualBoundingBoxLeft)!==null&&i!==void 0?i:-7.421875*x,actualBoundingBoxRight:(s=v.actualBoundingBoxRight)!==null&&s!==void 0?s:75.732421875*x,alphabeticBaseline:(o=v.alphabeticBaseline)!==null&&o!==void 0?o:0,emHeightAscent:(a=v.emHeightAscent)!==null&&a!==void 0?a:100*x,emHeightDescent:(l=v.emHeightDescent)!==null&&l!==void 0?l:-20*x,fontBoundingBoxAscent:(c=v.fontBoundingBoxAscent)!==null&&c!==void 0?c:91*x,fontBoundingBoxDescent:(u=v.fontBoundingBoxDescent)!==null&&u!==void 0?u:21*x,hangingBaseline:(h=v.hangingBaseline)!==null&&h!==void 0?h:72.80000305175781*x,ideographicBaseline:(p=v.ideographicBaseline)!==null&&p!==void 0?p:-21*x,width:v.width,height:g}}_getContextFont(){return this.fontStyle()+ll+this.fontVariant()+ll+(this.fontSize()+_U)+CU(this.fontFamily())}_addTextLine(e){this.align()===$o&&(e=e.trim());var r=this._getTextWidth(e);return this.textArr.push({text:e,width:r,lastInParagraph:!1})}_getTextWidth(e){var n=this.letterSpacing(),r=e.length;return sd().measureText(e).width+(r?n*(r-1):0)}_setTextData(){var e=this.text().split(`
`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,s=this.attrs.width,o=this.attrs.height,a=s!==Ss&&s!==void 0,l=o!==Ss&&o!==void 0,c=this.padding(),u=s-c*2,h=o-c*2,p=0,d=this.wrap(),g=d!==_g,v=d!==yU&&g,x=this.ellipsis();this.textArr=[],sd().font=this._getContextFont();for(var y=x?this._getTextWidth(id):0,_=0,f=e.length;_<f;++_){var b=e[_],w=this._getTextWidth(b);if(a&&w>u)for(;b.length>0;){for(var k=0,P=b.length,$="",D=0;k<P;){var S=k+P>>>1,F=b.slice(0,S+1),A=this._getTextWidth(F)+y;A<=u?(k=S+1,$=F,D=A):P=S}if($){if(v){var E,T=b[$.length],L=T===ll||T===gg;L&&D<=u?E=$.length:E=Math.max($.lastIndexOf(ll),$.lastIndexOf(gg))+1,E>0&&(k=E,$=$.slice(0,k),D=this._getTextWidth($))}$=$.trimRight(),this._addTextLine($),r=Math.max(r,D),p+=i;var X=this._shouldHandleEllipsis(p);if(X){this._tryToAddEllipsisToLastLine();break}if(b=b.slice(k),b=b.trimLeft(),b.length>0&&(w=this._getTextWidth(b),w<=u)){this._addTextLine(b),p+=i,r=Math.max(r,w);break}}else break}else this._addTextLine(b),p+=i,r=Math.max(r,w),this._shouldHandleEllipsis(p)&&_<f-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),l&&p+i>h)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(e){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,s=i!==Ss&&i!==void 0,o=this.padding(),a=i-o*2,l=this.wrap(),c=l!==_g;return!c||s&&e+r>a}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,n=e!==Ss&&e!==void 0,r=this.padding(),i=e-r*2,s=this.ellipsis(),o=this.textArr[this.textArr.length-1];if(!(!o||!s)){if(n){var a=this._getTextWidth(o.text+id)<i;a||(o.text=o.text.slice(0,o.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(o.text+id)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const e=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,n=this.hasShadow();return e&&n?!0:super._useBufferCanvas()}}Ki.Text=Vt;Vt.prototype._fillFunc=kU;Vt.prototype._strokeFunc=SU;Vt.prototype.className=gU;Vt.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];(0,uU._registerNode)(Vt);wn.Factory.overWriteSetter(Vt,"width",(0,Ai.getNumberOrAutoValidator)());wn.Factory.overWriteSetter(Vt,"height",(0,Ai.getNumberOrAutoValidator)());wn.Factory.addGetterSetter(Vt,"direction",F8);wn.Factory.addGetterSetter(Vt,"fontFamily","Arial");wn.Factory.addGetterSetter(Vt,"fontSize",12,(0,Ai.getNumberValidator)());wn.Factory.addGetterSetter(Vt,"fontStyle",R8);wn.Factory.addGetterSetter(Vt,"fontVariant",R8);wn.Factory.addGetterSetter(Vt,"padding",0,(0,Ai.getNumberValidator)());wn.Factory.addGetterSetter(Vt,"align",I8);wn.Factory.addGetterSetter(Vt,"verticalAlign",mU);wn.Factory.addGetterSetter(Vt,"lineHeight",1,(0,Ai.getNumberValidator)());wn.Factory.addGetterSetter(Vt,"wrap",xU);wn.Factory.addGetterSetter(Vt,"ellipsis",!1,(0,Ai.getBooleanValidator)());wn.Factory.addGetterSetter(Vt,"letterSpacing",0,(0,Ai.getNumberValidator)());wn.Factory.addGetterSetter(Vt,"text","",(0,Ai.getStringValidator)());wn.Factory.addGetterSetter(Vt,"textDecoration","");var rc={};Object.defineProperty(rc,"__esModule",{value:!0});rc.TextPath=void 0;const od=jt,fr=st,EU=rn,To=uo,ad=Ki,M8=Ue,$U=it;var TU="",L8="normal";function N8(t){t.fillText(this.partialText,0,0)}function U8(t){t.strokeText(this.partialText,0,0)}class sn extends EU.Shape{constructor(e){super(e),this.dummyCanvas=od.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return To.Path.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;const n=this.pathLength;return e-1>n?null:To.Path.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=To.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),s=this.glyphInfo;n==="underline"&&e.beginPath();for(var o=0;o<s.length;o++){e.save();var a=s[o].p0;e.translate(a.x,a.y),e.rotate(s[o].rotation),this.partialText=s[o].text,e.fillStrokeShape(this),n==="underline"&&(o===0&&e.moveTo(0,i/2+1),e.lineTo(i,i/2+1)),e.restore()}n==="underline"&&(e.strokeStyle=r,e.lineWidth=i/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();var n=this.glyphInfo;if(n.length>=1){var r=n[0].p0;e.moveTo(r.x,r.y)}for(var i=0;i<n.length;i++){var s=n[i].p1;e.lineTo(s.x,s.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return od.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return ad.Text.prototype.setText.call(this,e)}_getContextFont(){return ad.Text.prototype._getContextFont.call(this)}_getTextSize(e){var n=this.dummyCanvas,r=n.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(e);return r.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:e,height:n}=this._getTextSize(this.attrs.text);if(this.textWidth=e,this.textHeight=n,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),i=this.align(),s=this.kerningFunc(),o=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let a=0;i==="center"&&(a=Math.max(0,this.pathLength/2-o/2)),i==="right"&&(a=Math.max(0,this.pathLength-o));const l=(0,ad.stringToArray)(this.text());let c=a;for(var u=0;u<l.length;u++){const h=this._getPointAtLength(c);if(!h)return;let p=this._getTextSize(l[u]).width+r;if(l[u]===" "&&i==="justify"){const _=this.text().split(" ").length-1;p+=(this.pathLength-o)/_}const d=this._getPointAtLength(c+p);if(!d)return;const g=To.Path.getLineLength(h.x,h.y,d.x,d.y);let v=0;if(s)try{v=s(l[u-1],l[u])*this.fontSize()}catch{v=0}h.x+=v,d.x+=v,this.textWidth+=v;const x=To.Path.getPointOnLine(v+g/2,h.x,h.y,d.x,d.y),y=Math.atan2(d.y-h.y,d.x-h.x);this.glyphInfo.push({transposeX:x.x,transposeY:x.y,text:l[u],rotation:y,p0:h,p1:d}),c+=p}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach(function(u){e.push(u.p0.x),e.push(u.p0.y),e.push(u.p1.x),e.push(u.p1.y)});for(var n=e[0]||0,r=e[0]||0,i=e[1]||0,s=e[1]||0,o,a,l=0;l<e.length/2;l++)o=e[l*2],a=e[l*2+1],n=Math.min(n,o),r=Math.max(r,o),i=Math.min(i,a),s=Math.max(s,a);var c=this.fontSize();return{x:n-c/2,y:i-c/2,width:r-n+c,height:s-i+c}}destroy(){return od.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}rc.TextPath=sn;sn.prototype._fillFunc=N8;sn.prototype._strokeFunc=U8;sn.prototype._fillFuncHit=N8;sn.prototype._strokeFuncHit=U8;sn.prototype.className="TextPath";sn.prototype._attrsAffectingSize=["text","fontSize","data"];(0,$U._registerNode)(sn);fr.Factory.addGetterSetter(sn,"data");fr.Factory.addGetterSetter(sn,"fontFamily","Arial");fr.Factory.addGetterSetter(sn,"fontSize",12,(0,M8.getNumberValidator)());fr.Factory.addGetterSetter(sn,"fontStyle",L8);fr.Factory.addGetterSetter(sn,"align","left");fr.Factory.addGetterSetter(sn,"letterSpacing",0,(0,M8.getNumberValidator)());fr.Factory.addGetterSetter(sn,"textBaseline","middle");fr.Factory.addGetterSetter(sn,"fontVariant",L8);fr.Factory.addGetterSetter(sn,"text",TU);fr.Factory.addGetterSetter(sn,"textDecoration",null);fr.Factory.addGetterSetter(sn,"kerningFunc",null);var ic={};Object.defineProperty(ic,"__esModule",{value:!0});ic.Transformer=void 0;const At=jt,wt=st,bg=Ut,PU=rn,DU=Ea,xg=lo,Qn=it,Ei=Ue,BU=it;var z8="tr-konva",FU=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${z8}`).join(" "),yg="nodesRect",IU=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],RU={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const OU="ontouchstart"in Qn.Konva._global;function MU(t,e,n){if(t==="rotater")return n;e+=At.Util.degToRad(RU[t]||0);var r=(At.Util.radToDeg(e)%360+360)%360;return At.Util._inRange(r,315+22.5,360)||At.Util._inRange(r,0,22.5)?"ns-resize":At.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":At.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":At.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":At.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":At.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":At.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":At.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(At.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var r0=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],wg=1e8;function LU(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function j8(t,e,n){const r=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),i=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:r,y:i}}function NU(t,e){const n=LU(t);return j8(t,e,n)}function UU(t,e,n){let r=e;for(let i=0;i<t.length;i++){const s=Qn.Konva.getAngle(t[i]),o=Math.abs(s-e)%(Math.PI*2);Math.min(o,Math.PI*2-o)<n&&(r=s)}return r}let g1=0;class pt extends xg.Group{constructor(e){super(e),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(FU,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return At.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return z8+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const n=e.filter(i=>i.isAncestorOf(this)?(At.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=e=n,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const s=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=i._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");i.on(o,s),i.on(IU.map(a=>a+`.${this._getEventNamespace()}`).join(" "),s),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,s),this._proxyDrag(i)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(e){let n;e.on(`dragstart.${this._getEventNamespace()}`,r=>{n=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(r,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=e.getAbsolutePosition(),s=i.x-n.x,o=i.y-n.y;this.nodes().forEach(a=>{if(a===e||a.isDragging())return;const l=a.getAbsolutePosition();a.setAbsolutePosition({x:l.x+s,y:l.y+o}),a.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(yg),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(yg,this.__getNodeRect)}__getNodeShape(e,n=this.rotation(),r){var i=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),s=e.getAbsoluteScale(r),o=e.getAbsolutePosition(r),a=i.x*s.x-e.offsetX()*s.x,l=i.y*s.y-e.offsetY()*s.y;const c=(Qn.Konva.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),u={x:o.x+a*Math.cos(c)+l*Math.sin(-c),y:o.y+l*Math.cos(c)+a*Math.sin(c),width:i.width*s.x,height:i.height*s.y,rotation:c};return j8(u,-Qn.Konva.getAngle(n),{x:0,y:0})}__getNodeRect(){var e=this.getNode();if(!e)return{x:-wg,y:-wg,width:0,height:0,rotation:0};const n=[];this.nodes().map(c=>{const u=c.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var h=[{x:u.x,y:u.y},{x:u.x+u.width,y:u.y},{x:u.x+u.width,y:u.y+u.height},{x:u.x,y:u.y+u.height}],p=c.getAbsoluteTransform();h.forEach(function(d){var g=p.point(d);n.push(g)})});const r=new At.Transform;r.rotate(-Qn.Konva.getAngle(this.rotation()));var i=1/0,s=1/0,o=-1/0,a=-1/0;n.forEach(function(c){var u=r.point(c);i===void 0&&(i=o=u.x,s=a=u.y),i=Math.min(i,u.x),s=Math.min(s,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}),r.invert();const l=r.point({x:i,y:s});return{x:l.x,y:l.y,width:o-i,height:a-s,rotation:Qn.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),r0.forEach(e=>{this._createAnchor(e)}),this._createAnchor("rotater")}_createAnchor(e){var n=new DU.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:OU?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=Qn.Konva.getAngle(this.rotation()),s=this.rotateAnchorCursor(),o=MU(e,i,s);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var e=new PU.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(n,r){var i=r.getParent(),s=i.padding();n.beginPath(),n.rect(-s,-s,r.width()+s*2,r.height()+s*2),n.moveTo(r.width()/2,-s),i.rotateEnabled()&&i.rotateLineVisible()&&n.lineTo(r.width()/2,-i.rotateAnchorOffset()*At.Util._sign(r.height())-s),n.fillStrokeShape(r)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",n=>{n.cancelBubble=!0}),e.on("dragmove",n=>{n.cancelBubble=!0}),e.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(e){if(!this._transforming){this._movingAnchorName=e.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,s=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/s),this.cos=Math.abs(r/s),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var o=e.target.getAbsolutePosition(),a=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-o.x,y:a.y-o.y},g1++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:e.evt,target:l})})}}_handleMouseMove(e){var n,r,i,s=this.findOne("."+this._movingAnchorName),o=s.getStage();o.setPointersPositions(e);const a=o.getPointerPosition();let l={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y};const c=s.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(c,l,e)),s.setAbsolutePosition(l);const u=s.getAbsolutePosition();if(!(c.x===u.x&&c.y===u.y)){if(this._movingAnchorName==="rotater"){var h=this._getNodeRect();n=s.x()-h.width/2,r=-s.y()+h.height/2;let E=Math.atan2(-r,n)+Math.PI/2;h.height<0&&(E-=Math.PI);var p=Qn.Konva.getAngle(this.rotation());const T=p+E,L=Qn.Konva.getAngle(this.rotationSnapTolerance()),J=UU(this.rotationSnaps(),T,L)-h.rotation,ne=NU(h,J);this._fitNodesInto(ne,e);return}var d=this.shiftBehavior(),g;d==="inverted"?g=this.keepRatio()&&!e.shiftKey:d==="none"?g=this.keepRatio():g=this.keepRatio()||e.shiftKey;var f=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(g){var v=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(v.x-s.x(),2)+Math.pow(v.y-s.y(),2));var x=this.findOne(".top-left").x()>v.x?-1:1,y=this.findOne(".top-left").y()>v.y?-1:1;n=i*this.cos*x,r=i*this.sin*y,this.findOne(".top-left").x(v.x-n),this.findOne(".top-left").y(v.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(s.y());else if(this._movingAnchorName==="top-right"){if(g){var v=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(s.x()-v.x,2)+Math.pow(v.y-s.y(),2));var x=this.findOne(".top-right").x()<v.x?-1:1,y=this.findOne(".top-right").y()>v.y?-1:1;n=i*this.cos*x,r=i*this.sin*y,this.findOne(".top-right").x(v.x+n),this.findOne(".top-right").y(v.y-r)}var _=s.position();this.findOne(".top-left").y(_.y),this.findOne(".bottom-right").x(_.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(s.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(s.x());else if(this._movingAnchorName==="bottom-left"){if(g){var v=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(v.x-s.x(),2)+Math.pow(s.y()-v.y,2));var x=v.x<s.x()?-1:1,y=s.y()<v.y?-1:1;n=i*this.cos*x,r=i*this.sin*y,s.x(v.x-n),s.y(v.y+r)}_=s.position(),this.findOne(".top-left").x(_.x),this.findOne(".bottom-right").y(_.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(s.y());else if(this._movingAnchorName==="bottom-right"){if(g){var v=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(s.x()-v.x,2)+Math.pow(s.y()-v.y,2));var x=this.findOne(".bottom-right").x()<v.x?-1:1,y=this.findOne(".bottom-right").y()<v.y?-1:1;n=i*this.cos*x,r=i*this.sin*y,this.findOne(".bottom-right").x(v.x+n),this.findOne(".bottom-right").y(v.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var f=this.centeredScaling()||e.altKey;if(f){var b=this.findOne(".top-left"),w=this.findOne(".bottom-right"),k=b.x(),P=b.y(),$=this.getWidth()-w.x(),D=this.getHeight()-w.y();w.move({x:-k,y:-P}),b.move({x:$,y:D})}var S=this.findOne(".top-left").getAbsolutePosition();n=S.x,r=S.y;var F=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),A=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:F,height:A,rotation:Qn.Konva.getAngle(this.rotation())},e)}}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){var n;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var r=this.getNode();g1--,this._fire("transformend",{evt:e,target:r}),(n=this.getLayer())===null||n===void 0||n.batchDraw(),r&&this._nodes.forEach(i=>{var s;i._fire("transformend",{evt:e,target:i}),(s=i.getLayer())===null||s===void 0||s.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,n){var r=this._getNodeRect();const i=1;if(At.Util._inRange(e.width,-this.padding()*2-i,i)){this.update();return}if(At.Util._inRange(e.height,-this.padding()*2-i,i)){this.update();return}var s=new At.Transform;if(s.rotate(Qn.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=s.point({x:-this.padding()*2,y:0});e.x+=p.x,e.y+=p.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=s.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.width+=this.padding()*2}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=s.point({x:0,y:-this.padding()*2});e.x+=p.x,e.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.height+=this.padding()*2}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=s.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,e.height+=this.padding()*2}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,e);p?e=p:At.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const o=1e7,a=new At.Transform;a.translate(r.x,r.y),a.rotate(r.rotation),a.scale(r.width/o,r.height/o);const l=new At.Transform,c=e.width/o,u=e.height/o;this.flipEnabled()===!1?(l.translate(e.x,e.y),l.rotate(e.rotation),l.translate(e.width<0?e.width:0,e.height<0?e.height:0),l.scale(Math.abs(c),Math.abs(u))):(l.translate(e.x,e.y),l.rotate(e.rotation),l.scale(c,u));const h=l.multiply(a.invert());this._nodes.forEach(p=>{var d;const g=p.getParent().getAbsoluteTransform(),v=p.getTransform().copy();v.translate(p.offsetX(),p.offsetY());const x=new At.Transform;x.multiply(g.copy().invert()).multiply(h).multiply(g).multiply(v);const y=x.decompose();p.setAttrs(y),(d=p.getLayer())===null||d===void 0||d.batchDraw()}),this.rotation(At.Util._getRotation(e.rotation)),this._nodes.forEach(p=>{this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,n){this.findOne(e).setAttrs(n)}update(){var e,n=this._getNodeRect();this.rotation(At.Util._getRotation(n.rotation));var r=n.width,i=n.height,s=this.enabledAnchors(),o=this.resizeEnabled(),a=this.padding(),l=this.anchorSize();const c=this.find("._anchor");c.forEach(h=>{h.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+a,offsetY:l/2+a,visible:o&&s.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+a,visible:o&&s.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-a,offsetY:l/2+a,visible:o&&s.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+a,visible:o&&s.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-a,visible:o&&s.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+a,offsetY:l/2-a,visible:o&&s.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-a,visible:o&&s.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-a,offsetY:l/2-a,visible:o&&s.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*At.Util._sign(i)-a,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const u=this.anchorStyleFunc();u&&c.forEach(h=>{u(h)}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),xg.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return bg.Node.prototype.toObject.call(this)}clone(e){var n=bg.Node.prototype.clone.call(this,e);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}ic.Transformer=pt;pt.isTransforming=()=>g1>0;function zU(t){return t instanceof Array||At.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){r0.indexOf(e)===-1&&At.Util.warn("Unknown anchor name: "+e+". Available names are: "+r0.join(", "))}),t||[]}pt.prototype.className="Transformer";(0,BU._registerNode)(pt);wt.Factory.addGetterSetter(pt,"enabledAnchors",r0,zU);wt.Factory.addGetterSetter(pt,"flipEnabled",!0,(0,Ei.getBooleanValidator)());wt.Factory.addGetterSetter(pt,"resizeEnabled",!0);wt.Factory.addGetterSetter(pt,"anchorSize",10,(0,Ei.getNumberValidator)());wt.Factory.addGetterSetter(pt,"rotateEnabled",!0);wt.Factory.addGetterSetter(pt,"rotateLineVisible",!0);wt.Factory.addGetterSetter(pt,"rotationSnaps",[]);wt.Factory.addGetterSetter(pt,"rotateAnchorOffset",50,(0,Ei.getNumberValidator)());wt.Factory.addGetterSetter(pt,"rotateAnchorCursor","crosshair");wt.Factory.addGetterSetter(pt,"rotationSnapTolerance",5,(0,Ei.getNumberValidator)());wt.Factory.addGetterSetter(pt,"borderEnabled",!0);wt.Factory.addGetterSetter(pt,"anchorStroke","rgb(0, 161, 255)");wt.Factory.addGetterSetter(pt,"anchorStrokeWidth",1,(0,Ei.getNumberValidator)());wt.Factory.addGetterSetter(pt,"anchorFill","white");wt.Factory.addGetterSetter(pt,"anchorCornerRadius",0,(0,Ei.getNumberValidator)());wt.Factory.addGetterSetter(pt,"borderStroke","rgb(0, 161, 255)");wt.Factory.addGetterSetter(pt,"borderStrokeWidth",1,(0,Ei.getNumberValidator)());wt.Factory.addGetterSetter(pt,"borderDash");wt.Factory.addGetterSetter(pt,"keepRatio",!0);wt.Factory.addGetterSetter(pt,"shiftBehavior","default");wt.Factory.addGetterSetter(pt,"centeredScaling",!1);wt.Factory.addGetterSetter(pt,"ignoreStroke",!1);wt.Factory.addGetterSetter(pt,"padding",0,(0,Ei.getNumberValidator)());wt.Factory.addGetterSetter(pt,"node");wt.Factory.addGetterSetter(pt,"nodes");wt.Factory.addGetterSetter(pt,"boundBoxFunc");wt.Factory.addGetterSetter(pt,"anchorDragBoundFunc");wt.Factory.addGetterSetter(pt,"anchorStyleFunc");wt.Factory.addGetterSetter(pt,"shouldOverdrawWholeArea",!1);wt.Factory.addGetterSetter(pt,"useSingleNodeRotation",!0);wt.Factory.backCompat(pt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var sc={};Object.defineProperty(sc,"__esModule",{value:!0});sc.Wedge=void 0;const oc=st,jU=rn,HU=it,H8=Ue,VU=it;class Wr extends jU.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,HU.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}sc.Wedge=Wr;Wr.prototype.className="Wedge";Wr.prototype._centroid=!0;Wr.prototype._attrsAffectingSize=["radius"];(0,VU._registerNode)(Wr);oc.Factory.addGetterSetter(Wr,"radius",0,(0,H8.getNumberValidator)());oc.Factory.addGetterSetter(Wr,"angle",0,(0,H8.getNumberValidator)());oc.Factory.addGetterSetter(Wr,"clockwise",!1);oc.Factory.backCompat(Wr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var ac={};Object.defineProperty(ac,"__esModule",{value:!0});ac.Blur=void 0;const Cg=st,GU=Ut,WU=Ue;function kg(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var qU=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],KU=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function ZU(t,e){var n=t.data,r=t.width,i=t.height,s,o,a,l,c,u,h,p,d,g,v,x,y,_,f,b,w,k,P,$,D,S,F,A,E=e+e+1,T=r-1,L=i-1,X=e+1,J=X*(X+1)/2,ne=new kg,se=null,ce=ne,j=null,V=null,oe=qU[e],N=KU[e];for(a=1;a<E;a++)ce=ce.next=new kg,a===X&&(se=ce);for(ce.next=ne,h=u=0,o=0;o<i;o++){for(b=w=k=P=p=d=g=v=0,x=X*($=n[u]),y=X*(D=n[u+1]),_=X*(S=n[u+2]),f=X*(F=n[u+3]),p+=J*$,d+=J*D,g+=J*S,v+=J*F,ce=ne,a=0;a<X;a++)ce.r=$,ce.g=D,ce.b=S,ce.a=F,ce=ce.next;for(a=1;a<X;a++)l=u+((T<a?T:a)<<2),p+=(ce.r=$=n[l])*(A=X-a),d+=(ce.g=D=n[l+1])*A,g+=(ce.b=S=n[l+2])*A,v+=(ce.a=F=n[l+3])*A,b+=$,w+=D,k+=S,P+=F,ce=ce.next;for(j=ne,V=se,s=0;s<r;s++)n[u+3]=F=v*oe>>N,F!==0?(F=255/F,n[u]=(p*oe>>N)*F,n[u+1]=(d*oe>>N)*F,n[u+2]=(g*oe>>N)*F):n[u]=n[u+1]=n[u+2]=0,p-=x,d-=y,g-=_,v-=f,x-=j.r,y-=j.g,_-=j.b,f-=j.a,l=h+((l=s+e+1)<T?l:T)<<2,b+=j.r=n[l],w+=j.g=n[l+1],k+=j.b=n[l+2],P+=j.a=n[l+3],p+=b,d+=w,g+=k,v+=P,j=j.next,x+=$=V.r,y+=D=V.g,_+=S=V.b,f+=F=V.a,b-=$,w-=D,k-=S,P-=F,V=V.next,u+=4;h+=r}for(s=0;s<r;s++){for(w=k=P=b=d=g=v=p=0,u=s<<2,x=X*($=n[u]),y=X*(D=n[u+1]),_=X*(S=n[u+2]),f=X*(F=n[u+3]),p+=J*$,d+=J*D,g+=J*S,v+=J*F,ce=ne,a=0;a<X;a++)ce.r=$,ce.g=D,ce.b=S,ce.a=F,ce=ce.next;for(c=r,a=1;a<=e;a++)u=c+s<<2,p+=(ce.r=$=n[u])*(A=X-a),d+=(ce.g=D=n[u+1])*A,g+=(ce.b=S=n[u+2])*A,v+=(ce.a=F=n[u+3])*A,b+=$,w+=D,k+=S,P+=F,ce=ce.next,a<L&&(c+=r);for(u=s,j=ne,V=se,o=0;o<i;o++)l=u<<2,n[l+3]=F=v*oe>>N,F>0?(F=255/F,n[l]=(p*oe>>N)*F,n[l+1]=(d*oe>>N)*F,n[l+2]=(g*oe>>N)*F):n[l]=n[l+1]=n[l+2]=0,p-=x,d-=y,g-=_,v-=f,x-=j.r,y-=j.g,_-=j.b,f-=j.a,l=s+((l=o+X)<L?l:L)*r<<2,p+=b+=j.r=n[l],d+=w+=j.g=n[l+1],g+=k+=j.b=n[l+2],v+=P+=j.a=n[l+3],j=j.next,x+=$=V.r,y+=D=V.g,_+=S=V.b,f+=F=V.a,b-=$,w-=D,k-=S,P-=F,V=V.next,u+=r}}const YU=function(e){var n=Math.round(this.blurRadius());n>0&&ZU(e,n)};ac.Blur=YU;Cg.Factory.addGetterSetter(GU.Node,"blurRadius",0,(0,WU.getNumberValidator)(),Cg.Factory.afterSetFilter);var lc={};Object.defineProperty(lc,"__esModule",{value:!0});lc.Brighten=void 0;const Sg=st,XU=Ut,QU=Ue,JU=function(t){var e=this.brightness()*255,n=t.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=e,n[i+1]+=e,n[i+2]+=e};lc.Brighten=JU;Sg.Factory.addGetterSetter(XU.Node,"brightness",0,(0,QU.getNumberValidator)(),Sg.Factory.afterSetFilter);var cc={};Object.defineProperty(cc,"__esModule",{value:!0});cc.Contrast=void 0;const Ag=st,ez=Ut,tz=Ue,nz=function(t){var e=Math.pow((this.contrast()+100)/100,2),n=t.data,r=n.length,i=150,s=150,o=150,a;for(a=0;a<r;a+=4)i=n[a],s=n[a+1],o=n[a+2],i/=255,i-=.5,i*=e,i+=.5,i*=255,s/=255,s-=.5,s*=e,s+=.5,s*=255,o/=255,o-=.5,o*=e,o+=.5,o*=255,i=i<0?0:i>255?255:i,s=s<0?0:s>255?255:s,o=o<0?0:o>255?255:o,n[a]=i,n[a+1]=s,n[a+2]=o};cc.Contrast=nz;Ag.Factory.addGetterSetter(ez.Node,"contrast",0,(0,tz.getNumberValidator)(),Ag.Factory.afterSetFilter);var uc={};Object.defineProperty(uc,"__esModule",{value:!0});uc.Emboss=void 0;const mi=st,dc=Ut,rz=jt,V8=Ue,iz=function(t){var e=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),s=0,o=0,a=t.data,l=t.width,c=t.height,u=l*4,h=c;switch(r){case"top-left":s=-1,o=-1;break;case"top":s=-1,o=0;break;case"top-right":s=-1,o=1;break;case"right":s=0,o=1;break;case"bottom-right":s=1,o=1;break;case"bottom":s=1,o=0;break;case"bottom-left":s=1,o=-1;break;case"left":s=0,o=-1;break;default:rz.Util.error("Unknown emboss direction: "+r)}do{var p=(h-1)*u,d=s;h+d<1&&(d=0),h+d>c&&(d=0);var g=(h-1+d)*l*4,v=l;do{var x=p+(v-1)*4,y=o;v+y<1&&(y=0),v+y>l&&(y=0);var _=g+(v-1+y)*4,f=a[x]-a[_],b=a[x+1]-a[_+1],w=a[x+2]-a[_+2],k=f,P=k>0?k:-k,$=b>0?b:-b,D=w>0?w:-w;if($>P&&(k=b),D>P&&(k=w),k*=e,i){var S=a[x]+k,F=a[x+1]+k,A=a[x+2]+k;a[x]=S>255?255:S<0?0:S,a[x+1]=F>255?255:F<0?0:F,a[x+2]=A>255?255:A<0?0:A}else{var E=n-k;E<0?E=0:E>255&&(E=255),a[x]=a[x+1]=a[x+2]=E}}while(--v)}while(--h)};uc.Emboss=iz;mi.Factory.addGetterSetter(dc.Node,"embossStrength",.5,(0,V8.getNumberValidator)(),mi.Factory.afterSetFilter);mi.Factory.addGetterSetter(dc.Node,"embossWhiteLevel",.5,(0,V8.getNumberValidator)(),mi.Factory.afterSetFilter);mi.Factory.addGetterSetter(dc.Node,"embossDirection","top-left",null,mi.Factory.afterSetFilter);mi.Factory.addGetterSetter(dc.Node,"embossBlend",!1,null,mi.Factory.afterSetFilter);var fc={};Object.defineProperty(fc,"__esModule",{value:!0});fc.Enhance=void 0;const Eg=st,sz=Ut,oz=Ue;function ld(t,e,n,r,i){var s=n-e,o=i-r,a;return s===0?r+o/2:o===0?r:(a=(t-e)/s,a=o*a+r,a)}const az=function(t){var e=t.data,n=e.length,r=e[0],i=r,s,o=e[1],a=o,l,c=e[2],u=c,h,p,d=this.enhance();if(d!==0){for(p=0;p<n;p+=4)s=e[p+0],s<r?r=s:s>i&&(i=s),l=e[p+1],l<o?o=l:l>a&&(a=l),h=e[p+2],h<c?c=h:h>u&&(u=h);i===r&&(i=255,r=0),a===o&&(a=255,o=0),u===c&&(u=255,c=0);var g,v,x,y,_,f,b,w,k;for(d>0?(v=i+d*(255-i),x=r-d*(r-0),_=a+d*(255-a),f=o-d*(o-0),w=u+d*(255-u),k=c-d*(c-0)):(g=(i+r)*.5,v=i+d*(i-g),x=r+d*(r-g),y=(a+o)*.5,_=a+d*(a-y),f=o+d*(o-y),b=(u+c)*.5,w=u+d*(u-b),k=c+d*(c-b)),p=0;p<n;p+=4)e[p+0]=ld(e[p+0],r,i,x,v),e[p+1]=ld(e[p+1],o,a,f,_),e[p+2]=ld(e[p+2],c,u,k,w)}};fc.Enhance=az;Eg.Factory.addGetterSetter(sz.Node,"enhance",0,(0,oz.getNumberValidator)(),Eg.Factory.afterSetFilter);var hc={};Object.defineProperty(hc,"__esModule",{value:!0});hc.Grayscale=void 0;const lz=function(t){var e=t.data,n=e.length,r,i;for(r=0;r<n;r+=4)i=.34*e[r]+.5*e[r+1]+.16*e[r+2],e[r]=i,e[r+1]=i,e[r+2]=i};hc.Grayscale=lz;var pc={};Object.defineProperty(pc,"__esModule",{value:!0});pc.HSL=void 0;const Qs=st,y2=Ut,w2=Ue;Qs.Factory.addGetterSetter(y2.Node,"hue",0,(0,w2.getNumberValidator)(),Qs.Factory.afterSetFilter);Qs.Factory.addGetterSetter(y2.Node,"saturation",0,(0,w2.getNumberValidator)(),Qs.Factory.afterSetFilter);Qs.Factory.addGetterSetter(y2.Node,"luminance",0,(0,w2.getNumberValidator)(),Qs.Factory.afterSetFilter);const cz=function(t){var e=t.data,n=e.length,r=1,i=Math.pow(2,this.saturation()),s=Math.abs(this.hue()+360)%360,o=this.luminance()*127,a,l=r*i*Math.cos(s*Math.PI/180),c=r*i*Math.sin(s*Math.PI/180),u=.299*r+.701*l+.167*c,h=.587*r-.587*l+.33*c,p=.114*r-.114*l-.497*c,d=.299*r-.299*l-.328*c,g=.587*r+.413*l+.035*c,v=.114*r-.114*l+.293*c,x=.299*r-.3*l+1.25*c,y=.587*r-.586*l-1.05*c,_=.114*r+.886*l-.2*c,f,b,w,k;for(a=0;a<n;a+=4)f=e[a+0],b=e[a+1],w=e[a+2],k=e[a+3],e[a+0]=u*f+h*b+p*w+o,e[a+1]=d*f+g*b+v*w+o,e[a+2]=x*f+y*b+_*w+o,e[a+3]=k};pc.HSL=cz;var gc={};Object.defineProperty(gc,"__esModule",{value:!0});gc.HSV=void 0;const Js=st,C2=Ut,k2=Ue,uz=function(t){var e=t.data,n=e.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),s=Math.abs(this.hue()+360)%360,o,a=r*i*Math.cos(s*Math.PI/180),l=r*i*Math.sin(s*Math.PI/180),c=.299*r+.701*a+.167*l,u=.587*r-.587*a+.33*l,h=.114*r-.114*a-.497*l,p=.299*r-.299*a-.328*l,d=.587*r+.413*a+.035*l,g=.114*r-.114*a+.293*l,v=.299*r-.3*a+1.25*l,x=.587*r-.586*a-1.05*l,y=.114*r+.886*a-.2*l,_,f,b,w;for(o=0;o<n;o+=4)_=e[o+0],f=e[o+1],b=e[o+2],w=e[o+3],e[o+0]=c*_+u*f+h*b,e[o+1]=p*_+d*f+g*b,e[o+2]=v*_+x*f+y*b,e[o+3]=w};gc.HSV=uz;Js.Factory.addGetterSetter(C2.Node,"hue",0,(0,k2.getNumberValidator)(),Js.Factory.afterSetFilter);Js.Factory.addGetterSetter(C2.Node,"saturation",0,(0,k2.getNumberValidator)(),Js.Factory.afterSetFilter);Js.Factory.addGetterSetter(C2.Node,"value",0,(0,k2.getNumberValidator)(),Js.Factory.afterSetFilter);var mc={};Object.defineProperty(mc,"__esModule",{value:!0});mc.Invert=void 0;const dz=function(t){var e=t.data,n=e.length,r;for(r=0;r<n;r+=4)e[r]=255-e[r],e[r+1]=255-e[r+1],e[r+2]=255-e[r+2]};mc.Invert=dz;var vc={};Object.defineProperty(vc,"__esModule",{value:!0});vc.Kaleidoscope=void 0;const i0=st,G8=Ut,$g=jt,W8=Ue;var fz=function(t,e,n){var r=t.data,i=e.data,s=t.width,o=t.height,a=n.polarCenterX||s/2,l=n.polarCenterY||o/2,c,u,h,p=0,d=0,g=0,v=0,x,y=Math.sqrt(a*a+l*l);u=s-a,h=o-l,x=Math.sqrt(u*u+h*h),y=x>y?x:y;var _=o,f=s,b,w,k=360/f*Math.PI/180,P,$;for(w=0;w<f;w+=1)for(P=Math.sin(w*k),$=Math.cos(w*k),b=0;b<_;b+=1)u=Math.floor(a+y*b/_*$),h=Math.floor(l+y*b/_*P),c=(h*s+u)*4,p=r[c+0],d=r[c+1],g=r[c+2],v=r[c+3],c=(w+b*s)*4,i[c+0]=p,i[c+1]=d,i[c+2]=g,i[c+3]=v},hz=function(t,e,n){var r=t.data,i=e.data,s=t.width,o=t.height,a=n.polarCenterX||s/2,l=n.polarCenterY||o/2,c,u,h,p,d,g=0,v=0,x=0,y=0,_,f=Math.sqrt(a*a+l*l);u=s-a,h=o-l,_=Math.sqrt(u*u+h*h),f=_>f?_:f;var b=o,w=s,k,P,$=0,D,S;for(u=0;u<s;u+=1)for(h=0;h<o;h+=1)p=u-a,d=h-l,k=Math.sqrt(p*p+d*d)*b/f,P=(Math.atan2(d,p)*180/Math.PI+360+$)%360,P=P*w/360,D=Math.floor(P),S=Math.floor(k),c=(S*s+D)*4,g=r[c+0],v=r[c+1],x=r[c+2],y=r[c+3],c=(h*s+u)*4,i[c+0]=g,i[c+1]=v,i[c+2]=x,i[c+3]=y};const pz=function(t){var e=t.width,n=t.height,r,i,s,o,a,l,c,u,h,p,d=Math.round(this.kaleidoscopePower()),g=Math.round(this.kaleidoscopeAngle()),v=Math.floor(e*(g%360)/360);if(!(d<1)){var x=$g.Util.createCanvasElement();x.width=e,x.height=n;var y=x.getContext("2d").getImageData(0,0,e,n);$g.Util.releaseCanvas(x),fz(t,y,{polarCenterX:e/2,polarCenterY:n/2});for(var _=e/Math.pow(2,d);_<=8;)_=_*2,d-=1;_=Math.ceil(_);var f=_,b=0,w=f,k=1;for(v+_>e&&(b=f,w=0,k=-1),i=0;i<n;i+=1)for(r=b;r!==w;r+=k)s=Math.round(r+v)%e,h=(e*i+s)*4,a=y.data[h+0],l=y.data[h+1],c=y.data[h+2],u=y.data[h+3],p=(e*i+r)*4,y.data[p+0]=a,y.data[p+1]=l,y.data[p+2]=c,y.data[p+3]=u;for(i=0;i<n;i+=1)for(f=Math.floor(_),o=0;o<d;o+=1){for(r=0;r<f+1;r+=1)h=(e*i+r)*4,a=y.data[h+0],l=y.data[h+1],c=y.data[h+2],u=y.data[h+3],p=(e*i+f*2-r-1)*4,y.data[p+0]=a,y.data[p+1]=l,y.data[p+2]=c,y.data[p+3]=u;f*=2}hz(y,t,{polarRotation:0})}};vc.Kaleidoscope=pz;i0.Factory.addGetterSetter(G8.Node,"kaleidoscopePower",2,(0,W8.getNumberValidator)(),i0.Factory.afterSetFilter);i0.Factory.addGetterSetter(G8.Node,"kaleidoscopeAngle",0,(0,W8.getNumberValidator)(),i0.Factory.afterSetFilter);var _c={};Object.defineProperty(_c,"__esModule",{value:!0});_c.Mask=void 0;const Tg=st,gz=Ut,mz=Ue;function ul(t,e,n){var r=(n*t.width+e)*4,i=[];return i.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),i}function Po(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function vz(t){for(var e=[0,0,0],n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function _z(t,e){var n=ul(t,0,0),r=ul(t,t.width-1,0),i=ul(t,0,t.height-1),s=ul(t,t.width-1,t.height-1),o=e||10;if(Po(n,r)<o&&Po(r,s)<o&&Po(s,i)<o&&Po(i,n)<o){for(var a=vz([r,n,s,i]),l=[],c=0;c<t.width*t.height;c++){var u=Po(a,[t.data[c*4],t.data[c*4+1],t.data[c*4+2]]);l[c]=u<o?0:255}return l}}function bz(t,e){for(var n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}function xz(t,e,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),o=[],a=0;a<n;a++)for(var l=0;l<e;l++){for(var c=a*e+l,u=0,h=0;h<i;h++)for(var p=0;p<i;p++){var d=a+h-s,g=l+p-s;if(d>=0&&d<n&&g>=0&&g<e){var v=d*e+g,x=r[h*i+p];u+=t[v]*x}}o[c]=u===255*8?255:0}return o}function yz(t,e,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),o=[],a=0;a<n;a++)for(var l=0;l<e;l++){for(var c=a*e+l,u=0,h=0;h<i;h++)for(var p=0;p<i;p++){var d=a+h-s,g=l+p-s;if(d>=0&&d<n&&g>=0&&g<e){var v=d*e+g,x=r[h*i+p];u+=t[v]*x}}o[c]=u>=255*4?255:0}return o}function wz(t,e,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),s=Math.floor(i/2),o=[],a=0;a<n;a++)for(var l=0;l<e;l++){for(var c=a*e+l,u=0,h=0;h<i;h++)for(var p=0;p<i;p++){var d=a+h-s,g=l+p-s;if(d>=0&&d<n&&g>=0&&g<e){var v=d*e+g,x=r[h*i+p];u+=t[v]*x}}o[c]=u}return o}const Cz=function(t){var e=this.threshold(),n=_z(t,e);return n&&(n=xz(n,t.width,t.height),n=yz(n,t.width,t.height),n=wz(n,t.width,t.height),bz(t,n)),t};_c.Mask=Cz;Tg.Factory.addGetterSetter(gz.Node,"threshold",0,(0,mz.getNumberValidator)(),Tg.Factory.afterSetFilter);var bc={};Object.defineProperty(bc,"__esModule",{value:!0});bc.Noise=void 0;const Pg=st,kz=Ut,Sz=Ue,Az=function(t){var e=this.noise()*255,n=t.data,r=n.length,i=e/2,s;for(s=0;s<r;s+=4)n[s+0]+=i-2*i*Math.random(),n[s+1]+=i-2*i*Math.random(),n[s+2]+=i-2*i*Math.random()};bc.Noise=Az;Pg.Factory.addGetterSetter(kz.Node,"noise",.2,(0,Sz.getNumberValidator)(),Pg.Factory.afterSetFilter);var xc={};Object.defineProperty(xc,"__esModule",{value:!0});xc.Pixelate=void 0;const Dg=st,Ez=jt,$z=Ut,Tz=Ue,Pz=function(t){var e=Math.ceil(this.pixelSize()),n=t.width,r=t.height,i,s,o,a,l,c,u,h=Math.ceil(n/e),p=Math.ceil(r/e),d,g,v,x,y,_,f,b=t.data;if(e<=0){Ez.Util.error("pixelSize value can not be <= 0");return}for(y=0;y<h;y+=1)for(_=0;_<p;_+=1){for(a=0,l=0,c=0,u=0,d=y*e,g=d+e,v=_*e,x=v+e,f=0,i=d;i<g;i+=1)if(!(i>=n))for(s=v;s<x;s+=1)s>=r||(o=(n*s+i)*4,a+=b[o+0],l+=b[o+1],c+=b[o+2],u+=b[o+3],f+=1);for(a=a/f,l=l/f,c=c/f,u=u/f,i=d;i<g;i+=1)if(!(i>=n))for(s=v;s<x;s+=1)s>=r||(o=(n*s+i)*4,b[o+0]=a,b[o+1]=l,b[o+2]=c,b[o+3]=u)}};xc.Pixelate=Pz;Dg.Factory.addGetterSetter($z.Node,"pixelSize",8,(0,Tz.getNumberValidator)(),Dg.Factory.afterSetFilter);var yc={};Object.defineProperty(yc,"__esModule",{value:!0});yc.Posterize=void 0;const Bg=st,Dz=Ut,Bz=Ue,Fz=function(t){var e=Math.round(this.levels()*254)+1,n=t.data,r=n.length,i=255/e,s;for(s=0;s<r;s+=1)n[s]=Math.floor(n[s]/i)*i};yc.Posterize=Fz;Bg.Factory.addGetterSetter(Dz.Node,"levels",.5,(0,Bz.getNumberValidator)(),Bg.Factory.afterSetFilter);var wc={};Object.defineProperty(wc,"__esModule",{value:!0});wc.RGB=void 0;const s0=st,S2=Ut,Iz=Ue,Rz=function(t){var e=t.data,n=e.length,r=this.red(),i=this.green(),s=this.blue(),o,a;for(o=0;o<n;o+=4)a=(.34*e[o]+.5*e[o+1]+.16*e[o+2])/255,e[o]=a*r,e[o+1]=a*i,e[o+2]=a*s,e[o+3]=e[o+3]};wc.RGB=Rz;s0.Factory.addGetterSetter(S2.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});s0.Factory.addGetterSetter(S2.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});s0.Factory.addGetterSetter(S2.Node,"blue",0,Iz.RGBComponent,s0.Factory.afterSetFilter);var Cc={};Object.defineProperty(Cc,"__esModule",{value:!0});Cc.RGBA=void 0;const ca=st,kc=Ut,Oz=Ue,Mz=function(t){var e=t.data,n=e.length,r=this.red(),i=this.green(),s=this.blue(),o=this.alpha(),a,l;for(a=0;a<n;a+=4)l=1-o,e[a]=r*o+e[a]*l,e[a+1]=i*o+e[a+1]*l,e[a+2]=s*o+e[a+2]*l};Cc.RGBA=Mz;ca.Factory.addGetterSetter(kc.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ca.Factory.addGetterSetter(kc.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});ca.Factory.addGetterSetter(kc.Node,"blue",0,Oz.RGBComponent,ca.Factory.afterSetFilter);ca.Factory.addGetterSetter(kc.Node,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});var Sc={};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.Sepia=void 0;const Lz=function(t){var e=t.data,n=e.length,r,i,s,o;for(r=0;r<n;r+=4)i=e[r+0],s=e[r+1],o=e[r+2],e[r+0]=Math.min(255,i*.393+s*.769+o*.189),e[r+1]=Math.min(255,i*.349+s*.686+o*.168),e[r+2]=Math.min(255,i*.272+s*.534+o*.131)};Sc.Sepia=Lz;var Ac={};Object.defineProperty(Ac,"__esModule",{value:!0});Ac.Solarize=void 0;const Nz=function(t){var e=t.data,n=t.width,r=t.height,i=n*4,s=r;do{var o=(s-1)*i,a=n;do{var l=o+(a-1)*4,c=e[l],u=e[l+1],h=e[l+2];c>127&&(c=255-c),u>127&&(u=255-u),h>127&&(h=255-h),e[l]=c,e[l+1]=u,e[l+2]=h}while(--a)}while(--s)};Ac.Solarize=Nz;var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.Threshold=void 0;const Fg=st,Uz=Ut,zz=Ue,jz=function(t){var e=this.threshold()*255,n=t.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<e?0:255};Ec.Threshold=jz;Fg.Factory.addGetterSetter(Uz.Node,"threshold",.5,(0,zz.getNumberValidator)(),Fg.Factory.afterSetFilter);Object.defineProperty(O0,"__esModule",{value:!0});O0.Konva=void 0;const Ig=f8,Hz=j0,Vz=G0,Gz=K0,Wz=Z0,qz=Y0,Rg=Xs,Kz=Sa,Zz=uo,Yz=Ea,Xz=J0,Qz=ec,Jz=tc,ej=nc,tj=Ki,nj=rc,rj=ic,ij=sc,sj=ac,oj=lc,aj=cc,lj=uc,cj=fc,uj=hc,dj=pc,fj=gc,hj=mc,pj=vc,gj=_c,mj=bc,vj=xc,_j=yc,bj=wc,xj=Cc,yj=Sc,wj=Ac,Cj=Ec;O0.Konva=Ig.Konva.Util._assign(Ig.Konva,{Arc:Hz.Arc,Arrow:Vz.Arrow,Circle:Gz.Circle,Ellipse:Wz.Ellipse,Image:qz.Image,Label:Rg.Label,Tag:Rg.Tag,Line:Kz.Line,Path:Zz.Path,Rect:Yz.Rect,RegularPolygon:Xz.RegularPolygon,Ring:Qz.Ring,Sprite:Jz.Sprite,Star:ej.Star,Text:tj.Text,TextPath:nj.TextPath,Transformer:rj.Transformer,Wedge:ij.Wedge,Filters:{Blur:sj.Blur,Brighten:oj.Brighten,Contrast:aj.Contrast,Emboss:lj.Emboss,Enhance:cj.Enhance,Grayscale:uj.Grayscale,HSL:dj.HSL,HSV:fj.HSV,Invert:hj.Invert,Kaleidoscope:pj.Kaleidoscope,Mask:gj.Mask,Noise:mj.Noise,Pixelate:vj.Pixelate,Posterize:_j.Posterize,RGB:bj.RGB,RGBA:xj.RGBA,Sepia:yj.Sepia,Solarize:wj.Solarize,Threshold:Cj.Threshold}});var kj=d2.exports;Object.defineProperty(kj,"__esModule",{value:!0});const Sj=O0;d2.exports=Sj.Konva;var Aj=d2.exports;const Lt=k0(Aj);function o0(t){if(!Lt.autoDrawEnabled){const e=t.getLayer()||t.getStage();e&&e.batchDraw()}}const Og={key:!0,style:!0,elm:!0,isRootInsert:!0},cd=".vue-konva-event";function q8(t,e,n,r){const i=t.__konvaNode,s={};let o=!1;for(let a in n){if(Og.hasOwnProperty(a))continue;const l=a.slice(0,2)==="on",c=n[a]!==e[a];if(l&&c){let u=a.slice(2).toLowerCase();u.slice(0,7)==="content"&&(u="content"+u.slice(7,1).toUpperCase()+u.slice(8)),i==null||i.off(u+cd,n[a])}!e.hasOwnProperty(a)&&(i==null||i.setAttr(a,void 0))}for(let a in e){if(Og.hasOwnProperty(a))continue;let l=a.slice(0,2)==="on";const c=n[a]!==e[a];if(l&&c){let u=a.slice(2).toLowerCase();u.slice(0,7)==="content"&&(u="content"+u.slice(7,1).toUpperCase()+u.slice(8)),e[a]&&(i==null||i.off(u+cd),i==null||i.on(u+cd,e[a]))}!l&&(e[a]!==n[a]||r&&e[a]!==(i==null?void 0:i.getAttr(a)))&&(o=!0,s[a]=e[a])}o&&i&&(i.setAttrs(s),o0(i))}const Ej="v";function $j(t){function e(n){return n!=null&&n.__konvaNode?n:n!=null&&n.parent?e(n.parent):(console.error("vue-konva error: Can not find parent node"),null)}return e(t.parent)}function K8(t){return t.component?t.component.__konvaNode||K8(t.component.subTree):null}function Tj(t){const{el:e,component:n}=t,r=K8(t);if(e!=null&&e.tagName&&n&&!r){const i=e.tagName.toLowerCase();return console.error(`vue-konva error: You are trying to render "${i}" inside your component tree. Looks like it is not a Konva node. You can render only Konva components inside the Stage.`),null}return r}function Pj(t){const e=i=>!!(i!=null&&i.hasOwnProperty("component")),n=i=>Array.isArray(i),r=i=>e(i)?[i,...r(i.children)]:n(i)?i.flatMap(r):[];return r(t.children)}function Z8(t,e){const n=Pj(t),r=[];n.forEach(s=>{const o=Tj(s);o&&r.push(o)});let i=!1;r.forEach((s,o)=>{s.getZIndex()!==o&&(s.setZIndex(o),i=!0)}),i&&o0(e)}const Dj=Ae({name:"Stage",props:{config:{type:Object,default:function(){return{}}},__useStrictMode:{type:Boolean}},inheritAttrs:!1,setup(t,{attrs:e,slots:n,expose:r}){const i=Ct();if(!i)return;const s=Pt({}),o=re(null),a=new Lt.Stage({width:t.config.width,height:t.config.height,container:document.createElement("div")});i.__konvaNode=a,u();function l(){return i==null?void 0:i.__konvaNode}function c(){return i==null?void 0:i.__konvaNode}function u(){if(!i)return;const h=s||{},p={...e,...t.config};q8(i,p,h,t.__useStrictMode),Object.assign(s,p)}return ut(()=>{o.value&&(o.value.innerHTML="",a.container(o.value)),u()}),ha(()=>{u(),Z8(i.subTree,a)}),Nn(()=>{a.destroy()}),at(()=>t.config,u,{deep:!0}),r({getStage:c,getNode:l}),()=>{var h;return Zt("div",{ref:o},(h=n.default)==null?void 0:h.call(n))}}}),Bj=".vue-konva-event",Fj={Group:!0,Layer:!0,FastLayer:!0,Label:!0};function Ij(t,e){return Ae({name:t,props:{config:{type:Object,default:function(){return{}}},__useStrictMode:{type:Boolean}},setup(n,{attrs:r,slots:i,expose:s}){const o=Ct();if(!o)return;const a=Pt({}),l=new e;o.__konvaNode=l,o.vnode.__konvaNode=l,h();function c(){return o==null?void 0:o.__konvaNode}function u(){return o==null?void 0:o.__konvaNode}function h(){if(!o)return;const d={};for(const x in o==null?void 0:o.vnode.props)x.slice(0,2)==="on"&&(d[x]=o.vnode.props[x]);const g=a||{},v={...r,...n.config,...d};q8(o,v,g,n.__useStrictMode),Object.assign(a,v)}ut(()=>{var d;const g=(d=$j(o))==null?void 0:d.__konvaNode;g&&"add"in g&&g.add(l),o0(l)}),bi(()=>{o0(l),l.destroy(),l.off(Bj)}),ha(()=>{h(),Z8(o.subTree,l)}),at(()=>n.config,h,{deep:!0}),s({getStage:u,getNode:c});const p=Fj.hasOwnProperty(t);return()=>{var d;return p?Zt("template",{},(d=i.default)==null?void 0:d.call(i)):null}}})}typeof window<"u"&&!window.Konva&&require("konva");const Rj={install:(t,e)=>{const n=(e==null?void 0:e.prefix)||Ej,r={Arc:Lt.Arc,Arrow:Lt.Arrow,Circle:Lt.Circle,Ellipse:Lt.Ellipse,FastLayer:Lt.FastLayer,Group:Lt.Group,Image:Lt.Image,Label:Lt.Label,Layer:Lt.Layer,Line:Lt.Line,Path:Lt.Path,Rect:Lt.Rect,RegularPolygon:Lt.RegularPolygon,Ring:Lt.Ring,Shape:Lt.Shape,Sprite:Lt.Sprite,Star:Lt.Star,Tag:Lt.Tag,Text:Lt.Text,TextPath:Lt.TextPath,Transformer:Lt.Transformer,Wedge:Lt.Wedge,...e==null?void 0:e.customNodes};[Dj,...Object.entries(r).map(([i,s])=>Ij(i,s))].forEach(i=>{t.component(`${n}${i.name}`,i)})}},Gn="vel",tr=Ae({name:"SvgIcon",props:{type:{type:String,default:""}},setup:t=>()=>le("svg",{class:`${Gn}-icon icon`,"aria-hidden":"true"},[le("use",{"xlink:href":`#icon-${t.type}`},null)])}),$c=typeof window<"u",Ps=()=>{};let Y8=!1;if($c)try{const t={};Object.defineProperty(t,"passive",{get(){Y8=!0}}),window.addEventListener("test-passive",Ps,t)}catch{}const Mg=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];$c&&t.addEventListener(e,n,!!Y8&&{capture:!1,passive:r})},Lg=(t,e,n)=>{$c&&t.removeEventListener(e,n)},Oj=t=>{t.preventDefault()},Mj=Object.prototype.toString,A2=t=>e=>Mj.call(e).slice(8,-1)===t,Lj=t=>!!t&&A2("Object")(t),Ng=t=>!!t&&A2("String")(t);function Nj(t){return t!=null}const Uj=Ae({name:"Toolbar",props:{zoomIn:{type:Function,default:Ps},zoomOut:{type:Function,default:Ps},rotateLeft:{type:Function,default:Ps},rotateRight:{type:Function,default:Ps},resize:{type:Function,default:Ps},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1}},setup:t=>()=>le("div",{class:`${Gn}-toolbar`},[!t.zoomDisabled&&le(Se,null,[le("div",{role:"button","aria-label":"zoom in button",class:"toolbar-btn toolbar-btn__zoomin",onClick:t.zoomIn},[le(tr,{type:"zoomin"},null)]),le("div",{role:"button","aria-label":"zoom out button",class:"toolbar-btn toolbar-btn__zoomout",onClick:t.zoomOut},[le(tr,{type:"zoomout"},null)])]),le("div",{role:"button","aria-label":"resize image button",class:"toolbar-btn toolbar-btn__resize",onClick:t.resize},[le(tr,{type:"resize"},null)]),!t.rotateDisabled&&le(Se,null,[le("div",{role:"button","aria-label":"image rotate left button",class:"toolbar-btn toolbar-btn__rotate",onClick:t.rotateLeft},[le(tr,{type:"rotate-left"},null)]),le("div",{role:"button","aria-label":"image rotate right button",class:"toolbar-btn toolbar-btn__rotate",onClick:t.rotateRight},[le(tr,{type:"rotate-right"},null)])])])}),zj=()=>le("div",{class:`${Gn}-loading`},[le("div",{class:"ring"},null)]),jj=()=>le("div",{class:`${Gn}-on-error`},[le("div",{class:"ring"},null),le(tr,{type:"img-broken"},null)]),Hj=(t,e)=>{let{slots:n}=e;return le("div",{class:`${Gn}-img-title`},[n.default?n.default():""])},Vj=Ae({name:"DefaultIcons",setup:()=>()=>le("svg",{"aria-hidden":!0,style:"position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden;"},[le("symbol",{id:"icon-rotate-right",viewBox:"0 0 1024 1024"},[le("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973z m282.559912-479.07185A509.887841 509.887841 0 0 0 511.99984 0.00032C229.215928 0.00032 0 229.216248 0 512.00016s229.215928 511.99984 511.99984 511.99984 511.99984-229.215928 511.99984-511.99984c0-3.743999-0.032-7.455998-0.128-11.167997-1.631999-11.295996-8.159997-27.103992-31.87199-27.103991-27.487991 0-31.67999 21.247993-32.03199 32.06399l0.032 4.127999a30.62399 30.62399 0 0 0 0.16 2.079999H959.9997c0 247.423923-200.575937 447.99986-447.99986 447.99986S63.99998 759.424083 63.99998 512.00016 264.575917 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 1 277.439913 96.22397l-94.91197 91.679971c-25.439992 24.607992-17.439995 44.991986 17.887994 45.599986l188.031942 3.295999a64.31998 64.31998 0 0 0 65.055979-62.84798l3.295999-188.127942C969.407697 15.040315 949.311703 5.792318 923.871711 30.368311l-87.999972 85.023973z",fill:""},null)]),le("symbol",{id:"icon-rotate-left",viewBox:"0 0 1024 1024"},[le("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973zM188.159941 115.392284A509.887841 509.887841 0 0 1 511.99984 0.00032c282.783912 0 511.99984 229.215928 511.99984 511.99984s-229.215928 511.99984-511.99984 511.99984S0 794.784072 0 512.00016c0-3.743999 0.032-7.455998 0.128-11.167997 1.631999-11.295996 8.159997-27.103992 31.87199-27.103991 27.487991 0 31.67999 21.247993 32.03199 32.06399L63.99998 509.920161a30.62399 30.62399 0 0 1-0.16 2.079999H63.99998c0 247.423923 200.575937 447.99986 447.99986 447.99986s447.99986-200.575937 447.99986-447.99986S759.423763 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 0-277.439913 96.22397l94.91197 91.679971c25.439992 24.607992 17.439995 44.991986-17.887994 45.599986L123.551961 300.800226a64.31998 64.31998 0 0 1-65.055979-62.84798l-3.295999-188.127942C54.591983 15.040315 74.687977 5.792318 100.127969 30.368311l87.999972 85.023973z",fill:""},null)]),le("symbol",{id:"icon-resize",viewBox:"0 0 1024 1024"},[le("path",{d:"M456.036919 791.8108 270.553461 791.8108 460.818829 601.572038l-39.593763-39.567157L231.314785 751.915162l0.873903-183.953615c0-15.465227-12.515035-27.981285-27.981285-27.981285s-27.981285 12.515035-27.981285 27.981285l0 251.829516c0 8.3072 3.415796 14.975063 8.826016 19.564591 5.082762 5.192256 12.132318 8.416693 19.947308 8.416693l251.036453 0c15.46625 0 27.981285-12.514012 27.981285-27.981285C484.018204 804.325835 471.504192 791.8108 456.036919 791.8108zM838.945819 184.644347c-5.082762-5.191232-12.132318-8.416693-19.947308-8.416693L567.961034 176.227654c-15.46625 0-27.981285 12.515035-27.981285 27.981285 0 15.46625 12.514012 27.981285 27.981285 27.981285l185.483458 0L563.206754 422.427962l39.567157 39.567157 189.910281-189.910281-0.873903 183.953615c0 15.46625 12.514012 27.981285 27.981285 27.981285s27.981285-12.514012 27.981285-27.981285L847.772858 204.208938C847.771835 195.902762 844.356039 189.234899 838.945819 184.644347zM847.771835 64.303538 176.227142 64.303538c-61.809741 0-111.924115 50.115398-111.924115 111.924115l0 671.544693c0 61.809741 50.114374 111.924115 111.924115 111.924115l671.544693 0c61.809741 0 111.924115-50.114374 111.924115-111.924115l0-671.544693C959.69595 114.418936 909.581576 64.303538 847.771835 64.303538zM903.733381 847.772346c0 30.878265-25.056676 55.962569-55.962569 55.962569L176.227142 903.734916c-30.90487 0-55.962569-25.084305-55.962569-55.962569l0-671.544693c0-30.9325 25.056676-55.962569 55.962569-55.962569l671.544693 0c30.90487 0 55.962569 25.03007 55.962569 55.962569L903.734404 847.772346z"},null)]),le("symbol",{id:"icon-img-broken",viewBox:"0 0 1024 1024"},[le("path",{d:"M810.666667 128H213.333333c-46.933333 0-85.333333 38.4-85.333333 85.333333v597.333334c0 46.933333 38.4 85.333333 85.333333 85.333333h597.333334c46.933333 0 85.333333-38.4 85.333333-85.333333V213.333333c0-46.933333-38.4-85.333333-85.333333-85.333333z m0 682.666667H213.333333v-195.413334l42.24 42.24 170.666667-170.666666 170.666667 170.666666 170.666666-170.24L810.666667 530.346667V810.666667z m0-401.493334l-43.093334-43.093333-170.666666 171.093333-170.666667-170.666666-170.666667 170.666666-42.24-42.666666V213.333333h597.333334v195.84z"},null)]),le("symbol",{id:"icon-prev",viewBox:"0 0 1024 1024"},[le("path",{d:"M784.652701 955.6957 346.601985 517.644983c-2.822492-2.822492-2.822492-7.902977 0-11.289967l439.179713-439.179713c6.77398-6.77398 10.725469-16.370452 10.725469-25.966924L796.507166 36.692393c0-20.32194-16.370452-36.692393-36.692393-36.692393l-4.515987 0c-9.596472 0-19.192944 3.951488-25.966924 10.725469L250.072767 489.420066c-12.418964 12.418964-12.418964 32.740904 0 45.159868l477.565601 477.565601c7.338479 7.338479 17.499449 11.854465 28.224917 11.854465l0 0c22.015436 0 40.079383-18.063947 40.079383-40.079383l0 0C796.507166 973.759647 791.99118 963.598677 784.652701 955.6957z"},null)]),le("symbol",{id:"icon-next",viewBox:"0 0 1024 1024"},[le("path",{d:"M246.121279 955.6957l438.050717-438.050717c2.822492-2.822492 2.822492-7.902977 0-11.289967L244.992282 67.175303c-6.77398-6.77398-10.725469-16.370452-10.725469-25.966924L234.266814 36.692393C234.266814 16.370452 250.637266 0 270.959206 0l4.515987 0c9.596472 0 19.192944 3.951488 25.966924 10.725469l478.694598 478.694598c12.418964 12.418964 12.418964 32.740904 0 45.159868l-477.565601 477.565601c-7.338479 7.338479-17.499449 11.854465-28.224917 11.854465l0 0c-22.015436 0-40.079383-18.063947-40.079383-40.079383l0 0C234.266814 973.759647 238.7828 963.598677 246.121279 955.6957z"},null)]),le("symbol",{id:"icon-zoomin",viewBox:"0 0 1024 1024"},[le("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),le("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null),le("path",{d:"M367.488 238.144h127.104v390.72H367.488z"},null)]),le("symbol",{id:"icon-close",viewBox:"0 0 1024 1024"},[le("path",{d:"M570.24 512l259.2 259.2-58.88 58.24L512 570.24l-261.12 261.12-58.24-58.24L453.76 512 194.56 252.8l58.24-58.24L512 453.76l261.12-261.12 58.24 58.24z"},null)]),le("symbol",{id:"icon-zoomout",viewBox:"0 0 1024 1024"},[le("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),le("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null)])])}),Go=$c?window:global;let Ug=Date.now();function Gj(t){const e=Date.now(),n=Math.max(0,16-(e-Ug)),r=setTimeout(t,n);return Ug=e+n,r}function ud(t){return(Go.requestAnimationFrame||Gj).call(Go,t)}function zg(t){(Go.cancelAnimationFrame||Go.clearTimeout).call(Go,t)}function jg(t,e){const n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function dd(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!ui(t)}var fd=Ae({name:"VueEasyLightbox",props:{imgs:{type:[Array,String],default:()=>""},visible:{type:Boolean,default:!1},index:{type:Number,default:0},scrollDisabled:{type:Boolean,default:!0},escDisabled:{type:Boolean,default:!1},moveDisabled:{type:Boolean,default:!1},titleDisabled:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},teleport:{type:[String,Object],default:null},swipeTolerance:{type:Number,default:50},loop:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},zoomScale:{type:Number,default:.12},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.1},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1},pinchDisabled:{type:Boolean,default:!1},dblclickDisabled:{type:Boolean,default:!1}},emits:{hide:()=>!0,"on-error":t=>!0,"on-prev":(t,e)=>!0,"on-next":(t,e)=>!0,"on-prev-click":(t,e)=>!0,"on-next-click":(t,e)=>!0,"on-index-change":(t,e)=>!0,"on-rotate":t=>!0},setup(t,e){let{emit:n,slots:r}=e;const{imgRef:i,imgState:s,setImgSize:o}=(()=>{const O=re(),H=Pt({width:0,height:0,maxScale:1});return{imgRef:O,imgState:H,setImgSize:()=>{if(O.value){const{width:I,height:R,naturalWidth:Y}=O.value;H.maxScale=Y/I,H.width=I,H.height=R}}}})(),a=re(t.index),l=re(""),c=Pt({scale:1,lastScale:1,rotateDeg:0,top:0,left:0,initX:0,initY:0,lastX:0,lastY:0,touches:[]}),u=Pt({loadError:!1,loading:!1,dragging:!1,gesturing:!1,wheeling:!1}),h=Le(()=>{return O=t.imgs,A2("Array")(O)?t.imgs.map(H=>typeof H=="string"?{src:H}:function(I){return Lj(I)&&Ng(I.src)}(H)?H:void 0).filter(Nj):Ng(t.imgs)?[{src:t.imgs}]:[];var O}),p=Le(()=>h.value[a.value]),d=Le(()=>{var O;return(O=h.value[a.value])==null?void 0:O.src}),g=Le(()=>{var O;return(O=h.value[a.value])==null?void 0:O.title}),v=Le(()=>{var O;return(O=h.value[a.value])==null?void 0:O.alt}),x=Le(()=>({cursor:u.loadError?"default":t.moveDisabled?u.dragging?"grabbing":"grab":"move",top:`calc(50% + ${c.top}px)`,left:`calc(50% + ${c.left}px)`,transition:u.dragging||u.gesturing?"none":"",transform:`translate(-50%, -50%) scale(${c.scale}) rotate(${c.rotateDeg}deg)`})),y=()=>{n("hide")},_=()=>{c.scale=1,c.lastScale=1,c.rotateDeg=0,c.top=0,c.left=0,u.loadError=!1,u.dragging=!1,u.loading=!0},f=(O,H)=>{const I=a.value;_(),a.value=O,h.value[a.value]===h.value[O]&&li(()=>{u.loading=!1}),t.visible&&I!==O&&(H&&H(I,O),n("on-index-change",I,O))},b=()=>{const O=a.value,H=t.loop?(O+1)%h.value.length:O+1;!t.loop&&H>h.value.length-1||f(H,(I,R)=>{n("on-next",I,R),n("on-next-click",I,R)})},w=()=>{const O=a.value;let H=O-1;if(O===0){if(!t.loop)return;H=h.value.length-1}f(H,(I,R)=>{n("on-prev",I,R),n("on-prev-click",I,R)})},k=O=>{Math.abs(1-O)<.05?O=1:Math.abs(s.maxScale-O)<.05&&(O=s.maxScale),c.lastScale=c.scale,c.scale=O},P=()=>{const O=c.scale+t.zoomScale;O<s.maxScale*t.maxZoom&&k(O)},$=()=>{const O=c.scale-t.zoomScale;O>t.minZoom&&k(O)},D=()=>{const O=c.rotateDeg%360;n("on-rotate",Math.abs(O<0?O+360:O))},S=()=>{c.rotateDeg-=90,D()},F=()=>{c.rotateDeg+=90,D()},A=()=>{c.scale=1,c.top=0,c.left=0},E=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return!t.moveDisabled&&O===0},{onMouseDown:T,onMouseMove:L,onMouseUp:X}=((O,H,I)=>{let R,Y=!1;return{onMouseDown:te=>{O.initX=O.lastX=te.clientX,O.initY=O.lastY=te.clientY,H.dragging=!0,Y=!1,te.stopPropagation()},onMouseUp:te=>{I(te.button)&&zg(R),H.dragging=!1,Y=!1},onMouseMove:te=>{if(H.dragging)if(I(te.button)){if(Y)return;Y=!0,R=ud(()=>{const{top:K,left:G,lastY:ie,lastX:he}=O;O.top=K-ie+te.clientY,O.left=G-he+te.clientX,O.lastX=te.clientX,O.lastY=te.clientY,Y=!1})}else O.lastX=te.clientX,O.lastY=te.clientY;te.stopPropagation()}}})(c,u,E),{onTouchStart:J,onTouchMove:ne,onTouchEnd:se}=((O,H,I,R,Y)=>{let te,K=!1;return{onTouchStart:G=>{const{touches:ie}=G;ie.length>1&&Y()?(I.gesturing=!0,H.touches=ie):(H.initX=H.lastX=ie[0].clientX,H.initY=H.lastY=ie[0].clientY,I.dragging=!0),G.stopPropagation()},onTouchMove:G=>{if(K)return;const{touches:ie}=G,{lastX:he,lastY:ge,left:be,top:$e,scale:Be}=H;if(!I.gesturing&&I.dragging){if(!ie[0])return;const{clientX:De,clientY:Qe}=ie[0];R()?te=ud(()=>{H.lastX=De,H.lastY=Qe,H.top=$e-ge+Qe,H.left=be-he+De,K=!1}):(H.lastX=De,H.lastY=Qe)}else I.gesturing&&H.touches.length>1&&ie.length>1&&Y()&&(te=ud(()=>{const De=(jg(H.touches[0],H.touches[1])-jg(ie[0],ie[1]))/O.width;H.touches=ie;const Qe=Be-1.3*De;Qe>.5&&Qe<1.5*O.maxScale&&(H.scale=Qe),K=!1}))},onTouchEnd:()=>{zg(te),I.dragging=!1,I.gesturing=!1,K=!1}}})(s,c,u,E,()=>!t.pinchDisabled),ce=()=>{t.dblclickDisabled||(c.scale!==s.maxScale?(c.lastScale=c.scale,c.scale=s.maxScale):c.scale=c.lastScale)},j=O=>{u.loadError||u.gesturing||u.loading||u.dragging||u.wheeling||!t.scrollDisabled||t.zoomDisabled||(u.wheeling=!0,setTimeout(()=>{u.wheeling=!1},80),O.deltaY<0?P():$())},V=O=>{const H=O;t.visible&&(!t.escDisabled&&H.key==="Escape"&&t.visible&&y(),H.key==="ArrowLeft"&&(t.rtl?b():w()),H.key==="ArrowRight"&&(t.rtl?w():b()))},oe=()=>{t.maskClosable&&y()},N=()=>{o()},Q=()=>{u.loading=!1},fe=O=>{u.loading=!1,u.loadError=!0,n("on-error",O)},M=()=>{t.visible&&o()};at(()=>t.index,O=>{O<0||O>=h.value.length||f(O)}),at(()=>u.dragging,(O,H)=>{const I=!O&&H;if(!E()&&I){const R=c.lastX-c.initX,Y=c.lastY-c.initY,te=t.swipeTolerance;Math.abs(R)>Math.abs(Y)&&(R<-1*te?b():R>te&&w())}}),at(()=>t.visible,O=>{if(O){_();const H=h.value.length;if(H===0)return a.value=0,u.loading=!1,void li(()=>u.loadError=!0);a.value=t.index>=H?H-1:t.index<0?0:t.index,t.scrollDisabled&&q()}else t.scrollDisabled&&ee()});const q=()=>{document&&(l.value=document.body.style.overflowY,document.body.style.overflowY="hidden")},ee=()=>{document&&(document.body.style.overflowY=l.value)};ut(()=>{Mg(document,"keydown",V),Mg(window,"resize",M)}),Nn(()=>{Lg(document,"keydown",V),Lg(window,"resize",M),t.scrollDisabled&&ee()});const ue=()=>u.loading?r.loading?r.loading({key:"loading"}):le(zj,{key:"img-loading"},null):u.loadError?r.onerror?r.onerror({key:"onerror"}):le(jj,{key:"img-on-error"},null):le("div",{class:`${Gn}-img-wrapper`,style:x.value,key:"img-wrapper"},[le("img",{alt:v.value,ref:i,draggable:"false",class:`${Gn}-img`,src:d.value,onMousedown:T,onMouseup:X,onMousemove:L,onTouchstart:J,onTouchmove:ne,onTouchend:se,onLoad:N,onDblclick:ce,onDragstart:O=>{O.preventDefault()}},null)]),me=()=>{if(r["prev-btn"])return r["prev-btn"]({prev:w});if(h.value.length<=1)return;const O=!t.loop&&a.value<=0;return le("div",{role:"button","aria-label":"previous image button",class:"btn__prev "+(O?"disable":""),onClick:w},[t.rtl?le(tr,{type:"next"},null):le(tr,{type:"prev"},null)])},xe=()=>{if(r["next-btn"])return r["next-btn"]({next:b});if(h.value.length<=1)return;const O=!t.loop&&a.value>=h.value.length-1;return le("div",{role:"button","aria-label":"next image button",class:"btn__next "+(O?"disable":""),onClick:b},[t.rtl?le(tr,{type:"prev"},null):le(tr,{type:"next"},null)])},z=()=>{if(!(t.titleDisabled||u.loading||u.loadError))return r.title?r.title({currentImg:p.value}):g.value?le(Hj,null,{default:()=>[g.value]}):void 0},C=()=>{let O;if(t.visible)return le("div",{onTouchmove:Oj,class:[`${Gn}-modal`,t.rtl?"is-rtl":""],onClick:Ee(oe,["self"]),onWheel:j},[le(Vj,null,null),le(sr,{name:`${Gn}-fade`,mode:"out-in"},dd(O=ue())?O:{default:()=>[O]}),le("img",{style:"display:none;",src:d.value,onError:fe,onLoad:Q},null),le("div",{class:`${Gn}-btns-wrapper`},[me(),xe(),z(),r["close-btn"]?r["close-btn"]({close:y}):le("div",{role:"button","aria-label":"close image preview button",class:"btn__close",onClick:y},[le(tr,{type:"close"},null)]),r.toolbar?r.toolbar({toolbarMethods:{zoomIn:P,zoomOut:$,rotate:S,rotateLeft:S,rotateRight:F,resize:A},zoomIn:P,zoomOut:$,rotate:S,rotateLeft:S,rotateRight:F,resize:A}):le(Uj,{zoomIn:P,zoomOut:$,resize:A,rotateLeft:S,rotateRight:F,rotateDisabled:t.rotateDisabled,zoomDisabled:t.zoomDisabled},null)])])};return()=>{let O;if(t.teleport){let H;return le(S3,{to:t.teleport},{default:()=>[le(sr,{name:`${Gn}-fade`},dd(H=C())?H:{default:()=>[H]})]})}return le(sr,{name:`${Gn}-fade`},dd(O=C())?O:{default:()=>[O]})}}});const Wj=Object.assign(fd,{install:t=>{t.component(fd.name,fd)}}),X8={mounted(t,e){function n(){e.value&&(t.src=e.value)}function r(s,o){s.forEach(a=>{if(a.isIntersecting)n(),o.unobserve(t);else return})}function i(){const s={root:null,threshold:0};new IntersectionObserver(r,s).observe(t)}window.IntersectionObserver?i():n()}};import.meta.SSR&&(X8.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}});const qj=Dv();async function Kj(){console.log("creating client side app");const t=ea.getInstance();await Ud.startup(Cl,t);const e=Dd({render:()=>Zt(Zx)});e.config.globalProperties.$cogniwerk=t,e.config.globalProperties.$oidc=Ud;const n=vv();n.use(Pv),e.use(n),e.use(Cl),e.use(F4),e.config.globalProperties.emitter=qj,e.directive("lazyload",X8);const r=x5();return e.use(r),e.use(Wj),e.use(Rj),e.component(eg.name,eg),{app:e,router:Cl}}Kj().then(({app:t,router:e})=>{const n=x5({position:"top-center",limit:4,enqueue:!1,notifications:{error:{title:"",message:"",duration:5e3,ariaLive:"assertive",ariaRole:"alert"},global:{},info:{title:"",message:"",duration:5e3,ariaLive:"polite",ariaRole:"status"},success:{title:"",message:"",duration:5e3,ariaLive:"polite",ariaRole:"status"},warning:{title:"",message:"",duration:5e3,ariaLive:"polite",ariaRole:"alert"}}});t.use(n),e.isReady().then(()=>{t.mount("#app"),console.log("hydrated")})});export{Yg as $,pH as A,Em as B,an as C,jH as D,Zg as E,Se as F,ma as G,He as H,le as I,m3 as J,hH as K,fH as L,Ae as M,J9 as N,vH as O,_H as P,yH as Q,Dl as R,Ns as S,S3 as T,bH as U,N1 as V,mH as W,VH as X,xH as Y,MH as Z,Yj as _,$3 as a,Xo as a$,Ct as a0,x1 as a1,tH as a2,$1 as a3,$r as a4,Zt as a5,to as a6,Xm as a7,KH as a8,lH as a9,Rm as aA,zm as aB,ut as aC,Um as aD,Nm as aE,Xg as aF,Lm as aG,bi as aH,ha as aI,_m as aJ,U as aK,sH as aL,mn as aM,g3 as aN,iH as aO,md as aP,Pt as aQ,m0 as aR,re as aS,PH as aT,pv as aU,Ye as aV,Ms as aW,xr as aX,pa as aY,Vs as aZ,UH as a_,dH as aa,uH as ab,cH as ac,FH as ad,ZH as ae,vt as af,T9 as ag,S1 as ah,yr as ai,zi as aj,Nt as ak,DH as al,ir as am,ui as an,Jt as ao,F1 as ap,SH as aq,Ui as ar,li as as,ze as at,kr as au,xn as av,Im as aw,F3 as ax,Nn as ay,Mm as az,rH as b,Fk as b$,wf as b0,LH as b1,ji as b2,f3 as b3,bs as b4,Yi as b5,a9 as b6,NH as b7,Xj as b8,ve as b9,P9 as bA,RH as bB,at as bC,EH as bD,c9 as bE,u9 as bF,ci as bG,mt as bH,wH as bI,Fe as bJ,qH as bK,IH as bL,Ee as bM,oH as bN,je as bO,r$ as bP,i$ as bQ,s$ as bR,en as bS,c8 as bT,nl as bU,So as bV,St as bW,Ql as bX,Sw as bY,mp as bZ,We as b_,dl as ba,gH as bb,ft as bc,gm as bd,v3 as be,Qj as bf,TH as bg,p3 as bh,de as bi,kH as bj,WH as bk,HH as bl,tv as bm,aH as bn,$H as bo,l9 as bp,GH as bq,CH as br,BH as bs,E3 as bt,w0 as bu,cv as bv,x4 as bw,lv as bx,dn as by,et as bz,OH as c,Ho as c$,k0 as c0,Ke as c1,dV as c2,fV as c3,rV as c4,Bv as c5,Tt as c6,zy as c7,Wd as c8,o2 as c9,ts as cA,Bw as cB,OS as cC,F$ as cD,b$ as cE,C$ as cF,fn as cG,so as cH,$n as cI,iB as cJ,ww as cK,Tw as cL,t1 as cM,Uw as cN,Xl as cO,Fo as cP,$k as cQ,Mv as cR,Wl as cS,ql as cT,_V as cU,t2 as cV,_p as cW,Jd as cX,U5 as cY,uV as cZ,vp as c_,kk as ca,wa as cb,yt as cc,Vo as cd,no as ce,JH as cf,eV as cg,tV as ch,nV as ci,QH as cj,YH as ck,z5 as cl,iV as cm,L5 as cn,_w as co,M5 as cp,sV as cq,Cv as cr,j5 as cs,oV as ct,aV as cu,lV as cv,cV as cw,bV as cx,XH as cy,gI as cz,Er as d,O$ as d0,z$ as d1,Y$ as d2,sT as d3,vw as d4,E$ as d5,D$ as d6,js as d7,kw as d8,sa as d9,aa as da,wi as db,bl as dc,Aw as dd,Ew as de,G5 as df,hV as dg,pV as dh,gV as di,mV as dj,vV as dk,jr as dl,Fn as dm,c$ as dn,Ni as e,Jj as f,sr as g,b4 as h,eH as i,nH as j,ar as k,da as l,En as m,u0 as n,lr as o,zH as p,Le as q,Dd as r,Xe as s,we as t,Z as u,m as v,s9 as w,AH as x,i9 as y,gv as z};
