@wmt-fanid/widget 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @wmt-fanid/widget
2
+
3
+ FanID authentication widget with gated content for third-party websites.
4
+
5
+ ## Documentation
6
+
7
+ Full documentation: [https://docs.fanid.co](https://docs.fanid.co)
8
+
9
+ ## License
10
+
11
+ Copyright WMT.Digital.
@@ -0,0 +1 @@
1
+ var FanIDWidget=function(){"use strict";function e(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}const t={},n=[],o=()=>{},i=()=>!1,s=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),r=e=>e.startsWith("onUpdate:"),l=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},c=Object.prototype.hasOwnProperty,u=(e,t)=>c.call(e,t),d=Array.isArray,f=e=>"[object Map]"===w(e),p=e=>"[object Set]"===w(e),h=e=>"[object Date]"===w(e),g=e=>"function"==typeof e,v=e=>"string"==typeof e,m=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,_=e=>(y(e)||g(e))&&g(e.then)&&g(e.catch),b=Object.prototype.toString,w=e=>b.call(e),x=e=>"[object Object]"===w(e),S=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,C=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),k=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},$=/-\w/g,T=k(e=>e.replace($,e=>e.slice(1).toUpperCase())),E=/\B([A-Z])/g,A=k(e=>e.replace(E,"-$1").toLowerCase()),O=k(e=>e.charAt(0).toUpperCase()+e.slice(1)),F=k(e=>e?`on${O(e)}`:""),L=(e,t)=>!Object.is(e,t),I=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},M=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},j=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let P;const z=()=>P||(P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function D(e){if(d(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=v(o)?H(o):D(o);if(i)for(const e in i)t[e]=i[e]}return t}if(v(e)||y(e))return e}const N=/;(?![^(]*\))/g,U=/:([^]+)/,R=/\/\*[^]*?\*\//g;function H(e){const t={};return e.replace(R,"").split(N).forEach(e=>{if(e){const n=e.split(U);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function W(e){let t="";if(v(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){const o=W(e[n]);o&&(t+=o+" ")}else if(y(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const V=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function B(e){return!!e||""===e}function q(e,t){if(e===t)return!0;let n=h(e),o=h(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=m(e),o=m(t),n||o)return e===t;if(n=d(e),o=d(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=q(e[o],t[o]);return n}(e,t);if(n=y(e),o=y(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(o&&!i||!o&&i||!q(e[n],t[n]))return!1}}return String(e)===String(t)}const G=e=>!(!e||!0!==e.__v_isRef),J=e=>v(e)?e:null==e?"":d(e)||y(e)&&(e.toString===b||!g(e.toString))?G(e)?J(e.value):JSON.stringify(e,K,2):String(e),K=(e,t)=>G(t)?K(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],o)=>(e[Y(t,o)+" =>"]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Y(e))}:m(t)?Y(t):!y(t)||d(t)||x(t)?t:String(t),Y=(e,t="")=>{var n;return m(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let Z,X;class Q{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Z,!e&&Z&&(this.index=(Z.scopes||(Z.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=Z;try{return Z=this,e()}finally{Z=t}}}on(){1===++this._on&&(this.prevScope=Z,Z=this)}off(){this._on>0&&0===--this._on&&(Z=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){let t,n;for(this._active=!1,t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}const ee=new WeakSet;class te{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Z&&Z.active&&Z.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ee.has(this)&&(ee.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||se(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,ye(this),ae(this);const e=X,t=he;X=this,he=!0;try{return this.fn()}finally{ce(this),X=e,he=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)fe(e);this.deps=this.depsTail=void 0,ye(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ee.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ue(this)&&this.run()}get dirty(){return ue(this)}}let ne,oe,ie=0;function se(e,t=!1){if(e.flags|=8,t)return e.next=oe,void(oe=e);e.next=ne,ne=e}function re(){ie++}function le(){if(--ie>0)return;if(oe){let e=oe;for(oe=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ne;){let n=ne;for(ne=void 0;n;){const o=n.next;if(n.next=void 0,n.flags&=-9,1&n.flags)try{n.trigger()}catch(t){e||(e=t)}n=o}}if(e)throw e}function ae(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ce(e){let t,n=e.depsTail,o=n;for(;o;){const e=o.prevDep;-1===o.version?(o===n&&(n=e),fe(o),pe(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=e}e.deps=t,e.depsTail=n}function ue(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(de(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function de(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===_e)return;if(e.globalVersion=_e,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!ue(e)))return;e.flags|=2;const t=e.dep,n=X,o=he;X=e,he=!0;try{ae(e);const n=e.fn(e._value);(0===t.version||L(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(i){throw t.version++,i}finally{X=n,he=o,ce(e),e.flags&=-3}}function fe(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)fe(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function pe(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let he=!0;const ge=[];function ve(){ge.push(he),he=!1}function me(){const e=ge.pop();he=void 0===e||e}function ye(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=X;X=void 0;try{t()}finally{X=e}}}let _e=0;class be{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class we{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!X||!he||X===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==X)t=this.activeLink=new be(X,this),X.deps?(t.prevDep=X.depsTail,X.depsTail.nextDep=t,X.depsTail=t):X.deps=X.depsTail=t,xe(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=X.depsTail,t.nextDep=void 0,X.depsTail.nextDep=t,X.depsTail=t,X.deps===t&&(X.deps=e)}return t}trigger(e){this.version++,_e++,this.notify(e)}notify(e){re();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{le()}}}function xe(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)xe(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Se=new WeakMap,Ce=Symbol(""),ke=Symbol(""),$e=Symbol("");function Te(e,t,n){if(he&&X){let t=Se.get(e);t||Se.set(e,t=new Map);let o=t.get(n);o||(t.set(n,o=new we),o.map=t,o.key=n),o.track()}}function Ee(e,t,n,o,i,s){const r=Se.get(e);if(!r)return void _e++;const l=e=>{e&&e.trigger()};if(re(),"clear"===t)r.forEach(l);else{const i=d(e),s=i&&S(n);if(i&&"length"===n){const e=Number(o);r.forEach((t,n)=>{("length"===n||n===$e||!m(n)&&n>=e)&&l(t)})}else switch((void 0!==n||r.has(void 0))&&l(r.get(n)),s&&l(r.get($e)),t){case"add":i?s&&l(r.get("length")):(l(r.get(Ce)),f(e)&&l(r.get(ke)));break;case"delete":i||(l(r.get(Ce)),f(e)&&l(r.get(ke)));break;case"set":f(e)&&l(r.get(Ce))}}le()}function Ae(e){const t=gt(e);return t===e?t:(Te(t,0,$e),pt(e)?t:t.map(vt))}function Oe(e){return Te(e=gt(e),0,$e),e}function Fe(e,t){return ft(e)?mt(dt(e)?vt(t):t):vt(t)}const Le={__proto__:null,[Symbol.iterator](){return Ie(this,Symbol.iterator,e=>Fe(this,e))},concat(...e){return Ae(this).concat(...e.map(e=>d(e)?Ae(e):e))},entries(){return Ie(this,"entries",e=>(e[1]=Fe(this,e[1]),e))},every(e,t){return je(this,"every",e,t,void 0,arguments)},filter(e,t){return je(this,"filter",e,t,e=>e.map(e=>Fe(this,e)),arguments)},find(e,t){return je(this,"find",e,t,e=>Fe(this,e),arguments)},findIndex(e,t){return je(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return je(this,"findLast",e,t,e=>Fe(this,e),arguments)},findLastIndex(e,t){return je(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return je(this,"forEach",e,t,void 0,arguments)},includes(...e){return ze(this,"includes",e)},indexOf(...e){return ze(this,"indexOf",e)},join(e){return Ae(this).join(e)},lastIndexOf(...e){return ze(this,"lastIndexOf",e)},map(e,t){return je(this,"map",e,t,void 0,arguments)},pop(){return De(this,"pop")},push(...e){return De(this,"push",e)},reduce(e,...t){return Pe(this,"reduce",e,t)},reduceRight(e,...t){return Pe(this,"reduceRight",e,t)},shift(){return De(this,"shift")},some(e,t){return je(this,"some",e,t,void 0,arguments)},splice(...e){return De(this,"splice",e)},toReversed(){return Ae(this).toReversed()},toSorted(e){return Ae(this).toSorted(e)},toSpliced(...e){return Ae(this).toSpliced(...e)},unshift(...e){return De(this,"unshift",e)},values(){return Ie(this,"values",e=>Fe(this,e))}};function Ie(e,t,n){const o=Oe(e),i=o[t]();return o===e||pt(e)||(i._next=i.next,i.next=()=>{const e=i._next();return e.done||(e.value=n(e.value)),e}),i}const Me=Array.prototype;function je(e,t,n,o,i,s){const r=Oe(e),l=r!==e&&!pt(e),a=r[t];if(a!==Me[t]){const t=a.apply(e,s);return l?vt(t):t}let c=n;r!==e&&(l?c=function(t,o){return n.call(this,Fe(e,t),o,e)}:n.length>2&&(c=function(t,o){return n.call(this,t,o,e)}));const u=a.call(r,c,o);return l&&i?i(u):u}function Pe(e,t,n,o){const i=Oe(e);let s=n,r=!1;i!==e&&(i!==e&&!pt(e)?(r=0===o.length,s=function(t,o,i){return r&&(r=!1,t=Fe(e,t)),n.call(this,t,Fe(e,o),i,e)}):n.length>3&&(s=function(t,o,i){return n.call(this,t,o,i,e)}));const l=i[t](s,...o);return r?Fe(e,l):l}function ze(e,t,n){const o=gt(e);Te(o,0,$e);const i=o[t](...n);return-1!==i&&!1!==i||!ht(n[0])?i:(n[0]=gt(n[0]),o[t](...n))}function De(e,t,n=[]){ve(),re();const o=gt(e)[t].apply(e,n);return le(),me(),o}const Ne=e("__proto__,__v_isRef,__isVue"),Ue=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(m));function Re(e){m(e)||(e=String(e));const t=gt(this);return Te(t,0,e),t.hasOwnProperty(e)}class He{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;const o=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(o?i?st:it:i?ot:nt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=d(e);if(!o){let e;if(s&&(e=Le[t]))return e;if("hasOwnProperty"===t)return Re}const r=Reflect.get(e,t,yt(e)?e:n);if(m(t)?Ue.has(t):Ne(t))return r;if(o||Te(e,0,t),i)return r;if(yt(r)){const e=s&&S(t)?r:r.value;return o&&y(e)?ct(e):e}return y(r)?o?ct(r):lt(r):r}}class We extends He{constructor(e=!1){super(!1,e)}set(e,t,n,o){let i=e[t];const s=d(e)&&S(t);if(!this._isShallow){const e=ft(i);if(pt(n)||ft(n)||(i=gt(i),n=gt(n)),!s&&yt(i)&&!yt(n))return e||(i.value=n),!0}const r=s?Number(t)<e.length:u(e,t),l=Reflect.set(e,t,n,yt(e)?e:o);return e===gt(o)&&(r?L(n,i)&&Ee(e,"set",t,n):Ee(e,"add",t,n)),l}deleteProperty(e,t){const n=u(e,t);e[t];const o=Reflect.deleteProperty(e,t);return o&&n&&Ee(e,"delete",t,void 0),o}has(e,t){const n=Reflect.has(e,t);return m(t)&&Ue.has(t)||Te(e,0,t),n}ownKeys(e){return Te(e,0,d(e)?"length":Ce),Reflect.ownKeys(e)}}class Ve extends He{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Be=new We,qe=new Ve,Ge=new We(!0),Je=e=>e,Ke=e=>Reflect.getPrototypeOf(e);function Ye(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Ze(e,t){const n={get(n){const o=this.__v_raw,i=gt(o),s=gt(n);e||(L(n,s)&&Te(i,0,n),Te(i,0,s));const{has:r}=Ke(i),l=t?Je:e?mt:vt;return r.call(i,n)?l(o.get(n)):r.call(i,s)?l(o.get(s)):void(o!==i&&o.get(n))},get size(){const t=this.__v_raw;return!e&&Te(gt(t),0,Ce),t.size},has(t){const n=this.__v_raw,o=gt(n),i=gt(t);return e||(L(t,i)&&Te(o,0,t),Te(o,0,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,o){const i=this,s=i.__v_raw,r=t?Je:e?mt:vt;return!e&&Te(gt(s),0,Ce),s.forEach((e,t)=>n.call(o,r(e),r(t),i))}};l(n,e?{add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear")}:{add(e){const n=gt(this),o=Ke(n),i=gt(e),s=t||pt(e)||ft(e)?e:i;return o.has.call(n,s)||L(e,s)&&o.has.call(n,e)||L(i,s)&&o.has.call(n,i)||(n.add(s),Ee(n,"add",s,s)),this},set(e,n){t||pt(n)||ft(n)||(n=gt(n));const o=gt(this),{has:i,get:s}=Ke(o);let r=i.call(o,e);r||(e=gt(e),r=i.call(o,e));const l=s.call(o,e);return o.set(e,n),r?L(n,l)&&Ee(o,"set",e,n):Ee(o,"add",e,n),this},delete(e){const t=gt(this),{has:n,get:o}=Ke(t);let i=n.call(t,e);i||(e=gt(e),i=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return i&&Ee(t,"delete",e,void 0),s},clear(){const e=gt(this),t=0!==e.size,n=e.clear();return t&&Ee(e,"clear",void 0,void 0),n}});return["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=function(e,t,n){return function(...o){const i=this.__v_raw,s=gt(i),r=f(s),a="entries"===e||e===Symbol.iterator&&r,c="keys"===e&&r,u=i[e](...o),d=n?Je:t?mt:vt;return!t&&Te(s,0,c?ke:Ce),l(Object.create(u),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:a?[d(e[0]),d(e[1])]:d(e),done:t}}})}}(o,e,t)}),n}function Xe(e,t){const n=Ze(e,t);return(t,o,i)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(u(n,o)&&o in t?n:t,o,i)}const Qe={get:Xe(!1,!1)},et={get:Xe(!1,!0)},tt={get:Xe(!0,!1)},nt=new WeakMap,ot=new WeakMap,it=new WeakMap,st=new WeakMap;function rt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>w(e).slice(8,-1))(e))}function lt(e){return ft(e)?e:ut(e,!1,Be,Qe,nt)}function at(e){return ut(e,!1,Ge,et,ot)}function ct(e){return ut(e,!0,qe,tt,it)}function ut(e,t,n,o,i){if(!y(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=rt(e);if(0===s)return e;const r=i.get(e);if(r)return r;const l=new Proxy(e,2===s?o:n);return i.set(e,l),l}function dt(e){return ft(e)?dt(e.__v_raw):!(!e||!e.__v_isReactive)}function ft(e){return!(!e||!e.__v_isReadonly)}function pt(e){return!(!e||!e.__v_isShallow)}function ht(e){return!!e&&!!e.__v_raw}function gt(e){const t=e&&e.__v_raw;return t?gt(t):e}const vt=e=>y(e)?lt(e):e,mt=e=>y(e)?ct(e):e;function yt(e){return!!e&&!0===e.__v_isRef}function _t(e){return function(e,t){if(yt(e))return e;return new bt(e,t)}(e,!1)}class bt{constructor(e,t){this.dep=new we,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:gt(e),this._value=t?e:vt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||pt(e)||ft(e);L(e=n?e:gt(e),t)&&(this._rawValue=e,this._value=n?e:vt(e),this.dep.trigger())}}const wt={get:(e,t,n)=>{return"__v_raw"===t?e:yt(o=Reflect.get(e,t,n))?o.value:o;var o},set:(e,t,n,o)=>{const i=e[t];return yt(i)&&!yt(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function xt(e){return dt(e)?e:new Proxy(e,wt)}class St{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new we(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_e-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&X!==this)return se(this,!0),!0}get value(){const e=this.dep.track();return de(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Ct(e,t,n=!1){let o,i;g(e)?o=e:(o=e.get,i=e.set);return new St(o,i,n)}const kt={},$t=new WeakMap;let Tt;function Et(e,n,i=t){const{immediate:s,deep:r,once:l,scheduler:c,augmentJob:u,call:f}=i,p=e=>r?e:pt(e)||!1===r||0===r?At(e,1):At(e);let h,v,m,y,_=!1,b=!1;if(yt(e)?(v=()=>e.value,_=pt(e)):dt(e)?(v=()=>p(e),_=!0):d(e)?(b=!0,_=e.some(e=>dt(e)||pt(e)),v=()=>e.map(e=>yt(e)?e.value:dt(e)?p(e):g(e)?f?f(e,2):e():void 0)):v=g(e)?n?f?()=>f(e,2):e:()=>{if(m){ve();try{m()}finally{me()}}const t=Tt;Tt=h;try{return f?f(e,3,[y]):e(y)}finally{Tt=t}}:o,n&&r){const e=v,t=!0===r?1/0:r;v=()=>At(e(),t)}const w=Z,x=()=>{h.stop(),w&&w.active&&a(w.effects,h)};if(l&&n){const e=n;n=(...t)=>{e(...t),x()}}let S=b?new Array(e.length).fill(kt):kt;const C=e=>{if(1&h.flags&&(h.dirty||e))if(n){const e=h.run();if(r||_||(b?e.some((e,t)=>L(e,S[t])):L(e,S))){m&&m();const t=Tt;Tt=h;try{const t=[e,S===kt?void 0:b&&S[0]===kt?[]:S,y];S=e,f?f(n,3,t):n(...t)}finally{Tt=t}}}else h.run()};return u&&u(C),h=new te(v),h.scheduler=c?()=>c(C,!1):C,y=e=>function(e,t=!1,n=Tt){if(n){let t=$t.get(n);t||$t.set(n,t=[]),t.push(e)}}(e,!1,h),m=h.onStop=()=>{const e=$t.get(h);if(e){if(f)f(e,4);else for(const t of e)t();$t.delete(h)}},n?s?C(!0):S=h.run():c?c(C.bind(null,!0),!0):h.run(),x.pause=h.pause.bind(h),x.resume=h.resume.bind(h),x.stop=x,x}function At(e,t=1/0,n){if(t<=0||!y(e)||e.__v_skip)return e;if(((n=n||new Map).get(e)||0)>=t)return e;if(n.set(e,t),t--,yt(e))At(e.value,t,n);else if(d(e))for(let o=0;o<e.length;o++)At(e[o],t,n);else if(p(e)||f(e))e.forEach(e=>{At(e,t,n)});else if(x(e)){for(const o in e)At(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&At(e[o],t,n)}return e}function Ot(e,t,n,o){try{return o?e(...o):e()}catch(i){Lt(i,t,n)}}function Ft(e,t,n,o){if(g(e)){const i=Ot(e,t,n,o);return i&&_(i)&&i.catch(e=>{Lt(e,t,n)}),i}if(d(e)){const i=[];for(let s=0;s<e.length;s++)i.push(Ft(e[s],t,n,o));return i}}function Lt(e,n,o,i=!0){n&&n.vnode;const{errorHandler:s,throwUnhandledErrorInProduction:r}=n&&n.appContext.config||t;if(n){let t=n.parent;const i=n.proxy,r=`https://vuejs.org/error-reference/#runtime-${o}`;for(;t;){const n=t.ec;if(n)for(let t=0;t<n.length;t++)if(!1===n[t](e,i,r))return;t=t.parent}if(s)return ve(),Ot(s,null,10,[e,i,r]),void me()}!function(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}(e,0,0,i,r)}const It=[];let Mt=-1;const jt=[];let Pt=null,zt=0;const Dt=Promise.resolve();let Nt=null;function Ut(e){const t=Nt||Dt;return e?t.then(this?e.bind(this):e):t}function Rt(e){if(!(1&e.flags)){const t=Bt(e),n=It[It.length-1];!n||!(2&e.flags)&&t>=Bt(n)?It.push(e):It.splice(function(e){let t=Mt+1,n=It.length;for(;t<n;){const o=t+n>>>1,i=It[o],s=Bt(i);s<e||s===e&&2&i.flags?t=o+1:n=o}return t}(t),0,e),e.flags|=1,Ht()}}function Ht(){Nt||(Nt=Dt.then(qt))}function Wt(e,t,n=Mt+1){for(;n<It.length;n++){const t=It[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;It.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function Vt(e){if(jt.length){const e=[...new Set(jt)].sort((e,t)=>Bt(e)-Bt(t));if(jt.length=0,Pt)return void Pt.push(...e);for(Pt=e,zt=0;zt<Pt.length;zt++){const e=Pt[zt];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}Pt=null,zt=0}}const Bt=e=>null==e.id?2&e.flags?-1:1/0:e.id;function qt(e){try{for(Mt=0;Mt<It.length;Mt++){const e=It[Mt];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),Ot(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;Mt<It.length;Mt++){const e=It[Mt];e&&(e.flags&=-2)}Mt=-1,It.length=0,Vt(),Nt=null,(It.length||jt.length)&&qt()}}let Gt=null,Jt=null;function Kt(e){const t=Gt;return Gt=e,Jt=e&&e.type.__scopeId||null,t}function Yt(e,t=Gt,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Wo(-1);const i=Kt(t);let s;try{s=e(...n)}finally{Kt(i),o._d&&Wo(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Zt(e,t,n,o){const i=e.dirs,s=t&&t.dirs;for(let r=0;r<i.length;r++){const l=i[r];s&&(l.oldValue=s[r].value);let a=l.dir[o];a&&(ve(),Ft(a,n,8,[e.el,l,e,t]),me())}}function Xt(e,t,n=!1){const o=ci();if(o||to){let i=to?to._context.provides:o?null==o.parent||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&g(t)?t.call(o&&o.proxy):t}}const Qt=Symbol.for("v-scx");function en(e,t,n){return tn(e,t,n)}function tn(e,n,i=t){const{immediate:s,deep:r,flush:a,once:c}=i,u=l({},i),d=n&&s||!n&&"post"!==a;let f;if(gi)if("sync"===a){const e=Xt(Qt);f=e.__watcherHandles||(e.__watcherHandles=[])}else if(!d){const e=()=>{};return e.stop=o,e.resume=o,e.pause=o,e}const p=ai;u.call=(e,t,n)=>Ft(e,p,t,n);let h=!1;"post"===a?u.scheduler=e=>{$o(e,p&&p.suspense)}:"sync"!==a&&(h=!0,u.scheduler=(e,t)=>{t?e():Rt(e)}),u.augmentJob=e=>{n&&(e.flags|=4),h&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};const g=Et(e,n,u);return gi&&(f?f.push(g):d&&g()),g}function nn(e,t,n){const o=this.proxy,i=v(e)?e.includes(".")?on(o,e):()=>o[e]:e.bind(o,o);let s;g(t)?s=t:(s=t.handler,n=t);const r=fi(this),l=tn(i,s.bind(o),n);return r(),l}function on(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}const sn=Symbol("_vte"),rn=Symbol("_leaveCb");function ln(e,t){6&e.shapeFlag&&e.component?(e.transition=t,ln(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function an(e,t){return g(e)?(()=>l({name:e.name},t,{setup:e}))():e}function cn(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function un(e,t){let n;return!(!(n=Object.getOwnPropertyDescriptor(e,t))||n.configurable)}const dn=new WeakMap;function fn(e,n,o,s,r=!1){if(d(e))return void e.forEach((e,t)=>fn(e,n&&(d(n)?n[t]:n),o,s,r));if(hn(s)&&!r)return void(512&s.shapeFlag&&s.type.__asyncResolved&&s.component.subTree.component&&fn(e,n,o,s.component.subTree));const l=4&s.shapeFlag?_i(s.component):s.el,c=r?null:l,{i:f,r:p}=e,h=n&&n.r,m=f.refs===t?f.refs={}:f.refs,y=f.setupState,_=gt(y),b=y===t?i:e=>!un(m,e)&&u(_,e),w=(e,t)=>!t||!un(m,t);if(null!=h&&h!==p)if(pn(n),v(h))m[h]=null,b(h)&&(y[h]=null);else if(yt(h)){const e=n;w(0,e.k)&&(h.value=null),e.k&&(m[e.k]=null)}if(g(p))Ot(p,f,12,[c,m]);else{const t=v(p),n=yt(p);if(t||n){const i=()=>{if(e.f){const n=t?b(p)?y[p]:m[p]:w()||!e.k?p.value:m[e.k];if(r)d(n)&&a(n,l);else if(d(n))n.includes(l)||n.push(l);else if(t)m[p]=[l],b(p)&&(y[p]=m[p]);else{const t=[l];w(0,e.k)&&(p.value=t),e.k&&(m[e.k]=t)}}else t?(m[p]=c,b(p)&&(y[p]=c)):n&&(w(0,e.k)&&(p.value=c),e.k&&(m[e.k]=c))};if(c){const t=()=>{i(),dn.delete(e)};t.id=-1,dn.set(e,t),$o(t,o)}else pn(e),i()}}}function pn(e){const t=dn.get(e);t&&(t.flags|=8,dn.delete(e))}z().requestIdleCallback,z().cancelIdleCallback;const hn=e=>!!e.type.__asyncLoader,gn=e=>e.type.__isKeepAlive;function vn(e,t){yn(e,"a",t)}function mn(e,t){yn(e,"da",t)}function yn(e,t,n=ai){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(bn(t,o,n),n){let e=n.parent;for(;e&&e.parent;)gn(e.parent.vnode)&&_n(o,t,n,e),e=e.parent}}function _n(e,t,n,o){const i=bn(t,e,o,!0);Tn(()=>{a(o[t],i)},n)}function bn(e,t,n=ai,o=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{ve();const i=fi(n),s=Ft(t,n,e,o);return i(),me(),s});return o?i.unshift(s):i.push(s),s}}const wn=e=>(t,n=ai)=>{gi&&"sp"!==e||bn(e,(...e)=>t(...e),n)},xn=wn("bm"),Sn=wn("m"),Cn=wn("bu"),kn=wn("u"),$n=wn("bum"),Tn=wn("um"),En=wn("sp"),An=wn("rtg"),On=wn("rtc");function Fn(e,t=ai){bn("ec",e,t)}const Ln=Symbol.for("v-ndc");function In(e,t,n={},o,i){if(Gt.ce||Gt.parent&&hn(Gt.parent)&&Gt.parent.ce){const e=Object.keys(n).length>0;return Ro(),qo(jo,null,[Xo("slot",n,o)],e?-2:64)}let s=e[t];s&&s._c&&(s._d=!1),Ro();const r=s&&Mn(s(n)),l=n.key||r&&r.key,a=qo(jo,{key:(l&&!m(l)?l:`_${t}`)+(!r&&o?"_fb":"")},r||[],r&&1===e._?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function Mn(e){return e.some(e=>!Go(e)||e.type!==zo&&!(e.type===jo&&!Mn(e.children)))?e:null}const jn=e=>e?hi(e)?_i(e):jn(e.parent):null,Pn=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>jn(e.parent),$root:e=>jn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vn(e),$forceUpdate:e=>e.f||(e.f=()=>{Rt(e.update)}),$nextTick:e=>e.n||(e.n=Ut.bind(e.proxy)),$watch:e=>nn.bind(e)}),zn=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Dn={get({_:e},n){if("__v_skip"===n)return!0;const{ctx:o,setupState:i,data:s,props:r,accessCache:l,type:a,appContext:c}=e;if("$"!==n[0]){const e=l[n];if(void 0!==e)switch(e){case 1:return i[n];case 2:return s[n];case 4:return o[n];case 3:return r[n]}else{if(zn(i,n))return l[n]=1,i[n];if(s!==t&&u(s,n))return l[n]=2,s[n];if(u(r,n))return l[n]=3,r[n];if(o!==t&&u(o,n))return l[n]=4,o[n];Un&&(l[n]=0)}}const d=Pn[n];let f,p;return d?("$attrs"===n&&Te(e.attrs,0,""),d(e)):(f=a.__cssModules)&&(f=f[n])?f:o!==t&&u(o,n)?(l[n]=4,o[n]):(p=c.config.globalProperties,u(p,n)?p[n]:void 0)},set({_:e},n,o){const{data:i,setupState:s,ctx:r}=e;return zn(s,n)?(s[n]=o,!0):i!==t&&u(i,n)?(i[n]=o,!0):!u(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(r[n]=o,!0))},has({_:{data:e,setupState:n,accessCache:o,ctx:i,appContext:s,props:r,type:l}},a){let c;return!!(o[a]||e!==t&&"$"!==a[0]&&u(e,a)||zn(n,a)||u(r,a)||u(i,a)||u(Pn,a)||u(s.config.globalProperties,a)||(c=l.__cssModules)&&c[a])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:u(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Nn(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let Un=!0;function Rn(e){const t=Vn(e),n=e.proxy,i=e.ctx;Un=!1,t.beforeCreate&&Hn(t.beforeCreate,e,"bc");const{data:s,computed:r,methods:l,watch:a,provide:c,inject:u,created:f,beforeMount:p,mounted:h,beforeUpdate:v,updated:m,activated:_,deactivated:b,beforeDestroy:w,beforeUnmount:x,destroyed:S,unmounted:C,render:k,renderTracked:$,renderTriggered:T,errorCaptured:E,serverPrefetch:A,expose:O,inheritAttrs:F,components:L,directives:I,filters:M}=t;if(u&&function(e,t){d(e)&&(e=Jn(e));for(const n in e){const o=e[n];let i;i=y(o)?"default"in o?Xt(o.from||n,o.default,!0):Xt(o.from||n):Xt(o),yt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}(u,i,null),l)for(const o in l){const e=l[o];g(e)&&(i[o]=e.bind(n))}if(s){const t=s.call(n,n);y(t)&&(e.data=lt(t))}if(Un=!0,r)for(const d in r){const e=r[d],t=g(e)?e.bind(n,n):g(e.get)?e.get.bind(n,n):o,s=!g(e)&&g(e.set)?e.set.bind(n):o,l=bi({get:t,set:s});Object.defineProperty(i,d,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(a)for(const o in a)Wn(a[o],i,n,o);if(c){const e=g(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{!function(e,t){if(ai){let n=ai.provides;const o=ai.parent&&ai.parent.provides;o===n&&(n=ai.provides=Object.create(o)),n[e]=t}}(t,e[t])})}function j(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(f&&Hn(f,e,"c"),j(xn,p),j(Sn,h),j(Cn,v),j(kn,m),j(vn,_),j(mn,b),j(Fn,E),j(On,$),j(An,T),j($n,x),j(Tn,C),j(En,A),d(O))if(O.length){const t=e.exposed||(e.exposed={});O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});k&&e.render===o&&(e.render=k),null!=F&&(e.inheritAttrs=F),L&&(e.components=L),I&&(e.directives=I),A&&cn(e)}function Hn(e,t,n){Ft(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Wn(e,t,n,o){let i=o.includes(".")?on(n,o):()=>n[o];if(v(e)){const n=t[e];g(n)&&en(i,n)}else if(g(e))en(i,e.bind(n));else if(y(e))if(d(e))e.forEach(e=>Wn(e,t,n,o));else{const o=g(e.handler)?e.handler.bind(n):t[e.handler];g(o)&&en(i,o,e)}}function Vn(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,l=s.get(t);let a;return l?a=l:i.length||n||o?(a={},i.length&&i.forEach(e=>Bn(a,e,r,!0)),Bn(a,t,r)):a=t,y(t)&&s.set(t,a),a}function Bn(e,t,n,o=!1){const{mixins:i,extends:s}=t;s&&Bn(e,s,n,!0),i&&i.forEach(t=>Bn(e,t,n,!0));for(const r in t)if(o&&"expose"===r);else{const o=qn[r]||n&&n[r];e[r]=o?o(e[r],t[r]):t[r]}return e}const qn={data:Gn,props:Zn,emits:Zn,methods:Yn,computed:Yn,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:Yn,directives:Yn,watch:function(e,t){if(!e)return t;if(!t)return e;const n=l(Object.create(null),e);for(const o in t)n[o]=Kn(e[o],t[o]);return n},provide:Gn,inject:function(e,t){return Yn(Jn(e),Jn(t))}};function Gn(e,t){return t?e?function(){return l(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function Jn(e){if(d(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Kn(e,t){return e?[...new Set([].concat(e,t))]:t}function Yn(e,t){return e?l(Object.create(null),e,t):t}function Zn(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:l(Object.create(null),Nn(e),Nn(null!=t?t:{})):t}function Xn(){return{app:null,config:{isNativeTag:i,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 Qn=0;function eo(e,t){return function(t,n=null){g(t)||(t=l({},t)),null==n||y(n)||(n=null);const o=Xn(),i=new WeakSet,s=[];let r=!1;const a=o.app={_uid:Qn++,_component:t,_props:n,_container:null,_context:o,_instance:null,version:wi,get config(){return o.config},set config(e){},use:(e,...t)=>(i.has(e)||(e&&g(e.install)?(i.add(e),e.install(a,...t)):g(e)&&(i.add(e),e(a,...t))),a),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),a),component:(e,t)=>t?(o.components[e]=t,a):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,a):o.directives[e],mount(i,s,l){if(!r){const s=a._ceVNode||Xo(t,n);return s.appContext=o,!0===l?l="svg":!1===l&&(l=void 0),e(s,i,l),r=!0,a._container=i,i.__vue_app__=a,_i(s.component)}},onUnmount(e){s.push(e)},unmount(){r&&(Ft(s,a._instance,16),e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,a),runWithContext(e){const t=to;to=a;try{return e()}finally{to=t}}};return a}}let to=null;function no(e,n,...o){if(e.isUnmounted)return;const i=e.vnode.props||t;let s=o;const r=n.startsWith("update:"),l=r&&((e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${A(t)}Modifiers`])(i,n.slice(7));let a;l&&(l.trim&&(s=o.map(e=>v(e)?e.trim():e)),l.number&&(s=o.map(j)));let c=i[a=F(n)]||i[a=F(T(n))];!c&&r&&(c=i[a=F(A(n))]),c&&Ft(c,e,6,s);const u=i[a+"Once"];if(u){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,Ft(u,e,6,s)}}const oo=new WeakMap;function io(e,t,n=!1){const o=n?oo:t.emitsCache,i=o.get(e);if(void 0!==i)return i;const s=e.emits;let r={},a=!1;if(!g(e)){const o=e=>{const n=io(e,t,!0);n&&(a=!0,l(r,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||a?(d(s)?s.forEach(e=>r[e]=null):l(r,s),y(e)&&o.set(e,r),r):(y(e)&&o.set(e,null),null)}function so(e,t){return!(!e||!s(t))&&(t=t.slice(2).replace(/Once$/,""),u(e,t[0].toLowerCase()+t.slice(1))||u(e,A(t))||u(e,t))}function ro(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[s],slots:l,attrs:a,emit:c,render:u,renderCache:d,props:f,data:p,setupState:h,ctx:g,inheritAttrs:v}=e,m=Kt(e);let y,_;try{if(4&n.shapeFlag){const e=i||o,t=e;y=ni(u.call(t,e,d,f,h,p,g)),_=a}else{const e=t;0,y=ni(e.length>1?e(f,{attrs:a,slots:l,emit:c}):e(f,null)),_=t.props?a:lo(a)}}catch(w){No.length=0,Lt(w,e,1),y=Xo(zo)}let b=y;if(_&&!1!==v){const e=Object.keys(_),{shapeFlag:t}=b;e.length&&7&t&&(s&&e.some(r)&&(_=ao(_,s)),b=Qo(b,_,!1,!0))}return n.dirs&&(b=Qo(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ln(b,n.transition),y=b,Kt(m),y}const lo=e=>{let t;for(const n in e)("class"===n||"style"===n||s(n))&&((t||(t={}))[n]=e[n]);return t},ao=(e,t)=>{const n={};for(const o in e)r(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function co(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const s=o[i];if(uo(t,e,s)&&!so(n,s))return!0}return!1}function uo(e,t,n){const o=e[n],i=t[n];return"style"===n&&y(o)&&y(i)?!q(o,i):o!==i}const fo={},po=()=>Object.create(fo),ho=e=>Object.getPrototypeOf(e)===fo;function go(e,n,o,i){const[s,r]=e.propsOptions;let l,a=!1;if(n)for(let t in n){if(C(t))continue;const c=n[t];let d;s&&u(s,d=T(t))?r&&r.includes(d)?(l||(l={}))[d]=c:o[d]=c:so(e.emitsOptions,t)||t in i&&c===i[t]||(i[t]=c,a=!0)}if(r){const n=gt(o),i=l||t;for(let t=0;t<r.length;t++){const l=r[t];o[l]=vo(s,n,l,i[l],e,!u(i,l))}}return a}function vo(e,t,n,o,i,s){const r=e[n];if(null!=r){const e=u(r,"default");if(e&&void 0===o){const e=r.default;if(r.type!==Function&&!r.skipFactory&&g(e)){const{propsDefaults:s}=i;if(n in s)o=s[n];else{const r=fi(i);o=s[n]=e.call(null,t),r()}}else o=e;i.ce&&i.ce._setProp(n,o)}r[0]&&(s&&!e?o=!1:!r[1]||""!==o&&o!==A(n)||(o=!0))}return o}const mo=new WeakMap;function yo(e,o,i=!1){const s=i?mo:o.propsCache,r=s.get(e);if(r)return r;const a=e.props,c={},f=[];let p=!1;if(!g(e)){const t=e=>{p=!0;const[t,n]=yo(e,o,!0);l(c,t),n&&f.push(...n)};!i&&o.mixins.length&&o.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!a&&!p)return y(e)&&s.set(e,n),n;if(d(a))for(let n=0;n<a.length;n++){const e=T(a[n]);_o(e)&&(c[e]=t)}else if(a)for(const t in a){const e=T(t);if(_o(e)){const n=a[t],o=c[e]=d(n)||g(n)?{type:n}:l({},n),i=o.type;let s=!1,r=!0;if(d(i))for(let e=0;e<i.length;++e){const t=i[e],n=g(t)&&t.name;if("Boolean"===n){s=!0;break}"String"===n&&(r=!1)}else s=g(i)&&"Boolean"===i.name;o[0]=s,o[1]=r,(s||u(o,"default"))&&f.push(e)}}const h=[c,f];return y(e)&&s.set(e,h),h}function _o(e){return"$"!==e[0]&&!C(e)}const bo=e=>"_"===e||"_ctx"===e||"$stable"===e,wo=e=>d(e)?e.map(ni):[ni(e)],xo=(e,t,n)=>{if(t._n)return t;const o=Yt((...e)=>wo(t(...e)),n);return o._c=!1,o},So=(e,t,n)=>{const o=e._ctx;for(const i in e){if(bo(i))continue;const n=e[i];if(g(n))t[i]=xo(0,n,o);else if(null!=n){const e=wo(n);t[i]=()=>e}}},Co=(e,t)=>{const n=wo(t);e.slots.default=()=>n},ko=(e,t,n)=>{for(const o in t)!n&&bo(o)||(e[o]=t[o])},$o=function(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):(d(n=e)?jt.push(...n):Pt&&-1===n.id?Pt.splice(zt+1,0,n):1&n.flags||(jt.push(n),n.flags|=1),Ht());var n};function To(e){return function(e){z().__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:l,createText:a,createComment:c,setText:d,setElementText:f,parentNode:p,nextSibling:h,setScopeId:g=o,insertStaticContent:v}=e,m=(e,t,n,o=null,i=null,s=null,r=void 0,l=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!Jo(e,t)&&(o=X(e),G(e,i,s,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:d}=t;switch(c){case Po:y(e,t,n,o);break;case zo:b(e,t,n,o);break;case Do:null==e&&w(t,n,o,r);break;case jo:P(e,t,n,o,i,s,r,l,a);break;default:1&d?k(e,t,n,o,i,s,r,l,a):6&d?D(e,t,n,o,i,s,r,l,a):(64&d||128&d)&&c.process(e,t,n,o,i,s,r,l,a,oe)}null!=u&&i?fn(u,e&&e.ref,s,t||e,!t):null==u&&e&&null!=e.ref&&fn(e.ref,null,s,e,!0)},y=(e,t,n,o)=>{if(null==e)i(t.el=a(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},b=(e,t,n,o)=>{null==e?i(t.el=c(t.children||""),n,o):t.el=e.el},w=(e,t,n,o)=>{[e.el,e.anchor]=v(e.children,t,n,o,e.el,e.anchor)},x=({el:e,anchor:t},n,o)=>{let s;for(;e&&e!==t;)s=h(e),i(e,n,o),e=s;i(t,n,o)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},k=(e,t,n,o,i,s,r,l,a)=>{if("svg"===t.type?r="svg":"math"===t.type&&(r="mathml"),null==e)$(t,n,o,i,s,r,l,a);else{const n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),F(e,t,i,s,r,l,a)}finally{n&&n._endPatch()}}},$=(e,t,n,o,s,a,c,u)=>{let d,p;const{props:h,shapeFlag:g,transition:v,dirs:m}=e;if(d=e.el=l(e.type,a,h&&h.is,h),8&g?f(d,e.children):16&g&&O(e.children,d,null,o,s,Eo(e,a),c,u),m&&Zt(e,null,o,"created"),E(d,e,e.scopeId,c,o),h){for(const e in h)"value"===e||C(e)||r(d,e,null,h[e],a,o);"value"in h&&r(d,"value",null,h.value,a),(p=h.onVnodeBeforeMount)&&si(p,o,e)}m&&Zt(e,null,o,"beforeMount");const y=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(s,v);y&&v.beforeEnter(d),i(d,t,n),((p=h&&h.onVnodeMounted)||y||m)&&$o(()=>{p&&si(p,o,e),y&&v.enter(d),m&&Zt(e,null,o,"mounted")},s)},E=(e,t,n,o,i)=>{if(n&&g(e,n),o)for(let s=0;s<o.length;s++)g(e,o[s]);if(i){let n=i.subTree;if(t===n||Mo(n.type)&&(n.ssContent===t||n.ssFallback===t)){const t=i.vnode;E(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},O=(e,t,n,o,i,s,r,l,a=0)=>{for(let c=a;c<e.length;c++){const a=e[c]=l?oi(e[c]):ni(e[c]);m(null,a,t,n,o,i,s,r,l)}},F=(e,n,o,i,s,l,a)=>{const c=n.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=n;u|=16&e.patchFlag;const h=e.props||t,g=n.props||t;let v;if(o&&Ao(o,!1),(v=g.onVnodeBeforeUpdate)&&si(v,o,n,e),p&&Zt(n,e,o,"beforeUpdate"),o&&Ao(o,!0),(h.innerHTML&&null==g.innerHTML||h.textContent&&null==g.textContent)&&f(c,""),d?L(e.dynamicChildren,d,c,o,i,Eo(n,s),l):a||W(e,n,c,null,o,i,Eo(n,s),l,!1),u>0){if(16&u)j(c,h,g,o,s);else if(2&u&&h.class!==g.class&&r(c,"class",null,g.class,s),4&u&&r(c,"style",h.style,g.style,s),8&u){const e=n.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t],i=h[n],l=g[n];l===i&&"value"!==n||r(c,n,i,l,s,o)}}1&u&&e.children!==n.children&&f(c,n.children)}else a||null!=d||j(c,h,g,o,s);((v=g.onVnodeUpdated)||p)&&$o(()=>{v&&si(v,o,n,e),p&&Zt(n,e,o,"updated")},i)},L=(e,t,n,o,i,s,r)=>{for(let l=0;l<t.length;l++){const a=e[l],c=t[l],u=a.el&&(a.type===jo||!Jo(a,c)||198&a.shapeFlag)?p(a.el):n;m(a,c,u,null,o,i,s,r,!0)}},j=(e,n,o,i,s)=>{if(n!==o){if(n!==t)for(const t in n)C(t)||t in o||r(e,t,n[t],null,s,i);for(const t in o){if(C(t))continue;const l=o[t],a=n[t];l!==a&&"value"!==t&&r(e,t,a,l,s,i)}"value"in o&&r(e,"value",n.value,o.value,s)}},P=(e,t,n,o,s,r,l,c,u)=>{const d=t.el=e?e.el:a(""),f=t.anchor=e?e.anchor:a("");let{patchFlag:p,dynamicChildren:h,slotScopeIds:g}=t;g&&(c=c?c.concat(g):g),null==e?(i(d,n,o),i(f,n,o),O(t.children||[],n,f,s,r,l,c,u)):p>0&&64&p&&h&&e.dynamicChildren&&e.dynamicChildren.length===h.length?(L(e.dynamicChildren,h,n,s,r,l,c),(null!=t.key||s&&t===s.subTree)&&Oo(e,t,!0)):W(e,t,n,f,s,r,l,c,u)},D=(e,t,n,o,i,s,r,l,a)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?i.ctx.activate(t,n,o,r,a):N(t,n,o,i,s,r,a):U(e,t,a)},N=(e,n,o,i,s,r,l)=>{const a=e.component=function(e,n,o){const i=e.type,s=(n?n.appContext:e.appContext)||ri,r={uid:li++,vnode:e,type:i,parent:n,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Q(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(s.provides),ids:n?n.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:yo(i,s),emitsOptions:io(i,s),emit:null,emitted:null,propsDefaults:t,inheritAttrs:i.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:o,suspenseId:o?o.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};r.ctx={_:r},r.root=n?n.root:r,r.emit=no.bind(null,r),e.ce&&e.ce(r);return r}(e,i,s);if(gn(e)&&(a.ctx.renderer=oe),function(e,t=!1,n=!1){t&&di(t);const{props:o,children:i}=e.vnode,s=hi(e);(function(e,t,n,o=!1){const i={},s=po();e.propsDefaults=Object.create(null),go(e,t,i,s);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=o?i:at(i):e.type.props?e.props=i:e.props=s,e.attrs=s})(e,o,s,t),((e,t,n)=>{const o=e.slots=po();if(32&e.vnode.shapeFlag){const e=t._;e?(ko(o,t,n),n&&M(o,"_",e,!0)):So(t,o)}else t&&Co(e,t)})(e,i,n||t);const r=s?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Dn);const{setup:o}=n;if(o){ve();const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,yi),slots:e.slots,emit:e.emit,expose:t}}(e):null,i=fi(e),s=Ot(o,e,0,[e.props,n]),r=_(s);if(me(),i(),!r&&!e.sp||hn(e)||cn(e),r){if(s.then(pi,pi),t)return s.then(t=>{vi(e,t)}).catch(t=>{Lt(t,e,0)});e.asyncDep=s}else vi(e,s)}else mi(e)}(e,t):void 0;t&&di(!1)}(a,!1,l),a.asyncDep){if(s&&s.registerDep(a,R,l),!e.el){const t=a.subTree=Xo(zo);b(null,t,n,o),e.placeholder=t.el}}else R(a,e,n,o,s,r,l)},U=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:i,component:s}=e,{props:r,children:l,patchFlag:a}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&a>=0))return!(!i&&!l||l&&l.$stable)||o!==r&&(o?!r||co(o,r,c):!!r);if(1024&a)return!0;if(16&a)return o?co(o,r,c):!!r;if(8&a){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(uo(r,o,n)&&!so(c,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void H(o,t,n);o.next=t,o.update()}else t.el=e.el,o.vnode=t},R=(e,t,n,o,i,s,r)=>{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:l,vnode:a}=e;{const n=Fo(e);if(n)return t&&(t.el=a.el,H(e,t,r)),void n.asyncDep.then(()=>{$o(()=>{e.isUnmounted||c()},i)})}let u,d=t;Ao(e,!1),t?(t.el=a.el,H(e,t,r)):t=a,n&&I(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&si(u,l,t,a),Ao(e,!0);const f=ro(e),h=e.subTree;e.subTree=f,m(h,f,p(h.el),X(h),e,i,s),t.el=f.el,null===d&&function({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}(e,f.el),o&&$o(o,i),(u=t.props&&t.props.onVnodeUpdated)&&$o(()=>si(u,l,t,a),i)}else{let r;const{el:l,props:a}=t,{bm:c,m:u,parent:d,root:f,type:p}=e,h=hn(t);Ao(e,!1),c&&I(c),!h&&(r=a&&a.onVnodeBeforeMount)&&si(r,d,t),Ao(e,!0);{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);const r=e.subTree=ro(e);m(null,r,n,o,e,i,s),t.el=r.el}if(u&&$o(u,i),!h&&(r=a&&a.onVnodeMounted)){const e=t;$o(()=>si(r,d,e),i)}(256&t.shapeFlag||d&&hn(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&$o(e.a,i),e.isMounted=!0,t=n=o=null}};e.scope.on();const a=e.effect=new te(l);e.scope.off();const c=e.update=a.run.bind(a),u=e.job=a.runIfDirty.bind(a);u.i=e,u.id=e.uid,a.scheduler=()=>Rt(u),Ao(e,!0),c()},H=(e,n,o)=>{n.component=e;const i=e.vnode.props;e.vnode=n,e.next=null,function(e,t,n,o){const{props:i,attrs:s,vnode:{patchFlag:r}}=e,l=gt(i),[a]=e.propsOptions;let c=!1;if(!(o||r>0)||16&r){let o;go(e,t,i,s)&&(c=!0);for(const s in l)t&&(u(t,s)||(o=A(s))!==s&&u(t,o))||(a?!n||void 0===n[s]&&void 0===n[o]||(i[s]=vo(a,l,s,void 0,e,!0)):delete i[s]);if(s!==l)for(const e in s)t&&u(t,e)||(delete s[e],c=!0)}else if(8&r){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let r=n[o];if(so(e.emitsOptions,r))continue;const d=t[r];if(a)if(u(s,r))d!==s[r]&&(s[r]=d,c=!0);else{const t=T(r);i[t]=vo(a,l,t,d,e,!1)}else d!==s[r]&&(s[r]=d,c=!0)}}c&&Ee(e.attrs,"set","")}(e,n.props,i,o),((e,n,o)=>{const{vnode:i,slots:s}=e;let r=!0,l=t;if(32&i.shapeFlag){const e=n._;e?o&&1===e?r=!1:ko(s,n,o):(r=!n.$stable,So(n,s)),l=n}else n&&(Co(e,n),l={default:1});if(r)for(const t in s)bo(t)||null!=l[t]||delete s[t]})(e,n.children,o),ve(),Wt(e),me()},W=(e,t,n,o,i,s,r,l,a=!1)=>{const c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void B(c,d,n,o,i,s,r,l,a);if(256&p)return void V(c,d,n,o,i,s,r,l,a)}8&h?(16&u&&Z(c,i,s),d!==c&&f(n,d)):16&u?16&h?B(c,d,n,o,i,s,r,l,a):Z(c,i,s,!0):(8&u&&f(n,""),16&h&&O(d,n,o,i,s,r,l,a))},V=(e,t,o,i,s,r,l,a,c)=>{t=t||n;const u=(e=e||n).length,d=t.length,f=Math.min(u,d);let p;for(p=0;p<f;p++){const n=t[p]=c?oi(t[p]):ni(t[p]);m(e[p],n,o,null,s,r,l,a,c)}u>d?Z(e,s,r,!0,!1,f):O(t,o,i,s,r,l,a,c,f)},B=(e,t,o,i,s,r,l,a,c)=>{let u=0;const d=t.length;let f=e.length-1,p=d-1;for(;u<=f&&u<=p;){const n=e[u],i=t[u]=c?oi(t[u]):ni(t[u]);if(!Jo(n,i))break;m(n,i,o,null,s,r,l,a,c),u++}for(;u<=f&&u<=p;){const n=e[f],i=t[p]=c?oi(t[p]):ni(t[p]);if(!Jo(n,i))break;m(n,i,o,null,s,r,l,a,c),f--,p--}if(u>f){if(u<=p){const e=p+1,n=e<d?t[e].el:i;for(;u<=p;)m(null,t[u]=c?oi(t[u]):ni(t[u]),o,n,s,r,l,a,c),u++}}else if(u>p)for(;u<=f;)G(e[u],s,r,!0),u++;else{const h=u,g=u,v=new Map;for(u=g;u<=p;u++){const e=t[u]=c?oi(t[u]):ni(t[u]);null!=e.key&&v.set(e.key,u)}let y,_=0;const b=p-g+1;let w=!1,x=0;const S=new Array(b);for(u=0;u<b;u++)S[u]=0;for(u=h;u<=f;u++){const n=e[u];if(_>=b){G(n,s,r,!0);continue}let i;if(null!=n.key)i=v.get(n.key);else for(y=g;y<=p;y++)if(0===S[y-g]&&Jo(n,t[y])){i=y;break}void 0===i?G(n,s,r,!0):(S[i-g]=u+1,i>=x?x=i:w=!0,m(n,t[i],o,null,s,r,l,a,c),_++)}const C=w?function(e){const t=e.slice(),n=[0];let o,i,s,r,l;const a=e.length;for(o=0;o<a;o++){const a=e[o];if(0!==a){if(i=n[n.length-1],e[i]<a){t[o]=i,n.push(o);continue}for(s=0,r=n.length-1;s<r;)l=s+r>>1,e[n[l]]<a?s=l+1:r=l;a<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,r=n[s-1];for(;s-- >0;)n[s]=r,r=t[r];return n}(S):n;for(y=C.length-1,u=b-1;u>=0;u--){const e=g+u,n=t[e],f=t[e+1],p=e+1<d?f.el||Io(f):i;0===S[u]?m(null,n,o,p,s,r,l,a,c):w&&(y<0||u!==C[y]?q(n,o,p,2):y--)}}},q=(e,t,n,o,r=null)=>{const{el:l,type:a,transition:c,children:u,shapeFlag:d}=e;if(6&d)return void q(e.component.subTree,t,n,o);if(128&d)return void e.suspense.move(t,n,o);if(64&d)return void a.move(e,t,n,oe);if(a===jo){i(l,t,n);for(let e=0;e<u.length;e++)q(u[e],t,n,o);return void i(e.anchor,t,n)}if(a===Do)return void x(e,t,n);if(2!==o&&1&d&&c)if(0===o)c.beforeEnter(l),i(l,t,n),$o(()=>c.enter(l),r);else{const{leave:o,delayLeave:r,afterLeave:a}=c,u=()=>{e.ctx.isUnmounted?s(l):i(l,t,n)},d=()=>{l._isLeaving&&l[rn](!0),o(l,()=>{u(),a&&a()})};r?r(l,u,d):d()}else i(l,t,n)},G=(e,t,n,o=!1,i=!1)=>{const{type:s,props:r,ref:l,children:a,dynamicChildren:c,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(-2===d&&(i=!1),null!=l&&(ve(),fn(l,null,n,e,!0),me()),null!=p&&(t.renderCache[p]=void 0),256&u)return void t.ctx.deactivate(e);const h=1&u&&f,g=!hn(e);let v;if(g&&(v=r&&r.onVnodeBeforeUnmount)&&si(v,t,e),6&u)Y(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);h&&Zt(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,oe,o):c&&!c.hasOnce&&(s!==jo||d>0&&64&d)?Z(c,t,n,!1,!0):(s===jo&&384&d||!i&&16&u)&&Z(a,t,n),o&&J(e)}(g&&(v=r&&r.onVnodeUnmounted)||h)&&$o(()=>{v&&si(v,t,e),h&&Zt(e,null,t,"unmounted")},n)},J=e=>{const{type:t,el:n,anchor:o,transition:i}=e;if(t===jo)return void K(n,o);if(t===Do)return void S(e);const r=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:o}=i,s=()=>t(n,r);o?o(e.el,r,s):s()}else r()},K=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},Y=(e,t,n)=>{const{bum:o,scope:i,job:s,subTree:r,um:l,m:a,a:c}=e;Lo(a),Lo(c),o&&I(o),i.stop(),s&&(s.flags|=8,G(r,e,t,n)),l&&$o(l,t),$o(()=>{e.isUnmounted=!0},t)},Z=(e,t,n,o=!1,i=!1,s=0)=>{for(let r=s;r<e.length;r++)G(e[r],t,n,o,i)},X=e=>{if(6&e.shapeFlag)return X(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=h(e.anchor||e.el),n=t&&t[sn];return n?h(n):t};let ee=!1;const ne=(e,t,n)=>{let o;null==e?t._vnode&&(G(t._vnode,null,null,!0),o=t._vnode.component):m(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ee||(ee=!0,Wt(o),Vt(),ee=!1)},oe={p:m,um:G,m:q,r:J,mt:N,mc:O,pc:W,pbc:L,n:X,o:e};let ie;return{render:ne,hydrate:ie,createApp:eo(ne)}}(e)}function Eo({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ao({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Oo(e,t,n=!1){const o=e.children,i=t.children;if(d(o)&&d(i))for(let s=0;s<o.length;s++){const e=o[s];let t=i[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=i[s]=oi(i[s]),t.el=e.el),n||-2===t.patchFlag||Oo(e,t)),t.type===Po&&(-1===t.patchFlag&&(t=i[s]=oi(t)),t.el=e.el),t.type!==zo||t.el||(t.el=e.el)}}function Fo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fo(t)}function Lo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Io(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Io(t.subTree):null}const Mo=e=>e.__isSuspense;const jo=Symbol.for("v-fgt"),Po=Symbol.for("v-txt"),zo=Symbol.for("v-cmt"),Do=Symbol.for("v-stc"),No=[];let Uo=null;function Ro(e=!1){No.push(Uo=e?null:[])}let Ho=1;function Wo(e,t=!1){Ho+=e,e<0&&Uo&&t&&(Uo.hasOnce=!0)}function Vo(e){return e.dynamicChildren=Ho>0?Uo||n:null,No.pop(),Uo=No[No.length-1]||null,Ho>0&&Uo&&Uo.push(e),e}function Bo(e,t,n,o,i,s){return Vo(Zo(e,t,n,o,i,s,!0))}function qo(e,t,n,o,i){return Vo(Xo(e,t,n,o,i,!0))}function Go(e){return!!e&&!0===e.__v_isVNode}function Jo(e,t){return e.type===t.type&&e.key===t.key}const Ko=({key:e})=>null!=e?e:null,Yo=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||yt(e)||g(e)?{i:Gt,r:e,k:t,f:!!n}:e:null);function Zo(e,t=null,n=null,o=0,i=null,s=(e===jo?0:1),r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ko(t),ref:t&&Yo(t),scopeId:Jt,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:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Gt};return l?(ii(a,n),128&s&&e.normalize(a)):n&&(a.shapeFlag|=v(n)?8:16),Ho>0&&!r&&Uo&&(a.patchFlag>0||6&s)&&32!==a.patchFlag&&Uo.push(a),a}const Xo=function(e,t=null,n=null,o=0,i=null,s=!1){e&&e!==Ln||(e=zo);if(Go(e)){const o=Qo(e,t,!0);return n&&ii(o,n),Ho>0&&!s&&Uo&&(6&o.shapeFlag?Uo[Uo.indexOf(e)]=o:Uo.push(o)),o.patchFlag=-2,o}r=e,g(r)&&"__vccOpts"in r&&(e=e.__vccOpts);var r;if(t){t=function(e){return e?ht(e)||ho(e)?l({},e):e:null}(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=W(e)),y(n)&&(ht(n)&&!d(n)&&(n=l({},n)),t.style=D(n))}const a=v(e)?1:Mo(e)?128:(e=>e.__isTeleport)(e)?64:y(e)?4:g(e)?2:0;return Zo(e,t,n,o,i,a,s,!0)};function Qo(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:l,children:a,transition:c}=e,u=t?function(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=W([t.class,o.class]));else if("style"===e)t.style=D([t.style,o.style]);else if(s(e)){const n=t[e],i=o[e];!i||n===i||d(n)&&n.includes(i)||(t[e]=n?[].concat(n,i):i)}else""!==e&&(t[e]=o[e])}return t}(i||{},t):i,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Ko(u),ref:t&&t.ref?n&&r?d(r)?r.concat(Yo(t)):[r,Yo(t)]:Yo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==jo?-1===l?16:16|l:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Qo(e.ssContent),ssFallback:e.ssFallback&&Qo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&o&&ln(f,c.clone(f)),f}function ei(e=" ",t=0){return Xo(Po,null,e,t)}function ti(e="",t=!1){return t?(Ro(),qo(zo,null,e)):Xo(zo,null,e)}function ni(e){return null==e||"boolean"==typeof e?Xo(zo):d(e)?Xo(jo,null,e.slice()):Go(e)?oi(e):Xo(Po,null,String(e))}function oi(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Qo(e)}function ii(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(d(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),ii(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||ho(t)?3===o&&Gt&&(1===Gt.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Gt}}else g(t)?(t={default:t,_ctx:Gt},n=32):(t=String(t),64&o?(n=16,t=[ei(t)]):n=8);e.children=t,e.shapeFlag|=n}function si(e,t,n,o=null){Ft(e,t,7,[n,o])}const ri=Xn();let li=0;let ai=null;const ci=()=>ai||Gt;let ui,di;{const e=z(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach(t=>t(e)):o[0](e)}};ui=t("__VUE_INSTANCE_SETTERS__",e=>ai=e),di=t("__VUE_SSR_SETTERS__",e=>gi=e)}const fi=e=>{const t=ai;return ui(e),e.scope.on(),()=>{e.scope.off(),ui(t)}},pi=()=>{ai&&ai.scope.off(),ui(null)};function hi(e){return 4&e.vnode.shapeFlag}let gi=!1;function vi(e,t,n){g(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:y(t)&&(e.setupState=xt(t)),mi(e)}function mi(e,t,n){const i=e.type;e.render||(e.render=i.render||o);{const t=fi(e);ve();try{Rn(e)}finally{me(),t()}}}const yi={get:(e,t)=>(Te(e,0,""),e[t])};function _i(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(xt((t=e.exposed,!u(t,"__v_skip")&&Object.isExtensible(t)&&M(t,"__v_skip",!0),t)),{get:(t,n)=>n in t?t[n]:n in Pn?Pn[n](e):void 0,has:(e,t)=>t in e||t in Pn})):e.proxy;var t}const bi=(e,t)=>Ct(e,0,gi),wi="3.5.30";let xi;const Si="undefined"!=typeof window&&window.trustedTypes;if(Si)try{xi=Si.createPolicy("vue",{createHTML:e=>e})}catch(hr){}const Ci=xi?e=>xi.createHTML(e):e=>e,ki="undefined"!=typeof document?document:null,$i=ki&&ki.createElement("template"),Ti={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i="svg"===t?ki.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?ki.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?ki.createElement(e,{is:n}):ki.createElement(e);return"select"===e&&o&&null!=o.multiple&&i.setAttribute("multiple",o.multiple),i},createText:e=>ki.createTextNode(e),createComment:e=>ki.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ki.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,s){const r=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==s&&(i=i.nextSibling););else{$i.innerHTML=Ci("svg"===o?`<svg>${e}</svg>`:"mathml"===o?`<math>${e}</math>`:e);const i=$i.content;if("svg"===o||"mathml"===o){const e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ei=Symbol("_vtc");const Ai=Symbol("_vod"),Oi=Symbol("_vsh"),Fi=Symbol(""),Li=/(?:^|;)\s*display\s*:/;const Ii=/\s*!important$/;function Mi(e,t,n){if(d(n))n.forEach(n=>Mi(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Pi[t];if(n)return n;let o=T(t);if("filter"!==o&&o in e)return Pi[t]=o;o=O(o);for(let i=0;i<ji.length;i++){const n=ji[i]+o;if(n in e)return Pi[t]=n}return t}(e,t);Ii.test(n)?e.setProperty(A(o),n.replace(Ii,""),"important"):e[o]=n}}const ji=["Webkit","Moz","ms"],Pi={};const zi="http://www.w3.org/1999/xlink";function Di(e,t,n,o,i,s=V(t)){o&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(zi,t.slice(6,t.length)):e.setAttributeNS(zi,t,n):null==n||s&&!B(n)?e.removeAttribute(t):e.setAttribute(t,s?"":m(n)?String(n):n)}function Ni(e,t,n,o,i){if("innerHTML"===t||"textContent"===t)return void(null!=n&&(e[t]="innerHTML"===t?Ci(n):n));const s=e.tagName;if("value"===t&&"PROGRESS"!==s&&!s.includes("-")){const o="OPTION"===s?e.getAttribute("value")||"":e.value,i=null==n?"checkbox"===e.type?"on":"":String(n);return o===i&&"_value"in e||(e.value=i),null==n&&e.removeAttribute(t),void(e._value=n)}let r=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=B(n):null==n&&"string"===o?(n="",r=!0):"number"===o&&(n=0,r=!0)}try{e[t]=n}catch(hr){}r&&e.removeAttribute(i||t)}const Ui=Symbol("_vei");function Ri(e,t,n,o,i=null){const s=e[Ui]||(e[Ui]={}),r=s[t];if(o&&r)r.value=o;else{const[n,l]=function(e){let t;if(Hi.test(e)){let n;for(t={};n=e.match(Hi);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):A(e.slice(2));return[n,t]}(t);if(o){const r=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Ft(function(e,t){if(d(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Bi(),n}(o,i);!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,r,l)}else r&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,r,l),s[t]=void 0)}}const Hi=/(?:Once|Passive|Capture)$/;let Wi=0;const Vi=Promise.resolve(),Bi=()=>Wi||(Vi.then(()=>Wi=0),Wi=Date.now());const qi=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const Gi=l({patchProp:(e,t,n,o,i,l)=>{const a="svg"===i;"class"===t?function(e,t,n){const o=e[Ei];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,a):"style"===t?function(e,t,n){const o=e.style,i=v(n);let s=!1;if(n&&!i){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Mi(o,t,"")}else for(const e in t)null==n[e]&&Mi(o,e,"");for(const e in n)"display"===e&&(s=!0),Mi(o,e,n[e])}else if(i){if(t!==n){const e=o[Fi];e&&(n+=";"+e),o.cssText=n,s=Li.test(n)}}else t&&e.removeAttribute("style");Ai in e&&(e[Ai]=s?o.display:"",e[Oi]&&(o.display="none"))}(e,n,o):s(t)?r(t)||Ri(e,t,0,o,l):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&qi(t)&&g(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"autocorrect"===t)return!1;if("sandbox"===t&&"IFRAME"===e.tagName)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(qi(t)&&v(n))return!1;return t in e}(e,t,o,a))?(Ni(e,t,o),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Di(e,t,o,a,0,"value"!==t)):e._isVueCE&&(function(e,t){const n=e._def.props;if(!n)return!1;const o=T(t);return Array.isArray(n)?n.some(e=>T(e)===o):Object.keys(n).some(e=>T(e)===o)}(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!v(o)))?Ni(e,T(t),o,0,t):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),Di(e,t,o,a))}},Ti);let Ji;const Ki=(...e)=>{const t=(Ji||(Ji=To(Gi))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(v(e)){return document.querySelector(e)}return e}(e);if(!o)return;const i=t._component;g(i)||i.render||i.template||(i.template=o.innerHTML),1===o.nodeType&&(o.textContent="");const s=n(o,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};const Yi={enabled:!0,customElementName:"wmt-fanid-protected",placeholder:{title:"Exclusive Content",message:"Sign in with FanID to view this content",buttonText:"Sign In"},style:"blur",blurAmount:8,minHeight:280,revealAnimation:"fade"};class Zi{state;listeners=new Set;constructor(e){this.state={initialized:!1,isAuthenticated:!1,profile:null,organization:null,classPrefix:"_"+Math.random().toString(36).slice(2,7),config:{...Yi,...e,placeholder:{...Yi.placeholder,...e?.placeholder}}}}getState(){return this.state}update(e){this.state={...this.state,...e},this.notify()}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){for(const e of this.listeners)e(this.state)}}let Xi=null;function Qi(){if(!Xi)throw new Error("FanIDState not initialized. Call FanIDWidget.init() first.");return Xi}class es{handlers=new Map;on(e,t){this.handlers.has(e)||this.handlers.set(e,new Set),this.handlers.get(e).add(t)}off(e,t){this.handlers.get(e)?.delete(t)}emit(e,...t){const n=this.handlers.get(e);if(n)for(const o of n)try{o(...t)}catch{}}removeAll(){this.handlers.clear()}}let ts=null;function ns(){if(!ts)throw new Error("FanIDEvents not initialized. Call FanIDWidget.init() first.");return ts}function os(e,t){const n=parseInt(e.replace("#",""),16),o=Math.round(2.55*t);return"#"+(16777216+65536*Math.max(0,(n>>16)-o)+256*Math.max(0,(n>>8&255)-o)+Math.max(0,(255&n)-o)).toString(16).slice(1)}const is=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},ss={class:"fanid-widget"},rs={class:"fanid-widget__container"};const ls=is({},[["render",function(e,t){return Ro(),Bo("div",ss,[Zo("div",rs,[Zo("button",{"aria-label":"Close Widget",class:"fanid-widget__close",label:"Close Widget",onClick:t[0]||(t[0]=t=>e.$emit("close"))}," × "),In(e.$slots,"default")])])}]]),as=["alt","src"],cs=an({__name:"FanIDLogo",props:{logo:{},organizationName:{}},setup:e=>(t,n)=>e.logo?(Ro(),Bo("img",{key:0,alt:e.organizationName||"WMT Fan ID",src:e.logo,class:"fanid-widget__icon"},null,8,as)):ti("",!0)}),us={class:"fanid-widget__content"},ds={class:"fanid-widget__brand"},fs={class:"fanid-widget__brand-text"},ps={class:"fanid-widget__brand-label"},hs=an({__name:"LoginDefault",props:{logo:{},organizationName:{}},emits:["login"],setup:e=>(t,n)=>(Ro(),Bo("div",us,[Zo("div",ds,[e.logo?(Ro(),qo(cs,{key:0,logo:e.logo,"organization-name":e.organizationName},null,8,["logo","organization-name"])):ti("",!0),Zo("div",fs,[Zo("span",ps,J(e.organizationName||"Fan")+" ID",1),n[1]||(n[1]=Zo("span",{class:"fanid-widget__text"},"Sign in to access exclusive content",-1))])]),Zo("button",{class:"fanid-widget__button",onClick:n[0]||(n[0]=e=>t.$emit("login"))}," Sign In ")]))}),gs={height:"24",viewBox:"0 0 24 24",width:"24"};const vs=is({},[["render",function(e,t){return Ro(),Bo("svg",gs,[...t[0]||(t[0]=[Zo("path",{d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h6q.425 0 .713.288T12 20t-.288.713T11 21zm12.175-8H10q-.425 0-.712-.288T9 12t.288-.712T10 11h7.175L15.3 9.125q-.275-.275-.275-.675t.275-.7t.7-.313t.725.288L20.3 11.3q.3.3.3.7t-.3.7l-3.575 3.575q-.3.3-.712.288t-.713-.313q-.275-.3-.262-.712t.287-.688z",fill:"#002B5C"},null,-1)])])}]]),ms={class:"fanid-widget__content fanid-widget__content--logged-in"},ys={class:"fanid-widget__user-info"},_s={class:"fanid-widget__user-avatar"},bs={class:"fanid-widget__user-text"},ws={class:"fanid-widget__user-name"},xs={class:"fanid-widget__user-email"},Ss={class:"fanid-widget__actions"},Cs=an({__name:"LoggedIn",props:{displayName:{},email:{}},emits:["logout","redirect"],setup:e=>(t,n)=>(Ro(),Bo("div",ms,[Zo("div",ys,[Zo("div",_s,J((e.displayName||"U").charAt(0).toUpperCase()),1),Zo("div",bs,[Zo("div",ws,J(e.displayName),1),Zo("div",xs,J(e.email),1)])]),Zo("div",Ss,[Zo("button",{class:"fanid-widget__redirect-button",onClick:n[0]||(n[0]=e=>t.$emit("redirect"))}," My profile "),Zo("button",{class:"fanid-widget__logout-button",title:"Sign out",onClick:n[1]||(n[1]=e=>t.$emit("logout"))},[Xo(vs)])])]))}),ks={class:"fanid-widget__loading"};const $s=is({},[["render",function(e,t){return Ro(),Bo("div",ks,"Loading...")}]]),Ts=an({__name:"Widget",setup(e){const t=_t(!0),n=_t(!1),o=_t(!1),i=_t(null),s=_t(null),r=bi(()=>i.value?.firstName||null),l=bi(()=>i.value?.email||null),a=bi(()=>s.value?.name??null),c=bi(()=>s.value?.branding?.logoUrl??null),u=bi(()=>{const e=s.value?.branding?.primaryColor;return e?{"--fanid-primary-color":e,"--fanid-primary-color-hover":os(e,15)}:{}}),d=()=>{window.__fanid_api?.redirectToLogin()},f=()=>{const e=window.__fanid_api?.getMyProfileUrl();e&&(window.location.href=e)},p=async()=>{n.value=!0;try{await(window.__fanid_api?.logout()),o.value=!1,i.value=null,Qi().update({isAuthenticated:!1,profile:null}),ns().emit("auth:logout")}finally{n.value=!1}},h=()=>{t.value=!1,sessionStorage.setItem("fanid_widget_closed","true")};let g=null;return Sn(()=>{"true"===sessionStorage.getItem("fanid_widget_closed")&&(t.value=!1);const e=Qi(),n=e.getState();o.value=n.isAuthenticated,i.value=n.profile,s.value=n.organization,g=e.subscribe(e=>{o.value=e.isAuthenticated,i.value=e.profile,s.value=e.organization})}),Tn(()=>{g?.()}),(e,i)=>t.value?(Ro(),qo(ls,{key:0,style:D(u.value),onClose:h},{default:Yt(()=>[n.value?(Ro(),qo($s,{key:0})):o.value?(Ro(),qo(Cs,{key:2,"display-name":r.value,email:l.value,onLogout:p,onRedirect:f},null,8,["display-name","email"])):(Ro(),qo(hs,{key:1,logo:c.value,"organization-name":a.value,onLogin:d},null,8,["logo","organization-name"]))]),_:1},8,["style"])):ti("",!0)}}),Es={fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},As={silent:{level:-1},fatal:{level:Es.fatal},error:{level:Es.error},warn:{level:Es.warn},log:{level:Es.log},info:{level:Es.info},success:{level:Es.success},fail:{level:Es.fail},ready:{level:Es.info},start:{level:Es.info},box:{level:Es.info},debug:{level:Es.debug},trace:{level:Es.trace},verbose:{level:Es.verbose}};function Os(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&(!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e)))}function Fs(e,t,n=".",o){if(!Os(t))return Fs(e,{},n);const i=Object.assign({},t);for(const s in e){if("__proto__"===s||"constructor"===s)continue;const t=e[s];null!=t&&(Array.isArray(t)&&Array.isArray(i[s])?i[s]=[...t,...i[s]]:Os(t)&&Os(i[s])?i[s]=Fs(t,i[s],(n?`${n}.`:"")+s.toString()):i[s]=t)}return i}const Ls=(...e)=>e.reduce((e,t)=>Fs(e,t,""),{});function Is(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let Ms=!1;const js=[];class Ps{options;_lastLog;_mockFn;constructor(e={}){const t=e.types||As;this.options=Ls({...e,defaults:{...e.defaults},level:zs(e.level,t),reporters:[...e.reporters||[]]},{types:As,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const n in t){const e={type:n,...this.options.defaults,...t[n]};this[n]=this._wrapLogFn(e),this[n].raw=this._wrapLogFn(e,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=zs(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,t)}create(e){const t=new Ps({...this.options,...e});return this._mockFn&&t.mockTypes(this._mockFn),t}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){const t=this.options.reporters.indexOf(e);if(-1!==t)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this.options.types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this.options.types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){Ms=!0}resumeLogs(){Ms=!1;const e=js.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){const t=e||this.options.mockFn;if(this._mockFn=t,"function"==typeof t)for(const n in this.options.types)this[n]=t(n,this.options.types[n])||this[n],this[n].raw=this[n]}_wrapLogFn(e,t){return(...n)=>{if(!Ms)return this._logFn(e,n,t);js.push([this,e,n,t])}}_logFn(e,t,n){if((e.level||0)>this.level)return!1;const o={date:new Date,args:[],...e,level:zs(e.level,this.options.types)};!n&&1===t.length&&Is(t[0])?Object.assign(o,t[0]):o.args=[...t],o.message&&(o.args.unshift(o.message),delete o.message),o.additional&&(Array.isArray(o.additional)||(o.additional=o.additional.split("\n")),o.args.push("\n"+o.additional.join("\n")),delete o.additional),o.type="string"==typeof o.type?o.type.toLowerCase():"log",o.tag="string"==typeof o.tag?o.tag:"";const i=(e=!1)=>{const t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){const e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=o,this._log(o))};clearTimeout(this._lastLog.timeout);const s=this._lastLog.time&&o.date?o.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=o.date,s<this.options.throttle)try{const e=JSON.stringify([o.type,o.tag,o.args]),t=this._lastLog.serialized===e;if(this._lastLog.serialized=e,t&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin))return void(this._lastLog.timeout=setTimeout(i,this.options.throttle))}catch{}i(!0)}_log(e){for(const t of this.options.reporters)t.log(e,{options:this.options})}}function zs(e,t={},n=3){return void 0===e?n:"number"==typeof e?e:t[e]&&void 0!==t[e].level?t[e].level:n}Ps.prototype.add=Ps.prototype.addReporter,Ps.prototype.remove=Ps.prototype.removeReporter,Ps.prototype.clear=Ps.prototype.removeReporter,Ps.prototype.withScope=Ps.prototype.withTag,Ps.prototype.mock=Ps.prototype.mockTypes,Ps.prototype.pause=Ps.prototype.pauseLogs,Ps.prototype.resume=Ps.prototype.resumeLogs;class Ds{options;defaultColor;levelColorMap;typeColorMap;constructor(e){this.options={...e},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(e){return e<1?console.__error||console.error:1===e?console.__warn||console.warn:console.__log||console.log}log(e){const t=this._getLogFn(e.level),n="log"===e.type?"":e.type,o=e.tag||"",i=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,s=`%c${[o,n].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${s}%c ${e.args[0]}`,i,"",...e.args.slice(1)):t(s,i,...e.args)}}function Ns(e={}){const t=function(e={}){return new Ps(e)}({reporters:e.reporters||[new Ds({})],prompt:(e,t={})=>"confirm"===t.type?Promise.resolve(confirm(e)):Promise.resolve(prompt(e)),...e});return t}Ns();class Us{baseUrl;orgDomain=null;logger;constructor(e){this.baseUrl=e||"https://fanid.co",this.logger=Ns().withTag("FanIDApi")}async checkAuthStatus(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/me`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(401===e.status)return{isAuthenticated:!1,profile:null};if(404===e.status)return{isAuthenticated:!0,profile:null};if(e.ok){return{isAuthenticated:!0,profile:(await e.json()).data}}throw new Error(`HTTP error! status: ${e.status}`)}catch(e){return this.logger.info("Error checking authentication status:",e),{isAuthenticated:!1,profile:null}}}async getOrganizationProfile(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/organization-profile`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(401===e.status){return await this.refreshToken()?this.getOrganizationProfile():null}if(404===e.status)return null;if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return(await e.json()).data}catch(e){return this.logger.error("Error fetching organization profile:",e),null}}async getMe(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/me`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(401===e.status){return await this.refreshToken()?this.getMe():null}if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return(await e.json()).data}catch(e){return this.logger.error("Error fetching me:",e),null}}async refreshToken(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/refresh`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}});return!!e.ok||(this.logger.error("Failed to refresh token, status:",e.status),!1)}catch(e){return this.logger.error("Error refreshing token:",e),!1}}async logout(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/logout`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}});if(!e.ok)return this.logger.error("Logout failed, status:",e.status),null;return(await e.json()).data}catch(e){return this.logger.error("Error during logout:",e),null}}async getOrganization(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/organization`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const{data:t}=await e.json();return t?.domainName&&(this.orgDomain=t.domainName),t}catch(e){return this.logger.error("Error fetching organization branding:",e),null}}async connectUserToTheFanIdOrg(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/organization-profile`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const{data:t}=await e.json();return t}catch(e){return this.logger.error("Error fetching organization branding:",e),null}}getLoginUrl(e=window.location.href){const t=encodeURIComponent(e);return`${this.orgDomain?`https://${this.orgDomain}/login`:`${this.baseUrl}/login`}?returnUrl=${t}`}getMyProfileUrl(){return`${this.orgDomain?`https://${this.orgDomain}`:this.baseUrl}/my-profile`}redirectToLogin(){window.location.href=this.getLoginUrl()}getBaseUrl(){return this.baseUrl}getOrgDomain(){return this.orgDomain}}let Rs=null,Hs=null;function Ws(e){return{root:`${e}_root`,content:`${e}_content`,overlay:`${e}_overlay`,gradient:`${e}_gradient`,panel:`${e}_panel`,title:`${e}_title`,message:`${e}_msg`,button:`${e}_btn`,logo:`${e}_logo`,revealed:`${e}_revealed`,overlayHost:`${e}_host`,fullpage:`${e}_fullpage`,fullpageClose:`${e}_fpclose`,modeBlur:`${e}_blur`,modeGradient:`${e}_grad`,modeCover:`${e}_cover`}}function Vs(e,t){if(Rs)return;const n=function(e,t){let n=`\n .${e.root} {\n position: var(--fanid-gate-root-position, relative);\n overflow: var(--fanid-gate-root-overflow, hidden);\n min-height: var(--fanid-gate-min-height, ${t.minHeight}px);\n }\n\n .${e.revealed} .${e.content} {\n filter: none !important;\n user-select: auto !important;\n pointer-events: auto !important;\n }\n\n .${e.revealed} .${e.overlay} {\n display: none !important;\n }\n\n .${e.overlay} {\n position: var(--fanid-gate-overlay-position, absolute);\n inset: var(--fanid-gate-overlay-inset, 0);\n display: var(--fanid-gate-overlay-display, flex);\n align-items: var(--fanid-gate-overlay-align, center);\n justify-content: var(--fanid-gate-overlay-justify, center);\n z-index: var(--fanid-gate-overlay-z-index, 1);\n }\n\n .${e.gradient} {\n position: var(--fanid-gate-gradient-position, absolute);\n inset: var(--fanid-gate-gradient-inset, 0);\n pointer-events: var(--fanid-gate-gradient-pointer-events, none);\n }\n\n .${e.panel} {\n position: var(--fanid-gate-panel-position, relative);\n z-index: var(--fanid-gate-panel-z-index, 2);\n background: var(--fanid-gate-panel-bg, white);\n border-radius: var(--fanid-gate-panel-radius, 12px);\n padding: var(--fanid-gate-panel-padding, 32px 28px);\n text-align: var(--fanid-gate-panel-text-align, center);\n max-width: var(--fanid-gate-panel-max-width, 380px);\n width: var(--fanid-gate-panel-width, 90%);\n box-shadow: var(--fanid-gate-panel-shadow, 0 8px 32px rgba(0, 0, 0, 0.12));\n font-family: var(--fanid-gate-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif);\n }\n\n .${e.logo} {\n max-height: var(--fanid-gate-logo-height, 40px);\n max-width: var(--fanid-gate-logo-max-width, 160px);\n object-fit: var(--fanid-gate-logo-fit, contain);\n margin-bottom: var(--fanid-gate-logo-margin, 16px);\n }\n\n .${e.title} {\n font-size: var(--fanid-gate-title-size, 18px);\n font-weight: var(--fanid-gate-title-weight, 700);\n color: var(--fanid-gate-title-color, #002b5c);\n margin: var(--fanid-gate-title-margin, 0 0 8px);\n line-height: var(--fanid-gate-title-line-height, 1.3);\n }\n\n .${e.message} {\n font-size: var(--fanid-gate-message-size, 14px);\n color: var(--fanid-gate-message-color, #002b5c);\n opacity: var(--fanid-gate-message-opacity, 0.7);\n margin: var(--fanid-gate-message-margin, 0 0 20px);\n line-height: var(--fanid-gate-message-line-height, 1.5);\n }\n\n .${e.button} {\n display: var(--fanid-gate-button-display, inline-flex);\n align-items: var(--fanid-gate-button-align, center);\n justify-content: var(--fanid-gate-button-justify, center);\n width: var(--fanid-gate-button-width, 100%);\n height: var(--fanid-gate-button-height, 44px);\n padding: var(--fanid-gate-button-padding, 0 20px);\n background: var(--fanid-gate-button-bg, var(--fanid-primary-color, #f26522));\n color: var(--fanid-gate-button-color, white);\n border: var(--fanid-gate-button-border, none);\n border-radius: var(--fanid-gate-button-radius, 30px);\n font-size: var(--fanid-gate-button-size, 15px);\n font-weight: var(--fanid-gate-button-weight, 600);\n cursor: var(--fanid-gate-button-cursor, pointer);\n transition: var(--fanid-gate-button-transition, filter 0.2s ease);\n font-family: var(--fanid-gate-button-font, inherit);\n }\n\n .${e.button}:hover {\n filter: var(--fanid-gate-button-hover-filter, brightness(0.9));\n }\n\n .${e.button}:active {\n transform: var(--fanid-gate-button-active-transform, scale(0.98));\n }\n\n .${e.overlayHost} {\n position: var(--fanid-gate-host-position, absolute);\n inset: var(--fanid-gate-host-inset, 0);\n z-index: var(--fanid-gate-host-z-index, 1);\n }\n\n .${e.fullpage} {\n position: var(--fanid-gate-fullpage-position, fixed);\n inset: var(--fanid-gate-fullpage-inset, 0);\n z-index: var(--fanid-gate-fullpage-z-index, 999998);\n display: var(--fanid-gate-fullpage-display, flex);\n align-items: var(--fanid-gate-fullpage-align, center);\n justify-content: var(--fanid-gate-fullpage-justify, center);\n background: var(--fanid-gate-fullpage-bg, rgba(255, 255, 255, 0.85));\n backdrop-filter: var(--fanid-gate-fullpage-backdrop, blur(4px));\n }\n\n .${e.fullpage} .${e.panel} {\n pointer-events: var(--fanid-gate-fullpage-panel-pointer-events, auto);\n }\n\n .${e.fullpageClose} {\n position: var(--fanid-gate-close-position, absolute);\n top: var(--fanid-gate-close-top, 12px);\n right: var(--fanid-gate-close-right, 16px);\n background: var(--fanid-gate-close-bg, none);\n border: var(--fanid-gate-close-border, none);\n font-size: var(--fanid-gate-close-size, 28px);\n cursor: var(--fanid-gate-close-cursor, pointer);\n color: var(--fanid-gate-close-color, #002b5c);\n opacity: var(--fanid-gate-close-opacity, 0.5);\n transition: var(--fanid-gate-close-transition, opacity 0.2s);\n line-height: var(--fanid-gate-close-line-height, 1);\n }\n\n .${e.fullpageClose}:hover {\n opacity: var(--fanid-gate-close-hover-opacity, 1);\n }\n `;return n+=function(e,t){return`\n .${e.modeBlur} .${e.content} {\n filter: var(--fanid-gate-content-filter, blur(${t}px));\n user-select: var(--fanid-gate-content-user-select, none);\n pointer-events: var(--fanid-gate-content-pointer-events, none);\n }\n .${e.modeBlur} .${e.gradient} {\n background: var(--fanid-gate-overlay-bg, rgba(255, 255, 255, 0.1));\n backdrop-filter: var(--fanid-gate-overlay-backdrop, blur(2px));\n }\n `}(e,t.blurAmount),n+=function(e,t){const n=t??120;return`\n .${e.modeGradient} .${e.content} {\n user-select: var(--fanid-gate-content-user-select, none);\n pointer-events: var(--fanid-gate-content-pointer-events, none);\n }\n .${e.modeGradient} .${e.gradient} {\n background: var(--fanid-gate-gradient-bg, linear-gradient(\n to bottom,\n transparent ${n}px,\n rgba(255, 255, 255, 0.8) ${n+40}px,\n white ${n+100}px\n ));\n }\n .${e.modeGradient} .${e.overlay} {\n align-items: var(--fanid-gate-overlay-align-gradient, flex-end);\n padding-bottom: var(--fanid-gate-overlay-padding-bottom, 24px);\n }\n `}(e,t.teaserHeight),n+=function(e){return`\n .${e.modeCover} .${e.content} {\n opacity: var(--fanid-gate-content-cover-opacity, 0);\n height: var(--fanid-gate-content-cover-height, 0);\n overflow: var(--fanid-gate-content-cover-overflow, hidden);\n pointer-events: var(--fanid-gate-content-pointer-events, none);\n }\n .${e.modeCover} .${e.gradient} {\n background: var(--fanid-gate-overlay-bg, #f8f9fa);\n }\n `}(e),n+=Bs(e,"fade"),n+=Bs(e,"slide"),n}(Ws(e),t);Rs=document.createElement("style"),Rs.textContent=n,document.head.appendChild(Rs),function(){if(Hs||!Rs)return;const e=Rs;Hs=new MutationObserver(()=>{document.head.contains(e)||document.head.appendChild(e)}),Hs.observe(document.head,{childList:!0})}()}function Bs(e,t){const n=`${e.revealed}_${t}`;return"slide"===t?`\n @keyframes ${n} {\n from { opacity: 0; transform: translateY(10px); }\n to { opacity: 1; transform: translateY(0); }\n }\n .${e.revealed} .${e.content} {\n animation: var(--fanid-gate-reveal-animation, ${n} 0.4s ease-out);\n }\n `:`\n @keyframes ${n} {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n .${e.revealed} .${e.content} {\n animation: var(--fanid-gate-reveal-animation, ${n} 0.3s ease-out);\n }\n `}const qs=new Map;function Gs(e,t){if(qs.has(e))return;const n=()=>{if(!e.querySelector(`.${t.overlay}`)){const t=e;t.connectedCallback&&(t.disconnectedCallback?.(),t.connectedCallback())}},o=new MutationObserver(()=>{n()});o.observe(e,{childList:!0,subtree:!0});const i=setInterval(n,3e3);qs.set(e,{observer:o,intervalId:i})}function Js(e){const t=qs.get(e);t&&(t.observer.disconnect(),clearInterval(t.intervalId),qs.delete(e))}function Ks(e,t){const n=document.createElement("div");if(n.className=e.panel,t.logoUrl){const o=document.createElement("img");o.className=e.logo,o.src=t.logoUrl,o.alt="",n.appendChild(o)}const o=document.createElement("h3");o.className=e.title,o.textContent=t.title,n.appendChild(o);const i=document.createElement("p");i.className=e.message,i.textContent=t.message,n.appendChild(i);const s=document.createElement("button");return s.className=e.button,s.textContent=t.buttonText,n.appendChild(s),n}function Ys(e,t,n,o=!1){o&&(e.innerHTML="");const i=document.createElement("div");i.className=t.overlay,i.setAttribute("role","dialog"),i.setAttribute("aria-label",n.title);const s=document.createElement("div");s.className=t.gradient,i.appendChild(s);const r=Ks(t,n);return i.appendChild(r),e.appendChild(i),i}function Zs(e,t){return{title:e.placeholder.title,message:e.placeholder.message,buttonText:e.placeholder.buttonText,logoUrl:t.organization?.branding?.logoUrl??null}}function Xs(e,t){const n=t.organization?.branding?.primaryColor,o=t.organization?.branding?.accentColor;n&&e.style.setProperty("--fanid-gate-button-bg",n),o&&(e.style.setProperty("--fanid-gate-title-color",o),e.style.setProperty("--fanid-gate-message-color",o))}function Qs(e){const t={},n=e.getAttribute("data-fanid-title"),o=e.getAttribute("data-fanid-message"),i=e.getAttribute("data-fanid-button");return n&&(t.title=n),o&&(t.message=o),i&&(t.buttonText=i),t}function er(e,t){switch(t){case"gradient":return e.modeGradient;case"cover":return e.modeCover;default:return e.modeBlur}}function tr(e,t){for(const n of Array.from(e.children))n!==t&&n instanceof HTMLElement&&(n.style.filter="",n.style.userSelect="",n.style.pointerEvents="")}const nr=["placeholder-title","placeholder-message","placeholder-button-text","style-mode","teaser-height","min-height"];class or extends HTMLElement{unsubscribe=null;isRevealed=!1;originalChildren=[];rootEl=null;static get observedAttributes(){return[...nr]}connectedCallback(){const e=Qi();this.render(e.getState().isAuthenticated),this.unsubscribe=e.subscribe(e=>{const t=e.isAuthenticated;t!==this.isRevealed&&(this.isRevealed=t,this.render(t))}),e.getState().isAuthenticated||ns().emit("gate:applied",this)}disconnectedCallback(){this.unsubscribe?.(),this.unsubscribe=null,Js(this)}attributeChangedCallback(){this.isConnected&&this.render(this.isRevealed)}getConfig(){const e=Qi().getState().config;return{...e,placeholder:{title:this.getAttribute("placeholder-title")??e.placeholder.title,message:this.getAttribute("placeholder-message")??e.placeholder.message,buttonText:this.getAttribute("placeholder-button-text")??e.placeholder.buttonText},style:this.getAttribute("style-mode")??e.style,teaserHeight:this.hasAttribute("teaser-height")?Number(this.getAttribute("teaser-height")):e.teaserHeight,minHeight:this.hasAttribute("min-height")?Number(this.getAttribute("min-height")):e.minHeight}}render(e){const t=this.getConfig(),n=Qi().getState(),o=Ws(n.classPrefix);if(Xs(this,n),e){if(this.rootEl){this.rootEl.remove(),this.rootEl=null;for(const e of this.originalChildren)this.appendChild(e);this.originalChildren=[]}return Js(this),void ns().emit("gate:reveal",this)}this.rootEl?this.rootEl.remove():this.originalChildren=Array.from(this.childNodes);const i=document.createElement("div");i.className=`${o.root} ${er(o,t.style)}`;const s=document.createElement("div");s.className=o.content;for(const l of this.originalChildren)s.appendChild(l);i.appendChild(s);const r=Ys(i,o,Zs(t,n));r.querySelector(`.${o.button}`)?.addEventListener("click",()=>{ns().emit("gate:click",this),window.__fanid_api?.redirectToLogin()}),this.rootEl=i,this.appendChild(i),Gs(this,o)}}const ir="data-fanid-gated",sr=new Map;let rr=null;function lr(e){return"string"==typeof e?document.querySelector(e):e}function ar(e,t){const n=lr(e);if(!n||sr.has(n))return;const o=Qi(),i=o.getState().config,s=Ws(o.getState().classPrefix),r=n.getAttribute("data-fanid-min-height"),l={...i,...t,placeholder:{...i.placeholder,...Qs(n),...t?.placeholder},style:t?.style??n.getAttribute("data-fanid-style")??i.style,minHeight:t?.minHeight??(r?Number(r):i.minHeight)};"static"===window.getComputedStyle(n).position&&(n.style.position="relative"),n.style.overflow="hidden",n.style.minHeight=`${l.minHeight}px`,Xs(n,o.getState());const a=document.createElement("div");a.className=`${s.overlayHost} ${er(s,l.style)}`,n.appendChild(a);const c=e=>{if(e)return a.innerHTML="",a.style.display="none",n.style.minHeight="",tr(n,a),Js(n),void ns().emit("gate:reveal",n);a.style.display="",n.style.minHeight=`${l.minHeight}px`;const t=Zs(l,o.getState());Ys(a,s,t,!0),function(e,t,n){for(const o of Array.from(e.children))o!==t&&o instanceof HTMLElement&&(o.style.filter=`blur(${n}px)`,o.style.userSelect="none",o.style.pointerEvents="none")}(n,a,l.blurAmount),a.querySelector(`.${s.button}`)?.addEventListener("click",()=>{ns().emit("gate:click",n),window.__fanid_api?.redirectToLogin()}),Gs(n,s)};c(o.getState().isAuthenticated);const u=o.subscribe(e=>{c(e.isAuthenticated)});sr.set(n,{overlayHost:a,unsubscribe:u}),ns().emit("gate:applied",n)}function cr(e){const t=lr(e);if(!t)return;const n=sr.get(t);n&&(n.unsubscribe(),Js(t),n.overlayHost.remove(),t.style.minHeight="",tr(t,n.overlayHost),sr.delete(t))}let ur=null,dr=null;function fr(){ur&&(document.body.style.filter="",document.body.style.pointerEvents="",document.body.style.userSelect="",ur.remove(),ur=null,dr?.(),dr=null)}const pr=new class{app=null;container=null;api=null;initialized=!1;containerId=null;logger;constructor(){this.logger=Ns().withTag("FanIDWidget"),ts=new es}init(e={}){this.initialized?this.logger.warn("FanIDWidget already initialized"):"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>this._mount(e)):this._mount(e)}destroy(){this._unmountFloatingWidget(),this.api=null,this.initialized=!1,rr?.disconnect(),rr=null,function(){for(const[e]of sr)cr(e)}(),Hs?.disconnect(),Hs=null,Rs?.remove(),Rs=null,delete window.__fanid_api}isInitialized(){return this.initialized}gate(e,t){this.ensureInitialized(),ar(e,t)}ungate(e){this.ensureInitialized(),cr(e)}element(e){this.ensureInitialized(),ar(e.el,e)}isGated(e){return function(e){const t=lr(e);return!!t&&sr.has(t)}(e)}gateFullPage(e){this.ensureInitialized(),function(e){if(ur)return;const t=Qi(),n=t.getState(),o=n.config,i=Ws(n.classPrefix),s=e?.title??o.placeholder.title,r=e?.message??o.placeholder.message,l=e?.buttonText??o.placeholder.buttonText,a=e?.allowClose??!1,c=e?.backdropBlur??8,u=n.organization?.branding?.logoUrl??null;document.body.style.filter=`blur(${c}px)`,document.body.style.pointerEvents="none",document.body.style.userSelect="none",ur=document.createElement("div"),ur.className=i.fullpage,Xs(ur,n);const d=Ks(i,{title:s,message:r,buttonText:l,logoUrl:u});if(d.style.position="relative",a){const e=document.createElement("button");e.className=i.fullpageClose,e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",()=>fr()),d.insertBefore(e,d.firstChild)}d.querySelector(`.${i.button}`)?.addEventListener("click",()=>{ns().emit("gate:click",document.body),window.__fanid_api?.redirectToLogin()}),ur.appendChild(d),document.documentElement.appendChild(ur),dr=t.subscribe(e=>{e.isAuthenticated&&fr()})}(e)}ungateFullPage(){fr()}on(e,t){ns().on(e,t)}off(e,t){ns().off(e,t)}async isAuthenticated(){return this.ensureInitialized(),Qi().getState().isAuthenticated}async getProfile(){return this.ensureInitialized(),Qi().getState().profile}login(){this.ensureInitialized(),this.api.redirectToLogin()}async logout(){this.ensureInitialized(),await this.api.logout(),Qi().update({isAuthenticated:!1,profile:null}),ns().emit("auth:logout")}showFloatingWidget(){this.ensureInitialized(),this.app||this._mountFloatingWidget()}hideFloatingWidget(){this._unmountFloatingWidget()}_mountFloatingWidget(){if(this.app)return;sessionStorage.removeItem("fanid_widget_closed");let e=this.containerId?document.getElementById(this.containerId):null;e||(e=document.createElement("div"),e.id="fanid-widget-root",document.body.insertBefore(e,document.body.firstChild)),this.container=e,this.app=Ki(Ts),this.app.mount(e)}_unmountFloatingWidget(){this.app&&(this.app.unmount(),this.app=null),this.container&&"fanid-widget-root"===this.container.id&&this.container.remove(),this.container=null}async _mount(e){try{const n=new Us(e.baseUrl);this.api=n,window.__fanid_api=n;const o=(t=e.gatedContent,Xi=new Zi(t),Xi),i=ns(),s=await n.getOrganization();o.update({organization:s});const{isAuthenticated:r,profile:l}=await n.checkAuthStatus(),a=o.getState().isAuthenticated;o.update({isAuthenticated:r,profile:l,initialized:!0}),r&&l&&!a&&i.emit("auth:login",l),this.containerId=e.containerId??null,!1!==e.floatingWidget&&this._mountFloatingWidget();const c=o.getState().config;c.enabled&&(Vs(o.getState().classPrefix,c),function(e="wmt-fanid-protected"){customElements.get(e)||customElements.define(e,or)}(c.customElementName),function(){const e=document.querySelectorAll(`[${ir}]`);for(const t of e)sr.has(t)||ar(t)}(),rr||(rr=new MutationObserver(e=>{for(const t of e)for(const e of t.addedNodes)if(e instanceof HTMLElement){e.hasAttribute(ir)&&ar(e);const t=e.querySelectorAll(`[${ir}]`);for(const e of t)ar(e)}}),rr.observe(document.body,{childList:!0,subtree:!0}))),this.initialized=!0,i.emit("ready"),this.logger.info("FanIDWidget initialized successfully")}catch(n){this.logger.error("Failed to initialize FanIDWidget:",n)}var t}ensureInitialized(){this.initialized||this.logger.warn("FanIDWidget not initialized. Call init() first.")}};return"undefined"!=typeof window&&(window.FanIDWidget=pr),pr}();
@@ -0,0 +1,12 @@
1
+ function e(e){const t=/* @__PURE__ */Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}const t={},n=[],o=()=>{},i=()=>!1,s=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),r=e=>e.startsWith("onUpdate:"),l=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},c=Object.prototype.hasOwnProperty,u=(e,t)=>c.call(e,t),d=Array.isArray,f=e=>"[object Map]"===w(e),p=e=>"[object Set]"===w(e),h=e=>"[object Date]"===w(e),g=e=>"function"==typeof e,v=e=>"string"==typeof e,m=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,_=e=>(y(e)||g(e))&&g(e.then)&&g(e.catch),b=Object.prototype.toString,w=e=>b.call(e),x=e=>"[object Object]"===w(e),S=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,C=/* @__PURE__ */e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),k=e=>{const t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},$=/-\w/g,T=k(e=>e.replace($,e=>e.slice(1).toUpperCase())),E=/\B([A-Z])/g,A=k(e=>e.replace(E,"-$1").toLowerCase()),O=k(e=>e.charAt(0).toUpperCase()+e.slice(1)),F=k(e=>e?`on${O(e)}`:""),L=(e,t)=>!Object.is(e,t),M=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},j=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},I=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let P;const z=()=>P||(P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function D(e){if(d(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=v(o)?H(o):D(o);if(i)for(const e in i)t[e]=i[e]}return t}if(v(e)||y(e))return e}const N=/;(?![^(]*\))/g,U=/:([^]+)/,R=/\/\*[^]*?\*\//g;function H(e){const t={};return e.replace(R,"").split(N).forEach(e=>{if(e){const n=e.split(U);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function W(e){let t="";if(v(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){const o=W(e[n]);o&&(t+=o+" ")}else if(y(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const V=/* @__PURE__ */e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function B(e){return!!e||""===e}function q(e,t){if(e===t)return!0;let n=h(e),o=h(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=m(e),o=m(t),n||o)return e===t;if(n=d(e),o=d(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=q(e[o],t[o]);return n}(e,t);if(n=y(e),o=y(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(o&&!i||!o&&i||!q(e[n],t[n]))return!1}}return String(e)===String(t)}const G=e=>!(!e||!0!==e.__v_isRef),J=e=>v(e)?e:null==e?"":d(e)||y(e)&&(e.toString===b||!g(e.toString))?G(e)?J(e.value):JSON.stringify(e,K,2):String(e),K=(e,t)=>G(t)?K(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],o)=>(e[Y(t,o)+" =>"]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Y(e))}:m(t)?Y(t):!y(t)||d(t)||x(t)?t:String(t),Y=(e,t="")=>{var n;return m(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let Z,X;class Q{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Z,!e&&Z&&(this.index=(Z.scopes||(Z.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=Z;try{return Z=this,e()}finally{Z=t}}}on(){1===++this._on&&(this.prevScope=Z,Z=this)}off(){this._on>0&&0===--this._on&&(Z=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){let t,n;for(this._active=!1,t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}const ee=/* @__PURE__ */new WeakSet;class te{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Z&&Z.active&&Z.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ee.has(this)&&(ee.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||se(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,ye(this),ae(this);const e=X,t=he;X=this,he=!0;try{return this.fn()}finally{ce(this),X=e,he=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)fe(e);this.deps=this.depsTail=void 0,ye(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ee.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ue(this)&&this.run()}get dirty(){return ue(this)}}let ne,oe,ie=0;function se(e,t=!1){if(e.flags|=8,t)return e.next=oe,void(oe=e);e.next=ne,ne=e}function re(){ie++}function le(){if(--ie>0)return;if(oe){let e=oe;for(oe=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ne;){let n=ne;for(ne=void 0;n;){const o=n.next;if(n.next=void 0,n.flags&=-9,1&n.flags)try{n.trigger()}catch(t){e||(e=t)}n=o}}if(e)throw e}function ae(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ce(e){let t,n=e.depsTail,o=n;for(;o;){const e=o.prevDep;-1===o.version?(o===n&&(n=e),fe(o),pe(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=e}e.deps=t,e.depsTail=n}function ue(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(de(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function de(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===_e)return;if(e.globalVersion=_e,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!ue(e)))return;e.flags|=2;const t=e.dep,n=X,o=he;X=e,he=!0;try{ae(e);const n=e.fn(e._value);(0===t.version||L(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(i){throw t.version++,i}finally{X=n,he=o,ce(e),e.flags&=-3}}function fe(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)fe(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function pe(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let he=!0;const ge=[];function ve(){ge.push(he),he=!1}function me(){const e=ge.pop();he=void 0===e||e}function ye(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=X;X=void 0;try{t()}finally{X=e}}}let _e=0;class be{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class we{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!X||!he||X===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==X)t=this.activeLink=new be(X,this),X.deps?(t.prevDep=X.depsTail,X.depsTail.nextDep=t,X.depsTail=t):X.deps=X.depsTail=t,xe(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=X.depsTail,t.nextDep=void 0,X.depsTail.nextDep=t,X.depsTail=t,X.deps===t&&(X.deps=e)}return t}trigger(e){this.version++,_e++,this.notify(e)}notify(e){re();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{le()}}}function xe(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)xe(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Se=/* @__PURE__ */new WeakMap,Ce=/* @__PURE__ */Symbol(""),ke=/* @__PURE__ */Symbol(""),$e=/* @__PURE__ */Symbol("");function Te(e,t,n){if(he&&X){let t=Se.get(e);t||Se.set(e,t=/* @__PURE__ */new Map);let o=t.get(n);o||(t.set(n,o=new we),o.map=t,o.key=n),o.track()}}function Ee(e,t,n,o,i,s){const r=Se.get(e);if(!r)return void _e++;const l=e=>{e&&e.trigger()};if(re(),"clear"===t)r.forEach(l);else{const i=d(e),s=i&&S(n);if(i&&"length"===n){const e=Number(o);r.forEach((t,n)=>{("length"===n||n===$e||!m(n)&&n>=e)&&l(t)})}else switch((void 0!==n||r.has(void 0))&&l(r.get(n)),s&&l(r.get($e)),t){case"add":i?s&&l(r.get("length")):(l(r.get(Ce)),f(e)&&l(r.get(ke)));break;case"delete":i||(l(r.get(Ce)),f(e)&&l(r.get(ke)));break;case"set":f(e)&&l(r.get(Ce))}}le()}function Ae(e){const t=/* @__PURE__ */gt(e);return t===e?t:(Te(t,0,$e),/* @__PURE__ */pt(e)?t:t.map(vt))}function Oe(e){return Te(e=/* @__PURE__ */gt(e),0,$e),e}function Fe(e,t){/* @__PURE__ */
2
+ return ft(e)?mt(/* @__PURE__ */dt(e)?vt(t):t):vt(t)}const Le={__proto__:null,[Symbol.iterator](){return Me(this,Symbol.iterator,e=>Fe(this,e))},concat(...e){return Ae(this).concat(...e.map(e=>d(e)?Ae(e):e))},entries(){return Me(this,"entries",e=>(e[1]=Fe(this,e[1]),e))},every(e,t){return Ie(this,"every",e,t,void 0,arguments)},filter(e,t){return Ie(this,"filter",e,t,e=>e.map(e=>Fe(this,e)),arguments)},find(e,t){return Ie(this,"find",e,t,e=>Fe(this,e),arguments)},findIndex(e,t){return Ie(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ie(this,"findLast",e,t,e=>Fe(this,e),arguments)},findLastIndex(e,t){return Ie(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ie(this,"forEach",e,t,void 0,arguments)},includes(...e){return ze(this,"includes",e)},indexOf(...e){return ze(this,"indexOf",e)},join(e){return Ae(this).join(e)},lastIndexOf(...e){return ze(this,"lastIndexOf",e)},map(e,t){return Ie(this,"map",e,t,void 0,arguments)},pop(){return De(this,"pop")},push(...e){return De(this,"push",e)},reduce(e,...t){return Pe(this,"reduce",e,t)},reduceRight(e,...t){return Pe(this,"reduceRight",e,t)},shift(){return De(this,"shift")},some(e,t){return Ie(this,"some",e,t,void 0,arguments)},splice(...e){return De(this,"splice",e)},toReversed(){return Ae(this).toReversed()},toSorted(e){return Ae(this).toSorted(e)},toSpliced(...e){return Ae(this).toSpliced(...e)},unshift(...e){return De(this,"unshift",e)},values(){return Me(this,"values",e=>Fe(this,e))}};function Me(e,t,n){const o=Oe(e),i=o[t]();return o===e||/* @__PURE__ */pt(e)||(i._next=i.next,i.next=()=>{const e=i._next();return e.done||(e.value=n(e.value)),e}),i}const je=Array.prototype;function Ie(e,t,n,o,i,s){const r=Oe(e),l=r!==e&&!/* @__PURE__ */pt(e),a=r[t];if(a!==je[t]){const t=a.apply(e,s);return l?vt(t):t}let c=n;r!==e&&(l?c=function(t,o){return n.call(this,Fe(e,t),o,e)}:n.length>2&&(c=function(t,o){return n.call(this,t,o,e)}));const u=a.call(r,c,o);return l&&i?i(u):u}function Pe(e,t,n,o){const i=Oe(e);let s=n,r=!1;i!==e&&(i!==e&&!/* @__PURE__ */pt(e)?(r=0===o.length,s=function(t,o,i){return r&&(r=!1,t=Fe(e,t)),n.call(this,t,Fe(e,o),i,e)}):n.length>3&&(s=function(t,o,i){return n.call(this,t,o,i,e)}));const l=i[t](s,...o);return r?Fe(e,l):l}function ze(e,t,n){const o=/* @__PURE__ */gt(e);Te(o,0,$e);const i=o[t](...n);return-1!==i&&!1!==i||/* @__PURE__ */!ht(n[0])?i:(n[0]=/* @__PURE__ */gt(n[0]),o[t](...n))}function De(e,t,n=[]){ve(),re();const o=/* @__PURE__ */gt(e)[t].apply(e,n);return le(),me(),o}const Ne=/* @__PURE__ */e("__proto__,__v_isRef,__isVue"),Ue=new Set(
3
+ /* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(m));function Re(e){m(e)||(e=String(e));const t=/* @__PURE__ */gt(this);return Te(t,0,e),t.hasOwnProperty(e)}class He{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;const o=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(o?i?st:it:i?ot:nt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=d(e);if(!o){let e;if(s&&(e=Le[t]))return e;if("hasOwnProperty"===t)return Re}const r=Reflect.get(e,t,
4
+ /* @__PURE__ */yt(e)?e:n);if(m(t)?Ue.has(t):Ne(t))return r;if(o||Te(e,0,t),i)return r;if(/* @__PURE__ */yt(r)){const e=s&&S(t)?r:r.value;return o&&y(e)?/* @__PURE__ */ct(e):e}return y(r)?o?/* @__PURE__ */ct(r):/* @__PURE__ */lt(r):r}}class We extends He{constructor(e=!1){super(!1,e)}set(e,t,n,o){let i=e[t];const s=d(e)&&S(t);if(!this._isShallow){const e=/* @__PURE__ */ft(i);if(/* @__PURE__ */pt(n)||/* @__PURE__ */ft(n)||(i=/* @__PURE__ */gt(i),n=/* @__PURE__ */gt(n)),!s&&/* @__PURE__ */yt(i)&&!/* @__PURE__ */yt(n))return e||(i.value=n),!0}const r=s?Number(t)<e.length:u(e,t),l=Reflect.set(e,t,n,
5
+ /* @__PURE__ */yt(e)?e:o);return e===/* @__PURE__ */gt(o)&&(r?L(n,i)&&Ee(e,"set",t,n):Ee(e,"add",t,n)),l}deleteProperty(e,t){const n=u(e,t);e[t];const o=Reflect.deleteProperty(e,t);return o&&n&&Ee(e,"delete",t,void 0),o}has(e,t){const n=Reflect.has(e,t);return m(t)&&Ue.has(t)||Te(e,0,t),n}ownKeys(e){return Te(e,0,d(e)?"length":Ce),Reflect.ownKeys(e)}}class Ve extends He{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Be=/* @__PURE__ */new We,qe=/* @__PURE__ */new Ve,Ge=/* @__PURE__ */new We(!0),Je=e=>e,Ke=e=>Reflect.getPrototypeOf(e);function Ye(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Ze(e,t){const n={get(n){const o=this.__v_raw,i=/* @__PURE__ */gt(o),s=/* @__PURE__ */gt(n);e||(L(n,s)&&Te(i,0,n),Te(i,0,s));const{has:r}=Ke(i),l=t?Je:e?mt:vt;return r.call(i,n)?l(o.get(n)):r.call(i,s)?l(o.get(s)):void(o!==i&&o.get(n))},get size(){const t=this.__v_raw;return!e&&Te(/* @__PURE__ */gt(t),0,Ce),t.size},has(t){const n=this.__v_raw,o=/* @__PURE__ */gt(n),i=/* @__PURE__ */gt(t);return e||(L(t,i)&&Te(o,0,t),Te(o,0,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,o){const i=this,s=i.__v_raw,r=t?Je:e?mt:vt;return!e&&Te(/* @__PURE__ */gt(s),0,Ce),s.forEach((e,t)=>n.call(o,r(e),r(t),i))}};l(n,e?{add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear")}:{add(e){const n=/* @__PURE__ */gt(this),o=Ke(n),i=/* @__PURE__ */gt(e),s=t||/* @__PURE__ */pt(e)||/* @__PURE__ */ft(e)?e:i;return o.has.call(n,s)||L(e,s)&&o.has.call(n,e)||L(i,s)&&o.has.call(n,i)||(n.add(s),Ee(n,"add",s,s)),this},set(e,n){t||/* @__PURE__ */pt(n)||/* @__PURE__ */ft(n)||(n=/* @__PURE__ */gt(n));const o=/* @__PURE__ */gt(this),{has:i,get:s}=Ke(o);let r=i.call(o,e);r||(e=/* @__PURE__ */gt(e),r=i.call(o,e));const l=s.call(o,e);return o.set(e,n),r?L(n,l)&&Ee(o,"set",e,n):Ee(o,"add",e,n),this},delete(e){const t=/* @__PURE__ */gt(this),{has:n,get:o}=Ke(t);let i=n.call(t,e);i||(e=/* @__PURE__ */gt(e),i=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return i&&Ee(t,"delete",e,void 0),s},clear(){const e=/* @__PURE__ */gt(this),t=0!==e.size,n=e.clear();return t&&Ee(e,"clear",void 0,void 0),n}});return["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=function(e,t,n){return function(...o){const i=this.__v_raw,s=/* @__PURE__ */gt(i),r=f(s),a="entries"===e||e===Symbol.iterator&&r,c="keys"===e&&r,u=i[e](...o),d=n?Je:t?mt:vt;return!t&&Te(s,0,c?ke:Ce),l(Object.create(u),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:a?[d(e[0]),d(e[1])]:d(e),done:t}}})}}(o,e,t)}),n}function Xe(e,t){const n=Ze(e,t);return(t,o,i)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(u(n,o)&&o in t?n:t,o,i)}const Qe={get:/* @__PURE__ */Xe(!1,!1)},et={get:/* @__PURE__ */Xe(!1,!0)},tt={get:/* @__PURE__ */Xe(!0,!1)},nt=/* @__PURE__ */new WeakMap,ot=/* @__PURE__ */new WeakMap,it=/* @__PURE__ */new WeakMap,st=/* @__PURE__ */new WeakMap;function rt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>w(e).slice(8,-1))(e))}function lt(e){/* @__PURE__ */
6
+ return ft(e)?e:ut(e,!1,Be,Qe,nt)}function at(e){return ut(e,!1,Ge,et,ot)}function ct(e){return ut(e,!0,qe,tt,it)}function ut(e,t,n,o,i){if(!y(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=rt(e);if(0===s)return e;const r=i.get(e);if(r)return r;const l=new Proxy(e,2===s?o:n);return i.set(e,l),l}function dt(e){/* @__PURE__ */
7
+ return ft(e)?/* @__PURE__ */dt(e.__v_raw):!(!e||!e.__v_isReactive)}function ft(e){return!(!e||!e.__v_isReadonly)}function pt(e){return!(!e||!e.__v_isShallow)}function ht(e){return!!e&&!!e.__v_raw}function gt(e){const t=e&&e.__v_raw;return t?/* @__PURE__ */gt(t):e}const vt=e=>y(e)?/* @__PURE__ */lt(e):e,mt=e=>y(e)?/* @__PURE__ */ct(e):e;function yt(e){return!!e&&!0===e.__v_isRef}function _t(e){return function(e,t){if(/* @__PURE__ */yt(e))return e;return new bt(e,t)}(e,!1)}class bt{constructor(e,t){this.dep=new we,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:/* @__PURE__ */gt(e),this._value=t?e:vt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||/* @__PURE__ */pt(e)||/* @__PURE__ */ft(e);L(e=n?e:/* @__PURE__ */gt(e),t)&&(this._rawValue=e,this._value=n?e:vt(e),this.dep.trigger())}}const wt={get:(e,t,n)=>{return"__v_raw"===t?e:/* @__PURE__ */yt(o=Reflect.get(e,t,n))?o.value:o;var o},set:(e,t,n,o)=>{const i=e[t];/* @__PURE__ */
8
+ return yt(i)&&!/* @__PURE__ */yt(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function xt(e){/* @__PURE__ */
9
+ return dt(e)?e:new Proxy(e,wt)}class St{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new we(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_e-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&X!==this)return se(this,!0),!0}get value(){const e=this.dep.track();return de(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Ct(e,t,n=!1){let o,i;g(e)?o=e:(o=e.get,i=e.set);return new St(o,i,n)}const kt={},$t=/* @__PURE__ */new WeakMap;let Tt;function Et(e,n,i=t){const{immediate:s,deep:r,once:l,scheduler:c,augmentJob:u,call:f}=i,p=e=>r?e:/* @__PURE__ */pt(e)||!1===r||0===r?At(e,1):At(e);let h,v,m,y,_=!1,b=!1;if(/* @__PURE__ */yt(e)?(v=()=>e.value,_=/* @__PURE__ */pt(e)):/* @__PURE__ */dt(e)?(v=()=>p(e),_=!0):d(e)?(b=!0,_=e.some(e=>/* @__PURE__ */dt(e)||/* @__PURE__ */pt(e)),v=()=>e.map(e=>/* @__PURE__ */yt(e)?e.value:/* @__PURE__ */dt(e)?p(e):g(e)?f?f(e,2):e():void 0)):v=g(e)?n?f?()=>f(e,2):e:()=>{if(m){ve();try{m()}finally{me()}}const t=Tt;Tt=h;try{return f?f(e,3,[y]):e(y)}finally{Tt=t}}:o,n&&r){const e=v,t=!0===r?1/0:r;v=()=>At(e(),t)}const w=Z,x=()=>{h.stop(),w&&w.active&&a(w.effects,h)};if(l&&n){const e=n;n=(...t)=>{e(...t),x()}}let S=b?new Array(e.length).fill(kt):kt;const C=e=>{if(1&h.flags&&(h.dirty||e))if(n){const e=h.run();if(r||_||(b?e.some((e,t)=>L(e,S[t])):L(e,S))){m&&m();const t=Tt;Tt=h;try{const t=[e,S===kt?void 0:b&&S[0]===kt?[]:S,y];S=e,f?f(n,3,t):n(...t)}finally{Tt=t}}}else h.run()};return u&&u(C),h=new te(v),h.scheduler=c?()=>c(C,!1):C,y=e=>function(e,t=!1,n=Tt){if(n){let t=$t.get(n);t||$t.set(n,t=[]),t.push(e)}}(e,!1,h),m=h.onStop=()=>{const e=$t.get(h);if(e){if(f)f(e,4);else for(const t of e)t();$t.delete(h)}},n?s?C(!0):S=h.run():c?c(C.bind(null,!0),!0):h.run(),x.pause=h.pause.bind(h),x.resume=h.resume.bind(h),x.stop=x,x}function At(e,t=1/0,n){if(t<=0||!y(e)||e.__v_skip)return e;if(((n=n||/* @__PURE__ */new Map).get(e)||0)>=t)return e;if(n.set(e,t),t--,/* @__PURE__ */yt(e))At(e.value,t,n);else if(d(e))for(let o=0;o<e.length;o++)At(e[o],t,n);else if(p(e)||f(e))e.forEach(e=>{At(e,t,n)});else if(x(e)){for(const o in e)At(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&At(e[o],t,n)}return e}function Ot(e,t,n,o){try{return o?e(...o):e()}catch(i){Lt(i,t,n)}}function Ft(e,t,n,o){if(g(e)){const i=Ot(e,t,n,o);return i&&_(i)&&i.catch(e=>{Lt(e,t,n)}),i}if(d(e)){const i=[];for(let s=0;s<e.length;s++)i.push(Ft(e[s],t,n,o));return i}}function Lt(e,n,o,i=!0){n&&n.vnode;const{errorHandler:s,throwUnhandledErrorInProduction:r}=n&&n.appContext.config||t;if(n){let t=n.parent;const i=n.proxy,r=`https://vuejs.org/error-reference/#runtime-${o}`;for(;t;){const n=t.ec;if(n)for(let t=0;t<n.length;t++)if(!1===n[t](e,i,r))return;t=t.parent}if(s)return ve(),Ot(s,null,10,[e,i,r]),void me()}!function(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}(e,0,0,i,r)}const Mt=[];let jt=-1;const It=[];let Pt=null,zt=0;const Dt=/* @__PURE__ */Promise.resolve();let Nt=null;function Ut(e){const t=Nt||Dt;return e?t.then(this?e.bind(this):e):t}function Rt(e){if(!(1&e.flags)){const t=Bt(e),n=Mt[Mt.length-1];!n||!(2&e.flags)&&t>=Bt(n)?Mt.push(e):Mt.splice(function(e){let t=jt+1,n=Mt.length;for(;t<n;){const o=t+n>>>1,i=Mt[o],s=Bt(i);s<e||s===e&&2&i.flags?t=o+1:n=o}return t}(t),0,e),e.flags|=1,Ht()}}function Ht(){Nt||(Nt=Dt.then(qt))}function Wt(e,t,n=jt+1){for(;n<Mt.length;n++){const t=Mt[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;Mt.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function Vt(e){if(It.length){const e=[...new Set(It)].sort((e,t)=>Bt(e)-Bt(t));if(It.length=0,Pt)return void Pt.push(...e);for(Pt=e,zt=0;zt<Pt.length;zt++){const e=Pt[zt];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}Pt=null,zt=0}}const Bt=e=>null==e.id?2&e.flags?-1:1/0:e.id;function qt(e){try{for(jt=0;jt<Mt.length;jt++){const e=Mt[jt];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),Ot(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;jt<Mt.length;jt++){const e=Mt[jt];e&&(e.flags&=-2)}jt=-1,Mt.length=0,Vt(),Nt=null,(Mt.length||It.length)&&qt()}}let Gt=null,Jt=null;function Kt(e){const t=Gt;return Gt=e,Jt=e&&e.type.__scopeId||null,t}function Yt(e,t=Gt,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Wo(-1);const i=Kt(t);let s;try{s=e(...n)}finally{Kt(i),o._d&&Wo(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Zt(e,t,n,o){const i=e.dirs,s=t&&t.dirs;for(let r=0;r<i.length;r++){const l=i[r];s&&(l.oldValue=s[r].value);let a=l.dir[o];a&&(ve(),Ft(a,n,8,[e.el,l,e,t]),me())}}function Xt(e,t,n=!1){const o=ci();if(o||to){let i=to?to._context.provides:o?null==o.parent||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&g(t)?t.call(o&&o.proxy):t}}const Qt=/* @__PURE__ */Symbol.for("v-scx");function en(e,t,n){return tn(e,t,n)}function tn(e,n,i=t){const{immediate:s,deep:r,flush:a,once:c}=i,u=l({},i),d=n&&s||!n&&"post"!==a;let f;if(gi)if("sync"===a){const e=Xt(Qt);f=e.__watcherHandles||(e.__watcherHandles=[])}else if(!d){const e=()=>{};return e.stop=o,e.resume=o,e.pause=o,e}const p=ai;u.call=(e,t,n)=>Ft(e,p,t,n);let h=!1;"post"===a?u.scheduler=e=>{$o(e,p&&p.suspense)}:"sync"!==a&&(h=!0,u.scheduler=(e,t)=>{t?e():Rt(e)}),u.augmentJob=e=>{n&&(e.flags|=4),h&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};const g=Et(e,n,u);return gi&&(f?f.push(g):d&&g()),g}function nn(e,t,n){const o=this.proxy,i=v(e)?e.includes(".")?on(o,e):()=>o[e]:e.bind(o,o);let s;g(t)?s=t:(s=t.handler,n=t);const r=fi(this),l=tn(i,s.bind(o),n);return r(),l}function on(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}const sn=/* @__PURE__ */Symbol("_vte"),rn=/* @__PURE__ */Symbol("_leaveCb");function ln(e,t){6&e.shapeFlag&&e.component?(e.transition=t,ln(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function an(e,t){return g(e)?
10
+ /* @__PURE__ */(()=>l({name:e.name},t,{setup:e}))():e}function cn(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function un(e,t){let n;return!(!(n=Object.getOwnPropertyDescriptor(e,t))||n.configurable)}const dn=/* @__PURE__ */new WeakMap;function fn(e,n,o,s,r=!1){if(d(e))return void e.forEach((e,t)=>fn(e,n&&(d(n)?n[t]:n),o,s,r));if(hn(s)&&!r)return void(512&s.shapeFlag&&s.type.__asyncResolved&&s.component.subTree.component&&fn(e,n,o,s.component.subTree));const l=4&s.shapeFlag?_i(s.component):s.el,c=r?null:l,{i:f,r:p}=e,h=n&&n.r,m=f.refs===t?f.refs={}:f.refs,y=f.setupState,_=/* @__PURE__ */gt(y),b=y===t?i:e=>!un(m,e)&&u(_,e),w=(e,t)=>!t||!un(m,t);if(null!=h&&h!==p)if(pn(n),v(h))m[h]=null,b(h)&&(y[h]=null);else if(/* @__PURE__ */yt(h)){const e=n;w(0,e.k)&&(h.value=null),e.k&&(m[e.k]=null)}if(g(p))Ot(p,f,12,[c,m]);else{const t=v(p),n=/* @__PURE__ */yt(p);if(t||n){const i=()=>{if(e.f){const n=t?b(p)?y[p]:m[p]:w()||!e.k?p.value:m[e.k];if(r)d(n)&&a(n,l);else if(d(n))n.includes(l)||n.push(l);else if(t)m[p]=[l],b(p)&&(y[p]=m[p]);else{const t=[l];w(0,e.k)&&(p.value=t),e.k&&(m[e.k]=t)}}else t?(m[p]=c,b(p)&&(y[p]=c)):n&&(w(0,e.k)&&(p.value=c),e.k&&(m[e.k]=c))};if(c){const t=()=>{i(),dn.delete(e)};t.id=-1,dn.set(e,t),$o(t,o)}else pn(e),i()}}}function pn(e){const t=dn.get(e);t&&(t.flags|=8,dn.delete(e))}z().requestIdleCallback,z().cancelIdleCallback;const hn=e=>!!e.type.__asyncLoader,gn=e=>e.type.__isKeepAlive;function vn(e,t){yn(e,"a",t)}function mn(e,t){yn(e,"da",t)}function yn(e,t,n=ai){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(bn(t,o,n),n){let e=n.parent;for(;e&&e.parent;)gn(e.parent.vnode)&&_n(o,t,n,e),e=e.parent}}function _n(e,t,n,o){const i=bn(t,e,o,!0);Tn(()=>{a(o[t],i)},n)}function bn(e,t,n=ai,o=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{ve();const i=fi(n),s=Ft(t,n,e,o);return i(),me(),s});return o?i.unshift(s):i.push(s),s}}const wn=e=>(t,n=ai)=>{gi&&"sp"!==e||bn(e,(...e)=>t(...e),n)},xn=wn("bm"),Sn=wn("m"),Cn=wn("bu"),kn=wn("u"),$n=wn("bum"),Tn=wn("um"),En=wn("sp"),An=wn("rtg"),On=wn("rtc");function Fn(e,t=ai){bn("ec",e,t)}const Ln=/* @__PURE__ */Symbol.for("v-ndc");function Mn(e,t,n={},o,i){if(Gt.ce||Gt.parent&&hn(Gt.parent)&&Gt.parent.ce){const e=Object.keys(n).length>0;return Ro(),qo(Io,null,[Xo("slot",n,o)],e?-2:64)}let s=e[t];s&&s._c&&(s._d=!1),Ro();const r=s&&jn(s(n)),l=n.key||r&&r.key,a=qo(Io,{key:(l&&!m(l)?l:`_${t}`)+(!r&&o?"_fb":"")},r||[],r&&1===e._?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function jn(e){return e.some(e=>!Go(e)||e.type!==zo&&!(e.type===Io&&!jn(e.children)))?e:null}const In=e=>e?hi(e)?_i(e):In(e.parent):null,Pn=
11
+ /* @__PURE__ */l(/* @__PURE__ */Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>In(e.parent),$root:e=>In(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vn(e),$forceUpdate:e=>e.f||(e.f=()=>{Rt(e.update)}),$nextTick:e=>e.n||(e.n=Ut.bind(e.proxy)),$watch:e=>nn.bind(e)}),zn=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Dn={get({_:e},n){if("__v_skip"===n)return!0;const{ctx:o,setupState:i,data:s,props:r,accessCache:l,type:a,appContext:c}=e;if("$"!==n[0]){const e=l[n];if(void 0!==e)switch(e){case 1:return i[n];case 2:return s[n];case 4:return o[n];case 3:return r[n]}else{if(zn(i,n))return l[n]=1,i[n];if(s!==t&&u(s,n))return l[n]=2,s[n];if(u(r,n))return l[n]=3,r[n];if(o!==t&&u(o,n))return l[n]=4,o[n];Un&&(l[n]=0)}}const d=Pn[n];let f,p;return d?("$attrs"===n&&Te(e.attrs,0,""),d(e)):(f=a.__cssModules)&&(f=f[n])?f:o!==t&&u(o,n)?(l[n]=4,o[n]):(p=c.config.globalProperties,u(p,n)?p[n]:void 0)},set({_:e},n,o){const{data:i,setupState:s,ctx:r}=e;return zn(s,n)?(s[n]=o,!0):i!==t&&u(i,n)?(i[n]=o,!0):!u(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(r[n]=o,!0))},has({_:{data:e,setupState:n,accessCache:o,ctx:i,appContext:s,props:r,type:l}},a){let c;return!!(o[a]||e!==t&&"$"!==a[0]&&u(e,a)||zn(n,a)||u(r,a)||u(i,a)||u(Pn,a)||u(s.config.globalProperties,a)||(c=l.__cssModules)&&c[a])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:u(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Nn(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let Un=!0;function Rn(e){const t=Vn(e),n=e.proxy,i=e.ctx;Un=!1,t.beforeCreate&&Hn(t.beforeCreate,e,"bc");const{data:s,computed:r,methods:l,watch:a,provide:c,inject:u,created:f,beforeMount:p,mounted:h,beforeUpdate:v,updated:m,activated:_,deactivated:b,beforeDestroy:w,beforeUnmount:x,destroyed:S,unmounted:C,render:k,renderTracked:$,renderTriggered:T,errorCaptured:E,serverPrefetch:A,expose:O,inheritAttrs:F,components:L,directives:M,filters:j}=t;if(u&&function(e,t){d(e)&&(e=Jn(e));for(const n in e){const o=e[n];let i;i=y(o)?"default"in o?Xt(o.from||n,o.default,!0):Xt(o.from||n):Xt(o),/* @__PURE__ */yt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}(u,i,null),l)for(const o in l){const e=l[o];g(e)&&(i[o]=e.bind(n))}if(s){const t=s.call(n,n);y(t)&&(e.data=/* @__PURE__ */lt(t))}if(Un=!0,r)for(const d in r){const e=r[d],t=g(e)?e.bind(n,n):g(e.get)?e.get.bind(n,n):o,s=!g(e)&&g(e.set)?e.set.bind(n):o,l=bi({get:t,set:s});Object.defineProperty(i,d,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(a)for(const o in a)Wn(a[o],i,n,o);if(c){const e=g(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{!function(e,t){if(ai){let n=ai.provides;const o=ai.parent&&ai.parent.provides;o===n&&(n=ai.provides=Object.create(o)),n[e]=t}}(t,e[t])})}function I(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(f&&Hn(f,e,"c"),I(xn,p),I(Sn,h),I(Cn,v),I(kn,m),I(vn,_),I(mn,b),I(Fn,E),I(On,$),I(An,T),I($n,x),I(Tn,C),I(En,A),d(O))if(O.length){const t=e.exposed||(e.exposed={});O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});k&&e.render===o&&(e.render=k),null!=F&&(e.inheritAttrs=F),L&&(e.components=L),M&&(e.directives=M),A&&cn(e)}function Hn(e,t,n){Ft(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Wn(e,t,n,o){let i=o.includes(".")?on(n,o):()=>n[o];if(v(e)){const n=t[e];g(n)&&en(i,n)}else if(g(e))en(i,e.bind(n));else if(y(e))if(d(e))e.forEach(e=>Wn(e,t,n,o));else{const o=g(e.handler)?e.handler.bind(n):t[e.handler];g(o)&&en(i,o,e)}}function Vn(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,l=s.get(t);let a;return l?a=l:i.length||n||o?(a={},i.length&&i.forEach(e=>Bn(a,e,r,!0)),Bn(a,t,r)):a=t,y(t)&&s.set(t,a),a}function Bn(e,t,n,o=!1){const{mixins:i,extends:s}=t;s&&Bn(e,s,n,!0),i&&i.forEach(t=>Bn(e,t,n,!0));for(const r in t)if(o&&"expose"===r);else{const o=qn[r]||n&&n[r];e[r]=o?o(e[r],t[r]):t[r]}return e}const qn={data:Gn,props:Zn,emits:Zn,methods:Yn,computed:Yn,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:Yn,directives:Yn,watch:function(e,t){if(!e)return t;if(!t)return e;const n=l(/* @__PURE__ */Object.create(null),e);for(const o in t)n[o]=Kn(e[o],t[o]);return n},provide:Gn,inject:function(e,t){return Yn(Jn(e),Jn(t))}};function Gn(e,t){return t?e?function(){return l(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function Jn(e){if(d(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Kn(e,t){return e?[...new Set([].concat(e,t))]:t}function Yn(e,t){return e?l(/* @__PURE__ */Object.create(null),e,t):t}function Zn(e,t){return e?d(e)&&d(t)?[.../* @__PURE__ */new Set([...e,...t])]:l(
12
+ /* @__PURE__ */Object.create(null),Nn(e),Nn(null!=t?t:{})):t}function Xn(){return{app:null,config:{isNativeTag:i,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:/* @__PURE__ */Object.create(null),optionsCache:/* @__PURE__ */new WeakMap,propsCache:/* @__PURE__ */new WeakMap,emitsCache:/* @__PURE__ */new WeakMap}}let Qn=0;function eo(e,t){return function(t,n=null){g(t)||(t=l({},t)),null==n||y(n)||(n=null);const o=Xn(),i=/* @__PURE__ */new WeakSet,s=[];let r=!1;const a=o.app={_uid:Qn++,_component:t,_props:n,_container:null,_context:o,_instance:null,version:wi,get config(){return o.config},set config(e){},use:(e,...t)=>(i.has(e)||(e&&g(e.install)?(i.add(e),e.install(a,...t)):g(e)&&(i.add(e),e(a,...t))),a),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),a),component:(e,t)=>t?(o.components[e]=t,a):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,a):o.directives[e],mount(i,s,l){if(!r){const s=a._ceVNode||Xo(t,n);return s.appContext=o,!0===l?l="svg":!1===l&&(l=void 0),e(s,i,l),r=!0,a._container=i,i.__vue_app__=a,_i(s.component)}},onUnmount(e){s.push(e)},unmount(){r&&(Ft(s,a._instance,16),e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,a),runWithContext(e){const t=to;to=a;try{return e()}finally{to=t}}};return a}}let to=null;function no(e,n,...o){if(e.isUnmounted)return;const i=e.vnode.props||t;let s=o;const r=n.startsWith("update:"),l=r&&((e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${A(t)}Modifiers`])(i,n.slice(7));let a;l&&(l.trim&&(s=o.map(e=>v(e)?e.trim():e)),l.number&&(s=o.map(I)));let c=i[a=F(n)]||i[a=F(T(n))];!c&&r&&(c=i[a=F(A(n))]),c&&Ft(c,e,6,s);const u=i[a+"Once"];if(u){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,Ft(u,e,6,s)}}const oo=/* @__PURE__ */new WeakMap;function io(e,t,n=!1){const o=n?oo:t.emitsCache,i=o.get(e);if(void 0!==i)return i;const s=e.emits;let r={},a=!1;if(!g(e)){const o=e=>{const n=io(e,t,!0);n&&(a=!0,l(r,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||a?(d(s)?s.forEach(e=>r[e]=null):l(r,s),y(e)&&o.set(e,r),r):(y(e)&&o.set(e,null),null)}function so(e,t){return!(!e||!s(t))&&(t=t.slice(2).replace(/Once$/,""),u(e,t[0].toLowerCase()+t.slice(1))||u(e,A(t))||u(e,t))}function ro(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[s],slots:l,attrs:a,emit:c,render:u,renderCache:d,props:f,data:p,setupState:h,ctx:g,inheritAttrs:v}=e,m=Kt(e);let y,_;try{if(4&n.shapeFlag){const e=i||o,t=e;y=ni(u.call(t,e,d,f,h,p,g)),_=a}else{const e=t;0,y=ni(e.length>1?e(f,{attrs:a,slots:l,emit:c}):e(f,null)),_=t.props?a:lo(a)}}catch(w){No.length=0,Lt(w,e,1),y=Xo(zo)}let b=y;if(_&&!1!==v){const e=Object.keys(_),{shapeFlag:t}=b;e.length&&7&t&&(s&&e.some(r)&&(_=ao(_,s)),b=Qo(b,_,!1,!0))}return n.dirs&&(b=Qo(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ln(b,n.transition),y=b,Kt(m),y}const lo=e=>{let t;for(const n in e)("class"===n||"style"===n||s(n))&&((t||(t={}))[n]=e[n]);return t},ao=(e,t)=>{const n={};for(const o in e)r(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function co(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const s=o[i];if(uo(t,e,s)&&!so(n,s))return!0}return!1}function uo(e,t,n){const o=e[n],i=t[n];return"style"===n&&y(o)&&y(i)?!q(o,i):o!==i}const fo={},po=()=>Object.create(fo),ho=e=>Object.getPrototypeOf(e)===fo;function go(e,n,o,i){const[s,r]=e.propsOptions;let l,a=!1;if(n)for(let t in n){if(C(t))continue;const c=n[t];let d;s&&u(s,d=T(t))?r&&r.includes(d)?(l||(l={}))[d]=c:o[d]=c:so(e.emitsOptions,t)||t in i&&c===i[t]||(i[t]=c,a=!0)}if(r){const n=/* @__PURE__ */gt(o),i=l||t;for(let t=0;t<r.length;t++){const l=r[t];o[l]=vo(s,n,l,i[l],e,!u(i,l))}}return a}function vo(e,t,n,o,i,s){const r=e[n];if(null!=r){const e=u(r,"default");if(e&&void 0===o){const e=r.default;if(r.type!==Function&&!r.skipFactory&&g(e)){const{propsDefaults:s}=i;if(n in s)o=s[n];else{const r=fi(i);o=s[n]=e.call(null,t),r()}}else o=e;i.ce&&i.ce._setProp(n,o)}r[0]&&(s&&!e?o=!1:!r[1]||""!==o&&o!==A(n)||(o=!0))}return o}const mo=/* @__PURE__ */new WeakMap;function yo(e,o,i=!1){const s=i?mo:o.propsCache,r=s.get(e);if(r)return r;const a=e.props,c={},f=[];let p=!1;if(!g(e)){const t=e=>{p=!0;const[t,n]=yo(e,o,!0);l(c,t),n&&f.push(...n)};!i&&o.mixins.length&&o.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!a&&!p)return y(e)&&s.set(e,n),n;if(d(a))for(let n=0;n<a.length;n++){const e=T(a[n]);_o(e)&&(c[e]=t)}else if(a)for(const t in a){const e=T(t);if(_o(e)){const n=a[t],o=c[e]=d(n)||g(n)?{type:n}:l({},n),i=o.type;let s=!1,r=!0;if(d(i))for(let e=0;e<i.length;++e){const t=i[e],n=g(t)&&t.name;if("Boolean"===n){s=!0;break}"String"===n&&(r=!1)}else s=g(i)&&"Boolean"===i.name;o[0]=s,o[1]=r,(s||u(o,"default"))&&f.push(e)}}const h=[c,f];return y(e)&&s.set(e,h),h}function _o(e){return"$"!==e[0]&&!C(e)}const bo=e=>"_"===e||"_ctx"===e||"$stable"===e,wo=e=>d(e)?e.map(ni):[ni(e)],xo=(e,t,n)=>{if(t._n)return t;const o=Yt((...e)=>wo(t(...e)),n);return o._c=!1,o},So=(e,t,n)=>{const o=e._ctx;for(const i in e){if(bo(i))continue;const n=e[i];if(g(n))t[i]=xo(0,n,o);else if(null!=n){const e=wo(n);t[i]=()=>e}}},Co=(e,t)=>{const n=wo(t);e.slots.default=()=>n},ko=(e,t,n)=>{for(const o in t)!n&&bo(o)||(e[o]=t[o])},$o=function(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):(d(n=e)?It.push(...n):Pt&&-1===n.id?Pt.splice(zt+1,0,n):1&n.flags||(It.push(n),n.flags|=1),Ht());var n};function To(e){return function(e){z().__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:l,createText:a,createComment:c,setText:d,setElementText:f,parentNode:p,nextSibling:h,setScopeId:g=o,insertStaticContent:v}=e,m=(e,t,n,o=null,i=null,s=null,r=void 0,l=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!Jo(e,t)&&(o=X(e),G(e,i,s,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:d}=t;switch(c){case Po:y(e,t,n,o);break;case zo:b(e,t,n,o);break;case Do:null==e&&w(t,n,o,r);break;case Io:P(e,t,n,o,i,s,r,l,a);break;default:1&d?k(e,t,n,o,i,s,r,l,a):6&d?D(e,t,n,o,i,s,r,l,a):(64&d||128&d)&&c.process(e,t,n,o,i,s,r,l,a,oe)}null!=u&&i?fn(u,e&&e.ref,s,t||e,!t):null==u&&e&&null!=e.ref&&fn(e.ref,null,s,e,!0)},y=(e,t,n,o)=>{if(null==e)i(t.el=a(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},b=(e,t,n,o)=>{null==e?i(t.el=c(t.children||""),n,o):t.el=e.el},w=(e,t,n,o)=>{[e.el,e.anchor]=v(e.children,t,n,o,e.el,e.anchor)},x=({el:e,anchor:t},n,o)=>{let s;for(;e&&e!==t;)s=h(e),i(e,n,o),e=s;i(t,n,o)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},k=(e,t,n,o,i,s,r,l,a)=>{if("svg"===t.type?r="svg":"math"===t.type&&(r="mathml"),null==e)$(t,n,o,i,s,r,l,a);else{const n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),F(e,t,i,s,r,l,a)}finally{n&&n._endPatch()}}},$=(e,t,n,o,s,a,c,u)=>{let d,p;const{props:h,shapeFlag:g,transition:v,dirs:m}=e;if(d=e.el=l(e.type,a,h&&h.is,h),8&g?f(d,e.children):16&g&&O(e.children,d,null,o,s,Eo(e,a),c,u),m&&Zt(e,null,o,"created"),E(d,e,e.scopeId,c,o),h){for(const e in h)"value"===e||C(e)||r(d,e,null,h[e],a,o);"value"in h&&r(d,"value",null,h.value,a),(p=h.onVnodeBeforeMount)&&si(p,o,e)}m&&Zt(e,null,o,"beforeMount");const y=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(s,v);y&&v.beforeEnter(d),i(d,t,n),((p=h&&h.onVnodeMounted)||y||m)&&$o(()=>{p&&si(p,o,e),y&&v.enter(d),m&&Zt(e,null,o,"mounted")},s)},E=(e,t,n,o,i)=>{if(n&&g(e,n),o)for(let s=0;s<o.length;s++)g(e,o[s]);if(i){let n=i.subTree;if(t===n||jo(n.type)&&(n.ssContent===t||n.ssFallback===t)){const t=i.vnode;E(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},O=(e,t,n,o,i,s,r,l,a=0)=>{for(let c=a;c<e.length;c++){const a=e[c]=l?oi(e[c]):ni(e[c]);m(null,a,t,n,o,i,s,r,l)}},F=(e,n,o,i,s,l,a)=>{const c=n.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=n;u|=16&e.patchFlag;const h=e.props||t,g=n.props||t;let v;if(o&&Ao(o,!1),(v=g.onVnodeBeforeUpdate)&&si(v,o,n,e),p&&Zt(n,e,o,"beforeUpdate"),o&&Ao(o,!0),(h.innerHTML&&null==g.innerHTML||h.textContent&&null==g.textContent)&&f(c,""),d?L(e.dynamicChildren,d,c,o,i,Eo(n,s),l):a||W(e,n,c,null,o,i,Eo(n,s),l,!1),u>0){if(16&u)I(c,h,g,o,s);else if(2&u&&h.class!==g.class&&r(c,"class",null,g.class,s),4&u&&r(c,"style",h.style,g.style,s),8&u){const e=n.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t],i=h[n],l=g[n];l===i&&"value"!==n||r(c,n,i,l,s,o)}}1&u&&e.children!==n.children&&f(c,n.children)}else a||null!=d||I(c,h,g,o,s);((v=g.onVnodeUpdated)||p)&&$o(()=>{v&&si(v,o,n,e),p&&Zt(n,e,o,"updated")},i)},L=(e,t,n,o,i,s,r)=>{for(let l=0;l<t.length;l++){const a=e[l],c=t[l],u=a.el&&(a.type===Io||!Jo(a,c)||198&a.shapeFlag)?p(a.el):n;m(a,c,u,null,o,i,s,r,!0)}},I=(e,n,o,i,s)=>{if(n!==o){if(n!==t)for(const t in n)C(t)||t in o||r(e,t,n[t],null,s,i);for(const t in o){if(C(t))continue;const l=o[t],a=n[t];l!==a&&"value"!==t&&r(e,t,a,l,s,i)}"value"in o&&r(e,"value",n.value,o.value,s)}},P=(e,t,n,o,s,r,l,c,u)=>{const d=t.el=e?e.el:a(""),f=t.anchor=e?e.anchor:a("");let{patchFlag:p,dynamicChildren:h,slotScopeIds:g}=t;g&&(c=c?c.concat(g):g),null==e?(i(d,n,o),i(f,n,o),O(t.children||[],n,f,s,r,l,c,u)):p>0&&64&p&&h&&e.dynamicChildren&&e.dynamicChildren.length===h.length?(L(e.dynamicChildren,h,n,s,r,l,c),(null!=t.key||s&&t===s.subTree)&&Oo(e,t,!0)):W(e,t,n,f,s,r,l,c,u)},D=(e,t,n,o,i,s,r,l,a)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?i.ctx.activate(t,n,o,r,a):N(t,n,o,i,s,r,a):U(e,t,a)},N=(e,n,o,i,s,r,l)=>{const a=e.component=function(e,n,o){const i=e.type,s=(n?n.appContext:e.appContext)||ri,r={uid:li++,vnode:e,type:i,parent:n,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Q(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(s.provides),ids:n?n.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:yo(i,s),emitsOptions:io(i,s),emit:null,emitted:null,propsDefaults:t,inheritAttrs:i.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:o,suspenseId:o?o.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};r.ctx={_:r},r.root=n?n.root:r,r.emit=no.bind(null,r),e.ce&&e.ce(r);return r}(e,i,s);if(gn(e)&&(a.ctx.renderer=oe),function(e,t=!1,n=!1){t&&di(t);const{props:o,children:i}=e.vnode,s=hi(e);(function(e,t,n,o=!1){const i={},s=po();e.propsDefaults=/* @__PURE__ */Object.create(null),go(e,t,i,s);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=o?i:/* @__PURE__ */at(i):e.type.props?e.props=i:e.props=s,e.attrs=s})(e,o,s,t),((e,t,n)=>{const o=e.slots=po();if(32&e.vnode.shapeFlag){const e=t._;e?(ko(o,t,n),n&&j(o,"_",e,!0)):So(t,o)}else t&&Co(e,t)})(e,i,n||t);const r=s?function(e,t){const n=e.type;e.accessCache=/* @__PURE__ */Object.create(null),e.proxy=new Proxy(e.ctx,Dn);const{setup:o}=n;if(o){ve();const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,yi),slots:e.slots,emit:e.emit,expose:t}}(e):null,i=fi(e),s=Ot(o,e,0,[e.props,n]),r=_(s);if(me(),i(),!r&&!e.sp||hn(e)||cn(e),r){if(s.then(pi,pi),t)return s.then(t=>{vi(e,t)}).catch(t=>{Lt(t,e,0)});e.asyncDep=s}else vi(e,s)}else mi(e)}(e,t):void 0;t&&di(!1)}(a,!1,l),a.asyncDep){if(s&&s.registerDep(a,R,l),!e.el){const t=a.subTree=Xo(zo);b(null,t,n,o),e.placeholder=t.el}}else R(a,e,n,o,s,r,l)},U=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:i,component:s}=e,{props:r,children:l,patchFlag:a}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&a>=0))return!(!i&&!l||l&&l.$stable)||o!==r&&(o?!r||co(o,r,c):!!r);if(1024&a)return!0;if(16&a)return o?co(o,r,c):!!r;if(8&a){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(uo(r,o,n)&&!so(c,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void H(o,t,n);o.next=t,o.update()}else t.el=e.el,o.vnode=t},R=(e,t,n,o,i,s,r)=>{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:l,vnode:a}=e;{const n=Fo(e);if(n)return t&&(t.el=a.el,H(e,t,r)),void n.asyncDep.then(()=>{$o(()=>{e.isUnmounted||c()},i)})}let u,d=t;Ao(e,!1),t?(t.el=a.el,H(e,t,r)):t=a,n&&M(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&si(u,l,t,a),Ao(e,!0);const f=ro(e),h=e.subTree;e.subTree=f,m(h,f,p(h.el),X(h),e,i,s),t.el=f.el,null===d&&function({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}(e,f.el),o&&$o(o,i),(u=t.props&&t.props.onVnodeUpdated)&&$o(()=>si(u,l,t,a),i)}else{let r;const{el:l,props:a}=t,{bm:c,m:u,parent:d,root:f,type:p}=e,h=hn(t);Ao(e,!1),c&&M(c),!h&&(r=a&&a.onVnodeBeforeMount)&&si(r,d,t),Ao(e,!0);{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);const r=e.subTree=ro(e);m(null,r,n,o,e,i,s),t.el=r.el}if(u&&$o(u,i),!h&&(r=a&&a.onVnodeMounted)){const e=t;$o(()=>si(r,d,e),i)}(256&t.shapeFlag||d&&hn(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&$o(e.a,i),e.isMounted=!0,t=n=o=null}};e.scope.on();const a=e.effect=new te(l);e.scope.off();const c=e.update=a.run.bind(a),u=e.job=a.runIfDirty.bind(a);u.i=e,u.id=e.uid,a.scheduler=()=>Rt(u),Ao(e,!0),c()},H=(e,n,o)=>{n.component=e;const i=e.vnode.props;e.vnode=n,e.next=null,function(e,t,n,o){const{props:i,attrs:s,vnode:{patchFlag:r}}=e,l=/* @__PURE__ */gt(i),[a]=e.propsOptions;let c=!1;if(!(o||r>0)||16&r){let o;go(e,t,i,s)&&(c=!0);for(const s in l)t&&(u(t,s)||(o=A(s))!==s&&u(t,o))||(a?!n||void 0===n[s]&&void 0===n[o]||(i[s]=vo(a,l,s,void 0,e,!0)):delete i[s]);if(s!==l)for(const e in s)t&&u(t,e)||(delete s[e],c=!0)}else if(8&r){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let r=n[o];if(so(e.emitsOptions,r))continue;const d=t[r];if(a)if(u(s,r))d!==s[r]&&(s[r]=d,c=!0);else{const t=T(r);i[t]=vo(a,l,t,d,e,!1)}else d!==s[r]&&(s[r]=d,c=!0)}}c&&Ee(e.attrs,"set","")}(e,n.props,i,o),((e,n,o)=>{const{vnode:i,slots:s}=e;let r=!0,l=t;if(32&i.shapeFlag){const e=n._;e?o&&1===e?r=!1:ko(s,n,o):(r=!n.$stable,So(n,s)),l=n}else n&&(Co(e,n),l={default:1});if(r)for(const t in s)bo(t)||null!=l[t]||delete s[t]})(e,n.children,o),ve(),Wt(e),me()},W=(e,t,n,o,i,s,r,l,a=!1)=>{const c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void B(c,d,n,o,i,s,r,l,a);if(256&p)return void V(c,d,n,o,i,s,r,l,a)}8&h?(16&u&&Z(c,i,s),d!==c&&f(n,d)):16&u?16&h?B(c,d,n,o,i,s,r,l,a):Z(c,i,s,!0):(8&u&&f(n,""),16&h&&O(d,n,o,i,s,r,l,a))},V=(e,t,o,i,s,r,l,a,c)=>{t=t||n;const u=(e=e||n).length,d=t.length,f=Math.min(u,d);let p;for(p=0;p<f;p++){const n=t[p]=c?oi(t[p]):ni(t[p]);m(e[p],n,o,null,s,r,l,a,c)}u>d?Z(e,s,r,!0,!1,f):O(t,o,i,s,r,l,a,c,f)},B=(e,t,o,i,s,r,l,a,c)=>{let u=0;const d=t.length;let f=e.length-1,p=d-1;for(;u<=f&&u<=p;){const n=e[u],i=t[u]=c?oi(t[u]):ni(t[u]);if(!Jo(n,i))break;m(n,i,o,null,s,r,l,a,c),u++}for(;u<=f&&u<=p;){const n=e[f],i=t[p]=c?oi(t[p]):ni(t[p]);if(!Jo(n,i))break;m(n,i,o,null,s,r,l,a,c),f--,p--}if(u>f){if(u<=p){const e=p+1,n=e<d?t[e].el:i;for(;u<=p;)m(null,t[u]=c?oi(t[u]):ni(t[u]),o,n,s,r,l,a,c),u++}}else if(u>p)for(;u<=f;)G(e[u],s,r,!0),u++;else{const h=u,g=u,v=/* @__PURE__ */new Map;for(u=g;u<=p;u++){const e=t[u]=c?oi(t[u]):ni(t[u]);null!=e.key&&v.set(e.key,u)}let y,_=0;const b=p-g+1;let w=!1,x=0;const S=new Array(b);for(u=0;u<b;u++)S[u]=0;for(u=h;u<=f;u++){const n=e[u];if(_>=b){G(n,s,r,!0);continue}let i;if(null!=n.key)i=v.get(n.key);else for(y=g;y<=p;y++)if(0===S[y-g]&&Jo(n,t[y])){i=y;break}void 0===i?G(n,s,r,!0):(S[i-g]=u+1,i>=x?x=i:w=!0,m(n,t[i],o,null,s,r,l,a,c),_++)}const C=w?function(e){const t=e.slice(),n=[0];let o,i,s,r,l;const a=e.length;for(o=0;o<a;o++){const a=e[o];if(0!==a){if(i=n[n.length-1],e[i]<a){t[o]=i,n.push(o);continue}for(s=0,r=n.length-1;s<r;)l=s+r>>1,e[n[l]]<a?s=l+1:r=l;a<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,r=n[s-1];for(;s-- >0;)n[s]=r,r=t[r];return n}(S):n;for(y=C.length-1,u=b-1;u>=0;u--){const e=g+u,n=t[e],f=t[e+1],p=e+1<d?f.el||Mo(f):i;0===S[u]?m(null,n,o,p,s,r,l,a,c):w&&(y<0||u!==C[y]?q(n,o,p,2):y--)}}},q=(e,t,n,o,r=null)=>{const{el:l,type:a,transition:c,children:u,shapeFlag:d}=e;if(6&d)return void q(e.component.subTree,t,n,o);if(128&d)return void e.suspense.move(t,n,o);if(64&d)return void a.move(e,t,n,oe);if(a===Io){i(l,t,n);for(let e=0;e<u.length;e++)q(u[e],t,n,o);return void i(e.anchor,t,n)}if(a===Do)return void x(e,t,n);if(2!==o&&1&d&&c)if(0===o)c.beforeEnter(l),i(l,t,n),$o(()=>c.enter(l),r);else{const{leave:o,delayLeave:r,afterLeave:a}=c,u=()=>{e.ctx.isUnmounted?s(l):i(l,t,n)},d=()=>{l._isLeaving&&l[rn](!0),o(l,()=>{u(),a&&a()})};r?r(l,u,d):d()}else i(l,t,n)},G=(e,t,n,o=!1,i=!1)=>{const{type:s,props:r,ref:l,children:a,dynamicChildren:c,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(-2===d&&(i=!1),null!=l&&(ve(),fn(l,null,n,e,!0),me()),null!=p&&(t.renderCache[p]=void 0),256&u)return void t.ctx.deactivate(e);const h=1&u&&f,g=!hn(e);let v;if(g&&(v=r&&r.onVnodeBeforeUnmount)&&si(v,t,e),6&u)Y(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);h&&Zt(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,oe,o):c&&!c.hasOnce&&(s!==Io||d>0&&64&d)?Z(c,t,n,!1,!0):(s===Io&&384&d||!i&&16&u)&&Z(a,t,n),o&&J(e)}(g&&(v=r&&r.onVnodeUnmounted)||h)&&$o(()=>{v&&si(v,t,e),h&&Zt(e,null,t,"unmounted")},n)},J=e=>{const{type:t,el:n,anchor:o,transition:i}=e;if(t===Io)return void K(n,o);if(t===Do)return void S(e);const r=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:o}=i,s=()=>t(n,r);o?o(e.el,r,s):s()}else r()},K=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},Y=(e,t,n)=>{const{bum:o,scope:i,job:s,subTree:r,um:l,m:a,a:c}=e;Lo(a),Lo(c),o&&M(o),i.stop(),s&&(s.flags|=8,G(r,e,t,n)),l&&$o(l,t),$o(()=>{e.isUnmounted=!0},t)},Z=(e,t,n,o=!1,i=!1,s=0)=>{for(let r=s;r<e.length;r++)G(e[r],t,n,o,i)},X=e=>{if(6&e.shapeFlag)return X(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=h(e.anchor||e.el),n=t&&t[sn];return n?h(n):t};let ee=!1;const ne=(e,t,n)=>{let o;null==e?t._vnode&&(G(t._vnode,null,null,!0),o=t._vnode.component):m(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ee||(ee=!0,Wt(o),Vt(),ee=!1)},oe={p:m,um:G,m:q,r:J,mt:N,mc:O,pc:W,pbc:L,n:X,o:e};let ie;return{render:ne,hydrate:ie,createApp:eo(ne)}}(e)}function Eo({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ao({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Oo(e,t,n=!1){const o=e.children,i=t.children;if(d(o)&&d(i))for(let s=0;s<o.length;s++){const e=o[s];let t=i[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=i[s]=oi(i[s]),t.el=e.el),n||-2===t.patchFlag||Oo(e,t)),t.type===Po&&(-1===t.patchFlag&&(t=i[s]=oi(t)),t.el=e.el),t.type!==zo||t.el||(t.el=e.el)}}function Fo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fo(t)}function Lo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Mo(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Mo(t.subTree):null}const jo=e=>e.__isSuspense;const Io=/* @__PURE__ */Symbol.for("v-fgt"),Po=/* @__PURE__ */Symbol.for("v-txt"),zo=/* @__PURE__ */Symbol.for("v-cmt"),Do=/* @__PURE__ */Symbol.for("v-stc"),No=[];let Uo=null;function Ro(e=!1){No.push(Uo=e?null:[])}let Ho=1;function Wo(e,t=!1){Ho+=e,e<0&&Uo&&t&&(Uo.hasOnce=!0)}function Vo(e){return e.dynamicChildren=Ho>0?Uo||n:null,No.pop(),Uo=No[No.length-1]||null,Ho>0&&Uo&&Uo.push(e),e}function Bo(e,t,n,o,i,s){return Vo(Zo(e,t,n,o,i,s,!0))}function qo(e,t,n,o,i){return Vo(Xo(e,t,n,o,i,!0))}function Go(e){return!!e&&!0===e.__v_isVNode}function Jo(e,t){return e.type===t.type&&e.key===t.key}const Ko=({key:e})=>null!=e?e:null,Yo=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||/* @__PURE__ */yt(e)||g(e)?{i:Gt,r:e,k:t,f:!!n}:e:null);function Zo(e,t=null,n=null,o=0,i=null,s=(e===Io?0:1),r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ko(t),ref:t&&Yo(t),scopeId:Jt,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:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Gt};return l?(ii(a,n),128&s&&e.normalize(a)):n&&(a.shapeFlag|=v(n)?8:16),Ho>0&&!r&&Uo&&(a.patchFlag>0||6&s)&&32!==a.patchFlag&&Uo.push(a),a}const Xo=function(e,t=null,n=null,o=0,i=null,s=!1){e&&e!==Ln||(e=zo);if(Go(e)){const o=Qo(e,t,!0);return n&&ii(o,n),Ho>0&&!s&&Uo&&(6&o.shapeFlag?Uo[Uo.indexOf(e)]=o:Uo.push(o)),o.patchFlag=-2,o}r=e,g(r)&&"__vccOpts"in r&&(e=e.__vccOpts);var r;if(t){t=function(e){return e?/* @__PURE__ */ht(e)||ho(e)?l({},e):e:null}(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=W(e)),y(n)&&(/* @__PURE__ */ht(n)&&!d(n)&&(n=l({},n)),t.style=D(n))}const a=v(e)?1:jo(e)?128:(e=>e.__isTeleport)(e)?64:y(e)?4:g(e)?2:0;return Zo(e,t,n,o,i,a,s,!0)};function Qo(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:l,children:a,transition:c}=e,u=t?function(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=W([t.class,o.class]));else if("style"===e)t.style=D([t.style,o.style]);else if(s(e)){const n=t[e],i=o[e];!i||n===i||d(n)&&n.includes(i)||(t[e]=n?[].concat(n,i):i)}else""!==e&&(t[e]=o[e])}return t}(i||{},t):i,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Ko(u),ref:t&&t.ref?n&&r?d(r)?r.concat(Yo(t)):[r,Yo(t)]:Yo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Io?-1===l?16:16|l:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Qo(e.ssContent),ssFallback:e.ssFallback&&Qo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&o&&ln(f,c.clone(f)),f}function ei(e=" ",t=0){return Xo(Po,null,e,t)}function ti(e="",t=!1){return t?(Ro(),qo(zo,null,e)):Xo(zo,null,e)}function ni(e){return null==e||"boolean"==typeof e?Xo(zo):d(e)?Xo(Io,null,e.slice()):Go(e)?oi(e):Xo(Po,null,String(e))}function oi(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Qo(e)}function ii(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(d(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),ii(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||ho(t)?3===o&&Gt&&(1===Gt.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Gt}}else g(t)?(t={default:t,_ctx:Gt},n=32):(t=String(t),64&o?(n=16,t=[ei(t)]):n=8);e.children=t,e.shapeFlag|=n}function si(e,t,n,o=null){Ft(e,t,7,[n,o])}const ri=Xn();let li=0;let ai=null;const ci=()=>ai||Gt;let ui,di;{const e=z(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach(t=>t(e)):o[0](e)}};ui=t("__VUE_INSTANCE_SETTERS__",e=>ai=e),di=t("__VUE_SSR_SETTERS__",e=>gi=e)}const fi=e=>{const t=ai;return ui(e),e.scope.on(),()=>{e.scope.off(),ui(t)}},pi=()=>{ai&&ai.scope.off(),ui(null)};function hi(e){return 4&e.vnode.shapeFlag}let gi=!1;function vi(e,t,n){g(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:y(t)&&(e.setupState=xt(t)),mi(e)}function mi(e,t,n){const i=e.type;e.render||(e.render=i.render||o);{const t=fi(e);ve();try{Rn(e)}finally{me(),t()}}}const yi={get:(e,t)=>(Te(e,0,""),e[t])};function _i(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(xt((t=e.exposed,!u(t,"__v_skip")&&Object.isExtensible(t)&&j(t,"__v_skip",!0),t)),{get:(t,n)=>n in t?t[n]:n in Pn?Pn[n](e):void 0,has:(e,t)=>t in e||t in Pn})):e.proxy;var t}const bi=(e,t)=>/* @__PURE__ */Ct(e,0,gi),wi="3.5.30";let xi;const Si="undefined"!=typeof window&&window.trustedTypes;if(Si)try{xi=/* @__PURE__ */Si.createPolicy("vue",{createHTML:e=>e})}catch(hr){}const Ci=xi?e=>xi.createHTML(e):e=>e,ki="undefined"!=typeof document?document:null,$i=ki&&/* @__PURE__ */ki.createElement("template"),Ti={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i="svg"===t?ki.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?ki.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?ki.createElement(e,{is:n}):ki.createElement(e);return"select"===e&&o&&null!=o.multiple&&i.setAttribute("multiple",o.multiple),i},createText:e=>ki.createTextNode(e),createComment:e=>ki.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ki.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,s){const r=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==s&&(i=i.nextSibling););else{$i.innerHTML=Ci("svg"===o?`<svg>${e}</svg>`:"mathml"===o?`<math>${e}</math>`:e);const i=$i.content;if("svg"===o||"mathml"===o){const e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ei=/* @__PURE__ */Symbol("_vtc");const Ai=/* @__PURE__ */Symbol("_vod"),Oi=/* @__PURE__ */Symbol("_vsh"),Fi=/* @__PURE__ */Symbol(""),Li=/(?:^|;)\s*display\s*:/;const Mi=/\s*!important$/;function ji(e,t,n){if(d(n))n.forEach(n=>ji(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Pi[t];if(n)return n;let o=T(t);if("filter"!==o&&o in e)return Pi[t]=o;o=O(o);for(let i=0;i<Ii.length;i++){const n=Ii[i]+o;if(n in e)return Pi[t]=n}return t}(e,t);Mi.test(n)?e.setProperty(A(o),n.replace(Mi,""),"important"):e[o]=n}}const Ii=["Webkit","Moz","ms"],Pi={};const zi="http://www.w3.org/1999/xlink";function Di(e,t,n,o,i,s=V(t)){o&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(zi,t.slice(6,t.length)):e.setAttributeNS(zi,t,n):null==n||s&&!B(n)?e.removeAttribute(t):e.setAttribute(t,s?"":m(n)?String(n):n)}function Ni(e,t,n,o,i){if("innerHTML"===t||"textContent"===t)return void(null!=n&&(e[t]="innerHTML"===t?Ci(n):n));const s=e.tagName;if("value"===t&&"PROGRESS"!==s&&!s.includes("-")){const o="OPTION"===s?e.getAttribute("value")||"":e.value,i=null==n?"checkbox"===e.type?"on":"":String(n);return o===i&&"_value"in e||(e.value=i),null==n&&e.removeAttribute(t),void(e._value=n)}let r=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=B(n):null==n&&"string"===o?(n="",r=!0):"number"===o&&(n=0,r=!0)}try{e[t]=n}catch(hr){}r&&e.removeAttribute(i||t)}const Ui=/* @__PURE__ */Symbol("_vei");function Ri(e,t,n,o,i=null){const s=e[Ui]||(e[Ui]={}),r=s[t];if(o&&r)r.value=o;else{const[n,l]=function(e){let t;if(Hi.test(e)){let n;for(t={};n=e.match(Hi);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):A(e.slice(2));return[n,t]}(t);if(o){const r=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Ft(function(e,t){if(d(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Bi(),n}(o,i);!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,r,l)}else r&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,r,l),s[t]=void 0)}}const Hi=/(?:Once|Passive|Capture)$/;let Wi=0;const Vi=/* @__PURE__ */Promise.resolve(),Bi=()=>Wi||(Vi.then(()=>Wi=0),Wi=Date.now());const qi=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const Gi=/* @__PURE__ */l({patchProp:(e,t,n,o,i,l)=>{const a="svg"===i;"class"===t?function(e,t,n){const o=e[Ei];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,a):"style"===t?function(e,t,n){const o=e.style,i=v(n);let s=!1;if(n&&!i){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&ji(o,t,"")}else for(const e in t)null==n[e]&&ji(o,e,"");for(const e in n)"display"===e&&(s=!0),ji(o,e,n[e])}else if(i){if(t!==n){const e=o[Fi];e&&(n+=";"+e),o.cssText=n,s=Li.test(n)}}else t&&e.removeAttribute("style");Ai in e&&(e[Ai]=s?o.display:"",e[Oi]&&(o.display="none"))}(e,n,o):s(t)?r(t)||Ri(e,t,0,o,l):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&qi(t)&&g(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"autocorrect"===t)return!1;if("sandbox"===t&&"IFRAME"===e.tagName)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(qi(t)&&v(n))return!1;return t in e}(e,t,o,a))?(Ni(e,t,o),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Di(e,t,o,a,0,"value"!==t)):e._isVueCE&&(function(e,t){const n=e._def.props;if(!n)return!1;const o=T(t);return Array.isArray(n)?n.some(e=>T(e)===o):Object.keys(n).some(e=>T(e)===o)}(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!v(o)))?Ni(e,T(t),o,0,t):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),Di(e,t,o,a))}},Ti);let Ji;const Ki=(...e)=>{const t=(Ji||(Ji=To(Gi))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(v(e)){return document.querySelector(e)}return e}(e);if(!o)return;const i=t._component;g(i)||i.render||i.template||(i.template=o.innerHTML),1===o.nodeType&&(o.textContent="");const s=n(o,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};const Yi={enabled:!0,customElementName:"wmt-fanid-protected",placeholder:{title:"Exclusive Content",message:"Sign in with FanID to view this content",buttonText:"Sign In"},style:"blur",blurAmount:8,minHeight:280,revealAnimation:"fade"};class Zi{state;listeners=/* @__PURE__ */new Set;constructor(e){this.state={initialized:!1,isAuthenticated:!1,profile:null,organization:null,classPrefix:"_"+Math.random().toString(36).slice(2,7),config:{...Yi,...e,placeholder:{...Yi.placeholder,...e?.placeholder}}}}getState(){return this.state}update(e){this.state={...this.state,...e},this.notify()}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){for(const e of this.listeners)e(this.state)}}let Xi=null;function Qi(){if(!Xi)throw new Error("FanIDState not initialized. Call FanIDWidget.init() first.");return Xi}class es{handlers=/* @__PURE__ */new Map;on(e,t){this.handlers.has(e)||this.handlers.set(e,/* @__PURE__ */new Set),this.handlers.get(e).add(t)}off(e,t){this.handlers.get(e)?.delete(t)}emit(e,...t){const n=this.handlers.get(e);if(n)for(const o of n)try{o(...t)}catch{}}removeAll(){this.handlers.clear()}}let ts=null;function ns(){if(!ts)throw new Error("FanIDEvents not initialized. Call FanIDWidget.init() first.");return ts}function os(e,t){const n=parseInt(e.replace("#",""),16),o=Math.round(2.55*t);return"#"+(16777216+65536*Math.max(0,(n>>16)-o)+256*Math.max(0,(n>>8&255)-o)+Math.max(0,(255&n)-o)).toString(16).slice(1)}const is=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},ss={class:"fanid-widget"},rs={class:"fanid-widget__container"};const ls=/* @__PURE__ */is({},[["render",function(e,t){return Ro(),Bo("div",ss,[Zo("div",rs,[Zo("button",{"aria-label":"Close Widget",class:"fanid-widget__close",label:"Close Widget",onClick:t[0]||(t[0]=t=>e.$emit("close"))}," × "),Mn(e.$slots,"default")])])}]]),as=["alt","src"],cs=/* @__PURE__ */an({__name:"FanIDLogo",props:{logo:{},organizationName:{}},setup:e=>(t,n)=>e.logo?(Ro(),Bo("img",{key:0,alt:e.organizationName||"WMT Fan ID",src:e.logo,class:"fanid-widget__icon"},null,8,as)):ti("",!0)}),us={class:"fanid-widget__content"},ds={class:"fanid-widget__brand"},fs={class:"fanid-widget__brand-text"},ps={class:"fanid-widget__brand-label"},hs=/* @__PURE__ */an({__name:"LoginDefault",props:{logo:{},organizationName:{}},emits:["login"],setup:e=>(t,n)=>(Ro(),Bo("div",us,[Zo("div",ds,[e.logo?(Ro(),qo(cs,{key:0,logo:e.logo,"organization-name":e.organizationName},null,8,["logo","organization-name"])):ti("",!0),Zo("div",fs,[Zo("span",ps,J(e.organizationName||"Fan")+" ID",1),n[1]||(n[1]=Zo("span",{class:"fanid-widget__text"},"Sign in to access exclusive content",-1))])]),Zo("button",{class:"fanid-widget__button",onClick:n[0]||(n[0]=e=>t.$emit("login"))}," Sign In ")]))}),gs={height:"24",viewBox:"0 0 24 24",width:"24"};const vs=/* @__PURE__ */is({},[["render",function(e,t){return Ro(),Bo("svg",gs,[...t[0]||(t[0]=[Zo("path",{d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h6q.425 0 .713.288T12 20t-.288.713T11 21zm12.175-8H10q-.425 0-.712-.288T9 12t.288-.712T10 11h7.175L15.3 9.125q-.275-.275-.275-.675t.275-.7t.7-.313t.725.288L20.3 11.3q.3.3.3.7t-.3.7l-3.575 3.575q-.3.3-.712.288t-.713-.313q-.275-.3-.262-.712t.287-.688z",fill:"#002B5C"},null,-1)])])}]]),ms={class:"fanid-widget__content fanid-widget__content--logged-in"},ys={class:"fanid-widget__user-info"},_s={class:"fanid-widget__user-avatar"},bs={class:"fanid-widget__user-text"},ws={class:"fanid-widget__user-name"},xs={class:"fanid-widget__user-email"},Ss={class:"fanid-widget__actions"},Cs=/* @__PURE__ */an({__name:"LoggedIn",props:{displayName:{},email:{}},emits:["logout","redirect"],setup:e=>(t,n)=>(Ro(),Bo("div",ms,[Zo("div",ys,[Zo("div",_s,J((e.displayName||"U").charAt(0).toUpperCase()),1),Zo("div",bs,[Zo("div",ws,J(e.displayName),1),Zo("div",xs,J(e.email),1)])]),Zo("div",Ss,[Zo("button",{class:"fanid-widget__redirect-button",onClick:n[0]||(n[0]=e=>t.$emit("redirect"))}," My profile "),Zo("button",{class:"fanid-widget__logout-button",title:"Sign out",onClick:n[1]||(n[1]=e=>t.$emit("logout"))},[Xo(vs)])])]))}),ks={class:"fanid-widget__loading"};const $s=/* @__PURE__ */is({},[["render",function(e,t){return Ro(),Bo("div",ks,"Loading...")}]]),Ts=/* @__PURE__ */an({__name:"Widget",setup(e){const t=/* @__PURE__ */_t(!0),n=/* @__PURE__ */_t(!1),o=/* @__PURE__ */_t(!1),i=/* @__PURE__ */_t(null),s=/* @__PURE__ */_t(null),r=bi(()=>i.value?.firstName||null),l=bi(()=>i.value?.email||null),a=bi(()=>s.value?.name??null),c=bi(()=>s.value?.branding?.logoUrl??null),u=bi(()=>{const e=s.value?.branding?.primaryColor;return e?{"--fanid-primary-color":e,"--fanid-primary-color-hover":os(e,15)}:{}}),d=()=>{window.__fanid_api?.redirectToLogin()},f=()=>{const e=window.__fanid_api?.getMyProfileUrl();e&&(window.location.href=e)},p=async()=>{n.value=!0;try{await(window.__fanid_api?.logout()),o.value=!1,i.value=null,Qi().update({isAuthenticated:!1,profile:null}),ns().emit("auth:logout")}finally{n.value=!1}},h=()=>{t.value=!1,sessionStorage.setItem("fanid_widget_closed","true")};let g=null;return Sn(()=>{"true"===sessionStorage.getItem("fanid_widget_closed")&&(t.value=!1);const e=Qi(),n=e.getState();o.value=n.isAuthenticated,i.value=n.profile,s.value=n.organization,g=e.subscribe(e=>{o.value=e.isAuthenticated,i.value=e.profile,s.value=e.organization})}),Tn(()=>{g?.()}),(e,i)=>t.value?(Ro(),qo(ls,{key:0,style:D(u.value),onClose:h},{default:Yt(()=>[n.value?(Ro(),qo($s,{key:0})):o.value?(Ro(),qo(Cs,{key:2,"display-name":r.value,email:l.value,onLogout:p,onRedirect:f},null,8,["display-name","email"])):(Ro(),qo(hs,{key:1,logo:c.value,"organization-name":a.value,onLogin:d},null,8,["logo","organization-name"]))]),_:1},8,["style"])):ti("",!0)}}),Es={fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},As={silent:{level:-1},fatal:{level:Es.fatal},error:{level:Es.error},warn:{level:Es.warn},log:{level:Es.log},info:{level:Es.info},success:{level:Es.success},fail:{level:Es.fail},ready:{level:Es.info},start:{level:Es.info},box:{level:Es.info},debug:{level:Es.debug},trace:{level:Es.trace},verbose:{level:Es.verbose}};function Os(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&(!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e)))}function Fs(e,t,n=".",o){if(!Os(t))return Fs(e,{},n);const i=Object.assign({},t);for(const s in e){if("__proto__"===s||"constructor"===s)continue;const t=e[s];null!=t&&(Array.isArray(t)&&Array.isArray(i[s])?i[s]=[...t,...i[s]]:Os(t)&&Os(i[s])?i[s]=Fs(t,i[s],(n?`${n}.`:"")+s.toString()):i[s]=t)}return i}const Ls=(...e)=>e.reduce((e,t)=>Fs(e,t,""),{});function Ms(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let js=!1;const Is=[];class Ps{options;_lastLog;_mockFn;constructor(e={}){const t=e.types||As;this.options=Ls({...e,defaults:{...e.defaults},level:zs(e.level,t),reporters:[...e.reporters||[]]},{types:As,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const n in t){const e={type:n,...this.options.defaults,...t[n]};this[n]=this._wrapLogFn(e),this[n].raw=this._wrapLogFn(e,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=zs(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,t)}create(e){const t=new Ps({...this.options,...e});return this._mockFn&&t.mockTypes(this._mockFn),t}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){const t=this.options.reporters.indexOf(e);if(-1!==t)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this.options.types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this.options.types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){js=!0}resumeLogs(){js=!1;const e=Is.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){const t=e||this.options.mockFn;if(this._mockFn=t,"function"==typeof t)for(const n in this.options.types)this[n]=t(n,this.options.types[n])||this[n],this[n].raw=this[n]}_wrapLogFn(e,t){return(...n)=>{if(!js)return this._logFn(e,n,t);Is.push([this,e,n,t])}}_logFn(e,t,n){if((e.level||0)>this.level)return!1;const o={date:/* @__PURE__ */new Date,args:[],...e,level:zs(e.level,this.options.types)};!n&&1===t.length&&Ms(t[0])?Object.assign(o,t[0]):o.args=[...t],o.message&&(o.args.unshift(o.message),delete o.message),o.additional&&(Array.isArray(o.additional)||(o.additional=o.additional.split("\n")),o.args.push("\n"+o.additional.join("\n")),delete o.additional),o.type="string"==typeof o.type?o.type.toLowerCase():"log",o.tag="string"==typeof o.tag?o.tag:"";const i=(e=!1)=>{const t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){const e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=o,this._log(o))};clearTimeout(this._lastLog.timeout);const s=this._lastLog.time&&o.date?o.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=o.date,s<this.options.throttle)try{const e=JSON.stringify([o.type,o.tag,o.args]),t=this._lastLog.serialized===e;if(this._lastLog.serialized=e,t&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin))return void(this._lastLog.timeout=setTimeout(i,this.options.throttle))}catch{}i(!0)}_log(e){for(const t of this.options.reporters)t.log(e,{options:this.options})}}function zs(e,t={},n=3){return void 0===e?n:"number"==typeof e?e:t[e]&&void 0!==t[e].level?t[e].level:n}Ps.prototype.add=Ps.prototype.addReporter,Ps.prototype.remove=Ps.prototype.removeReporter,Ps.prototype.clear=Ps.prototype.removeReporter,Ps.prototype.withScope=Ps.prototype.withTag,Ps.prototype.mock=Ps.prototype.mockTypes,Ps.prototype.pause=Ps.prototype.pauseLogs,Ps.prototype.resume=Ps.prototype.resumeLogs;class Ds{options;defaultColor;levelColorMap;typeColorMap;constructor(e){this.options={...e},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(e){return e<1?console.__error||console.error:1===e?console.__warn||console.warn:console.__log||console.log}log(e){const t=this._getLogFn(e.level),n="log"===e.type?"":e.type,o=e.tag||"",i=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,s=`%c${[o,n].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${s}%c ${e.args[0]}`,i,"",...e.args.slice(1)):t(s,i,...e.args)}}function Ns(e={}){const t=function(e={}){return new Ps(e)}({reporters:e.reporters||[new Ds({})],prompt:(e,t={})=>"confirm"===t.type?Promise.resolve(confirm(e)):Promise.resolve(prompt(e)),...e});return t}Ns();class Us{baseUrl;orgDomain=null;logger;constructor(e){this.baseUrl=e||"https://fanid.co",this.logger=Ns().withTag("FanIDApi")}async checkAuthStatus(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/me`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(401===e.status)return{isAuthenticated:!1,profile:null};if(404===e.status)return{isAuthenticated:!0,profile:null};if(e.ok){return{isAuthenticated:!0,profile:(await e.json()).data}}throw new Error(`HTTP error! status: ${e.status}`)}catch(e){return this.logger.info("Error checking authentication status:",e),{isAuthenticated:!1,profile:null}}}async getOrganizationProfile(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/organization-profile`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(401===e.status){return await this.refreshToken()?this.getOrganizationProfile():null}if(404===e.status)return null;if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return(await e.json()).data}catch(e){return this.logger.error("Error fetching organization profile:",e),null}}async getMe(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/me`,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(401===e.status){return await this.refreshToken()?this.getMe():null}if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return(await e.json()).data}catch(e){return this.logger.error("Error fetching me:",e),null}}async refreshToken(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/refresh`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}});return!!e.ok||(this.logger.error("Failed to refresh token, status:",e.status),!1)}catch(e){return this.logger.error("Error refreshing token:",e),!1}}async logout(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/logout`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}});if(!e.ok)return this.logger.error("Logout failed, status:",e.status),null;return(await e.json()).data}catch(e){return this.logger.error("Error during logout:",e),null}}async getOrganization(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/organization`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const{data:t}=await e.json();return t?.domainName&&(this.orgDomain=t.domainName),t}catch(e){return this.logger.error("Error fetching organization branding:",e),null}}async connectUserToTheFanIdOrg(){try{const e=await fetch(`${this.baseUrl}/api/subscriber/organization-profile`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const{data:t}=await e.json();return t}catch(e){return this.logger.error("Error fetching organization branding:",e),null}}getLoginUrl(e=window.location.href){const t=encodeURIComponent(e);return`${this.orgDomain?`https://${this.orgDomain}/login`:`${this.baseUrl}/login`}?returnUrl=${t}`}getMyProfileUrl(){return`${this.orgDomain?`https://${this.orgDomain}`:this.baseUrl}/my-profile`}redirectToLogin(){window.location.href=this.getLoginUrl()}getBaseUrl(){return this.baseUrl}getOrgDomain(){return this.orgDomain}}let Rs=null,Hs=null;function Ws(e){return{root:`${e}_root`,content:`${e}_content`,overlay:`${e}_overlay`,gradient:`${e}_gradient`,panel:`${e}_panel`,title:`${e}_title`,message:`${e}_msg`,button:`${e}_btn`,logo:`${e}_logo`,revealed:`${e}_revealed`,overlayHost:`${e}_host`,fullpage:`${e}_fullpage`,fullpageClose:`${e}_fpclose`,modeBlur:`${e}_blur`,modeGradient:`${e}_grad`,modeCover:`${e}_cover`}}function Vs(e,t){if(Rs)return;const n=function(e,t){let n=`\n .${e.root} {\n position: var(--fanid-gate-root-position, relative);\n overflow: var(--fanid-gate-root-overflow, hidden);\n min-height: var(--fanid-gate-min-height, ${t.minHeight}px);\n }\n\n .${e.revealed} .${e.content} {\n filter: none !important;\n user-select: auto !important;\n pointer-events: auto !important;\n }\n\n .${e.revealed} .${e.overlay} {\n display: none !important;\n }\n\n .${e.overlay} {\n position: var(--fanid-gate-overlay-position, absolute);\n inset: var(--fanid-gate-overlay-inset, 0);\n display: var(--fanid-gate-overlay-display, flex);\n align-items: var(--fanid-gate-overlay-align, center);\n justify-content: var(--fanid-gate-overlay-justify, center);\n z-index: var(--fanid-gate-overlay-z-index, 1);\n }\n\n .${e.gradient} {\n position: var(--fanid-gate-gradient-position, absolute);\n inset: var(--fanid-gate-gradient-inset, 0);\n pointer-events: var(--fanid-gate-gradient-pointer-events, none);\n }\n\n .${e.panel} {\n position: var(--fanid-gate-panel-position, relative);\n z-index: var(--fanid-gate-panel-z-index, 2);\n background: var(--fanid-gate-panel-bg, white);\n border-radius: var(--fanid-gate-panel-radius, 12px);\n padding: var(--fanid-gate-panel-padding, 32px 28px);\n text-align: var(--fanid-gate-panel-text-align, center);\n max-width: var(--fanid-gate-panel-max-width, 380px);\n width: var(--fanid-gate-panel-width, 90%);\n box-shadow: var(--fanid-gate-panel-shadow, 0 8px 32px rgba(0, 0, 0, 0.12));\n font-family: var(--fanid-gate-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif);\n }\n\n .${e.logo} {\n max-height: var(--fanid-gate-logo-height, 40px);\n max-width: var(--fanid-gate-logo-max-width, 160px);\n object-fit: var(--fanid-gate-logo-fit, contain);\n margin-bottom: var(--fanid-gate-logo-margin, 16px);\n }\n\n .${e.title} {\n font-size: var(--fanid-gate-title-size, 18px);\n font-weight: var(--fanid-gate-title-weight, 700);\n color: var(--fanid-gate-title-color, #002b5c);\n margin: var(--fanid-gate-title-margin, 0 0 8px);\n line-height: var(--fanid-gate-title-line-height, 1.3);\n }\n\n .${e.message} {\n font-size: var(--fanid-gate-message-size, 14px);\n color: var(--fanid-gate-message-color, #002b5c);\n opacity: var(--fanid-gate-message-opacity, 0.7);\n margin: var(--fanid-gate-message-margin, 0 0 20px);\n line-height: var(--fanid-gate-message-line-height, 1.5);\n }\n\n .${e.button} {\n display: var(--fanid-gate-button-display, inline-flex);\n align-items: var(--fanid-gate-button-align, center);\n justify-content: var(--fanid-gate-button-justify, center);\n width: var(--fanid-gate-button-width, 100%);\n height: var(--fanid-gate-button-height, 44px);\n padding: var(--fanid-gate-button-padding, 0 20px);\n background: var(--fanid-gate-button-bg, var(--fanid-primary-color, #f26522));\n color: var(--fanid-gate-button-color, white);\n border: var(--fanid-gate-button-border, none);\n border-radius: var(--fanid-gate-button-radius, 30px);\n font-size: var(--fanid-gate-button-size, 15px);\n font-weight: var(--fanid-gate-button-weight, 600);\n cursor: var(--fanid-gate-button-cursor, pointer);\n transition: var(--fanid-gate-button-transition, filter 0.2s ease);\n font-family: var(--fanid-gate-button-font, inherit);\n }\n\n .${e.button}:hover {\n filter: var(--fanid-gate-button-hover-filter, brightness(0.9));\n }\n\n .${e.button}:active {\n transform: var(--fanid-gate-button-active-transform, scale(0.98));\n }\n\n .${e.overlayHost} {\n position: var(--fanid-gate-host-position, absolute);\n inset: var(--fanid-gate-host-inset, 0);\n z-index: var(--fanid-gate-host-z-index, 1);\n }\n\n .${e.fullpage} {\n position: var(--fanid-gate-fullpage-position, fixed);\n inset: var(--fanid-gate-fullpage-inset, 0);\n z-index: var(--fanid-gate-fullpage-z-index, 999998);\n display: var(--fanid-gate-fullpage-display, flex);\n align-items: var(--fanid-gate-fullpage-align, center);\n justify-content: var(--fanid-gate-fullpage-justify, center);\n background: var(--fanid-gate-fullpage-bg, rgba(255, 255, 255, 0.85));\n backdrop-filter: var(--fanid-gate-fullpage-backdrop, blur(4px));\n }\n\n .${e.fullpage} .${e.panel} {\n pointer-events: var(--fanid-gate-fullpage-panel-pointer-events, auto);\n }\n\n .${e.fullpageClose} {\n position: var(--fanid-gate-close-position, absolute);\n top: var(--fanid-gate-close-top, 12px);\n right: var(--fanid-gate-close-right, 16px);\n background: var(--fanid-gate-close-bg, none);\n border: var(--fanid-gate-close-border, none);\n font-size: var(--fanid-gate-close-size, 28px);\n cursor: var(--fanid-gate-close-cursor, pointer);\n color: var(--fanid-gate-close-color, #002b5c);\n opacity: var(--fanid-gate-close-opacity, 0.5);\n transition: var(--fanid-gate-close-transition, opacity 0.2s);\n line-height: var(--fanid-gate-close-line-height, 1);\n }\n\n .${e.fullpageClose}:hover {\n opacity: var(--fanid-gate-close-hover-opacity, 1);\n }\n `;return n+=function(e,t){return`\n .${e.modeBlur} .${e.content} {\n filter: var(--fanid-gate-content-filter, blur(${t}px));\n user-select: var(--fanid-gate-content-user-select, none);\n pointer-events: var(--fanid-gate-content-pointer-events, none);\n }\n .${e.modeBlur} .${e.gradient} {\n background: var(--fanid-gate-overlay-bg, rgba(255, 255, 255, 0.1));\n backdrop-filter: var(--fanid-gate-overlay-backdrop, blur(2px));\n }\n `}(e,t.blurAmount),n+=function(e,t){const n=t??120;return`\n .${e.modeGradient} .${e.content} {\n user-select: var(--fanid-gate-content-user-select, none);\n pointer-events: var(--fanid-gate-content-pointer-events, none);\n }\n .${e.modeGradient} .${e.gradient} {\n background: var(--fanid-gate-gradient-bg, linear-gradient(\n to bottom,\n transparent ${n}px,\n rgba(255, 255, 255, 0.8) ${n+40}px,\n white ${n+100}px\n ));\n }\n .${e.modeGradient} .${e.overlay} {\n align-items: var(--fanid-gate-overlay-align-gradient, flex-end);\n padding-bottom: var(--fanid-gate-overlay-padding-bottom, 24px);\n }\n `}(e,t.teaserHeight),n+=function(e){return`\n .${e.modeCover} .${e.content} {\n opacity: var(--fanid-gate-content-cover-opacity, 0);\n height: var(--fanid-gate-content-cover-height, 0);\n overflow: var(--fanid-gate-content-cover-overflow, hidden);\n pointer-events: var(--fanid-gate-content-pointer-events, none);\n }\n .${e.modeCover} .${e.gradient} {\n background: var(--fanid-gate-overlay-bg, #f8f9fa);\n }\n `}(e),n+=Bs(e,"fade"),n+=Bs(e,"slide"),n}(Ws(e),t);Rs=document.createElement("style"),Rs.textContent=n,document.head.appendChild(Rs),function(){if(Hs||!Rs)return;const e=Rs;Hs=new MutationObserver(()=>{document.head.contains(e)||document.head.appendChild(e)}),Hs.observe(document.head,{childList:!0})}()}function Bs(e,t){const n=`${e.revealed}_${t}`;return"slide"===t?`\n @keyframes ${n} {\n from { opacity: 0; transform: translateY(10px); }\n to { opacity: 1; transform: translateY(0); }\n }\n .${e.revealed} .${e.content} {\n animation: var(--fanid-gate-reveal-animation, ${n} 0.4s ease-out);\n }\n `:`\n @keyframes ${n} {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n .${e.revealed} .${e.content} {\n animation: var(--fanid-gate-reveal-animation, ${n} 0.3s ease-out);\n }\n `}const qs=/* @__PURE__ */new Map;function Gs(e,t){if(qs.has(e))return;const n=()=>{if(!e.querySelector(`.${t.overlay}`)){const t=e;t.connectedCallback&&(t.disconnectedCallback?.(),t.connectedCallback())}},o=new MutationObserver(()=>{n()});o.observe(e,{childList:!0,subtree:!0});const i=setInterval(n,3e3);qs.set(e,{observer:o,intervalId:i})}function Js(e){const t=qs.get(e);t&&(t.observer.disconnect(),clearInterval(t.intervalId),qs.delete(e))}function Ks(e,t){const n=document.createElement("div");if(n.className=e.panel,t.logoUrl){const o=document.createElement("img");o.className=e.logo,o.src=t.logoUrl,o.alt="",n.appendChild(o)}const o=document.createElement("h3");o.className=e.title,o.textContent=t.title,n.appendChild(o);const i=document.createElement("p");i.className=e.message,i.textContent=t.message,n.appendChild(i);const s=document.createElement("button");return s.className=e.button,s.textContent=t.buttonText,n.appendChild(s),n}function Ys(e,t,n,o=!1){o&&(e.innerHTML="");const i=document.createElement("div");i.className=t.overlay,i.setAttribute("role","dialog"),i.setAttribute("aria-label",n.title);const s=document.createElement("div");s.className=t.gradient,i.appendChild(s);const r=Ks(t,n);return i.appendChild(r),e.appendChild(i),i}function Zs(e,t){return{title:e.placeholder.title,message:e.placeholder.message,buttonText:e.placeholder.buttonText,logoUrl:t.organization?.branding?.logoUrl??null}}function Xs(e,t){const n=t.organization?.branding?.primaryColor,o=t.organization?.branding?.accentColor;n&&e.style.setProperty("--fanid-gate-button-bg",n),o&&(e.style.setProperty("--fanid-gate-title-color",o),e.style.setProperty("--fanid-gate-message-color",o))}function Qs(e){const t={},n=e.getAttribute("data-fanid-title"),o=e.getAttribute("data-fanid-message"),i=e.getAttribute("data-fanid-button");return n&&(t.title=n),o&&(t.message=o),i&&(t.buttonText=i),t}function er(e,t){switch(t){case"gradient":return e.modeGradient;case"cover":return e.modeCover;default:return e.modeBlur}}function tr(e,t){for(const n of Array.from(e.children))n!==t&&n instanceof HTMLElement&&(n.style.filter="",n.style.userSelect="",n.style.pointerEvents="")}const nr=["placeholder-title","placeholder-message","placeholder-button-text","style-mode","teaser-height","min-height"];class or extends HTMLElement{unsubscribe=null;isRevealed=!1;originalChildren=[];rootEl=null;static get observedAttributes(){return[...nr]}connectedCallback(){const e=Qi();this.render(e.getState().isAuthenticated),this.unsubscribe=e.subscribe(e=>{const t=e.isAuthenticated;t!==this.isRevealed&&(this.isRevealed=t,this.render(t))}),e.getState().isAuthenticated||ns().emit("gate:applied",this)}disconnectedCallback(){this.unsubscribe?.(),this.unsubscribe=null,Js(this)}attributeChangedCallback(){this.isConnected&&this.render(this.isRevealed)}getConfig(){const e=Qi().getState().config;return{...e,placeholder:{title:this.getAttribute("placeholder-title")??e.placeholder.title,message:this.getAttribute("placeholder-message")??e.placeholder.message,buttonText:this.getAttribute("placeholder-button-text")??e.placeholder.buttonText},style:this.getAttribute("style-mode")??e.style,teaserHeight:this.hasAttribute("teaser-height")?Number(this.getAttribute("teaser-height")):e.teaserHeight,minHeight:this.hasAttribute("min-height")?Number(this.getAttribute("min-height")):e.minHeight}}render(e){const t=this.getConfig(),n=Qi().getState(),o=Ws(n.classPrefix);if(Xs(this,n),e){if(this.rootEl){this.rootEl.remove(),this.rootEl=null;for(const e of this.originalChildren)this.appendChild(e);this.originalChildren=[]}return Js(this),void ns().emit("gate:reveal",this)}this.rootEl?this.rootEl.remove():this.originalChildren=Array.from(this.childNodes);const i=document.createElement("div");i.className=`${o.root} ${er(o,t.style)}`;const s=document.createElement("div");s.className=o.content;for(const l of this.originalChildren)s.appendChild(l);i.appendChild(s);const r=Ys(i,o,Zs(t,n));r.querySelector(`.${o.button}`)?.addEventListener("click",()=>{ns().emit("gate:click",this),window.__fanid_api?.redirectToLogin()}),this.rootEl=i,this.appendChild(i),Gs(this,o)}}const ir="data-fanid-gated",sr=/* @__PURE__ */new Map;let rr=null;function lr(e){return"string"==typeof e?document.querySelector(e):e}function ar(e,t){const n=lr(e);if(!n||sr.has(n))return;const o=Qi(),i=o.getState().config,s=Ws(o.getState().classPrefix),r=n.getAttribute("data-fanid-min-height"),l={...i,...t,placeholder:{...i.placeholder,...Qs(n),...t?.placeholder},style:t?.style??n.getAttribute("data-fanid-style")??i.style,minHeight:t?.minHeight??(r?Number(r):i.minHeight)};"static"===window.getComputedStyle(n).position&&(n.style.position="relative"),n.style.overflow="hidden",n.style.minHeight=`${l.minHeight}px`,Xs(n,o.getState());const a=document.createElement("div");a.className=`${s.overlayHost} ${er(s,l.style)}`,n.appendChild(a);const c=e=>{if(e)return a.innerHTML="",a.style.display="none",n.style.minHeight="",tr(n,a),Js(n),void ns().emit("gate:reveal",n);a.style.display="",n.style.minHeight=`${l.minHeight}px`;const t=Zs(l,o.getState());Ys(a,s,t,!0),function(e,t,n){for(const o of Array.from(e.children))o!==t&&o instanceof HTMLElement&&(o.style.filter=`blur(${n}px)`,o.style.userSelect="none",o.style.pointerEvents="none")}(n,a,l.blurAmount),a.querySelector(`.${s.button}`)?.addEventListener("click",()=>{ns().emit("gate:click",n),window.__fanid_api?.redirectToLogin()}),Gs(n,s)};c(o.getState().isAuthenticated);const u=o.subscribe(e=>{c(e.isAuthenticated)});sr.set(n,{overlayHost:a,unsubscribe:u}),ns().emit("gate:applied",n)}function cr(e){const t=lr(e);if(!t)return;const n=sr.get(t);n&&(n.unsubscribe(),Js(t),n.overlayHost.remove(),t.style.minHeight="",tr(t,n.overlayHost),sr.delete(t))}let ur=null,dr=null;function fr(){ur&&(document.body.style.filter="",document.body.style.pointerEvents="",document.body.style.userSelect="",ur.remove(),ur=null,dr?.(),dr=null)}const pr=new class{app=null;container=null;api=null;initialized=!1;containerId=null;logger;constructor(){this.logger=Ns().withTag("FanIDWidget"),ts=new es}init(e={}){this.initialized?this.logger.warn("FanIDWidget already initialized"):"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>this._mount(e)):this._mount(e)}destroy(){this._unmountFloatingWidget(),this.api=null,this.initialized=!1,rr?.disconnect(),rr=null,function(){for(const[e]of sr)cr(e)}(),Hs?.disconnect(),Hs=null,Rs?.remove(),Rs=null,delete window.__fanid_api}isInitialized(){return this.initialized}gate(e,t){this.ensureInitialized(),ar(e,t)}ungate(e){this.ensureInitialized(),cr(e)}element(e){this.ensureInitialized(),ar(e.el,e)}isGated(e){return function(e){const t=lr(e);return!!t&&sr.has(t)}(e)}gateFullPage(e){this.ensureInitialized(),function(e){if(ur)return;const t=Qi(),n=t.getState(),o=n.config,i=Ws(n.classPrefix),s=e?.title??o.placeholder.title,r=e?.message??o.placeholder.message,l=e?.buttonText??o.placeholder.buttonText,a=e?.allowClose??!1,c=e?.backdropBlur??8,u=n.organization?.branding?.logoUrl??null;document.body.style.filter=`blur(${c}px)`,document.body.style.pointerEvents="none",document.body.style.userSelect="none",ur=document.createElement("div"),ur.className=i.fullpage,Xs(ur,n);const d=Ks(i,{title:s,message:r,buttonText:l,logoUrl:u});if(d.style.position="relative",a){const e=document.createElement("button");e.className=i.fullpageClose,e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",()=>fr()),d.insertBefore(e,d.firstChild)}d.querySelector(`.${i.button}`)?.addEventListener("click",()=>{ns().emit("gate:click",document.body),window.__fanid_api?.redirectToLogin()}),ur.appendChild(d),document.documentElement.appendChild(ur),dr=t.subscribe(e=>{e.isAuthenticated&&fr()})}(e)}ungateFullPage(){fr()}on(e,t){ns().on(e,t)}off(e,t){ns().off(e,t)}async isAuthenticated(){return this.ensureInitialized(),Qi().getState().isAuthenticated}async getProfile(){return this.ensureInitialized(),Qi().getState().profile}login(){this.ensureInitialized(),this.api.redirectToLogin()}async logout(){this.ensureInitialized(),await this.api.logout(),Qi().update({isAuthenticated:!1,profile:null}),ns().emit("auth:logout")}showFloatingWidget(){this.ensureInitialized(),this.app||this._mountFloatingWidget()}hideFloatingWidget(){this._unmountFloatingWidget()}_mountFloatingWidget(){if(this.app)return;sessionStorage.removeItem("fanid_widget_closed");let e=this.containerId?document.getElementById(this.containerId):null;e||(e=document.createElement("div"),e.id="fanid-widget-root",document.body.insertBefore(e,document.body.firstChild)),this.container=e,this.app=Ki(Ts),this.app.mount(e)}_unmountFloatingWidget(){this.app&&(this.app.unmount(),this.app=null),this.container&&"fanid-widget-root"===this.container.id&&this.container.remove(),this.container=null}async _mount(e){try{const n=new Us(e.baseUrl);this.api=n,window.__fanid_api=n;const o=(t=e.gatedContent,Xi=new Zi(t),Xi),i=ns(),s=await n.getOrganization();o.update({organization:s});const{isAuthenticated:r,profile:l}=await n.checkAuthStatus(),a=o.getState().isAuthenticated;o.update({isAuthenticated:r,profile:l,initialized:!0}),r&&l&&!a&&i.emit("auth:login",l),this.containerId=e.containerId??null,!1!==e.floatingWidget&&this._mountFloatingWidget();const c=o.getState().config;c.enabled&&(Vs(o.getState().classPrefix,c),function(e="wmt-fanid-protected"){customElements.get(e)||customElements.define(e,or)}(c.customElementName),function(){const e=document.querySelectorAll(`[${ir}]`);for(const t of e)sr.has(t)||ar(t)}(),rr||(rr=new MutationObserver(e=>{for(const t of e)for(const e of t.addedNodes)if(e instanceof HTMLElement){e.hasAttribute(ir)&&ar(e);const t=e.querySelectorAll(`[${ir}]`);for(const e of t)ar(e)}}),rr.observe(document.body,{childList:!0,subtree:!0}))),this.initialized=!0,i.emit("ready"),this.logger.info("FanIDWidget initialized successfully")}catch(n){this.logger.error("Failed to initialize FanIDWidget:",n)}var t}ensureInitialized(){this.initialized||this.logger.warn("FanIDWidget not initialized. Call init() first.")}};"undefined"!=typeof window&&(window.FanIDWidget=pr);export{pr as default};
@@ -0,0 +1,8 @@
1
+ import type { Maybe } from './types';
2
+ interface Props {
3
+ logo?: Maybe<string>;
4
+ organizationName?: Maybe<string>;
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { Maybe } from './types';
2
+ interface Props {
3
+ displayName: Maybe<string>;
4
+ email: Maybe<string>;
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ logout: () => any;
8
+ redirect: () => any;
9
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
10
+ onLogout?: (() => any) | undefined;
11
+ onRedirect?: (() => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { Maybe } from './types';
2
+ interface Props {
3
+ logo?: Maybe<string>;
4
+ organizationName?: Maybe<string>;
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ login: () => any;
8
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
9
+ onLogin?: (() => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import type { Maybe, OrganizationModel, SubscriberModel } from './types';
2
+ declare class FanIDApi {
3
+ private readonly baseUrl;
4
+ private orgDomain;
5
+ private logger;
6
+ constructor(baseUrl?: string);
7
+ checkAuthStatus(): Promise<{
8
+ isAuthenticated: boolean;
9
+ profile: Maybe<SubscriberModel>;
10
+ }>;
11
+ getOrganizationProfile(): Promise<Maybe<SubscriberModel>>;
12
+ getMe(): Promise<Maybe<SubscriberModel>>;
13
+ refreshToken(): Promise<boolean>;
14
+ logout(): Promise<Maybe<SubscriberModel>>;
15
+ getOrganization(): Promise<Maybe<OrganizationModel>>;
16
+ connectUserToTheFanIdOrg(): Promise<Maybe<SubscriberModel>>;
17
+ getLoginUrl(returnUrl?: string): string;
18
+ getMyProfileUrl(): string;
19
+ redirectToLogin(): void;
20
+ getBaseUrl(): string;
21
+ getOrgDomain(): Maybe<string>;
22
+ }
23
+ export default FanIDApi;
@@ -0,0 +1,20 @@
1
+ import type { SubscriberModel } from './types';
2
+ export interface FanIDEventMap {
3
+ 'auth:login': (profile: SubscriberModel) => void;
4
+ 'auth:logout': () => void;
5
+ 'gate:applied': (element: HTMLElement) => void;
6
+ 'gate:reveal': (element: HTMLElement) => void;
7
+ 'gate:click': (element: HTMLElement) => void;
8
+ ready: () => void;
9
+ }
10
+ export type FanIDEventName = keyof FanIDEventMap;
11
+ declare class FanIDEvents {
12
+ private handlers;
13
+ on<K extends FanIDEventName>(event: K, callback: FanIDEventMap[K]): void;
14
+ off<K extends FanIDEventName>(event: K, callback: FanIDEventMap[K]): void;
15
+ emit<K extends FanIDEventName>(event: K, ...args: Parameters<FanIDEventMap[K]>): void;
16
+ removeAll(): void;
17
+ }
18
+ export declare function createEvents(): FanIDEvents;
19
+ export declare function getEvents(): FanIDEvents;
20
+ export {};
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Shared DOM construction utilities for gated content overlays.
3
+ * Used by protected-element, programmatic-gate, and fullpage-gate.
4
+ */
5
+ import type { AuthState, GatedContentConfig } from '../state';
6
+ import type { ClassMap } from './styles';
7
+ export interface OverlayContent {
8
+ title: string;
9
+ message: string;
10
+ buttonText: string;
11
+ logoUrl: string | null;
12
+ }
13
+ /**
14
+ * Build the placeholder panel DOM (logo + title + message + button).
15
+ * Returns the panel element. Caller is responsible for appending it.
16
+ */
17
+ export declare function buildPlaceholderPanel(classes: ClassMap, content: OverlayContent): HTMLElement;
18
+ /**
19
+ * Build the full overlay structure (overlay > gradient + panel).
20
+ * Appends it to the container. Returns the overlay element.
21
+ */
22
+ export declare function buildOverlayInto(container: HTMLElement, classes: ClassMap, content: OverlayContent, clear?: boolean): HTMLElement;
23
+ /**
24
+ * Extract overlay content from state and config.
25
+ */
26
+ export declare function getOverlayContent(config: GatedContentConfig, state: AuthState): OverlayContent;
27
+ /**
28
+ * Apply organization branding as CSS custom properties on an element.
29
+ */
30
+ export declare function applyBrandingVars(el: HTMLElement, state: AuthState): void;
31
+ /**
32
+ * Read gated content config overrides from data attributes on an element.
33
+ */
34
+ export declare function readDataAttributes(el: HTMLElement): Partial<GatedContentConfig['placeholder']>;
35
+ /**
36
+ * Get the CSS mode class for a given gate style.
37
+ */
38
+ export declare function getModeClass(classes: ClassMap, style: GatedContentConfig['style']): string;
39
+ /**
40
+ * Apply blur styles to all children of a parent, excluding a specific element.
41
+ */
42
+ export declare function applyBlurToChildren(parent: HTMLElement, exclude: HTMLElement, blurAmount: number): void;
43
+ /**
44
+ * Remove blur styles from all children of a parent, excluding a specific element.
45
+ */
46
+ export declare function removeBlurFromChildren(parent: HTMLElement, exclude: HTMLElement): void;
@@ -0,0 +1,10 @@
1
+ export interface FullPageGateOptions {
2
+ title?: string;
3
+ message?: string;
4
+ buttonText?: string;
5
+ allowClose?: boolean;
6
+ backdropBlur?: number;
7
+ }
8
+ export declare function gateFullPage(options?: FullPageGateOptions): void;
9
+ export declare function ungateFullPage(): void;
10
+ export declare function isFullPageGated(): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Anti-tamper integrity verification for gated content.
3
+ *
4
+ * Monitors gate container elements for unauthorized modifications
5
+ * (e.g., ad-blocker extensions removing the overlay) and triggers
6
+ * re-render when tampering is detected.
7
+ */
8
+ import type { ClassMap } from './styles';
9
+ export declare function startIntegrityWatch(host: HTMLElement, classMap: ClassMap): void;
10
+ export declare function stopIntegrityWatch(host: HTMLElement): void;
11
+ export declare function stopAllIntegrityWatches(): void;
@@ -0,0 +1,16 @@
1
+ import { type GatedContentConfig } from '../state';
2
+ export interface GateOptions {
3
+ el: string | HTMLElement;
4
+ placeholder?: Partial<GatedContentConfig['placeholder']>;
5
+ style?: GatedContentConfig['style'];
6
+ blurAmount?: number;
7
+ minHeight?: number;
8
+ teaserHeight?: number;
9
+ }
10
+ export declare function gateElement(target: string | HTMLElement, options?: Partial<GateOptions>): void;
11
+ export declare function ungateElement(target: string | HTMLElement): void;
12
+ export declare function isElementGated(target: string | HTMLElement): boolean;
13
+ export declare function scanDataAttributes(): void;
14
+ export declare function startBodyObserver(): void;
15
+ export declare function stopBodyObserver(): void;
16
+ export declare function ungateAll(): void;
@@ -0,0 +1,13 @@
1
+ export declare class FanIDProtectedElement extends HTMLElement {
2
+ private unsubscribe;
3
+ private isRevealed;
4
+ private originalChildren;
5
+ private rootEl;
6
+ static get observedAttributes(): string[];
7
+ connectedCallback(): void;
8
+ disconnectedCallback(): void;
9
+ attributeChangedCallback(): void;
10
+ private getConfig;
11
+ private render;
12
+ }
13
+ export declare function registerProtectedElement(tagName?: string): void;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * CSS-in-JS styles for gated content overlays.
3
+ *
4
+ * Uses randomized class name prefix (generated at init) for ad-blocker resistance.
5
+ * Every single CSS property is configurable via --fanid-gate-* custom properties.
6
+ */
7
+ import type { GatedContentConfig } from '../state';
8
+ export interface ClassMap {
9
+ root: string;
10
+ content: string;
11
+ overlay: string;
12
+ gradient: string;
13
+ panel: string;
14
+ title: string;
15
+ message: string;
16
+ button: string;
17
+ logo: string;
18
+ revealed: string;
19
+ overlayHost: string;
20
+ fullpage: string;
21
+ fullpageClose: string;
22
+ modeBlur: string;
23
+ modeGradient: string;
24
+ modeCover: string;
25
+ }
26
+ export declare function getClassMap(prefix: string): ClassMap;
27
+ export declare function injectGateStyles(prefix: string, config: GatedContentConfig): void;
28
+ export declare function removeGateStyles(): void;
@@ -0,0 +1,36 @@
1
+ import type { Maybe, OrganizationModel, SubscriberModel } from './types';
2
+ export interface GatedContentConfig {
3
+ enabled: boolean;
4
+ customElementName: string;
5
+ placeholder: {
6
+ title: string;
7
+ message: string;
8
+ buttonText: string;
9
+ };
10
+ style: 'blur' | 'gradient' | 'cover';
11
+ blurAmount: number;
12
+ minHeight: number;
13
+ teaserHeight?: number;
14
+ revealAnimation: 'fade' | 'slide' | 'none';
15
+ }
16
+ export interface AuthState {
17
+ initialized: boolean;
18
+ isAuthenticated: boolean;
19
+ profile: Maybe<SubscriberModel>;
20
+ organization: Maybe<OrganizationModel>;
21
+ config: GatedContentConfig;
22
+ classPrefix: string;
23
+ }
24
+ export type StateListener = (state: Readonly<AuthState>) => void;
25
+ declare class FanIDState {
26
+ private state;
27
+ private listeners;
28
+ constructor(configOverrides?: Partial<GatedContentConfig>);
29
+ getState(): Readonly<AuthState>;
30
+ update(partial: Partial<AuthState>): void;
31
+ subscribe(listener: StateListener): () => void;
32
+ private notify;
33
+ }
34
+ export declare function createState(configOverrides?: Partial<GatedContentConfig>): FanIDState;
35
+ export declare function getState(): FanIDState;
36
+ export {};
@@ -0,0 +1,67 @@
1
+ export type Maybe<T> = T | null;
2
+ export interface BaseType extends Record<string, unknown> {
3
+ id: string;
4
+ }
5
+ export interface ExtendedBaseType extends BaseType {
6
+ createdAt: Maybe<string>;
7
+ updatedAt: Maybe<string>;
8
+ }
9
+ export interface SingleRecordResponse<T> {
10
+ data: T;
11
+ }
12
+ export interface BrandingSettingsModel extends Record<string, unknown> {
13
+ logoId: Maybe<string>;
14
+ logoUrl: Maybe<string>;
15
+ faviconId: Maybe<string>;
16
+ faviconUrl: Maybe<string>;
17
+ loginPageImageId: Maybe<string>;
18
+ loginPageImageUrl: Maybe<string>;
19
+ landingBackgroundImageId: Maybe<string>;
20
+ landingBackgroundImageUrl: Maybe<string>;
21
+ landingMainLogoId: Maybe<string>;
22
+ landingMainLogoUrl: Maybe<string>;
23
+ primaryColor: Maybe<string>;
24
+ accentColor: Maybe<string>;
25
+ title: Maybe<string>;
26
+ subtitle: Maybe<string>;
27
+ privacyPolicyUrl: Maybe<string>;
28
+ termsUrl: Maybe<string>;
29
+ }
30
+ export type FeaturesType = string;
31
+ export interface OrganizationDomain extends ExtendedBaseType {
32
+ domain: string;
33
+ organizationId: string;
34
+ }
35
+ export interface OrganizationModel extends ExtendedBaseType {
36
+ branding: BrandingSettingsModel;
37
+ city?: string;
38
+ domainName: string;
39
+ name: string;
40
+ features: Record<FeaturesType, boolean>;
41
+ organizationDomains?: OrganizationDomain[];
42
+ }
43
+ export interface SubscriberModel extends ExtendedBaseType {
44
+ active: boolean;
45
+ birthdate: Maybe<string>;
46
+ countryCode: string;
47
+ dataConsentAccepted: boolean;
48
+ email: string;
49
+ firstName: string;
50
+ lastName: string;
51
+ password: string;
52
+ passwordConfirmation: string;
53
+ phone: Maybe<string>;
54
+ region: Maybe<string>;
55
+ organization?: OrganizationModel;
56
+ }
57
+ export interface FanIDApiRef {
58
+ redirectToLogin: () => void;
59
+ getLoginUrl: (returnUrl?: string) => string;
60
+ getMyProfileUrl: () => string;
61
+ logout: () => Promise<unknown>;
62
+ }
63
+ declare global {
64
+ interface Window {
65
+ __fanid_api?: FanIDApiRef;
66
+ }
67
+ }
@@ -0,0 +1 @@
1
+ export declare function darkenColor(color: string, percent: number): string;
@@ -0,0 +1,48 @@
1
+ import { type GatedContentConfig } from './state';
2
+ import { type FanIDEventMap, type FanIDEventName } from './events';
3
+ import { type GateOptions } from './gated-content/programmatic-gate';
4
+ import { type FullPageGateOptions } from './gated-content/fullpage-gate';
5
+ import type { Maybe, SubscriberModel } from './types';
6
+ export interface WidgetConfig {
7
+ baseUrl?: string;
8
+ containerId?: string;
9
+ floatingWidget?: boolean;
10
+ gatedContent?: Partial<GatedContentConfig>;
11
+ }
12
+ declare class FanIDWidget {
13
+ private app;
14
+ private container;
15
+ private api;
16
+ private initialized;
17
+ private containerId;
18
+ private readonly logger;
19
+ constructor();
20
+ init(config?: WidgetConfig): void;
21
+ destroy(): void;
22
+ isInitialized(): boolean;
23
+ gate(target: string | HTMLElement, options?: Partial<GateOptions>): void;
24
+ ungate(target: string | HTMLElement): void;
25
+ element(config: GateOptions): void;
26
+ isGated(target: string | HTMLElement): boolean;
27
+ gateFullPage(options?: FullPageGateOptions): void;
28
+ ungateFullPage(): void;
29
+ on<K extends FanIDEventName>(event: K, callback: FanIDEventMap[K]): void;
30
+ off<K extends FanIDEventName>(event: K, callback: FanIDEventMap[K]): void;
31
+ isAuthenticated(): Promise<boolean>;
32
+ getProfile(): Promise<Maybe<SubscriberModel>>;
33
+ login(): void;
34
+ logout(): Promise<void>;
35
+ showFloatingWidget(): void;
36
+ hideFloatingWidget(): void;
37
+ private _mountFloatingWidget;
38
+ private _unmountFloatingWidget;
39
+ private _mount;
40
+ private ensureInitialized;
41
+ }
42
+ declare const widgetInstance: FanIDWidget;
43
+ export default widgetInstance;
44
+ declare global {
45
+ interface Window {
46
+ FanIDWidget: FanIDWidget;
47
+ }
48
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfigFnObject;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ :root{--fanid-primary-color: #f26522;--fanid-primary-color-hover: #002b5c;--fanid-secondary-color: #002b5c;--fanid-shadow: 0 4px 12px rgba(0, 0, 0, .15)}.fanid-widget{position:fixed;top:16px;right:16px;width:320px;z-index:999999;background:#fff;border-radius:14px;color:var(--fanid-secondary-color);box-shadow:0 4px 24px #0000001f,0 1px 4px #00000014;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;animation:fanid-slideDown .3s ease-out}@keyframes fanid-slideDown{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}.fanid-widget__container{position:relative}.fanid-widget__close{position:absolute;right:-8px;top:-8px;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:#fff;color:var(--fanid-secondary-color);opacity:.7;cursor:pointer;transition:opacity .2s,box-shadow .2s;display:flex;align-items:center;justify-content:center;font-size:14px;line-height:1;z-index:1;box-shadow:0 1px 4px #00000026}.fanid-widget__close:hover{opacity:1;box-shadow:0 2px 8px #0003}.fanid-widget__content{padding:20px;display:flex;flex-direction:column;gap:16px}.fanid-widget__brand{display:flex;align-items:center;gap:12px}.fanid-widget__brand .fanid-widget__icon{width:36px;height:36px;flex-shrink:0;display:flex;align-items:center;justify-content:center}.fanid-widget__brand .fanid-widget__icon img{width:100%;height:100%;object-fit:contain;border-radius:8px}.fanid-widget__brand-text{display:flex;flex-direction:column;gap:2px;min-width:0}.fanid-widget__brand-label{font-size:15px;font-weight:700;color:var(--fanid-secondary-color);line-height:1.3}.fanid-widget__text{font-size:13px;color:var(--fanid-secondary-color);opacity:.6;line-height:1.3}.fanid-widget__button{padding:0 16px;height:40px;background:var(--fanid-primary-color);color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer;transition:background .2s;display:flex;align-items:center;justify-content:center;font-family:inherit}.fanid-widget__button:hover{background:var(--fanid-primary-color-hover)}.fanid-widget__button:active{transform:scale(.98)}.fanid-widget__content--logged-in{padding:16px 20px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px}.fanid-widget__user-info{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.fanid-widget__user-avatar{width:36px;height:36px;border-radius:10px;background:var(--fanid-primary-color);color:#fff;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;flex-shrink:0}.fanid-widget__user-icon{width:24px;height:24px;display:flex;align-items:center;justify-content:center;color:var(--fanid-secondary-color)}.fanid-widget__user-icon svg{width:100%;height:100%}.fanid-widget__user-text{display:flex;flex-direction:column;gap:1px;min-width:0}.fanid-widget__user-name{font-size:14px;font-weight:600;line-height:1.3;color:var(--fanid-secondary-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fanid-widget__user-email{font-size:12px;color:var(--fanid-secondary-color);opacity:.5;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fanid-widget__actions{display:flex;align-items:center;gap:4px;flex-shrink:0}.fanid-widget__redirect-button{padding:6px 12px;background:transparent;border:1px solid rgba(0,0,0,.12);border-radius:8px;font-size:12px;font-weight:500;color:var(--fanid-secondary-color);cursor:pointer;transition:background .2s,border-color .2s;white-space:nowrap;font-family:inherit}.fanid-widget__redirect-button:hover{background:#0000000a;border-color:#0003}.fanid-widget__logout-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;cursor:pointer;transition:background .2s;display:flex;align-items:center;justify-content:center;opacity:.4}.fanid-widget__logout-button svg{width:18px;height:18px}.fanid-widget__logout-button:hover{background:#0000000f;opacity:1}.fanid-widget__loading{padding:24px;display:flex;align-items:center;justify-content:center;color:var(--fanid-secondary-color);opacity:.5;font-size:13px}.fanid-widget__spinner{width:22px;height:22px;border:3px solid rgba(0,0,0,.1);border-top-color:var(--fanid-primary-color);border-radius:50%;animation:fanid-spin .8s linear infinite}@keyframes fanid-spin{to{transform:rotate(360deg)}}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@wmt-fanid/widget",
3
+ "version": "0.0.1",
4
+ "description": "FanID authentication widget with gated content support",
5
+ "private": false,
6
+ "homepage": "https://docs.fanid.co",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "type": "module",
11
+ "main": "./dist/fan-id-widget.js",
12
+ "module": "./dist/fan-id-widget.js",
13
+ "types": "./dist/widget.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "import": "./dist/fan-id-widget.js",
17
+ "types": "./dist/widget.d.ts"
18
+ },
19
+ "./dist/style.css": "./dist/style.css",
20
+ "./package.json": "./package.json"
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "dev:prepare": "pnpm build",
27
+ "dev": "vite",
28
+ "build": "vite build && vue-tsc --declaration --emitDeclarationOnly --outDir dist",
29
+ "preview": "vite preview",
30
+ "typecheck": "vue-tsc --noEmit",
31
+ "test": "vitest run",
32
+ "test:watch": "vitest"
33
+ },
34
+ "devDependencies": {
35
+ "@vitejs/plugin-vue": "^6.0.5",
36
+ "@vue/tsconfig": "^0.9.0",
37
+ "consola": "^3.4.2",
38
+ "typescript": "^5.0.0",
39
+ "vite": "7.3.1",
40
+ "vue": "^3.5.30",
41
+ "vue-tsc": "^3.2.6",
42
+ "vitest": "^4.1.0",
43
+ "happy-dom": "^18.0.1"
44
+ }
45
+ }